Postado Julho 13, 2014 11 anos function onSay(cid, words, param) local p = Player(cid) local cost = getBlessingsCost(getPlayerLevel(cid)) 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!") 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 return false end onde eu mudo o valor da bless? o custo dela para os players. Editado Julho 13, 2014 11 anos por maresoft (veja o histórico de edições)
Postado Julho 13, 2014 11 anos if(p:removeMoney(cost)) then for b = 1,5 do fais assim bota o 1, ea quantia. exemplo 1,2: 1,3 etc... Editado Julho 13, 2014 11 anos por slyton (veja o histórico de edições) Servidor com sources estáveis, com sistemas completos e tudo atualizados, para saber mais acessem https://www.facebook.com/pokeVKS
Postado Julho 13, 2014 11 anos No caso, 50k: function onSay(cid, words, param) local p = Player(cid) local cost = getBlessingsCost(getPlayerLevel(cid)) 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 = 50,0 do p:addBlessing(b) end p:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) p:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!") 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 return false end Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Postado Julho 13, 2014 11 anos Autor Absolute não foi, mas eu mudei de script -- !blessing by artofwork local bless = {1, 2, 3, 4, 5} local cost = 50000 local maxlevel = 50000 function onSay(cid, words, param) local lvl = getPlayerLevel(cid) local new_cost = 35000 local target = getPlayerGUID(cid) for i = 1, table.maxn(bless) do if(getPlayerBlessing(cid, bless)) then doPlayerSendCancel(cid, "Você já tem todas as blessings.") return TRUE end end if (getPlayerLevel(cid) >= maxlevel) then if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless) end doPlayerSendTextMessage(cid,22,"Você acaba de comprar uma blessing, e com ela veio um AOL, use-o pois a bless pode falhar") local bp = doPlayerAddItem(cid, 2173, 1) else doPlayerPopupFYI(cid, "Você precisa de "..cost.." para comprar uma bless.") end elseif(getPlayerLevel(cid) < maxlevel) then if(doPlayerRemoveMoney(cid, cost) == TRUE) then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless) end doPlayerSendTextMessage(cid,22,"Você acaba de comprar uma blessing, e com ela veio um AOL, use-o pois a bless pode falhar") local bp = doPlayerAddItem(cid, 2173, 1) else doPlayerPopupFYI(cid, "You need "..cost.." to buy Bless!") end end return FALSE end sabe colocar o efeito do holy nela ? ajudo com rep+
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.