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

Lua Svargrond Arena [TFS v0.2.15]

Elvarion

Member
Joined
Apr 14, 2010
Messages
99
Reaction score
13
First tried out some scripts that i found here. Did not work for me whatsoever.

Found some other scripts.
Added them to the server and set up all the Action/Unique ids.

Npc enables you to enter the door > Teleport inside works.

When teleporting to the first room.
Code:
[08/12/2013 16:14:37] Lua Script Error: [MoveEvents Interface]
[08/12/2013 16:14:37] data/movements/scripts/svargrond arena quest/arena_enter.lua:onStepIn
[08/12/2013 16:14:37] .../movements/scripts/svargrond arena quest/arena_enter.lua:55: attempt to call global 'doForceSummonCreature' (a nil value)
[08/12/2013 16:14:37] stack traceback:
[08/12/2013 16:14:37]     [C]: in function 'doForceSummonCreature'
[08/12/2013 16:14:37]     .../movements/scripts/svargrond arena quest/arena_enter.lua:55: in function <.../movements/scripts/svargrond arena quest/arena_enter.lua:17>

Changing "doForceSummonCreature" to "doSummonCreature" works.
However when you kill the monster the pillar does not get removed. And if you try and use the portal to get out (Escape exit) you will get teleported back into the room and a new monster will spawn.

Console also prints this when using the portal (escape exit)
Code:
[08/12/2013 16:15:57] Lua Script Error: [MoveEvents Interface]
[08/12/2013 16:15:57] data/movements/scripts/svargrond arena quest/arena_pit.lua:onStepIn
[08/12/2013 16:15:57] data/movements/scripts/svargrond arena quest/arena_pit.lua:68: attempt to call global 'doForceSummonCreature' (a nil value)
[08/12/2013 16:15:57] stack traceback:
[08/12/2013 16:15:57]     [C]: in function 'doForceSummonCreature'
[08/12/2013 16:15:57]     data/movements/scripts/svargrond arena quest/arena_pit.lua:68: in function <data/movements/scripts/svargrond arena quest/arena_pit.lua:16>
Changing "doForceSummonCreature" to "doSummonCreature" removes the error in the log. But will still teleport you to the middle of the room.

arena_pit.lua
"doTeleportThing(cid, POSITION_KICK)"
svargrondarenaquest.lua
"POSITION_KICK = {x = 1484, y = 1062, z = 7}"

I did set the duration of how long you can stay in the arena to 60 sec to test the kick when taking to long. This works just fine and will teleport you to the "POSITION_KICK" coords.

So im stuck with no errors, just a script that does not do what its supposed to do ^^,
(Perhaps to new functions?)

Any hints is very much appreciated =)

Files im using
arena_enter.lua
arena_pit.lua
SvargrondArenaQuest.lua (inside Data\lib)
(There are some more, like rewards etc. But since its not possible to get the UID's to get rewards yets its not worth listing them.)
 
Last edited:
Bump.

It seems the problem is with the onKill script.

Ive added messages to every statement to see what gets executed and what does not.

Script
http://pastebin.com/TPX3iJHW
1, 2 & 3 registers when i kill monsters in the arena.
4 never happens.

Yeah, the problem lies in this line:

Code:
    if isInArray(ARENA[arena].creatures, getCreatureName(target):lower()) then

The script is not recognizing the creatures' names for some reason, if you summon/kill any other creature in the arena room you'll get the "1, 2 & 3" messages you've added to the code. But that's all I know lol
 
Yea.. This TFS version might be missing some source codes perhaps..
Wish i could use the 10.22 version.. But for some reason it wont let me connect after choosing character.
Never had trouble getting a server online, Its only the 10.22 version that wont work for me >.>
 
Finally I fixed that shit, after tests and tests with other functions, the problem was fixed just removing 2 lines (that's sad o_O)

Here's the fix:
Code:
dofile('data/lib/SvargrondArenaQuest.lua')

function onKill(cid, target)
local pit = getPlayerStorageValue(cid, STORAGE_PIT)
local arena = getPlayerStorageValue(cid, STORAGE_ARENA)
if isPlayer(target) then return true end
if pit < 1 or pit > 10 then return true end
if arena < 1 then return true end

local pillar = getTopItem(PITS[pit].pillar)
local tp = getTopItem(PITS[pit].tp)
local pos = PITS[pit].pillar
local effectpos = {
{x=pos.x-1,y=pos.y,z=pos.z},
{x=pos.x+1,y=pos.y,z=pos.z},
{x=pos.x+1,y=pos.y-1,z=pos.z},
{x=pos.x+1,y=pos.y+1,z=pos.z},
{x=pos.x,y=pos.y,z=pos.z}}
if pillar.itemid == ITEM_STONEPILLAR then
for i = 1, table.maxn(effectpos) do
doSendMagicEffect(effectpos,12)
end
doRemoveItem(pillar.uid)
local tpaid = doCreateItem(ITEM_TELEPORT, 1, PITS[pit].tp)
doSetItemActionId(tpaid,25200)
else
print("[Svargrond Arena::CreatureEvent] Cannot remove stone pillar on position X: " .. PITS[pit].pillar.x .. ", Y: " .. PITS[pit].pillar.y .. ", Z: " .. PITS[pit].pillar.z .. ".")
end
setPlayerStorageValue(cid, STORAGE_PIT, pit + 1)
doCreatureSay(cid, "Victory! Head through the new teleporter into the next room.", TALKTYPE_ORANGE_1)
return true
end

Just removed the lines
if isInArray(ARENA[arena].creatures, getCreatureName(target):lower()) then and the end before the return true

Enjoy ;)
 
Back
Top