1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
//===== 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
|