Jump to content

Dolphin86

Members
  • Posts

    547
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Dolphin86

  1. Hello guys, i seems to have some problem which is example archer figure,  when archer char use it it will add up bonus stats, but when the char change to hunter, or sniper the bonus is no longer add up, how can i chg this? like any job from archer job branch will get the bonus?

    itemdb.txt script :

    { bonus bDex,5; bonus bAgi,5; if(Class==Job_Archer) bonus bAspdRate,20; },{},{}

     

  2. 13 hours ago, Haruka Mayumi said:

    did you change that CUSTOMMAP into your custom map name? because both are working on my side.

    -	script	autojoin	-,{
    
    OnPCLoginEvent:
    	atcommand "@join #main";
    	atcommand "@join #support";
    	atcommand "@join #trade";
    end;
    }
    
    -	script	atlantispvp	-1,{
    
    OnPCKillEvent:
    	if(strcharinfo(3) == "atlantis")
    		getitem 7812,1;
    end;
    
    }

    well there are another configure there to force player to join main channel but as you can see i did change it

    that is basically suppose to be my server custom configure

     

    On 4/12/2020 at 12:37 PM, chatterboy said:
    ////////////////////////////////////////////
    //                                        //
    // Script by: GM Chatterboy               //
    // Version: 1.0                           //
    // Emulator: Rathena                      //
    //                                        //
    ////////////////////////////////////////////
    
    prontera,178,215,4	script	PVP Assistant	569,{
    emotion e_lv;
    set .@nome$,"[ ^FF0000PVP Assistant^000000 ]";
    
    			mes .@nome$;
    			mes "Hello! ^FFA500 "+strcharinfo(0)+"^000000 what can i do for you today?";
    			next;
        switch(select("[^0101DFEnter PvP^000000]","[^0101DFTOP 5 PvP^000000]")){
    	
    case 1:
    	set $pvp$[0],"guild_vs3";
    
    			mes .@nome$;
    			mes "***********************";
    			mes "~[^FF0000"+getmapusers($pvp$[$pvp])+"^000000] Player(s) in map...";
    			mes "***********************";
    			if(select("Go...:Leave...")==1){
    				if(BaseLevel<10){
    					mes "^FF0000Your level is not suite here go kill some poring!^000000";
    					emotion e_pif;
    					close;
    				}else{
    					warp $pvp$,0,0;
    					end;
    				}
    			}close;
    	
    
    case 2:
    		query_sql "SELECT name, kills, deaths FROM pvp ORDER BY kills DESC LIMIT 10",.@name$,.@kills,.@deaths;
    		
       		if (!getarraysize(.@name$)){
    			mes .@nome$;
    			mes "The rankings are empty.";
    			close;
    		}
    			mes .@nome$;
    			mes "[TOP 5 PvP]";
    			mes "-----------------------------------";
    			mes "^0000FF Position ^000000 Name ^FF0000 Win ^000000 ^800080 Knock-Out ^000000";
    			mes "-----------------------------------";
    		for(set .@i,0;.@i<=4;set .@i,.@i+1) {
    			mes "^0000FF["+(.@i+1)+"] ^000000 "+.@name$[.@i]+" .....^FF0000"+.@kills[.@i]+" ^000000 ^800080"+.@deaths[.@i]+" ^000000";
    		}
    		close;
    			
        }
    }
    
    
    //=============================================================================================================================================
    
    -	script	Arena#PCKill	-1,{
    
    OnPCKillEvent:
    
    
    			if(BaseLevel>=400) end;
    				getmapxy @map$,@x,@y,0;
    			if (@map$ == "guild_vs3"){
    			
            set @CID,getcharid(0);
    		set @name$,"";
    		set @points,0;
    		
                    query_sql "SELECT `kills` FROM `pvp` WHERE `char_id`="+@CID+"",@points;
                    query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$;
                if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`kills`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kills + 1 "; end; }
                    query_sql "UPDATE `pvp` SET `kills` = `kills` +1 WHERE `char_id`="+@CID+"",@esc$;
            
    		set @points,@points+1;
    			dispbottom "Kills: "+@points;
    			getitem 604,1;
    		}
    	end;
    	
    }
    
    //========================================================================================================================================================
    
    -	script	Arena#PCDie	-1,{
    
    OnPCDieEvent:
    
    		if(BaseLevel>=400) end;
    			getmapxy @map$,@x,@y,0;
    		if (@map$ == "guild_vs3"){
    		
        set @CID,getcharid(0);
    	set @name$,"";
    	set @points,0;
    	
                query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="+@CID+"",@points;
                query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$;
            if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`deaths`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kills : 1"; end; }
                query_sql "UPDATE `pvp` SET `deaths` = `deaths` + 1 WHERE `char_id`="+@CID+"",@esc$;
    
    		}
    	end;
    
    }
    
    //============== Map ==================
    //PvP
    //guild_vs3,12,50,0	warp	gvs01	1,1,prontera,155,191
    //guild_vs3,50,87,0	warp	gvs02	1,1,prontera,155,191
    //guild_vs3,87,49,0	warp	gvs03	1,1,prontera,155,191
    //guild_vs3,50,12,0	warp	gvs04	1,1,prontera,155,191
    
    //============== MAP FLAG ===============
    // Player
    guild_vs3	mapflag	nosave
    guild_vs3	mapflag	noteleport
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	nomemo
    guild_vs3	mapflag	gvg	off
    guild_vs3	mapflag	pvp	on
    guild_vs3	mapflag	nopenalty
    guild_vs3	mapflag	nobranch
    guild_vs3	mapflag	pvp_noguild
    guild_vs3	mapflag	noloot
    guild_vs3	mapflag	noexp
    
    
    //========================== DUPLICATE NPC ==============================//
    
    /*
    
    CREATE TABLE IF NOT EXISTS `pvp` (
      `char_id` int(11) unsigned NOT NULL auto_increment,
      `name` varchar(255) NOT NULL default '0',
      `kills` int(11) unsigned NOT NULL default '0',
      `deaths` int(11) unsigned NOT NULL default '0',
      KEY `char_id` (`char_id`),
      KEY `kills` (`kills`),
      KEY `deaths` (`deaths`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=151750 ;  
    
    */

    Try this ^_^

    i did try but i got these error:

    [Warning]: script: buildin_getmapxy: Invalid type 0.
    [Debug]: Source (NPC): Arena#PCKill (invisible/not on a map)
    [Warning]: script: buildin_getmapxy: Invalid type 0.
    [Debug]: Source (NPC): Arena#PCDie (invisible/not on a map)

     

    current script:

    ////////////////////////////////////////////
    //                                        //
    // Script by: GM Chatterboy               //
    // Version: 1.0                           //
    // Emulator: Rathena                      //
    //                                        //
    ////////////////////////////////////////////
    
    prontera,178,215,4	script	Jin Doggo	569,{
    emotion e_lv;
    set [email protected]$,"[ ^FF0000Jin Donggo^000000 ]";
    
    			mes [email protected]$;
    			mes "Hello! ^FFA500 "+strcharinfo(0)+"^000000 what can i do for you today?";
    			next;
        switch(select("[^0101DFEnter Atlantis^000000]","[^0101DFTOP 5 PvP^000000]")){
    	
    case 1:
    	set $pvp$[0],"atlantis";
    
    			mes [email protected]$;
    			mes "***********************";
    			mes "~[^FF0000"+getmapusers($pvp$[$pvp])+"^000000] Player(s) in map...";
    			mes "***********************";
    			if(select("Go...:Leave...")==1){
    				if(BaseLevel<10){
    					mes "^FF0000Your level is not suite here go kill some poring!^000000";
    					emotion e_pif;
    					close;
    				}else{
    					warp $pvp$,0,0;
    					end;
    				}
    			}close;
    	
    
    case 2:
    		query_sql "SELECT name, kills, deaths FROM pvp ORDER BY kills DESC LIMIT 10",[email protected]$,[email protected],[email protected];
    		
       		if (!getarraysize([email protected]$)){
    			mes [email protected]$;
    			mes "The rankings are empty.";
    			close;
    		}
    			mes [email protected]$;
    			mes "[TOP 5 PvP]";
    			mes "-----------------------------------";
    			mes "^0000FF Position ^000000 Name ^FF0000 Win ^000000 ^800080 Knock-Out ^000000";
    			mes "-----------------------------------";
    		for(set [email protected],0;[email protected]<=4;set [email protected],[email protected]+1) {
    			mes "^0000FF["+([email protected]+1)+"] ^000000 "[email protected]$[[email protected]]+" .....^FF0000"[email protected][[email protected]]+" ^000000 ^800080"[email protected]s[[email protected]]+" ^000000";
    		}
    		close;
    			
        }
    }
    
    
    //=============================================================================================================================================
    
    -	script	Arena#PCKill	-1,{
    
    OnPCKillEvent:
    
    
    			if(BaseLevel>=400) end;
    				getmapxy @map$,@x,@y,0;
    			if (@map$ == "atlantis"){
    			
            set @CID,getcharid(0);
    		set @name$,"";
    		set @points,0;
    		
                    query_sql "SELECT `kills` FROM `pvp` WHERE `char_id`="[email protected]+"",@points;
                    query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="[email protected]+"",@name$;
                if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`kills`) VALUES ("[email protected]+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kills + 1 "; end; }
                    query_sql "UPDATE `pvp` SET `kills` = `kills` +1 WHERE `char_id`="[email protected]+"",@esc$;
            
    		set @points,@points+1;
    			dispbottom "Kills: "[email protected];
    			getitem 604,1;
    		}
    	end;
    	
    }
    
    //========================================================================================================================================================
    
    -	script	Arena#PCDie	-1,{
    
    OnPCDieEvent:
    
    		if(BaseLevel>=400) end;
    			getmapxy @map$,@x,@y,0;
    		if (@map$ == "atlantis"){
    		
        set @CID,getcharid(0);
    	set @name$,"";
    	set @points,0;
    	
                query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="[email protected]+"",@points;
                query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="[email protected]+"",@name$;
            if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`deaths`) VALUES ("[email protected]+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kills : 1"; end; }
                query_sql "UPDATE `pvp` SET `deaths` = `deaths` + 1 WHERE `char_id`="[email protected]+"",@esc$;
    
    		}
    	end;
    
    }
    
    //============== Map ==================
    //PvP
    atlantis,129,227,0	warp	chry_fld	1,1,chry_fld,128,92
    //atlantis,50,87,0	warp	gvs02	1,1,prontera,155,191
    //atlantis,87,49,0	warp	gvs03	1,1,prontera,155,191
    //atlantis,50,12,0	warp	gvs04	1,1,prontera,155,191
    
    //============== MAP FLAG ===============
    // Player
    atlantis	mapflag	nosave
    atlantis	mapflag	noteleport
    atlantis	mapflag	nowarpto
    atlantis	mapflag	nowarp
    atlantis	mapflag	nomemo
    atlantis	mapflag	gvg	off
    atlantis	mapflag	pvp	on
    atlantis	mapflag	nopenalty
    atlantis	mapflag	nobranch
    atlantis	mapflag	pvp_noguild
    atlantis	mapflag	noloot
    atlantis	mapflag	noexp
    
    
    //========================== DUPLICATE NPC ==============================//
    
    /*
    
    CREATE TABLE IF NOT EXISTS `pvp` (
      `char_id` int(11) unsigned NOT NULL auto_increment,
      `name` varchar(255) NOT NULL default '0',
      `kills` int(11) unsigned NOT NULL default '0',
      `deaths` int(11) unsigned NOT NULL default '0',
      KEY `char_id` (`char_id`),
      KEY `kills` (`kills`),
      KEY `deaths` (`deaths`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=151750 ;  
    
    */

     

    found solution and it works :

    -	script	item_get	-1,{ OnPCKillEvent: if(getmapflag(strcharinfo(3),mf_pvp)) getitem 501, 10; }

     

  3. On 4/12/2020 at 3:25 PM, Haruka Mayumi said:
    -	script	Simple	-1,{
    
    OnPCKillEvent:
    	if(getmapflag(strcharinfo(3),MF_PVP))
    		getitem 7812,1;
    end;
    
    }

     

    didnt work, i warp to my custom pvp map, kill test char, dint get the item in my inventory

  4. as title i have been using this script provided by @Emistry on script collection release, which is works great, but problem is whenever i add 4th npc, and setup a new quest, somehow the new quest is randomly assign to another npc, 

    example :

    NPC 1 / NPC 2 / NPC 3 / NPC 4

    1. i setup a new quest on NPC 4 and assign the quest for NPC 4 - done-

    2. open up NPC 4 to confirm the quest is there in NPC 4 but its not there

    3. upon checking NPC 1 to NPC 4, the new quest were assign at NPC 2....

    can someone check it?

    Spoiler
     -	script	mission_board	-1,{
    [email protected]_level = getgmlevel();
    [email protected]_name$ = strnpcinfo(1);
    [email protected]_npc_num = atoi( strnpcinfo(2) );
     
    // check npc if it's a valid npc with number 1 ~ 500
    if( [email protected]_npc_num || [email protected]_npc_num > 500 ){
    	message strcharinfo(0),"This NPC isnt working, invalid <'"+strnpcinfo(2)+"'>";
    	disablenpc strnpcinfo(0);
    	end;
    }
     
    // to assign offset index.
    [email protected]_npc_num--;
    query_sql( "SELECT COUNT(`id`) FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' ",[email protected]_count );
    query_sql( "SELECT `id`,`mission_id`,`mob_hunt`,`expire` FROM `player_mission` WHERE `mission_id` IN ( SELECT `id` FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' ) AND `cid` = "+getcharid(0)+" AND `completion` = '0000-00-00 00:00:00' ",[email protected],[email protected]_id,[email protected]_hunt$,[email protected] );
    [email protected]_mission_size = getarraysize( [email protected] );
     
    mes "^0055FF[ "[email protected]_name$+" ]^000000";
    mes "A mission board may provide various missions for adventures. Each players may pick ";
    mes "   ^FF0000"+.max_mission_per_char+" missions^000000";
    mes "from each mission npc.";
    next;
    switch( select( ( [email protected]_mission_size )?"Submit Mission":"",
    				( [email protected]_mission_size < .max_mission_per_char )?"Pick Mission":"",
    				( [email protected]_mission_size )?"Drop Mission":"",
    				( [email protected]_level < .gm_level || [email protected]_count )?"":"^FF0000[GM] Update Mission^000000",
    				( [email protected]_level < .gm_level )?"":"^FF0000[GM] Setup Mission^000000",
    				( [email protected]_level < .gm_level || [email protected]_count  )?"":"^FF0000[GM] Delete Mission^000000" ) ){
    	case 1:
    		[email protected]_time = gettimetick(2);
    		query_sql( "SELECT `id`,`title`,`min_lv`,`max_lv` FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' AND `id` IN ( SELECT `mission_id` FROM `player_mission` WHERE `cid` = "+getcharid(0)+" AND `completion` = '0000-00-00 00:00:00' )",[email protected]_id,[email protected]$,[email protected]_lv,[email protected]_lv );
    		[email protected] = getarraysize( [email protected]_id );
    		for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ){
    			if( [email protected][[email protected]] && [email protected][[email protected]] < [email protected]_time )
    				[email protected]_menu$ = [email protected]_menu$ + "^FF0000[Expired]^000000";
    			[email protected]_menu$ = [email protected]_menu$ + "["[email protected]_lv[[email protected]]+"~"[email protected]_lv[[email protected]]+"] "[email protected]$[[email protected]] +":";
    		}
    		[email protected] = select( [email protected]_menu$ ) - 1;
     
    		if( [email protected][[email protected]] && [email protected][[email protected]] < [email protected]_time ){
    			dispbottom " ~ Mission expired "+callsub( OnTime2Str,( gettimetick(2) + ( [email protected]_time - [email protected][[email protected]] ) ) )+" ago.";
    			dispbottom " ~ You may drop this mission.";
    			close;
    		}
     
    		// get mission data from sql
    		query_sql( "SELECT * FROM `mission_board` WHERE `id` = "[email protected]_id[[email protected]]+" LIMIT 1",
    			[email protected]_id,
    			[email protected]$,
    			[email protected]$,
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected]_job_bitmask,
    			[email protected]_branch_bitmask,
    			[email protected]_lv,
    			[email protected]_lv,
    			[email protected],
    			[email protected],
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected]$,
    			[email protected]_update$,
    			[email protected]_id$,
    			[email protected]_delay
    		);
     
    		// explode all saved strings to array value.
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		if( [email protected]_size )
    			callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		if( [email protected]_size )
    			callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		if( [email protected]_size )
    			callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_npc_size = callsub( OnExplodeArray,[email protected]_id$,[email protected]_npc_array$,1 );
     
    		setarray [email protected]_range,[email protected]_lv,[email protected]_lv;
     
    		// display the information of mission
    		[email protected] = callsub( OnDisplayMissionInfo,
    					[email protected]_id,
    					[email protected]$,
    					[email protected]$,
    					[email protected]_range,
    					[email protected],
    					[email protected][[email protected]],
    					[email protected]_list,
    					[email protected]_qty,
    					[email protected]_list,
    					[email protected]_qty,
    					[email protected]_job_bitmask,
    					[email protected]_branch_bitmask,
    					[email protected],
    					[email protected],
    					[email protected],
    					[email protected],
    					[email protected]_list,
    					[email protected]_qty,
    					[email protected]_npc_array$,
    					[email protected]_update$,
    					[email protected]_delay,
    					1|2|4|8
    				);
     
    		// submit mission or not
    		if( [email protected] ){
    			message strcharinfo(0),"Failed to submit this mission.";
    		}else{
    			next;
    			if( select( "Submit Completed Mission","Cancel" ) == 1 ){
    				for( [email protected] = ( @ms_size - 1 ); [email protected] >= 0; [email protected] )
    					if( @ms_list$[[email protected]] == ""[email protected]_id ){
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						query_sql( "UPDATE `player_mission` SET `completion` = NOW() WHERE `cid` = "+getcharid(0)+" AND `mission_id` = "[email protected]_id +" AND `completion` = '0000-00-00 00:00:00'" );
    						mes "Mission accomplished.";
    						@ms_size--;
     
    						// clear requirement.
    						setd( "@ms_"[email protected]_id+"_expire" ),0;
    						deletearray getd( "@ms_"[email protected]_id+"_list" );
    						deletearray getd( "@ms_"[email protected]_id+"_qty" );
    						deletearray getd( "@ms_"[email protected]_id+"_hunt" );
    						if( [email protected]_size )
    							for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    								// debugmes getitemname( [email protected]_list[[email protected]] )+" - "[email protected]_qty[[email protected]];
    								delitem [email protected]_list[[email protected]],[email protected]_qty[[email protected]];
    							}
     
    						mes "Gained some mission's rewards.";
    						// rewards
    						getexp [email protected],[email protected];
    						if( [email protected]_size )
    							for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    								getitem [email protected]_list[[email protected]],[email protected]_qty[[email protected]];
    						#CASHPOINTS += [email protected];
    						Zeny += [email protected];
    						break;
    					}
    				mes "Something went wrong ..";
    			}
    		}
    		break;
    	case 2:
    		// get info from SQL.
    		do{
    			mes "^0055FF[ "[email protected]_name$+" ]^000000";
    			deletearray [email protected];
    			query_sql( "SELECT `id`,`title`,`min_lv`,`max_lv` FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' AND `id` NOT IN ( SELECT `mission_id` FROM `player_mission` WHERE `cid` = "+getcharid(0)+" AND `completion` = '0000-00-00 00:00:00' ) LIMIT "+.max_page_size+" OFFSET "[email protected],[email protected],[email protected]$,[email protected]_lv,[email protected]_lv );
    			[email protected] += .max_page_size;
    			[email protected] = getarraysize( [email protected] );
    			if( [email protected] ){
    				mes "There are no other available missions to pick.";
    				close;
     
    			}else{
    				mes "Pick a mission.";
    				[email protected]_menu$ = "";
    				for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
    					[email protected]_menu$ = [email protected]_menu$ + "["[email protected]_lv[[email protected]]+"~"[email protected]_lv[[email protected]]+"] "[email protected]$[[email protected]] +":";
    			}
    			next;
    			[email protected] = select( [email protected]_menu$+ ( ( [email protected] < .max_page_size )?"":"- next page" ) ) - 1;
    		}while( [email protected] == [email protected] );
     
    		query_sql( "SELECT * FROM `mission_board` WHERE `id` = "[email protected][[email protected]]+" LIMIT 1",
    			[email protected]_id,
    			[email protected]$,
    			[email protected]$,
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected]_job_bitmask,
    			[email protected]_branch_bitmask,
    			[email protected]_lv,
    			[email protected]_lv,
    			[email protected],
    			[email protected],
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected]$,
    			[email protected]_update$,
    			[email protected]_id$,
    			[email protected]_delay
    		);
     
    		// explode all saved strings to array value.
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_npc_size = callsub( OnExplodeArray,[email protected]_id$,[email protected]_npc_array$,1 );
     
    		setarray [email protected]_range,[email protected]_lv,[email protected]_lv;
     
    		// display the information of mission
    		[email protected] = callsub( OnDisplayMissionInfo,
    				[email protected]_id,
    				[email protected]$,
    				[email protected]$,
    				[email protected]_range,
    				[email protected],
    				( [email protected] + gettimetick(2) ),
    				[email protected]_list,
    				[email protected]_qty,
    				[email protected]_list,
    				[email protected]_qty,
    				[email protected]_job_bitmask,
    				[email protected]_branch_bitmask,
    				[email protected],
    				[email protected],
    				[email protected],
    				[email protected],
    				[email protected]_list,
    				[email protected]_qty,
    				[email protected]_npc_array$,
    				[email protected]_update$,
    				[email protected]_delay,
    				1|8
    		);
     
    		// check completed how many times.
    		if ( [email protected] ) {
    			query_sql "select count(id) from player_mission where mission_id = "+ [email protected][[email protected]] +" and completion != '0000-00-00 00:00:00' and cid = "+ getcharid(0), [email protected]on_completed;
    			if( [email protected]_completed >= [email protected] ) {
    				next;
    				mes "^0055FF[ "[email protected]_name$+" ]^000000";
    				mes " ";
    				mes "You cant pick this mission, you have mission completion reach the max repeatable attempt of "[email protected]_completed+" times.";
    				close;
    			}
    		}
    
    		if ( [email protected]_delay ) {
    			query_sql "select timestampdiff( hour, completion, now() ), unix_timestamp( date_add( completion, interval "+ [email protected]_delay +" hour ) ) from player_mission where cid = "+ getcharid(0) +" and mission_id = "+ [email protected][[email protected]] +" order by completion desc limit 1", [email protected]_delay, [email protected]_time;
    			if ( [email protected]_delay < [email protected]_delay ) {
    				next;
    				mes "^0055FF[ "[email protected]_name$+" ]^000000";
    				mes " ";
    				mes "You cant pick this mission, you have mission redo delay isnt finish yet.";
    				mes "^FF0000"+ callfunc( "Time2Str", [email protected]_time ) +"^000000";
    				close;
    			}
    		}
    
    		if( [email protected] ){
    			message strcharinfo(0),"Failed to pick this mission.";
    		}else{
    			if( select( "Pick Mission","Cancel" ) == 1 ){
    				query_sql( "INSERT INTO `player_mission` VALUES ( "+gettimetick(2)+","[email protected]_id+","+getcharid(3)+","+getcharid(0)+",'"+escape_sql( strcharinfo(0) )+"','',"+( ( [email protected] )? ( [email protected] + gettimetick(2) ) : 0 )+",NOW(),'0000-00-00 00:00:00' );" );
    				message strcharinfo(0),"Picked Mission # "[email protected]_id;
     
    				@ms_list$[ @ms_size ] = ""[email protected]_id;
    				@ms_title$[ @ms_size ] = ""[email protected]$;
    				@ms_size++;
     
    				copyarray getd( "@ms_"[email protected]_id+"_list[0]" ),[email protected]_list[0],[email protected]_size;
    				copyarray getd( "@ms_"[email protected]_id+"_qty[0]" ),[email protected]_qty[0],[email protected]_size;
    				deletearray getd( "@ms_"[email protected]_id+"_hunt" );
    				if ( [email protected] ) {
    					setd( "@ms_"[email protected]_id+"_expire" ),( [email protected] + gettimetick(2) );
    					addtimer ( [email protected] * 1000 ),.npc_name$+"::OnTimeCheck";
    				}
    			}
    		}
    		break;
    	case 3:
    		query_sql( "SELECT `id`,`title`,`min_lv`,`max_lv` FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' AND `id` IN ( SELECT `mission_id` FROM `player_mission` WHERE `cid` = "+getcharid(0)+" AND `completion` = '0000-00-00 00:00:00' )",[email protected],[email protected]$,[email protected]_lv,[email protected]_lv );
    		[email protected]_size = getarraysize( [email protected] );
    		for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    			[email protected]_menu$ = [email protected]_menu$ + "["[email protected]_lv[[email protected]]+"~"[email protected]_lv[[email protected]]+"] "[email protected]$[[email protected]] +":";
    		mes "^0055FF[ "[email protected]_name$+" ]^000000";
    		mes "Pick a Mission to remove.";
    		next;
    		[email protected] = select( [email protected]_menu$ ) - 1;
    		mes "^0055FF[ "[email protected]_name$+" ]^000000";
    		mes "Confirm remove ^0055FFMission # "[email protected][[email protected]]+"^000000?";
    		mes "Title : ^0055FF"[email protected]$[[email protected]]+"^000000";
    		mes "^777777( this cant be un-done )^000000";
    		if( select( "nope","Confirm" ) == 2 ){
    			message strcharinfo(0),"Dropped Mission # "[email protected][[email protected]];
    			query_sql( "DELETE FROM `player_mission` WHERE `mission_id` = "[email protected][[email protected]]+" AND `cid` = "+getcharid(0)+" AND `completion` = '0000-00-00 00:00:00'" );
    			setd( "@ms_"[email protected][[email protected]]+"_expire" ),0;
    			deletearray getd( "@ms_"[email protected][[email protected]]+"_list" );
    			deletearray getd( "@ms_"[email protected][[email protected]]+"_qty" );
    			deletearray getd( "@ms_"[email protected][[email protected]]+"_hunt" );
    			for( [email protected] = 0; [email protected] < @ms_size; [email protected]++ )
    				if( ""[email protected][[email protected]] == @ms_list$[[email protected]] ){
    					deletearray @ms_list$[[email protected]],1;
    					deletearray @ms_title$[[email protected]],1;
    					@ms_size--;
    					break;
    				}
    		}
    		break;
    	case 4:
    		// get info from SQL.
    		do{
    			mes "^0055FF[ "[email protected]_name$+" ]^000000";
    			deletearray [email protected];
    			query_sql( "SELECT `id`,`title`,`min_lv`,`max_lv` FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' LIMIT "+.max_page_size+" OFFSET "[email protected],[email protected],[email protected]$,[email protected]_lv,[email protected]_lv );
    			[email protected] += .max_page_size;
    			[email protected] = getarraysize( [email protected] );
    			if( [email protected] ){
    				mes "There are no available mission to update.";
    				close;
     
    			}else{
    				mes "Pick a mission.";
    				[email protected]_menu$ = "";
    				for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
    					[email protected]_menu$ = [email protected]_menu$ + "["[email protected]_lv[[email protected]]+"~"[email protected]_lv[[email protected]]+"] "[email protected]$[[email protected]] +":";
    			}
    			next;
    			[email protected] = select( [email protected]_menu$+ ( ( [email protected] < .max_page_size )?"":"- next page" ) ) - 1;
    		}while( [email protected] == [email protected]size );
    		query_sql( "SELECT * FROM `mission_board` WHERE `id` = "[email protected][[email protected]],
    			[email protected]_mission_id,
    			[email protected]$,
    			[email protected]$,
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected]_job_bitmask,
    			[email protected]_branch_bitmask,
    			[email protected]_lv,
    			[email protected]_lv,
    			[email protected],
    			[email protected],
    			[email protected]_list$,
    			[email protected]_qty$,
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected],
    			[email protected]$,
    			[email protected]_update$,
    			[email protected]_id$,
    			[email protected]_delay
    		);
    		// explode all saved strings to array value.
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_list$,[email protected]_list,0 );
    		[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,[email protected]_qty,0 );
     
    		[email protected]_npc_size = callsub( OnExplodeArray,[email protected]_id$,[email protected]_npc_array$,1 );
     
    		setarray [email protected]_range,[email protected]_lv,[email protected]_lv;
     
    	case 5:
    		do{
    			mes "^0055FF[ "[email protected]_name$+" ]^000000";
    			// display the information of mission
    			callsub( OnDisplayMissionInfo,
    				[email protected]_mission_id,
    				[email protected]$,
    				[email protected]$,
    				[email protected]_range,
    				[email protected],
    				( [email protected] + gettimetick(2) ),
    				[email protected]_list,
    				[email protected]_qty,
    				[email protected]_list,
    				[email protected]_qty,
    				[email protected]_job_bitmask,
    				[email protected]_branch_bitmask,
    				[email protected],
    				[email protected],
    				[email protected],
    				[email protected],
    				[email protected]_list,
    				[email protected]_qty,
    				[email protected]_npc_array$,
    				[email protected]_update$,
    				[email protected]_delay,
    				0
    			);
     
    			// check if required info complete for setup mission
    			[email protected] = 0;
    			if( [email protected]$ == "" ) [email protected] |= 1;
    			if( [email protected]$ == "" ) [email protected] |= 2;
    			if( [email protected]_size && [email protected]_size ) [email protected] |= 4;
    			if( getarraysize( [email protected]_range ) != 2 || [email protected]_job_bitmask || [email protected]_branch_bitmask ) [email protected] |= 8;
    			if( [email protected]_size && [email protected] && [email protected] && [email protected] && [email protected] ) [email protected] |= 16;
    			if( [email protected]_npc_size ) [email protected] |= 32;
     
    			[email protected]_option = select( "Edit Title "+(( [email protected] & 1 )?"^FF0000-incomplete-^000000":"" ),
    							"Edit Description "+(( [email protected] & 2 )?"^FF0000-incomplete-^000000":"" ),
    							"Edit Monster List "+(( [email protected] & 4 )?"^FF0000-incomplete-^000000":( ( [email protected]_size )?"^777777-none-^000000":"" )),
    							"Edit Item List "+(( [email protected] & 4 )?"^FF0000-incomplete-^000000":( ( [email protected]_size )?"^777777-none-^000000":"" )),
    							"Edit Class/Level Limitation "+(( [email protected] & 8 )?"^FF0000-incomplete-^000000":"" ),
    							"Edit Time/Repeat/Mission Limitation ",
    							"Edit Reward List "+(( [email protected] & 16 )?"^FF0000-incomplete-^000000":"" ),
    							"Edit NPC Limitation "+(( [email protected] & 32 )?"^FF0000-incomplete-^000000":"" ),
    							( [email protected] )?"":"^0055FF - Complete Setup Mission^000000" );
    			next;				
    			switch( [email protected]_option ){
    				case 1:
    					mes "^0055FF[ "[email protected]_name$+" ]^000000";
    					mes "Enter Title";
    					mes "^777777( Length: 4 ~ 30 )^000000";
    					while( input( [email protected]$,4,30 ) );
    					[email protected]_result = replacestr( [email protected]$,":"," " );
    					break;
    				case 2:
    					[email protected]$ = "";
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes "Enter Description";
    						mes "^777777( Length: 4 ~ 255 )^000000";
    						mes " ";
    						mes "^0055FF"[email protected]$+"^000000";
    						[email protected] = getstrlen( [email protected]$ );
    						do{
    							[email protected]_result = input( [email protected]_input$,4,255 );
    							if( [email protected]_result )
    								message strcharinfo(0),"Input length must between 4 ~ 255";
    						}while( [email protected]_result );
    						[email protected]$ = [email protected]$ + " "+ [email protected]_input$;
    						mes "^0055FF"[email protected]_input$+"^000000";
    						[email protected] = getstrlen( [email protected]$ );
    						next;
    					}while( select( ( [email protected] >= 255 )?"":"add more ^777777( left "+( 255 - [email protected] )+" words )^000000","-back" ) == 1 );
    					[email protected]$  = replacestr( [email protected]iption$,":"," " );
    					break;
    				case 3:
    					if( [email protected]_mission_id ){
    						dispbottom "Editing monster list might caused unwanted behaviours of scripts.  Which may included :";
    						dispbottom " > Script/Missions isnt working properly.";
    						dispbottom " > Deletion of player mission's progress.";
    						dispbottom " > etc.";
    						dispbottom "Overall it's not suggested to edit monster list that you have set early.";
    						dispbottom "( Recommend for Re-Adding mission, if needed )";
    					}
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes "Monster List:";
    						if( [email protected]_size ){
    							[email protected]_menu$ = "";
    							[email protected]_mob_list$ = "|";
    							deletearray [email protected]_mob$;
    							for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    								[email protected]_name$ = getmonsterinfo( [email protected]_list[[email protected]],MOB_NAME );
    								[email protected]_menu$ = [email protected]_menu$ + [email protected]_qty[[email protected]] +" x "[email protected]_name$ +":";
    								mes " ^777777 ~ "[email protected]_qty[[email protected]]+" x "[email protected]_name$+"^000000";
    								[email protected]_mob_list$ = [email protected]_mob_list$ + [email protected]_list[[email protected]] +"|";
    							}
     
    						}else{
    							mes " ^777777 ~ none ^000000";
    						}
    						mes " ";
    						[email protected] = select( ( [email protected]_size >= .max_required_monster )?"":"Add Monster",( [email protected]_size )?"Delete Monster":"","- Back" );
    						switch( [email protected] ){
    							case 1:
    								mes "Enter Monster ID";
    								do{
    									input [email protected]_id;
    									if( [email protected]_id ) break;
    									[email protected]_name$ = getmonsterinfo( [email protected]_id,MOB_NAME );
    								}while( [email protected]_name$ == "null" );
    								if( [email protected]_name$ != "null" && [email protected]_id ){
    									mes "How many "[email protected]_name$+" need to hunt ?";
    									input [email protected],0,30000;
    									if( [email protected] ){
    										if( compare( "|"[email protected]_mob_list$+"|","|"[email protected]_id+"|" ) ){
    											for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    												if( [email protected]_list[[email protected]] == [email protected]_id ){
    													[email protected]_qty[[email protected]] += [email protected];
    													break;
    												}
     
    										}else{
    											[email protected]_list[[email protected]_size] = [email protected]_id;
    											[email protected]_qty[[email protected]_size] = [email protected];
    											[email protected]_size++;
    										}
    									}
    								}
    								break;
    							case 2:
    								mes "^0055FF[ "[email protected]_name$+" ]^000000";
    								mes "Pick a Monster to Remove.";
    								[email protected] = select( [email protected]_menu$+"- Back" ) - 1;
    								if( [email protected] < [email protected]_size ){
    									deletearray [email protected]_list[[email protected]],1;
    									deletearray [email protected]_qty[[email protected]],1;
    									[email protected]_size--;
    								}
    							default: break;
    						}
    						if( [email protected] < 3 ) next;
    					}while( [email protected] < 3 );
    					break;
    				case 4:
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes "Required Item List: ";
    						if( [email protected]_size ){
    							[email protected]_menu$ = "";
    							[email protected]_item_list$ = "|";
    							deletearray [email protected]_item$;
    							for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    								[email protected]_name$ = getitemname( [email protected]_list[[email protected]] );
    								[email protected]_menu$ = [email protected]_menu$ + [email protected]_qty[[email protected]] +"x "[email protected]_name$ +":";
    								mes " ^777777 ~ "[email protected]_qty[[email protected]]+" x "[email protected]_name$+"^000000";
    								[email protected]_item_list$ = [email protected]_item_list$ + [email protected]_list[[email protected]] + "|";
    							}
     
    						}else{
    							mes " ^777777 ~ none ^000000";
    						}
    						mes " ";
    						[email protected] = select( ( [email protected]_size >= .max_required_item )?"":"Add Item",( [email protected]_size )?"Delete Item":"","- Back" );
    						switch( [email protected] ){
    							case 1:
    								do{
    									input [email protected]_id;
    									if( [email protected]_id ) break;
    									[email protected]_name$ = getitemname( [email protected]_id );
    								}while( [email protected]_name$ == "null" || [email protected]_name$ == "" );
    								if( [email protected]_id && [email protected]_name$ != "null" && [email protected]_name$ != "" ){
    									mes "How many "[email protected]_name$+" need to collect ?";
    									input [email protected],0,30000;
    									if( [email protected] ){
    										if( compare( "|"[email protected]_item_list$+"|","|"[email protected]_id+"|" ) ){
    											for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    												if( [email protected]_list[[email protected]] == [email protected]_id ){
    													[email protected]_qty[[email protected]] += [email protected];
    													break;
    												}
    										}else{
    											[email protected]_list[[email protected]_size] = [email protected]_id;
    											[email protected]_qty[[email protected]_size] = [email protected];
    											[email protected]_size++;
    										}
    									}
    								}
    								break;
    							case 2:
    								mes "^0055FF[ "[email protected]_name$+" ]^000000";
    								mes "Pick an Item to Remove.";
    								[email protected] = select( [email protected]_menu$+" - Back" ) - 1;
    								if( [email protected] < [email protected]_size ){
    									mes "Removed "[email protected]_qty[[email protected]]+" x "+getitemname( [email protected]_list[[email protected]] );
    									deletearray [email protected]_list[[email protected]],1;
    									deletearray [email protected]_qty[[email protected]],1;
    									[email protected]_size--;
    								}
    							default: break;
    						}
    						if( [email protected] < 3 ) next;
    					}while( [email protected] < 3 );
    					break;
    				case 5: // class limitation
    					if( [email protected]_job_bitmask ){
    						// enable all job by default.
    						for( [email protected] = 0; [email protected] < .base_job_size; [email protected]++ ){
    							[email protected]_value = ( 1 << [email protected] );
    							[email protected]_job_bitmask |= [email protected]_value;
    						}
    						// enable all inherited classes by default.
    						for( [email protected] = 0; [email protected] < .job_branch_size; [email protected]++ ){
    							[email protected]_value = ( 1 << [email protected] );
    							[email protected]_branch_bitmask |= [email protected]_value;
    						}
    					}
     
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes "Level Range : "+( ( [email protected]_range[1] )? "^777777"[email protected]_range[0]+" ~ "[email protected]_range[1]:"^FF0000-incomplete-" )+"^000000";
    						mes "Available Job Setting";
    						if( [email protected]_job_bitmask ){
    							for( [email protected] = 0; [email protected] < .base_job_size; [email protected]++ )
    								if( [email protected]_job_bitmask & ( 1 << [email protected] ) )
    									mes " ^777777 ~ "+jobname( roclass( .base_job[[email protected]] ) )+" ^000000";
    						}else{
    							mes " ^FF0000 -incomplete-^000000";
    						}
    						mes " ";
    						mes "Inherited Branch Setting";
    						if( [email protected]_branch_bitmask ){
    							for( [email protected] = 0; [email protected] < .job_branch_size; [email protected]++ )
    								if( [email protected]_branch_bitmask & ( 1 << [email protected] ) )
    									mes " ^777777 ~ "+.job_branch_name$[[email protected]]+" ^000000";	
    						}else{
    							mes " ^FF0000 -incomplete-^000000";
    						}	
    						next;
    						[email protected] = select( "Edit Base Job","Edit Job Branch","Edit Level Range","- Back" );
    						switch( [email protected] ){
    							case 1:
    								dispbottom "[ Base Job Class ] RED = Disable , GREEN = Enable";
    								do{
    									mes "^0055FF[ "[email protected]_name$+" ]^000000";
    									mes "Available Job List:";
    									[email protected]_job_menu$ = "";
    									for( [email protected] = 0; [email protected] < .base_job_size; [email protected]++ ){
    										[email protected]_name$ = jobname( roclass( .base_job[[email protected]] ) );
    										if( [email protected]_job_bitmask & ( 1 << [email protected] ) )
    											mes " ^777777 ~ "[email protected]_name$+" ^000000";						
    										[email protected]_job_menu$ = [email protected]_job_menu$ + (( [email protected]_job_bitmask & ( 1 << [email protected] ) )?"^4EEE94":"^FF0000" ) + [email protected]_name$ +"^000000:";
    									}
    									next;
    									[email protected] = select( [email protected]_job_menu$+"- Back" ) - 1;
    									if( [email protected] < .base_job_size ){
    										[email protected]_value = ( 1 << [email protected] );
    										if( [email protected]_job_bitmask & [email protected]_value )
    											[email protected]_job_bitmask -= [email protected]_value;
    										else
    											[email protected]_job_bitmask |= [email protected]_value;
    									}
    								}while( [email protected] < .base_job_size );
    								break;
    							case 2:
    								dispbottom "[ Inherited Job Branch ] RED = Disable , GREEN = Enable";
    								do{
    									mes "^0055FF[ "[email protected]_name$+" ]^000000";
    									mes "Inherited Job Branch List:";
    									[email protected]_branch_menu$ = "";
    									for( [email protected] = 0; [email protected] < .job_branch_size; [email protected]++ ){
    										if( [email protected]_branch_bitmask & ( 1 << [email protected] ) )
    											mes " ^777777 ~ "+.job_branch_name$[[email protected]]+" ^000000";						
    										[email protected]_branch_menu$ = [email protected]_branch_menu$ + (( [email protected]_branch_bitmask & ( 1 << [email protected] ) )?"^4EEE94":"^FF0000" ) + .job_branch_name$[[email protected]] +"^000000:";
    									}
    									next;
    									[email protected] = select( [email protected]_branch_menu$+"- Back" ) - 1;
    									if( [email protected] < .job_branch_size ){
    										[email protected]_value = ( 1 << [email protected] );
    										if( [email protected]_branch_bitmask & [email protected]_value )
    											[email protected]_branch_bitmask -= [email protected]_value;
    										else
    											[email protected]_branch_bitmask |= [email protected]_value;
    									}
    								}while( [email protected] < .job_branch_size );
    								break;
    							case 3:
    								mes "^0055FF[ "[email protected]_name$+" ]^000000";
    								mes "Minimum Level";
    								input [email protected]_range[0],1,.server_max_level ;
    								mes "Maximum Level";
    								input [email protected]_range[1],[email protected]_range[0],.server_max_level;
    							default: break;
    						}
    						if( [email protected] < 4 ) next;
    					}while( [email protected] < 4 );
    					break;
    				case 6: // mission limitation
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes "Repeatable: ^777777"+( ( [email protected] )?"unlimit":""[email protected] )+" time^000000";
    						mes "Redo Delay: ^777777"+( ( [email protected]_delay )?"none":callsub( OnTime2Str,( ( [email protected]_delay * 3600 ) + gettimetick(2) ) ))+"^000000";
    						mes "Time Limit: ^777777"+( ( [email protected] )?"none":callsub( OnTime2Str,( [email protected] + gettimetick(2) ) ) )+"^000000";
    						[email protected] = select( "Edit Repeatable Status","Edit Time Limit","Edit Re-do Delay","Edit Required Mission","- Back" );
    						switch( [email protected] ){
    							case 1:
    								mes "How many time can this mission repeat ??";
    								mes "^777777( 0 = unlimited )^000000";
    								input [email protected],0,100;
    								break;
    							case 2:
    								mes "Time Limit of mission";
    								mes "      1 = 1 minute";
    								mes "    60 = 1 hour";
    								mes "1440 = 1 day";
    								input [email protected],0,50000;
    								[email protected] *= 60;
    								break;
    							case 3:
    								mes "Time Delay to re-take the mission";
    								mes "     1 =  1 hour";
    								mes "   24 =  1 day";
    								mes " 720 = 30 day";
    								input [email protected]_delay,0,50000;
    								break;
    							case 4:
    								mes "This is not fully implemented yet.. still in beta test";
    								break;
     
    								do{
    									mes "Required Mission:";
    									if( [email protected]_mission_size ){
    										for( [email protected] = 0; [email protected] < [email protected]_mission_size; [email protected]++ ){
    											mes " ^777777 ~ "[email protected]_mission$[[email protected]]+"^000000";
    											[email protected]_mission_menu$ = [email protected]_mission_menu$ + [email protected]_mission$[[email protected]] +":";
    										}
     
    									}else{
    										mes "^777777 none ^000000";
    									}
    									next;
    									[email protected]_option = select( ( [email protected]_mission_size < .max_required_mission )?"Add required mission":"",
    														( [email protected]_mission_size )?"Remove required mission":"",
    														"- Back");
    									switch( [email protected]_option ){
    										case 1:
    											mes "Enter mission ID";
    											mes "^777777( enter 0 to cancel )^000000";
    											do{
    												input [email protected]_id$;
    												if( [email protected]_id$ == "0" ) break;
    											}while( compare( "|"[email protected]_mission_menu$+"|","|"[email protected]_id$+"|" ) );
    											[email protected]_id$ = replacestr( [email protected]_id$,":","" );
    											if( [email protected]_id$ != "0" ){
    												[email protected]_mission$[[email protected]_mission_size] = [email protected]_id$;
    												[email protected]_mission_size++;
    											}
    											break;
    										case 2:
    											mes "Select a mission to remove.";
    											[email protected] = select( [email protected]_mission_menu$ ) - 1;
    											deletearray [email protected]_mission$[[email protected]],1;
    										default: break;
    									}
    								}while( [email protected]_option < 3 );
    							default: break;
    						}
    						if( [email protected] < 5 ) next;
    					}while( [email protected] < 5 );
    					break;
    				case 7: // reward list
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes " ";
    						mes "Cash : ^777777"+( ( [email protected] )? [email protected]:"none" )+"^000000";
    						mes "Zeny : ^777777"+( ( [email protected] )? [email protected]:"none" )+"^000000";
    						mes "Reward Item List: ";
    						if( [email protected]_size ){
    							[email protected]_menu$ = "";
    							deletearray [email protected]_reward$;
    							for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    								[email protected]_name$ = getitemname( [email protected]_list[[email protected]] );
    								[email protected]_menu$ = [email protected]_menu$ + [email protected]_qty[[email protected]] +"x "[email protected]_name$ +":";
    								[email protected]_reward$[[email protected]] = [email protected]_name$;
    								mes " ^777777 ~ "[email protected]_qty[[email protected]]+" x "[email protected]_name$+"^000000";
    							}
    							[email protected]_reward_list$ = implode( [email protected]_reward$,"|" );
     
    						}else{
    							mes " ^777777 ~ none ^000000";
    						}
    						mes "Base EXP : ^777777"+( ( [email protected] )? [email protected]:"none" )+"^000000";
    						mes "Job EXP : ^777777"+( ( [email protected] )? [email protected]:"none" )+"^000000";
    						mes " ";
    						next;
    						[email protected] = select( ( [email protected]_size >= .max_required_item )?"":"Add Item Reward",
    										( [email protected]_size )?"Delete Item Reward":"",
    										"Edit Cash Reward",
    										"Edit Zeny Reward",
    										"Edit Base EXP Reward",
    										"Edit Job EXP Reward",
    										"- Back" );
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						switch( [email protected] ){
    							case 1:
    								mes "Enter Reward Item ID";
    								do{
    									input [email protected]_id;
    									if( [email protected]_id ) break;
    									[email protected]_name$ = getitemname( [email protected]_id );
    								}while( [email protected]_name$ == "null" || [email protected]_name$ == "" );
    								if( [email protected]_id && [email protected]_name$ != "null" && [email protected]_name$ != "" ){
    									mes "How many "[email protected]_name$+" will be rewarded ?";
    									input [email protected],0,30000;
    									if( [email protected] ){
    										if( compare( "|"[email protected]_reward_list$+"|","|"[email protected]_name$+"|" ) ){
    											for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    												if( [email protected]_list[[email protected]] == [email protected]_id ){
    													[email protected]_qty[[email protected]] += [email protected];
    													break;
    												}
    										}else{
    											[email protected]_list[[email protected]_size] = [email protected]_id;
    											[email protected]_qty[[email protected]_size] = [email protected];
    											[email protected]_size++;
    										}
    									}
    								}
    								break;
    							case 2:
    								mes "Pick an Reward to Remove.";
    								[email protected] = select( [email protected]_menu$ ) - 1;
    								mes "Removed "[email protected]_qty[[email protected]]+"x "+getitemname( [email protected]_list[[email protected]] );
    								deletearray [email protected]_list[[email protected]],1;
    								deletearray [email protected]_qty[[email protected]],1;
    								[email protected]_size--;
    								break;
    							case 3:
    								mes "How many Cash will be given ?";
    								mes "^777777( value: 0 ~ "+.max_integer_value+" )^000000";
    								input [email protected],0,.max_integer_value;
    								break;
    							case 4:
    								mes "How many Zeny will be given ?";
    								mes "^777777( value: 0 ~ "+.max_integer_value+" )^000000";
    								input [email protected],0,.max_integer_value;
    								break;
    							case 5:
    								mes "How many Base EXP reward ?";
    								mes "^777777( value: 0 ~ "+.max_integer_value+" )^000000";
    								input [email protected],0,.max_integer_value;
    								break;
    							case 6:
    								mes "How many Job EXP reward ?";
    								mes "^777777( value: 0 ~ "+.max_integer_value+" )^000000";
    								input [email protected],0,.max_integer_value;
    							default: break;
    						}
    						next;
    					}while( [email protected] < 7 );
    					break;
    				case 8: // npc limitation
    					mes "^0055FF[ "[email protected]_name$+" ]^000000";
    					mes "By default, the mission will be available from each mission board npc ^FF0000unless you have specified which NPC may offer this mission.^000000";
    					mes " ";
    					mes "Just pick all the NPC that may offer this mission if you wish.";
    					next;
    					if( !getarraysize( [email protected]_npc_array$ ) )
    						for( [email protected] = 0; [email protected] < .mission_npc_count; [email protected]++ ){
    							[email protected]_npc_array$[[email protected]] = ""[email protected];
    							[email protected]_npc_size++;
    						}
    					dispbottom "[ NPC Limitation ] RED = Disable , GREEN = Enable";
     
    					do{
    						mes "^0055FF[ "[email protected]_name$+" ]^000000";
    						mes "Mission offered by: ";
    						[email protected]_npc_menu$ = "";
    						if( [email protected]_npc_size >= 2 ){
    							[email protected]_npc$ = "|"+implode( [email protected]_npc_array$,"|" )+"|";
    						}else{
    							[email protected]_npc$ = "|"[email protected]_npc_array$+"|";
    						}
    						for( [email protected] = 0; [email protected] < .mission_npc_count; [email protected]++ ){
    							getmapxy( [email protected]$,[email protected],[email protected],1,.npc_unique_list$[[email protected]] );
    							[email protected]_npc_name$ = ( ( compare( "|"[email protected]_npc$+"|","|"[email protected]+"|" ) )?"^44EE00":"^FF0000" );
    							[email protected]_npc_name$ = [email protected]_npc_name$ + .npc_name_list$[[email protected]];
    							mes "^777777("[email protected]$+") "[email protected]_npc_name$;
    							[email protected]_npc_menu$ = [email protected]_npc_menu$ + [email protected]_npc_name$ +":";
    						}
    						next;
    						[email protected] = select( [email protected]_npc_menu$+"^000000- Back" ) - 1;
    						if( [email protected] < .mission_npc_count ){
    							if( compare( "|"[email protected]_npc$+"|","|"[email protected]+"|" ) )
    								[email protected]_npc_array$[[email protected]] = "";
    							else
    								[email protected]elected_npc_array$[[email protected]] = ""[email protected];
    							[email protected]_npc_size = getarraysize( [email protected]_npc_array$ );
    						}
    						// dispbottom "["+rand(10,99)+"] "+implode( [email protected]_npc_array$,"|" );
    					}while( [email protected] < .mission_npc_count );
    					break;
    				default: break;
    			}
    			next;
    		}while( [email protected]_option < 9 );
     
    		// finalise all variable
    		if( [email protected]_size ){
    			[email protected]_mob_list$ = "|";
    			[email protected]_mob_qty$ = "|";
    			for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    				[email protected]_mob_list$ = [email protected]_mob_list$ + [email protected]_list[[email protected]] +"|";
    				[email protected]_mob_qty$ = [email protected]_mob_qty$ + [email protected]_qty[[email protected]] +"|";
    			}	
    		}
     
    		if( [email protected]_size ){
    			[email protected]_item_list$ = "|";
    			[email protected]_item_qty$ = "|";
    			for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    				[email protected]_item_list$ = [email protected]_item_list$ + [email protected]_list[[email protected]] +"|";
    				[email protected]_item_qty$ = [email protected]_item_qty$ + [email protected]_qty[[email protected]] +"|";
    			}
    		}
     
    		if( [email protected]_size ){
    			[email protected]_reward_list$ = "|";
    			[email protected]_reward_qty$ = "|";
    			for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    				[email protected]_reward_list$ = [email protected]_reward_list$ + [email protected]_list[[email protected]] +"|";
    				[email protected]_reward_qty$ = [email protected]_reward_qty$ + [email protected]_qty[[email protected]] +"|";
    			}
    		}
     
    		if( [email protected]_npc_size ){
    			[email protected]_npc_list$ = "|";
    			for( [email protected] = 0; [email protected] < [email protected]_npc_size; [email protected]++ )
    				[email protected]_npc_list$ = [email protected]_npc_list$ + [email protected]_npc_array$[[email protected]] +"|";
    		}
     
    		if( [email protected]_mission_id ){
    			[email protected]_mission_id = gettimetick(2);
    			message strcharinfo(0),"Mission # "[email protected]_mission_id+" has been added.";
    		}else{
    			message strcharinfo(0),"Mission # "[email protected]_mission_id+" has been updated.";
    			// attach and inform other online players.
    			callsub( OnRemoveMission,[email protected]_mission_id,"A GM updated Mission # "[email protected]_mission_id );
    		}
     
    		// add new mission into SQL
    		query_sql( 
    			"REPLACE INTO `mission_board` VALUES ( " +
    				[email protected]_mission_id+", " +
    				"'"+escape_sql( [email protected]$ )+"', " +
    				"'"+escape_sql( [email protected]$ )+"', " +
    				"'"+escape_sql( [email protected]_mob_list$ )+"', " +
    				"'"+escape_sql( [email protected]_mob_qty$ )+"', " +
    				"'"+escape_sql( [email protected]_item_list$ )+"', " +
    				"'"+escape_sql( [email protected]_item_qty$ )+"', " +
    				[email protected]_job_bitmask+", " +
    				[email protected]_branch_bitmask+", " +
    				[email protected]_range[0]+", " +
    				[email protected]_range[1]+", " +
    				[email protected]+", " +
    				[email protected]+", " +
    				"'"+escape_sql( [email protected]_reward_list$ )+"', " +
    				"'"+escape_sql( [email protected]_reward_qty$ )+"', " +
    				[email protected]+", " +
    				[email protected]+", " +
    				[email protected]+", " +
    				[email protected]+", " +
    				getcharid(3)+", " +
    				"'"+escape_sql( strcharinfo(0) )+"', " +
    				"NOW(), " +
    				"'"+escape_sql( [email protected]_npc_list$ )+"', " +
    				[email protected]_delay +
    			" ); " 
    		);
    		break;
    	case 6: // delete mission
    		do{
    			mes "^0055FF[ "[email protected]_name$+" ]^000000";
    			deletearray [email protected];
    			query_sql( "SELECT `id`,`title`,`min_lv`,`max_lv` FROM `mission_board` WHERE `npc_id` LIKE '%|"[email protected]_npc_num+"|%' LIMIT "+.max_page_size+" OFFSET "[email protected],[email protected],[email protected]$,[email protected]_lv,[email protected]_lv );
    			[email protected] += .max_page_size;
    			[email protected] = getarraysize( [email protected] );
    			if( [email protected] ){
    				mes "There are no available mission to update.";
    				close;
     
    			}else{
    				mes "Pick a mission.";
    				for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
    					[email protected]_menu$ = [email protected]_menu$ + "["[email protected]_lv[[email protected]]+"~"[email protected]_lv[[email protected]]+"] "[email protected]$[[email protected]] +":";
    			}
    			next;
    			[email protected] = select( [email protected]_menu$+ ( ( [email protected] < .max_page_size )?"":"- next page" ) ) - 1;
    		}while( [email protected] == [email protected] );
    		[email protected]_id = [email protected][[email protected]];
    		mes "^0055FF[ "[email protected]_name$+" ]^000000";
    		mes "Are you sure to remove this mission ?";
    		if( select( "nope","Delete Mission" ) == 2 ){
    			query_sql( "DELETE FROM `mission_board` WHERE `id` = "[email protected]_id+" LIMIT 1" );
    			mes "Removed mission from mission list.";
     
    			// attach other online players and remove the missions.
    			callsub( OnRemoveMission,[email protected]_id,"A GM removed Mission # "[email protected]_id );
    			query_sql( "DELETE FROM `player_mission` WHERE `completion` = '0000-00-00 00:00:00' AND `mission_id` = "[email protected]_id );
    			mes "Removed mission from all players.";
    		}
    	default: break;
    }
    close;
     
    OnInit:
    initnpctimer "mission_board";
    // initialize settings
    if( strnpcinfo(0) == "mission_board" ){
     
    	// gm level to access panel
    	.gm_level = 90;
    	// max no. of required monster
    	.max_required_monster = 10;
    	// max no. of required item
    	.max_required_item = 10;
    	// max no. of required mission ( un-implement yet )
    	.max_required_mission = 10;
    	// max no. of available mission
    	.max_mission_available = 50;
    	// max value of integer input
    	.max_integer_value = 2000000000;
    	// max amount of mission per page
    	.max_page_size = 30;
    	// max mission per npc take by character
    	.max_mission_per_char = 4;
     
    	// predefined values.
    	.npc_name$ = strnpcinfo(0);
    	.server_max_level = MAX_LEVEL;
    	setarray .base_job,
    		EAJ_SWORDMAN,
    		EAJ_MAGE,
    		EAJ_ARCHER,
    		EAJ_ACOLYTE,
    		EAJ_MERCHANT,
    		EAJ_THIEF,
    		EAJ_TAEKWON,
    		EAJ_GUNSLINGER,
    		EAJ_NINJA;
    	.base_job_size = getarraysize( .base_job );
    	setarray .job_branch_name$,
    		"2-1 Classes",
    		"2-2 Classes",
    		"Rebirth Classes",
    		"Baby Classes",
    		"Third Classes";
    	setarray .job_branch,
    		EAJL_2_1,
    		EAJL_2_2,
    		EAJL_UPPER,
    		EAJL_BABY,
    		EAJL_THIRD;
    	.job_branch_size = getarraysize( .job_branch );
     
    	bindatcmd "mission", strnpcinfo(0)+"::OnCommand";
     
    }else{
    	// delay the process
    	[email protected] = atoi( strnpcinfo(2) );
    	if( [email protected] && [email protected] <= 500 && .mission_npc_count < 100 ){
    		sleep( [email protected] + 1 );
    		.npc_name_list$[ .mission_npc_count ] = strnpcinfo(1);
    		.npc_unique_list$[ .mission_npc_count ] = strnpcinfo(0);
    		// debugmes "["+.mission_npc_count+"]"+.npc_name_list$[ .mission_npc_count ]+"|"+.npc_unique_list$[ .mission_npc_count ];
    		.mission_npc_count++;
    		end;
     
    	}else if( [email protected] ){
    		debugmes "[Removed] "+strnpcinfo(0)+", invalid <num:'"+strnpcinfo(2)+"'>";
    	}else if( .mission_npc_count >= 100 ){
    		debugmes "[Skipped] "+strnpcinfo(0)+", max: 100 Total NPC.";
    	}
    	disablenpc strnpcinfo(0);
    }
    end;
     
    // just used to display how many total Mission Board NPC.
    OnTimer1000:
    	stopnpctimer;
    	debugmes "[ Mission Board ] Total NPC Loaded : "+.mission_npc_count+" ...";
    	end;
     
    OnCommand:
    	if ( !strcmp( strnpcinfo(0), .npc_name$ ) ) {
    		if ( @ms_size ) {
    			for ( [email protected] = 0; [email protected] < @ms_size; [email protected]++ ) {
    				[email protected]_size = getarraysize( getd( "@ms_"+ @ms_list$[[email protected]] +"_list" ) );
    				query_sql "select id, title, item_list, item_qty from mission_board where id = "+ @ms_list$[[email protected]], [email protected]_id, [email protected]$, [email protected]_id$, [email protected]_amount$;
    				if ( [email protected]_size ) {
    					if ( getd( "@ms_"+ [email protected]_id +"_expire" ) )
    						dispbottom "[Mission '"+ [email protected]$ +"' Progress] Time limit -> "+ callfunc( "Time2Str", getd( "@ms_"+ [email protected]_id +"_expire" ) );
    					for ( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    						dispbottom "[Mission '"+ [email protected]$ +"' Progress] Hunted "+ getd( "@ms_"+ @ms_list$[[email protected]] +"_hunt["+ [email protected] +"]" ) +"/"+ getd( "@ms_"+ @ms_list$[[email protected]] +"_qty[" + [email protected] +"]" ) +" x "+ getmonsterinfo( getd( "@ms_"+ @ms_list$[[email protected]] +"_list["+ [email protected] +"]" ), MOB_NAME );
    					explode [email protected]_id_array$, [email protected]_id$, "|";
    					explode [email protected]_amount_array$, [email protected]_amount$, "|";
    					[email protected] = getarraysize( [email protected]_id_array$ );
    					for ( [email protected] = 1; [email protected] < [email protected]; [email protected]++ )
    						dispbottom "[Mission '"+ [email protected]$ +"' Progress] Collected "+ countitem( atoi( [email protected]_id_array$[[email protected]] ) ) +"/"+ [email protected]_amount_array$[[email protected]] +" x "+ getitemname( atoi( [email protected]_id_array$[[email protected]] ) );
    				}
    			}
    		}
    	}
    	end;
     
    OnPCLoginEvent:
    if( strnpcinfo(0) == .npc_name$ ){
    	[email protected] = gettimetick(2);
    	[email protected] = query_sql( "SELECT `mission_id`,`expire`,`mob_hunt` FROM `player_mission` WHERE `completion` = '0000-00-00 00:00:00' AND `cid` = "+getcharid(0),@ms_list$,[email protected],[email protected]_hunt$ );
    	@ms_size = [email protected];
    	if( @ms_size ){
    		for( [email protected] = 0; [email protected] < @ms_size; [email protected]++ ) {
    			query_sql( "SELECT `title`,`mob_list`,`mob_qty` FROM `mission_board` WHERE `id` = "[email protected]_list$[[email protected]],@ms_title$,[email protected]_list$,[email protected]_qty$ );
    			if ( [email protected][[email protected]] ) {
    				[email protected] = ( [email protected][[email protected]] - [email protected] );
    				addtimer ( [email protected] * 1000 ),.npc_name$+"::OnTimeCheck";
    				dispbottom "[ Mission Progress : "[email protected]_title$+" , expire in "+ callfunc( "Time2Str", [email protected] + [email protected] )+" ]";
    			}
    			else
    				dispbottom "[ Mission Progress : "[email protected]_title$ +" ]";
    			setd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ),[email protected][[email protected]];
    			if( callsub( OnExplodeArray,[email protected]_list$,getd( "@ms_"[email protected]_list$[[email protected]]+"_list" ),0 ) ){
    				callsub( OnExplodeArray,[email protected]_hunt$[[email protected]],getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt" ),0 );
    				[email protected]_size = callsub( OnExplodeArray,[email protected]_qty$,getd( "@ms_"[email protected]_list$[[email protected]]+"_qty" ),0 );
    //				for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    //					dispbottom  " ~ killed "+getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt["[email protected]+"]" )+"/"+getd( "@ms_"[email protected]_list$[[email protected]]+"_qty["[email protected]+"]" )+" x "+getmonsterinfo( getd( "@ms_"[email protected]_list$[[email protected]]+"_list["[email protected]+"]" ),MOB_NAME );
    			}
    		}
    	}
    }
    end;
     
    OnPCLogoutEvent:
    if( strnpcinfo(0) == .npc_name$ ){
    	if( @ms_size )
    		for( [email protected] = 0; [email protected] < @ms_size; [email protected]++ ){
    			debugmes "Saving "[email protected]_list$[[email protected]];
    			[email protected]_size = getarraysize( getd( "@ms_"[email protected]_list$[[email protected]]+"_list" ) );
    			if( [email protected]_size ){
    				copyarray [email protected]_array[0],getd( "@ms_"[email protected]_list$[[email protected]]+"_list[0]" ),[email protected]_size;
    				[email protected]_hunt$ = "|";
    				for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    					[email protected]_hunt$ = [email protected]_hunt$ + getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt["[email protected]+"]" ) +"|";
    				query_sql( "UPDATE `player_mission` SET `mob_hunt` = '"+escape_sql( [email protected]_hunt$ )+"' WHERE `mission_id` = "[email protected]_list$[[email protected]]+" AND `completion` = '0000-00-00 00:00:00' AND `cid` = "+getcharid(0) );
    			}
    		}
    }
    end;
     
    OnNPCKillEvent:
    if( strnpcinfo(0) == .npc_name$ ){
    	if( @ms_size ){
    		[email protected]$ = strcharinfo(3);
     
    		// by default mission wont work in PVP,GVG,Instance,Event maps
    		if( compare( [email protected]$,"@" ) || getmapflag( [email protected]$,mf_gvg ) || getmapflag( [email protected]$,mf_pvp )){
    			// dispbottom "[Mission Board] PvP/GvG Map , Instance Map , Event Map , include monsters will not affect Mission Progress.";
    			end;
    		}
     
    		[email protected] = gettimetick(2);
    		for( [email protected] = ( @ms_size - 1 ); [email protected] >= 0; [email protected] ){
    			if( getd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ) && getd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ) < [email protected] ){
    				setd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ),0;
    				deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_list" );
    				deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_qty" );
    				deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt" );
    				dispbottom "[Mission # "[email protected]_title$[[email protected]]+"] Mission removed due to expired. ";
    				deletearray @ms_list$[[email protected]],1;
    				@ms_size--;
     
    			}else{
    				[email protected]_size = getarraysize( getd( "@ms_"[email protected]_list$[[email protected]]+"_list" ) );
    				if( [email protected]_size ){
    					copyarray [email protected]_array[0],getd( "@ms_"[email protected]_list$[[email protected]]+"_list[0]" ),[email protected]_size;
    					for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ )
    						if( [email protected]_array[[email protected]] == killedrid ){
    							[email protected] = getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt["[email protected]+"]" ) + 1;
    							setd( "@ms_"[email protected]_list$[[email protected]]+"_hunt["[email protected]+"]" ),[email protected];
    							// dispbottom "[Mission # "[email protected]_title$[[email protected]]+" Progress] Hunted "[email protected]+" x "+getmonsterinfo( [email protected]_array[[email protected]],MOB_NAME );
    							break;
    						}
    					deletearray [email protected]_array;
    				}
    			}
    		}
    	}
    }
    end;
     
    OnTimeCheck:
    	if( @ms_size ){
    		[email protected] = gettimetick(2);
    		for( [email protected] = ( @ms_size - 1 ); [email protected] >= 0; [email protected] ){
    			if( getd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ) <= [email protected] ){
    				setd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ),0;
    				deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_list" );
    				deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_qty" );
    				deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt" );
    				dispbottom "[Mission # "[email protected]_title$[[email protected]]+"] Mission removed due to expired. ";
    				deletearray @ms_list$[[email protected]],1;
    				deletearray @ms_title$[[email protected]],1;
    				@ms_size--;
    			}
    		}
    	}
    	end;
     
    OnRemoveMission:
    	[email protected]_id = getarg(0);
    	[email protected]$ = getarg(1);
     
    	query_sql( "SELECT `aid`,`cid` FROM `player_mission` WHERE `cid` IN ( SELECT `char_id` FROM `char` WHERE `online` = 1 ) AND `mission_id` = "[email protected]_id+" AND `completion` = '0000-00-00 00:00:00' LIMIT 128",[email protected],[email protected] );
    	[email protected]_size = getarraysize( [email protected] );
    	[email protected] = 0;
    	[email protected]_aid = getcharid(3);
    	while( [email protected] < [email protected]_size ){
    		if( isloggedin( [email protected][[email protected]],[email protected][[email protected]] ) ){
    			attachrid( [email protected][[email protected]] );
    			for( [email protected] = @ms_size; [email protected] >= 0; [email protected] )
    				if( @ms_list$[[email protected]] == ""[email protected]_id ){
    					message strcharinfo(0),[email protected]$;
    					dispbottom "Please visit Mission NPC to gain latest information.";
    					setd( "@ms_"[email protected]_list$[[email protected]]+"_expire" ),0;
    					deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_list" );
    					deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_qty" );
    					deletearray getd( "@ms_"[email protected]_list$[[email protected]]+"_hunt" );
    					deletearray @ms_list$[[email protected]],1;
    					deletearray @ms_title$[[email protected]],1;
    					@ms_size--;
    					break;
    				}
    			detachrid;
    			[email protected]++;
    		}
    		[email protected]++;
    	}
    	attachrid( [email protected]_aid );
    	dispbottom "Total "[email protected]+" online players affected.";
    	return;
     
    // usage :
    // [email protected] = callsub( OnTime2Str,<time> );
    OnTime2Str:
    	[email protected] = getarg(0);
    	[email protected] = ( [email protected] - gettimetick(2) );
    	[email protected] = ( [email protected] / 3600 );
    	[email protected] = ( [email protected] % 3600 / 60 );
    	[email protected] = ( [email protected] % 60 );
    	if( [email protected] ) 
    		return "none";
    	else
    		return "^777777"+( ( [email protected] )? [email protected]+" hr ":"" ) + ( ( [email protected] || [email protected] )? [email protected]+" min ":"" ) [email protected]+" sec^000000";
     
     
    // usage : 
    // [email protected]_array_size = callsub( OnExplodeArray,<old string variable>,<new array variable>,<save '0'> );
    OnExplodeArray:
    	[email protected] = getarg(2);
    	explode( getarg(0),getarg(0),"|" );
    	[email protected] = getarraysize( getarg(0) );
    	if ( [email protected] )
    		return 0;
    	while( [email protected] < [email protected] ){
    		if( [email protected] ){
    			[email protected] = atoi( getelementofarray( getarg(0),[email protected] ) );
    			if( [email protected] ){
    				set getelementofarray( getarg(1),[email protected]_size ),[email protected];
    				[email protected]_size++;
    			}
    		}else{
    			set getelementofarray( getarg(1),[email protected]_size ),getelementofarray( getarg(0),[email protected] );
    			[email protected]_size++;
    		}
    		[email protected]++;
    	}
     
    	return [email protected]_size;
     
     
    // display mission information + optional progress checking
    OnDisplayMissionInfo:
    		[email protected]_id = getarg(0);
    		[email protected]$ = getarg(1);
    		[email protected]$ = getarg(2);
    		[email protected] = getarg(4);
    		[email protected] = getarg(5);
    		[email protected]_size = getarraysize( getarg(6) );
    		[email protected]_size = getarraysize( getarg(8) );
    		[email protected]_job_bitmask = getarg(10);
    		[email protected]_branch_bitmask = getarg(11);
    		[email protected] = getarg(12);
    		[email protected] = getarg(13);
    		[email protected] = getarg(14);
    		[email protected] = getarg(15);
    		[email protected]_size = getarraysize( getarg(16) );
    		[email protected]_npc_size = getarraysize( getarg(18) );
    		[email protected]_update$ = getarg(19);
    		[email protected]_delay = getarg(20);
    		[email protected]_progress = getarg(21);
     
    		if( [email protected]_progress & 8 )
    			[email protected] = eaclass();
     
    		// display mission info
    		mes ""+(( [email protected]_id )? "^FF0000Mission ID # "[email protected]_id:" " )+"^000000";
    		mes "Title : "+( ( [email protected]$ != "" )?"^777777"[email protected]$:"^FF0000-incomplete-" )+"^000000";
    		mes "Description : "+( ( [email protected]$ != "" )?"^777777"[email protected]$:"^FF0000-incomplete-" )+"^000000";
    		mes "Level Range : "+( ( getelementofarray( getarg(3),0 ) )? "^777777"+getelementofarray( getarg(3),0 )+" ~ "+getelementofarray( getarg(3),1 ):"^FF0000-incomplete-" )+"^000000";
    		if( [email protected]_progress & 1 )
    			if( BaseLevel >= getelementofarray( getarg(3),0 ) && BaseLevel <= getelementofarray( getarg(3),1 ) )
    				[email protected]_progress = 1;
     
    		mes "Repeatable: ^777777"+( ( [email protected] )?"unlimit":[email protected]+" time" )+"^000000";
    		mes "Redo Delay: ^777777"+( ( [email protected]_delay )?"none":callsub( OnTime2Str,( ( [email protected]_delay * 3600 ) + gettimetick(2) ) ) )+"^000000";
    		mes "Expire in: ^777777"+( ( [email protected] )?"none":callsub( OnTime2Str,[email protected] ) )+"^000000";
    		mes " ";
     
    		[email protected]$ = (( [email protected]_size && [email protected]_size )?"^FF0000incomplete":"^777777none" );
    		mes "Monster List : "+( ( [email protected]_size )?"":[email protected]$ )+"^000000";
    		if( [email protected]_size )
    			for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    				[email protected]_id = getelementofarray( getarg(6),[email protected] );
    				[email protected] = getelementofarray( getarg(7),[email protected] );
    				if( [email protected]_progress & 2 ){
    					[email protected]_count = getd( "@ms_"[email protected]_id+"_hunt["[email protected]+"]" );
    					if( [email protected]_count >= [email protected] ){
    						[email protected]_progress++;
    						[email protected]_color$ = "44EE99";
    					}else{
    						[email protected]_color$ = "FF0000";
    					}
    				}
    				mes " ^777777"[email protected]+" x "+getmonsterinfo( [email protected]_id,MOB_NAME )+"  "+( ( [email protected]_progress & 2 )?"^"[email protected]_color$+"(killed "[email protected]_count+")":"" )+"^000000";
    			}
    		mes "Item List : "+( ( [email protected]_size )?"":[email protected]$ )+"^000000";
    		if( [email protected]_size )
    			for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    				[email protected]_id = getelementofarray( getarg(8),[email protected] );
    				[email protected] = getelementofarray( getarg(9),[email protected] );
    				[email protected]_type = getiteminfo( [email protected]_id,2 );
    				if( [email protected]_progress & 4 ){
    					[email protected]_count = countitem( [email protected]_id );
    					if( [email protected]_count >= [email protected] ){
    						[email protected]_progress++;
    						[email protected]_color$ = "44EE99";
    					}else{
    						[email protected]_color$ = "FF0000";
    					}
    				}
    				mes " ^777777"[email protected]+" x "+getitemname( [email protected]_id )+" "+( ( [email protected]_type == 4 || [email protected]_type == 5 )?"["+getitemslots( [email protected]_id )+"]":"" )+"  "+( ( [email protected]_progress & 4 )?"^"[email protected]_color$+"(have "[email protected]_count+")":"" )+"^000000";
    			}
    		mes " ";
    		mes "Available Job Classes :";
    		if( [email protected]_job_bitmask ){
    			deletearray [email protected]_job$;
    			deletearray [email protected]_branch$;
    			[email protected]_job_size = 0;
    			[email protected]_branch_size = 0;
    			for( [email protected] = 0; [email protected] < .base_job_size; [email protected]++ )
    				if( [email protected]_job_bitmask & ( 1 << [email protected] ) ){
    					[email protected] = roclass( .base_job[[email protected]] );
    					[email protected]_job$[[email protected]_job_size] = jobname( [email protected] );
    					if( [email protected]_progress & 8 && BaseClass == [email protected] )
    						[email protected]_progress = 1;
    					[email protected]_job_size++;
    				}
    			mes " ^777777"+implode( [email protected]_job$,"," )+" ^000000";	
    			if( [email protected]_branch_bitmask && [email protected]_progress ){
    				for( [email protected] = 0; [email protected] < .job_branch_size; [email protected]++ )
    					if( [email protected]_branch_bitmask & ( 1 << [email protected] ) ){
    						if( [email protected]_progress & 8 && ( [email protected] & .job_branch[[email protected]] ) )
    							[email protected]_progress++;
    						[email protected]_branch$[[email protected]_branch_size] = .job_branch_name$[[email protected]];	
    						[email protected]_branch_size++;
    					}
    				mes "Inherited: ^777777"+implode( [email protected]_branch$,", " )+" ^000000";			
    			}
    		}else{
    			mes " ^FF0000-incomplete^000000";
    		}
     
    		mes " ";
    		mes "Reward List : ";
    		mes "^777777 ~ Base EXP: "+( ( [email protected] )? [email protected]:"none" )+"^000000";
    		mes "^777777 ~ Job EXP: "+( ( [email protected] )? [email protected]:"none" )+"^000000";
    		mes "^777777 ~ Cash: "+( ( [email protected] )? [email protected]:"none" )+"^000000";
    		mes "^777777 ~ Zeny: "+( ( [email protected] )? [email protected]:"none" )+"^000000";
    		mes "Reward Item List: "+( ( [email protected]_size )?"":"^777777none" )+"^000000";
    		if( [email protected]_size )
    			for( [email protected] = 0; [email protected] < [email protected]_size; [email protected]++ ){
    				[email protected]_id = getelementofarray( getarg(16),[email protected] );
    				[email protected]_type = getiteminfo( [email protected]_id,2 );
    				mes " ^777777 ~ "+getelementofarray( getarg(17),[email protected] )+" x "+getitemname( [email protected]_id )+" "+( ( [email protected]_type == 4 || [email protected]_type == 5 )?"["+getitemslots( [email protected]_id )+"]":"" )+"^000000";
    			}
    		mes " ";
     
    		mes "Mission Offered by: "+( ( [email protected]_npc_size )?"":"^FF0000-incomplete" )+"^000000";
    		if( [email protected]_npc_size ){
    			if( [email protected]_npc_size >= 2 )
    				[email protected]_npc$ = "|"+implode( getarg(18),"|" )+"|";
    			else
    				[email protected]_npc$ = "|"+getarg(18)+"|";
    			for( [email protected] = 0; [email protected] < .mission_npc_count; [email protected]++ )
    				if( ( compare( "|"[email protected]_npc$+"|","|"[email protected]+"|" ) ) ){
    					getmapxy( [email protected]$,[email protected],[email protected],1,.npc_unique_list$[[email protected]] );
    					[email protected]_npc_name$ = "^777777("[email protected]$+") ";
    					[email protected]_npc_name$ = [email protected]_npc_name$ + .npc_name_list$[[email protected]] + "^000000";
    					mes " ~ "[email protected]_npc_name$;
    				}
    			mes " ";
    		}
    		if( [email protected]_update$ != "0000-00-00 00:00:00" && [email protected]_update$ != "" ){
    			mes "Last Mission Update:";
    			mes "^777777"[email protected]_update$+"^000000";
    		}
     
    		if( [email protected]_progress ){
    			if( [email protected]_progress & 1 && [email protected]_progress ){
    				dispbottom "[Failed] Your level didnt meet the requirements.";
    				[email protected]_result |= 1;
    			}
    			if( [email protected]_progress & 2 && [email protected]_size != [email protected]_progress ){
    				dispbottom "[Failed] Your Monsters Hunt didnt meet the requirements.";
    				[email protected]_result |= 2;
    			}
    			if( [email protected]_progress & 4 && [email protected]_size != [email protected]_progress ){
    				dispbottom "[Failed] Your Items collecting didnt meet the requirements.";
    				[email protected]_result |= 4;
    			}
    			if( [email protected]_progress & 8 && ( [email protected]_progress && [email protected]_progress ) ){
    				dispbottom "[Failed] Your Class didnt meet the requirements.";
    				[email protected]_result |= 8;
    			}
    		}
    	return [email protected]_result;	
    }
     
     
    // the number behind the NPC name must be NUMBER with range of ( 1 ~ 500 )
    // the number should stay the same for eternity, if you change it frequently, it might affect your missions for each NPC.
    // ( to conclude, once you assigned the number, dont change it for the sake of your mission board ... )
     
    chry_fld,106,68,4	duplicate(mission_board)	Figure Quest #1	420
    chry_fld,109,66,4	duplicate(mission_board)	Aid Quest#2	418
    chry_fld,111,64,4	duplicate(mission_board)	PVP Shop#3	419
    //chry_fld,102,68,4	duplicate(mission_board)	Equipment Quest#4	752
    
    //prontera,151,161,4	duplicate(mission_board)	Mission E#5	837
    //prontera,154,164,4	duplicate(mission_board)	Mission F#6	837
    //prontera,156,166,4	duplicate(mission_board)	Mission G#7	837
    //prontera,159,169,4	duplicate(mission_board)	Mission H#8	837

     

     

  5. Hello guys, i have question, i have a working client exe, i can login without any problem, but i just want to add disable multi client, i dont remember what client i used, so i pick a new one instead which had a successful multi client disable but fail, soo i try to diff myself which i had never done myself.. well its a learning for me, here the details

    Client : 2018-06-20eRagexeRE
    
    Data :   ROenglishRE

     

    DIff Patch I selected:

    3 Chat Flood Remove Limit
    8 Custom Window Title
    9 Disable 1rag1 type parameters (Recommended)
    13 Disable Ragexe Filename Check (Recommended)
    23 Enable /who command (Recommended)
    24 Fix Camera Angles (Recommended)
    290 Hide build info in client (Recommended)
    34 Enable /showname (Recommended)
    291 Hide packets from peek (Recommended)
    35 Read Data Folder First
    36 Read msgstringtable.txt (Recommended)
    38 Remove Gravity Ads (Recommended)
    39 Remove Gravity Logo (Recommended)
    40 Restore Login Window (Recommended)
    41 Disable Nagle Algorithm (Recommended)
    44 Translate Client (Recommended)
    46 Use Normal Guild Brackets (Recommended)
    47 Use Ragnarok Icon
    48 Use Plain Text Descriptions (Recommended)
    49 Enable Multiple GRFs (Recommended)
    53 Use Ascii on All LangTypes (Recommended)
    64 @ Bug Fix (Recommended)
    65 Load Custom lua file instead of iteminfo*.lub (Recommended)
    73 Remove Hourly Announce (Recommended)
    84 Remove Serial Display (Recommended)
    90 Enable DNS Support (Recommended)
    97 Cancel to Login Window (Recommended)
    100 Disable Multiple Windows
    207 Resize Font
    213 Disable Help Message on Login (Recommended)
    218 Show Exp Numbers
    230 Always load Korea ExternalSettings lua file

     

    src/config/packets

    // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
    // For more information, see LICENCE in the main folder
    
    #ifndef CONFIG_PACKETS_HPP
    #define CONFIG_PACKETS_HPP
    
    /**
     * rAthena configuration file (http://rathena.org)
     * For detailed guidance on these check http://rathena.org/wiki/SRC/config/
     **/
    
    #ifndef PACKETVER
    	/// Do NOT edit this line! To set your client version, please do this instead:
    	/// In Windows: Add this line in your src\custom\defines_pre.hpp file: #define PACKETVER YYYYMMDD
    	/// In Linux: The same as above or run the following command: ./configure --enable-packetver=YYYYMMDD
    	#define PACKETVER 20180620
    #endif
    
    #ifndef PACKETVER_RE
    	/// From November 2015 only RagexeRE are supported.
    	/// After July 2018 only Ragexe are supported.
    	#if PACKETVER > 20151104 && PACKETVER < 20180704
    		#define PACKETVER_RE
    	#endif
    #endif
    
    #if PACKETVER >= 20110817
    	/// Comment to disable the official packet obfuscation support.
    	/// This requires PACKETVER 2011-08-17 or newer.
    	#ifndef PACKET_OBFUSCATION
    		#define PACKET_OBFUSCATION
    
    		// Define these inside src/custom/defines_pre.hpp or src/custom/defines_post.hpp
    		//#define PACKET_OBFUSCATION_KEY1 <key1>
    		//#define PACKET_OBFUSCATION_KEY2 <key2>
    		//#define PACKET_OBFUSCATION_KEY3 <key3>
    
    		/// Comment this to disable warnings for missing client side encryption
    		#define PACKET_OBFUSCATION_WARN
    	#endif
    #else
    	#if defined(PACKET_OBFUSCATION)
    		#error You enabled packet obfuscation for a version which is too old. Minimum supported client is 2011-08-17.
    	#endif
    #endif
    
    /// Comment to disable the official Guild Storage skill.
    /// When enabled, this will set the guild storage size to the level of the skill * 100.
    #if PACKETVER >= 20131223
    	#define OFFICIAL_GUILD_STORAGE
    #endif
    
    #ifndef DUMP_UNKNOWN_PACKET
    	//#define DUMP_UNKNOWN_PACKET
    #endif
    
    #ifndef DUMP_INVALID_PACKET
    	//#define DUMP_INVALID_PACKET
    #endif
    
    /**
     * No settings past this point
     **/
    
    /// Check if the specified packetversion supports the pincode system
    #define PACKETVER_SUPPORTS_PINCODE PACKETVER >= 20110309
    
    /// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013)
    #define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER <= 20141022) || PACKETVER >= 20150513
    
    /// Check if the specified packetvresion supports the cashshop sale system
    #define PACKETVER_SUPPORTS_SALES PACKETVER >= 20131223
    
    #endif /* CONFIG_PACKETS_HPP */

     

    i can enter username and password, but after enter my password game just crash... any idea?

    over here @Akkarin and please dont warn me... i dont know what title should i add 

  6. 10 minutes ago, chatterboy said:
    ////////////////////////////////////////////
    //                                        //
    // Script by: GM Chatterboy               //
    // Version: 1.0                           //
    // Emulator: Rathena                      //
    //                                        //
    ////////////////////////////////////////////
    
    prontera,178,215,4	script	PVP Assistant	569,{
    emotion e_lv;
    set .@nome$,"[ ^FF0000PVP Assistant^000000 ]";
    
    			mes .@nome$;
    			mes "Hello! ^FFA500 "+strcharinfo(0)+"^000000 what can i do for you today?";
    			next;
        switch(select("[^0101DFEnter PvP^000000]","[^0101DFTOP 5 PvP^000000]")){
    	
    case 1:
    	set $pvp$[0],"guild_vs3";
    
    			mes .@nome$;
    			mes "***********************";
    			mes "~[^FF0000"+getmapusers($pvp$[$pvp])+"^000000] Player(s) in map...";
    			mes "***********************";
    			if(select("Go...:Leave...")==1){
    				if(BaseLevel<10){
    					mes "^FF0000Your level is not suite here go kill some poring!^000000";
    					emotion e_pif;
    					close;
    				}else{
    					warp $pvp$,0,0;
    					end;
    				}
    			}close;
    	
    
    case 2:
    		query_sql "SELECT name, kills, deaths FROM pvp ORDER BY kills DESC LIMIT 10",.@name$,.@kills,.@deaths;
    		
       		if (!getarraysize(.@name$)){
    			mes .@nome$;
    			mes "The rankings are empty.";
    			close;
    		}
    			mes .@nome$;
    			mes "[TOP 5 PvP]";
    			mes "-----------------------------------";
    			mes "^0000FF Position ^000000 Name ^FF0000 Win ^000000 ^800080 Knock-Out ^000000";
    			mes "-----------------------------------";
    		for(set .@i,0;.@i<=4;set .@i,.@i+1) {
    			mes "^0000FF["+(.@i+1)+"] ^000000 "+.@name$[.@i]+" .....^FF0000"+.@kills[.@i]+" ^000000 ^800080"+.@deaths[.@i]+" ^000000";
    		}
    		close;
    			
        }
    }
    
    
    //=============================================================================================================================================
    
    -	script	Arena#PCKill	-1,{
    
    OnPCKillEvent:
    
    
    			if(BaseLevel>=400) end;
    				getmapxy @map$,@x,@y,0;
    			if (@map$ == "guild_vs3"){
    			
            set @CID,getcharid(0);
    		set @name$,"";
    		set @points,0;
    		
                    query_sql "SELECT `kills` FROM `pvp` WHERE `char_id`="+@CID+"",@points;
                    query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$;
                if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`kills`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kills + 1 "; end; }
                    query_sql "UPDATE `pvp` SET `kills` = `kills` +1 WHERE `char_id`="+@CID+"",@esc$;
            
    		set @points,@points+1;
    			dispbottom "Kills: "+@points;
    			getitem 604,1;
    		}
    	end;
    	
    }
    
    //========================================================================================================================================================
    
    -	script	Arena#PCDie	-1,{
    
    OnPCDieEvent:
    
    		if(BaseLevel>=400) end;
    			getmapxy @map$,@x,@y,0;
    		if (@map$ == "guild_vs3"){
    		
        set @CID,getcharid(0);
    	set @name$,"";
    	set @points,0;
    	
                query_sql "SELECT `deaths` FROM `pvp` WHERE `char_id`="+@CID+"",@points;
                query_sql "SELECT `name` FROM `pvp` WHERE `char_id`="+@CID+"",@name$;
            if ( @name$ == "" ) { query_sql "INSERT INTO `pvp` (`char_id`,`name`,`deaths`) VALUES ("+@CID+",'"+strcharinfo(0)+"',1)",@esc$; dispbottom "Kills : 1"; end; }
                query_sql "UPDATE `pvp` SET `deaths` = `deaths` + 1 WHERE `char_id`="+@CID+"",@esc$;
    
    		}
    	end;
    
    }
    
    //============== Map ==================
    //PvP
    //guild_vs3,12,50,0	warp	gvs01	1,1,prontera,155,191
    //guild_vs3,50,87,0	warp	gvs02	1,1,prontera,155,191
    //guild_vs3,87,49,0	warp	gvs03	1,1,prontera,155,191
    //guild_vs3,50,12,0	warp	gvs04	1,1,prontera,155,191
    
    //============== MAP FLAG ===============
    // Player
    guild_vs3	mapflag	nosave
    guild_vs3	mapflag	noteleport
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	nomemo
    guild_vs3	mapflag	gvg	off
    guild_vs3	mapflag	pvp	on
    guild_vs3	mapflag	nopenalty
    guild_vs3	mapflag	nobranch
    guild_vs3	mapflag	pvp_noguild
    guild_vs3	mapflag	noloot
    guild_vs3	mapflag	noexp
    
    
    //========================== DUPLICATE NPC ==============================//
    
    /*
    
    CREATE TABLE IF NOT EXISTS `pvp` (
      `char_id` int(11) unsigned NOT NULL auto_increment,
      `name` varchar(255) NOT NULL default '0',
      `kills` int(11) unsigned NOT NULL default '0',
      `deaths` int(11) unsigned NOT NULL default '0',
      KEY `char_id` (`char_id`),
      KEY `kills` (`kills`),
      KEY `deaths` (`deaths`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=151750 ;  
    
    */

    Try this ^_^

    how can i change the map location... to atlantis?

  7. hye guys, i would like to request a very simple script,

     

    ////////////////////////////////

                    About

    /////////////////////////////

    1. When player get killed in pvp map, the killer will get 1 Symbol Of Bravery ( 7812 ) directly into his inventory

    thats all.. pretty simple... just i want the killer get them only in pvp maps

     

  8. i have tested neither work..

    On 4/12/2020 at 1:45 AM, Emistry said:

    wouldn't recommend using atcommand since it would spam the atcommand log if the server enabled it.

    -	script	sample	-1,{
    	OnPCDieEvent:
    		getmapxy([email protected]$, [email protected], [email protected], BL_PC);
    		if ([email protected]$ == "prontera") {
    			getinventorylist;
    			while ([email protected] < @inventorylist_count) {
    				if ([email protected]_bound[[email protected]] && [email protected]_equip[[email protected]]) {
    					for ([email protected] = 0; [email protected] < 5; [email protected]++) {
    						[email protected][[email protected]] = getd("@inventorylist_option_id"+([email protected]+1)+"["[email protected]+"]");
    						[email protected][[email protected]] = getd("@inventorylist_option_value"+([email protected]+1)+"["[email protected]+"]");
    						[email protected][[email protected]] = getd("@inventorylist_option_parameter"+([email protected]+1)+"["[email protected]+"]");
    					}
    					delitem3 @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]],@inventorylist_identify[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_attribute[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]],[email protected],[email protected],[email protected];
    					makeitem3 @inventorylist_id[[email protected]],@inventorylist_amount[[email protected]],[email protected]$, [email protected] + rand(-2,2), [email protected] + rand(-2,2),@inventorylist_identify[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_attribute[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]],[email protected],[email protected],[email protected];
    				}
    				[email protected]++;
    			}
    		}
    		end;
    }

    you can try something like this.

    U0IEBkA.png

    i did try it, within the custom map atlantis, but nothing drop

  9. hye, i would like to request a script that when ever any player killed at specific map, all item in inventory will be drop

    only to specific map which is atlantis, not to every time they died, just when they enter that map as i mention, all item within their inventory will drop if they get killed

     

  10. hye sorry if im noob, could someone craft this script, usually i did @main create #main, and that will only last when im online within the game, but once im offline that channel is gone, can someone create a script with simple configuration soo player can chat global soo other players no matter what map they are can see it, just with simple whisper #main

    thanks

  11. 2 hours ago, label5 said:

    it work on my side when adding 

    RootURL='http://******.com:port here/patch/'

    which part? you meant i need to add port? example

    RootURL='http://******.com:22/patch/'

    im not sure what are my port are... or should i just copy as you mention?

     da heck..? it work but it wont patch...?

    nvm reason it wont patch since it detect my old patch list order i just add the next number from my last patch list order..\

    worked now, thanks

  12. i think i have configure my thor patcher correctly, but im still cant connect... weird, could someone point out which part did i made wrong?

    config.ini

    Spoiler
    [Config:Main]
    RootURL='http://jebatro.com/patch/'
    RemoteConfigFile='main.ini'
    
    TimeOut=0
    
    StatusFile='update.dat'
    
    DefaultGRF='jebatro.grf'
    
    ClientEXE='JebatRO.exe'
    ClientParameter='-1sak1'
    
    FinishOnConnectionFailure=false
    
    [Config:Window]
    AutoResize=true
    Style='none'
    
    Width=800
    Height=500
    
    DragHandling=true
    
    Background='images/bg.jpg'
    
    FadeOnDrag=false
    
    [Config:BGM]
    File=
    
    Loop=true
    
    Volume=20
    
    Directory=
    
    [Config:Misc]
    Title='JebatRO Patcher'
    
    HideProgressBarWhenFinish=false
    
    
    [Label:Status]
    AutoResize=true
    
    Width=800
    Height=500
    
    Left=199
    Top=465
    Alignment='center'
    
    FontColor=$ffffff
    FontName = 'calibri'
    FontSize =10
    
    Text='Patch Process Finished'
    
    Hook='StatusChange'
    
    
    
    [ProgressBar:bar1]
    Width=800
    Height=500
    
    Left=35
    Top=450
    
    BackColorStart=35
    BackColorEnd=545
    
    FrontColorStart=35
    FrontColorEnd=545
    
    FrontImage='images/frontprogress.png'
    BackImage='images/backprogress.png'
    
    Hook='ProgressChange'
    
    [Button:Start]
    Default='images/start.png'
    OnHover='images/start-hover.png'
    OnDown='images/start.png'
    Left=565
    Top=427
    Hook='Start'
    
    [Button:Exit]
    Default='images/exit.png'
    OnHover='images/exit.png'
    OnDown='images/exit.png'
    Left=620
    Top=20
    Mode=5
    
    [Button:Forums]
    Default='images/forum.png'
    OnHover='images/forum-hover.png'
    OnDown='images/forum.png'
    Left=43
    Top=107
    Mode=1
    Action='http://jebatro.com/forum/'
    
    [Button:Register]
    Default='images/register.png'
    OnHover='images/register-hover.png'
    OnDown='images/register.png'
    Left=43
    Top=250
    Mode=1
    Action='http://jebatro.com/cp/?module=account&action=create'
    
    
    [Button:Website]
    Default='images/website.png'
    OnHover='images/website-hover.png'
    OnDown='images/website.png'
    Left=398
    Top=107
    Mode=1
    Action='http://jebatro.com'
    
    [Button:Vote]
    Default='images/vote.png'
    OnHover='images/vote-hover.png'
    OnDown='images/vote.png'
    Left=585
    Top=107
    Mode=1
    Action='http://jebatro.com/cp/?module=account&action=login'

     

     

    main.ini

    Spoiler
    //Thor Patcher remote config file
    [Main]
    //Allow patching or not?
    allow=true
    
    //Should patcher ignore everything else and finish patch immediately?
    Force_Start=false
    
    //if not, what message should appear?
    policy_msg=Server is taking a nap.
    
    //file_url - patch files should ALL put here.
    // This config entry will override the one in embed config.
    // o HTTP:
    //         http://domain.com/dir/
    // o FTP:
    //         ftp://domain.com/dir/
    //     o With <Username> [Password] [Port]
    //	ftp://username:[email protected]:port/dir/
    //     o Note: username is required if want put password, otherwise everything is optional.
    file_url=www.jebatro.com/patch/data/
    
    [Patch]
    //use CheckSum tool, hash for client & patcher
    // used to make sure exe is up to date
    //  (leave empty to disable this feature)
    ClientSum=
    PatcherSum=
    
    
    //This is compressed file for patcher & client update
    // To make these work, ClientSum and/or PatcherSum can't be empty
    // Note: these files should put same place as patch file (file_url in internal config)
    //Relative address, not FULL URL!
    ClientPath=
    PatcherPath=
    
    // Patch list file
    PatchList=plist.txt
    
    [Stars]
    // Shining o.O (Anyways, its for start button clones)
    // Since orignal client has check sum.. why not for clones? XD
    
    
    //How many? (it should same as amount of start button clone, but of course it's your choice)
    clients=0
    
    // _sum - checksum, use CheckSum tool.
    //client1_sum=
    // _Name - Filename of exe
    //client1_Name=
    // _Path - Path for file [Compressed]
    //client1_Path=
    
    [Misc]
    //Set a limit for fragment, when reach this limit, patcher will ask user to defrag
    FragmentLimit=50

     

    im using Shinro Design Thor Patcher Skin Link

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.