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

help with editing a mod

wikutag

SoulBound 8.6 100% custom
Joined
Dec 27, 2012
Messages
305
Reaction score
0
Location
United states Kentucky
I just got a 100% good rush script basicly team vs team. Can someone help me with it via teamviewer pplleeaasseee im confused af
Using tfs 0.3.6

pm me if you can help me
 
You want to implement it? Is that it? I'm no expert but maybe I can help. In any case, you are better off with another person so if you get the chance just go with someone else haha. (3 am, I can't write proper english. I'm sorry)
 
Idk wat to do lol can anyone help me I basicly got the cords for the players for the wait room and where they teleport to after enough players joined but I just wont use the command !start and the time it suppose to start doesn't work either
 
[Error - GlobalEvents::timer] Couldn't execute event: RushStart

Code:
<globalevent name="RushStart" time="18:46" event="script"><![CDATA[
        domodlib('re')
        function onTime(interval, lastExecution)
            setGlobalStorageValue(t.g, 1)
            setGlobalStorageValue(t.u, 0)
            setGlobalStorageValue(t.l, 0)
            setGlobalStorageValue(t.a, 1)
            setGlobalStorageValue(t.c, 0)
            setGlobalStorageValue(t.w, 0)
            doBroadcastMessage("Attention! Immediately register to Rush Event, event will start for 5 minutes. All players can join to event typing this command: !rush", MESSAGE_STATUS_WARNING)
            addEvent(function()
                doBroadcastMessage("Rush event, started in 2 minutes. If you want to join, type this command: !rush", MESSAGE_STATUS_WARNING)
            end, t.t-2 * 1000 * 60)
            addEvent(function()
                doBroadcastMessage("Rush event, started in a minute. If you want to join, type this command: !rush", MESSAGE_STATUS_WARNING)
            end, t.t-1 * 1000 * 60)
            addEvent(start, t.t * 1000 * 60, cid)
        end
        function results()
            if(getGlobalStorageValue(t.a) == 1) then
                local red = getGlobalStorageValue(t.l)
                local blue = getGlobalStorageValue(t.u)          
                doBroadcastMessage("Rush Events, results:\nRed Team scored: ".. red .." frags.\nBlue Team scored: ".. blue .." frags.\nMatch is under way to ".. t.v .." frags.", MESSAGE_STATUS_WARNING)
                addEvent(results, t.r * 1000 * 60)
            end
        end
        function start(cid)
            if(getGlobalStorageValue(t.a) == 1 and getGlobalStorageValue(t.c) >= t.mn) then
                doBroadcastMessage(t.q, MESSAGE_STATUS_WARNING)
                setGlobalStorageValue(t.w, 1)
                addEvent(results, t.r * 1000 * 60)
                for _, pid in ipairs(getPlayersOnline()) do  
                    local myOutfit = getCreatureOutfit(pid)
                    local red = {lookType = myOutfit.lookType, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = myOutfit.lookAddons}
                    local blue = {lookType = myOutfit.lookType, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = myOutfit.lookAddons}  
                    if getPlayerStorageValue(pid, t.f) == 1 then
                        doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
                        doCreatureAddMana(pid, getCreatureMaxMana(pid))
                        registerCreatureEvent(pid, "RushCombat")
                        registerCreatureEvent(pid, "RushAttack")
                        registerCreatureEvent(pid, "RushDead")
                        registerCreatureEvent(pid, "RushKill")
                        registerCreatureEvent(pid, "RushOutfit")
                        if((getPlayerStorageValue(pid, t.g) % 2) == 1) then
                            doCreatureChangeOutfit(pid, red)
                            doTeleportThing(pid, t.d_1)
                            setPlayerStorageValue(pid, t.f, 1)
                            setPlayerStorageValue(pid, t.f_1, 0)
                            setPlayerStorageValue(pid, t.f_2, 1)
                            doSendMagicEffect(getCreaturePosition(pid), 10)
                            doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "You are in RED TEAM!\nThis battle will continue up to ".. t.v .." frags!")
                        else
                            doCreatureChangeOutfit(pid, blue)
                            doTeleportThing(pid, t.d_2)
                            setPlayerStorageValue(pid, t.f, 1)
                            setPlayerStorageValue(pid, t.f_1, 1)
                            setPlayerStorageValue(pid, t.f_2, 0)
                            doSendMagicEffect(getCreaturePosition(pid), 10)
                            doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "You are in BLUE TEAM!\nThis battle will continue up to ".. t.v .." frags!")
                        end
                    end
                end
            elseif(getGlobalStorageValue(t.c) < t.mn) then
                doBroadcastMessage(t.x, MESSAGE_STATUS_WARNING)
                setGlobalStorageValue(t.a, 0)
                for _, pid in ipairs(getPlayersOnline()) do
                    if getPlayerStorageValue(pid, t.f) == 1 then
                        setPlayerStorageValue(pid, t.f, -1)
                        doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
                        doSendMagicEffect(getCreaturePosition(pid), CONST_ME_TELEPORT)
                    end
                end
            end
        end
And the !start doesn't execute or anything
Code:
<talkaction words="!start" event="script"><![CDATA[
    domodlib('re')
    function onSay(cid, words, param, channel)
        if getPlayerGroupId(cid) < 3 then
            setGlobalStorageValue(t.g, 1)
            setGlobalStorageValue(t.u, 0)
            setGlobalStorageValue(t.l, 0)
            setGlobalStorageValue(t.a, 1)
            setGlobalStorageValue(t.c, 0)
            setGlobalStorageValue(t.w, 0)
            doBroadcastMessage("Attention! Immediately register to Rush Event, event will start for 5 minutes. All players can join to event typing this command: !rush", MESSAGE_STATUS_WARNING)
            addEvent(function()
            doBroadcastMessage("Rush event, started in 2 minutes. If you want to join, type this command: !rush", MESSAGE_STATUS_WARNING)
            end, t.t-2 * 1000 * 60)
            addEvent(function()
            doBroadcastMessage("Rush event, started in a minute. If you want to join, type this command: !rush", MESSAGE_STATUS_WARNING)
            end, t.t-1 * 1000 * 60)
            addEvent(start, t.t * 1000 * 60, cid)
            return true
        end
        return true
    end
    function results()
        if(getGlobalStorageValue(t.a) == 1) then
            local red = getGlobalStorageValue(t.l)
            local blue = getGlobalStorageValue(t.u)           
            doBroadcastMessage("Rush Events, results:\nRed Team scored: ".. red .." frags.\nBlue Team scored: ".. blue .." frags.\nMatch is under way to ".. t.v .." frags.", MESSAGE_STATUS_WARNING)
            addEvent(results, t.r * 1000 * 60)
        end
    end
    function start(cid)
        if(getGlobalStorageValue(t.a) == 1 and getGlobalStorageValue(t.c) >= t.mn) then
            doBroadcastMessage(t.q, MESSAGE_STATUS_WARNING)
            setGlobalStorageValue(t.w, 1)
            addEvent(results, t.r * 1000 * 60)
            for _, pid in ipairs(getPlayersOnline()) do   
                local myOutfit = getCreatureOutfit(pid)
                local red = {lookType = myOutfit.lookType, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94, lookTypeEx = 0, lookAddons = myOutfit.lookAddons}
                local blue = {lookType = myOutfit.lookType, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = myOutfit.lookAddons}   
                if getPlayerStorageValue(pid, t.f) == 1 then
                    doCreatureAddHealth(pid, getCreatureMaxHealth(pid))
                    doCreatureAddMana(pid, getCreatureMaxMana(pid))
                    registerCreatureEvent(pid, "RushCombat")
                    registerCreatureEvent(pid, "RushAttack")
                    registerCreatureEvent(pid, "RushDead")
                    registerCreatureEvent(pid, "RushKill")
                    registerCreatureEvent(pid, "RushOutfit")
                    if((getPlayerStorageValue(pid, t.g) % 2) == 1) then
                        doCreatureChangeOutfit(pid, red)
                        doTeleportThing(pid, t.d_1)
                        setPlayerStorageValue(pid, t.f, 1)
                        setPlayerStorageValue(pid, t.f_1, 0)
                        setPlayerStorageValue(pid, t.f_2, 1)
                        doSendMagicEffect(getCreaturePosition(pid), 10)
                        doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "You are in RED TEAM!\nThis battle will continue up to ".. t.v .." frags!")
                    else
                        doCreatureChangeOutfit(pid, blue)
                        doTeleportThing(pid, t.d_2)
                        setPlayerStorageValue(pid, t.f, 1)
                        setPlayerStorageValue(pid, t.f_1, 1)
                        setPlayerStorageValue(pid, t.f_2, 0)
                        doSendMagicEffect(getCreaturePosition(pid), 10)
                        doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "You are in BLUE TEAM!\nThis battle will continue up to ".. t.v .." frags!")
                    end
                end
            end
        elseif(getGlobalStorageValue(t.c) < t.mn) then
            doBroadcastMessage(t.x, MESSAGE_STATUS_WARNING)
            setGlobalStorageValue(t.a, 0)
            for _, pid in ipairs(getPlayersOnline()) do
                if getPlayerStorageValue(pid, t.f) == 1 then
                    setPlayerStorageValue(pid, t.f, -1)
                    doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
                    doSendMagicEffect(getCreaturePosition(pid), CONST_ME_TELEPORT)
                end
            end
        end
    end
]]></talkaction>
 
Back
Top Bottom