ushoriuma
OTNET Monkey
- Joined
- Apr 9, 2009
- Messages
- 4
- Reaction score
- 0
author:--Ushoriuma--
version:all versions (I think)
type of script:TalkActions
Hello
For you I'll Post My Script to buy aol for talkactions.
First open the folder data/talkactions/scripts, copy any file and rename it buyaol, delete what is in and add this:
Code:
-- By Ushoriuma --
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doPlayerGiveItem(cid, 2173, 1, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought one aol for 10000 gold coins.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGY)
else
doPlayerSendCancel(cid, "You need 10000 gold coins to buy aol.")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 10000 gold coins to buy aol.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGY)
end
end
After going on data/talkactions and open the folder talkactions.xml and add the following tag on it:
Code:
<talkaction words="!buyaol" script="buyaol.lua"/>
Ready now just the player talk !buyaol and he buys one aol for 10k(10000 gold coins).
xD
Thank you!