Postado Junho 20, 2014 11 anos Já tem isso ... Se você não for premium ... PLAYER:sendCancelMessage("You no have premium account.") E se você já fizer as 5 bless ... PLAYER:sendCancelMessage("You have already been blessed by the gods.") STYLLER OT 2022
Postado Junho 20, 2014 11 anos Autor entao sla nao esta funcionando o item esse primeiro script funfo direitinho so falto as coisas que mencionei o segundo testei e nao esta funcionando -- <action itemid="9999" script="teste.lua"/>function onUse(cid, item, fromPosition, itemEx, toPosition) local PLAYER = Player(cid) local COST = getBlessingsCost(getPlayerLevel(cid)) local BOOK_ID = 9999 if item.itemid == BOOK_ID then if(not(isPlayerPzLocked(cid))) then if(PLAYER:hasBlessing(1) and PLAYER:hasBlessing(2) and PLAYER:hasBlessing(3) and PLAYER:hasBlessing(4) and PLAYER:hasBlessing(5)) then PLAYER:sendCancelMessage("You have already been blessed by the gods.") return false end if(PLAYER:removeMoney(COST)) then for b = 1,5 do PLAYER:addBlessing(b) end PLAYER:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) PLAYER:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!") Item(item.uid):remove(1) else PLAYER:sendCancelMessage("You need "..COST.." gold coins to buy all 5 bless.") end else PLAYER:sendCancelMessage("You can't buy bless, when you are in a battle.") end else return false end return trueend OldTaboos24hpor48h.com Inauguração DOMONIGO as 18:00 | 18/03/2018 | Stages | Custom Map |VENHA SER TOP TABOOS!
Postado Junho 20, 2014 11 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → CreatureScripts, GlobalEvents e MoveMents" Para: "OTServ → Suporte OTServ → Suporte de Scripts" Ajudei = REP+ Não dou suporte por PM qualquer dúvida procure no fórum,caso não encontre oque procura crie um tópico. [email protected]" /> | TFS 0.4 DEV | %5Bcreaturescript%5D Icones no minimap com descrição%5Btalkaction%5D Adicionar ou remover VIP do player.%5Bcreaturescripts%5D Senha para porta%5Btalkaction%5D Mandar mensagem para pasta do servidorMapa Evento War Castle%5Baction%5D Canoa em MovimentoTeleport Scroll System%5Bcreaturescripts%5D Recompensa por level para X vocations%5Btalkaction%5D Adicionar X item para o player%5Btalkactions%5D Adicionar item para todos players online%5Baction%5D Item que teleporta o player para house[action+movement] Passaporte para entrar no barco
Postado Junho 20, 2014 11 anos Tenta esse ... function onUse(cid, item, frompos, itemEx, topos) local p = Player(cid) local COST = 10000 -- valor da bless if p:getPremiumDays() >= 1 then if(not(isPlayerPzLocked(cid))) then if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5)) then p:sendCancelMessage("You have already been blessed by the gods.") return false end if(p:removeMoney(COST)) then for b = 1,5 do p:addBlessing(b) end p:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) p:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!") Item(item.uid):remove(1) else p:sendCancelMessage("You need "..COST.." gold coins to buy all 5 bless.") end else p:sendCancelMessage("You can't buy bless, when you are in a battle.") end else p:sendCancelMessage("You no have premium account.") end return true end STYLLER OT 2022
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.