Public feed #727167

Untitled

public lua v1 · immutable
Raw Edit
·published 2007-10-05 20:21 UTC
rendered paste body
 --Global Arerna -- g_arena=nil g_player=nil function Arena_OnCreate(arena)	-- Set our global value	g_arena = arena	-- Initialize random	math.randomseed(os.time())end function Player_OnWarpItem(plyr, itemid, target) -- player, integer, string					if (itemid == 3) then			summonall(plyr:coords())		else			plyr:message('You have used an invalid warpitem')		end		return falseendfunction summonall(coords)	local numberOfPlayers = g_arena:numPlaying()		for i=1, numberOfPlayers do		g_arena:message('Break')		local person = g_arena:get(i)		if (person ~= nil) and (person:valid()) then			person:inventory_modify('Summon All', -1)			person:warp(coords.x, coords.y, 0)		end	end	endfunction messagetoteam(team, message)	if (team ~= nil) then		for i=1, team:num() do			local player = team:get(i)			if (player ~= nil) and (player:valid()) then				player:message(message)			end		end	endendfunction Msg_OnCommand(plyr, command, payload, recipient, msg_type) -- player, string, string, string, integer 	if (command == '?coords') then		plyr:message('X = ' .. plyr:coords().x .. ' Y  = ' .. plyr:coords().y)	endend