summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2023-06-26 22:59:49 +0000
committerFedja Beader <fedja@protonmail.ch>2023-06-26 22:59:49 +0000
commit5389c54234bc2ca17607a0860170c5624c150f05 (patch)
treeb18ffd1dd0080bc629ae29e1a1818fe160efe646 /npc
parent227801ce5ca25f128db3ca473682e9a9c141100b (diff)
downloadserverdata-5389c54234bc2ca17607a0860170c5624c150f05.tar.gz
serverdata-5389c54234bc2ca17607a0860170c5624c150f05.tar.bz2
serverdata-5389c54234bc2ca17607a0860170c5624c150f05.tar.xz
serverdata-5389c54234bc2ca17607a0860170c5624c150f05.zip
Enable refining of shoes
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/refine.txt20
1 files changed, 16 insertions, 4 deletions
diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt
index 79ec82f5a..e940ab635 100644
--- a/npc/functions/refine.txt
+++ b/npc/functions/refine.txt
@@ -19,13 +19,25 @@ function script refineMaster {
mesq l("And if the item breaks, that's your loss. What to refine?");
next;
+ function rif_refine {
+ .@slot = getarg(0);
+ .@text = getarg(1);
+ // Two-handed weapons are already handled under EQI_HAND_R
+ if (.@slot == EQI_HAND_L && (getequipid(EQI_HAND_L) == getequipid(EQI_HAND_R)))
+ return "";
+ if (getequipisequiped(.@slot) && getequipisenableref(.@slot))
+ return l(.@text, getequipname(.@slot));
+ return "";
+ }
+
// Dark magic from hercules used, take care
menuint
l("Nothing, thanks"), 0,
- rif(getequipisequiped(EQI_HEAD_MID), l("My chestplate, @@", getequipname(EQI_HEAD_MID))), EQI_HEAD_MID,
- rif(getequipisequiped(EQI_HAND_R), l("My weapon, @@", getequipname(EQI_HAND_R))), EQI_HAND_R,
- rif(getequipisequiped(EQI_HAND_L) && getequipid(EQI_HAND_L) != getequipid(EQI_HAND_R), l("My shield, @@", getequipname(EQI_HAND_L))), EQI_HAND_L,
- rif(getequipisequiped(EQI_HEAD_TOP), l("My helmet, @@", getequipname(EQI_HEAD_TOP))), EQI_HEAD_TOP,
+ rif_refine(EQI_HEAD_TOP, "My helmet, @@"), EQI_HEAD_TOP,
+ rif_refine(EQI_HEAD_MID, "My chestplate, @@"), EQI_HEAD_MID,
+ rif_refine(EQI_HAND_R, "My weapon, @@"), EQI_HAND_R,
+ rif_refine(EQI_HAND_L, "My shield, @@"), EQI_HAND_L,
+ rif_refine(EQI_SHOES, "My footwear, @@"), EQI_SHOES,
l("Item break? Too dangerous! I don't want it!!"), 0;