TalkAction !aol and !backpack

Master-m

Need help? Just ask!
Joined
May 28, 2007
Messages
4,339
Best answers
0
Reaction score
15
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.
 

jankk

New Member
Joined
Aug 15, 2007
Messages
60
Best answers
0
Reaction score
1
I think its unnecessary but who knows... : )
gratz.
 

darex11

Own Big Server
Joined
Aug 21, 2007
Messages
219
Best answers
0
Reaction score
0
Location
Poland
This script`s don`t need an ots,
Realy better is NPC
 

Mokerhamer

Retired Global Mod
Joined
Aug 6, 2007
Messages
1,766
Best answers
0
Reaction score
35
He released it to come in the top 3 of releaser in my stiky thread.. just so u know :p
 
OP
M

Master-m

Need help? Just ask!
Joined
May 28, 2007
Messages
4,339
Best answers
0
Reaction score
15
Location
The Netherlands
@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
 

Mokerhamer

Retired Global Mod
Joined
Aug 6, 2007
Messages
1,766
Best answers
0
Reaction score
35
@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:
 

John3971

Creator of Solvera
Joined
Aug 23, 2007
Messages
174
Best answers
0
Reaction score
1
Location
Sweden
nice code but its better that you must buy it from an npc.
 

mamon_2

Banned User
Joined
Jul 2, 2007
Messages
424
Best answers
0
Reaction score
0
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
 

Lithium

Ex-TFS Developer
Joined
Jun 2, 2007
Messages
334
Best answers
0
Reaction score
0
this talkactions rox for the lazy players xD
 

fokuleh

New Member
Joined
Oct 25, 2007
Messages
156
Best answers
0
Reaction score
0
when i use nothng happend i am using devland 0.96 who can help me?
 

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
6,667
Best answers
202
Reaction score
1,375
Location
Norway, Oslo
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:
Top