summaryrefslogtreecommitdiff
path: root/npc/functions/refine.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
commitcf18ce071c79ae37e14ea38943e0b1d88da70a7b (patch)
treef9159c9b60b3018300dd22ffba0d797bc5e828e5 /npc/functions/refine.txt
parent8a4bf716002a017de77fe7df301ef8e4aaf00a2e (diff)
downloadserverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.gz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.bz2
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.xz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.zip
Override
Diffstat (limited to 'npc/functions/refine.txt')
-rw-r--r--npc/functions/refine.txt66
1 files changed, 0 insertions, 66 deletions
diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt
deleted file mode 100644
index 23df387c..00000000
--- a/npc/functions/refine.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-// The Mana World Script
-// Author:
-// Jesusalva
-// Inspiration:
-// Pyndragon (LoF)
-// Scall (TMW-BR)
-// Saulc (ML)
-// Description:
-// Handles refinement
-
-// refineupdate( {killedrid} )
-function script refineupdate {
- // Not armed? We do nothing
- if (!getequipisequiped(EQI_HAND_R))
- return;
-
- // Set temporary variables
- .@k=getarg(0, killedrid);
- .@w=getequipid(EQI_HAND_R);
- .@r=getequiprefinerycnt(EQI_HAND_R);
-
-
- // Weapon cannot be refined
- if (!getequipisenableref(EQI_HAND_R))
- return;
-
- // Register the weapon experience
- weaponExp[.@w] = weaponExp[.@w] + getmonsterinfo(.@k, MOB_LV);
-
- // Get exp needed to level up from global array
- .@exp=$@REFEXP[.@r];
-
- // Cannot level up
- if (.@exp < 1)
- return;
-
- // Leveled up!
- if (weaponExp[.@w] >= .@exp) {
- weaponExp[.@w]-=.@exp;
- weaponLvl[.@w] = weaponLvl[.@w] + 1;
- successrefitem(EQI_HAND_R);
- dispbottom l("Weapon level up!");
- }
- return;
-}
-
-// Resyncs weapon level
-function script refinesync {
- // Not armed? We do nothing
- if (!getequipisequiped(EQI_HAND_R))
- return;
-
- .@w=getequipid(EQI_HAND_R);
- .@r=getequiprefinerycnt(EQI_HAND_R);
- .@lv=weaponLvl[.@w];
-
- if (.@r > .@lv) {
- // Refine level overestimated
- downrefitem(EQI_HAND_R, max(0, .@r - .@lv));
- } else if (.@lv > .@r) {
- // Refine level understimated
- successrefitem(EQI_HAND_R, max(0, .@lv - .@r));
- }
- return;
-}
-