• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

"real tibia svargrond arena" by Gesior

It works for me on TFS 0.3b3, however when creatures die, they still stay standing, and not just the arena monsters, all monsters. Its because of the login.lua, and I do not know how to fix it. This my login.lua:

function onLogin(cid)
registerCreatureEvent(cid, "PlayerKill")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
 
on 0.3.1 it's not working ... i have doned return True in kill.lua before last end and all arena scripts from global.lua is now in data.lua
kill.lua script
Code:
function onKill(cid, target)
	local monster = getCreatureName(target)
	local room = getArenaMonsterIdByName(monster)
	if room > 0 then
		setPlayerStorageValue(cid, room, 1)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'Mozesz wejsc do kolejnego pokoju areny!')
	end
return TRUE
end
data.lua
Code:
function createClass(parent)
	local newClass = {}
	function newClass:new(instance)
		local instance = instance or {}
		setmetatable(instance, {__index = newClass})
		return instance
	end

	if(parent ~= nil) then
		setmetatable(newClass, {__index = parent})
	end

	function newClass:getSelf()
		return newClass
	end

	function newClass:getParent()
		return baseClass
	end

	function newClass:isa(class)
		local tmp = newClass
		while(tmp ~= nil) do
			if(tmp == class) then
				return true
			end

			tmp = tmp:getParent()
		end

		return false
	end
	
	function newClass:setAttributes(attributes)
		for k, v in pairs(attributes) do
			newClass[k] = v
		end
	end

	return newClass
end

dofile(getDataDir() .. "lib/constant.lua")
dofile(getDataDir() .. "lib/function.lua")
dofile(getDataDir() .. "lib/compat.lua")
dofile(getDataDir() .. "lib/database.lua")
InitShopComunication = 0
InitHistory = 0 
-- arena script
InitArenaScript = 0
arena_room_max_time = 240
arenaKickPosition = {x=32222, y=31080, z=6} -- position where kick from arena when you leave/you did arena level
arena_monsters = {}
arena_monsters[42300] = 'frostfur' -- first monster from 1 arena
arena_monsters[42301] = 'bloodpaw'
arena_monsters[42302] = 'bovinus'
arena_monsters[42303] = 'achad'
arena_monsters[42304] = 'colerian the barbarian'
arena_monsters[42305] = 'the hairy one'
arena_monsters[42306] = 'axeitus headbanger'
arena_monsters[42307] = 'rocky'
arena_monsters[42308] = 'cursed gladiator'
arena_monsters[42309] = 'orcus the cruel'
arena_monsters[42310] = 'avalanche' -- first monster from 2 arena
arena_monsters[42311] = 'kreebosh the exile'
arena_monsters[42312] = 'the dark dancer'
arena_monsters[42313] = 'the hag'
arena_monsters[42314] = 'slim'
arena_monsters[42315] = 'grimgor guteater'
arena_monsters[42316] = 'drasilla'
arena_monsters[42317] = 'spirit of earth'
arena_monsters[42318] = 'spirit of water'
arena_monsters[42319] = 'spirit of fire'
arena_monsters[42320] = 'webster' -- first monster from 3 arena
arena_monsters[42321] = 'darakan the executioner'
arena_monsters[42322] = 'norgle glacierbeard'
arena_monsters[42323] = 'the pit lord'
arena_monsters[42324] = 'svoren the mad'
arena_monsters[42325] = 'the masked marauder'
arena_monsters[42326] = 'gnorre chyllson'
arena_monsters[42327] = "fallen mooh'tah master ghar"
arena_monsters[42328] = 'deathbringer'
arena_monsters[42329] = 'the obliverator'

function getArenaMonsterIdByName(name)
    name = string.lower(tostring(name))
    for i = 42300, 42329 do
        if tostring(arena_monsters[i]) == name then
            return i
        end
    end
    return 0
end
 
It works for me on TFS 0.3b3, however when creatures die, they still stay standing, and not just the arena monsters, all monsters. Its because of the login.lua, and I do not know how to fix it.

It's not because of your login.lua, it's because of kill.lua
Make sure it is same as the following:
PHP:
function onKill(cid, target)
	local monster = getCreatureName(target)
	local room = getArenaMonsterIdByName(monster)
	if room > 0 then
		setPlayerStorageValue(cid, room, 1)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You may enter the next arena pit!')
	end
return true
end
 
It's not because of your login.lua, it's because of kill.lua
Make sure it is same as the following:
PHP:
function onKill(cid, target)
	local monster = getCreatureName(target)
	local room = getArenaMonsterIdByName(monster)
	if room > 0 then
		setPlayerStorageValue(cid, room, 1)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You may enter the next arena pit!')
	end
return true
end

I did that, but they still stand up. Else it works quite well.. Just the thing that I aint teleported in to reward room after the arena have been completed. I tried to move the arena kick pos to the end of constant.lua and still no success :/
 
Last edited:
I did that, but they still stand up. Else it works quite well.. Just the thing that I aint teleported in to reward room after the arena have been completed. I tried to move the arena kick pos to the end of constant.lua and still no success :/

i got it working on rc pl1 by adding this what have gesior said some post in past and by this login.lua try it and see if ur arena will be working with this login.lua
Code:
function onLogin(cid)


	
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		for i = PLAYERLOSS_EXPERIENCE, PLAYERLOSS_ITEMS do
			doPlayerSetLossPercent(cid, i, getConfigValue('deathLostPercent'))
		end
	end
	
    registerCreatureEvent(cid, "PlayerKill")
    if (InitArenaScript ~= 0) then
    InitArenaScript = 1
    -- make arena rooms free
        for i = 42300, 42309 do
            setGlobalStorageValue(i, 0)
            setGlobalStorageValue(i+100, 0)
        end
    end
    -- if he did not make full arena 1 he must start from zero
    if getPlayerStorageValue(cid, 42309) < 1 then
        for i = 42300, 42309 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    -- if he did not make full arena 2 he must start from zero
    if getPlayerStorageValue(cid, 42319) < 1 then
        for i = 42310, 42319 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    -- if he did not make full arena 3 he must start from zero
    if getPlayerStorageValue(cid, 42329) < 1 then
        for i = 42320, 42329 do
            setPlayerStorageValue(cid, i, 0)
        end
    end
    if getPlayerStorageValue(cid, 42355) == -1 then
        setPlayerStorageValue(cid, 42355, 0) -- did not arena level
    end
    setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
    setPlayerStorageValue(cid, 42352, 0) -- is not in arena  

	
    if(InitShopComunication == 0) then
	local eventServ = addEvent(sql_communication, SQL_COMUNICATION_INTERVAL, {})
        local historyPage = addEvent(historyPage, 60000, {})
	InitShopComunication = eventServ
    end
    registerCreatureEvent(cid, "PlayerDeath")
    return TRUE

end
 
<monster name="Kreebosh the Exile" file="Arena/scrapper/kreebosh the exile.xml/>
Monster name=... must be the same as the monster name in data lua arena_monsters[42311] = 'kreebosh the exile'

second one you should check if you added everything!! you should read whole posts in this thread...

third you can take only one reward !! as on real tibia...

edit ur monsters.xml keebosh to kreebosh :p
 
I don't know what to do... I have TFS 0.31 and I put in data.lua:
-- arena script
InitArenaScript = 0
arena_room_max_time = 240
arenaKickPosition = {x=xxx, y=xxx, z=xxx} -- position where kick from arena when you leave/you did arena level
arena_monsters = {}
arena_monsters[42300] = 'frostfur' -- first monster from 1 arena
arena_monsters[42301] = 'bloodpaw'
arena_monsters[42302] = 'bovinus'
arena_monsters[42303] = 'achad'
arena_monsters[42304] = 'colerian the barbarian'
arena_monsters[42305] = 'the hairy one'
arena_monsters[42306] = 'axeitus headbanger'
arena_monsters[42307] = 'rocky'
arena_monsters[42308] = 'cursed gladiator'
arena_monsters[42309] = 'orcus the cruel'
arena_monsters[42310] = 'avalanche' -- first monster from 2 arena
arena_monsters[42311] = 'kreebosh the exile'
arena_monsters[42312] = 'the dark dancer'
arena_monsters[42313] = 'the hag'
arena_monsters[42314] = 'slim'
arena_monsters[42315] = 'grimgor guteater'
arena_monsters[42316] = 'drasilla'
arena_monsters[42317] = 'spirit of earth'
arena_monsters[42318] = 'spirit of water'
arena_monsters[42319] = 'spirit of fire'
arena_monsters[42320] = 'webster' -- first monster from 3 arena
arena_monsters[42321] = 'darakan the executioner'
arena_monsters[42322] = 'norgle glacierbeard'
arena_monsters[42323] = 'the pit lord'
arena_monsters[42324] = 'svoren the mad'
arena_monsters[42325] = 'the masked marauder'
arena_monsters[42326] = 'gnorre chyllson'
arena_monsters[42327] = "fallen mooh'tah master ghar"
arena_monsters[42328] = 'deathbringer'
arena_monsters[42329] = 'the obliverator'

function getArenaMonsterIdByName(name)
name = string.lower(tostring(name))
for i = 42300, 42329 do
if tostring(arena_monsters) == name then
return i
end
end
return 0
end


and change kill.lua to:
function onKill(cid, target)
local monster = getCreatureName(target)
local room = getArenaMonsterIdByName(monster)
if room > 0 then
setPlayerStorageValue(cid, room, 1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You may enter the next arena pit!')
end
return true
end

But I still have as same message
[15/02/2009 14:48:01] Lua Script Error: [MoveEvents Interface]
[15/02/2009 14:48:01] data/movements/scripts/quest/arena/arenaroom.lua:eek:nStepIn

[15/02/2009 14:48:01] luaGetThingPos(). Thing not found

[15/02/2009 14:48:01] Lua Script Error: [MoveEvents Interface]
[15/02/2009 14:48:01] data/movements/scripts/quest/arena/arenaroom.lua:eek:nStepIn

[15/02/2009 14:48:01] luaDoCreateMonster(). Can not create monster: frostfur

[15/02/2009 14:48:01] Lua Script Error: [MoveEvents Interface]
[15/02/2009 14:48:01] data/movements/scripts/quest/arena/arenaroom.lua:eek:nStepIn

[15/02/2009 14:48:01] luaDoCreateNpc(). Npc name(frostfur) not found

I have monster frostfur, so I don't know WTF.
 
I am using tfs 0.3.1 pl2


And i have that when i go into teleport.
PHP:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn

luaGetThingPos(). Thing not found

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn

luaDoCreateMonster(). Can not create monster: frostfur
I/O warning : failed to load external entity "data/npc/frostfur.xml"

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn

luaDoCreateNpc(). Npc name(frostfur) not found
I have frostfur ofcrz.

HELP ME PLEASE!!!
 
For those who are having the problem:
PHP:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn

luaGetThingPos(). Thing not found

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn

luaDoCreateMonster(). Can not create monster: frostfur
I/O warning : failed to load external entity "data/npc/frostfur.xml"

Lua Script Error: [MoveEvents Interface]
data/movements/scripts/arenaroom.lua:onStepIn

luaDoCreateNpc(). Npc name(frostfur) not found

AND the problem with "First, Kill the monster!"

obs: its the same problem.


I just found out what it is.
its very simply...
u have to set a UNIQUE ID on the floor in the middle of each pit.
(its where u gonna be teleported and where the monster is gonna be spawned)

the unique id of the first pit is 42300
the second is 42301 ... and so on.
 
Thanks!
Now its working.

But i have bug.

When i kill the monster.
He doesnt die...
Look.
19479.jpg

It's something with kill.lua
 
Last edited:
About problems on TFS 0.3pl2:
in .../data/movements/scripts/arenaroom.lua find:
PHP:
doSummonCreature
and in place of this paste:
PHP:
doCreateMonster
 
What is wrong?

PHP:
Lua Script Error: [MoveEvents Interface] 
data/movements/scripts/arenaroom.lua:onStepIn

luaGetThingPos(). Thing not found

Lua Script Error: [MoveEvents Interface] 
data/movements/scripts/arenaroom.lua:onStepIn

data/movements/scripts/arenaroom.lua:17: attempt to index global 'arena_monsters' (a nil value)
stack traceback:
	data/movements/scripts/arenaroom.lua:17: in function <data/movements/scripts/arenaroom.lua:1>
I have TFS 0.3b3 and what's wrong?
 
#up

You forgot about 4 step? ;p (in 0.3b3 you need to paste it in data/libs/constant.lua)
 
Back
Top