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

Svargrond Arena Script!

Talaturen said that if someone told him EXACTLY how that arena worked, he could probably script it.

So, tell us EXACTLY how it works and maybe someone will do that for you :)
 
Its works is like that:

when a player enter in arena nobody more can enter and start a counter down (can be by npc or lever use etc..),
when the monster in the first room died, a teleport has been made to the 2º room (or you can also set a stone who turn into a teleport when the monster dead)
when the player jump into a teleport go to the 2º room (obvius) and the teleport where the player 1 jump dissapear or turn back into the original stone.
the counter is still runing...
if the counter = 0 (time over) the player get teleport to the exit.
abnd continues... can you understand the idea of arena now :p?
if the player died in the arena
 
Ohh I forgot to add this:
When the player enter arena all boses are sumoned in each room,
when the player leave arena (for dieing or time over)
the sumoned monsters alive get kicked.
 
Svargrond script with Movements

I have found somthing here. Please if you can fix it for Forgotten reasle it to us! :)

<!-- Arena Svargrond -->
<movevent event="AddItem" tileitem="1" actionid="3001" script="stone.lua" /> -- 1 komnata
<movevent event="AddItem" tileitem="1" actionid="3002" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3003" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3004" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3005" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3006" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3007" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3008" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3009" script="stone.lua" />
<movevent event="AddItem" tileitem="1" actionid="3010" script="stone.lua" />
<movevent event="StepIn" actionid="2004" script="stone.lua" />
<movevent event="StepIn" actionid="2005" script="stone.lua" />
<movevent event="StepIn" actionid="2006" script="stone.lua" />
<movevent event="StepIn" actionid="2004" script="stone.lua" />
<movevent event="StepIn" actionid="2007" script="stone.lua" />
<movevent event="StepIn" actionid="2008" script="stone.lua" />
<movevent event="StepIn" actionid="2009" script="stone.lua" />
<movevent event="StepIn" actionid="2010" script="stone.lua" />
<movevent event="StepIn" actionid="2011" script="stone.lua" />
<movevent event="StepIn" actionid="2012" script="stone.lua" />
<movevent event="StepIn" actionid="2013" script="stone.lua" />
<movevent event="StepIn" actionid="2014" script="stone.lua" />
<!-- End Arena Svargrond -->

Stone.lua file
-- Svargrond Arena by Szuwar
-- Thanks to Noxitu for help

local stone1pos = {x=56,y=23,z=8,stackpos=1}
local stone2pos = {x=68,y=23,z=8,stackpos=1}
local stone3pos = {x=82,y=23,z=8,stackpos=1}
local stone4pos = {x=56,y=34,z=8,stackpos=1}
local stone5pos = {x=68,y=34,z=8,stackpos=1}
local stone6pos = {x=82,y=34,z=8,stackpos=1}
local stone7pos = {x=56,y=45,z=8,stackpos=1}
local stone8pos = {x=68,y=45,z=8,stackpos=1}
local stone9pos = {x=82,y=45,z=8,stackpos=1}
local stone10pos = {x=68,y=57,z=8,stackpos=1}

function onStepIn(cid, item, pos)

local function doCheckLvl(cid, storage)

if getPlayerStorageValue(cid, storage) == 1 then
monsters = {"Rat", "Wolf", "Bug", "Troll", "Orc", "Minotaur", "Rotworm", "Elf", "Ghoul", "Minotaur Mage"}
elseif getPlayerStorageValue(cid, storage) == 2 then
monsters = {"Monk", "Orc Leader", "Dark Monk", "Vampire", "Slime", "Orc Warlord", "Dragon", "Mummy", "Demon Skeleton", "Dragon Lord"}
elseif getPlayerStorageValue(cid, storage) == 3 then
monsters = {"Dragon", "Wyvern", "Hydra", "Behemoth", "Thalas", "Evil Eye", "Demon", "Juggernaut", "Orshabaal", "Ferumbras"}
end
end

local function doChange(cid, pos, creature, tpos)
local stone = getThingfromPos(pos)
doSetItemActionId(stone.uid,6000)
doTeleportThing(cid,tpos)
doSendMagicEffect(pos,10)
local pos = getThingPos(stone.uid)
monster = doSummonCreature(creature, pos)
doSendAnimatedText(tpos,"Fight!",198)
end

local function doCheckStone(stonepos)
local stone = getThingfromPos(stonepos)
if stone.actionid ~= 6000 and stone.itemid == 1304 then
return 0
elseif stone.actionid == 6000 or stone.itemid ~= 1304 then
return 1
end
end

local function roomBusy(cid, pos)
pos.y = pos.y + 1
doTeleportThing(cid, pos)
doPlayerSendTextMessage(cid, 22, "Stand in the line!")
end
doCheckLvl(cid, 5029)
if item.actionid == 2004 and doCheckStone(stone1pos) == 0 then
local npos = {x=61,y=31,z=8}
doChange(cid, stone1pos, monsters[1], npos)
elseif item.actionid == 2005 and doCheckStone(stone2pos) == 0 then
local npos = {x=75,y=31,z=8}
doChange(cid, stone2pos, monsters[2], npos)
doCreateItem(1304,1,stone1pos)
elseif item.actionid == 2006 and doCheckStone(stone3pos) == 0 then
local npos = {x=87,y=31,z=8}
doChange(cid, stone3pos, monsters[3], npos)
doCreateItem(1304,1,stone2pos)
elseif item.actionid == 2007 and doCheckStone(stone4pos) == 0 then
local npos = {x=61,y=42,z=8}
doChange(cid, stone4pos, monsters[4], npos)
doCreateItem(1304,1,stone3pos)
elseif item.actionid == 2008 and doCheckStone(stone5pos) == 0 then
local npos = {x=75,y=42,z=8}
doChange(cid, stone5pos, monsters[5], npos)
doCreateItem(1304,1,stone4pos)
elseif item.actionid == 2009 and doCheckStone(stone6pos) == 0 then
local npos = {x=87,y=42,z=8}
doChange(cid, stone6pos, monsters[6], npos)
doCreateItem(1304,1,stone5pos)
elseif item.actionid == 2010 and doCheckStone(stone7pos) == 0 then
local npos = {x=61,y=54,z=8}
doChange(cid, stone7pos, monsters[7], npos)
doCreateItem(1304,1,stone6pos)
elseif item.actionid == 2011 and doCheckStone(stone8pos) == 0 then
local npos = {x=75,y=54,z=8}
doChange(cid, stone8pos, monsters[8], npos)
doCreateItem(1304,1,stone7pos)
elseif item.actionid == 2012 and doCheckStone(stone9pos) == 0 then
local npos = {x=87,y=54,z=8}
doChange(cid, stone9pos, monsters[9], npos)
doCreateItem(1304,1,stone8pos)
elseif item.actionid == 2013 and doCheckStone(stone10pos) == 0 then
local npos = {x=74,y=65,z=8}
doChange(cid, stone10pos, monsters[10], npos)
doCreateItem(1304,1,stone9pos)
elseif item.actionid == 2014 then
doCreateItem(1304,1,stone10pos)
local npos = {x=83,y=59,z=8}
doTeleportThing(cid, npos)
doSendMagicEffect(npos,10)

elseif doCheckStone(stone10pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone9pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone8pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone7pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone6pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone5pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone4pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone3pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone2pos) == 1 then
roomBusy(cid, pos)
elseif doCheckStone(stone1pos) == 1 then
roomBusy(cid, pos)
end
end

function onAddItem(moveitem, tileitem, pos)

local function doCheckBody(moveitem, stonepos, monster)

local stone = getThingfromPos(stonepos)
if moveitem.itemid == 6324 and stone.itemid ~= 0 then
doRemoveItem(stone.uid,1)
doRemoveItem(moveitem.uid,1)
doSendMagicEffect(stonepos,2)
elseif moveitem.itemid == 3058 or moveitem.itemid == 3065 then
doRemoveItem(moveitem.uid,1)
local pos = getThingPos(monster)
doCreatureAddHealth(monster,-10000)
doCreateItem(1304,1,stonepos)
doSetItemActionId(stone.uid,5999)
end
end

if tileitem.actionid == 3001 then
doCheckBody(moveitem, stone1pos, monster)
elseif tileitem.actionid == 3002 then
doCheckBody(moveitem, stone2pos, monster)
elseif tileitem.actionid == 3003 then
doCheckBody(moveitem, stone3pos, monster)
elseif tileitem.actionid == 3004 then
doCheckBody(moveitem, stone4pos, monster)
elseif tileitem.actionid == 3005 then
doCheckBody(moveitem, stone5pos, monster)
elseif tileitem.actionid == 3006 then
doCheckBody(moveitem, stone6pos, monster)
elseif tileitem.actionid == 3007 then
doCheckBody(moveitem, stone7pos, monster)
elseif tileitem.actionid == 3008 then
doCheckBody(moveitem, stone8pos, monster)
elseif tileitem.actionid == 3009 then
doCheckBody(moveitem, stone9pos, monster)
elseif tileitem.actionid == 3010 then
doCheckBody(moveitem, stone10pos, monster)
end
end
 
maybe we need to use some npcs?
"OnCreatureDisappear" the npc will kick the remaining monster at the room and "OnCreatureAppear" it respawns the monsters.
and a Level Check so it respawns monsters as strong as the player ^^
 
PHP:
-- Svargrond Arena by Szuwar 
-- Thanks to Noxitu for help

local stone1pos = {x=585,y=742,z=7,stackpos=1}
local stone2pos = {x=568,y=742,z=7,stackpos=1}
local stone3pos = {x=551,y=742,z=7,stackpos=1}
local stone4pos = {x=534,y=742,z=7,stackpos=1}
local stone5pos = {x=543,y=727,z=7,stackpos=1}
local stone6pos = {x=560,y=727,z=7,stackpos=1}
local stone7pos = {x=577,y=727,z=7,stackpos=1}
local stone8pos = {x=569,y=712,z=7,stackpos=1}
local stone9pos = {x=552,y=712,z=7,stackpos=1}
local stone10pos = {x=561,y=697,z=7,stackpos=1}

function onStepIn(cid, item, pos)

local function doCheckLvl(cid, storage)
	if getPlayerStorageValue(cid, storage) == 1 then -- Greenhorn
		monsters = {"Frostfur", "Bloodpaw", "Bovinus", "Achad", "The Hairy One", "Colerian The Barbarian", "Axeitus Headbanger", "Rocky", "Cursed Gladiator", "Orcus The Cruel"} 
	elseif getPlayerStorageValue(cid, storage) == 2 then -- Scrapper
		monsters = {"Avalanche", "Kreebosh the Exile", "The Dark Dancer", "The Hag",  "Slim", "Grimgor Guteater", "Drasilla", "Spirit of Earth", "Spirit of Water", "Spirit of Fire"} 
	elseif getPlayerStorageValue(cid, storage) == 3 then -- Warlord
		monsters = {"Webster", "Darakan the Executioner", "Norgle Glacierbeard", "The Pit Lord", "Svoren the Mad", "The Masked Marauder", "Gnorre Chyllson", "Fallen Mooh'tah Master Ghar", "Deathbringer", "The Obliverator"}
	end
end

local function doChange(cid, pos, creature, tpos)
	local stone = getThingfromPos(pos)
	doSetItemActionId(stone.uid,6000)
	doTeleportThing(cid,tpos)
	doSendMagicEffect(pos,10)
	local pos = getThingPos(stone.uid)
	monster = doSummonCreature(creature, pos)
	doSendAnimatedText(tpos,"Fight!",198)
end

local function doCheckStone(stonepos)
	local stone = getThingfromPos(stonepos)
	if stone.actionid ~= 6000 and stone.itemid == 1354 then
		return 0
	elseif stone.actionid == 6000 or stone.itemid ~= 1354 then
		return 1
	end
end

local function roomBusy(cid, pos)
	pos.x = pos.x + 1 
	doTeleportThing(cid, pos)
	doPlayerSendTextMessage(cid, 22, "Somebody is before you in next room. Please wait.")
end
	doCheckLvl(cid, 5029)
	if item.actionid == 2004 and doCheckStone(stone1pos) == 0 then
		local npos = {x=590,y=745,z=7}
		doChange(cid, stone1pos, monsters[1], npos)
	elseif item.actionid == 2005 and doCheckStone(stone2pos) == 0 then
		local npos = {x=572,y=745,z=7}
		doChange(cid, stone2pos, monsters[2], npos)
		doCreateItem(1354,1,stone1pos)
	elseif item.actionid == 2006 and doCheckStone(stone3pos) == 0 then
		local npos = {x=555,y=745,z=7}
		doChange(cid, stone3pos, monsters[3], npos)
		doCreateItem(1354,1,stone2pos)
	elseif item.actionid == 2007 and doCheckStone(stone4pos) == 0 then
		local npos = {x=538,y=745,z=7}
		doChange(cid, stone4pos, monsters[4], npos)
		doCreateItem(1354,1,stone3pos)
	elseif item.actionid == 2008 and doCheckStone(stone5pos) == 0 then
		local npos = {x=546,y=730,z=7}
		doChange(cid, stone5pos, monsters[5], npos)
		doCreateItem(1354,1,stone4pos)
	elseif item.actionid == 2009 and doCheckStone(stone6pos) == 0 then
		local npos = {x=564,y=730,z=7}
		doChange(cid, stone6pos, monsters[6], npos)
		doCreateItem(1354,1,stone5pos)
	elseif item.actionid == 2010 and doCheckStone(stone7pos) == 0 then
		local npos = {x=580,y=730,z=7}
		doChange(cid, stone7pos, monsters[7], npos)
		doCreateItem(1354,1,stone6pos)
	elseif item.actionid == 2011 and doCheckStone(stone8pos) == 0 then
		local npos = {x=573,y=715,z=7}
		doChange(cid, stone8pos, monsters[8], npos)
		doCreateItem(1354,1,stone7pos)
	elseif item.actionid == 2012 and doCheckStone(stone9pos) == 0 then
		local npos = {x=555,y=715,z=7}
		doChange(cid, stone9pos, monsters[9], npos)
		doCreateItem(1354,1,stone8pos)
	elseif item.actionid == 2013 and doCheckStone(stone10pos) == 0 then
		local npos = {x=565,y=700,z=7}
		doChange(cid, stone10pos, monsters[10], npos)
		doCreateItem(1354,1,stone9pos)
	elseif item.actionid == 2014 then
		doCreateItem(1354,1,stone10pos)
		local npos = {x=605,y=726,z=6}
		doTeleportThing(cid, npos)
		doSendMagicEffect(npos,10)

	elseif doCheckStone(stone10pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone9pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone8pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone7pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone6pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone5pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone4pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone3pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone2pos) == 1 then
		roomBusy(cid, pos)
	elseif doCheckStone(stone1pos) == 1 then
		roomBusy(cid, pos)
	end
end

function onAddItem(moveitem, tileitem, pos)

local function doCheckBody(moveitem, stonepos, monster)

	local stone = getThingfromPos(stonepos)
	if moveitem.itemid == 7349 and stone.itemid ~= 0  then
		doRemoveItem(stone.uid,1)
		doRemoveItem(moveitem.uid,1)
		doSendMagicEffect(stonepos,2)
	elseif moveitem.itemid == 3058 or moveitem.itemid == 3065 then
		doRemoveItem(moveitem.uid,1)
		local pos = getThingPos(monster)
		doCreatureAddHealth(monster,-10000)
		doCreateItem(1354,1,stonepos)
		doSetItemActionId(stone.uid,5999)
	end
end

	if tileitem.actionid == 3001 then 
		doCheckBody(moveitem, stone1pos, monster)
	elseif tileitem.actionid == 3002 then
		doCheckBody(moveitem, stone2pos, monster)
	elseif tileitem.actionid == 3003 then
		doCheckBody(moveitem, stone3pos, monster)
	elseif tileitem.actionid == 3004 then
		doCheckBody(moveitem, stone4pos, monster)
	elseif tileitem.actionid == 3005 then
		doCheckBody(moveitem, stone5pos, monster)
	elseif tileitem.actionid == 3006 then
		doCheckBody(moveitem, stone6pos, monster)
	elseif tileitem.actionid == 3007 then
		doCheckBody(moveitem, stone7pos, monster)
	elseif tileitem.actionid == 3008 then
		doCheckBody(moveitem, stone8pos, monster)
	elseif tileitem.actionid == 3009 then
		doCheckBody(moveitem, stone9pos, monster)
	elseif tileitem.actionid == 3010 then
		doCheckBody(moveitem, stone10pos, monster)
	end
end

PHP:
<movevent event="AddItem" tileitem="1" actionid="3001" script="stone.lua" /> -- 1 komnata
<movevent event="AddItem" tileitem="1" actionid="3002" script="stone.lua" /> -- 2 komnata
<movevent event="AddItem" tileitem="1" actionid="3003" script="stone.lua" /> -- 3 komnata
<movevent event="AddItem" tileitem="1" actionid="3004" script="stone.lua" /> -- 4 komnata
<movevent event="AddItem" tileitem="1" actionid="3005" script="stone.lua" /> -- 5 komnata
<movevent event="AddItem" tileitem="1" actionid="3006" script="stone.lua" /> -- 6 komnata
<movevent event="AddItem" tileitem="1" actionid="3007" script="stone.lua" /> -- 7 komnata
<movevent event="AddItem" tileitem="1" actionid="3008" script="stone.lua" /> -- 8 komnata
<movevent event="AddItem" tileitem="1" actionid="3009" script="stone.lua" /> -- 9 komnata
<movevent event="AddItem" tileitem="1" actionid="3010" script="stone.lua" /> -- 10 komnata
<movevent event="StepIn" actionid="2004" script="stone.lua" /> -- wejscie
<movevent event="StepIn" actionid="2005" script="stone.lua" /> -- 1 komnata
<movevent event="StepIn" actionid="2006" script="stone.lua" /> -- 2 komnata
<movevent event="StepIn" actionid="2007" script="stone.lua" /> -- 3 komnata
<movevent event="StepIn" actionid="2008" script="stone.lua" /> -- 4 komnata
<movevent event="StepIn" actionid="2009" script="stone.lua" /> -- 5 komnata
<movevent event="StepIn" actionid="2010" script="stone.lua" /> -- 6 komnata
<movevent event="StepIn" actionid="2011" script="stone.lua" /> -- 7 komnata
<movevent event="StepIn" actionid="2012" script="stone.lua" /> -- 8 komnata
<movevent event="StepIn" actionid="2013" script="stone.lua" /> -- 9 komnata
<movevent event="StepIn" actionid="2014" script="stone.lua" /> -- 10 komnata


TALATUREN CAN YOU FIX IT, its not working on TFS ;/
 
I'm going to make one in some days.. just waiting till my mappers got the map done so i can make it..
or start maiking the thread ad if oyu are stuck.. check my helping thread i'll help you out there
 
Why not....? you already posted the script why not complete it ?:(

+ you said your gonna send it in the msn i added you ur offline :<
 
Last edited:
Back
Top