Skip to content

Commit

Permalink
Merge pull request #1175 from rathena/followup_eqi
Browse files Browse the repository at this point in the history
Correct docs and script follow up the refactor of EQI
  • Loading branch information
Atemo committed Apr 18, 2016
2 parents 3165261 + 1a87f90 commit 6649d2e
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 91 deletions.
42 changes: 21 additions & 21 deletions doc/script_commands.txt
Expand Up @@ -2489,27 +2489,27 @@ This function returns the item ID of the item equipped in the equipment slot
specified on the invoking character. If nothing is equipped there, it returns -1.
Valid equipment slots are:

EQI_HEAD_TOP (1) - Upper Headgear
EQI_ARMOR (2) - Armor (jackets, robes)
EQI_HAND_L (3) - Left hand (weapons, shields)
EQI_HAND_R (4) - Right hand (weapons)
EQI_GARMENT (5) - Garment (mufflers, hoods, manteaus)
EQI_SHOES (6) - Footgear (shoes, boots)
EQI_ACC_L (7) - Accessory 1
EQI_ACC_R (8) - Accessory 2
EQI_HEAD_MID (9) - Middle Headgear (masks, glasses)
EQI_HEAD_LOW (10) - Lower Headgear (beards, some masks)
EQI_COSTUME_HEAD_LOW (11) - Lower Costume Headgear
EQI_COSTUME_HEAD_MID (12) - Middle Costume Headgear
EQI_COSTUME_HEAD_TOP (13) - Upper Costume Headgear
EQI_COSTUME_GARMENT (14) - Costume Garment
EQI_AMMO (15) - Arrow/Ammunition
EQI_SHADOW_ARMOR (16) - Shadow Armor
EQI_SHADOW_WEAPON (17) - Shadow Weapon
EQI_SHADOW_SHIELD (18) - Shadow Shield
EQI_SHADOW_SHOES (19) - Shadow Shoes
EQI_SHADOW_ACC_R (20) - Shadow Accessory 2
EQI_SHADOW_ACC_L (21) - Shadow Accessory 1
EQI_ACC_L (0) - Accessory 1
EQI_ACC_R (1) - Accessory 2
EQI_SHOES (2) - Footgear (shoes, boots)
EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux)
EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks)
EQI_HEAD_MID (5) - Middle Headgear (masks, glasses)
EQI_HEAD_TOP (6) - Upper Headgear
EQI_ARMOR (7) - Armor (jackets, robes)
EQI_HAND_L (8) - Left hand (weapons, shields)
EQI_HAND_R (9) - Right hand (weapons)
EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
EQI_COSTUME_GARMENT (13) - Costume Garment
EQI_AMMO (14) - Arrow/Ammunition
EQI_SHADOW_ARMOR (15) - Shadow Armor
EQI_SHADOW_WEAPON (16) - Shadow Weapon
EQI_SHADOW_SHIELD (17) - Shadow Shield
EQI_SHADOW_SHOES (18) - Shadow Shoes
EQI_SHADOW_ACC_R (19) - Shadow Accessory 2
EQI_SHADOW_ACC_L (20) - Shadow Accessory 1

Notice that a few items occupy several equipment slots, and if the character is
wearing such an item, 'getequipid' will return its ID number for either slot.
Expand Down
13 changes: 5 additions & 8 deletions npc/custom/card_remover.txt
Expand Up @@ -30,16 +30,13 @@ prt_in,28,73,4 script Wise Old Woman#eAcustom 78,{
mes "Very well. Which item shall I examine for you?";
next;

setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
{
if( getequipisequiped(.@i) )
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";

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;
for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) {
if( getequipisequiped(.@indices[.@i]) )
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@menu$, .@menu$ + ":";
}
set .@part,select(.@menu$);
set .@part, .@indices[ select(.@menu$) ];
if(!getequipisequiped(.@part)) {
mes "[Wise Old Woman]";
mes "Young one... Your not wearing anything there that I can remove cards from.";
Expand Down
9 changes: 4 additions & 5 deletions npc/custom/item_signer.txt
Expand Up @@ -51,14 +51,13 @@ prt_in,24,61,7 script Perchik 47,{
mes "[Perchik]";
mes "Show me your items to sign...";
next;
setarray .@pos$[1],"Upper Headgear","Armor","Left hand","Right hand","Garment","Footgear","Left Accessory","Right Accessory","Mid Headgear","Lower Headgear";
set .@menu$,"";
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;
for (set .@i,1; .@i<=10; set .@i,.@i+1) {
if (getequipisequiped(.@i))
set .@menu$, .@menu$+.@pos$[.@i]+" [^0055FF"+getequipname(.@i)+"^000000]";
if (getequipisequiped(.@indices[.@i]))
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) +" [^0055FF"+getequipname(.@indices[.@i])+"^000000]";
set .@menu$, .@menu$+":";
}
set .@part, select(.@menu$);
set .@part, .@indices[ select(.@menu$) ];
set .@id, getequipid(.@part);
set .@ref, getequiprefinerycnt(.@part);
mes "[Perchik]";
Expand Down
9 changes: 4 additions & 5 deletions npc/merchants/advanced_refiner.txt
Expand Up @@ -37,11 +37,10 @@ payon,157,146,6 script Suhnbi#cash 85,{
mes "know what you want to refine.";
next;

setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
if (getequipisequiped(.@indices[.@i])) {
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@equipped,1;
}
set .@menu$, .@menu$ + ":";
Expand All @@ -51,7 +50,7 @@ payon,157,146,6 script Suhnbi#cash 85,{
mes "I don't think I can refine any items you have...";
close;
}
set .@part, select(.@menu$);
set .@part, .@indices[ select(.@menu$) ];

if (!getequipisequiped(.@part)) //custom check
close;
Expand Down
12 changes: 5 additions & 7 deletions npc/merchants/refine.txt
Expand Up @@ -569,12 +569,10 @@ function script refinemain {
mes "know what you want me to refine.";
next;

setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
setarray .@indizes[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;
set .@menu$,"";
for(set .@i,1; .@i<getarraysize(.@indizes); set .@i,.@i+1) {
if(getequipisequiped(.@indizes[.@i])) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@indizes[.@i]) + "]";
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;
for(set .@i,1; .@i<getarraysize(.@indices); set .@i,.@i+1) {
if(getequipisequiped(.@indices[.@i])) {
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@equipped,1;
}
set .@menu$, .@menu$ + ":";
Expand All @@ -584,7 +582,7 @@ function script refinemain {
mes "I don't think I can refine any items you have...";
close;
}
set .@part, .@indizes[select(.@menu$)];
set .@part, .@indices[select(.@menu$)];

if(!getequipisequiped(.@part)) { //custom check
mes "["+ .@npc_name$ +"]";
Expand Down
32 changes: 32 additions & 0 deletions npc/other/Global_Functions.txt
Expand Up @@ -48,6 +48,7 @@
//= 2.23 Completed article function and added "F_GetArticle". [Euphy]
//= 2.24 Added functions to check for equipment swap hacks. [Euphy]
//= 2.25 Added "F_CanOpenStorage" and "F_CanChangeJob". [secretdataz]
//= 2.26 Added "F_getpositionname". [Capuche]
//============================================================

//////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -608,3 +609,34 @@ function script F_CanOpenStorage {
function script F_CanChangeJob {
return (!basicskillcheck() || getskilllv("NV_BASIC") > 8);
}

//////////////////////////////////////////////////////////////////////////////////
// Return the position name of the EQI_* equipment slot.
//////////////////////////////////////////////////////////////////////////////////
function script F_getpositionname {
switch( getarg(0,999) ) {
case EQI_ACC_L: return "Accessory 1";
case EQI_ACC_R: return "Accessory 2";
case EQI_SHOES: return "Shoes";
case EQI_GARMENT: return "Robe";
case EQI_HEAD_LOW: return "Head 3";
case EQI_HEAD_MID: return "Head 2";
case EQI_HEAD_TOP: return "Head";
case EQI_ARMOR: return "Body";
case EQI_HAND_L: return "Left hand";
case EQI_HAND_R: return "Right hand";
case EQI_COSTUME_HEAD_TOP: return "Upper Costume Headgear";
case EQI_COSTUME_HEAD_MID: return "Middle Costume Headgear";
case EQI_COSTUME_HEAD_LOW: return "Lower Costume Headgear";
case EQI_COSTUME_GARMENT: return "Costume Garment";
case EQI_AMMO: return "Arrow/Ammunition";
case EQI_SHADOW_ARMOR: return "Shadow Armor";
case EQI_SHADOW_WEAPON: return "Shadow Weapon";
case EQI_SHADOW_SHIELD: return "Shadow Shield";
case EQI_SHADOW_SHOES: return "Shadow Shoes";
case EQI_SHADOW_ACC_R: return "Shadow Accessory 2";
case EQI_SHADOW_ACC_L: return "Shadow Accessory 1";
default:
return "Unknown";
}
}
20 changes: 9 additions & 11 deletions npc/quests/seals/mjolnir_seal.txt
Expand Up @@ -1945,14 +1945,13 @@ mjolnir_01,35,136,7 script Dwarf Blacksmith#west 826,{
mes "Which one should I upgrade first, huh? My heart is pounding with anticipation...";
next;

setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i <= 10; set .@i,.@i+1) {
if (getequipisequiped(.@i))
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
if (getequipisequiped(.@indices[.@i]))
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@menu$, .@menu$ + ":";
}
set .@part,select(.@menu$);
set .@part, .@indices[ select(.@menu$) ];

if (getequipisequiped(.@part) == 0)
close;
Expand Down Expand Up @@ -2162,15 +2161,14 @@ mjolnir_01,35,136,7 script Dwarf Blacksmith#west 826,{
mes "Great...!";
mes "Which one should I upgrade first, huh? My heart is pounding with anticipation...";
next;

setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";

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;
for(set .@i,1; .@i <= 10; set .@i,.@i+1) {
if (getequipisequiped(.@i))
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
if (getequipisequiped(.@indices[.@i]))
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@menu$, .@menu$ + ":";
}
set .@part,select(.@menu$);
set .@part, .@indices[ select(.@menu$) ];

if (getequipisequiped(.@part) == 0)
close;
Expand Down
4 changes: 2 additions & 2 deletions npc/quests/thana_quest.txt
Expand Up @@ -914,8 +914,8 @@ tha_t03,67,70,0 script Rune Device#tt1 111,4,4,{
next;
goto L_Key;
}
else if (getequipweaponlv(4) == 4) {
mes "^3355FFWith your "+getequipname(4)+" in";
else if (getequipweaponlv(EQI_HAND_R) == 4) {
mes "^3355FFWith your "+getequipname(EQI_HAND_R)+" in";
mes "hand, you smash the energy";
mes "field with all of your strength. After absorbing the impact, the";
mes "field fizzles out with a soft,";
Expand Down
6 changes: 3 additions & 3 deletions npc/re/jobs/novice/academy.txt
Expand Up @@ -12677,10 +12677,10 @@ izlude_d,153,126,1 duplicate(Refinery Owner Han#iz) Refinery Owner Han#iz_d 4_M_
mes "Checking the user.. Completed.";
mes "Select the refining equipment.";
next;
setarray .@position$[1],"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1)
.@menu$ = .@menu$+(getequipisequiped(.@i)?getequipname(.@i):.@position$[.@i]+" - [Unarmed]")+":";
.@part = select(.@menu$);
.@menu$ = .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]): F_getpositionname(.@indices[.@i]) +" - [Unarmed]" ) +":";
.@part = .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "[Refining Machine Wagjak]";
mes "^ff0000- Error number 000"+.@part+" -^000000";
Expand Down
11 changes: 6 additions & 5 deletions npc/re/merchants/advanced_refiner.txt
Expand Up @@ -29,11 +29,12 @@ malangdo,221,174,6 script Holink#mal_cash 559,{
mes "My daughter is so proud of me, Holink~";
mes "What should Holink~ refine today?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Empty]")+":";
set .@part, select(.@menu$);

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;
for (set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
set .@part, .@indices[ select(.@menu$) ];

if (!getequipisequiped(.@part)) {
mes "[Holink]";
switch(.@part) {
Expand Down
7 changes: 3 additions & 4 deletions npc/re/merchants/blessed_refiner.txt
Expand Up @@ -32,11 +32,10 @@
mes "[Blacksmith Dister]";
mes "How about it? Do you want to refine?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":";
set .@part, select(.@menu$);
set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Unequipped]" ) +":";
set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "[Blacksmith Dister]";
switch(.@part) {
Expand Down
14 changes: 6 additions & 8 deletions npc/re/merchants/hd_refiner.txt
Expand Up @@ -32,11 +32,10 @@
mes "[Blacksmith Mighty Hammer]";
mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":";
set .@part, select(.@menu$);
set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Not equipped]" ) +":";
set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "[Blacksmith Mighty Hammer]";
switch(.@part) {
Expand Down Expand Up @@ -165,11 +164,10 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826
mes "[Basta]";
mes "Which equipment do you want to refine?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":";
set .@part, select(.@menu$);
set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Unequipped]" ) +":";
set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "[Basta]";
switch(.@part) {
Expand Down
16 changes: 7 additions & 9 deletions npc/re/merchants/refine.txt
Expand Up @@ -57,11 +57,10 @@ function script refinenew {
mes "What do you want me to refine?";
next;

setarray .@position$[1],"Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
if (getequipisequiped(.@indices[.@i])) {
set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@equipped,1;
}
set .@menu$, .@menu$ + ":";
Expand All @@ -71,7 +70,7 @@ function script refinenew {
mes "I don't think I can refine any items you have...";
close;
}
set .@part, select(.@menu$);
set .@part, .@indices[ select(.@menu$) ];

if (!getequipisequiped(.@part)) { //custom check
mes "["+ .@npc_name$ +"]";
Expand Down Expand Up @@ -396,11 +395,10 @@ malangdo,224,172,6 script Clink#mal_normal 544,{
mes "Who do you think I am?";
mes "Yes!!! You!! You want to refine?";
next;
setarray .@position$[1],"Head","Body","Left Hand","Right Hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Empty]")+":";
set .@part, select(.@menu$);
set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "[Clink]";
switch(.@part) {
Expand Down
6 changes: 3 additions & 3 deletions npc/re/merchants/ticket_refiner.txt
Expand Up @@ -60,10 +60,10 @@ prontera,184,177,6 script Refine Master 851,{
mes "Which equipment would you like to refine?";
next;
setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower";
set .@menu$,"";
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;
for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"- [Empty]")+":";
set .@part, select(.@menu$);
set .@menu$, .@menu$+((getequipisequiped(.@indices[.@i]))?getequipname(.@indices[.@i]):.@position$[.@i]+"- [Empty]")+":";
set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "[Refine Master]";
mes "You have to equip the item you want to refine.";
Expand Down

1 comment on commit 6649d2e

@Keysito
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Atemo.

Please sign in to comment.