Postado Outubro 10, 2017 7 anos tag <talkaction words="!bless" script="bless.lua" /> bless.lua Spoiler function onSay(player, words, param) local Price = 10000 if(player:hasBlessing(1) and player:hasBlessing(2) and player:hasBlessing(3) and player:hasBlessing(4) and player:hasBlessing(5) and player:hasBlessing(6)) then return doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "You have already been blessed by the gods.") and doSendMagicEffect(getCreaturePosition(player), 3) else if player:removeMoney(Price) then for i = 1, 8 do if not player:hasBlessing(i) then player:addBlessing(i, 1) end end return true else player:sendCancelMessage("You do not have enough money.") return false end return false end end
Postado Outubro 11, 2017 7 anos local blessPrice = 10000 -- preço em Gold Coins. local function haveAllBlessings(player) local blessingsCount = 0 for blessing = 1, 8 do if player:hasBlessing(blessing) then blessingsCount = blessingsCount + 1 end end return blessingsCount == 8 end function onSay(player, words, param) if haveAllBlessings(player) then return player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already been blessed by the gods.") and true end if not player:removeMoney(blessPrice) then return player:sendCancelMessage("You do not have enough money.") and true end for blessing = 1, 8 do if not player:hasBlessing(blessing) then player:addBlessing(blessing, 1) end end player:sendTextMessage(MESSAGE_INFO_DESCR, "You have bought all blessings.") return true end https://github.com/Cjaker/ , _ , ( o o ) /'` ' `'\ ESTOU TE OBSERVANDO O_O |'''''''| |\\'''//| """
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.