Postado Janeiro 31, 2017 8 anos Boa tarde pessoal do TIBIA KING! Recentemente baixei a base Poketibia Cyan, nele tem um sistema de trocar TOKENS por HELD itens, só que eu estou com os tokens na bolsa, mas mesmo assim diz que estou sem eles.. Os ids dos tokens são: Devoted Token: ItemID: [14752]. Mighty Token: ItemID: [14750]. Honored Token: ItemID: [14751]. esse é o scrip da troca: function onSay(cid, words, param, channel) if not isCreature(cid) then return true end devotedCount = getPlayerItemCount(cid, devotedToken) mightyCount = getPlayerItemCount(cid, mightyToken) honoredCount = getPlayerItemCount(cid, honoredToken) if words == "#devoted#" then if devotedCount >= 20 then if math.random(1,2) == 1 then tierTable = helds.tiers1 else tierTable = helds.tiers2 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, DevotedToken, 20) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 20 Devoted Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end return true end if words == "#mighty1#" then if mightyCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, mightyToken, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty2#" then if mightyCount >= 100 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, mightyToken, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty3#" then if mightyCount >= 200 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, mightyToken, 200) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 200 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored1#" then if honoredCount >= 25 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, honoredToken, 25) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 25 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored2#" then if honoredCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, honoredToken, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored3#" then if honoredCount >= 100 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, honoredToken, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#heldCount#" then doPlayerSendCancel(cid, "#held#,"..devotedCount..","..mightyCount..","..honoredCount..",") return true end return true end Por favor me ajudem, nao consigo de jeito nenhum. ESTE É O CÓDIGO ORIGINAL>> function onSay(cid, words, param, channel) if not isCreature(cid) then return true end devotedCount = getPlayerItemCount(cid, devotedToken) mightyCount = getPlayerItemCount(cid, mightyToken) honoredCount = getPlayerItemCount(cid, honoredToken) if words == "#devoted#" then if devotedCount >= 20 then if math.random(1,2) == 1 then tierTable = helds.tiers1 else tierTable = helds.tiers2 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, DevotedToken, 20) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 20 Devoted Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end return true end if words == "#mighty1#" then if mightyCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, mightyToken, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty2#" then if mightyCount >= 100 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, mightyToken, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty3#" then if mightyCount >= 200 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, mightyToken, 200) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 200 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored1#" then if honoredCount >= 25 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, honoredToken, 25) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 25 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored2#" then if honoredCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, honoredToken, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored3#" then if honoredCount >= 100 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, honoredToken, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#heldCount#" then doPlayerSendCancel(cid, "#held#,"..devotedCount..","..mightyCount..","..honoredCount..",") return true end return true end Editado Janeiro 31, 2017 8 anos por Shinob (veja o histórico de edições) ∞ Gregorio, HaxYu Corporation Of Technology
Postado Janeiro 31, 2017 8 anos Tenta Assim ! function onSay(cid, words, param, channel) if not isCreature(cid) then return true devotedCount = getPlayerItemCount(cid, 14752) mightyCount = getPlayerItemCount(cid, 14750) honoredCount = getPlayerItemCount(cid, 14751) if words == "#devoted#" then if devotedCount >= 20 then if math.random(1,2) == 1 then tierTable = helds.tiers1 else tierTable = helds.tiers2 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) if doPlayerRemoveItem(cid,14752,1) == TRUE then doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 20 Devoted Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end return true end if words == "#mighty1#" then if mightyCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty2#" then if mightyCount >= 100 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty3#" then if mightyCount >= 200 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 200) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 200 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored1#" then if honoredCount >= 25 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 25) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 25 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored2#" then if honoredCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored3#" then if honoredCount >= 100 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#heldCount#" then doPlayerSendCancel(cid, "#held#,"..devotedCount..","..mightyCount..","..honoredCount..",") return true end return true end
Postado Janeiro 31, 2017 8 anos Autor 2 minutos atrás, wesquel disse: Tenta Assim ! function onSay(cid, words, param, channel) if not isCreature(cid) then return true devotedCount = getPlayerItemCount(cid, 14752) mightyCount = getPlayerItemCount(cid, 14750) honoredCount = getPlayerItemCount(cid, 14751) if words == "#devoted#" then if devotedCount >= 20 then if math.random(1,2) == 1 then tierTable = helds.tiers1 else tierTable = helds.tiers2 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) if doPlayerRemoveItem(cid,14752,1) == TRUE then doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 20 Devoted Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end return true end if words == "#mighty1#" then if mightyCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty2#" then if mightyCount >= 100 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty3#" then if mightyCount >= 200 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 200) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 200 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored1#" then if honoredCount >= 25 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 25) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 25 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored2#" then if honoredCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored3#" then if honoredCount >= 100 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#heldCount#" then doPlayerSendCancel(cid, "#held#,"..devotedCount..","..mightyCount..","..honoredCount..",") return true end return true end Tentei, ai apresentou isso: [31/01/2017 14:37:10] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/otc held.lua:4: 'end' expected (to close 'if' at line 2) near 'devotedCount' [31/01/2017 14:37:10] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/otc held.lua) [31/01/2017 14:37:10] data/talkactions/scripts/otc held.lua:4: 'end' expected (to close 'if' at line 2) near 'devotedCount' ∞ Gregorio, HaxYu Corporation Of Technology
Postado Janeiro 31, 2017 8 anos Agora, Shinob disse: Spoiler function onSay(cid, words, param, channel) if not isCreature(cid) then return true devotedCount = getPlayerItemCount(cid, 14752) mightyCount = getPlayerItemCount(cid, 14750) honoredCount = getPlayerItemCount(cid, 14751) if words == "#devoted#" then if devotedCount >= 20 then if math.random(1,2) == 1 then tierTable = helds.tiers1 else tierTable = helds.tiers2 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid,14752,1) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 20 Devoted Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end return true end if words == "#mighty1#" then if mightyCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty2#" then if mightyCount >= 100 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#mighty3#" then if mightyCount >= 200 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14750, 200) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 200 Mighty Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored1#" then if honoredCount >= 25 then if math.random(1,3) == 1 then tierTable = helds.tiers1 elseif math.random(1,3) == 2 then tierTable = helds.tiers2 else tierTable = helds.tiers3 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 25) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 25 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored2#" then if honoredCount >= 50 then if math.random(1,3) == 1 then tierTable = helds.tiers2 elseif math.random(1,3) == 2 then tierTable = helds.tiers3 else tierTable = helds.tiers4 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 50) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 50 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#honored3#" then if honoredCount >= 100 then if math.random(1,4) == 1 then tierTable = helds.tiers3 elseif math.random(1,4) == 2 then tierTable = helds.tiers4 elseif math.random(1,4) == 3 then tierTable = helds.tiers5 else tierTable = helds.tiers6 end prize = tierTable[math.random(#tierTable)] doPlayerAddItem(cid, prize, 1) doPlayerRemoveItem(cid, 14751, 100) doPlayerSendTextMessage(cid, 19, "You received a "..getItemInfo(prize).name..".") doCreatureExecuteTalkAction(cid, "#heldCount#") return true else doPlayerSendTextMessage(cid, 27, "You need 100 Honored Tokens to pick a held item!") doCreatureExecuteTalkAction(cid, "#heldCount#") return true end end if words == "#heldCount#" then doPlayerSendCancel(cid, "#held#,"..devotedCount..","..mightyCount..","..honoredCount..",") return true end return true end Tenta Esse ! Editado Janeiro 31, 2017 8 anos por wesquel (veja o histórico de edições)
Postado Janeiro 31, 2017 8 anos Autor Mesmo erro /2017 14:42:48] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/otc held.lua:4: 'end' expected (to close 'if' at line 2) near 'devotedCount' [31/01/2017 14:42:48] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/otc held.lua) [31/01/2017 14:42:48] data/talkactions/scripts/otc held.lua:4: 'end' expected (to close 'if' at line 2) near 'devotedCount' ∞ Gregorio, HaxYu Corporation Of Technology
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.