• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction !softboots or !firewalkerboots or any custom boots renewal talkaction

snowman18

New Member
Joined
Feb 24, 2013
Messages
8
Reaction score
2
Hello Dear Community. I am learning how to make scripts for my OTS so I made this script for my custom made boots. Tested with TFS 0.3.7. Hope you will like it. Enjoy!

/data/talkactions/scripts/xxxxx.lua
Code:
local boots = xxxx -- [COLOR="#008000"]ID of boots that are brand new[/COLOR]
local eboots = xxxx -- [COLOR="#008000"]ID of boots when they are equiped on BOOTS_SLOT[/COLOR]
local wboots = xxxx -- [COLOR="#008000"]ID of fully worn boots[/COLOR]
local money = xxxxx -- [COLOR="#008000"]Amount of money needed for repair[/COLOR]

function onSay(cid, words, param, channel)
	
	if (getPlayerItemCount(cid, wboots) == 0) and (getPlayerItemCount(cid, eboots) == 0) and (getPlayerItemCount(cid, boots) == 0) then
	doCreatureSay(cid, "You need to buy boots first!", TALKTYPE_ORANGE_1)
	end
		if(getPlayerItemCount(cid, boots) >= 1) then
			doCreatureSay(cid, "You need to worn your boots fully!", TALKTYPE_ORANGE_1)
		end

	if (getPlayerItemCount(cid, wboots) >= 1) then
		if (getPlayerMoney(cid) >= money) then
			doPlayerRemoveItem(cid, wboots, 1)
			doPlayerRemoveMoney(cid, money)
			doPlayerAddItem(cid, boots, 1)
			doSendAnimatedText(getCreaturePosition(cid), "Done!", TEXTCOLOR_LIGHTBLUE)
			
		else
			doCreatureSay(cid, "You need more gold to repair your boots!", TALKTYPE_ORANGE_1)
		end
	end
	
	if (getPlayerItemCount(cid, eboots) >= 1) then
		doCreatureSay(cid, "You need to unequip your boots first!", TALKTYPE_ORANGE_1)
	end
	
	
	return true
end

/data/talkactions/talkactions.xml

Code:
<talkaction words="xxxxx" script="xxxxx.lua" />
 
now i will try on 0.4 - 3884 svn :< i edit if works good and give rep+! :)

- - - Updated - - -

working perfect, good job :]
 
Back
Top