From a201511c8d78da80e78b0d092d72f27c85ba20c8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 23:37:47 -0300 Subject: Report that sewer mouths are locked (with a dispbottom) --- npc/003-1/sewer.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/npc/003-1/sewer.txt b/npc/003-1/sewer.txt index a0fe188bf..408347145 100644 --- a/npc/003-1/sewer.txt +++ b/npc/003-1/sewer.txt @@ -6,7 +6,10 @@ // TE: Tulimshar, East 003-1,56,84,0 script #Sewer-TW NPC_NO_SPRITE,{ - if (getq(TulimsharQuest_Sewers) == 0) end; + if (getq(TulimsharQuest_Sewers) == 0) { + dispbottom l("The sewer mouth is locked."); + end; + } if (BaseLevel < 25) end; mesc l("Descend into Tulimshar sewers?"); @@ -20,7 +23,10 @@ } 003-1,115,111,0 script #Sewer-TE NPC_NO_SPRITE,{ - if (getq(TulimsharQuest_Sewers) == 0) end; + if (getq(TulimsharQuest_Sewers) == 0) { + dispbottom l("The sewer mouth is locked."); + end; + } if (BaseLevel < 25) end; mesc l("Descend into Tulimshar sewers?"); -- cgit v1.2.3-70-g09d2 From 23f4043278afbc299ad3710e7e0fd2058395abc8 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 22 Jul 2019 23:50:00 -0300 Subject: Don't be silent. --- npc/003-1-1/yetiking.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/npc/003-1-1/yetiking.txt b/npc/003-1-1/yetiking.txt index c298fd47b..e6f311217 100644 --- a/npc/003-1-1/yetiking.txt +++ b/npc/003-1-1/yetiking.txt @@ -15,6 +15,7 @@ if (.@q > 1 && .@q < 99) setq HurnscaldQuest_Celestia, 1; if (.@q == 1 && !.inUse) goto L_Summon; + if (!.@q) dispbottom l("I do not know how to trigger this summoning circle."); end; L_Summon: -- cgit v1.2.3-70-g09d2 From 7b9def530c41346a3ad3427ff255133c0356ee25 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jul 2019 09:47:41 -0300 Subject: Redesign fishing system so it may accept fishing nets. --- npc/functions/fishing.txt | 60 ++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/npc/functions/fishing.txt b/npc/functions/fishing.txt index 57df44956..0e6a8c62e 100644 --- a/npc/functions/fishing.txt +++ b/npc/functions/fishing.txt @@ -89,6 +89,9 @@ function script fishing { .@rod = getvariableofnpc(.fishing_rod, .@npc$); // the fishing rod required for this spot .@rod = (.@rod ? .@rod : FishingRod); + .@net_ratio = getvariableofnpc(.net_ratio, .@npc$); // How many fishes and baits are required? + .@net_ratio = min(1, (.@net_ratio ? .@net_ratio : 1)); + .@regen_time = getvariableofnpc(.cooldown, .@npc$); // cooldown for the fishing spot .@regen_time = (.@regen_time ? .@regen_time : 20); @@ -204,34 +207,32 @@ function script fishing { return -4; } - // RNG to obtain a rare fish or common fish - // Luck can increase up to 5% when it is at 100. - // Level can increase up to 10% when it is at 100. - .@boost=(readparam(bLuk)/20)+(BaseLevel/10); - if (rand2(0, 100) < getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)+.@boost) - { - //debugmes("[FISH] Got a rare with %d drop chances", getarraysize(.@rare_fish)); - .@fish_id = any_of(.@rare_fish); - } else { - //debugmes("[FISH] Got a common with %d drop chances", getarraysize(.@common_fish)); - .@fish_id = any_of(.@common_fish); - } // RNG to obtain a fish - if (rand(gettimetick(0) - @fishing_tick) <= .@pull_rand_max) + if (rand2(gettimetick(0) - @fishing_tick) <= .@pull_rand_max) { - specialeffect(.@success_fx, SELF, playerattached()); // event success - getexp getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)+(BaseLevel/10), 0; // xp gain is equivalent to bait rarity + BaseLevel boost - - if(!checkweight(.@fish_id, 1)) - { - dispbottom l("You caught a @@ but had no room in your inventory to carry it.", getitemlink(.@fish_id)); - makeitem .@fish_id, 1, .@mapbis$, .@xbis, .@ybis; // drop on the ground - return 0; + for (.@i=0 ; .@i < .@net_ratio ; .@i++) { + // RNG to obtain a rare fish or common fish + // Luck can increase up to 5% when it is at 100. + // Level can increase up to 10% when it is at 100. + .@boost=(readparam(bLuk)/20)+(BaseLevel/10); + if (rand2(0, 100) < getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)+.@boost) + { + .@fish_id = any_of(.@rare_fish); + } else { + .@fish_id = any_of(.@common_fish); + } + specialeffect(.@success_fx, SELF, playerattached()); + getexp getvariableofnpc(.bait_ids[@bait_d+1], .@npc$)+(BaseLevel/10), 0; // xp gain is equivalent to bait rarity + BaseLevel boost + + if(!checkweight(.@fish_id, 1)) + { + dispbottom l("You caught a @@ but had no room in your inventory to carry it.", getitemlink(.@fish_id)); + makeitem .@fish_id, 1, .@mapbis$, .@xbis, .@ybis; // drop on the ground + return 0; + } + getitem .@fish_id, 1; } - - //dispbottom l("You caught a @@!", getitemlink(.@fish_id)); <= already shows "you picked up [...]" - getitem .@fish_id, 1; } else { @@ -255,21 +256,22 @@ function script fishing { // begin fishing narrator S_LAST_NEXT, l("You see some fish reflecting the sun on the surface of the water."), - l("What will be the bait for the fish?"); + (.@net_ratio == 1 ? l("What will be the bait for the fish?") : l("You need @@ units of bait for this fishing spot. What will you use?", .@net_ratio)); mes "##B" + l("Drag and drop an item from your inventory.") + "##b"; .@bait = requestitem(); .@bait_c = false; - if (.@bait < 1) { + if (.@bait < .@net_ratio) { narrator S_FIRST_BLANK_LINE, - l("You take your fishing rod and leave."); + l("You take your @@ and leave.", getitemlink(.@rod)); return -6; } - if (countitem(.@bait) < 1) { + if (countitem(.@bait) < .@net_ratio) { + mesc l("You do not have enough bait for fishing here."); return -6; } @@ -303,7 +305,7 @@ function script fishing { set getvariableofnpc(.char_id, .@npc$), getcharid(CHAR_ID_CHAR); // record char id set getvariableofnpc(.last_used, .@npc$), gettimetick(2); getmapxy(@fishing_loc$[0], @fishing_loc[0], @fishing_loc[1], 0); // record char pos - delitem .@bait, 1; + delitem .@bait, .@net_ratio; // The player uses this spot, his bait is ready, he just has to wait for the signal. closedialog; -- cgit v1.2.3-70-g09d2 From edf17ee6799d24e41e74d8dab9f9c722ff4c1b6a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jul 2019 09:56:21 -0300 Subject: (Small) Fishing Net. --- db/re/item_db.conf | 11 +++++++++++ npc/003-1/eugene.txt | 8 +++++--- npc/003-1/wateranimation.txt | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index dfaa4ea4e..9d6724faf 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -5423,6 +5423,17 @@ item_db: ( Weight: 40 Refine: false }, +{ + Id: 890 + AegisName: "SmallFishingNet" + Name: "Small Fishing Net" + Type: "IT_ETC" + Buy: 5000 + Sell: 150 + Weight: 60 + Refine: false + ViewSprite: 890 +}, // { Id: 911 diff --git a/npc/003-1/eugene.txt b/npc/003-1/eugene.txt index e1aad9187..c7bb3c580 100644 --- a/npc/003-1/eugene.txt +++ b/npc/003-1/eugene.txt @@ -98,6 +98,7 @@ OnInit: .BaitCount = 10; tradertype(NST_MARKET); + sellitem SmallFishingNet, -1, 1; sellitem FishBox, -1, 5; sellitem CommonCarp, -1, 3; sellitem GrassCarp, -1, 1; @@ -110,9 +111,10 @@ OnClock0611: OnClock1200: OnClock1801: OnClock0003: - restoreshopitem FishBox, -1, 5; - restoreshopitem CommonCarp, -1, 3; - restoreshopitem GrassCarp, -1, 1; + restoreshopitem SmallFishingNet, 1; + restoreshopitem FishBox, 5; + restoreshopitem CommonCarp, 3; + restoreshopitem GrassCarp, 1; end; } diff --git a/npc/003-1/wateranimation.txt b/npc/003-1/wateranimation.txt index f99753da9..7dfa48f37 100644 --- a/npc/003-1/wateranimation.txt +++ b/npc/003-1/wateranimation.txt @@ -32,3 +32,23 @@ OnInit: 003-1,83,140,0 duplicate(#water_animation0) #water_animation13 NPC_WATER_SPLASH 003-1,72,147,0 duplicate(#water_animation0) #water_animation14 NPC_WATER_SPLASH 003-1,72,122,0 duplicate(#water_animation0) #water_animation15 NPC_WATER_SPLASH + + +003-1,71,58,0 script #lowsea_tulim0 NPC_WATER_SPLASH,{ + + fishing; // begin or continue fishing + close; + +OnInit: + .sex = G_OTHER; + .distance = 4; + .rod=SmallFishingNet; + .net_ratio=3; + .catch_time=8000; // You have 3 more seconds to pull here + .wait_time_min=8000; + .wait_time_max=21000; + .pull_rand_max=1600; + .regen_time=30; + end; +} + -- cgit v1.2.3-70-g09d2 From 762f0b60dfded2096113eb7d713e0fd42ee8cc92 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jul 2019 09:58:12 -0300 Subject: Extra net-fishing spots on Tulimshar =D --- npc/003-1/wateranimation.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npc/003-1/wateranimation.txt b/npc/003-1/wateranimation.txt index 7dfa48f37..0a83adfb5 100644 --- a/npc/003-1/wateranimation.txt +++ b/npc/003-1/wateranimation.txt @@ -52,3 +52,10 @@ OnInit: end; } +003-1,95,47,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,121,48,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,121,36,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,32,107,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,25,78,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,16,50,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH + -- cgit v1.2.3-70-g09d2 From 7646a5f2f291a005c0bd9860ddfa385fb2927743 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jul 2019 10:44:44 -0300 Subject: Fix bad syntax --- npc/003-1/wateranimation.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/npc/003-1/wateranimation.txt b/npc/003-1/wateranimation.txt index 0a83adfb5..c1cecbe09 100644 --- a/npc/003-1/wateranimation.txt +++ b/npc/003-1/wateranimation.txt @@ -53,9 +53,9 @@ OnInit: } 003-1,95,47,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH -003-1,121,48,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH -003-1,121,36,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH -003-1,32,107,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH -003-1,25,78,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH -003-1,16,50,0 duplicate(#lowsea_tulim0) #lowsea_tulim1 NPC_WATER_SPLASH +003-1,121,48,0 duplicate(#lowsea_tulim0) #lowsea_tulim2 NPC_WATER_SPLASH +003-1,121,36,0 duplicate(#lowsea_tulim0) #lowsea_tulim3 NPC_WATER_SPLASH +003-1,32,107,0 duplicate(#lowsea_tulim0) #lowsea_tulim4 NPC_WATER_SPLASH +003-1,25,78,0 duplicate(#lowsea_tulim0) #lowsea_tulim5 NPC_WATER_SPLASH +003-1,16,50,0 duplicate(#lowsea_tulim0) #lowsea_tulim6 NPC_WATER_SPLASH -- cgit v1.2.3-70-g09d2 From 610200d32591d0113386d19cf20314dcbf680611 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jul 2019 12:58:04 -0300 Subject: Fix minor issue with Lua --- npc/003-2/lua.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/003-2/lua.txt b/npc/003-2/lua.txt index 696261e2d..1388d8c1f 100644 --- a/npc/003-2/lua.txt +++ b/npc/003-2/lua.txt @@ -218,7 +218,7 @@ L_Task: mes l("There are some sailors near the forge. Think outside the box - or rather, inside it, unless you have a fortune to buy the items."); mes ""; } - if (CRAFTQUEST || MPQUEST) { + if (!(CRAFTQUEST || MPQUEST)) { mes lg("To register as a craftswoman, you need to talk to Intense Beard in Terranite Forge. The forge is in the Bazar.", "To register as a craftsman, you need to talk to Intense Beard in Terranite Forge. The forge is in the Bazar."); mes l("To register as a hunter, talk to Aidan, also in the marketplace - the Bazar."); mesc l("You can, and @@, register on both programs, but only one is required for this quest.", b("SHOULD")); -- cgit v1.2.3-70-g09d2 From aea3099eb95f7cac7a97b34c9b19ad2006007abf Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 23 Jul 2019 13:07:00 -0300 Subject: Add range to wands, and reduce attack 2 --- db/re/item_db.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 9d6724faf..f3aacf0c3 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -13157,6 +13157,7 @@ item_db: ( Weight: 158 Atk: 0 Matk: 140 + Range: 8 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 20 @@ -13179,6 +13180,7 @@ item_db: ( } ViewSprite: 7000 Script: <" + bonus bAttack2,-100; bonus bMaxSP,10; bonus bSPrecovRate,20; "> @@ -13193,6 +13195,7 @@ item_db: ( Weight: 158 Atk: 0 Matk: 280 + Range: 8 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 40 @@ -13215,6 +13218,7 @@ item_db: ( } ViewSprite: 7001 Script: <" + bonus bAttack2,-150; bonus bMaxSP,20; bonus bSPrecovRate,20; "> @@ -13229,6 +13233,7 @@ item_db: ( Weight: 158 Atk: 0 Matk: 420 + Range: 8 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 60 @@ -13251,6 +13256,7 @@ item_db: ( } ViewSprite: 7002 Script: <" + bonus bAttack2,-200; bonus bMaxSP,30; bonus bSPrecovRate,20; "> @@ -13265,6 +13271,7 @@ item_db: ( Weight: 158 Atk: 0 Matk: 576 + Range: 8 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 80 @@ -13287,6 +13294,7 @@ item_db: ( } ViewSprite: 7003 Script: <" + bonus bAttack2,-250; bonus bMaxSP,40; bonus bSPrecovRate,20; "> @@ -13301,6 +13309,7 @@ item_db: ( Weight: 158 Atk: 0 Matk: 740 + Range: 8 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 100 @@ -13323,6 +13332,7 @@ item_db: ( } ViewSprite: 7004 Script: <" + bonus bAttack2,-300; bonus bMaxSP,50; bonus bSPrecovRate,20; "> @@ -13337,6 +13347,7 @@ item_db: ( Weight: 158 Atk: 0 Matk: 370 + Range: 9 Loc: "EQP_HAND_R" WeaponLv: 1 EquipLv: 50 @@ -13359,6 +13370,7 @@ item_db: ( } ViewSprite: 7005 Script: <" + bonus bAttack2,-125; bonus bMaxSP,25; bonus bSPrecovRate,20; "> -- cgit v1.2.3-70-g09d2