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

Zombie Event BETA! [Tfs 1.0] Vers: 0.5

I have only one question, which is marked in the picture, is where the teleport will be created?


teleport.jpg


thanks and regards
 
it doesn't create teleport when the event start you have to use !zombie to get teleported to the waiting room ;)
I dont even think its supposed to create a teleporter, you are supposed to put the actionID or uniqueID on a tile, or even put it on a teleporter.


Is there any problem with the zombies spawning? because I cant manage to get it to work, any suggestions? @Printer
 
I dont even think its supposed to create a teleporter, you are supposed to put the actionID or uniqueID on a tile, or even put it on a teleporter.


Is there any problem with the zombies spawning? because I cant manage to get it to work, any suggestions? @Printer

I know it isn't supposed to create a teleported that's what I tryd to say ;p

Did you add the zombie in your monster file?
data\monster\monsters.xml
Code:
    <monster name="Zombie_Event" file="Zombie_Event.xml"/>

data\monster\Zombie_Event.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Zombie" nameDescription="a zombie" race="undead" experience="0" speed="100" manacost="0">
    <health now="500" max="500"/>
    <look type="311" corpse="0"/>
    <targetchange interval="4000" chance="10"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" skill="9999999" attack="9999999"/>
    </attacks>
    <defenses armor="15" defense="15"/>
    <elements>
        <element firePercent="50"/>
    </elements>
    <immunities>
        <immunity death="1"/>
        <immunity energy="1"/>
        <immunity ice="1"/>
        <immunity earth="1"/>
        <immunity drown="1"/>
        <immunity drunk="1"/>
        <immunity lifedrain="1"/>
        <immunity paralyze="1"/>
    </immunities>
    <voices interval="5000" chance="10">
        <voice sentence="Mst.... klll...."/>
        <voice sentence="Whrrrr... ssss.... mmm.... grrrrl"/>
        <voice sentence="Dnnnt... cmmm... clsrrr...."/>
        <voice sentence="Httt.... hmnnsss..."/>
    </voices>
    <script>
            <event name="ZE_Mon_Death"/>
        </script>
</monster>
 
I know it isn't supposed to create a teleported that's what I tryd to say ;p

Did you add the zombie in your monster file?
data\monster\monsters.xml
Code:
    <monster name="Zombie_Event" file="Zombie_Event.xml"/>

data\monster\Zombie_Event.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Zombie" nameDescription="a zombie" race="undead" experience="0" speed="100" manacost="0">
    <health now="500" max="500"/>
    <look type="311" corpse="0"/>
    <targetchange interval="4000" chance="10"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="90"/>
        <flag runonhealth="0"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" skill="9999999" attack="9999999"/>
    </attacks>
    <defenses armor="15" defense="15"/>
    <elements>
        <element firePercent="50"/>
    </elements>
    <immunities>
        <immunity death="1"/>
        <immunity energy="1"/>
        <immunity ice="1"/>
        <immunity earth="1"/>
        <immunity drown="1"/>
        <immunity drunk="1"/>
        <immunity lifedrain="1"/>
        <immunity paralyze="1"/>
    </immunities>
    <voices interval="5000" chance="10">
        <voice sentence="Mst.... klll...."/>
        <voice sentence="Whrrrr... ssss.... mmm.... grrrrl"/>
        <voice sentence="Dnnnt... cmmm... clsrrr...."/>
        <voice sentence="Httt.... hmnnsss..."/>
    </voices>
    <script>
            <event name="ZE_Mon_Death"/>
        </script>
</monster>
Yeah I added the monster x'D
 
I feel so ashame when i see these old codes :p I could make the event faster, shorter, simple and more new functions. With the new functions, which tfs got :p But no time...
 
I feel so ashame when i see these old codes :p I could make the event faster, shorter, simple and more new functions. With the new functions, which tfs got :p But no time...
Just do it man, go crazy XD
 
Well, i can do it. But i won't be able to test it :p You guys have to test it instead ^^

What do you guys want to see?
Create teleport when event start?
Talkaction?
 
Well, i can do it. But i won't be able to test it :p You guys have to test it instead ^^

What do you guys want to see?
Create teleport when event start?
Talkaction?

Ooh 1 thing that I think could be added btw! Could you disable magic walls and those wild growth walls (if it's possible) because ppl can just trap themselfs and they will never loose then >.<

+ I want to test it!



This is how it looks atm

Waiting place
55q8hz.jpg


Zombie Event
The zombies you see are not monsters but items it's the places where you get tpt when you enter any of the teleports so ppl will think it's a zombie when they enter one of the teleports xd
kue03.jpg
 
Last edited:
Use imgland to upload the images. I can't view them.
 
Well, i can do it. But i won't be able to test it :p You guys have to test it instead ^^

What do you guys want to see?
Create teleport when event start?
Talkaction?
create teleport when the event starts is not necessary, and the magic wall & wild growth function would be a really nice idea actually.

I would love to test it :)
 
I have updated the codes, before i add new stuff. Can someone try them out? Also now it create a tp when zombie event start.
 
Can you post zombie_system.lua in pastebin.com

It seems you edited and did something wrong.
 
PHP:
-- Zombie Variables
zeZombieName = 'Zombie_Event' --Zombie Name
zombieSpawnInterval = 10 --how many seconds until a new zombie spawns
zeMaxZombies = 20 --max zombies in the arena?
zeJoinedCountGlobalStorage = 100 --Player joined event count

-- Players Variables
zeJoinStorage = 19999 --player join storage
zeMinPlayers = 1 --min players needed when time runout
zeMaxPlayers = 20 --max players to join
zeTrophy = 10139 --trophy itemid
zeJoinedCountGlobalStorage = 101 --Zombie spawned Count

-- Other Variables
zeWaitMinutes = 1 --when event has opened, how long until it starts?
zeWaitingRoomPos = Position(1550, 1911, 7) --middle of waiting room
zeZombieArena = Position(1322, 1917, 7) --when even start where should player be teleported in the zombie arena?
zeArenaFromPosition = Position(1288, y = 1890, z = 7) --pos of top left corner
zeArenaToPosition = Position(1342, y = 1923, z = 7) --pos of bottom right corner
zeMiddleZombieArena = Position(1315, y = 1905, z = 7) --Middle pos of the arena
zeWaitingRoomRadiusX = 20 --depends how big the waiting room is 20sqm to x
zeWaitingRoomRadiusY = 20 --depends how big the waiting room is 20sqm to y
zeZombieArenaRadiusX = 50 --Depends how big the zombie arena is 50sqm to x
zeZombieArenaRadiusY = 50 --Depends how big the zombie arena is 50sqm to y
zeStartedGlobalStorage = 102 -- Value: 0 == false, 1 == true, 2 == started
zeCreateTeleportPosition = Position(158, 54, 7) --Where should the teleport be created?

function startZombie()
    local specs = Game.getSpectators(zeWaitingRoomPos, false, true, 0, zeWaitingRoomRadiusX, 0, zeWaitingRoomRadiusY)
        if Game.getStorageValue(zeJoinedCountGlobalStorage) < zeMinPlayers then
            for i = 1, #specs do
                    specs[i]:teleportTo(specs[i]:getTown():getTemplePosition(), false)
                    specs[i]:setStorageValue(zeJoinStorage, 0)
            end
            resetVariables()
            Game.broadcastMessage('Zombie Event failed to start, because of to little players joined the event!', MESSAGE_STATUS_WARNING)
            return true
        end
        for i = 1, #specs do
            specs[i]:teleportTo(zeZombieArena)
        end
        Game.broadcastMessage("Zombie Event has started, good luck to all participant.", MESSAGE_STATUS_WARNING)
        Game.setStorageValue(zeStartedGlobalStorage, 2)
        doStartZombieEvasion()
end

function doSummonZombie()
        if Game.getStorageValue(zeZombieCountGlobalStorage) > zeMaxZombies then
            return false
        end
        local zombie = Game.createMonster(zeZombieName, {x = math.random(zeArenaFromPosition.x, zeArenaToPosition.x), y = math.random(zeArenaFromPosition.y, zeArenaToPosition.y), z = math.random(zeArenaFromPosition.z, zeArenaToPosition.z)})
        if zombie then
            Game.createMonster(zeZombieName, {x = math.random(zeArenaFromPosition.x, zeArenaToPosition.x), y = math.random(zeArenaFromPosition.y, zeArenaToPosition.y), z = math.random(zeArenaFromPosition.z, zeArenaToPosition.z)})
        end
        Game.setStorageValue(zeZombieCountGlobalStorage, Game.getStorageValue(zeZombieCountGlobalStorage) + 1)
end

function doStartZombieEvasion()
        if Game.getStorageValue(zeStartedGlobalStorage) == 2 then
               doSummonZombie()
            addEvent(doStartZombieEvasion, 5 * 1000)
        end
end

function resetVariables()
        Game.setStorageValue(zeJoinedCountGlobalStorage, 0)
        Game.setStorageValue(zeZombieCountGlobalStorage, 0)
        Game.setStorageValue(zeStartedGlobalStorage, 0)
end

function doClearZombieArena()
        local specs = Game.getSpectators(zeMiddleZombieArena, false, false, 0, zeZombieArenaRadiusX, 0, zeZombieArenaRadiusY)
        for i = 1, #specs do
            if specs[i]:getName() == zeZombieName then
                    specs[i]:remove()
            end
        end
end
 
Back
Top