• 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 making aol script I give rep+++

Add in data/talkactions/talkactions.xml :
PHP:
	<talkaction words="!aol" script="aol.lua"/>

Create data/talkactions/scripts/aol.lua :
PHP:
function onSay(cid, words, param)
	if getPlayerMoney(cid) >= 20000 then
	if getPlayerFreeCap(cid) >= getItemWeight(2173) then
		doPlayerRemoveMoney(cid, 20000)
		doPlayerAddItem(cid, 2173, 1)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought an amulet of loss for 20k.")
	else
	doPlayerSendCancel(cid, "You do not have enough capacity.")
	end
	else
		doPlayerSendCancel(cid, "You need 20000 gold coins in order to buy an amulet of loss.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return TRUE
end
 
Back
Top