Jump to content

Eross

Members
  • Posts

    349
  • Joined

  • Last visited

Posts posted by Eross

  1. On 6/19/2020 at 11:40 AM, Mabuhay said:

    I already sent you the visual instruction how to determine.. Please read it.

    I'm sorry im just noob ?

     

    On 6/19/2020 at 11:40 AM, Mabuhay said:

    I already sent you the visual instruction how to determine.. Please read it.

    //===== rAthena Script =======================================
    //= tr0n's Questboard
    //===== By: ==================================================
    //= tr0n
    //===== Current Version: =====================================
    //= 1.6.6
    //===== Description: =========================================
    //= Easily add collection and hunting quests.
    //===== Changelogs: ==========================================
    // 1.0.0 Release
    // 1.1.0 Added zeny reward
    // 1.2.0 Rewrote checkmob and killcounter
    // 1.3.1 Added level restriction
    // 1.3.4 Added Reward Item Amount
    // 1.4.4 Added Quest delay
    // 1.5.4 Added repeatable Quests
    // 1.6.4 Added party support
    // 1.6.5 Bug fixes for party support
    // 1.6.6 Bug fixes for delay time does not appear [mazvi]
    //============================================================
    malaya,233,200,5	script	Questboard	4_BOARD3,{
    
    	if(#c_run==true){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + #currentquest$ + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ #currentquest$ + "_collectionitem"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+getitemname(getd("."+#currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+#currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+#currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +#currentquest$+"_collectionprize"))?getitemname(getd("." +#currentquest$+"_collectionprize"))+" - "+getd("." +#currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +#currentquest$+"_collectionzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +#currentquest$+"_collectionexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +#currentquest$+"_collectionexp["+1+"]")+"^000000";
    		next;
    		if(select("Finish:Abort") == 2){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest aborted.";
    			set #currentquest$, "";
    			set #c_run, false;
    			close;
    		}
    		goto L_checkitems;
    	}
    
    	if(#h_run==true){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + #currentquest$ + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ #currentquest$ + "_huntingmob"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			set .@currentmob, getd("."+#currentquest$+"_huntingmob["+(.@j)+"]");
    			mes "^FF0000"+strmobinfo(1,getd("."+#currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(#currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+#currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +#currentquest$+"_huntingprize"))?getitemname(getd("." +#currentquest$+"_huntingprize"))+" - "+getd("." +#currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +#currentquest$+"_huntingzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +#currentquest$+"_huntingexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +#currentquest$+"_huntingexp["+1+"]")+"^000000";
    		next;
    		if(select("Finish:Abort") == 2){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest aborted.";
    			for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
    				set .@currentmob, getd("."+#currentquest$+"_huntingmob["+(.@x-1)+"]");
    				setd(#currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    			}
    			set #currentquest$, "";
    			set #h_run, false;
    			close;
    		}
    		goto L_checkmobs;
    	}
    
    	mes "[^FF7700Questboard^000000]";
    	mes "Select category:";
    	next;
    
    	switch(select((.collection)?"Collection Quests":"",
    				  (.hunting)?"Hunting Quests":"",
    				  "Exit")) {
    
    	case 1:
    		set .@collectmenu$, "";
    		for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){
    			if (.@i) set .@collectmenu$,.@collectmenu$+":";
    			set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
    		}
    		set .@selection,select(.@collectmenu$);
    		if(.quest_repeat == true){
    			if(gettimetick(2) < getd(.@selection + "#collection_delay")){
    				mes "[^FF7700Questboard^000000]";
    				mes "You have to wait ^0000FF"+Time2Str(getd(.@selection + "#collection_delay"))+"^000000 to do this quest again.";
    				close;
    			}
    		}
    		else{
    			if(getd(.@selection + "#collection_repeat") == true){
    				mes "[^FF7700Questboard^000000]";
    				mes "You already did this quest.";
    				mes "Please choose another one.";
    				close;
    			}
    		}
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ .@selection + "_collectionitem"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
    		next;
    		if(select("Accept:Decline") == 2){
    			close;
    		}
    		if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax")){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest accepted.";
    			set #c_run, true;
    			set #currentquest$, .@selection;
    			close;
    		}
    		else{
    			mes "[^FF7700Questboard^000000]";
    			mes "You don't have the required";
    			mes "level to do this quest.";
    			close;
    		}
    
    	case 2:
    		set .@huntmenu$, "";
    		for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){
    			if (.@i) set .@huntmenu$,.@huntmenu$+":";
    			set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
    		}
    		set .@selection,select(.@huntmenu$);
    		if(.quest_repeat == true){
    			if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
    				mes "[^FF7700Questboard^000000]";
    				mes "You have to wait ^0000FF"+Time2Str(getd(.@selection + "_hunting_delay"))+"^000000 to do this quest again.";
    				close;
    			}
    		}
    		else{
    			if(getd(.@selection + "_hunting_repeat") == true){
    				mes "[^FF7700Questboard^000000]";
    				mes "You already did this quest.";
    				mes "Please choose another one.";
    				close;
    			}
    		}
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ .@selection + "_huntingmob"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
    		next;
    		if(select("Accept:Decline") == 2){
    			close;
    		}
    		if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax")){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest accepted.";
    			set #h_run, true;
    			set #currentquest$, .@selection;
    			close;
    		}
    		else{
    			mes "[^FF7700Questboard^000000]";
    			mes "You don't have the required";
    			mes "level to do this quest.";
    			close;
    		}
    
    	case 3:
    		close;
    	}
    
    L_checkitems:
    	set .@size, getarraysize(getd("."+#currentquest$+"_collectionitem"));
    	for( set .@k,0; .@k < .@size; set .@k,.@k+2){
    		if(countitem(getd("."+#currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+#currentquest$+"_collectionitem["+(.@k+1)+"]")){
    			set .@checkitem,.@checkitem+2;
    		}
    	}
    	if(.@checkitem<.@size){
    		mes "[^FF7700Questboard^000000]";
    		mes "You don't have everything.";
    		close;
    	}
    	for( set .@delcount,0; .@delcount < .@size; set .@delcount,.@delcount+2){
    		delitem getd("."+#currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+#currentquest$+"_collectionitem["+(.@delcount+1)+"]");
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "Congratulation! Here is your Reward.";
    	if(getd("." +#currentquest$+"_collectionprize")!=0) getitem(getd("." +#currentquest$+"_collectionprize"),getd("." +#currentquest$+"_collectionamount"));
    	set Zeny,Zeny+getd("." +#currentquest$+"_collectionzeny");
    	getexp getd("." +#currentquest$+"_collectionexp["+0+"]"),getd("." +#currentquest$+"_collectionexp["+1+"]");
    	setd(#currentquest$ + "#collection_delay"),gettimetick(2)+.quest_delay;
    	setd(#currentquest$ + "#collection_repeat"),true;
    	set #currentquest$, "";
    	set #c_run, false;
    	close;
    
    L_checkmobs:
    	set .@size, getarraysize(getd("."+#currentquest$+"_huntingmob"));
    	set .@goal, .@size/2;
    	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
    		set .@currentmob, getd("."+#currentquest$+"_huntingmob["+(.@i-1)+"]");
    		if(getd(#currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+#currentquest$+"_huntingmob["+.@i+"]")){
    			set .@checkmonster, .@checkmonster+1;
    			if(.@checkmonster==.@goal){
    				goto L_checkmobs2;
    			}
    			continue;
    		}
    		goto L_checkmobs2;
    	}
    
    L_checkmobs2:
    	if(.@checkmonster<.@goal){
    		mes "[^FF7700Questboard^000000]";
    		mes "You didn't kill everything.";
    		close;
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "Congratulation! Here is your Reward.";
    	set .@size, getarraysize(getd("."+#currentquest$+"_huntingmob"));
    	for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
    		set .@currentmob, getd("."+#currentquest$+"_huntingmob["+(.@x-1)+"]");
    		setd(#currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    	}
    	if(getd("." +#currentquest$+"_huntingprize")!=0) getitem(getd("." +#currentquest$+"_huntingprize"),getd("." +#currentquest$+"_huntingamount"));
    	set Zeny, Zeny+getd("." +#currentquest$+"_huntingzeny");
    	getexp getd("." +#currentquest$+"_huntingexp["+0+"]"),getd("." +#currentquest$+"_huntingexp["+1+"]");
    	setd(#currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;
    	setd(#currentquest$ + "_hunting_repeat"),true;
    	set #currentquest$, "";
    	set #h_run, false;
    	close;
    
    OnNPCKillEvent:
    	if(#h_run!=true) end;
    	set .@size, getarraysize(getd("."+#currentquest$+"_huntingmob"));
    	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
    		if(killedrid==getd("."+#currentquest$+"_huntingmob["+(.@i-1)+"]")){
    			set .@currentmob, getd("."+#currentquest$+"_huntingmob["+(.@i-1)+"]");
    			if(getd(#currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+#currentquest$+"_huntingmob["+.@i+"]")){
    				setd(#currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(#currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
    				dispbottom getd("."+#currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(#currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+#currentquest$+"_huntingmob["+.@i+"]")+")";
    			}
    			if(getcharid(1) != 0 && .party_support == true){
    				getmapxy(.@map1$,.@x1,.@y1);
    				set .@killerid, getcharid(3);
    				set .@currentquest$, #currentquest$;
    				getpartymember getcharid(1),1;
    				getpartymember getcharid(1),2;
    				for(set .@j, 0; .@j < $@partymembercount; .@j++){
    					if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){
    						if(#h_run==true && $@partymemberaid[.@j] != .@killerid && .@currentquest$ == getvar(#currentquest$, $@partymembercid[.@j]) && readparam(HP, $@partymembercid[.@j]) > 0){
    							getmapxy(.@map2$,.@x2,.@y2,BL_PC,rid2name($@partymemberaid[.@j]));
    							if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){
    								set .@kill_amt,getvar(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount"), $@partymembercid[.@j]);
    								set .@kill_goal,getd("."+.@currentquest$+"_huntingmob["+.@i+"]");
    								if(.@kill_amt<.@kill_goal)
    								{
    									setd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", .@kill_amt+1, $@partymembercid[.@j]);
    									dispbottom getd("."+.@currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+(.@kill_amt+1)+"/"+.@kill_goal+")", 0xB6FF00, $@partymembercid[.@j];
    								}
    							}
    						}
    					}
    				}
    			}
    			break;
    		}
    	}
    	end;
    
    OnInit:
    
    	function AddCollection;
    	function AddHunting;
    
    	//Activate/Deactivate quest categories (true/1 - activated, false/0 - deactivated)
    	set .collection, true;
    	set .hunting, true;
    
    	//Quest Delay (seconds)
    	//24 hours = 86400 seconds
    	set .quest_delay, 30;
    
    	//Activate/Deactivate repeatable quests (true/1 - activated, false/0 - deactivated)
    	set .quest_repeat, true;
    
    	//Activate/Deactivate party support (true/1 - activated, false/0 - deactivated)
    	set .party_support, true;
    
    	//Max range for party support (+- x & y coordinations)
    	set .party_range, 25;
    
    	//Checks if quests are loaded (prevents out of index)
    	if(.questsloaded==true) end;
    	set .questsloaded, true;
    
    	//Add Collection Quests here (You can add as many required items as you want)
    	//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
    	AddCollection("Bloody Branch Wisdom",90,99,7720,2,2000,1000000,500000,604,1);
    
    	//Add Hunting Quests here (You can add as many required mobs as you want)
    	//AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
    	end;
    
    
    	function AddCollection{
    		set .collectionquestcount,.collectionquestcount+1;
    		setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
    		setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
    		setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
    		setd ("." +.collectionquestcount+"_collectionprize", getarg(3));
    		setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
    		setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
    		set .@argcount, 6;
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
    		setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); 
    		setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
    		set .@argcount, .@argcount+2;
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
    		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
    			setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); 
    			setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
    			set .@argcount,.@argcount+2;
    			set .@size, .@size+2;
    		}
    		return;
    	}
    
    	function AddHunting{
    		set .huntingquestcount,.huntingquestcount+1;
    		setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
    		setd ("." +.huntingquestcount+"_huntingmin", getarg(1));
    		setd ("." +.huntingquestcount+"_huntingmax", getarg(2));
    		setd ("." +.huntingquestcount+"_huntingprize", getarg(3));
    		setd ("." +.huntingquestcount+"_huntingamount", getarg(4));
    		setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
    		set .@argcount, 6;
    		setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
    		setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
    		set .@argcount, .@argcount+2;
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
    		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
    			setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); 
    			setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
    			set .@argcount, .@argcount+2;
    			set .@size, .@size+2;
    		}
    		return;
    	}
    }

    Hi sir I tried this but still can quest on my other char >_<

  2. 9 minutes ago, Mabuhay said:

    Change all char-bound variables to account-bound.

    
    Variables
    ---------
    
    The meat of every programming language is variables - places where you store
    data.
    
    In the rAthena scripting language, variable names are not case sensitive.
    
    Variables are divided into and uniquely identified by the combination of:
    prefix  - determines the scope and extent (or lifetime) of the variable
    name    - an identifier consisting of '_' and alphanumeric characters
    postfix - determines the type of the variable: integer or string
    
    Scope can be:
    global    - global to all servers
    local     - local to the server
    account   - attached to the account of the character identified by RID
    character - attached to the character identified by RID
    npc       - attached to the NPC
    scope     - attached to the scope of the instance
    
    Extent can be:
    permanent - They still exist when the server resets.
    temporary - They cease to exist when the server resets.
    
    Prefix: scope and extent
    nothing  - A permanent variable attached to the character, the default variable
               type. They are stored by char-server in the `char_reg_num` and
               `char_reg_str`.
    "@"      - A temporary variable attached to the character.
               SVN versions before 2094 revision and RC5 version will also treat
               'l' as a temporary variable prefix, so beware of having variable
               names starting with 'l' if you want full backward compatibility.
    "$"      - A global permanent variable.
               They are stored by map-server in database table `mapreg`.
    "$@"     - A global temporary variable.
               This is important for scripts which are called with no RID
               attached, that is, not triggered by a specific character object.
    "."      - A NPC variable.
               They exist in the NPC and disappear when the server restarts or the
               NPC is reloaded. Can be accessed from inside the NPC or by calling
               'getvariableofnpc'. Function objects can also have .variables which
               are accessible from inside the function, however 'getvariableofnpc'
               does NOT work on function objects.
    ".@"     - A scope variable.
               They are unique to the instance and scope. Each instance has its
               own scope that ends when the script ends. Calling a function with
               callsub/callfunc starts a new scope, returning from the function
               ends it. When a scope ends, its variables are converted to values
               ('return .@var;' returns a value, not a reference).
    "'"      - An instance variable.
               These are used with the instancing system and are unique to each
               instance type. Can be accessed from inside the instance or by calling
               'getvariableofinstance'.
    "#"      - A permanent local account variable.
               They are stored by char-server in the `acc_reg_num` table and
               `acc_reg_str`.
    "##"     - A permanent global account variable stored by the login server.
               They are stored in the `global_acc_reg_num` table and
    		   `global_acc_reg_str`.
               The only difference you will note from normal # variables is when
               you have multiple char-servers connected to the same login server.
               The # variables are unique to each char-server, while the ## variables
               are shared by all these char-servers.
    
    Postfix: integer or string
    nothing - integer variable, can store positive and negative numbers, but only
              whole numbers (so don't expect to do any fractional math)
    '$'     - string variable, can store text
    
    Examples:
      name  - permanent character integer variable
      name$ - permanent character string variable
     @name  - temporary character integer variable
     @name$ - temporary character string variable
     $name  - permanent global integer variable
     $name$ - permanent global string variable
    $@name  - temporary global integer variable
    $@name$ - temporary global string variable
     .name  - NPC integer variable
     .name$ - NPC string variable
    .@name  - scope integer variable
    .@name$ - scope string variable
     'name  - instance integer variable
     'name$ - instance string variable
     #name  - permanent local account integer variable
     #name$ - permanent local account string variable
    ##name  - permanent global account integer variable
    ##name$ - permanent global account string variable

     

    Hi ! thankyou ! you mean I will change it to #variable ?? how will I distinguish what variable is char-bound ? thanks

  3. Hi ! how to make this quest board restrict only one character per account ??????? it seems like all character in one account can take quests -_- 

    //===== rAthena Script =======================================
    //= tr0n's Questboard
    //===== By: ==================================================
    //= tr0n
    //===== Current Version: =====================================
    //= 1.6.6
    //===== Description: =========================================
    //= Easily add collection and hunting quests.
    //===== Changelogs: ==========================================
    // 1.0.0 Release
    // 1.1.0 Added zeny reward
    // 1.2.0 Rewrote checkmob and killcounter
    // 1.3.1 Added level restriction
    // 1.3.4 Added Reward Item Amount
    // 1.4.4 Added Quest delay
    // 1.5.4 Added repeatable Quests
    // 1.6.4 Added party support
    // 1.6.5 Bug fixes for party support
    // 1.6.6 Bug fixes for delay time does not appear [mazvi]
    //============================================================
    malaya,237,202,5	script	Questboard	4_BOARD3,{
    
    	if(c_run==true){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ currentquest$ + "_collectionitem"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000";
    		next;
    		if(select("Finish:Abort") == 2){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest aborted.";
    			set currentquest$, "";
    			set c_run, false;
    			close;
    		}
    		goto L_checkitems;
    	}
    
    	if(h_run==true){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ currentquest$ + "_huntingmob"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]");
    			mes "^FF0000"+strmobinfo(1,getd("."+currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000";
    		next;
    		if(select("Finish:Abort") == 2){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest aborted.";
    			for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
    				set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
    				setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    			}
    			set currentquest$, "";
    			set h_run, false;
    			close;
    		}
    		goto L_checkmobs;
    	}
    
    	mes "[^FF7700Questboard^000000]";
    	mes "Select category:";
    	next;
    
    	switch(select((.collection)?"Collection Quests":"",
    				  (.hunting)?"Hunting Quests":"",
    				  "Exit")) {
    
    	case 1:
    		set .@collectmenu$, "";
    		for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){
    			if (.@i) set .@collectmenu$,.@collectmenu$+":";
    			set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
    		}
    		set .@selection,select(.@collectmenu$);
    		if(.quest_repeat == true){
    			if(gettimetick(2) < getd(.@selection + "_collection_delay")){
    				mes "[^FF7700Questboard^000000]";
    				mes "You have to wait ^0000FF"+Time2Str(getd(.@selection + "_collection_delay"))+"^000000 to do this quest again.";
    				close;
    			}
    		}
    		else{
    			if(getd(.@selection + "_collection_repeat") == true){
    				mes "[^FF7700Questboard^000000]";
    				mes "You already did this quest.";
    				mes "Please choose another one.";
    				close;
    			}
    		}
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ .@selection + "_collectionitem"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
    		next;
    		if(select("Accept:Decline") == 2){
    			close;
    		}
    		if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax")){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest accepted.";
    			set c_run, true;
    			set currentquest$, .@selection;
    			close;
    		}
    		else{
    			mes "[^FF7700Questboard^000000]";
    			mes "You don't have the required";
    			mes "level to do this quest.";
    			close;
    		}
    
    	case 2:
    		set .@huntmenu$, "";
    		for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){
    			if (.@i) set .@huntmenu$,.@huntmenu$+":";
    			set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
    		}
    		set .@selection,select(.@huntmenu$);
    		if(.quest_repeat == true){
    			if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
    				mes "[^FF7700Questboard^000000]";
    				mes "You have to wait ^0000FF"+Time2Str(getd(.@selection + "_hunting_delay"))+"^000000 to do this quest again.";
    				close;
    			}
    		}
    		else{
    			if(getd(.@selection + "_hunting_repeat") == true){
    				mes "[^FF7700Questboard^000000]";
    				mes "You already did this quest.";
    				mes "Please choose another one.";
    				close;
    			}
    		}
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ .@selection + "_huntingmob"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
    		next;
    		if(select("Accept:Decline") == 2){
    			close;
    		}
    		if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax")){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest accepted.";
    			set h_run, true;
    			set currentquest$, .@selection;
    			close;
    		}
    		else{
    			mes "[^FF7700Questboard^000000]";
    			mes "You don't have the required";
    			mes "level to do this quest.";
    			close;
    		}
    
    	case 3:
    		close;
    	}
    
    L_checkitems:
    	set .@size, getarraysize(getd("."+currentquest$+"_collectionitem"));
    	for( set .@k,0; .@k < .@size; set .@k,.@k+2){
    		if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
    			set .@checkitem,.@checkitem+2;
    		}
    	}
    	if(.@checkitem<.@size){
    		mes "[^FF7700Questboard^000000]";
    		mes "You don't have everything.";
    		close;
    	}
    	for( set .@delcount,0; .@delcount < .@size; set .@delcount,.@delcount+2){
    		delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]");
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "Congratulation! Here is your Reward.";
    	if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount"));
    	set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny");
    	getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]");
    	setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay;
    	setd(currentquest$ + "_collection_repeat"),true;
    	set currentquest$, "";
    	set c_run, false;
    	close;
    
    L_checkmobs:
    	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
    	set .@goal, .@size/2;
    	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
    		set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
    		if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){
    			set .@checkmonster, .@checkmonster+1;
    			if(.@checkmonster==.@goal){
    				goto L_checkmobs2;
    			}
    			continue;
    		}
    		goto L_checkmobs2;
    	}
    
    L_checkmobs2:
    	if(.@checkmonster<.@goal){
    		mes "[^FF7700Questboard^000000]";
    		mes "You didn't kill everything.";
    		close;
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "Congratulation! Here is your Reward.";
    	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
    	for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
    		set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
    		setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    	}
    	if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount"));
    	set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny");
    	getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]");
    	setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;
    	setd(currentquest$ + "_hunting_repeat"),true;
    	set currentquest$, "";
    	set h_run, false;
    	close;
    
    OnNPCKillEvent:
    	if(h_run!=true) end;
    	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
    	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
    		if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){
    			set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
    			if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+currentquest$+"_huntingmob["+.@i+"]")){
    				setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
    				dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";
    			}
    			if(getcharid(1) != 0 && .party_support == true){
    				getmapxy(.@map1$,.@x1,.@y1);
    				set .@killerid, getcharid(3);
    				set .@currentquest$, currentquest$;
    				getpartymember getcharid(1),1;
    				getpartymember getcharid(1),2;
    				for(set .@j, 0; .@j < $@partymembercount; .@j++){
    					if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){
    						if(h_run==true && $@partymemberaid[.@j] != .@killerid && .@currentquest$ == getvar(currentquest$, $@partymembercid[.@j]) && readparam(HP, $@partymembercid[.@j]) > 0){
    							getmapxy(.@map2$,.@x2,.@y2,BL_PC,rid2name($@partymemberaid[.@j]));
    							if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){
    								set .@kill_amt,getvar(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount"), $@partymembercid[.@j]);
    								set .@kill_goal,getd("."+.@currentquest$+"_huntingmob["+.@i+"]");
    								if(.@kill_amt<.@kill_goal)
    								{
    									setd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", .@kill_amt+1, $@partymembercid[.@j]);
    									dispbottom getd("."+.@currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+(.@kill_amt+1)+"/"+.@kill_goal+")", 0xB6FF00, $@partymembercid[.@j];
    								}
    							}
    						}
    					}
    				}
    			}
    			break;
    		}
    	}
    	end;
    
    OnInit:
    
    	function AddCollection;
    	function AddHunting;
    
    	//Activate/Deactivate quest categories (true/1 - activated, false/0 - deactivated)
    	set .collection, true;
    	set .hunting, true;
    
    	//Quest Delay (seconds)
    	//24 hours = 86400 seconds
    	set .quest_delay, 60;
    
    	//Activate/Deactivate repeatable quests (true/1 - activated, false/0 - deactivated)
    	set .quest_repeat, true;
    
    	//Activate/Deactivate party support (true/1 - activated, false/0 - deactivated)
    	set .party_support, true;
    
    	//Max range for party support (+- x & y coordinations)
    	set .party_range, 25;
    
    	//Checks if quests are loaded (prevents out of index)
    	if(.questsloaded==true) end;
    	set .questsloaded, true;
    
    	//Add Collection Quests here (You can add as many required items as you want)
    	//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
    	AddCollection("Bloody Branch Wisdom",90,99,7720,2,2000,1000000,500000,604,150,7939,5,7203,5);
    
    
    	//Add Hunting Quests here (You can add as many required mobs as you want)
    	//AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
    	end;
    
    
    	function AddCollection{
    		set .collectionquestcount,.collectionquestcount+1;
    		setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
    		setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
    		setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
    		setd ("." +.collectionquestcount+"_collectionprize", getarg(3));
    		setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
    		setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
    		set .@argcount, 6;
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
    		setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); 
    		setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
    		set .@argcount, .@argcount+2;
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
    		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
    			setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); 
    			setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
    			set .@argcount,.@argcount+2;
    			set .@size, .@size+2;
    		}
    		return;
    	}
    
    	function AddHunting{
    		set .huntingquestcount,.huntingquestcount+1;
    		setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
    		setd ("." +.huntingquestcount+"_huntingmin", getarg(1));
    		setd ("." +.huntingquestcount+"_huntingmax", getarg(2));
    		setd ("." +.huntingquestcount+"_huntingprize", getarg(3));
    		setd ("." +.huntingquestcount+"_huntingamount", getarg(4));
    		setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
    		set .@argcount, 6;
    		setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
    		setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
    		set .@argcount, .@argcount+2;
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
    		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
    			setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); 
    			setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
    			set .@argcount, .@argcount+2;
    			set .@size, .@size+2;
    		}
    		return;
    	}
    }

     

  4. 4 hours ago, Kreustoo said:

    Hello,

    I'd have done something like this:

    
    OnHour03:
    OnHour15:
    if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3;
    if ( gettime(4) != 6 || gettime(4) != 0){ if(rand(1,2) == 1) goto OnHappyHour3; else goto OnHappyHour2; }

    (not tested)

    I will try  this sir thankyou !!!

  5. Hi ! I just tried to randomize my happyhour today but it didnt worked out .. I wonder if my script is right or what ? help If the time is 1500 and weekdays it will randomly choose to go to happyhour3 or 2 

    OnHour03:
    OnHour15:
    if ( gettime(4) == 6 || gettime(4) == 0) goto OnHappyHour3;
    if ( gettime(4) != 6 || gettime(4) != 0) goto rand(OnHappyHour3,OnHappyHour2);

     

  6. Hi ! how to make variable expire ? like example I have a Freebies npc (for example) ,, When I claim the rewards it will set into set #freebies, 1; ... and you can claim again by next week same day .example every sunday you can claim the reward ....   thankyou

    	claim:
    		if ( gettime(4) != 0 && #free == 1) {
    				mes .name$;	
    				mes "I'm sorry but supplies are only available every ^ff0000Sundays^000000";
    				end;
    		}
    		if (#freeclaim == 1) {
    				mes .name$;	
    				mes "You have already claimed your streamer's pack see you next week!";
    				end;
    		}
    		else {
    			getitembound 14003,50,1;
    			set #freeclaim, 1;
    		}

     

  7. On 3/31/2019 at 3:21 AM, idLaZ said:

    @Haikenz thanks for this Mod, it is working fine. However, when you char select or reconnect, the Negotiations becomes Release status again. Is it also possible to enhance it?

    - Prevent the character from using commands (like @storage / @gstorage)

    - Prevent use of Vending Skill? 

    - Prevent of talking to NPC because the hackers might sell the items to NPC

    Thank you!

     

    On 12/29/2019 at 9:04 AM, JackTheGorrion said:

    good afternoon I would like to know if someone solved the problem that when you reload your characters that security is not removed @Haikenz

    screenAzkaban004.jpg

    Ive got the same problem when I used this ... I hope my response is not too late ... 

    I managed to fixed it by changing 

    	OnPCLoginEvent:	
    		///////////////////////////////////////////////////////////////////////////////
    		// Informs whether the Account protection system is active
    		///////////////////////////////////////////////////////////////////////////////
    		dispbottom "[Account Protection]";
    		if(#BLOCKPASS){
    			dispbottom "Security System Enable: Use @"+.comando$+" For more information.";
    		} else {
    			dispbottom "Security System Disable: Use @"+.comando$+" For more information.";
    		}
    		end;

    to this one

    	OnPCLoginEvent:	
    		///////////////////////////////////////////////////////////////////////////////
    		// Informs whether the Account protection system is active
    		///////////////////////////////////////////////////////////////////////////////
    		dispbottom "[Account Protection]";
    		if(#BLOCKPASS){
    			dispbottom "Security System Enable: Use @"+.comando$+" For more information.";
    			block 1;
    		} else {
    			dispbottom "Security System Disable: Use @"+.comando$+" For more information.";
    			block 0;
    		}
    		end;

     

    • Upvote 2
  8. Good day fellas .. I tried to modify @Euphy 's script for costume with view ... I have 1 concern .. How can I show the required amount needed to get item instead of zeny ???? the npc should show it like for example: GIGANTIC MAJESTIC GOAT 1000p instead of GIGANTIC MAJESTIC GOAT 1000zeny ...The players are always asking why I dont put price on viewing shop instead of on buying it ..theyre having confusions ...

    //===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Update Hat Maker By: ==================================================
    //= Boy
    //===== Current Version: =====================================
    //= 1.4a
    //===== Compatible With: =====================================
    //= rAthena SVN r15340+
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //============================================================
    					
    bat_room,160,151,3	script	War Badge Shop	745 ,{
    function Add; function Chk; function Slot; function A_An;
    
    	if(.Shops$ != "") set .@i,1;
    	else {
    		set .@menu$,"";
    		for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
    			set .@menu$, .@menu$+.Shops$[.@i]+":";
    		set .@i, select(.@menu$); }
    	dispbottom "Select one item at a time.";
    	callshop "bgshop"+.@i,1;
    	npcshopattach "bgshop"+.@i;
    	end;
    
    function Add {
    	if (getitemname(getarg(1))=="null") {
    		debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; }
    	for(set .@n,5; .@n<127; set .@n,.@n+2) {
    		if (!getarg(.@n,0)) break;
    		if (getitemname(getarg(.@n))=="null") {
    			debugmes "Quest requirement #"+getarg(.@n)+" invalid (skipped) on Quest ItemID "+ getarg(1) +"."; return; } }
    	for(set .@i,2; .@i<.@n; set .@i,.@i+1)
    		set getd(".q_"+getarg(1)+"["+(.@i-2)+"]"), getarg(.@i);
    	npcshopadditem "bgshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
    	return; }
    function Chk {
    	if (getarg(0)<getarg(1)) { set @qe0,1; return "^FF0000"; }
    	else return "^00FF00"; }
    function Slot {
    	set .@s$,getitemname(getarg(0));
    	switch(.ShowSlot){
    		case 1: if (!getitemslots(getarg(0))) return .@s$;
    		case 2: if (getiteminfo(getarg(0),11)>0) return .@s$+" ["+getitemslots(getarg(0))+"]";
    		default: return .@s$; } }
    function A_An {
    	setarray .@A$[0],"a","e","i","o","u";
    	set .@B$, "_"+getarg(0);
    	for(set .@i,0; .@i<5; set .@i,.@i+1)
    		if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
    	return "a "+getarg(0); }
    
    OnBuyItem:
    	set .@q[0],@bought_nameid;
    	copyarray .@q[1],getd(".q_"+@bought_nameid+"[0]"),getarraysize(getd(".q_"+@bought_nameid+"[0]"));
    	if (!.@q[1]) { message strcharinfo(0),"An error has occurred."; end; }
    	mes "[Quest Shop]";
    	mes "Reward: ^0055FF"+((.@q[1]>1)?.@q[1]+"x ":"")+Slot(.@q[0])+"^000000";
    	mes "Requirements:";
    	//if (.@q[2]) mes " > "+Chk(Zeny,.@q[2])+.@q[2]+" Zeny^000000";
    	if (.@q[3]) mes " > "+Chk(getd(.Points$[0]),.@q[3])+.@q[3]+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+.@q[3]+")^000000";
    	if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
    		mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1])+((.DisplayID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+.@q[.@i+1]+")^000000";
    	next;
    	set @qe1, getiteminfo(.@q[0],5); set @qe2, getiteminfo(.@q[0],11);
    	addtimer 1000, strnpcinfo(1)+"::OnEnd";
    	while(1){
    		switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((((@qe1&1) || (@qe1&256) || (@qe1&512) || (@qe1&1024) || (@qe1&2048) || (@qe1&4096)) && @qe2>0 && !@qe6)?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {			case 1:
    				if (@qe0) { 
    					mes "[Quest Shop]";
    					mes "You're missing one or more quest requirements.";
    					close; }
    				if (!checkweight(.@q[0],.@q[1])) {
    					mes "[Quest Shop]";
    					mes "^FF0000You need "+(((.@q[1]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
    					close; }
    				//if (.@q[2]) set Zeny, Zeny-.@q[2];
    				if (.@q[3]) setd .Points$[0], getd(.Points$[0])-.@q[3];
    				if (.@q[4]) for(set .@i,4; .@i<getarraysize(.@q); set .@i,.@i+2)
    					delitem .@q[.@i],.@q[.@i+1];
    				getitem .@q[0],.@q[1];
    				if (.Announce) announce strcharinfo(0)+" has created "+A_An(getitemname(.@q[0]))+"!",0;
    				specialeffect2 699;
    				close;
    			case 2:
    				set @qe3, getlook(3); set @qe4, getlook(4); set @qe5, getlook(5);
    				if (@qe1&1) atcommand "@changelook 3 "+@qe2;
    				if (@qe1&256) atcommand "@changelook 1 "+@qe2;
    				if (@qe1&512) atcommand "@changelook 2 "+@qe2;
    				if (@qe1&1024) atcommand "@changelook 1 "+@qe2;
    				if (@qe1&2048) atcommand "@changelook 2 "+@qe2;
    				if (@qe1&4096) atcommand "@changelook 3 "+@qe2;
    				set @qe6,1;
    				break;
    			case 3:
    				close; } }
    OnEnd:
    	if (@qe6) { atcommand "@changelook 3 "+@qe3; atcommand "@changelook 1 "+@qe4; atcommand "@changelook 2 "+@qe5; }
    	for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0;
    	end;
    OnInit:
    //waitingroom "[ Cash Items ]",0;
    // --------------------- Config ---------------------
    // Custom points, if needed: "<variable>","<name to display>"
    	setarray .Points$[0],"#CASHPOINTS","Cash Points";
    
    	set .Announce,0;	// Announce quest completion? (1: yes / 0: no)
    	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
    	set .DisplayID,0;	// Show item IDs? (1: yes / 0: no)
    	set .ShowZeny,0;	// Show Zeny cost, if any? (1: yes / 0: no)
    
    // Shop categories, if needed: "<Shop 1>","<Shop 2>"{,...};
    // Duplicate dummy data for any additional shops (bottom of script).
    // If no categories, use the second line instead (remove //).
    
    	setarray .Shops$[1],"BG Costumes";
    	setarray .Shops$[2],"BG Consumables";
    	 //set .Shops$,"n/a";
    
    // Add(<shop number>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,
    //     <required item ID>,<required item amount>{,...});
    // Shop number corresponds with order above (default is 1).
    // Note: Do NOT use a reward item more than once!
    
    	Add(1,19966,1,0,0,7773,1000);
    	Add(1,31332,1,0,0,7773,1000);
    	Add(1,19539,1,0,0,7773,1000);
    	Add(1,31202,1,0,0,7773,1000);
    	Add(1,31405,1,0,0,7773,1000);
    	Add(1,31589,1,0,0,7773,1000);
    	Add(1,31398,1,0,0,7773,1000);
    	sleep 10;
    	Add(2,14003,1,0,0,7773,10);
    	Add(2,14209,1,0,0,7773,10);
    	Add(2,13913,1,0,0,7773,50);
    	Add(2,13912,1,0,0,7773,50);
    	sleep 10;
    	
    // --------------------------------------------------
    	for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1)
    		npcshopdelitem "bgshop"+.@i,909;
    	end;
    }
    
    // -------- Dummy data (duplicate as needed) --------
    -	shop	bgshop1	-1,909:-1
    -	shop	bgshop2	-1,909:-1

     

  9. Hi guys ! I used an HTML website for my server ..but it has no registration so Ive decided to use Fluxcp registration ... So what I did was I put my html files on my public_html directory and creating a "CP folder" along with it and moving my fluxcp files there ..but when I tried to reload it flux is broken ... www.mydomain/cp ....... any help or any methods ? sorry for my bad english -_-

  10. Good day I would like to request for this kind of script wherein there is a ladder for the following :

    1. Top 10 Killers

    2. Top 10 Breaker

    3. Top Guilds

     

    at the end of the month the top 10 killers and Breaker will recieve rewards thru Rodex Mail and top guilds will recieve rewards also (Each members)

     

    Is it possible ? please help 

  11. Hi guys I need help with this script ...please somebody  ... The mail is not working i think theres something wrong on my db ,,,its not storing variables like m_kda etc 

    //===== EinherjarRo Scripts ==================================
    //= PvP Ladder
    //===== Author ===============================================
    //= Stolao
    //===== Current Version: =====================================
    //= 3.21
    //===== Compatible With: =====================================
    //= rAthena SVN
    //===== Description: =========================================
    // Configurable Pvp Ladder
    //===== Comments: ============================================
    //= [Stolao]
    //===== Additional Comments: =================================
    //= 3.00 Overhaul
    //= 3.01 Fixed missing "No" for "No Ygg"
    //= 3.02 Added Show Map Name Option
    //= 3.03 Added Max Players Option
    //= 3.04 Optimized and fixed SQL queries [Secret]
    //= 3.05 Replaced some queries with addrid(0)
    //= 3.06 Updated Rewards to RODEX compatable
    //= 3.07 Fixed all rom referancing room [0] player limit
    //= 3.08 Made Made .MaxPlayers = 0, mean unlimited
    //= 3.09 Removed use of getd
    //= 3.0A Cleaned up some code
    //= 3.0B Moved Menu Generation to fix Map Count not showing
    //= 3.0C Actually Added RoDex Support now
    //= 3.0D Fixed Map Menu Generation
    //= 3.0E Fixed sql query
    //= 3.0F Cleaned Code a bit
    //= 3.10 Did more Cleaned Code a bit
    //= 3.11 Fixed a logic bug in GM reset
    //= 3.12 Added Waiting Room
    //= 3.13 Added Dynamic Waiting Room
    //= 3.14 Moved and added more At_Commands
    //= 3.15 Dynamic Waiting Room (&4096) require Waiting Room (&2048) to work
    //= 3.16 Increased Waiting Room Rotation Time
    //= 3.17 Fixed Typos in Reset PVP Stats
    //= 3.18 Removed unnessisary next, creating hang screens
    //= 3.19 Made compatable with new mail command
    //= 3.1A Reformatted Rewards in conf to support 5 items
    //= 3.1B Fixeda Hang when entering Nightmare PVP (thanks klesler)
    //= 3.1C Cied incorrrect use of close
    //= 3.1D Fixed Missing Party Check (thanks Haikenz)
    //= 3.1E Fixed Not opening PVP ladder, only GVG ladder (thanks Haikenz)
    //= 3.1F Fixed a warning when generating waitingroom
    //= 3.20 Fixed Missing Guild Check (thanks Haikenz)
    //= 3.21 Changed Default maps to pvp maps
    //===== Todo: ================================================
    //= Condence repeat queries
    //===== Contact Ifo: =========================================
    //= [Stolao]
    // Email: [email protected]
    //============================================================
    prontera,156,285,2	script	Ladder	837,{
    //==================================
    OnPvpLadder:	//-- Menus
    //==================================
    
    	.@Menu = select(((getarraysize(.MapName$))?"Enter PvP Map:":":")+
    			((.Options&1)?"Pvp Ladder:":":")+
    			((.Options&2)?"GvG Ladder:":":")+
    			((.Options&8)?"Top Guild:":":")+
    			((.Options&16)?"PvP Shops:":":")+
    			((.Options&1 || .Options&2 || .Options&8 || .Options&16)?"Personal Stats:":":")+
    			((getgmlevel() >= 99)?"Reset PVP Stats":""));
    	switch(.@Menu){ 
    		case 2:
    		case 3:
    			if(.@Menu == 2){
    				if(.Options&384)
    					.@key$ = "m_kda";
    				else if(.Options&256)
    					.@key$ = "kda";
    				else if(.Options&128)
    					.@key$ = "m_pkcount";
    				else 	.@key$ = "pl_pkcount";
    			} else {
    				if(.Options&384)
    					.@key$ = "gvg_kda";
    				else if(.Options&256)
    					.@key$ = "m_gvg_kda";
    				else if(.Options&128)
    					.@key$ = "m_gvg_kcount";
    				else 	.@key$ = "gvg_kcount";
    			}
    			query_sql("SELECT `char_reg_num`.`value`,`char`.`name`,`char`.`char_id` FROM `char` INNER JOIN `char_reg_num` ON `char_reg_num`.`char_id`=`char`.`char_id` WHERE `char_reg_num`.`key`='" + .@key$ + "' ORDER BY `char_reg_num`.`value` DESC LIMIT 10",.@value,.@name$,.@cid);
    			if(!(.Options&256)){
    				for(.@i = 0; .@i < getarraysize(.@cid); .@i++) {
    					if(.@i == 2){
    						if(.Options&128)
    							.@key$ = "m_dthcount";
    						else	.@key$ = "pl_dthcount";
    					} else if(.Options&128)
    						.@key$ = "m_gvg_dcount";
    					else	.@key$ = "gvg_dcount";
    					query_sql("SELECT CAST(`value` AS SIGNED) FROM `char_reg_num` WHERE char_id = "+.@cid[.@i]+" AND `key` = '';",.@j);
    					.@Death[.@i] = .@j;
    				}
    			}
    			mes "~ ^990000"+((.Options&128)?"Monthly ":"") + ((.@Menu == 2)?"PvP":"GvG") +" Ladder^000000 ~";
    			if (!getarraysize(.@cid)){
    				mes "The rankings are empty.";
    			} else {
    				for(.@i = 0; .@i<getarraysize(.@cid); .@i++){
    					if((.@i+1) % 10 != 0){
    						if(.Options&256)
    							mes "#"+(.@i+1)+" ^0000FF"+.@name$[.@i]+"^000000 "+.@value[.@i];
    						else 	mes "#"+(.@i+1)+" ^0000FF"+.@name$[.@i]+"^000000 [^00EE00"+callfunc("F_InsertPlural",.@value[.@i],"~ kill")+"] [^EE0000"+callfunc("F_InsertPlural",.@Death[.@i],"~ death")+"]";
    					} else next;
    				}
    			}
    			close;
    		case 4:
    			if(.Options&256)
    				.@key$ = "Guild_Kda";
    			else	.@key$ = "Guild_Kills";
    			if(.Options&128)
    				.@key$ = "$M_" + .@key$;
    			else	.@key$ = "$" + .@key$;
    			query_sql("SELECT `index`, CAST(`value` AS SIGNED) FROM `global_acc_reg_num` WHERE `key` = '" + .@key$ + "' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 10",.@gid,.@value);
    			if (!getarraysize(.@gid)){
    				mes "The rankings are empty.";
    			} else {
    				for(.@i = 0; .@i < getarraysize(.@gid); .@i++){
    					//query_sql("SELECT `value` FROM `global_acc_reg_num` WHERE `index` = "+.@gid[.@i]+";",.@j$); // ??? [Secret]
    					mes "#"+(.@i+1)+" ^0000EE["+getguildname(.@gid[.@i])+"]^000000 with [^00EE00"+callfunc("F_InsertPlural",$Guild_Kills[.@gid[.@i]],"~ kill")+"] and [^EE0000"+callfunc("F_InsertPlural",$Guild_Deaths[.@gid[.@i]],"~ death")+"]";
    				}
    			}
    			close;
    		case 5:
    			callshop "PvP_Cash_Shop",1;
    			end;
    		case 6:
    			if(.Options&1){
    				mes "[PvP]";
    				mes "Lifetime:","^00EE00"+ callfunc("F_InsertPlural",pl_pkcount,"kill") +"^000000 - ^EE0000"+ callfunc("F_InsertPlural",pl_dthcount,"death") + ((.Options&256)?" - ^0000EE"+ kda +" Total":"") +"^000000";
    				if(.Options&128) mes "Monthly:","^00EE00"+ callfunc("F_InsertPlural",m_pkcount,"kill") +"^000000 - ^EE0000"+ callfunc("F_InsertPlural",m_dthcount,"death") + ((.Options&256)?" - ^0000EE"+ m_kda +" Total":"") +"^000000";
    			}
    			if(.Options&16) mes "You Have "+ #PvpPoints +" Spendable Points";
    			if(.Options&2){
    				if(.Options&1) next;
    				mes "[GvG]";
    				mes "Lifetime:","^00EE00"+ callfunc("F_InsertPlural",gvg_kcount,"kill") +"^000000 - ^EE0000"+ callfunc("F_InsertPlural",gvg_dcount,"death")+((.Options&256)?" - ^0000EE"+ gvg_kda +" Total":"")+"^000000";
    				if(.Options&128) mes "Monthly:","^00EE00"+ callfunc("F_InsertPlural",m_gvg_kcount,"kill") +"^000000 - ^EE0000"+ callfunc("F_InsertPlural",m_gvg_dcount,"death") + ((.Options&256)?" - ^0000EE"+ m_gvg_kda +" Total":"") +"^000000";
    			}
    			if(.Options&8 && getcharid(2)){
    				if(.Options&2 || .Options&3) next;
    				mes "[Guild Stats]";
    				mes "Lifetime:","^00EE00"+ callfunc("F_InsertPlural",$Guild_Kills[getcharid(2)],"kill") +"^000000 - ^EE0000"+ callfunc("F_InsertPlural",$Guild_Deaths[getcharid(2)],"death") + ((.Options&256)?" - ^0000EE"+ $Guild_Kda[getcharid(2)] +" Total":"")+ "^000000";
    				if(.Options&128) mes "Monthly:","^00EE00"+ callfunc("F_InsertPlural",$M_Guild_Kills[getcharid(2)],"kill") +"^000000 - ^EE0000"+ callfunc("F_InsertPlural",$M_Guild_Deaths[getcharid(2)],"death") + ((.Options&256)?" - ^0000EE"+ $M_Guild_Kda[getcharid(2)] +" Total":"") +"^000000";
    			}
    			close;
    
    		case 7:
    			.@i = select("Monthly:Lifetime") - 1;
    			.@L$[0] = (.Options&1)?"Pvp Ladder":"";
    			.@L$[1] = (.Options&2)?"GvG Ladder":"";
    			.@L$[2] = (.Options&8)?"Top Guild":"";
    			.@j = select(implode(.@L$,":")) - 1;
    			mes "Are you sure you want to reset this the "+((.@i)?"Lifetime":"Monthly")+" "+.@L$[.@j]+"?";
    			if(select("No:Yes")!=2)
    				close;
    			close2;
    			switch(.@i * 3 + .@j){
    				case 0:
    					query_sql("DELETE FROM `char_reg_num` WHERE `key` = 'm_pkcount' OR `key` = 'm_kda' OR `key` = 'pl_dthcount'");
    					addrid(0);
    					m_pkcount = m_kda = m_dthcount = 0;
    					break;
    				case 1:
    					query_sql("DELETE FROM `char_reg_num` WHERE `key` = 'pl_pkcount' OR `key` = 'kda' OR `key` = 'pl_dthcount'");
    					addrid(0);
    					pl_pkcount = kda = pl_dthcount = 0;
    					break;
    				case 2:
    					query_sql("DELETE FROM `char_reg_num` WHERE `key` = 'm_gvg_kcount' OR `key` = 'm_gvg_kda' OR `key` = 'm_gvg_dcount'");
    					addrid(0);
    					m_gvg_kcount = m_gvg_kda = m_gvg_dcount = 0;
    					break;
    				case 3:
    					query_sql("DELETE FROM `char_reg_num` WHERE `key` = 'gvg_kcount' OR `key` = 'gvg_kda' OR `key` = 'gvg_dcount'");
    					addrid(0);
    					gvg_kcount = gvg_kda = gvg_dcount = 0;
    					break;
    				case 4:
    					cleararray $M_Guild_Kills[0],0,getarraysize($M_Guild_Kills);
    					cleararray $M_Guild_Kda[0],0,getarraysize($M_Guild_Kda);
    					cleararray $M_Guild_Deaths[0],0,getarraysize($M_Guild_Deaths);
    					break;
    				case 5:
    					cleararray $Guild_Kills[0],0,getarraysize($Guild_Kills);
    					cleararray $Guild_Kda[0],0,getarraysize($Guild_Kda);
    					cleararray $Guild_Deaths[0],0,getarraysize($Guild_Deaths);
    					break;
    			}
    			end;
    
    		case 1:	//===== Dont Touch - Menu Generation ======================
    			for(.@i = 0; .@i < getarraysize(.MapName$); .@i++){
    				.@MapList$[.@i] = "["+ ((.MapMode[.@i]&2)?"^EE3333Nightmare ":"") + 
    					((.MapMode[.@i]&4)?"Party ":"") + 
    					((.MapMode[.@i]&1)?"GvG":"PvP") +"^000000] "+ 
    					((.MapMode[.@i] >= 8)?"No ":"") + 
    					((.MapMode[.@i]&8)?"Ygg ":"") + 
    					((.MapMode[.@i]&16)?"3rds ":"") + 
    					((.MapMode[.@i]&32)?"Trans ":"") + 
    					((.MapMode[.@i]&64)?.MapName$[.@i]:"") + 
    					((.MaxPlayers[.@i])?"["+getmapusers(.MapName$[.@i])+"/"+.MaxPlayers[.@i]+"]":"");
    			}
    			//==========================================================
    			.@m = select(implode(.@MapList$,":")) - 1;
    			if(.MapMode[.@m]&2){
    				mes "You are about to enter NIGHTMARE PvP, on death you will lose gear randomly.";
    				if(select("Nevermind:Continue") == 1)
    					close;
    			} else	if(.MapMode[.@m]&8 && (countitem(607) || countitem(608))){
    				mes "No "+getitemname(607)+" or "+getitemname(608)+" Allowed.";
    				close;
    			} else 	if(.MapMode[.@m]&16){
    				mes "No 3rd Classes Allowed.";
    				close;
    			} else	if(.MapMode[.@m]&32){
    				mes "No Trans Classes Allowed.";
    				close;
    			} else if(.MaxPlayers[.@m] && getmapusers(.MapName$[.@m]) >= .MaxPlayers[.@m]){
    				mes "Room is Full.";
    				close;
    			} else	if(.MapMode[.@m]&4 && getcharid(1) <= 0 ){
    				mes "You must be in a Party to join.";
    				close;
    			} else	if(.MapMode[.@m]&1 && getcharid(2) <= 0 ){
    				mes "You must be in a Guild to join.";
    				close;
    			}
    			announce "[ PvP Warper ] "+strcharinfo(0)+" has entered in "+((.MapMode[.@m]&1)?"GvG":"PvP")+" Room",0,((.MapMode[.@m]&1)?0x00CC99:0xEE0000);
    			warp .MapName$[.@m],0,0;
    	}
    	end;
    
    //==================================
    OnPCKillEvent:	//-- Adding Stats
    //==================================
    
    	if(!getgmlevel() || .Options&512){
    		if(LastPK == killedrid) RepeatKill++;
    		else {
    			LastPK = killedrid;
    			RepeatKill = 0;
    		}
    		if(.Options&4)
    			announce "[PVP]: "+strcharinfo(0)+" has slain "+ rid2name(LastPK) + ((RepeatKill)?" for the "+callfunc("F_GetNumSuffix",RepeatKill)+" time in a row":"") +".",bc_all;
    		if((RepeatKill < .RepeatCount && .Options&32) || !.Options&32){
    			if(.Options&1) pl_pkcount++;
    			if(.Options&129) m_pkcount++;
    			if(.Options&257) kda++;
    			if(.Options&385) m_kda++;
    			if(.Options&16) #PvpPoints++;
    			if((getmapflag(strcharinfo(3),MF_GVG) || getmapflag(strcharinfo(3),MF_GVG_NOPARTY)) && (agitcheck() || agitcheck2()) && getcharid(2) && .Options&2){
    				gvg_kcount++;
    				if(.Options&128) m_gvg_kcount++;
    				if(.Options&256) gvg_kda++;
    				if(.Options&384) m_gvg_kda++;
    				if(.Options&8) $Guild_Kills[getcharid(2)]++;
    				if(.Options&136) $M_Guild_Kills[getcharid(2)]++;
    				if(.Options&256) $Guild_Kda[getcharid(2)]++;
    				if(.Options&264) $M_Guild_Kda[getcharid(2)]++;
    			}
    			attachrid(LastPK);
    			if(.Options&1) pl_dthcount++;
    			if(.Options&129) m_dthcount++;
    			if(.Options&257) kda -= 1;
    			if(.Options&385) m_kda -= 1;
    			if((getmapflag(strcharinfo(3),MF_GVG) || getmapflag(strcharinfo(3),MF_GVG_NOPARTY)) && (agitcheck() || agitcheck2()) && getcharid(2) && .Options&2){
    				gvg_dcount++;
    				if(.Options&128) m_gvg_dcount++;
    				if(.Options&258) gvg_kda -= 1;
    				if(.Options&384) m_gvg_kda -= 1;
    				if(.Options&8) $Guild_Deaths[getcharid(2)]++;
    				if(.Options&136) $M_Guild_Deaths[getcharid(2)]++;
    				if(.Options&256) $Guild_Kda[getcharid(2)] -= 1;
    				if(.Options&264) $M_Guild_Kda[getcharid(2)] -= 1;
    			}
    		} else if(.Options&1024) atcommand "@request [PvP Ladder]: "+strcharinfo(0)+" is showing signs of abusing the PvP Ladder Please Investigate";
    		if(.Options&64) warp "Save",0,0;
    	}
    	end;
    OnReward:
    //==================================
    OnHour00:	//-- Monthly Rewards
    //==================================
    
    	if(gettime(4) == 2 && .Options&128){
    		if(.RewardType&1 && .Options&1){
    			query_sql("SELECT char_id,`char`.name,CAST(`value` AS SIGNED) FROM `char_reg_num` INNER JOIN `char` ON `char`.char_id = `char_reg_num`.char_id WHERE `key` = '"+((.Options&256)?"m_kda":"m_pkcount")+"' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT "+getarraysize(.PVP_Items$)+"",.@cid,.@name$,.@value);
    			for(.@i = 0; .@i< getarraysize(.@cid); .@i++)
    				mail .@cid[.@i], "no-reply", "PvP Ranking", "Congratulations!% You have placed #"+(.@i+1)+" in the PvP Raning this Month % % %[ Your reward is attached. ]", .PVP_Zeny[.@i], getd(".Pitem"+.@i), getd(".Pqnt"+.@i);
    			announce "[PVP Ranking]: Rewards have been mailed to the top "+getarraysize(.PVP_Items$)+" in PvP~!",bc_blue|bc_all;
    			query_sql("UPDATE `mail` SET message = REPLACE(message,'%',CHAR(13)) WHERE send_name = 'no-reply'");
    		}
    		sleep 10000;
    		if(.RewardType&2 && .Options&2){
    			query_sql("SELECT char_id,`char`.name,CAST(`value` AS SIGNED) FROM `char_reg_num` INNER JOIN `char` ON `char`.char_id = `char_reg_num`.char_id WHERE `key` = '"+((.Options&256)?"m_gvg_kda":"m_gvg_kcount")+"' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT "+getarraysize(.GVG_Items$)+"",.@cid,.@name$,.@value);
    			for(.@i = 0; .@i<getarraysize(.@cid); .@i++) 
    				mail .@cid[.@i], "no-reply", "PvP Ranking", "Congratulations!% You have placed #"+(.@i+1)+" in the PvP Raning this Month % % %[ Your reward is attached. ]", .GVG_Zeny[.@i], getd(".Gitem"+.@i), getd(".Gqnt"+.@i);
    			announce "[GVG Ranking]: Rewards have been mailed to the top "+getarraysize(.GVG_Items$)+" in GvG~!",bc_blue|bc_all;
    			query_sql("UPDATE `mail` SET message = REPLACE(message,'%',CHAR(13)) WHERE send_name = 'no-reply'");
    		}
    		cleararray $M_Guild_Kills[0],0,getarraysize($M_Guild_Kills);
    		cleararray $M_Guild_Kda[0],0,getarraysize($M_Guild_Kda);
    		cleararray $M_Guild_Deaths[0],0,getarraysize($M_Guild_Deaths);
    		query_sql("DELETE FROM `char_reg_num` WHERE `key` = 'm_pkcount' OR `key` = 'm_kda' OR `key` = 'm_dthcount' OR `key` = 'm_gvg_kcount' OR `key` = 'm_gvg_kda' OR `key` = 'm_gvg_dcount'");
    		addrid(0);
    		m_pkcount = 0;
    		m_kda = 0;
    		m_dthcount = 0;
    		m_gvg_kcount = 0;
    		m_gvg_kda = 0;	
    		m_gvg_dcount = 0;
    		end;
    	}
    
    //==================================
    OnInit:		//-- Config
    //==================================
    
    	// Gets NPC Name
    	// Lets you change NPC name without breaking anything
    	.NPC$ = strnpcinfo(0);
    
    	// At_Commands
    	bindatcmd("PvpLadder" ,.NPC$+"::OnPvpLadder",0,99);
    	bindatcmd("Pvpladder" ,.NPC$+"::OnPvpLadder",0,99);
    	bindatcmd("pvpLadder" ,.NPC$+"::OnPvpLadder",0,99);
    	bindatcmd("pvpladder" ,.NPC$+"::OnPvpLadder",0,99);
    
    	// Bitwise Variable
    	// 1: Record PvP
    	// 2: Record GvG (agit on and gvg map)
    	// 4: Announce When Someone gets a kill
    	// 8: Record Total Guild Stats
    	// 16: Gain PvP Points on Kills (#PvpPoints)
    	// 32: Repeat Kill Protection
    	// 64: Warp to Save on abuse
    	// 128: Monthly Stats
    	// 256: Order by KDA instead of most kills
    	// 512: Allow GMs to Join PvP
    	// 1024: Request a GM on Abuse
    	// 2048: Enable Waiting Room
    	// 4096: Dynamic Waiting Room
    	.Options = 1|2|4|8|16|32|128|256|1024|2048|4096|512;
    
    	// Monthly Reward Types
    	// 1: Pvp
    	// 2: Gvg
    	.RewardType = 1|2;
    
    	// PVP Rewards
    	// Rewards are Mailed to winners
    	// Zeny Rewards
    	setarray .PVP_Zeny,
    		1000000,500000,250000,125000,62500,// 1st - 5th
    		  31250, 15620,  7810,  3905, 1952;// 6th - 10th
    
    	// Ro Dex Supports 5 Items
    	// Old Mail DOES NOT support multiple items
    	// "Item 1, Qnt 1, Item 2, Qnt 2, Item 3, Qnt 3, Item 4, Qnt 4, Item 5, Qnt 5"
    	setarray .PVP_Items$,
    		"501,10,0,0,0,0,0,0,0,0",// 1st
    		"501,9,0,0,0,0,0,0,0,0",
    		"501,8,0,0,0,0,0,0,0,0",
    		"501,7,0,0,0,0,0,0,0,0",
    		"501,6,0,0,0,0,0,0,0,0",
    		"501,5,0,0,0,0,0,0,0,0",
    		"501,4,0,0,0,0,0,0,0,0",
    		"501,3,0,0,0,0,0,0,0,0",
    		"501,2,0,0,0,0,0,0,0,0",
    		"501,1,0,0,0,0,0,0,0,0";// 10th
    
    	// GVG Rewards
    	// Rewards are Mailed to winners
    	// Zeny Rewards
    	setarray .GVG_Zeny,
    		1000000,500000,250000,125000,62500,// 1st - 5th
    		  31250, 15620,  7810,  3905, 1952;// 6th - 10th
    
    	// Ro Dex Supports 5 Items
    	// Old Mail DOES NOT support multiple items
    	// "Item 1, Qnt 1, Item 2, Qnt 2, Item 3, Qnt 3, Item 4, Qnt 4, Item 5, Qnt 5"
    	setarray .GVG_Items$,
    		"501,10,0,0,0,0,0,0,0,0",// 1st
    		"501,9,0,0,0,0,0,0,0,0",
    		"501,8,0,0,0,0,0,0,0,0",
    		"501,7,0,0,0,0,0,0,0,0",
    		"501,6,0,0,0,0,0,0,0,0",
    		"501,5,0,0,0,0,0,0,0,0",
    		"501,4,0,0,0,0,0,0,0,0",
    		"501,3,0,0,0,0,0,0,0,0",
    		"501,2,0,0,0,0,0,0,0,0",
    		"501,1,0,0,0,0,0,0,0,0";// 10th
    	bindatcmd("pvpreset" ,strnpcinfo(0)+"::OnReward",99,99);
    
    	// Number of kills on same person before it detects abuse
    	.RepeatCount = 5;
    
    	// Players Shown in PvP Ladder
    	.MaxRank = 10;
    
    	// Map Names
    	setarray .MapName$,"pvp_n_1-2","pvp_n_1-1","pvp_n_1-4","pvp_n_1-3","pvp_n_1-5";
    
    	// Pvp Mode
    	// Modes are Addative
    	//	0 = Normal Pvp
    	//	1 = Gvg
    	//	2 = Nightmare
    	//	4 = Party
    	//	8 = No Ygg
    	//	16 = No 3rds
    	//	32 = No Trans
    	//	64 = Show Map Name
    	setarray .MapMode,0,1,2,4,56;
    
    	// Max Players Per Map
    	// 0 = No Limit
    	setarray .MaxPlayers,0,50,10,36,50;
    
    	// Mapflags for all PvP maps
    	// regardless of Mode
    	setarray .mapflag,
    		mf_nowarp,	mf_nowarpto,		mf_nosave,
    		mf_nomemo,	mf_noteleport,		mf_nopenalty,
    		mf_noreturn,	mf_nobranch,		mf_nomobloot,
    		mf_nomvploot,	MF_NOZENYPENALTY,	MF_NOTRADE,
    		MF_NOCOMMAND,	mf_nodrop;
    
    //===== Dont Touch - Mapflag & Waiting Room Generation =====
    	if(getwaitingroomstate(1) == -1)
    		delwaitingroom;
    	if(.Options&2048 && !.Options&4096)
    		waitingroom "PvP Ladder",0;
    	for(.@i = 0; .@i < getarraysize(.MapName$); .@i++){
    		for ( .@f = 0; .@f < .@size; .@f++ )
    			setmapflag .MapName$[.@i], .mapflag[.@f];
    		if(.MapMode[.@i]&4) setmapflag .MapName$[.@i], mf_partylock;
    		if(.MapMode[.@i]&2) setmapflag .MapName$[.@i], MF_NIGHTMAREDROP;
    		if(.MapMode[.@i]&1){
    			setmapflag .MapName$[.@i], MF_GUILDLOCK;
    			setmapflag .MapName$[.@i], MF_GVG;
    		} else{
    			setmapflag .MapName$[.@i], MF_PVP_NOGUILD;
    			setmapflag .MapName$[.@i], MF_PVP;
    		}
    		if(!.MapMode[.@i]&4){
    			if(.MapMode[.@i]&1) setmapflag .MapName$[.@i], MF_GVG_NOPARTY;
    				else	setmapflag .MapName$[.@i], MF_NOPARTY;
    		}
    	}
    	freeloop(1);
    	for(.@i = 0; .@i < getarraysize(.PVP_Items$); .@i++){
    		explode(.@convert$,.PVP_Items$[.@i],",");
    		for(.@c = 0; .@c < getarraysize(.@convert$) && .@c < 10; .@c++)
    			.@convert[.@c] = atoi(.@convert$[.@c]);
    		for(.@k = 0; .@k < getarraysize(.@convert); .@k += 2){
    			setd ".Pitem"+.@i+"["+getarraysize(getd(".Pitem"+.@i))+"]",.@convert[.@k];
    			setd ".Pqnt"+.@i+"["+getarraysize(getd(".Pqnt"+.@i))+"]",.@convert[.@k+1];
    		}
    	}
    	for(.@i = 0; .@i < getarraysize(.GVG_Items$); .@i++){
    		explode(.@convert$,.GVG_Items$[.@i],",");
    		for(.@c = 0; .@c < getarraysize(.@convert$) && .@c < 10; .@c++)
    			.@convert[.@c] = atoi(.@convert$[.@c]);
    		for(.@k = 0; .@k < getarraysize(.@convert); .@k += 2){
    			setd ".Gitem"+.@i+"["+getarraysize(getd(".Gitem"+.@i))+"]",.@convert[.@k];
    			setd ".Gqnt"+.@i+"["+getarraysize(getd(".Gqnt"+.@i))+"]",.@convert[.@k+1];
    		}
    	}
    	while(.Options&6144) {
    		for(.@i = 0; .@i < getarraysize(.MapName$); .@i++){
    			.@MapList$[.@i] = "["+ ((.MapMode[.@i]&2)?"Nightmare ":"") + 
    				((.MapMode[.@i]&4)?"Party ":"") + 
    				((.MapMode[.@i]&1)?"GvG":"PvP") +"] "+ 
    				((.MapMode[.@i] >= 8)?"No ":"") + 
    				((.MapMode[.@i]&8)?"Ygg ":"") + 
    				((.MapMode[.@i]&16)?"3rds ":"") + 
    				((.MapMode[.@i]&32)?"Trans ":"") + 
    				((.MapMode[.@i]&64)?.MapName$[.@i]:"") + 
    				((.MaxPlayers[.@i])?"["+getmapusers(.MapName$[.@i])+"/"+.MaxPlayers[.@i]+"]":"");
    			delwaitingroom;
    			waitingroom .@MapList$[.@i],0;
    			sleep 3000;
    		}
    	}
    //==========================================================
    }
    
    //==================================
    		//-- Call Shop
    //==================================
    
    -	pointshop	PvP_Cash_Shop	-1,#PvpPoints,501:1,502:2

    image.png.e3e34473824357f9e8a512ea8fb6aad9.png

  12. Hi can you help me show the remaining quest time ??? I think its not showing remaining hours ...Time2str function is not working on line 96 .. 

     

    //===== rAthena Script =======================================
    //= tr0n's Questboard
    //===== By: ==================================================
    //= tr0n
    //===== Current Version: =====================================
    //= 1.6.5
    //===== Description: =========================================
    //= Easily add collection and hunting quests.
    //===== Changelogs: ==========================================
    // 1.0.0 Release
    // 1.1.0 Added zeny reward
    // 1.2.0 Rewrote checkmob and killcounter
    // 1.3.1 Added level restriction
    // 1.3.4 Added Reward Item Amount
    // 1.4.4 Added Quest delay
    // 1.5.4 Added repeatable Quests
    // 1.6.4 Added party support
    // 1.6.5 Bug fixes for party support
    //============================================================
    prontera,129,215,5	script	Questboard	4_BOARD3,{
    
    	if(c_run==true){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ currentquest$ + "_collectionitem"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+getitemname(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+" - "+countitem(getd("."+currentquest$+"_collectionitem["+.@j+"]"))+"/"+getd("."+currentquest$+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +currentquest$+"_collectionprize"))?getitemname(getd("." +currentquest$+"_collectionprize"))+" - "+getd("." +currentquest$+"_collectionamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +currentquest$+"_collectionzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_collectionexp["+1+"]")+"^000000";
    		next;
    		if(select("Finish:Abort") == 2){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest aborted.";
    			set currentquest$, "";
    			set c_run, false;
    			close;
    		}
    		goto L_checkitems;
    	}
    
    	if(h_run==true){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ currentquest$ + "_huntingmob"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@j)+"]");
    			mes "^FF0000"+strmobinfo(1,getd("."+currentquest$+"_huntingmob["+.@j+"]"))+" - "+getd(currentquest$+"_"+.@currentmob+"_"+(.@j+1)+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +currentquest$+"_huntingprize"))?getitemname(getd("." +currentquest$+"_huntingprize"))+" - "+getd("." +currentquest$+"_huntingamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +currentquest$+"_huntingzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +currentquest$+"_huntingexp["+1+"]")+"^000000";
    		next;
    		if(select("Finish:Abort") == 2){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest aborted.";
    			for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
    				set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
    				setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    			}
    			set currentquest$, "";
    			set h_run, false;
    			close;
    		}
    		goto L_checkmobs;
    	}
    
    	mes "[^FF7700Questboard^000000]";
    	mes "Select category:";
    	next;
    
    	switch(select((.collection)?"Collection Quests":"",
    				  (.hunting)?"Hunting Quests":"",
    				  "Exit")) {
    
    	case 1:
    		set .@collectmenu$, "";
    		for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){
    			if (.@i) set .@collectmenu$,.@collectmenu$+":";
    			set .@collectmenu$, .@collectmenu$ + "[" + getd("." +(.@i+1)+"_collectionmin") + " - " + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
    		}
    		set .@selection,select(.@collectmenu$);
    		if(.quest_repeat == true){
    			if(gettimetick(2) < getd(.@selection + "_collection_delay")){
    				set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);
    				mes "[^FF7700Questboard^000000]";
    				mes "You have to wait ^0000FF"+Time2Str(.@time_left)+"^000000 to do this quest again.";
    				close;
    			}
    		}
    		else{
    			if(getd(.@selection + "_collection_repeat") == true){
    				mes "[^FF7700Questboard^000000]";
    				mes "You already did this quest.";
    				mes "Please choose another one.";
    				close;
    			}
    		}
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ .@selection + "_collectionitem"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+getitemname(getd("."+.@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+.@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +.@selection+"_collectionprize"))?getitemname(getd("." +.@selection+"_collectionprize"))+" - "+getd("." +.@selection+"_collectionamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +.@selection+"_collectionzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_collectionexp["+1+"]")+"^000000";
    		next;
    		if(select("Accept:Decline") == 2){
    			close;
    		}
    		if(BaseLevel >= getd("." +.@selection+"_collectionmin") && BaseLevel <= getd("." +.@selection+"_collectionmax")){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest accepted.";
    			set c_run, true;
    			set currentquest$, .@selection;
    			close;
    		}
    		else{
    			mes "[^FF7700Questboard^000000]";
    			mes "You don't have the required";
    			mes "level to do this quest.";
    			close;
    		}
    
    	case 2:
    		set .@huntmenu$, "";
    		for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){
    			if (.@i) set .@huntmenu$,.@huntmenu$+":";
    			set .@huntmenu$, .@huntmenu$ + "[" + getd("." +(.@i+1)+"_huntingmin") + " - " + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
    		}
    		set .@selection,select(.@huntmenu$);
    		if(.quest_repeat == true){
    			if(gettimetick(2) < getd(.@selection + "_hunting_delay")){
    				set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);
    				mes "[^FF7700Questboard^000000]";
    				mes "You have to wait ^0000FF"+Time2Str(.@time_left)+"^000000 to do this quest again.";
    				close;
    			}
    		}
    		else{
    			if(getd(.@selection + "_hunting_repeat") == true){
    				mes "[^FF7700Questboard^000000]";
    				mes "You already did this quest.";
    				mes "Please choose another one.";
    				close;
    			}
    		}
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		set .@size, getarraysize(getd("."+ .@selection + "_huntingmob"));
    		for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    			mes "^FF0000"+strmobinfo(1,getd("."+.@selection+"_huntingmob["+.@j+"]"))+" - "+getd("."+.@selection+"_huntingmob["+(.@j+1)+"]")+" ea.^000000";
    		}
    		mes "--------------------------------";
    		mes "[Reward]";
    		mes "Item: ^0000FF"+((getd("." +.@selection+"_huntingprize"))?getitemname(getd("." +.@selection+"_huntingprize"))+" - "+getd("." +.@selection+"_huntingamount")+" ea.^000000":"Nothing^000000");
    		mes "Zeny: ^0000FF"+getd("." +.@selection+"_huntingzeny")+"^000000";
    		mes "Base EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+0+"]")+"^000000";
    		mes "Job EXP: ^0000FF"+getd("." +.@selection+"_huntingexp["+1+"]")+"^000000";
    		next;
    		if(select("Accept:Decline") == 2){
    			close;
    		}
    		if(BaseLevel >= getd("." +.@selection+"_huntingmin") && BaseLevel <= getd("." +.@selection+"_huntingmax")){
    			mes "[^FF7700Questboard^000000]";
    			mes "Quest accepted.";
    			set h_run, true;
    			set currentquest$, .@selection;
    			close;
    		}
    		else{
    			mes "[^FF7700Questboard^000000]";
    			mes "You don't have the required";
    			mes "level to do this quest.";
    			close;
    		}
    
    	case 3:
    		close;
    	}
    
    L_checkitems:
    	set .@size, getarraysize(getd("."+currentquest$+"_collectionitem"));
    	for( set .@k,0; .@k < .@size; set .@k,.@k+2){
    		if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
    			set .@checkitem,.@checkitem+2;
    		}
    	}
    	if(.@checkitem<.@size){
    		mes "[^FF7700Questboard^000000]";
    		mes "You don't have everything.";
    		close;
    	}
    	for( set .@delcount,0; .@delcount < .@size; set .@delcount,.@delcount+2){
    		delitem getd("."+currentquest$+"_collectionitem["+.@delcount+"]"),getd("."+currentquest$+"_collectionitem["+(.@delcount+1)+"]");
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "Congratulation! Here is your Reward.";
    	if(getd("." +currentquest$+"_collectionprize")!=0) getitem(getd("." +currentquest$+"_collectionprize"),getd("." +currentquest$+"_collectionamount"));
    	set Zeny,Zeny+getd("." +currentquest$+"_collectionzeny");
    	getexp getd("." +currentquest$+"_collectionexp["+0+"]"),getd("." +currentquest$+"_collectionexp["+1+"]");
    	setd(currentquest$ + "_collection_delay"),gettimetick(2)+.quest_delay;
    	setd(currentquest$ + "_collection_repeat"),true;
    	set currentquest$, "";
    	set c_run, false;
    	close;
    
    L_checkmobs:
    	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
    	set .@goal, .@size/2;
    	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
    		set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
    		if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")==getd("."+currentquest$+"_huntingmob["+.@i+"]")){
    			set .@checkmonster, .@checkmonster+1;
    			if(.@checkmonster==.@goal){
    				goto L_checkmobs2;
    			}
    			continue;
    		}
    		goto L_checkmobs2;
    	}
    
    L_checkmobs2:
    	if(.@checkmonster<.@goal){
    		mes "[^FF7700Questboard^000000]";
    		mes "You didn't kill everything.";
    		close;
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "Congratulation! Here is your Reward.";
    	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
    	for(set .@x, 1; .@x < .@size; set .@x,.@x+2){
    		set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
    		setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    	}
    	if(getd("." +currentquest$+"_huntingprize")!=0) getitem(getd("." +currentquest$+"_huntingprize"),getd("." +currentquest$+"_huntingamount"));
    	set Zeny, Zeny+getd("." +currentquest$+"_huntingzeny");
    	getexp getd("." +currentquest$+"_huntingexp["+0+"]"),getd("." +currentquest$+"_huntingexp["+1+"]");
    	setd(currentquest$ + "_hunting_delay"),gettimetick(2)+.quest_delay;
    	setd(currentquest$ + "_hunting_repeat"),true;
    	set currentquest$, "";
    	set h_run, false;
    	close;
    
    OnNPCKillEvent:
    	if(h_run!=true) end;
    	set .@size, getarraysize(getd("."+currentquest$+"_huntingmob"));
    	for(set .@i, 1; .@i < .@size; set .@i,.@i+2){
    		if(killedrid==getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]")){
    			set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@i-1)+"]");
    			if(getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")<getd("."+currentquest$+"_huntingmob["+.@i+"]")){
    				setd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+1);
    				dispbottom getd("."+currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+ getd(currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount")+"/"+getd("."+currentquest$+"_huntingmob["+.@i+"]")+")";
    			}
    			if(getcharid(1) != 0 && .party_support == true){
    				getmapxy(.@map1$,.@x1,.@y1);
    				set .@killerid, getcharid(3);
    				set .@currentquest$, currentquest$;
    				getpartymember getcharid(1),1;
    				getpartymember getcharid(1),2;
    				for(set .@j, 0; .@j < $@partymembercount; .@j++){
    					if(isloggedin($@partymemberaid[.@j], $@partymembercid[.@j])){
    						if(h_run==true && $@partymemberaid[.@j] != .@killerid && .@currentquest$ == getvar(currentquest$, $@partymembercid[.@j]) && readparam(HP, $@partymembercid[.@j]) > 0){
    							getmapxy(.@map2$,.@x2,.@y2,BL_PC,rid2name($@partymemberaid[.@j]));
    							if(.@map1$ == .@map2$ && distance(.@x1,.@y1,.@x2,.@y2) < .party_range){
    								set .@kill_amt,getvar(getd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount"), $@partymembercid[.@j]);
    								set .@kill_goal,getd("."+.@currentquest$+"_huntingmob["+.@i+"]");
    								if(.@kill_amt<.@kill_goal)
    								{
    									setd(.@currentquest$+"_"+.@currentmob+"_"+.@i+"_killcount", .@kill_amt+1, $@partymembercid[.@j]);
    									dispbottom getd("."+.@currentquest$+"_huntingname$")+": ["+strmobinfo(1,.@currentmob)+"] ("+(.@kill_amt+1)+"/"+.@kill_goal+")", 0xB6FF00, $@partymembercid[.@j];
    								}
    							}
    						}
    					}
    				}
    			}
    			break;
    		}
    	}
    	end;
    
    OnInit:
    
    	function AddCollection;
    	function AddHunting;
    
    	//Activate/Deactivate quest categories (true/1 - activated, false/0 - deactivated)
    	set .collection, true;
    	set .hunting, true;
    
    	//Quest Delay (seconds)
    	//24 hours = 86400 seconds
    	set .quest_delay, 86400;
    
    	//Activate/Deactivate repeatable quests (true/1 - activated, false/0 - deactivated)
    	set .quest_repeat, true;
    
    	//Activate/Deactivate party support (true/1 - activated, false/0 - deactivated)
    	set .party_support, true;
    
    	//Max range for party support (+- x & y coordinations)
    	set .party_range, 25;
    
    	//Checks if quests are loaded (prevents out of index)
    	if(.questsloaded==true) end;
    	set .questsloaded, true;
    
    	//Add Collection Quests here (You can add as many required items as you want)
    	//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
    	AddCollection("Bloody Branch Wisdom",90,99,7720,5,20000,1000000,500000,604,150,7939,5,7203,5);
    
    	//Add Hunting Quests here (You can add as many required mobs as you want)
    	//AddHunting("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
    	AddHunting("Leveling Quest 30-50",30,50,7720,1,2500,250000,100000,1014,50);
    	AddHunting("Leveling Quest 50-80",50,70,7720,1,5000,500000,300000,1189,30);
    	AddHunting("Leveling Quest 80-90",80,90,7720,1,10000,700000,500000,1149,40);
    	AddHunting("Leveling Quest 90-99",90,99,7720,1,20000,1000000,500000,1219,30);
    	//AddHunting("Leveling Quest 201-254",201,254,0,0,0,900000,300000,2085,20,2086,15);
    	end;
    
    
    	function AddCollection{
    		set .collectionquestcount,.collectionquestcount+1;
    		setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
    		setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
    		setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
    		setd ("." +.collectionquestcount+"_collectionprize", getarg(3));
    		setd ("." +.collectionquestcount+"_collectionamount", getarg(4));
    		setd ("." +.collectionquestcount+"_collectionzeny", getarg(5));
    		set .@argcount, 6;
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionexp"));
    		setd ("." +.collectionquestcount+"_collectionexp["+.@size+"]",getarg(.@argcount)); 
    		setd ("." +.collectionquestcount+"_collectionexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
    		set .@argcount, .@argcount+2;
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
    		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
    			setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); 
    			setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
    			set .@argcount,.@argcount+2;
    			set .@size, .@size+2;
    		}
    		return;
    	}
    
    	function AddHunting{
    		set .huntingquestcount,.huntingquestcount+1;
    		setd ("." +.huntingquestcount+"_huntingname$", getarg(0));
    		setd ("." +.huntingquestcount+"_huntingmin", getarg(1));
    		setd ("." +.huntingquestcount+"_huntingmax", getarg(2));
    		setd ("." +.huntingquestcount+"_huntingprize", getarg(3));
    		setd ("." +.huntingquestcount+"_huntingamount", getarg(4));
    		setd ("." +.huntingquestcount+"_huntingzeny", getarg(5));
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
    		set .@argcount, 6;
    		setd ("." +.huntingquestcount+"_huntingexp["+.@size+"]",getarg(.@argcount));
    		setd ("." +.huntingquestcount+"_huntingexp["+(.@size+1)+"]",getarg(.@argcount+1)); 
    		set .@argcount, .@argcount+2;
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
    		while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1){
    			setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); 
    			setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
    			set .@argcount, .@argcount+2;
    			set .@size, .@size+2;
    		}
    		return;
    	}
    }

     

  13. How can I add an anti spam on disguise event ?? after 2 consecutive try the player will set to mute until the round ends ? thanks

    //===== rAthena Script =======================================
    //= Disguise Event
    //===== By: ==================================================
    //= GmOcean
    //===== Current Version: =====================================
    //= 5.1
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Guess a monster name correctly for prizes.
    //= 
    //= NOTE: Requires PCRE library installed.
    //===== Additional Comments: =================================
    //= 5.0 Last update by GmOcean.
    //= 5.1 Cleaned and standardized, mostly. [Euphy]
    //============================================================
    
    prontera,160,155,4	script	Disguise Event	795,{
    
    	// Currently set to run every two hours.
    	// To change times, edit the OnClock labels below.
    
    	set .@GMLevel,60;	// GM level required to access NPC.
    	set .@n$,"[^0000FFDisguise NPC^000000]";
    
    	if (getgmlevel()>=.@GMLevel) {
    		mes .@n$;
    		mes "Select an option.";
    		next;
    		switch(select("Turn ON/OFF Event:Event Settings")) {
    		case 1:
    			mes .@n$;
    			if (.EventON) {
    				mes "The Event is currently: [^0000FFON^000000]";
    				mes "Would you like to turn it OFF?";
    			} else {
    				mes "The Event is currently: [^FF0000OFF^000000]";
    				mes "Would you like to turn it ON?";
    			}
    			if(select("Yes:No")==2) close;
    			if (.EventON) {
    				set .EventON,0; set .Timer,0;
    				setnpctimer 0; stopnpctimer;
    				announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue;
    				deletepset 1;
    				setnpcdisplay "Disguise Event",795;
    				close;
    			}
    			set .EventON,1; set .Timer,1; setnpctimer 0; initnpctimer;
    			set .ResetCounter,.ResetCounter+1;
    			announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue;
    			announce "The Event is being held in Prontera.",bc_all | bc_blue;
    			close;
    		case 2:
    			mes .@n$;
    			mes "Pick a setting to modify.";
    			next;
    			switch(select("Monster Display:Number of Rounds:Prize Settings")) {
    			case 1:
    				setarray .@r$[0],"Disguise as all monsters.","Disguise as MVPs only.";
    				mes .@n$;
    				mes "Choose a disguise rule.";
    				next;
    				set .Rule, select(implode(.@r$,":"));
    				mes .@n$;
    				mes "The Disguise Rule has been set:";
    				mes "  > ^0055FF"+.@r$[.Rule-1]+"^000000";
    				close;
    			case 2:
    				mes .@n$;
    				mes "Input the number of rounds you want the event to last.";
    				mes "Current number: [^0000FF"+.Rounds+"^000000]";
    				next;
    				input .@Rounds;
    				set .Rounds,.@Rounds;
    				mes .@n$;
    				mes "The number of rounds has been changed to "+.Rounds+".";
    				close;
    			case 3:
    				mes .@n$;
    				mes "Input the Item ID of the prize given each round.";
    				mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")";
    				next;
    				input .@Prize;
    				mes .@n$;
    				if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") {
    					mes "That item does not exist. Please try again.";
    					close;
    				}
    				set .Prize,.@Prize;
    				mes "Input the amount to be given.";
    				next;
    				input .@amount;
    				mes .@n$;
    				if (.@amount<=0 || .@amount>=10000) {
    					mes "That amount is invalid. Using default amount of 1.";
    					set .@amount,1;
    					next;
    					mes .@n$;
    				}
    				set .PrizeAmt,.@amount;
    				mes "The Prize has been changed successfully.";
    				mes "Prize: "+.PrizeAmt+"x [^0000FF"+getitemname(.Prize)+"^000000]";
    				close;
    			}
    		}
    	}
    	if (.EventON) end;
    	mes .@n$;
    	mes "Welcome.";
    	mes "How may I be of assistance?";
    	if(select("Information:Nothing, just passing through.")==2) close;
    	next;
    	mes .@n$;
    	mes "This event is quite simple.";
    	mes "At the start of the event, I will";
    	mes "disguise myself as a random";
    	mes "monster. You have to shout";
    	mes "that monster's name out loud.";
    	next;
    	mes "If you are correct, you will receive";
    	mes "a prize. If not, keep trying!";
    	mes "That's all that there is to this event.";
    	close;
    
    OnInit:
    	set .EventON,0;
    	set .Wait,0;
    	set .Winner,0;
    	set .ResetCounter,0;
    	set .Rounds,10;
    	set .Prize,512;
    	set .PrizeAmt,1;
    	set .Rule,1;
    	setarray .MVP[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,
    	                  1389,1399,1418,1492,1502,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688,
    				   1708,1719,1734,1751,1768,1779,1785,1802,1832,1871,1874,1885,1917,1980,2022,2068,2087,2131,
    				   2156,2165;
    	set .BlackList$, "1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168," + 
    	    "1171,1172,1173,1181,1187,1210,1217,1218,1222,1223,1224,1225,1226,1227,1228," + 
    	    "1233,1284,1407,1411,1414,1495,1501,1900,1996,2000,2001,2002,2003,2004," + 
    	    "2005,2006,2007,2011,2012,2025,2028,2029,2030,2031,2032,2033,2034,2035," + 
    	    "2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049," + 
    	    "2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063," + 
    	    "2064,2065,2066,2067,2075,2076,2077,2078,2079,2080,2081,2083,2084,2085," + 
    	    "2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099," + 
    	    "2100,2101,2012,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113," + 
    	    "2114,2115,2116,2117,2118,2119,2120,2121,2123,2124,2125,1496,";
    	end;
    OnClock0000:
    OnClock0200:
    OnClock0400:
    OnClock0600:
    OnClock0800:
    OnClock1000:
    OnClock1200:
    OnClock1400:
    OnClock1600:
    OnClock1800:
    OnClock2000:
    OnClock2200:
    	set .ResetCounter,.ResetCounter+1;
    	set .EventON,1;
    	set .Timer,1;
    	set .Wait,1;
    	announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue;
    	announce "The Event is being held in Prontera.",bc_all | bc_blue;
    	setnpctimer 0;
    	initnpctimer;
    	end;
    OnTimer10000:
    	if (.Timer || .Change) end;
    	set .Wait,0;
    	goto iDisguise;
    	end;
    OnTimer30000:
    	if (.Timer) end;
    	set .Change,0;
    	setnpcdisplay "Disguise Event",795;
    	npctalk "Disguise Event : You took too long to guess what I was. Please wait 10 seconds while I disguise again.";
    	specialeffect EF_DETECT2;
    	set $MonsterName$,"";
    	deletepset 1;
    	stopnpctimer;
    	setnpctimer 0;
    	initnpctimer;
    	end;
    OnTimer60000:
    	if (.Timer!=1) end;
    	announce "The Disguise Event will begin in 2 minutes.",bc_all | bc_blue;
    	announce "The Event is being held in Prontera.",bc_all | bc_blue;
    	end;
    OnTimer120000:
    	if (.Timer!=1) end;
    	announce "The Disguise Event will begin 1 minute.",bc_all | bc_blue;
    	announce "The Event is being held in Prontera.",bc_all | bc_blue;
    	end;
    OnTimer180000:
    	if (.Timer!=1) end;
    	announce "The Disguise Event has begun!",bc_all | bc_blue;
    	announce "The Event is being held in Prontera.",bc_all | bc_blue;
    	set .Timer,0; stopnpctimer;
    	setnpctimer 0; initnpctimer;
    iDisguise:
    	if (.Rule==1) {
    		set .Winner,0;
    		set .Monster,1000+rand(1,995);
    		if (compare(","+.BlackList$+"," , ","+.Monster+",")) goto iDisguise;
    		if (.Monster==.LastMonster) goto iDisguise;
    		set .LastMonster,.Monster;
    		set $MonsterName$,getmonsterinfo(.Monster,0);
    	}
    	if (.Rule==2) {
    		set .Winner,0;
    		set .Monster,rand(49);
    		set $MonsterName$,getmonsterinfo(.MVP[.Monster],0);
    	}
    	deletepset 1;
    	defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".*", "iCorrect";
    	activatepset 1;
    	if (.Rule==1) setnpcdisplay "Disguise Event",.Monster;
    	if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.Monster];
    	set .Change,1;
    	setnpctimer 0;
    	end;
    iCorrect:
    	if (.Winner) {
    		dispbottom "Someone has already won this round.";
    		end;
    	}
    	set .Winner,1;
    	set .RoundCount,.RoundCount+1;
    	deletepset 1;
    	activatepset 1;
    	getitem .Prize,.PrizeAmt;
    	announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue;
    	if (.RoundCount>=.Rounds) {
    		setnpcdisplay "Disguise Event",795;
    		set .RoundCount,0; set .Change,0; set .EventON,0;
    		setnpctimer 0; stopnpctimer;
    		npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";
    		end;
    	}
    	setnpcdisplay "Disguise Event",795;
    	set .Change,0;
    	setnpctimer 0;
    	end;
    }

     

  14. Hi is it possible to open a shop by clicking the item link in 2015 client ?? this one has navigation script ..if yes,How ?.thanks

    	[6697] = {
    		unidentifiedDisplayName = "Costume Exchange Coupon",
    		unidentifiedResourceName = "°í±ÞƼÄÏ_º¸¶ó",
    		unidentifiedDescriptionName = { "" },
    		identifiedDisplayName = "Costume Exchange Coupon",
    		identifiedResourceName = "°í±ÞƼÄÏ_º¸¶ó",
    		identifiedDescriptionName = {
    			"A coupon that can be used to exchange existing headgear into costume.",
    			"<NAVI>^0033CCEve Patterson^000000<INFO>mal_in01,11,110,0,100,0,0</INFO></NAVI>",
    			"^0000CCWeight:^000000 1"
    		},

     

  15. On 5/25/2020 at 8:06 PM, kodkodkub said:

    It should be in msgstringtable.txt too..

    i found it its on texture not msgstringtable ..but the C is not yet thanks

     

    Hi I'm using @anacondaq's src mod in which I can use item as currency on my cashshop .. the thing is ,I want to ask how to change the Currency symbol from C to other ..and how to show my remaining item lets say Proof of donation .I has to show Your remaining PODS are : ##### Proof of donation ... Thanks 

    Untitled.png

×
×
  • Create New...