• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Mods] Fire-Storm event

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1default [Mods] Fire-Storm event Dom Feb 22, 2015 11:15 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    hola usuarios de tibiaface

    bueno aqui le dejo el famoso evento de fire storm event

    primero tienen que ejecutar esta tabla en su phpadmin abren su base de datos y ejecutan esta tabla sql


    Código:
    DROP TABLE IF EXISTS `events`;
    CREATE TABLE IF NOT EXISTS `events` (
      `event_name` varchar(255) NOT NULL,
      `winner_name` varchar(255) NOT NULL,
      `won_item` varchar(255) NOT NULL,
      `time_win` bigint(20) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


    y luego añaden este mods en su carpeta mod t configuran


    Código:
    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="Fire_Storm_Event" version="3.0" author="CollocorpuseK" contact="otland.net" enabled="yes">

        <config name="config_fire_storm_event">
            <![CDATA[
                configFireStormEvent = {
                    storages = {
                        main = '13335', -- set free storage
                        player = '13336', -- set free storage
                        joining = '13337', -- set free storage
                        exhaust = '13338', -- set free storage
                        countEvent = '13339' -- set free storage
                    },
                 
                    position = {x=852 ,y=975,z=7}, -- position which player is teleported to
                    room = {
                        from = {x=851,y=974,z=7}, -- left top corner of event room
                        to = {x=873,y=996,z=7} -- right bottom corner of event room
                    },

                    rewards = {2472, 8982, 5785, 2365}, -- reward id which player can win (reward is random)
                    players = {
                        max = 50,
                        min = 2,
                        minLevel = 100
                    },

                    days = {
                        ['Tuesday'] = {'20:00:00'},
                        ['Thursday'] = {'18:37:00'},
                        ['Sunday'] = {'15:00:00'}
                    },

                    fireStormDelay = 1000, -- milisecond
                 

                    delayTime = 5.0, -- time in which players who joined to event are teleporting to teleport position
                    startEvent = 1, -- time from teleport to start event
                    text = 'To win and get a Rewards, stay as long as possible in the arena.'
                }

                fight = createConditionObject(CONDITION_INFIGHT)
                setConditionParam(fight, CONDITION_PARAM_TICKS, -1)
             
                y, x = 1, 1 -- don't change it
            ]]>
        </config>
     
        <lib name="lib_fire_storm_event">
            <![CDATA[
                function doStartFireStormEvent()
                    doSetStorage(configFireStormEvent.storages.joining, -1)
                 
                    if configFireStormEvent.players.min <= doCountPlayersFireStormEvent() then     
                        for _, cid in ipairs(getPlayersOnline()) do
                            if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                                doCreatureSetNoMove(cid, false)
                                doRemoveCondition(cid, CONDITION_INFIGHT)
                                doTeleportThing(cid, configFireStormEvent.position)
                                doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
                             
                                doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Get ready. Fire Storm starts in '..configFireStormEvent.startEvent..' seconds.')
                            end
                        end
                     
                        addEvent(doSetStorage, configFireStormEvent.startEvent * 1000, configFireStormEvent.storages.main, 1)
                        addEvent(doRepeatCheckFireStorm, configFireStormEvent.startEvent * 1000 + 2000)
                     
                        doBroadcastMessage('Fire Storm has started. LET\'S GO!')
                    else
                        for _, cid in ipairs(getPlayersOnline()) do
                            if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                                doCreatureSetNoMove(cid, false)
                                doRemoveCondition(cid, CONDITION_INFIGHT)
                            end
                        end
                     
                        doBroadcastMessage('Fire Storm hasn\'t started beacuse there were not enough players.')
                    end
                end
             
                function doRepeatCheckFireStorm()
                    if getStorage(configFireStormEvent.storages.main) > 0 then
                        local xTable, yTable, playerTable = {}, {}, {}

                        for x = configFireStormEvent.room.from.x, configFireStormEvent.room.to.x do
                            for y = configFireStormEvent.room.from.y, configFireStormEvent.room.to.y do
                                table.insert(xTable, x)
                                table.insert(yTable, y)

                                local n, i = getTileInfo({x=x, y=y, z=configFireStormEvent.room.to.z}).creatures, 1
                                if n ~= 0 then
                                    local v = getThingfromPos({x=x, y=y, z=configFireStormEvent.room.to.z, stackpos=i}).uid
                                    while v ~= 0 do
                                        if isPlayer(v) then
                                            table.insert(playerTable, v)
                                            if n == #playerTable then
                                                break
                                            end
                                        end
                                        i = i + 1
                                        v = getThingfromPos({x=x, y=y, z=configFireStormEvent.room.to.z, stackpos=i}).uid
                                    end
                                end
                            end
                        end

                        if #playerTable == 1 then
                            local prize = math.random(#configFireStormEvent.rewards)
                            doCreatureAddHealth(playerTable[1], getCreatureMaxHealth(playerTable[1]) - getCreatureHealth(playerTable[1]))
                            doCreatureAddMana(playerTable[1], getCreatureMaxMana(playerTable[1]) - getCreatureMana(playerTable[1]))
                            doTeleportThing(playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])), true)
                            doPlayerAddItem(playerTable[1], configFireStormEvent.rewards[prize], 1)
                            doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win! You have received ' .. getItemNameById(configFireStormEvent.rewards[prize]) .. ' as reward.')
                            doBroadcastMessage('Fire Storm has finished. The winner is ' .. getCreatureName(playerTable[1]) .. '. Congratulations.')
                            doSetStorage(configFireStormEvent.storages.main, -1)
                         
                            db.executeQuery("INSERT INTO `events` (`event_name`, `winner_name`, `won_item`, `time_win`) VALUES (\"Fire\", \"" .. getCreatureName(playerTable[1]) .. "\", \"" .. getItemNameById(configFireStormEvent.rewards[prize]) .. "\", " .. getStorage(configFireStormEvent.storages.countEvent) ..");")
                            doSetStorage(configFireStormEvent.storages.countEvent, getStorage(configFireStormEvent.storages.countEvent) + 1)
                         
                            x, y = 1, 1
                        elseif #playerTable > 1 then
                            for a = 1, y do
                                addEvent(
                                    function()
                                        local pos = {x=xTable[math.random(#xTable)], y=yTable[math.random(#yTable)], z=7}

                                        for _, player in ipairs(playerTable) do
                                            local pPos = getThingPos(player)
                                            if pPos.x == pos.x and pPos.y == pos.y and pPos.z == pos.z then
                                                doCreatureAddHealth(player, - getCreatureMaxHealth(player))
                                            end
                                        end
                                        doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)

                                        addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
                                        addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
                                    end,
                                    math.random(100,1000)
                                )
                            end
                            if x == 5 * y then
                                y = y + 1
                            end
                         
                            x = x + 1
                        else
                            doBroadcastMessage('No one survived the Fire Storm.')
                            doSetStorage(configFireStormEvent.storages.main, -1)                     
                            doSetStorage(configFireStormEvent.storages.countEvent, getStorage(configFireStormEvent.storages.countEvent) + 1)
                            x, y = 1, 1
                        end
                     
                        addEvent(doRepeatCheckFireStorm, configFireStormEvent.fireStormDelay)
                    end
                end
             
                function doCountPlayersFireStormEvent()
                    local x = 0
                    for _, cid in ipairs(getPlayersOnline()) do
                        if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                            x = x + 1
                        end
                    end
                    return x
                end
             
                function doStartCountingFireStormEvent(x)
                    if configFireStormEvent.delayTime-x > 0 then
                        doBroadcastMessage('Fire Storm will start in '..configFireStormEvent.delayTime-x..' minutes. You can join to the event by say "!fire join".')
                        addEvent(doStartCountingFireStormEvent, 60*1000, x+1)
                    end
                end
            ]]>
        </lib>
        <talkaction words="!fire" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")

                function onSay(cid, words, param)
                    if getStorage(configFireStormEvent.storages.joining) ~= 1 then
                        return doPlayerSendCancel(cid, 'Fire Storm hasn\'t started yet.')
                    elseif param == '' then
                        return doPlayerSendCancel(cid, 'Command param required (say: "!fire join" or "!fire leave.").')
                    elseif getPlayerLevel(cid) < configFireStormEvent.players.minLevel then
                        return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configFireStormEvent.players.minLevel..' level.')
                    elseif getTileInfo(getThingPos(cid)).protection ~= true then
                        return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
                    elseif exhaustion.check(cid, configFireStormEvent.storages.exhaust) ~= false then
                        return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configFireStormEvent.storages.exhaust)..' seconds to use this command again.')
                    end

                    if param == 'join' then
                        if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                            return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
                        elseif doCountPlayersFireStormEvent() == configFireStormEvent.players.max then
                            return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
                        end
                     
                        doCreatureSetNoMove(cid, true)
                        doPlayerPopupFYI(cid, configFireStormEvent.text)
                        doCreatureSetStorage(cid, configFireStormEvent.storages.player, 1)
                        doAddCondition(cid, fight)
                        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Fire Storm Event. You can\'t move until event start. Wait patiently for the event start.')
                        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Fire Storm Event.')
                    elseif param == 'leave' then
                        if getCreatureStorage(cid, configFireStormEvent.storages.player) <= 0 then
                            return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
                        end
                     
                        doCreatureSetNoMove(cid, false)
                        doRemoveCondition(cid, CONDITION_INFIGHT)
                        doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
                        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Fire Storm Event.')
                    end
                 
                    exhaustion.set(cid, configFireStormEvent.storages.exhaust, 5)
                 
                    return true
                end
            ]]>
        </talkaction>
     
        <talkaction words="!startfire" access="5" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
                domodlib("lib_fire_storm_event")

                function onSay(cid, words, param)
                    if getStorage(configFireStormEvent.storages.main) > 0 then
                        return doPlayerSendCancel(cid, 'Fire Storm Event is already running.')
                    end
             
                    doStartCountingFireStormEvent(0)
                 
                    for _, pid in ipairs(getPlayersOnline()) do
                        if getCreatureStorage(pid, configFireStormEvent.storages.player) > 0 then
                            doCreatureSetStorage(pid, configFireStormEvent.storages.player, -1)
                            doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
                        end
                    end
                 
                    doSetStorage(configFireStormEvent.storages.joining, 1)
                    addEvent(doStartFireStormEvent, configFireStormEvent.delayTime * 60 * 1000)
                    return true
                end
            ]]>
        </talkaction>

        <globalevent name="Fire_Storm_Event_Days" interval="1000" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
                domodlib("lib_fire_storm_event")

                local daysOpen = {}         
                for k, v in pairs(configFireStormEvent.days) do
                    table.insert(daysOpen, k)
                end
             
                function onThink(interval)
                    if isInArray(daysOpen, os.date('%A')) then
                        if isInArray(configFireStormEvent.days[os.date('%A')], os.date('%X', os.time())) then
                            if getStorage(configFireStormEvent.storages.joining) ~= 1 then
                                doStartCountingFireStormEvent(0)
                             
                                for _, pid in ipairs(getPlayersOnline()) do
                                    if getCreatureStorage(pid, configFireStormEvent.storages.player) > 0 then
                                        doCreatureSetStorage(pid, configFireStormEvent.storages.player, -1)
                                        doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)), true)
                                    end
                                end
                             
                                doSetStorage(configFireStormEvent.storages.joining, 1)
                                addEvent(doStartFireStormEvent, configFireStormEvent.delayTime * 60 * 1000)
                            end
                        end
                    end
                    return true
                end
            ]]>
        </globalevent>

        <event type="statschange" name="Fire_Storm_Event_Dead" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")

                function onStatsChange(cid, attacker, type, combat, value)
                    if type == 1 and getCreatureHealth(cid) <= value then
                        if isInRange(getThingPos(cid), configFireStormEvent.room.from, configFireStormEvent.room.to) then
                            doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
                            doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
                            doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                            doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You loss.')
                            return false
                        end
                    end
                    return true
                end
            ]]>
        </event>
     
        <event type="login" name="Fire_Storm_Event_Login" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")
         
                function onLogin(cid)
                    if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
                        doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
                        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
                        doCreatureSetNoMove(cid, false)
                        doRemoveCondition(cid, CONDITION_INFIGHT)
                    end

                    registerCreatureEvent(cid, 'Fire_Storm_Event_Dead')
                    return true
                end
            ]]>
        </event>
     
        <globalevent name="Fire_Storm_Event_Start" type="startup" event="script">
            <![CDATA[
                domodlib("config_fire_storm_event")

                function onStartup()
                    doSetStorage(configFireStormEvent.storages.main, -1)
                    doSetStorage(configFireStormEvent.storages.joining, -1)
                    return true
                end
            ]]>
        </globalevent>
    </mod>

    zona configurable

    Código:

    position = {x=852 ,y=975,z=7}, -- position which player is teleported to
                    room = {
                        from = {x=851,y=974,z=7}, -- left top corner of event room
                        to = {x=873,y=996,z=7} -- right bottom corner of event room
                    },

                    rewards = {2472, 8982, 5785, 2365}, -- reward id which player can win (reward is random)




    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    2default Re: [Mods] Fire-Storm event Vie Mar 06, 2015 1:59 pm

    maper1

    maper1
    Miembro
    Miembro
    esto sirve para tfs 1.0 ?

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes

    3default Re: [Mods] Fire-Storm event Vie Mar 06, 2015 2:08 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:esto sirve para tfs 1.0 ?


    no lo lamento se tendria que modificar el script por separado para que funcione



    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    4default Re: [Mods] Fire-Storm event Vie Mar 06, 2015 2:11 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:esto sirve para tfs 1.0 ?


    no es compatible con tfs 1.0



    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    5default Re: [Mods] Fire-Storm event Vie Mar 06, 2015 2:24 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:esto sirve para tfs 1.0 ?


    noe s compatible con tfs 1.0



    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    6default Re: [Mods] Fire-Storm event Vie Mar 06, 2015 6:02 pm

    maper1

    maper1
    Miembro
    Miembro
    ok gracias...

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes

    7default Re: [Mods] Fire-Storm event Vie Mayo 15, 2015 2:42 pm

    Juan Carlos

    Juan Carlos
    Miembro
    Miembro
    y para el 1.1 xD??

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    http://dybbuk.jimdo.com/

    8default Re: [Mods] Fire-Storm event Vie Mayo 15, 2015 3:11 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:y para el 1.1 xD??

    hmm se tendria que hacer una traduccion completa del codigo para pasarlo a tfs 1.1 seria muy trabajoso pero no imposible



    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    9default Re: [Mods] Fire-Storm event Sáb Mayo 16, 2015 2:49 pm

    Juan Carlos

    Juan Carlos
    Miembro
    Miembro
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:y para el 1.1 xD??

    hmm se tendria que hacer una traduccion completa del codigo para pasarlo a tfs 1.1 seria muy trabajoso pero no imposible

    Gracias maya

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    http://dybbuk.jimdo.com/

    10default Re: [Mods] Fire-Storm event Mar Jun 28, 2016 4:06 pm

    God Aries

    God Aries
    Miembro
    Miembro
    sirve para tfs 0.3.7 ?

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes

    11default Re: [Mods] Fire-Storm event Vie Dic 01, 2017 1:45 pm

    Simon Marin

    Simon Marin
    Miembro
    Miembro
    Sirve para tfs 0.4?

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes

    12default Re: [Mods] Fire-Storm event Dom Mayo 09, 2021 9:09 pm

    ioke

    ioke
    Miembro
    Miembro
    no funciona.para tfs 0.4?

    error al.poner !fire join

    Código:
    > Broadcasted message: "Fire Storm will start in 1 minutes. You can join to the event by say "!fire join".".

    [3:6:13.650] [Error - TalkAction Interface]
    [3:6:13.650] domodlib("config_fire_storm_event")

    [3:6:13.650]            function onSay(cid, words, param)
    [3:6:13.666]                if getStorage(configFireStormEvent.storages.joining) ~= 1 then
    [3:6:13.666]                    return doPlayerSendCancel(cid, 'Fire Storm hasn\'t started yet.')
    [3:6:13.682]                elseif param == '' then
    [3:6:13.697]                    return doPlayerSendCancel(cid, 'Command param required (say: "!fire join" or "!fire leave.").')
    [3:6:13.728]                elseif getPlayerLevel(cid) < configFireStormEvent.players.minLevel then
    [3:6:13.744]                    return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configFireStormEvent.players.minLevel..' level.')
    [3:6:13.760]                elseif getTileInfo(getThingPos(cid)).protection ~= true then
    [3:6:13.775]                    return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
    [3:6:13.791]                elseif exhaustion.check(cid, configFireStormEvent.storages.exhaust) ~= false then
    [3:6:13.807]                    return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configFireStormEvent.storages.exhaust)..' seconds to use this command again.')
    [3:6:13.838]                end

    [3:6:13.838]                if param == 'join' then
    [3:6:13.853]                    if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
    [3:6:13.869]                        return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
    [3:6:13.885]                    elseif doCountPlayersFireStormEvent() == configFireStormEvent.players.max then
    [3:6:13.900]                        return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
    [3:6:13.916]                    end
    [3:6:13.916]
    [3:6:13.916]                    doCreatureSetNoMove(cid, true)
    [3:6:13.932]                    doPlayerPopupFYI(cid, configFireStormEvent.text)
    [3:6:13.932]                    doCreatureSetStorage(cid, configFireStormEvent.storages.player, 1)
    [3:6:13.947]                    doAddCondition(cid, fight)
    [3:6:13.963]                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Fire Storm Event. You can\'t move until event start. Wait patiently for the event start.')
    [3:6:13.994]                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Fire Storm Event.')
    [3:6:14.010]                elseif param == 'leave' then
    [3:6:14.025]                    if getCreatureStorage(cid, configFireStormEvent.storages.player) <= 0 then
    [3:6:14.041]                        return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
    [3:6:14.041]                    end
    [3:6:14.057]
    [3:6:14.057]                    doCreatureSetNoMove(cid, false)
    [3:6:14.072]                    doRemoveCondition(cid, CONDITION_INFIGHT)
    [3:6:14.088]                    doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
    [3:6:14.088]                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Fire Storm Event.')
    [3:6:14.103]                end
    [3:6:14.119]
    [3:6:14.119]                exhaustion.set(cid, configFireStormEvent.storages.exhaust, 5)
    [3:6:14.135]
    [3:6:14.135]                return true
    [3:6:14.135]            end
    [3:6:14.135] :onSay
    [3:6:14.150] Description:
    [3:6:14.150] data/lib/034-exhaustion.lua:8: field 'day' missing in date table
    [3:6:14.150] stack traceback:
    [3:6:14.166]    [C]: in function 'time'
    [3:6:14.166]    data/lib/034-exhaustion.lua:8: in function 'check'
    [3:6:14.166]    [string "LuaInterface::loadBuffer"]:12: in function <[string "LuaInterface::loadBuffer"]:3>

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    http://baiakciteron.sytes.net

    13default Re: [Mods] Fire-Storm event Lun Mayo 10, 2021 8:04 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:no funciona.para tfs 0.4?

    error al.poner !fire join

    Código:
    > Broadcasted message: "Fire Storm will start in 1 minutes. You can join to the event by say "!fire join".".

    [3:6:13.650] [Error - TalkAction Interface]
    [3:6:13.650] domodlib("config_fire_storm_event")

    [3:6:13.650]            function onSay(cid, words, param)
    [3:6:13.666]                if getStorage(configFireStormEvent.storages.joining) ~= 1 then
    [3:6:13.666]                    return doPlayerSendCancel(cid, 'Fire Storm hasn\'t started yet.')
    [3:6:13.682]                elseif param == '' then
    [3:6:13.697]                    return doPlayerSendCancel(cid, 'Command param required (say: "!fire join" or "!fire leave.").')
    [3:6:13.728]                elseif getPlayerLevel(cid) < configFireStormEvent.players.minLevel then
    [3:6:13.744]                    return doPlayerSendCancel(cid, 'You can\'t join to the event if you don\'t have a require '..configFireStormEvent.players.minLevel..' level.')
    [3:6:13.760]                elseif getTileInfo(getThingPos(cid)).protection ~= true then
    [3:6:13.775]                    return doPlayerSendCancel(cid, 'You can\'t join to the event if you aren\'t in protection zone.')
    [3:6:13.791]                elseif exhaustion.check(cid, configFireStormEvent.storages.exhaust) ~= false then
    [3:6:13.807]                    return doPlayerSendCancel(cid, 'You must wait '..exhaustion.get(cid, configFireStormEvent.storages.exhaust)..' seconds to use this command again.')
    [3:6:13.838]                end

    [3:6:13.838]                if param == 'join' then
    [3:6:13.853]                    if getCreatureStorage(cid, configFireStormEvent.storages.player) > 0 then
    [3:6:13.869]                        return doPlayerSendCancel(cid, 'You have arleady joined to event. Wait patiently for start.')
    [3:6:13.885]                    elseif doCountPlayersFireStormEvent() == configFireStormEvent.players.max then
    [3:6:13.900]                        return doPlayerSendCancel(cid, 'Max players in the event have been reached.')
    [3:6:13.916]                    end
    [3:6:13.916]
    [3:6:13.916]                    doCreatureSetNoMove(cid, true)
    [3:6:13.932]                    doPlayerPopupFYI(cid, configFireStormEvent.text)
    [3:6:13.932]                    doCreatureSetStorage(cid, configFireStormEvent.storages.player, 1)
    [3:6:13.947]                    doAddCondition(cid, fight)
    [3:6:13.963]                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have joined to Fire Storm Event. You can\'t move until event start. Wait patiently for the event start.')
    [3:6:13.994]                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have joined to Fire Storm Event.')
    [3:6:14.010]                elseif param == 'leave' then
    [3:6:14.025]                    if getCreatureStorage(cid, configFireStormEvent.storages.player) <= 0 then
    [3:6:14.041]                        return doPlayerSendCancel(cid, 'You can\'t leave from the event if you don\'t join.')
    [3:6:14.041]                    end
    [3:6:14.057]
    [3:6:14.057]                    doCreatureSetNoMove(cid, false)
    [3:6:14.072]                    doRemoveCondition(cid, CONDITION_INFIGHT)
    [3:6:14.088]                    doCreatureSetStorage(cid, configFireStormEvent.storages.player, -1)
    [3:6:14.088]                    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, 'You have left from the Fire Storm Event.')
    [3:6:14.103]                end
    [3:6:14.119]
    [3:6:14.119]                exhaustion.set(cid, configFireStormEvent.storages.exhaust, 5)
    [3:6:14.135]
    [3:6:14.135]                return true
    [3:6:14.135]            end
    [3:6:14.135] :onSay
    [3:6:14.150] Description:
    [3:6:14.150] data/lib/034-exhaustion.lua:8: field 'day' missing in date table
    [3:6:14.150] stack traceback:
    [3:6:14.166]    [C]: in function 'time'
    [3:6:14.166]    data/lib/034-exhaustion.lua:8: in function 'check'
    [3:6:14.166]    [string "LuaInterface::loadBuffer"]:12: in function <[string "LuaInterface::loadBuffer"]:3>

    si notas hay un problema con las funcion

    data/lib/034-exhaustion.lua:8: in function 'check'

    check que es la de exaustion quisas sea la forma que fue desarrollada si es para tfs o otx 2



    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    14default Re: [Mods] Fire-Storm event Lun Mayo 10, 2021 9:35 am

    ioke

    ioke
    Miembro
    Miembro
    gracias maya, encontre un sistema perfecto lo comparto por si a alguien mas le sirve yo uso tfs 0.4

    Código:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <mod name="Fire Storm Event" enabled="yes">
    <config name="fireStorm_conf"><![CDATA[
    fireStormRewards = {
                   random = false,
                   rew = {6527,1}
                   }
    fireStormShootInterval = 8 --in seconds
    fireStormNewFireShoots = 15
    fireStormBaseFireShoots = 40
    fireStormMaxPlayers = 50
    fireStormMinPlayers = 2
    fireStormAccesToIgnore = 7
    timeOnJoinToEvent = 3 --in minutes
     
    fireStormJoinType = 'booth' --movement, talkaction or booth
    enableMessage = true
     
    -- POSITIONS
    fireStormKickPosition = {x=159,y=51,z=7}
    fireStormEnterPosition = {x=206,y=367,z=7}
     
    fireStormCenterRoomPosition = {x=206,y=367,z=7}
    fireStormRangeX_RangeY = {30,30}
    -- STORAGES
    fireStormStorageStatus = 31000 -- =< 0 - off, 1 - waiting for players, 2 - is running
     
    local _f = doTeleportThing
    function doTeleportThing(cid, newpos, ignoreBlocking)
       return (ignoreBlocking or isWalkable(newpos, true, true, false) or false) and _f(cid, newpos, true, true)
    end
     
    function kickPlayerFromFireStormArea(cid)
       doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
       doTeleportThing(cid, fireStormKickPosition, true)
       doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
       return doCreatureSetStorage(cid, fireStormStorageStatus, 0) and doCreatureSetNoMove(cid, false)
    end
     
    function getFireStormEventPlayers()
       local players = {}
       for _, cid in pairs(getPlayersOnline()) do
          if getCreatureStorage(cid, fireStormStorageStatus) == 1 then
             table.insert(players, cid)
          end
       end
       return players
    end
     
    function isWalkable(pos, creature, proj, pz)
    if getTileThingByPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid == 0 then return false end
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
       pos.stackpos = i
       local tile = getTileThingByPos(pos)
          if tile.itemid ~= 0 and not isCreature(tile.uid) then
             if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
             end
          end
    end
    return true
    end
     
    function loseOnFireStorm(cid)
        local players, msg = getFireStormEventPlayers(), ''
        kickPlayerFromFireStormArea(cid)
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You are dead.')
        if(#getFireStormEventPlayers() <= 1) then
            local winner = getFireStormEventPlayers()[1] or players[1]
            if winner then
                if fireStormRewards.random then
                local i = math.random(#fireStormRewards.rew/2)
                doPlayerAddItem(winner, fireStormRewards.rew[i*2-1], fireStormRewards.rew[i*2], true)
             else
                for i = 1, #fireStormRewards.rew/2 do
                   doPlayerAddItem(winner, fireStormRewards.rew[i*2-1], fireStormRewards.rew[i*2], true)
                end
             end
             doPlayerSendTextMessage(winner, MESSAGE_INFO_DESCR, 'You won Fire Storm Event.')
                msg = getCreatureName(winner) .. ' won Fire Storm Event.'
                kickPlayerFromFireStormArea(winner)
             if getSpectators(fireStormCenterRoomPosition, fireStormRangeX_RangeY[1], fireStormRangeX_RangeY[2]) then
                for _, v in ipairs(getSpectators(fireStormCenterRoomPosition, fireStormRangeX_RangeY[1], fireStormRangeX_RangeY[2])) do
                   if isMonster(v) then
                      doRemoveThing(v)
                   elseif isPlayer(v) then
                      kickPlayerFromFireStormArea(v)
                   end
                end
             end
            else
                msg = 'Fire Storm Event finished! No one win!'
            end
          doSetStorage(fireStormStorageStatus, 0)
        end
    return (msg ~= '' and doBroadcastMessage(msg) or true)
    end
     
    function spawnNewFire(count, reserved)
    for i = 1, count do
       if getStorage(fireStormStorageStatus) <= 1 then
          return true
       end
       local pos = {x = fireStormCenterRoomPosition.x + math.random(-fireStormRangeX_RangeY[1],fireStormRangeX_RangeY[1]), y = fireStormCenterRoomPosition.y + math.random(-fireStormRangeX_RangeY[2],fireStormRangeX_RangeY[2]), z = fireStormCenterRoomPosition.z}
       if i == count then
          return addEvent(spawnNewFire, fireStormShootInterval*1000, fireStormNewFireShoots + reserved, fireStormNewFireShoots + reserved)
       end
       if isWalkable(pos, false, true, true) then
          addEvent(function()
                      if #getFireStormEventPlayers() < 1 then
                         return true
                      end
                      local xx = math.abs(pos.x - fireStormCenterRoomPosition.x) + fireStormRangeX_RangeY[1]
                      local yy = math.abs(pos.y - fireStormCenterRoomPosition.y) + fireStormRangeX_RangeY[2]
                      doSendDistanceShoot({x=pos.x-xx,y=pos.y-yy,z=pos.z}, pos, CONST_ANI_FIRE)
                      addEvent(doSendMagicEffect, math.max(xx,yy)*15, pos, CONST_ME_HITBYFIRE)
                      local player = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=STACKPOS_TOP_CREATURE}).uid
                      if isPlayer(player) and getPlayerAccess(player) < fireStormAccesToIgnore then
                         addEvent(loseOnFireStorm, 500, player)
                      end return true end,
                      math.random(500, fireStormShootInterval*1000),
                      pos)
       else
          return spawnNewFire(count-(i-1), math.max(reserved, count))
       end
    end
    return true
    end
     
    function addPlayerToFireStormArea(cid, block)
    doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
    doTeleportThing(cid, fireStormEnterPosition, true)
    doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
    return doCreatureSetStorage(cid, fireStormStorageStatus, 1) and doCreatureSetNoMove(cid, block)
    end
     
    function startFireStormEvent()
    if getStorage(fireStormStorageStatus) > 0 then
       return false
    end
    doSetStorage(fireStormStorageStatus, 1)
    return enableMessage and doBroadcastMessage('Fire Storm Event is active. We are waiting for ' .. fireStormMaxPlayers - #getFireStormEventPlayers() .. ' players or, if not found, '..timeOnJoinToEvent..' minutes to start. If you want joined to event just use command "!fire join", but if you would leave fire storm arena just say "!fire leave". Have fun!') or true
    end
    ]]></config>
     
    <talkaction words='!fire' event='script'><![CDATA[
    domodlib('fireStorm_conf')
    function onSay(cid, words, param, channel)
    if fireStormJoinType == 'movement' then
       return false end
    local msg = ''
    if isInArray({'join','add','go','joined'}, param:lower()) then
       if getCreatureCondition(cid, CONDITION_INFIGHT) and getPlayerAccess(cid) <= fireStormAccesToIgnore then
          return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a PZ! You have to get rid of it. Somehow.')
       end
       if getPlayerAccess(cid) >= fireStormAccesToIgnore then
          startFireStormEvent()
          return doTeleportThing(cid, fireStormEnterPosition, true)
       elseif #getFireStormEventPlayers() < fireStormMaxPlayers and getStorage(fireStormStorageStatus) == 1 then
          addPlayerToFireStormArea(cid, true)
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You are player of number '..#getFireStormEventPlayers()..', which join to event.')
          if #getFireStormEventPlayers() == fireStormMaxPlayers then
             doSetStorage(fireStormStorageStatus, 2)
             addEvent(spawnNewFire, fireStormShootInterval * 1000, fireStormBaseFireShoots, fireStormBaseFireShoots)
             for _, v in pairs(getFireStormEventPlayers()) do
                addPlayerToFireStormArea(v, false)
             end
             msg = 'Fire Storm Event is started. We have ' .. fireStormMaxPlayers .. ' players, which joined to event. Have fun!'
          else
             msg = getCreatureName(cid) .. ' has entered a Fire Storm Arena. We still need ' .. fireStormMaxPlayers - #getFireStormEventPlayers() .. ' players.'
          end
          return (msg ~= '' and doBroadcastMessage(msg) or true)
       else
          return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Arena is full.')
       end
    elseif isInArray({'leave','abort','delete'}, param:lower()) then
       if getStorage(fireStormStorageStatus) < 2 then
          doCreatureSetNoMove(cid, false)
          doCreatureSetStorage(cid, fireStormStorageStatus, 0)
          return doTeleportThing(cid, getCreatureLastPosition(cid), true)
       end
       return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can\'t leave from arena if event is already running.')
    end
    return true
    end
    ]]></talkaction>
     
    <globalevent name="fireStormTime" time="03:49" event="script"><![CDATA[
    domodlib("fireStorm_conf")
    function onTime(time)
       addEvent(function()
                      if getStorage(fireStormStorageStatus) == 2 then return true end
                      if getStorage(fireStormStorageStatus) == 1 and #getFireStormEventPlayers() >= fireStormMinPlayers then
                         doSetStorage(fireStormStorageStatus, 2)
                         addEvent(spawnNewFire, fireStormShootInterval * 1000, fireStormBaseFireShoots, fireStormBaseFireShoots)
                         for _, v in ipairs(getFireStormEventPlayers()) do
                            addPlayerToFireStormArea(v, false)
                         end
                         return enableMessage and doBroadcastMessage('Fire Storm Event is started. We have '..#getFireStormEventPlayers()..' players on area') or true
                      end
                      for _, v in ipairs(getFireStormEventPlayers()) do
                         kickPlayerFromFireStormArea(v)
                      end
                      return enableMessage and doBroadcastMessage('Fire Storm Event is stopped. We could not find enough players.') or true
                      end,
                      timeOnJoinToEvent * 1000 * 60)
       return startFireStormEvent()
    end
    ]]></globalevent>
    </mod>




    me.pueden decir porque ahora de repente le ha dado por poner error al evento si no he tocado anda y funcionaba perfecto

    Código:
    [Error - GlobalEvents::timer] Couldn't execute event: fireStormTime

    iba automatico muy bein todo y estos dias he visto que salia este error en la consola



    hola necesito ayuda con este evento, resulta que por mu ho que cambie el storage solo al usarse una vez ya a la.siguiente da el.error y tengo ke.volver a ponerle otro
    Código:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <mod name="Fire Storm Event" enabled="yes">
    <config name="fireStorm_conf"><![CDATA[
    fireStormRewards = {
                  random = false,
                  rew = {6527,1}
                  }
    fireStormShootInterval = 8 --in seconds
    fireStormNewFireShoots = 15
    fireStormBaseFireShoots = 40
    fireStormMaxPlayers = 50
    fireStormMinPlayers = 2
    fireStormAccesToIgnore = 7
    timeOnJoinToEvent = 3 --in minutes
     
    fireStormJoinType = 'booth' --movement, talkaction or booth
    enableMessage = true
     
    -- POSITIONS
    fireStormKickPosition = {x=159,y=51,z=7}
    fireStormEnterPosition = {x=206,y=367,z=7}
     
    fireStormCenterRoomPosition = {x=206,y=367,z=7}
    fireStormRangeX_RangeY = {30,30}
    -- STORAGES
    fireStormStorageStatus = 31000 -- =< 0 - off, 1 - waiting for players, 2 - is running
     
    local _f = doTeleportThing
    function doTeleportThing(cid, newpos, ignoreBlocking)
      return (ignoreBlocking or isWalkable(newpos, true, true, false) or false) and _f(cid, newpos, true, true)
    end
     
    function kickPlayerFromFireStormArea(cid)
      doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
      doTeleportThing(cid, fireStormKickPosition, true)
      doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
      return doCreatureSetStorage(cid, fireStormStorageStatus, 0) and doCreatureSetNoMove(cid, false)
    end
     
    function getFireStormEventPlayers()
      local players = {}
      for _, cid in pairs(getPlayersOnline()) do
          if getCreatureStorage(cid, fireStormStorageStatus) == 1 then
            table.insert(players, cid)
          end
      end
      return players
    end
     
    function isWalkable(pos, creature, proj, pz)
    if getTileThingByPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid == 0 then return false end
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
      pos.stackpos = i
      local tile = getTileThingByPos(pos)
          if tile.itemid ~= 0 and not isCreature(tile.uid) then
            if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
            end
          end
    end
    return true
    end
     
    function loseOnFireStorm(cid)
        local players, msg = getFireStormEventPlayers(), ''
        kickPlayerFromFireStormArea(cid)
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You are dead.')
        if(#getFireStormEventPlayers() <= 1) then
            local winner = getFireStormEventPlayers()[1] or players[1]
            if winner then
                if fireStormRewards.random then
                local i = math.random(#fireStormRewards.rew/2)
                doPlayerAddItem(winner, fireStormRewards.rew[i*2-1], fireStormRewards.rew[i*2], true)
            else
                for i = 1, #fireStormRewards.rew/2 do
                  doPlayerAddItem(winner, fireStormRewards.rew[i*2-1], fireStormRewards.rew[i*2], true)
                end
            end
            doPlayerSendTextMessage(winner, MESSAGE_INFO_DESCR, 'You won Fire Storm Event.')
                msg = getCreatureName(winner) .. ' won Fire Storm Event.'
                kickPlayerFromFireStormArea(winner)
            if getSpectators(fireStormCenterRoomPosition, fireStormRangeX_RangeY[1], fireStormRangeX_RangeY[2]) then
                for _, v in ipairs(getSpectators(fireStormCenterRoomPosition, fireStormRangeX_RangeY[1], fireStormRangeX_RangeY[2])) do
                  if isMonster(v) then
                      doRemoveThing(v)
                  elseif isPlayer(v) then
                      kickPlayerFromFireStormArea(v)
                  end
                end
            end
            else
                msg = 'Fire Storm Event finished! No one win!'
            end
          doSetStorage(fireStormStorageStatus, 0)
        end
    return (msg ~= '' and doBroadcastMessage(msg) or true)
    end
     
    function spawnNewFire(count, reserved)
    for i = 1, count do
      if getStorage(fireStormStorageStatus) <= 1 then
          return true
      end
      local pos = {x = fireStormCenterRoomPosition.x + math.random(-fireStormRangeX_RangeY[1],fireStormRangeX_RangeY[1]), y = fireStormCenterRoomPosition.y + math.random(-fireStormRangeX_RangeY[2],fireStormRangeX_RangeY[2]), z = fireStormCenterRoomPosition.z}
      if i == count then
          return addEvent(spawnNewFire, fireStormShootInterval*1000, fireStormNewFireShoots + reserved, fireStormNewFireShoots + reserved)
      end
      if isWalkable(pos, false, true, true) then
          addEvent(function()
                      if #getFireStormEventPlayers() < 1 then
                        return true
                      end
                      local xx = math.abs(pos.x - fireStormCenterRoomPosition.x) + fireStormRangeX_RangeY[1]
                      local yy = math.abs(pos.y - fireStormCenterRoomPosition.y) + fireStormRangeX_RangeY[2]
                      doSendDistanceShoot({x=pos.x-xx,y=pos.y-yy,z=pos.z}, pos, CONST_ANI_FIRE)
                      addEvent(doSendMagicEffect, math.max(xx,yy)*15, pos, CONST_ME_HITBYFIRE)
                      local player = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=STACKPOS_TOP_CREATURE}).uid
                      if isPlayer(player) and getPlayerAccess(player) < fireStormAccesToIgnore then
                        addEvent(loseOnFireStorm, 500, player)
                      end return true end,
                      math.random(500, fireStormShootInterval*1000),
                      pos)
      else
          return spawnNewFire(count-(i-1), math.max(reserved, count))
      end
    end
    return true
    end
     
    function addPlayerToFireStormArea(cid, block)
    doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
    doTeleportThing(cid, fireStormEnterPosition, true)
    doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
    return doCreatureSetStorage(cid, fireStormStorageStatus, 1) and doCreatureSetNoMove(cid, block)
    end
     
    function startFireStormEvent()
    if getStorage(fireStormStorageStatus) > 0 then
      return false
    end
    doSetStorage(fireStormStorageStatus, 1)
    return enableMessage and doBroadcastMessage('Fire Storm Event is active. We are waiting for ' .. fireStormMaxPlayers - #getFireStormEventPlayers() .. ' players or, if not found, '..timeOnJoinToEvent..' minutes to start. If you want joined to event just use command "!fire join", but if you would leave fire storm arena just say "!fire leave". Have fun!') or true
    end
    ]]></config>
     
    <talkaction words='!fire' event='script'><![CDATA[
    domodlib('fireStorm_conf')
    function onSay(cid, words, param, channel)
    if fireStormJoinType == 'movement' then
      return false end
    local msg = ''
    if isInArray({'join','add','go','joined'}, param:lower()) then
      if getCreatureCondition(cid, CONDITION_INFIGHT) and getPlayerAccess(cid) <= fireStormAccesToIgnore then
          return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a PZ! You have to get rid of it. Somehow.')
      end
      if getPlayerAccess(cid) >= fireStormAccesToIgnore then
          startFireStormEvent()
          return doTeleportThing(cid, fireStormEnterPosition, true)
      elseif #getFireStormEventPlayers() < fireStormMaxPlayers and getStorage(fireStormStorageStatus) == 1 then
          addPlayerToFireStormArea(cid, true)
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You are player of number '..#getFireStormEventPlayers()..', which join to event.')
          if #getFireStormEventPlayers() == fireStormMaxPlayers then
            doSetStorage(fireStormStorageStatus, 2)
            addEvent(spawnNewFire, fireStormShootInterval * 1000, fireStormBaseFireShoots, fireStormBaseFireShoots)
            for _, v in pairs(getFireStormEventPlayers()) do
                addPlayerToFireStormArea(v, false)
            end
            msg = 'Fire Storm Event is started. We have ' .. fireStormMaxPlayers .. ' players, which joined to event. Have fun!'
          else
            msg = getCreatureName(cid) .. ' has entered a Fire Storm Arena. We still need ' .. fireStormMaxPlayers - #getFireStormEventPlayers() .. ' players.'
          end
          return (msg ~= '' and doBroadcastMessage(msg) or true)
      else
          return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Arena is full.')
      end
    elseif isInArray({'leave','abort','delete'}, param:lower()) then
      if getStorage(fireStormStorageStatus) < 2 then
          doCreatureSetNoMove(cid, false)
          doCreatureSetStorage(cid, fireStormStorageStatus, 0)
          return doTeleportThing(cid, getCreatureLastPosition(cid), true)
      end
      return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can\'t leave from arena if event is already running.')
    end
    return true
    end
    ]]></talkaction>
     
    <globalevent name="fireStormTime" time="03:49" event="script"><![CDATA[
    domodlib("fireStorm_conf")
    function onTime(time)
      addEvent(function()
                      if getStorage(fireStormStorageStatus) == 2 then return true end
                      if getStorage(fireStormStorageStatus) == 1 and #getFireStormEventPlayers() >= fireStormMinPlayers then
                        doSetStorage(fireStormStorageStatus, 2)
                        addEvent(spawnNewFire, fireStormShootInterval * 1000, fireStormBaseFireShoots, fireStormBaseFireShoots)
                        for _, v in ipairs(getFireStormEventPlayers()) do
                            addPlayerToFireStormArea(v, false)
                        end
                        return enableMessage and doBroadcastMessage('Fire Storm Event is started. We have '..#getFireStormEventPlayers()..' players on area') or true
                      end
                      for _, v in ipairs(getFireStormEventPlayers()) do
                        kickPlayerFromFireStormArea(v)
                      end
                      return enableMessage and doBroadcastMessage('Fire Storm Event is stopped. We could not find enough players.') or true
                      end,
                      timeOnJoinToEvent * 1000 * 60)
      return startFireStormEvent()
    end
    ]]></globalevent>
    </mod>

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    http://baiakciteron.sytes.net

    15default Re: [Mods] Fire-Storm event Jue Oct 14, 2021 2:22 am

    Hadez

    Hadez
    Miembro
    Miembro
    hola esta chido el Evento ya lo puso no tiene ningun error pero cuando se inicia el evento no sale nada ni el fuego y la verdad no se
    creo q es x esto pero no se donde ponerlo y en donde va ayuda gracias

    DROP TABLE IF EXISTS `events`;
    CREATE TABLE IF NOT EXISTS `events` (
    `event_name` varchar(255) NOT NULL,
    `winner_name` varchar(255) NOT NULL,
    `won_item` varchar(255) NOT NULL,
    `time_win` bigint(20) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes

    16default Re: [Mods] Fire-Storm event Jue Oct 14, 2021 8:03 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:hola esta chido el Evento ya lo puso no tiene ningun error pero cuando se inicia el evento no sale nada ni el fuego y la verdad no se
    creo q es x esto pero no se donde ponerlo y en donde va ayuda gracias

    DROP TABLE IF EXISTS `events`;
    CREATE TABLE IF NOT EXISTS `events` (
    `event_name` varchar(255) NOT NULL,
    `winner_name` varchar(255) NOT NULL,
    `won_item` varchar(255) NOT NULL,
    `time_win` bigint(20) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    eso se va a su phpadmin en el xampp o colocando en la gestor web 127.0.0.1/phpmyadmin coloca sus datos de usuario y busca su base de datos ahi dentro ingresa a su base de dato y luego busca en el menu de arriba que le sale una pestaña llamada SQL ahi le mostrara un campo para pegar aquel codigo y ejcutarlo



    [Mods] Fire-Storm event YNU5B25
    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes
    https://www.tibiaface.com

    Contenido patrocinado


    +3
    Juan Carlos
    maper1
    [Admin] God Maya
    7 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).