• 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

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,782
Solutions
31
Reaction score
2,286
Location
Sweden?
Hello,

well today i was bored, so thougt about making something bit exciting and this was the idea :p

Features:
  • Turrents attacks nearest target. [Ranges are configureable]
  • Damage, combat types and etc.. are also configurable
  • Monsters walk from point A to B
  • Etc...

Please post some feedback :p

78UUkEH.gif
 
Any missings params, you would like to see in the turrets config or is it hard to understand?
Code:
turrets = {
    startTurret = {
        combat = {
            [1] = {combatType = COMBAT_PHYSICALDAMAGE, dmgValues = {-10, -20}, magicEffect = CONST_ME_NONE, shootEffect = CONST_ANI_BOLT},
            [2] = {combatType = COMBAT_PHYSICALDAMAGE, dmgValues = {-30, -50}, magicEffect = CONST_ME_NONE, shootEffect = CONST_ANI_POWERBOLT},
            [3] = {combatType = COMBAT_PHYSICALDAMAGE, dmgValues = {-50, -70}, magicEffect = CONST_ME_NONE, shootEffect = CONST_ANI_INFERNALBOLT}
        },
        cfg = {
            [1] = {buildPrice = 60, sellPrice = 30, upgradePrice = 120, rangeX = 3, rangeY = 3, lookType = 129, colorId = 64, attackSpeed = 2000},
            [2] = {buildPrice = 120, sellPrice = 60, upgradePrice = 180, rangeX = 4, rangeY = 4, lookType = 129, colorId = 64, attackSpeed = 1500},
            [3] = {buildPrice = 180, sellPrice = 120, upgradePrice = 0, rangeX = 6, rangeY = 6, lookType = 129, colorId = 64, attackSpeed = 1000}
        }
    },

    warlockTurret = {}
}
 
I've already seen that system on some open tibia servers, but anyway good work :)

Missing attributes? You could add support for area attacks, for ex. turret that attacks like explosion runes.
 
Area Attacks, Conditions added to Attacks, Turrets that shoot only in a strait line (beam turrets), Turrets that AoE around themselves (UE Turrets).

Example:
Code:
turrets = {
   startTurret = {
     combat = {
       [1] = {combatType = COMBAT_PHYSICALDAMAGE, dmgValues = {-10, -20}, magicEffect = CONST_ME_NONE, shootEffect = CONST_ANI_BOLT},
       [2] = {combatType = COMBAT_PHYSICALDAMAGE, dmgValues = {-30, -50}, magicEffect = CONST_ME_NONE, shootEffect = CONST_ANI_POWERBOLT},
       [3] = {combatType = COMBAT_PHYSICALDAMAGE, dmgValues = {-50, -70}, magicEffect = CONST_ME_NONE, shootEffect = CONST_ANI_INFERNALBOLT}
     },
     cfg = { --targetType selfTarget = 0 targetClosest = 1, beam = 2
       [1] = {buildPrice = 60, sellPrice = 30, upgradePrice = 120, rangeX = 3, rangeY = 3, targetType="1", condition = false, lookType = 129, colorId = 64, attackSpeed = 2000},
       [2] = {buildPrice = 120, sellPrice = 60, upgradePrice = 180, rangeX = 4, rangeY = 4, targetType="1", condition = false, lookType = 129, colorId = 64, attackSpeed = 1500},
       [3] = {buildPrice = 180, sellPrice = 120, upgradePrice = 0, rangeX = 6, rangeY = 6, targetType="1", condition = false, lookType = 129, colorId = 64, attackSpeed = 1000}
     }
   },
}
 
Aura turrets which increase speed / bounty gained / damage etc.
Slow turrets, damage-over-time turrets and so on.
 
Aura turrets which increase speed / bounty gained / damage etc.
Slow turrets, damage-over-time turrets and so on.
Well i will do like @Flatlander, said that they can choose between AOE or onTarget attacks. Then if they want to slow turrets and etc... They can apply that on their own :p
 
Also forgot to metion, how should the window look like?
KEGcnvzlm.png
 
1. Change turret range to something like (width) (height) squares 3/3 instead of x/y, because it could confuse some people.
2. change attack speed to attack frequency per milliseconds
3. remove "-" in attack because its look like it will heal monster instead of dealing damage :p
 
1. Change turret range to something like (width) (height) squares 3/3 instead of x/y, because it could confuse some people.
2. change attack speed to attack frequency per milliseconds
3. remove "-" in attack because its look like it will heal monster instead of dealing damage :p
1. X and Y is not representing width and height. So no, i will leave it like that.
2. milliseconds are not possible, since onThink in the npc are minimum 1000 ms.
3. About the negative sign, i may change that.
 
I can't tKe this anymore, the computer is getting on today!

Kind Regards,
Eldin
 
Also forgot to metion, how should the window look like?
KEGcnvzlm.png

I'd replace Turret Range with:
Range SQM: 3x3 (I guess people know what SQM is as houses go by SQM)

Also I'd remove all the "Turrent ~word~" and just go by "~word~" as it says in the title and at the top "Turret - Turret information"

Overall this looks great. I always played TD games on Wc3 and other platforms, I love them.
Just make sure that another dialog window pops up when clicking upgrade, explaining the upgrades before upgrading.

GJ!
 
Build
rVwJrnrL_.png

Info:
00b96ED6.png


I'm using the same item, todo everything. Build turret, sell, upgrade and check info.
 
Anything you would like to add?

Code:
monsters = {
    waves = {-- WaveId, monsterName, monsterAmount
        [1] = {monsters = {{"Rat", 20}, {"Cave Rat", 10}}}
    },
    stats = {-- monsterName, "drop" coins, current Health + extraHealth, speed
        ["Rat"] = {coins = 5, extraHealth = 50, speed = 100}
    },
}
 
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,
        }
    }
}
 
Back
Top