diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-10-29 00:52:45 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-10-29 00:52:45 -0300 |
commit | 2d9e66251582b95764e81e40a27c4d4e0454f3e4 (patch) | |
tree | 18706b4deead977388ec68f50057bf2636921490 /npc | |
parent | 73c28414416070895e4558f629d26bc6344ad999 (diff) | |
download | serverdata-2d9e66251582b95764e81e40a27c4d4e0454f3e4.tar.gz serverdata-2d9e66251582b95764e81e40a27c4d4e0454f3e4.tar.bz2 serverdata-2d9e66251582b95764e81e40a27c4d4e0454f3e4.tar.xz serverdata-2d9e66251582b95764e81e40a27c4d4e0454f3e4.zip |
This is the EXPERIMENTAL version of allowing Carts to players.
As well as its most important restrictions.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/003-1-1/yetiking.txt | 9 | ||||
-rw-r--r-- | npc/003-1/quirino.txt | 1 | ||||
-rw-r--r-- | npc/014-2-2/gemini.txt | 10 | ||||
-rw-r--r-- | npc/014-2-2/valia.txt | 1 | ||||
-rw-r--r-- | npc/017-1/drowned_man.txt | 6 | ||||
-rw-r--r-- | npc/017-3/dimonds.txt | 46 | ||||
-rw-r--r-- | npc/018-2-1/warps.txt | 4 | ||||
-rw-r--r-- | npc/024-16/king.txt | 5 | ||||
-rw-r--r-- | npc/042-0/arthur.txt | 6 | ||||
-rw-r--r-- | npc/functions/hub.txt | 6 |
10 files changed, 91 insertions, 3 deletions
diff --git a/npc/003-1-1/yetiking.txt b/npc/003-1-1/yetiking.txt index 55d2d893e..0b54d4e4e 100644 --- a/npc/003-1-1/yetiking.txt +++ b/npc/003-1-1/yetiking.txt @@ -150,7 +150,16 @@ OnWarper: mesc l("Warp to the Cave Of Trials?"); mesc l("There is no EXP penalty, but you cannot go back without either completing the cave, or dying."); mesc l("If you die, you'll need to start over everything again!"); + if (countitem(RentCart)) + mesc l("* The cart will be destroyed if you warp."), 1; if (askyesno() == ASK_YES) { + // Disable the cart + if (isequipped(RentCart)) { + unequipbyid(RentCart); + setcart 0; + delitem RentCart, countitem(RentCart); + dispbottom l("The %s was destroyed!", getitemlink(RentCart)); + } setq HurnscaldQuest_Celestia, 2; // This is a fix warp "001-6", 27, 180; } diff --git a/npc/003-1/quirino.txt b/npc/003-1/quirino.txt index 2e78ebd36..09cccd320 100644 --- a/npc/003-1/quirino.txt +++ b/npc/003-1/quirino.txt @@ -129,6 +129,7 @@ L_SignUp: // Prevent further movements! setpcblock(PCBLOCK_SOFT, true); + setcart 0; // Kinda redundant, as we took cart contents in consideration. //dispbottom l("Stay ready!"); dispbottom l("##1DON'T MOVE until the signal. Stay ready! If you move, you will desync the client!"); close; diff --git a/npc/014-2-2/gemini.txt b/npc/014-2-2/gemini.txt index 06a4dd518..54d404cf9 100644 --- a/npc/014-2-2/gemini.txt +++ b/npc/014-2-2/gemini.txt @@ -14,6 +14,16 @@ OnCoreInit: warp "014-2-2", 36, 24; end; } + // Disable the cart + if (isequipped(RentCart)) { + unequipbyid(RentCart); + setcart 0; + } + // Remove the cart + if (countitem(RentCart)) { + delitem RentCart, countitem(RentCart); + dispbottom l("The %s was destroyed!", getitemlink(RentCart)); + } .@p = getcharid(1); instance_attach($@VALIA_INST[.@p]); @mystatus = 0; diff --git a/npc/014-2-2/valia.txt b/npc/014-2-2/valia.txt index e74ad5dab..8009b1ab4 100644 --- a/npc/014-2-2/valia.txt +++ b/npc/014-2-2/valia.txt @@ -125,6 +125,7 @@ function script GeminiKill { } // Alright. mesq l("Good. I hope you have stocked everything. The time limit is 4 hours."); + mesc l("* All party members' carts will be destroyed if you warp."), 1; // Only first attempt is free - all others are charged if ($EVENT$ != "Gemini" || diff --git a/npc/017-1/drowned_man.txt b/npc/017-1/drowned_man.txt index 96046123e..4cb2ece1d 100644 --- a/npc/017-1/drowned_man.txt +++ b/npc/017-1/drowned_man.txt @@ -126,6 +126,12 @@ OnInit: L_GoodJump: dispbottom l("You jump in deep waters."); + // In some cases, you simply cannot jump + if (countitem(RentCart)) { + dispbottom l("However, the cart smashes over your head. A fatal blow."); + die(); + end; + } // You can only carry exact 2kg with full health. // Weight will be 2000g - so penalty will be 100% HP. .@penalty=max(0, (Weight/20)-1); diff --git a/npc/017-3/dimonds.txt b/npc/017-3/dimonds.txt index f324134de..1252f1642 100644 --- a/npc/017-3/dimonds.txt +++ b/npc/017-3/dimonds.txt @@ -97,16 +97,58 @@ OnInit: 017-3,35,35,0 script Shannon NPC_LOF_NOBLEMAN,{ showavatar NPC_LOF_NOBLEMAN; + if (EPISODE_WINNER && HEROESHOLD_WINNER && REBIRTH && !countitem(RentCart) && (TELEPORTERS & TP_LILIT)) + goto L_Cart; + // Meaningless babbler, mostly. mesn; - mesq l("I'm a traveling poet and admirer of Robert Burns, a bard from the mana world."); + mesq l("I'm a traveling poet, businessman and admirer of Robert Burns, a bard from the mana world."); // FIXME: Robert Burns is from Scotland, not TMW... next; mesn; mesq l("I wonder if he exists on this world too. Because if he doesn't, I could tell many tales about him!"); close; -L_Close: + +L_Cart: + mesn; + mesq l("Hey, you got recommendations from both Dustman and the Doctor, and I can see you're clearly more powerful than you look."); + next; + mesn; + mesq l("As such, I offer to rent you a %s. Keep in mind several places do not accept you to come with it, including the Magic Academy east of here, but it allows you to carry more loot with you from the dungeons.", getitemlink(RentCart)); + next; + // FALLTHROUGH + +// There's a command shortcut for this, which is unlocked after you acquire +// Shannon's trust +OnCall: + if (!EPISODE_WINNER || !HEROESHOLD_WINNER || !REBIRTH || countitem(RentCart)) + end; + .@map$ = getmap(); + if (.@map$ != "017-3" && !(FLAGS & FLAG_SHANNONTRUST)) + end; + // Attempt to bypass Lilit's quest restrictions? Unacceptable. + if (!(TELEPORTERS & TP_LILIT)) + end; + // Other restricted maps... Blanket-style rule, though. + if (instance_id() >= 0 || compare(.@map$,"001-") || compare(.@map$,"soren") || + compare(.@map$,"006-") || compare(.@map$,"016-") || + compare(.@map$,"018-5") || compare(.@map$,"032-")) { + dispbottom l("Shannon cannot reach you where you are."); + end; + } + mesn; + mesq l("I'm charging you %s GP per hour, with a limit of %d hours. The cart is mine, and it won't do if you run away with it. So, for how many hours you want?", fnum(500), 12); + input .@input, 0, 12; + if (.@input < 1 || Zeny < (.@input * 500)) close; + inventoryplace RentCart, 1; + FLAGS=FLAGS | FLAG_SHANNONTRUST; + Zeny-=@input * 500; + rentitem RentCart, .@input * 3600; + mesn; + mesq l("Here you go! You can use %s if you ever need my company services in the future.", b("@rentcart")); + tutmes l("Press the 'C' button in inventory screen to open your cart. The cart must be equipped first."); close; OnInit: + bindatcmd "rentcart", "Shannon::OnCall", 0, 80, 0; .sex=G_MALE; .distance=5; end; diff --git a/npc/018-2-1/warps.txt b/npc/018-2-1/warps.txt index 876eaaed9..fb4b44156 100644 --- a/npc/018-2-1/warps.txt +++ b/npc/018-2-1/warps.txt @@ -42,6 +42,8 @@ OnTouch: mes l("This is only for the skilled players. Newbies, KEEP OUT!"); mes l("Time Limit: 25 minutes on any dungeon."); mes l("Please select target dungeon:"); + if (.@q & HH_EXPERT && countitem(RentCart)) + mesc l("You cannot access Master+ Dungeons with a Cart."), 1; mes ""; select l("Sorry, I am a newbie."), @@ -49,7 +51,7 @@ OnTouch: rif(.@q & HH_NOVICE, l("Intermediary Dungeon (Lv 60+)")), // Level 21-60 rif(.@q & HH_INTERMEDIARY, l("Advanced Dungeon (Lv 80+)")), // Level 41-80 rif(.@q & HH_ADVANCED, l("Expert Dungeon (Lv 100+)")), // Level 61-100 - rif(.@q & HH_EXPERT, l("Master Dungeon (BOSS)")), // Boss Only + rif(.@q & HH_EXPERT && !countitem(RentCart), l("Master Dungeon (BOSS)")), // Boss Only - Cart disallowed l("Heroes Hold - Exchange Hall"), l("Information"); mes ""; diff --git a/npc/024-16/king.txt b/npc/024-16/king.txt index 4790b7f96..29dd9d565 100644 --- a/npc/024-16/king.txt +++ b/npc/024-16/king.txt @@ -13,6 +13,11 @@ slide 30, 52; end; } + if (countitem(RentCart)) { + mesc l("You cannot met the King while using a %s.", getitemlink(RentCart)), 1; + close; + } + setcart 0; if (.@q >= 17) goto L_Complete; if (.@q == 16) diff --git a/npc/042-0/arthur.txt b/npc/042-0/arthur.txt index da0262211..452861612 100644 --- a/npc/042-0/arthur.txt +++ b/npc/042-0/arthur.txt @@ -321,6 +321,12 @@ OnInstanceInit: OnTouch: .@g=getcharid(2); + // Cart Restriction + if (countitem(RentCart)) { + dispbottom l("I cannot enter Kamelot with a cart."); + end; + } + // Quest already finished. if ($KAMELOT_QUEST[.@g] & 64) { dispbottom l("I should talk to King Arthur."); diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 888489912..c4870262e 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -23,6 +23,12 @@ function script HUB_Login { if (CHAREG_CLEANUP < gettimetick(2)-PVP_WAITTIME) deletearray PVP_COOLDOWN; + // Cart System double-check + if (!isequipped(RentCart)) + setcart 0; + else + setcart 1; + // Mirror Lake functionality if (getvaultid() && !getstatus(SC_JAILED)) { // Christmas 2021 |