
Fixes #6453 Implemented Illusion of Moonlight Implemented related monsters and enchanter Thanks to @crazy-arashi @Atemo @Lemongrass3110 @secretdataz Co-authored-by: Atemo <capucrath@gmail.com> Credits to @crazy-arashi for the initial script release
251 lines
8.4 KiB
Plaintext
251 lines
8.4 KiB
Plaintext
//===== rAthena Script =======================================
|
|
//= Episode 16.2 - Illusion Enchants
|
|
//===== Description: =========================================
|
|
//= [Walkthrough Conversion]
|
|
//= Illusion series related merchants and enchanters
|
|
//===== Changelogs: ==========================================
|
|
//= 1.0 Initial release [crazyarashi]
|
|
//= 1.1 Cleanup and improvements [Everade]
|
|
//============================================================
|
|
|
|
//============================================================
|
|
//= Illusion of Moonlight
|
|
//============================================================
|
|
|
|
pay_d03_i,160,45,3 script Gemcutter#ilp20 4_TOWER_17,3,3,{
|
|
mes "[ Gemcutter ]";
|
|
mes "Do you have business with me?";
|
|
next;
|
|
switch (select("What are you doing here?:Upgrade Weapon.:Upgrade Armor.")) {
|
|
case 1:
|
|
mes "[ Gemcutter ]";
|
|
mes "I came to the ruined village,";
|
|
mes "looking for some materials. Touched some strange light, and now I'm here.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "I've decided to stick around for a little while. Figured I'd be safe so long as I stay close to this soldier.";
|
|
mes "I have a proposition for you. I want some materials that can only be found in this place.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "Get them for me, and I'll improve your equipment in exchange. Just so you know, I can only improve certain types.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "If you're interested, we can discuss the details of our bargain.";
|
|
close;
|
|
case 2:
|
|
disable_items;
|
|
if (checkweight(25271,1) == 0 || (MaxWeight - Weight) < 1000) {
|
|
mes "- You're carrying too many items to proceed. -";
|
|
close;
|
|
}
|
|
setarray .@reward_id[0],
|
|
26109, // Illusion Staff of Bordeaux
|
|
28725, // Illusion Moonlight Dagger
|
|
16063, // Illusion Long Mace
|
|
26007; // Illusion Spectral Spear
|
|
.@size = getarraysize(.@reward_id);
|
|
|
|
.@refine_req = 9;
|
|
|
|
for ( .@i = 0; .@i < .@size; ++.@i )
|
|
.@reward_name$[.@i] = replacestr( getitemname(.@reward_id[.@i]), ":", "" );
|
|
|
|
mes "[ Gemcutter ]";
|
|
mes "The following is the list of equipment I can handle.";
|
|
for ( .@i = 0; .@i < .@size; ++.@i )
|
|
mes "<ITEM>" + .@reward_name$[.@i] + "<INFO>" + .@reward_id[.@i] + "</INFO></ITEM>";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "Make sure ^0000FFyour equipment is refined to at least +" + .@refine_req + "^000000 before bringing it to me.";
|
|
mes "That's the minimum requirement for my upgrade service to have any visible effects on your equipment.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "Make sure you're ^0000FFequipped with the item that you want to improve.^000000";
|
|
mes "Otherwise, I can't evaluate its condition.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "As you may have guessed, your equipment will transform into something new after this.";
|
|
mes "In other words, ^0000FFIt'll lose its current refining levels, cards and enchantments.^000000";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "And I need ^0000FFIllusion Stones and some other materials^000000 to upgrade your equipment.";
|
|
mes "Pick an item you want and I'll tell you what I need.";
|
|
next;
|
|
switch( select( .@reward_name$[0], .@reward_name$[1], .@reward_name$[2], .@reward_name$[3] ) ) {
|
|
case 1:
|
|
.@reward = .@reward_id[0]; // Illusion Staff of Bordeaux
|
|
.@eq_req = 1648; // Staff of Bordeaux
|
|
.@part = EQI_HAND_R;
|
|
|
|
setarray .@items_req[0],
|
|
25271,30, // Illusion Stones
|
|
25256,100; // Hazy Dreams
|
|
break;
|
|
case 2:
|
|
.@reward = .@reward_id[1]; // Illusion Moonlight Dagger
|
|
.@eq_req = 1234; // Moonlight Dagger
|
|
.@part = EQI_HAND_R;
|
|
|
|
setarray .@items_req[0],
|
|
25271,60, // Illusion Stones
|
|
25256,100; // Hazy Dreams
|
|
break;
|
|
case 3:
|
|
.@reward = .@reward_id[2]; // Illusion Long Mace
|
|
.@eq_req = 1525; // Long Mace
|
|
.@part = EQI_HAND_R;
|
|
|
|
setarray .@items_req[0],
|
|
25271,10, // Illusion Stones
|
|
25256,20; // Hazy Dreams
|
|
break;
|
|
case 4:
|
|
.@reward = .@reward_id[3]; // Illusion Spectral Spear
|
|
.@eq_req = 1477; // Spectral Spear
|
|
.@part = EQI_HAND_R;
|
|
|
|
setarray .@items_req[0],
|
|
25271,20, // Illusion Stones
|
|
25256,100; // Hazy Dreams
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
disable_items;
|
|
if (checkweight(25271,1) == 0 || (MaxWeight - Weight) < 1000) {
|
|
mes "- You're carrying too many items to proceed. -";
|
|
close;
|
|
}
|
|
setarray .@reward_id[0],
|
|
19209, // Illusion Nurse Cap
|
|
19210, // Illusion Apple of Archer
|
|
15195, // Illusion Puente Robe
|
|
20838, // Illusion Muffler [1]
|
|
22133; // Illusion Shoes [1]
|
|
.@size = getarraysize(.@reward_id);
|
|
|
|
.@refine_req = 9;
|
|
|
|
for ( .@i = 0; .@i < .@size; ++.@i )
|
|
.@reward_name$[.@i] = replacestr( getitemname(.@reward_id[.@i]), ":", "" );
|
|
|
|
mes "[ Gemcutter ]";
|
|
mes "The following is the list of equipment I can handle.";
|
|
for ( .@i = 0; .@i < .@size; ++.@i )
|
|
mes "<ITEM>" + .@reward_name$[.@i] + "<INFO>" + .@reward_id[.@i] + "</INFO></ITEM>";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "Make sure ^0000FFyour equipment is refined to at least +" + .@refine_req + "^000000 before bringing it to me.";
|
|
mes "That's the minimum requirement for my upgrade service to have any visible effects on your equipment.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "Make sure you're ^0000FFequipped with the item that you want to improve.^000000";
|
|
mes "Otherwise, I can't evaluate its condition.";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "As you may have guessed, your equipment will transform into something new after this.";
|
|
mes "In other words, ^0000FFIt'll lose its current refining levels, cards and enchantments.^000000";
|
|
next;
|
|
mes "[ Gemcutter ]";
|
|
mes "And I need ^0000FFIllusion Stones and some other materials^000000 to upgrade your equipment.";
|
|
mes "Pick an item you want and I'll tell you what I need.";
|
|
next;
|
|
switch( select( .@reward_name$[0], .@reward_name$[1], .@reward_name$[2], .@reward_name$[3], .@reward_name$[4] ) ) {
|
|
case 1:
|
|
.@reward = .@reward_id[0]; // Illusion Nurse Cap
|
|
.@eq_req = 2277; // Nurse Cap
|
|
.@part = EQI_HEAD_TOP;
|
|
|
|
setarray .@items_req[0],
|
|
25271,10, // Illusion Stones
|
|
25257,100; // Bloody_Love_Letter
|
|
break;
|
|
case 2:
|
|
.@reward = .@reward_id[1]; // Illusion Apple of Archer
|
|
.@eq_req = 2285; // Apple of Archer
|
|
.@part = EQI_HEAD_TOP;
|
|
|
|
setarray .@items_req[0],
|
|
25271,10, // Illusion Stones
|
|
25258,100; // Broken_Arrow
|
|
break;
|
|
case 3:
|
|
.@reward = .@reward_id[2]; // Illusion Puente Robe
|
|
.@eq_req = 15012; // Puente Robe
|
|
.@part = EQI_ARMOR;
|
|
|
|
setarray .@items_req[0],
|
|
25271,10, // Illusion Stones
|
|
25256,100; // Hazy Dreams
|
|
break;
|
|
case 4:
|
|
.@reward = .@reward_id[3]; // Illusion Muffler [1]
|
|
.@eq_req = 2504; // Muffler
|
|
.@part = EQI_GARMENT;
|
|
|
|
setarray .@items_req[0],
|
|
25271,10, // Illusion Stones
|
|
23228,100; // Hazy_Mooncake
|
|
break;
|
|
case 5:
|
|
.@reward = .@reward_id[4]; // Illusion Shoes [1]
|
|
.@eq_req = 2404; // Shoes
|
|
.@part = EQI_SHOES;
|
|
|
|
setarray .@items_req[0],
|
|
25271,10, // Illusion Stones
|
|
23228,100; // Hazy_Mooncake
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
mes "[Gemcutter]";
|
|
mes "For that equipment, I need the following materials.";
|
|
mes "^4d4fff +" + .@refine_req + " " + getitemname(.@eq_req) + "";
|
|
mes "" + .@items_req[1] + " " + getitemname(.@items_req[0]) + "";
|
|
mes "" + .@items_req[3] + " " + getitemname(.@items_req[2]) + "^000000";
|
|
mes "Do you want to continue?";
|
|
next;
|
|
if (select( "Continue.", "I'll bring those materials." ) == 2) {
|
|
mes "[Gemcutter]";
|
|
mes "Come back when you're ready.";
|
|
close;
|
|
}
|
|
if (countitem(.@items_req[0]) < .@items_req[1] || countitem(.@items_req[2]) < .@items_req[3]) {
|
|
mes "[Gemcutter]";
|
|
mes "You don't have all the materials.";
|
|
close;
|
|
}
|
|
.@equip_id = getequipid(.@part);
|
|
if (.@equip_id == -1) {
|
|
mes "[Gemcutter]";
|
|
if (.@part == EQI_HAND_R)
|
|
mes "Where's your weapon?";
|
|
else
|
|
mes "Why don't you go wear that equipment first?";
|
|
close;
|
|
}
|
|
if (.@equip_id != .@eq_req) {
|
|
mes "[Gemcutter]";
|
|
mes "Please equip a ^4d4fff+9 " + getitemname(.@eq_req) + ".^000000";
|
|
close;
|
|
}
|
|
if (getequiprefinerycnt(.@part) < .@refine_req) {
|
|
mes "[Gemcutter]";
|
|
mes "I can only upgrade equipment that is ^4d4fffrefined to at least +" + .@refine_req + ".^000000";
|
|
close;
|
|
}
|
|
mes "[Gemcutter]";
|
|
mes "There you go.";
|
|
delequip .@part;
|
|
delitem .@items_req[0], .@items_req[1];
|
|
delitem .@items_req[2], .@items_req[3];
|
|
getitem .@reward,1;
|
|
close;
|
|
|
|
OnTouch:
|
|
if (illusion_moonlight > 7)
|
|
npctalk "What kind of place is this?", "", bc_self;
|
|
end;
|
|
}
|