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

Lua firewalker boots wont transform

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Alright, I know this script is embarrassing but this is what I tried

Code:
local WORN_FIREWALKER_BOOTS = {9934, 10022}
local FIREWALKER_BOOTS = 9933

function onUse(cid, item, frompos, item2, topos)
	if getPlayerItemCount(cid, 2147) >= 1 and
		 getPlayerItemCount(cid, WORN_FIREWALKER_BOOTS) >= 1  then
			doPlayerRemoveItem(cid, WORN_FIREWALKER_BOOTS, 1)
			doPlayerAddItem(cid, FIREWALKER_BOOTS, 1)
				return true
			end
				return true
			end

I got no errors but it just did nothing to the worn firewalker boots. Anyone help me out?
 
LUA:
local WORN_FIREWALKER_BOOTS = 9934
local FIREWALKER_BOOTS = 9933
local SMALL_RUBY = 2147

function onUse(cid, item, frompos, item2, topos)
	if(getPlayerItemCount(cid, SMALL_RUBY) >= 1) then
		if(getPlayerItemCount(cid, WORN_FIREWALKER_BOOTS[1]) >= 1) then
			doPlayerRemoveItem(cid, WORN_FIREWALKER_BOOTS[1], 1)
			doPlayerAddItem(cid, FIREWALKER_BOOTS, 1)
		else
			doPlayerSendCancel(cid, "You don't have ".. getItemPluralNameById(WORN_FIREWALKER_BOOTS[1]) .." ".. getItemNameById(WORN_FIREWALKER_BOOTS[1]) ..".")
			return false
		end
	else
		doPlayerSendCancel(cid, "You don't have ".. getItemPluralNameById(SMALL_RUBY) .." ".. getItemNameById(SMALL_RUBY) ..".")
		return false
	end
	return true
end
 
it is not working, no errors or anything and nothing happens, no rubies disappear and firewalker boots stay worn....

Since Im using a normal small ruby, not enchanted, i added this line to actions.xml

<action itemid="2417" script="firewalker boots.lua"/>

is that right? or what should I put in actions.xml?
 
like this?
LUA:
local boots = {
	[9001] = {old = 9934, new = 9933}
} 

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local i = boots[item.uid]
	if getPlayerItemCount(cid, 2147) >= 1 then
        doPlayerRemoveItem(cid, 9934, 1)            
		doPlayerAddItem(cid, i.new, 1)
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
		return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
	end
end
 
Back
Top