From dff61482d407826b48329037a9785874d0d40106 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 15:52:41 -0300 Subject: Lower Woodland water sell price --- db/re/item_db.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 480eea3d0..b6d276486 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -2296,7 +2296,7 @@ item_db: ( Name: "Bottle Of Woodland Water" Type: "IT_HEALING" Buy: 400 - Sell: 80 + Sell: 40 Weight: 70 Refine: false ViewSprite: 596 -- cgit v1.2.3-70-g09d2 From 643410d866c5b9d3134a228d2a03916a843f2570 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 15:53:43 -0300 Subject: Hmm --- npc/020-5/bracco.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index 9452de333..f7be7e677 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -14,17 +14,18 @@ .@index=getarg(0); .@price=getarg(1); - mesn; - mesc l("Really melt down your @@? It'll cost you @@ GP. This action cannot be undone!", getinvindexlink(.@index), .@price), 1; - next; - if (askyesno() == ASK_NO || Zeny < .@price) - return; //failedremovecardsindex .@index, 0; // TODO: Fix this and upgrade server delinventorylist(); getinventorylist(); .@item=@inventorylist_id[.@index]; + mesn; + mesc l("Really melt down your @@? It'll cost you @@ GP. This action cannot be undone!", getitemlink(.@item), .@price), 1; + next; + if (askyesno() == ASK_NO || Zeny < .@price) + return; + if (.@item <= 0) { Exception(l("Error translating item ID @@ to @@ (Bracco, idx, id)", .@index, .@item), RB_DEFAULT|RB_SPEECH|RB_ISFATAL); } -- cgit v1.2.3-70-g09d2 From d8be5c2a5ff41ce5537d01d64265325d4111471e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 16:05:54 -0300 Subject: Delete the Empty Bottles from Mahad and Nivalis Well. Thanks, Lilanna. --- npc/012-1/mahad.txt | 1 + npc/019-1/well.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/npc/012-1/mahad.txt b/npc/012-1/mahad.txt index 859573754..e37cc6902 100644 --- a/npc/012-1/mahad.txt +++ b/npc/012-1/mahad.txt @@ -35,6 +35,7 @@ } inventoryplace GrassCarp, .@count, BottleOfWoodlandWater, .@count; + delitem EmptyBottle, .@count; // Calculate how many grass carp you'll get .@iced=0; diff --git a/npc/019-1/well.txt b/npc/019-1/well.txt index 6f90d5fb7..6839eae0a 100644 --- a/npc/019-1/well.txt +++ b/npc/019-1/well.txt @@ -144,6 +144,7 @@ L_Bottle: } inventoryplace IcedBottle, .@count, BottleOfWoodlandWater, .@count; + delitem EmptyBottle, .@count; // Calculate how many iced bottles you'll get .@iced=0; -- cgit v1.2.3-70-g09d2 From a0d052b1d55f1720708ed9662bff6e2eb9ab261e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 16:06:33 -0300 Subject: Raise Tonori Water price instead of lowering Hurnscald Water price. --- db/re/item_db.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index b6d276486..90317979a 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1867,7 +1867,7 @@ item_db: ( Name: "Bottle Of Tonori Water" Type: "IT_HEALING" Buy: 400 - Sell: 30 + Sell: 70 Weight: 70 Refine: false ViewSprite: 596 @@ -2296,7 +2296,7 @@ item_db: ( Name: "Bottle Of Woodland Water" Type: "IT_HEALING" Buy: 400 - Sell: 40 + Sell: 80 Weight: 70 Refine: false ViewSprite: 596 -- cgit v1.2.3-70-g09d2 From cb98a473c7916d688b4ed53cc9eec3a49dd5dfe5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 16:08:15 -0300 Subject: Coffee is now capable to open your eyes, making it a general dispell item. --- db/re/item_db.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 90317979a..2050c8a2d 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -3292,6 +3292,7 @@ item_db: ( Script: <" sc_end SC_SLEEP; sc_end SC_CURSE; + sc_end SC_BLIND; percentheal 1, 10; "> }, -- cgit v1.2.3-70-g09d2 From d2a96aa7466e38520154bd3c7d59f99d1ba11007 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 16:10:58 -0300 Subject: Bracco comments --- npc/020-5/bracco.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index f7be7e677..96b4ffc73 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -20,21 +20,24 @@ getinventorylist(); .@item=@inventorylist_id[.@index]; + // Error + if (.@item <= 0) + Exception(l("Error translating item ID @@ to @@ (Bracco, idx, id)", .@index, .@item), RB_DEFAULT|RB_SPEECH|RB_ISFATAL); + + // Confirmation mesn; mesc l("Really melt down your @@? It'll cost you @@ GP. This action cannot be undone!", getitemlink(.@item), .@price), 1; next; if (askyesno() == ASK_NO || Zeny < .@price) return; - if (.@item <= 0) { - Exception(l("Error translating item ID @@ to @@ (Bracco, idx, id)", .@index, .@item), RB_DEFAULT|RB_SPEECH|RB_ISFATAL); - } - + // Effective: delete item and GP delitem .@item, 1; Zeny-=.@price; + // This should be consistent but well... mesc l("@@ melt down your @@...", .name$, getinvindexlink(.@index)); - // TODO: Inventoryplace + // TODO: Inventoryplace. // Add Items (if inventory is full, your fault and not mine) for (.@i=2;.@i < getargcount(); .@i++) { if (getarg(.@i+1)) {// It may be zero -- cgit v1.2.3-70-g09d2 From dbd23045bdbb28ef782363541461e14db9b3850c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 18 Aug 2019 16:38:46 -0300 Subject: Minor comments --- npc/017-1/townhall.txt | 4 ++++ npc/017-10/_import.txt | 2 +- npc/017-10/_warps.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/npc/017-1/townhall.txt b/npc/017-1/townhall.txt index 35482d5ed..931f130a0 100644 --- a/npc/017-1/townhall.txt +++ b/npc/017-1/townhall.txt @@ -6,6 +6,7 @@ 017-1,180,20,0 script #LoF_Townhall01 NPC_HIDDEN,{ end; + OnTouch: // Sponsor and Main Quest 17+ - access granted .@q=getq(General_Narrator); @@ -21,6 +22,7 @@ OnInit: 017-1,182,20,0 script #LoF_Townhall02 NPC_HIDDEN,{ end; + OnTouch: // Sponsor and Main Quest 17+ - access granted .@q=getq(General_Narrator); @@ -35,6 +37,7 @@ OnInit: 017-1,171,20,0 script #LoF_Townhall03 NPC_HIDDEN,{ end; + OnTouch: // Sponsor and Main Quest 17+ - access granted .@q=getq(General_Narrator); @@ -49,6 +52,7 @@ OnInit: 017-1,190,20,0 script #LoF_Townhall04 NPC_HIDDEN,{ end; + OnTouch: // Sponsor and Main Quest 17+ - access granted .@q=getq(General_Narrator); diff --git a/npc/017-10/_import.txt b/npc/017-10/_import.txt index ce6916310..ddd202783 100644 --- a/npc/017-10/_import.txt +++ b/npc/017-10/_import.txt @@ -1,4 +1,4 @@ -// Map 017-10: Tech-User Forge +// Map 017-10: LoF Townhall // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/017-10/_warps.txt", "npc/017-10/dispatcher.txt", diff --git a/npc/017-10/_warps.txt b/npc/017-10/_warps.txt index 636b97e54..b4d6087eb 100644 --- a/npc/017-10/_warps.txt +++ b/npc/017-10/_warps.txt @@ -1,5 +1,5 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. -// Map 017-10: Tech-User Forge warps +// Map 017-10: LoF Townhall warps 017-10,36,79,0 warp #017-10_36_79 0,0,017-1,171,21 017-10,56,79,0 warp #017-10_56_79 0,0,017-1,180,21 017-10,60,79,0 warp #017-10_60_79 0,0,017-1,182,21 -- cgit v1.2.3-70-g09d2 From d5cb3be008ee739463f880c69eb7e40d9e2fbf55 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 19 Aug 2019 14:55:22 -0300 Subject: Drop support for Monster Collision. It's unused, it's buggy on ManaPlus, but the real reason: We use @reloadmobdb waaaaaay too often! This should allow sieges every 6 hours instead of 8 hours. --- db/re/mob_db.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index f1ad7de2f..6ff91c988 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -86,8 +86,9 @@ mob_db: ( AttackDelay: attack delay (int, defaults to 4000) AttackMotion: attack motion (int, defaults to 2000) DamageMotion: damage motion (int, defaults to 0) - SpawnCollisionSize: collision size (int, defaults to -1) - SpawnCollisionMask: collision mask (int, defaults to 1) + // SpawnCollision - Support dropped (tmw2 dd7d9ed) + //SpawnCollisionSize: collision size (int, defaults to -1) + //SpawnCollisionMask: collision mask (int, defaults to 1) MvpExp: mvp experience (int, defaults to 0) MvpDrops: { AegisName: chance (string: int) -- cgit v1.2.3-70-g09d2 From a5ebf6c44d96cc25ac7e1ea4eae045fcca93563d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 13:50:39 -0300 Subject: Fix a bug on Homunculus dispatcher officer, Erik --- npc/017-10/dispatcher.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/017-10/dispatcher.txt b/npc/017-10/dispatcher.txt index 82be5fd2a..59d78f527 100644 --- a/npc/017-10/dispatcher.txt +++ b/npc/017-10/dispatcher.txt @@ -265,7 +265,7 @@ L_Main: deployhomunculus(); mesc l("Deployed!"), 2; HOMUN_DEPLOYFIELD=.@dest; - HOMUN_DEPLOYDATE=gettimetick(2)+(60*.@hours); + HOMUN_DEPLOYDATE=gettimetick(2)+(60*60*.@hours); } close; -- cgit v1.2.3-70-g09d2 From 5629260b874fe11c31914d3f8dea2dc224b12aa7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 13:59:22 -0300 Subject: Fix bug on Erik the Dispatcher --- npc/017-10/dispatcher.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/npc/017-10/dispatcher.txt b/npc/017-10/dispatcher.txt index 59d78f527..49bff36a4 100644 --- a/npc/017-10/dispatcher.txt +++ b/npc/017-10/dispatcher.txt @@ -31,6 +31,17 @@ break; case 2: mesc l("Your homunculus is already on a mission!"), 1; + + // Homunculus should return from mission + if (gettimetick(2) > HOMUN_DEPLOYDATE) { + select + l("Recall"); + recallhomunculus(); + .@xp=lootField(HOMUN_DEPLOYFIELD); + gethomunexp(.@xp); + getexp 0, (.@lv*min(10000, gethominfo(3))/10000)*5; + close; + } mesc l("It should be back in @@", FuzzyTime(HOMUN_DEPLOYDATE)), 1; close; break; @@ -45,17 +56,6 @@ close; } - // Homunculus should return from mission - if (homstatus()) { - select - l("Recall"); - recallhomunculus(); - .@xp=lootField(HOMUN_DEPLOYFIELD); - gethomunexp(.@xp); - getexp 0, (.@lv*min(10000, gethominfo(3))/10000)*5; - close; - } - L_Main: select l("Deploy to Piou Fields [1h]"), -- cgit v1.2.3-70-g09d2 From 81bdb90dce2b92d4402c3b34ac18e528ba457d44 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:02:13 -0300 Subject: Fix a bug on anyloot() function --- npc/017-10/dispatcher.txt | 10 +++++----- npc/functions/util.txt | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/npc/017-10/dispatcher.txt b/npc/017-10/dispatcher.txt index 49bff36a4..10868f743 100644 --- a/npc/017-10/dispatcher.txt +++ b/npc/017-10/dispatcher.txt @@ -327,14 +327,14 @@ function lootField { .@val+=800; anyloot(MaggotSlime, .@lv, 10000, Arrow, .@lv, 9000, - IronArrow, .@lv, 4000, + IronArrow, .@lv, 4000, TreasureKey, max(1, .@lv/10), 6000, CactusDrink, limit(1, .@lv/10, 3), 4000, - CoinBag, limit(1, .@lv/8, 5), 4000, + CoinBag, limit(1, .@lv/8, 5), 4000, CasinoCoins, limit(1, .@lv/6, 10), 3200, - Coal, limit(1, .@lv/10, 3), 3000, - Dagger, limit(1, .@lv/15, 3), 3000, - Candy, limit(1, .@lv/5, 6), 2000, + Coal, limit(1, .@lv/10, 3), 3000, + Dagger, limit(1, .@lv/15, 3), 3000, + Candy, limit(1, .@lv/5, 6), 2000, ChocolateBar, limit(1, .@lv/20, 3), 1000, Milk, 1, 200, IcedBottle, 1, 60); diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 21abcd1f2..0a25f2649 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -743,10 +743,9 @@ function script anyloot { return Exception("Faulty anyloot skill command invoked - error"); // Get Items - for (.@i=0;.@i < getargcount(); .@i++) { + for (.@i=0;.@i < getargcount(); .@i+=2) { if (rand2(10000) < getarg(.@i+2)) getitem getarg(.@i), rand2(1, getarg(.@i+1)); - .@i++; } return true; } -- cgit v1.2.3-70-g09d2 From 77eceb6b2fe0b5984dea2cd8303a4a96f54cf921 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:03:35 -0300 Subject: Give EXP to homunculus even if they don't fight (a bonus from master EXP) --- .tools/applicator.py | 20 ++++++++++++++++++++ .tools/reapply.patch3 | 31 +++++++++++++++++++++++++++++++ .tools/scripts/init.sh | 4 ++++ conf/map/battle/homunc.conf | 3 +++ 4 files changed, 58 insertions(+) create mode 100644 .tools/applicator.py create mode 100644 .tools/reapply.patch3 diff --git a/.tools/applicator.py b/.tools/applicator.py new file mode 100644 index 000000000..7d5761b0e --- /dev/null +++ b/.tools/applicator.py @@ -0,0 +1,20 @@ +import subprocess + +# Open reapply.patch3 +f=open("reapply.patch3", "r") +subprocess.call("cd ../../server-code", shell=True) + +for line in f: + if line[0] == "#" or line[0] == "\r" or line[0] == "\n": + continue + print "Downloading patch "+line.replace("\n", "") + subprocess.call("cd ../../server-code ; wget https://gitlab.com/evol/hercules/commit/"+line.replace("\n", "")+".diff", shell=True) + print "Applying patch..." + #subprocess.call("cd ../../server-code ; ls", shell=True) + subprocess.call("cd ../../server-code ; git apply --ignore-whitespace --reject "+line.replace("\n", "")+".diff", shell=True) + print "Patch applied" + subprocess.call("cd ../../server-code ; rm "+line.replace("\n", "")+".diff", shell=True) + print "Patch deleted (success)" + + +f.close() diff --git a/.tools/reapply.patch3 b/.tools/reapply.patch3 new file mode 100644 index 000000000..05bc2a1fa --- /dev/null +++ b/.tools/reapply.patch3 @@ -0,0 +1,31 @@ +############ +## First postponed update +# Added support for mobs to drop items with Random Options +#d34df93e14582b1c2ad43763666d674b7e8440ca +# Fix inter-server deleting zeny from rodex mails when a player requests to take item +9a651bc6c9a65c69f6afe858ec12c7aa42751340 +# Truncate too big time in guild member login time field (Millenium Bug) +a4e2fb4431dfb4c914d0e315d1e43fb05ae489ec +# Before correct client disconnect send disconnect packet and flush socket +1a58bb1f11156baff437b3029feafa0d793ed803 +# Add into unit_data groupId and title. (Unsupported by clif) +cf28f0002c46e9c23e752b7e4b351de1e947f830 +# Add commands getunittitle(GID) and setunittitle(GID, TitleID) +8d732e3127434e576fe4a1203e609a8c6cc19cee + +############ +## Second postponed update +# Adds Option DB and Option Drop Groups DB to be loaded on minimal mode +#2b8463b7d2b64ab122e86b2f9e44cba0b680caf +# Adds delitemidx(index, {amount, accid}), which deletes an item at the given index. +858e732e15c495f3073c8037b9612c6c20390f76 +# getguildonline(gid) +#d9b7fa499ab5ecae677e53d43057671e43b32248 + +############ +## Third postponed update +# If error happend in pc_statusup then send back to client increase value +cdd5789d8fff14572df1e6d801ba9e2afa7b505e +# Homunculus Exp sharing (They get a % from master as bonus - master XP unaffected) +5ac507e88e116e6a11185beace600bde8896c534 + diff --git a/.tools/scripts/init.sh b/.tools/scripts/init.sh index 8fb823781..a78f20088 100755 --- a/.tools/scripts/init.sh +++ b/.tools/scripts/init.sh @@ -112,6 +112,10 @@ function make_server { ls -la ../server-data/plugins if [ -e "../server-data/.tools/beta.patch2" ] then + echo "Download and install Python 2.7 Minimal ........" + aptget_install python2.7-minimal + echo "Download and apply reapply patch ........" + python2.7 ../server-data/.tools/reapply.py echo "Apply beta.patch2 ........" git apply ../server-data/.tools/beta.patch2 echo "........ Done." diff --git a/conf/map/battle/homunc.conf b/conf/map/battle/homunc.conf index 76fee3f4e..f08d4bd20 100644 --- a/conf/map/battle/homunc.conf +++ b/conf/map/battle/homunc.conf @@ -66,3 +66,6 @@ homunculus_max_level: 140 // Max level for Homunculus S homunculus_S_max_level: 150 + +// FF-Update +hom_bonus_exp_from_master: 15 -- cgit v1.2.3-70-g09d2 From 99e5e1a5f70aaf887f38b5e22a96a948e06bb64f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:13:41 -0300 Subject: Fix bugs on Erik --- npc/017-10/dispatcher.txt | 2 +- npc/functions/util.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/npc/017-10/dispatcher.txt b/npc/017-10/dispatcher.txt index 10868f743..e612cd65f 100644 --- a/npc/017-10/dispatcher.txt +++ b/npc/017-10/dispatcher.txt @@ -169,7 +169,7 @@ L_Main: getitemlink(IcedBottle)); next; .@dest=HCD_SLIMENEST; - .@hours=3; + .@hours=2; break; case 6: mesc ".:: " + l("Snake Pit") + " ::."; diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 0a25f2649..886dec447 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -743,7 +743,7 @@ function script anyloot { return Exception("Faulty anyloot skill command invoked - error"); // Get Items - for (.@i=0;.@i < getargcount(); .@i+=2) { + for (.@i=0;.@i < getargcount(); .@i+=3) { if (rand2(10000) < getarg(.@i+2)) getitem getarg(.@i), rand2(1, getarg(.@i+1)); } -- cgit v1.2.3-70-g09d2 From 23f9c366f5f4ef968aaa39c33a32fb3e692f36a4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:15:54 -0300 Subject: Update Bracco script because we added delitemidx. Guess what the bug was? You cannot read the inv index... of an deleted item! --- npc/020-5/bracco.txt | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt index 96b4ffc73..f30bc7fd9 100644 --- a/npc/020-5/bracco.txt +++ b/npc/020-5/bracco.txt @@ -15,28 +15,20 @@ .@index=getarg(0); .@price=getarg(1); - //failedremovecardsindex .@index, 0; // TODO: Fix this and upgrade server - delinventorylist(); - getinventorylist(); - .@item=@inventorylist_id[.@index]; - - // Error - if (.@item <= 0) - Exception(l("Error translating item ID @@ to @@ (Bracco, idx, id)", .@index, .@item), RB_DEFAULT|RB_SPEECH|RB_ISFATAL); - // Confirmation mesn; - mesc l("Really melt down your @@? It'll cost you @@ GP. This action cannot be undone!", getitemlink(.@item), .@price), 1; + mesc l("Really melt down your @@? It'll cost you @@ GP. This action cannot be undone!", getinvindexlink(.@index), .@price), 1; next; if (askyesno() == ASK_NO || Zeny < .@price) return; + // Report it was done + mesc l("@@ melt down your @@...", .name$, getinvindexlink(.@index)); + // Effective: delete item and GP - delitem .@item, 1; + delitemidx .@index, 1; Zeny-=.@price; - // This should be consistent but well... - mesc l("@@ melt down your @@...", .name$, getinvindexlink(.@index)); // TODO: Inventoryplace. // Add Items (if inventory is full, your fault and not mine) for (.@i=2;.@i < getargcount(); .@i++) { -- cgit v1.2.3-70-g09d2 From 8a02537245bd730fa399fd16b240a5bed407e990 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:25:58 -0300 Subject: Lockpicks break less often, now. --- npc/functions/lockpicks.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npc/functions/lockpicks.txt b/npc/functions/lockpicks.txt index 88171c3dd..c8271ba3a 100644 --- a/npc/functions/lockpicks.txt +++ b/npc/functions/lockpicks.txt @@ -71,8 +71,8 @@ function script LockPicking { l("Give up!"), 0; if (!@menuret) { - // 10% chance to save the lockpick - if (rand(1,10) == 7) + // 25% chance to save the lockpick + if (rand2(1,4) == 2) getitem Lockpicks, 1; else dispbottom l("The lockpick broke."); @@ -92,8 +92,8 @@ function script LockPicking { } if (@pos >= .@d) { - // 10% chance to save the lockpick - if (rand(1,10) == 7) + // 20% chance to save the lockpick + if (rand2(1,5) == 3) getitem Lockpicks, 1; else dispbottom l("The lockpick broke."); -- cgit v1.2.3-70-g09d2 From dc4012c557f8c7b4da8c76951ce79deb4f8fcce0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:51:26 -0300 Subject: Fix a pipeline bug --- .tools/scripts/init.sh | 2 +- db/re/item_db.conf | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.tools/scripts/init.sh b/.tools/scripts/init.sh index a78f20088..3ddbdae94 100755 --- a/.tools/scripts/init.sh +++ b/.tools/scripts/init.sh @@ -115,7 +115,7 @@ function make_server { echo "Download and install Python 2.7 Minimal ........" aptget_install python2.7-minimal echo "Download and apply reapply patch ........" - python2.7 ../server-data/.tools/reapply.py + python2.7 ../server-data/.tools/applicator.py echo "Apply beta.patch2 ........" git apply ../server-data/.tools/beta.patch2 echo "........ Done." diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 2050c8a2d..b4ac1ed3d 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -6186,6 +6186,9 @@ item_db: ( EquipLv: 54 Refine: false ViewSprite: 1168 + Script: <" + bonus2 bSubEle,Ele_Holy,-100; + "> }, { Id: 1169 -- cgit v1.2.3-70-g09d2 From 961918066426f1eaa4277cd9aeed042ba95b1fec Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 14:51:50 -0300 Subject: Update beta.patch2 !! --- .tools/beta.patch2 | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/.tools/beta.patch2 b/.tools/beta.patch2 index 67c10bb32..41a6417fb 100644 --- a/.tools/beta.patch2 +++ b/.tools/beta.patch2 @@ -1,3 +1,15 @@ +diff --git a/src/map/battle.c b/src/map/battle.c +index fe7a64b51..8698cef67 100644 +--- a/src/map/battle.c ++++ b/src/map/battle.c +@@ -7417,6 +7417,7 @@ static const struct battle_data { + { "features/enable_achievement_system", &battle_config.feature_enable_achievement, 1, 0, 1, }, + { "ping_timer_inverval", &battle_config.ping_timer_interval, 30, 0, 99999999, }, + { "ping_time", &battle_config.ping_time, 20, 0, 99999999, }, ++ { "hom_bonus_exp_from_master", &battle_config.hom_bonus_exp_from_master, 10, 0, 100, }, + }; + + static bool battle_set_value_sub(int index, int value) diff --git a/src/map/rodex.c b/src/map/rodex.c index 766fdc5ea..996576fd3 100644 --- a/src/map/rodex.c @@ -17,8 +29,21 @@ index 766fdc5ea..996576fd3 100644 static struct rodex_interface rodex_s; struct rodex_interface *rodex; +diff --git a/src/map/script.c b/src/map/script.c +index fe8638ac3..de8122ea3 100644 +--- a/src/map/script.c ++++ b/src/map/script.c +@@ -16394,6 +16394,8 @@ static BUILDIN(summon) + clif->specialeffect(&md->bl,344,AREA); + sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000); + } ++ //mob_id = mob->once_spawn(sd, m, x, y, str, class_, amount, event, size, ai); ++ script_pushint(st, (md) ? md->bl.id : 0); + return true; + } + diff --git a/src/map/status.c b/src/map/status.c -index f06bb0330..2fd295dc0 100644 +index f06bb0330..1cd69ff18 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3552,7 +3552,7 @@ static void status_calc_regen(struct block_list *bl, struct status_data *st, str @@ -30,3 +55,29 @@ index f06bb0330..2fd295dc0 100644 if( st->int_ >= 120 ) val += ((st->int_-120)>>1) + 4; +@@ -4468,17 +4468,23 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct + case W_SHOTGUN: + case W_GRENADE: + flag = 1; ++ break; ++ case W_STAFF: ++ flag = 2; + } + } +- if ( flag ) { ++ if ( flag == 1 ) { + str = st->dex; + dex = st->str; ++ } else if ( flag == 2 ) { ++ str = st->int_; ++ dex = st->dex; + } else { + str = st->str; + dex = st->dex; + } + #ifdef RENEWAL +- dstr = str; ++ dstr = str*15/10; + #endif + //Normally only players have base-atk, but homunc have a different batk + // equation, hinting that perhaps non-players should use this for batk. -- cgit v1.2.3-70-g09d2 From ed5e62b9651d12e3e90260f8bcf71b5bd57f9f47 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 18:07:32 +0000 Subject: Update applicator.py --- .tools/applicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tools/applicator.py b/.tools/applicator.py index 7d5761b0e..e3c795aea 100644 --- a/.tools/applicator.py +++ b/.tools/applicator.py @@ -1,7 +1,7 @@ import subprocess # Open reapply.patch3 -f=open("reapply.patch3", "r") +f=open("./reapply.patch3", "r") subprocess.call("cd ../../server-code", shell=True) for line in f: -- cgit v1.2.3-70-g09d2 From 0578fb80c40f4348d845ddd6da0be8d31f0f3c02 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 18:35:10 +0000 Subject: Update init.sh --- .tools/scripts/init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.tools/scripts/init.sh b/.tools/scripts/init.sh index 3ddbdae94..cac5c3a11 100755 --- a/.tools/scripts/init.sh +++ b/.tools/scripts/init.sh @@ -115,9 +115,9 @@ function make_server { echo "Download and install Python 2.7 Minimal ........" aptget_install python2.7-minimal echo "Download and apply reapply patch ........" - python2.7 ../server-data/.tools/applicator.py + cd ../server-data/.tools; python2.7 applicator.py echo "Apply beta.patch2 ........" - git apply ../server-data/.tools/beta.patch2 + cd ../../server-code ; git apply ../server-data/.tools/beta.patch2 echo "........ Done." fi echo source src/evol/tools/vars.sh -- cgit v1.2.3-70-g09d2 From 7f8adc03d5ccd4a777ca188717c5df632121e1be Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 18:45:03 +0000 Subject: Update init.sh --- .tools/scripts/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tools/scripts/init.sh b/.tools/scripts/init.sh index cac5c3a11..7abf5701b 100755 --- a/.tools/scripts/init.sh +++ b/.tools/scripts/init.sh @@ -113,7 +113,7 @@ function make_server { if [ -e "../server-data/.tools/beta.patch2" ] then echo "Download and install Python 2.7 Minimal ........" - aptget_install python2.7-minimal + aptget_install python2.7-minimal wget echo "Download and apply reapply patch ........" cd ../server-data/.tools; python2.7 applicator.py echo "Apply beta.patch2 ........" -- cgit v1.2.3-70-g09d2 From 35b89e673d908022327daea2d0d0c5a5c66b1826 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Aug 2019 18:40:29 -0300 Subject: Old Towel also lower MP use in 10% --- db/re/item_db.conf | 1 + npc/017-1/stranger.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index b4ac1ed3d..aa8b64500 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -6042,6 +6042,7 @@ item_db: ( ViewSprite: 1159 Script: <" bonus bCastrate,-10; + bonus bUseSPrate,-10; "> }, { diff --git a/npc/017-1/stranger.txt b/npc/017-1/stranger.txt index 9d75731d1..2a2ddccae 100644 --- a/npc/017-1/stranger.txt +++ b/npc/017-1/stranger.txt @@ -5,7 +5,7 @@ // Jesusalva // Description: // Special quest, can be done every three months, on days 18~25. -// Months: February, May, August, September +// Months: February, May, August, November 017-1,44,37,0 script Stranger#LoF NPC_LOF_STRANGER,{ if (!$@GM_OVERRIDE && (gettime(GETTIME_MONTH) % 3 != 2 || (gettime(GETTIME_DAYOFMONTH) < 18 && gettime(GETTIME_DAYOFMONTH) > 25))) { -- cgit v1.2.3-70-g09d2 From 2e9c1c29a3dad1bc2ac4eb661bd3fb185f0950cb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 01:09:10 -0300 Subject: 018-6-0 THIS IS PART OF PLAYER STORYLINE AND IS A WIP --- conf/map/maps.conf | 1 + db/map_index.txt | 99 ++++++++++++++++++++++++------------------------ maps/re/018-6-0.mcache | Bin 0 -> 251 bytes npc/018-6-0/_import.txt | 2 + npc/_import.txt | 1 + 5 files changed, 54 insertions(+), 49 deletions(-) create mode 100644 maps/re/018-6-0.mcache create mode 100644 npc/018-6-0/_import.txt diff --git a/conf/map/maps.conf b/conf/map/maps.conf index 58891b763..880a86bda 100644 --- a/conf/map/maps.conf +++ b/conf/map/maps.conf @@ -127,6 +127,7 @@ map_list: ( "018-5-3", "018-5-boss", "018-5", + "018-6-0", "019-1-1", "019-1", "019-2", diff --git a/db/map_index.txt b/db/map_index.txt index aacf197c5..c22009977 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -124,52 +124,53 @@ 018-5-3 124 018-5-boss 125 018-5 126 -019-1-1 127 -019-1 128 -019-2 129 -019-3 130 -019-4-1 131 -019-4 132 -020-1 133 -020-2 134 -020-3 135 -020-4 136 -020-5 137 -020-6 138 -020-7-1 139 -020-7-2 140 -020-7 141 -021-1 142 -021-2 143 -021-3 144 -021-4 145 -022-1 146 -023-1 147 -023-2 148 -023-3-1 149 -023-3-2 150 -023-3 151 -024-1 152 -024-10 153 -024-11 154 -024-12 155 -024-13 156 -024-14 157 -024-15 158 -024-16 159 -024-2 160 -024-3 161 -024-4 162 -024-5 163 -024-6 164 -024-7 165 -024-8 166 -024-9 167 -boss 168 -botcheck 169 -guilds 170 -sec_pri 171 -soren-2 172 -soren 173 -test 174 -testbg 175 +018-6-0 127 +019-1-1 128 +019-1 129 +019-2 130 +019-3 131 +019-4-1 132 +019-4 133 +020-1 134 +020-2 135 +020-3 136 +020-4 137 +020-5 138 +020-6 139 +020-7-1 140 +020-7-2 141 +020-7 142 +021-1 143 +021-2 144 +021-3 145 +021-4 146 +022-1 147 +023-1 148 +023-2 149 +023-3-1 150 +023-3-2 151 +023-3 152 +024-1 153 +024-10 154 +024-11 155 +024-12 156 +024-13 157 +024-14 158 +024-15 159 +024-16 160 +024-2 161 +024-3 162 +024-4 163 +024-5 164 +024-6 165 +024-7 166 +024-8 167 +024-9 168 +boss 169 +botcheck 170 +guilds 171 +sec_pri 172 +soren-2 173 +soren 174 +test 175 +testbg 176 diff --git a/maps/re/018-6-0.mcache b/maps/re/018-6-0.mcache new file mode 100644 index 000000000..f6cdea270 Binary files /dev/null and b/maps/re/018-6-0.mcache differ diff --git a/npc/018-6-0/_import.txt b/npc/018-6-0/_import.txt new file mode 100644 index 000000000..09a96c3cd --- /dev/null +++ b/npc/018-6-0/_import.txt @@ -0,0 +1,2 @@ +// Map 018-6-0: Cave Of Trials +// This file is generated automatically. All manually added changes will be removed when running the Converter. diff --git a/npc/_import.txt b/npc/_import.txt index d568e0aaf..3fd312d79 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -126,6 +126,7 @@ @include "npc/018-5-3/_import.txt" @include "npc/018-5-boss/_import.txt" @include "npc/018-5/_import.txt" +@include "npc/018-6-0/_import.txt" @include "npc/019-1-1/_import.txt" @include "npc/019-1/_import.txt" @include "npc/019-2/_import.txt" -- cgit v1.2.3-70-g09d2 From 16391e7db6651ed931f86030980f2ed1bfb601a7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 17:20:44 -0300 Subject: Fix minor "bug" on idle EXP-ing --- npc/003-0-1/professor.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npc/003-0-1/professor.txt b/npc/003-0-1/professor.txt index e454e1805..dbde5ce08 100644 --- a/npc/003-0-1/professor.txt +++ b/npc/003-0-1/professor.txt @@ -35,7 +35,8 @@ OnSpeeching: // If you have been IDLE for at least 2 seconds (max AFK 15 minutes) // You'll get the EXP. Note you don't need to sit, only be idle. if (is_between(2, 900, checkidle())) { - getexp 1+getskilllv(TMW2_SPEECH),1; + .@sk=getskilllv(TMW2_SPEECH); + getexp 1+.@sk,1+(.@sk/2); // dispbottom l("It is a boring speech..."); // If you are learning TMW2_READANCIENTLANGUAGES -- cgit v1.2.3-70-g09d2 From 40f3b9b2ec96e29f433003995aa6f97e7725cb05 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 17:56:50 -0300 Subject: We need account ID, not char id on @grantpower --- npc/commands/grantpower.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/commands/grantpower.txt b/npc/commands/grantpower.txt index ac48c10b7..07dc6b71e 100644 --- a/npc/commands/grantpower.txt +++ b/npc/commands/grantpower.txt @@ -22,7 +22,7 @@ OnCall: } // Player is not attached - .@id = getcharid(0, .@request$); + .@id = getcharid(3, .@request$); if (!.@id) { Exception("Player not found.", RB_ISFATAL|RB_DISPBOTTOM); } -- cgit v1.2.3-70-g09d2 From acbfb6a6c32d81a192819f0e1c31ce185d5356f1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 17:57:30 -0300 Subject: Fix another bug --- npc/commands/grantpower.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/commands/grantpower.txt b/npc/commands/grantpower.txt index 07dc6b71e..3ce37e47b 100644 --- a/npc/commands/grantpower.txt +++ b/npc/commands/grantpower.txt @@ -43,7 +43,7 @@ OnCall: rif(countitem(AegisShield), l("Aegis Shield")), AegisShield, l("Abort"), 0; mes ""; - .@ori=getcharid(0); + .@ori=getcharid(3); .@ite=@menuret; if (!.@ite) close; -- cgit v1.2.3-70-g09d2 From a0eec150a202785a058304d505bf5dcabf503c23 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 18:01:25 -0300 Subject: Well, this sort of stuff may happen - instance is valid but is not what we're looking for --- npc/014-5/sagratha.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npc/014-5/sagratha.txt b/npc/014-5/sagratha.txt index a871ea7f5..2b13a8503 100644 --- a/npc/014-5/sagratha.txt +++ b/npc/014-5/sagratha.txt @@ -37,6 +37,13 @@ function script SaggyInstCheck { setq2 HurnscaldQuest_Sagratha, .@inst; } + // It broke + if (getmapinfo(MAPINFO_SIZE_X, .@mapn$) <= 0) { + setq2 HurnscaldQuest_Sagratha, 0; + // Infinite Loop? + return SaggyInstCheck(.@house); + } + if (.@house) { return .@mapn$; } else { -- cgit v1.2.3-70-g09d2 From d8b24f235a1514418b5a8652e34e0ed34d7faf57 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 18:25:22 -0300 Subject: Let's try with callfunc --- npc/014-5/sagratha.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/014-5/sagratha.txt b/npc/014-5/sagratha.txt index 2b13a8503..93e2ab6f3 100644 --- a/npc/014-5/sagratha.txt +++ b/npc/014-5/sagratha.txt @@ -41,7 +41,7 @@ function script SaggyInstCheck { if (getmapinfo(MAPINFO_SIZE_X, .@mapn$) <= 0) { setq2 HurnscaldQuest_Sagratha, 0; // Infinite Loop? - return SaggyInstCheck(.@house); + return callfunc("SaggyInstCheck", .@house); } if (.@house) { -- cgit v1.2.3-70-g09d2 From 5d7212fcbb648663d87b6b900b79807bd61fe00f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 18:32:59 -0300 Subject: Mouboos are cute password on Sagratha Door and reaction --- npc/014-5/sagratha.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/npc/014-5/sagratha.txt b/npc/014-5/sagratha.txt index 93e2ab6f3..a5e2ebfb9 100644 --- a/npc/014-5/sagratha.txt +++ b/npc/014-5/sagratha.txt @@ -136,10 +136,17 @@ L_Open: select l("Knock on the door?"), l("Attempt to lockpick?"), + l("Say that Mouboos are Cute?"), l("Leave it alone?"); mes ""; - if (@menu == 3) + if (@menu == 4) close; + if (@menu == 3) { + mesc l("Surprisingly, nothing happens."); + next; + mesc l("A close inspection suggests the lock was busted. You approach to inspect."); + next; + } mesc l("*CREAK*"); mesc l("The pressure you did made the door burst open. It is unusually quiet inside..."); next; -- cgit v1.2.3-70-g09d2 From abb6d65279ab24b4af535994177bbd421657d4c5 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 22 Aug 2019 19:19:36 -0300 Subject: Double Sagratha Campaign dialog times --- npc/015-8-1/campaign.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/npc/015-8-1/campaign.txt b/npc/015-8-1/campaign.txt index 810ebc385..36fc39eee 100644 --- a/npc/015-8-1/campaign.txt +++ b/npc/015-8-1/campaign.txt @@ -28,8 +28,8 @@ OnBegin: unitstop(.SAGRATHA); unitstop(.BOSS); - sc_start(SC_STUN, 4500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .SAGRATHA); - sc_start(SC_STUN, 4500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .BOSS); + sc_start(SC_STUN, 9000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .SAGRATHA); + sc_start(SC_STUN, 9000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .BOSS); // FIXME: Seems like this is an "unsafe command" in 4144's opinion // Prevent players from engaging Sagratha and allies @@ -41,7 +41,7 @@ OnBegin: unittalk(.SAGRATHA, l("What are you doing here, @@!", get_race())); - addtimer(1000, .@n$+"::OnS02"); + addtimer(2000, .@n$+"::OnS02"); end; OnS02: @@ -51,7 +51,7 @@ OnS02: unittalk(.SAGRATHA, l("I don't need help!")); unittalk(.BOSS, l("Die already!")); - addtimer(1500, .@n$+"::OnS03"); + addtimer(3000, .@n$+"::OnS03"); end; OnS03: @@ -61,7 +61,7 @@ OnS03: unittalk(.SAGRATHA, l("If you don't want to die, fight!")); unittalk(.BOSS, lg("Murder her too!", "Murder him too!")); - addtimer(1500, .@n$+"::OnS04"); + addtimer(3000, .@n$+"::OnS04"); end; OnS04: -- cgit v1.2.3-70-g09d2 From 46ff8049c05240f9b9eadbe5a10645b49e71e888 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 23 Aug 2019 15:01:15 -0300 Subject: Full Throttle Cooldown: 30m -> 10m --- db/re/skill_db.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 8dd019385..a1fd3221f 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -33212,7 +33212,7 @@ skill_db: ( Lv10: 55000 } SkillData2: 20000 - CoolDown: 1800000 + CoolDown: 600000 FixedCastTime: -1 Requirements: { SPCost: 1 -- cgit v1.2.3-70-g09d2 From a84f5d523a04158266e33a1432ed6135389d4cb8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 23 Aug 2019 15:10:53 -0300 Subject: Mana Magic MP Cost -90% --- npc/magic/cuteheart.txt | 4 ++-- npc/magic/dragokin.txt | 4 ++-- npc/magic/fairykingdom.txt | 4 ++-- npc/magic/frozenheart.txt | 4 ++-- npc/magic/halhiss.txt | 4 ++-- npc/magic/kalboo.txt | 4 ++-- npc/magic/kalmurk.txt | 4 ++-- npc/magic/kalspike.txt | 4 ++-- npc/magic/kalwulf.txt | 4 ++-- npc/magic/limerizer.txt | 4 ++-- npc/magic/plantkingdom.txt | 4 ++-- npc/magic/stoneheart.txt | 4 ++-- npc/magic/transmigration.txt | 2 +- npc/magic/zarkor.txt | 6 +++--- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/npc/magic/cuteheart.txt b/npc/magic/cuteheart.txt index d273feb31..2030b03ff 100644 --- a/npc/magic/cuteheart.txt +++ b/npc/magic/cuteheart.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_CUTEHEART; - @mp=235; - @amp=45; + @mp=25; + @amp=4; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/dragokin.txt b/npc/magic/dragokin.txt index 2a8cb89b0..cfcc2ef44 100644 --- a/npc/magic/dragokin.txt +++ b/npc/magic/dragokin.txt @@ -25,8 +25,8 @@ OnCall: // Setup @sk=TMW2_DRAGOKIN; - @mp=500; - @amp=40; + @mp=50; + @amp=4; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/fairykingdom.txt b/npc/magic/fairykingdom.txt index 3490ab823..f8f177ccb 100644 --- a/npc/magic/fairykingdom.txt +++ b/npc/magic/fairykingdom.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_FAIRYKINGDOM; - @mp=400; - @amp=42; + @mp=40; + @amp=4; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/frozenheart.txt b/npc/magic/frozenheart.txt index 0eeec2194..1b59a53f5 100644 --- a/npc/magic/frozenheart.txt +++ b/npc/magic/frozenheart.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_FROZENHEART; - @mp=375; - @amp=55; + @mp=37; + @amp=5; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/halhiss.txt b/npc/magic/halhiss.txt index b86840cb8..e497d8826 100644 --- a/npc/magic/halhiss.txt +++ b/npc/magic/halhiss.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_HALHISS; - @mp=350; - @amp=60; + @mp=35; + @amp=6; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/kalboo.txt b/npc/magic/kalboo.txt index 6956cdc2a..17e2d64e6 100644 --- a/npc/magic/kalboo.txt +++ b/npc/magic/kalboo.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_KALBOO; - @mp=250; - @amp=55; + @mp=25; + @amp=5; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/kalmurk.txt b/npc/magic/kalmurk.txt index c9ceda89f..10ba98d7c 100644 --- a/npc/magic/kalmurk.txt +++ b/npc/magic/kalmurk.txt @@ -30,8 +30,8 @@ OnCall: // Setup @sk=TMW2_KALMURK; - @mp=200; - @amp=50; + @mp=40; + @amp=5; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/kalspike.txt b/npc/magic/kalspike.txt index f3d07c32c..14203821b 100644 --- a/npc/magic/kalspike.txt +++ b/npc/magic/kalspike.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_KALSPIKE; - @mp=250; - @amp=55; + @mp=25; + @amp=5; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/kalwulf.txt b/npc/magic/kalwulf.txt index 22b27d2d5..dc5b3e0f8 100644 --- a/npc/magic/kalwulf.txt +++ b/npc/magic/kalwulf.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_KALWURF; - @mp=450; - @amp=45; + @mp=45; + @amp=5; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/limerizer.txt b/npc/magic/limerizer.txt index a786d8eb9..cbf961387 100644 --- a/npc/magic/limerizer.txt +++ b/npc/magic/limerizer.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_LIMERIZER; - @mp=300; - @amp=30; + @mp=30; + @amp=3; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/plantkingdom.txt b/npc/magic/plantkingdom.txt index 2788f80de..2ee9e314e 100644 --- a/npc/magic/plantkingdom.txt +++ b/npc/magic/plantkingdom.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_PLANTKINGDOM; - @mp=300; - @amp=30; + @mp=30; + @amp=3; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/stoneheart.txt b/npc/magic/stoneheart.txt index c31f90f7d..38091a2f0 100644 --- a/npc/magic/stoneheart.txt +++ b/npc/magic/stoneheart.txt @@ -23,8 +23,8 @@ OnCall: // Setup @sk=TMW2_STONEHEART; - @mp=475; - @amp=55; + @mp=47; + @amp=5; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) diff --git a/npc/magic/transmigration.txt b/npc/magic/transmigration.txt index d04dc9e85..a1cb2a958 100644 --- a/npc/magic/transmigration.txt +++ b/npc/magic/transmigration.txt @@ -17,7 +17,7 @@ OnCall: } // Check requisites - if (!MagicCheck(TMW2_TRANSMIGRATION, 185, -5)) + if (!MagicCheck(TMW2_TRANSMIGRATION, 215, -5)) end; .@q=getq(General_Auldsbel); diff --git a/npc/magic/zarkor.txt b/npc/magic/zarkor.txt index 8fa29fe46..64d86d70c 100644 --- a/npc/magic/zarkor.txt +++ b/npc/magic/zarkor.txt @@ -32,8 +32,8 @@ OnCall: // Setup @sk=TMW2_ZARKOR; - @mp=400; - @amp=75; + @mp=40; + @amp=7; // Check if you have mana to cast // MagicCheck(SkillID, Mana{, MP per level}) @@ -48,7 +48,7 @@ OnCall: // set cooldown @zark_at=gettimetick(2); - @zark_at=@zark_at+20; + @zark_at=@zark_at+80; end; OnInit: -- cgit v1.2.3-70-g09d2 From 119dca1d758a04e79e1924df43ac4d913c565246 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 15:28:57 -0300 Subject: Do we even need @debug command? --- npc/commands/debug.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index 70d0d8392..5ffb409bb 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -7,6 +7,7 @@ function script GlobalDebugMenu { resetstatus; resetskill; resetlvl 1; + dispbottom b("ALL PERMANENT STATUS BOOSTS WERE ALSO RESET"); dispbottom l("Reset done!"); if (getarg(0,0) == 3) { closedialog; -- cgit v1.2.3-70-g09d2 From b5c2df9b1771d3858349461c672b9f44a8209445 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 15:32:08 -0300 Subject: Fix a minor bug on Nard, where setcamnpc didn't work correctly due lack of instance_npcname() --- npc/002-3/nard.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npc/002-3/nard.txt b/npc/002-3/nard.txt index 24f300405..24bc12848 100644 --- a/npc/002-3/nard.txt +++ b/npc/002-3/nard.txt @@ -57,7 +57,7 @@ L_Checker: mesq l("Ship travels are not free. Also, I have a few friends on the Island, and I would like you to check out on them."); next; showavatar NPC_ELMO; - setcamnpc "Elmo"; + setcamnpc instance_npcname("Elmo"); mesn l("Elmo"); mesq l("I, Elmo, captain's deputy, will help you to make the maximum possible money in Candor!"); mesc l("Talk to Elmo to get an EXP UP Boost until level 15!"), 2; @@ -72,6 +72,7 @@ L_Checker: mesc l("EXP Gain raised in @@% for one hour!", .@BONUS), 2; next; showavatar NPC_NARD; + setcamnpc; mesn; mesq l("After that, we're going to Tulimshar. Tulim is the most important city on the world, and the Alliance have an office there."); next; -- cgit v1.2.3-70-g09d2 From 1fd10d2d37da7706c09af01df3f5d01953ab30d4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 15:32:26 -0300 Subject: Rewrite Axzell code to use the unified Status Reset. Remove Mede's impossible conditional of level 10. --- npc/017-6/azwell.txt | 42 +----------------------------------------- npc/020-3/mede.txt | 5 +---- 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/npc/017-6/azwell.txt b/npc/017-6/azwell.txt index 79fa73dd7..af7f3bf2a 100644 --- a/npc/017-6/azwell.txt +++ b/npc/017-6/azwell.txt @@ -54,47 +54,7 @@ L_ResetStats: mesq l("Status point reset can't be undone. Do you really want this?"); L_ConfirmReset: - select - lg("Yes, I am sure."), - lg("I need to think about it..."); - - switch (@menu) - { - case 1: - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Let me just have a quick look at you. Hm... I will need @@ GP to reset your stats.", .@plush_count); - - select - rif(Zeny >= .@plush_count, l("Here, take as much as you need, I have plenty!")), - rif(Zeny > 0 && Zeny < .@plush_count, l("I don't have enough money...")), - rif(Zeny == 0, l("Oh no, I don't have any money on me right now.")), - l("I have to go, sorry."); - - if (@menu > 1) { - goto L_Quit; - } - - // TODO: I think there were functions to deal with GP - set Zeny, Zeny-.@plush_count; - - speech S_FIRST_BLANK_LINE | S_LAST_NEXT, - l("Thank you."), - l("Now stand still... It should not take much time..."); - - .@wasSP = StatusPoint; - resetstatus; - if (StatusPoint == .@wasSP) { - speech S_LAST_NEXT, - l("It seems that you have no status points to reset!"), - l("But the money you brought was really awesome you know."), - l("Come back when you will really need me."); - } else { - speech S_LAST_NEXT, - l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), - l("Spend it wisely this time."), - l("But you are welcome to reset your stats again! I need the money."); - } - } + ConfirmStatusReset(); goto L_Quit; L_Quit: diff --git a/npc/020-3/mede.txt b/npc/020-3/mede.txt index d35e7624d..52a3c5e79 100644 --- a/npc/020-3/mede.txt +++ b/npc/020-3/mede.txt @@ -38,10 +38,7 @@ L_ResetStats: mesq l("Status point reset can't be undone. Do you really want this?"); L_ConfirmReset: - if (BaseLevel <= 10) - ConfirmStatusReset(0); - else - ConfirmStatusReset(); + ConfirmStatusReset(); goto L_Quit; L_MonsterPot: -- cgit v1.2.3-70-g09d2 From 0d039697a8d4aca60be42563e15535e810dca039 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 16:53:14 -0300 Subject: Add MC_DISCOUNT and MC_OVERCHARGE to skill tree --- db/re/skill_tree.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf index 62a80a57f..722b35bc8 100644 --- a/db/re/skill_tree.conf +++ b/db/re/skill_tree.conf @@ -65,6 +65,8 @@ Human: { ALL_INCCARRY: 0 TF_STEAL: 0 MC_PUSHCART: 0 + MC_DISCOUNT: 0 + MC_OVERCHARGE: 0 ///////////////// Wizard class // Destructive Magic (AOE) -- cgit v1.2.3-70-g09d2 From 1a1c11ced8ee5dccd694862bab0ff9560223df58 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 17:01:35 -0300 Subject: NEW THIEF SKILL (Rank 4): BARTER/OVERCHARGE (Sell (stolen or not) stuff for more GP) --- npc/015-2/ben.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/npc/015-2/ben.txt b/npc/015-2/ben.txt index d64a9619f..0428a3155 100644 --- a/npc/015-2/ben.txt +++ b/npc/015-2/ben.txt @@ -37,6 +37,7 @@ L_Quest: mesq l("Congrats! You rank up! You are now a(n) @@!", thiefrank()); if (THIEF_RANK == 2) goto L_Rank2; if (THIEF_RANK == 3) goto L_Rank3; + if (THIEF_RANK == 4) goto L_Rank4; } else { mesn; mesq l("Well, you need more experience. Keep trying!"); @@ -85,6 +86,18 @@ L_Rank3: mesq l("You now gained two extra kilograms to your weight quota! Ka-pow, that's fantastic! Good luck!"); close; +// Learn OVERCHARGE +L_Rank4: + skill(MC_OVERCHARGE,1,0); + next; + mesn; + mesq l("Now, you'll learn an important trick! Stealing is nice, but scamming is even better!"); + mesc l("We must blame Saulc!"); + next; + mesn; + mesq l("This new skill will allow you to pinch every gold piece from a NPC when selling stuff! Ka-pow, now you can steal items and resell them for moar GP! AMAZING!"); + close; + // Allow to level up thief skills L_Menu: next; @@ -97,6 +110,7 @@ L_Menu: select rif(getskilllv(TF_STEAL), l("Improve Stealing to level ")+getskilllv(TF_STEAL)+1), rif(getskilllv(ALL_INCCARRY), l("Improve Max Weight to level ")+getskilllv(ALL_INCCARRY)+1), + rif(getskilllv(MC_OVERCHARGE), l("Improve Barter to level ")+getskilllv(MC_OVERCHARGE)+1), l("None at the moment."); mes ""; // BlueCoral, {CrocClaw, OceanCrocClaw: Empty Box}, PlushroomBox @@ -113,6 +127,12 @@ L_Menu: else Mobpt-=1000; break; + case 3: + if (!mlearn(MC_OVERCHARGE, 8, 1, PlushroomBox, 2*getskilllv(MC_OVERCHARGE))) // Max 21% discount (out of 24%) + mesc l("You do not meet all requisites for this skill."), 1; + else + Mobpt-=1000; + break; case 3: close; } -- cgit v1.2.3-70-g09d2 From fccd3e5225328c4bed93d7f2daeac39344ba654d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 17:02:49 -0300 Subject: Updater --- npc/functions/clientversion.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index 3950f70f2..b628404c0 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -567,6 +567,11 @@ function script clientupdater { getitem GoldenGift, 1; if (BaseLevel >= 75 && getq(TulimsharQuest_Eistein) >= 3) getitem GraduationRobe, 1; + // Grant you Thief Skill Tier 4 + if (THIEF_RANK >= 4) { + skill(MC_OVERCHARGE,1,0); + dispbottom l("You have learnt \"Barter\" in Thief Skills."); + } } -- cgit v1.2.3-70-g09d2 From bc84fa92363fac1132f388b9405a530fc538dbe8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 17:18:03 -0300 Subject: Fix duplicate case --- npc/015-2/ben.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/015-2/ben.txt b/npc/015-2/ben.txt index 0428a3155..080b32279 100644 --- a/npc/015-2/ben.txt +++ b/npc/015-2/ben.txt @@ -133,7 +133,7 @@ L_Menu: else Mobpt-=1000; break; - case 3: + default: close; } goto L_Menu; -- cgit v1.2.3-70-g09d2 From 99d4e0237cb69e87c94ce5f5a97fb2454106d006 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 17:25:15 -0300 Subject: Change max cart weight from 8kg to 5kg --- conf/map/battle/player.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/map/battle/player.conf b/conf/map/battle/player.conf index aa9af9cf3..3c6d850e1 100644 --- a/conf/map/battle/player.conf +++ b/conf/map/battle/player.conf @@ -135,7 +135,7 @@ max_def: 99 over_def_bonus: 0 // Max weight carts can hold. -max_cart_weight: 8000 +max_cart_weight: 5000 // Prevent logout of players after being hit for how long (in ms, 0 disables)? prevent_logout: 10000 -- cgit v1.2.3-70-g09d2 From 22d32caa83810d18c64c9b2c6f09acec0f015c97 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 18:00:15 -0300 Subject: Political System sketch. Siege defeat will now lower town reputation. All towns start with 50% town reputation (meaning 50% of income). Best income is Tulimshar, Worst income is Halinarzo. Volatile! Experimental sketch only. No pratical effects thus far. --- npc/003-3/malindou.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ npc/functions/siege.txt | 8 ++++++-- npc/functions/util.txt | 16 ++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index f2efd46ce..952ba67a8 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -418,6 +418,51 @@ OnInit: debugmes "* Magic Class Removed"; debugmes ""; } + // Current UPDATE value: Sab Ago 24 17:42:24 -03 2019 + // Political System + if ($UPDATE < 1566679344) { + $UPDATE=1566679344; + // $LOC_MAYOR$ - Stores the name of current Hurnscald Mayor + // $LOC_MONEY - Total money reserves of Hurnscald + // $LOC_TAX - How much in % is charged as taxes. (OnBuy income) + // $LOC_EXPORT - Defines how much Hurnscald exports (weekly income) + // $LOC_REPUTATION - Town reputation. Affects Max Tax and Weekly Income. + + // Tulim + $TULIM_MAYOR$="Saulc"; + $TULIM_TAX=100; + $TULIM_EXPORT=10000; + $TULIM_REPUTATION=50; + // Halin + $HALIN_MAYOR$="Saulc"; + $HALIN_TAX=100; + $HALIN_EXPORT=1000; + $HALIN_REPUTATION=50; + // Hurns + $HURNS_MAYOR$="Saulc"; + $HURNS_TAX=100; + $HURNS_EXPORT=3000; + $HURNS_REPUTATION=50; + // LoF + $LOF_MAYOR$="Jesus Saves"; + $LOF_TAX=100; + $LOF_EXPORT=5000; + $LOF_REPUTATION=50; + // Nival + $NIVAL_MAYOR$="Jesus Saves"; + $NIVAL_TAX=100; + $NIVAL_EXPORT=3000; + $NIVAL_REPUTATION=50; + // Frostia + $FROSTIA_MAYOR$="Jesus Saves"; + $FROSTIA_TAX=100; + $FROSTIA_EXPORT=1000; + $FROSTIA_REPUTATION=50; + + debugmes ""; + debugmes "* Political System Base"; + debugmes ""; + } diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt index 98a600dc8..6acdeb359 100644 --- a/npc/functions/siege.txt +++ b/npc/functions/siege.txt @@ -191,14 +191,18 @@ function script siege_check { .@mb+=mobcount(.@m$, "#SiegeCtrl::OnColonelDeath"); .@mb+=mobcount(.@m$, "#SiegeCtrl::OnGeneralDeath"); - // Players failed, so reduce score in 1~10 (like Sergeant~General). + // Players failed, so reduce score in 1~5 (like Sergeant~General). // In future, it could be inverse proportion (-9 for sergeant, -1 for general) if (.@mb) { if ($GAME_STORYLINE == 2) - $MK_TEMPVAR-=rand2(1, 10); + $MK_TEMPVAR-=rand2(1, 5); + kamibroadcast("Players failed to defend the city!!"); debugmes "Number of boss grade monsters found: %d", .@mb; $SIEGE_DIFFICULTY=max(1, ($SIEGE_DIFFICULTY/2)); + // Lower the town reputation in 10% + .@var$="$"+MapToLoc(.@m$)+"_REPUTATION"; + setd(.@var$, getd(.@var$)*9/10); } else { kamibroadcast("The city was defended with success! GG, everyone!"); $SIEGE_DIFFICULTY+=1; diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 886dec447..c32a831e1 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -825,3 +825,19 @@ function script EnterTown { return; } +// Convert map name to location id +// MapToLoc( MapName ) +function script MapToLoc { + // Fill variable + .@v$=getarg(0); + + // Validade variable, see npc/000-1/exit.txt first + setarray .@mapx$, "005-1", "003-1", "009-1", "012-1", "017-1", "018-5", "020-1", "024-1"; + setarray .@locs$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Lilit", "Nival", "Frostia"; + .@lx=array_find(.@locs$, .@v$); + if (.@lx < 0) + return Exception("Invalid map passed to MapToLoc: "+.@v$, RB_DEBUGMES); + + return .@locs$[.@lx]; +} + -- cgit v1.2.3-70-g09d2 From c87308aaf7173fc86c14ee17265c5cd9b5c95561 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 24 Aug 2019 18:09:37 -0300 Subject: What's the most important thing in a political system? TAXES, OF COURSE! --- npc/012-1/shoppakep.txt | 4 ++++ npc/012-2/melina.txt | 4 ++++ npc/012-3/alan.txt | 6 +++++ npc/012-5/nicholas.txt | 4 ++++ npc/functions/politics.txt | 55 ++++++++++++++++++++++++++++++++++++++++++++++ npc/scripts.conf | 1 + 6 files changed, 74 insertions(+) create mode 100644 npc/functions/politics.txt diff --git a/npc/012-1/shoppakep.txt b/npc/012-1/shoppakep.txt index ee65b7d9b..e8e400c75 100644 --- a/npc/012-1/shoppakep.txt +++ b/npc/012-1/shoppakep.txt @@ -69,4 +69,8 @@ OnClock0546: .CurrentItem=ShoppaKepItem(); sellitem .CurrentItem, -1, rand(1,4); end; +// Pay your taxes! +OnBuyItem: + PurchaseTaxes("Hurns"); + end; } diff --git a/npc/012-2/melina.txt b/npc/012-2/melina.txt index bdb40dbc4..cfb636bf0 100644 --- a/npc/012-2/melina.txt +++ b/npc/012-2/melina.txt @@ -59,5 +59,9 @@ OnClock2358: else restoreshopitem Beer, 150, ($HELENA_ST/3)+1; end; +// Pay your taxes! +OnBuyItem: + PurchaseTaxes("Hurns"); + end; } diff --git a/npc/012-3/alan.txt b/npc/012-3/alan.txt index 286270e78..e595465d8 100644 --- a/npc/012-3/alan.txt +++ b/npc/012-3/alan.txt @@ -125,5 +125,11 @@ OnClock1800: restoreshopitem CursedArrow, -1, (($ARKIM_ST-1400)/200); if ($ARKIM_ST > 5600) restoreshopitem PoisonArrow, -1, (($ARKIM_ST-2800)/200); + end; + +// Pay your taxes! +OnBuyItem: + PurchaseTaxes("Hurns"); + end; } diff --git a/npc/012-5/nicholas.txt b/npc/012-5/nicholas.txt index 7ffbd14d5..77e84c06c 100644 --- a/npc/012-5/nicholas.txt +++ b/npc/012-5/nicholas.txt @@ -248,4 +248,8 @@ OnClock1801: restoreshopitem Dagger, 600, 5; restoreshopitem SharpKnife, 450, 10; end; +// Pay your taxes! +OnBuyItem: + PurchaseTaxes("Hurns"); + end; } diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt new file mode 100644 index 000000000..5a2a40981 --- /dev/null +++ b/npc/functions/politics.txt @@ -0,0 +1,55 @@ +// TMW2 Script +// Author: +// Jesusalva +// Description: +// Central Town Political System Controller +// Note: The office is NOT Mayor, we have from kings to mayors here and you're +// not a citzen (yet). It'll be... I'll think in a name better than Minister. +// NPCs: +// Tulim - +// Halin - +// Hurns - Airlia +// LoF - +// Nival - +// Frostia - +// Variables: +// $LOC_MAYOR$ - Stores the name of current Hurnscald Mayor +// $LOC_MONEY - Total money reserves of Hurnscald +// $LOC_TAX - How much in % is charged as taxes. (OnBuy income) +// $LOC_EXPORT - Defines how much Hurnscald exports (weekly income) +// $LOC_REPUTATION - Town reputation. Affects Max Tax and Weekly Income; +// Note: Tax cannot exceed 10% ie 1000. Reputation must be between 0 and 100. + +// Proccess Taxes from purchases +// PurchaseTaxes( Location ) +function script PurchaseTaxes { + .@tax=0; + for (.@i=0; .@i < getarraysize(@bought_nameid); .@i++) { + // Note: Some NPC might not + .@price=getiteminfo(@bought_nameid[.@i], ITEMINFO_BUYPRICE); + .@tax+=.@price*@bought_quantity[.@i]; + } + .@loc$=strtoupper(getarg(0, LOCATION$)); + .@vat=getd("$"+.@loc$+"_TAX"); + .@tax=.@tax*.@vat/10000; + if (.@tax) { + debugmes "%s paid %d in taxes to %s prefecture!", strcharinfo(0), .@tax, .@loc$; + setd("$"+.@loc$+"_TAX", .@vat+.@tax); + } + return; +} + +- script Politics NPC_HIDDEN,{ + +// Weekly income +OnSun0000: + $TULIM_MONEY+=$TULIM_EXPORT*limit(0, $TULIM_REPUTATION, 100)/100; + $HALIN_MONEY+=$HALIN_EXPORT*limit(0, $HALIN_REPUTATION, 100)/100; + $HURNS_MONEY+=$HURNS_EXPORT*limit(0, $HURNS_REPUTATION, 100)/100; + $LOF_MONEY+=$LOF_EXPORT*limit(0, $LOF_REPUTATION, 100)/100; + $NIVAL_MONEY+=$NIVAL_EXPORT*limit(0, $NIVAL_REPUTATION, 100)/100; + $FROSTIA_MONEY+=$FROSTIA_EXPORT*limit(0, $FROSTIA_REPUTATION, 100)/100; + end; + +} + diff --git a/npc/scripts.conf b/npc/scripts.conf index db4c0ca55..2e55710e7 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -56,6 +56,7 @@ "npc/functions/npcmovegraph.txt", "npc/functions/nurse.txt", "npc/functions/petsales.txt", +"npc/functions/politics.txt", "npc/functions/refine.txt", "npc/functions/resetstatus.txt", "npc/functions/riddle.txt", -- cgit v1.2.3-70-g09d2 From 3244911fd8773f284c44d1fcfc2527e33accf142 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 25 Aug 2019 00:38:38 -0300 Subject: *sigh* additional care so taxes work --- npc/012-1/shoppakep.txt | 3 +++ npc/012-2/melina.txt | 1 + npc/012-3/alan.txt | 1 + npc/012-5/nicholas.txt | 1 + npc/functions/politics.txt | 1 + 5 files changed, 7 insertions(+) diff --git a/npc/012-1/shoppakep.txt b/npc/012-1/shoppakep.txt index e8e400c75..2ee13acc2 100644 --- a/npc/012-1/shoppakep.txt +++ b/npc/012-1/shoppakep.txt @@ -9,6 +9,7 @@ mesq lg("Welcome! Only the finest wares!"); next; closedialog; + npcshopattach(.name$); shop .name$; close; @@ -69,8 +70,10 @@ OnClock0546: .CurrentItem=ShoppaKepItem(); sellitem .CurrentItem, -1, rand(1,4); end; + // Pay your taxes! OnBuyItem: + debugmes("Purchase confirmed"); PurchaseTaxes("Hurns"); end; } diff --git a/npc/012-2/melina.txt b/npc/012-2/melina.txt index cfb636bf0..83e78b578 100644 --- a/npc/012-2/melina.txt +++ b/npc/012-2/melina.txt @@ -10,6 +10,7 @@ 012-2,54,43,0 script Melina NPC_FEMALE,{ hello; +npcshopattach(.name$); shop .name$; close; diff --git a/npc/012-3/alan.txt b/npc/012-3/alan.txt index e595465d8..6ec713590 100644 --- a/npc/012-3/alan.txt +++ b/npc/012-3/alan.txt @@ -27,6 +27,7 @@ rif(.@q == 1 && .@q2 == .@q3 && .@q2 == 99, l("I have the sturdy wood and the string.")), L_Craft; L_Shop: + npcshopattach(.name$); openshop; closedialog; close; diff --git a/npc/012-5/nicholas.txt b/npc/012-5/nicholas.txt index 77e84c06c..c6043e786 100644 --- a/npc/012-5/nicholas.txt +++ b/npc/012-5/nicholas.txt @@ -97,6 +97,7 @@ L_Menu: mes ""; switch (@menu) { case 1: + npcshopattach(.name$); openshop; closedialog; close; diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 5a2a40981..f9df9e575 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -5,6 +5,7 @@ // Central Town Political System Controller // Note: The office is NOT Mayor, we have from kings to mayors here and you're // not a citzen (yet). It'll be... I'll think in a name better than Minister. +// Perhaps, Town Administrator. // NPCs: // Tulim - // Halin - -- cgit v1.2.3-70-g09d2 From 0ab1372918eb9dfe07378479dd49c7b0f8068272 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 25 Aug 2019 17:47:17 -0300 Subject: Send Town Administrators salary based on reputation and exports. It would be nice if you could get some tax money, no? %%a --- npc/functions/main.txt | 7 +++++++ npc/functions/politics.txt | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/npc/functions/main.txt b/npc/functions/main.txt index e1b93fa46..b54401e02 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -330,6 +330,13 @@ function script gf_accid { return .@value[0]; } +// Get some char id, even if offline +// ( Name ) +function script gf_charnameid { + .@nb = query_sql("SELECT char_id FROM `char` WHERE name='"+escape_sql(getarg(0))+"' LIMIT 2", .@value); + return .@value[0]; +} + // Get some char name from char ID, even if offline // ( Name ) function script gf_charname { diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index f9df9e575..9349a6990 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -42,14 +42,48 @@ function script PurchaseTaxes { - script Politics NPC_HIDDEN,{ -// Weekly income OnSun0000: + // Weekly income $TULIM_MONEY+=$TULIM_EXPORT*limit(0, $TULIM_REPUTATION, 100)/100; $HALIN_MONEY+=$HALIN_EXPORT*limit(0, $HALIN_REPUTATION, 100)/100; $HURNS_MONEY+=$HURNS_EXPORT*limit(0, $HURNS_REPUTATION, 100)/100; $LOF_MONEY+=$LOF_EXPORT*limit(0, $LOF_REPUTATION, 100)/100; $NIVAL_MONEY+=$NIVAL_EXPORT*limit(0, $NIVAL_REPUTATION, 100)/100; $FROSTIA_MONEY+=$FROSTIA_EXPORT*limit(0, $FROSTIA_REPUTATION, 100)/100; + + // Send salary to Town Administrators (20% from exports and 5GP/reputation) + .@tax=$TULIM_EXPORT*limit(0, $TULIM_REPUTATION, 100)/500; + .@tax+=$TULIM_REPUTATION*5; + .@tax=min($TULIM_MONEY, .@tax); + rodex_sendmail(gf_charnameid($TULIM_MAYOR$), "Tulimshar Townhall", "Term Income", "You've received the money for the term.", .@tax); + + .@tax=$HALIN_EXPORT*limit(0, $HALIN_REPUTATION, 100)/500; + .@tax+=$HALIN_REPUTATION*5; + .@tax=min($HALIN_MONEY, .@tax); + rodex_sendmail(gf_charnameid($HALIN_MAYOR$), "Halinarzo Townhall", "Term Income", "You've received the money for the term.", .@tax); + + .@tax=$HURNS_EXPORT*limit(0, $HURNS_REPUTATION, 100)/500; + .@tax+=$HURNS_REPUTATION*5; + .@tax=min($HURNS_MONEY, .@tax); + rodex_sendmail(gf_charnameid($HURNS_MAYOR$), "Hurnscald Townhall", "Term Income", "You've received the money for the term.", .@tax); + + .@tax=$LOF_EXPORT*limit(0, $LOF_REPUTATION, 100)/500; + .@tax+=$LOF_REPUTATION*5; + .@tax=min($LOF_MONEY, .@tax); + rodex_sendmail(gf_charnameid($LOF_MAYOR$), "LoF Townhall", "Term Income", "You've received the money for the term.", .@tax); + + .@tax=$NIVAL_EXPORT*limit(0, $NIVAL_REPUTATION, 100)/500; + .@tax+=$NIVAL_REPUTATION*5; + .@tax=min($NIVAL_MONEY, .@tax); + rodex_sendmail(gf_charnameid($NIVAL_MAYOR$), "Nivalis Townhall", "Term Income", "You've received the money for the term.", .@tax); + + .@tax=$FROSTIA_EXPORT*limit(0, $FROSTIA_REPUTATION, 100)/500; + .@tax+=$FROSTIA_REPUTATION*5; + .@tax=min($FROSTIA_MONEY, .@tax); + rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Term Income", "You've received the money for the term.", .@tax); + + // Conduct elections + end; } -- cgit v1.2.3-70-g09d2 From eec1826e60930e33c1f6b78fb225b4b4f17606c8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 25 Aug 2019 21:35:24 -0300 Subject: Sagratha point loss: Be less severe --- npc/014-5-1/sagratha.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npc/014-5-1/sagratha.txt b/npc/014-5-1/sagratha.txt index 5ac046a61..e5f31475c 100644 --- a/npc/014-5-1/sagratha.txt +++ b/npc/014-5-1/sagratha.txt @@ -15,20 +15,20 @@ function script SaggyMobCount { switch (killedrid) { // She gets angry case AlphaMouboo: - SaggyScoreUpdate(-5); + SaggyScoreUpdate(-3); break; case Mouboo: - SaggyScoreUpdate(-4); + SaggyScoreUpdate(any(-2, -3)); break; case Pollet: case Fluffy: case IcedFluffy: - SaggyScoreUpdate(-3); + SaggyScoreUpdate(any(-1, -2, -3)); break; case PoisonSpikyMushroom: case LogHead: case ForestMushroom: - SaggyScoreUpdate(-2); + SaggyScoreUpdate(any(-1, -2)); break; case Squirrel: case SpringSquirrel: -- cgit v1.2.3-70-g09d2 From ea6458f2d48e2598d527cf8ce2c0c2399a3bd9d4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 25 Aug 2019 21:36:34 -0300 Subject: Acorn - Give 1~2 sagratha points, and Death Acorn should work, too --- db/re/item_db.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index aa8b64500..5d68eeddd 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -189,7 +189,7 @@ item_db: ( if (rand(1,10) != 3) { monster(.@map$, .@x, .@y, l("Oak"), 1017, 1); $TREE_PLANTED=$TREE_PLANTED+1; - callfunc "SaggyScoreUpdate", 1; + callfunc "SaggyScoreUpdate", callfunc("rand2", 1, 2); } else { monster(.@map$, .@x, .@y, l("Not An Oak"), SpringSquirrel, 1); } @@ -13736,6 +13736,7 @@ item_db: ( if (!getmapxy(.@map$, .@x, .@y, 0)) { monster(.@map$, .@x, .@y, l("Oak"), 1017, 1); $TREE_PLANTED=$TREE_PLANTED+1; + callfunc "SaggyScoreUpdate", callfunc("rand2", 1, 2); } } "> -- cgit v1.2.3-70-g09d2 From 9b4d09b1620915f3f105f6d9b5e1e1c7d99f4efc Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 12:48:17 -0300 Subject: New util function: array_highest() Will return first highest value in an array. For elections. --- npc/functions/array.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/npc/functions/array.txt b/npc/functions/array.txt index 1a106175e..161cedd0b 100644 --- a/npc/functions/array.txt +++ b/npc/functions/array.txt @@ -411,3 +411,25 @@ function script array_filter { freeloop(false); return .@count; } + +// array_highest() +// Returns the index of the highest value in +// NOTE: Array must be an INT array! + +function script array_highest { + .@size = getarraysize(getarg(0)); + .@win=0; + .@idx=0; + freeloop(true); + + for (.@i = getarrayindex(getarg(0)); .@i < .@size; ++.@i) { + if (getelementofarray(getarg(0), .@i) > .@win) { + .@win=getelementofarray(getarg(0), .@i); + .@idx=.@i; + } + } + + freeloop(false); + return .@idx; +} + -- cgit v1.2.3-70-g09d2 From 937922483e45c64536a1986779eee5a7b0b88fa2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 12:54:18 -0300 Subject: Conduct elections :> Mayor will be reelected if nobody runs for the office. But they are not automatically candidate, meaning they lose the office if someone else runs and gets zero votes. --- npc/003-3/malindou.txt | 6 +++--- npc/functions/politics.txt | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index 952ba67a8..a27b8cf4d 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -429,17 +429,17 @@ OnInit: // $LOC_REPUTATION - Town reputation. Affects Max Tax and Weekly Income. // Tulim - $TULIM_MAYOR$="Saulc"; + $TULIM_MAYOR$="Saulc GM"; $TULIM_TAX=100; $TULIM_EXPORT=10000; $TULIM_REPUTATION=50; // Halin - $HALIN_MAYOR$="Saulc"; + $HALIN_MAYOR$="Saulc GM"; $HALIN_TAX=100; $HALIN_EXPORT=1000; $HALIN_REPUTATION=50; // Hurns - $HURNS_MAYOR$="Saulc"; + $HURNS_MAYOR$="Saulc GM"; $HURNS_TAX=100; $HURNS_EXPORT=3000; $HURNS_REPUTATION=50; diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 9349a6990..3d21d313d 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -20,6 +20,10 @@ // $LOC_EXPORT - Defines how much Hurnscald exports (weekly income) // $LOC_REPUTATION - Town reputation. Affects Max Tax and Weekly Income; // Note: Tax cannot exceed 10% ie 1000. Reputation must be between 0 and 100. +// +// "Temporary Arrays": +// $LOC_CANDIDATE$ - Candidate for Office +// $LOC_VOTES - Number of votes of Candidate // Proccess Taxes from purchases // PurchaseTaxes( Location ) @@ -83,7 +87,41 @@ OnSun0000: rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Term Income", "You've received the money for the term.", .@tax); // Conduct elections + .@w=array_highest($TULIM_VOTES); + if ($TULIM_CANDIDATE$[.@w] != "") + $TULIM_MAYOR$=$TULIM_CANDIDATE$[.@w]; + deletearray($TULIM_CANDIDATE$); + deletearray($TULIM_VOTES); + .@w=array_highest($HALIN_VOTES); + if ($HALIN_CANDIDATE$[.@w] != "") + $HALIN_MAYOR$=$HALIN_CANDIDATE$[.@w]; + deletearray($HALIN_CANDIDATE$); + deletearray($HALIN_VOTES); + + .@w=array_highest($HURNS_VOTES); + if ($HURNS_CANDIDATE$[.@w] != "") + $HURNS_MAYOR$=$HURNS_CANDIDATE$[.@w]; + deletearray($HURNS_CANDIDATE$); + deletearray($HURNS_VOTES); + + .@w=array_highest($LOF_VOTES); + if ($LOF_CANDIDATE$[.@w] != "") + $LOF_MAYOR$=$LOF_CANDIDATE$[.@w]; + deletearray($LOF_CANDIDATE$); + deletearray($LOF_VOTES); + + .@w=array_highest($NIVAL_VOTES); + if ($NIVAL_CANDIDATE$[.@w] != "") + $NIVAL_MAYOR$=$NIVAL_CANDIDATE$[.@w]; + deletearray($NIVAL_CANDIDATE$); + deletearray($NIVAL_VOTES); + + .@w=array_highest($FROSTIA_VOTES); + if ($FROSTIA_CANDIDATE$[.@w] != "") + $FROSTIA_MAYOR$=$FROSTIA_CANDIDATE$[.@w]; + deletearray($FROSTIA_CANDIDATE$); + deletearray($FROSTIA_VOTES); end; } -- cgit v1.2.3-70-g09d2 From c912bcd1fd19719db1e92d1db35693664fb29d13 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 13:05:40 -0300 Subject: Town Politics: Send a RODeX mail to new mayors that they were (re-)elected. That would be 2 mails weekly on re-election: Victory, and Term GP Income. No mail is sent on defeat, nor to old mayors if they didn't ran again. --- npc/functions/politics.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 3d21d313d..5b40ac53b 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -122,6 +122,15 @@ OnSun0000: $FROSTIA_MAYOR$=$FROSTIA_CANDIDATE$[.@w]; deletearray($FROSTIA_CANDIDATE$); deletearray($FROSTIA_VOTES); + + // Notify new mayors of their victory + rodex_sendmail(gf_charnameid($TULIM_MAYOR$), "Tulimshar Townhall", "Election Victory", "You've been elected to the office!"); + rodex_sendmail(gf_charnameid($HALIN_MAYOR$), "Halinarzo Townhall", "Election Victory", "You've been elected to the office!"); + rodex_sendmail(gf_charnameid($HURNS_MAYOR$), "Hurnscald Townhall", "Election Victory", "You've been elected to the office!"); + rodex_sendmail(gf_charnameid($LOF_MAYOR$), "LoF Townhall", "Election Victory", "You've been elected to the office!"); + rodex_sendmail(gf_charnameid($NIVAL_MAYOR$), "Nivalis Townhall", "Election Victory", "You've been elected to the office!"); + rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Election Victory", "You've been elected to the office!"); + end; } -- cgit v1.2.3-70-g09d2 From 8d2fdd6b71d3776f936a230aee74bc605518cf37 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 13:09:46 -0300 Subject: Make town Exportations more alike. Note natural advantage may be lost easily. --- npc/003-3/malindou.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index a27b8cf4d..e15d0cf1f 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -431,12 +431,12 @@ OnInit: // Tulim $TULIM_MAYOR$="Saulc GM"; $TULIM_TAX=100; - $TULIM_EXPORT=10000; + $TULIM_EXPORT=5000; $TULIM_REPUTATION=50; // Halin $HALIN_MAYOR$="Saulc GM"; $HALIN_TAX=100; - $HALIN_EXPORT=1000; + $HALIN_EXPORT=2000; $HALIN_REPUTATION=50; // Hurns $HURNS_MAYOR$="Saulc GM"; @@ -446,7 +446,7 @@ OnInit: // LoF $LOF_MAYOR$="Jesus Saves"; $LOF_TAX=100; - $LOF_EXPORT=5000; + $LOF_EXPORT=4000; $LOF_REPUTATION=50; // Nival $NIVAL_MAYOR$="Jesus Saves"; @@ -456,7 +456,7 @@ OnInit: // Frostia $FROSTIA_MAYOR$="Jesus Saves"; $FROSTIA_TAX=100; - $FROSTIA_EXPORT=1000; + $FROSTIA_EXPORT=3000; $FROSTIA_REPUTATION=50; debugmes ""; -- cgit v1.2.3-70-g09d2 From 8880e8cc851c11fc174c22efac44d2efab9c30b1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 13:42:21 -0300 Subject: Shields are now refine-able --- db/re/item_db.conf | 24 ++++++++++++------------ npc/functions/refine.txt | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 5d68eeddd..655d6f7f1 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -8563,7 +8563,7 @@ item_db: ( Def: 23 Loc: "EQP_HAND_L" EquipLv: 18 - Refine: false + Refine: true ViewSprite: 2701 Script: <" bonus bHPrecovRate,1; @@ -8584,7 +8584,7 @@ item_db: ( Def: 56 Loc: "EQP_HAND_L" EquipLv: 36 - Refine: false + Refine: true ViewSprite: 2702 Script: <" bonus bHPrecovRate,3; @@ -8605,7 +8605,7 @@ item_db: ( Def: 129 Loc: "EQP_HAND_L" EquipLv: 70 - Refine: false + Refine: true ViewSprite: 2703 Script: <" bonus bHPrecovRate,6; @@ -8626,7 +8626,7 @@ item_db: ( Def: 84 Loc: "EQP_HAND_L" EquipLv: 50 - Refine: false + Refine: true ViewSprite: 2704 Script: <" bonus bHPrecovRate,4; @@ -8647,7 +8647,7 @@ item_db: ( Def: 207 Loc: "EQP_HAND_L" EquipLv: 102 - Refine: false + Refine: true ViewSprite: 2705 Script: <" bonus bHPrecovRate,8; @@ -8668,7 +8668,7 @@ item_db: ( Def: 106 Loc: "EQP_HAND_L" EquipLv: 60 - Refine: false + Refine: true ViewSprite: 2706 Script: <" bonus bHPrecovRate,5; @@ -8689,7 +8689,7 @@ item_db: ( Def: 9 Loc: "EQP_HAND_L" EquipLv: 9 - Refine: false + Refine: true ViewSprite: 2707 Script: <" bonus bHPrecovRate,1; @@ -8709,7 +8709,7 @@ item_db: ( Def: 102 Loc: "EQP_HAND_L" EquipLv: 60 - Refine: false + Refine: true ViewSprite: 2708 Script: <" bonus bHPrecovRate,4; @@ -8730,7 +8730,7 @@ item_db: ( Def: 72 Loc: "EQP_HAND_L" EquipLv: 44 - Refine: false + Refine: true ViewSprite: 2709 Script: <" bonus bHPrecovRate,4; @@ -8751,7 +8751,7 @@ item_db: ( Def: 39 Loc: "EQP_HAND_L" EquipLv: 27 - Refine: false + Refine: true ViewSprite: 2710 Script: <" bonus bHPrecovRate,2; @@ -8772,7 +8772,7 @@ item_db: ( Def: 152 Loc: "EQP_HAND_L" EquipLv: 80 - Refine: false + Refine: true ViewSprite: 2711 Script: <" bonus bHPrecovRate,7; @@ -8793,7 +8793,7 @@ item_db: ( Def: 182 Loc: "EQP_HAND_L" EquipLv: 92 - Refine: false + Refine: true ViewSprite: 2712 Script: <" bonus bHPrecovRate,8; diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index 1936b5542..0c9985c3a 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -24,6 +24,7 @@ function script refineMaster { l("Nothing, thanks"), 0, rif(getequipisequiped(EQI_HEAD_MID), l("My chestplate, @@", getequipname(EQI_HEAD_MID))), EQI_HEAD_MID, rif(getequipisequiped(EQI_HAND_R), l("My weapon, @@", getequipname(EQI_HAND_R))), EQI_HAND_R, + rif(getequipisequiped(EQI_HAND_L), l("My shield, @@", getequipname(EQI_HAND_L))), EQI_HAND_L, rif(getequipisequiped(EQI_HEAD_TOP), l("My helmet, @@", getequipname(EQI_HEAD_TOP))), EQI_HEAD_TOP, l("Item break? Too dangerous! I don't want it!!"), 0; -- cgit v1.2.3-70-g09d2 From e63df3aa088d1c1bc3cd4a48c886ebdd50b6e33d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 13:44:36 -0300 Subject: Non decorative, Non rare, heavy hats, are now all refine-able --- db/re/item_db.conf | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 655d6f7f1..b99dd358e 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -9042,7 +9042,7 @@ item_db: ( Def: 106 Loc: "EQP_HEAD_TOP" EquipLv: 90 - Refine: false + Refine: true ViewSprite: 2906 Script: <" bonus bSpeedAddRate, -6; @@ -9059,7 +9059,7 @@ item_db: ( Def: 70 Loc: "EQP_HEAD_TOP" EquipLv: 90 - Refine: false + Refine: true ViewSprite: 2907 }, { @@ -9113,7 +9113,7 @@ item_db: ( Slots: 1 Loc: "EQP_HEAD_TOP" EquipLv: 55 - Refine: false + Refine: true ViewSprite: 2909 AllowCards: { id5000: 1 @@ -9154,7 +9154,7 @@ item_db: ( Def: 22 Loc: "EQP_HEAD_TOP" EquipLv: 36 - Refine: false + Refine: true ViewSprite: 2910 }, { @@ -9168,7 +9168,7 @@ item_db: ( Def: 26 Loc: "EQP_HEAD_TOP" EquipLv: 30 - Refine: false + Refine: true ViewSprite: 2911 Script: <" bonus bSpeedAddRate, -2; @@ -9242,7 +9242,7 @@ item_db: ( Def: 29 Loc: "EQP_HEAD_TOP" EquipLv: 45 - Refine: false + Refine: true ViewSprite: 2914 }, { @@ -9256,7 +9256,7 @@ item_db: ( Def: 33 Loc: "EQP_HEAD_TOP" EquipLv: 50 - Refine: false + Refine: true ViewSprite: 2915 }, { @@ -9270,7 +9270,7 @@ item_db: ( Def: 25 Loc: "EQP_HEAD_TOP" EquipLv: 40 - Refine: false + Refine: true ViewSprite: 2916 }, { @@ -9343,7 +9343,7 @@ item_db: ( Slots: 1 Loc: "EQP_HEAD_TOP" EquipLv: 60 - Refine: false + Refine: true ViewSprite: 2919 AllowCards: { id5000: 1 @@ -9384,7 +9384,7 @@ item_db: ( Def: 70 Loc: "EQP_HEAD_TOP" EquipLv: 65 - Refine: false + Refine: true ViewSprite: 2920 Script: <" bonus bSpeedAddRate, -4; @@ -9488,7 +9488,7 @@ item_db: ( Def: 112 Loc: "EQP_HEAD_TOP" EquipLv: 94 - Refine: false + Refine: true ViewSprite: 2927 Script: <" bonus bSpeedAddRate, -7; @@ -9519,7 +9519,7 @@ item_db: ( Def: 78 Loc: "EQP_HEAD_TOP" EquipLv: 98 - Refine: false + Refine: true ViewSprite: 2929 }, { @@ -9735,7 +9735,7 @@ item_db: ( Def: 51 Loc: "EQP_HEAD_TOP" EquipLv: 70 - Refine: false + Refine: true ViewSprite: 2941 }, { @@ -9749,7 +9749,7 @@ item_db: ( Def: 91 Loc: "EQP_HEAD_TOP" EquipLv: 80 - Refine: false + Refine: true ViewSprite: 2942 Script: <" bonus bSpeedAddRate, -4; @@ -9999,7 +9999,7 @@ item_db: ( Def: 17 Loc: "EQP_HEAD_TOP" EquipLv: 29 - Refine: false + Refine: true ViewSprite: 2991 }, { @@ -10185,7 +10185,7 @@ item_db: ( Def: 33 Loc: "EQP_HEAD_TOP" EquipLv: 50 - Refine: false + Refine: true ViewSprite: 3001 Script: <" bonus bStr,2; @@ -10313,7 +10313,7 @@ item_db: ( Def: 36 Loc: "EQP_HEAD_TOP" EquipLv: 53 - Refine: false + Refine: true ViewSprite: 3009 Script: <" bonus bInt,1; @@ -10477,7 +10477,7 @@ item_db: ( Def: 42 Loc: "EQP_HEAD_TOP" EquipLv: 60 - Refine: false + Refine: true Script: <" bonus bAspdRate,10; "> -- cgit v1.2.3-70-g09d2 From 9ba1952838a97be125b73f95694779ad196c81d2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 13:46:40 -0300 Subject: Refine: Break chance: 0.01%, Downgrade chance: 1% per refine level. In usual, nothing happens when you fail, except reagent loss. --- npc/functions/refine.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index 0c9985c3a..c23739d07 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -54,7 +54,7 @@ function script refineMaster { // Not all items are refinable if (!getequipisenableref(.@it)) { mesn; - mesq l("Well, sorry, but only weapons and body armor can be refined."); + mesq l("Well, sorry, but only some items can be refined."); mesq l("There may be some exceptions. Anyway, this item clearly cannot be refined."); next; return; @@ -152,8 +152,8 @@ function script refineMaster { mesc l("Weapons: +8 attack, +8 magic attack"); mesc l("Armors: +3~5 defense"); next; - // Perhaps the item has broken? - } else if (rand2(100) < .@rlv) { + // Perhaps the item has broken? (~0.01% chance) + } else if (rand2(10000) <= 1) { failedrefitem .@it; mesc l("*CRASH*"); next; @@ -163,7 +163,7 @@ function script refineMaster { mesn; mesq l("Well, you were warned. Do you have any other stuff for me?"); next; - // Item is weakened. + // Item is weakened. (1% per refine level) } else if (rand2(100) < .@rlv) { downrefitem .@it, 1; mesn; -- cgit v1.2.3-70-g09d2 From b3baf8b7e1de7443cf5c518503dafbae7ed5926f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 15:59:29 -0300 Subject: Fix gempowder price on recipe book --- npc/craft/recipes.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/npc/craft/recipes.txt b/npc/craft/recipes.txt index 65409aee8..98c2c2849 100644 --- a/npc/craft/recipes.txt +++ b/npc/craft/recipes.txt @@ -276,22 +276,22 @@ function readCrafting { 40, WoodenLog, 60, ManaPiouFeathers, 8, FluoPowder, - 2, GemPowder); + 1, GemPowder); showRecipe(CraftApprenticeWand, ApprenticeWand, 60, WoodenLog, 90, ManaPiouFeathers, 12, FluoPowder, - 3, GemPowder); + 1, GemPowder); showRecipe(CraftLeaderWand, LeaderWand, 100, WoodenLog, 120, ManaPiouFeathers, 15, FluoPowder, - 5, GemPowder); + 1, GemPowder); showRecipe(CraftLegendaryWand, LegendaryWand, 110, WoodenLog, 3, GoldenApple, 20, FluoPowder, - 7, GemPowder); + 1, GemPowder); next; // Firestaff Weapons: Lead + Titanium mesc "----------"+l("Fire Staffs Recipes")+"----------", 2; -- cgit v1.2.3-70-g09d2 From 6f622b30127710caf6b4dfcfb9aed5e17643013f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 19:32:53 -0300 Subject: Prevent Crazyfefe from completing the campaign if he kills Sagratha --- npc/015-8-1/campaign.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/npc/015-8-1/campaign.txt b/npc/015-8-1/campaign.txt index 36fc39eee..ce1884d78 100644 --- a/npc/015-8-1/campaign.txt +++ b/npc/015-8-1/campaign.txt @@ -245,6 +245,8 @@ OnSW05: OnSW06: .@m$=getmap(); .@n$=instance_npcname(.name$); + if (getq(HurnscaldQuest_Sagratha) < 5) + end; mesn l("Sagratha"); mesq l("@@, we should leave here now.", strcharinfo(0)); -- cgit v1.2.3-70-g09d2 From 0ef56764dc2796cb43e90f10c5eb380c9f94406a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 21:43:51 -0300 Subject: Implement Status Fruits --- db/re/item_db.conf | 85 +++++++++++++++++++++++++++++++++++++++++++ npc/functions/resetstatus.txt | 43 ++++++++++++++++++++-- 2 files changed, 125 insertions(+), 3 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index b99dd358e..953e2c0b5 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -14699,6 +14699,91 @@ item_db: ( getitem MercBoxA, 1; "> }, +// Additional usable items +{ + Id: 8000 + AegisName: "StrengthFruit" + Name: "Strength Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + statusup2(bStr, 1); + STATUSUP_STR+=1; + "> +}, +{ + Id: 8001 + AegisName: "AgilityFruit" + Name: "Agility Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + statusup2(bAgi, 1); + STATUSUP_AGI+=1; + "> +}, +{ + Id: 8002 + AegisName: "VitalityFruit" + Name: "Vitality Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + statusup2(bVit, 1); + STATUSUP_VIT+=1; + "> +}, +{ + Id: 8003 + AegisName: "IntelligenceFruit" + Name: "Intelligence Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + statusup2(bInt, 1); + STATUSUP_INT+=1; + "> +}, +{ + Id: 8004 + AegisName: "DexterityFruit" + Name: "Dexterity Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + statusup2(bDex, 1); + STATUSUP_DEX+=1; + "> +}, +{ + Id: 8005 + AegisName: "LuckFruit" + Name: "Luck Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + statusup2(bLuk, 1); + STATUSUP_LUK+=1; + "> +}, ) diff --git a/npc/functions/resetstatus.txt b/npc/functions/resetstatus.txt index c9744d901..4d7d9e09a 100644 --- a/npc/functions/resetstatus.txt +++ b/npc/functions/resetstatus.txt @@ -5,6 +5,41 @@ // Description: // Status Reset NPC utils +// Reset status and return permanent bonuses +// StatusResetReinvest( - ) +function script StatusResetReinvest { + // Compulsory check + inventoryplace NPCEyes, 6; + + // Permanent boosts were now lost, return the fruits + if (STATUSUP_STR) { + getitem StrengthFruit, STATUSUP_STR; + STATUSUP_STR=0; + } + if (STATUSUP_AGI) { + getitem AgilityFruit, STATUSUP_AGI; + STATUSUP_AGI=0; + } + if (STATUSUP_VIT) { + getitem VitalityFruit, STATUSUP_VIT; + STATUSUP_VIT=0; + } + if (STATUSUP_INT) { + getitem IntelligenceFruit, STATUSUP_INT; + STATUSUP_INT=0; + } + if (STATUSUP_DEX) { + getitem DexterityFruit, STATUSUP_DEX; + STATUSUP_DEX=0; + } + if (STATUSUP_LUK) { + getitem LuckFruit, STATUSUP_LUK; + STATUSUP_LUK=0; + } + resetstatus(); + return true; +} + // Return wasSP on success, 0 on failure // ConfirmReset( {price} ) function script ConfirmStatusReset { @@ -16,6 +51,8 @@ function script ConfirmStatusReset { if (getarg(0,-1) >= 0) .@plush_count=getarg(0,-1); + mesc l("WARNING: Permanent boosts will return to their fruit form."), 1; + switch (select(lg("Yes, I am sure."), lg("I need to think about it..."), lg("I won't need it, thank you."))) @@ -38,10 +75,10 @@ function script ConfirmStatusReset { l("Thank you."), l("Now stand still... It should not take much time..."); - // Delete the GP and THEN reset the status - Zeny-=.@plush_count; + // Reset status have an inventorycheck, so we charge later. .@wasSP = StatusPoint; - resetstatus(); + StatusResetReinvest(); + Zeny-=.@plush_count; if (StatusPoint == .@wasSP) { speech S_LAST_NEXT, l("It seems that you have no status points to reset!"), -- cgit v1.2.3-70-g09d2 From 115cfb7d351e47034da7ea736e706d82d6a08ece Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 21:44:41 -0300 Subject: Status reset without result will not be charged --- npc/functions/resetstatus.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/npc/functions/resetstatus.txt b/npc/functions/resetstatus.txt index 4d7d9e09a..e1d290499 100644 --- a/npc/functions/resetstatus.txt +++ b/npc/functions/resetstatus.txt @@ -78,13 +78,14 @@ function script ConfirmStatusReset { // Reset status have an inventorycheck, so we charge later. .@wasSP = StatusPoint; StatusResetReinvest(); - Zeny-=.@plush_count; + + // Nothing to do: Do not charge (eg. you just got the fruits back) if (StatusPoint == .@wasSP) { speech S_LAST_NEXT, l("It seems that you have no status points to reset!"), - l("But the money you brought was really awesome you know."), l("Come back when you will really need me."); } else { + Zeny-=.@plush_count; speech S_LAST_NEXT, l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), l("Spend it wisely this time."), -- cgit v1.2.3-70-g09d2 From 7af11c10692206f2b5e959e5b9260e2bc684e6ac Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 21:50:10 -0300 Subject: Bronze, Silver and Golden gift may now be dropped. Acidental dropping protection not possible. --- db/re/item_db.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 953e2c0b5..7a649b7f5 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1699,7 +1699,6 @@ item_db: ( KeepAfterUse: false Refine: false Trade: { - nodrop: true noselltonpc: true nogstorage: true nomail: true @@ -1726,7 +1725,6 @@ item_db: ( KeepAfterUse: false Refine: false Trade: { - nodrop: true noselltonpc: true nogstorage: true nomail: true @@ -1753,7 +1751,6 @@ item_db: ( KeepAfterUse: false Refine: false Trade: { - nodrop: true noselltonpc: true nogstorage: true nomail: true -- cgit v1.2.3-70-g09d2 From be15e0fbd674daf77cb42d75acb99f9d2da82c75 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 26 Aug 2019 22:03:19 -0300 Subject: Wurtzite, Graphene and Arcanum. This breaks refinery. --- db/re/item_db.conf | 27 +++++++++++++++++++++++++++ npc/functions/refine.txt | 13 +++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 7a649b7f5..8a7acb0ef 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -5512,6 +5512,33 @@ item_db: ( noauction: true } }, +{ + Id: 912 + AegisName: "Wurtizite" + Name: "Wurtizite Ore" + Type: "IT_ETC" + Buy: 5000 + Sell: 500 + Weight: 1 +}, +{ + Id: 913 + AegisName: "Graphene" + Name: "Graphene Stone" + Type: "IT_ETC" + Buy: 25000 + Sell: 1500 + Weight: 1 +}, +{ + Id: 914 + AegisName: "Arcanum" + Name: "Arcanum Stone" + Type: "IT_ETC" + Buy: 125000 + Sell: 7500 + Weight: 1 +}, // { Id: 1000 diff --git a/npc/functions/refine.txt b/npc/functions/refine.txt index c23739d07..48535f91d 100644 --- a/npc/functions/refine.txt +++ b/npc/functions/refine.txt @@ -74,20 +74,21 @@ function script refineMaster { switch (.@rlv) { case 0: case 1: - .@rg=CopperIngot; break; case 2: case 3: - .@rg=IronIngot; break; + .@rg=Wurtizite; break; case 4: case 5: - .@rg=TitaniumIngot; break; case 6: case 7: - .@rg=LeadIngot; break; + .@amount=((.@rlv-4)/2)+1; + .@rg=Graphene; break; case 8: - .@rg=Bloodstone; break; + case 9: + case 10: default: - .@rg=BlueManaPearl; break; + .@amount=((.@rlv-8)/2)+1; + .@rg=Arcanum; break; } mesn; mesq l("This @@ is a nice stuff. I can refine it for @@ GP and @@ @@.", getitemlink(.@item), .@price, .@amount, getitemlink(.@rg)); -- cgit v1.2.3-70-g09d2 From 30b732793148a3e284c3f172328092c4ef5d2119 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 00:24:03 -0300 Subject: New forge system prices: Fusus is the responsible for making Copper Ingot in Wurtizite. You'll usually get almost enough for a [Graphene]. It always grant a +1 and +2, or a +3. --- npc/017-4/refine.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/npc/017-4/refine.txt b/npc/017-4/refine.txt index 874cc6c99..dddb2e0ef 100644 --- a/npc/017-4/refine.txt +++ b/npc/017-4/refine.txt @@ -20,12 +20,52 @@ OnInit: 017-4,23,23,0 script Fusus NPC_FUSUS,{ showavatar NPC_FUSUS; + select + l("Repair items"), + l("Compact forge stones"); + mes ""; + if (@menu == 2) + goto L_Fusus; @menu=0; do { repairMaster(); } while (getbrokencount() >= 0); +L_Fusus: + inventoryplace Iten, 1; + mesn; + mesq l("I can fuse an @@ and an @@, besides @@ GP, into 3~6 @@.", getitemlink(CopperIngot), getitemlink(SilkCocoon), 500, getitemlink(Wurtizite)); + mesc l("5 @@ can be fused in a @@", getitemlink(Wurtizite), getitemlink(Graphene)); + mesc l("5 @@ can be fused in a @@", getitemlink(Graphene), getitemlink(Arcanum)); + select + rif(Zeny >= 500, l("I want the Wurtizite")), + rif(countitem(Wurtizite) >= 5, l("I want Graphene")), + rif(countitem(Graphene) >= 5, l("I want Arcanum")), + l("Do nothing"); + mes ""; + switch (@menu) { + case 4: + close; + case 1: + if (!transcheck(CopperIngot, 1, SilkCocoon, 1)) + close; + Zeny -= 500; + getitem Wurtizite, any(3,4,4,5,6); + break; + case 2: + delitem Wurtizite, 5; + getitem Graphene, 1; + break; + case 3: + delitem Graphene, 5; + getitem Arcanum, 1; + break; + } + mesc l("Done!"), 2; + next; + goto L_Fusus; + OnInit: .sex=G_MALE; .distance=5; -- cgit v1.2.3-70-g09d2 From 8b38f9fe97a7f2c381d55f450126bd07e76f366f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 00:32:38 -0300 Subject: Inform players that discount is a thing --- npc/002-3/nard.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/npc/002-3/nard.txt b/npc/002-3/nard.txt index 24bc12848..98493b585 100644 --- a/npc/002-3/nard.txt +++ b/npc/002-3/nard.txt @@ -243,6 +243,7 @@ L_NotYet: next; mesn; mesq l("The Alliance have records of everyone. And if you need another trip, talk to me!"); + mesc l("PROTIP: Every quest you complete in a location, will make ship travels to and from them cheaper!"); } else { mesq l("You still haven't completed your tasks."); -- cgit v1.2.3-70-g09d2 From 91907c8524bf6daea70b247afa689dc6adcf052d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 00:41:33 -0300 Subject: Minor guild related change for future implementation of guild skills. IIRC, only Guild Master may learn and use Guild Skills. Note Guild Skills never work on Guild Master. Current setting: work anywhere. --- conf/map/battle/skill.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf index 2713cb79e..038ec528d 100644 --- a/conf/map/battle/skill.conf +++ b/conf/map/battle/skill.conf @@ -251,7 +251,7 @@ max_heal_lv: 11 // 8: Skill is usable on GvG grounds //16: Disable skill from "nowarpto" maps // (it will work on GVG castles even if they are set to nowarpto, though) -emergency_call: 11 +emergency_call: 27 // Guild Aura Skills setting (add as appropriate). // (This affects GD_LEADERSHIP, GD_GLORYWOUNDS, GD_SOULCOLD and GD_HAWKEYES) -- cgit v1.2.3-70-g09d2 From 9ae02a53288cf5b6d3b399c339ef6853164dd811 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 00:59:30 -0300 Subject: Town Administrator income is deducted from town resources --- npc/functions/politics.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt index 5b40ac53b..b4ddde37d 100644 --- a/npc/functions/politics.txt +++ b/npc/functions/politics.txt @@ -59,31 +59,37 @@ OnSun0000: .@tax=$TULIM_EXPORT*limit(0, $TULIM_REPUTATION, 100)/500; .@tax+=$TULIM_REPUTATION*5; .@tax=min($TULIM_MONEY, .@tax); + $TULIM_MONEY-=.@tax; rodex_sendmail(gf_charnameid($TULIM_MAYOR$), "Tulimshar Townhall", "Term Income", "You've received the money for the term.", .@tax); .@tax=$HALIN_EXPORT*limit(0, $HALIN_REPUTATION, 100)/500; .@tax+=$HALIN_REPUTATION*5; .@tax=min($HALIN_MONEY, .@tax); + $HALIN_MONEY-=.@tax; rodex_sendmail(gf_charnameid($HALIN_MAYOR$), "Halinarzo Townhall", "Term Income", "You've received the money for the term.", .@tax); .@tax=$HURNS_EXPORT*limit(0, $HURNS_REPUTATION, 100)/500; .@tax+=$HURNS_REPUTATION*5; .@tax=min($HURNS_MONEY, .@tax); + $HURNS_MONEY-=.@tax; rodex_sendmail(gf_charnameid($HURNS_MAYOR$), "Hurnscald Townhall", "Term Income", "You've received the money for the term.", .@tax); .@tax=$LOF_EXPORT*limit(0, $LOF_REPUTATION, 100)/500; .@tax+=$LOF_REPUTATION*5; .@tax=min($LOF_MONEY, .@tax); + $LOF_MONEY-=.@tax; rodex_sendmail(gf_charnameid($LOF_MAYOR$), "LoF Townhall", "Term Income", "You've received the money for the term.", .@tax); .@tax=$NIVAL_EXPORT*limit(0, $NIVAL_REPUTATION, 100)/500; .@tax+=$NIVAL_REPUTATION*5; .@tax=min($NIVAL_MONEY, .@tax); + $NIVAL_MONEY-=.@tax; rodex_sendmail(gf_charnameid($NIVAL_MAYOR$), "Nivalis Townhall", "Term Income", "You've received the money for the term.", .@tax); .@tax=$FROSTIA_EXPORT*limit(0, $FROSTIA_REPUTATION, 100)/500; .@tax+=$FROSTIA_REPUTATION*5; .@tax=min($FROSTIA_MONEY, .@tax); + $FROSTIA_MONEY-=.@tax; rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Term Income", "You've received the money for the term.", .@tax); // Conduct elections -- cgit v1.2.3-70-g09d2 From b2b23ca21ce72241bedb47828d9823aec8478cfb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 12:45:36 -0300 Subject: Mystery Fruit: You don't know what it is until you eat it. Effects are omitted, but status reset will return the correct fruit. --- db/re/item_db.conf | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 8a7acb0ef..4a6a9ee97 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -14808,6 +14808,43 @@ item_db: ( STATUSUP_LUK+=1; "> }, +{ + Id: 8006 + AegisName: "MysteryFruit" + Name: "Mystery Fruit" + Type: "IT_USABLE" + Buy: 500000 + Sell: 1500 + Weight: 10 + Delay: 500 + Script: <" + .@r=callfunc("rand2", bStr, bLuk); + switch (.@r) { + case bStr: + STATUSUP_STR+=1; + break; + case bAgi: + STATUSUP_AGI+=1; + break; + case bVit: + STATUSUP_VIT+=1; + break; + case bInt: + STATUSUP_INT+=1; + break; + case bDex: + STATUSUP_DEX+=1; + break; + case bLuk: + STATUSUP_LUK+=1; + break; + default: // Error + getitem callfunc("any", StrengthFruit, AgilityFruit, VitalityFruit, IntelligenceFruit, DexterityFruit, LuckFruit), 1; + end; + } + statusup2(.@r, 1); + "> +}, ) -- cgit v1.2.3-70-g09d2 From 160540a57c2960718cfdd296cf07ef2aafc83d36 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 12:46:58 -0300 Subject: MysteryFruit can be found on Prism gift boxes --- db/re/item_db.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 4a6a9ee97..da50661bb 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1784,7 +1784,7 @@ item_db: ( noauction: true } Script: <" - setarray .@r, StrangeCoin, StrangeCoin, IronIngot, CopperIngot, TinIngot, SilverIngot, GoldIngot, PlatinumOre, IridiumOre, TitaniumOre, LeadOre, FourLeafClover, MercBoxA, MercBoxB, GoldenGift, ThornAmmoBox, PoisonAmmoBox, PolishedDiamond, PolishedRuby, PolishedEmerald, PolishedSapphire, PolishedAmethyst, PolishedTopaz, SacredLifePotion, SacredManaPotion, AncientBlueprint, ArcmageBoxset; + setarray .@r, StrangeCoin, StrangeCoin, IronIngot, CopperIngot, TinIngot, SilverIngot, GoldIngot, PlatinumOre, IridiumOre, TitaniumOre, LeadOre, FourLeafClover, MercBoxA, MercBoxB, GoldenGift, ThornAmmoBox, PoisonAmmoBox, PolishedDiamond, PolishedRuby, PolishedEmerald, PolishedSapphire, PolishedAmethyst, PolishedTopaz, SacredLifePotion, SacredManaPotion, AncientBlueprint, ArcmageBoxset, MysteryFruit; .@n=rand(getarraysize(.@r)); if (.@n > 1) -- cgit v1.2.3-70-g09d2 From af9c87dfddcee979537ba65302b80f53ff6f5024 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 12:54:41 -0300 Subject: GM Shop - New option - Purchase fruits. NOTE: NO REFUNDS --- npc/003-2/lua.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/npc/003-2/lua.txt b/npc/003-2/lua.txt index 5cd30f0c4..e0384e75d 100644 --- a/npc/003-2/lua.txt +++ b/npc/003-2/lua.txt @@ -78,13 +78,16 @@ L_GMEventShop: mesc l("@@ - @@ coins", getitemlink(PrismGift), 80*.@inf); mesc l("@@ - @@ coins", getitemlink(SupremeGift), 160*.@inf); mes ""; + mesc l("Fruits - @@ coins", 30*.@inf); + mes ""; menuint "Return to main menu", -1, rif(.@s > 10*.@inf, "Bronze Gift"), 10, rif(.@s > 20*.@inf, "Silver Gift"), 20, rif(.@s > 40*.@inf, "Golden Gift"), 40, rif(.@s > 80*.@inf, "Prism Gift"), 80, - rif(.@s > 160*.@inf, "Supreme Gift"), 160; + rif(.@s > 160*.@inf, "Supreme Gift"), 160, + rif(.@s > 30*.@inf, "Statusup Fruits"), 30; if (@menuret == -1) goto L_Menu; @@ -101,6 +104,17 @@ L_GMEventShop: getitem PrismGift, 1; break; case 160: getitem SupremeGift, 1; break; + case 30: + menuint + "Strength Fruit",StrengthFruit, + "Agility Fruit",AgilityFruit, + "Vitality Fruit",VitalityFruit, + "Intelligence Fruit",IntelligenceFruit, + "Dexterity Fruit",DexterityFruit, + "Luck Fruit",LuckFruit, + "Mysterious Fruit",MysteriousFruit; + mes ""; + getitem @menuret, 1; break; default: mesc(l("A script error happened, please report: @@", @menuret), 1); break; } -- cgit v1.2.3-70-g09d2 From b19f4d3527de7b0335730149ea3b0b21a0ab6eef Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 14:24:58 -0300 Subject: LoF Teleporter Cooldown exchange. Using Time Flask to go to Save Point will never be null, now. And LoF/Tulimshar warps will be 5 minutes faster each --- npc/items/lofteleporter.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/npc/items/lofteleporter.txt b/npc/items/lofteleporter.txt index 8c895387b..008bb29e6 100644 --- a/npc/items/lofteleporter.txt +++ b/npc/items/lofteleporter.txt @@ -51,11 +51,11 @@ OnUse: select l("Don't warp"), - l("Land Of Fire Village (@@m)", 40-.@x), - l("Tulimshar (@@m)", 40-.@x), + l("Land Of Fire Village (@@m)", 35-.@x), + l("Tulimshar (@@m)", 35-.@x), rif(TELEPORTERS & TP_FROST, l("Frostia (@@m)", 120-.@x)), rif(TELEPORTERS & TP_HALIN, l("Halinarzo (@@m)", 120-.@x)), - rif(GSET_SOULMENHIR_MANUAL, l("Save Point (@@m)", 20-.@x)); + rif(GSET_SOULMENHIR_MANUAL, l("Save Point (@@m)", 30-.@x)); if (@menu == 1) close; @@ -70,13 +70,13 @@ OnUse: switch (@menu) { case 2: warp "017-1", 120, 89; - TELEPORTER_TIME=loftel_time(40, .@x); + TELEPORTER_TIME=loftel_time(35, .@x); LOCATION$="LoF"; @timer_navio_running=0; break; case 3: warp "003-1", 41, 49; - TELEPORTER_TIME=loftel_time(40, .@x); + TELEPORTER_TIME=loftel_time(35, .@x); LOCATION$="Tulim"; @timer_navio_running=0; break; @@ -94,7 +94,7 @@ OnUse: break; case 6: warp "Save", 0, 0; - TELEPORTER_TIME=loftel_time(20, .@x); + TELEPORTER_TIME=loftel_time(30, .@x); //LOCATION$="Save"; @timer_navio_running=0; break; -- cgit v1.2.3-70-g09d2 From 01bfc4512d7102e2a4eb0e36c7d891e32f12462b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 14:32:39 -0300 Subject: Crafting Score new rule --- npc/craft/smith.txt | 9 ++++++--- npc/functions/clientversion.txt | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt index fa866f7eb..9d0739926 100644 --- a/npc/craft/smith.txt +++ b/npc/craft/smith.txt @@ -45,9 +45,12 @@ function script SmithSystem { // Player craft item usecraft .@craft; .@it=getcraftcode(.@entry); - // Mark the crafting in your score book (except dagger) - if (.@it != Dagger) - CRAFTING_SCORE+=1; + + // Mark the crafting in your score variable + CRAFTING_SCORE_COMPLETE+=getiteminfo(.@it, ITEMINFO_ELV); + // Update your score book + CRAFTING_SCORE=(CRAFTING_SCORE_COMPLETE/40); + if (.scope == CRAFT_GUILD) getitembound(.@it, 1, 2); // Create a guild-bound item else diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt index b628404c0..94b32d54d 100644 --- a/npc/functions/clientversion.txt +++ b/npc/functions/clientversion.txt @@ -572,6 +572,8 @@ function script clientupdater { skill(MC_OVERCHARGE,1,0); dispbottom l("You have learnt \"Barter\" in Thief Skills."); } + // Update Crafting Score + CRAFTING_SCORE_COMPLETE=CRAFTING_SCORE*39; } -- cgit v1.2.3-70-g09d2 From df8077615de85c5e3f8e04ea87e6d2f9fc12ca1e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 14:33:44 -0300 Subject: Update Intense Beard with new rule --- npc/003-8/intensebeard.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/003-8/intensebeard.txt b/npc/003-8/intensebeard.txt index 1189bba0d..8c3a08f7c 100644 --- a/npc/003-8/intensebeard.txt +++ b/npc/003-8/intensebeard.txt @@ -239,7 +239,7 @@ L_Learn: mesq l("There, now you can not only craft items, but craft AWESOME ITEMS!"); RECIPES_EQUIPMENT[CraftDagger]=true; - mesc l("You've also learned how to craft Daggers! These will NOT count towards crafting total score, and serves solely for training purposes."); + mesc l("You've also learned how to craft Daggers! It serves solely for training purposes. You get crafting points for every 40 levels crafted on the item."); } close; -- cgit v1.2.3-70-g09d2 From 270074c31431b6c172dc9f2840aff41ad146b889 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 14:38:47 -0300 Subject: Reduce scam ratio on alchemy from 67% to 33% (and in future I might replace 1 with 3) --- db/craft_db.conf | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/db/craft_db.conf b/db/craft_db.conf index 81dadb061..20636bf6d 100644 --- a/db/craft_db.conf +++ b/db/craft_db.conf @@ -124,10 +124,10 @@ craft_db: ( CreateItems: ( { - StatusResetPotion: 2 + StatusResetPotion: 3 }, { - StatusResetPotion: 1 + StatusResetPotion: 2 }, { StatusResetPotion: 1 @@ -228,7 +228,7 @@ craft_db: ( CreateItems: ( { - LukPotionA: 1 + LukPotionA: 2 }, { LukPotionA: 1 @@ -257,7 +257,7 @@ craft_db: ( LukPotionB: 1 }, { - LukPotionB: 1 + LukPotionB: 2 }, { LukPotionB: 2 @@ -283,7 +283,7 @@ craft_db: ( LukPotionC: 1 }, { - LukPotionC: 1 + LukPotionC: 2 }, { LukPotionC: 2 @@ -309,7 +309,7 @@ craft_db: ( DexPotionA: 1 }, { - DexPotionA: 1 + DexPotionA: 2 }, { DexPotionA: 2 @@ -332,7 +332,7 @@ craft_db: ( CreateItems: ( { - DexPotionB: 1 + DexPotionB: 2 }, { DexPotionB: 1 @@ -361,7 +361,7 @@ craft_db: ( DexPotionC: 1 }, { - DexPotionC: 1 + DexPotionC: 2 }, { DexPotionC: 2 @@ -384,7 +384,7 @@ craft_db: ( CreateItems: ( { - IntPotionA: 1 + IntPotionA: 2 }, { IntPotionA: 1 @@ -413,7 +413,7 @@ craft_db: ( IntPotionB: 1 }, { - IntPotionB: 1 + IntPotionB: 2 }, { IntPotionB: 2 @@ -436,7 +436,7 @@ craft_db: ( CreateItems: ( { - IntPotionC: 1 + IntPotionC: 2 }, { IntPotionC: 1 @@ -465,7 +465,7 @@ craft_db: ( VitPotionA: 1 }, { - VitPotionA: 1 + VitPotionA: 2 }, { VitPotionA: 2 @@ -491,7 +491,7 @@ craft_db: ( VitPotionB: 1 }, { - VitPotionB: 1 + VitPotionB: 2 }, { VitPotionB: 2 @@ -517,7 +517,7 @@ craft_db: ( VitPotionC: 1 }, { - VitPotionC: 1 + VitPotionC: 2 }, { VitPotionC: 2 @@ -543,7 +543,7 @@ craft_db: ( AgiPotionA: 1 }, { - AgiPotionA: 1 + AgiPotionA: 2 }, { AgiPotionA: 2 @@ -569,7 +569,7 @@ craft_db: ( AgiPotionB: 1 }, { - AgiPotionB: 1 + AgiPotionB: 2 }, { AgiPotionB: 2 @@ -595,7 +595,7 @@ craft_db: ( AgiPotionC: 1 }, { - AgiPotionC: 1 + AgiPotionC: 2 }, { AgiPotionC: 2 -- cgit v1.2.3-70-g09d2 From 204469b1f1f9c256dd2f8692c64c202b706585f3 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Aug 2019 17:12:55 -0300 Subject: Soul Menhir - When touching with autosave enabled, update LOCATION$ again --- npc/functions/soul_menhir.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt index 437e6d1e8..f44cc7b3b 100644 --- a/npc/functions/soul_menhir.txt +++ b/npc/functions/soul_menhir.txt @@ -102,6 +102,7 @@ L_Do_Save: savepoint @map$, @x, @y; specialeffect(4, SELF, getcharid(3)); } else { + EnterTown(MapToLoc(@map$)); dispbottom col(l("Your position is auto-saved when entering a town - use @ucp to change this behavior."), 1); } -- cgit v1.2.3-70-g09d2 From 627e69543e6c663ce62a732560e2eabd66a89b6b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 01:01:23 -0300 Subject: Fusus: Require 20 Silk Cocoon, lower results, and reduce cap to 5 --- npc/017-4/refine.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npc/017-4/refine.txt b/npc/017-4/refine.txt index dddb2e0ef..cb465f5fd 100644 --- a/npc/017-4/refine.txt +++ b/npc/017-4/refine.txt @@ -35,7 +35,7 @@ OnInit: L_Fusus: inventoryplace Iten, 1; mesn; - mesq l("I can fuse an @@ and an @@, besides @@ GP, into 3~6 @@.", getitemlink(CopperIngot), getitemlink(SilkCocoon), 500, getitemlink(Wurtizite)); + mesq l("I can fuse an @@ and 20 @@, besides @@ GP, into 3~5 @@.", getitemlink(CopperIngot), getitemlink(SilkCocoon), 500, getitemlink(Wurtizite)); mesc l("5 @@ can be fused in a @@", getitemlink(Wurtizite), getitemlink(Graphene)); mesc l("5 @@ can be fused in a @@", getitemlink(Graphene), getitemlink(Arcanum)); select @@ -48,10 +48,10 @@ L_Fusus: case 4: close; case 1: - if (!transcheck(CopperIngot, 1, SilkCocoon, 1)) + if (!transcheck(CopperIngot, 1, SilkCocoon, 20)) close; Zeny -= 500; - getitem Wurtizite, any(3,4,4,5,6); + getitem Wurtizite, any(3,3,4,4,4,5); // 3: ~33%. 4: =50%. 5, 6: ~17% each break; case 2: delitem Wurtizite, 5; -- cgit v1.2.3-70-g09d2 From e02a27956f629cefbd7d6839c0587ad7d121ba23 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 10:29:04 -0300 Subject: GM Testing Item: RentCart --- db/re/item_db.conf | 31 +++++++++++++++++++++++++++++++ npc/017-4/refine.txt | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index da50661bb..afccf9ce2 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -13739,6 +13739,37 @@ item_db: ( bonus bDef, -2; "> }, +{ + Id: 7402 + AegisName: "RentCart" + Name: "Rented Cart" + Type: "IT_ARMOR" + Loc: ["EQP_HAND_L", "EQP_SHADOW_SHOES"] + Buy: 7500000 + Sell: 5000 + Weight: 100 + Refine: false + WeaponLv: 1 + EquipLv: 1 + Trade: { + notrade: true + nodrop: true + noselltonpc: true + nogstorage: true + nomail: true + noauction: true + } + Script: <" + skill MC_PUSHCART, 2; + skill MC_VENDING, 8; + "> + OnEquipScript: <" + setcart 1; + "> + OnUnequipScript: <" + setcart 0; + "> +}, { Id: 7420 diff --git a/npc/017-4/refine.txt b/npc/017-4/refine.txt index cb465f5fd..4c3e472d7 100644 --- a/npc/017-4/refine.txt +++ b/npc/017-4/refine.txt @@ -51,7 +51,7 @@ L_Fusus: if (!transcheck(CopperIngot, 1, SilkCocoon, 20)) close; Zeny -= 500; - getitem Wurtizite, any(3,3,4,4,4,5); // 3: ~33%. 4: =50%. 5, 6: ~17% each + getitem Wurtizite, any(3,3,4,4,4,5); // 3: ~33%. 4: =50%. 5: ~17%. AVG: 3.8 break; case 2: delitem Wurtizite, 5; -- cgit v1.2.3-70-g09d2 From 1ce4856b7c4778509dbab81992afecd910f640ff Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 14:15:15 -0300 Subject: TR on Recipe Book --- db/re/item_db.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index afccf9ce2..75a7fca70 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1237,6 +1237,14 @@ item_db: ( Sell: 0 Weight: 20 KeepAfterUse: true + Trade: { + notrade: true + nodrop: true + noselltonpc: true + nogstorage: true + nomail: true + noauction: true + } Script: <" doevent "#RecipeBook::OnUse"; "> -- cgit v1.2.3-70-g09d2 From 8d5362bffc799cbf6f51e45e895452df4ebd9334 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 14:48:37 -0300 Subject: Elenium Bifs --- db/re/mob_db.conf | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index 6ff91c988..a545bc884 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -8824,6 +8824,81 @@ mob_db: ( CherryCake: 60 } }, +{ + Id: 1226 + SpriteName: "SmallEleniumBif" + Name: "Small Elenium Bif" + Lv: 1 + Hp: 5 + Sp: 0 + Exp: 1 + AttackRange: 1 + Attack: [10, 10] + Def: 100 + Mdef: 1 + Race: 5 + Element: (2, 1) + Mode: { + Plant: true + } + Drops: { + Coal: 200 + CopperOre: 100 + Wurtzite: 100 + Graphene: 25 + LightGreenDiamond: 1 + } +}, +{ + Id: 1227 + SpriteName: "EleniumBif" + Name: "Elenium Bif" + Lv: 1 + Hp: 9 + Sp: 0 + Exp: 1 + AttackRange: 1 + Attack: [10, 10] + Def: 100 + Mdef: 1 + Race: 5 + Element: (2, 1) + Mode: { + Plant: true + } + Drops: { + Coal: 300 + CopperOre: 200 + Wurtzite: 200 + Graphene: 45 + LightGreenDiamond: 2 + } +}, +{ + Id: 1228 + SpriteName: "BigEleniumBif" + Name: "Big Elenium Bif" + Lv: 1 + Hp: 14 + Sp: 0 + Exp: 1 + AttackRange: 1 + Attack: [10, 10] + Def: 100 + Mdef: 1 + Race: 5 + Element: (2, 1) + Mode: { + Plant: true + } + Drops: { + Coal: 500 + CopperOre: 300 + Wurtzite: 300 + Graphene: 65 + LightGreenDiamond: 3 + } +}, // WARNING: ID 1250~1400 PERMANENTLY RESERVED - USE PROHIBTED // Reserved -- cgit v1.2.3-70-g09d2 From cc2833a866ad6fe714849bf7cfb49c70c6030669 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 14:52:45 -0300 Subject: Lead Ore now drops from Elenium Bifs :> Easier to use Gunstaves now, uh? --- db/re/mob_db.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index a545bc884..8a8226829 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -8845,6 +8845,7 @@ mob_db: ( Coal: 200 CopperOre: 100 Wurtzite: 100 + LeadOre: 40 Graphene: 25 LightGreenDiamond: 1 } @@ -8870,6 +8871,7 @@ mob_db: ( Coal: 300 CopperOre: 200 Wurtzite: 200 + LeadOre: 80 Graphene: 45 LightGreenDiamond: 2 } @@ -8895,6 +8897,7 @@ mob_db: ( Coal: 500 CopperOre: 300 Wurtzite: 300 + LeadOre: 120 Graphene: 65 LightGreenDiamond: 3 } -- cgit v1.2.3-70-g09d2 From d4d1de377b52ff59977a3b327221e022830ed181 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 15:25:16 -0300 Subject: It's not "Wurtzite", it is "WurtIzite" --- db/re/mob_db.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index 8a8226829..232163950 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -8844,7 +8844,7 @@ mob_db: ( Drops: { Coal: 200 CopperOre: 100 - Wurtzite: 100 + Wurtizite: 100 LeadOre: 40 Graphene: 25 LightGreenDiamond: 1 @@ -8870,7 +8870,7 @@ mob_db: ( Drops: { Coal: 300 CopperOre: 200 - Wurtzite: 200 + Wurtizite: 200 LeadOre: 80 Graphene: 45 LightGreenDiamond: 2 @@ -8896,7 +8896,7 @@ mob_db: ( Drops: { Coal: 500 CopperOre: 300 - Wurtzite: 300 + Wurtizite: 300 LeadOre: 120 Graphene: 65 LightGreenDiamond: 3 -- cgit v1.2.3-70-g09d2 From f2952583f5f5082c002cfe154760a18761a63ada Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 16:26:33 -0300 Subject: Add a sign on 004-1 pointing to Tulimshar. Regenerate maps. --- maps/re/018-6-0.mcache | Bin 251 -> 249 bytes npc/004-1/_import.txt | 1 + npc/004-1/sign.txt | 19 +++++++++++++++++++ npc/018-6-0/_import.txt | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 npc/004-1/sign.txt diff --git a/maps/re/018-6-0.mcache b/maps/re/018-6-0.mcache index f6cdea270..72c87d499 100644 Binary files a/maps/re/018-6-0.mcache and b/maps/re/018-6-0.mcache differ diff --git a/npc/004-1/_import.txt b/npc/004-1/_import.txt index a98e3d86b..f53a35438 100644 --- a/npc/004-1/_import.txt +++ b/npc/004-1/_import.txt @@ -4,3 +4,4 @@ "npc/004-1/_warps.txt", "npc/004-1/anwar.txt", "npc/004-1/elanore.txt", +"npc/004-1/sign.txt", diff --git a/npc/004-1/sign.txt b/npc/004-1/sign.txt new file mode 100644 index 000000000..4c0057355 --- /dev/null +++ b/npc/004-1/sign.txt @@ -0,0 +1,19 @@ +// TMW2 Script. +// Author: +// Jesusalva +// Description: +// Sign + +004-1,65,74,0 script Sign#HalinarzoGoto NPC_SWORDS_SIGN,{ + mesc "↑ "+l("Tulimshar"); + mesc "→ "+l("Halinarzo Route"); + mesc "← "+l("Tulimshar Beach"); + mesc "↓ "+l("Tulimshar Mines"); + close; + +OnInit: + .sex = G_OTHER; + .distance = 3; + end; +} + diff --git a/npc/018-6-0/_import.txt b/npc/018-6-0/_import.txt index 09a96c3cd..45be6bdab 100644 --- a/npc/018-6-0/_import.txt +++ b/npc/018-6-0/_import.txt @@ -1,2 +1,2 @@ -// Map 018-6-0: Cave Of Trials +// Map 018-6-0: Sanctuary - Forgotten Chamber // This file is generated automatically. All manually added changes will be removed when running the Converter. -- cgit v1.2.3-70-g09d2 From e852d2e4951bd36f714bfd10c83492da7654e47f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 16:35:19 -0300 Subject: Secret passage on 003-1-1 Tulimshar Sewers (redundancy) --- npc/003-1-1/_import.txt | 1 + npc/003-1-1/downpath.txt | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 npc/003-1-1/downpath.txt diff --git a/npc/003-1-1/_import.txt b/npc/003-1-1/_import.txt index 3acc019ee..56c456ab0 100644 --- a/npc/003-1-1/_import.txt +++ b/npc/003-1-1/_import.txt @@ -2,5 +2,6 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/003-1-1/_mobs.txt", "npc/003-1-1/_warps.txt", +"npc/003-1-1/downpath.txt", "npc/003-1-1/treasure.txt", "npc/003-1-1/yetiking.txt", diff --git a/npc/003-1-1/downpath.txt b/npc/003-1-1/downpath.txt new file mode 100644 index 000000000..fd0c77480 --- /dev/null +++ b/npc/003-1-1/downpath.txt @@ -0,0 +1,30 @@ +// TMW2 scripts. +// Author: +// Jesusalva +// Notes: +// TW: Tulimshar, West +// TE: Tulimshar, East + +003-1-1,100,58,0 script #SewerDD-TW NPC_NO_SPRITE,{ + mesc l("There's a small, damp corritor, which you could crawl though."); + mesc l("It's not possible to see any light, and it seems to small and damp to have monsters."); + mesc l("You could barely fit on it, and your clothes will be ruined, in need of washing."); + next; + mesc l("Descend into the small corritor?"); + mesc l("Note: You'll be vulnerable for a short while!"), 1; + if (askyesno() == ASK_YES) { + closedialog; + sc_start SC_STUN, 3000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, getcharid(3); + sleep2(3000); + warp "003-1-3", 45, 36; + dispbottom l("At long last, you see the end of the corritor."); + end; + } + close; +} + +003-1-1,150,140,0 script #SewerDD-TE NPC_NO_SPRITE,{ + dispbottom l("The sewer mouth is locked."); + end; +} + -- cgit v1.2.3-70-g09d2 From b55d10ac6fed0489564895067c397d6473ef88cb Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 16:45:33 -0300 Subject: Rewrite Heroes Hold respawn logic (fix bugs) --- npc/018-2-2/main.txt | 452 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 321 insertions(+), 131 deletions(-) diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt index e0b2bf951..bdb537161 100644 --- a/npc/018-2-2/main.txt +++ b/npc/018-2-2/main.txt @@ -189,287 +189,477 @@ OnTimer3000: // So killing a Mouboo with 20 luck will give: 1% (luck) + 7% (level) + 0.3% (jexp) => 8.3% drop chance OnNovice0: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[0])*4)+strmobinfo(7,.Novice_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[0])*4)+strmobinfo(7,.Novice_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[0]), .Novice_Mobs[0], 1, "#HH_CONTROLLER01::OnNovice0"; end; OnNovice1: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[1])*4)+strmobinfo(7,.Novice_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[1])*4)+strmobinfo(7,.Novice_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[1]), .Novice_Mobs[1], 1, "#HH_CONTROLLER01::OnNovice1"; end; OnNovice2: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[2])*4)+strmobinfo(7,.Novice_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[2])*4)+strmobinfo(7,.Novice_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[2]), .Novice_Mobs[2], 1, "#HH_CONTROLLER01::OnNovice2"; end; OnNovice3: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[3])*4)+strmobinfo(7,.Novice_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[3])*4)+strmobinfo(7,.Novice_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[3]), .Novice_Mobs[3], 1, "#HH_CONTROLLER01::OnNovice3"; end; OnNovice4: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[4])*4)+strmobinfo(7,.Novice_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[4])*4)+strmobinfo(7,.Novice_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[4]), .Novice_Mobs[4], 1, "#HH_CONTROLLER01::OnNovice4"; end; OnNovice5: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[5])*4)+strmobinfo(7,.Novice_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[5])*4)+strmobinfo(7,.Novice_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[5]), .Novice_Mobs[5], 1, "#HH_CONTROLLER01::OnNovice5"; end; OnNovice6: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[6])*4)+strmobinfo(7,.Novice_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[6])*4)+strmobinfo(7,.Novice_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[6]), .Novice_Mobs[6], 1, "#HH_CONTROLLER01::OnNovice6"; end; OnNovice7: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[7])*4)+strmobinfo(7,.Novice_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[7])*4)+strmobinfo(7,.Novice_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[7]), .Novice_Mobs[7], 1, "#HH_CONTROLLER01::OnNovice7"; end; OnNovice8: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[8])*4)+strmobinfo(7,.Novice_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[8])*4)+strmobinfo(7,.Novice_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[8]), .Novice_Mobs[8], 1, "#HH_CONTROLLER01::OnNovice8"; end; OnNovice9: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[9])*4)+strmobinfo(7,.Novice_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[9])*4)+strmobinfo(7,.Novice_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[9]), .Novice_Mobs[9], 1, "#HH_CONTROLLER01::OnNovice9"; end; OnNovice10: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[10])*4)+strmobinfo(7,.Novice_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[10])*4)+strmobinfo(7,.Novice_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[10]), .Novice_Mobs[10], 1, "#HH_CONTROLLER01::OnNovice10"; end; OnNovice11: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[11])*4)+strmobinfo(7,.Novice_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[11])*4)+strmobinfo(7,.Novice_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[11]), .Novice_Mobs[11], 1, "#HH_CONTROLLER01::OnNovice11"; end; OnNovice12: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[12])*4)+strmobinfo(7,.Novice_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[12])*4)+strmobinfo(7,.Novice_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[12]), .Novice_Mobs[12], 1, "#HH_CONTROLLER01::OnNovice12"; end; OnNovice13: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[13])*4)+strmobinfo(7,.Novice_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[13])*4)+strmobinfo(7,.Novice_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[13]), .Novice_Mobs[13], 1, "#HH_CONTROLLER01::OnNovice13"; end; OnNovice14: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[14])*4)+strmobinfo(7,.Novice_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[14])*4)+strmobinfo(7,.Novice_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[14]), .Novice_Mobs[14], 1, "#HH_CONTROLLER01::OnNovice14"; end; OnNovice15: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[15])*4)+strmobinfo(7,.Novice_Mobs[15])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[15])*4)+strmobinfo(7,.Novice_Mobs[15])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[15]), .Novice_Mobs[15], 1, "#HH_CONTROLLER01::OnNovice15"; end; OnNovice16: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[16])*4)+strmobinfo(7,.Novice_Mobs[16])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[16])*4)+strmobinfo(7,.Novice_Mobs[16])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[16]), .Novice_Mobs[16], 1, "#HH_CONTROLLER01::OnNovice16"; end; OnNovice17: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[17])*4)+strmobinfo(7,.Novice_Mobs[17])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[17])*4)+strmobinfo(7,.Novice_Mobs[17])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[17]), .Novice_Mobs[17], 1, "#HH_CONTROLLER01::OnNovice17"; end; OnNovice18: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[18])*4)+strmobinfo(7,.Novice_Mobs[18])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[18])*4)+strmobinfo(7,.Novice_Mobs[18])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[18]), .Novice_Mobs[18], 1, "#HH_CONTROLLER01::OnNovice18"; end; OnNovice19: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[19])*4)+strmobinfo(7,.Novice_Mobs[19])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[19])*4)+strmobinfo(7,.Novice_Mobs[19])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[19]), .Novice_Mobs[19], 1, "#HH_CONTROLLER01::OnNovice19"; end; OnNovice20: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[20])*4)+strmobinfo(7,.Novice_Mobs[20])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Novice_Mobs[20])*4)+strmobinfo(7,.Novice_Mobs[20])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 1, .@m$, .@x, .@y);} + } areamonster "018-2-2@No", 20, 20, 220, 220, strmobinfo(1, .Novice_Mobs[20]), .Novice_Mobs[20], 1, "#HH_CONTROLLER01::OnNovice20"; end; + + OnInterm0: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[0])*4)+strmobinfo(7,.Interm_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[0]), .Interm_Mobs[0], 1, "#HH_CONTROLLER01::OnInterm0"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[0])*4)+strmobinfo(7,.Interm_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[0]), .Interm_Mobs[0], 1, "#HH_CONTROLLER01::OnInterm0"; end; OnInterm1: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[1])*4)+strmobinfo(7,.Interm_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[1]), .Interm_Mobs[1], 1, "#HH_CONTROLLER01::OnInterm1"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[1])*4)+strmobinfo(7,.Interm_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[1]), .Interm_Mobs[1], 1, "#HH_CONTROLLER01::OnInterm1"; end; OnInterm2: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[2])*4)+strmobinfo(7,.Interm_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[2]), .Interm_Mobs[2], 1, "#HH_CONTROLLER01::OnInterm2"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[2])*4)+strmobinfo(7,.Interm_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[2]), .Interm_Mobs[2], 1, "#HH_CONTROLLER01::OnInterm2"; end; OnInterm3: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[3])*4)+strmobinfo(7,.Interm_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[3]), .Interm_Mobs[3], 1, "#HH_CONTROLLER01::OnInterm3"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[3])*4)+strmobinfo(7,.Interm_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[3]), .Interm_Mobs[3], 1, "#HH_CONTROLLER01::OnInterm3"; end; OnInterm4: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[4])*4)+strmobinfo(7,.Interm_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[4]), .Interm_Mobs[4], 1, "#HH_CONTROLLER01::OnInterm4"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[4])*4)+strmobinfo(7,.Interm_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[4]), .Interm_Mobs[4], 1, "#HH_CONTROLLER01::OnInterm4"; end; OnInterm5: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[5])*4)+strmobinfo(7,.Interm_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[5]), .Interm_Mobs[5], 1, "#HH_CONTROLLER01::OnInterm5"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[5])*4)+strmobinfo(7,.Interm_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[5]), .Interm_Mobs[5], 1, "#HH_CONTROLLER01::OnInterm5"; end; OnInterm6: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[6])*4)+strmobinfo(7,.Interm_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[6]), .Interm_Mobs[6], 1, "#HH_CONTROLLER01::OnInterm6"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[6])*4)+strmobinfo(7,.Interm_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[6]), .Interm_Mobs[6], 1, "#HH_CONTROLLER01::OnInterm6"; end; OnInterm7: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[7])*4)+strmobinfo(7,.Interm_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[7]), .Interm_Mobs[7], 1, "#HH_CONTROLLER01::OnInterm7"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[7])*4)+strmobinfo(7,.Interm_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[7]), .Interm_Mobs[7], 1, "#HH_CONTROLLER01::OnInterm7"; end; OnInterm8: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[8])*4)+strmobinfo(7,.Interm_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[8]), .Interm_Mobs[8], 1, "#HH_CONTROLLER01::OnInterm8"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[8])*4)+strmobinfo(7,.Interm_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[8]), .Interm_Mobs[8], 1, "#HH_CONTROLLER01::OnInterm8"; end; OnInterm9: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[9])*4)+strmobinfo(7,.Interm_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[9]), .Interm_Mobs[9], 1, "#HH_CONTROLLER01::OnInterm9"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[9])*4)+strmobinfo(7,.Interm_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[9]), .Interm_Mobs[9], 1, "#HH_CONTROLLER01::OnInterm9"; end; OnInterm10: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[10])*4)+strmobinfo(7,.Interm_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[10]), .Interm_Mobs[10], 1, "#HH_CONTROLLER01::OnInterm10"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[10])*4)+strmobinfo(7,.Interm_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[10]), .Interm_Mobs[10], 1, "#HH_CONTROLLER01::OnInterm10"; end; OnInterm11: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[11])*4)+strmobinfo(7,.Interm_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[11]), .Interm_Mobs[11], 1, "#HH_CONTROLLER01::OnInterm11"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[11])*4)+strmobinfo(7,.Interm_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[11]), .Interm_Mobs[11], 1, "#HH_CONTROLLER01::OnInterm11"; end; OnInterm12: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[12])*4)+strmobinfo(7,.Interm_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[12]), .Interm_Mobs[12], 1, "#HH_CONTROLLER01::OnInterm12"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[12])*4)+strmobinfo(7,.Interm_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[12]), .Interm_Mobs[12], 1, "#HH_CONTROLLER01::OnInterm12"; end; OnInterm13: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[13])*4)+strmobinfo(7,.Interm_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[13]), .Interm_Mobs[13], 1, "#HH_CONTROLLER01::OnInterm13"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[13])*4)+strmobinfo(7,.Interm_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[13]), .Interm_Mobs[13], 1, "#HH_CONTROLLER01::OnInterm13"; end; OnInterm14: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[14])*4)+strmobinfo(7,.Interm_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[14]), .Interm_Mobs[14], 1, "#HH_CONTROLLER01::OnInterm14"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[14])*4)+strmobinfo(7,.Interm_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[14]), .Interm_Mobs[14], 1, "#HH_CONTROLLER01::OnInterm14"; end; OnInterm15: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[15])*4)+strmobinfo(7,.Interm_Mobs[15])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[15]), .Interm_Mobs[15], 1, "#HH_CONTROLLER01::OnInterm15"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[15])*4)+strmobinfo(7,.Interm_Mobs[15])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[15]), .Interm_Mobs[15], 1, "#HH_CONTROLLER01::OnInterm15"; end; OnInterm16: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[16])*4)+strmobinfo(7,.Interm_Mobs[16])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[16]), .Interm_Mobs[16], 1, "#HH_CONTROLLER01::OnInterm16"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[16])*4)+strmobinfo(7,.Interm_Mobs[16])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[16]), .Interm_Mobs[16], 1, "#HH_CONTROLLER01::OnInterm16"; end; OnInterm17: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[17])*4)+strmobinfo(7,.Interm_Mobs[17])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[17]), .Interm_Mobs[17], 1, "#HH_CONTROLLER01::OnInterm17"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[17])*4)+strmobinfo(7,.Interm_Mobs[17])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[17]), .Interm_Mobs[17], 1, "#HH_CONTROLLER01::OnInterm17"; end; OnInterm18: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[18])*4)+strmobinfo(7,.Interm_Mobs[18])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[18]), .Interm_Mobs[18], 1, "#HH_CONTROLLER01::OnInterm18"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[18])*4)+strmobinfo(7,.Interm_Mobs[18])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[18]), .Interm_Mobs[18], 1, "#HH_CONTROLLER01::OnInterm18"; end; OnInterm19: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[19])*4)+strmobinfo(7,.Interm_Mobs[19])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} - areamonster "018-2-2@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[19]), .Interm_Mobs[19], 1, "#HH_CONTROLLER01::OnInterm19"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Interm_Mobs[19])*4)+strmobinfo(7,.Interm_Mobs[19])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 2, .@m$, .@x, .@y);} + } + areamonster "018-2-3@In", 20, 20, 220, 220, strmobinfo(1, .Interm_Mobs[19]), .Interm_Mobs[19], 1, "#HH_CONTROLLER01::OnInterm19"; end; + + OnAdvanc0: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[0])*4)+strmobinfo(7,.Advanc_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[0])*4)+strmobinfo(7,.Advanc_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[0]), .Advanc_Mobs[0], 1, "#HH_CONTROLLER01::OnAdvanc0"; end; OnAdvanc1: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[1])*4)+strmobinfo(7,.Advanc_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[1])*4)+strmobinfo(7,.Advanc_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[1]), .Advanc_Mobs[1], 1, "#HH_CONTROLLER01::OnAdvanc1"; end; OnAdvanc2: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[2])*4)+strmobinfo(7,.Advanc_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[2])*4)+strmobinfo(7,.Advanc_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[2]), .Advanc_Mobs[2], 1, "#HH_CONTROLLER01::OnAdvanc2"; end; OnAdvanc3: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[3])*4)+strmobinfo(7,.Advanc_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[3])*4)+strmobinfo(7,.Advanc_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[3]), .Advanc_Mobs[3], 1, "#HH_CONTROLLER01::OnAdvanc3"; end; OnAdvanc4: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[4])*4)+strmobinfo(7,.Advanc_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[4])*4)+strmobinfo(7,.Advanc_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[4]), .Advanc_Mobs[4], 1, "#HH_CONTROLLER01::OnAdvanc4"; end; OnAdvanc5: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[5])*4)+strmobinfo(7,.Advanc_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[5])*4)+strmobinfo(7,.Advanc_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[5]), .Advanc_Mobs[5], 1, "#HH_CONTROLLER01::OnAdvanc5"; end; OnAdvanc6: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[6])*4)+strmobinfo(7,.Advanc_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[6])*4)+strmobinfo(7,.Advanc_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[6]), .Advanc_Mobs[6], 1, "#HH_CONTROLLER01::OnAdvanc6"; end; OnAdvanc7: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[7])*4)+strmobinfo(7,.Advanc_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[7])*4)+strmobinfo(7,.Advanc_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[7]), .Advanc_Mobs[7], 1, "#HH_CONTROLLER01::OnAdvanc7"; end; OnAdvanc8: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[8])*4)+strmobinfo(7,.Advanc_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[8])*4)+strmobinfo(7,.Advanc_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[8]), .Advanc_Mobs[8], 1, "#HH_CONTROLLER01::OnAdvanc8"; end; OnAdvanc9: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[9])*4)+strmobinfo(7,.Advanc_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[9])*4)+strmobinfo(7,.Advanc_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[9]), .Advanc_Mobs[9], 1, "#HH_CONTROLLER01::OnAdvanc9"; end; OnAdvanc10: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[10])*4)+strmobinfo(7,.Advanc_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[10])*4)+strmobinfo(7,.Advanc_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[10]), .Advanc_Mobs[10], 1, "#HH_CONTROLLER01::OnAdvanc10"; end; OnAdvanc11: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[11])*4)+strmobinfo(7,.Advanc_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[11])*4)+strmobinfo(7,.Advanc_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[11]), .Advanc_Mobs[11], 1, "#HH_CONTROLLER01::OnAdvanc11"; end; OnAdvanc12: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[12])*4)+strmobinfo(7,.Advanc_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[12])*4)+strmobinfo(7,.Advanc_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[12]), .Advanc_Mobs[12], 1, "#HH_CONTROLLER01::OnAdvanc12"; end; OnAdvanc13: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[13])*4)+strmobinfo(7,.Advanc_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[13])*4)+strmobinfo(7,.Advanc_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[13]), .Advanc_Mobs[13], 1, "#HH_CONTROLLER01::OnAdvanc13"; end; OnAdvanc14: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[14])*4)+strmobinfo(7,.Advanc_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[14])*4)+strmobinfo(7,.Advanc_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[14]), .Advanc_Mobs[14], 1, "#HH_CONTROLLER01::OnAdvanc14"; end; OnAdvanc15: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[15])*4)+strmobinfo(7,.Advanc_Mobs[15])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[15])*4)+strmobinfo(7,.Advanc_Mobs[15])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[15]), .Advanc_Mobs[15], 1, "#HH_CONTROLLER01::OnAdvanc15"; end; OnAdvanc16: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[16])*4)+strmobinfo(7,.Advanc_Mobs[16])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[16])*4)+strmobinfo(7,.Advanc_Mobs[16])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[16]), .Advanc_Mobs[16], 1, "#HH_CONTROLLER01::OnAdvanc16"; end; OnAdvanc17: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[17])*4)+strmobinfo(7,.Advanc_Mobs[17])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Advanc_Mobs[17])*4)+strmobinfo(7,.Advanc_Mobs[17])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 4, .@m$, .@x, .@y);} + } areamonster "018-2-2@Ad", 20, 20, 220, 220, strmobinfo(1, .Advanc_Mobs[17]), .Advanc_Mobs[17], 1, "#HH_CONTROLLER01::OnAdvanc17"; end; + + OnExpert0: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[0])*4)+strmobinfo(7,.Expert_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[0]), .Expert_Mobs[0], 1, "#HH_CONTROLLER01::OnExpert0"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[0])*4)+strmobinfo(7,.Expert_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[0]), .Expert_Mobs[0], 1, "#HH_CONTROLLER01::OnExpert0"; end; OnExpert1: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[1])*4)+strmobinfo(7,.Expert_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[1]), .Expert_Mobs[1], 1, "#HH_CONTROLLER01::OnExpert1"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[1])*4)+strmobinfo(7,.Expert_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[1]), .Expert_Mobs[1], 1, "#HH_CONTROLLER01::OnExpert1"; end; OnExpert2: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[2])*4)+strmobinfo(7,.Expert_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[2]), .Expert_Mobs[2], 1, "#HH_CONTROLLER01::OnExpert2"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[2])*4)+strmobinfo(7,.Expert_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[2]), .Expert_Mobs[2], 1, "#HH_CONTROLLER01::OnExpert2"; end; OnExpert3: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[3])*4)+strmobinfo(7,.Expert_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[3]), .Expert_Mobs[3], 1, "#HH_CONTROLLER01::OnExpert3"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[3])*4)+strmobinfo(7,.Expert_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[3]), .Expert_Mobs[3], 1, "#HH_CONTROLLER01::OnExpert3"; end; OnExpert4: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[4])*4)+strmobinfo(7,.Expert_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[4]), .Expert_Mobs[4], 1, "#HH_CONTROLLER01::OnExpert4"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[4])*4)+strmobinfo(7,.Expert_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[4]), .Expert_Mobs[4], 1, "#HH_CONTROLLER01::OnExpert4"; end; OnExpert5: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[5])*4)+strmobinfo(7,.Expert_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[5]), .Expert_Mobs[5], 1, "#HH_CONTROLLER01::OnExpert5"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[5])*4)+strmobinfo(7,.Expert_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[5]), .Expert_Mobs[5], 1, "#HH_CONTROLLER01::OnExpert5"; end; OnExpert6: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[6])*4)+strmobinfo(7,.Expert_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[6]), .Expert_Mobs[6], 1, "#HH_CONTROLLER01::OnExpert6"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[6])*4)+strmobinfo(7,.Expert_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[6]), .Expert_Mobs[6], 1, "#HH_CONTROLLER01::OnExpert6"; end; OnExpert7: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[7])*4)+strmobinfo(7,.Expert_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[7]), .Expert_Mobs[7], 1, "#HH_CONTROLLER01::OnExpert7"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[7])*4)+strmobinfo(7,.Expert_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[7]), .Expert_Mobs[7], 1, "#HH_CONTROLLER01::OnExpert7"; end; OnExpert8: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[8])*4)+strmobinfo(7,.Expert_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[8]), .Expert_Mobs[8], 1, "#HH_CONTROLLER01::OnExpert8"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[8])*4)+strmobinfo(7,.Expert_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[8]), .Expert_Mobs[8], 1, "#HH_CONTROLLER01::OnExpert8"; end; OnExpert9: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[9])*4)+strmobinfo(7,.Expert_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[9]), .Expert_Mobs[9], 1, "#HH_CONTROLLER01::OnExpert9"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[9])*4)+strmobinfo(7,.Expert_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[9]), .Expert_Mobs[9], 1, "#HH_CONTROLLER01::OnExpert9"; end; OnExpert10: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[10])*4)+strmobinfo(7,.Expert_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[10]), .Expert_Mobs[10], 1, "#HH_CONTROLLER01::OnExpert10"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[10])*4)+strmobinfo(7,.Expert_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[10]), .Expert_Mobs[10], 1, "#HH_CONTROLLER01::OnExpert10"; end; OnExpert11: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[11])*4)+strmobinfo(7,.Expert_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[11]), .Expert_Mobs[11], 1, "#HH_CONTROLLER01::OnExpert11"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[11])*4)+strmobinfo(7,.Expert_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[11]), .Expert_Mobs[11], 1, "#HH_CONTROLLER01::OnExpert11"; end; OnExpert12: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[12])*4)+strmobinfo(7,.Expert_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[12]), .Expert_Mobs[12], 1, "#HH_CONTROLLER01::OnExpert12"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[12])*4)+strmobinfo(7,.Expert_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[12]), .Expert_Mobs[12], 1, "#HH_CONTROLLER01::OnExpert12"; end; OnExpert13: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[13])*4)+strmobinfo(7,.Expert_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[13]), .Expert_Mobs[13], 1, "#HH_CONTROLLER01::OnExpert13"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[13])*4)+strmobinfo(7,.Expert_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[13]), .Expert_Mobs[13], 1, "#HH_CONTROLLER01::OnExpert13"; end; OnExpert14: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[14])*4)+strmobinfo(7,.Expert_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} - areamonster "018-2-2@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[14]), .Expert_Mobs[14], 1, "#HH_CONTROLLER01::OnExpert14"; end; + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Expert_Mobs[14])*4)+strmobinfo(7,.Expert_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 8, .@m$, .@x, .@y);} + } + areamonster "018-2-3@Ex", 20, 20, 220, 220, strmobinfo(1, .Expert_Mobs[14]), .Expert_Mobs[14], 1, "#HH_CONTROLLER01::OnExpert14"; end; + + OnMaster0: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[0])*4)+strmobinfo(7,.Master_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[0])*4)+strmobinfo(7,.Master_Mobs[0])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[0]), .Master_Mobs[0], 1, "#HH_CONTROLLER01::OnMaster0"; end; OnMaster1: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[1])*4)+strmobinfo(7,.Master_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[1])*4)+strmobinfo(7,.Master_Mobs[1])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[1]), .Master_Mobs[1], 1, "#HH_CONTROLLER01::OnMaster1"; end; OnMaster2: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[2])*4)+strmobinfo(7,.Master_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[2])*4)+strmobinfo(7,.Master_Mobs[2])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[2]), .Master_Mobs[2], 1, "#HH_CONTROLLER01::OnMaster2"; end; OnMaster3: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[3])*4)+strmobinfo(7,.Master_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[3])*4)+strmobinfo(7,.Master_Mobs[3])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[3]), .Master_Mobs[3], 1, "#HH_CONTROLLER01::OnMaster3"; end; OnMaster4: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[4])*4)+strmobinfo(7,.Master_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[4])*4)+strmobinfo(7,.Master_Mobs[4])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[4]), .Master_Mobs[4], 1, "#HH_CONTROLLER01::OnMaster4"; end; OnMaster5: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[5])*4)+strmobinfo(7,.Master_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[5])*4)+strmobinfo(7,.Master_Mobs[5])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[5]), .Master_Mobs[5], 1, "#HH_CONTROLLER01::OnMaster5"; end; OnMaster6: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[6])*4)+strmobinfo(7,.Master_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[6])*4)+strmobinfo(7,.Master_Mobs[6])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[6]), .Master_Mobs[6], 1, "#HH_CONTROLLER01::OnMaster6"; end; OnMaster7: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[7])*4)+strmobinfo(7,.Master_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[7])*4)+strmobinfo(7,.Master_Mobs[7])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[7]), .Master_Mobs[7], 1, "#HH_CONTROLLER01::OnMaster7"; end; OnMaster8: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[8])*4)+strmobinfo(7,.Master_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[8])*4)+strmobinfo(7,.Master_Mobs[8])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[8]), .Master_Mobs[8], 1, "#HH_CONTROLLER01::OnMaster8"; end; OnMaster9: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[9])*4)+strmobinfo(7,.Master_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[9])*4)+strmobinfo(7,.Master_Mobs[9])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[9]), .Master_Mobs[9], 1, "#HH_CONTROLLER01::OnMaster9"; end; OnMaster10: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[10])*4)+strmobinfo(7,.Master_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[10])*4)+strmobinfo(7,.Master_Mobs[10])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[10]), .Master_Mobs[10], 1, "#HH_CONTROLLER01::OnMaster10"; end; OnMaster11: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[11])*4)+strmobinfo(7,.Master_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[11])*4)+strmobinfo(7,.Master_Mobs[11])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[11]), .Master_Mobs[11], 1, "#HH_CONTROLLER01::OnMaster11"; end; OnMaster12: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[12])*4)+strmobinfo(7,.Master_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[12])*4)+strmobinfo(7,.Master_Mobs[12])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[12]), .Master_Mobs[12], 1, "#HH_CONTROLLER01::OnMaster12"; end; OnMaster13: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[13])*4)+strmobinfo(7,.Master_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[13])*4)+strmobinfo(7,.Master_Mobs[13])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[13]), .Master_Mobs[13], 1, "#HH_CONTROLLER01::OnMaster13"; end; OnMaster14: - if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[14])*4)+strmobinfo(7,.Master_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + if (playerattached()) { + if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.Master_Mobs[14])*4)+strmobinfo(7,.Master_Mobs[14])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, 16, .@m$, .@x, .@y);} + } areamonster "018-2-5@Ma", 20, 20, 220, 220, strmobinfo(1, .Master_Mobs[14]), .Master_Mobs[14], 1, "#HH_CONTROLLER01::OnMaster14"; end; } /*python -df=[('Novice', 21, 1), - ('Interm', 20, 2), - ('Advanc', 18, 4), - ('Expert', 15, 8), - ('Master', 15, 16)] +# df (name, mobs, reward, mapid) +df=[('Novice', 21, 1, 2), + ('Interm', 20, 2, 3), + ('Advanc', 18, 4, 2), + ('Expert', 15, 8, 3), + ('Master', 15, 16,5)] for a in df: + print("\n") i=0 while (i < a[1]): print('On%s%d:' % (a[0], i)) - print(' if (rand(0, 2000) <= readparam(Luk)+(strmobinfo(3,.%s_Mobs[%d])*4)+strmobinfo(7,.%s_Mobs[%d])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, %s, .@m$, .@x, .@y);}' % (a[0], i, a[0], i, a[2])) - print(' areamonster "018-2-2@%s", 20, 20, 220, 220, strmobinfo(1, .%s_Mobs[%d]), .%s_Mobs[%d], 1, "#HH_CONTROLLER01::On%s%d"; end;' % (a[0][:2],a[0],i,a[0],i,a[0],i)) + print(' if (playerattached()) {') + print(' if (rand2(0, 2000) <= readparam(Luk)+(strmobinfo(3,.%s_Mobs[%d])*4)+strmobinfo(7,.%s_Mobs[%d])) {getmapxy(.@m$, .@x, .@y, 0); makeitem(HeroCoin, %s, .@m$, .@x, .@y);}' % (a[0], i, a[0], i, a[2])) + print(' }') + print(' areamonster "018-2-%d@%s", 20, 20, 220, 220, strmobinfo(1, .%s_Mobs[%d]), .%s_Mobs[%d], 1, "#HH_CONTROLLER01::On%s%d"; end;' % (a[3], a[0][:2],a[0],i,a[0],i,a[0],i)) i+=1 */ -- cgit v1.2.3-70-g09d2 From a5d2385a5e752e751573ad9694e2f58fa6091835 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 28 Aug 2019 19:32:11 -0300 Subject: Elenium Mines --- conf/map/maps.conf | 1 + db/map_index.txt | 99 ++++++++++++++++++++++++------------------------ maps/re/018-6-1.mcache | Bin 0 -> 1075 bytes npc/017-1/townhall.txt | 17 +++++++++ npc/018-6-1/_import.txt | 4 ++ npc/018-6-1/_mobs.txt | 16 ++++++++ npc/018-6-1/_warps.txt | 3 ++ npc/_import.txt | 1 + 8 files changed, 92 insertions(+), 49 deletions(-) create mode 100644 maps/re/018-6-1.mcache create mode 100644 npc/018-6-1/_import.txt create mode 100644 npc/018-6-1/_mobs.txt create mode 100644 npc/018-6-1/_warps.txt diff --git a/conf/map/maps.conf b/conf/map/maps.conf index 880a86bda..733e5f357 100644 --- a/conf/map/maps.conf +++ b/conf/map/maps.conf @@ -128,6 +128,7 @@ map_list: ( "018-5-boss", "018-5", "018-6-0", + "018-6-1", "019-1-1", "019-1", "019-2", diff --git a/db/map_index.txt b/db/map_index.txt index c22009977..3cf92e99f 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -125,52 +125,53 @@ 018-5-boss 125 018-5 126 018-6-0 127 -019-1-1 128 -019-1 129 -019-2 130 -019-3 131 -019-4-1 132 -019-4 133 -020-1 134 -020-2 135 -020-3 136 -020-4 137 -020-5 138 -020-6 139 -020-7-1 140 -020-7-2 141 -020-7 142 -021-1 143 -021-2 144 -021-3 145 -021-4 146 -022-1 147 -023-1 148 -023-2 149 -023-3-1 150 -023-3-2 151 -023-3 152 -024-1 153 -024-10 154 -024-11 155 -024-12 156 -024-13 157 -024-14 158 -024-15 159 -024-16 160 -024-2 161 -024-3 162 -024-4 163 -024-5 164 -024-6 165 -024-7 166 -024-8 167 -024-9 168 -boss 169 -botcheck 170 -guilds 171 -sec_pri 172 -soren-2 173 -soren 174 -test 175 -testbg 176 +018-6-1 128 +019-1-1 129 +019-1 130 +019-2 131 +019-3 132 +019-4-1 133 +019-4 134 +020-1 135 +020-2 136 +020-3 137 +020-4 138 +020-5 139 +020-6 140 +020-7-1 141 +020-7-2 142 +020-7 143 +021-1 144 +021-2 145 +021-3 146 +021-4 147 +022-1 148 +023-1 149 +023-2 150 +023-3-1 151 +023-3-2 152 +023-3 153 +024-1 154 +024-10 155 +024-11 156 +024-12 157 +024-13 158 +024-14 159 +024-15 160 +024-16 161 +024-2 162 +024-3 163 +024-4 164 +024-5 165 +024-6 166 +024-7 167 +024-8 168 +024-9 169 +boss 170 +botcheck 171 +guilds 172 +sec_pri 173 +soren-2 174 +soren 175 +test 176 +testbg 177 diff --git a/maps/re/018-6-1.mcache b/maps/re/018-6-1.mcache new file mode 100644 index 000000000..c7f7b2cf5 Binary files /dev/null and b/maps/re/018-6-1.mcache differ diff --git a/npc/017-1/townhall.txt b/npc/017-1/townhall.txt index 931f130a0..9b78463ce 100644 --- a/npc/017-1/townhall.txt +++ b/npc/017-1/townhall.txt @@ -65,3 +65,20 @@ OnInit: end; } +017-1,32,44,0 script #LoF_EleniumMines NPC_HIDDEN,{ + end; + +OnTouch: + // TODO: OnQuest: Instance + .@q=getq(General_Narrator); + if (.@q >= 17) { + warp "018-6-1", 80, 199; + } else { + warp "018-6-1", 80, 199; + } + end; +OnInit: + .distance=1; + end; +} + diff --git a/npc/018-6-1/_import.txt b/npc/018-6-1/_import.txt new file mode 100644 index 000000000..de446a263 --- /dev/null +++ b/npc/018-6-1/_import.txt @@ -0,0 +1,4 @@ +// Map 018-6-1: Elenium Mines +// This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/018-6-1/_mobs.txt", +"npc/018-6-1/_warps.txt", diff --git a/npc/018-6-1/_mobs.txt b/npc/018-6-1/_mobs.txt new file mode 100644 index 000000000..fd07526ca --- /dev/null +++ b/npc/018-6-1/_mobs.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-6-1: Elenium Mines mobs +018-6-1,40,49,7,8 monster Big Elenium Bif 1228,5,450000,45000 +018-6-1,95,51,7,8 monster Big Elenium Bif 1228,5,450000,45000 +018-6-1,145,83,6,5 monster Medium Elenium Bif 1227,5,400000,45000 +018-6-1,62,86,6,5 monster Medium Elenium Bif 1227,5,400000,45000 +018-6-1,65,130,6,5 monster Medium Elenium Bif 1227,5,400000,45000 +018-6-1,125,158,6,5 monster Small Elenium Bif 1226,4,300000,45000 +018-6-1,129,183,6,5 monster Small Elenium Bif 1226,4,300000,45000 +018-6-1,34,181,5,5 monster Small Elenium Bif 1226,4,300000,45000 +018-6-1,80,172,54,25 monster Black Slime 1178,16,30000,15000 +018-6-1,89,167,54,25 monster Dark Lizard 1051,8,30000,15000 +018-6-1,96,103,56,29 monster Black Scorpion 1074,18,30000,15000 +018-6-1,101,105,54,25 monster Mountain Snake 1123,10,30000,15000 +018-6-1,70,45,44,25 monster Wicked Mushroom 1176,14,30000,15000 +018-6-1,68,45,31,21 monster Archant 1026,7,30000,15000 diff --git a/npc/018-6-1/_warps.txt b/npc/018-6-1/_warps.txt new file mode 100644 index 000000000..dda336877 --- /dev/null +++ b/npc/018-6-1/_warps.txt @@ -0,0 +1,3 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Map 018-6-1: Elenium Mines warps +018-6-1,80,200,0 warp #018-6-1_80_200 0,0,017-1,32,45 diff --git a/npc/_import.txt b/npc/_import.txt index 3fd312d79..c877bae5d 100644 --- a/npc/_import.txt +++ b/npc/_import.txt @@ -127,6 +127,7 @@ @include "npc/018-5-boss/_import.txt" @include "npc/018-5/_import.txt" @include "npc/018-6-0/_import.txt" +@include "npc/018-6-1/_import.txt" @include "npc/019-1-1/_import.txt" @include "npc/019-1/_import.txt" @include "npc/019-2/_import.txt" -- cgit v1.2.3-70-g09d2 From d6358d0d127ffac94f243d29eccc6793567e9c60 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 29 Aug 2019 00:09:02 -0300 Subject: Elenium Mines Instance Subsystem, quest register, MAP MAP MAP MAP MAP --- db/quest_db.conf | 4 ++++ npc/017-1/townhall.txt | 45 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/db/quest_db.conf b/db/quest_db.conf index 2e40442f4..c10b77fad 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -449,6 +449,10 @@ quest_db: ( Id: 278 Name: "LoFQuest_Hitchhiker" }, +{ + Id: 279 + Name: "LoFQuest_Barbara" +}, // ID 300 to 320: Seasonal/Annual/Monthly quests { diff --git a/npc/017-1/townhall.txt b/npc/017-1/townhall.txt index 9b78463ce..61df25334 100644 --- a/npc/017-1/townhall.txt +++ b/npc/017-1/townhall.txt @@ -64,15 +64,54 @@ OnInit: .distance=1; end; } +///////////////////////////// +// Main Quest 6 +// LoF Arc +///////////////// +// Check instances and rebuild if needed +// Returns map name +// BarbaraInstCheck( {submap=mines} ) +// 0- Chamber ; 1 - Mines ; 2 - Hall ; 3 - Shrine +function script BarbaraInstCheck { + .@house=getarg(0, true); + + .@q2=getq2(LoFQuest_Barbara); + // Map name limit: 4 chars (sgt1) + .@map0$="brb0@"+getcharid(0); + .@map1$="brb1@"+getcharid(0); + .@map2$="brb2@"+getcharid(0); + .@map3$="brb3@"+getcharid(0); + if (!(isinstance(.@q2) && .@q2 != 0)) { + .@inst = instance_create("Forgotten Shrine "+getcharid(0), getcharid(3), IOT_CHAR); + instance_attachmap("018-6-0", .@inst, false, .@map0$); + instance_attachmap("018-6-1", .@inst, false, .@map1$); + //instance_attachmap("018-6-2", .@inst, false, .@map2$); + //instance_attachmap("018-6-3", .@inst, false, .@map3$); + // Instance lasts two hours + instance_set_timeout(7200, 7200, .@inst); + instance_init(.@inst); + setq2 LoFQuest_Barbara, .@inst; + } + + // It broke + if (getmapinfo(MAPINFO_SIZE_X, .@map1$) <= 0) { + setq2 LoFQuest_Barbara, 0; + // Infinite Loop? + return callfunc("BarbaraInstCheck", .@house); + } + + // Return map name + return getd(".@map"+.@house+"$"); +} 017-1,32,44,0 script #LoF_EleniumMines NPC_HIDDEN,{ end; OnTouch: // TODO: OnQuest: Instance - .@q=getq(General_Narrator); - if (.@q >= 17) { - warp "018-6-1", 80, 199; + .@q=getq(LoFQuest_Barbara); + if (.@q >= 1) { + warp BarbaraInstCheck(1), 80, 199; } else { warp "018-6-1", 80, 199; } -- cgit v1.2.3-70-g09d2