• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need help in talkaction script "!bless"

Sorbal

Member
Joined
Jul 23, 2010
Messages
406
Reaction score
11
Location
Poland
Hello OTlanders, can someone make talkaction script:
If player got VIP (StorageValue: 11552) he can use command in game !bless.
"!bless" will reduce exp loss after the death of a 30% and it costs 2,000 gold and when player without VIP say !bless he will see message "You aren't vip player.". When player buy !bless there will be a magic effect (holy) on him. Action !bless should disappear when the player death. Naturally i'll give You reputation for help. Bye :D.
 
LUA:
local bless = {1, 2, 3, 4, 5}
local cost = 2000
local storage = 11552
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 getPlayerStorageValue(cid, storage) <= -1 then
doPlayerSendCancel(cid, "You aren\'t vip player.")
return TRUE
end

if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doCreatureSay(cid, "You are now blessed!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You don\'t have enough money.")
end
return TRUE
end

Change effect if u don't like :)
 
Back
Top