• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[TFS 1.0] Svargrond arena "something is wrong"

bybbzan

mapper
Joined
Aug 4, 2012
Messages
809
Solutions
2
Reaction score
136
Location
Sweden
Hello guys, i need some help. Im using a Svargrond Arena script that was included in Printers pack which you can see on downloads. I setup everything and i got this when i killed the last monster and should be teleported to reward room. Althought this orange message that tells me i finished it shows up. (i also tried with a normal player, same thing happend)

the script is too long, but here it is on pastebin http://pastebin.com/mjJxR02s

wgopoh.png
 
Hello guys, i need some help. Im using a Svargrond Arena script that was included in Printers pack which you can see on downloads. I setup everything and i got this when i killed the last monster and should be teleported to reward room. Althought this orange message that tells me i finished it shows up. (i also tried with a normal player, same thing happend)

the script is too long, but here it is on pastebin http://pastebin.com/mjJxR02s

wgopoh.png

we need the scripts that post that message, these are just config scripts you posted
 
Well if it automatically gives winning message on kill then it should be creaturescript
Alright, it looks like this.
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

    if isInArray(ARENA[arena].creatures, getCreatureName(target):lower()) then
        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[i],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)
    end
    return true
end
 
arena_pit.lua says it.

Code:
dofile('data/lib/SvargrondArenaQuest.lua')

local kick_time = 600

local function Kick(cid)
    if (isPlayer(cid)) then
        if (getPlayerStorageValue(cid, STORAGE_PIT) > 0) then
            doTeleportThing(cid, POSITION_KICK)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your time is out!")
            setPlayerStorageValue(cid, STORAGE_PIT, 0)  
        end
    end
    return true
end

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

    local oldPit = getPlayerStorageValue(cid, STORAGE_PIT) - 1
    local newPit = getPlayerStorageValue(cid, STORAGE_PIT)

    local arena = getPlayerStorageValue(cid, STORAGE_ARENA)
    if (newPit < 1) then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Something is wrong, please contact a gamemaster.") and doTeleportThing(cid, lastPosition) end
    if (newPit > 10) then
        doTeleportThing(cid, POSITION_REWARD)
        doSendMagicEffect(getCreaturePosition(cid), (arena == 1 and CONST_ME_FIREWORK_BLUE or arena == 2 and CONST_ME_FIREWORK_YELLOW or CONST_ME_FIREWORK_RED))
        setPlayerStorageValue(cid, STORAGE_PIT, 0)
        setPlayerStorageValue(cid, (arena == 1 and ACTION_GREENHORNDOOR or arena == 2 and ACTION_SCRAPPERDOOR or ACTION_WARLORDDOOR), 1)
        setPlayerStorageValue(cid, STORAGE_ARENA, getPlayerStorageValue(cid, STORAGE_ARENA) + 1)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Congratulations! You completed " .. ARENA[arena].name .. " arena, you should take your reward now.")
        doCreatureSay(cid, (arena == 1 and "Welcome back, little hero!" or arena == 2 and "Congratulations, brave warrior!" or "Respect and honour to you, champion!"), TALKTYPE_ORANGE_1)
        stopEvent(e10)
    return true
    end
    local thing = getCreaturesOnPit(oldPit)
    for _, uid in ipairs(thing) do
        if (getCreatureName(uid):lower() == ARENA[arena].creatures[pit]) then
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Defeat the monster first.")
            doTeleportThing(cid, lastPosition)
            return true
        end
    end
    thing = getCreaturesOnPit(newPit)
    local busy = false
    for _, uid in ipairs(thing) do
        if isPlayer(uid) and uid ~= cid then
            busy = true
            break
        end
    end
    if (isPlayer(getTopCreature(PITS[newPit].pillar).uid)) then
        busy = true
    end
    if (busy) then
        for _, uid in ipairs(thing) do
            if (isPlayer(uid) and uid ~= cid) then
                if (getPlayerSex(cid) == 0) then
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ""..getCreatureName(uid).." is currently in the next arena pit. You will have to wait until he leaves.")
                else
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ""..getCreatureName(uid).." is currently in the next arena pit. You will have to wait until she leaves.")
                end
                doTeleportThing(cid, lastPosition)
            end
        end
        return true
    end
    resetPit(newPit)
    doTeleportThing(cid, PITS[newPit].center)
    doForceSummonCreature(ARENA[arena].creatures[newPit], PITS[newPit].summon)
    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
    doCreatureSay(cid, "Fight!", TALKTYPE_ORANGE_1)
    setPlayerStorageValue(cid, 10030, 0) 
    if (getTopItem(PITS[oldPit].tp).itemid == ITEM_TELEPORT) then
        doRemoveItem(getTopItem(PITS[oldPit].tp).uid)
    end
    if (getTopItem(PITS[newPit].tp).itemid == ITEM_TELEPORT) then
        doRemoveItem(getTopItem(PITS[newPit].tp).uid)
    end
    if(getTopItem(PITS[newPit].pillar).itemid ~= ITEM_STONEPILLAR) then
        doCreateItem(ITEM_STONEPILLAR, 1, PITS[newPit].pillar)
    end
    if newPit == 2 then
        e2 = addEvent(Kick, kick_time*1000, cid)
    elseif newPit == 3 then
        e3 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e2)
    elseif newPit == 4 then
        e4 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e3)
    elseif newPit == 5 then
        e5 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e4)
    elseif newPit == 6 then
        e6 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e5)
    elseif newPit == 7 then
        e7 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e6)
    elseif newPit == 8 then
        e8 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e7)
    elseif newPit == 9 then
        e9 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e8)
    elseif newPit == 10 then
        e10 = addEvent(Kick, kick_time*1000, cid)
        stopEvent(e9)
    end
    startTimer(newPit)
    if isInArray(ITEM_FIREFIELD_TIMER, getTopItem(PITS[oldPit].fromPos).itemid) then
        doRemoveItem(getTopItem(PITS[oldPit].fromPos).uid)
    end
    if (item.actionid == 25300) then
        setPlayerStorageValue(cid, STORAGE_PIT, 0)
        doSetMonsterOutfit(cid, "Chicken", 120 * 1000)
        doTeleportThing(cid, POSITION_KICK)
        doCreatureSay(cid, "Coward!", TALKTYPE_ORANGE_1)
        stopEvent(e2)
        stopEvent(e3)
        stopEvent(e4)
        stopEvent(e5)
        stopEvent(e6)
        stopEvent(e7)
        stopEvent(e8)
        stopEvent(e9)
        stopEvent(e10)
    end
    return true
end
 
Alright make sure that POSITION_REWARD is set to a valid teleport area

Then you can try changing doTeleportThing(cid, POSITION_REWARD) to doTeleportThing(cid, POSITION_REWARD, true)

The warning to tell a game master does that only happen after you try and kill it a second time? Or does it show both messages at once?
 
Alright make sure that POSITION_REWARD is set to a valid teleport area

Then you can try changing doTeleportThing(cid, POSITION_REWARD) to doTeleportThing(cid, POSITION_REWARD, true)

The warning to tell a game master does that only happen after you try and kill it a second time? Or does it show both messages at once?

First time i did it i didnt get any errors, i did get teleported to reward area.
But then i tried to do "scrapper", and then on the last monster i did get the error, at the same time, both messages.
My friend tried it after, and did get the same messages on the first level "Greenhorn".
 
You can try changing the STORAGE_PIT value then, I think maybe that might be the issue if that's the case.

Use a storage value you know is available to test it.
 
Back
Top