Jump to content

Racaae

Members
  • Posts

    139
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by Racaae

  1. Hi, find the line with // unhide npc and add:

    setbattleflag( "base_exp_rate", getbattleflag("base_exp_rate") * 2 );
    setbattleflag( "job_exp_rate", getbattleflag("job_exp_rate") * 2 );
    setbattleflag( "quest_exp_rate", getbattleflag("quest_exp_rate") * 2 );

    Now find the line with // hidenpc and add:

    setbattleflag( "base_exp_rate", getbattleflag("base_exp_rate") / 2 );
    setbattleflag( "job_exp_rate", getbattleflag("job_exp_rate") / 2 );
    setbattleflag( "quest_exp_rate", getbattleflag("quest_exp_rate") / 2 );

     

    • Upvote 1
  2. Like Chaos mentioned, each quest need it's own variable to register each cooldown time.
    Try using tr0n's Questboard, it does what you want and it is easy to add/edit quests.

    Spoiler
    //===== 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]
    //============================================================
    
    moc_para01,39,36,5	script	Quest Manager#2024	732,{
    	soundeffect "menu.wav",0;
    	mes "[^FF7700Quest Manager^000000]";
    	
    	if (countitem(40056) < 1) {
    		mes "Oh hello, im sorry,";
    		mes "it seems you are not yet a register";
    		mes "as a guild member, kindly register yourself";
    		mes "at front desk to start accepting quest.";
    		close;
    	}
    
    	mes "Hello, Please Select Quest";
    	while (true) {
    		switch(select((.hunting)?" ~ Hunting Quest":"",
    					  (.collection)?" ~ Collecting Quest":"")) {
    		soundeffect "menu.wav",0;
    		case 1:
    			set .@huntmenu$, "";
    			for( set .@i,0; .@i < .huntingquestcount; set .@i,.@i+1){
    				if (.@i) set .@huntmenu$,.@huntmenu$ + ":";
    				if (gettimetick(2) < getd((.@i+1) + "_hunting_delay"))
    					.@c$ = "^808080";
    				else
    					.@c$ = "^000000";
    				set .@huntmenu$, .@huntmenu$ + .@c$ + "[Lv " + getd("." +(.@i+1)+"_huntingmin") + "-" + getd("." +(.@i+1)+"_huntingmax") + "] " + getd("." + (.@i+1) + "_huntingname$");
    			}
    			set @selection,select(.@huntmenu$);
    			soundeffect "menu.wav",0;
    			clear;
    			if(.quest_repeat == true){
    				if(gettimetick(2) < getd(@selection + "_hunting_delay")){
    					mes "[^FF7700Quest Manager^000000]";
    					mes "Sorry you have to wait 24 Hours until you can do the Quest again!";
    					mes "Please wait more ^0000FF"+Time2Str(getd(@selection + "_hunting_delay"))+"^000000.";
    					close;
    				}
    			}
    			else {
    				if(getd(@selection + "_hunting_repeat") == true){
    					mes "[^FF7700Quest Manager^000000]";
    					mes "You already did this quest.";
    					mes "Please choose another one.";
    					close;
    				}
    			}
    			mes "[^FF7700Quest Manager^000000]";
    			mes "Please hunt and kill the following";
    			set .@size, getarraysize(getd("."+ @selection + "_huntingmob"));
    			for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    				mes "- ^FF0000"+getd("."+@selection+"_huntingmob["+(.@j+1)+"]")+ " " + strmobinfo(1,getd("."+@selection+"_huntingmob["+.@j+"]"))+"^000000";
    			}
    			next;
    			mes "[^FF7700Quest Manager^000000]";
    			mes "Reward:";
    			if (getd("." +@selection+"_huntingexp["+0+"]"))
    				mes "^0000FF"+getd("." +@selection+"_huntingexp["+0+"]")+" Base EXP^000000";
    			if (getd("." +@selection+"_huntingexp["+1+"]"))
    				mes "^0000FF"+getd("." +@selection+"_huntingexp["+1+"]")+" Job EXP^000000";
    			if (getd("." +@selection+"_huntingzeny"))
    				mes "Zeny: ^0000FF"+getd("." +@selection+"_huntingzeny")+"^000000";
    			if (getd("." +@selection+"_huntingprize[0]")) {
    				for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_huntingprize")); .@i++)
    					mes getd("." +@selection+"_huntingamount") + " " + mesitemlink((getd("." +@selection+"_huntingprize["+.@i+"]")));
    			}
    			switch(select("- Take Quest", "- Submit Completed Quest", "- Cancel")) {
    			soundeffect "menu.wav",0;
    			case 1:
    				clear;
    				if (isbegin_quest(getd("." + @selection+"_huntingid")))
    					goto havetaken;
    				if (BaseLevel >= getd("." +@selection+"_huntingmin") && BaseLevel <= getd("." +@selection+"_huntingmax")){
    					mes "[^FF7700Quest Manager^000000]";
    					mes "Quest accepted.";
    					set h_run, true;
    					set currentquest$, @selection;
    					setquest getd("." + @selection+"_huntingid");
    					close;
    				}
    				else{
    					mes "[^FF7700Quest Manager^000000]";
    					mes "You don't have the required";
    					mes "level to do this quest.";
    					close;
    				}
    			case 2:
    				clear;
    				switch(checkquest(getd("." +@selection+"_huntingid"),HUNTING)) {
    				soundeffect "menu.wav",0;
    				case -1:
    					goto nottaken;
    				case 2:
    					mes "[^FF7700Quest Manager^000000]";
    					mes "Well done!";
    					mes "here is your rewards";
    					if(getd("." +@selection+"_huntingprize[0]")) {
    						for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_huntingprize")); .@i++)
    							getitem(getd("." +@selection+"_huntingprize["+.@i+"]"),getd("." +@selection+"_huntingamount"));
    					}
    					set Zeny, Zeny+getd("." +@selection+"_huntingzeny");
    					getexp getd("." +@selection+"_huntingexp["+0+"]"),getd("." +@selection+"_huntingexp["+1+"]");
    					erasequest getd("." +@selection+"_huntingid");
    					setd(@selection + "_hunting_delay"),gettimetick(2)+.quest_delay;
    					setd(@selection + "_hunting_repeat"),true;
    					set @selection, "";
    					set h_run, false;
    					end;
    				default:
    					mes "[^FF7700Quest Manager^000000]";
    					mes "You didn't kill everything.";
    					close;
    				}
    
    			case 3:
    				end;
    			}
    
    		case 2:
    			clear;
    			mes "[^FF7700Quest Manager^000000]";
    			mes "The Guild is always in need of more resources.";
    			mes "Please select the area you would like to help today.";
    			set .@collectmenu$, "";
    			for( set .@i,0; .@i < .collectionquestcount; set .@i,.@i+1){
    				if (.@i) set .@collectmenu$,.@collectmenu$ + ":";
    				if (gettimetick(2) < getd((.@i+1) + "_collection_delay"))
    					.@c$ = "^808080";
    				else
    					.@c$ = "^000000";
    				set .@collectmenu$, .@collectmenu$ + .@c$ + "[Lv " + getd("." +(.@i+1)+"_collectionmin") + "-" + getd("." +(.@i+1)+"_collectionmax") + "] " + getd("." + (.@i+1) + "_collectionname$");
    			}
    			set @selection,select(.@collectmenu$);
    			soundeffect "menu.wav",0;
    			clear;		
    			if(.quest_repeat == true){
    				if(gettimetick(2) < getd(@selection + "_collection_delay")){
    					mes "[^FF7700Quest Manager^000000]";
    					mes "Sorry you have to wait 24 Hours until you can do the Quest again!";
    					mes "Please wait more ^0000FF"+Time2Str(getd(@selection + "_collection_delay"))+"^000000.";
    					close;
    				}
    			}
    			else{
    				if(getd(@selection + "_collection_repeat") == true){
    					mes "[^FF7700Quest Manager^000000]";
    					mes "You already did this quest.";
    					mes "Please choose another one.";
    					close;
    				}
    			}
    			mes "[^FF7700Quest Manager^000000]";
    			mes "We need the following:";
    			set .@size, getarraysize(getd("."+ @selection + "_collectionitem"));
    			for( set .@j, 0; .@j < .@size; set .@j,.@j+2){
    				.@a = countitem(getd("."+@selection+"_collectionitem["+.@j+"]"));
    				if (.@a < getd("."+@selection+"_collectionitem["+(.@j+1)+"]"))
    					.@c$ = "^FF0000";
    				else .@c$ = "";
    				//mes "^FF0000"+getitemname(getd("."+@selection+"_collectionitem["+.@j+"]"))+" - "+getd("."+@selection+"_collectionitem["+(.@j+1)+"]")+" ea.^000000";
    				mes .@c$ + getd("."+@selection+"_collectionitem["+(.@j+1)+"]") + " " + mesitemlink(getd("."+@selection+"_collectionitem["+.@j+"]")) + ": " + "(" + .@a + "/"+getd("."+@selection+"_collectionitem["+(.@j+1)+"]") + ")^000000";
    			}
    			next;
    			mes "[^FF7700Quest Manager^000000]";
    			mes "Reward:";
    			if (getd("." +@selection+"_collectionexp["+0+"]"))
    				mes "^0000FF"+getd("." +@selection+"_collectionexp["+0+"]")+" Base EXP^000000";
    			if (getd("." +@selection+"_collectionexp["+1+"]"))
    				mes "^0000FF"+getd("." +@selection+"_collectionexp["+1+"]")+" Job EXP^000000";
    			if (getd("." +@selection+"_collectionzeny"))
    				mes "Zeny: ^0000FF"+getd("." +@selection+"_collectionzeny")+"^000000";
    			if (getd("." +@selection+"_collectionprize[0]")) {
    				for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_collectionprize")); .@i++)
    					mes getd("." +@selection+"_collectionamount") + " " + mesitemlink((getd("." +@selection+"_collectionprize["+.@i+"]")));
    			}
    
    			if (BaseLevel < getd("." +@selection+"_collectionmin") || BaseLevel > getd("." +@selection+"_collectionmax")) {
    				next;
    				soundeffect "menu.wav",0;
    				mes "[^FF7700Quest Manager^000000]";
    				mes "You don't have the required level to do this quest.";
    			}
    			else {
    				if(select("- Deliver items", "- Return") == 1) {
    					soundeffect "menu.wav",0;
    					clear;
    					set .@size, getarraysize(getd("."+@selection + "_collectionitem"));
    					for( set .@k,0; .@k < .@size; set .@k,.@k+2) {
    						if(countitem(getd("."+@selection+"_collectionitem["+.@k+"]"))>=getd("."+@selection+"_collectionitem["+(.@k+1)+"]")){
    							set .@checkitem,.@checkitem+2;
    						}
    					}
    					if(.@checkitem<.@size){
    						mes "[^FF7700Quest Manager^000000]";
    						mes "You don't have everything.";
    						mes F_Rand("Did you forget the item at the storage?","Maybe try looking for other quests.","");
    						break;
    					}
    					for( set .@delcount,0; .@delcount < .@size; set .@delcount,.@delcount+2){
    						delitem getd("."+@selection+"_collectionitem["+.@delcount+"]"),getd("."+@selection+"_collectionitem["+(.@delcount+1)+"]");
    					}
    					mes "[^FF7700Quest Manager^000000]";
    					mes "Well done!";
    					mes "here is your rewards";
    					if(getd("." +@selection+"_collectionprize[0]")) {
    						for(.@i = 0; .@i < getarraysize(getd("." +@selection+"_collectionprize")); .@i++)
    							getitem(getd("." +@selection+"_collectionprize["+.@i+"]"),getd("." +@selection+"_collectionamount"));
    					}
    					set Zeny,Zeny+getd("." +@selection+"_collectionzeny");
    					getexp getd("." +@selection+"_collectionexp["+0+"]"),getd("." +@selection+"_collectionexp["+1+"]");
    					setd(@selection + "_collection_delay"),gettimetick(2)+.quest_delay;
    					setd(@selection + "_collection_repeat"),true;
    					set @selection, "";
    					close;
    				}
    				else {
    					soundeffect "menu.wav",0;
    					clear;
    					mes "[^FF7700Quest Manager^000000]";
    					mes F_Rand("Not to your liking?","Are you here just to look?","Let's find the right quest for you!");
    				}
    			}
    			break;
    
    		case 3:
    			close;
    		}
    		if (rand(3) == 1)
    			mes "How about some " + F_Rand("hunting","gathering","looting","adventure","helping hand") + " today?";
    	}
    
    OnInit:
    
    	function AddCollect;
    	function AddHunting;
    	questinfo QTYPE_DAILYQUEST, QMARK_NONE, "countitem(40056)";
    
    	//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 Hunting Quests here (You can add as many required mobs as you want)
    	//AddHunting("<Quest Name>",<Quest ID>,<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Monster ID>,<Monster Amount>,...);
    	AddHunting("Prontera Field 01",120000,1,21,"40221|40222",1,0,2100,2100,1002,300,1007,300,1008,300);
    	AddHunting("Prontera Field 02",120001,1,51,"40221|40222",1,0,27300,14700,1063,300,1113,300,1031,300);
    	
    	//Add Collection Quests here (You can add as many required items as you want)
    	//AddCollect("<Quest Name>",<Min Lvl>,<Max Lvl>,<Reward|Item ID>,<Reward|Item Amount>,<Zeny Reward>,<Base EXP>,<Job EXP>,<Item ID>,<Item Amount>,...);
    	AddCollect("Foliage Gathering",1,11,"40221",1,0,2100,2100,705,10,707,10,7100,10,706,1);
    	AddCollect("Herb Gathering",1,21,"40222",1,0,2100,2100,507,8,508,8,509,8,510,8,511,8,621,3);
    	AddCollect("Flower Gathering",1,31,"40221|40222",1,0,2100,2100,704,10,708,10,703,10,709,10);
    	AddCollect("Vegetable Gathering",1,41,"40221|40222",1,0,2100,2100,515,10,516,10,535,10);
    	AddCollect("Animal Gathering",1,51,"40221|40222",1,0,2100,2100,519,10,574,10,518,10);
    	AddCollect("Forage Gathering",1,61,"40221|40222",2,0,2100,2100,1026,10,581,10,577,3);
    	AddCollect("Fruit Gathering",1,71,"40221|40222",2,0,2100,2100,512,10,513,10,582,10,568,10,514,10);
    	AddCollect("River Fishing",1,81,"40221|40222",1,0,2100,2100,567,3,964,3,579,3);
    	AddCollect("Sea Fishing",30,91,"40221|40222",2,0,2100,2100,966,3,6049,3,6771,3,6773,3,6775,3);
    	AddCollect("Rare Fruit Gathering",30,MAX_LEVEL,"40221|40222",3,0,2100,2100,578,10,11515,5,11516,5,6237,5,607,1);
    	AddCollect("Rare Sea Fishing",50,MAX_LEVEL,"40221|40222",4,0,2100,2100,6770,1,6772,1,6774,1);
    
    	end;
    
    
    	function AddCollect{
    		set .collectionquestcount,.collectionquestcount+1;
    		setd ("." +.collectionquestcount+"_collectionname$", getarg(0));
    		setd ("." +.collectionquestcount+"_collectionmin", getarg(1));
    		setd ("." +.collectionquestcount+"_collectionmax", getarg(2));
    
    		explode(getd(".@" +.collectionquestcount+"_collectionprize$"), getarg(3), "|");
    		for(.@i = 0; .@i < getarraysize(getd(".@" +.collectionquestcount+"_collectionprize$")); .@i++)
    			setd ("."+.collectionquestcount+"_collectionprize["+.@i+"]",getd(".@" +.collectionquestcount+"_collectionprize$["+.@i+"]"));
    		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+"_huntingid", getarg(1));
    		setd ("." +.huntingquestcount+"_huntingmin", getarg(2));
    		setd ("." +.huntingquestcount+"_huntingmax", getarg(3));
    		
    		explode(getd(".@" +.huntingquestcount+"_huntingprize$"), getarg(4), "|");
    		for(.@i = 0; .@i < getarraysize(getd(".@" +.huntingquestcount+"_huntingprize$")); .@i++)
    			setd ("."+.huntingquestcount+"_huntingprize["+.@i+"]",getd(".@" +.huntingquestcount+"_huntingprize$["+.@i+"]"));
    
    		setd ("." +.huntingquestcount+"_huntingamount", getarg(5));
    		setd ("." +.huntingquestcount+"_huntingzeny", getarg(6));
    		set .@size, getarraysize(getd("."+ .huntingquestcount + "_huntingexp"));
    		set .@argcount, 7;
    		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;
    	}
    
    havetaken:
    	clear;
    	soundeffect "menu.wav",0;
    	mes "[^FF7700Quest Manager^000000]";
    	mes "Sorry, but you already have this quest.";
    	close;
    	
    nottaken:
    	clear;
    	soundeffect "menu.wav",0;
    	mes "[^FF7700Quest Manager^000000]";
    	mes "It's look like you have not take the quest";
    	close;
    }

     

    Find these lines to see the examples:

    AddHunting("Prontera Field 01",11340,1,21,"40221|40222",1,0,2100,2100,1002,300,1007,300,1008,300);
    AddCollect("Foliage Gathering",1,11,"40221",1,0,2100,2100,705,10,707,10,7100,10,706,1);	

     

  3. Añade en \db\import\mob_db.yml

      - Id: 3747
        AegisName: E_COWRAIDERS1
        Drops:
          - Item: Calf_Anaconda
            Rate: 5
          - Item: Calf_Python
            Rate: 5
      - Id: 3748
        AegisName: E_COWRAIDERS2
        Drops:
          - Item: Calf_Deathadder
            Rate: 5
          - Item: Calf_Kingcobra
            Rate: 5
      - Id: 3749
        AegisName: E_COWRAIDERS3
        Drops:
          - Item: Calf_Diamondback
            Rate: 5

     

  4. Hi, RecommendedQuestInfoList and OngoingQuestInfoList have some little different fields.
    Try using QuestInfo1 instead of Description.
    Example:

    RecommendedQuestInfoList = {}
    RecommendedQuestInfoList = {
    	[1] = {
    		Title = "Prontera Field 01",
    		IconName = "ico_nq.bmp",
    		NpcSpr = "4_M_JOB_HUNTER",
    		NpcNavi = "moc_para01",
    		NpcPosX = 39,
    		NpcPosY = 36,
    		BgName = "reco_01.bmp",
    		QuestInfo1 = {
    			"Hunt following monster list.",
    			"300 Poring",
    			"300 Pupa",
    			"300 Fabre"
    		},
    		QuestInfo2 = {
    			"Quest reset at 24 hours and account bounded.",
    		},
    		QuestInfo3 = {
    			"^ff0000This page is intended for exclusive content news. Please note that completing quests will not remove them from this page.^000000"
    		},
    		Summary = "Quest reset at 24 hours and account bounded.",
    		RewardEXP = "2100",
    		RewardJEXP = "2100",
    		RewardItemList = {
    			{ItemID = 40221, ItemNum = 1},
    			{ItemID = 40222, ItemNum = 1}
    		},
    	}
    }

     

  5. 8 minutes ago, Dolphin86 said:

    ok that did work, but what about account bound? dont want my player to abuse by making new char and repeat the quest over and over again..., the objective was to make it daily quest, time limitation by 24 hours and account bound, 

    daily quest : done

    level restriction : done

    account bound : not completed yet..

    which means it is account bound but when time restiction by 24 hours is done, player can take the quest again

    Replace all EXCOOLDOWN with #EXCOOLDOWN

  6. Hi. The script is using a if and else with both statements ending the conversation. Move the reward to before giving the quest.

    Old:

    if (#daily_quest != gettime(DT_DAYOFMONTH) && isbegin_quest(120000)==0) {
    	mes "Please hunt the follwing monster list";
    	END;
    } else {
    	mes "You already receive daily quest for today";
    	END;
    }
    
    //THE NPC WILL NEVER GET TO THIS PART.
    
    if (checkquest(120000,HUNTING)==2) {
    	mes "here is your reward";
    }

    New:

    if (checkquest(120000,HUNTING)==2) {
    	mes "here is your reward";
    	end;
    }
    
    if (#daily_quest != gettime(DT_DAYOFMONTH) && isbegin_quest(120000)==0) {
    	mes "Please hunt the follwing monster list";
    	end;
    } else {
    	mes "You already receive daily quest for today";
    	end;
    }

     

  7. Hi

    //===== rAthena Script ======================================= 
    //= https://rathena.org/board/topic/141811-npc-refiner-vip-and-non-vip/
    //============================================================
    
    prontera,170,181,4	script	Refiner VIP	4_4JOB_MAURA,{
    	disable_items;
    	cutin "4job_maura_01.PNG",2;
    	mes "[Refiner VIP]";
    	mes "Greetings!";
    	mes "I can refine an item up to the ^006400+10^000000 to ^0000FFVIP adventurers^000000...";
    	mes "You don't have to worry! There's no chance of breaking your item.";
    	if (vip_status(VIP_STATUS_ACTIVE))
    		.@r = 10;
    	else {
    		next;
    		mes "[Refiner VIP]";
    		mes "Since you're not a VIP, I can refine your items to ^006400+7^000000.";
    		.@r = 7;
    	}
    	next;
    	setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower";
    	setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
    	switch(select("Refine everything", "Choose equipment", "Remove refine", "Cancel")) {
    		mes "[Refiner VIP]";
    		case 1:
    			mes "I'm going to refine every refinable item you have equipped up to the +" + .@r + " level^000000.";
    			mes "May I proceed?";
    			next;
    			if(select("No.", "Yes.") == 1) {
    				emotion ET_THINK;
    				mes "[Refiner VIP]";
    				mes "Oh, you changed your mind.";
    				mes "Ok.";
    				mes "You can come back later.";
    				close3;
    			}
    			for (.@i = 1; .@i < getarraysize(.@indices); .@i++) {
    				if (getequipisequiped(.@indices[.@i]) && 
    					getequipisenableref(.@indices[.@i]) && 
    					getequiprefinerycnt(.@indices[.@i]) < .@r) {
    						successrefitem .@indices[.@i], .@r - getequiprefinerycnt(.@indices[.@i]);
    						.@refined++;
    				}
    			}
    			mes "[Refiner VIP]";
    			if (.@refined) {
    				specialeffect EF_SUI_EXPLOSION;
    				mes "Alright, it is done~";
    				mes "I refined " + F_InsertPlural(.@refined, "item") + "!";
    			}
    			else
    				mes "There is nothing to refine...";
    			close3;
    		case 2:
    			break;
    		case 3:
    			.@remove = true;
    			mes "This is rare. But sure...";
    			break;
    		case 4:
    			mes "Okay. You can come again later.";
    			close3;
    	}
    	mes "Please choose the equipment.";
    	for ( .@i = 1; .@i <= 10; ++.@i )
    		.@menu$ += (getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : .@position$[.@i] + "- [Empty]") + ":";
    
    	.@part = .@indices[ select(.@menu$) ];
    	clear;
    	if (!getequipisequiped(.@part)) {
    		mes "[Refiner VIP]";
    		mes "You have to equip the item you want to refine.";
    		close3;
    	}
    	if (!getequipisenableref(.@part)) {
    		emotion ET_OTL;
    		mes "[Refiner VIP]";
    		mes "Oh, I'm sorry.";
    		mes "This item is impossible to refine.";
    		close3;
    	}
    	.@refineitemid = getequipid(.@part); // save id of the item
    	.@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
    	setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);
    
    	if (.@remove) {
    		if (!getequiprefinerycnt(.@part)) {
    			mes "[Refiner VIP]";
    			mes "^8B4513This item has no refine.^000000";
    			mes "I can't proceed.";
    			close3;
    		}
    	}
    	else if (getequiprefinerycnt(.@part) >= .@r) {
    		emotion ET_PROFUSELY_SWEAT;
    		mes "[Refiner VIP]";
    		mes "^8B4513This item is already refined as much as your deed.^000000";
    		if (getequiprefinerycnt(.@part) < 10 && !vip_status(VIP_STATUS_ACTIVE)) {
    			mes "You can become a ^0000FFVIP adventurer^000000 to continue using my services.";
    		}
    		else
    			mes "Please come along with an item refined less than +" + .@r + ".";
    		close3;
    	}
    	mes "[Refiner VIP]";
    	if (.@remove)
    		mes "I'm going to ^8B4513remove the refine^000000 of ^006400" + getequipname(.@part) + ".";
    	else
    		mes "I'm going to refine ^006400"+getequipname(.@part)+"^8B4513 up to the +"+.@r+" level^000000.";
    	mes "May I proceed?";
    	next;
    	if(select("No.:Yes.") == 1) {
    		emotion ET_THINK;
    		mes "[Refiner VIP]";
    		mes "Oh, you changed your mind.";
    		mes "Ok.";
    		mes "You can come back later.";
    		close3;
    	}
    	mes "[Refiner VIP]";
    	mes "Great.";
    	mes "As you wish!";
    	mes "I have my own special way to refine...";
    	mes ".......ka boom!";
    	specialeffect EF_SUI_EXPLOSION;
    
    	// anti-hack
    	if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) ||
    		callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3])) {
    		mes "[Refiner VIP]";
    		emotion ET_FRET;
    		mes "Wait a second...";
    		mes "Do you think I'm stupid?!";
    		mes "You switched the item while I wasn't looking! Get out of here!";
    		close3;
    	}
    	if (.@remove)
    		downrefitem .@part, getequiprefinerycnt(.@part);
    	else
    		successrefitem .@part, .@r - getequiprefinerycnt(.@part);
    	next;
    	emotion ET_DELIGHT;
    	mes "[Refiner VIP]";
    	mes "Alright, here it is~";
    	mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";
    	mes "Congratulations. You look GREAT!";
    	close3;
    }

     

    • Love 1
  8. Hi. Find this line:

    set @npc$,"[ ^0000FFClaude^000000 ]"

    And insert below:

    	if (#hideseek_cd == gettime(DT_YYYYMMDD)) {
    		mes @npc$;
    		mes "You can come back to play again tomorrow.";
    		close;
    	}

     

    Find the line with getitem and insert below:

    #hideseek_cd = gettime(DT_YYYYMMDD);

     

  9. 11 hours ago, monyet said:

    bagaimana script saya yang ini apakah bisa di buat lebih sederhana lagi ?

     

     

    Halo

    //===== rAthena Script =======================================
    //= Euphy's Quest Shop
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.6c
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= A dynamic quest shop based on Lunar's, with easier config.
    //= Includes support for multiple shops & cashpoints.
    //= Item Preview script by ToastOfDoom.
    //===== Additional Comments: =================================
    //= 1.0 Initial script.
    //= 1.2 Added category support.
    //= 1.3 More options and fixes.
    //= 1.4 Added debug settings.
    //= 1.5 Replaced categories with shop IDs.
    //= 1.6 Added support for purchasing stackables.
    //= 1.6a Added support for previewing costumes and robes.
    //= 1.6b Added 'disable_items' command.
    //= 1.6c Replaced function 'A_An' with "F_InsertArticle".
    //============================================================
    
    // Shop NPCs -- supplying no argument displays entire menu.
    //  callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};
    //  ADD YOUR NPC HERE
    //============================================================
    prontera,152,180,5	script	NamaNPC	4_F_JPN2,{ callfunc "qshop",1; }
    
    //============================================================
    
    
    // Script Core - DO NOT DUPLICATE THIS NPC !!!!!!!!!!!!!
    //============================================================
    -	script	quest_shop	-1,{
    function Add; function Chk; function Slot;
    OnInit:
        freeloop(1);
    
    // -----------------------------------------------------------
    //  Basic shop settings.
    // -----------------------------------------------------------
    
        set .ShowSlot,1;    // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
        set .ShowID,0;      // Show item IDs? (1: yes / 0: no)
        set .ShowZeny,0;    // Show Zeny cost, if any? (1: yes / 0: no)
        set .MaxStack,100;  // Max number of quest items purchased at one time.
        .SkipShop = true;	// Ignore shop window
        .Chance = 80;		// Success chance
    
    // -----------------------------------------------------------
    //  Points variable -- optional quest requirement.
    //  setarray .Points$[0],"<variable name>","<display name>";
    // -----------------------------------------------------------
    
        setarray .Points$[0],
            "#CASHPOINTS", "Cash Points";
    
    
    //=====================================================================================
    // ------------------- ADD YOUR SHOPS NAME AND ITEMS SHOPS STARTING HERE --------------
    //=====================================================================================
    
    // -----------------------------------------------------------
    //  Shop IDs -- to add shops, copy dummy data at bottom of file.
    //  setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...};
    // -----------------------------------------------------------
    
        setarray .Shops$[1],
            "Food",    // Shop Named 1
            "Other";        // Shop Named 2
    
    // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //  Add(<shop ID>,<reward ID>,<reward amount>,
    //      <Zeny cost>,<point cost>,
    //      <required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------
    
    // Shop 1
        Add(1,12046,1,0,0,501,2,514,3);
        Add(1,12061,1,0,0,501,1,514,2,518,1);
        Add(1,12047,1,0,0,507,10,508,10,510,5);
        Add(1,12048,1,0,0,509,10,518,2,7452,1);
        Add(1,12044,1,0,0,507,3,508,2,511,3,568,1,517,5,7453,1);
        Add(1,12065,1,0,0,520,2,521,3,7100,10,7198,6,7453,1,7452,1);
        Add(1,12060,1,0,0,7006,20,520,10,507,10,1062,20,7482,1);
        Add(1,12055,1,0,0,553,20,508,10,511,20,7455,1,7456,1);
    
    // -----------------------------------------------------------
    
    //=====================================================================================
    // ------------------- YOUR SHOPS AND ITEMS SHOPS HAVE BEEN ADDED ---------------------
    //=====================================================================================
    
        freeloop(0);
        set .menu$,"";
        for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) {
            set .menu$, .menu$+.Shops$[.@i]+":";
            npcshopdelitem "qshop"+.@i,909;
        }
        end;
    
    OnMenu:
        set .@size, getarraysize(@i);
        if (!.@size) set @shop_index, select(.menu$);
        else if (.@size == 1) set @shop_index, @i[0];
        else {
            for(set .@j,0; .@j<.@size; set .@j,.@j+1)
                set .@menu$, .@menu$+.Shops$[@i[.@j]]+":";
            set @shop_index, @i[select(.@menu$)-1];
        }
        deletearray @i[0],getarraysize(@i);
        if (.Shops$[@shop_index] == "") {
            message strcharinfo(0),"An error has occurred.";
            end;
        }
        if (!.SkipShop) {
        	dispbottom "Select one item at a time.";
        	callshop "qshop"+@shop_index,1;
        	npcshopattach "qshop"+@shop_index;
        	end;
        }
        mes "[NamaNPC]";
        mes "Halo, Aku adalah NPC contoh.";
        mes "Apa yang ingin kamu buat?";
    	//for (.@i = 0;.@i < getarraysize(getd(".q_list_"+@shop_index));.@i++)
    	//	mes "- " + mesitemlink(getd(".q_list_"+@shop_index+"["+ .@i + "]"));
    	.@menu$ = "";
    	for (.@i = 0;.@i < getarraysize(getd(".q_list_"+@shop_index));.@i++)
    		.@menu$ += getitemname(getd(".q_list_"+@shop_index+"["+ .@i + "]")) + ":";
    	.@s = select(.@menu$) - 1;
       	setarray .@q[0],getd(".q_list_"+@shop_index+"["+ .@s + "]"),1;
       	copyarray .@q[3],getd(".q_"+@shop_index+"_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+@shop_index+"_"+.@q[0]));
       	clear;
    
    OnBuyItem:
        // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
        if (!.SkipShop) {
        	setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
        	copyarray .@q[3],getd(".q_"+@shop_index+"_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+@shop_index+"_"+.@q[0]));
        }
        mes "[NamaNPC]";
        set .@q[2],.@q[1]*.@q[3];
        if (!.@q[2] || .@q[2] > 30000) {
            mes "You can't purchase that many "+getitemname(.@q[0])+".";
            close;
        }
        mes "Untuk membuat";
        //mes "^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000";
        mes "^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"") + mesitemlink(.@q[0]) + "^000000, kamu membutuhkan:";
        disable_items;
        if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000";
        if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000";
        if (.@q[6]) {
        	for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) {
            	//mes (.@q[.@i+2]?"":"dan ") + Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000" + (.@q[.@i+2]?",":".");
            	mes (.@q[.@i+2]?"":"dan ") + Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+mesitemlink(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000" + (.@q[.@i+2]?",":".");
    		}
    	}
        setarray @qe[1], getiteminfo(.@q[0], ITEMINFO_LOCATIONS), getiteminfo(.@q[0], ITEMINFO_VIEW);
        if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT)))
            set .@preview,1;
        addtimer 1000, strnpcinfo(0)+"::OnEnd";
        while(1) {
            switch(select("Membuat ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+":^777777Membatalkan^000000")) {
            case 1:
            	mes "[NamaNPC]";
                if (@qe[0]) {
                    mes "Kamu tidak memiliki bahan yang cukup.";
                    close;
                }
                if (!checkweight(.@q[0],.@q[2])) {
                    mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0], ITEMINFO_WEIGHT))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
                    close;
                }
                if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]);
                if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]);
                if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
                    delitem .@q[.@i],.@q[.@i+1]*.@q[1];
                if (rand(100) >= .Chance) {
                	mes "Pembuatan " + getitemname(.@q[0]) + " gagal!";
                	close;
                }
                getitem .@q[0],.@q[2];
                mes "Berhasil membuat " + getitemname(.@q[0]) + "!";
                close;
            case 2:
                setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
                if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
                else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
                else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
                else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
                break;
            case 3:
                close;
            }
        }
    
    OnEnd:
        if (@qe[7]) {
            changelook LOOK_HEAD_BOTTOM, @qe[3];
            changelook LOOK_HEAD_TOP, @qe[4];
            changelook LOOK_HEAD_MID, @qe[5];
            changelook LOOK_ROBE, @qe[6];
        }
        deletearray @qe[0],8;
        end;
    
    function Add {
        if (getitemname(getarg(1)) == "null") {
            debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
            return;
        }
        setarray .@j[0],getarg(2),getarg(3),getarg(4);
        for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
            if (getitemname(getarg(.@i)) == "null") {
                debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
                return;
            } else
                setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
        }
        copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j);
        npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
        .@ii = getarraysize(getd(".q_list_"+getarg(0)));
        setarray getd(".q_list_"+getarg(0)+"["+.@ii+"]"),getarg(1);
        return;
    }
    
    function Chk {
        if (getarg(0) < getarg(1)) {
            set @qe[0],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), ITEMINFO_TYPE) == 4 || getiteminfo(getarg(0), ITEMINFO_TYPE) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]";
            default: return .@s$;
        }
    }
    }
    
    function	script	qshop	{
        deletearray @i[0],getarraysize(@i);
        for(set .@i,0; .@i<getargcount(); set .@i,.@i+1)
            set @i[.@i],getarg(.@i);
        doevent "quest_shop::OnMenu";
        end;
    }
    
    
    // Dummy shop data -- copy as needed.
    //============================================================
    -	shop	qshop1	-1,909:-1
    -	shop	qshop2	-1,909:-1

    Temukan bagian ini untuk menambahkan lebih banyak item:

        Add(1,12046,1,0,0,501,2,514,3);
        Add(1,12061,1,0,0,501,1,514,2,518,1);
        Add(1,12047,1,0,0,507,10,508,10,510,5);
        Add(1,12048,1,0,0,509,10,518,2,7452,1);
        Add(1,12044,1,0,0,507,3,508,2,511,3,568,1,517,5,7453,1);
        Add(1,12065,1,0,0,520,2,521,3,7100,10,7198,6,7453,1,7452,1);
        Add(1,12060,1,0,0,7006,20,520,10,507,10,1062,20,7482,1);
        Add(1,12055,1,0,0,553,20,508,10,511,20,7455,1,7456,1);

     

  10. 11 hours ago, ManokStreZ said:

     

    already download common, still like this

     

      Reveal hidden contents

    image.thumb.jpeg.18234310d228a086363096a1f2a78c7d.jpeg

     

    Hi. Common file needs to come before questingboard file in \npc\scripts_custom.conf so that it can load first. Example:

    npc: npc/custom/LoadFirst.txt
    npc: npc/custom/LoadSecond.txt
      
    npc: npc/custom/common.txt
    npc: npc/custom/PlayerQuestingBoard.txt
      
    npc: npc/custom/LoadLast.txt

     

  11. Hi. Option 2:

    -	script	Automatic_Leave_Party	HIDDEN_WARP_NPC,{
    OnInit:
    	
    	
    	//Put here Maintowns maps names
    	setarray .maps$,"prontera","geffen","aldebaran";
    	
    
    	for(.@i = 0; .@i < getarraysize(.maps$); .@i++)
    		setmapflag .maps$[.@i], mf_loadevent;
    	end;
    
    OnPCLoadMapEvent:
    	if (inarray(.maps$, strcharinfo(3)) >= 0)
    		party_delmember;
    	end;
    }

     

  12. On 4/12/2024 at 5:12 PM, aleph075 said:

    ¿Que ventajas tiene este emulador que me ofreces? Insisto con mi idea del punto 3

    Hola, creo que rAthena tiene más soporte y actualizaciones.

    1- Abre \npc\re\scripts_jobs.conf. Encuentra y comenta estas líneas:

    // - 3-1
    npc: npc/re/jobs/3-1/archbishop.txt
    npc: npc/re/jobs/3-1/mechanic.txt
    npc: npc/re/jobs/3-1/ranger.txt
    npc: npc/re/jobs/3-1/rune_knight.txt
    npc: npc/re/jobs/3-1/warlock.txt
    npc: npc/re/jobs/3-1/guillotine_cross.txt
    // - 3-2
    npc: npc/re/jobs/3-2/genetic.txt
    npc: npc/re/jobs/3-2/minstrel.txt
    npc: npc/re/jobs/3-2/royal_guard.txt
    npc: npc/re/jobs/3-2/shadow_chaser.txt
    npc: npc/re/jobs/3-2/sorcerer.txt
    npc: npc/re/jobs/3-2/sura.txt
    npc: npc/re/jobs/3-2/wanderer.txt

    2- NPC actualizado:

    prontera,153,193,6	script	Job Master	123,{
    function Get_Job_Equip;
    // Checks if the Player has the required level.
    // closes if not, returns if yes
    function    Require_Level    {
        if (BaseLevel < getarg(0) || JobLevel < getarg(1)) {
            .@blvl = getarg(0) - BaseLevel;
            .@jlvl = getarg(1) - JobLevel;
            mes "Level requirement:";
            mes ((getarg(0)>1)? 
                "^bb0000"+getarg(0)+"^000000 (^bb0000Base^000000) / ":"")+"^00bb00"+
                getarg(1)+"^000000 (^00bb00Job^000000)";
            mes "You need " +
                ((.@blvl > 0) ? "^bb0000"+.@blvl+"^000000 more base levels " + 
                    ((.@jlvl > 0) ? "and " : "") : "") +
                ((.@jlvl > 0) ? "^00bb00"+.@jlvl+"^000000 more job levels " : "") +
                "to continue.";
            close;
        }
        return;
    }
    
    // Checks if the given eac is a baby class
    function Is_Baby    {
        return ((getarg(0, eaclass())&EAJL_BABY)>0);
    }
    
    // Checks if the player can change to third class.
    // Note: This does not include the level checks.
    function    Can_Change_Third    {
        // To change to third class you either need to be:
        // * Second Class
        // * Transcendent Second Class
        // * Baby Second Class
        if( !.ThirdClass )
            return false; // Third job change disabled
        if( !(eaclass()&EAJL_2) )
            return false; // Not second Class
        if( eaclass()&EAJL_THIRD )
            return false; // Already Third Class
        if( roclass(eaclass()|EAJL_THIRD) < 0 )
            return false; // Job has no third Class
        if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE )
            return false; // Exp. Super Novice equals 3rd Cls, but has it's own case
        if( Is_Baby() && (!.BabyClass || !.BabyThird) )
            return false; // No Baby (Third) change allowed
        return true;
    }
    
    function    Can_Rebirth    {
        // To rebirth, you need to be:
        // * Second Class
        if( !.RebirthClass )
            return false; // Rebirth disabled
        if( !(eaclass()&EAJL_2) )
            return false; // Not second Class
        if( eaclass()&(EAJL_UPPER|EAJL_THIRD) )
            return false; // Already Rebirthed/ Third Class
        if( roclass(eaclass()|EAJL_UPPER) < 0 )
            return false; // Job has no transcended class
        if( Is_Baby() && !.BabyClass )
            return false; // No Baby changes allowed
        return true;
    }
    
    // Checks if the given eac is a first class
    function    Is_First_Cls    {
        return (getarg(0) <= EAJ_TAEKWON);
    }
    
    function    Check_Riding    {
        // Note: Why we should always check for Riding:
        // Mounts are considered as another class, which
        // would make this NPC bigger just to handle with
        // those special cases.
        if (checkfalcon() || checkcart() || checkriding() || ismounting()) {
            mes "Please remove your " +
                ((checkfalcon()) ? "falcon" : "") +
                ((checkcart()) ? "cart" : "") +
                ((checkriding()) ? "Peco" : "") +
                ((ismounting()) ? "mount" : "") +
                " before proceeding.";
            close;
        }
        return;
    }
    function    Check_SkillPoints    {
        if (.SkillPointCheck && SkillPoint) {
            mes "Please use all your skill points before proceeding.";
            close;
        }
        return;
    }
    
    // addJobOptions is essentially the same like
    // setarray .@array[getarraysize(.@array)],opt1,opt2,...;
    // It's just easier to read, since we're using it very often
    function    Job_Options    {
        .@argcount = getargcount();
        .@arr_size = getarraysize(getarg(0));
        for( .@i = 1; .@i < .@argcount; .@i++) {
            setarray getelementofarray(getarg(0), .@arr_size++),getarg(.@i);
        }
    }
    
    // Begin of the NPC
        mes .NPCName$;
        Check_Riding();
        Check_SkillPoints();
    
        // initialisation
        .@eac = eaclass();
        .@third_possible = Can_Change_Third();
        .@rebirth_possible = Can_Rebirth();
        .@first_eac = .@eac&EAJ_BASEMASK;
        .@second_eac = .@eac&EAJ_UPPERMASK;
        // Note: These are already set in pc.cpp
        // BaseClass = roclass(.@eac&EAJ_BASEMASK) which is the players First Class
        // BaseJob = roclass(.@eac&EAJ_UPPERMASK) which is the players Second Class
        //dispbottom "Debug: eac ("+.@eac+"), third ("+.@third_possible+"), rebirth("+.@rebirth_possible+"), BaseClass ("+BaseClass+"), BaseJob ("+BaseJob+")";
            
        // From here on the jobmaster checks the current class
        // and fills the the array `.@job_opt` with possible
        // job options for the player.
        
        if( .@rebirth_possible ) {
        	if (.JumpRebirth) {
        		// SALTAR AL TRASCENDENTE
    	        Require_Level(.Req_Second[0], .Req_Second[1]);
    	        Job_Options(.@job_opt, Class + Job_Novice_High);
        	}
        	else {
            	// Rebirth option (displayed on the top of the menu)
            	Require_Level(.Req_Rebirth[0], .Req_Rebirth[1]);
           		Job_Options(.@job_opt, Job_Novice_High);
           	}
        }
        if( .@third_possible ) {
            // Third Job change (displayed below rebirth)
            Require_Level(.Req_Third[0], .Req_Third[1]);
            Job_Options(.@job_opt, roclass(.@eac|EAJL_THIRD));
        }
         
        if (.SecondExpanded && 
           (.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE && // is Super Novice
           !(eaclass()&EAJL_THIRD) ) {                     // not already Expanded SN
            // (Baby) Super Novice to Expanded (Baby) Super Novice
               if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) {
                // .BabyClass & .BabyExpanded must be enabled if the is a baby
                Require_Level(.Req_Exp_SNOVI[0], .Req_Exp_SNOVI[1]);
                Job_Options(.@job_opt,roclass(.@eac|EAJL_THIRD)); // Expanded SN is "third" cls
            }
        }
        
        if (.SecondExpanded && 
            ((.@eac&(~EAJL_BABY)) == EAJ_NINJA ||         // is (Baby) Ninja
            (.@eac&(~EAJL_BABY)) == EAJ_GUNSLINGER)) {    // is (Baby) Gunslinger
            // (Baby) Ninja to (Baby) Kagerou / Oboro
            // (Baby) Gunslinger to (Baby) Rebellion
            if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) {
                // .BabyClass & .BabyExpanded must be enabled if the is a baby
                Require_Level(.Req_Exp_NJ_GS[0], .Req_Exp_NJ_GS[1]);
                // Kagerou, Oboro, Rebellion are considered as a 2-1 class
                Job_Options(.@job_opt, roclass(.@eac|EAJL_2_1));
            }
        }
        
        // Player is Job_Novice, Job_Novice_High or Job_Baby
        if (.@first_eac == EAJ_NOVICE && .@second_eac != EAJ_SUPER_NOVICE) {
            // MAPID_NOVICE, MAPID_SUPER_NOVICE, MAPID_NOVICE_HIGH, MAPID_BABY
            Require_Level(.Req_First[0], .Req_First[1]);
            switch(Class) {
                case Job_Novice:
                    // First job change
                    Job_Options(.@job_opt,Job_Swordman,
                        Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief,
                        Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja);
                    if( .BabyNovice )
                        Job_Options(.@job_opt, Job_Baby);
                    break;
                case Job_Novice_High:
                    // Job change after rebirth
                    if( .LastJob && lastJob )
                        Job_Options(.@job_opt,
                            roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER));
                    else
                        Job_Options(.@job_opt, 
                            Job_Swordman_High, Job_Mage_High, Job_Archer_High,
                            Job_Acolyte_High, Job_Merchant_High, Job_Thief_High);
                    break;
                case Job_Baby:
                    if( !.BabyClass )
                        break;
                    // First job change as a baby
                    Job_Options(.@job_opt, Job_Baby_Swordman, Job_Baby_Mage,
                        Job_Baby_Archer,Job_Baby_Acolyte, Job_Baby_Merchant,
                        Job_Baby_Thief);
                    if( .BabyExpanded )
                        Job_Options(.@job_opt, Job_Super_Baby, Job_Baby_Taekwon,
                            Job_Baby_Gunslinger, Job_Baby_Ninja);
                    if( .BabySummoner )
                        Job_Options(.@job_opt, Job_Baby_Summoner);
                    break;
                default:
                    mes "An error has occurred.";
                    close;
            }
        } else if( Is_First_Cls(.@eac) ||                 // First Class
                   Is_First_Cls(.@eac&(~EAJL_UPPER)) ||    // Trans. First Cls
                   (.BabyClass && Is_First_Cls(.@eac&(~EAJL_BABY))) ) {    // Baby First Cls
            // Player is First Class (not Novice)
            // most jobs should have two options here  (2-1 and 2-2)
            .@class1 = roclass(.@eac|EAJL_2_1); // 2-1
            .@class2 = roclass(.@eac|EAJL_2_2); // 2-2
            // dispbottom "Debug: Classes: class1 ("+.@class1+"), class2 ("+.@class2+")";
            if(.LastJob && lastJob && (.@eac&EAJL_UPPER)) {
                // Player is rebirth Cls and linear class changes are enforced
                Require_Level(.Req_Second[0], .Req_Second[1]);
                Job_Options(.@job_opt, lastJob + Job_Novice_High);
            } else {
                // Class is not enforced, player can decide.
                if( .@class1 > 0 ) { // 2-1
                    Require_Level(.Req_Second[0], .Req_Second[1]);
                    Job_Options(.@job_opt, .@class1);
                }
                if( .@class2 > 0 ) { // 2-2
                    Require_Level(.Req_Second[0], .Req_Second[1]);
                    Job_Options(.@job_opt, .@class2);
                }
            }
        }
        
        // Displaying the Job Menu defined by .@job_opt.
        // .@job_opt should not be changed below this line.
        function Job_Menu;
        Job_Menu(.@job_opt);
        close;
    
    // Displays the job menu
    function    Job_Menu    {
        // getarg(0) is the .@job_opt array holding all available job changes.
        function Confirm_Change;
        while(true) {
            .@opt_cnt =  getarraysize(getarg(0));
            if( .@opt_cnt <= 0 ) {
                mes "No more jobs are available.";
                close;
            }
    
            .@selected = 0; // Just a single job class given, no select needed
            if (.@opt_cnt > 1) {
                // Multiple job classes given. Select one and save it to .@class
                // After that confirm .@class
                mes "Select a job.";
                .@menu$ = "";
                for (.@i = 0; .@i < .@opt_cnt; .@i++) {
                    if( getelementofarray(getarg(0), .@i) == Job_Novice_High)
                        .@jobname$ = "^0055FFRebirth^000000";
                    else
                        .@jobname$ = jobname(getelementofarray(getarg(0), .@i));
                    .@menu$ = .@menu$ + " ~ " + .@jobname$ + ":";
                }
                .@menu$ = .@menu$+" ~ ^777777Cancel^000000";
                .@selected = select(.@menu$) - 1;
                if( .@selected < 0 || .@selected >= .@opt_cnt )
                    close;
                next;
                mes .NPCName$;
            }
            .@class = getelementofarray(getarg(0), .@selected);
            if ((.@class == Job_Super_Novice || .@class == Job_Super_Baby) &&
                    BaseLevel < .SNovice) {
                // Special Level Requirement because Super Novice and
                // Super Baby can both be selected in one of the first class
                // changes. That's why the Level Requirement is after and not before
                // the selection.
                mes "A base level of " + .SNovice +
                    " is required to turn into a " + jobname(.@class) + ".";
                return;
            }
            // Confirm the Class
            Confirm_Change(.@class, .@opt_cnt > 1);
            next;
            mes .NPCName$;
        }
        return;
    }
    
    
    // Executes the actual jobchange and closes.
    function    Job_Change    {
        .@previous_class = Class;
        .@to_cls = getarg(0);
        next;
        mes .NPCName$;
        mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!";
        if (.@to_cls == Job_Novice_High && .LastJob)
            lastJob = Class; // Saves the lastJob for rebirth
        jobchange .@to_cls;
        if (.@to_cls == Job_Novice_High)
            resetlvl(1);
        else if (.@to_cls == Job_Baby) {
            resetstatus;
            resetskill;
            set SkillPoint,0;
        }
        specialeffect2 EF_ANGEL2;
        specialeffect2 EF_ELECTRIC;
        if (.@previous_class != Class) {
            if (.Platinum)
                callfunc "F_GetPlatinumSkills";
            if (.GetJobEquip)
                Get_Job_Equip();
        }
        close; // Always closes after the change
    }
    
    function    Confirm_Change    {
        // Player confirms he want to change into .@class
        .@class = getarg(0, -1);
        .@back = getarg(1, false);
        if( .@class < 0 || eaclass(.@class) == -1 ) {
            mes "Unknown Class Error.";
            close;
        }
        mes "Do you want to change into ^0055FF"+jobname(.@class)+"^000000 class?";
        .@job_option$ = " ~ Change into ^0055FF"+jobname(.@class)+"^000000 class";
        if( .@class == Job_Novice_High)
            .@job_option$ = " ~ ^0055FFRebirth^000000";
        
        if (select(.@job_option$+": ~ ^777777" + 
                ((.@back) ?"Go back" : "Cancel") + "^000000") == 1) {
            Job_Change(.@class);
        }
        if (!.@back)
            close; // "Cancel" pressed
        return;
    }
    
    // Function which gives a job related item to the player
    // the items are the rewards from the original job change quests
    function    Get_Job_Equip    {
        // Note: The item is dropping, when the player can't hold it.
        // But that's better than not giving the item at all.
        .@eac = eaclass();
        if( .@eac&EAJL_THIRD ) {
            // Third Class Items
            getitem 2795,1;    //    Green Apple Ring for every 3rd Class
            switch(BaseJob) {
                // BaseJob of Third Cls
                // For Normal Third, Baby Third and Transcended Third Cls
                case Job_Knight:
                    getitem 5746,1;    break;    //    Rune Circlet [1]
                case Job_Wizard:
                    getitem 5753,1;    break;    //    Magic Stone Hat [1]
                case Job_Hunter:
                    getitem 5748,1;    break;    //    Sniper Goggle [1]
                case Job_Priest:
                    getitem 5747,1;    break;    //    Mitra [1]
                case Job_Blacksmith:
                    getitem 5749,1;    break;    //    Driver Band [1]
                case Job_Assassin:
                    getitem 5755,1;    break;    //    Silent Executor [1]
                case Job_Crusader:
                    getitem 5757,1;    break;    //    Dip Schmidt Helm [1]
                case Job_Sage:
                    getitem 5756,1;    break;    //    Wind Whisper [1]
                case Job_Bard:
                    getitem 5751,1;    break;    //    Maestro Song's Hat [1]
                case Job_Dancer:
                    getitem 5758,1;    break;    //    Dying Swan [1]
                case Job_Monk:
                    getitem 5754,1;    break;    //    Blazing Soul [1]
                case Job_Alchemist:
                    getitem 5752,1;    break;    //    Midas Whisper[1]
                case Job_Rogue:
                    getitem 5750,1;         //    Shadow Handicraft [1]
                    getitem 6121,1;            //    Makeover Brush
                    getitem 6122,1;    break;    //    Paint Brush
            }
        } else if (.@eac&EAJL_2) {
            // Second Class (And not Third Class)
            switch(BaseJob) {
                // Second Class
                case Job_Knight:
                    getitem 1163,1;    break;    //    Claymore [0]
                case Job_Priest:
                    getitem 1522,1;    break;    //    Stunner [0]
                case Job_Wizard:
                    getitem 1617,1;    break;    //    Survivor's Rod [0]
                case Job_Blacksmith:
                    getitem 1360,1;    break;    //    Two-Handed-Axe [1]
                case Job_Hunter:
                    getitem 1718,1;    break;    //    Hunter Bow [0]
                case Job_Assassin:
                    getitem 1254,1;    break;    //    Jamadhar [0]
                case Job_Crusader:
                    getitem 1410,1;    break;    //    Lance [0]
                case Job_Monk:
                    getitem 1807,1;    break;    //    Fist [0]
                case Job_Sage:
                    getitem 1550,1;    break;    //    Book [3]
                case Job_Rogue:
                    getitem 1222,1;    break;    //    Damascus [1]
                case Job_Alchemist:
                    getitem 1126,1;    break;    //    Saber [2]
                case Job_Bard:
                    getitem 1907,1;    break;    //    Guitar [0]
                case Job_Dancer:
                    getitem 1960,1;    break;    //    Whip [1]
                case Job_Super_Novice:
                    getitem 1208,1;    break;    //    Main Gauche [4]
                case Job_Star_Gladiator:
                    getitem 1550,1;    break;    //    Book [3]
                case Job_Soul_Linker:
                    getitem 1617,1;    break;    //    Survivor's Rod [0]
            }
        } else {
            // Neither Second or Third Cls
            // => First Cls or not covered by the switch
            switch(BaseClass) {
                // First Class
                case Job_Swordman:
                    getitem 1108,1;    break;    //    Blade [4]
                case Job_Mage:
                    getitem 1602,1;    break;    //    Rod [4]
                case Job_Archer:
                    getitem 1705,1;    break;    //    Composite Bow [4]
                case Job_Acolyte:
                    getitem 1505,1;    break;    //    Mace [4]
                case Job_Merchant:
                    getitem 1302,1;    break;    //    Axe [4]
                case Job_Thief:
                    getitem 1208,1;    break;    //    Main Gauche [4]
                case Job_Gunslinger:
                    getitem 13101,1; break;    //    Six Shooter [2]
                case Job_Ninja:
                    getitem 13010,1; break;    //    Asura [2]
            }
        }
        return;
    }
    
    OnInit:
        // Initialisation, do not edit these
        .NPCName$ = "[Job Master]";
        
        // Settings
        .ThirdClass = false;            // Enable third classes?
        .RebirthClass = true;            // Enable rebirth classes?
        .SecondExpanded = true;        // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion?
        .BabyNovice = true;    // Enable Baby novice classes? Disable it if you like player must have parent to get job baby.
        .BabyClass = true;                // Enable Baby classes?
        .BabyThird = false;                // Enable Baby third classes?
        .BabyExpanded = true;            // Enable Baby Expanded classes: Ex. Baby Ninja, Baby Taekwon, etc.
        .BabySummoner = true;            // Enable Baby Summoner?
        .LastJob = true;                // Enforce linear class changes?
        .SkillPointCheck = true;        // Force player to use up all skill points?
        .Platinum = true;                // Get platinum skills automatically?
        .GetJobEquip = false;            // Get job equipment (mostly weapons) on job change?
        .JumpRebirth = true;					// SALTAR AL TRASCENDENTE
    
        // Level Requirements
        setarray .Req_First[0],1,10;         // Minimum base level, job level to turn into 1st class
        setarray .Req_Second[0],1,40;         // Minimum base level, job level to turn into 2nd class
        setarray .Req_Rebirth[0],99,50;        // Minimum base level, job level to rebirth
        setarray .Req_Third[0],99,50;        // Minimum base level, job level to change to third class
        setarray .Req_Exp_NJ_GS[0],99,70;     // Minimum base level, job level to turn into Expanded Ninja and Gunslinger
        setarray .Req_Exp_SNOVI[0],99,99;     // Minimum base level, job level to turn into Expanded Super Novice
        .SNovice = 45;                        // Minimum base level to turn into Super Novice
        
        // Setting adjustments by PACKETVER
        if( PACKETVER < 20161207 ) {
            if( .BabyExpanded )
                debugmes "jobmaster: BabyExpanded is disabled due to outdated PACKETVER.";
            if( .BabySummoner )
                debugmes "jobmaster: BabySummoner is disabled due to outdated PACKETVER.";
            .BabyExpanded = false;
            .BabySummoner = false;
        }
        end;
    }

    3- Sí.

    • Upvote 1
  13. Hi. Try this one if you do not want to use instance system, modified from AnnieRuru' Private MVP & Branch Room in \npc\custom\etc\mvp_room.txt

    //===== rAthena Script =======================================
    //= Private MVP & Branch Room
    //===== By: ==================================================
    //= AnnieRuru
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Allows players to rent an MVP room for personal use,
    //= or for a party or guild.
    //===== Additional Comments: =================================
    //= 1.0 First version, edited. [Euphy]
    //============================================================
    
    prontera,148,174,5	script	DB Room Manager	4_F_RUSGREEN,{
    	mes "[^EFCC00 DB Room Manager ^000000]";
    	mes "How are thing with you?", " ";
    	mes "I offer two types of DB Room. Choose what best suits your need.";
    	switch(select("Public DB Room", "Private DB Room", "Buy Branches", "Cancel")) {
    		case 1:
    			.@room = select(
    				"Enter Room 1 ["+ getmapusers("06guild_01") +"]",
    				"Enter Room 2 ["+ getmapusers("06guild_02") +"]",
    				"Enter Room 3 ["+ getmapusers("06guild_03") +"]",
    				"Enter Room 4 ["+ getmapusers("06guild_04") +"]");
    			warp "06guild_0"+ .@room, 0,0;
    			end;
    		case 2:
    			clear;
    			mes "[^EFCC00 DB Room Manager ^000000]";
    			if ( getvariableofnpc( .rentcost, "DB Room Helper" ) )
    				mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "DB Room Helper" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "DB Room Helper" ) ) +"z.";
    			else
    				mes "You can only use the room for only "+ getvariableofnpc( .timeout, "DB Room Helper" ) +" minutes.";
    			mes " ";
    			.@menu$ = "";
    			for ( .@i = 5; .@i <= 8; .@i++ ) {
    				if ( getvariableofnpc( .renttime[.@i], "DB Room Helper" ) ) {
    					//mes "Room #"+ .@i +" = "+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000";
    					.@menu$ += "Enter Room " + .@i + " ["+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000]:";
    				}
    				else
    					.@menu$ += "Rent Room " + .@i + ":";
    			}
    			next;
    			.@room = select(.@menu$)+4;
    			if ( getvariableofnpc( .renttime[.@room], "DB Room Helper" ) ) {
    				if ( .inuseid[.@room] == getcharid( .type[.@room] ) ) {
    					warp "06guild_0"+ .@room, 0,0;
    					close;
    				} else {
    					mes "[^EFCC00 DB Room Manager ^000000]";
    					mes "This room is reserved for ";
    					mes .color$[ .type[.@room] ] + .whoinuse$[.@room] +"^000000.";
    					mes "Please select another.";
    					close;
    				}
    			}
    			mes "[^EFCC00 DB Room Manager ^000000]";
    			mes "Reserve this room for...";
    			next;
    			.@type = select( "For my party members", "For my guild members", "For personal account use" );
    			if ( !getcharid(.@type) ) {
    				mes "[^EFCC00 DB Room Manager ^000000]";
    				mes "You do not own a "+( ( .@type == 1 )? "Party" : "Guild" )+".";
    				close;
    			}
    			else if ( Zeny < getvariableofnpc( .rentcost, "DB Room Helper" ) ) {
    				mes "You don't have enough zeny to rent a room.";
    				close;
    			}
    			else if ( getvariableofnpc( .renttime[.@room], "DB Room Helper" ) ) {
    				mes "[^EFCC00 DB Room Manager ^000000]";
    				mes "I'm sorry, somebody else has already registered this room faster than you.";
    				close;
    			}
    			for ( .@i = 1; .@i <= 8; .@i++ ) {
    				if ( ( getvariableofnpc( .renttime[.@i], "DB Room Helper" ) ) && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) {
    					mes "[^EFCC00 DB Room Manager ^000000]";
    					mes "You already rented Room#"+ .@i +". Use that room instead.";
    					close;
    				}
    			}
    			set .type[.@room], .@type;
    			set .inuseid[.@room], getcharid(.@type);
    			set .whoinuse$[.@room], strcharinfo( ( .@type == 3 )? 0 : .@type );
    			Zeny -= getvariableofnpc( .rentcost, "DB Room Helper" );
    			warp "06guild_0"+ .@room, 0,0;
    			killmonsterall "06guild_0"+ .@room;
    			donpcevent "Private DB Room Helper#"+ .@room +"::OnEnterMap";
    			close;
    		case 3:
    			close2;
    			callshop "DB_Room#branch", 1;
    			end;
    		case 4:
    			close;
    	}
    
    OnInit:
    	.color$[1] =  "^EE8800"; // party color
    	.color$[2] =  "^70CC11"; // guild color
    	.color$[3] =  "^0000FF"; // account color
    	end;
    }
    
    -	script	DB Room Helper	-1,{
    	if (.renttime[ atoi( strnpcinfo(2) ) ])
    		npctalk "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 ),strnpcinfo(0),bc_self;
    	switch ( select(.menu$ + "Leave this room:" + (compare(strnpcinfo(1),"Private")?"Give up this room":"") ) ) {
    	case 1:
    		if ( mobcount( "this","" ) ) {
    			npctalk "I cannot offer heal service when there are monsters around.",strnpcinfo(0),bc_self;
    			end;
    		}
    		sc_end SC_STONE;
    		sc_end SC_SLOWDOWN;
    		sc_end SC_FREEZE;
    		sc_end SC_SLEEP;
    		sc_end SC_CURSE;
    		sc_end SC_SILENCE;
    		sc_end SC_CONFUSION;
    		sc_end SC_BLIND;
    		sc_end SC_BLEEDING;
    		sc_end SC_DECREASEAGI;
    		sc_end SC_POISON;
    		sc_end SC_HALLUCINATION;
    		sc_end SC_STRIPWEAPON;
    		sc_end SC_STRIPARMOR;
    		sc_end SC_STRIPHELM;
    		sc_end SC_STRIPSHIELD;
    		sc_end SC_CHANGEUNDEAD;
    		sc_end SC_ORCISH;
    		sc_end SC_BERSERK;
    		sc_end SC_SKE;
    		sc_end SC_SWOO;
    		sc_end SC_SKA;
    		percentheal 100,100;
    		specialeffect2 EF_HEAL;
    		npctalk "You are completely healed.",strnpcinfo(0),bc_self;
    		end;
    	case 2:
    		npctalk "Are you sure you want to leave this room?",strnpcinfo(0),bc_self;
    		if ( select( "No, stay here","Yes, leave now") == 2 )
    			warp .respawnmap$, .respawnx, .respawny;
    		end;
    	case 3:
    		if ( getmapusers( strcharinfo(3) ) > 1 ) {
    			npctalk "There are still some players in this room. Make sure you are the last member in this room to use this option.",strnpcinfo(0),bc_self;
    			end;
    		}
    		mes "[DB Room Helper]";
    		mes "Are you sure you want to give up this room?";
    		if ( .rentcost )
    			mes "You will need to pay again to enter this room.";
    		next;
    		if ( select( "Yes", "No" ) == 2 ) close;
    		awake strnpcinfo(0);
    		end;
    	}
    	close;
    
    OnEnterMap:
    	.@id = atoi( strnpcinfo(2) );
    	.renttime[.@id] = gettimetick(2);
    	sleep .timeout * 60000;
    	mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
    	.renttime[.@id] = 0;
    	killmonsterall strnpcinfo(4);
    	end;
    
    OnInit:
    	if ( !getstrlen( strnpcinfo(2) ) ) {
    
    //	Config ---------------------------------------------------------------------------------------
    
    	// Room rental time, in minutes.
    	// When time runs out, all players inside the room will be kicked out.
    	// Do NOT set this to zero!
    	.timeout = 60;
    
    	.rentcost = 100000;	// Zeny cost for renting a room (0 = free)
    
    	//	Options setting inside the room
    	.@menu[1] = 1;	// Turn Heal option On/Off
    
    	// Respawn point when players leave the room
    	set .respawnmap$, "prontera";
    	set .respawnx, 150;
    	set .respawny, 174;
    
    
    //	Config Ends ------------------------------------------------------------------------
    
    		if ( !.timeout ) set .timeout, 60;
    		.menu$ = ( .@menu[1] ? "Heal" : "" ) +":" ;
    	}
    	else {
    		mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map;
    		mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
    	}
    	end;
    }
    
    -	shop	DB_Room#branch	-1,604:100000,12103:10000000
    
    06guild_01,49,49,4	duplicate(DB Room Helper)	DB Room Helper#1	4_F_RUSGREEN
    06guild_02,49,49,4	duplicate(DB Room Helper)	DB Room Helper#2	4_F_RUSGREEN
    06guild_03,49,49,4	duplicate(DB Room Helper)	DB Room Helper#3	4_F_RUSGREEN
    06guild_04,49,49,4	duplicate(DB Room Helper)	DB Room Helper#4	4_F_RUSGREEN
    06guild_05,49,49,4	duplicate(DB Room Helper)	Private DB Room Helper#5	4_F_RUSGREEN
    06guild_06,49,49,4	duplicate(DB Room Helper)	Private DB Room Helper#6	4_F_RUSGREEN
    06guild_07,49,49,4	duplicate(DB Room Helper)	Private DB Room Helper#7	4_F_RUSGREEN
    06guild_08,49,49,4	duplicate(DB Room Helper)	Private DB Room Helper#8	4_F_RUSGREEN
    
    06guild_01	mapflag	nowarpto
    06guild_02	mapflag	nowarpto
    06guild_03	mapflag	nowarpto
    06guild_04	mapflag	nowarpto
    06guild_05	mapflag	nowarpto
    06guild_06	mapflag	nowarpto
    06guild_07	mapflag	nowarpto
    06guild_08	mapflag	nowarpto
    06guild_01	mapflag	nomemo
    06guild_02	mapflag	nomemo
    06guild_03	mapflag	nomemo
    06guild_04	mapflag	nomemo
    06guild_05	mapflag	nomemo
    06guild_06	mapflag	nomemo
    06guild_07	mapflag	nomemo
    06guild_08	mapflag	nomemo
    06guild_01	mapflag	noteleport
    06guild_02	mapflag	noteleport
    06guild_03	mapflag	noteleport
    06guild_04	mapflag	noteleport
    06guild_05	mapflag	noteleport
    06guild_06	mapflag	noteleport
    06guild_07	mapflag	noteleport
    06guild_08	mapflag	noteleport
    06guild_01	mapflag	nosave	SavePoint
    06guild_02	mapflag	nosave	SavePoint
    06guild_03	mapflag	nosave	SavePoint
    06guild_04	mapflag	nosave	SavePoint
    06guild_05	mapflag	nosave	SavePoint
    06guild_06	mapflag	nosave	SavePoint
    06guild_07	mapflag	nosave	SavePoint
    06guild_08	mapflag	nosave	SavePoint
    06guild_01	mapflag	nopenalty
    06guild_02	mapflag	nopenalty
    06guild_03	mapflag	nopenalty
    06guild_04	mapflag	nopenalty
    06guild_05	mapflag	nopenalty
    06guild_06	mapflag	nopenalty
    06guild_07	mapflag	nopenalty
    06guild_08	mapflag	nopenalty

     

    • MVP 1
  14. Oi, a causa do erro é que o NPC não terminava a conversa para jogadores não-Doram.

    prontera,170,180,1	script	Estilista Doram	122,{
    //================================================
    
    	mes "[^0000FF Estilista Doram ^000000]";
    	mes "Oi, bebê!";
    	if (BaseClass != Job_Summoner) {
    		mes "Infelizmente eu atendo apenas gatinhos.";
    		close;
    	}
    	mes "Eu posso deixar você fabulos" + (Sex?"o":"a") + "!";
    	mes "O que deseja?";
    	setarray .@Styles[1],
    		35,
    		10,
    		11;
    	setarray .@Look[1],
    		LOOK_CLOTHES_COLOR,
    		LOOK_HAIR,
    		LOOK_HAIR_COLOR;
    	.@s = select("^FF0000 ^000000 Cor da Roupa:^FF0000 ^000000 Estilo do Pelo:^FF0000 ^000000 Cor do Pelo");
    	.@Revert = getlook(.@Look[.@s]);
    	.@Style = .@Revert;
    	while(1) {
    		setlook .@Look[.@s], .@Style;
    		message strcharinfo(0),"Este é o estlio #"+.@Style+".";
    		set .@menu$, " ~ Próximo (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Anterior (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Pular para...: ~ Voltar ao original (^0055FF"+.@Revert+"^000000)";
    		switch(select(.@menu$)) {
    		case 1:
    			set .@Style, ((.@Style != .@Styles[.@s]) ? .@Style+1 : 1);
    			break;
    		case 2:
    			set .@Style, ((.@Style != 1) ? .@Style-1 : .@Styles[.@s]);
    			break;
    		case 3:
    			message strcharinfo(0),"Escolha um estilo entre 0 e "+.@Styles[.@s]+".";
    			input .@Style,0,.@Styles[.@s];
    			if (!.@Style)
    				set .@Style, rand(1,.@Styles[.@s]);
    			break;
    		case 4:
    			set .@Style, .@Revert;
    			setlook .@Look[.@s], .@Revert;
    			break;
    		}
    	}
    }

     

  15. Hi. Most quests use variables to track player progression. So changing said variables to 0 is the same as resetting it's questline.
    Just ANY quest, you would need to find each and every variable used in the scripts.

    Example:
    Terra Gloria NPCs are in \npc\re\quests\quests_16_2.txt, inside the file you can see the variable used in the main quest is terra_gloria_main.
    Make the NPC set terra_gloria_main to 0 to reset the whole questline.

    prontera,150,150,3	script	Quest Resetter	99,{
    	mes "Which questline do you want to reset?";
    	next;
    	switch(select("Rachel", "Terra Gloria")) {
    		case 1:
    			mes "Are you sure you want to reset Rachel quests?";
    			if(select("No", "Yes") == 1)
    				close;
    			
    			rachel_quest = 0;
    			mes "Done!";
    			close;
    
    		case 2:
    			mes "Are you sure you want to reset Terra Gloria quests?";
    			if(select("No", "Yes") == 1)
    				close;
    			
    			terra_gloria_main = 0;
    			mes "Done!";
    			close;
    	}
    }

     

  16. 10 minutes ago, ManokStreZ said:

    do you know how to make 1 gym pass 2k = so total 10 gym pass is 20000 using npc script gympass?

    Hello. Open file \src\map\status.cpp and find:

    		if ((skill = pc_checkskill(sd, ALL_INCCARRY)) > 0)
    			sd->max_weight += 2000 * skill;

    Change 2000 to 20000. Save and compile your server.

  17. 18 hours ago, hendra814 said:

    i check this is not include new quest board like Rachel and Veins.

    Updated:
    iRO 2024 OngoingQuestInfoList.lub

    Also Rachel and Veins board NPCs:

    rachel,87,73,0	script	Bounty Board 80-100#rac1	2_BULLETIN_BOARD,{
    	callfunc "F_Bounty_Board", 80, 100, 20, 2,
    		1030,	63516,		697125,		697125,	// ANACONDAQ
    		1782,	63517,		697125,		697125,	// ROWEEN
    		1776,	63518,		697125,		697125;	// SIROMA
    	end;
    
    OnInit:
    	questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 80 && BaseLevel <= 100");
    	end;
    }
    
    rachel,89,73,0	script	Bounty Board 100-120#rac2	2_BULLETIN_BOARD,{
    	callfunc "F_Bounty_Board", 100, 120, 20, 2,
    		1106,	63519,		270000, 	202500,	// DESERT_WOLF
    		1781,	63520,		202500,		151950,	// DROSERA
    		1629,	63521,		285000,		213750,	// HILL_WIND
    		1777,	63522,		408600,		396600,	// ICE_TITAN
    		1775,	63523,		408600,		396600;	// SNOWIER
    	end;
    
    OnInit:
    	questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 100 && BaseLevel <= 120");
    	end;
    }
    
    rachel,91,73,0	script	Bounty Board 120-140#rac3	2_BULLETIN_BOARD,{
    	callfunc "F_Bounty_Board", 120, 140, 20, 2,
    		1769,	63524,		589950,		442350,	// AGAV
    		1770,	63525,		553500,		415200,	// ECHIO
    		1773,	63526,		563700,		422700,	// HODREMLIN
    		1772,	63527,		518400,		388800,	// ISILLA
    		1774,	63528,		601200,		450900,	// SEEKER
    		1771,	63529,		486000,		364500;	// VANBERK
    	end;
    
    OnInit:
    	questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 120 && BaseLevel <= 140");
    	end;
    }
    
    veins,226,154,0	script	Bounty Board 80-100#vei1	2_BULLETIN_BOARD,{
    	callfunc "F_Bounty_Board", 80, 100, 20, 2,
    		1784,	63530,		380400, 	285450;	// STAPO
    	end;
    
    OnInit:
    	questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 80 && BaseLevel <= 100");
    	end;
    }
    
    veins,224,154,0	script	Bounty Board 100-120#vei2	2_BULLETIN_BOARD,{
    	callfunc "F_Bounty_Board", 100, 120, 20, 2,
    		1781,	63531,		270000,		202500,	// DROSERA
    		1783,	63532,		265350,		199050,	// GALION
    		1836,	63533,		380400,		285450,	// MAGMARING
    		1780,	63534,		291600,		218700;	// MUSCIPULAR
    	end;
    
    OnInit:
    	questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 100 && BaseLevel <= 120");
    	end;
    }
    
    veins,222,154,0	script	Bounty Board 120-140#vei3	2_BULLETIN_BOARD,{
    	callfunc "F_Bounty_Board", 120, 140, 20, 2,
    		1833,	63535,		839700,		1156200,	// KASA
    		1838,	63536,		553500,		565200,		// KNOCKER
    		1831,	63539,		887700,		1070700,	// SALAMANDER
    		1870,	63537,		837000,		627600,		// NECROMANCER
    		1865,	63538,		527100,		462900,		// RAGGED_ZOMBIE
    		1864,	63540,		590700,		405300;		// ZOMBIE_SLAUGHTER
    	end;
    
    OnInit:
    	questinfo(QTYPE_QUEST, QMARK_NONE, "BaseLevel >= 120 && BaseLevel <= 140");
    	end;
    }

    And \db\import\quest_db.yml

    # iRO Bounty Board Rachel and Veins
      - Id: 63516
        Title: Bounty Board Hunt
        Targets:
          - Mob: ANACONDAQ
            Count: 150
      - Id: 63517
        Title: Bounty Board Hunt
        Targets:
          - Mob: ROWEEN
            Count: 150
      - Id: 63518
        Title: Bounty Board Hunt
        Targets:
          - Mob: SIROMA
            Count: 150
      - Id: 63519
        Title: Bounty Board Hunt
        Targets:
          - Mob: DESERT_WOLF
            Count: 150
      - Id: 63520
        Title: Bounty Board Hunt
        Targets:
          - Mob: DROSERA
            Count: 150
      - Id: 63521
        Title: Bounty Board Hunt
        Targets:
          - Mob: HILL_WIND
            Count: 150
      - Id: 63522
        Title: Bounty Board Hunt
        Targets:
          - Mob: ICE_TITAN
            Count: 150
      - Id: 63523
        Title: Bounty Board Hunt
        Targets:
          - Mob: SNOWIER
            Count: 150
      - Id: 63524
        Title: Bounty Board Hunt
        Targets:
          - Mob: AGAV
            Count: 150
      - Id: 63525
        Title: Bounty Board Hunt
        Targets:
          - Mob: ECHIO
            Count: 150
      - Id: 63526
        Title: Bounty Board Hunt
        Targets:
          - Mob: HODREMLIN
            Count: 150
      - Id: 63527
        Title: Bounty Board Hunt
        Targets:
          - Mob: ISILLA
            Count: 150
      - Id: 63528
        Title: Bounty Board Hunt
        Targets:
          - Mob: SEEKER
            Count: 150
      - Id: 63529
        Title: Bounty Board Hunt
        Targets:
          - Mob: VANBERK
            Count: 150
      - Id: 63530
        Title: Bounty Board Hunt
        Targets:
          - Mob: STAPO
            Count: 150
      - Id: 63531
        Title: Bounty Board Hunt
        Targets:
          - Mob: DROSERA
            Count: 150
      - Id: 63532
        Title: Bounty Board Hunt
        Targets:
          - Mob: GALION
            Count: 150
      - Id: 63533
        Title: Bounty Board Hunt
        Targets:
          - Mob: MAGMARING
            Count: 150
      - Id: 63534
        Title: Bounty Board Hunt
        Targets:
          - Mob: MUSCIPULAR
            Count: 150
      - Id: 63535
        Title: Bounty Board Hunt
        Targets:
          - Mob: KASA
            Count: 150
      - Id: 63536
        Title: Bounty Board Hunt
        Targets:
          - Mob: KNOCKER
            Count: 150
      - Id: 63537
        Title: Bounty Board Hunt
        Targets:
          - Mob: NECROMANCER
            Count: 150
      - Id: 63538
        Title: Bounty Board Hunt
        Targets:
          - Mob: RAGGED_ZOMBIE
            Count: 150
      - Id: 63539
        Title: Bounty Board Hunt
        Targets:
          - Mob: SALAMANDER
            Count: 150
      - Id: 63540
        Title: Bounty Board Hunt
        Targets:
          - Mob: ZOMBIE_SLAUGHTER
            Count: 150

     

    • Love 1
  18. Hi. You can use addtimer command. Example:

    -	script	cheffenia_time	HIDDEN_WARP_NPC,{
    OnPCLoadMapEvent:
    	if (compare(strcharinfo(3),"bossnia")) {
    
    		// MINUTOS QUE PODE FICAR DENTRO DA CHEFFENIA
    		.@tempo = 60;
    
    		deltimer strnpcinfo(0)+"::OnTimeEnd";
    		deltimer strnpcinfo(0)+"::OnCountdown";
    		sleep2 1;
    		if (.@tempo < 2)
    			addtimer 60000, strnpcinfo(0)+"::OnTimeEnd";
    		else
    			addtimer (.@tempo-1)*60000, strnpcinfo(0)+"::OnCountdown";
    	}
    	end;
    
    OnCountdown:
    	if (compare(strcharinfo(3),"bossnia")) {
    		announce "[Cheffênia] Seu tempo acabará em 1 minuto.", bc_self,0xFFF618,FW_NORMAL,30;;
    		addtimer (60000), strnpcinfo(0)+"::OnTimeEnd";
    	}
    	end;
    
    OnTimeEnd:
    	if (compare(strcharinfo(3),"bossnia")) {
    		announce "[Cheffênia] Seu tempo acabou.", bc_self,0xFFF618,FW_NORMAL,30;;
    		sleep2 500;
    		warp "SavePoint", 0, 0;
    	}
    	end;
    }
    
    bossnia_01	mapflag	loadevent
    bossnia_02	mapflag	loadevent
    bossnia_03	mapflag	loadevent
    bossnia_04	mapflag	loadevent

     

  19. Hi, open this file: /src/common/msg_conf.hpp and find this part:

    enum lang_types {
    	LANG_RUS = 0x01,
    	LANG_SPN = 0x02,
    	LANG_GRM = 0x04,
    	LANG_CHN = 0x08,
    	LANG_MAL = 0x10,
    	LANG_IDN = 0x20,
    	LANG_FRN = 0x40,
    	LANG_POR = 0x80,
    	LANG_THA = 0x100,
    	LANG_MAX
    };
    
    #ifndef LANG_ENABLE
    	// Multilanguage System.
    	// Define which languages to enable (bitmask).
    	// 0xFFF will enable all, while 0x000 will enable English only.
    	#define LANG_ENABLE 0x000

     

    Change 0x000 in the last line to the desired bitmask value (sum of numbers of the languages you want to use). Save and then compile your server. Examples:

     

    Enable Russian and Spanish (0x01 + 0x02 = 0x03)

    	#define LANG_ENABLE 0x03

    Enable German and Chinese (0x04 + 0x08 = 0x12)

    	#define LANG_ENABLE 0x12

    Enable Spanish and French and Portuguese (0x02 + 0x40 + 0x80 = 0x122)

    	#define LANG_ENABLE 0x122

    EDIT: Do note that @langtype have no effect on client-side text. It's only for server messages.

  20. 12 hours ago, sony0108 said:
    [Error]: buildin_callfunc: Function not found! [getNPCID]
    [Warning]: Script command 'callfunc' returned failure.
    [Debug]: Source (NPC): BK6LangES (invisible/not on a map)
    [Debug]: Source (NPC): BK6LangES is located in: npc/custom/bk/lang/BK6_ES.txt
    [Error]: buildin_callfunc: Function not found! [getNPCID]
    [Warning]: Script command 'callfunc' returned failure.
    [Debug]: Source (NPC): BK6LangEN (invisible/not on a map)
    [Debug]: Source (NPC): BK6LangEN is located in: npc/custom/bk/lang/BK6_EN.txt
    [Error]: buildin_callfunc: Function not found! [getNPCID]
    [Warning]: Script command 'callfunc' returned failure.

    I'm making these mistakes.

    Hi, the server can't find function getNPCID. You can find this function inside file LangManagement.txt in the botkiller folder. The file must load before the others, example:

    npc: npc/custom/botkiller/LangManagement.txt
    npc: npc/custom/botkiller/lang/BK6_ES.txt
    npc: npc/custom/botkiller/lang/BK6_EN.txt

     

  21. Good evening

    yuno,157,83,3	script	Portal Gatekeeper	4_M_PAY_SOLDIER,{
    	
    	.@password$ = "luizinhomt";	//password
    	.@portal$ = "Hidden Port0l#l";	//portal npc name
    
    	npctalk "What is the password?", strnpcinfo(0), bc_self;
    	input .@input$;
    	unittalk getcharid(3), strcharinfo(0) + " : " + .@input$, bc_self;
    	sleep2 500;
    	if (!compare(.@input$,.@password$)) {
    		npctalk "This is not the password.", strnpcinfo(0), bc_self;
    		emotion ET_THINK, getnpcid(0);
    		end;
    	}
    	npctalk "I will open a portal to another location.", strnpcinfo(0), bc_self;
    	cloakoffnpcself .@portal$;
    	specialeffect EF_BIG_PORTAL,SELF,.@portal$;
    	end;
    }
    
    yuno,153,85,0	warp(CLOAKED)	Hidden Port0l#l	1,1,yuno,0,0

     

  22. Hi. please put scripts inside a code box next time, the indentation is all lost otherwise.

    //==== DarkRO Scripts ====================================
    //= Credit Exchanger
    //===== By: ================================================== 
    //=
    //===== Current Version: ===================================== 
    //= 1.4
    //===== Description: ========================================= 
    //= Allow to Convert Zeny into a Ticket.
    //===== Changelog: =========================================== 
    //= Not yet tested for bugs
    //= 1.0 Implementation
    //= 1.1 Re-script (added quest)
    //= 1.2 Automated zeny-to-credit exchange and vice-versa
    //= 1.3 Added @security checking.
    //= 1.4 Added Black Credit Exchange feature
    //============================================================
    
    -	script	Credit Agent	-1,{
    
        set @header$,"[^FF8000 Credit Agent ^000000]";
        .@credit_id = 40000;	//Credit Item ID 
    
        if (checksecurity()) {
            message strcharinfo(0), "You can't do this action, Protected by @security.";
            end;
        }
    
        if(#CREDITPASSPORT > gettimetick(2)) {
        disable_items;
        setpcblock(PCBLOCK_COMMANDS, true, getcharid(3));
        getinventorylist();
        mes @header$;
        mes "Hello, I can see that you still have your Intergalactical Passport.";
        mes " ";
        mes "What can I do for you?";
     	mes " ";
     	mes "^FF0000Your current credit: " + F_InsertComma(countitem(.@credit_id)); 
        next;
        switch(prompt("I want to change Zeny to Credit:I want to change Credit to Zeny.:Nothing, just passing by.")){
        case 255:
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            break;
        case 1:
            if (@inventorylist_count == MAX_INVENTORY && !countitem(.@credit_id)) {
                setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                mes @header$;
                mes "You need to clear your inventory first.";
                close();
            }
            mes @header$;
            mes "The exchange rate is fixed and its ^00008810,000,000^000000 Zeny = 1 ^FF0000Credit^000000.";
            mes " ";
            mes "How will you exchange your Zeny?";
            next;
            .@i = prompt("Decide on how many Credits I need.:Exchange all my Zeny:Cancel");
            if (.@i == 3) goto L_Cancel;
            else if (.@i == 255) {
                setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                break;
            }
            else if (.@i == 1) {
                mes @header$;
                mes "How much Credits do you need?";
                mes " ";
                mes "^FF0000(Enter '0' to cancel the transaction)^000000";
                next;
                input @ZTC;
                if (@ZTC <= 0) goto L_Cancel;
                else if (@ZTC > MAX_ZENY / 10000000) {
                    L_Exceed:
                    setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                    mes @header$;
                    mes "Sorry, but you have";
                    mes "exceeded from the limit.";
                    close();
                } else if (@ZTC > Zeny / 10000000) {
                    L_LessZeny:
                    setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                    mes @header$;
                    mes "You don't have enough zeny.";
                    close();
                } else {
                    L_ConvertZTC:
                    if (!checkweight(.@credit_id,@ZTC)) {
                    	mes @header$;
                    	mes "Sorry. You can't hold this amount of credit.";
                    	mes "Such amount would exceed your weight limit.";
                    	for(; @ZTC; @ZTC--)
                    		if (checkweight(.@credit_id,@ZTC))
                    			break;
                    	if (@ZTC) {
                    		mes "You can only hold up to " + @ZTC + ".";
                    		mes "Would this amount do?";
                    		next;
                    		if (select("Ok, " + @ZTC + " is acceptable", "No, just cancel") == 2)
                    			callsub L_Cancel;
                    	}
                    	else {
                    		setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                    		close;
                    	}                	
                    }
                    mes @header$;
                    mes "You will be receiving ^FF0000"+@ZTC+" Credit"+(@ZTC != 1 ? "s":"")+"^000000.";
                    mes " ";
                    mes "Proceed?";
                    next;
                    .@menu = prompt("I changed my mind:Proceed!");
                    if (.@menu == 1) {
                        setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                        close();
                        break;
                    } 
                    if (.@menu == 255) {
                        setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                        break;
                    }
                    setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                    Zeny -= @ZTC * 10000000;
                    getitem .@credit_id, @ZTC;
                    mes @header$;
                    mes "Here you go!";
                    mes "Thank you for using our service.";
                    close();
                }
            } else {
                @ZTC = Zeny / 10000000;
                if (@ZTC == 0) goto L_LessZeny;
                else goto L_ConvertZTC;
            }
            break;
        case 2: goto L_ConvertCTZ_Main;
            break;
        default: 
            L_Cancel:
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            mes @header$;
            mes "Please do come back, Have a nice day!.";
            close;
            break;
        }
        end;
    }
    
        if(#CRED_Q == 1) {
        disable_items;
        setpcblock(PCBLOCK_COMMANDS, true, getcharid(3));
        mes @header$;
        mes "Welcome back!, "+strcharinfo(0)+".";
        mes "Do you have what I asked for?";
        next;
        switch(prompt("Yes, here it is!:What do I need again?:I want to change Credit to Zeny.:Not yet.")){
        case 255:
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            break;
        case 1:
            if(Zeny < 100000000){
                setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                mes @header$;
                mes "I think you are missing something this is the list that i needed:";
                mes "^FF0000100,000,000 Zeny^000000.";
                close;
            }
            next;
            mes @header$;
            mes "Congratulations, Enjoy your Intergalactical Passport.";
            mes " ";
            mes "You may now use Zeny to ^FF0000Credit^000000 services in a matter of time.";
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            Zeny -= 100000000;
            #CREDITPASSPORT = 1728000+ gettimetick(2);
            #CRED_Q = 0;
            close;
            break;
        case 2: 
            mes @header$;
            mes "You will have to bring me the following:";
            mes "^FF0000100,000,000 Zeny^000000.";
            next;
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            mes @header$;
            mes "I suggest you look for Simon in Prontera. He is known as gumbling master that could provide you tickets.";
            mes " ";
            mes "I'll be waiting for you!";
            close;
            break;
        case 3: 
            goto L_ConvertCTZ_Main;
            break;
        case 4: 
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            mes @header$;
            mes "Okay, Hurry up!";
            close;
            break;
        }
    }
    
        mes @header$;
        mes "Hello, It looks like you don't have an Intergalactical Passport yet.";
        mes " ";
        mes "Would you like to have one?";
        next;
        switch(prompt("Yes, I'd like to have one.:Intergalactical Passport? What is that?:I want to change Credit to Zeny.:No thanks!")){
        case 1:
            mes @header$;
            mes "Very well. You will have to bring me the following:";
            mes "^FF0000100,000,000 Zeny^000000.";
            next;
            mes @header$;
            mes "I suggest you look for Simon in Prontera. He is known as gumbling master that could provide you tickets.";
            mes " ";
            mes "I'll be waiting for you!";
            #CRED_Q = 1;
            close;
            break;
        case 2:
            mes @header$;
            mes "An Intergalactical Passport is required to use the Intergalactical currency: ^FF0000Credit^000000.";
            mes " ";
            mes "The value of ^FF0000Credit^000000 is equivalent to ^00008810,000,000^000000 Zeny.";
            next;
            mes @header$;
            mes "Once you have this passport, You can exchange Zeny to ^FF0000Credit^000000 with any Credits Agents in major towns.";
            next;
            mes @header$;
            mes "^FF0000NOTE^000000: That the passport is not required when exchanging ^FF0000Credit^000000 to Zeny.";
            next;
            mes @header$;
            mes "That contract will last for 20 days. After that time, You will have to renew your passport.";
            close;
            break;
        case 3:
        disable_items;
        setpcblock(PCBLOCK_COMMANDS, true, getcharid(3));
        L_ConvertCTZ_Main:
            mes @header$;
            mes "The exchange rate is fixed and its 1 ^FF0000Credit^000000 = ^00008810,000,000^000000 Zeny.";
            mes " ";
            mes "How will you exchange your ^FF0000Credits^000000?";
            next;
            .@i = prompt("Decide how many Credits to exchange.:Exchange all my Credits:Cancel");
            if (.@i == 3) goto L_Cancel;
            else if (.@i == 255) {
                setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                break;
            } else if (.@i == 1) {
                mes @header$;
                mes "How many ^FF0000Credits^000000 do you want to exchange?";
                mes " ";
                mes "^FF0000(Enter '0' to cancel transaction)^000000";
                next;
                input @CTZ;
                if (@CTZ <= 0) goto L_Cancel;
                else if (@CTZ > countitem(.@credit_id)) {
                    L_LessCredit:
                    setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                    mes @header$;
                    mes "You don't have enough Credits.";
                    close();
                }
                else {
                    @CTZ_ = Zeny%10000000;
                    if (@CTZ_ > 0) @CTZ_ = ((MAX_ZENY/10000000) - (Zeny/10000000)) - 1;
                    else @CTZ_ = (MAX_ZENY/10000000) - (Zeny/10000000);
                    if (@CTZ > (MAX_ZENY/10000000) || @CTZ_ < @CTZ ) goto L_Exceed;
                    if (@CTZ > countitem(.@credit_id)) goto L_LessCredit;
                    L_ConvertCTZ:
                        mes @header$;
                        mes "You will be exchanging your ^FF0000"+@CTZ+" Credit"+(@CTZ != 1 ? "s":"")+"^000000.";
                        mes " ";
                        mes "Proceed?";
                        next;
                        .@menu = prompt("I changed my mind:Proceed!");
                        if (.@menu == 1) {
                            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                            close();
                            break;
                        }
                        if (.@menu == 255) {
                            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                            break;
                        }
                        delitem .@credit_id, @CTZ;
                        Zeny += 10000000 * @CTZ;
                        message(strcharinfo(0), "You have received "+F_InsertComma(10000000 * @CTZ)+" Z.");
                        setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
                        mes @header$;
                        mes "Here you go!";
                        mes "Thank you for using our service.";
                        close();
                }
                close();
            } else {
                @CTZ = countitem(.@credit_id);
                .@ZenyCap = (MAX_ZENY - Zeny) / 10000000;
                if (@CTZ == 0) goto L_LessCredit;
                if (@CTZ >= .@ZenyCap) @CTZ = .@ZenyCap;
                if (@CTZ == 0) goto L_Exceed;
                goto L_ConvertCTZ;
            }
            break;
        case 4:
            setpcblock(PCBLOCK_COMMANDS, false, getcharid(3));
            mes @header$;
            mes "Please do come back, Have a nice day!.";
            close;
            break;
        }
    }
    
    // Duplicates
    //prontera,132,215,5    duplicate(Credit Agent)    Credit Agent#prt    4_M_KHBOY
    market,99,53,6    duplicate(Credit Agent)    Credit Agent#mall    4_M_KHBOY

     

    • Upvote 1
×
×
  • Create New...