OtStrikers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Talkaction] !aol - !backpack

Go down

[Talkaction] !aol - !backpack Empty [Talkaction] !aol - !backpack

Post by Zatjin Thu Dec 22, 2011 4:52 pm

First open up talkactions.xml in data/talkactions and add
Code:
<talkaction words="!backpack" script="backpack.lua" />
   <talkaction words="!aol" script="aol.lua" />
in it.

then goto data/talkactions/scripts/

Create 2 new files 1 called backpack.lua and 1 called aol.lua.

place this in backpack.lua:
Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 100) == 1 then
doPlayerAddItem(cid, 1988, 1)
else
         doPlayerSendCancel(cid, 'You don\'t have enough money.')
         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
      end
      end
doPlayerRemoveMoney(cid, 100) change 100 to the price u want.( I made it 100gp because you can buy it everywhere where u are.)

Ok now open aol.lua and place this in it:
Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == 1 then
doPlayerAddItem(cid, 2173, 1)
else
         doPlayerSendCancel(cid, 'You don\'t have enough money.')
         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
      end
      end
doPlayerRemoveMoney(cid, 10000) again change this part to the price you want.
Zatjin
Zatjin
Administrator

Profession :
  • Mapper

Posts : 65
Reputation : 2
Join date : 2011-12-20
Age : 25

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum