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

Lua [TFS 0.X] Dungeon System - Add a boss at end

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,458
Solutions
17
Reaction score
175
Location
Brazil
Hello guys, im using this system by @Xikini and trying to do a modification:


After kill all monsters inside a dungeon, must be created a boss so, after kill boss, player must be able to get reward and leave dungeon. Im facing problems on current code, like:

  • Monsters are being created 2x, so i need to kill 2 to count 1;
  • After kill monsters (boss still alive) i can get reward infinite times in chest;
  • Even after kill boss, i cant leave dungeon.

Can someone help me to fix code? Updated files are attached and i see no errors on console. Files related are attached to post.


LUA:
dungeon_system_config = {
    ---------------------------
    -- 45001 is a single dungeon, with multiple area's.
    -- since it is a single dungeon, the reward for all area's of this dungeon is the same.
    -- if area 1 is occupied, then player teleports to area 2.
    -- if area 2 is occupied, then it tries to goto area 3. if area 3 doesn't exist, player must wait for a dungeon to be empty.
    -- you can create only 1 area per dungeon if you want, or you can create infinite area's. Just depends on what you add into the table.
    [45001] = {
        timeout = 600, -- tempo de dungeon
        reward_itemid = 2160,
        reward_amount = 1,
        experience = 1000,
        boss = { "Undertaker", {x = 450, y = 970, z = 7} },
        area_info = {
            { {0}, {},
                { {x = 521, y = 993, z = 7}, {x = 397, y = 927, z = 7}, {x = 523, y = 999, z = 7} },
                {
                    {"Hydra", {x = 442, y = 947, z = 7}},
                    {"Medusa", {x = 409, y = 948, z = 7}}, -- you can add as many or as little monsters as you desire.
                    {"Serpent Spawn", {x = 414, y = 972, z = 7}},
                    {"Hydra", {x = 475, y = 969, z = 7}},
                    {"Medusa", {x = 423, y = 953, z = 7}},
                    {"Serpent Spawn", {x = 420, y = 974, z = 7}},
                    {"Hydra", {x = 498, y = 934, z = 7}},
                    {"Medusa", {x = 501, y = 961, z = 7}},
                    {"Serpent Spawn", {x = 501, y = 988, z = 7}},
                    {"Hydra", {x = 464, y = 984, z = 7}},
                    {"Medusa", {x = 454, y = 995, z = 7}},
                    {"Serpent Spawn", {x = 448, y = 942, z = 7}},
                    {"Hydra", {x = 480, y = 938, z = 7}},
                    {"Medusa", {x = 482, y = 962, z = 7}},
                    {"Serpent Spawn", {x = 432, y = 961, z = 7}},
                    {"Hydra", {x = 449, y = 980, z = 7}},
                    {"Medusa", {x = 473, y = 950, z = 7}},
                    {"Serpent Spawn", {x = 485, y = 972, z = 7}},
                    {"Hydra", {x = 477, y = 977, z = 7}},
                    {"Medusa", {x = 400, y = 942, z = 7}},
                    {"Serpent Spawn", {x = 423, y = 933, z = 7}},
                    {"Hydra", {x = 435, y = 955, z = 7}},
                    {"Medusa", {x = 418, y = 988, z = 7}},
                    {"Serpent Spawn", {x = 441, y = 989, z = 7}},
                    {"Hydra", {x = 466, y = 993, z = 7}},
                    {"Medusa", {x = 501, y = 979, z = 7}},
                    {"Serpent Spawn", {x = 508, y = 974, z = 7}},
                    {"Hydra", {x = 480, y = 960, z = 7}},
                    {"Medusa", {x = 448, y = 937, z = 7}},
                    {"Serpent Spawn", {x = 415, y = 962, z = 7}},
                    {"Hydra", {x = 424, y = 980, z = 7}},
                    {"Medusa", {x = 471, y = 980, z = 7}},
                    {"Serpent Spawn", {x = 425, y = 953, z = 7}},
                    {"Hydra", {x = 451, y = 973, z = 7}}
                }
            }, -- area 1 end   
        }
    },
 

Attachments

Solution
X
The way you worded this made me think that there was a huge problem. :lul
But it was your updated code giving the issue.

Alright, let's modify the original code to include a boss that spawns after all the other creatures have died.

and done. I posted it in the original thread.

The way you worded this made me think that there was a huge problem. :lul
But it was your updated code giving the issue.

Alright, let's modify the original code to include a boss that spawns after all the other creatures have died.

and done. I posted it in the original thread.

 
Solution
The way you worded this made me think that there was a huge problem. :lul
But it was your updated code giving the issue.

Alright, let's modify the original code to include a boss that spawns after all the other creatures have died.

and done. I posted it in the original thread.

Thanks bro, seems to work perfectly
 
Back
Top