Back to Piciul- [Legacy 3554]'s profile
Piciul- [Legacy 3554]

Posts by Piciul- [Legacy 3554]

933 posts

  1. #461
  2. #462
  3. #463
    Reply in Gaming
    
    quest yang_shop begin
    state start begin
    when 20094.chat.”Vreau 900kk” begin
    say_title(“”..mob_name(9009)..””)
    say(“”)
    say(“Salut, dupa cum bine vezi eu,”)
    say(“iti pot oferi 900kk Gratuit”)
    say(“Folosestei cu indemanare”)
    say_title(“Vrei sa continuam ?”)
    local s=select(“Da,desigur”, “Nu”)
    if 2==s then
    return
    end
    if 1==s and pc.get_gold() > 1099999998 then
    say_title(“”..mob_name(9009)..””)
    say(“Imi pare rau dar ai prea mult”)
    say(“Yang in inventar”)
    return
    end
    if 1==s and pc.get_gold() < 1099999998 then
    say(“Ai primit 900kk,”)
    pc.change_gold(900000000)
    return
    end
    end
    end
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  4. #464
    Reply in Gaming
    
    quest iteme_inceput begin
       state start begin
          when login with pc.get_level() >= 1 begin
          timer("starter", 1)
          end
             when starter.timer begin
             say_title("Bun venit  "..pc.get_name().." pe Metin2Under.")
             say("Vei câºtiga experienþa ºi vei cunoaºte")
             say("farmecul de pe acest joc. Lupta ºi câºtiga !")
             say("")
             wait()
             say_title("Iteme de început:")
             say("")
             pc . give_item2 ( "39036" , 1 ) 
             pc . give_item2 ( "71171" , 1 )
             pc . give_item2 ( "50053" , 1 )
             pc . give_item2 ( "70058" , 1 )
             horse . set_level ( "21" ) 
             horse.ride()
             pc.change_alignment(2000)
             pc . change_money ( 1000000000 )
             if pc . job == 0 then
             pc . give_item2 ( "19" , 1 )
             pc . give_item2 ( "12209" , 1 )
             pc . give_item2 ( "11209" , 1 )
             say_reward ( "Ai primit iteme de razboinic !" )
             elseif pc . job == 1 then
             pc . give_item2 ( "1009" , 1 )
             pc . give_item2 ( "12349" , 1 )
             pc . give_item2 ( "11409" , 200 )
             say_reward ( "Ai primit iteme de ninja!" )
             elseif pc . job == 2 then
             pc . give_item2 ( "19" , 1 )
             pc . give_item2 ( "12489" , 1 )
             pc . give_item2 ( "11609" , 1 )
             say_reward ( "Ai pirmit iteme de sura!" )
             elseif pc . job == 3 then
             pc . give_item2 ( "7009" , 1 )
             pc . give_item2 ( "12629" , 1 )
             pc . give_item2 ( "11809" , 1 )
             affect.add_collect(apply.MOV_SPEED, 10, 60*60*24*365*60) --60¦~   
             affect.add_collect(apply.ATT_SPEED, 10, 60*60*24*365*60) --60¦~   
             affect.add_collect(apply.CRITICAL_PCT, 20, 60*60*24*365*60) --60¦~
             affect.add_collect(apply.PENETRATE_PCT, 20, 60*60*24*365*60) --60¦~   
             affect.add_collect(apply.ATT_GRADE_BONUS, 120, 60*60*24*365*60) --60¦~
             affect.add_collect(apply.DEF_GRADE_BONUS, 200, 60*60*24*365*60) --60¦~
             affect.add_collect(apply.RESIST_MAGIC, 10, 60*60*24*365*60) --60¦~
             say_reward ( "Ai primit iteme de ºaman!" )
             end
             say("")
             say("Distreaza-te ºi îþi dorim succes.")
             say_gold("Echipa Metin2Under - PvP Classic !")
             set_state(__COMPLETE__)
    
          end
       end
       state __COMPLETE__ begin
       end
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  5. #465
    Reply in Gaming
    
    quest schimbanimal begin
    state start begin
    when 20095.chat."Vreau Animal de Companie" begin
                say_title(""..mob_name(20095).."")
                say("")
                say("Salut, dupa cum bine vezi eu,")
                say("Colectez Cufere-clar-de-luna(cate 100 bucati),")
                say("Eu iti voi da 1x Animal de Companie pentru ele.")
                say_title("Vrei sa continuam negotul?")
                local s=select("Da,desigur", "Nu")
                if 2==s then
                return
                else
                if pc.count_item(50011) < 100 then 
                say_title(""..mob_name(20094).."")
                say("Imi pare rau dar nu ai destule Cufere.")
             say_item("Cufar-clar-de-luna", 50011, "")
                return
                end
                say_title(""..mob_name(20095).."")
                say("")
             say("Ce Animalut Doresti?")
                give_reward = select ( "Sigiliu Baby-Vulpe" , "Sigiliu Baby-Leu", "Sigiliu Baby-Porcusor", "Sigiliu Baby-Tigru" , "Inchide")
                if give_reward == 1 then
             pc.give_item2(53006,1)
             pc.remove_item("50011", 100)
             say_title("Pescarul:")
                say_reward("Ai primit ")
             say_item ( "Sigiliu Baby-Vulpe" , 53006 , "" )
             say_reward("Mai adumi Cufere !!")
                elseif give_reward == 2 then
                pc.give_item2(53007,1)
             pc.remove_item("50011", 100)         
                say_title("Pescarul:")
                say_reward("Ai primit ")
             say_item ( "Sigiliu Baby-Leu" , 53007 , "" )
             say_reward("Mai adumi Cufere !!")
             elseif give_reward == 3 then
                pc.give_item2(53008,1)
             pc.remove_item("50011", 100)         
                say_title("Pescarul:")
                say_reward("Ai primit ")
             say_item ( "Sigiliu Baby-Porcusor" , 53008 , "" )
             say_reward("Mai adumi Cufere !!")
             elseif give_reward == 4 then
                pc.give_item2(53009,1)
             pc.remove_item("50011", 100)         
                say_title("Pescarul:")
                say_reward("Ai primit ")
             say_item ( "Sigiliu Baby-Tigru" , 53009 , "" )
             say_reward("Mai adumi Cufere !!")
                end
                end
            end
    end
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  6. #466
    Reply in Gaming

     

     

    Instalare :

    cd /usr/game/quest

    ./qc dungeon_2floor.quest

    
    quest spider_dungeon_2floor begin
       state start begin
          when login or levelup with pc.level >0 begin
             set_state(to_spider_2floor)
          end
       end
          
       state to_spider_2floor begin
          when 20089.chat."Temnita Paianjenilor partea a 2-a" begin
             say(""..mob_name(20089).."")
             say("Vrei deja sa parasesti Temnita Paianjenilor")
             say("Deci ... esti sigur ca vrei sa renunti?")
             say("")
             local a= select("Da","Nu")
             if 1==a then
                say(""..mob_name(20089).."")
                say("Esti pe cale sa fi teleportat in prima parte a temnitei.")
                say("")
                wait()
                pc.warp(91700, 525300)
                return
             end
             say(""..mob_name(20089).."")
             say("Ahhh atunci vei vedea")
             say("ca esti un razboinic adevarat!")
             say("")
          end
             
    
       end
    
    end
    
  7. #467
    Reply in Gaming
    
    quest prot_harta begin
    
    state start begin
    
    when login or levelup with pc.get_map_index() == 75 or pc.get_map_index() == 79 or pc.get_map_index() == 80 begin
    
    if pc.get_level() <= 40 then
    
    syschat("Nu ai ce cauta aici la acest nivel!")
    syschat("Vei fi teleportat imediat, www.just4metin.ro")
    
    local empire = pc.get_empire()
    
    if empire == 1 then
    pc.warp(474300,954800)
    elseif empire == 2 then
    pc.warp(63800,166400)
    elseif empire == 3 then
    pc.warp(959900,269200)
    
    end
    
    end
    
    end
    
    end
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu rasplata.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc rasplata.quest

    5. Intraţi pe server şi scrieţi /reload q .

  8. #468
    Reply in Gaming
    
    system_poly begin
        state start begin
            when 20041.chat."system_poly" begin        
                say("Bunaziua.")
                say("Eu sunt ultimul supravietuitor")
                say("dupa prima lupta a regatelor.")
                say("Poate ca par cam beat dar am niste puteri.")
                say("Te pot transforma in ce doresti tu.")
                say_reward("Nu te costa nimic, este gratuit.")
                say("")
                say("Vrei sa te transformi in monstru ?")
                say(" ")
                local s = select("Da !", "Nu mersi.")
                say_reward("Alege o categorie de monstri :")
                say(" ")
                local a = select("Boss", "Creatura", "NPC", "Inchide")
                
                if a == 1 then
                say("Ce Boss vrei sa fii ?")
                say(" ")
                wait()
                local z = select("Pirat", "Boss orc", "Regele maimutelor", "Regina Painjenilor", "Regele Paianjenilor", "Testoasa", "Vulpea cu 9 cozi", "Vrajitoarea de gheata", "Continua")
                
                if z == 1 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(5001, 600)
                
                elseif z == 2 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(691, 600)
                
                elseif z == 3 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(5163, 600)
                
                elseif z == 4 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2091, 600)
                
                elseif z == 5 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2092, 600)
                
                elseif z == 6 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2191, 600)
                
                elseif z == 7 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1901, 600)
                
                elseif z == 8 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1191, 600)
    
                elseif z == 9 then
                
                say("Page 2")
                say(" ")
                wait()
                local e = select("Regele Focului", "Dragon Rosu", "Tigru Galben", "Regele Demon", "Moartea", "Spiritul copacului", "Dragon Albastru", "Rege Spirit de Copac", "Inchide")
                
                if e == 1 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2206, 600)
                
                elseif e == 2 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2291, 600)
                
                elseif e == 3 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1304, 600)
                
                elseif e == 4 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1091, 600)
                
                elseif e == 5 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1092, 600)
                
                elseif e == 6 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2306, 600)
                
                elseif e == 7 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2493, 600)
                
                elseif e == 8 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2307, 600)
                
                elseif e == 9 then
                return
                end
                end
                
                elseif a == 2 then
                say("In ce vrei sa te transformi ?")
                say(" ")
                wait()
                local r = select("Câine", "Urs", "Tigru", "Soldat du serment blanc","Minion Barbare",  "Orc negru", "Fanatic Estoric", "Continua")
                
                if r == 1 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(101, 600)
                
                elseif r == 2 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(110, 600)
                
                elseif r == 3 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(114, 600)
                
                elseif r == 4 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(301, 600)
                
                elseif r == 5 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(502, 600)
                
                elseif r == 6 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(636, 600)
                
                elseif r == 7 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(701, 600)
                
                elseif r == 8 then
                
                say("Page 2")
                say(" ")
                wait()
                local t = select("Soldat demoniac", "Yeti", "Golem de gheata", "Pianjen Tanar", "Tigre Luptator", "Dryade", "Maimuta Soldat", "Croque-mitaine", "Continua")
                
                if t == 1 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1001, 600)
                
                elseif t == 2 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1106, 600)
                
                elseif t == 3 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1107, 600)
                
                elseif t == 4 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2301, 600)
                
                elseif t == 5 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2203, 600)
                
                elseif t == 6 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(2303, 600)
                
                elseif t == 7 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(5121, 600)
                
                elseif t == 8 then
                say("Esti transformat !")
                say(" ")
                wait()
                pc.polymorph(1333, 600)
                
                elseif t == 9 then
                
                say("Page 3")
                say(" ")
                wait()
                local d = select("Goe-Pae", "Chuong", "Bo", "Mahon", "Câine Zombie", "Rege Zombie", "Moartea", "Luptator Zin Celest", "Inchide")
                
                if d == 1 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(493, 600)
                
                elseif d == 2 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(494, 600)
                
                elseif d == 3 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(492, 600)
                
                elseif d == 4 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(491, 600)
                
                elseif d == 5 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(2502, 600)
                
                elseif d == 6 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(2595, 600)
                
                elseif d == 7 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(2597, 600)
                
                elseif d == 8 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(2492, 600)
                
                elseif d == 9 then
                return
                end
                end
                end
                
                elseif a == 3 then
                say("In ce NPC vrei sa te transformi ?")
                say(" ")
                wait()
                local y = select("Fierar", "Cetatean Turmentat", "Teleporter", "Paznic", "Vanator", "Cal Militar", "Vanzator Ambulant", "Inchide")
                
                if y == 1 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(20016, 600)
                
                elseif y == 2 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(20041, 600)
                
                elseif y == 3 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(9012, 600)
                
                elseif y == 4 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(11000, 600)
                
                elseif y == 5 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(20019, 600)
                
                elseif y == 6 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(20109, 600)
                
                elseif y == 7 then
                say("Esti Transformat !Acum  te poti distra cu noua ta aparenta !")
                say(" ")
                wait()
                pc.polymorph(20042, 600)
                
                elseif y == 8 then
                return
                end
                end
                
                if a == 4 then
                return
                end
            end
        end
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  9. #469
    Reply in Gaming
    
     quest xmas_2012 begin
       state start begin
          function has_santa()
             if game.get_event_flag("xmas_event_2012") < 1 then
                return false
             else
                return true
             end
          end
          
          function is_xmas()
             if game.get_event_flag("christmas_eve") < 1 then
                return false
             else
                return true
             end
          end
          
          function gift()
             local n = number (1,100)
             if n <= 4 then
                pc.give_item2(25100,1)
             elseif n <= 8 then
                pc.give_item2(71084,1)
             elseif n <= 12 then
                pc.give_item2(71085,1)
             elseif n <= 16 then
                pc.give_item2(71109,1)
             elseif n <= 21 then
                pc.give_item2(25040,1)
             elseif n <= 26 then
                pc.give_item2(71101,5)
             elseif n <= 31 then
                pc.give_item2(71107,1)
             elseif n <= 40 then
                pc.give_item2(50513,1)
             elseif n <= 50 then
                pc.changegold (2500000)
             elseif n <= 61 then
                pc.changegold (1500000)
             elseif n <= 73 then
                pc.changegold (1000000)
             elseif n <= 86 then
                pc.changegold (500000)
             elseif n <= 90 then
                local costume_items = {41137,41138,41139,41140,41141,41142,41143,41144,45075,45076,45077,45078,45079,45080}
                local rand = number(1,14)
                pc.give_item2(costume_items[rand])
             else
                pc.changegold (250000)
             end
          end
          
          
          -- Quest Flag "event_state"
          -- 0 = Uninitiated.
          -- 1 = can accept first quest
          -- 2 = first quest
          -- 3 = first quest done, second available, resting state
          -- 4 = second quest
             
          when login or enter with xmas_2012.has_santa() == true begin
             q.set_icon("scroll_open_blue.tga")
             send_letter("*It's Christmas Time!")
             if pc.get_map_index() == 1 or pc.get_map_index() == 21 or pc.get_map_index() == 41 then
                if find_npc_by_vnum(20384) == 0 then
                   if pc.get_map_index() == 1 then
                      mob.spawn(20384, 625, 676, 0, 0 )
                   elseif pc.get_map_index() == 21 then
                      mob.spawn(20384, 542, 551, 0, 0)
                   elseif pc.get_map_index() == 41 then
                      mob.spawn(20384, 442, 717, 0, 0)
                   end
                end
             end
          end
          
          when button or info begin
             if pc.getqf("state") == 2 then
                say_title("Puiul pierdut de ren")
                say("")
                say("Mos Craciun te-a rugat sa gasesti renul")
                say("Care s-a pierdut in Muntii Inghetati.")
                say("")
                say("Ar trebui sa-l gasesti repede,fiecare secunda decide")
                say("intre un miracol de Craciun sau o tragedie de Craciun")
                say("")
                say("Utilizeaza fluierul pentru a chema reni!")
                say("Cand te afli in raza de actiune ar trebui sa reactioneze.")
                say("")
             else
                say_title("E timpul Craciunului.")
                say("")
                say("Salut dragi jucatori ai serverului Metin2 Sapphire.")
                say("Este timpul Craciunului si avem ceva special pentru voi")
                say("msiuni si aventuri noi penntru voi.")
                say("Mosul te asteapta in partea nordica a")
                say("Muntelui Inghetat - Grabestete la el!")
                say("")
                say_reward("Un Craciun fericit din partea echipei Metin2 Sapphire!")
                say("")
             end
          end
       
          when 20126.click begin
             local selTab = {}
             local pos = 1 
             table.insert(selTab, pos, "Merry Christmas!")
             pos = pos + 1
             if pc.getqf("init_nog") != nil then
                table.insert(selTab, pos, "A Christmas Meal")
                pos = pos + 1
             end
             if pc.getqf("state") == 3 then
                table.insert(selTab, pos, "The Sock Hunt")
                pos = pos + 1
             end
             if pc.getqf("state") == 6 then
                table.insert(selTab, pos, "The mother reindeer...")
                pos = pos + 1
             end
             table.insert(selTab, pos, "Close")
             
             local s = select_table( selTab )
             
             if selTab[s] == "Merry Christmas!" then
                say_title("Santa Clause:")
                say("")
                say("Ho ho ho! Merry Christmas young adventurer!")
                say("")
                if pc.get_level() < 30 then
                   return
                end
                if pc.getqf("state") > 2 then
                   say("Ai gasit o soseta deja?")
                   say("")
                   say("Acum sosetele se dropeza la monstri apropiati de nivelul tau.")
                   say("Odata ce ati gasit o soseta o puteti duce la")
                   say("Pomul de Craciun din orasul tau.Acest lucru va fi")
                   say("docada pentru mine ca tu te-ai dedicat")
                   say("pentru Craciun.Cu mare efort vine")
                   say("o mare rasplata si in ziua de craciun veti primi")
                   say("un cadou pentru munca depusa.")
                   say("Pana atunci bucurati-va de ce va fi!")
                   say("")
                elseif pc.getqf("state") < 2 or pc.getqf("state") == nil then
                   say("I need to ask you a favour!")
                   say("It's very, very important!")
                   say("")
                   say("If you have time for me please talk to me.")
                   say("")
                   local init = select("Vorbeste cu mosul","Nu am timp in acest moment")
                   if init == 1 then
                      say_title("Mos Craciun:")
                      say("")
                      say("Salut tinere aventurier!")
                      say("Am o cerere pentru tine...")
                      say("Unu dintre reni mei a fugit!")
                      say("")
                      say("M-am uitat in toate grajdurile,)
                      say("dar ma tem sa nu se fi ratacit adanc in Muntii Inghetati.")
                      say("Elfii ar fi foarte ingroziti sa se duca sa caute renul,")
                      say("deoarece le e frica sa nu dea peste Noua Cozi.")
                      say("")
                      wait()
                      say_title("Mos Craciun:")
                      say("")
                      say("Ea e pe cale de a da nastere")
                      say("la un pui de ren!")
                      say("")
                      say("As merge eu,dar dupa cum vezi am o foarte")
                      say("mare lista pentru a livra cadouri ."
                      say("")
                      say("Te rog,poti sa imi gasesti renul?")
                      say("Asta s-a intamplat cu multe ore in urma si ma tem")
                      say("pentru siguranta ei."
                      say("")
                      local init2 = select("Desigur!","Sorry, sunt ocupat")
                      if init2 == 1 then
                         say_title("Mos Craciun:")
                         say("")
                         say("Oh, iti multumesc foarte mult!")
                         say("Te rog grabestete sa o gaseste,cu cat o gasesti mai repde, cu atat mai bine.")
                         say("Poti folosi acest fluier pentru a o atrage.")
                         say("")
                         say_white("El iti da un fluier cu decor de Craciun pe el... ")
                         say("")
                         say("Fluiera in timp ce o cauti,daca ea te aude,")
                         say("va veni la tine.De asemenea fii atent acolo,")
                         say("Noua Cozi este foarte feroce in timpul acestui sezon.")
                         say("")
                         say("Spiritul Craciunului te poate ajuta in calatoria ta!")
                         say("")
                         pc.give_item2(90080,1)
                         pc.setqf("target",number(1,25))
                         pc.setqf("state",2)
                      else
                         say_title("Mos Craciun:")
                         say("")
                         say("Asta este foarte rau...")
                         say("Poate ii pot convinge pe Elfi sa o caute.")
                         say("")
                         say("Imi pare rau ca te-am deranjat.")
                         say("")
                      end
                   end
                else
                   wait()
                   say_title("Mos Craciun:"
                   say("")
                   say("Mult succes pentru a gasi mama ren.")
                   say("Spiritul Craciunului o sa te ajute in calatoria ta.")
                   say("")
                end
                if pc.getqf("init_nog") < 1 then
                   pc.setqf("init_nog",1)
                   pc.setqf("first_nog",1)
                end
             elseif selTab[s] == "A Christmas Meal" then
                if pc.getqf("first_nog") == 1 then
                   say_title("Mos Craciun:")
                   say("")
                   say("Ho,ho,ho tinere erou.")
                   say("Ti-au cam inghetat urechile.")
                   say("Cred ca nu esti obisnuit cu vremurile reci de iarna")
                   say("cum sunt eu. Ho,ho,ho!")
                   say("")
                   say("Uite, i-a asta ,ar trebui sa te incalzeasca.")
                   say("")
                   say_reward("Ai primit Vin Fiert (x6)")
                   say("")
                   wait()
                   pc.give_item2(50216,6)
                   pc.setqf("last_nog_give_time", get_global_time())
                   pc.setqf("first_nog",0)
                   say_title("Santa Clause:")
                   say("")
                   say("Este o bautura traditionala care te va incalzi")
                   say("in cel mai scurt timp.Ho,ho,ho.")
                   say("Si iti creste chiar viteza de atac si de miscare")
                   say("putin.")
                   say("")
                   say("Vino maine la mine daca ai nevoie de mai mult.")
                   say("")
                else
                   say_title("Mos Craciun:")
                   say("")
                   say("Ho,ho,ho incep sa se incalzeasca spiritele din nou?"
                   say("")
                   if get_global_time() - pc.getqf ("last_nog_give_time") >= 86400 then
                      say("Here you go! Enjoy!")
                      say("")
                      pc.setqf ("last_nog_give_time", get_global_time())
                      pc.give_item2(nog_pocket,6)
                   else
                      say("Te rog asteapta umpic mai mult prietene drag.")
                      say("Nu a trecut inca o zi."
                      say("Asteapta pana vine randul tau.")
                      say("")
                   end
                end
             elseif selTab[s] == "The Sock Hunt" then
                if pc.getqf("q_init") < 1 then
                   say_title("Mos Craciun:"
                   say("")
                   say("Salut tinere luptator!")
                   say("")
                   say("Multumesc ca ai participat la acest miracol de Craciun,copilul")
                   say("este la fel de sanatos, ca ar putea fi plimbat fericit prin"
                   say("Muntii Inghetati.Dar nu de asta te-am chemat aici")
                   say("am nevoie din nou de o favoare de la tine.Sosetele")
                   say("Din Bradul de Craciun au fost furate de monstri.")
                   say("")
                   wait()
                   say_title("Mos Craciun:)
                   say("")
                   say("Te superi daca cauti sosetele")
                   say("si le pui inapoi in Bradul de Craciun?")
                   say("Puiul meu de ren de poate ajuta,de fapt ar fi")
                   say("posibil sa faci asta si fara el.")
                   say("")
                   say("Dupa ce ai gasit sosete,dule")
                   say("la Bradul de Craciun,s-ar putea sa te binecuvanteze pentru faptele tale!")
                   say("")
                   say_reward("Important: Puiul de ren va fi obosit dupa 4 ore.")
                   say_reward("Va trebui sa astepti o zi pentru urmatoarea vanatoare.")
                   say("")
                   pc.give_item2_select(53007,1)
                   item.set_socket(0,get_global_time()+14400)
                   pc.setqf("last_reindeer_give_time", get_global_time())
                   pc.setqf("state",4)
                   pc.setqf("q_init",1)
                else
                   if pc.count_item(53007) > 0 then
                      say_title("Mos Craciun:")
                      say("")
                      say("Mult noroc la vanatoarea de sosete!")
                      say("Spiritul Craciunului te va ajuta in calatoria ta.")
                      say("")
                      return
                   end
                   if get_global_time() - pc.getqf("last_reindeer_give_time") < 86400 then
                      say_title("Santa Clause:")
                      say("")
                      say("Puiul de ren este inca epuizat.")
                      say("Incearca din nou in cateva ore.")
                      say("")
                   else
                      say_title("Mos Craciun:")
                      say("")
                      say("Ho,ho,ho tinere erou!")
                      say("Puiul de ren este din nou in forma.")
                      say("Astefel incat sa poti merge mai mult de patru ore azi.")
                      say("Vrei sa te duci la alta vanatoare de sosete acum?")
                      say("")
                      local a = select("Yes.","No.")
                      if a == 1 then
                         pc.give_item2_select(53007,1)
                         item.set_socket(0,get_global_time()+14400)
                         pc.setqf("last_reindeer_give_time", get_global_time())
                         pc.setqf("state",4)
                      end
                   end
                end
             elseif selTab[s] == "The mother reindeer..." then
                local my_x = pc.get_local_x()
                local my_y = pc.get_local_y()
                say_title("Mos Craciun:")
                say("")
                say("Ho,ho,ho!De ce ai fata asta trista prietene?")
                say("")
                say("Ah, stii ce sa intamplat cu"
                say("renul?")
                say("")
                say("A ho,ho,ho ! Nu trebuie sa te ingrijorezi prietene,")
                say("ai fost extraordinar acest sigiliu este al tau")
                say("cel mai mare ren,care este in mare forma.")
                say("Doar apeasa pe sigiliu si te va pune pe ren.")
                say("")
                wait()
                say_title("Tu concentreaza-ti gandurile asuprea aceea ce sa intamplat...")
                say("")
                say_white("Dintr-o data renul este aproape de tine")
                say_white("si ea este la fel de potrivita ca niciodata.")
                say("")
                say("Ea este in siguranta acum,deci nu trebuie sa te mai ingrijorezi.")
                say("Ca un semn de recunostinta vom raspandi Spiritul ")
                say("Craciunului in intreaga lume ,dar sa iau unu din reni mei adulti")
                say("renul-acesta va fi de mare avantaj pentru tine!")
                say("")
                say_reward("Ai primit 2.500.000 yang")
                say_reward("Ai primit mount (20 ore)")
                say("")
                wait()
                pc.setqf("state",3)
                pc.remove_item(90080)
                pc.give_item2_select(71164,1)
                pc.change_gold(2500000)
                if game.get_event_flag("christmas_spawn") < 50 then
                   mob.spawn(34010,my_x-1,my_y-1,0,0)
                   say_title("Mos Craciun:")
                   say("")
                   say("Ho,ho,ho... ce pui de ren frumos")
                   say("a devenit!")
                   say("Ea trebuie sa fie o mama norocoasa.")
                   say("Vino inapoi aici in fiecare Craciun si")
                   say("joaca-te cu puiul de ren.")
                   say("")
                   game.set_event_flag("christmas_spawn",game.get_event_flag("christmas_spawn")+1)
                end
             else
             end
          end
          
          when kill with npc.is_pc() == false and pet.is_summon(34010) == true and xmas_2012.has_santa() == true begin
             if pc.get_level() - get_mob_level[npc.get_race()] < 11 then
                local chance = number(1,80)
                if chance == 1 then
                   game.drop_item_with_ownership(50010,1)
                end
             end
          end
          
          when 34010.chat."Pet the baby reindeers" with xmas_2012.is_xmas() == true begin
             say_title("Pet pui de ren.")
             say("")
             say("Se pare sa se bucure de mana ta calda pe pielea ei.")
             say("")
             if pc.getqf("got_gold") < 4 and pc.getqf("state") > 2 then
                say("Poti sa iti intorci mana inapoi se simte umpic mai greu.")
                say("In mana ta este yang solid.")
                local amount = number(100000,1000000)
                say("")
                say_reward("Ai primit "..amount.." Yang.")
                say("")
                pc.change_gold(amount)
                pc.setqf("got_gold",pc.getqf("got_gold")+1)
             end
          end
          
          when 71144.use begin
             xmas_2012.gift()
             item.remove()
          end
          
          when 20384.chat."The Christmas Stockings" with pc.getf("xmas_2012","state") == 4 begin
             local p = pc.count_item(50010)
             pc.setqf("socks_count",pc.getqf("socks_count")+p)
             local q = pc.getqf("socks_count")
             pc.remove_item(50010,p)
             say_title("Ai atarnat sosete in brad...")
             say("")
             say("Buna treaba, el functioneaza mai bine acum.")
             say("")
             if q > 4 then
                say("Hei...acesta este un cadou sub brad.:)
                say("Nu a existat inainte...este pentru mine?")
                say("")
                say_reward("Christmas Gift Box received.")
                say("")
                pc.give_item2(71144,1)
                pc.setqf("socks_count",pc.getqf("socks_count")-5)
                pc.setqf("state",3)
             else
                say("Poate ar trebui sa adune mai multe sosete maine.")
                say("")
                pc.setqf("state",3)
             end
          end
             
          when 90080.use with pc.getf("xmas_2012","state") == 2 begin
             local reindeer_tab = {
                {1437,1341},
                {1267,1389},
                {1248,1273},
                {1437,1052},
                {1283,916},
                {1431,742},
                {252,1427},
                {146,1222},
                {258,1268},
                {131,1018},
                {140,517},
                {416,375},
                {397,151},
                {1377,410},
                {1463,530},
                {1183,157},
                {992,660},
                {1117,1012},
                {449,991},
                {419,1360},
                {485,1345},
                {577,1335},
                {268,850},
                {1257,671},
                {1249,1013},
             }
             local my_x = pc.get_local_x()
             local my_y = pc.get_local_y()
             if pc.get_map_index() != 61 then
                chat("You are not in the Ice Mountains - The baby reindeer has to be in there!")
                return
             elseif math.abs(my_x-reindeer_tab[pc.getqf("target")][1]) > 20 or math.abs(my_y-reindeer_tab[pc.getqf("target")][2]) > 20 then
                chat("You blow the training whistle, but nobody reacts, the mother reindeer must be someplace else.")
                return
             else
                chat("You see an animal frozen in the snow, it seems to be the lost mother reindeer!")
                mob.spawn(20216,my_x+1, my_y+1,0,0)
                pc.setqf("state",5)
             end
          end
          
          when 20216.chat."Pet the Reindeer" with pc.getf("xmas_2012","state") == 5 begin
             say_title("Pe masura ce mangii reni...")
             say("")
             say("Renul este zambitor,ea incearca sa exprime")
             say("ca se simte bine,dar va putea simti durerea lui.")
             say("")
             say("[DELAY value=200]. . .[/DELAY]")
             say("")
             wait()
             npc.purge()
             say("")
             say_white("In timp ce incerca sa-si pastreze pentru el,temandu-se cel mai rau")
             say_white("se dizolva intr-o hoarda de lumini stralucitoare."_
             say_white("Este un sigiliu pe teren-poate ar trebui"_
             say_white("sa il dau lui Mos Craciun si sa-i spun ce s-sa intampalt."_
             say("")
             pc.setqf("state",6)
          end
       end
    end      
          
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  10. #470
    Reply in Gaming
    
    quest ploaia begin 
        state start begin 
            when 20003.chat."Ploaia de Iteme" with pc.is_gm() begin 
                if game.get_event_flag("item_open") == 0 then 
                    say("Salut "..pc.get_name().." de aici poti porni") 
                    say("eventul "Ploaia de Iteme" ")
                say_reward("Quest facut de ©DaRealPain")
                    say("Vrei sa faci asta?") 
                    if select("Da","Nu") == 2 then return end 
                    say("Te rog introdu ID-ul Itemului care urmeaza sa fie dropat.") 
                    kill_item = tonumber(input()) or 0 
                    if kill_item == 0 then 
                        say("Nu ai introdus nimic. Incearca din nou.") 
                        return 
                    end     
                    say("Te rog sa introduci sansa de dropare a Itemului. Sansa va fi redata in %") 
                    kill_prozent = tonumber(input()) or 0 
                    if kill_prozent == 0 then 
                        say("Nu ai introdus nimic. Incearca din nou.") 
                        return 
                    end     
                    say("Te rog introdu cate minute sa dureze eventul ( in Minute ) ") 
                    zeit = tonumber(input()) or 0 
                    if zeit == 0 then 
                        say("Ce ai introdus e gresit.") 
                        return 
                    end 
                    game.set_event_flag("item_time", get_time()+zeit*60) 
                    game.set_event_flag("item_open", 1) 
                    notice_all("Eventul "Ploaia de Iteme" a fost pornit") 
                    notice_all("Acum poti dropa "..item_name(kill_item).." de la toti monstrii.") 
                    notice_all("Eventul este activ pentru "..zeit.." Minut(e)")
                else  
                    say("Eventul "Ploaia de Iteme este deja activ.") 
                    say("Vrei sa il dezactivezi?") 
                    if select("Da", "Nu")==2 then return end 
                    game.set_event_flag("item_open", 0) 
                    kill_prozent, kill_item = nil, nil 
                end 
            end 
            when kill with game.get_event_flag("item_open") == 1 and not npc.is_pc() begin 
                if kill_prozent == nil then game.set_event_flag("item_open", 0) return end 
                if game.get_event_flag("item_time") < get_time() then 
                    notice_all("Eventul "Ploaia de Iteme" a luat sfarsit")
                    notice_all("Speram ca ati dropat multe Iteme.") 
                    game.set_event_flag("item_open", 0) 
                    kill_prozent, kill_item = nil, nil 
                    return 
                end 
                local s=number(1, 101-kill_prozent)  
                if s==1 then 
                    game.drop_item_with_ownership(kill_item, 1)  
                end 
            end 
            when login with game.get_event_flag("item_open") == 1 begin 
                notice("Eventul "Ploaia de Iteme" este activ")  
                notice(" "..item_name(kill_item).." poate fi dropat de la toti monstrii!")
             notice("Mult succes la farmat!")
            end 
        end 
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu rasplata.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc rasplata.quest

    5. Intraţi pe server şi scrieţi /reload q .

  11. #471
    Reply in Gaming
    
    quest pvp_manager begin
       state start begin
          when login with game.get_event_flag("budokan_open") > 0 and pc.get_map_index() != 112 begin
             q.set_icon("scroll_open_blue.tga")
             send_letter("*Intra la Dojang")
          end
                  when button or info begin
                            say_title("Turneul Dojang")
             say("")
             if game.get_event_flag("budokan_open") == 2 then
                say("Arena pentru Turneul Dojang este acum deschisa!")
                say("")
                say("Alatura-te si tu pentru a lupta in ring ")
                say("contra celorlalti jucatori intr-o lupta")
                say("pentru glorie, onoare si faima!")
                say("")
                local s = select("Du-ma acolo acum!","Nu multumesc.")
                if s == 1 then
                   pc.warp(857300, 4400)
                end
             else
                say("Arena Dojang se va deschide in curand.")
                say("")
                say("Alatura-te si tu pentru a lupta in ring ")
                say("contra celorlalti jucatori intr-o lupta")
                say("pentru glorie, onoare si faima!")
                say("")
                say("Cand intrarea va fii deschisa, vei putea intra ")
                say("folosind aceast quest. Pregateste-ti echipamentul!")
                say("")
                local s = select("Voi fii pregatit!", "Voi urmarii ca spectator.")
                if s == 1 then
                   return
                end
    
                say_title("Turneul Dojang")
                say("")
                say("Alege o actiune:")
                say("")
                ttype = select("Turneul Dojang : Deschidere", "Inchide")
                if ttype == 5 then
                   return
                end
    
                pvp_manager.say_hof(ttype)
             end
          end
    
          when login with pc.get_map_index() == 112 and (pvp_attenders == nil or pvp_attenders[pvp_manager.get_my_attender_id()] == nil or (pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 1 and pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 2)) begin
             if party.is_party() then
                party.remove_player()
             end
    
             if pvp_attenders == nil then
                pvp_manager.guard_check_position()
                timer("pvp_guard_1", 20)
                return
             end
    
             if pvp_attenders[pvp_manager.get_my_attender_id()] == nil then
                pvp_manager.guard_check_position()
                timer("pvp_guard_1", 20)
                return
             end
    
             if pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 1 and pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != 2 then
                pvp_manager.guard_check_position()
                timer("pvp_guard_1", 20)
             end
          end
          
          when pvp_guard_1.timer begin
             if pc.get_map_index() != 112 then
                return
             end
             pvp_manager.guard_check_position()
             timer("pvp_guard_2", 20)
          end
          when pvp_guard_2.timer begin
             if pc.get_map_index() != 112 then
                return
             end
             pvp_manager.guard_check_position()
             timer("pvp_guard_1", 20)
          end
          function guard_check_position()
             if pc.get_local_x() >= 84 and pc.get_local_y() >= 84 and pc.get_local_x() <= 116 and pc.get_local_y() <= 116 then --arena 1
                pvp_manager.guard_reset()
             end
             if pc.get_local_x() >= 84 and pc.get_local_y() >= 136 and pc.get_local_x() <= 116 and pc.get_local_y() <= 168 then --arena 2
                pvp_manager.guard_reset()
             end
             if pc.get_local_x() >= 136 and pc.get_local_y() >= 84 and pc.get_local_x() <= 168 and pc.get_local_y() <= 116 then --arena 3
                pvp_manager.guard_reset()
             end
             if pc.get_local_x() >= 136 and pc.get_local_y() >= 136 and pc.get_local_x() <= 168 and pc.get_local_y() <= 168 then --arena 4
                pvp_manager.guard_reset()
             end
          end
          
          function guard_reset()
             notice_in_map("AUTOPVP-GUARD: "..pc.getname().." a fost eliminat din arena.")
             pc.warp_local(pc.get_map_index(), 1112*100, 24*100)
          end
          
          when 20088.chat."Inchide Arena PvP" with pc.is_gm() and pc.get_map_index() == 112 begin
             say_title("Dojang:")
             say("Intarea in aceasta mapa este acum inchisa")
             say("iar fiecare jucator va fii teleportat in oras...")
             say("")
             warp_all_to_village( pc.get_map_index() , 1 )
             game.set_event_flag("budokan_open", 0)
          end
          
          when 20088.chat."Inapoi in oras" with pc.get_map_index() == 112 begin
             say_title("Maestrul Bataliilor")
             say("")
             say("Doresti sa parasesti arena si sa te intorci ")
             say("acasa, in oras?")
             say("")
             local s = select("Da", "Nu")
             if s == 1 then
                warp_to_village()
             end
          end
    
          when 20088.chat."GM: Intrerupe Turneul PvP" with pc.get_map_index() == 112 and pc.is_gm() and game.get_event_flag("pvp") != 0 begin
             say_title("Intrerupe Turneul PvP")
             say("")
             say("Chiar doresti sa intrerupi Turneul PvP?")
             say("")
             local s = select("Da", "Nu")
             if s == 1 then
                game.set_event_flag("pvp", 0)
                pvp_attenders = nil
                notice_all("Turneul Dojang a fost anulat.")
                say_title("Turneu Dojang anulat!")
                say("Turneul Dojang a fost anulat.")
                say("")
             end
          end
    
          when 20088.chat."GM: Incepe Turneul PvP" with pc.get_map_index() == 112 and pc.is_gm() and game.get_event_flag("pvp") == 0 begin
    
             local tournament_presets =
             {
             --   Min Lv       Max Lv        Reward vnum    Reward count
                {98,       99,         11971,         1 },
             }
    
             say_title("Incepe Turneul PvP")
             say("")
              local tournament = select("Turneul Dojang", "Inchide")
    
             if tournament < 5 then
                prize_vnum = tournament_presets[tournament][4]
                prize_count = tournament_presets[tournament][5]
    
                    game.set_event_flag("pvp_price_vnum", prize_vnum)
                game.set_event_flag("pvp_price_count", prize_count)
                
                say_title("Start PvP-Tournament")
                say("")
                say("Premiul castigatorului va fii "..prize_count.."x "..item_name(prize_vnum))
                say("(vnum: "..prize_vnum..")")
                say("")
             end      
    
             local s = select("Start now", "Cancel")
             if s == 2 then
                return
             end
    
             say_title("Incepe Turneul Dojang")
             say("Turneul Dojang a inceput.")
             say("Oricine vrea sa participe se poate")
             say("inscrie aici.")
             say("")
             say("Inscrierile se pot inchide aici.")
               game.set_event_flag("pvp", 1)
             attender_count = 0
             game.set_event_flag("pvp_tournament", get_global_time())
             pvp_attenders = nil
             pvp_attenders = { }
             
             arena = {
                      -- arena 1
                      {
                         { 113, 100 },
                         { 88, 100 },
                         0,
                         "SLEEPING",
                         0,
                      },
                      -- arena 2
                      {
                         { 113, 152 },
                         { 88, 152 },
                         0,
                         "SLEEPING",
                         0,
                      },
                      -- arena 3
                      {
                         { 140, 152 },
                         { 164, 152 },
                         0,
                         "SLEEPING",
                         0,
                      },
                      -- arena 4
                      {
                         { 164, 100 },
                         { 140, 100 },
                         0,
                         "SLEEPING",
                         0,
                      },
                   }
             
             notice_all("Inscrierile pentru Turneul Dojang au fost deschise!")
             notice_all("Castigatorul va primii "..game.get_event_flag("pvp_price_count").."x "..item_name(game.get_event_flag("pvp_price_vnum")).." ca premiu!")
          end
          
          when 20088.chat."Inscrie-te la Turneul PvP" with pc.get_map_index() == 112 and game.get_event_flag("pvp") == 1 begin
             say_title(mob_name(,)..":")
             say("")
             if game.get_event_flag("pvp_tournament") == pc.getqf("pvp_tournament") then
                say("Te-ai inscris deja la Turneu.")
                say("")
                return
             end
             ----"123456789012345678901234567890123456789012345678901234567890"|
    
             say("Bun venit la Dojang. In Turneu vei lupta")
             say("impotriva altor jucatori.")
             say("")
             say("Infrange toti participantii pentru a iti primii premiul")
             say("si a iti castiga un loc in Hala Eroilor!")
             say("")
             say("Doresti sa accepti provocarea?)
             say("")
             local s = select("Vreau sa particip!", "Nu am nici o sansa..")
             say_title(mob_name(,)..":")
             say("")
             if s == 1 then
                say("Vei fii chemat cand iti va venii randul, dar ai grija.")
                say("Trebuie sa stai prin preajma, altfel vei fii descalificat.")
                say("")
                say("Mult noroc!")
                say("")
                
                pvp_attenders[attender_count+1] = {name = pc.getname(), level = pc.get_level(), partner = nil, winner = true, fight_mode = 0, arena = 0}
                pc.setqf("attender_id", attender_count+1)
                pc.setqf("pvp_tournament", game.get_event_flag("pvp_tournament"))
                attender_count = attender_count + 1
             elseif s == 2 then
                say("Intr-adevar, pari cam slab.")
                say("Am mai avut cazuri care s-au soldat")
                say("cu moartea la acest turneu.")
                say("")
             end
          end
          
          when ,.chat."Cati participanti sunt?" with pc.get_map_index() == 112 and pc.is_gm() and game.get_event_flag("pvp") == 1 begin
             say_title("PVP-Tournament")
             say("Deocamdata sunt "..tostring(attender_count).." playeri inscrisi.")
             say("Shall the registration be closed and betting")
             say("Ar trebuii sa incepem?")
             say("")
             local s = select("Inchide inscrierile.", "Continua cu inscrierile.")
             if s == 1 then
                say_title("Inchide inscrierile:")
                say("Inscrierile au fost inchise.")
                 say("")
                game.set_event_flag("pvp", 2)
             end
          end
              when 20088.chat."Cine participa la turneu?" with pc.get_map_index() == 112 and game.get_event_flag("pvp") == 2 begin
             setskin(NOWINDOW)
             chat("Urmatorii playeri sunt participanti ai Turneului:")
             for i = 1, attender_count, 4 do
                local chatline = ""
                for j = i, i + 4, 1 do
                   if pvp_attenders[j] != nil then
                      chatline = chatline..pvp_attenders[j].name.."   "
                   end
                end
                syschat(chatline)
             end
             syschat("In total sunt "..attender_count.." participanti")
          end
          
          when 20088.chat."Cu cine voi concura in runda urmatoare?" with pc.get_map_index() == 112 and game.get_event_flag("pvp") == 3 and game.get_event_flag("pvp_tournament") == pc.getqf("pvp_tournament") begin
             say_title(mob_name(,)..":")
             say("")
             if pvp_manager.get_duel_partner() == nil then
                say("Nu este niciun oponent disponibil pentru tine momentan")
                say("")
                say("Daca nu iti vom gasii un adversar, vei avea norocul")
                say("de a trece in runda urmatoare fara sa lupti.")
                say("")
                return
             end
             say("In runda urmatoare vei lupta impotriva lui:")
             say("")
             say_reward(""..pvp_manager.get_duel_partner().."")
             say("")
          end
          
          
          function make_duel_list()
             duel_list = { }
             local i = 0
             for ai = 1, attender_count, 1 do
                if pvp_attenders[ai] != nil and pvp_attenders[ai].partner == nil and pvp_attenders[ai].winner == true then
                   local partner_id = pvp_manager.findpartner(tostring(pvp_attenders[ai].name))
                   if partner_id != nil then
                      pvp_attenders[ai].partner = tostring(pvp_attenders[partner_id].name)
                      pvp_attenders[partner_id].partner = tostring(pvp_attenders[ai].name)
                      duel_list[i] = {fighter_id1 = ai, fighter_id2 = partner_id}
                      i = i + 1
                   end
                end
             end
             
             for ai = 1, attender_count, 1 do
                if pvp_attenders[ai] != nil and pvp_attenders[ai].partner == nil and pvp_attenders[ai].winner == true then
                   local partner_id = pvp_manager.findpartner_for_partnerless(tostring(pvp_attenders[ai].name))
                   if partner_id != nil then
                      pvp_attenders[ai].partner = tostring(pvp_attenders[partner_id].name)
                      pvp_attenders[partner_id].partner = tostring(pvp_attenders[ai].name)
                      duel_list[i] = {fighter_id1 = ai, fighter_id2 = partner_id}
                      i = i + 1
                   end
                end
             end
          end
          
          
          function findpartner(name)
             local partner_id = nil
             for ai = 1, attender_count, 1 do
                if pvp_attenders[ai] != nil and pvp_attenders[ai].winner == true and tostring(pvp_attenders[ai].name) != name and pvp_attenders[ai].partner == nil and pvp_manager.is_player_in_map(tostring(pvp_attenders[ai].name)) == true then
                        partner_id = ai
                end
             end
             return tonumber(partner_id)
          end
          
          function findpartner_for_partnerless(name)
             local closest_level = nil
             local partner_id = nil
             for ai = 1, attender_count, 1 do
                if pvp_attenders[ai] != nil and pvp_attenders[ai].winner == true and tostring(pvp_attenders[ai].name) != name and pvp_attenders[ai].partner == nil and pvp_manager.is_player_in_map(tostring(pvp_attenders[ai].name)) == true then
                    end
                end
             end
             return partner_id
          end
          
          function is_player_in_map(name)
             if pc.getname() == name then
                return true
             end
             local myname = pc.getname()
             local target = find_pc_by_name(name)
             local t = pc.select(target)
             if pc.getname() == myname then
                pc.select(t)
                return false
             end
             pc.select(t)
             return true
          end
          
          
          when 20088.chat."GM: Curata arenele" with pc.is_gm() and game.get_event_flag("pvp") == 3 begin
             for aArena = 1, 4, 1 do
                arena[aArena][3] = 0
                arena[aArena][4] = "SLEEPING"
             end
             pvp_manager.refresh_arenas()
          end
          
          -- not working
          --[[
          when 20088.chat."GM: Incheie lupta" with pc.is_gm() and game.get_event_flag("pvp") == 2 begin
             say_title("Incheie lupta:")
             say("In care arena doresti sa inchei lupta?")
             local s = select("Arena 1", "Arena 2", "Arena 3", "Arena 4", "Inapoi")
             
             if s == 5 then
                return
             end
             
             local fighter1 = nil
             local fighter2 = nil
             for ai = 1, attender_count, 1 do
                if pvp_attenders[ai].arena == s and pvp_attenders[ai].fight_mode != 0 then
                   if fighter1 == nil then
                      fighter1 = ai
                   else
                      fighter2 = ai
                   end
                end
             end
             
             if fighter1 == nil then
                say_title("Incheie lupta:")
                say("Nu sunt lupte in desfasurare in aceasta arena.")
                say("")
                return
             end
             
             say_title("Incheie lupta:")
             say("Cine ar trebuii sa fie ales castigator cand lupta in arena "..s.." ")
             say("va trebuii sa fie inchisa?")
             local w = select(tostring(pvp_attenders[fighter1].name), tostring(pvp_attenders[fighter1].name), "Cancel")
             if w == 3 then
                return
             end
             
             if w == 1 then
                pvp_attenders[fighter2].winner = false
                notice_in_map(tostring(pvp_attenders[fighter1].name).." a castigat lupta impotriva lui "..tostring(pvp_attenders[fighter2].name).."!", pc.get_map_index())
                pvp_manager.local_pc_warp(tostring(pvp_attenders[fighter1].name, 1112, 234))
                pvp_manager.local_pc_warp(tostring(pvp_attenders[fighter2].name, 1112, 24))
             else
                pvp_attenders[fighter1].winner = false
                notice_in_map(tostring(pvp_attenders[fighter2].name).." a castigat lupta impotriva lui "..tostring(pvp_attenders[fighter1].name).."!", pc.get_map_index())
                pvp_manager.local_pc_warp(tostring(pvp_attenders[fighter1].name, 1112, 24))
                pvp_manager.local_pc_warp(tostring(pvp_attenders[fighter2].name, 1112, 234))
             end
             
             pvp_attenders[fighter1].fight_mode = 0
             pvp_attenders[fighter2].fight_mode = 0
             
             
             arena[s][3] = 0
             pvp_manager.refresh_arenas()
             
             say_title("Incheie lupta:")
             say("Lupta s-a incheiat.")
          end
          --]]
          
          when 20088.chat."GM: Premiul Turneului Dojang" with pc.is_gm() begin
             say_title("Premiu:")
             say("Premiul actual: "..game.get_event_flag("pvp_price_count").."x "..item_name(game.get_event_flag("pvp_price_vnum")).." (vnum: "..game.get_event_flag("pvp_price_vnum")..")")
             say("")
             local s = select("Schimba premiul", "Close")
             if s == 2 then
                return
             end
             say_title("Schimba premiul:")
             say("Introdu codul noului premiu:")
             say("")
             local vnum = input()
             say_title("Schimba premiul:")
             say("Alege cantitatea de premii pe care o va primii castigatorul")
             say("")
             local count = input()
             game.set_event_flag("pvp_price_count", count)
             game.set_event_flag("pvp_price_vnum", vnum)
             say_title("Schimba premiul:")
             say("Premiul a fost schimbat.")
             say("Noul premiu: "..count.."x "..item_name(vnum).." (vnum: "..vnum..")")
             say("")
          end
    
          
          function refresh_arenas()
             for aArena = 1, 4, 1 do
                if duel_list[duel_list_index] == nil then
                   if playerless_mode == true then
                      pvp_manager.init_next_round()
                   else
                      pvp_manager.fight_playerless()
                   end
                   return
                end
                if arena[aArena][3] == 0 then
                   arena[aArena][3] = 1
                   pvp_manager.fight_init(duel_list[duel_list_index].fighter_id1, duel_list[duel_list_index].fighter_id2, aArena)
                end
             end
          end
          
    
          function fight_init(pid1, pid2, arena_id)
             duel_list_index = duel_list_index + 1
             if pvp_manager.is_player_in_map(tostring(pvp_attenders[pid1].name)) == false then
                notice_in_map(tostring(pvp_attenders[pid1].name).." nu este online si a fost descalificat.", pc.get_map_index())
                pvp_attenders[pid1].winner = false
                pvp_attenders[pid2].partner = nil
                arena[arena_id][3] = 0
                pvp_manager.refresh_arenas()
                return
             end
             if pvp_manager.is_player_in_map(tostring(pvp_attenders[pid2].name)) == false then
                notice_in_map(tostring(pvp_attenders[pid2].name).." nu este online si a fost descalificat.", pc.get_map_index())
                pvp_attenders[pid2].winner = false
                pvp_attenders[pid1].partner = nil
                arena[arena_id][3] = 0
                pvp_manager.refresh_arenas()
                return
             end
             
             notice_in_map(tostring(pvp_attenders[pid1].name).." si "..tostring(pvp_attenders[pid2].name).." intrati in ring va rog!", pc.get_map_index())
             
             --[[
             local f1_accept = ask_fight(tostring(pvp_attenders[pid1].name), tostring(pvp_attenders[pid2].name))
             if f1_accept != CONFIRM_OK then
                notice_in_map(tostring(pvp_attenders[pid1].name).." a refuzat lupta impotriva "..tostring(pvp_attenders[pid2].name)..".", pc.get_map_index())
                pvp_attenders[pid1] = nil
                pvp_attenders[pid2].partner = nil
                pvp_manager.refresh_arenas()
                return
             end
             
             local f2_accept = confirm(find_pc_by_name(tostring(pvp_attenders[pid2].name)), "a refuzat lupta impotriva "..tostring(pvp_attenders[pid1].name).. " an?", 15)
             if f2_accept != CONFIRM_OK then
                notice_in_map(tostring(pvp_attenders[pid2].name).." a refuzat lupta impotriva  "..tostring(pvp_attenders[pid1].name)..".", pc.get_map_index())
                pvp_attenders[pid2] = nil
                pvp_attenders[pid1].partner = nil
                pvp_manager.refresh_arenas()
                return
             end
             ]]
             
             pvp_attenders[pid1].fight_mode = 1
             pvp_attenders[pid2].fight_mode = 1
             pvp_attenders[pid1].arena = arena_id
             pvp_attenders[pid2].arena = arena_id
             
             
             pvp_manager.local_pc_warp(tostring(pvp_attenders[pid1].name), arena[arena_id][1][1], arena[arena_id][1][2])
             pvp_manager.local_pc_warp(tostring(pvp_attenders[pid2].name), arena[arena_id][2][1], arena[arena_id][2][2])
          end
          
          when login with pc.get_map_index() == 112 and game.get_event_flag("pvp") == 3 and pvp_manager.get_fight_mode() == 1 begin
             affect.add(apply.MOV_SPEED, -10000, 2)
             affect.add_collect(apply.HP_REGEN, 5000, 30)
             affect.add_collect(apply.SP_REGEN, 5000, 30)
             affect.remove_good()
             affect.remove_bad()
             affect.remove(apply.AFFECT_JUMAGAP) -- Remove "Remove Magic"
    
             pvp_manager.set_fight_mode(2)
             if arena[pvp_manager.get_arena()][3] == 2 then
                arena[pvp_manager.get_arena()][5] = 30
                loop_timer("fight_start_countdown", 1)
             else
                timer("partner_timeout", 60)
             end
             arena[pvp_manager.get_arena()][3] = 2
          end      
          
          when partner_timeout.timer begin
             if pvp_manager.is_player_in_map(pvp_manager.get_duel_partner()) == true or game.get_event_flag("pvp") != 2 or pvp_manager.get_fight_mode() != 2 then
                return
             end
             pvp_manager.set_fight_mode(3)
             if arena[pvp_manager.get_arena()][3] == 3 then
                return
             end
             arena[pvp_manager.get_arena()][3] = 3
             notice_in_map(pc.getname().." a castigat lupta impotriva lui "..pvp_manager.get_duel_partner().." prin descalificare!", pc.get_map_index())
             pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].fight_mode = 3
             pvp_attenders[pvp_manager.get_my_attender_id()].winner = true
             pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].winner = false
             pc.warp_local(pc.get_map_index(), 111200, 23400)
          end
    
          when fight_start_countdown.timer begin
             if arena[pvp_manager.get_arena()][5] == -1 then
                return
             end
             local partner_vid = find_pc_by_name(pvp_manager.get_duel_partner())
             local my_vid = pc.get_vid()
             if arena[pvp_manager.get_arena()][5] == 0 then
                arena[pvp_manager.get_arena()][5] = -1
                --pc.select(partner_vid)
                --command("pvp "..my_vid)
                --pc.select(my_vid)
                --command("pvp "..partner_vid)
                pc.start_duel(partner_vid)
                notice_in_map("Lupta dintre "..pvp_manager.get_duel_partner().." si "..pc.get_name().." incepe!", pc.get_map_index())
                timer("fight_start_countdown_shutdown", 1)
             else
                pc.select(partner_vid)
                if math.mod(arena[pvp_manager.get_arena()][5], 5) == 0 then
                   syschat("Lupta incepe in "..tostring(arena[pvp_manager.get_arena()][5]).." secunde.")
                end
                affect.add(apply.MOV_SPEED, -10000, 2)
                pc.select(my_vid)
                if math.mod(arena[pvp_manager.get_arena()][5], 5) == 0 then
                   syschat("Lupta incepe in  "..tostring(arena[pvp_manager.get_arena()][5]).." secunde.")
                end
                affect.add(apply.MOV_SPEED, -10000, 2)
                arena[pvp_manager.get_arena()][5] = arena[pvp_manager.get_arena()][5] - 1
             end
          end
          
          when fight_start_countdown_shutdown.timer begin
             cleartimer("fight_start_countdown")
          end
          
          when logout with game.get_event_flag("pvp") == 3 and pc.get_map_index() == 112 and pvp_manager.get_fight_mode() == 2 begin
             pvp_manager.set_fight_mode(3)
             arena[pvp_manager.get_arena()][3] = 3
             notice_in_map(pvp_manager.get_duel_partner().." has won the fight against "..pc.getname().."!", pc.get_map_index())
             pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].fight_mode = 3
             pvp_attenders[pvp_manager.get_my_attender_id()].winner = false
             pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].winner = true
             
             local target = find_pc_by_name(pvp_manager.get_duel_partner())
             local t = pc.select(target)
             pc.change_gold(game.get_event_flag("pvp_round_gold")*pvp_round_num)
             pc.select(t)
             
             pvp_manager.local_pc_warp(pvp_manager.get_duel_partner(), 1112, 24)
          end
          
          when kill with game.get_event_flag("pvp") == 3 and pc.get_map_index() == 112 and npc.is_pc() and pvp_manager.get_fight_mode() == 2 begin
             pvp_manager.set_fight_mode(3)
             if arena[pvp_manager.get_arena()][3] == 3 then
                return
             end
             arena[pvp_manager.get_arena()][3] = 3
             notice_in_map(pc.getname().." a castigat lupta impotriva lui "..pvp_manager.get_duel_partner().."!", pc.get_map_index())
             pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].fight_mode = 3
             pvp_attenders[pvp_manager.get_my_attender_id()].winner = true
             pvp_attenders[pvp_manager.get_attender_id_by_name(pvp_manager.get_duel_partner())].winner = false
             
             pc.change_gold(game.get_event_flag("pvp_round_gold")*pvp_round_num)
             
             timer("fight_end", 5)
          end
          
          when fight_end.timer begin
             pc.warp_local(pc.get_map_index(), 111200, 23400)
             pvp_manager.local_pc_warp(pvp_manager.get_duel_partner(), 1112, 24)
          end
          
          when letter with pc.get_map_index() == 112 and game.get_event_flag("pvp") == 3 and pvp_manager.get_fight_mode() == 3 begin
             pvp_manager.set_fight_mode(0)
             
             if pvp_attenders[pvp_manager.get_my_attender_id()].winner == true then
                arena[pvp_manager.get_arena()][3] = 0
                pvp_manager.refresh_arenas()
             end
          end
          
          function fight_playerless()
             for aArena = 1, 4, 1 do
                if arena[aArena][3] != 0 then
                   return
                end
             end
             playerless_mode = true
    
             
             pvp_manager.make_duel_list()
             pvp_manager.refresh_arenas()
          end
          
          function init_next_round()
             for aArena = 1, 4, 1 do
                if arena[aArena][3] != 0 then
                   return
                end
             end
             playerless_mode = false
             
             local winner_count = 0
             local winner_id = 0
             for ai = 1, attender_count, 1 do
                pvp_attenders[ai].partner = nil
                pvp_attenders[ai].fight_mode = 0
                if pvp_attenders[ai] != nil and pvp_attenders[ai].winner == true then
                   winner_count = winner_count + 1
                   winner_id = ai
                end
             end
             
             if winner_count == 1 then
                notice_all(pvp_attenders[winner_id].name.." a castigat Turneul Dojang!")
                notice_all(pvp_attenders[winner_id].name.." primeste "..game.get_event_flag("pvp_price_count").."x "..item_name(game.get_event_flag("pvp_price_vnum")).." ca premiu!")
                
                pvp_manager.distribute_bets(pvp_attenders[winner_id].name)
                
                local target = find_pc_by_name(pvp_attenders[winner_id].name)
                local t = pc.select(target)
                pc.give_item2(game.get_event_flag("pvp_price_vnum"), game.get_event_flag("pvp_price_count"))
                pc.select(t)
                notice_all("Turneul Dojang s-a incheiat.")
                game.set_event_flag("pvp", 0)
                
                if game.get_event_flag("pvp_tournament_type") ~= 0 and game.get_event_flag("pvp_tournament_type") < 5 then
                   local player_found = false
                   local new_content = ""
                   local player_row = "%d\\t%s\\n"
    
                   local f = io.open("data/"..pvp_manager.retrieve_hof_name(game.get_event_flag("pvp_tournament_type")), "r")
                   if f ~= nil then
                      for line in f:lines() do
                         local data = string.split(line, "\\t") --format: [wins] [playername]
    
                         if new_content ~= "" then
                            new_content = new_content .. "\\n"
                         end
    
                         if tostring(data[2]) == pvp_attenders[winner_id].name and not player_found then
                            new_content = new_content .. string.format(player_row, tonumber(data[1]) + 1, pvp_attenders[winner_id].name)
                            player_found = true
                         else
                            new_content = new_content .. line
                         end
                      end
                      f:close()
                   end
    
                   if not player_found then
                      new_content = new_content .. "\\n" .. string.format(player_row, 1, pvp_attenders[winner_id].name)
                   end
    
                   pvp_manager.replace_hof(game.get_event_flag("pvp_tournament_type"), new_content)
                end
    
                game.set_event_flag("pvp_tournament_type", 0)
                pvp_attenders = nil
                return
             end
             
             pvp_manager.make_duel_list()
             duel_list_index = 0
             if winner_count == 2 then
                notice_all("Runda finala din Turneu incepe acum!")
             elseif winner_count <= 4 then
                notice_all("Runda semi-finala din Turneu incepe acum!")
             else
                notice_all("Urmatoarea runda din Turneu incepe acum!")
             end
             pvp_round_num = pvp_round_num + 1
             pvp_manager.refresh_arenas()
          end
          
          function distribute_bets(winner_name)
             --table.insert(betting_list, {pc.get_name(), bet_amount, player})
             local jackpot = 0
             local jackpot_winner_only = 0
             local winners = 0
             for i = 1, table.getn(betting_list), 1 do
                if betting_list[i][3] == winner_name then
                   jackpot_winner_only = jackpot_winner_only + betting_list[i][2]
                end
                jackpot = jackpot + betting_list[i][2]
                winners = winners + 1
             end
             
             for i = 1, table.getn(betting_list), 1 do
                if betting_list[i][3] == winner_name then
                   pvp_manager.give_jackpot_gold(betting_list[i][1], math.ceil( (betting_list[i][2] / jackpot_winner_only)*jackpot ))
                end
             end
             
          end
          
          function give_jackpot_gold(name, amount)
             local target = find_pc_by_name(name)
             if target == 0 then
                return
             end
             local t = pc.select(target)
             pc.change_money(amount)
             pc.select(t)
          end
          
          function local_pc_warp(name, x, y)
             local target = find_pc_by_name(name)
             local t = pc.select(target)
             pc.warp_local(pc.get_map_index(), x*100, y*100)
             pc.select(t)
          end
          
          function setqf_by_name(name, flag, value)
             local target = find_pc_by_name(name)
             local t = pc.select(target)
             pc.setqf(flag, value)
             pc.select(t)
          end
          
          function getqf_by_name(name, flag)
             local target = find_pc_by_name(name)
             local t = pc.select(target)
             local rflag = pc.getqf(flag)
             pc.select(t)
             return rflag
          end
          
          function get_attender_id_by_name(name)
             for ai = 1, attender_count, 1 do
                if tostring(pvp_attenders[ai].name) == name then
                   return ai
                end
             end
             return 0
          end
          
          function get_my_attender_id()
             return pvp_manager.get_attender_id_by_name(pc.get_name())
          end
          
          function get_duel_partner()
             if pvp_attenders[pvp_manager.get_my_attender_id()] != nil and pvp_attenders[pvp_manager.get_my_attender_id()].partner != nil then
                return pvp_attenders[pvp_manager.get_my_attender_id()].partner
             else
                return nil
             end
          end
          
          function get_fight_mode()
             if pvp_attenders != nil and pvp_manager.get_my_attender_id() != 0 and pvp_attenders[pvp_manager.get_my_attender_id()] != nil and pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode != nil then
                return pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode
             else
                return 0
             end
          end
          
          function set_fight_mode(fmode)
             pvp_attenders[pvp_manager.get_my_attender_id()].fight_mode = fmode
          end
          
          function get_arena()
             return pvp_attenders[pvp_manager.get_my_attender_id()].arena
          end
          
          function set_arena(id)
             pvp_attenders[pvp_manager.get_my_attender_id()].arena = id
          end
          
          function ask_fight(asker, target)
             return confirm(find_pc_by_name(target), "Te vei lupta impotriva "..asker.. "?", 15)
          end
          
          function retrieve_hof_name(tournament_num)
             local names = {"pvp_dojang"}
             return names[tournament_num]
          end
    
          function replace_hof(tnum, content)
             local f = io.open("data/"..pvp_manager.retrieve_hof_name(tnum), "w+")
             f:write(content)
             f:close()
          end
    
          function get_hof(tnum, offset, playerAmount)
             local f = io.open("data/"..pvp_manager.retrieve_hof_name(tnum), "r")
             if not f then 
                return function() return nil end 
             end
    
             local participants = {}
             for line in f:lines() do
                local data = string.split(line, "\t")
                if data[2] ~= nil then
                   participants[data[2]] = tonumber(data[1])
                end
             end
             f:close()
    
             local sorter = function(tb,a,b) return tonumber(tb[b]) < tonumber(tb[a]) end
             return table.sort_by_value(participants, sorter, offset, playerAmount)
          end
          say("")
       end
    end
    

    Tutorial instalare quest:

    • Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest

    • Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    • Îl puneţi acolo (să fie .quest sau .lua) şi da-ţi permisiuni 777.

    • Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/questapoi ./qc nume_quest.quest

    • Intraţi pe server şi scrieţi /reload q

  12. #472
    Reply in Gaming
    
    quest puntos_metin begin
    state start begin
    
    when 8001.kill or 8002.kill or 8003.kill or 8004.kill or 8005.kill or 8006.kill 
    or 8007.kill or 8008.kill or 8009.kill or 8010.kill or 8011.kill or 8012.kill
    or 8013.kill or 8014.kill or 8024.kill or 8025.kill or 8026.kill or 8027.kill begin
    
    local metin = {
    
    [8001] = {1,"Metinul Necazului"},
    [8002] = {1,"Metinul Luptei"},
    [8003] = {1,"Metinul Bataliei"},
    [8004] = {1,"Metinul Lacomiei"},
    [8005] = {1,"Metinul Amarului"},
    [8006] = {1,"Metinul Intunericului"},
    [8007] = {1,"Metinul Geloziei"},
    [8008] = {1,"Metinul Sufletului"},
    [8009] = {1,"Metinul Umbrei"},   
    [8010] = {1,"Metinul Puterii"},
    [8011] = {1,"Metinul Diavolului"},
    [8012] = {1,"Metinul Dizgratiei"},
    [8013] = {1,"Metinul Mor-tii"},
    [8014] = {1,"Metinul Crimelor"},
    [8024] = {1,"Metin Pung-Ma"},
    [8025] = {1,"Metin Ma-An"},
    [8026] = {1,"Metin Tu-Young"},
    [8027] = {1,"Metin Jeon-Un"}
    
    }
    
    
    pc.give_item2("30157",metin[npc.get_race()][1])
    chat("Ai distrus un "..metin[npc.get_race()][2]..", obti "..metin[npc.get_race()][1].." puncte!")
    
    end
    
    when 20094.chat."Premi cu puncte!" begin
    
    say_title("Premi cu puncte!")
    say("")
    say("Salut "..pc.get_name().." aici poti sa cheltuiesti punctele tale")
    say("care le poti castiga distrugand")
    say("metinele care le vei gasi pe server!")
    say("")
    say("Fiecare metin iti va da 1 punct")
    say("In acest moment ai "..pc.count_item("30157").." puncte")
    say("")
    say("Ce vrei sa faci?")
    say("")
    
    local canj = select ("Cumpara" , "Iesire")   
    
    if canj == 1 then
    
    
    say_title("Premi cu puncte!")
    say("")
    local elegir = select("Perla Alba","Perla Albastra","Perla Rosie","5 Bonus","Panda","Metal Magic","Cec 1,5kkk","Iesire")
    local premios = {
    
    {27992,1,30157,5},
    {27993,1,30157,5},
    {27994,1,30157,5},
    {70024,1,30157,10},
    {71142,1,30157,25},
    {25041,1,30157,50},
    {100240,1,30157,400}
    
    }
    
    if elegir != 8 then
    
    if pc.count_item(premios[elegir][3]) < premios[elegir][4] then
    
    say_title("Premi cu puncte!")
    say("")
    say("Imi pare rau, dar nai punctele necesare")
    say("pentru a cumpara acest item")
    say("")
    say("Mai ai nevoie de "..premios[elegir][4]-pc.count_item(premios[elegir][3]).." pentru al cumpara")
    say("revino cand ai toate punctele necesare")
    say("")
    return
    end
    
    pc.give_item2(premios[elegir][1],premios[elegir][2])
    pc.remove_item(premios[elegir][3],premios[elegir][4])
    
    end
    end
    end   
    end
    
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q .

     

  13. #473
    Reply in Gaming
    
    quest balon_aur begin 
        state start begin 
            when 50265.use begin                         
                local box = { 
                    -- Iteme Speciale -- 
                    72726, 72730, 27992, 27993, 27994, 30500, 30501, 30503,
                30504, 30506, 30507, 30511, 30514, 30517, 71123, 71129,
                52004, 52006, 52007, 55405, 55001, 55009, 55003, 55004,
                55005, 53232, 53023, 72703, 72704, 72705, 72706, 71143,
                71158, 55402, 55403, 55404, 52028, 52029, 52030, 52031,
                52032,
                    -- Skinuri arma speciale -- 
                    40130, 40131, 40132, 40133, 40134, 40135, 40136, 40137,
                40138, 40139, 40140, 40141, 40142, 40143,
                    -- Costume de paste -- 
                    41015, 41016, 41023, 41024,
                    -- Esarfe -- 
                    85001, 85005, 85010, 85014,
                    -- Iteme Item-Shop -- 
                    100300, 100400, 100500,
                    -- Alchimie -- 
                    114000, 124000, 134000, 144000, 154000, 164000,
                113000, 123000, 133000, 143000, 153000, 163000,
                112000, 122000, 132000, 142000, 152000, 162000,
                111000, 121000, 131000, 141000, 151000, 161000,
                      } 
                local give,a = number(1, 1),{} 
                local items 
                for i = 1, give do 
                    items = number(1, table.getn(box)) 
                    table.insert(a,i,box[items]) 
                end 
                table.foreach(a, 
                    function(i,l) 
                        pc.give_item2(l) 
                    end 
                ) 
                pc.remove_item(50265, 1)
            end 
        end 
    end
    

    Tutorial instalare quest:

    • Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest

    • Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    • Îl puneţi acolo (să fie .quest sau .lua).

    • Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/questapoi ./qc nume_quest.quest

    • Intraţi pe server şi scrieţi /reload q

  14. #474
    Reply in Gaming
    
    quest sistem_animale begin
       state start begin
       function Calareste( vnum )   
       when 71114.use or 71116.use or 71118.use or 71120.use
       or 71124.use or 71125.use or 71126.use or 71127.use or 71128.use
       or 71131.use or 71132.use or 71133.use or 71134.use
       or 71137.use or 71138.use or 71139.use or 71140.use begin 
          
          horse.unsummon()
    
          if pc.get_map_index() == 113 or
          pc.get_map_index() == 222 then   
          
             command ( "unmount" )      
             chat ( "Nu poþi invoca un animal in acest loc." )
          
          return
          end
       sistem_animale.Calareste(item.get_vnum())
       end
       
       when login begin
          if pc.get_map_index() == 113 or
          pc.get_map_index() == 222 then         
             command ( "unmount" )
          return
          end
          
          local vnum, remain_time = pc.get_special_ride_vnum()
          if 0 != vnum then
             if pc.is_polymorphed() then
                return
             elseif pc.is_riding() then
                return
             else
             
             command ( "unmount" )
             
             end
          end
       end
    

    Tutorial instalare quest:

    • Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest

    • Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    • Îl puneţi acolo (să fie .quest sau .lua).

    • Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/questapoi ./qc nume_quest.quest

    • Intraţi pe server şi scrieţi /reload q

  15. #475
    [Resursă] Quest Swich Fix
    Reply in Gaming
    
    quest switch_fix begin
                    state start begin                                    
     when 20094.chat."Cumpara Vrajeste obiectul" begin
                                    local pcLevel = 10
                                    local minItem = 1
                                    local maxItem = 200
                    local itemValue = 71084
                                    local singleCost = 5000
                                    say_title("Hong-Hae:")
                                    say_reward("Buna, eu sunt Hong-Hae.")
                                    say_reward("Cu ajutorul meu, vei cumpara cate Vrajeste Obiectul")
                                    say_reward("vrei, pentru a-ti schimba bonusurile de pe iteme.")
                                    say_item_vnum(itemValue)
                                    say_reward("Introduceti câte Vrajeste Obiectul doriti sa")
                    say_reward("cumparati. Totusi, puteti cumpara numai o suma")
                               say_reward(string.format("exacta, intre %d si %d de bucati.", minItem, maxItem))
                                    local quant = math.floor(tonumber(input()))
                                    if quant < minItem or quant> maxItem or quant == nil then
                                            say_title("Hong-Hae:")
                                            say_reward("Îmi pare rau, nu am asa de multe bonusuri.")
                                            say_reward(string.format("Suma trebuie sa fie între %d si %d", minItem, maxItem))
                                            return
                                    end
                                    say_title("Hong-Hae:")
    if pc.get_empty_inventory_count() <= 2 then
             syschat("Ai inventarul plin. Arunca ceva din inventar.")
          return
          end    
                                    say_reward("Ei bine, ati facut decizia perfecta.[ENTER]")
                                    say_reward(string.format("Numarul solicitat: %d", quant))
                                    say_reward(string.format("Nivel necesar: %d", pcLevel))
                                    say_reward(string.format("Nivelul tau: %d", pc.get_level()))
                                    say_reward(string.format("Un singur Vrajeste obiectul costa: %d Yang", singleCost))
                                    say_reward("")
                                    local price = quant*singleCost
                                    say_reward(string.format("Suma totala: %d Yang.", price))
                                    say_reward("")
                                    say_reward("Introduceti codul de mai jos, pentru cumparare.")
                                    local psw = number(10000,99999)
                                    say_reward("Cod de siguranta: "..psw)
                                    local check = tonumber(input())
                                    --controlli--
                                    say_title("Hong-Hae:")
                                    if check != psw or check == nil then
                                            say_reward("Codul introdus nu se potrive?te.")
                                            say_reward("Introduceti-l corect data viitoare.")
                                            return
                                    end
                                    if pc.count_item(itemValue) > 0 then
                                            say_reward("Nu poti primi alte Vrajeste Obiectul")
                                            say_reward("Prima data terminale pe cele din inventar.")
                                            return
                                    end
                                    if pc.get_gold() < price then
                                            say_reward("Nu aveti suficienti yang,")
                                            say_reward("revino când ai suma necesara.")
                                            return
                                    end
                                    if pc.get_level() < pcLevel then
                                            say_reward("Nu ai nivelul necesar pentru a continua.")
                                            say_reward("Reintoarcete înapoi când ai nivelul necesar.")
                                            return
                                    end
                                    -- end control--
                                    say_reward("Multumesc ca ai cumparat, ai primit")
                                    say_item_vnum(itemValue)
                                    say_reward("Mai vino pe aici, cand ai nevoie!")
                                    pc.changegold(-price)
                                    pc.give_item2(itemValue, quant)
                            end
                    end
            end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  16. #476
    Reply in Gaming
    
    =============================================
    =      Quest creat de             =
    =      www.             =                                     
    =============================================
    quest atinge_mountul begin
      state start begin
          when 20213.take with 50068 == item.vnum begin -- atinge mountul cu pergamentul transformarii
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de ren (m) .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru ren (m) .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52705,1) -- primeste autorizatia
             pc.remove_item(50068,1) -- sterge pergamentul de transformare
             npc.purge() -- animalul dispare
          end
          when 20216.take with 50068 == item.vnum begin
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de ren (f) .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru ren (f) .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52706,1)
             pc.remove_item(50068,1)
             npc.purge()
          end
          when 20204.take with 50068 == item.vnum begin
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de leu .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru leu .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52701,1)
             pc.remove_item(50068,1)
             npc.purge()
          end
          when 20203.take with 50068 == item.vnum begin
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de tigru .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru tigru .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52702,1)
             pc.remove_item(50068,1)
             npc.purge()
          end
          when 20202.take with 50068 == item.vnum begin
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de lup .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru lup .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52704,1)
             pc.remove_item(50068,1)
             npc.purge()
          end
          when 20201.take with 50068 == item.vnum begin
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de mistret .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru mistret .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52703,1)
             pc.remove_item(50068,1)
             npc.purge()
          end
          when 20223.take with 50068 == item.vnum begin
             say("Felicitări!")
             say("Ai reusit sa prinzi puiul de dragor .")
             say("De o gramada de timp ma chinui sa il prind")
             say("sa il bag inapoi in grajd ..")
             say("Inca o data iti multumesc!")
             say("Drept recompensa primesi autorizatie pentru dragor .")
             say("Pentru al preschimba in mount dute la grajdar .")
             pc.give_item2_select(52707,1)
             pc.remove_item(50068,1)
             npc.purge()
          end -- inchid quest
       end -- inchid state
    end -- inchid when
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q.

  17. #477
    Reply in Gaming
    
        quest dropdiavol begin
           state start begin
              when 2401.kill or 2402.kill or 2403.kill or 2404.kill with game.get_event_flag("drop_posedata") == 1 begin
              local s = number(1, 200)
              
                       if pc.get_level() >= 85 and pc.get_level() <= 99 then
                       local r=number(1, 30)
                       if r==1 then
                            pc.give_item2("30196", 1)
                       pc.give_item2("30195", 1)
                       pc.give_item2("30198", 1)
                       pc.give_item2("30199", 1)
                    end
                 end
              end
           end
        end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest

    5. Intraţi pe server şi scrieţi /reload q .

  18. #478
    Reply in Gaming
    
    quest sterge_item begin
       state start begin
          when 20041.take begin
             say_title("Cetateanul Turmentat:")
             say("Vrei sa distrugi acest obiect?")
           
             say_item(item.get_name(item.vnum), item.vnum, "")
           
             say("")
             say("")
             say("")
             say("")
             say("")
             say("")
    
    
             local destroy = select("Da","Nu")
             if destroy == 2 then
                return
             else
                local s = number(1, 200)
                say_title("Cetateanul Turmentat:")
                say("Pentru siguranta, introdu codul de mai jos:")
                say_reward(s)
              
                local code = tonumber(input(""))
              
                   if code == s then
                      item.remove()
    
                      say_title("Cetateanul Turmentat:")
                      say("Obiectul a fost distrus cu succes!")
                    
                      wait()
    
                      return
                   else
                      say_title("Cetateanul Turmentat:")
                      say("Codul este incorect!")
                   end             
             end
          end
        end
    end
    

    Tutorial instalare quest:

    1. Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu rasplata.quest .

    2. Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).

    3. Îl puneţi acolo (să fie .quest) şi da-ţi permisiuni 777.

    4. Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc rasplata.quest

    5. Intraţi pe server şi scrieţi /reload q .

  19. #479
    Reply in Gaming
    
    ----------------------------------------------------
    -- Quest Relizat De Alexandru George
    ----------------------------------------------------
    quest reset_status begin
    state start begin
    when 71103.use or 71104.use or 71105.use or 71106.use begin
    local name = { "VIT", "INT", "STR", "DEX" }
    local idx = item.get_vnum() - 71103
    local func = { pc.get_ht, pc.get_iq, pc.get_st, pc.get_dx }
    say_title("Resetare status ( Just4Metin )")
    if func[idx+1]() == 1 then
    say(name[idx+1].." Ati resetat deja.")
    say(name[idx+1].." Nu puteti reseta")
    return
    end 
    say("Folosind acest pergament puteti reseta")
    say(name[idx+1].." punctele dumneavoastra.")
    say("")
    say_reward("Vrei sa "..name[idx+1].." resetezi?")
    local s = select("Da", "Nu")
    if s == 1 then
    if pc.reset_status( idx ) == true then
    say_title("Resetare status")
    say_reward("Punctele de "..name[idx+1].." au fost resetate!")
    pc.remove_item(item.get_vnum())
    else
    say_title("Resetare status ( just4metin )")
    say_reward("A aparut o eroare.")
    end
    end
    end
    end
    end
    

    Tutorial Instalare:

    1. Se creeaza un text cu numele resetare-status.quest

    . Va conectati la filezilla / winscp si intrati in /usr/home/game/share/locale/turkey/quest (depinde ce server aveti).

    3. Il puneti acolo (sa fie .quest) si da-ti permisiuni 777

    4. Te loghezi in FreeBSD / putty si scri asa cd /usr/home/game/share/locale/turkey/quest apoi ./qc resetare-status.quest

    5. Intrati pe server si scrieti /reload q

  20. #480