Jump to content

[007]DawisHU

Member
  • Posts

    258
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by [007]DawisHU

  1. 20 hours ago, Fleon said:

    for python`s sake

     

    mylist = ["(VIP1)","(VIP2)","(VIP3)","(VIP4)","(VIP5)","(VIP6)","(VIP7)","(VIP8)","(VIP9)","(VIP10)"]
    enumeratelist = list(enumerate(mylist, start=29))
     
    for e_value,vip in enumeratelist:
    if gamemasta.find(str(vip))!=-1:
    if self.lastupdate == 0:
    self.lastupdate = app.GetGlobalTimeStamp()
    if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
    self.lastupdate = app.GetGlobalTimeStamp()
    net.SendEmoticon(int(e_value))

    Nice.
    I just give example  for beginner's in python :)
    You python code awesome.
     

    On 2016. 08. 17. at 10:42 PM, Lehel said:

    Where can I find the interface (taskbar) you're using? Please tell me.

    This is illumina V3.0 interface :D
    It's better

    My work

     

    • Metin2 Dev 2
    • Lmao 1
    • Love 2
  2. On Monday, August 21, 2017 at 4:37 PM, sxvoyz said:

    (query: SELECT id, name, job, voice, dir, x, y, z, map_index, exit_x, exit_y, exit_map_index, hp, mp, stamina, random_hp, random_sp, playtime, gold, level, level_step, st, ht, dx, iq, exp, stat_point, skill_point, sub_skill_point, stat_reset_count, part_base, part_hair, part_sash, skill_level, quickslot, skill_group, alignment, mobile, horse_level, horse_riding, horse_hp, horse_hp_droptime, horse_stamina, UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_play), horse_skill_point, chequeFROM player WHERE id=31278 errno: 1064)

    Syntax error.

    Not good 

    In quest local coins = insert here select querry.

    And quest cmdchat(""..coins.."")

  3. On 2017. 05. 29. at 11:33 AM, Syreldar said:

    Hi, metin2devs and metin2users.
    Many times i've seen a server use a quest like this one, to notice the kill of the bosses or to trigger special drops/events:

      Hide contents
    
    
    -----------------------------------------------------
    ----  Scris cu diacritice de Donici Cãtãlin  ----
    -----------------------------------------------------
    quest mob_kill_notice begin
       state start begin
          when 691.kill begin
             if pc.is_gm() then
             return
             end
             pc . change_alignment ( 300 )
             chat ("Gradul tãu a crescut cu 300 de puncte!")
             notice_all ( pc.getname() , " l-a omorât pe ªeful Orc din Valea Orcilor!" )
          end
         
          
          when 1403.kill begin
             if pc.is_gm() then
             return
             end
             pc . change_alignment ( 300 )
             pc . give_item2 ( 50034 )
             chat ("Ai primit 1 ladã misterioasa ºi gradul tãu a crescut cu 300 de puncte!")
             notice_all ( pc.getname() , " l-a omorât pe Gigantul Milenar!" )
          end
       end
    end

     

    That is absolutely obnoxious in my opinion, totally obnoxious.
    I'm here today to show you the simplest, cleanest and shortest way to deal with something like this: A quest which communicates with a simple library in order to get global notice and eventual drop from a boss/monster or metin kill, the quest is coded to work with bosses, but it's fully ampliable and 100% customizable to your likings.
    I release this in hope to see less quests like the one i put into a spoiler (no one should see that, it could spread terminal cancer).

    As always, the library is fully customizable.
    Each function contains a clear explanation of its structure and what it does.

    Have fun!

    Function Library File (.lua):

      Hide contents
    
    
    --[[
    	Initializes:
    		The 'Boss' class.
    ]]
    Boss = {}
    
    --[[
    	Returns:
    		The 'data' array.
    
    	Structure:
    		[vnum] = {["type"] = The boss' type (Normal = 1, Dungeon = 2, Event = 3), ["drop"] = {["vnum"] = The vnum of the drop (0 if none), ["quant"] = The quantity of the item to drop}, ["notice"] = true if the kill should be globally announced, else false}
    
    ]]
    Boss.GetData = function()
    	local data = {
    		--** Normals
    		[591]  = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Bestial Captain
    		[691]  = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Chief Orc
    		[792]  = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Dark-Ghost Leader
    		[1304] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Yellow Tiger Ghost
    		[1901] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Nine Tails
    		[2091] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Queen Spider
    		[2191] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Giant Tortoise
    		[2206] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Flame King
    		[2306] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Giant Ghost Tree
    		[5161] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Rock Ape
    		[5162] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Walking Ape
    		[5163] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Ape Lord
    
    		--** Demon Tower
    		[1091] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Demon King
    		[1092] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Proud Demon King
    		[1093] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Death Reaper
    		
    		--** Spiders Cave
    		[2092] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Spider Baroness
    		
    		--** Grotto of Exile 1st Floor
    		[1192] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Mighty Ice Witch
    
    		--** Grotto of Exile 2nd Floor
    		[2492] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** General Yonghan
    		[2495] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** General Huashin
    		
    		--** Grotto of Exile's Dragon Lair
    		[2493] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Beran-Setaou
    
    		--** Devil's Catacomb
    		[2591] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Tartaros
    		[2597] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Charon
    		[2598] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Azrael
    		
    		--** The Dark Dragons
    		[3090] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Gnoll Lord
    		[3091] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Supreme Gnoll Guard
    		[3190] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Arges
    		[3191] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Polyphemos
    		[3290] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Rakshasa
    		[3291] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Martyaxwar
    		[3390] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Lemures Prince
    		[3391] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Lemures Bodyguard
    		[3490] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** General Kappa
    		[3491] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Triton
    		[3590] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Bone Face
    		[3591] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Red Chief
    		[3595] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Brutal Bone Face
    		[3596] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Brutal Red Chief
    		[3690] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** General Lobster
    		[3691] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** King Crab
    		[3790] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Gargoyle
    		[3791] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** King Wubba
    		[3890] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Captain Shruk
    		[3891] = {["type"] = 1, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** The Great Ogre
    
    		--** Blazing Purgatory
    		[6051] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Ignator
    		[6091] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Razador
    
    		--** Nemere's Watchtower
    		[6151] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Szel
    		[6191] = {["type"] = 2, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Nemere
    
    		--** Event Bosses
    		[692]  = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Elite Chief Orc
    		[693]  = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Reborn Chief Orc
    		[794]  = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** ??
    		[795]  = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** ??
    		[993]  = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** ??
    		[1094] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** ??
    		[1095] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Blue Death
    		[1191] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Ice Witch
    		[1334] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Gr. Yellow Tiger Spirit
    		[1902] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Elite Nice Tails
    		[1903] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Elite Nine Tails (Black)
    		[2093] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Dark Spider Queen
    		[2192] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Dark Giant Tortoise
    		[2207] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Dark Flame King
    		[2291] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}, --** Red Dragon
    		[2307] = {["type"] = 3, ["drop"] = {["vnum"] = 0, ["quant"] = 0}, ["notice"] = true}  --** Phantom Tree Lord
    	};
    
    	return data;
    end -- function
    
    --[[
    	Returns:
    		true if the vnum of the monster inserted in the 'vnum' argument matches a boss' vnum
    		else, false.
    ]]
    Boss.IsBoss = function(vnum)
    	return table_contains_keyword(Boss.GetData(), vnum);
    end -- function
    
    --[[
    	Returns:
    		The boss' type if the vnum inserted in the argument 'vnum' matches a boss' vnum,
    		else, nil.
    ]]
    Boss.GetType = function(vnum)
    	if (Boss.IsBoss(vnum)) then
    		return Boss.GetData()[vnum]["type"];
    	end -- if
    	
    	return nil;
    end -- function

     


    Quest File:

      Hide contents
    
    
    quest boss begin
    	state start begin
    		when kill with not npc.is_pc() and Boss.IsBoss(npc.get_race()) begin
    			local race = npc.get_race();
    			local data = Boss.GetData()[race];
    			local drop = data["drop"];
    
    			if (not pc.is_gm() and data["notice"]) then
    				notice_all(string.format("[Boss-Kill Notice]: %s has slain %s on channel %d.", pc.get_name(), mob_name(race), pc.get_channel_id()));
    			end -- if
    			
    			if (drop["vnum"] ~= 0) then
    				game.drop_item_with_ownership(drop["vnum"], drop["quant"]);
    			end -- if
    		end -- when
    	end -- state
    end -- quest

     


    How do i use the library file?
    Make it load by dofile() in your questlib.lua or simply add what's inside it to the questlib.lua as it is, even if it's not exactly the cleanest way to do it.

    Why should i use it?
    First of all as i said, it's fully customizable, you can just add new monsters to the main data array and the lib will handle them by itself.
    Second, the library file contains the full boss and data arrays + documentation and yet it still is only 120 lines of code, the quest contains the checks and the notice/drop functions, nothing else, since the whole is fully managed by the library, so it's less than 20 lines of code. No script i've seen till now is more lightweight and as customizable as this one.


    Hello,
    Nice thank for sharing.
     

  4. Hello,
    problem in Player.player. Player table crashed
    Right syntax
     

    Quote

    SET FOREIGN_KEY_CHECKS=0;

    -- ----------------------------
    -- Table structure for player
    -- ----------------------------
    DROP TABLE IF EXISTS `player`;
    CREATE TABLE `player` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `account_id` int(11) NOT NULL DEFAULT '0',
      `name` varchar(24) NOT NULL DEFAULT 'NONAME',
      `job` tinyint(2) unsigned NOT NULL DEFAULT '0',
      `voice` tinyint(1) unsigned NOT NULL DEFAULT '0',
      `dir` tinyint(2) NOT NULL DEFAULT '0',
      `x` int(11) NOT NULL DEFAULT '0',
      `y` int(11) NOT NULL DEFAULT '0',
      `z` int(11) NOT NULL DEFAULT '0',
      `map_index` int(11) NOT NULL DEFAULT '0',
      `exit_x` int(11) NOT NULL DEFAULT '0',
      `exit_y` int(11) NOT NULL DEFAULT '0',
      `exit_map_index` int(11) NOT NULL DEFAULT '0',
      `hp` smallint(4) NOT NULL DEFAULT '0',
      `mp` smallint(4) NOT NULL DEFAULT '0',
      `stamina` smallint(6) NOT NULL DEFAULT '0',
      `random_hp` smallint(5) unsigned NOT NULL DEFAULT '0',
      `random_sp` smallint(5) unsigned NOT NULL DEFAULT '0',
      `playtime` int(11) NOT NULL DEFAULT '0',
      `level` tinyint(2) unsigned NOT NULL DEFAULT '1',
      `level_step` tinyint(1) NOT NULL DEFAULT '0',
      `st` smallint(3) NOT NULL DEFAULT '0',
      `ht` smallint(3) NOT NULL DEFAULT '0',
      `dx` smallint(3) NOT NULL DEFAULT '0',
      `iq` smallint(3) NOT NULL DEFAULT '0',
      `exp` int(11) NOT NULL DEFAULT '0',
      `gold` int(11) NOT NULL DEFAULT '0',
      `stat_point` smallint(3) NOT NULL DEFAULT '0',
      `skill_point` smallint(3) NOT NULL DEFAULT '0',
      `quickslot` tinyblob NOT NULL,
      `ip` varchar(15) NOT NULL DEFAULT '0.0.0.0',
      `part_main` smallint(6) NOT NULL DEFAULT '0',
      `part_base` tinyint(4) NOT NULL DEFAULT '0',
      `part_hair` smallint(4) NOT NULL DEFAULT '0',
      `skill_group` tinyint(4) NOT NULL DEFAULT '0',
      `skill_level` blob NOT NULL,
      `alignment` int(11) NOT NULL DEFAULT '0',
      `last_play` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `change_name` tinyint(1) NOT NULL DEFAULT '0',
      `mobile` varchar(24) DEFAULT NULL,
      `sub_skill_point` smallint(3) NOT NULL DEFAULT '0',
      `stat_reset_count` tinyint(4) NOT NULL DEFAULT '0',
      `horse_hp` smallint(4) NOT NULL DEFAULT '0',
      `horse_stamina` smallint(4) NOT NULL DEFAULT '0',
      `horse_level` tinyint(2) unsigned NOT NULL DEFAULT '0',
      `horse_hp_droptime` int(10) unsigned NOT NULL DEFAULT '0',
      `horse_riding` tinyint(1) NOT NULL DEFAULT '0',
      `horse_skill_point` smallint(3) NOT NULL DEFAULT '0',
      `bossazrail` int(11) NOT NULL DEFAULT '0',
      `bosscol` int(11) NOT NULL DEFAULT '0',
      `bossdokuz` int(11) NOT NULL DEFAULT '0',
      `bossalev` int(11) NOT NULL DEFAULT '0',
      `jatekos_nev` varchar(24) CHARACTER SET ascii NOT NULL DEFAULT 'NONAME',
      `statusz` varchar(255) CHARACTER SET ascii NOT NULL DEFAULT '0',
      `szint` varchar(20) CHARACTER SET ascii NOT NULL DEFAULT 'Inaktiv',
      `lejarati_ido` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      PRIMARY KEY (`id`),
      KEY `account_id_idx` (`account_id`),
      KEY `name_idx` (`name`),
      KEY `jatekos_nev_idx` (`jatekos_nev`) USING BTREE,
      KEY `lejarati_ido` (`lejarati_ido`) USING BTREE
    ) ENGINE=MyISAM AUTO_INCREMENT=68753 DEFAULT CHARSET=latin1;

    jatekos_nev status szint lejarati ido  = my job for upgraded vip sys just delete fields

     

  5. LOL, forget this $....  :facepalm:

    like python:

    Quote


            if gamemasta.find("(VIP1)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(29)

            if gamemasta.find("(VIP2)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(30)


            if gamemasta.find("(VIP3)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(31)

            if gamemasta.find("(VIP4)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(32)


            if gamemasta.find("(VIP5)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(33)

            if gamemasta.find("(VIP6)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(34)


            if gamemasta.find("(VIP7)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(35)

            if gamemasta.find("(VIP8)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(36)


            if gamemasta.find("(VIP9)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(37)

            if gamemasta.find("(VIP10)")!=-1:
                if self.lastupdate == 0:
                    self.lastupdate = app.GetGlobalTimeStamp()
                if app.GetGlobalTimeStamp() - self.lastupdate >= 5:
                    self.lastupdate = app.GetGlobalTimeStamp()
                    net.SendEmoticon(38)

     

    make new item.
    ittem in quest rename player with add (vip1-2-3-4-5-6-7-8-9-10)
    And this python work wery vell :D

    Where is problem? XD

    for request i made tutorial how it's work

    • Lmao 1
    • Love 1
  6. 1 hour ago, Human said:

    Ahh thank you so much i really like this 

     and i forgot or something wrong in editing my post 

    i made 2 questions 

    1) was with clear timer - you fixed it thanks
     
    2)  that is when any player kills the boss within 1 hour or running time he will announced as winner and all must warp to town and event close .. and server time is cleared ... 

    but i dont know where is my 2nd question went sorry for trouble you again and again.. 

    and thanks in advance 

    2 replaced 2 spawner timer etc...
    first row monster spawned (tier/rank 1-2-3-4 regen in map when killed XY number monster  Boss are spawned ! second row again tier/rank 1-2-3-4 monster spawned when killed again XY number monster
    last boss appeared
    Automatically ending :D
    and clearing every flag every qf

    Quote
    Spoiler

    quest xxx_event begin

        state start begin
            when 20338.chat."xxx_event" with pc.is_gm() begin
                --Variable
                local filename = xxx1
                local filename1 = xxx2        
                local map_index = 245
                local announcement = "xxx Event Started"
                --
                if game.get_event_flag("xxx_event") == 0 then
                    say_title("xxxevent")
                    say("Activate xxx Event?")
                    local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                        if s == 3 then
                            return
                        end
                        if s == 2 then
                            notice_all(""..announcement.." by "..pc.get_name().."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            server_timer("xxx_event",60*60)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                        if s == 1 then
                            notice_all(""..Announcement.."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            server_timer("xxx_event",60*60)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                end
                if game.get_event_flag("xxx_event") == 1 then
                    say_title("xxxevent")
                    say("De-activate xxx Event?")
                    local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                        if ss == 3 then
                            return
                        end
                        if ss == 2 then
                            notice_all("xxx Event is Over.All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                        if ss == 1 then
                            notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                end
            end
            --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 40")
                --timer("xxx_event1",60*20)
            --end
            --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 20")
                --timer("xxx_event2",60*20)
            --end
            --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Time is over !Thank you for particulate in event.")
                --timer("xxx_event_closer",1)
            --end
            when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
                say_title("Arya:")
                say("")
                say("Wanna have some Adventures ?")
                say("I take to the Land of trouble.")
                say("Let me see if you are prepared to endure the journey there.")
                say("")
                wait("Next")
                say_title("Arya:")
                say("")
                say_reward("You're ready?")
                local sss = select("Yes!","No")
                    if sss == 2 then
                        return
                    end
                    if sss == 1 then
                        say_title("Arya:")
                        say("")
                        say("You are allowed to join.")
                        say("Off to the xxxland we go...")
                        say("")
                        wait("Okey,Let's go")
                        pc.setqf("xxx_event_signup", 1)
                        pc.warp(xxx,yyyy)
                    end
            end
            when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
                notice("xxx Event is Over.You will be teleported to the town.")
                pc.delqf("xxx_event_signup")
                pc.setqf("xxx_event_signup", 0)
                timer("xxx_event_closer",1)
            end
            when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
                pc.setqf("xxx_event_signup", 1)
            end

            when XY.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin    --replace here monster's ID example when 101.kill or 102.kill etc...etc... etc... begin
                if game.get_event_flag("xxx_event") == 1 then
                    if game.get_event_flag("killed_first_row") == 0 then
                        game.set_event_flag("Killed_troop_monster",game.get_event_flag("Killed_troop_monster")+1)
                        timer("killer",1)
                    end
                end
            end
            when killer.timer begin
                if game.get_event_flag("Killed_troop_monster") == NUMBER_HERE then    --replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
                    regen_in_map("..map_index..","data/dungeon/FILE_NAME_HERE.txt")    --create new txt whit name whatever_u_want replace here first boss or stone
                end
                if game.get_event_flag("Killed_troop_monster") < NUMBER_HERE then    --replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
                end
            end
            when XY.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin    --replace here first stone or Boss ID
                notice_all(""..pc.getname().." Killed the first boss/stones !")
                notice_all("Last row is incomming! 5 second and the bloody monster are spawned !Get ready!")
                timer("spawner",6)
                game.set_event_flag("killed_first_row",1)
            end
            when xy.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
                if game.get_event_flag("xxx_event") == 1 then
                    if game.get_event_flag("killed_first_row") == 1 then
                        game.set_event_flag("Killed_troop_monsterz",game.get_event_flag("Killed_troop_monsterz")+1)
                        timer("killerz",1)
                    end
                end
            end
            when killerz.timer begin
                if game.get_event_flag("Killed_troop_monsterz") == NUMBER_HERE then    --again replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
                    regen_in_map("..map_index..","data/dungeon/FILE_NAME_HERE.txt")    --again create new txt whit name whatever_u_want replace here second boss or stone
                end
                if game.get_event_flag("Killed_troop_monsterz") < NUMBER_HERE then    --replace how many mob in reggen file (Only monster tier/rank 1-2-3-4)
                end
            end
            when XY.kill with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin    --again replace here second stone or Boss ID
                if game.get_event_flag("xxx_event") == 1 then
                    if game.get_event_flag("killed_first_row") == 1 then
                        notice_all(""..pc.getname().." Killed the last boss/stones !")
                        notice_all("Thank for particulate,")
                        timer("xxx_event_closer",1)
                    end
                end
            end
            when spawner.timer begin
                notice_all("Monster's are spawned ! kill them' all!")
                regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
            end
            when xxx_event.server_timer begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            clear_server_timer("xxx_event")
            end

            when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            clear_server_timer("xxx_event")
            game.set_event_flag("Killed_troop_monsterz",0)
            game.set_event_flag("Killed_troop_monster",0)
            game.set_event_flag("killed_first_row",0)
            end
        end
    end

     

     

     

     

    • Love 1
  7. 5 hours ago, Human said:

    I really appreciate your help and thanks for spending time for my quest 
    just a doubt once the event is over the timer will be cleared right? 

    like this i meant            clear_server_timer(" xxx_event") 

    or don't need?

    edit 
    and when i compile the quest with necessary stuffs 
    I get this error 
    xxx_event.quest:112:syntax error : [string "startpc . getqf ( "xxx_event_signup" ) == 1"]:1: `=' expected near `pc'
     

    Spoiler

    like this i meant            clear_server_timer(" xxx_event") 
     

    Spoiler

    Don't need if u want to add

    Search this:

    Spoiler

                        if s == 2 then
                            notice_all(""..announcement.." by "..pc.get_name().."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end

    change to this
     

    Spoiler

                        if s == 2 then
                            notice_all(""..announcement.." by "..pc.get_name().."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            server_timer("xxx_event",60*60)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end

    Spoiler

    Search this
     

    Spoiler

                        if s == 1 then
                            notice_all(""..Announcement.."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end

    Change to this
     

    Spoiler

                        if s == 1 then
                            notice_all(""..Announcement.."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            server_timer("xxx_event",60*60)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end

    Add new when :
     

    Spoiler

            when xxx_event.server_timer begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            clear_server_timer("xxx_event")
            end

     

    Search this
     

    Spoiler

            when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
            d.exit_all
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
        end
    end

    Replace to:
     

    Spoiler


            when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            clear_server_timer("xxx_event")
            end
        end
    end

     

     

     

    Or Fixed file with server_timer
     

    Spoiler

     quest xxx_event begin

        state start begin
            when 20338.chat."xxx_event" with pc.is_gm() begin
                --Variable
                local filename = xxx1
                local filename1 = xxx2        
                local map_index = 245
                local announcement = "xxx Event Started"
                --
                if game.get_event_flag("xxx_event") == 0 then
                    say_title("xxxevent")
                    say("Activate xxx Event?")
                    local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                        if s == 3 then
                            return
                        end
                        if s == 2 then
                            notice_all(""..announcement.." by "..pc.get_name().."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            server_timer("xxx_event",60*60)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                        if s == 1 then
                            notice_all(""..Announcement.."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            server_timer("xxx_event",60*60)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                end
                if game.get_event_flag("xxx_event") == 1 then
                    say_title("xxxevent")
                    say("De-activate xxx Event?")
                    local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                        if ss == 3 then
                            return
                        end
                        if ss == 2 then
                            notice_all("xxx Event is Over.All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                        if ss == 1 then
                            notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                end
            end
            --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 40")
                --timer("xxx_event1",60*20)
            --end
            --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 20")
                --timer("xxx_event2",60*20)
            --end
            --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Time is over !Thank you for particulate in event.")
                --timer("xxx_event_closer",1)
            --end
            when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
                say_title("Arya:")
                say("")
                say("Wanna have some Adventures ?")
                say("I take to the Land of trouble.")
                say("Let me see if you are prepared to endure the journey there.")
                say("")
                wait("Next")
                say_title("Arya:")
                say("")
                say_reward("You're ready?")
                local sss = select("Yes!","No")
                    if sss == 2 then
                        return
                    end
                    if sss == 1 then
                        say_title("Arya:")
                        say("")
                        say("You are allowed to join.")
                        say("Off to the xxxland we go...")
                        say("")
                        wait("Okey,Let's go")
                        pc.setqf("xxx_event_signup", 1)
                        pc.warp(xxx,yyyy)
                    end
            end
            when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
                notice("xxx Event is Over.You will be teleported to the town.")
                pc.delqf("xxx_event_signup")
                pc.setqf("xxx_event_signup", 0)
                timer("xxx_event_closer",1)
            end
            when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
                pc.setqf("xxx_event_signup", 1)
            end
            when xxx_event.server_timer begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            clear_server_timer("xxx_event")
            end

            when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            clear_server_timer("xxx_event")
            end
        end
    end

     

     

    Without server_timer
     

    Spoiler

     quest xxx_event begin

        state start begin
            when 20338.chat."xxx_event" with pc.is_gm() begin
                --Variable
                local filename = xxx1
                local filename1 = xxx2        
                local map_index = 245
                local announcement = "xxx Event Started"
                --
                if game.get_event_flag("xxx_event") == 0 then
                    say_title("xxxevent")
                    say("Activate xxx Event?")
                    local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                        if s == 3 then
                            return
                        end
                        if s == 2 then
                            notice_all(""..announcement.." by "..pc.get_name().."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                        if s == 1 then
                            notice_all(""..Announcement.."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                end
                if game.get_event_flag("xxx_event") == 1 then
                    say_title("xxxevent")
                    say("De-activate xxx Event?")
                    local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                        if ss == 3 then
                            return
                        end
                        if ss == 2 then
                            notice_all("xxx Event is Over.All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                        if ss == 1 then
                            notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                end
            end
            --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 40")
                --timer("xxx_event1",60*20)
            --end
            --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 20")
                --timer("xxx_event2",60*20)
            --end
            --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Time is over !Thank you for particulate in event.")
                --timer("xxx_event_closer",1)
            --end
            when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
                say_title("Arya:")
                say("")
                say("Wanna have some Adventures ?")
                say("I take to the Land of trouble.")
                say("Let me see if you are prepared to endure the journey there.")
                say("")
                wait("Next")
                say_title("Arya:")
                say("")
                say_reward("You're ready?")
                local sss = select("Yes!","No")
                    if sss == 2 then
                        return
                    end
                    if sss == 1 then
                        say_title("Arya:")
                        say("")
                        say("You are allowed to join.")
                        say("Off to the xxxland we go...")
                        say("")
                        wait("Okey,Let's go")
                        pc.setqf("xxx_event_signup", 1)
                        pc.warp(xxx,yyyy)
                    end
            end
            when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
                notice("xxx Event is Over.You will be teleported to the town.")
                pc.delqf("xxx_event_signup")
                pc.setqf("xxx_event_signup", 0)
                timer("xxx_event_closer",1)
            end
            when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
                pc.setqf("xxx_event_signup", 1)
            end
            when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
            end
        end
    end

     

     

    Problem is : i forget writte () after d.exit_all ^^ sorry for this....
    Old:
     

    Spoiler

    d.exit_all

    Fixed
     

    Spoiler

            d.exit_all()
            --if not work with d.exit_all() replace whit this:
            ------------------------------------
            --warp_all_to_village()
            ------------------------------------

     

    Spoiler

    Here no need clear_server_timer

    timer automatically jumping to
    when xxx_event_closer.timer begin
    and whit this when i replaced
    clear_server_timer(xxx_event)
    Don't worry :D
     

    Spoiler


                if game.get_event_flag("xxx_event") == 1 then
                    say_title("xxxevent")
                    say("De-activate xxx Event?")
                    local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                        if ss == 3 then
                            return
                        end
                        if ss == 2 then
                            notice_all("xxx Event is Over.All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                        if ss == 1 then
                            notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                end

    In the end i added this:
     

    Spoiler

                pc.setqf("xxx_event_signup", 0)
                game.set_event_flag("xxx_event",0)
                d.exit_all()
                --if not work with d.exit_all() replace whit this:
                ------------------------------------
                --warp_all_to_village()
                ------------------------------------
                clear_server_timer("xxx_event")

    Spoiler

    pc.setqf("xxx_event_signup", 0)
    and
    pc.delqf("xxx_event_signup")
    all 2 function= pc.getqf("xxx_event_signup") == 0 :D

    After i changed to
     

    Spoiler

    pc.setqf("xxx_event_signup", 0)

     

     

  8. Hello,
     

    On 2017. 06. 10. at 0:27 PM, Germais said:

    So this hack is quite a problem and i was wondering how would i prevent it.

    Does changing the function names in the client source prevent this? I did try to change most of all Attack functions but still no success.

    What should i do to prevent this hack without having to create a remote thread to find injected dlls?

    In root/prototype.py
    add data fetching from u website into BGM folder
    and downloaded data starting processing.
    (in hash) if hack detected crash the client
    Yes,Me too i work on this :D (client crasher data is so cute *.* )

  9. On 2017. 06. 10. at 5:22 PM, vandragoon said:

    I transtaling client into czech language but this happened to me and i dont know what with it.. help please

    NfeZ.png

    Hello,
    You changed  this file way or missed -->

    Spoiler

    Locale_XY/locale/XY/UI/Windows/Windows.dds yes this is pitcure :D

     

  10. Spoiler

    quest xxx_event begin

        state start begin
            when 20338.chat."xxx_event" with pc.is_gm() begin
                --Variable
                local filename = xxx1
                local filename1 = xxx2        
                local map_index = 245
                local announcement = "xxx Event Started"
                --
                if game.get_event_flag("xxx_event") == 0 then
                    say_title("xxxevent")
                    say("Activate xxx Event?")
                    local s = select ("Yes,with name","Yes,whit Announcement","Cancel")
                        if s == 3 then
                            return
                        end
                        if s == 2 then
                            notice_all(""..announcement.." by "..pc.get_name().."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                        if s == 1 then
                            notice_all(""..Announcement.."")
                            regen_in_map("..map_index..","data/dungeon/"..filename..".txt")
                            game.set_event_flag("xxx_event",1)
                            ----------------------------------------
                            --notice_all("Event is over in 1 hour.")
                            --timer("xxx_event",60*20)    --60*60 = 1 hour (second*minutes*hour*day)
                            --Timer function.Be activation remove " -- "
                            --Default i set 1 hour time interval
                            ----------------------------------------
                        end
                end
                if game.get_event_flag("xxx_event") == 1 then
                    say_title("xxxevent")
                    say("De-activate xxx Event?")
                    local ss = select ("Yes,with name","Yes,Whit announcement","Canel")
                        if ss == 3 then
                            return
                        end
                        if ss == 2 then
                            notice_all("xxx Event is Over.All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                        if ss == 1 then
                            notice_all("xxx Event is Over by "..pc.get_name()..".All will be teleported to town.")
                            game.set_event_flag("xxx_event",0)
                            timer("xxx_event_closer",1)
                        end
                end
            end
            --when xxx_event.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 40")
                --timer("xxx_event1",60*20)
            --end
            --when xxx_event1.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Remaining minutes number : 20")
                --timer("xxx_event2",60*20)
            --end
            --when xxx_event2.timer with game.get_event_flag("xxx_event") == 1 begin
                --notice_all("Time is over !Thank you for particulate in event.")
                --timer("xxx_event_closer",1)
            --end
            when 20418.chat."Wonder Land" with game.get_event_flag("xxx_event") == 1 begin
                say_title("Arya:")
                say("")
                say("Wanna have some Adventures ?")
                say("I take to the Land of trouble.")
                say("Let me see if you are prepared to endure the journey there.")
                say("")
                wait("Next")
                say_title("Arya:")
                say("")
                say_reward("You're ready?")
                local sss = select("Yes!","No")
                    if sss == 2 then
                        return
                    end
                    if sss == 1 then
                        say_title("Arya:")
                        say("")
                        say("You are allowed to join.")
                        say("Off to the xxxland we go...")
                        say("")
                        wait("Okey,Let's go")
                        pc.setqf("xxx_event_signup", 1)
                        pc.warp(xxx,yyyy)
                    end
            end
            when kill or login or logout or levelup with game.get_event_flag("xxx_event") == 0 and pc.get_map_index() == mapindex begin
                notice("xxx Event is Over.You will be teleported to the town.")
                pc.delqf("xxx_event_signup")
                pc.setqf("xxx_event_signup", 0)
                timer("xxx_event_closer",1)
            end
            when login with game.get_event_flag("xxx_event") == 1 and pc.get_map_index() == mapindex begin
                pc.setqf("xxx_event_signup", 1)
            end
            when xxx_event_closer.timer with pc.getqf("xxx_event_signup")==1 begin
            d.exit_all
            pc.delqf("xxx_event_signup")
            pc.setqf("xxx_event_signup", 0)
            game.set_event_flag("xxx_event",0)
        end
    end

     

     

    • Love 1
  11. On 2017. 06. 08. at 6:48 AM, Human said:

    Excellent !!!  Dawis You are great quest maker 
    Just what i thought u did :)


    and only this is the change i have to make 

    1) when login means if single logs it will start ?
    Answer: Yes.
    Use server_timer and 2th player logged in not started.

    I may be wrong in describing it .. Let me clear it  I want all to be entered not like one person entering or password .. when event start all players can enter and kill the mobs there is no unique in this ... i made some quest with starting of event 
     

      Hide contents

     

    quest xxx_event begin
        state start begin
            when 20338.chat."xxxevent" with pc.is_gm() begin
                --Variable
                local filename = "xxx1"
                local filename1 = "xxx2"            
                local map_index = 245
                local announcement = "xxx Event Started"
                --
                say_title("xxxevent")
                say("Activate xxx Event?")
                local s= select("Yes, with Announcement", "No, Deactivate the event", "Cancel ")    
                if s==1 then
                    notice_all(announcement)
                    regen_in_map(map_index, "data/dungeon/"..filename..".txt")
                    game.set_event_flag("xxx_event", 1)
                elseif s==2 then
                    notice_all("xxx Event is Over.All will be teleported to town.")
                    game.set_event_flag("xxx_event", 0)
                else
                    return 
                end
            end

    ######
    main quest  ( your quest content )


    ######

            
            when 20418.chat."Wonder Land" begin
                        say_title("Arya:")
                        say("")
                        say("Wanna have some Adventures ?")
                        say("I take to the Land of trouble.")
                        say("Let me see if you are prepared to endure the journey there.")
                        say("")
                        wait()
                        if game.get_event_flag("xxx_event") == 0 then
                            say_title("Arya:")
                            say("")
                            ----"111111222222333333444444555555666666777777888888999999000000"
                            say("Sorry, you can't access the xxx land at the moment.")
                            say("")
                            return
                        elseif game.get_event_flag("xxx_event") == 1 then
                        
                            say_title("Arya:")
                            say("")
                            say("You are allowed to join.")
                            say("Off to the xxxland we go...")
                            say("")
                            wait()
                            pc.warp(xxx, yyyy)
                        end
            end        
        end
    end 

     

    can you finish this in an complete set 

    thanks for your timely help  for this timer quest :)

    Spoiler

    Thank you,Give me 15 min (eating + writting ^^) and i send u the regionaly event :)
    + tell me timing regionally quest?  example u click activate quest in npc  and 2 hour later automatically stopped ??

     

  12. On 2017. 06. 08. at 8:51 PM, charparodar said:

    I don't want something like that, I want to get the name by the bonus ID, since it's to use on my pet system and the bonuses are controlled by the quest, on the quest I only have the ID, but the value changes with the pet level, so, it's never the same and the bonus of the pets aren't the same either...

    i search on internet what i found ? pet system :D

     

    Spoiler

    ------------------------------------------------------------
            function givebonus(x)
                ---------------------------------------------
                -- 1 TP,53 támadó érték,54 védekező érték  -- -- 1 TP 53 +attack damage 54 def value
                ---------------------------------------------
                local y,boni = {53,54,1},pets.bonusliste()
                table.foreach(boni[x],function(i,l) cmdchat("HaustierBonus"..i.." "..l.."") affect.add_collect(y,l,60*60*24*365*60) end )
                cmdchat("HaustierLevel "..pc.getqf('petlevel').."")
                cmdchat("HaustierName "..pc.get_name().."")
                pc.setqf("petruf",1)
            end
            function bonusliste()
            return {
                [1] = {10,10,25},    --támadő érték,védekező,TP
                [2] = {25,20,50},    --támadő érték,védekező,TP
                [3] = {45,35,75},    --támadő érték,védekező,TP
                [4] = {50,50,100},    --támadő érték,védekező,TP
                [5] = {75,75,125},    --támadő érték,védekező,TP
                [6] = {90,90,150},    --támadő érték,védekező,TP
                [7] = {100,100,165},    --támadő érték,védekező,TP
                [8] = {110,110,175},    --támadő érték,védekező,TP
                [9] = {130,125,190},    --támadő érték,védekező,TP
                [10] = {145,140,210},    --támadő érték,védekező,TP
                [11] = {155,160,230},    --támadő érték,védekező,TP
                [12] = {170,170,270},    --támadő érték,védekező,TP
                [13] = {200,200,300},    --támadő érték,védekező,TP
                [14] = {250,250,500},    --támadő érték,védekező,TP
                [15] = {300,300,700},    --támadő érték,védekező,TP
                [16] = {400,400,1000},    --támadő érték,védekező,TP
                [17] = {500,500,2000},    --támadő érték,védekező,TP
                [18] = {600,600,3000},    --támadő érték,védekező,TP
                [19] = {700,700,4000},    --támadő érték,védekező,TP
            }
            end
            function removebonus(x)
                local y,boni = {53,54,1},pets.bonusliste()
                table.foreach(boni[x],function(i,l) affect.remove_collect(y,l,60*60*24*365*60) end )
                pc.setqf("petruf",0)
                cmdchat("HidePetGui")
                cleartimer("bugcheck")
            end

     

  13. Hello,
    U never start as beginner?

     

    On 2017. 06. 03. at 11:20 AM, Sonitex said:

    AcYwc.jpg

     

    I know hard to writte how to solve it?
    Dear @Avisek,
    in PuTTy or VBox go to quest location example:
    cd /usr/game/share/locale/hungary/quest
    after this
    ./qc give_basic_weapon.quest
    In game /reload Q and enjoy
     

     

    On 2017. 06. 05. at 1:19 AM, Syreldar said:

    You have to compile the quest..else it will always read the older one..you should really study how does a compiled language work.

    on your quest folder There is a compiler (a translator which generates machine code from source code) and lets the game read it properly.

    That compiler is called "qc"

     

    To compile a quest, write on your shell (like putty or terminal)

    1. cd /path/to/your/quest/folder/../quest
    2. ./qc namequest.quest/.lua (depending on its name)

    oh sry^^ i don't see you comment

    • Love 1
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.