diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-08-17 12:31:34 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2023-08-17 12:31:34 +0000 |
commit | ff594c70b4483c2a9836e5db30522eb0caf8a80f (patch) | |
tree | a5327bbfd93a86921842052ba04e98c93d60683f /npc/025-1/ihclot.txt | |
parent | 567f2f7bfaa579ae63f40d466a1ab2dc7cb3f1eb (diff) | |
download | serverdata-ff594c70b4483c2a9836e5db30522eb0caf8a80f.tar.gz serverdata-ff594c70b4483c2a9836e5db30522eb0caf8a80f.tar.bz2 serverdata-ff594c70b4483c2a9836e5db30522eb0caf8a80f.tar.xz serverdata-ff594c70b4483c2a9836e5db30522eb0caf8a80f.zip |
Deduplicate SMITH_TWEAK points code between ihclot and tweak scripts.
Diffstat (limited to 'npc/025-1/ihclot.txt')
-rw-r--r-- | npc/025-1/ihclot.txt | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/npc/025-1/ihclot.txt b/npc/025-1/ihclot.txt index 10ebb0a44..243adbbd6 100644 --- a/npc/025-1/ihclot.txt +++ b/npc/025-1/ihclot.txt @@ -5,17 +5,14 @@ // Ihclot is Tolchi spelled backwards 025-1,96,66,0 script Ihclot NPC_RAIJIN_FEMALE_LEGION_ARTIS,{ - function apRefresh; function getPrice; function getPriceInt; - .@left=apRefresh(); mesn; mesq l("I put options on items upon request, but I am very expensive! This is deducted from your tweaking quota."); - if (!.@left) { - mesc l("You currently have no Tweaking AP, so you will need to wait %02d minute(s).", 60-gettime(GETTIME_MINUTE)), 1; + if (!SmithTweakPointsExplain()) // also returns number of tweaking pts left close; - } + next; mesn; mesq l("I'll read the options from you, but the level will be paid by me, and failure rate is non-existant. I am the best. blacksmith. in. the. universe! Use %s if you need to change any options.", b("@ucp")); @@ -94,7 +91,7 @@ // Perform payment Zeny-=getPriceInt(.@price, .@level); - SMITH_TWEAKS+=1; + SmithTweakPointsDecrement(); // even if lightbringer. // Apply the bonuses csys_ApplyPerfect(.@id, .@level); @@ -111,15 +108,6 @@ close; /* *************************************************************************** */ -function apRefresh { - .@left=gettimeparam(GETTIME_HOUR)-SMITH_TWEAKS; - if (.@left > 6) { - .@left=6; - SMITH_TWEAKS=gettimeparam(GETTIME_HOUR)-6; - } - return .@left; -} - function getPriceInt { .@price=getarg(0); .@level=getarg(1); |