Postado Dezembro 22, 2014 10 anos E ai galera, sou iniciante preciso de ajuda pra colocar esse talkaction para ser usado só em pz ou então sem battle (melhor ainda) É um talkaction de teleport para Hunts, com text box dizendo cada hunt, muito legal. Não sei de quem é. Peguei neste tópico: http://www.tibiaking.com/forum/topic/44047-talkaction-teleport-para-hunt/ local price = false -- Preço para usar o comando (caso queira um preço específico para cada lugar, deixe local price = false) local locations = { -- [nome do monstro] = {posição, preço (caso o price seja false)}, ["demon"] = {pos = {x = 140, y = 120, z = 7}, price = 1000}, ["black knight"] = {pos = {x = 220, y = 500, z = 7}, price = 125}, } function onSay(cid, words, param) if not param or not locations[param:lower()] then local str = "Available locations:\n\n" for a, b in pairs(locations) do str = str.."• "..a.."\n" end doPlayerPopupFYI(cid, str) return doPlayerSendCancel(cid, "Specify the location.") elseif price and not doPlayerRemoveMoney(cid, price) or not price and locations[param:lower()].price and not doPlayerRemoveMoney(cid, locations[param:lower()].price) then return doPlayerSendCancel(cid, "Insufficient money. The cost is "..(not price and locations[param:lower()].price or price).." gold coins.") end doTeleportThing(cid, locations[param:lower()].pos) doSendMagicEffect(getCreaturePosition(cid), 10) return true end
Postado Dezembro 23, 2014 10 anos local price = false -- Preço para usar o comando (caso queira um preço específico para cada lugar, deixe local price = false) local locations = { -- [nome do monstro] = {posição, preço (caso o price seja false)}, ["demon"] = {pos = {x = 140, y = 120, z = 7}, price = 1000}, ["black knight"] = {pos = {x = 220, y = 500, z = 7}, price = 125} } function onSay(cid, words, param) local str = "Available locations:\n\n" if not param or not locations[param:lower()] then for a, b in pairs(locations) do str = str.."• "..a.."\n" end doPlayerPopupFYI(cid, str) return doPlayerSendCancel(cid, "Specify the location.") elseif price and not doPlayerRemoveMoney(cid, price) or not price and locations[param:lower()].price and not doPlayerRemoveMoney(cid, locations[param:lower()].price) then return doPlayerSendCancel(cid, "Insufficient money. The cost is "..(not price and locations[param:lower()].price or price).." gold coins.") elseif getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "You can't be teleported in battle.") end doTeleportThing(cid, locations[param:lower()].pos) doSendMagicEffect(getCreaturePosition(cid), 10) return true end The corrupt fear us. The honest support us. The heroic join us.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.