Merge pull request #1175 from rathena/followup_eqi

Correct docs and script follow up the refactor of EQI
This commit is contained in:
Atemo 2016-04-18 16:54:27 +02:00
commit 6649d2e98d
14 changed files with 110 additions and 91 deletions

View File

@ -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. specified on the invoking character. If nothing is equipped there, it returns -1.
Valid equipment slots are: Valid equipment slots are:
EQI_HEAD_TOP (1) - Upper Headgear EQI_ACC_L (0) - Accessory 1
EQI_ARMOR (2) - Armor (jackets, robes) EQI_ACC_R (1) - Accessory 2
EQI_HAND_L (3) - Left hand (weapons, shields) EQI_SHOES (2) - Footgear (shoes, boots)
EQI_HAND_R (4) - Right hand (weapons) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux)
EQI_GARMENT (5) - Garment (mufflers, hoods, manteaus) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks)
EQI_SHOES (6) - Footgear (shoes, boots) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses)
EQI_ACC_L (7) - Accessory 1 EQI_HEAD_TOP (6) - Upper Headgear
EQI_ACC_R (8) - Accessory 2 EQI_ARMOR (7) - Armor (jackets, robes)
EQI_HEAD_MID (9) - Middle Headgear (masks, glasses) EQI_HAND_L (8) - Left hand (weapons, shields)
EQI_HEAD_LOW (10) - Lower Headgear (beards, some masks) EQI_HAND_R (9) - Right hand (weapons)
EQI_COSTUME_HEAD_LOW (11) - Lower Costume Headgear EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear
EQI_COSTUME_HEAD_MID (12) - Middle Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear
EQI_COSTUME_HEAD_TOP (13) - Upper Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear
EQI_COSTUME_GARMENT (14) - Costume Garment EQI_COSTUME_GARMENT (13) - Costume Garment
EQI_AMMO (15) - Arrow/Ammunition EQI_AMMO (14) - Arrow/Ammunition
EQI_SHADOW_ARMOR (16) - Shadow Armor EQI_SHADOW_ARMOR (15) - Shadow Armor
EQI_SHADOW_WEAPON (17) - Shadow Weapon EQI_SHADOW_WEAPON (16) - Shadow Weapon
EQI_SHADOW_SHIELD (18) - Shadow Shield EQI_SHADOW_SHIELD (17) - Shadow Shield
EQI_SHADOW_SHOES (19) - Shadow Shoes EQI_SHADOW_SHOES (18) - Shadow Shoes
EQI_SHADOW_ACC_R (20) - Shadow Accessory 2 EQI_SHADOW_ACC_R (19) - Shadow Accessory 2
EQI_SHADOW_ACC_L (21) - Shadow Accessory 1 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1
Notice that a few items occupy several equipment slots, and if the character is 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. wearing such an item, 'getequipid' will return its ID number for either slot.

View File

@ -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?"; mes "Very well. Which item shall I examine for you?";
next; 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;
set .@menu$,""; for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) {
for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) if( getequipisequiped(.@indices[.@i]) )
{ set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
if( getequipisequiped(.@i) )
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
set .@menu$, .@menu$ + ":"; set .@menu$, .@menu$ + ":";
} }
set .@part,select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if(!getequipisequiped(.@part)) { if(!getequipisequiped(.@part)) {
mes "[Wise Old Woman]"; mes "[Wise Old Woman]";
mes "Young one... Your not wearing anything there that I can remove cards from."; mes "Young one... Your not wearing anything there that I can remove cards from.";

View File

@ -51,14 +51,13 @@ prt_in,24,61,7 script Perchik 47,{
mes "[Perchik]"; mes "[Perchik]";
mes "Show me your items to sign..."; mes "Show me your items to sign...";
next; next;
setarray .@pos$[1],"Upper Headgear","Armor","Left hand","Right hand","Garment","Footgear","Left Accessory","Right Accessory","Mid Headgear","Lower Headgear"; 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;
set .@menu$,"";
for (set .@i,1; .@i<=10; set .@i,.@i+1) { for (set .@i,1; .@i<=10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) if (getequipisequiped(.@indices[.@i]))
set .@menu$, .@menu$+.@pos$[.@i]+" [^0055FF"+getequipname(.@i)+"^000000]"; set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) +" [^0055FF"+getequipname(.@indices[.@i])+"^000000]";
set .@menu$, .@menu$+":"; set .@menu$, .@menu$+":";
} }
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
set .@id, getequipid(.@part); set .@id, getequipid(.@part);
set .@ref, getequiprefinerycnt(.@part); set .@ref, getequiprefinerycnt(.@part);
mes "[Perchik]"; mes "[Perchik]";

View File

@ -37,11 +37,10 @@ payon,157,146,6 script Suhnbi#cash 85,{
mes "know what you want to refine."; mes "know what you want to refine.";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) { for(set .@i,1; .@i<=10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) { if (getequipisequiped(.@indices[.@i])) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@equipped,1; set .@equipped,1;
} }
set .@menu$, .@menu$ + ":"; set .@menu$, .@menu$ + ":";
@ -51,7 +50,7 @@ payon,157,146,6 script Suhnbi#cash 85,{
mes "I don't think I can refine any items you have..."; mes "I don't think I can refine any items you have...";
close; close;
} }
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) //custom check if (!getequipisequiped(.@part)) //custom check
close; close;

View File

@ -569,12 +569,10 @@ function script refinemain {
mes "know what you want me to refine."; mes "know what you want me to refine.";
next; 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;
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; for(set .@i,1; .@i<getarraysize(.@indices); set .@i,.@i+1) {
set .@menu$,""; if(getequipisequiped(.@indices[.@i])) {
for(set .@i,1; .@i<getarraysize(.@indizes); set .@i,.@i+1) { set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
if(getequipisequiped(.@indizes[.@i])) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@indizes[.@i]) + "]";
set .@equipped,1; set .@equipped,1;
} }
set .@menu$, .@menu$ + ":"; set .@menu$, .@menu$ + ":";
@ -584,7 +582,7 @@ function script refinemain {
mes "I don't think I can refine any items you have..."; mes "I don't think I can refine any items you have...";
close; close;
} }
set .@part, .@indizes[select(.@menu$)]; set .@part, .@indices[select(.@menu$)];
if(!getequipisequiped(.@part)) { //custom check if(!getequipisequiped(.@part)) { //custom check
mes "["+ .@npc_name$ +"]"; mes "["+ .@npc_name$ +"]";

View File

@ -48,6 +48,7 @@
//= 2.23 Completed article function and added "F_GetArticle". [Euphy] //= 2.23 Completed article function and added "F_GetArticle". [Euphy]
//= 2.24 Added functions to check for equipment swap hacks. [Euphy] //= 2.24 Added functions to check for equipment swap hacks. [Euphy]
//= 2.25 Added "F_CanOpenStorage" and "F_CanChangeJob". [secretdataz] //= 2.25 Added "F_CanOpenStorage" and "F_CanChangeJob". [secretdataz]
//= 2.26 Added "F_getpositionname". [Capuche]
//============================================================ //============================================================
////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////
@ -608,3 +609,34 @@ function script F_CanOpenStorage {
function script F_CanChangeJob { function script F_CanChangeJob {
return (!basicskillcheck() || getskilllv("NV_BASIC") > 8); 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";
}
}

View File

@ -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..."; mes "Which one should I upgrade first, huh? My heart is pounding with anticipation...";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i <= 10; set .@i,.@i+1) { for(set .@i,1; .@i <= 10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) if (getequipisequiped(.@indices[.@i]))
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@menu$, .@menu$ + ":"; set .@menu$, .@menu$ + ":";
} }
set .@part,select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (getequipisequiped(.@part) == 0) if (getequipisequiped(.@part) == 0)
close; close;
@ -2163,14 +2162,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..."; mes "Which one should I upgrade first, huh? My heart is pounding with anticipation...";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i <= 10; set .@i,.@i+1) { for(set .@i,1; .@i <= 10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) if (getequipisequiped(.@indices[.@i]))
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@menu$, .@menu$ + ":"; set .@menu$, .@menu$ + ":";
} }
set .@part,select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (getequipisequiped(.@part) == 0) if (getequipisequiped(.@part) == 0)
close; close;

View File

@ -914,8 +914,8 @@ tha_t03,67,70,0 script Rune Device#tt1 111,4,4,{
next; next;
goto L_Key; goto L_Key;
} }
else if (getequipweaponlv(4) == 4) { else if (getequipweaponlv(EQI_HAND_R) == 4) {
mes "^3355FFWith your "+getequipname(4)+" in"; mes "^3355FFWith your "+getequipname(EQI_HAND_R)+" in";
mes "hand, you smash the energy"; mes "hand, you smash the energy";
mes "field with all of your strength. After absorbing the impact, the"; mes "field with all of your strength. After absorbing the impact, the";
mes "field fizzles out with a soft,"; mes "field fizzles out with a soft,";

View File

@ -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 "Checking the user.. Completed.";
mes "Select the refining equipment."; mes "Select the refining equipment.";
next; 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) for(set .@i,1; .@i<=10; set .@i,.@i+1)
.@menu$ = .@menu$+(getequipisequiped(.@i)?getequipname(.@i):.@position$[.@i]+" - [Unarmed]")+":"; .@menu$ = .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]): F_getpositionname(.@indices[.@i]) +" - [Unarmed]" ) +":";
.@part = select(.@menu$); .@part = .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Refining Machine Wagjak]"; mes "[Refining Machine Wagjak]";
mes "^ff0000- Error number 000"+.@part+" -^000000"; mes "^ff0000- Error number 000"+.@part+" -^000000";

View File

@ -29,11 +29,12 @@ malangdo,221,174,6 script Holink#mal_cash 559,{
mes "My daughter is so proud of me, Holink~"; mes "My daughter is so proud of me, Holink~";
mes "What should Holink~ refine today?"; mes "What should Holink~ refine today?";
next; 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) for (set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Empty]")+":"; set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Holink]"; mes "[Holink]";
switch(.@part) { switch(.@part) {

View File

@ -32,11 +32,10 @@
mes "[Blacksmith Dister]"; mes "[Blacksmith Dister]";
mes "How about it? Do you want to refine?"; mes "How about it? Do you want to refine?";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":"; set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Unequipped]" ) +":";
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Blacksmith Dister]"; mes "[Blacksmith Dister]";
switch(.@part) { switch(.@part) {

View File

@ -32,11 +32,10 @@
mes "[Blacksmith Mighty Hammer]"; mes "[Blacksmith Mighty Hammer]";
mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?"; mes "So lets kick this into overdrive, what d' ya say? What item do you want to refine?";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Not equipped]")+":"; set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Not equipped]" ) +":";
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Blacksmith Mighty Hammer]"; mes "[Blacksmith Mighty Hammer]";
switch(.@part) { switch(.@part) {
@ -165,11 +164,10 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826
mes "[Basta]"; mes "[Basta]";
mes "Which equipment do you want to refine?"; mes "Which equipment do you want to refine?";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Unequipped]")+":"; set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Unequipped]" ) +":";
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Basta]"; mes "[Basta]";
switch(.@part) { switch(.@part) {

View File

@ -57,11 +57,10 @@ function script refinenew {
mes "What do you want me to refine?"; mes "What do you want me to refine?";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) { for(set .@i,1; .@i<=10; set .@i,.@i+1) {
if (getequipisequiped(.@i)) { if (getequipisequiped(.@indices[.@i])) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
set .@equipped,1; set .@equipped,1;
} }
set .@menu$, .@menu$ + ":"; set .@menu$, .@menu$ + ":";
@ -71,7 +70,7 @@ function script refinenew {
mes "I don't think I can refine any items you have..."; mes "I don't think I can refine any items you have...";
close; close;
} }
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { //custom check if (!getequipisequiped(.@part)) { //custom check
mes "["+ .@npc_name$ +"]"; mes "["+ .@npc_name$ +"]";
@ -396,11 +395,10 @@ malangdo,224,172,6 script Clink#mal_normal 544,{
mes "Who do you think I am?"; mes "Who do you think I am?";
mes "Yes!!! You!! You want to refine?"; mes "Yes!!! You!! You want to refine?";
next; 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;
set .@menu$,"";
for(set .@i,1; .@i<=10; set .@i,.@i+1) for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"-[Empty]")+":"; set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Clink]"; mes "[Clink]";
switch(.@part) { switch(.@part) {

View File

@ -60,10 +60,10 @@ prontera,184,177,6 script Refine Master 851,{
mes "Which equipment would you like to refine?"; mes "Which equipment would you like to refine?";
next; next;
setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower"; 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) for(set .@i,1; .@i<=10; set .@i,.@i+1)
set .@menu$, .@menu$+((getequipisequiped(.@i))?getequipname(.@i):.@position$[.@i]+"- [Empty]")+":"; set .@menu$, .@menu$+((getequipisequiped(.@indices[.@i]))?getequipname(.@indices[.@i]):.@position$[.@i]+"- [Empty]")+":";
set .@part, select(.@menu$); set .@part, .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) { if (!getequipisequiped(.@part)) {
mes "[Refine Master]"; mes "[Refine Master]";
mes "You have to equip the item you want to refine."; mes "You have to equip the item you want to refine.";