summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-08 13:29:25 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-08 13:29:25 -0300
commita683df83627b0206ebd786cea6a1cda86e4da5e3 (patch)
tree989f2d5cee45c525cb5cd72831a42bf3dfd2d546 /npc
parente18fc4a53c15a80bb17b783db3ba7c21da25082f (diff)
downloadserverdata-a683df83627b0206ebd786cea6a1cda86e4da5e3.tar.gz
serverdata-a683df83627b0206ebd786cea6a1cda86e4da5e3.tar.bz2
serverdata-a683df83627b0206ebd786cea6a1cda86e4da5e3.tar.xz
serverdata-a683df83627b0206ebd786cea6a1cda86e4da5e3.zip
Rewrite Soren's Core Logic
Diffstat (limited to 'npc')
-rw-r--r--npc/soren-2/main.txt60
1 files changed, 32 insertions, 28 deletions
diff --git a/npc/soren-2/main.txt b/npc/soren-2/main.txt
index cbae53d7a..d9d70799a 100644
--- a/npc/soren-2/main.txt
+++ b/npc/soren-2/main.txt
@@ -50,6 +50,8 @@ OnCheck:
OnSanctum:
++@sorensanctum;
+ if (ispcdead())
+ end;
// Decide if we'll spawn or add items. Previous failures are NOT considerated.
.@odds=rand(1, 10000);
@@ -57,32 +59,49 @@ OnSanctum:
.@lx=24; .@ly=27;
.@ux=40; .@uy=36;
+ // Core Logic, Part 1
+ // Decide rarity
+
+ // 1%: Super Rare drop
+ // 9%: Rare Drop
+ // 10%: Normal Drop
+ // 50%: Normal Spawn
+ // 10%: Rare Spawn
+ // 19%: Drop + Spawn
+ // 1%: Super Rare Spawn
+
+ if (.@odds <= 100 || .@odds >= 9900) {
+ .@bonus=2;
+ } else if (.@odds <= 1000 || (.@odds >= 7000 && .@odds < 8000)) {
+ .@bonus=1;
+ }
+
// Generate which monster/item would be dropped, depending on your (un)luck at ODDS
- .@mid=rand(1,10);
+ .@mid=rand(1,10)+.@bonus;
switch (.@mid) {
case 1:
- .@monsterId = Moonshroom ; break;
+ .@monsterId = RedScorpion ; break;
case 2:
.@monsterId = CaveMaggot ; break;
case 3:
- .@monsterId = FallenGuard2 ; break;
+ .@monsterId = SeaSlime ; break;
case 4:
- .@monsterId = BlackScorpion ; break;
+ .@monsterId = Mouboo ; break;
case 5:
.@monsterId = LavaSlime ; break;
case 6:
- .@monsterId = RedScorpion ; break;
+ .@monsterId = BlackScorpion ; break;
case 7:
.@monsterId = Snake ; break;
case 8:
- .@monsterId = SeaSlime ; break;
+ .@monsterId = FallenGuard2 ; break;
case 9:
- .@monsterId = Mouboo ; break;
+ .@monsterId = Moonshroom ; break;
default:
.@monsterId = Yeti ; break;
}
// Item Gen
- .@mid=rand(1,10);
+ .@mid=rand(1,10)+.@bonus;
switch (.@mid) {
case 1:
.@itemId = Acorn ; break;
@@ -106,30 +125,15 @@ OnSanctum:
.@itemId = rand(CopperOre, TitaniumOre) ; break;
}
-
- // Core Logic
- // 1%: Super Rare drop
- if (.@odds <= 100) {
+ // Core Logic, part 3
+ // Make Items or Monsters
+ if (.@odds <= 2000) {
makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
- // 9%: Rare Drop
- } else if (.@odds <= 1000) {
- makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
- // 10%: Normal Drop
- } else if (.@odds <= 2000) {
- makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
- // 50%: Normal Spawn
- } else if (.@odds <= 7000) {
+ } else if (.@odds <= 8000 || .@odds > 9900) {
areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount;
- // 10%: Rare Spawn
- } else if (.@odds <= 8000) {
- areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount;
- // 19%: Drop + Spawn
- } else if (.@odds <= 9900) {
- areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount;
- makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
- // 1%: Super Rare Spawn
} else {
areamonster .map$, .@lx, .@ly, .@ux, .@uy, strmobinfo(1, .@monsterId), .@monsterId, .@amount;
+ makeitem(.@itemId, 1, .map$, rand(.@lx, .@ux), rand(.@ly, .@uy));
}
// Revert sprite if needed