diff options
author | Jesusalva Jesusalva <jesusalva@tmw2.org> | 2025-01-11 22:20:43 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@tmw2.org> | 2025-01-11 22:20:43 +0000 |
commit | e0e7f91404d0f69cc2e16f32086764b5b5abd176 (patch) | |
tree | 9ba6e170a977b9fdda666e17005d681afe2a9398 | |
parent | 9503ceb6dd3b7c1959f611994aac3082fd937c68 (diff) | |
download | serverdata-e0e7f91404d0f69cc2e16f32086764b5b5abd176.tar.gz serverdata-e0e7f91404d0f69cc2e16f32086764b5b5abd176.tar.bz2 serverdata-e0e7f91404d0f69cc2e16f32086764b5b5abd176.tar.xz serverdata-e0e7f91404d0f69cc2e16f32086764b5b5abd176.zip |
Transmigration Loopcasting (User Control Panel option)
<ThinkSome> "I was already thinking about this for ML's transmutation... basically to cast a spell while sitting and it does its thing as long as you are sitting and still have mana."
* As you prefer... but it is clumsy
* Remove leftover labal and fall-through mark.
* It makes no difference for me
* Why not flip this instead of having a negation?
* Applied 2 suggestions from the MR body.
* Transmigration Loopcasting (User Control Panel option)
****
Co-authored-by: Fedja Beader <fedja@protonmail.ch>
Reviewed-by: Jesusalva Jesusalva <jesusalva@tmw2.org>
-rw-r--r-- | npc/commands/ucp.txt | 20 | ||||
-rw-r--r-- | npc/magic/transmigration.txt | 26 |
2 files changed, 40 insertions, 6 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt index d702cbf0b..d611c729a 100644 --- a/npc/commands/ucp.txt +++ b/npc/commands/ucp.txt @@ -254,6 +254,15 @@ function script UserCtrlPanel { mes l("Others scrying you: ") + col(l("Allowed"), 2); + // GSET_LOOPCAST + // Should transmigration keep transmuting continuously? + if (getskilllv(TMW2_TRANSMIGRATION)) { + if (GSET_LOOPCAST) + mes l("Transmigration Loopcast: ") + col(l("Enabled"), 2); + else + mes l("Transmigration Loopcast: ") + col(l("Disabled"), 1); + } + if ($EVENT$ == "Valentine") { // GSET_VALENTINE_EATONE // Eat all Chocolate Boxes from Valentine Day event @@ -300,8 +309,9 @@ function script UserCtrlPanel { l("Change crafting method"), l("Show Tutorial Protips"), l("Others scrying your char data"), - rif($EVENT$ == "Valentine", ("Valentine Eating")), - rif($EVENT$ == "Tower", ("Dream Tower Tickets")), + rif(getskilllv(TMW2_TRANSMIGRATION), l("Trans. Loopcasting")), + rif($EVENT$ == "Valentine", l("Valentine Eating")), + rif($EVENT$ == "Tower", l("Dream Tower Tickets")), rif(strcharinfo(2) == "Monster King", ("Toggle Autoreceive Event Coins")); mes ""; @@ -346,8 +356,10 @@ function script UserCtrlPanel { case 10: GSET_NOSCRY=!GSET_NOSCRY; break; case 11: - GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break; + GSET_LOOPCAST=!GSET_LOOPCAST; break; case 12: + GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break; + case 13: if (instance_id() >= 0) { mesc l("This setting cannot be changed in this map."); break; @@ -361,7 +373,7 @@ function script UserCtrlPanel { GSET_TOWER_TICKETS=limit(0, GSET_TOWER_TICKETS, .@max); } break; - case 13: + case 14: GSET_AUTORECEIVE_COINS=!GSET_AUTORECEIVE_COINS; break; } clear; diff --git a/npc/magic/transmigration.txt b/npc/magic/transmigration.txt index e9ed9d462..8d19425a5 100644 --- a/npc/magic/transmigration.txt +++ b/npc/magic/transmigration.txt @@ -36,7 +36,8 @@ OnCall: rif(.@q >= 9, l("Downgrade Snake Tongue")), SnakeTongue, rif(.@q >= 7, l("Downgrade Scorpion Stinger")), ScorpionStinger, rif(.@q >= 7, l("Downgrade Scorpion Claw")), ScorpionClaw, - l("Downgrade Ore"), IronOre; + l("Downgrade Ore"), IronOre, + l("%s Loopcasting", (GSET_LOOPCAST ? l("Disable") : l("Enable"))), 9999; // 9999 cheat code mes ""; @menuret = (@menuret == WoodenLog ? 9901 : @menuret); @@ -45,6 +46,10 @@ OnCall: // Requeriments listing switch (@menuret) { + case 9999: // Setting + GSET_LOOPCAST=!GSET_LOOPCAST; + closeclientdialog; + close; case CrazyRum: mesc l("* @@/@@ @@", countitem(Plushroom), 18, getitemlink(Plushroom)); mesc l("* @@/@@ @@", countitem(Milk), 5, getitemlink(Milk)); @@ -138,6 +143,7 @@ OnCall: // Close the dialog closeclientdialog; +OnActualCast: // Check and Consume the reagents switch (@menuret) { case CrazyRum: @@ -348,7 +354,23 @@ OnCall: // Get a few mana experience points (this is NOT used by Mana Stone) GetManaExp(TMW2_TRANSMIGRATION, rand2(4,9)); - end; + + // If Loop-Casting is enabled, repeat, otherwise, stop + if (!GSET_LOOPCAST) + end; + + sleep2(6+1); // Cooldown for this skill is 6 seconds (fixed) + // Check cooldown + if (@mkpot_at > gettimetick(2)) { + dispbottom l("Loop casting interrupted by manual cast."); + end; + } + // Setup data + @menuret = @transmemo; + @menuret = (@menuret == WoodenLog ? 9901 : @menuret); + .@itemid=(@menuret == 9901 ? Coal : @menuret); + dispbottom l("Loop Casting: %s", getitemname(.@itemid)); + goto OnActualCast; OnInit: bindatcmd "sk-trans", "sk#mkpot::OnCall", 0, 100, 0; |