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

Sweddy

Well-Known Member
Joined
Feb 14, 2009
Messages
2,907
Reaction score
93
Location
Sweden
Hello, peoples that is using the outfit changer gets outfit 135 and get debug.

Here is the lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v, tmp = math.random(333), getCreatureOutfit(cid)
	while isInArray({tmp.lookType, 75, 135, 266, 302}, v) == TRUE or v <= 1 or (v > 160 and v < 192) or v > 333 do
		v = math.random(351)
	end
 
	tmp.lookType = v
	doCreatureChangeOutfit(cid, tmp)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	doCreatureSay(cid, 'Your outfit has been changed.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
	return true
end

Could someone fix it so they wont get the outfits: 75, 135, 266, 302 ?

Thanks :)
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v, tmp = math.random(333), getCreatureOutfit(cid)
	while isInArray({tmp.lookType, 75, 135, 266, 302, 75, 135 266, 302}, v) == TRUE or v <= 1 or (v > 160 and v < 192) or v > 333 do
		v = math.random(351)
	end
 
	tmp.lookType = v
	doCreatureChangeOutfit(cid, tmp)
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	doCreatureSay(cid, 'Your outfit has been changed.', TALKTYPE_ORANGE_1, false, cid, getThingPos(cid))
	return true
end
 
Back
Top