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

[Actions] Soft and Fire walker boots repair with click

YugiNao

Banned User
Joined
Nov 22, 2008
Messages
211
Reaction score
3
As in the Title said i need, a script when click the soft or fire walker boots it Cost you to repair 20cc and when player dont have enough money, It pop up's with a orange message. You do not have enough money to repair your boots.and it also say's. You do first need firewalker boots or soft boots to repair them.
 
Code:
local t = {
      {soft_id, soft_broken},
      {firewalker_id, firewalker_broken}
    }
    function onUse(cid, item, fromPosition, itemEx, toPosition)
      for _, v in ipairs(t) do
        if doPlayerRemoveMoney(cid, 20000) then
        if item.itemid == v[1] then
          doTransformItem(item.uid, item.itemid == v[2])
else
doPlayerSendCancel(cid, "You don't have enough money to repair!", TALKTYPE_ORANGE_1)
      end
          return true
        end
      end
    end

Try this, replace "soft_id" with softboots id, and replace "soft_broken" with worn softboots id.

do the same with firewalker.
 
Last edited:
This is a far better solution...
Code:
local t = {
	[soft_broken] = {id = soft_id, money = 20000},
	[firewalker_broken] = {id = firewalker_id, money = 20000}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if t[item.itemid] then
		if doPlayerRemoveMoney(cid, t[item.itemid].money) then
			doTransformItem(item.uid, t[item.itemid].id)
		else
			doPlayerSendCancel(cid, RET_NOTENOUGHMONEY)
		end
	end
	return true
end
 
Code:
local t = {
	[10021] = 6132,
	[10022] = 9933
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if doPlayerRemoveMoney(cid, 20000) then
		doTransformItem(item.uid, t[item.itemid])
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
	else
		doCreatureSay(cid, "You don't have enough money to repair your boots!", TALKTYPE_ORANGE_1, false, cid)
	end
	return true
end
damny too late
 
Cyko' your script doesnt work, Or iam doing something wrong [as i did whas "put the UID on the softboots UID as same in the script UID is so it should work, but it doesnt?
 
You don't need to use any uniqueID :S just register it in actions.xml with those itemids (10021 and 10022) or use this mod
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Boots repair" enabled="yes">
	<action itemid="10021;10022" event="script"><![CDATA[
		local t = {
			[10021] = 6132,
			[10022] = 9933
		}
		function onUse(cid, item, fromPosition, itemEx, toPosition)
			if doPlayerRemoveMoney(cid, 20000) then
				doTransformItem(item.uid, t[item.itemid])
				doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
			else
				doCreatureSay(cid, "You don't have enough money to repair your boots!", TALKTYPE_ORANGE_1, false, cid)
			end
			return true
		end
	]]></action>
</mod>
 
I dont want to be annoying, but i dont get it :blink: the Mod have an actionid what does the mod do, to get the softboots linked to it? example
Actions.xml
Code:
<action itemid="10021" event="script"
?
Does the softboots dont need any? aid ?
 
^_^I think for people who do not know much about how it works, its a good suggestion to post a detailed description like with <actions code> and all things to do things exactly good, than i dont have to ask over and over again.
 
^_^I think for people who do not know much about how it works, its a good suggestion to post a detailed description like with <actions code> and all things to do things exactly good, than i dont have to ask over and over again.

It's somewhat not our duty to provide you informations which you could easily find, if you'd hit the search button for once.
 
Back
Top