summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/001-2/wizards.txt21
-rw-r--r--world/map/npc/magic/_procedures.txt47
-rw-r--r--world/map/npc/magic/level0-wand.txt6
-rw-r--r--world/map/npc/magic/level1-aggravate.txt4
-rw-r--r--world/map/npc/magic/level1-detect-magic.txt4
-rw-r--r--world/map/npc/magic/level1-experience.txt4
-rw-r--r--world/map/npc/magic/level1-flare-dart.txt7
-rw-r--r--world/map/npc/magic/level1-grow-alizarin.txt4
-rw-r--r--world/map/npc/magic/level1-grow-cobalt.txt4
-rw-r--r--world/map/npc/magic/level1-grow-gamboge.txt4
-rw-r--r--world/map/npc/magic/level1-grow-mauve.txt4
-rw-r--r--world/map/npc/magic/level1-lesser-heal.txt4
-rw-r--r--world/map/npc/magic/level1-magic-blade.txt8
-rw-r--r--world/map/npc/magic/level1-make-sulphur.txt4
-rw-r--r--world/map/npc/magic/level1-summon-maggots.txt4
-rw-r--r--world/map/npc/magic/level1-transmute-wood.txt4
-rw-r--r--world/map/npc/magic/level2-arrow-hail.txt4
-rw-r--r--world/map/npc/magic/level2-barrier.txt4
-rw-r--r--world/map/npc/magic/level2-detect-players.txt4
-rw-r--r--world/map/npc/magic/level2-enchant-lifestone.txt4
-rw-r--r--world/map/npc/magic/level2-flying-backpack.txt4
-rw-r--r--world/map/npc/magic/level2-happy-curse.txt4
-rw-r--r--world/map/npc/magic/level2-hide.txt4
-rw-r--r--world/map/npc/magic/level2-lay-on-hands.txt4
-rw-r--r--world/map/npc/magic/level2-lightning-strike.txt10
-rw-r--r--world/map/npc/magic/level2-magic-knuckles.txt8
-rw-r--r--world/map/npc/magic/level2-make-arrows.txt4
-rw-r--r--world/map/npc/magic/level2-make-iron-powder.txt4
-rw-r--r--world/map/npc/magic/level2-protect.txt4
-rw-r--r--world/map/npc/magic/level2-rain.txt4
-rw-r--r--world/map/npc/magic/level2-shear.txt4
-rw-r--r--world/map/npc/magic/level2-summon-fluffies.txt4
-rw-r--r--world/map/npc/magic/level2-summon-mouboo.txt4
-rw-r--r--world/map/npc/magic/level2-summon-pinkie.txt4
-rw-r--r--world/map/npc/magic/level2-summon-snakes.txt4
-rw-r--r--world/map/npc/magic/level2-summon-spiky-mushroom.txt4
-rw-r--r--world/map/npc/magic/level2-summon-wickedmushroom.txt4
-rw-r--r--world/map/npc/magic/level2-toxic-dart.txt7
-rw-r--r--world/map/npc/magic/level3-necromancy.txt4
39 files changed, 113 insertions, 125 deletions
diff --git a/world/map/npc/001-2/wizards.txt b/world/map/npc/001-2/wizards.txt
index ef538489..3c7d6ecf 100644
--- a/world/map/npc/001-2/wizards.txt
+++ b/world/map/npc/001-2/wizards.txt
@@ -11,15 +11,16 @@
close;
OnInit:
- set .@void, puppet("001-2", 104, 19, "Desert Mana Seed#_M", 166);
- set .@void, puppet("001-2", 99, 22, "Wizard#1", 355);
- set .@void, puppet("001-2", 92, 24, "Wizard#2", 356);
- set .@void, puppet("001-2", 92, 30, "Wizard#3", 357);
- set .@void, puppet("001-2", 99, 32, "Wizard#4", 358);
- set .@void, puppet("001-2", 110, 22, "Wizard#5", 359);
- set .@void, puppet("001-2", 117, 24, "Wizard#6", 360);
- set .@void, puppet("001-2", 117, 30, "Wizard#7", 361);
- set .@void, puppet("001-2", 110, 32, "Wizard#8", 362);
- set .@void, puppet("001-2", 104, 27, "Arch-Wizard#9", 354);
+ void
+ puppet("001-2", 104, 19, "Desert Mana Seed#_M", 166),
+ puppet("001-2", 99, 22, "Wizard#1", 355),
+ puppet("001-2", 92, 24, "Wizard#2", 356),
+ puppet("001-2", 92, 30, "Wizard#3", 357),
+ puppet("001-2", 99, 32, "Wizard#4", 358),
+ puppet("001-2", 110, 22, "Wizard#5", 359),
+ puppet("001-2", 117, 24, "Wizard#6", 360),
+ puppet("001-2", 117, 30, "Wizard#7", 361),
+ puppet("001-2", 110, 32, "Wizard#8", 362),
+ puppet("001-2", 104, 27, "Arch-Wizard#9", 354);
end;
}
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt
index 71d12605..b2a734c2 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -1,52 +1,45 @@
function|script|magic_register
{
debugmes ">> Register " + .invocation$ + " @ " + strnpcinfo(0);
- registercmd .invocation$, strnpcinfo(0); // register the spell
- set .index, $@magic_index;
- set $@magic_index, $@magic_index + 1;
- return;
-}
-
-function|script|magic_register2
-{
- debugmes ">> Register " + .invocation$ + " @ " + strnpcinfo(0);
- registercmd .invocation$, strnpcinfo(0) + "::OnCast"; // register the spell <= this spell has a puppet
+ set .@ext$, if_then_else(getarg(0,"") != "", "::"+getarg(0), "");
+ registercmd .invocation$, strnpcinfo(0) + .@ext$; // register the spell
set .index, $@magic_index;
set $@magic_index, $@magic_index + 1;
return;
}
+// this function is call()-only
function|script|magic_checks
{
- set @failed, 0;
- if(getpvpflag(1)) set @failed, 1; // can not cast with @hide enabled
- if((gettimetick(2) - MAGIC_CAST_TICK) < 0) set @failed, 1; // check if last debuff ended
- if(isdead()) set @failed, 1; // can not cast when dead
- return;
+ set .@r, 0;
+ if(getpvpflag(1)) set .@r, 1;
+ if((gettimetick(2) - MAGIC_CAST_TICK) < 0) set .@r, 2; // check if last debuff ended
+ if(Hp < 1) set .@r, 3; // can not cast when dead
+ return .@r;
}
function|script|elt_damage
{
- // @edmg is damage, dmgplus(mutation), bonus_elt, malus_elt, effect
- set @edmg[5], @edmg[0] + rand(@edmg[1]);
- if(elttype(@target_id) == @edmg[3]) // malus
- set @edmg[5], @edmg[5] / 3;
- if(elttype(@target_id) == @edmg[2]) // bonus
- set @edmg[5], ((eltlvl(@target_id) + 4) * @edmg[5]) / 4;
+ // args are damage, dmgplus(mutation), bonus_elt, malus_elt, effect
+ set .@dmg, getarg(0) + rand(getarg(1));
+ if(elttype(@target_id) == getarg(3)) // malus
+ set .@dmg, .@dmg / 3;
+ if(elttype(@target_id) == getarg(2)) // bonus
+ set .@dmg, ((eltlvl(@target_id) + 4) * .@dmg) / 4;
set .@source, .caster;
if (!.@source) set .@source, getcharid(3);
- injure .@source, @target_id, @edmg[5];
- misceffect @edmg[4], @target_id;
- cleararray @edmg, 0, getarraysize(@edmg);
+ injure .@source, @target_id, .@dmg;
+ misceffect getarg(4), @target_id;
return;
}
function|script|melee_damage
{
- if ((@spellpower - rand(100)) < (get(BaseLevel, @target_id) + get(MDEF1, @target_id)))
- injure BL_ID, @target_id, 0;
- else injure BL_ID, @target_id, @melee_dmg[0] + rand(@melee_dmg[1]);
+ // args are spell power, target id, dmg
+ if ((getarg(0) - rand(100)) < (get(BaseLevel, getarg(1)) + get(MDEF1, getarg(1))))
+ injure BL_ID, getarg(1), 0;
+ else injure BL_ID, getarg(1), getarg(2);
return;
}
diff --git a/world/map/npc/magic/level0-wand.txt b/world/map/npc/magic/level0-wand.txt
index e38a26c7..f0938713 100644
--- a/world/map/npc/magic/level0-wand.txt
+++ b/world/map/npc/magic/level0-wand.txt
@@ -1,6 +1,6 @@
-|script|spell-wand|32767
{
- callfunc "magic_checks"; if(@failed) goto L_Failed; // << I wish we had functions that could return >>
+ if(call("magic_checks")) goto L_Failed;
callsub S_CheckWand;
if(@WandAttack != 1) goto L_Failed;
@@ -18,7 +18,7 @@ OnAttack:
if(target(BL_ID, @target_id, 22) != 22) goto L_Failed; // 0x02 | 0x04 | 0x10
set Sp, (Sp - @WandCost);
set @damage, (@Wand * (@spellpower / 3));
- setarray @edmg,@damage,@damage,ELT_NEUTRAL,ELT_NEUTRAL,FX_MAGIC_RED; callfunc "elt_damage";
+ void call("elt_damage", @damage,@damage,ELT_NEUTRAL,ELT_NEUTRAL,FX_MAGIC_RED);
end;
S_CheckWand:
@@ -67,7 +67,7 @@ OnInit:
setarray .WandsAnim[0], 35, 33;
set .school, SKILL_MAGIC;
set .invocation$, chr(MAGIC_SYMBOL) + "confringo"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 0;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-aggravate.txt b/world/map/npc/magic/level1-aggravate.txt
index 74316b89..1aaa9fc7 100644
--- a/world/map/npc/magic/level1-aggravate.txt
+++ b/world/map/npc/magic/level1-aggravate.txt
@@ -1,6 +1,6 @@
-|script|spell-aggravate|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 3) end;
if (getskilllv(.school) < .level) end;
set MAGIC_CAST_TICK, gettimetick(2) + 1; // set the new debuff
@@ -15,7 +15,7 @@
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "itenplz"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 0;
end;
diff --git a/world/map/npc/magic/level1-detect-magic.txt b/world/map/npc/magic/level1-detect-magic.txt
index c5dff558..e64a499a 100644
--- a/world/map/npc/magic/level1-detect-magic.txt
+++ b/world/map/npc/magic/level1-detect-magic.txt
@@ -1,6 +1,6 @@
-|script|detect-magic|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 3) end;
if (getskilllv(.school) < .level) end;
set MAGIC_CAST_TICK, gettimetick(2) + 6; // set the new debuff
@@ -22,7 +22,7 @@ OnNearbyNpc:
OnInit:
set .school, SKILL_MAGIC;
set .invocation$, chr(MAGIC_SYMBOL) + "miteyo"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 0;
end;
diff --git a/world/map/npc/magic/level1-experience.txt b/world/map/npc/magic/level1-experience.txt
index 9492b6f2..0d6b5459 100644
--- a/world/map/npc/magic/level1-experience.txt
+++ b/world/map/npc/magic/level1-experience.txt
@@ -1,6 +1,6 @@
-|script|spell-experience|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 1) end;
set MAGIC_CAST_TICK, gettimetick(2) + 1; // set the new debuff
set @level, getskilllv(.school);
@@ -35,7 +35,7 @@ OnInit:
set .invocation$, chr(MAGIC_SYMBOL) + "abizit"; // used in npcs that refer to this spell
set .level, 1;
set .exp_gain, 0;
- callfunc "magic_register";
+ void call("magic_register");
setarray .MAX_MAGIC_EXP[0], 0, 100, 1200, 8000, 40000, 65535;
end;
}
diff --git a/world/map/npc/magic/level1-flare-dart.txt b/world/map/npc/magic/level1-flare-dart.txt
index ee08e7f4..6b6657b6 100644
--- a/world/map/npc/magic/level1-flare-dart.txt
+++ b/world/map/npc/magic/level1-flare-dart.txt
@@ -1,6 +1,6 @@
-|script|flare-dart|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 10) end;
set @level, getskilllv(.school);
if (@level < .level) end;
@@ -19,14 +19,13 @@
OnAttack:
misceffect FX_MAGIC_BLACK, strcharinfo(0);
if (target(BL_ID, @target_id, 50) != 50) end; // 0x20 | 0x02 | 0x10
- setarray @edmg[0], @damage, @dmg_bonus, ELT_WATER, ELT_FIRE, FX_MAGIC_BLACK;
- callfunc "elt_damage";
+ void call("elt_damage", @damage, @dmg_bonus, ELT_WATER, ELT_FIRE, FX_MAGIC_BLACK);
end;
OnInit:
set .school, SKILL_MAGIC_WAR;
set .invocation$, chr(MAGIC_SYMBOL) + "flar"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-grow-alizarin.txt b/world/map/npc/magic/level1-grow-alizarin.txt
index 64593975..c44a4f47 100644
--- a/world/map/npc/magic/level1-grow-alizarin.txt
+++ b/world/map/npc/magic/level1-grow-alizarin.txt
@@ -1,6 +1,6 @@
-|script|grow-alizarin|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 4) end;
if (getskilllv(.school) < .level) end;
if (countitem("AlizarinHerb") < 1 || countitem("Root") < 1) end;
@@ -30,7 +30,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modriphoo"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-grow-cobalt.txt b/world/map/npc/magic/level1-grow-cobalt.txt
index c094fe6f..1eb923b2 100644
--- a/world/map/npc/magic/level1-grow-cobalt.txt
+++ b/world/map/npc/magic/level1-grow-cobalt.txt
@@ -1,6 +1,6 @@
-|script|grow-cobalt|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 4) end;
if (getskilllv(.school) < .level) end;
if (countitem("CobaltHerb") < 1 || countitem("Root") < 1) end;
@@ -30,7 +30,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modrisump"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-grow-gamboge.txt b/world/map/npc/magic/level1-grow-gamboge.txt
index 15bb9906..4ac779a8 100644
--- a/world/map/npc/magic/level1-grow-gamboge.txt
+++ b/world/map/npc/magic/level1-grow-gamboge.txt
@@ -1,6 +1,6 @@
-|script|grow-gamboge|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 4) end;
if (getskilllv(.school) < .level) end;
if (countitem("GambogeHerb") < 1 || countitem("Root") < 1) end;
@@ -30,7 +30,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modriyikam"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-grow-mauve.txt b/world/map/npc/magic/level1-grow-mauve.txt
index 6cc15955..1744660a 100644
--- a/world/map/npc/magic/level1-grow-mauve.txt
+++ b/world/map/npc/magic/level1-grow-mauve.txt
@@ -1,6 +1,6 @@
-|script|grow-mauve|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 4) end;
if (getskilllv(.school) < .level) end;
if (countitem("MauveHerb") < 1 || countitem("Root") < 1) end;
@@ -30,7 +30,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "modrilax"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt
index ef087525..6b728e81 100644
--- a/world/map/npc/magic/level1-lesser-heal.txt
+++ b/world/map/npc/magic/level1-lesser-heal.txt
@@ -1,6 +1,6 @@
-|script|lesser-heal|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 6) end;
set MAGIC_CAST_TICK, gettimetick(2) + 1; // set the new debuff
if (getskilllv(.school) < .level) end;
@@ -34,7 +34,7 @@ L_Mouboo:
OnInit:
set .school, SKILL_MAGIC_LIFE;
set .invocation$, chr(MAGIC_SYMBOL) + "lum"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-magic-blade.txt b/world/map/npc/magic/level1-magic-blade.txt
index 7c286678..915cb018 100644
--- a/world/map/npc/magic/level1-magic-blade.txt
+++ b/world/map/npc/magic/level1-magic-blade.txt
@@ -1,6 +1,6 @@
-|script|magic-blade|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 9) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -20,14 +20,14 @@
OnAttack:
if (target(BL_ID, @target_id, 22) != 22) end; // 0x10 | 0x02 | 0x04
- setarray @melee_dmg[0], if_then_else(@chiza_component$ == "Knife", 40, 60), (@chiza_str + 5);
- callfunc "melee_damage";
+ set .@dmg, if_then_else(@chiza_component$ == "Knife", 40, 60);
+ void call("melee_damage", @spellpower, @target_id, (.@dmg + rand(@chiza_str + 5)));
end;
OnInit:
set .school, SKILL_MAGIC_WAR;
set .invocation$, chr(MAGIC_SYMBOL) + "chiza"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-make-sulphur.txt b/world/map/npc/magic/level1-make-sulphur.txt
index 2d11e5f6..fe175265 100644
--- a/world/map/npc/magic/level1-make-sulphur.txt
+++ b/world/map/npc/magic/level1-make-sulphur.txt
@@ -1,6 +1,6 @@
-|script|make-sulphur|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 4) end;
if (getskilllv(.school) < .level) end;
if (countitem("PileOfAsh") >= 1) delitem "PileOfAsh", 1; else end;
@@ -17,7 +17,7 @@
OnInit:
set .school, SKILL_MAGIC_TRANSMUTE;
set .invocation$, chr(MAGIC_SYMBOL) + "gole"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt
index 12d2465c..9247e56c 100644
--- a/world/map/npc/magic/level1-summon-maggots.txt
+++ b/world/map/npc/magic/level1-summon-maggots.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 21) end;
if (getskilllv(.school) < .level) end;
if (countitem("MaggotSlime") < 1 || countitem("Root") < 1) end;
@@ -45,7 +45,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "kalmurk"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level1-transmute-wood.txt b/world/map/npc/magic/level1-transmute-wood.txt
index 9984d2b0..9ec8403e 100644
--- a/world/map/npc/magic/level1-transmute-wood.txt
+++ b/world/map/npc/magic/level1-transmute-wood.txt
@@ -1,6 +1,6 @@
-|script|spell-transmute-wood|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 5) end;
if (getskilllv(.school) < .level) end;
if (countitem("RawLog") >= 1) delitem "RawLog", 1; else end;
@@ -29,7 +29,7 @@ L_Skytlurk:
OnInit:
set .school, SKILL_MAGIC_TRANSMUTE;
set .invocation$, chr(MAGIC_SYMBOL) + "parum"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 1;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-arrow-hail.txt b/world/map/npc/magic/level2-arrow-hail.txt
index ecd79317..f1a3686b 100644
--- a/world/map/npc/magic/level2-arrow-hail.txt
+++ b/world/map/npc/magic/level2-arrow-hail.txt
@@ -4,7 +4,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (getskilllv(.school) < .level) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (Sp < 25) end;
@@ -105,7 +105,7 @@ OnInit:
set .school, SKILL_MAGIC_WAR;
set .range, 7;
set .invocation$, chr(MAGIC_SYMBOL) + "frillyar"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 2;
end;
diff --git a/world/map/npc/magic/level2-barrier.txt b/world/map/npc/magic/level2-barrier.txt
index 89a50044..3c7ef29f 100644
--- a/world/map/npc/magic/level2-barrier.txt
+++ b/world/map/npc/magic/level2-barrier.txt
@@ -1,6 +1,6 @@
-|script|magic-barrier|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 15) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -41,7 +41,7 @@ OnEnd:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "asorm"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 3;
end;
diff --git a/world/map/npc/magic/level2-detect-players.txt b/world/map/npc/magic/level2-detect-players.txt
index 3b024d38..41ab2e03 100644
--- a/world/map/npc/magic/level2-detect-players.txt
+++ b/world/map/npc/magic/level2-detect-players.txt
@@ -1,6 +1,6 @@
-|script|detect-players|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 7) end;
if (getskilllv(.school) < .level) end;
set MAGIC_CAST_TICK, gettimetick(2) + 1; // XXX the casttime is 300 so should this be 0 ?
@@ -25,7 +25,7 @@ OnPC:
OnInit:
set .school, SKILL_MAGIC;
set .invocation$, chr(MAGIC_SYMBOL) + "inwilt"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 0;
end;
diff --git a/world/map/npc/magic/level2-enchant-lifestone.txt b/world/map/npc/magic/level2-enchant-lifestone.txt
index 9d56f84a..19cc0a84 100644
--- a/world/map/npc/magic/level2-enchant-lifestone.txt
+++ b/world/map/npc/magic/level2-enchant-lifestone.txt
@@ -1,6 +1,6 @@
-|script|enchant-lifestone|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 15) end;
if (getskilllv(.school) < .level) end;
if (countitem("BugLeg") >= 1) delitem "BugLeg", 1;
@@ -28,7 +28,7 @@ L_Proceed:
OnInit:
set .school, SKILL_MAGIC;
set .invocation$, chr(MAGIC_SYMBOL) + "manpahil"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-flying-backpack.txt b/world/map/npc/magic/level2-flying-backpack.txt
index f2ab0b07..2480ef14 100644
--- a/world/map/npc/magic/level2-flying-backpack.txt
+++ b/world/map/npc/magic/level2-flying-backpack.txt
@@ -1,6 +1,6 @@
-|script|flying-backpack|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 12) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -32,7 +32,7 @@ OnEnd:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "plugh"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-happy-curse.txt b/world/map/npc/magic/level2-happy-curse.txt
index 0ad2d113..a6e314dd 100644
--- a/world/map/npc/magic/level2-happy-curse.txt
+++ b/world/map/npc/magic/level2-happy-curse.txt
@@ -1,6 +1,6 @@
-|script|happy-curse|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 13) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -35,7 +35,7 @@ OnEmote:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "joyplim"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-hide.txt b/world/map/npc/magic/level2-hide.txt
index 42de7f6a..d6bf538c 100644
--- a/world/map/npc/magic/level2-hide.txt
+++ b/world/map/npc/magic/level2-hide.txt
@@ -1,6 +1,6 @@
-|script|spell-hide|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 11) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -36,7 +36,7 @@ OnEnd:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "anwiltyp"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 2;
end;
diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt
index d106ac54..7d006ea9 100644
--- a/world/map/npc/magic/level2-lay-on-hands.txt
+++ b/world/map/npc/magic/level2-lay-on-hands.txt
@@ -1,6 +1,6 @@
-|script|lay-on-hands|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 10) end;
if (getskilllv(.school) < .level) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
@@ -50,7 +50,7 @@ L_Mouboo:
OnInit:
set .school, SKILL_MAGIC_LIFE;
set .invocation$, chr(MAGIC_SYMBOL) + "inma"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 4; // this is MAX possible exp
end;
diff --git a/world/map/npc/magic/level2-lightning-strike.txt b/world/map/npc/magic/level2-lightning-strike.txt
index d27d88df..c9cf4602 100644
--- a/world/map/npc/magic/level2-lightning-strike.txt
+++ b/world/map/npc/magic/level2-lightning-strike.txt
@@ -1,6 +1,6 @@
-|script|lightning-strike|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 20) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
set .@level, getskilllv(.school);
@@ -27,8 +27,7 @@ OnAttack:
set @target_id, @ingrav_target; // now restore it
if (@ingrav_rain & 1) goto L_InRain;
- setarray @edmg[0], @ingrav_sp, (@ingrav_sp/2)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3);
- callfunc "elt_damage";
+ void call("elt_damage", @ingrav_sp, (@ingrav_sp/2)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3));
end;
OnNpc:
@@ -53,14 +52,13 @@ OnEntityInRain:
if (target(BL_ID, @target_id, 16) != 16) end; // 0x10
if (@ingrav_luk + rand(200) <= 175) end;
set @used, @used + 1;
- setarray @edmg[0], @ingrav_sp/6, (((@ingrav_sp/2)+1)/3)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3);
- callfunc "elt_damage";
+ void call("elt_damage", @ingrav_sp/6, (((@ingrav_sp/2)+1)/3)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3));
end;
OnInit:
set .school, SKILL_MAGIC_WAR;
set .invocation$, chr(MAGIC_SYMBOL) + "ingrav"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 2;
end;
diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt
index 76ff3215..a91feeb2 100644
--- a/world/map/npc/magic/level2-magic-knuckles.txt
+++ b/world/map/npc/magic/level2-magic-knuckles.txt
@@ -1,6 +1,6 @@
-|script|magic-knuckles|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 20) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
set .@level, getskilllv(.school);
@@ -17,15 +17,13 @@
end;
OnAttack:
- if (target(BL_ID, @target_id, 22) != 22) end; // 0x10 | 0x02 | 0x04
- setarray @melee_dmg[0], 30, ((@upmaru_str*2) + 5);
- callfunc "melee_damage";
+ void call("melee_damage", @spellpower, @target_id, (30 + rand((@upmaru_str*2) + 5)));
end;
OnInit:
set .school, SKILL_MAGIC_WAR;
set .invocation$, chr(MAGIC_SYMBOL) + "upmaru"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-make-arrows.txt b/world/map/npc/magic/level2-make-arrows.txt
index 897598f9..db3250a6 100644
--- a/world/map/npc/magic/level2-make-arrows.txt
+++ b/world/map/npc/magic/level2-make-arrows.txt
@@ -1,6 +1,6 @@
-|script|make-arrows|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 8) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -19,7 +19,7 @@
OnInit:
set .school, SKILL_MAGIC_TRANSMUTE;
set .invocation$, chr(MAGIC_SYMBOL) + "kularzufrill"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-make-iron-powder.txt b/world/map/npc/magic/level2-make-iron-powder.txt
index 089150ac..7cf7a134 100644
--- a/world/map/npc/magic/level2-make-iron-powder.txt
+++ b/world/map/npc/magic/level2-make-iron-powder.txt
@@ -1,6 +1,6 @@
-|script|make-iron-powder|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 8) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -19,7 +19,7 @@
OnInit:
set .school, SKILL_MAGIC_TRANSMUTE;
set .invocation$, chr(MAGIC_SYMBOL) + "zukminbirf"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 3;
end;
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index e4ca8d76..bee84133 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -1,6 +1,6 @@
-|script|protect|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 14) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -41,7 +41,7 @@ OnEnd:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "betsanc"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 2;
end;
diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt
index f12c9072..2d13cc8d 100644
--- a/world/map/npc/magic/level2-rain.txt
+++ b/world/map/npc/magic/level2-rain.txt
@@ -4,7 +4,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (getskilllv(.school) < .level) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (Sp < 17) end;
@@ -95,7 +95,7 @@ OnDestroy:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "kaflosh"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 1;
set .max_radius, 15;
diff --git a/world/map/npc/magic/level2-shear.txt b/world/map/npc/magic/level2-shear.txt
index 5af782e1..afa6a59e 100644
--- a/world/map/npc/magic/level2-shear.txt
+++ b/world/map/npc/magic/level2-shear.txt
@@ -1,6 +1,6 @@
-|script|shear|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 23) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -42,7 +42,7 @@ OnAttack:
OnInit:
set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "chipchip"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 0;
end;
diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt
index 9590b468..70e5121c 100644
--- a/world/map/npc/magic/level2-summon-fluffies.txt
+++ b/world/map/npc/magic/level2-summon-fluffies.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 39) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -46,7 +46,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "kalakarenk"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt
index 6b82b8c9..f11f6608 100644
--- a/world/map/npc/magic/level2-summon-mouboo.txt
+++ b/world/map/npc/magic/level2-summon-mouboo.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 35) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -46,7 +46,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "kalboo"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 2;
end;
diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt
index 2c8d235e..4e7ebf1a 100644
--- a/world/map/npc/magic/level2-summon-pinkie.txt
+++ b/world/map/npc/magic/level2-summon-pinkie.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 35) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -46,7 +46,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "kalgina"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 2;
end;
diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt
index 2bce0f96..4998fded 100644
--- a/world/map/npc/magic/level2-summon-snakes.txt
+++ b/world/map/npc/magic/level2-summon-snakes.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 40) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -47,7 +47,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_DARK;
set .invocation$, chr(MAGIC_SYMBOL) + "halhiss"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 3;
end;
diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt
index 182bbda5..59cc295d 100644
--- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt
+++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 33) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -46,7 +46,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_ASTRAL;
set .invocation$, chr(MAGIC_SYMBOL) + "kalrenk"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 1;
end;
diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt
index bceef8b6..bd095144 100644
--- a/world/map/npc/magic/level2-summon-wickedmushroom.txt
+++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt
@@ -3,7 +3,7 @@
end;
OnCast:
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 35) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
@@ -47,7 +47,7 @@ S_SummonAll:
OnInit:
set .school, SKILL_MAGIC_DARK;
set .invocation$, chr(MAGIC_SYMBOL) + "helorp"; // used in npcs that refer to this spell
- callfunc "magic_register2";
+ void call("magic_register", "OnCast");
set .level, 2;
set .exp_gain, 3;
end;
diff --git a/world/map/npc/magic/level2-toxic-dart.txt b/world/map/npc/magic/level2-toxic-dart.txt
index 91522a58..9674b64f 100644
--- a/world/map/npc/magic/level2-toxic-dart.txt
+++ b/world/map/npc/magic/level2-toxic-dart.txt
@@ -1,6 +1,6 @@
-|script|toxic-dart|32767
{
- callfunc "magic_checks"; if(@failed) end; // << I wish we had functions that could return >>
+ if(call("magic_checks")) end; // << I wish we had functions that could return >>
if (Sp < 15) end;
set .@level, getskilllv(.school);
if (.@level < .level) end;
@@ -20,8 +20,7 @@
OnAttack:
misceffect FX_MAGIC_DARKRED, strcharinfo(0);
if (target(BL_ID, @target_id, 50) != 50) end; // 0x20 | 0x02 | 0x10
- setarray @edmg[0], @damage, @dmg_bonus, ELT_NEUTRAL, ELT_POISON, FX_FIRE_BURST;
- callfunc "elt_damage";
+ void call("elt_damage", @damage, @dmg_bonus, ELT_NEUTRAL, ELT_POISON, FX_FIRE_BURST);
if(@target_id != BL_ID && isloggedin(@target_id)) // this is a dirty trick to check if the target is a player
sc_start sc_poison, 5000+(@spellpower*1200), max(15,@spellpower/15)+5, @target_id;
end;
@@ -29,7 +28,7 @@ OnAttack:
OnInit:
set .school, SKILL_MAGIC_DARK;
set .invocation$, chr(MAGIC_SYMBOL) + "phlex"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 2;
set .exp_gain, 3;
end;
diff --git a/world/map/npc/magic/level3-necromancy.txt b/world/map/npc/magic/level3-necromancy.txt
index bd1f611c..66643d39 100644
--- a/world/map/npc/magic/level3-necromancy.txt
+++ b/world/map/npc/magic/level3-necromancy.txt
@@ -2,7 +2,7 @@
// author: gumi
-|script|necromancy|32767
{
- callfunc "magic_checks"; if(@failed) end;
+ if(call("magic_checks")) end;
if (Sp < 50) end;
if (getskilllv(.school) < .level) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
@@ -47,7 +47,7 @@ L_Clean:
OnInit:
set .school, SKILL_MAGIC_DARK;
set .invocation$, chr(MAGIC_SYMBOL) + "nevela"; // used in npcs that refer to this spell
- callfunc "magic_register";
+ void call("magic_register");
set .level, 3;
set .exp_gain, 1;
end;