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

War Event (Johannes10)

slayzer

Klaffen
Joined
Dec 28, 2008
Messages
301
Solutions
3
Reaction score
51
Location
Norway
Hi, I'm here to make an request for Johannes10.
He came up with an(which i think is) an awesome idea.

He's idea was:
20 players walk to like.. and room with an switch and stuff.
When 10 players walk on ea side of the switch(like in annihilator, just that its 2 different spots to stand, and its 10 spots at ea side)
Team 1 | team 2
<-- -->
2z7eb2s.jpg

in the arena
when you pull the switch(lever) you get into and PVP Arena.
In this arena, its first Team to 30 kills, win.(if you die, you have to re-spawn inside the arena somewhat)

The winning team gets into and reward room at get Experience and the Heart's of the players who lost(Like Undead Hearth
Undead_Heart.gif
, that got Description: "Player Name" and "Player's Level".
while the losers get Nothing and just get 'ported out.

Credits:
Johannes10 for Idea
Slayzer for knowing how to write English
 
Last edited by a moderator:
OzIcO(or someone else) and this? can u make it?...... In this arena, its first Team to 30 kills, win.(if you die, you have to re-spawn inside the arena somewhat)

The winning team gets into and reward room at get Experience and the Heart's of the players who lost(Like Undead Hearth , that got Description: "Player Name" and "Player's Level".
while the losers get Nothing and just get 'ported out.
 
yes add this before "</mod>"
Code:
<globalevent name="kk" interval="1000" event="script"><![CDATA[
		domodlib('noob')
		local reward = {x = 100, y = 200, z = 7}
		for _, c in ipairs(config.redPlayers) do
			for _, y in ipairs(config.bluePlayers) do
				if #c > 1 and #y == 0 then
					doTeleportThing(c, reward, true)
					setPlayerStorageValue(c, config.redStorage, -1)
				elseif #c == 0 and #y > 1 then
					doTeleportThing(y, reward, true)
					setPlayerStorageValue(y, config.blueStorage, -1)
				end
                                table.remove(redPlayers, c)
                                table.remove(bluePlayers, c)
			end
		end
		return #c == 0 or #y == 0
	]]></globalevent>
Also dont forget to remove "table.remove" BOTH <- of them from the action one (the lever basically)
oh and dont forget to add "table.remove(config.bluePlayers, ...)" in onStatsChange or it will not work
 
Last edited:
Also dont forget to remove "table.remove" BOTH <- of them from the action one (the lever basically)
oh and dont forget to add "table.remove(config.bluePlayers, ...)" in onStatsChange or it will not work

i didnt understand first you say remove then you say add:S?
 
yes add this before "</mod>"
Code:
<globalevent name="kk" interval="1000" event="script"><![CDATA[
		domodlib('noob')
		local reward = {x = 100, y = 200, z = 7}
		for _, c in ipairs(config.redPlayers) do
			for _, y in ipairs(config.bluePlayers) do
				if #c > 1 and #y == 0 then
					doTeleportThing(c, reward, true)
					setPlayerStorageValue(c, config.redStorage, -1)
				elseif #c == 0 and #y > 1 then
					doTeleportThing(y, reward, true)
					setPlayerStorageValue(y, config.blueStorage, -1)
				end
                                table.remove(redPlayers, c)
                                table.remove(bluePlayers, c)
			end
		end
		return #c == 0 or #y == 0
	]]></globalevent>
Also dont forget to remove "table.remove" BOTH <- of them from the action one (the lever basically)
oh and dont forget to add "table.remove(config.bluePlayers, ...)" in onStatsChange or it will not work

could you explain that a litle more detailed?
 
[11/04/2010 17:20:37] [Error - CreatureScript Interface]
[11/04/2010 17:20:37] buffer:eek:nLogin
[11/04/2010 17:20:37] Description:
[11/04/2010 17:20:37] [string "loadBuffer"]:8: bad argument #1 to 'ipairs' (table expected, got nil)
[11/04/2010 17:20:37] stack traceback:
[11/04/2010 17:20:37] [C]: in function 'ipairs'
[11/04/2010 17:20:37] [string "loadBuffer"]:8: in function <[string "loadBuffer"]:3>

When peoples relog on my server, they cant get on and i get this error
 
[11/04/2010 17:20:37] [Error - CreatureScript Interface]
[11/04/2010 17:20:37] buffer:eek:nLogin
[11/04/2010 17:20:37] Description:
[11/04/2010 17:20:37] [string "loadBuffer"]:8: bad argument #1 to 'ipairs' (table expected, got nil)
[11/04/2010 17:20:37] stack traceback:
[11/04/2010 17:20:37] [C]: in function 'ipairs'
[11/04/2010 17:20:37] [string "loadBuffer"]:8: in function <[string "loadBuffer"]:3>

When peoples relog on my server, they cant get on and i get this error
lol
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="kkkkkkkkk" version="1.0" author="kkkkkkk" contact="kkkkkkkk" enabled="yes">
	<config name="noob"><![CDATA[
		config = {
			v = {
				redTeam = {
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7}
				},
				blueTeam = {
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7},
					{x = 100, y = 200, z = 7}
				}
			},
			blueTeamPos = {x = 100, y = 200, z = 7},
			redTeamPos = {x = 100, y = 200, z = 7},
			redStorage = 7000,
			blueStorage = 8000,
			redPlayers = {},
			bluePlayers = {}
		}
	]]></config>
	<event type="login" name="event" event="script"><![CDATA[
		registerCreatureEvent(cid, "stats")
		registerCreatureEvent(cid, "combats")
		return true
	]]></event>
	<event type="statschange" name="stats" event="script"><![CDATA[
		domodlib('noob')
	function onStatsChange(cid, attacker, type, combat, value)
		if type == 1 then
			if getCreatureHealth(cid) <= value then
				if isPlayer(attacker) then
					if getPlayerStorageValue(cid, config.blueStorage) == 1 then
						doTeleportThing(cid, config.blueTeamPos)
					elseif getPlayerStorageValue(cid, config.redStorage) == 1 then
						doTeleportThing(cid, config.redTeamPos)
					end
				end
				return false
			end
		end
		return true
	end
	]]></event>
	<event type="combat" name="combats" event="script"><![CDATA[
		domodlib('noob')
		if isPlayer(cid) and isPlayer(target) then
			if getPlayerStorageValue(cid, config.blueStorage) == 1 and getPlayerStorageValue(target, config.blueStorage) == 1 then
				doPlayerSendCancel(cid, "You may not attack your team mates.")
				return false
			elseif getPlayerStorageValue(cid, config.redStorage) == 1 and getPlayerStorageValue(target, config.redStorage) == 1 then
				doPlayerSendCancel(cid, "You may not attack your team mates.")
				return false
			end
		end
		return true
	]]></event>
	<action uniqueid="7000" event="script"><![CDATA[
		domodlib('noob')
		for _, pos in ipairs(config.v.redTeam) do
			for _, position in ipairs(config.v.blueTeam) do
				local t, c = getTopCreature(position).uid, getTopCreature(pos).uid
				if t > 0 and isPlayer(t) or c > 0 and isPlayer(c) then
					table.insert(config.redPlayers, c)
					table.insert(config.bluePlayers, t)
				end
			end
		end
		if item.itemid == 1945 or item.itemid == 1946 then
			for i, k in ipairs(config.redPlayers) do
				for i, g in ipairs(config.bluePlayers) do
					if g > 10 and k > 10 then
						doTeleportThing(k, config.redTeamPos, true)
						setPlayerStorageValue(k, config.redStorage, 1)
						doTeleportThing(g, config.blueTeamPos, true)
						setPlayerStorageValue(g, config.blueStorage, 1)
						table.remove(config.redPlayers, k)
						table.remove(config.bluePlayers, g)
					end
				end
			end
		end
		return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
	]]></action>
	<globalevent name="kk" interval="1000" event="script"><![CDATA[
		domodlib('noob')
		local reward = {x = 100, y = 200, z = 7}
		for i, b in ipairs(config.redPlayers) do
			for i, n in ipairs(config.bluePlayers) do
				if #b > 0 and #n == 0 then
					doTeleportThing(b, reward)
					setPlayerStorageValue(b, config.redStorage, -1)
				elseif #b == 0 and #n > 0 then
					doTeleportThing(n, reward)
					setPlayerStorageValue(n, config.blueStorage, -1)
				end
			end
		end
		return #n == 0 or #b == 0
	]]></globalevent>
</mod>
 
What is this? :s look



[12/04/2010 23:23:53] [Error - GlobalEvent Interface]
[12/04/2010 23:23:53] buffer:eek:nThink
[12/04/2010 23:23:53] Description:
[12/04/2010 23:23:53] [string "loadBuffer"]:15: attempt to get length of global 'n' (a nil value)
[12/04/2010 23:23:53] stack traceback:
[12/04/2010 23:23:53] [string "loadBuffer"]:15: in function <[string "loadBuffer"]:1>
[12/04/2010 23:23:53] [Error - GlobalEvents::think] Couldn't execute event: kk
 
Its Bug with the script i go in with 2 ppl then i attack its say you can not attack your mates or someting Please fix this? Make the script again but make it 100% working please please!!
 
Last edited:
Back
Top