Reins
Member
- Joined
- Apr 9, 2009
- Messages
- 586
- Reaction score
- 8
Otóż, zainstalowałem sobie na silniku scrypt z blesami (!bless), i co zmienić, aby zawsze, niezależnie od levelu, czy to 100 czy 300, jak się ma blesy to zabierało równo 2 levele, a gdy się nie ma blesów, a bez blesów 4.
Mój scrypt wygląda tak:
Mój scrypt wygląda tak:
PHP:
-- !bless by Piotrek1447
-- edited by Kleksu
local bless = {1, 2, 3, 4, 5}
local cost = 500000 -- Cost in gp.
function onSay(cid, words, param)
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), 28)
else
doPlayerSendCancel(cid, "You don't have enough money.")
end
return TRUE
end