• 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:
Make sure to configure this correctly:
Lua:
<config name="noob"><![CDATA[
		config = {
			v = {
				redTeam = {
					fromPos = {x = 100, y = 200, z = 7},
					toPos = {x = 100, y = 200, z = 7}
				},
				blueTeam = {
					fromPos = {x = 100, y = 200, z = 7},
					toPos = {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>
 
<config name="noob"><![CDATA[
config = {
v = {
redTeam = {
fromPos = {x = 100, y = 200, z = 7},
toPos = {x = 100, y = 200, z = 7}
},
blueTeam = {
fromPos = {x = 100, y = 200, z = 7},
toPos = {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>


Look its same!
 
Code:
redTeam = {
fromPos = {x = 100, y = 200, z = 7},
toPos = {x = 100, y = 200, z = 7}
},
blueTeam = {
fromPos = {x = 100, y = 200, z = 7},
toPos = {x = 100, y = 200, z = 7}

edit the positions of your characters..
Code:
redTeam = {
fromPos = {x = 100, y = 200, z = 7}, <--- where they should stand to get teleported
toPos = {x = 100, y = 200, z = 7} <---- where they will get teleported
},
blueTeam = {
fromPos = {x = 100, y = 200, z = 7},
toPos = {x = 100, y = 200, z = 7}
also you got to put and unique id 7000 on the switch(lever) with ID 1945 i guess.
 
<config name="noob"><![CDATA[
config = {
v = {
redTeam = {
fromPos = {x = 99, y = 200, z = 7},
toPos = {x = 97, y = 188, z = 7}
},
blueTeam = {
fromPos = {x = 101, y = 200, z = 7},
toPos = {x = 105, y = 189, z = 7}
}
},
blueTeamPos = {x = 101, y = 200, z = 7},
redTeamPos = {x = 99, y = 200, z = 7},
redStorage = 7000,
blueStorage = 8000,
redPlayers = {},
bluePlayers = {}
}
]]></config>

Like this?
 
There should be an error message or something on the console.

slayzer, you got the map, why don't you test it?

Need feedback from more than 1 user.
 
<?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 = {
fromPos = {x = 99, y = 200, z = 7},
toPos = {x = 108, y = 188, z = 7}
},
blueTeam = {
fromPos = {x = 101, y = 200, z = 7},
toPos = {x = 97, y = 188, z = 7}
}
},
blueTeamPos = {x = 101, y = 200, z = 7},
redTeamPos = {x = 101, 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')
if isInRange(getThingPos(cid), config.v.redTeam.fromPos, config.v.redTeam.toPos) or isInRange(getThingPos(cid), config.v.blueTeam.fromPos, config.v.blueTeam.toPos) then
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
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>
</mod>


I got this script... and the lever is not working if someone can help me it will be very great... write only what i need to do i will look on it later because i will not be on the computer about some hour i will go watch Realmadrid vs barcelona in a club with some friends cya everyone i hope someone help me sorry for my bad english i hope all understand me bye!! cya
 
Lua:
<action uniqueid="7000" event="script"><![CDATA
does this mean he gotta have 7000 both as Uniqueid and action on the lever?
 
Back
Top