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

Tower Of Defence Event

I would separate the config a bit to make it more logical, so you can re-use monsters etc:

Code:
monsters = {
    ["Rat"] = { -- monster id
        name     = "Rat",
        health     = 50,
        gold     = 5,
        speed     = 100,
    }
}

waves = {
    [1] = { -- wave id/wave level
        monsters = {
            [1] = {
                monster     = monsters["Rat"],
                quantity     = 10
            }
        },
        bonusUponCompletion = {
            gold     = 100,
            exp     = 150,
        }
    }
}
I like the monsters table, about the wave table. I'll take a extra look into it.
 
Thanks to @Limos walk function, i was able to make the monsters walk from Point A to B.
l_y_px2D8.gif
 
I have changed the way combat is done, instead use onThink. I use addEvent when the turret appear, so on that way the speed which is configure on the turret can be different for each turret.
Now we got virtual coins, when you kill you get +5 as you see. But you can configure different for each creature.
Also when you have killed alot, your done with the wave, you will advance to the next one and also can configure how long until it starts.

gc0he_3JK.gif
 
Here is the table to configure waves and monsters. Also wanna thank @Ninja for the help, how the table layout should look and the summoning of the monsters.

Code:
monsters = {-- monsterName, "drop" coins, current Health + extraHealth, speed
    ["Rat"] = {
        coins = 5,
        extraHealth = 50,
        speed = 100
    },
    ["Cave Rat"] = {
        coins = 5,
        extraHealth = 50,
        speed = 100
    }
}

waves = {
    maxWaveLevel = 3,
    [1] = {
        interval = 1000,
        goldBonus = 100,
        expBonus = 200,
        monsters = {
            {name = "Rat", count = 5, interval = 500}
        }
    },
    [2] = {
        interval = 1000,
        goldBonus = 150,
        expBonus = 3000,
        monsters = {
            {name = "Cave Rat", count = 10, interval = 500}
        }
    },
    [3] = {
        interval = 1000,
        goldBonus = 300,
        expBonus = 500,
        monsters = {
            {name = "Rat", count = 10, interval = 500},
            {name = "Cave Rat", count = 10, interval = 500}
        }
    }
}
 
Seems interesting, I like it!
Is most of it only available in TFS 1+?
 
Let me know if you would like to chit chat about some of the game-design(not textures, logic) and/or coding parts.
I really like this idea and would love to help you out if you want to!
 
Let me know if you would like to chit chat about some of the game-design(not textures, logic) and/or coding parts.
I really like this idea and would love to help you out if you want to!
Well i'm 80+% done. I just need to configure upgrade, add 2 new turrets and what happens after you win.
 
One of the best events I ever seen to tibia, I love tower defense games.. Played it a looot as teenager!
Keep up this work :D
 
I'm done with the upgrade and sell turret:
NzU6cliWa.gif


The event is 95% done!
 
Every Turret Defense Game has resistances.

So you cannot just build 1 tower.

I haven't read everything, but I skimmed over it, and I don't think you have resistances in yet.
 
Back
Top