Problema fierar dt

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
ivanrobo
Nivel 2

Nivel 2
Mesaje: 150
Membru din: 27 Apr 2015, 21:46
Server: Aztec
Regat: Chunjo
Aprecieri: 12  
Mulţumiri: 0
Medalii

*Problemă:Salut, fierarul din dt cand pun de exemplu arma sau armura pe el imi zice in chat "Ti-ai primit deja recompensa". Nu stiu ce sa i fac.
Tipologie server:Pvm
*Resursă folosită:

Cod: Selectaţi tot

quest turnul_demonilor 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+532)*100, (512+596+4)*100, 65)
                end
                pc.set_warp_location(65, 5376+532, 512+596+4)
            elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
                pc.set_warp_location(65, 5376+532, 512+596+4)
            end
        end

      when logout begin
         pc.remove_item(30300, pc.count_item(30300))
         pc.remove_item(30301, pc.count_item(30301))
         pc.remove_item(30302, pc.count_item(30302))
      end
   when deviltower_man.chat. "Turnul Demonilor" begin
                if pc.get_level() < 40 then
                        say_title("Gardianul Turnului:")
                        say("")
                        ---                                                   l
                        say("Acest turn este plin de demoni.")
                        say("Doar cei puternici pot supravietui.")
                        say("Ce sa-ti spun..cine a intrat")
                        say("nu a mai iesit in viata.")
                        say("Nu poti sa intri pentru ca nu")
                        say("ai level 40 inca.")
                else
                        say_title("Gardianul Turnului:")
                        say("")
                        ---                                                   l
                        say("Acest turn este plin de demoni.")
                        say("Doar cei puternici pot supravietui.")
                        say("Ce sa-ti spun..cine a intrat")
                        say("nu a mai iesit in viata.")
                        say("Vrei sa intri in Turnul Demonilor?")
                        say("")
                        local s = select("Da.", "Nu.")
                        if s == 1 then
                                -- warp into!
                                pc.warp(216500,727000)
                        end
            end
        end
        when devil_stone1.kill begin
            timer("devil_stone1_1", 6)
        end
        when devil_stone1_1.timer begin
            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
        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
        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[i];
                    positions[i] = 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 = turnul_demonilor.get_4floor_stone_pos()
            for i = 1, 6 do
                chat(positions[i][1], positions[i][2])
                d.set_unique("fake" .. i , d.spawn_mob(8017, positions[i][1], positions[i][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("Ai ajuns la etajul 3.");
            d.notice("Multe pietre Metin false va irita ochii si urechile.");
            d.notice("Gaseste piatra Metin corecta si distruge-o in 15 minute");
            d.notice("Aceasta este singura modalitate de a trece acest etaj.");
            d.notice("");
        end

        when devil_stone4_fail1.server_timer begin
            if d.select(get_server_timer_arg()) then
                d.notice("Minute ramase: 10")
      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("Minute ramase: 5")
      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("Timpul a expirat.")
                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("Pietrele Metin false dispar...");
                            end
                        end
                    end
                else
                    server_timer("devil_stone4_end", 5, get_server_timer_arg())
                    d.notice("Ai dovedit ca ai un instinct bun.");
                    d.notice("Ai distrus piatra Metin corecta.")
          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

        when devil_stone4_end.server_timer begin
            if d.select(get_server_timer_arg()) then
         clear_server_timer('devil_stone4_update', get_server_timer_arg())
         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())

                d.setf("level", 5)
                d.setf("stone_count", 5)
                d.notice("Ai ajuns la Poarta cu numarul 5.")
                d.notice("La acest etaj multi monstrii pazesc Sigilile de Piatra,")
                d.notice("ce te vor ajuta sa treci la etajul 6.")
                d.notice("Unii monstrii au cheia ce te ajuta")
                d.notice("sa deschizi Sigiliul de Piatra.")
                d.notice("Deschide-le in cel mult 20 minute")
                d.notice("pentru a avansa la etajul 6.")
                d.notice("")
                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("Minute ramase: 15")
      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("Minute ramase: 10")
      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("Minute ramase: 5")
      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("Timpul a expirat.")
                d.exit_all()
            end
        end

        when 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin
            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
        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.regen_file("data/dungeon/deviltower6_regen.txt")

                d.notice("Ai deschis toate portile.")
                d.notice("Vei fi teleportat la etajul 6.")
                d.notice("Distruge toti monstrii din acest etaj,")
                d.notice("Si apoi Regele Demon.")
                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("Ai deschis Sigiliu! Mai ai inca "..d.getf("stone_count").."de deschis:")
            end
        end

        when devil_stone6.kill begin
            d.kill_all()
            d.check_eliminated()
            local reward_alchemist = {20074, 20075, 20076}
            d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
            d.setqf("can_refine", 1)
        end

   when 20074.chat."Despre ultimul etaj al Turnul Demonilor.." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.lock() begin
          say(""..mob_name(20074)..":")
          say("Fierari din Turnul Demonilor")
          say("Au gasit calea de a urca la etajul 7.")
          say("Este necesar un status si o abilitate buna de a urca.")
          say("Hmmmm...")
          say("Dupa ce am analizat starea voastra.....")
          wait()
          if pc.level >=75 then
          say(""..mob_name(20074)..":")
              say("Esti puternic pentru a urca.")
              say("Te voi lasa sa stii drumul..")
              timer("devil_jump_7", 6)
              npc.unlock()
              d.purge()
              return
          end
          say(""..mob_name(20074)..":")
          say("Ai nevoie de mai mult antrenament")
          say("pentru a merge acolo....")
          say("Intoarce-te cand ai destula experienta.")

      say("")
      wait()
      pc.warp(590500, 110500)
      return
       end
   when 20075.chat."Despre ultimul etaj al Turnul Demonilor.." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.lock() begin
         say(""..mob_name(20075)..":")
        say("Fierari din Turnul Demonilor")
          say("Au gasit calea de a urca la etajul 7.")
          say("Este necesar un status si o abilitate buna de a urca.")
          say("Hmmmm...")
          say("Dupa ce am analizat starea voastra.....")
          wait()
          if pc.level >=75 then
               say(""..mob_name(20075)..":") 
              say("Esti puternic pentru a urca.")
              say("Te voi lasa sa stii drumul..")
              timer("devil_jump_7", 6)
              npc.unlock()
              d.purge()
              return
          end
         say(""..mob_name(20075)..":") 
          say("Ai nevoie de mai mult antrenament")
          say("pentru a merge acolo....")
          say("Intoarce-te cand ai destula experienta.")
      say("")
      wait()
      pc.warp(590500, 110500)
      return
    end
   when 20076.chat."Despre ultimul etaj al Turnul Demonilor.." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 and npc.lock() begin
         say(""..mob_name(20076)..":")
          say("Fierari din Turnul Demonilor")
          say("Au gasit calea de a urca la etajul 7.")
          say("Este necesar un status si o abilitate buna de a urca.")
          say("Hmmmm...")
          say("Dupa ce am analizat starea voastra.....")
          wait()
          if pc.level >=75 then
               say(""..mob_name(20076)..":") 
              say("Esti puternic pentru a urca.")
              say("Te voi lasa sa stii drumul..")
              timer("devil_jump_7", 6)
              npc.unlock()
              d.purge()
              return
          end
         say(""..mob_name(20076)..":") 
          say("Ai nevoie de mai mult antrenament")
          say("pentru a merge acolo....")
          say("Intoarce-te cand ai destula experienta.")
      say("")
      wait()
      pc.warp(590500, 110500)
      return
       end

   when devil_jump_7.timer begin
      d.clear_regen()

      d.spawn_mob(8018, 639, 658)
      d.spawn_mob(8018, 611, 637)
      d.spawn_mob(8018, 596, 674)
      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
      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
         game.drop_item(30302, 1)
         d.clear_regen()
      else
         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
      -- 8ÃþÀ¸·Î ¿öÇÁ

         if d.getf( "level" ) != 7 then
            pc.remove_item( "30302", 1)
            return
         end
         
      say("Cu aceasta mapa poti urca mai sus!")
      pc.remove_item("30302", 1)
       timer("devil_jump_8", 6)
      d.clear_regen()
   end
                  
   --------------------------------------------
   -- 8Ãþ ÁøÀÔºÎÅÍ 9Ãþ ±îÁö
   --------------------------------------------
   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 with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      local pct1 = number(1, 5)

      if pct1 == 1 and d.getf("level") == 8 then
         local pct2 = number(1, 10)
         if pct2 == 1 then
            -- ÁøÂ¥ ¿­¼è µå·Ó
            game.drop_item(30304, 1)
         else
            -- °¡Â¥ ¿­¼è µå·Ó
            game.drop_item(30303, 1)
         end
      else
         return
      end
   end

   when 20366.take with item.vnum == 30304 begin
      -- ºÀÀÎ ÇØÃ¼ 9Ãþ ¤¡¤¡
      npc.purge()
      item.remove()
      timer("devil_jump_9", 6)
   end

   ---------------------------------------------
   -- 9Ãþ ÁøÀÔºÎÅÍ ¿Ï·á±îÁö
   ---------------------------------------------
   when devil_jump_9.timer begin
      d.setf("level", 9)
      d.jump_all(2048+590, 6656+155)
      d.regen_file("data/dungeon/deviltower9_regen.txt")
   end

   when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      chat("Ingerul a fost ucis")
      notice_all(""..pc.get_name().." a omorat Ingerul cu Coasa.")
      say_title("Bravo!")
      say("Felicitari,ai ucis diavolul.")
      say("O sa iti dau o recompensa : ")
      say_item(30319)
      pc.give_item2(30319)
      pc.give_item2(30319)
      pc.give_item2(30319)
      pc.give_item2(30319)
      d.kill_all()
      timer("devil_end_jump", 10)
   end
   
   when devil_end_jump.timer begin
      d.setf("level", 7)
      d.jump_all(2048+590, 6656+638)
      d.clear_regen()
      d.spawn_mob(1094, 639, 658)
   end
      
   when 1094.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      d.notice("Felicitari!")
      d.notice("Ai ucis soldatii regelui demon!")
      d.notice("Acum, veti ajunge la etajul urmator, Moartea Albastra!")
      d.kill_all()
      timer("devil_end_jump_schmied", 10)
      end

   when devil_end_jump_schmied.timer begin
      d.setf("level", 9)
      d.jump_all(2048+590, 6656+155)
      d.clear_regen()
      d.spawn_mob(1095, 605, 178)
   end
      
   when 1095.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
      notice_all(""..pc.get_name().." a omorat Moartea Albastra.")
      d.notice("Ai ucis Moartea Albastra!")
      d.notice("Ca o recompensa îti vor aparea toti cei 3 fierari din acest turn!")
      pc.give_item2(30320)
      pc.give_item2(30320)
      pc.give_item2(30320)
      end
   end
   end
Asta e Questul
*ServerFiles utilizat:
*Syserr:
Poză:
*Detalii suplimentare:
Avatar utilizator
ADMV1
Nivel 1

Nivel 1
Mesaje: 68
Membru din: 29 Oct 2016, 23:20
Server: Metin2Kiss
Regat: Jinno
Aprecieri: 8  
Mulţumiri: 0
 Contact:
Medalii

Poftim questu

quest deviltower_zone begin
state start begin
when login begin
if pc.get_map_index() == 66 then
-- Layer Range
-- 1F 88 577 236 737
-- 2F 91 343 238 504
-- 3F 104 107 248 269
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+532)*100, (512+596+4)*100, 65)
end
pc.set_warp_location(65, 5376+532, 512+596+4)
elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
pc.set_warp_location(65, 5376+532, 512+596+4)
end
end
when deviltower_man.chat.locale.deviltower_man_chat begin
if pc.get_level() < 40 then
say(locale.deviltower_man_say_you_cant)
else
say(locale.deviltower_man_say)
local s = select(locale.deviltower_enter,locale.deviltower_no_enter)
if s == 1 then
-- warp into!
pc.warp(216500,727000)
end
end
end
when devil_stone1.kill begin
timer("devil_stone1_1", 6)
end
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
--when devil_stone2.kill begin
--d.jump_all_local(special.devil_tower[2][1], special.devil_tower[2][2])
--end
when devil_stone3.kill begin
--d.jump_all_local(special.devil_tower[3][1], special.devil_tower[3][2])
--d.set_exit_all_at_eliminate(6)
--d.set_warp_at_eliminate(6, d.get_map_index(), 100, 100)
--d.set_warp_at_eliminate(4, 65, 5376+532, 512+596+4)
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()
--d.exit_all()
end
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
--for i = 1, 7 do
-- positions[1] = positions[1] * 100
-- positions[2] = positions[2] * 100
-- 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)
--d.regen_file("data/dungeon/deviltower4_regen.txt")
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("You are on 4th floor. Find the real Metin stone and destroy it.");
d.notice("You have 15 minutes to find real stone.");
end

when devil_stone4_fail1.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Remaining time: 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("Remaining time: 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("Time is up. You failed the mission!")
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("Fake stone disappeared.");
end
end
end
else
--d.clear_regen()
--d.regen_file("data/dungeon/deviltower5_regen.txt")
server_timer("devil_stone4_end", 5, get_server_timer_arg())
d.notice("Congratulations, you have found the right stone.");
d.notice("You will be teleported on the next floor.")
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

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("You are on 5th floor. Kill all monsters to found the key for the next level.")
d.notice("You have 20 minutes to find all 5 keys.")
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("Remaining time: 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("Remaining time: 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("Remaining time: 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("Time is up. You failed the mission.")
d.exit_all()
end
end

--when devil_stone4.kill begin
--d.setf("level", 5)
--d.setf("stone_count", 4)
--d.clear_regen()
--d.regen_file("data/dungeon/deviltower5_regen.txt")
--d.jump_all_local(special.devil_tower[4][1], special.devil_tower[4][2])
--end

when 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin
local KILL_COUNT_FOR_DROP_KEY = 50
--if is_test_server() then
--KILL_COUNT_FOR_DROP_KEY = 1
--end
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
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.regen_file("data/dungeon/deviltower6_regen.txt")

d.notice("Congratulations, you have open all the seals.")
d.notice("You will be teleported to the next floor.")
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("Seal open... Remaining "..d.getf("stone_count").." seals.")
end
end

when devil_stone6.kill begin
--d.jump_all(special.devil_tower[6][1], special.devil_tower[6][2])
d.kill_all()
-- d.set_warp_at_eliminate(3*60, 65, 5376+532, 512+596+4)
d.check_eliminated()
local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)
end

--------------------------------------
-- Level 7 / 8
--------------------------------------

when 20074.chat."The next floor" with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say_title(""..mob_name(20074).."")
say("You want to go at next level?")
say("But first I need to test you..")
say("Let's see..")
say("")
wait()
if pc.level >=75 then
say("")
say("You're lucky! You can pass!")
say("")
timer("devil_jump_7", 6)
return
end
say("")
say("I'm sorry. I can't let you pass!")
say("Your level it's to low.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when 20075.chat."The next floor" with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say_title(""..mob_name(20075).."")
say("You want to go at next level?")
say("But first I need to test you..")
say("Let's see..")
say("")
wait()
if pc.level >=75 then
say("")
say("You're lucky! You can pass!")
say("")
timer("devil_jump_7", 6)
return
end
say("")
say("I'm sorry. I can't let you pass!")
say("Your level it's to low.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when 20076.chat."The next floor" with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say_title(""..mob_name(20076).."")
say("You want to go at next level?")
say("But first I need to test you..")
say("Let's see..")
say("")
wait()
if pc.level >=75 then
say("")
say("You're lucky! You can pass!")
say("")
timer("devil_jump_7", 6)
return
end
say("")
say("I'm sorry. I can't let you pass!")
say("Your level it's to low.")
say("")
wait()
pc.warp(590500, 110500)
return
end

when devil_jump_7.timer begin
d.clear_regen()

d.spawn_mob(8018, 639, 658)
d.spawn_mob(8018, 611, 637)
d.spawn_mob(8018, 596, 674)
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
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
game.drop_item(30302, 1)
notice("You found the right key.")

d.clear_regen()
else
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("")
say("You will be teleported to next level. Good luck.")
say("")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()
end

--------------------------------------------
-- Level 8
--------------------------------------------
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 with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
local pct1 = number(1, 5)
if pct1 == 1 then
local pct2 = number(1, 10)
if pct2 == 1 then
game.drop_item(30304, 1)
else
game.drop_item(30303, 1)
end
else
return
end
end

when 20366.take with item.vnum == 30304 begin
npc.purge()
item.remove()
timer("devil_jump_9", 6)
end

---------------------------------------------
-- Level 9
---------------------------------------------
when devil_jump_9.timer begin
d.setf("level", 9)
d.jump_all(2048+590, 6656+155)
d.regen_file("data/dungeon/deviltower9_regen.txt")
end

when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
notice("Congratulations. You defeat Death Reaper.")
notice("In few seconds you will be teleported in map1.")
d.kill_all()
timer("devil_end_jump", 60)
end

when devil_end_jump.timer begin
d.exit_all()
end
end
end
Avatar utilizator
ivanrobo
Nivel 2

Nivel 2
Mesaje: 150
Membru din: 27 Apr 2015, 21:46
Server: Aztec
Regat: Chunjo
Aprecieri: 12  
Mulţumiri: 0
Medalii

Are acelasi secventa de cod pentru fierar, nu cred ca e neaparat de la quest
Edit: Am incercat si questul tau, zice la fel
Avatar utilizator
ivanrobo
Nivel 2

Nivel 2
Mesaje: 150
Membru din: 27 Apr 2015, 21:46
Server: Aztec
Regat: Chunjo
Aprecieri: 12  
Mulţumiri: 0
Medalii

UP
Avatar utilizator
ivanrobo
Nivel 2

Nivel 2
Mesaje: 150
Membru din: 27 Apr 2015, 21:46
Server: Aztec
Regat: Chunjo
Aprecieri: 12  
Mulţumiri: 0
Medalii

Up
Avatar utilizator
ivanrobo
Nivel 2

Nivel 2
Mesaje: 150
Membru din: 27 Apr 2015, 21:46
Server: Aztec
Regat: Chunjo
Aprecieri: 12  
Mulţumiri: 0
Medalii

Uppp
Avatar utilizator
[ST]SSH
Membru Club

Membru Club
Mesaje: 1704
Membru din: 12 Apr 2016, 23:54
Server: Fost Eluria2
Regat: Jinno
Aprecieri: 132  
Mulţumiri: 245  
 Contact:
Medalii

Arhivat!
Închis
Răspunsuri
0
Vizualizări
42
Răspunsuri
0
Vizualizări
123
Răspunsuri
4
Vizualizări
289
Răspunsuri
2
Vizualizări
195

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 136 vizitatori