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

rush event error in consola help

Deus Meus

New Member
Joined
May 18, 2014
Messages
120
Reaction score
1
otland Hello I am using a rush event I got for the forum
but it marks an error saying! join rush
Code:
[08/11/2014 02:09:46] [Error - TalkAction Interface]
[08/11/2014 02:09:46] buffer:onSay
[08/11/2014 02:09:46] Description:
[08/11/2014 02:09:46] data/lib/034-exhaustion.lua:8: attempt to compare number with string
[08/11/2014 02:09:46] stack traceback:
[08/11/2014 02:09:46]    data/lib/034-exhaustion.lua:8: in function 'check'
[08/11/2014 02:09:46]    [string "loadBuffer"]:12: in function <[string "loadBuffer"]:3>

any suggestions to fix this error
rush event
https://www.mediafire.com/?1g118bg3t96tmho

I can not post the mod because it passes the
10k caracteres that I leave the link
 
Last edited:
Can you explain better what happens and what should be different? When exactly should the player be teleported to an other place instead of the temple?
Look for doTeleportThing with getTownTemplePosition to find the one you want to change and change the position to where it should teleport to.
 
I'll explain as best as possible.

-has not marked error in the exe

-the player when they die within the area of war are sent to the temple and has no area team x
up: where x player is defeated by the other team back in the area of your team and you can go back to battle
but what happens at death sends the temple do not want that

-the player will remain registered and no frgas I guess as the deaths of the player noce count toward war arena so they stay registered and frags are not counted in that too because the player is not registered are counted when they die that happens
 
@BUMP
when the player is within the arena of war when player dies x is sent to the temple and did not return to the temple of his team

Code:
<event type="preparedeath" name="RushDead" event="script"><![CDATA[
    domodlib('re')
    function onPrepareDeath(cid, deathList)
        if(not isPlayer(cid)) then
            return true
        end
        doBroadcastMessage("[DEBUG][RUSH EVENT] -- PrepareDeath Entered", MESSAGE_STATUS_WARNING)
        if getGlobalStorageValue(t.a) == 1 and getPlayerStorageValue(cid, t.h) == 0 and getPlayerStorageValue(cid, t.f) > -1 then
            doBroadcastMessage("[DEBUG][RUSH EVENT] -- Recognized that the event is running and player is on it", MESSAGE_STATUS_WARNING)
            local strings = {""}
            local j, position, corpse = 1, 1, 0
            for _, pid in ipairs(deathList) do
                if isCreature(pid) == true then
                    strings[position] = j == 1 and "" or strings[position] .. ", "
                    strings[position] = strings[position] .. getCreatureName(pid) .. ""
                    j = j + 1
                else
                    strings[position] = j == 1 and "" or strings[position] .. ", "
                    strings[position] = strings[position] .."a field item"
                    j = j + 1
                end
            end
            for i, str in ipairs(strings) do
                if(str:sub(str:len()) ~= ",") then
                    str = str .. "."
                end
                desc = "You recognize "
                desc = desc .. "" .. getCreatureName(cid) .. ". He was killed by " .. str
            end
            if(getPlayerSex(cid) == 1) then
                corpse = doCreateItem(3058, getCreaturePosition(cid))
            else
                corpse = doCreateItem(3065, getCreaturePosition(cid))
            end
            doItemSetAttribute(corpse, "description", desc)
            if((getPlayerStorageValue(cid, t.g) % 2) == 1) then
                setGlobalStorageValue(t.u, getGlobalStorageValue(t.u)+1)
            else
                setGlobalStorageValue(t.l, getGlobalStorageValue(t.l)+1)
            end
            local red = getGlobalStorageValue(t.l)
            local blue = getGlobalStorageValue(t.u)
            doBroadcastMessage("[DEBUG][RUSH EVENT] -- Red Frags value: " .. red, MESSAGE_STATUS_WARNING)
            doBroadcastMessage("[DEBUG][RUSH EVENT] -- Blue Frags value: " .. blue, MESSAGE_STATUS_WARNING)
            if blue < t.v or red < t.v then   
                if(isPlayer(cid) == false) then
                    return true
                end       
                doBroadcastMessage("[DEBUG][RUSH EVENT] -- Recognized that both teams not reached the frags limit.", MESSAGE_STATUS_WARNING)
                if((getPlayerStorageValue(cid, t.g) % 2) == 1) then
                    doTeleportThing(cid, t.d_1)
                    doSendMagicEffect(getCreaturePosition(cid), 10)
                    doCreatureAddHealth(cid, getCreatureMaxHealth(cid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
                    doCreatureAddMana(cid, getCreatureMaxMana(cid))
                    doPlayerRemoveLethalConditions(cid)
                    if getCreatureSkullType(cid) == SKULL_WHITE then
                        doCreatureSetSkullType(cid, 0)
                    end
                else
                    doTeleportThing(cid, t.d_2)
                    doSendMagicEffect(getCreaturePosition(cid), 10)
                    doCreatureAddHealth(cid, getCreatureMaxHealth(cid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
                    doCreatureAddMana(cid, getCreatureMaxMana(cid))
                    doPlayerRemoveLethalConditions(cid)
                    if getCreatureSkullType(cid) == SKULL_WHITE then
                        doCreatureSetSkullType(cid, 0)
                    end
                end   
            elseif blue >= t.v then
                doBroadcastMessage("[DEBUG][RUSH EVENT] -- Recognized that blue team reached the frags limit.", MESSAGE_STATUS_WARNING)
                doBroadcastMessage(t.y, MESSAGE_STATUS_WARNING)
                setGlobalStorageValue(t.h, 1)
                for _, pid in ipairs(getPlayersOnline()) do
                    if(getPlayerStorageValue(pid, t.f_1) == 1) then
                        doPlayerAddItem(cid, 2160, 30)
                    end
                end
            elseif red >= t.v then
                doBroadcastMessage("[DEBUG][RUSH EVENT] -- Recognized that red team reached the frags limit.", MESSAGE_STATUS_WARNING)
                doBroadcastMessage(t.o, MESSAGE_STATUS_WARNING)
                setGlobalStorageValue(t.h, 1)
                for _, pid in ipairs(getPlayersOnline()) do
                    if(getPlayerStorageValue(pid, t.f_2) == 1) then
                        doPlayerAddItem(cid, 2160, 30)
                    end
                end
            end
            if getGlobalStorageValue(t.h) == 1 then
                doBroadcastMessage("[DEBUG][RUSH EVENT] -- Recognized that the event is finished and teleport player to the temple.", MESSAGE_STATUS_WARNING)
                setGlobalStorageValue(t.a, 0)
                setGlobalStorageValue(t.h, 0)
                setGlobalStorageValue(t.wv, -1)
                setPlayerStorageValue(cid, t.f, -1)
                setPlayerStorageValue(cid, t.g, 0)
                setPlayerStorageValue(cid, t.l, 0)
                setPlayerStorageValue(cid, t.u, 0)
                setPlayerStorageValue(cid, t.f_1, -1)
                setPlayerStorageValue(cid, t.f_2, -1)
                setPlayerStorageValue(cid, t.h, -1)
                doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
                doSendMagicEffect(getCreaturePosition(cid), 10)
                doCreatureAddHealth(cid, getCreatureMaxHealth(cid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
                doCreatureAddMana(cid, getCreatureMaxMana(cid))
                doPlayerRemoveLethalConditions(cid)
                for _, pid in ipairs(getPlayersOnline()) do
                    if(getPlayerStorageValue(pid, t.f_1) == 1 or getPlayerStorageValue(pid, t.f_2) == 1) then
                        setPlayerStorageValue(pid, t.f, -1)
                        doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
                        doSendMagicEffect(getCreaturePosition(pid), CONST_ME_TELEPORT)
                        setPlayerStorageValue(pid, t.g, 0)
                        setPlayerStorageValue(pid, t.l, 0)
                        setPlayerStorageValue(pid, t.u, 0)
                        setPlayerStorageValue(pid, t.f_1, -1)
                        setPlayerStorageValue(pid, t.f_2, -1)
                        setPlayerStorageValue(pid, t.h, -1)
                        doCreatureAddHealth(pid, getCreatureMaxHealth(pid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
                        doCreatureAddMana(pid, getCreatureMaxMana(pid))
                        doPlayerRemoveLethalConditions(pid)
                    end
                end
                return false
            end
            return false
        end
        return true
    end
]]></event>

I think the error is here
 
Back
Top