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

Need a scrpit that repairs softies (!repairsofties)

healer007

New Member
Joined
Nov 11, 2008
Messages
174
Reaction score
0
Location
doesnt matter
Hey guys and anyone plz make a scrpit that works like this
wen a player says !repairsfoties or anything like that they get a brand new soft boots ty
 
data/talkactions/scripts:

Create a file named repair:

PHP:
function onSay(cid, words, param)
cost = 5000
pos = getPlayerPosition(cid)
	if getPlayerItemCount(cid, 6530) >= 1 then 
		if doPlayerRemoveMoney(cid,cost) == TRUE then
			doSendMagicEffect(pos, 11)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Soft boots repaired!.")
			doPlayerAddItem(cid, 6132, 1)
			doPlayerRemoveItem(cid, 6530, 1)
		else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You don\'t have enough money!.")
		doSendMagicEffect(pos, 2)

	end
		else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You don\'t have enough money")
		doSendMagicEffect(pos, 2)

	end
end
You can change the animation effect in here:
doSendMagicEffect(pos, 11)
To view animation effects in-game use "!z #" with a GM
--
Change the cost for the repair in
cost = 5000
Now data/talkactions/

Open talkactions.xml

and add in a new line:

PHP:
<talkaction words="!repairsoft" script="repair.lua"/>

Anyother script you whant just post in here or in a new thread :D!

BYEBYE!
 
Last edited:
data/talkactions/scripts:

Create a file named repair:

PHP:
function onSay(cid, words, param)
cost = 5000
pos = getPlayerPosition(cid)
	if getPlayerItemCount(cid, 6530) >= 1 then 
		if doPlayerRemoveMoney(cid,cost) == TRUE then
			doSendMagicEffect(pos, 11)
			doPlayerAddItem(cid, 6132, 1)
			doPlayerRemoveItem(cid, 6530, 1)
		else
			doPlayerSendCancel(cid,"You don\'t have enough money!")
	end
		else
			doPlayerSendCancel(cid,"You don\'t have a worn soft boots to repair!")
	end
end
You can change the animation effect in here:

To view animation effects in-game use "!z #" with a GM
--
Change the cost for the repair in

Now data/talkactions/

Open talkactions.xml

and add in a new line:

PHP:
<talkaction words="!repairsoft" script="repair.lua"/>

Anyother script you whant just post in here or in a new thread :D!

BYEBYE!

I just tryed it and it doesnt work :(
 
I will realy add some rep ++ if someone help me with this scrpits

Just tell my isn't working, are u having errors on your console?
I need information to edit the script...

Script update(more effects, and Texts)

PHP:
function onSay(cid, words, param)
cost = 5000
pos = getPlayerPosition(cid)
	if getPlayerItemCount(cid, 6530) >= 1 then 
		if doPlayerRemoveMoney(cid,cost) == TRUE then
			doSendMagicEffect(pos, 11)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Soft boots repaired!.")
			doPlayerAddItem(cid, 6132, 1)
			doPlayerRemoveItem(cid, 6530, 1)
		else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You don\'t have enough money!.")
		doSendMagicEffect(pos, 2)

	end
		else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You don\'t have enough money")
		doSendMagicEffect(pos, 2)

	end
end
 
No there's no any error is my console, it just doesn work even tho i dont have worn soft boots to repair it doesnt give me a msg sayin that u dont have worn soft boots.
wat other information u need
Im using tfs latest one beta i think (0.3b2-gui) 8.4
 
Then u didnt add correctly the script to your talkactions, because im using the same TFS and it works 100%.

Please check if the name of ur script has the same name in talkactions.xml

PHP:
<talkaction words="!repairsoft" script="repair.lua"/>

!repairsoft will be the command, and repair.lua the name of your script in scripts/
 
Back
Top