vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i have problem with bless command, cuz if i die with bless, my level going down to 1 ;/
Code:
--- Created for otsmateria.com (c)----
-- !bless by Piotrek1447
-- edited by Kleksu
local bless = {1, 2, 3, 4, 5}
local cost = 100000 -- Cost in gp.
function onSay(cid, words, param)
if(not checkExhausted(cid, 646, 6)) then
return true
end
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "You have already all blessings.")
return TRUE
end
end
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerSendTextMessage(cid,24, "You bought all blessing.")
doSendMagicEffect(getPlayerPosition(cid), 39)
else
doPlayerSendCancel(cid, "You don't have enough money.")
end
return TRUE
end