Olá
Eu estava precisando de 2 scripts para "elemental spheres quest" e "lion's rock", eu tenho um da elemental, porém não obtive sucesso, (estarei disponibilizando-o abaixo). Gostaria de saber se tem alguem que tenha e possa passar os scripts, ou então até mesmo ajudar a fazê-los, ou então alguem que queria vendê-los. Obrigado
elementalmachine.lua
--CONFIG
local config = {
machUID = 1400,
machStorage = 1400,
arkStorage = 1401,
overStorage = 1402,
emachAID = 1403,
emachStorage = 1403,
lordStorage = 1404,
resStorage = 1405,
res2Storage = 1406,
messNotGem = "You can't have enchanted gem for you profession.",
messNotArk = "You can't proceed, go back and talk with Arkulius.",
effect = 11 --you can test effects with !z command (ex. !z 23)
}
--/CONFIG
local ArkUSE = getPlayerStorageValue(cid, config.arkStorage)
if item.aid == config.EmachAID and ArkUSE < 1 then
doPlayerSendCancel(cid,config.messNotArk)
end
elseif item.uid == config.EmachUID and ArkUSE == 1 then
if isPaladin(cid) and item.itemid == 8300 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.emachStorage, 1)
elseif isSorcerer(cid) and item.itemid == 8304 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.emachStorage, 1)
elseif isDruid(cid) and item.itemid == 8305 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.emachStorage, 1)
elseif isKnight(cid) and item.itemid == 8306 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.emachStorage, 1)
else
doPlayerSendCancel(cid,config.messNotGem)
end
end
killstorage.lua
local v = {
["Ungreez"] = {message = "Congratulations you are owned Ungreez now you are able to preceed to next mission!", storage = 1290, storageValue = 6},
["Fire Overlord"] = {message = "Congratulations you are owned Fire Overlord go and report Arkulius!", storage = 1402, storageValue = 1},
["Earth Overlord"] = {message = "Congratulations you are owned Earth Overlord go and report Arkulius!", storage = 1402, storageValue = 1},
["Energy Overlord"] = {message = "Congratulations you are owned Energy Overlord go and report Arkulius!", storage = 1402, storageValue = 1},
["Ice Overlord"] = {message = "Congratulations you are owned Ice Overlord go and report Arkulius!", storage = 1402, storageValue = 1},
["Lord of the Elements"] = {message = "Congratulations you are owned Lord of the Elements go and report Arkulius!", storage = 1404, storageValue = 1},
["Koshei The Deathless"] = {message = "You had killed Koshei The Deathless now you can get your prize!", owned = "You already have killed Koshei The Deathless go and get your prize!", storage = 21187, storageValue = 1}
}
function onKill(cid, target, lastHit)
if (isPlayer(cid) == true) and (isMonster(target) == true) then
local monster = v[getCreatureName(target)]
if monster then
setPlayerStorageValue(cid,monster.storage, monster.storageValue)
doCreatureSay(cid, monster.message, TALKTYPE_ORANGE_1)
end
end
return true
end
machine.lua
local config = {
machUID = 1400,
machStorage = 1400,
arkStorage = 1401,
overStorage = 1402,
emachAID = 1403,
emachStorage = 1403,
lordStorage = 1404,
resStorage = 1405,
res2Storage = 1406,
PallyPos = {x=33262, y=32201, z=13},
SorcerPos = {x=33180, y=32198, z=13},
DruidPos = {x=33329, y=32075, z=13},
KninaPos = {x=33086, y=32094, z=13},
messNotGem = "You can't have enchanted gem for you profession.",
messNotArk = "You can't proceed, go back and talk with Arkulius.",
effect = 11 --you can test effects with !z command (ex. !z 23)
}
--/CONFIG
local machUSE = getPlayerStorageValue(cid, config.machStorage)
if item.uid == config.machUID and machUSE == -1 then
doPlayerSendCancel(cid,config.messNotArk)
end
elseif item.uid == config.machUID and machUSE >= 1 then
if isPaladin(cid) and item.itemid == 7759 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.machStorage, machUSE + 1)
elseif isSorcerer(cid) and item.itemid == 7760 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.machStorage, machUSE + 1)
elseif isDruid(cid) and item.itemid == 7761 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.machStorage, machUSE + 1)
elseif isKnight(cid) and item.itemid == 7762 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, config.effect)
setPlayerStorageValue(cid, config.machStorage, machUSE + 1)
elseif item.uid == config.machUID and machUSE == 21 then
if isPaladin(cid) then
doTeleportThing(cid, config.PallyPos)
setPlayerStorageValue(cid, config.machStorage, machUSE - 20)
elseif isSorcerer(cid) then
doTeleportThing(cid, config.SorcerPos)
setPlayerStorageValue(cid, config.machStorage, machUSE - 20)
elseif isDruid(cid) then
doTeleportThing(cid, config.DruidPos)
setPlayerStorageValue(cid, config.machStorage, machUSE - 20)
elseif isKnight(cid) then
doTeleportThing(cid, config.KninaPos)
setPlayerStorageValue(cid, config.machStorage, machUSE - 20)
else
doPlayerSendCancel(cid,config.messNotGem)
end
end
end
obsidianknife.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
-- Lord of the Elements
if itemEx.itemid == 9009 and getPlayerStorageValue(cid,1404) == 1 then
setPlayerStorageValue(cid,1404,2)
doPlayerAddItem(cid,8310,1)
doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
return true
end
if(getPlayerLevel(cid) < config.level) then
doPlayerSendCancel(cid, "You have to be at least Level " .. config.level .. " to use this tool.")
return true
end
local skin = SKINS[itemEx.itemid]
if(not skin) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
return true
end
local random, effect = math.random(1, 100000), CONST_ME_GROUNDSHAKER
if(random <= skin[1]) then
doPlayerAddItem(cid, skin[2], 1)
elseif(skin[3] and random >= skin[3]) then
doPlayerAddItem(cid, skin[4], 1)
else
effect = CONST_ME_POFF
end
doSendMagicEffect(toPosition, effect)
doTransformItem(itemEx.uid, itemEx.itemid + 1)
return true
end
arkulius.lua
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
--CONFIG
local config = {
machUID = 1400,
machStorage = 1400,
arkStorage = 1401,
overStorage = 1402,
emachAID = 1403,
emachStorage = 1403,
lordStorage = 1404,
resStorage = 1405,
res2Storage = 1406,
messNotGem = "You can't proceed, go back and talk with Arkulius.",
messdontDo = "You can't proceed, you need kill your Elemental Overlord.",
effect = 11 --you can test effects with !z command (ex. !z 23)
}
--/CONFIG
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, 'hi') then
if getPlayerStorageValue(cid,config.machStorage) == -1 and talkState[talkUser] == 0 then
npcHandler:say("...then I could transform a spell to bend... How can anyone expect me to work under these conditions?? What do you want?", cid)
talkState[talkUser] = 1
elseif getPlayerStorageValue(cid,config.overStorage) == 1 and talkState[talkUser] == 6 then
npcHandler:say("...then I could transform a spell to bend... How can anyone expect me to work under these conditions?? What do you want?", cid)
talkState[talkUser] = 7
elseif getPlayerStorageValue(cid,config.lordStorage) == 1 and talkState[talkUser] == 8 then
npcHandler:say("...then I could transform a spell to bend... How can anyone expect me to work under these conditions?? What do you want?", cid)
talkState[talkUser] = 9
end
elseif msgcontains(msg, 'Alverus') then
if talkState[talkUser] == 1 then
doNPCTalkALot({"It happened while he carried out an experiment concerning the creation of the elemental shrines. I still get goose bumps just by thinking of it. ...", "You need to know about the process of creating an elemental shrine to understand it completely, but I don't want to go into detail now. ...", "Anyway, his spell had a different outcome than he had planned. He accidentally created an Ice Overlord, pure living elemental ice, who froze him in a blink of an eye."}, 10000, cid)
talkState[talkUser] = 2
end
elseif msgcontains(msg, 'shrines') then
if talkState[talkUser] == 2 then
doNPCTalkALot({"The creation of the elemental shrines is a really complex matter. They are actually nodes, locations where the matching elemental sphere is very close. ...", "The shrine itself is like a portal between our world and the elemental sphere and enables us to use the elemental energy emerging from it."}, 10000, cid)
talkState[talkUser] = 3
end
elseif msgcontains(msg, 'sphere') then
if talkState[talkUser] == 3 then
doNPCTalkALot({"There are four spheres we know of: ice, fire, earth and energy. ....<mumbles> Hmmm, should I ask or not?....The heck with it! Now that you know about the spheres ...", "I found a way to visit them. It's VERY dangerous and there is a decent chance that you won't come back BUT if you succeed you'll write history!!! Ask me about that mission if you're interested."}, 10000, cid)
talkState[talkUser] = 4
end
elseif msgcontains(msg, 'mission') then
if talkState[talkUser] == 4 then
if getPlayerLevel(cid) < 100 then
npcHandler:say("I'm sorry this task is highly dangerous and I need experienced people for it.", cid)
talkState[talkUser] = 0
elseif getPlayerLevel(cid) >= 100 then
doNPCTalkALot({"Okay, listen closely: First of all, you need to gather 20 enchanted amethysts in order to go to the energy sphere. Deep under the academy, one floor below the elemental shrines, there is a machine. Put the gems in there and activate it. ...", "Once you got there, find a way to gather elemental energy in any form. You will face energy elementals, that's for sure, but I don't know how the energy is stored. ...", "Anyway, there should be a way to use that energy and strengthen one of the elementals. If my calculations are right, you will create an Energy Overlord who hopefully will consist of some sort of 'concentrated' energy. ...", "THAT'S what we need!! Are you in on it?"}, 10000, cid)
talkState[talkUser] = 5
elseif getPlayerItemCount(cid, 8300) == 1 or getPlayerItemCount(cid, 8304) == 1 or getPlayerItemCount(cid, 8305) == 1 or getPlayerItemCount(cid, 8306) == 1 and talkState[talkUser] == 7 and getPlayerStorageValue(cid,config.OverStorage) == 1 then
setPlayerStorageValue(cid, config.arkStorage, 1)
talkState[talkUser] = 8
if isPaladin(cid) then
doNPCTalkALot({"Impressive!! Let me take a look.......Ahh, an FLAWLESS ICE CRYSTAL ! Now you need to find a knight, a druid and a sorcerer who also completed this first task. ...", "Go down in the cellar again. I prepared a room under the academy where it should be safe. Your task is to charge the machines with the elemental substances and summon the LORD OF THE ELEMENTS. ...", "When you use an obsidian knife on it's corpse you hopefully get some of the precious neutral matter. It's the only way to revive my dear friend Alverus!!"}, 10000, cid)
elseif isSorcerer(cid) then
doNPCTalkALot({"Impressive!! Let me take a look.......Ahh, an ETERNAL FLAME! Now you need to find a knight, a druid and a paladin who also completed this first task. ...", "Go down in the cellar again. I prepared a room under the academy where it should be safe. Your task is to charge the machines with the elemental substances and summon the LORD OF THE ELEMENTS. ...", "When you use an obsidian knife on it's corpse you hopefully get some of the precious neutral matter. It's the only way to revive my dear friend Alverus!!"}, 10000, cid)
elseif isDruid(cid) then
doNPCTalkALot({"Impressive!! Let me take a look.......Ahh, an MOTHER SOIL! Now you need to find a knight, a paladin and a sorcerer who also completed this first task. ...", "Go down in the cellar again. I prepared a room under the academy where it should be safe. Your task is to charge the machines with the elemental substances and summon the LORD OF THE ELEMENTS. ...", "When you use an obsidian knife on it's corpse you hopefully get some of the precious neutral matter. It's the only way to revive my dear friend Alverus!!"}, 10000, cid)
elseif isKnight(cid) then
doNPCTalkALot({"Impressive!! Let me take a look.......Ahh, an PURE ENERGY! Now you need to find a druid, a paladin and a sorcerer who also completed this first task. ...", "Go down in the cellar again. I prepared a room under the academy where it should be safe. Your task is to charge the machines with the elemental substances and summon the LORD OF THE ELEMENTS. ...", "When you use an obsidian knife on it's corpse you hopefully get some of the precious neutral matter. It's the only way to revive my dear friend Alverus!!"}, 10000, cid)
else
doPlayerSendCancel(cid,config.messdontDo)
end
elseif getPlayerStorageValue(cid,config.lordStorage) == 1 and talkState[talkUser] == 9 then
npcHandler:say("AMAZING!! I'm going to start immediately with the research. If it turns out the way I expect it, Alverus will be revived soon!! Here, take this as a reward and try to collect more of this substance. I'll make you a good offer, I promise.", cid)
talkState[talkUser] = 0
setPlayerStorageValue(cid, config.arkStorage, 2)
if isPaladin(cid) then
doPlayerAddItem(cid,8853,1)
elseif isSorcerer(cid) then
doPlayerAddItem(cid,8867,1)
elseif isDruid(cid) then
doPlayerAddItem(cid,8869,1)
elseif isKnight(cid) then
doPlayerAddItem(cid,8883,1)
end
end
elseif msgcontains(msg, 'yes') then
if talkState[talkUser] == 5 then
npcHandler:say("Good, don't waste time! Come back here when you have the elemental object!", cid)
setPlayerStorageValue(cid, config.machStorage, 1)
talkState[talkUser] = 6
end
end
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())