• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Soft boots instalntly getting worn :/

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
hii, well like i said in the title, when a players use his soft boots instantly they get worn :/ plzz i need help, here i all i have of soft boost

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local moneyneed = 50000 -- price to get new soft boots
local playermoney = getPlayerMoney(cid)
if playermoney >= moneyneed then
if doPlayerTakeItem(cid, 10021, 1) then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid, 6132, 1)
doPlayerRemoveMoney(cid, moneyneed)
doSendMagicEffect(fromPosition,12)
else
doPlayerSendTextMessage(cid,20, "Tu No Tienes Unas Soft Boots Hecha Mierda xd.")
end
else
doPlayerSendTextMessage(cid,20, "Disculpa, Tu Necesitas ".. moneyneed .." Gold Coins Para Tener Unas Nuevas Soft Boots.")
end
end

that's on actions

here is in items.xml

LUA:
<item id="2640" name="soft boots">
		<attribute key="weight" value="800"/>
		<attribute key="slotType" value="feet"/>
		<attribute key="decayTo" value="10021"/>
		<attribute key="transformDeEquipTo" value="6132"/>
		<attribute key="duration" value="14400"/>
		<attribute key="healthGain" value="1"/>
		<attribute key="healthTicks" value="2000"/>
		<attribute key="manaGain" value="2"/>
		<attribute key="manaTicks" value="1000"/>
		<attribute key="showduration" value="1"/>
	</item>

LUA:
<item id="6132" article="a" name="pair of soft boots">
		<attribute key="weight" value="800" />
		<attribute key="slotType" value="feet" />
		<attribute key="transformEquipTo" value="10021" />
		<attribute key="stopduration" value="1" />
		<attribute key="showduration" value="1" />
	</item>

plz guys help :(
 
You got this in movements.xml?
LUA:
	<movevent type="Equip" itemid="2640" slot="feet" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2640" slot="feet" event="function" value="onDeEquipItem"/>
 
Try
LUA:
<item id="6132" article="a" name="pair of soft boots">
		<attribute key="weight" value="800" />
		<attribute key="slotType" value="feet" />
		<attribute key="transformEquipTo" value="2640" />
		<attribute key="stopduration" value="1" />
		<attribute key="showduration" value="1" />
	</item>
 
but now you changed the ID, the soft boots will transform in the typical worn boots, is possible to fix it usin gthe id 10021? :S
 
mmm i'm lost now, wich one should i edit?

Just the second one. In items.xml and find the item with id 6132 and replace with this:
LUA:
<item id="6132" article="a" name="pair of soft boots">
		<attribute key="weight" value="800" />
		<attribute key="slotType" value="feet" />
		<attribute key="transformEquipTo" value="2640" />
		<attribute key="stopduration" value="1" />
		<attribute key="showduration" value="1" />
	</item>
 
It worked man, now the boots with id 10021 are transformed in a new pair of soft boots totally functional, but what i don't know, is now what happens when the soft boots run out? what item appears?

- - - Updated - - -

oooooooooh now i totally get it!!!!! i edit this part
LUA:
<attribute key="transformEquipTo" value="2640" />
thinking in decay item, but the 2640 is the tramsformation when it's equiped, not fishished :D thanks man you make me see my error and helped me
 
man plz last thing, if you could check this for me :/

i have this too
LUA:
[15/08/2013 16:46:58] [Error - Action Interface] 
[15/08/2013 16:46:58] data/actions/scripts/other/softboots.lua
[15/08/2013 16:46:58] Description: 
[15/08/2013 16:46:58] (luaGetPlayerMoney) Player not found

the actions is this:
LUA:
local moneyneed = 50000 -- price to get new soft boots
local playermoney = getPlayerMoney(cid) 
local soft = {
	[10021] = {id = 6132, money = 50000}}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if soft[item.itemid] then
		if doPlayerRemoveMoney(cid, soft[item.itemid].money) then
			doTransformItem(item.uid, soft[item.itemid].id)
		doSendMagicEffect(getCreaturePosition(cid),12)
		else
			doPlayerSendCancel(cid, "Disculpa, Tu Necesitas 50000 Gold Coins Para Tener Unas Nuevas Soft Boots.")
		end
	end
	return true
end
 
LUA:
local t = {
    [10021] = {6132, 50000}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v = t[item.itemid]
    if v then
        if (not doPlayerRemoveMoney(cid, v[2])) then
            return doPlayerSendCancel(cid, "Disculpa, Tu Necesitas 50000 Gold Coins Para Tener Unas Nuevas Soft Boots."), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF), false
        end
        
        doTransformItem(item.uid, v[1])
        doSendMagicEffect(getThingPos(cid), CONST_ME_WRAPS)
        end
    return true
end
 
Back
Top