• 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!

[Script] !aol script

Krulle

Rare Dreamer!
Joined
Nov 28, 2010
Messages
241
Reaction score
2
Location
Behind you
Hi there, I made a script but I dont know if it works xD. I havent test it so would be great if some good scripter could say if it works. Here it is:

Code:
function onSay(cid, words, param)
if doPlayerSay (cid,"!aol")
then doPlayerRemoveMoney(cid, 10000) == TRUE then
	doPlayerAddItem(cid,2173,1)
	doSendMagicEffect(getPlayerPosition(cid),12)
	doSendPlayerMessage(cid,"You've bought an amulet of loss!")
else
	doSendPlayerCancel(cid,"You don't have enough money.")
	doSenMagigEffect(getPlayerPosition(cid),2)
end
return TRUE
end
 
Had some bugs
Lua:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) then
   doPlayerAddItem(cid,2173,1)
   doSendMagicEffect(getPlayerPosition(cid),12)
   doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You've bought an amulet of loss!")
else
	doPlayerSendCancel(cid,"You don't have enough money.")
	doSendMagicEffect(getPlayerPosition(cid),2)
end
return true
end

Btw, no need to put if words == '!aol'
Since you state that at talkactions.xml
 
Back
Top