summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-15 14:03:33 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-15 14:03:33 -0300
commitce3196b12299cc11e062b388680b5240ca0aa2c2 (patch)
tree9bae747d7788a75716a0d96272550e5b583e3da9 /npc
parent326522eb24e54363fa99ad41a490b9643861df4d (diff)
downloadserverdata-ce3196b12299cc11e062b388680b5240ca0aa2c2.tar.gz
serverdata-ce3196b12299cc11e062b388680b5240ca0aa2c2.tar.bz2
serverdata-ce3196b12299cc11e062b388680b5240ca0aa2c2.tar.xz
serverdata-ce3196b12299cc11e062b388680b5240ca0aa2c2.zip
NPC -> Global var: Coins Rate. Fix a bug.
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1/eventmaster.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/npc/001-1/eventmaster.txt b/npc/001-1/eventmaster.txt
index 6d55c10dd..324d0a87b 100644
--- a/npc/001-1/eventmaster.txt
+++ b/npc/001-1/eventmaster.txt
@@ -12,7 +12,7 @@
if (!is_gm()) goto L_Unauthorized;
@log_spawns=0;
- @log_ratio=.coins_rate;
+ @log_ratio=$coinsrate;
mesn;
mes "Tired of walking the whole Aeros to spawn monsters, I was brought to existence.";
@@ -33,7 +33,7 @@ L_Unauthorized:
L_Close:
if (@log_spawns > 0) logmes "spawned "+str(@log_spawns)+" beigns at Aeros.", LOGMES_ATCOMMAND;
- if (@log_ratio != .coins_rate) logmes "set aeros ratio from "+str(@log_ratio)+" to "+str(.coins_rate), LOGMES_ATCOMMAND;
+ if (@log_ratio != $coinsrate) logmes "set aeros ratio from "+str(@log_ratio)+" to "+str($coinsrate), LOGMES_ATCOMMAND;
close;
L_Spawn:
@@ -234,11 +234,11 @@ L_Drop:
L_Rate:
mes "";
- mes "Current drop rate: " + str(.coins_rate);
+ mes "Current drop rate: " + str($coinsrate);
mes "Insert drop rate (from 0 to 10000, capped at 5000 or 50%). Use -1 to disable.";
- input .coins_rate;
- if (.coins_rate > 5000)
- .coins_rate=5000;
+ input $coinsrate;
+ if ($coinsrate > 5000)
+ $coinsrate=5000;
mes "";
mes "Ratio adjusted.";
next;
@@ -256,16 +256,17 @@ L_EventHandler:
close;
OnAerosMobDeath:
- if (.coinsrate < 0) end;
+ if ($coinsrate < 0) end;
// A level 100 monster can have a 4% drop bonus against a level 0 monster.
- // .coins_rate acts stablishing a basic drop value. Advised value: 600 (up to 10% for normal mobs)
- if (rand(10000) <= .coins_rate + (atoi(strmobinfo(3,killedrid))*4))
+ // $coinsrate acts stablishing a basic drop value. Advised value: 600 (up to 10% for normal mobs)
+ if (rand(10000) <= $coinsrate + (atoi(strmobinfo(3,killedrid))*4))
getmapxy(.@m$, .@x, .@y, 0);
makeitem(StrangeCoin, 1, .@m$, .@x, .@y);
end;
OnInit:
- .coins_rate=600; // Default value is 6% + mob str bonus
+ if ($coinsrate == 0)
+ $coinsrate=600; // Default value is 6% + mob str bonus
end;
}