diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-10-29 17:54:37 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-10-29 17:54:37 -0300 |
commit | 6259cdc638dd466dda3d423fbd0d8f79724e14bd (patch) | |
tree | 0237ecbc6115a1563dbaaa0312ec8ff48a122701 | |
parent | 5176180880f1a18f45dd0a7f9b2fb9a761dbff94 (diff) | |
download | serverdata-6259cdc638dd466dda3d423fbd0d8f79724e14bd.tar.gz serverdata-6259cdc638dd466dda3d423fbd0d8f79724e14bd.tar.bz2 serverdata-6259cdc638dd466dda3d423fbd0d8f79724e14bd.tar.xz serverdata-6259cdc638dd466dda3d423fbd0d8f79724e14bd.zip |
You can now use multiple Dream Tickets per Dream Tower floor (max 10).
Using more tickets makes it slightly harder and increase rewards.
(Dream Tickets are also now tradeable)
-rw-r--r-- | npc/commands/ucp.txt | 27 | ||||
-rw-r--r-- | npc/functions/event.txt | 39 | ||||
-rw-r--r-- | npc/functions/soul_menhir.txt | 1 |
3 files changed, 50 insertions, 17 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt index c4cf2a054..179239211 100644 --- a/npc/commands/ucp.txt +++ b/npc/commands/ucp.txt @@ -264,6 +264,16 @@ function script UserCtrlPanel { } + if ($EVENT$ == "Tower") { + // GSET_TOWER_TICKETS + // How many tickets use at Dream Towers + if (GSET_TOWER_TICKETS < 1) + mes l("[Dream Towers] Tickets per trip: ") + col(l("One"), 2); + else + mes l("[Dream Towers] Tickets per trip: ") + col(GSET_TOWER_TICKETS, 1); + } + + if (strcharinfo(2) == "Monster King") { // GSET_AUTORECEIVE_COINS // Enables/Disable autoreceive strange coins @@ -291,6 +301,7 @@ function script UserCtrlPanel { l("Show Tutorial Protips"), l("Others scrying your char data"), rif($EVENT$ == "Valentine", ("Valentine Eating")), + rif($EVENT$ == "Tower", ("Dream Tower Tickets")), rif(strcharinfo(2) == "Monster King", ("Toggle Autoreceive Event Coins")); mes ""; @@ -321,7 +332,7 @@ function script UserCtrlPanel { .@max=(is_sponsor() ? 25 : 10); mesc l("How many to brew? (%d-%d)", 0, .@max); input(GSET_FIXED_ALCHEMY, 0, .@max); - GSET_FIXED_ALCHEMY=limit(0, GSET_FIXED_ALCHEMY, 10); + GSET_FIXED_ALCHEMY=limit(0, GSET_FIXED_ALCHEMY, .@max); } break; case 6: @@ -337,6 +348,20 @@ function script UserCtrlPanel { case 11: GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break; case 12: + if (instance_id() >= 0) { + mesc l("This setting cannot be changed in this map."); + break; + } + if (GSET_TOWER_TICKETS) { + GSET_TOWER_TICKETS=0; + } else { + .@max=10; //(QUIRINO_WINNER ? 15 : 10); + mesc l("How many tickets to use? (%d-%d)", 1, .@max); + input(GSET_TOWER_TICKETS, 0, .@max); + GSET_TOWER_TICKETS=limit(0, GSET_TOWER_TICKETS, .@max); + } + break; + case 13: GSET_AUTORECEIVE_COINS=!GSET_AUTORECEIVE_COINS; break; } clear; diff --git a/npc/functions/event.txt b/npc/functions/event.txt index adf310c57..96525148a 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -73,6 +73,9 @@ OnWarpTo: if ($EVENT$ != "Tower") end; if (!playerattached()) end; if (!countitem(EventDreamTicket)) end; + .@tickets = max(1, GSET_TOWER_TICKETS); + if (countitem(EventDreamTicket) < .@tickets) end; + .@tickets -= 1; // Reset progress if (DTOWER_DAY != gettimeparam(GETTIME_DAYOFMONTH) || DTOWER_FLOOR < 1) { @@ -83,7 +86,10 @@ OnWarpTo: // Create maze and populate CreateMaze(IOT_CHAR, MAZE_SIZE_S | MAZE_SIZE_M); - MazeMobs(((BaseLevel/10) + DTOWER_FLOOR * 5), true, rand2(9,14)); + .@density = rand2(9,14); + if (.@tickets > rand2(10)) + .@density -= 1; + MazeMobs(((BaseLevel/10) + .@tickets + DTOWER_FLOOR * 5), true, .@density); // Spawn & Configure the boss monster .@mx=getmapinfo(MAPINFO_SIZE_X, MAZE_MAP$)-20; @@ -92,25 +98,25 @@ OnWarpTo: setunitdata(.@mob, UDT_LEVEL, DTOWER_FLOOR * 5); setunitdata(.@mob, UDT_STR, DTOWER_FLOOR * 2); setunitdata(.@mob, UDT_AGI, DTOWER_FLOOR * 2); - setunitdata(.@mob, UDT_VIT, DTOWER_FLOOR * 3); + setunitdata(.@mob, UDT_VIT, DTOWER_FLOOR * 3 + .@tickets); setunitdata(.@mob, UDT_INT, DTOWER_FLOOR * 1); - setunitdata(.@mob, UDT_DEX, DTOWER_FLOOR * 3); + setunitdata(.@mob, UDT_DEX, DTOWER_FLOOR * 3 + .@tickets); setunitdata(.@mob, UDT_LUK, DTOWER_FLOOR * 2); setunitdata(.@mob, UDT_ADELAY, max(640, 1672-(DTOWER_FLOOR * 24))); - setunitdata(.@mob, UDT_MAXHP, 2000+DTOWER_FLOOR*120); - setunitdata(.@mob, UDT_HP, 2000+DTOWER_FLOOR*120); - setunitdata(.@mob, UDT_ATKMIN, 20+DTOWER_FLOOR*4); - setunitdata(.@mob, UDT_ATKMAX, 40+DTOWER_FLOOR*4); - setunitdata(.@mob, UDT_DEF, 10+DTOWER_FLOOR*3); - setunitdata(.@mob, UDT_MDEF, 5+DTOWER_FLOOR); - setunitdata(.@mob, UDT_HIT, (BaseLevel+DTOWER_FLOOR)*32/10); + setunitdata(.@mob, UDT_MAXHP, 2000+DTOWER_FLOOR*120 + .@tickets*150); + setunitdata(.@mob, UDT_HP, 2000+DTOWER_FLOOR*120 + .@tickets*150); + setunitdata(.@mob, UDT_ATKMIN, 20+DTOWER_FLOOR*4 + .@tickets); + setunitdata(.@mob, UDT_ATKMAX, 40+DTOWER_FLOOR*4 + .@tickets); + setunitdata(.@mob, UDT_DEF, 10+DTOWER_FLOOR*3 + .@tickets); + setunitdata(.@mob, UDT_MDEF, 5+DTOWER_FLOOR + .@tickets); + setunitdata(.@mob, UDT_HIT, (BaseLevel+DTOWER_FLOOR)*32/10 + .@tickets); setunitdata(.@mob, UDT_FLEE, (BaseLevel+DTOWER_FLOOR)*24/10); - setunitdata(.@mob, UDT_CRIT, rand2(40, min(120, 40+DTOWER_FLOOR))); + setunitdata(.@mob, UDT_CRIT, rand2(40, min(120, 40+DTOWER_FLOOR)) + .@tickets); // TODO: Spawn more treasure chests? (exp, gp, items) // Consume the ticket and begin the maze - delitem EventDreamTicket, 1; - InitMaze(3600); + delitem EventDreamTicket, max(1, .@tickets+1); + InitMaze(3600 + .@tickets); dispbottom col(l("Reminder : Defeat the %s to win.", b("Gatekeeper")), 2); dispbottom l("Mana Plane - Dream Tower, %dº floor. Time limit: 60 minutes or death.", DTOWER_FLOOR); end; @@ -120,11 +126,12 @@ OnBossDie: dispbottom l("Mana Plane - Dream Tower, %dº floor %s", DTOWER_FLOOR, b(l("CLEAR!"))); DTOWER_FLOOR+=1; if ($EVENT$ == "Tower") { - if (checkweight(BrokenMedal, 1)) { - getitem BrokenMedal, 1; + .@medals = rand2(1, max(1, GSET_TOWER_TICKETS)); + if (checkweight(BrokenMedal, .@medals)) { + getitem BrokenMedal, .@medals; } else { // FIXME: Can be kept for next event, a deletion is required! - rodex_sendmail(getcharid(0), $DREAMTOWER_SAGE$, "You are fat.", "Here is the medal, anyway.", 0, BrokenMedal, 1); + rodex_sendmail(getcharid(0), $DREAMTOWER_SAGE$, "You are fat.", "Here is the medal, anyway.", 0, BrokenMedal, .@medals); } } unitskilluseid(getcharid(3), BS_GREED, 1, getcharid(3)); diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt index fa41e9d38..a1d022363 100644 --- a/npc/functions/soul_menhir.txt +++ b/npc/functions/soul_menhir.txt @@ -97,6 +97,7 @@ L_Xmas: L_Tower: if ($EVENT$ != "Tower") goto L_DontPanic; if (!countitem(EventDreamTicket)) goto L_DontPanic; + if (countitem(EventDreamTicket) < max(1, GSET_TOWER_TICKETS)) goto L_DontPanic; doevent "sDreamTower::OnWarpTo"; close; |