Jump to content

Brynner

Members
  • Posts

    1979
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by Brynner

  1. if you open that box. it will ask you which item class you want to get.

     

    choices.

     

    Swordsman

    Magician

    Archer

    Acolyte

    Merchant

    Thief

     

    for Swordsman.

    you'll get +7 Formal suit, +7 boots, +7 manteau, +7 shield.

    for Magician

    you'll get +7 Formal suit, +7 shoes, +7 muffler, +7 guard.

    for Archer

    you'll get +7 Formal suit, +7 boots, +7 muffler, +7 guard.

    for Merchant

    you'll get +7 Formal suit, +7 boots, +7 manteau, +7 buckler.

    for Thief

    you'll get +7 Formal suit, +7 boots, +7 manteau, +7 buckler.

     

    thanks in advance.

  2. i just want this +6 Armor Refine Ticket will be usable. if you use it. it will ask you which item you want to safe refine. after you choose it will refine it to +6 without failed. it will consume the +6 Armor Refine Ticket if it was successfully refine. thanks in advance.

    Item ID# 6235 (Guarantee_Armor_6Up)

  3. how to make this lotti girl announcer will announce only if you get item below 10%. and it will not announce the default reward item.

     

    	mes "[Lotti Girl]";
    	mes "It costs "+.Price+" Zeny to play.";
    	if (Zeny < .Price) close;
    	next;
    	if(select("Deal me in!:No way...")==2) close;
    	mes "[Lotti Girl]";
    	mes "Here we go...";
    	progressbar "",2;
    	set Zeny, Zeny-.Price;
    	set .@i, rand(1,.Total);
    	if (rand(1,100) > getd(".P"+.@i+"[0]")) {
    		for(set .@j,0; .@j<getarraysize(.Default); set .@j,.@j+2) {
    			getitem .Default[.@j], .Default[.@j+1];
    			if (!.@k[0]) setarray .@k[0], .Default[.@j], .Default[.@j+1]; } }
    	else {
    		for(set .@j,1; .@j<getarraysize(getd(".P"+.@i)); set .@j,.@j+2) {
    			getitem getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]");
    			if (!.@k[0]) setarray .@k[0], getd(".P"+.@i+"["+.@j+"]"), getd(".P"+.@i+"["+(.@j+1)+"]"); } }
    	announce "Congratulations to "+strcharinfo(0)+" for getting "+.@k[1]+"x "+getitemname(.@k[0])+"!",0;
    	specialeffect2 248;
    	close;
    

     

  4. im using tr0n's Questboard [1.4.4]

    //===== rAthena Script =======================================
    //= tr0n's Questboard
    //===== By: ==================================================
    //= tr0n
    //===== Current Version: =====================================
    //= 1.4.4
    //===== Compatible With: ===================================== 
    //= rAthena SVN
    //===== Description: =========================================
    //= Easily add collection and hunting quests.
    //===== Additional Comments: =================================  
    // 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
    //============================================================
    
    prontera,129,215,5	script	Questboard	857,{
    		
    	if(c_run==1){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + currentquest$ + "_collectionname$")+"^000000";
    		mes "--------------------------------";
    		for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_collectionitem")); 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, 0;
    			close;
    		}
    		goto L_checkitems;
    	}
    	
    	if(h_run==1){
    		mes "[^FF7700Questboard^000000]";
    		mes "^0000FF"+getd("." + currentquest$ + "_huntingname$")+"^000000";
    		mes "--------------------------------";
    		for( set .@j, 0; .@j < getarraysize(getd("."+ currentquest$ + "_huntingmob")); 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 < getarraysize(getd("."+currentquest$+"_huntingmob")); set .@x,.@x+2){
    				set .@currentmob, getd("."+currentquest$+"_huntingmob["+(.@x-1)+"]");
    				setd(currentquest$+"_"+.@currentmob+"_"+.@x+"_killcount", 0);
    			}
    			set currentquest$, "";
    			set h_run, 0;
    			close;
    		}
    		goto L_checkmobs;
    	}
    		
    L_questmenu:
    	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(gettimetick(2) < getd(.@selection + "_collection_delay")){
    		set .@time_left, getd(.@selection + "_collection_delay")-gettimetick(2);
    		mes "[^FF7700Questboard^000000]";
    		if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
    		if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
    		mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
    		close;
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "^0000FF"+getd("." + .@selection + "_collectionname$")+"^000000";
    	mes "--------------------------------";
    	for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_collectionitem")); 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, 1;
    		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(gettimetick(2) < getd(.@selection + "_hunting_delay")){
    		set .@time_left, getd(.@selection + "_hunting_delay")-gettimetick(2);
    		mes "[^FF7700Questboard^000000]";
    		if(.@time_left < 60) mes "You have to wait ^0000FF"+.@time_left+" seconds^000000 to do this quest again.";
    		if(.@time_left < 3600) mes "You have to wait ^0000FF"+.@time_left/60+" minutes^000000 to do this quest again.";
    		mes "You have to wait ^0000FF"+.@time_left/60/60+" hours^000000 to do this quest again.";
    		close;
    	}
    	mes "[^FF7700Questboard^000000]";
    	mes "^0000FF"+getd("." + .@selection + "_huntingname$")+"^000000";
    	mes "--------------------------------";
    	for( set .@j, 0; .@j < getarraysize(getd("."+ .@selection + "_huntingmob")); 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, 1;
    		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:
    	for( set .@k,0; .@k < getarraysize(getd("."+currentquest$+"_collectionitem")); set .@k,.@k+2) {
    		if(countitem(getd("."+currentquest$+"_collectionitem["+.@k+"]"))>=getd("."+currentquest$+"_collectionitem["+(.@k+1)+"]")){
    			set .@checkitem,.@checkitem+2;
    		}
    	}
    	if(.@checkitem<getarraysize(getd("."+currentquest$+"_collectionitem"))){
    		mes "[^FF7700Questboard^000000]";
    		mes "You don't have everything.";
    		close;
    	}
    	for( set .@delcount,0; .@delcount < getarraysize(getd("."+currentquest$+"_collectionitem")); 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;
    	set currentquest$, "";
    	set c_run, 0;
    	close;
    	
    L_checkmobs:
    	set .@goal, (getarraysize(getd("."+currentquest$+"_huntingmob"))/2);
    	for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); 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.";
    	for(set .@x, 1; .@x < getarraysize(getd("."+currentquest$+"_huntingmob")); 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;
    	set currentquest$, "";
    	set h_run, 0;
    	close;
    
    OnNPCKillEvent:
    	if(h_run!=1) end;
    	for(set .@i, 1; .@i < getarraysize(getd("."+currentquest$+"_huntingmob")); 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+"]")) end;
    			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+"]")+")";
    			end;
    		}
    		continue;
    	}
    	end;
    	
    OnInit:
    
    	function AddCollection;
    	function AddHunting;
    
    	//Activate/Deactive quest categories here
    	set .collection, 1;
    	set .hunting, 1;
    	
    	//Quest Delay (seconds)
    	//24 hours = 86400 seconds
    	set .quest_delay, 0;
    	
    	//Checks if quests are loaded (prevents out of index)
    	if(.questsloaded==1) end;
    		set .questsloaded, 1;
    		
    		//Add Collection Quests here
    		//AddCollection("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
    		
    		
    		//Add Hunting Quests here
    		//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;
    	while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) {
    		set .@size, getarraysize(getd("."+ .collectionquestcount + "_collectionitem"));
    		setd ("."+.collectionquestcount+"_collectionitem["+.@size+"]",getarg(.@argcount)); 
    		setd ("."+.collectionquestcount+"_collectionitem["+(.@size+1)+"]",getarg(.@argcount+1));
    		set .@argcount,.@argcount+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;
    	while(getarg(.@argcount,-1)!=-1 && getarg(.@argcount+1,-1)!=-1) {
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingmob"));
    		setd ("."+.huntingquestcount+"_huntingmob["+.@size+"]",getarg(.@argcount)); 
    		setd ("."+.huntingquestcount+"_huntingmob["+(.@size+1)+"]",getarg(.@argcount+1));
    		set .@argcount, .@argcount+2;
    	}
    	return;
    }
    } 

     

    but the reward item is only one.

     

    i just want to make it two reward item.

     

    just like 10 Yggdrasil Berry and 10 Yggdrasil Seed.

     

    thanks in advance.

  5. @ajaxtrix

    it's because you enabled these  commands to your players to use it.

    by default the script will work just fine if you had not enabled these command which lead to exploit npc scripts.

    either you remove the command...or you have to disable the command...

     

    @Brynner

    Pet Egg required the char-server to save the data each time you gained 1 pet egg.

    at any normal circumstance, the getitem cant really work for Pet egg if you are giving out multiple pet egg, this is because char-server need time to save the data.

    temporary you can fix it by using this

    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1){
    	getitem @bought_nameid[@i],@bought_quantity[@i];
    	sleep2 1;   // add this.  increase to longer if needed.
    }
    

    add a sleep2 right after the getitem command.

     

     

     

    ***ermmm..probably time to do some update on the script to 7.0 version...***

    thanks it works now.

  6.  

    Yeehaaaa...!!!!... i was having a school short semester break right now.....xD

    Previously,...my laptop was damaged....so not much stuffs has been done ...>.< anyway.....during my break time....i was still able to fix some script of mine...using my old test server... ( eAthena Beginner v4 ) LOL.....>.<

    so here is the good news...xD


    [ Update ] : Modified Multi Currency Shop Script :

    Description :

    It is a Simple Shop take use Item Currency to Buy items. It Support Multiple Shop in 1 NPC. This Script is based on the Idea of those other TCG / POD / etc Shop that users keep requesting.

    The only different is, this Script only use 1 NPC + 1 Shop ( Invinsible ) NPC to settle all your Problems.

    Of Course, that this script can fulfill certain User Request like ,

    "Please help me create a Custom Dynamic Shop with Multiple Menu ."..

    "How to create a Shop that Sell item using 'CustomPoints' ?"

    You can add around ~128 Shop in this NPC. Add the Shop Selection at the Menu / New Cases for each of it.

    but i think the limit for a Shop Window is just around 100 normally...

    Simple Explaination :

    A Script that allow setup several Shop that using Different Items as Currency to buy Items for the Corresponding Shop...

    Possible Currency...

    • Item ID ( TCG , Proof Of Donation , etc... )
    • Variable ( Zeny , #CASHPOINTS , CustomPoints , etc... )


    Script Configurations

    you only need to edit this part...the rest....left it alone if you dont know what it does...

     

    switch( getarg(0) ){
      Case 1:
       // Currency [ Item ID / Variable Name ]
       set @Currency$,"7227";
       // Item ID Lists
       setarray @ItemLists[0],2301,2302,2303,2304,2305,2306;
       // Item Price
       setarray @ItemCost[0],1,2,3,4,5,6;
       break;
      Case 2:
       // Currency [ Item ID / Variable Name ]
       set @Currency$,"Zeny";
       // Item ID Lists
       setarray @ItemLists[0],2306,2302,2303,2304,2305,2301;
       // Item Price
       setarray @ItemCost[0],2,2,3,4,5,6;
       break;
      Case 3:
       // Currency [ Item ID / Variable Name ]
       set @Currency$,"#CASHPOINTS";
       // Item ID Lists
       setarray @ItemLists[0],2306,2302,2303,2304,2305,2301;
       // Item Price
       setarray @ItemCost[0],20,22,34,445,52,641;
       break;
      // Case 4,5,6.....etc...
      default:
       ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );
       close;
    }
    
    

    the Item Listing and Pricing...as usual...do the same...just list down the itemID and price for each of them...

    however....the new updated things in Version 5 - Currency Settings...

    and i also added some error message for making debug problem easier whenever there is misconfiguration in the settings...

    bug that listed before..should be able to fixed right now..

    Possible Currency...

    • Item ID ( TCG , Proof Of Donation , etc... )
    • Variable ( Zeny , #CASHPOINTS , CustomPoints , etc... )

    Example :

     

    // Use Variable as Currency
    set @Currency$,"Zeny"; - Use Zeny
    set @Currency$,"#CASHPOINTS"; - Use CashPoints
    set @Currency$,"#KAFRAPOINTS"; - Use KafraPoints
    // Use Item as Currency
    set @Currency$,"7539"; - Use Poring Coin
    set @Currency$,"909"; - Use Jellopy
    set @Currency$,"607"; - Use Yggdrasilberry

    but no matter the currency is Number or Name of variable....you have to write it within the ( " " ) Quotation marks....


    Multi Currency Shop [ Version 5 ]

    Changelog :

    • [ Version 1 ] - Simple Shop Based Currency Shop.
    • [ Version 2 ] - Support Multiple Different Currency Shop in 1 NPC.
    • [ Version 3 ] - Fixed Repeating Items Lists Problem.
    • [ Version 4 ] - Fixed Items Purchasing Bug and Problems.
    • [ Version 5 ] - Fixed Bug , Updated with Various Variable as Currencies , Re-Organized Scripts

    Scripts : View Download

    Please let me know if there is any problems. As well as any Suggestion to Improve it.

    there is a bug in here.

    i put a egg on it. then use silver coin as a required payment. example.

    i buy poring egg, drops egg and dokebi egg at the same time.

    poring,drops and dokebi cost 30 silver coin each.

    after you purchase them. it will only give you dokebi egg. but you got decrease for 2 eggs that you buy but it is not on your inventory.

    screen_Hercules004.jpgscreen_Hercules005.jpgscreen_Hercules006.jpgscreen_Hercules007.jpgscreen_Hercules008.jpg

  7.  

    any progress for this project?this topic is started since 03 August 2012. it's already 01 June 2013.

     

     

    Feel free to help... And it is not like I haven't done any commits since then.

     

    Also, the one of the main things I am lacking is actual data. I do not host a server so I do not have data to test if code changed will affect live servers. If anyone is willing to contribute their data, that would be great. I can create a PHP script that will remove sensitive information such as passwords and emails if anyone is interested.

    Xan you rock with this theme, sorry if i didnt read anything what people say, but is it released already sorry i dont know .

    i think this project is not started yet.

  8.  

    @Brynner

    So, cash button dosnt work anymore?

    Do you know one more way to do?

    yup its because rAthena drop a support for 2012 Ragexe Clients. that's why it will no longer work.

     

    the last supported version of this patch is r17435

    I wish u could help me in this..

    Sorry to redirect you,

    http://hercules.ws/board/topic/2374-i-wish-someone-would-give-a-client-like-brynner-did/

    this client version is compatible with hercules emulator. but you must disable the anti wpe features of the server to make it work. or else it will not work.

  9. there is another issue. if you last warp. it will bring you to town menu.

     

    and if you choose cancel. you'll get this issue.

     

    [Debug]: npc_scriptcont: 'Unknown NPC' (sd->npc_id=0) is not Warper#1 (id=110070
    739).
    


    thanks this things works. but i need to remove the { }.



    the only problem is on the guild castle entrance warp. is there any posible way to make a new mapflag like mf_gvg_castle_entrance?

     

    so i can indicate those 4 maps for castle entrance only?

  10. if( getmapflag( lastwarp$,mf_town ) || getmapflag( lastwarp$,mf_gvg_castle ) )
    

    not working for guild castle warp.

     

    and also i got this. when you created character use warper npc and choose last warp. this thing appears.

     

    [Debug]: mapindex_name2id: Map "" not found in index list!
    [Debug]: mapindex_name2id: Map "" not found in index list!
    [Error]: script:op_2: invalid data for operator C_LOR
    [Debug]: Data: number value=0
    [Debug]: Data: C_ARG
    [Debug]: Source (NPC): Warper#1 at prontera (161,193)
    
  11. i just want to enable last warp will be random if you warp on a field or dungeons. and if you last warp for towns or guild warp it will warp you on the default last warp function?

     

    example.

     

    if i use last warp for fields on dungeons.

     

    warp lastwarp$,0,0;

     

    but if i last warp for towns of guild castles.

    warp lastwarp$,lastwarpx,lastwarpy;

     

    thanks in advance.



    just like this script. it will warp you on a random cell if you last warp for field and dungeons map. but if you warp for towns it will warp you on same cell.

     

    // By [Gm]Xeon.
    
    //	Features:
    //Warp to fields, dungeons and towns
    //Charge fees to warp to fields/dungeons/towns, and can set the fee increase per level for dungeons
    //Require the user to have visited the specific place before they can warp there
    //Remember the list of recent warps
    
    //Future Ideas: Map warp by map name, saved favorites list
    
    -	script	Warp Agent#Base::warpra	859,{
    	mes "[Warper]";
    	mes "Hello, where can i take you?";
    	next;
    L_Main:
    	set @recent, 0;
    	set @temp$, "";
    	for (set @i, 0; @i < getarraysize($@qw_fullnames$); set @i, @i+1) {
    		set @temp$, @temp$+((@i>0)?":":"")+$@qw_fullnames$[@i];
    	}
    	menu @temp$,-,"Recent",L_Recent,"Exit",L_Exit;
    	set @type$, $@qw_shortnames$[@menu-1];
    	goto L_Sel;
    L_Recent:
    	if (!$@qw_recent_list) {
    		mes "[Warper]";
    		mes "Recent warps is currently disabled!";
    		next;
    		goto L_Main;
    	}
    	set @temp$, "";
    	for (set @i, 0; @i < $@qw_recent_list; set @i, @i+1) {
    		if (getd("#qw_recent_type_"+@i+"$") != "") set @temp$, @temp$+((@i>0)?":":"")+getd("#qw_recent_type_"+@i+"$")+"->"+getd("$@qw_"+getd("#qw_recent_type_"+@i+"$")+"_names$["+getd("#qw_recent_sel1_"+@i)+"]")+((getd("$@qw_"+getd("#qw_recent_type_"+@i+"$")+"_levels"))?"->"+(getd("#qw_recent_sel2_"+@i)+1):"");
    	}
    	menu @temp$,-,"^000000Back",L_Main;
    	set @type$, getd("#qw_recent_type_"+(@menu-1)+"$");
    	if (@type$ == "") goto L_Recent;
    	set @sel1, getd("#qw_recent_sel1_"+(@menu-1));
    	set @sel2, getd("#qw_recent_sel2_"+(@menu-1));
    	set @recent, 1;
    L_Sel:
    	if (!getd("$@qw_"+@type$+"_enable")) {
    		mes "[Warper]";
    		mes "Sorry, warping to "+@type$+" is currently disabled!";
    		next;
    		goto L_Main;
    	}
    L_FirstSel:
    	if (!@recent) {
    		set @temp$, "";
    		for (set @i, 0; @i < getd("$@qw_"+@type$+"_size"); set @i, @i+1) { set @sel1, @i; set @temp$, @temp$+((@i>0)?":":"")+((getd("$@qw_"+@type$+"_levels"))?"":((callsub(S_CheckAccessed,0) || !getd("$@qw_"+@type$+"_quest"))?"^339900":"^FF0000"))+getd("$@qw_"+@type$+"_names$["+@i+"]"); }
    		menu @temp$,-,"Back",L_Main;
    		set @sel1, @menu-1;
    	}
    L_SecondSel:
    	if (getd("$@qw_"+@type$+"_levels")&&!@recent) {
    		set @temp$, "";
    		for (set @i, 0; @i < getd("$@qw_"+@type$+"_count["+@sel1+"]"); set @i, @i+1) {
    			set @temp$, @temp$+((@i>0)?":":"")+((callsub(S_CheckAccessed,@i) || !getd("$@qw_"+@type$+"_quest"))?"^339900":"^FF0000")+getd("$@qw_"+@type$+"_names$["+@sel1+"]")+" "+(@i+1);
    		}
    		if (getd("$@qw_"+@type$+"_fee") > 0 || getd("$@qw_"+@type$+"_feelv") > 0) dispbottom "Current fee system: "+getd("$@qw_"+@type$+"_fee")+" initial"+((@type$=="dungeons")?", "+getd("$@qw_"+@type$+"_feelv")+" per floor.":".");
    		menu @temp$,-,"^000000Back",L_FirstSel;
    		set @sel2, @menu-1;
    	}
    	if (getd("$@qw_"+@type$+"_quest") && !callsub(S_CheckAccessed,@sel2)) { //Quest warp achieved
    		mes "[Warper]";
    		mes "You must first have visited this area to be able to warp there!";
    		next;
    		if (@recent) goto L_Main;
    		if (!getd("$@qw_"+@type$+"_levels")) { goto L_FirstSel; } else { goto L_SecondSel; }
    	}
    	set @fee, getd("$@qw_"+@type$+"_fee")+((@type$=="dungeons"&&sel2>0)?getd("$@qw_"+@type$+"_feelv")*sel2:0);
    	if (Zeny < @fee) {
    		mes "[Warper]";
    		mes "You don't have enough zeny!";
    		mes "You need: "+@fee+" zeny!";
    		next;
    		if (@recent) goto L_Main;
    		if (!getd("$@qw_"+@type$+"_levels")) { goto L_FirstSel; } else { goto L_SecondSel; }
    	}
    	set @x, 0; set @y, 0;
    	if (getd("$@qw_"+@type$+"_coords")) {
    		set @x, getd("$@qw_"+@type$+"_x["+@sel1+"]");
    		set @y, getd("$@qw_"+@type$+"_y["+@sel1+"]");
    	}
    	if (getd("$@qw_"+@type$+"_fee") > 0 || getd("$@qw_"+@type$+"_feelv") > 0) set Zeny, Zeny-@fee;
    	if (!@recent) {
    		for (set @i, $@qw_recent_list-1; @i > 0; set @i, @i-1) {
    			setd("#qw_recent_type_"+@i+"$", getd("#qw_recent_type_"+(@i-1)+"$")); setd("#qw_recent_sel1_"+@i, getd("#qw_recent_sel1_"+(@i-1))); setd("#qw_recent_sel2"+@i, getd("#qw_recent_sel2_"+(@i-1)));
    		}
    		set #qw_recent_type_0$, @type$; set #qw_recent_sel1_0, @sel1; set #qw_recent_sel2_0, @sel2;
    	}
    	warp getd("$@qw_"+@type$+"_prefix$["+@sel1+"]")+((getd("$@qw_"+@type$+"_mode["+@sel1+"]")<2&&getd("$@qw_"+@type$+"_levels"))?((getd("$@qw_"+@type$+"_count["+@sel1+"]")>9)?((@sel2<9)?"0":""):"")+(@sel2+getd("$@qw_"+@type$+"_mode["+@sel1+"]")):""),@x,@y;
    	close;
    
    S_CheckAccessed:
    	return getd("#qw_accessed_"+getd("$@qw_"+@type$+"_prefix$["+@sel1+"]")+((getd("$@qw_"+@type$+"_mode["+@sel1+"]")<2&&getd("$@qw_"+@type$+"_levels"))?((getd("$@qw_"+@type$+"_count["+@sel1+"]")>9)?((getarg(0)<9)?"0":""):"")+(getarg(0)+getd("$@qw_"+@type$+"_mode["+@sel1+"]")):""));
    
    L_Exit:
    	close;
    
    OnPCLoadMapEvent:
    	getmapxy(@map$,@ignore,@ignore,0);
    	setd("#qw_accessed_"+@map$,1);
    	end;
    
    OnInit:
    	if (strnpcinfo(2)!="Base") end;
    	//Note: X mode (map name ending), 0=starts at 0, 1=starts at 1, 2=no ending
    	//#qw_accessed_MAPNAME is a boolean of whether they visited the specified map...
    
    	set $@qw_recent_list, 3;
    	setarray $@qw_fullnames$[0], "Fields", "Dungeons", "Towns";
    	setarray $@qw_shortnames$[0], "fields", "dungeons", "towns";
    
    	set $@qw_fields_enable, 1;
    	set $@qw_fields_quest, 0;
    	set $@qw_fields_fee, 0;
    	set $@qw_fields_feelv, 0;
    	setarray $@qw_fields_names$[0], "Aldebaran", "Amatsu", "Ayoyatha", "Comodo", "Einbroch", "Geffen", "Gonryun", "Hugel", "Jawaii", "Lighthalzen", "Louyang", "Morocc", "Nameless Island", "Niflheim", "Odin Temple", "Payon", "Prontera", "Rachel", "Umbala", "Veins", "Yuno";
    	setarray $@qw_fields_prefix$[0], "mjolnir_", "ama_fild01", "ayo_fild0", "cmd_fild0", "ein_fild", "gef_fild", "gon_fild01", "hu_fild0", "jawaii", "lhz_fild0", "lou_fild01", "moc_fild", "nameless_n", "nif_fild0", "odin_tem0", "pay_fild", "prt_fild", "ra_fild", "um_fild0", "ve_fild0", "yuno_fild";
    	setarray $@qw_fields_count[0], 12, 1, 2, 9, 10, 14, 1, 7, 1, 3, 1, 22, 1, 2, 3, 11, 11, 13, 4, 7, 12; //Check if > 10, if so then add 0 in front of map end if < 9
    	setarray $@qw_fields_mode[0], 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1;
    	set $@qw_fields_size, getarraysize($@qw_fields_names$);
    	set $@qw_fields_coords, 0;
    	set $@qw_fields_levels, 1;
    
    	// (Cut out beach dungeon, glast heim and Dimensional Gorge)
    	set $@qw_dungeons_enable, 1;
    	set $@qw_dungeons_quest, 0;
    	set $@qw_dungeons_fee, 0;
    	set $@qw_dungeons_feelv, 0;
    	setarray $@qw_dungeons_names$[0], "Abbey, Cursed Monastery", "Abyss Lakes", "Amatsu Lakes", "Anthell", "Ayoyatha Dungeons", "Byalan Dungeon", "Clock Tower", "Coal Mines", "Culverts", "Einbroch Dungeons", "Gefenia", "Geffen Dungeon", "Gonryun Dungeon", "Hidden Dungeon", "Ice Dungeon", "Juperos Dungeon", "Juperos Core", "Kiel Dungeon", "Lighthalzen", "Louyang Dungeons", "Magma Dungeon", "Orc Dungeon", "Payon Dungeon", "Pyramids", "Rachel Sanctuary", "Sphinx", "Sunken Ship", "Thanatos Tower", "Thor Volcano", "Toy Factory", "Turtle Dungeon", "Umbala Dungeon", "Moscovia Dungeon";
    	setarray $@qw_dungeons_prefix$[0], "abbey0", "abyss_0", "ama_dun0", "anthell0", "ayo_dun0", "iz_dun0", "c_tower", "mjo_dun0", "prt_sewb", "ein_dun0", "gefenia0", "gef_dun0", "gon_dun0", "prt_maze0", "ice_dun0", "juperos_0", "jupe_core", "kh_dun0", "lhz_dun0", "lou_dun0", "mag_dun0", "orcsdun0", "pay_dun0", "moc_pryd0", "ra_san0", "in_sphinx", "treasure0", "tha_t", "thor_v0", "xmas_dun0", "tur_dun0", "um_dun0", "mosk_dun0";
    	setarray $@qw_dungeons_count[0], 3, 3, 3, 2, 2, 5, 4, 3, 4, 2, 4, 4, 3, 3, 4, 2, 1, 2, 3, 3, 2, 2, 5, 6, 5, 5, 2, 12, 3, 2, 4, 2, 3;
    	setarray $@qw_dungeons_mode[0], 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
    	set $@qw_dungeons_size, getarraysize($@qw_dungeons_names$);
    	set $@qw_dungeons_coords, 0;
    	set $@qw_dungeons_levels, 1;
    
    	set $@qw_towns_enable, 1;
    	set $@qw_towns_quest, 0;
    	set $@qw_towns_fee, 0;
    	set $@qw_towns_feelv, 0;
    	setarray $@qw_towns_names$[0], "Alberta", "Aldebaran", "Amatsu", "Ayothaya", "Comodo", "Einbroch", "Einbech", "Geffen", "Gonryun", "Hugel", "Izlude", "Lighthalzen", "Louyang",  "Morocc", "Prontera", "Payon", "Umbala", "Lutie", "Yuno";
    	setarray $@qw_towns_prefix$[0], "alberta", "aldebaran", "amatsu", "ayothaya", "comodo", "einbroch", "einbech", "geffen", "gonryun", "hugel", "izlude", "lighthalzen", "louyang", "morocc", "prontera", "payon", "umbala", "xmas", "yuno";
    	setarray $@qw_towns_x[0], 27, 145, 197, 149, 188, 64, 70, 119, 150, 96, 128, 158, 210, 159, 156, 152, 130, 148, 160;
    	setarray $@qw_towns_y[0], 236, 120, 86, 118, 161, 200, 95, 66, 130, 145, 111, 92, 108, 93, 191, 75, 130, 131, 168;
    	set $@qw_towns_size, getarraysize($@qw_towns_names$);
    	set $@qw_towns_coords, 1;
    	set $@qw_towns_levels, 0;
    	
    	for (set .@i, 0; .@i < getarraysize($@qw_shortnames$); set .@i, .@i+1) {
    		for (set .@n, 0; .@n < getd("$@qw_"+$@qw_shortnames$[.@i]+"_size") && getd("$@qw_"+$@qw_shortnames$[.@i]+"_quest"); set .@n, .@n+1) {
    			for (set .@v, 0; .@v < ((!getd("$@qw_"+$@qw_shortnames$[.@i]+"_levels"))?1:getd("$@qw_"+$@qw_shortnames$[.@i]+"_count["+.@n+"]")); set .@v, .@v+1) {
    				debugmes .@i;
    				setmapflag getd("$@qw_"+$@qw_shortnames$[.@i]+"_prefix$["+.@n+"]")+((getd("$@qw_"+$@qw_shortnames$[.@i]+"_mode["+.@n+"]")<2&&getd("$@qw_"+$@qw_shortnames$[.@i]+"_levels"))?((getd("$@qw_"+$@qw_shortnames$[.@i]+"_count["+.@n+"]")>9)?((.@v<9)?"0":""):"")+(.@v+getd("$@qw_"+$@qw_shortnames$[.@i]+"_mode["+.@n+"]")):""), mf_loadevent;
    			}
    		}
    	}
    	end;
    }
    
    alberta,31,240,4	duplicate(warpra)	Warp Agent#01	859
    aldebaran,145,118,4	duplicate(warpra)	Warp Agent#02	859
    amatsu,192,81,1	duplicate(warpra)	Warp Agent#03	859
    ayothaya,144,117,6	duplicate(warpra)	Warp Agent#04	859
    comodo,194,158,4	duplicate(warpra)	Warp Agent#05	859
    einbroch,59,205,4	duplicate(warpra)	Warp Agent#06	859
    einbroch,243,189,2	duplicate(warpra)	Warp Agent#07	859
    einbech,135,249,4	duplicate(warpra)	Warp Agent#08	859
    geffen,115,66,4	duplicate(warpra)	Warp Agent#9	859
    gonryun,151,130,4	duplicate(warpra)	Warp Agent#10	859
    izlude,133,117,4	duplicate(warpra)	Warp Agent#11	859
    hugel,88,151,5	duplicate(warpra)	Warp Agent#12	859
    lighthalzen,155,79,6	duplicate(warpra)	Warp Agent#13	859
    louyang,210,106,4	duplicate(warpra)	Warp Agent#14	859
    morocc,156,95,4	duplicate(warpra)	Warp Agent#15	859
    prontera,161,192,4	duplicate(warpra)	Warp Agent#16	859
    payon,182,110,4	duplicate(warpra)	Warp Agent#17	859
    umbala,132,130,4	duplicate(warpra)	Warp Agent#18	859
    xmas,150,136,4	duplicate(warpra)	Warp Agent#19	859
    yuno,137,162,4	duplicate(warpra)	Warp Agent#20	859
    
    ama_dun01,233,9,1	duplicate(warpra)	Warp Agent#21	859
    moc_fild04,207,331,4	duplicate(warpra)	Warp Agent#22	859
    ayo_fild02,279,154,4	duplicate(warpra)	Warp Agent#23	859
    izlu2dun,104,82,4	duplicate(warpra)	Warp Agent#24	859
    prt_sewb1,125,253,4	duplicate(warpra)	Warp Agent#25	859
    mjolnir_02,85,363,4	duplicate(warpra)	Warp Agent#26	859
    einbech,81,101,1	duplicate(warpra)	Warp Agent#27	859
    glast_01,370,308,4	duplicate(warpra)	Warp Agent#28	859
    yuno_fild03,37,135,4	duplicate(warpra)	Warp Agent#29	859
    niflheim,32,161,4	duplicate(warpra)	Warp Agent#30	859
    gef_fild10,71,339,4	duplicate(warpra)	Warp Agent#31	859
    pay_arche,39,135,4	duplicate(warpra)	Warp Agent#32	859
    moc_ruins,64,166,4	duplicate(warpra)	Warp Agent#33	859
    moc_fild19,106,97,4	duplicate(warpra)	Warp Agent#34	859
    alb2trea,73,101,4	duplicate(warpra)	Warp Agent#35	859
    tur_dun01,148,239,4	duplicate(warpra)	Warp Agent#36	859
    lhz_dun01,157,285,4	duplicate(warpra)	Warp Agent#37	859
    hu_fild05,186,210,4	duplicate(warpra)	Warp Agent#38	859
    yuno_fild07,221,179,4	duplicate(warpra)	Warp Agent#39	859
    tha_scene01,139,194,1	duplicate(warpra)	Warp Agent#40	859
    odin_tem01,96,149,4	duplicate(warpra)	Warp Agent#41	859
    
  12. i have no idea what cause of this error.

     

    [Warning]: npc_event: player's event queue is full, can't add event 'devil_squar
    e_warp::OnPCDieEvent' !
    [Warning]: npc_event: player's event queue is full, can't add event 'Devil Squar
    e::OnPCDieEvent' !
    [Error]: buildin_rid2name: invalid RID
    

    here is the script of my Devil Square.

     

    //   Made:By Kirlein (Tyirial Script Concept)  //
    // Devil Square based off the mmorpg Muonline  //
    // Have Fun and feel free to leave suggestions //
    //          Leave This intacted                //
    // +   Translated by Stillhard aka Dewa        //
    // +  Add times for 24 hours of play         //
    // +  Add a little bit infos for newbie users  //
    //      Completely rewrite by ~AnnieRuru~      //
    // +  Tested with rAthena 17101                //
    // http://rathena.org/board/topic/77632-devil-square/
    /////////////////////////////////////////////////
    
    prontera,164,165,4	script	Devil Square	100,{
    	mes "[Devil Square Guardian]";
    	mes "Welcome to the entrance door to ^FF0000Devil Square^000000";
    	mes "If you failed or die, the door will be closed and you have to wait until it start to open again";
    	next;
    	if ( select ( "Enter", "Info", "Cancel " ) == 3 ) {
    		mes "[Devil Square Guardian]";
    		mes "See ya";
    		close;
    	}
    	else if ( @menu == 2 ) { // Info
    		mes "[Devil Square Guardian]";
    		mes "There are 3 level monster you'll encounter";
    		mes "Each level the enemies will grow stronger";
    		mes "If you succeded to win all 3 level monster, you'll get the opportunity to open 10 Treasure Box with items, equips, and rare cards inside!!";
    		close;
    	}
    	else if ( .start != 1 ) { // time
    		mes "[Devil Square Guardian]";
    		mes "Devil Square is now closed";
    		mes "It'll be open again at:";
    		mes "00:00 , 02:00 , 04:00 , 06:00"; // display your time here
    		mes "08:00 , 10:00 , 12:00 , 14:00";
    		mes "16:00 , 18:00 , 20:00 , 22:00";
    		close;
    	}
    	else if ( baselevel < 70 || zeny < 20000 ) { // requirement
    		mes "[Devil Square Guardian]";
    		mes "Minimum base level to enter is 70";
    		mes "The registration fee is 20,000z";
    		close;
    	}
    	else if ( .register_num >= .register_limit ) { // room FULL
    		mes "[Devil Square Guardian]";
    		mes "I'm sorry but the Devil Square is FULL";
    		mes "Maximum users to enter is "+ .register_limit +" players";
    		close;
    	}
    	zeny = zeny - 20000;
    	announce strcharinfo(0)+" has entered the Devil Square", bc_npc;
    	percentheal 100,100;
    	warp "ordeal_1-1",183,182;
    	.register_aid[ .register_num ] = getcharid(3);
    	.register_num++;
    	end;
    
    OnInit:
    	.register_limit = 10; // maximum amount of players can play in this event
    	.ann_survive = 30000; // the rate at which announce the players that still survive in devil square, in mili-seconds
    	bindatcmd "devilsquare", strnpcinfo(0)+"::Onatcmd", 99,100;
    	end;
    
    Onatcmd:
    	if ( compare( .@atcmd_parameters$, "on" ) || compare( .@atcmd_parameters$, "start" ) ) {
    		if ( .start )
    			dispbottom "Devil Square Event already started.";
    		else
    			goto L_Start;
    	}
    	else if ( compare( .@atcmd_parameters$, "off" ) || compare( .@atcmd_parameters$, "end" ) ) {
    		if ( !.start )
    			dispbottom "Devil Square Event not yet start.";
    		else
    			goto L_End;
    	}
    	else if ( !.start ) {
    		dispbottom "Devil Square Event is currently not running.";
    		dispbottom "Use "+ .@atcmd_command$ +" on | start to start the event.";
    		dispbottom "Use "+ .@atcmd_command$ +" off | end to end this event";
    	}
    	else if ( .start == 1 )
    		dispbottom "Devil Square Event is currently accepting participations.";
    	else
    		dispbottom "Devil Square Event is currently running. Currently on Round "+ .round +" with "+ .mob +" mobs left.";
    	end;
    
    L_Start:
    OnClock0000: // yeah I know about OnMinute ... it just that more people knows better using OnClock
    OnClock0200:
    OnClock0400:
    OnClock0600:
    OnClock0800:
    OnClock1000:
    OnClock1200:
    OnClock1400:
    OnClock1600:
    OnClock1800:
    OnClock2000:
    OnClock2200:
    	.start = 1;
    	disablenpc "Exit#DS";
    	mapannounce "ordeal_1-1","Devil Square is now closed", bc_map;
    	getmapxy .@map$, .@x, .@y, 1;
    	mapwarp "ordeal_1-1", .@map$, .@x, .@y;
    	killmonsterall "ordeal_1-1";
    	announce "Devil Square is OPENED NOW!! 5 Minutes until it starts..!!", bc_all;
    	sleep 60000;
    	announce "Devil Square will begin in 4 minutes..!!", bc_all;
    	sleep 60000;
    	announce "Devil Square will begin in 3 minutes..!!", bc_all;
    	sleep 60000;
    	announce "Devil Square will begin in 2 minutes..!!", bc_all;
    	sleep 60000;
    	announce "Devil Square will begin in 1 minutes..!!", bc_all;
    	sleep 60000;
    	announce "Devil Square is STARTED NOW !!", bc_all;
    	if ( !.register_num )
    		goto L_End;
    	.start = 2;
    	donpcevent strnpcinfo(0)+"::OnSurvive";
    	.round = 1;
    	.mob = 75;
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] SOLDIER SKELETON",1028,10,strnpcinfo(0)+"::Ondevildead";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] ORC ARCHER",1189,15,strnpcinfo(0)+"::Ondevildead";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] SANDMAN",1165,10,strnpcinfo(0)+"::Ondevildead";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] ARCHER SKELETON",1016,15,strnpcinfo(0)+"::Ondevildead";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] MINOROUS",1149,15,strnpcinfo(0)+"::Ondevildead";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] REQUIEM",1164,10,strnpcinfo(0)+"::Ondevildead";
    	end;
    
    Ondevildead:
    	.mob--;
    	if ( .mob == 25 || .mob == 5 )
    		announce "Devil Square : "+ .mob +" mobs to enter the 2nd round", bc_map;
    	else if ( !.mob ) {
    		announce "Devil Square will enter to 2nd round", bc_map;
    		goto Ondevil2;
    	}
    	end;
    
    Ondevil2:
    	.round = 2;
    	.mob = 70;
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] GARGOYLE",1253,15,strnpcinfo(0)+"::Ondevildead2";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] ALARM",1193,10,strnpcinfo(0)+"::Ondevildead2";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] HIGH ORC",1213,10,strnpcinfo(0)+"::Ondevildead2";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] INJUSTICE",1257,10,strnpcinfo(0)+"::Ondevildead2";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] MIMIC",1191,15,strnpcinfo(0)+"::Ondevildead2";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1192,10,strnpcinfo(0)+"::Ondevildead2";
    	end;
    
    Ondevildead2:
    	.mob--;
    	if ( .mob == 25 || .mob == 5 )
    		announce "Devil Square : "+ .mob +" mobs left to enter the 3rd round", bc_map;
    	else if ( !.mob ) {
    		announce "Devil Square will enter to 3rd round", bc_map;
    		goto Ondevil3;
    	}
    	end;
    
    Ondevil3:
    	.round = 3;
    	.mob = 58;
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] ANOLIAN",1206,15,strnpcinfo(0)+"::Ondevildead3";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] WANDERER",1208,15,strnpcinfo(0)+"::Ondevildead3";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] DEVIRUCHI",1109,10,strnpcinfo(0)+"::Ondevildead3";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] JOKER",1131,15,strnpcinfo(0)+"::Ondevildead3";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] MOONLIGHT",1150,2,strnpcinfo(0)+"::Ondevildead3";
    	areamonster "ordeal_1-1",183,182,246,244,"[DS] DARK ILLUSION",1302,1,strnpcinfo(0)+"::Ondevildead3";
    	end;
    
    Ondevildead3:
    	.mob--;
    	if ( .mob == 25 || .mob == 5 )
    		announce "Devil Square : "+ .mob +" mobs left to VICTORY", bc_map;
    	else if ( !.mob ) {
    		announce "Devil Square : CONGRATULATION - 10 Treasure Boxs will be yours now", bc_map;
    		goto Ondevil4;
    	}
    	end;
    
    Ondevil4:
    	.round = 4;
    	.mob = 10;
    	monster "ordeal_1-1",231,250,"Treasure Box",1324,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",234,247,"Treasure Box",1328,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",237,244,"Treasure Box",1332,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",240,241,"Treasure Box",1336,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",243,238,"Treasure Box",1340,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",246,235,"Treasure Box",1344,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",249,232,"Treasure Box",1348,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",252,229,"Treasure Box",1352,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",249,241,"Treasure Box",1356,1,strnpcinfo(0)+"::Onboxdead";
    	monster "ordeal_1-1",240,249,"Treasure Box",1360,1,strnpcinfo(0)+"::Onboxdead";
    	end;
    
    Onboxdead:
    	.mob--;
    	announce "Devil Square : "+ strcharinfo(0) +" has opened the treasure box at Devil Square", bc_all;
    	if ( !.mob )
    		goto L_End;
    	end;
    
    L_End:
    	killmonsterall "ordeal_1-1";
    	enablenpc "Exit#DS";
    	deletearray .register_aid;
    	.start = .round = .mob = .register_num = 0;
    	end;
    
    OnPCDieEvent:
    OnPCLogoutEvent:
    	if ( .start && strcharinfo(3) == "ordeal_1-1" ) {
    		while ( .register_aid[.@i] != getcharid(3) && .@i < .register_num ) .@i++;
    		deletearray .register_aid[.@i], 1;
    		.register_num--;
    		if ( !.register_num ) {
    			announce "All players failed to survive at Devil Square", bc_all;
    			killmonsterall "ordeal_1-1";
    			goto L_End;
    		}
    	}
    	end;
    
    OnSurvive:
    	while ( .start == 2 ) {
    		mapannounce "ordeal_1-1", .register_num +" players is still survive at Devil Square", bc_map;
    		sleep .ann_survive;
    	}
    	end;
    }
    
    -	script	devil_square_warp	-1,{
    OnPCDieEvent:
    //	if ( .start == 0 ) end;
    	if ( strcharinfo(3) == "ordeal_1-1" ) {
    		sleep2 1;
    		warp "prontera",156,223;
    		percentheal 100,100;
    		dispbottom "You have failed to survive at Devil Square.";
    	}
    	end;
    }
    
    ordeal_1-1,246,245,7	script	Exit#DS	51,{
    	mes "[Exit]";
    	mes "See ya";
    	getitem 7960, 10;
    	next;
    	warp "SavePoint", 0,0 ;
    	close;
    }
    
    ordeal_1-1	mapflag	nowarp	10
    ordeal_1-1	mapflag	nowarpto	10
    ordeal_1-1	mapflag	noteleport	10
    ordeal_1-1	mapflag	nosave	SavePoint	10
    ordeal_1-1	mapflag	nomemo	10
    ordeal_1-1	mapflag	nobranch	10
    ordeal_1-1	mapflag	nopenalty	10
    ordeal_1-1	mapflag	noicewall	10
    

     

×
×
  • Create New...