• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction !aol Command

Matti96

Abyss
Joined
Apr 17, 2009
Messages
254
Reaction score
46
Location
Poland/Germany
i made for you a faster way to get an AOL [Zielis Version]

;)
Code:
---script by Zieli---
      function onSay(cid, words, param)

    if doPlayerRemoveMoney(cid,20000) == 1 then
        doPlayerAddItem(cid,2173,1)
    else
        doPlayerSendCancel(cid,"Sorry, but you don\'t have 20k")
    end
end
It costs 20k and you can change it where it says 20000.
Also, if you want it to give another item, just change the "2173"

Write this in \data\talkactions\talkactions.xml
Code:
<talkaction words="!buyaol" script="!buyaol.lua" />
I don't tested it can someone test it?

ty
 
Last edited by a moderator:
MAtti and ziro same IP lol!! hahah
Revamped
LUA:
function onSay(cid, words, param)
local config = {
      cost = 20000,
      cancel = "Sorry, but you don\'t have 20k"
}

    if doPlayerRemoveMoney(cid,config.cost) == TRUE then
        doPlayerAddItem(cid,2173,1)
    else
        doPlayerSendCancel(cid,""..cancel.."")
    end
    return TRUE
end
 
@up
you mean enlarged? xd
haha I cant believe I have benn using a longer one
LUA:
function onSay(cid, words, param)
if getPlayerMoney(cid) >= 10000 then
    doPlayerRemoveMoney(cid,10000)
    doPlayerAddItem(cid,2173,1)
    doSendMagicEffect(getPlayerPosition(cid),12)
    doPlayerSendTextMessage(cid,22,"You bought an AOL!")
else
    doPlayerSendCancel(cid,"Ya ain't got enough money.")
    doSendMagicEffect(getPlayerPosition(cid),2)
end
return TRUE
end
 
LUA:
local config (
		itemid = 2173 -- id amulet of loss
		cena = 10000 -- cost amulet of loss
)
function onSay(cid, words, param, channel)
		if	getPlayerMoney(cid) >= config.cena)	then
			doPlayerRemoveMoney(cid, config.cena)
			doPlayerAddItem(cid, config.itemid)
			doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You got amulet of loss!')
		else
            doPlayerSendCancel(cid, "You need more cash to get amulet of loss!")
		end
	end
	return true
end
Mine version (it's mine fist script ;o)
 
Back
Top