summaryrefslogblamecommitdiff
path: root/npc/re/quests/cupet.txt
blob: 3e339e168d1aac5940266e1b661decdb160c8c41 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                              




                                                              
                                                              
                         

                                                              
                                 


                                                              
                                     
        
                                      





                                                                          
                        




















                                                                                                                                           
                                     
        
                                      




                                                                                  
                                                        
                                                                                    
                        




















                                                                                                                                           
                                     
        
                                      







                                                           
                        






































































                                                                                                                                             

                                                                                                       


                              
                                       

                                        






                                                                









                                                          
                                                                  








                                                                                                              
                                                              




























                                                                                                                                                                                                                                   


                                                                           
 


                                                                           
 


                                                                           
 


                                                                   
//===== Hercules Script ======================================
//= Cute Pet Manager
//===== By: ==================================================
//= Z3R0
//===== Current Version: =====================================
//= 1.0
//===== Description: =========================================
//= [Official Conversion]
//= Exchanges Hunted Items for Tames
//===== Additional Comments: =================================
//= 1.0 First / Optimized Version
//============================================================

// 1st NPC
-	script	CPM1	4_M_ALCHE_C,{
	
	.@npc$ = "[Cute Pet Manager]";
	
	setarray .@tame_id[0],619,620,622,623,624,627,628,629,630;
	setarray .@tame_amount[0],3,3,3,3,3,3,3,3,3;
	setarray .@hunt_id[0],909,909,705,916,935,919,919,940,921;
	setarray .@hunt_amount[0],500,600,500,500,500,500,600,500,500;
	setarray .@mob_id[0],1002,1113,1063,1049,1011,1167,1107,1052,1014;
	.@tame_gets = 3;

	if (cpm_one == .@tame_gets) {
		mes "[Cute Pet Manager]";
		mes "You have already exchanged";
		mes .@tame_amount + " times for a taming item.";
		mes "You can't exchange anymore.";
		next;
		
		mes "[Cute Pet Manager]";
		mes "Besides me, there are other";
		mes "Cute Pet Managers. If you want";
		mes "to tame other pets, I suggest";
		mes "you go and see them.";
		close;
	}
	
	callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_one,.@tame_gets,.@hunt_id2,.@hunt_amount2;

}

// 2nd NPC
-	script	CPM2	4_M_ALCHE_C,{
	
	.@npc$ = "[Cute Pet Manager]";
	
	setarray .@tame_id[0],621,625,632,631,633,634,635,636,659,637,639,640;
	setarray .@tame_amount[0],2,2,2,2,2,2,2,2,2,2,2,2;
	setarray .@hunt_id[0],938,935,925,7033,945,942,931,901,1094,1021,936,1035;
	setarray .@hunt_amount[0],500,600,500,300,500,500,500,500,500,500,500,500;
	setarray .@hunt_item_count[0],1,1,1,1,1,1,1,1,1;
	setarray .@mob_id[0],1031,1042,1019,1077,1056,1057,1023,1026,1188,1110,1029;
	.@tame_gets = 2;

	if (cpm_two == .@tame_gets) {
		mes "[Cute Pet Manager]";
		mes "You have already exchanged";
		mes .@tame_amount + " times for a taming item.";
		mes "You can't exchange anymore.";
		next;
		
		mes "[Cute Pet Manager]";
		mes "Besides me, there are other";
		mes "Cute Pet Managers. If you want";
		mes "to tame other pets, I suggest";
		mes "you go and see them.";
		close;
	}
	
	callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_two,.@tame_gets,.@hunt_id2,.@hunt_amount2;

}

// 3rd NPC
-	script	CPM3	4_M_ALCHE_C,{
	
	.@npc$ = "[Cute Pet Manager]";
	
	setarray .@tame_id[0],638,626,641,661,660,642;
	setarray .@tame_amount[0],1,1,1,1,1,1;
	setarray .@hunt_id[0],1020,943,1038,7047,1970,923;
	setarray .@hunt_amount[0],600,600,600,500,1,100;
	setarray .@hunt_id2[0],0,0,0,0,7017,0;
	setarray .@hunt_amount2[0],0,0,0,0,20,0;
	setarray .@mob_id[0],1170,1035,1109,1275,1200,1101;
	.@tame_gets = 1;

	if (cpm_three == .@tame_gets) {
		mes "[Cute Pet Manager]";
		mes "You have already exchanged";
		mes .@tame_amount + " times for a taming item.";
		mes "You can't exchange anymore.";
		next;
		
		mes "[Cute Pet Manager]";
		mes "Besides me, there are other";
		mes "Cute Pet Managers. If you want";
		mes "to tame other pets, I suggest";
		mes "you go and see them.";
		close;
	}
	
	callfunc "cute_pet_manager",.@tame_id,.@tame_amount,.@hunt_id,.@hunt_amount,.@mob_id,cpm_three,.@tame_gets,.@hunt_id2,.@hunt_amount2;

}

function	script	cute_pet_manager	{
	// getarg(0) -> .@tame_id Array
	// getarg(1) -> .@tame_amount Array
	// getarg(2) -> .@hunt_id Array
	// getarg(3) -> .@hunt_amount Array
	// getarg(4) -> .@mob_id Array
	// getarg(5) -> Attempt Variable
	// getarg(6) -> .@tame_gets Variable
	// getarg(7) -> .@hunt_id2 Array
	// getarg(8) -> .@hunt_amount2 Array

	mes "[Cute Pet Manager]";
	mes "Hello~! I am a Cute Pet Manager";
	mes "who is in charge of public relations";
	mes "for the New Upgraded Cute Pet system.";
	next;
	
	mes "[Cute Pet Manager]";
	mes "If you have any concerns regarding";
	mes "the Cute Pet system I am here to guide you.";
	mes "Let me know which taming";
	mes "item you want,";
	mes "then I will tell you the monster";
	mes "that you can tame with the item.";
	next;
	
	mes "Also I will explain what materials";
	mes "you need to bring in order to";
	mes "get the taming item.";
	next;
	
	mes "[Cute Pet Manager]";
	mes "If you already brought materials";
	mes "to exchange for the taming item,";
	mes "I can exchange it for taming items immediately.";
	next;
	
	mes "[Cute Pet Manager]";
	mes "However, there is a limit";
	mes "for exchanging taming items.";
	mes "You can only get taming items";
	mes getarg(6) + " times. So please make sure";
	mes "how many times you have exchanged.";
	next;
	
	mes "[Cute Pet Manager]";
	mes "So, which taming item do you want?";
	mes "Please choose one from the list.";
	next;
	
	// Create Menu System
	for (.@a = 0; .@a < getarraysize(getarg(0)); ++.@a) {
		.@menu$ += (.@menu$ == "" ? "" : ":") + getitemname(getelementofarray(getarg(0), .@a));
	}
	
	// Query Player Choice
	.@choice = select(.@menu$) - 1;

	// Store Variables (Less Lookup)
	.@tame_id = getelementofarray(getarg(0), .@choice);
	.@tame_amount = getelementofarray(getarg(1), .@choice);
	.@hunt_id = getelementofarray(getarg(2), .@choice);
	.@hunt_amount = getelementofarray(getarg(3), .@choice);
	.@mob_id = getelementofarray(getarg(4), .@choice);
	.@hunt_id2 = getelementofarray(getarg(7), .@choice);
	.@hunt_amount2 = getelementofarray(getarg(8), .@choice);
	
	dispbottom "Tame ID: " + .@tame_id;
	dispbottom "Tame Amount: " + .@tame_amount;
	dispbottom "Hunt ID: " + .@hunt_id;
	dispbottom "Hunt Name: " + getitemname(.@hunt_id);
	dispbottom "Hunt Amount: " + .@hunt_amount;
	dispbottom "Mob ID: " + .@mob_id;
	dispbottom "Hunt ID2: " + .@hunt_id2;
	dispbottom "Hunt Amount2: " + .@hunt_amount2;
	
	if (.@hunt_id2) { .@hunt2_count = countitem(.@hunt_id2); }
	if (countitem(.@hunt_id) >= .@hunt_amount && countitem(6083) > 0 && .@hunt2_count >= .@hunt_amount2) {

		mes "[Cute Pet Manager]";
		mes "Ah, you have gathered all items";
		mes "with your friends. You can now";
		mes "exchange for an " + getitemname(.@tame_id) + ".";
		mes "Do you want to exchange with me?";
		next;
		
		if  (select("Exchange:Don't Exchange") == 2) {
			mes "[Cute Pet Manager]";
			mes "You don't? You will come back again.";
			close;
		}
		
		delitem .@hunt_id, .@hunt_amount;
		delitem 6083, 1;
		set getarg(5), getarg(5) + 1;
		getitem .@tame_id, .@tame_amount;
		
		mes "[Cute Pet Manager]";
		mes "Wise choice.";
		mes "I hope you and your pet get along.";
		close;
	} else {
		mes "[Cute Pet Manager]";
		mes "You have chosen " + getitemname(.@tame_id) + ".";
		mes "You can use it for taming";
		mes "^FF0000" + strmobinfo(1,.@mob_id) + "^000000 monsters.";
		next;
		mes "[Cute Pet Manager]";
		mes "Bring ^FF0000" + .@hunt_amount + " " + getitemname(.@hunt_id) + "^000000s " + (.@hunt_id2 ? ", ^FF0000" + .@hunt_amount2 + " " + getitemname(.@hunt_id2) : "") + " ^000000 and ^FF00001 Dolly Capsule^000000";
		mes "then you can exchange them";
		mes "for an " + getitemname(.@tame_id) + ".";
		close;
	}
}

// NPC Duplicates
prontera,67,212,5	duplicate(CPM1)	Cute Pet Manager#1	4_M_ALCHE_C
prontera,242,92,3	duplicate(CPM2)	Cute Pet Manager#2	4_M_ALCHE_C
prontera,179,92,3	duplicate(CPM3)	Cute Pet Manager#3	4_M_ALCHE_C

geffen,180,125,5	duplicate(CPM1)	Cute Pet Manager#4	4_M_ALCHE_C
geffen,152,66,3	duplicate(CPM2)	Cute Pet Manager#5	4_M_ALCHE_C
geffen,197,95,3	duplicate(CPM3)	Cute Pet Manager#6	4_M_ALCHE_C

morocc,115,83,5	duplicate(CPM1)	Cute Pet Manager#7	4_M_ALCHE_C
morocc,218,130,3	duplicate(CPM2)	Cute Pet Manager#8	4_M_ALCHE_C
morocc,236,225,3	duplicate(CPM3)	Cute Pet Manager#9	4_M_ALCHE_C

payon,109,278,5	duplicate(CPM1)	Cute Pet Manager#10	4_M_ALCHE_C
payon,157,124,3	duplicate(CPM2)	Cute Pet Manager#11	4_M_ALCHE_C
payon,85,237,3	duplicate(CPM3)	Cute Pet Manager#12	4_M_ALCHE_C