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

How to make leavers work for items TFS 0.4

Joined
Jul 5, 2009
Messages
32
Reaction score
8
Location
Untied Kingdom
Hi Guys
i want just know how to make leavers work??

so for example when you use the leaver it will take 10 golden nuggets from your bp and give you the item into your backpack?

If anyone could help it would be great!!
 
Solution
Code:
 <action actionid="9778" script="shop/gns.lua"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, 2157, 10) then
doPlayerAddItem(cid, 9776, 1)
doCreatureSay(cid, 'Congratulations You Bought yalahari armor!', TALKTYPE_MONSTER)
doSendMagicEffect(getPlayerPosition(cid),1)
else
doPlayerSendCancel(cid,"You Need 10 Gold Nuggets")
doSendMagicEffect(getPlayerPosition(cid), 2)
doCreatureSay(cid, 'You Need 10 Gold Nuggets.', TALKTYPE_MONSTER)
end
return true
end
 
Code:
 <action actionid="9778" script="shop/gns.lua"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, 2157, 10) then
doPlayerAddItem(cid, 9776, 1)
doCreatureSay(cid, 'Congratulations You Bought yalahari armor!', TALKTYPE_MONSTER)
doSendMagicEffect(getPlayerPosition(cid),1)
else
doPlayerSendCancel(cid,"You Need 10 Gold Nuggets")
doSendMagicEffect(getPlayerPosition(cid), 2)
doCreatureSay(cid, 'You Need 10 Gold Nuggets.', TALKTYPE_MONSTER)
end
return true
end
 
Solution
Code:
<action actionid="9778" script="shop/gns.lua"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, 2157, 10) then
doPlayerAddItem(cid, 9776, 1)
doCreatureSay(cid, 'Congratulations You Bought yalahari armor!', TALKTYPE_MONSTER)
doSendMagicEffect(getPlayerPosition(cid),1)
else
doPlayerSendCancel(cid,"You Need 10 Gold Nuggets")
doSendMagicEffect(getPlayerPosition(cid), 2)
doCreatureSay(cid, 'You Need 10 Gold Nuggets.', TALKTYPE_MONSTER)
end
return true
end


Bro you a legend this works absolutely fine !!! appreciate the help!!!!
 
Back
Top