From cf18ce071c79ae37e14ea38943e0b1d88da70a7b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 13:33:57 -0300 Subject: Override --- npc/functions/refine.txt | 66 ------------------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 npc/functions/refine.txt (limited to 'npc/functions/refine.txt') 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; -} - -- cgit v1.2.3-70-g09d2