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

Elaney

Member
Joined
Jan 1, 2009
Messages
1,561
Reaction score
12
Location
Sweden
well im trying to do when you enter a tp you get ur outfit changed. But i cant get it to work. here is my script.


Code:
function onStepIn(cid, item, pos)
	if item.uid == 16011 and item.id == 5023 then
		addOutfitCondition(condition, 0, 131, 45, 45, 45, 45)
	end
end
 
Code:
function onStepIn(cid, item, pos)
	if item.uid == 16011 and item.itemid == 5023 then
		addOutfitCondition(condition, 0, 131, 45, 45, 45, 45)
	end
	return TRUE
end
try now
 
now i get

[11/05/2009 20:34:06] Lua Script Error: [MoveEvents Interface]
[11/05/2009 20:34:06] data/movements/scripts/change outfit.lua:onStepIn

[11/05/2009 20:34:06] luaAddOutfitCondition(). This function can only be used while loading the script.
 
LUA:
function onStepIn(cid, item, pos)
local condition = createConditionObject(CONDITION_OUTFIT)
	if item.uid == 16011 and item.itemid == 5023 then
		addOutfitCondition(condition, 0, 131, 45, 45, 45, 45)
	end
	return TRUE
end
If this doesnt work, use that:
LUA:
function onStepIn(cid, item, pos)
local condition = createConditionObject(CONDITION_OUTFIT)
	if item.uid == 16011 and item.itemid == 5023 then
		setConditionParam(condition, CONDITION_PARAM_OUTFIT, 0, 131, 45, 45, 45, 45)
	end
	return TRUE
end
or
LUA:
function onStepIn(cid, item, pos)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
	if item.uid == 16011 and item.itemid == 5023 then
		setConditionParam(condition, CONDITION_PARAM_OUTFIT, 0, 131, 45, 45, 45, 45)
	end
	return TRUE
end
 
Last edited:
Back
Top