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

[Request] Floor thats change outfit and teleport

StormRusher

New Member
Joined
Dec 23, 2009
Messages
138
Reaction score
0
Hello

I need a script that when a player walk in X floor, changes the outfit colors of player and tp him to a position.

And if the amount of players online is uneven go to a Y position with a Y color outfit, if amount of players online is pair go to a X position with a X color outfit.

Like an auto-balance system

Note: i am doing a pvp enforced system xD

Hope you can help me,thanks
 
Lua:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		local n, t = 0, getPlayersOnline()
		for i = 1, #t do
			if getPlayerAccess(t[i]) == 0 then
				n = n + 1
			end
		end
		local cur, outfit, position = getCreatureOutfit(cid)
		if n % 2 == 0 then -- even
			outfit = {lookType=cur.lookType, lookHead=0, lookBody=0, lookLegs=0, lookFeet=0, lookAddons=3}
			position = {x=1000, y=1000, z=7}
		else -- odd
			outfit = {lookType=cur.lookType, lookHead=0, lookBody=0, lookLegs=0, lookFeet=0, lookAddons=3}
			position = {x=1000, y=1000, z=7}
		end
		doCreatureChangeOutfit(cid, outfit)
		doTeleportThing(cid, position)
	end
end
 
Back
Top