Ir para conteúdo

Storm

Héroi
  • Registro em

  • Última visita

Tudo que Storm postou

  1. Não tem lógica da esse erro ; tenta com letra com a inicial maiúscula .
  2. -- Action function onUse(cid, item, fromPosition, itemEx, toPosition) local storages = {23466, 415142, 12345} local exaust = 1 -- horas pra usar novamente if os.time() - getPlayerStorageValue(cid, storages[1]) <= exaust * 3600 and os.time() - getPlayerStorageValue(cid, storages[2]) <= exaust * 60 and os.time() - getPlayerStorageValue(cid, storages[2]) <= exaust * 60 then doSendMagicEffect(getCreaturePosition(cid), 2) return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Aguarde o tempo restante para usar o item novamente") end setPlayerStorageValue(cid, storages[1], os.time()) setPlayerStorageValue(cid, storages[2], os.time()) setPlayerStorageValue(cid, storages[3], os.time()) return doPlayerSendTextMessage(cid, 25, "Você habilitou 3 spells") end
  3. Registrou na XML ? da algum erro na TFS ?
  4. Estou fazendo outro código para outro membro no momento , quando eu acabar eu faço.
  5. Sim, por script
  6. Se eu não me engano , isso é utilizado para regenerar life e mana ; não tem nada a ver com a life total de um player.
  7. -- <talkaction words="!info" event="script" value="info.lua"/> function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end function onSay(cid, words, param) local a = string.explode(param, ",") local b = getPlayerByNameWildcard(a[1]) if (param == '') then doSendMagicEffect(getCreaturePosition(cid), 2) return doPlayerSendTextMessage(cid, 25, "Digite !Player [nome do player]") end if not b then doSendMagicEffect(getCreaturePosition(cid), 2) return doPlayerSendTextMessage(cid, 25, "Player não encontrado ou Offline") end if b then doPlayerPopupFYI(cid, "Name = [ ".. getCreatureName(b) .." ] \n \n Level = [".. getPlayerLevel(b) .."] \n \n MagicLevel = [ ".. getPlayerMagLevel(b) .." ] \n \n Sword = [".. getPlayerSkillLevel(b, 2) .."]\n \n Fist = [".. getPlayerSkillLevel(b, 0).."]\n \n Club = [".. getPlayerSkillLevel(b, 1).."]\n \n Axe = [".. getPlayerSkillLevel(b, 3).."] \n \n Distance = [".. getPlayerSkillLevel(b, 4).."] \n \n Shield = [".. getPlayerSkillLevel(b, 5).."] \n \n Fishing = [".. getPlayerSkillLevel(b, 6).."] \n \n -- PVP -- \n \n Kills/Deaths = [".. getDeathsAndKills(b, "kill") .."/".. getDeathsAndKills(b, "death") .."]") return false end end Ficará assim
  8. function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local msg = "Coloque aqui a msg que irá aparecer no default" -- entre aspas local id = 2184 --- aqui vai o id da wand local a = table[param] local itemid = 2184 -- id da wand vip if getPlayerItemCount(cid, itemid) < 1 then doPlayerSendTextMessage(cid, 28, "Você precisa ter uma wand vip na BP") return true end if not a and param ~= "help" then doPlayerSendTextMessage(cid, 28, "Digite !wand help para saber os elementos disponiveis") return true end if (param == "help") then doPlayerSendTextMessage(cid, 270, msg) return true end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end
  9. function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local msg = "Coloque aqui a msg que irá aparecer no default" -- entre aspas local id = 2184 --- aqui vai o id da wand local a = table[param] local itemid = 2184 -- id da wand vip if not getPlayerItemCount(cid, itemid) > 0 then doPlayerSendTextMessage(cid, 28, "Você precisa ter uma wand vip na BP") return true end if not a and param ~= "help" then doPlayerSendTextMessage(cid, 28, "Digite !wand help para saber os elementos disponiveis") return true end if (param == "help") then doPlayerSendTextMessage(cid, 270, msg) return true end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end
  10. Mude de doPlayerSendTextMessage(cid, 27, msg) Para doPlayerSendTextMessage(cid, 20, msg)
  11. Pode passar a script das spells ? Terei que usar Storage.
  12. function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local msg = "Coloque aqui a msg que irá aparecer no default" -- entre aspas local id = 2184 --- aqui vai o id da wand local a = table[param] if not a and param ~= "help" then doPlayerSendTextMessage(cid, 28, "Digite !wand help para saber os elementos disponiveis") return true end if (param == "help") then doPlayerSendTextMessage(cid, 27, msg) return true end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end
  13. function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local id = 2184 --- aqui vai o id da wand local a = table[param] if not a and param ~= "info" then doPlayerSendTextMessage(cid, 28, "Digite !wand info para saber os elementos disponiveis") return true end if (param == "info") then for element, stor in pairs(table) do text = "Elementos: "..element.."" doPlayerPopupFYI(cid, text) end end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end
  14. Não irá funcionar se você adicionar um novo item ; a script dele não é independente ; terá que fazer diversas modificações para que isso aconteça , já a outra script é só adicionar na tabela
  15. Não irá funcionar ; recomendo usar a script do @erimyth
  16. Poste pelo menos uma script de spell que está na pasta Actions
  17. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    Ambos já existem no fórum
  18. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    No nome do arquivo mude de : theend.otbm.otbm Para theend.otbm E no config.lua coloque , dê CTRL F e procure por mapName e mude para mapName = "theend.otbm"
  19. Você errou o diretório , ou seja na XML do NPC você colocou o diretório da script errado.
  20. Você quer remover o distance effect ou o effect ?
  21. Pensei já ter visto gambiarra , mas oq eu vi nesse tópico aqui hoje superou
  22. O evento irá acontecer que dias da semana ? se for mais de um , você ta registrando na XML os horários de cada um ?
  23. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    <?xml version="1.0" encoding="UTF-8"?> <stages> <world id="0" multiplier="1"> <stage minlevel="1" maxlevel="2499" multiplier="999"/> <stage minlevel="2500" multiplier="1"/> </world> </stages>
  24. Deixa eu vê se entendi , se o player tiver com o upgrade kit ele vai dar use em uma parte do set e a mesma vai ser transformada em uma nova ?

Informação Importante

Confirmação de Termo