Tallywa 35 Posted July 30, 2017 Share Posted July 30, 2017 Good evening, I have a little trouble with the tower of the demon. For now, my tower of the demon works normally, but after a time that is long or short the one if refuses to teleport the players after breaking the first metin and so do not go to the floor two I do not understand Why. Can you help me? Link to comment Share on other sites More sharing options...
Den 46 Posted July 30, 2017 Share Posted July 30, 2017 Paste your deviltower_zone quest here. Link to comment Share on other sites More sharing options...
Tallywa 35 Posted July 31, 2017 Author Share Posted July 31, 2017 quest deviltower_zone begin state start begin when login begin if pc.get_map_index() == 66 then if pc.get_x() < 2048+88 or pc.get_y() < 6656+577 or pc.get_x() > 2048+236 or pc.get_y() > 6656+737 then pc.warp((5376+530)*100, (512+591)*100, 65) end pc.set_warp_location(65, 5376+530, 512+591) elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then pc.set_warp_location(65, 5376+530, 512+591) end end ----------------------------------------------------- -- Garde de la tour : Entrer et sortir de la tour du démon -- ----------------------------------------------------- when deviltower_man.click with pc.get_map_index() == 65 begin if pc.get_level() < 40 then --- say_title("Le Garde de la Tour :") say("[ENTER]Il y a beaucoup de démons dans la tour, il vous") say("faut être courageux et fort. Malheureusement,") say("vous n'avez pas cette force ...") say("Revenez me voir une fois le niveau 40 atteint.[ENTER]") else --- say_title("Le Garde de la Tour :") say("[ENTER]Il y a beaucoup de démons dans la tour, il vous") say("faudra être courageux et fort. Aucune personne") say("n'a encore survécu dans la tour du démon.") say("Voulez-vous vraiment entrer ?[ENTER]") local s = select("Entrer","Ne pas Entrer") if s == 1 then pc.warp(216200,727100) end end end when deviltower_man.click with pc.get_map_index() == 66 begin --- say_title("Le Garde de la Tour :") say("[ENTER]Voulez-vous vraiment sortir de la tour du démon ?[ENTER]") local b =select("Sortir","Ne pas Sortir") if b == 1 then --- say_title("Le Garde de la Tour :") say("[ENTER]Une sage décision. Il est dangereux de rester") say("ici. Allez soigner vos blessures.[ENTER]") wait() pc.warp(590500, 110500) end end ------------------------------------ -- Tour du démon : Rez-de-chaussé -- ------------------------------------ when devil_stone1.kill begin timer("devil_stone1_1", 6) end ----------------------------- -- Tour du démon : Étage 1 -- ----------------------------- when devil_stone1_1.timer begin local mapto7= pc.count_item(30302) pc.remove_item(30302,mapto7) local boxto7= pc.count_item(30300) pc.remove_item(30300,boxto7) d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2]) d.regen_file("data/dungeon/deviltower2_regen.txt") d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt") end ----------------------------------------- -- Tour du démon : Étage 2 : Roi Démon -- ----------------------------------------- when devil_stone3.kill begin d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[3][1], special.devil_tower[3][2], "data/dungeon/deviltower4_regen.txt") d.check_eliminated() end ------------------------------------------------ -- Tour du démon : Étage 3 : Pierres de Metin -- ------------------------------------------------ function get_4floor_stone_pos() local positions = { {368, 629}, {419, 630}, {428, 653}, {422, 679}, {395, 689}, {369, 679}, {361, 658}, } for i = 1, 6 do local j = number(i, 7) if i != j then local t = positions; positions = positions[j]; positions[j] = t; end end return positions end when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin d.setf("level", 4) local positions = deviltower_zone.get_4floor_stone_pos() for i = 1, 6 do chat(positions[1], positions[2]) d.set_unique("fake" .. i , d.spawn_mob(8017, positions[1], positions[2])) end chat(positions[7][1], positions[7][2]) local vid = d.spawn_mob(8017, positions[7][1], positions[7][2]) chat(vid) d.set_unique("real", vid) server_loop_timer('devil_stone4_update', 10, pc.get_map_index()) server_timer('devil_stone4_fail1', 5*60, pc.get_map_index()) d.notice("Vous êtes devant la porte du choix au troisième"); d.notice("étage. Beaucoup de fausses Pierres trompent"); d.notice("vos sens. Trouvez la bonne Pierres et"); d.notice("détruisez la dans les 15 minutes qui suivent."); d.notice("C'est le seul moyen de franchir cette porte."); end when devil_stone4_fail1.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Il reste 10 minutes.") server_timer('devil_stone4_fail2', 5*60, get_server_timer_arg()) end end when devil_stone4_fail2.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Il reste 5 minutes.") server_timer('devil_stone4_fail', 5*60, get_server_timer_arg()) end end when devil_stone4_fail.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Temps écoulé!") d.exit_all() clear_server_timer('devil_stone4_update', get_server_timer_arg()) end end when devil_stone4_update.server_timer begin if d.select(get_server_timer_arg()) then if not d.is_unique_dead("real") then for i = 1, 6 do if d.getf("fakedead" .. i) == 0 then if d.unique_get_hp_perc("fake" .. i) < 50 then d.purge_unique("fake" .. i) d.setf("fakedead" .. i, 1) d.notice("Les fausses Pierres disparaissent."); end end end else server_timer("devil_stone4_end", 5, get_server_timer_arg()) d.notice("Vous avez fait la preuve de la finesse de votre") d.notice("ouie et de la sûreté de votre instinct. Vous avez") d.notice("détruit la vraie Pierre ! Vous allez") d.notice("maintenant atteindre le 4ème étage.") clear_server_timer('devil_stone4_fail1', get_server_timer_arg()) clear_server_timer('devil_stone4_fail2', get_server_timer_arg()) clear_server_timer('devil_stone4_fail', get_server_timer_arg()) end else server_timer('devil_stone4_stop_timer', 1, get_server_timer_arg()) end end when devil_stone4_stop_timer.server_timer begin clear_server_timer('devil_stone4_update', get_server_timer_arg()) end ------------------------------------------------- -- Tour du démon : Étage 4 : Les seaux anciens -- ------------------------------------------------- when devil_stone4_end.server_timer begin if d.select(get_server_timer_arg()) then d.setf("level", 5) d.setf("stone_count", 5) d.notice("Vous êtes à la porte scellée du quatrième étage.") d.notice("Vous devez ouvrir les 5 sceaux anciens pour") d.notice("accéder à l'étage supérieur. L'endroit est") d.notice("rempli de monstres prêts à vous sauter dessus.") d.notice("Certains d'entre eux ont une pierre d'ouverture") d.notice("sur eux. Récupérez suffisamment de pierres") d.notice("d'ouvertures afin d'ouvrir les 5 sceaux anciens") d.notice("et ainsi d'accéder au 5ème étage. Attention : ") d.notice("vous n'avez que 20 minutes ! ") d.jump_all(special.devil_tower[4][1], special.devil_tower[4][2]) server_timer('devil_stone5_fail1', 5*60, get_server_timer_arg()) clear_server_timer('devil_stone4_update', get_server_timer_arg()) d.set_regen_file("data/dungeon/deviltower5_regen.txt") d.spawn_mob(20073, 421, 452) d.spawn_mob(20073, 380, 460) d.spawn_mob(20073, 428, 414) d.spawn_mob(20073, 398, 392) d.spawn_mob(20073, 359, 426) end end when devil_stone5_fail1.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Il reste 15 minutes.") server_timer('devil_stone5_fail2', 5*60, get_server_timer_arg()) end end when devil_stone5_fail2.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Il reste 10 minutes.") server_timer('devil_stone5_fail3', 5*60, get_server_timer_arg()) end end when devil_stone5_fail3.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Il reste 5 minutes.") server_timer('devil_stone5_fail', 5*60, get_server_timer_arg()) end end when devil_stone5_fail.server_timer begin if d.select(get_server_timer_arg()) then d.notice("Temps écoulé!") d.exit_all() end end when 1062.kill begin if pc.in_dungeon() and d.getf("level") == 5 then local KILL_COUNT_FOR_DROP_KEY = 50 local n =d.getf("count") + 1 d.setf("count", n) if n == KILL_COUNT_FOR_DROP_KEY then game.drop_item(50084, 1) d.setf("count", 0) end end end when devil_stone5.take with item.vnum == 50084 begin npc.purge() item.remove() d.setf("stone_count", d.getf("stone_count") - 1) if d.getf("stone_count") <= 0 then d.setf("level", 6) d.clear_regen() d.setf("rd_kill", 0) d.regen_file("data/dungeon/deviltower6_regen.txt") d.notice("Vous avez réussi à desceller la pierre.") d.notice("Rendez vous maintenant au cinquième étage, ") d.notice("l'étage du roi des démons et tuez tous les") d.notice("monstres qui s'y trouvent.") d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2]) clear_server_timer('devil_stone5_fail1', get_server_timer_arg()) clear_server_timer('devil_stone5_fail2', get_server_timer_arg()) clear_server_timer('devil_stone5_fail3', get_server_timer_arg()) clear_server_timer('devil_stone5_fail', get_server_timer_arg()) else d.notice("Vous avez descellé la pierre ! Il en reste "..d.getf("stone_count").." .") end end ----------------------------------------------- -- Tour du démon : Étage 5 : Roi Démon Élite -- ----------------------------------------------- when 1092.kill begin d.setf("rd_kill", d.getf("rd_kill") + 1) if d.getf("rd_kill") < 16 then d.kill_all() d.check_eliminated() d.notice("Vous avez tué tous les monstres. En récompense") d.notice("vous obtenez une amélioration d'un de vos objets") d.notice("par le forgeron. Faites glisser l'objet que vous") d.notice("souhaitez améliorer sur le forgeron.") local reward_alchemist = {20074, 20075, 20076} d.spawn_mob(reward_alchemist[number(1,3)], 425, 216); d.setqf("can_refine", 1) elseif d.getf("rd_kill") == 16 then d.kill_all() d.check_eliminated() d.notice("*** ATTENTION ***") d.notice("Ceci est votre dernier RD.") d.notice("Les prochains RD seront PERDUS !") local reward_alchemist = {20074, 20075, 20076} d.spawn_mob(reward_alchemist[number(1,3)], 425, 216); d.setqf("can_refine", 1) elseif d.getf("rd_kill") > 16 then d.notice("*** ATTENTION ***") d.notice("Vous avez dépassé le quota de RD.") d.notice("Vous ne pouvez rien up.") d.notice("Les prochains RD seront PERDUS !") end end ------------------------------------------- -- Les Forgerons : Les étages supérieurs -- ------------------------------------------- when 20074.click or 20075.click or 20076.click begin if d.getf("parler")==0 then --- d.setf("parler", 1) say_title("Le Forgeron de la Tour :") say("[ENTER]Voulez-vous entrer au 6ème étage de la Tour ?") say("Il faut de grandes compétences et beaucoup") say("d'intelligence pour survivre à cet étage.") say("Seul les niveaux 75 et + peuvent y être") say("téléportés.[ENTER]") wait() if pc.level >=75 then --- say_title("Le Forgeron de la Tour :") say("[ENTER]Vous avez l'air bien expérimenté, donc je peux") say("vous téléporter à l'étage supérieur.") say("Voulez vous monter ?[ENTER]") local s=select("Oui, je suis prêt !", "Non ça ira") if s==1 then say_title("Le Forgeron de la Tour :") say("[ENTER]Soyez fort ! Bonne chance.[ENTER]") wait() d.notice("Le joueur " ..pc.name.. " a cliqué sur le Forgeron.") d.notice("Vous allez accéder à l'étage supérieur.") npc.purge() d.setf("parler", 0) timer("devil_jump_7", 6) else d.setf("parler", 0) end else --- say_title("Le Forgeron de la Tour :") say("[ENTER]Votre niveau n'est pas assez élevé.") say("Je ne peux pas vous autoriser à pénétrer dans") say("les étages supérieurs.") say("Revenez quand vous serez plus expérimenté.") say("Vous devez être au moins au niveau 75.[ENTER]") d.setf("parler", 0) end else say_title("Information.") say_reward("[ENTER]Le Forgeron est déjà en train de parler[ENTER]avec un de vos camarades.") say_reward("Peut-être sont-ils en train de négocier votre[ENTER]accession à l'étage suivant ![ENTER]") end end ----------------------------------------- -- Tour du démon : Étage 6 : Les Plans -- ----------------------------------------- when devil_jump_7.timer begin d.clear_regen() d.spawn_mob(8018, 639, 658) d.spawn_mob(8018, 639, 658) d.spawn_mob(8018, 611, 637) d.spawn_mob(8018, 611, 637) d.spawn_mob(8018, 596, 674) d.spawn_mob(8018, 596, 674) d.spawn_mob(8018, 629, 670) d.spawn_mob(8018, 629, 670) d.setf("level", 7) d.jump_all(2048+590, 6656+638) end when 8018.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin local cont = d.getf("7_stone_kill") + 1 d.setf("7_stone_kill", cont) if cont >= 4 then d.setf("7_stone_kill", 0) d.set_regen_file("data/dungeon/deviltower7_regen.txt") end end when 8019.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin -- Vieux coffre inconnu game.drop_item(30300, 1) end when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin pc.remove_item("30300", 1) local pct = number(1,10) if pct == 1 then -- Plan tour Zin-Sa-Gui (Vrai) game.drop_item(30302, 1) d.clear_regen() else -- Plan tour de Sa-Gui (Faux) game.drop_item(30301, 1) end end when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin --- say_title("Le Plan Zin-Sa-Gui.") say("[ENTER]Félicitations ! Vous avez réussi à trouver") say("le vrai Plan Zin-Sa-Gui ![ENTER]") pc.remove_item("30302", 1) timer("devil_jump_8", 6) d.clear_regen() end ---------------------------------------- -- Tour du démon : Étage 7 : Les Clés -- ---------------------------------------- when devil_jump_8.timer begin d.setf("level", 8) d.jump_all(2048+590, 6656+403) d.set_regen_file("data/dungeon/deviltower8_regen.txt") d.spawn_mob(20366, 640, 460) local _count= pc.count_item(30302) pc.remove_item(30302,_count) end when 1040.kill begin if pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then local pct1 = number(1, 5) if pct1 == 1 then local pct2 = number(1, 10) if pct2 == 1 then -- Clé de Zin-Bong (Vrai) game.drop_item(30304, 1) else -- Clé de Bong-In (Faux) game.drop_item(30303, 1) end else return end end end when 20366.take with item.vnum == 30304 begin npc.purge() item.remove() timer("devil_jump_9", 6) end ----------------------------------------- -- Tour du démon : Étage 8 : Faucheuse -- ----------------------------------------- when devil_jump_9.timer begin d.setf("level", 9) d.notice("Tuez le chef des démons.") d.jump_all(2048+590, 6656+155) d.regen_file("data/dungeon/deviltower9_regen.txt") end when 1093.kill begin if pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then if pc.get_skill_level(125)==1 then local s = number(1, 100) if s < 81 then pc.give_item2(30168, 1) end end d.kill_all() d.notice("Vous avez réussi la quête. Vous allez être"); d.notice("téléporté à l'extérieur dans quelques minutes."); d.notice("Je t'attendrai dans les Catacombes du Diable !"); d.notice("Suis-moi et ma colère s'abattra sur toi tel un"); d.notice("raz-de-marée !"); timer("devil_end_jump", 60) else if pc.get_skill_level(125)==1 then local s = number(1, 100) if s < 81 then pc.give_item2(30168, 1) end end end end when devil_end_jump.timer begin d.exit_all() end endend I have the same problem with the catacombs and purgatory. I get the impression that d.news_jump_all is bug. Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 2, 2017 Author Share Posted August 2, 2017 bump Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted August 2, 2017 Share Posted August 2, 2017 The part that starts the dungeon seems not to have problems(Even because you said that it work at least once). Maybe you changed the quest several times adding or removing things without cleaning the object directory, so i suggest to delete/clear it and recompile all quests you have(quest_list) and then retry Link to comment Share on other sites More sharing options...
Fr3zy94 59 Posted August 2, 2017 Share Posted August 2, 2017 Well remove the timer and put it direct. Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 4, 2017 Author Share Posted August 4, 2017 Le 02/08/2017 à 17:58, ElBrujoo a dit : The part that starts the dungeon seems not to have problems(Even because you said that it work at least once). Maybe you changed the quest several times adding or removing things without cleaning the object directory, so i suggest to delete/clear it and recompile all quests you have(quest_list) and then retry Hello, i have try with clean quest, but, same problem Le 02/08/2017 à 18:07, Fr3zy94 a dit : Well remove the timer and put it direct. I do that how? Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted August 5, 2017 Share Posted August 5, 2017 Ok, i'll test directly your quest today and let you know.. Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 5, 2017 Author Share Posted August 5, 2017 oki ty Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 6, 2017 Author Share Posted August 6, 2017 if i can help you, i have this error in sysserr after no tp : SYSERR: Aug 5 21:50:30 :: RunState: LUA_ERROR: [string "deviltower_zone"]:5: attempt to index global `d' (a number value) SYSERR: Aug 5 21:50:30 :: WriteRunningStateToSyserr: LUA_ERROR: quest deviltower_zone.start letter Link to comment Share on other sites More sharing options...
ElBrujoo 4 Posted August 8, 2017 Share Posted August 8, 2017 I have little time but soon i ll answer with the corrected quest. However reading your error i imagine what to correct: Spoiler when devil_stone1_1.timer begin local mapto7= pc.count_item(30302) pc.remove_item(30302,mapto7) local boxto7= pc.count_item(30300) pc.remove_item(30300,boxto7) d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2]) d.regen_file("data/dungeon/deviltower2_regen.txt") d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt") end keeping d new jump ALONE! then put the other dungeon(d) functions in another timer or when clause. In fact he says more or less that the dungeon still does not exist(when you try to call the d regen and d set warp). Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 9, 2017 Author Share Posted August 9, 2017 oki ty Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 11, 2017 Author Share Posted August 11, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 16, 2017 Author Share Posted August 16, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 18, 2017 Author Share Posted August 18, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 20, 2017 Author Share Posted August 20, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted August 21, 2017 Author Share Posted August 21, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted September 2, 2017 Author Share Posted September 2, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted October 27, 2017 Author Share Posted October 27, 2017 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted February 28, 2018 Author Share Posted February 28, 2018 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted March 4, 2018 Author Share Posted March 4, 2018 bump... Link to comment Share on other sites More sharing options...
Tallywa 35 Posted March 7, 2018 Author Share Posted March 7, 2018 bump Link to comment Share on other sites More sharing options...
Tallywa 35 Posted April 15, 2018 Author Share Posted April 15, 2018 bump Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted April 16, 2018 Premium Share Posted April 16, 2018 I think code is very ugly. First thing that i see: d.new_jump_all in a timer, should be ok, but remember when you use a timer it gonna start only from 1 Char, so is useless doing pc.remove_item() from a timer where use jump_all ........ Second thing: You use too many timers and awry functions. Explain better how happens the bug. Check on you first login... Link to comment Share on other sites More sharing options...
Tallywa 35 Posted June 11, 2018 Author Share Posted June 11, 2018 I will try to explain better. The first round works without problem. Then gradually, I can not go up, when I break the metin of the first level I do not go up, and those randomly. The first two days after a reboot, the tower goes up without worries, then after, it bug on the first level. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now