diff options
-rw-r--r-- | db/pre-re/item_db.conf | 150 | ||||
-rw-r--r-- | npc/functions/main.txt | 21 | ||||
-rw-r--r-- | npc/magic/config.txt | 4 |
3 files changed, 98 insertions, 77 deletions
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 1f5bd39e..dc41ba5b 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -13783,7 +13783,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 15, 0; + callfunc "itheal", 15, 0; "> }, { @@ -13801,7 +13801,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 25, 0; + callfunc "itheal", 25, 0; "> }, { @@ -13819,7 +13819,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 5, 0; + callfunc "itheal", 5, 0; "> }, { @@ -13837,7 +13837,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 0; + callfunc "itheal", 10, 0; "> }, { @@ -13855,7 +13855,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 20, 0; + callfunc "itheal", 20, 0; "> }, { @@ -13873,7 +13873,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 5, 0; + callfunc "itheal", 5, 0; "> }, { @@ -13891,7 +13891,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 25, 0; + callfunc "itheal", 25, 0; "> }, { @@ -13909,7 +13909,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 15, 0; + callfunc "itheal", 15, 0; "> }, { @@ -13927,7 +13927,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 0; + callfunc "itheal", 10, 0; "> }, { @@ -13945,7 +13945,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 35, 0; + callfunc "itheal", 35, 0; "> }, { @@ -13963,7 +13963,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 100, 0; + callfunc "itheal", 100, 0; "> }, { @@ -13981,7 +13981,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 150, 0; + callfunc "itheal", 150, 0; "> }, { @@ -13999,7 +13999,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 150, 0; + callfunc "itheal", 150, 0; "> }, { @@ -14017,7 +14017,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 100, 0; + callfunc "itheal", 100, 0; "> }, { @@ -14035,7 +14035,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -14053,7 +14053,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 200, 5; + callfunc "itheal", 200, 5; "> }, { @@ -14071,7 +14071,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 250, 0; + callfunc "itheal", 250, 0; getitem 540, 1; "> }, @@ -14090,7 +14090,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 500, 0; + callfunc "itheal", 500, 0; "> }, { @@ -14108,7 +14108,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -14126,7 +14126,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -14180,7 +14180,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 60, 0; + callfunc "itheal", 60, 0; "> }, { @@ -14198,7 +14198,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 250, 0; + callfunc "itheal", 250, 0; "> }, { @@ -14216,7 +14216,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 100, 0; + callfunc "itheal", 100, 0; "> }, { @@ -14234,7 +14234,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 200, 0; + callfunc "itheal", 200, 0; "> }, { @@ -14252,7 +14252,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 400, 0; + callfunc "itheal", 400, 0; "> }, { @@ -14270,7 +14270,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 800, 0; + callfunc "itheal", 800, 0; "> }, { @@ -14288,7 +14288,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 0, 10; + callfunc "itheal", 0, 10; callfunc "MagicGainBasic"; "> }, @@ -14307,7 +14307,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 30, 0; + callfunc "itheal", 30, 0; "> }, { @@ -14325,7 +14325,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 40, 0; + callfunc "itheal", 40, 0; "> }, { @@ -14343,7 +14343,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -14361,7 +14361,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 20, 0; + callfunc "itheal", 20, 0; "> }, { @@ -14379,7 +14379,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 45, 0; + callfunc "itheal", 45, 0; "> }, { @@ -14415,7 +14415,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 0; + callfunc "itheal", 10, 0; "> }, { @@ -14433,7 +14433,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 11, 0; + callfunc "itheal", 11, 0; "> }, { @@ -14451,7 +14451,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 12, 0; + callfunc "itheal", 12, 0; "> }, { @@ -14469,7 +14469,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 12, 0; + callfunc "itheal", 12, 0; "> }, { @@ -14487,7 +14487,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 3, 0; + callfunc "itheal", 3, 0; "> }, { @@ -14542,7 +14542,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 11, 0; + callfunc "itheal", 11, 0; "> }, { @@ -14560,7 +14560,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 100, 0; + callfunc "itheal", 100, 0; "> }, { @@ -14578,7 +14578,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 5, 0; + callfunc "itheal", 5, 0; sc_start SC_SLOWPOISON, 180000, 180; "> }, @@ -14597,7 +14597,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 60, 0; + callfunc "itheal", 60, 0; "> }, { @@ -14615,7 +14615,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 40, 0; + callfunc "itheal", 40, 0; "> }, { @@ -14633,7 +14633,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -14651,7 +14651,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 70, 0; + callfunc "itheal", 70, 0; "> }, { @@ -14669,7 +14669,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -14687,7 +14687,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 60, 0; + callfunc "itheal", 60, 0; "> }, { @@ -14705,7 +14705,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 100, 0; + callfunc "itheal", 100, 0; "> }, { @@ -14932,7 +14932,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 0, 25; + callfunc "itheal", 0, 25; "> }, { @@ -14950,7 +14950,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 0, 50; + callfunc "itheal", 0, 50; "> }, { @@ -14968,7 +14968,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 0, 100; + callfunc "itheal", 0, 100; "> }, { @@ -14986,7 +14986,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 0, 250; + callfunc "itheal", 0, 250; "> }, { @@ -15004,7 +15004,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 750, 0; + callfunc "itheal", 750, 0; "> }, { @@ -15022,7 +15022,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 750, 0; + callfunc "itheal", 750, 0; "> }, { @@ -15040,7 +15040,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 750, 0; + callfunc "itheal", 750, 0; "> }, { @@ -15058,7 +15058,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 75, 10; + callfunc "itheal", 75, 10; "> }, { @@ -15076,7 +15076,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 1000, 0; + callfunc "itheal", 1000, 0; "> }, { @@ -15094,7 +15094,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 800, 0; + callfunc "itheal", 800, 0; "> }, { @@ -15112,7 +15112,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 800, 0; + callfunc "itheal", 800, 0; "> }, { @@ -15130,7 +15130,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 800, 0; + callfunc "itheal", 800, 0; "> }, { @@ -15148,7 +15148,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 200, 0; + callfunc "itheal", 200, 0; "> }, { @@ -15166,7 +15166,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 150, 0; + callfunc "itheal", 150, 0; "> }, { @@ -15184,7 +15184,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 100, 0; + callfunc "itheal", 100, 0; "> }, { @@ -15202,7 +15202,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 50, 0; + callfunc "itheal", 50, 0; "> }, { @@ -15220,7 +15220,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 200, 0; + callfunc "itheal", 200, 0; "> }, { @@ -15238,7 +15238,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 45, 0; + callfunc "itheal", 45, 0; "> }, { @@ -15310,7 +15310,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 2; + callfunc "itheal", 10, 2; "> }, { @@ -15328,7 +15328,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 0; + callfunc "itheal", 10, 0; "> }, { @@ -15346,7 +15346,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 0; + callfunc "itheal", 10, 0; "> }, { @@ -15364,7 +15364,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 10, 0; + callfunc "itheal", 10, 0; "> }, { @@ -15400,7 +15400,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 15, 0; + callfunc "itheal", 15, 0; "> }, { @@ -15418,7 +15418,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal -250, 0; + callfunc "itheal", -250, 0; getitem 5127, 1; "> }, @@ -15437,7 +15437,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal -10, -2; + callfunc "itheal", -10, -2; "> }, { @@ -15455,7 +15455,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 250, 0; + callfunc "itheal", 250, 0; getitem 540, 1; "> }, @@ -15474,7 +15474,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 15, 0; + callfunc "itheal", 15, 0; "> }, { @@ -15528,7 +15528,7 @@ item_db: ( BindOnEquip: false Delay: 0 Script: <" - heal 350, 0; + callfunc "itheal", 350, 0; "> }, { diff --git a/npc/functions/main.txt b/npc/functions/main.txt index 25d20edc..bb1887d2 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -633,6 +633,27 @@ function script learnskill { return; } +// Delayed healing. Takes 3~5 seconds. Variates with Vit up to +100%. +// The vit can have an additional 20% bonus as well. +function script itheal { + .@bas=getarg(0); + .@vit=readbattleparam(getcharid(3), UDT_VIT); + .@vit=cap_value(.@vit-1, 0, 100); + if (getargcount() > 2) + .@tim=getarg(3); + else + .@tim=rand2(3,5); + .@min=.@bas*(100+.@vit)/100; + .@max=.@bas*(100+.@vit*120/100)/100; + // Now divide the HP values by the time + .@min=max(1, .@min/.@tim); + .@max=max(1, .@max/.@tim); + callfunc("SC_Bonus", .@tim, SC_S_LIFEPOTION, .@min, .@max); + if (getarg(1,0) > 0) + heal 0, getarg(1, 0); + return; +} + // sqldate({day variation, month variation}) function script sqldate { .@d=gettime(GETTIME_DAYOFMONTH)+getarg(0, 0); diff --git a/npc/magic/config.txt b/npc/magic/config.txt index 6286c2a6..c0f00cec 100644 --- a/npc/magic/config.txt +++ b/npc/magic/config.txt @@ -23,7 +23,7 @@ function script AdjustSpellpower { // Calculation FIX if (.@type == HARM_MAGI) { - .@power+=(readparam2(bInt)/2); + .@power+=(readparam2(UDT_INT)/2); .@dmg=rand2( getunitdata(getcharid(3), UDT_MATKMIN), getunitdata(getcharid(3), UDT_MATKMAX)); @@ -31,7 +31,7 @@ function script AdjustSpellpower { //if (.@target) // .@dmg=max(0, .@dmg-getunitdata(.@target, UDT_MDEF)); } else if (.@type == HARM_PHYS) { - .@power+=(readparam2(bStr)/2); + .@power+=(readparam2(UDT_STR)/2); .@dmg=rand2( getunitdata(getcharid(3), UDT_ATKMIN), getunitdata(getcharid(3), UDT_ATKMAX)); |