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

TalkAction !aol and !backpack

Master-m

Need help? Just ask!
Senator
Joined
May 28, 2007
Messages
4,338
Reaction score
16
Location
The Netherlands
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.
 
He released it to come in the top 3 of releaser in my stiky thread.. just so u know :p
 
@up LOL nah.

I released it to show you all a very basic code. With a simple edit you can make an easy talkaction to get items.

You can also make it require a storageid so you can only create a item after u have done a quest. Think about a weapon to escape from the questroom ;D
 
@up LOL nah.

I released it to show you all a very basic code. With a simple edit you can make an easy talkaction to get items.

You can also make it require a storageid so you can only create a item after u have done a quest. Think about a weapon to escape from the questroom ;D

You could have make it more advanced with lvl requrement.
CHeck players if enough cap/
checks player if enought place in backpack.

you can make it on many wais it's nice to release it but if you want to shwo an basic why dident u release an tut?:eek:
 
I think it is very nice, because every1 knows that when u are hunting and dont have more bps for your loots, u can buy one with this command, the same as the aol, when u have killed by some pks and u appear on temple, and are scary to go out and get killed again and lose something, u can buy an aol with this command, very nice...

I would make a command for buy bps of runes with this xD
 
Thanks, going to add backpack, rope and shovel. I really hate to go a far distance, and I figure I have to walk all the way back to town because I forgot to buy a shovel :p

EDIT:
Added shovel script: [data/talkactions/scripts]
Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, 2554, 1)
else
			doPlayerSendCancel(cid, 'You don\'t have enough money, this shovel cost 200gp.')
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
		end

Added rope script: [data/talkactions/scripts]
Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, 6981, 1)
else
			doPlayerSendCancel(cid, 'You don\'t have enough money, this rope cost 200gp.')
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
		end
		end
[data/talkactions] open talkactions.xml and paste this in there:
Code:
	<talkaction words="!rope" script="rope.lua" />
	<talkaction words="!shovel" script="shovel.lua" />

This is extremely easy, all thx to master-m.
 
Last edited:
Back
Top