Ir para conteúdo

Storm

Héroi
  • Registro em

  • Última visita

Tudo que Storm postou

  1. Registrou na XML ? da algum erro na TFS ?
  2. Estou fazendo outro código para outro membro no momento , quando eu acabar eu faço.
  3. Sim, por script
  4. 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.
  5. -- <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
  6. 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
  7. 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
  8. Mude de doPlayerSendTextMessage(cid, 27, msg) Para doPlayerSendTextMessage(cid, 20, msg)
  9. Pode passar a script das spells ? Terei que usar Storage.
  10. 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
  11. 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
  12. 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
  13. Não irá funcionar ; recomendo usar a script do @erimyth
  14. Poste pelo menos uma script de spell que está na pasta Actions
  15. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    Ambos já existem no fórum
  16. 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"
  17. Você errou o diretório , ou seja na XML do NPC você colocou o diretório da script errado.
  18. Você quer remover o distance effect ou o effect ?
  19. Pensei já ter visto gambiarra , mas oq eu vi nesse tópico aqui hoje superou
  20. O evento irá acontecer que dias da semana ? se for mais de um , você ta registrando na XML os horários de cada um ?
  21. 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>
  22. 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 ?
  23. @Thalles Novais Sim , é padrão da distro mandar os itens da house pro depot da mesma cidade da house function onLogin(cid) local house = getHouseByPlayerGUID(getPlayerGUID(cid)) local pos = {x=94, y=126, z=7} -- pos onde será teleportado if not isPremium(cid) and house then doPlayerSendTextMessage(cid, 27, "Seu premium acabou e você perdeu a house.") setHouseOwner(house, 0) doTeleportThing(cid, pos) end return true end
  24. function onTime() local day = {"Tuesday", "Thursday","Saturday"} -- em ingles local itemid = 3456 -- item que sera criado local pos = {x=94, y=126, z=7, stackpos= 1} -- pos onde será criado local newitem = 2768 -- Id do novo item local min = 1 -- minutos de duração do evento if isInArray(day, os.date("%A")) then doRemoveItem(getThingfromPos(pos).uid, 1) addEvent(doCreateItem, 100, itemid, 1, pos) doBroadcastMessage("O evento abriu", 25) addEvent(function() doTransformItem(getThingFromPos(pos).uid, newitem) end, min * 60 * 1000) addEvent(doBroadcastMessage, min * 60 * 1000, "O evento encerrou", 25) end return true end

Informação Importante

Confirmação de Termo