diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-07-30 22:34:10 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-07-30 22:34:10 -0300 |
commit | f7d6065241a2592343b8db9fbe30d5600fe87a30 (patch) | |
tree | 905f322a59f363af471561fa06e9a4824c5a613b | |
parent | 2d9c2a7cbbdddc7cbb955e60e83e36dd1a2091cd (diff) | |
download | serverdata-f7d6065241a2592343b8db9fbe30d5600fe87a30.tar.gz serverdata-f7d6065241a2592343b8db9fbe30d5600fe87a30.tar.bz2 serverdata-f7d6065241a2592343b8db9fbe30d5600fe87a30.tar.xz serverdata-f7d6065241a2592343b8db9fbe30d5600fe87a30.zip |
Refactor Worker's Day to include Craftmaster's Day on its logic.
-rw-r--r-- | npc/001-5/worker.txt | 5 | ||||
-rw-r--r-- | npc/functions/event.txt | 44 | ||||
-rw-r--r-- | npc/functions/news.txt | 1 | ||||
-rw-r--r-- | npc/functions/weather.txt | 2 |
4 files changed, 34 insertions, 18 deletions
diff --git a/npc/001-5/worker.txt b/npc/001-5/worker.txt index fb3a55f85..1cbcab7b8 100644 --- a/npc/001-5/worker.txt +++ b/npc/001-5/worker.txt @@ -24,12 +24,13 @@ do { .@attempts=getq2(SQuest_WorkerDay); - if (.@attempts > BaseLevel/10) + .@actions=min(BaseLevel/10+REBIRTH, 15); + if (.@attempts > .@actions) alreadyFinished(); mesn; mesq l("Hey dude. During this event you can trade one @@ for more... useful items.", getitemlink(.Item)); - mesc l("Attempts for today: %d/%d", .@attempts, BaseLevel/10); + mesc l("Attempts for today: %d/%d", .@attempts, .@actions); if (countitem(.Item) == 0) close; next; diff --git a/npc/functions/event.txt b/npc/functions/event.txt index 5e3edca84..3ba1bb786 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -457,36 +457,36 @@ function script CraftmasterDay { if (!playerattached()) return; - // Date check - if (!$BETASERVER) - return; - if (gettime(7) != 2021) - return; - if (gettime(6) != JUNE) - return; - if (gettime(5) != 21) - return; - if (getmap() != "018-3") + // Event Check + if ($EVENT$ != "Worker") return; - // Scored a Blue Print (2.5%) - if (rand2(10000) < 250) { - if (BaseLevel > 80 && REBIRTH) + // Base chance is from 0.1% up to 2.5%, looping + .@odds = 10 + (MONSTERS_KILLED % 240); + // Your level reduces the odds of getting the blueprint + // (But unlocks higher rarity ones) (Can be negative) (Up to -0.2%) + .@odds -= (BaseLevel-10) / 10; + // At event map you get an extra 0.5% bonus + if (getmap() == "001-5") + .@odds += 50; + // Scored a Blue Print (up to 3.0% chance) + if (rand2(10000) < .@odds) { + if (BaseLevel >= 100 && REBIRTH) getitem any(EquipmentBlueprintE, AlchemyBlueprintE, EquipmentBlueprintD, AlchemyBlueprintD, EquipmentBlueprintC, AlchemyBlueprintC, EquipmentBlueprintB, AlchemyBlueprintB, EquipmentBlueprintA, AlchemyBlueprintA), 1; - else if (BaseLevel > 70) + else if (BaseLevel >= 80) getitem any(EquipmentBlueprintD, AlchemyBlueprintD, EquipmentBlueprintC, AlchemyBlueprintC, EquipmentBlueprintB, AlchemyBlueprintB, EquipmentBlueprintA, AlchemyBlueprintA), 1; - else if (BaseLevel > 45) + else if (BaseLevel >= 55) getitem any(EquipmentBlueprintC, AlchemyBlueprintC, EquipmentBlueprintB, AlchemyBlueprintB, EquipmentBlueprintA, AlchemyBlueprintA), 1; - else if (BaseLevel > 20) + else if (BaseLevel >= 30) getitem any(EquipmentBlueprintB, AlchemyBlueprintB, EquipmentBlueprintA, AlchemyBlueprintA), 1; else @@ -494,6 +494,18 @@ function script CraftmasterDay { return; } + // Date check + if (!$BETASERVER) + return; + if (gettime(7) != 2021) + return; + if (gettime(6) != JUNE) + return; + if (gettime(5) != 21) + return; + if (getmap() != "018-3") + return; + // Scored Monster Points (9%) if (rand2(10000) < 900) { .@mpt=rand2(BaseLevel*10, BaseLevel*100); // 600~6000 usually diff --git a/npc/functions/news.txt b/npc/functions/news.txt index be4d6304a..8cda5ff2a 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -182,6 +182,7 @@ function script EventHelp { mes ""; mes l("Visit the special event map, kill low level bosses, collect %s,", getitemlink(Pearl)); mes l("exchange them, and have fun!"); + mesc l("* All monsters may also drop Blueprints during the event."); mes ""; mes l("Happy %s!", "@@https://en.wikipedia.org/wiki/International_Workers%27_Day|"+l("international worker day")+"@@"); mesc l("Location: Worker's Cave, access by Soul Menhir."), 3; diff --git a/npc/functions/weather.txt b/npc/functions/weather.txt index 067340f0f..967ae4715 100644 --- a/npc/functions/weather.txt +++ b/npc/functions/weather.txt @@ -323,6 +323,8 @@ function _smokeDragon { .@x2=getmapinfo(MAPINFO_SIZE_X, .@key$) - 20; .@y2=getmapinfo(MAPINFO_SIZE_Y, .@key$) - 20; areamonster(.@key$, 20, 20, .@x2, .@y2, strmobinfo(1, .@mb), .@mb, 1); + if ($@GM_OVERRIDE) + debugmes "-> Smoke Dragon spawned on %s", .@key$; } else { killmonster(.@key$, "#WeatherCore::OnMob"); } |