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

Svarground script TFS 1.4.2 [10.98]

Djivar

AKA Wickedviruz
Joined
Sep 28, 2009
Messages
1,641
Reaction score
19
Location
Sweden,edsbyn
Hi!

I am trying to implement svarground arena on a TFS 1.4.2 evo map

But i can not get it to work... i have tried to debug the code but i am stuck. soo the problem i i talk to the npc, pay the fee and i get the storagevalue 1100 = 1 and 1101 = 1 stored in the database.

But when i try to enter the door i get the message "The door seems to be sealed against unwanted intruders." altho i should not be?

this is my server response from my prints:

Code:
Nicke has logged in.
Player Storage Value (Arena): 1
Action ID: 13100
Checking storage for arena entrance door: 1101
Transforming item and teleporting player.

And this is the actions.xml

XML:
<!-- Arena Quest-->
    <action actionid="13100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="26100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="27100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="28100" script="quests/svargrond arena/arena_door.lua" />

this is arena_door.lua with all the print statements:

Lua:
local storages = {
    [26100] = Storage.SvargrondArena.Greenhorn,
    [27100] = Storage.SvargrondArena.Scrapper,
    [28100] = Storage.SvargrondArena.Warlord
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    -- Cannot use opened door
    if item.itemid == 5133 then
        print("Door is already open.")
        return false
    end

    print("Player Storage Value (Arena): " .. player:getStorageValue(Storage.SvargrondArena.Arena))
    if player:getStorageValue(Storage.SvargrondArena.Arena) < 1 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
        return true
    end

    -- Doors to rewards
    local cStorage = storages[item.actionid]
    print("Action ID: " .. item.actionid)
    if cStorage then
        print("Checking storage for rewards door: " .. cStorage)
        if player:getStorageValue(cStorage) ~= 1 then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'It\'s locked.')
            return true
        end

        item:transform(item.itemid + 1)
        player:teleportTo(toPosition, true)
    else
        print("Checking storage for arena entrance door: " .. Storage.SvargrondArena.Pit)
        if player:getStorageValue(Storage.SvargrondArena.Pit) ~= 1 then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
            return true
        end
        print("Transforming item and teleporting player.")
        item:transform(item.itemid + 1)
        player:teleportTo(toPosition, true)
    end

    return true
end


this is the 051-storages.lua:
Code:
    SvargrondArena = {
        Arena = 1100,
        Pit = 1101,
        QuestLogGreenhorn = 50140,
        QuestLogScrapper = 50141,
        QuestLogWarlord = 50142,
        RewardGreenhorn = 26300,
        RewardScrapper = 27300,
        RewardWarlord = 28300,
        TrophyGreenhorn = 1103,
        TrophyScrapper = 1105,
        TrophyWarlord = 1107,
        -- Reward Doors
        Greenhorn = 26100,
        Scrapper = 27100,
        Warlord = 28100
    },

if you need more code, please just ask for it i will do my best to respod as soon as possible! :)
 
Would you be interested in a system designed around the Svarground arena? I have incorporated the system crafted by Nekiro onto my server. While encountering a few minor bugs, these are easily remedied. Rigorous testing has confirmed its flawless functionality without any errors. I'm currently utilizing TFS 1.4.3 1098. Here is the link.

And there is another one that is quite complete in terms of the entire system. Take a look; It might be possible to derive a base from it or install everything on your server and just adapt it for the Svarground arena. It should work.
 
Last edited:
Would you be interested in a system designed around the Svarground arena? I have incorporated the system crafted by Nekiro onto my server. While encountering a few minor bugs, these are easily remedied. Rigorous testing has confirmed its flawless functionality without any errors. I'm currently utilizing TFS 1.4.3 1098. Here is the link.

And there is another one that is quite complete in terms of the entire system. Take a look; It might be possible to derive a base from it or install everything on your server and just adapt it for the Svarground arena. It should work.
Thank you!

i am in full motion to startup my own ubuntu host for my server. i will take a look at this as soon as possible! :)
 
Back
Top