potinho
Advanced OT User
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:
Can someone help me to fix code? Updated files are attached and i see no errors on console. Files related are attached to post.
Dungeon System
-> Multiple players can access a dungeon at a time, however only 1 player per sub-area.
-> Each dungeon can have unlimited sub-areas. Each sub-area can hold 1 player.
->-> If all sub-areas are full, players wanting to join this dungeon will have to wait until it's empty.
-> Each dungeon has their own reward scheme. (item and experience)
-> -> This means that every sub-area in that dungeon will have the same reward.
-> Everytime a player completes a dungeon, they get the reward. (They can access the dungeon infinite times, and get infinite rewards.)
-> Each dungeon is...
-> Multiple players can access a dungeon at a time, however only 1 player per sub-area.
-> Each dungeon can have unlimited sub-areas. Each sub-area can hold 1 player.
->-> If all sub-areas are full, players wanting to join this dungeon will have to wait until it's empty.
-> Each dungeon has their own reward scheme. (item and experience)
-> -> This means that every sub-area in that dungeon will have the same reward.
-> Everytime a player completes a dungeon, they get the reward. (They can access the dungeon infinite times, and get infinite rewards.)
-> Each dungeon is...
- Xikini
- Replies: 34
- Forum: Actions, MoveEvents & TalkActions
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
-
onUse_xikini_dungeon_system.lua1.7 KB · Views: 2 · VirusTotal
-
onStepIn_xikini_dungeon_system.lua6.3 KB · Views: 2 · VirusTotal
-
onLogin_xikini_dungeon_system.lua504 bytes · Views: 1 · VirusTotal