summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--conf/map/maps.conf3
-rw-r--r--db/constants.conf9
-rw-r--r--db/map_index.txt393
-rw-r--r--db/re/item_db.conf60
-rw-r--r--db/re/skill_db.conf41
-rw-r--r--db/re/skill_tree.conf1
-rw-r--r--maps/re/006-2-2.mcachebin112 -> 102 bytes
-rw-r--r--maps/re/006-2-3.mcachebin212 -> 206 bytes
-rw-r--r--maps/re/006-2-4.mcachebin0 -> 74 bytes
-rw-r--r--maps/re/006-2-5.mcachebin0 -> 92 bytes
-rw-r--r--maps/re/006-2-6.mcachebin0 -> 97 bytes
-rw-r--r--npc/000-1/exit.txt2
-rw-r--r--npc/001-7/celestia_bossfight.txt66
-rw-r--r--npc/003-1-1/yetiking.txt2
-rw-r--r--npc/003-1/sewer.txt8
-rw-r--r--npc/005-1-1/main.txt6
-rw-r--r--npc/006-2-1/camilot.txt54
-rw-r--r--npc/006-2-1/chirp.txt15
-rw-r--r--npc/006-2-1/jenny.txt41
-rw-r--r--npc/006-2-1/lune.txt90
-rw-r--r--npc/006-2-1/plum.txt24
-rw-r--r--npc/006-2-2/_warps.txt2
-rw-r--r--npc/006-2-3/_mobs.txt8
-rw-r--r--npc/006-2-3/_warps.txt4
-rw-r--r--npc/006-2-4/_import.txt4
-rw-r--r--npc/006-2-4/_mobs.txt3
-rw-r--r--npc/006-2-4/_warps.txt3
-rw-r--r--npc/006-2-5/_import.txt4
-rw-r--r--npc/006-2-5/_mobs.txt4
-rw-r--r--npc/006-2-5/_warps.txt5
-rw-r--r--npc/006-2-6/_import.txt4
-rw-r--r--npc/006-2-6/_mobs.txt4
-rw-r--r--npc/006-2-6/_warps.txt3
-rw-r--r--npc/006-2/_warps.txt1
-rw-r--r--npc/012-1/guards.txt4
-rw-r--r--npc/012-7/celestia.txt92
-rw-r--r--npc/014-4/slide.txt7
-rw-r--r--npc/016-1/captain.txt2
-rw-r--r--npc/018-5-4/elder.txt26
-rw-r--r--npc/027-3/_import.txt1
-rw-r--r--npc/027-3/angel.txt111
-rw-r--r--npc/029-0/event.txt43
-rw-r--r--npc/_import.txt3
-rw-r--r--npc/commands/discord.txt5
-rw-r--r--npc/functions/bitwise.txt54
-rw-r--r--npc/functions/hub.txt86
-rw-r--r--npc/functions/politics.txt27
-rw-r--r--npc/functions/util.txt2
-rw-r--r--npc/functions/vault.txt23
-rw-r--r--npc/soren-2/main.txt20
51 files changed, 1084 insertions, 290 deletions
diff --git a/README.md b/README.md
index 1a59cd000..97a2e7a33 100644
--- a/README.md
+++ b/README.md
@@ -21,5 +21,5 @@ If you do not have memory to spare, you can use `make new`, and it'll make a lig
build. However, shall any problem happen with Evol engine, you will most likely
be on the dark.
-It will output an "OK" at the end, if everything ran fine. For support head to [#tmw2-dev](http://webchat.freenode.net/?channels=#tmw2-dev)
-Freenode IRC channel.
+It will output an "OK" at the end, if everything ran fine. For support head to [#tmw2-dev](http://web.libera.chat/?channels=#tmw2-dev)
+Libera Chat IRC channel.
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 18d7c6c7b..0b6f710bc 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -61,6 +61,9 @@ map_list: (
"006-2-1",
"006-2-2",
"006-2-3",
+ "006-2-4",
+ "006-2-5",
+ "006-2-6",
"006-2",
"006-3",
"006-4-1",
diff --git a/db/constants.conf b/db/constants.conf
index b103b5f5e..b3dbbc723 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -2191,6 +2191,15 @@ constants_db: {
HCD_MKBASEMENT: 8
HCD_MARKET: 10
+ comment__: "Mirror Lake Server Identifiers"
+ WORLD_ID: 1
+ MLP_TMW: 3
+
+ comment__: "Mirror Lake Quest Constants"
+ MLP_TMW_CELESTIA: 1
+ MLP_TMW_YETIKING: 2
+ //MLP_................ 4
+
comment__: "Being actions"
ACTION_STAND: 0
ACTION_MOVE: 1
diff --git a/db/map_index.txt b/db/map_index.txt
index 57250f993..154e3a6b1 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -58,198 +58,201 @@
006-2-1 58
006-2-2 59
006-2-3 60
-006-2 61
-006-3 62
-006-4-1 63
-006-4 64
-006-5 65
-007-1 66
-007-2 67
-008-0 68
-008-1 69
-008-2 70
-009-1 71
-009-2 72
-009-3 73
-009-4 74
-009-5 75
-009-6 76
-009-7 77
-010-1-1 78
-010-1 79
-010-2 80
-011-1 81
-011-2 82
-011-3 83
-012-1 84
-012-2 85
-012-3 86
-012-4 87
-012-5 88
-012-6 89
-012-7 90
-012-8 91
-013-1 92
-014-1 93
-014-2-1 94
-014-2 95
-014-3 96
-014-4 97
-014-5-1 98
-014-5 99
-015-1 100
-015-2 101
-015-3 102
-015-4 103
-015-5 104
-015-6 105
-015-7 106
-015-8-1 107
-015-8 108
-016-1 109
-016-6 110
-016-7 111
-017-0 112
-017-1 113
-017-10 114
-017-2-1 115
-017-2-2 116
-017-2 117
-017-3 118
-017-4 119
-017-5 120
-017-6 121
-017-7 122
-017-8 123
-018-1-1 124
-018-1 125
-018-2-1 126
-018-2-2 127
-018-2-3 128
-018-2-4 129
-018-2-5 130
-018-2-6 131
-018-2-7 132
-018-2-8 133
-018-2 134
-018-3 135
-018-4-1 136
-018-4-2 137
-018-4 138
-018-5-0 139
-018-5-1 140
-018-5-2 141
-018-5-3 142
-018-5-4 143
-018-5-5 144
-018-5-boss 145
-018-5 146
-018-6-0 147
-018-6-1 148
-018-6-2 149
-018-6-3 150
-018-7-1 151
-018-7 152
-019-1-1 153
-019-1 154
-019-2 155
-019-3 156
-019-4-1 157
-019-4 158
-020-1 159
-020-2 160
-020-3 161
-020-4 162
-020-5 163
-020-6 164
-020-7-1 165
-020-7-2 166
-020-7 167
-021-0 168
-021-1 169
-021-2 170
-021-3 171
-021-4 172
-022-1 173
-023-1 174
-023-2 175
-023-3-1 176
-023-3-2 177
-023-3 178
-024-1 179
-024-10 180
-024-11 181
-024-12 182
-024-13 183
-024-14 184
-024-15 185
-024-16 186
-024-2 187
-024-3 188
-024-4 189
-024-5 190
-024-6 191
-024-7 192
-024-8 193
-024-9 194
-025-1 195
-025-2-1 196
-025-2-2 197
-025-2-3 198
-025-2-4 199
-025-2 200
-025-3 201
-026-0 202
-026-1 203
-026-2 204
-027-0 205
-027-1 206
-027-2 207
-027-3 208
-027-4 209
-029-0 210
-029-1 211
-029-2 212
-029-3 213
-029-4 214
-029-5 215
-029-6 216
-029-7 217
-029-8 218
-029-9 219
-042-0 220
-042-1 221
-042-10 222
-042-11 223
-042-2 224
-042-3 225
-042-4 226
-042-5 227
-042-6 228
-042-7 229
-042-8 230
-042-9 231
-boss 232
-botcheck 233
-guilds 234
-maze0 235
-maze1 236
-maze10 237
-maze11 238
-maze12 239
-maze13 240
-maze14 241
-maze15 242
-maze2 243
-maze3 244
-maze4 245
-maze5 246
-maze6 247
-maze7 248
-maze8 249
-maze9 250
-sec_pri 251
-soren-2 252
-soren 253
-test 254
-testbg 255
+006-2-4 61
+006-2-5 62
+006-2-6 63
+006-2 64
+006-3 65
+006-4-1 66
+006-4 67
+006-5 68
+007-1 69
+007-2 70
+008-0 71
+008-1 72
+008-2 73
+009-1 74
+009-2 75
+009-3 76
+009-4 77
+009-5 78
+009-6 79
+009-7 80
+010-1-1 81
+010-1 82
+010-2 83
+011-1 84
+011-2 85
+011-3 86
+012-1 87
+012-2 88
+012-3 89
+012-4 90
+012-5 91
+012-6 92
+012-7 93
+012-8 94
+013-1 95
+014-1 96
+014-2-1 97
+014-2 98
+014-3 99
+014-4 100
+014-5-1 101
+014-5 102
+015-1 103
+015-2 104
+015-3 105
+015-4 106
+015-5 107
+015-6 108
+015-7 109
+015-8-1 110
+015-8 111
+016-1 112
+016-6 113
+016-7 114
+017-0 115
+017-1 116
+017-10 117
+017-2-1 118
+017-2-2 119
+017-2 120
+017-3 121
+017-4 122
+017-5 123
+017-6 124
+017-7 125
+017-8 126
+018-1-1 127
+018-1 128
+018-2-1 129
+018-2-2 130
+018-2-3 131
+018-2-4 132
+018-2-5 133
+018-2-6 134
+018-2-7 135
+018-2-8 136
+018-2 137
+018-3 138
+018-4-1 139
+018-4-2 140
+018-4 141
+018-5-0 142
+018-5-1 143
+018-5-2 144
+018-5-3 145
+018-5-4 146
+018-5-5 147
+018-5-boss 148
+018-5 149
+018-6-0 150
+018-6-1 151
+018-6-2 152
+018-6-3 153
+018-7-1 154
+018-7 155
+019-1-1 156
+019-1 157
+019-2 158
+019-3 159
+019-4-1 160
+019-4 161
+020-1 162
+020-2 163
+020-3 164
+020-4 165
+020-5 166
+020-6 167
+020-7-1 168
+020-7-2 169
+020-7 170
+021-0 171
+021-1 172
+021-2 173
+021-3 174
+021-4 175
+022-1 176
+023-1 177
+023-2 178
+023-3-1 179
+023-3-2 180
+023-3 181
+024-1 182
+024-10 183
+024-11 184
+024-12 185
+024-13 186
+024-14 187
+024-15 188
+024-16 189
+024-2 190
+024-3 191
+024-4 192
+024-5 193
+024-6 194
+024-7 195
+024-8 196
+024-9 197
+025-1 198
+025-2-1 199
+025-2-2 200
+025-2-3 201
+025-2-4 202
+025-2 203
+025-3 204
+026-0 205
+026-1 206
+026-2 207
+027-0 208
+027-1 209
+027-2 210
+027-3 211
+027-4 212
+029-0 213
+029-1 214
+029-2 215
+029-3 216
+029-4 217
+029-5 218
+029-6 219
+029-7 220
+029-8 221
+029-9 222
+042-0 223
+042-1 224
+042-10 225
+042-11 226
+042-2 227
+042-3 228
+042-4 229
+042-5 230
+042-6 231
+042-7 232
+042-8 233
+042-9 234
+boss 235
+botcheck 236
+guilds 237
+maze0 238
+maze1 239
+maze10 240
+maze11 241
+maze12 242
+maze13 243
+maze14 244
+maze15 245
+maze2 246
+maze3 247
+maze4 248
+maze5 249
+maze6 250
+maze7 251
+maze8 252
+maze9 253
+sec_pri 254
+soren-2 255
+soren 256
+test 257
+testbg 258
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index cfc7180ba..f5f830530 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -6340,10 +6340,13 @@ item_db: (
EquipLv: 50
Refine: false
Script: <"
- skill TMW2_DUCKY,1;
+ skill TMW2_DUCKY, cap_value(0, 10, 1+REBIRTH*2);
bonus bAllStats,5;
- bonus bMaxHP,-25;
- bonus bMaxSPrate,-20;
+ bonus bHPrecovRate,-50;
+ bonus bDefRate,-50;
+ bonus bDef2Rate,-50;
+ bonus bMaxSPrate,-35;
+ bonus bFleeRate,-15;
">
},
@@ -7374,6 +7377,57 @@ item_db: (
addtoskill(TMW2_SPEECH, 1, 2);
">
},
+{
+ Id: 1340
+ AegisName: "MirrorLakeArmor"
+ Name: "Mirror Lake Armor"
+ Type: "IT_ARMOR"
+ Buy: 0
+ Sell: 0
+ Weight: 0
+ Def: 0
+ Loc: "EQP_HEAD_MID"
+ EquipLv: 0
+ Refine: false
+ AllowPickup: false
+ Trade: {
+ nodrop: true
+ notrade: true
+ partneroverride: false
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <"
+ .@slv = callfunc("get_byte", ##00_INFO, 0) + 1;
+
+ // Bonus
+ bonus bMaxHP, 400+.@slv*80;
+ bonus bMaxSP, .@slv*20;
+ bonus bAllStats, .@slv*5;
+ bonus bDef2, .@slv*10;
+ bonus bDef, 55+.@slv*7;
+ bonus bFlee, .@slv*10;
+ bonus bHitRate, .@slv*10;
+ bonus bAddMaxWeight, .@slv*25;
+
+ // Penalties
+ bonus bBaseAtk,-300;
+ bonus bCriticalRate,-100;
+ bonus bCastrate, -500;
+ bonus bDelayrate, 50;
+
+ // Neutral
+ bonus bAtkEle, Ele_Ghost;
+ bonus bDefEle, Ele_Ghost;
+ bonus bUnstripableArmor, 1340;
+ bonus bUnbreakableArmor, 1340;
+ ">
+ OnUnequipScript: <" equip(1340); ">
+},
// Boots
{
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 8b08621f9..609039aca 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -40342,6 +40342,47 @@ skill_db: (
}
}*/
},
+{
+ Id: 20076
+ Name: "TMW2_STUNNINGSTRIKE"
+ Description: "Stunning Strike"
+ MaxLevel: 10
+ Range: 2
+ SkillType: {
+ Enemy: true
+ }
+ SkillInfo: {
+ Quest: true
+ }
+ Hit: "BDT_SKILL"
+ AttackType: "Weapon"
+ Element: "Ele_Neutral"
+ DamageType: {
+ NoDamage: true
+ }
+ InterruptCast: true
+ CoolDown: {
+ Lv1: 7000
+ Lv2: 6000
+ Lv3: 5000
+ Lv4: 4000
+ Lv5: 3000
+ Lv6: 2500
+ Lv7: 2000
+ Lv8: 1500
+ Lv9: 1000
+ Lv10: 500
+ }
+ CastTime: 225
+ FixedCastTime: 100
+ AfterCastActDelay: 225
+ Requirements: {
+ SPCost: 120
+ WeaponTypes: {
+ NoWeapon: true
+ }
+ }
+},
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index 072850f53..1ffa2296a 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -109,6 +109,7 @@ Human: {
TMW2_BRAWLING: 0
TMW2_BEARSTRIKE: 0
TMW2_ALLINONE: 0
+ TMW2_STUNNINGSTRIKE: 0
TMW2_FALKONSTRIKE: 0
TMW2_GROUNDSTRIKE: 0
TMW2_SUPREMEATTACK: 0
diff --git a/maps/re/006-2-2.mcache b/maps/re/006-2-2.mcache
index bb3e52d4f..654dffed0 100644
--- a/maps/re/006-2-2.mcache
+++ b/maps/re/006-2-2.mcache
Binary files differ
diff --git a/maps/re/006-2-3.mcache b/maps/re/006-2-3.mcache
index aab409dbb..4e06a701d 100644
--- a/maps/re/006-2-3.mcache
+++ b/maps/re/006-2-3.mcache
Binary files differ
diff --git a/maps/re/006-2-4.mcache b/maps/re/006-2-4.mcache
new file mode 100644
index 000000000..c22b21563
--- /dev/null
+++ b/maps/re/006-2-4.mcache
Binary files differ
diff --git a/maps/re/006-2-5.mcache b/maps/re/006-2-5.mcache
new file mode 100644
index 000000000..67a641566
--- /dev/null
+++ b/maps/re/006-2-5.mcache
Binary files differ
diff --git a/maps/re/006-2-6.mcache b/maps/re/006-2-6.mcache
new file mode 100644
index 000000000..61c2a732d
--- /dev/null
+++ b/maps/re/006-2-6.mcache
Binary files differ
diff --git a/npc/000-1/exit.txt b/npc/000-1/exit.txt
index fe1be33cf..aed9a8c92 100644
--- a/npc/000-1/exit.txt
+++ b/npc/000-1/exit.txt
@@ -10,7 +10,7 @@ OnTalk:
OnTalkNearby:
// At any time, if you can't leave Nard ship, you must go to nard ship
if (!getq(General_Narrator) && getq(ShipQuests_Julia) < 3) {
- warp "002-1", 53, 38;
+ warp "002-1@Candor", 53, 38;
end;
}
diff --git a/npc/001-7/celestia_bossfight.txt b/npc/001-7/celestia_bossfight.txt
index fb0ce8945..afe0535a0 100644
--- a/npc/001-7/celestia_bossfight.txt
+++ b/npc/001-7/celestia_bossfight.txt
@@ -22,6 +22,15 @@
end;
L_GoHome:
+ .@MLPQuest=( (##01_MLWORLD & MLP_TMW_CELESTIA) &&
+ !(##01_MLWORLD & MLP_TMW_YETIKING) &&
+ getvaultid());
+ if (.@MLPQuest) {
+ mesn strcharinfo(0);
+ mesq l("Actually, have you ever heard of Yeti's kidnapping little girls?");
+ next;
+ goto L_VaultQuest;
+ }
mesc l("Go home now?");
if (askyesno() == ASK_YES)
warp "003-1-1", 94, 22;
@@ -51,19 +60,19 @@ L_Survivor:
mesq l("In this world, your friends are your strength. You deserve a reward for the victory, please choose whatever you want.");
select
l("I want a gemstone or ore"),
- l("I want experience"),
+ rif(!countitem(MirrorLakeArmor), l("I want experience")),
l("I want gold"),
l("I want coal"),
l("I want monster points");
mes "";
- .@r=rand(1,100)+(@YetiKing_Challenger*5);
+ .@r=rand2(1,100)+(@YetiKing_Challenger*5);
switch (@menu) {
case 1:
if (.@r > 70)
getitem rand2(Diamond, Amethyst), 1;
else
- getitem rand2(CopperOre, (REBRITH ? IridiumOre : TitaniumOre)), any(1,2);
+ getitem rand2(CopperOre, (REBIRTH ? IridiumOre : TitaniumOre)), any(1,2);
break;
case 2:
.@r+=BaseLevel;
@@ -96,9 +105,13 @@ L_Survivor:
mesn col(l("The Yeti King"), 3);
mesq l("I can warp you home now.");
mes "";
+ .@MLPQuest=( (##01_MLWORLD & MLP_TMW_CELESTIA) &&
+ !(##01_MLWORLD & MLP_TMW_YETIKING) &&
+ getvaultid());
select
- l("Please, bring me back home."),
+ rif(!.@MLPQuest, l("Please, bring me back home.")),
rif((getareausers("001-7", 7) > 1 || $@GM_OVERRIDE) && !mobcount(.map$, "#YetiKing::OnVictory") && @YetiKing_Challenger, l("No, we challenge you to a duel!")),
+ rif(.@MLPQuest, l("Actually, have you ever heard of Yeti's kidnapping little girls?")),
l("I'll walk around here a little more.");
mes "";
@@ -120,6 +133,8 @@ L_Survivor:
monster .map$, .x, .y, strmobinfo(1, YetiKing), YetiKing, 1, "#YetiKing::OnVictory";
initnpctimer;
break;
+ case 3:
+ goto L_VaultQuest;
}
close;
@@ -178,6 +193,49 @@ OnMinute17:
if (!getareausers("001-7", 21))
setnpcdisplay .name$, NPC_YETI_KING;
end;
+
+L_VaultQuest:
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Every once in a while, but I guess this is not common on your world, am I right.");
+ next;
+ select
+ l("I came from The Mana World."),
+ l("That's right, this is unheard of where I come from."),
+ l("...How do you know I'm not from this world?");
+ mes "";
+ mesn col(l("The Yeti King"), 3);
+ mesq l("I'm not unfamiliar with the children of Merlin, thosem whom cross the Mirror Lake. In case of The Mana World, you're lucky, we're parallel, meaning we share lots of things in common.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Now, I'm sure you could find the answer you seek without the trouble of coming here, but anyway. I guess I'll explain you how things work here, first.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("In this world, Angela married with the Blue Sage. I had an... incident, with the Blue Sage, which is better forgetten. Anyway, seeking to cause a political instability, opposing Yetis every once in a while kidnap their daughter, Cindy.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("The trick at tracing parallel, is finding the difference. In this world, Cindy gives a %s, a personal belonging of her, to those whom rescue her. What is the reward on your world?", getitemlink(Earmuffs));
+ next;
+ select
+ l("I got a Wizard Hat."),
+ l("I got a Wooden Staff.");
+ mes "";
+ mesn col(l("The Yeti King"), 3);
+ mesq l("That's your answer. Cindy is not a mage, right? This means some mage has bewitched the Yetis to do so, and if my parallel theory is correct, they're either aiming at the Blue Sage, or at her father.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Therefore, children of Merlin, go back to your world, and ask the Blue Sage Nikolai about it. The blue sage may fake angerness or try to dodge the question, but they are a good person. Still, you should ensure you're on his good side.");
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("If you're still not confident enough, just tell him this: %s", col(l("*whisper whisper*"), 9));
+ next;
+ mesn col(l("The Yeti King"), 3);
+ mesq l("Are you ready to cross the Mirror Lake and return to your world?");
+ next;
+ if (askyesno() == ASK_YES) {
+ ##01_MLWORLD=##01_MLWORLD|MLP_TMW_YETIKING;
+ MirrorLakeSendTo(MLP_TMW, 0);
+ }
+ close;
}
diff --git a/npc/003-1-1/yetiking.txt b/npc/003-1-1/yetiking.txt
index e6f311217..fa255bcd2 100644
--- a/npc/003-1-1/yetiking.txt
+++ b/npc/003-1-1/yetiking.txt
@@ -120,7 +120,7 @@ OnSummonTalk:
goto L_Die;
if (@menu == 3)
close;
- if (BaseLevel < 35) {
+ if (BaseLevel < 35 && !countitem(MirrorLakeArmor)) {
mesn l("Dah Yeti King!!");
mesq l("You? Have you ever looked in the mirror? You're not even level 35. Begone.");
close;
diff --git a/npc/003-1/sewer.txt b/npc/003-1/sewer.txt
index 5f4c6f320..a5faabd47 100644
--- a/npc/003-1/sewer.txt
+++ b/npc/003-1/sewer.txt
@@ -6,11 +6,11 @@
// TE: Tulimshar, East
003-1,56,84,0 script #Sewer-TW NPC_NO_SPRITE,{
- if (getq(TulimsharQuest_Sewers) == 0) {
+ if (getq(TulimsharQuest_Sewers) == 0 && !countitem(MirrorLakeArmor)) {
dispbottom l("The sewer mouth is locked.");
end;
}
- if (BaseLevel < 25) end;
+ if (BaseLevel < 25 && !countitem(MirrorLakeArmor)) end;
mesc l("Descend into Tulimshar sewers?");
if (askyesno() == ASK_YES) {
@@ -23,11 +23,11 @@
}
003-1,115,111,0 script #Sewer-TE NPC_NO_SPRITE,{
- if (getq(TulimsharQuest_Sewers) == 0) {
+ if (getq(TulimsharQuest_Sewers) == 0 && !countitem(MirrorLakeArmor)) {
dispbottom l("The sewer mouth is locked.");
end;
}
- if (BaseLevel < 25) end;
+ if (BaseLevel < 25 && !countitem(MirrorLakeArmor)) end;
mesc l("Descend into Tulimshar sewers?");
if (askyesno() == ASK_YES) {
diff --git a/npc/005-1-1/main.txt b/npc/005-1-1/main.txt
index f7d1ab672..93db929e2 100644
--- a/npc/005-1-1/main.txt
+++ b/npc/005-1-1/main.txt
@@ -221,7 +221,11 @@ OnFinish:
inventoryplace RoundLeatherShield, 1;
mesc l("Complete Quest?");
mesc l("You won't be able to aim for a better record!");
- if (askyesno() == ASK_YES) {
+ menuint
+ l("Yes, I'm done with it."), ASK_YES,
+ l("No, I want to aim for a higher score."), ASK_NO;
+ mes "";
+ if (@menuret == ASK_YES) {
setq CandorQuest_Marggo, 1;
Zeny=Zeny+300;
getexp .@ratio*8/10, (.@ratio/3);
diff --git a/npc/006-2-1/camilot.txt b/npc/006-2-1/camilot.txt
new file mode 100644
index 000000000..8cd6b3c07
--- /dev/null
+++ b/npc/006-2-1/camilot.txt
@@ -0,0 +1,54 @@
+// TMW2 scripts.
+// Authors:
+// Saulc
+// Jesusalva
+// Reid
+// Travolta
+// +Seeds
+// Description:
+// Camilot is the barber.
+
+006-2-1,85,67,0 script Camilot NPC_PIOU_BARBER,{
+ mesn;
+ mesq l("Hi! I'm Camilot, a piou specialist in humanoid hairstyles. Do you want a hair cut?");
+
+ do
+ {
+ select
+ l("What is my current hairstyle and hair color?"),
+ l("I'd like to get a different style."),
+ l("Can you do something with my color?"),
+ l("I'm allergic to piou, goodbye.");
+
+ switch (@menu)
+ {
+ case 1:
+ BarberSayStyle 2;
+ break;
+ case 2:
+ BarberChangeStyle;
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Enjoy your new style.");
+ l("Anything else?");
+ break;
+ case 3:
+ BarberChangeColor;
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("I hope you like this color.");
+ l("Anything else?");
+ break;
+ case 4:
+ speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
+ l("Come and visit again!");
+
+ goodbye;
+ }
+ } while (1);
+ close;
+
+
+OnInit:
+ .sex = G_OTHER;
+ .distance = 5;
+ end;
+}
diff --git a/npc/006-2-1/chirp.txt b/npc/006-2-1/chirp.txt
new file mode 100644
index 000000000..3b0f146da
--- /dev/null
+++ b/npc/006-2-1/chirp.txt
@@ -0,0 +1,15 @@
+// TMW-2 Script.
+// Author:
+// +Seeds
+// Jesusalva
+
+006-2-1,41,66,0 script Chirp NPC_PIOU_BANKER,{
+ Banker(.name$, "Piou Isles", 8000);
+ close;
+
+OnInit:
+ .sex = OTHER;
+ .distance = 4;
+ end;
+}
+
diff --git a/npc/006-2-1/jenny.txt b/npc/006-2-1/jenny.txt
new file mode 100644
index 000000000..72525f8a3
--- /dev/null
+++ b/npc/006-2-1/jenny.txt
@@ -0,0 +1,41 @@
+// TMW2 Script.
+// Author:
+// Jesusalva
+// Modified by:
+// +seeds
+
+006-2-1,41,74,0 script Jenny NPC_PIOU_SERVER,{
+
+ mesn;
+ mesq l("Hello! Would you like to try some piou delicacies?");
+ next;
+ closedialog;
+ npcshopattach(.name$);
+ shop .name$;
+ close;
+
+OnInit:
+
+ .sex = G_OTHER;
+ .distance = 5;
+
+ tradertype(NST_MARKET);
+ sellitem Piberries, 20, 20;
+ sellitem Aquada, 120, 5;
+ sellitem LettuceLeaf, 30, 15;
+ sellitem Bread, 46, 10;
+ sellitem Cheese, 55, 15;
+
+ end;
+
+OnClock0556:
+OnClock1201:
+OnClock1759:
+OnClock0003:
+ restoreshopitem Piberries, 20, 20;
+ restoreshopitem Aquada, 120, 5;
+ restoreshopitem LettuceLeaf, 30, 15;
+ restoreshopitem Bread, 46, 10;
+ restoreshopitem Cheese, 55, 15;
+ end;
+}
diff --git a/npc/006-2-1/lune.txt b/npc/006-2-1/lune.txt
new file mode 100644
index 000000000..77d25d3c8
--- /dev/null
+++ b/npc/006-2-1/lune.txt
@@ -0,0 +1,90 @@
+// TMW2 Script
+// Author:
+// Saulc
+// Vasily_Makarov (original from Evol)
+// Jesusalva
+// seeds
+// Description:
+// Status Reset
+
+006-2-1,34,66,0 script Lune NPC_PIOU_ALCHEMIST,{
+
+ speech S_LAST_NEXT,
+ l("I am @@, a piou alchemist specialized in reset potions.", .name$);
+
+L_Menu:
+ .@plush_count = BaseLevel*210-(9*210);
+ // Lv 10: 210 GP
+ // Lv 90: 1.890 GP
+ if (BaseLevel > 10)
+ .@plush_count = .@plush_count/(BaseLevel/10);
+
+ select
+ l("Can you reset my stats please?"),
+ "",
+ lg("I'm allergic to piou potions, goodbye.");
+
+ switch (@menu)
+ {
+ case 1:
+ goto L_ResetStats;
+ case 2:
+ goto L_Powder;
+ case 3:
+ goto L_Quit;
+ }
+
+L_ResetStats:
+ mesn;
+ mesq l("Status point reset can't be undone. Do you really want this?");
+
+L_ConfirmReset:
+ ConfirmStatusReset();
+ goto L_Quit;
+
+L_Powder:
+ .@price=POL_AdjustPrice(800);
+ mes "";
+ mesn;
+ mesq "";
+ next;
+ select
+ l("Yeah, I need one."),
+ l("Thanks for the help, but no."),
+ l("I'm allergic to piou, goodbye!");
+ if (@menu == 2)
+ goto L_Menu;
+
+ if (@menu == 3)
+ goto L_Quit;
+
+ if (false) {
+ mesn;
+ mesq l("Thanks! Here you go. Perhaps you need another one?");
+ next;
+ goto L_Powder;
+ } else {
+ mesn;
+ mesq "";
+ next;
+ }
+ goto L_Menu;
+
+L_Quit:
+ closeclientdialog;
+ goodbye;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADTOP, FancyHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, SailorShirt);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
+ setunitdata(.@npcId, UDT_WEAPON, LousyMoccasins); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 17);
+
+ .sex = G_OTHER;
+ .distance = 4;
+ end;
+}
diff --git a/npc/006-2-1/plum.txt b/npc/006-2-1/plum.txt
new file mode 100644
index 000000000..12c6c9043
--- /dev/null
+++ b/npc/006-2-1/plum.txt
@@ -0,0 +1,24 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// +seeds
+// Description:
+// Nurse.
+
+006-2-1,85,71,0 script Plum NPC_PIOU_NURSE,{
+ Nurse(.name$, 10, 5);
+ close;
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, CottonSkirt);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, TneckSweater);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 14);
+
+ .sex = G_OTHER;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/006-2-2/_warps.txt b/npc/006-2-2/_warps.txt
index 13697d056..4c7ce1358 100644
--- a/npc/006-2-2/_warps.txt
+++ b/npc/006-2-2/_warps.txt
@@ -1,3 +1,3 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 006-2-2: Secret Cave warps
-006-2-2,36,52,0 warp #006-2-2_36_52 0,0,006-2,71,87
+006-2-2,35,48,0 warp #006-2-2_35_48 1,0,006-2,71,87
diff --git a/npc/006-2-3/_mobs.txt b/npc/006-2-3/_mobs.txt
index 54f7b9dcb..29db02808 100644
--- a/npc/006-2-3/_mobs.txt
+++ b/npc/006-2-3/_mobs.txt
@@ -1,6 +1,6 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 006-2-3: Mushroom Cavern mobs
-006-2-3,41,42,15,13 monster Piou 1002,6,30000,30000
-006-2-3,40,40,8,7 monster Silk Worm 1034,6,30000,30000
-006-2-3,46,42,6,10 monster Red Butterfly 1025,2,30000,30000
-006-2-3,36,42,6,10 monster Cyan Butterfly 1172,2,30000,30000
+006-2-3,44,34,14,13 monster Piou 1002,6,30000,30000
+006-2-3,43,32,8,7 monster Silk Worm 1034,6,30000,30000
+006-2-3,49,34,6,10 monster Red Butterfly 1025,2,30000,30000
+006-2-3,39,34,6,10 monster Cyan Butterfly 1172,2,30000,30000
diff --git a/npc/006-2-3/_warps.txt b/npc/006-2-3/_warps.txt
index 198934da4..e0052f70f 100644
--- a/npc/006-2-3/_warps.txt
+++ b/npc/006-2-3/_warps.txt
@@ -1,4 +1,4 @@
// This file is generated automatically. All manually added changes will be removed when running the Converter.
// Map 006-2-3: Mushroom Cavern warps
-006-2-3,41,28,0 warp #006-2-3_41_28 0,0,006-2,62,109
-006-2-3,41,56,0 warp #006-2-3_41_56 0,0,006-2,68,114
+006-2-3,44,20,0 warp #006-2-3_44_20 0,0,006-2,62,109
+006-2-3,44,48,0 warp #006-2-3_44_48 0,0,006-2,68,114
diff --git a/npc/006-2-4/_import.txt b/npc/006-2-4/_import.txt
new file mode 100644
index 000000000..516cd26f3
--- /dev/null
+++ b/npc/006-2-4/_import.txt
@@ -0,0 +1,4 @@
+// Map 006-2-4: Training Room
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/006-2-4/_mobs.txt",
+"npc/006-2-4/_warps.txt",
diff --git a/npc/006-2-4/_mobs.txt b/npc/006-2-4/_mobs.txt
new file mode 100644
index 000000000..760f2ad3a
--- /dev/null
+++ b/npc/006-2-4/_mobs.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 006-2-4: Training Room mobs
+006-2-4,35,27,3,2 monster Piou Knight 1434,2,30000,30000
diff --git a/npc/006-2-4/_warps.txt b/npc/006-2-4/_warps.txt
new file mode 100644
index 000000000..dac54f44e
--- /dev/null
+++ b/npc/006-2-4/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 006-2-4: Training Room warps
+006-2-4,39,22,0 warp #006-2-4_39_22 0,0,006-2-5,43,24
diff --git a/npc/006-2-5/_import.txt b/npc/006-2-5/_import.txt
new file mode 100644
index 000000000..7a07b21fb
--- /dev/null
+++ b/npc/006-2-5/_import.txt
@@ -0,0 +1,4 @@
+// Map 006-2-5: Throne Room
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/006-2-5/_mobs.txt",
+"npc/006-2-5/_warps.txt",
diff --git a/npc/006-2-5/_mobs.txt b/npc/006-2-5/_mobs.txt
new file mode 100644
index 000000000..86c6e3550
--- /dev/null
+++ b/npc/006-2-5/_mobs.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 006-2-5: Throne Room mobs
+006-2-5,34,28,1,1 monster Forest Piou 1202,2,30000,30000
+006-2-5,42,28,1,1 monster Mana Piou 1155,2,30000,30000
diff --git a/npc/006-2-5/_warps.txt b/npc/006-2-5/_warps.txt
new file mode 100644
index 000000000..6f2842d15
--- /dev/null
+++ b/npc/006-2-5/_warps.txt
@@ -0,0 +1,5 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 006-2-5: Throne Room warps
+006-2-5,38,35,0 warp #006-2-5_38_35 0,0,006-2,68,75
+006-2-5,34,21,0 warp #006-2-5_34_21 0,0,006-2-4,33,23
+006-2-5,43,23,0 warp #006-2-5_43_23 0,0,006-2-4,39,23
diff --git a/npc/006-2-6/_import.txt b/npc/006-2-6/_import.txt
new file mode 100644
index 000000000..2b82b5a30
--- /dev/null
+++ b/npc/006-2-6/_import.txt
@@ -0,0 +1,4 @@
+// Map 006-2-6: Upper Level
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/006-2-6/_mobs.txt",
+"npc/006-2-6/_warps.txt",
diff --git a/npc/006-2-6/_mobs.txt b/npc/006-2-6/_mobs.txt
new file mode 100644
index 000000000..6eeca13f0
--- /dev/null
+++ b/npc/006-2-6/_mobs.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 006-2-6: Upper Level mobs
+006-2-6,35,31,1,1 monster Piou 1002,3,30000,30000
+006-2-6,41,31,1,1 monster Piousse 1003,3,30000,30000
diff --git a/npc/006-2-6/_warps.txt b/npc/006-2-6/_warps.txt
new file mode 100644
index 000000000..fecd7ad81
--- /dev/null
+++ b/npc/006-2-6/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 006-2-6: Upper Level warps
+006-2-6,34,23,0 warp #006-2-6_34_23 0,0,006-2-4,34,22
diff --git a/npc/006-2/_warps.txt b/npc/006-2/_warps.txt
index 90b67fa68..41770a969 100644
--- a/npc/006-2/_warps.txt
+++ b/npc/006-2/_warps.txt
@@ -7,3 +7,4 @@
006-2,61,109,0 warp #006-2_61_109 0,0,006-2-3,42,29
006-2,68,113,0 warp #006-2_68_113 0,0,006-2-3,41,55
006-2,68,118,0 warp #006-2_68_118 0,0,006-0,40,36
+006-2,68,74,0 warp #006-2_68_74 0,0,006-2-4,38,34
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index a0eb38b4a..0b52a3ee7 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -497,10 +497,10 @@ OnVictory:
bg_destroy(1);
bg_destroy(2);
// Auto-schedule Liberation Day
- // two weeks from now, to happen on a saturday
+ // a month from now, to happen on a saturday
.@offset = gettime(GETTIME_WEEKDAY); // How long since sunday?
.@offset += 1; // Move it to Saturday
- .@offset += 14; // Add a couple weeks
+ .@offset += 30; // Add a month
.@offset += gettimeparam(GETTIME_DAYOFMONTH); // Apply offset to the all days
$NLIB_SEQDAY = .@offset; // Schedule the event
diff --git a/npc/012-7/celestia.txt b/npc/012-7/celestia.txt
index 2e2190026..8ad80de44 100644
--- a/npc/012-7/celestia.txt
+++ b/npc/012-7/celestia.txt
@@ -6,8 +6,6 @@
// Celestia Yeti King's quest. Designed so if you're with 4 players, all 4 can
// summon the Yeti King, helping you while doing the quest by themselves.
-// TODO: OnPCDieEvent must reset quest
-
012-7,35,49,0 script Celestia NPC_ELF_F,{
.@q1=getq(HurnscaldQuest_Celestia);
@@ -21,6 +19,7 @@
menu
l("Sorry, I'm more of a coffee person."), L_Coffee,
l("What an amazing crown you have! How do I get it?!"), L_Crown,
+ rif(getvaultid() && get_nibble(##03_TMWQUEST, 0) == 2, l("Actually, have you ever heard of Yeti's kidnapping little girls?")), L_VaultQuest,
rif(.@q2 == 0 && BaseLevel >= 35, l("Tea party! I want to participate.")), L_TeaQuest,
rif(.@q2 == 1, l("I have some sweeties for the Tea Party!")), L_TeaCheck,
rif(.@q2 >= 2, l("Tea party! I want to participate.")), L_TeaParty,
@@ -212,7 +211,7 @@ L_DrinkTea:
}
mesc l("To your pleasant surprise the tea is actually quite good.");
next;
- mesc l("Despite its initial dubious fragrance, the tea comes off as very smooth and mellow with a bit of natural sweetness and a touch of an earthy forest like flavour, but in a very good way.");
+ mesc l("Despite its initial dubious fragrance, the tea comes off as very smooth and mellow with a bit of natural sweetness and a touch of an earthy forest like flavor, but in a very good way.");
next;
mesc l("Clearly an exotic tea, with a refined flavor fit for a refined woman such as Celestia.");
close;
@@ -257,7 +256,7 @@ L_OtherQuest:
mesn;
mesq l("Wasn't there something on the Holy Bible? About a young boy trapped by his brothers somewhere because envy?");
mesc l("If you don't want to look at the Bible, you can try to solve the following riddle:");
- mesc l("\"When you're thristy, you may look for me. I'm often in desert areas, but this time, the winter has come.\""), 3;
+ mesc l("\"When you're thirsty, you may look for me. I'm often in desert areas, but this time, the winter has come.\""), 3;
CINDY_PLAYER_STRUCK=false;
next;
clear;
@@ -265,6 +264,91 @@ L_OtherQuest:
mesc l("\"When you're thristy, you may look for me. I'm often in desert areas, but this time, the winter has come.\""), 3;
close;
+// Mirror Lake
+L_VaultQuest:
+ if (##01_MLWORLD & MLP_TMW_CELESTIA) {
+ mesn;
+ mesq l("Yes, try to summon the Yeti King in Tulimshar Sewers. Make sure you have someone else with you to help.");
+ close;
+ }
+ mesn;
+ mesq l("While I don't think the Yeti King would ever do or endorse that, yes, I've heard this happens.");
+ next;
+ select
+ l("Wait, Yeti's have a king?"),
+ l("I thought they ate little girls."),
+ l("Haha, as if I believe you.");
+ mes "";
+ if (@menu == 3) close;
+ if (@menu == 2) {
+ mesn;
+ mesq l("What? Don't be ridiculous. Not even the Monster King does that! I think.");
+ next;
+ mesn;
+ mesq l("In other words, I never heard of a Yeti eating a kid before. They prefer %s.", getitemlink(MoubooSteak));
+ next;
+ } if (@menu == 1) {
+ // Player already know that ¬.¬
+ if (getq(HurnscaldQuest_Celestia) != 0) {
+ mesn;
+ mesq l("Are you trying to provoke me?");
+ close;
+ }
+ mesn;
+ mesq l("You see, most people think that all monsters are controlled by the Monster King, but that's not quite right.");
+ next;
+ mesn;
+ mesq l("Some are just living their own lives. In special, I've spent part of my life studying the Yeti Society.");
+ next;
+ mesn;
+ mesq l("And guess what? They have a King of their own!");
+ next;
+ }
+ mesn;
+ mesq l("Anyway, why do you ask? Surely not to waste my time.");
+ next;
+ select
+ l("[Explain the situation]"),
+ l("[Make up a lie]");
+ mes "";
+ mesn;
+ mesq l("...Okay, I asked you to explain, and you ended up wasting my time instead. %%n");
+ next;
+ mesn;
+ mesq l("Listen, I was trying to get the Yeti King to help me to fight the Monster King. If you want to go there and do it, be my guest; Maybe they'll even help you with whatever your problem is.");
+ if (countitem(MirrorLakeArmor))
+ mesc l("PS. This char will be reset on logout.");
+ next;
+ select
+ l("Sure, I'll help."),
+ l("No way!");
+ if (@menu == 2) close;
+ mes "";
+ mesn;
+ mesq l("Alright. Listen, you'll need %s to summon it, and you cannot be alone. I only have so much of that to share, so be careful to don't use all.", getitemlink(EverburnPowder));
+ next;
+ if (countitem(MirrorLakeArmor)) {
+ mesn;
+ mesq l("Your weird robes; They seem like they'll deny your damage, so you definitely want to summon multiple people to help. Try the #world tab.");
+ next;
+ }
+ mesn;
+ mesq l("There's a summoning circle on Tulimshar Sewers. You can reach either by boat, if you have the money - I'll lend you some; Or by the long way.");
+ next;
+ mesn;
+ mesq l("Go very close to it and, speak the four four-letters magic words, pour some @@, and he'll appear to you.", getitemlink(EverburnPowder));
+ next;
+ mesn;
+ mesq l("Don't go alone, though! He would not listen to me, it is not you alone he'll pay attention. You will lose reagents!");
+ next;
+ ##01_MLWORLD=##01_MLWORLD|MLP_TMW_CELESTIA;
+ Zeny+=410;
+ getitembound(EverburnPowder, 5, 4);
+ setq HurnscaldQuest_Celestia, 1;
+ @YetiKing_Challenger=0;
+ mesq l("The chant is ##B EMOC OTEM ITEY GNIK ##b. Good luck!");
+ close;
+
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, MurdererCrown);
diff --git a/npc/014-4/slide.txt b/npc/014-4/slide.txt
index 6d24670c2..28cbc67be 100644
--- a/npc/014-4/slide.txt
+++ b/npc/014-4/slide.txt
@@ -18,3 +18,10 @@ OnTouch:
end;
}
+014-4,25,47,0 script #014-4_25_47 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ slide 25, 49;
+ end;
+}
+
diff --git a/npc/016-1/captain.txt b/npc/016-1/captain.txt
index 45bfdb2cc..5bbbeb1ef 100644
--- a/npc/016-1/captain.txt
+++ b/npc/016-1/captain.txt
@@ -6,7 +6,7 @@
016-1,19,29,0 script Captain NPC_NARD,{
.@price=410;
- if (BaseLevel < 20 && !REBIRTH)
+ if (BaseLevel < 20 && !REBIRTH && !countitem(MirrorLakeArmor))
goto L_TooWeak;
mesn;
diff --git a/npc/018-5-4/elder.txt b/npc/018-5-4/elder.txt
index ad5f93a2e..d3b01819a 100644
--- a/npc/018-5-4/elder.txt
+++ b/npc/018-5-4/elder.txt
@@ -164,7 +164,7 @@ function elderSupplyGive {
}
function elderPirateAttack {
- // Level requeriment
+ // Level requirement
if (BaseLevel < 75) {
mesn;
mesq l("The pirates amass for their siege, but they will not attack yet. Return when you are stronger. King DD is working to find a solution.");
@@ -230,20 +230,20 @@ OnBegin:
// Spawn Monsters
// FIXME MIGHT NOT WORK WITH COORDINATES ZERO (for several reasons)
// PLEASE PREFER AREAMONSTER
- monster(.@m$, 0, 0, "Ocean Pirate", OceanPirate, @pLvl, "Duck Elder::OnPirateKilled");
- @total_pirates+=@pLvl;
- monster(.@m$, 0, 0, "Pirate Captain", OceanPirate, (@pLvl/10), "Duck Elder::OnPirateKilled"); // FIXME
- @total_pirates+=(@pLvl/10);
+ monster(.@m$, 0, 0, "Ocean Pirate", OceanPirate, (@pLvl/2), "Duck Elder::OnPirateKilled");
+ @total_pirates+=(@pLvl/2);
+ monster(.@m$, 0, 0, "Pirate Captain", OceanPirate, (@pLvl/15), "Duck Elder::OnPirateKilled"); // FIXME
+ @total_pirates+=(@pLvl/15);
monster(.@m$, 0, 0, "Desert Pirate", DesertBandit, (@pLvl/3), "Duck Elder::OnPirateKilled");
@total_pirates+=(@pLvl/3);
- monster(.@m$, 0, 0, "Marsh Pirate", Bandit, (@pLvl/3), "Duck Elder::OnPirateKilled");
- @total_pirates+=(@pLvl/3);
- monster(.@m$, 0, 0, "Buccaneer", Sarracenus, (@pLvl/6), "Duck Elder::OnPirateKilled");
- @total_pirates+=(@pLvl/6);
- monster(.@m$, 0, 0, "Corsair", RobinBandit, (@pLvl/5), "Duck Elder::OnPirateKilled");
- @total_pirates+=(@pLvl/5);
- monster(.@m$, 0, 0, "Pirate Lord", BanditLord, (@pLvl/11), "Duck Elder::OnPirateKilled");
- @total_pirates+=(@pLvl/11);
+ monster(.@m$, 0, 0, "Marsh Pirate", Bandit, (@pLvl/4), "Duck Elder::OnPirateKilled");
+ @total_pirates+=(@pLvl/4);
+ monster(.@m$, 0, 0, "Buccaneer", Sarracenus, (@pLvl/7), "Duck Elder::OnPirateKilled");
+ @total_pirates+=(@pLvl/7);
+ monster(.@m$, 0, 0, "Corsair", RobinBandit, (@pLvl/7), "Duck Elder::OnPirateKilled");
+ @total_pirates+=(@pLvl/7);
+ monster(.@m$, 0, 0, "Pirate Lord", BanditLord, (@pLvl/12), "Duck Elder::OnPirateKilled");
+ @total_pirates+=(@pLvl/12);
monster(.@m$, 0, 0, "Pirate Assassin", HoodedAssassin, (@pLvl/25), "Duck Elder::OnPirateKilled");
@total_pirates+=(@pLvl/25);
debugmes "Pirates of SARAH, \"%s\" - Total: %d (Lv %d)", strcharinfo(0), @total_pirates, @pLvl;
diff --git a/npc/027-3/_import.txt b/npc/027-3/_import.txt
index 750829745..feb1974d7 100644
--- a/npc/027-3/_import.txt
+++ b/npc/027-3/_import.txt
@@ -1,4 +1,5 @@
// Map 027-3: Physical Sciences Classroom
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/027-3/_warps.txt",
+"npc/027-3/angel.txt",
"npc/027-3/luca.txt",
diff --git a/npc/027-3/angel.txt b/npc/027-3/angel.txt
new file mode 100644
index 000000000..b811e3d37
--- /dev/null
+++ b/npc/027-3/angel.txt
@@ -0,0 +1,111 @@
+// TMW2 script.
+// Author:
+// dangerDuck
+// Description:
+// Angel, of Physical Science Class.
+
+027-3,36,28,0 script Angel NPC_PLAYER,{
+ function basicMagic;
+ function standardMagic;
+ function advancedMagic;
+ if (!MAGIC_LVL) goto L_NoMagic;
+ mes l(".:: Physical Sciences Class ::.");
+ mesc l("Specialized in skills with fist-based damage and unarmed mastery.");
+ next;
+ mesn;
+ mesc l("You have @@ magic skill points available.", sk_points());
+ select
+ l("Basic Magic"),
+ l("Standard Magic"),
+ l("Advanced Magic");
+ //l("Mastery Magic");
+ mes "";
+ .@lv=@menu;
+ do
+ {
+ // Display appropriate menu
+ if (.@lv == 1)
+ basicMagic();
+ else if (.@lv == 2)
+ standardMagic();
+ else if (.@lv == 3)
+ advancedMagic();
+
+ // Handle result
+ mes "";
+ if (@menuret) {
+ if (!learn_magic(@menuret)) {
+ mesc l("You do not meet all requisites for this skill."), 1;
+ next;
+ }
+ } else {
+ closeclientdialog;
+ }
+
+ } while (@menuret);
+ close;
+
+L_NoMagic:
+ next;
+ mesn;
+ mesq l("You do not have enough magic power for these classes.");
+ next;
+ if ($FIRESOFSTEAM < 9) {
+ mesn;
+ mesq l("Besides the Magic Council, Andrei Sakar have his own Mana Stone, but I doubt he would train the likes of you, or share his Mana Stone.");
+ next;
+ }
+ mesn;
+ mesq l("Perhaps, in the city, someone knows rumors about Mana Stones and can teach you. Other than that, you're on your own.");
+ close;
+
+function basicMagic {
+ if (MAGIC_LVL < 1) goto L_NoMagic;
+ mes l(".:: Brawling ::.");
+ mesc l("Three powerful consecutive brawn attacks.");
+ mes "";
+ menuint
+ l("Brawling"), TMW2_BRAWLING,
+ l("Cancel"), 0;
+ return;
+}
+
+function standardMagic {
+ if (MAGIC_LVL < 2) goto L_NoMagic;
+ mes l(".:: Bear Strike ::.");
+ mesc l("Five powerful consecutive brawn attacks.");
+ mes "";
+ mes l(".:: Stunning Strike ::.");
+ mesc l("Three powerful consecutive brawn attacks with a chance to stun target.");
+ mes "";
+ menuint
+ l("Bear Strike"), TMW2_BEARSTRIKE,
+ l("Stunning Strike"), TMW2_STUNNINGSTRIKE,
+ l("Cancel"), 0;
+ return;
+}
+
+function advancedMagic {
+ if (MAGIC_LVL < 3) goto L_NoMagic;
+ mes l(".:: All In One ::.");
+ mesc l("Seven consecutive brawn attacks of diff. elements.");
+ mes "";
+ menuint
+ l("All In One"), TMW2_ALLINONE,
+ l("Cancel"), 0;
+ return;
+}
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, AssassinChest);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, AssassinPants);
+ setunitdata(.@npcId, UDT_WEAPON, AssassinBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 20);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/029-0/event.txt b/npc/029-0/event.txt
index 031530d29..e2e671100 100644
--- a/npc/029-0/event.txt
+++ b/npc/029-0/event.txt
@@ -235,8 +235,10 @@ OnMinute02:
003-0-2,34,21,0 script Alliance Officer NPC_HALBERDBARBARIAN,{
mesn;
- mesq l("Good %s, %s. The council is not in session right now.", (is_night() ? l("evening") : l("morning")), lg("peasant"));
- if (($BETASERVER || debug) && BaseLevel < 60) goto L_PowerUp;
+ mesq l("Good %s, %s. The council is not in session right now.",
+ (is_night() ? l("evening") : l("morning")),
+ (strcharinfo(0) == $MOST_HEROIC$ ? lg("hero") : lg("peasant")));
+ if (($BETASERVER || debug) && BaseLevel < 60 && !#BETA_REVIVE) goto L_PowerUp;
close;
L_PowerUp:
@@ -249,6 +251,25 @@ L_PowerUp:
next;
mesc l("Awake lost potential? This will mess with your char data irreversibly, beware."), 1;
if (askyesno() == ASK_NO) close;
+ inventoryplace Iten, 1, NPCEyes, 4;
+
+ // Chose a stage (NO TTL)
+ mesc l("Please select where you left off on Main Quest.");
+ mesc l("The one with a star (*) is advised.");
+ mesc l("It is NOT advised for new players to skip parts of the Main Quest.");
+ mesc l("Skipping will FORSAKE rewards for the quest and related; So choose wisely!");
+ mes "";
+ menuint
+ "Nard Quest finished", 1,
+ "Lua Quest finished", 3,
+ "Airlia Quest finished", 6,
+ "Librarian Quest finished", 10,
+ "Blue Sage Quest finished", 12,
+ "(*) King Gelid Quest complete", 17,
+ "Lightbringer/Barbara finished", 19;
+ mes "";
+ // Save stage
+ .@mq = @menuret;
// IP Blacklist
if (array_find($@IPBLIST$, getcharip()) < 0)
@@ -262,13 +283,20 @@ L_PowerUp:
// Skip a few quests
setq ShipQuests_Arpan, 5;
- if (getq(General_Narrator) < 17) {
- // Homunculus
+ if (.@mq > 10)
+ setq NivalisQuest_BlueSage, 12;
+ if (.@mq >= 17) {
sk_lvup(AM_REST);
sk_lvup(AM_RESURRECTHOMUN);
sk_lvup(AM_CALLHOMUN);
- setq General_Narrator, 17;
}
+ if (.@mq >= 18) {
+ BARBARA_STATE=any(1, 2, 3);
+ }
+
+ // Update main quest
+ if (getq(General_Narrator) < .@mq)
+ setq General_Narrator, .@mq;
// Monster points
MPQUEST=true;
@@ -302,14 +330,19 @@ L_PowerUp:
getitembound Bread, 10, 4;
// Regeneration and misc
+ getitem StrangeCoin, 100;
+ Zeny+=50000;
percentheal 100,100;
mesc l("You awake a long forgotten potential, and feel ready to take over the world.");
+ #BETA_REVIVE=true;
close;
OnInit:
.distance=4;
+ /*
if (!$BETASERVER && !debug)
disablenpc .name$;
+ */
end;
}
diff --git a/npc/_import.txt b/npc/_import.txt
index 24bbad735..15d640822 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -60,6 +60,9 @@
@include "npc/006-2-1/_import.txt"
@include "npc/006-2-2/_import.txt"
@include "npc/006-2-3/_import.txt"
+@include "npc/006-2-4/_import.txt"
+@include "npc/006-2-5/_import.txt"
+@include "npc/006-2-6/_import.txt"
@include "npc/006-2/_import.txt"
@include "npc/006-3/_import.txt"
@include "npc/006-4-1/_import.txt"
diff --git a/npc/commands/discord.txt b/npc/commands/discord.txt
index 98786bcfe..9e65fab81 100644
--- a/npc/commands/discord.txt
+++ b/npc/commands/discord.txt
@@ -78,6 +78,11 @@ OnCall:
input .@discord$;
if (.@discord$ == "") close;
mes "";
+ clear;
+ mesc l("Linking the following Discord account:");
+ mesc .@discord$, 1;
+ mesc l("Is this correct?");
+ if (askyesno() == ASK_NO) close;
// Run SQL query (will halt execution on dupe)
if (.@link) {
diff --git a/npc/functions/bitwise.txt b/npc/functions/bitwise.txt
index fd80024ef..023606629 100644
--- a/npc/functions/bitwise.txt
+++ b/npc/functions/bitwise.txt
@@ -73,17 +73,17 @@ function script get_nibble {
case 0:
.@s=0; .@m=0xF; break;
case 1:
- .@s=4; .@m=0XF0; break;
+ .@s=4; .@m=0xF0; break;
case 2:
- .@s=8; .@m=0XF00; break;
+ .@s=8; .@m=0xF00; break;
case 3:
- .@s=12; .@m=0XF000; break;
+ .@s=12; .@m=0xF000; break;
case 4:
- .@s=16; .@m=0XF0000; break;
+ .@s=16; .@m=0xF0000; break;
case 5:
- .@s=20; .@m=0XF00000; break;
+ .@s=20; .@m=0xF00000; break;
case 6:
- .@s=24; .@m=0XF000000; break;
+ .@s=24; .@m=0xF000000; break;
default:
Exception("Invalid Nibble: "+getarg(1), RB_DEFAULT, .@v);
}
@@ -99,11 +99,11 @@ function script get_byte {
case 0:
.@s=0; .@m=0xFF; break;
case 1:
- .@s=8; .@m=0XFF00; break;
+ .@s=8; .@m=0xFF00; break;
case 2:
- .@s=16; .@m=0XFF0000; break;
+ .@s=16; .@m=0xFF0000; break;
case 3:
- .@s=24; .@m=0X7F000000; break;
+ .@s=24; .@m=0x7F000000; break;
default:
Exception("Invalid Byte: "+getarg(1), RB_DEFAULT, .@v);
}
@@ -121,49 +121,49 @@ function script get_bitword {
/////////////////////////////////////////////////////////////////////////////////
// A Nibble can go up to 15. There are 7 nibbles.
-// set_nibble(VAR, VAL, NIBBLEID)
+// set_nibble(VAR, NIBBLEID, VAL)
function script set_nibble {
.@v=getarg(0);
- switch (getarg(2)) {
+ switch (getarg(1)) {
case 0:
.@s=0; .@m=0xF; break;
case 1:
- .@s=4; .@m=0XF0; break;
+ .@s=4; .@m=0xF0; break;
case 2:
- .@s=8; .@m=0XF00; break;
+ .@s=8; .@m=0xF00; break;
case 3:
- .@s=12; .@m=0XF000; break;
+ .@s=12; .@m=0xF000; break;
case 4:
- .@s=16; .@m=0XF0000; break;
+ .@s=16; .@m=0xF0000; break;
case 5:
- .@s=20; .@m=0XF00000; break;
+ .@s=20; .@m=0xF00000; break;
case 6:
- .@s=24; .@m=0XF000000; break;
+ .@s=24; .@m=0xF000000; break;
default:
- Exception("Invalid SNibble: "+getarg(2), RB_DEFAULT);
+ Exception("Invalid SNibble: "+getarg(1), RB_DEFAULT);
}
- return bitwise_set(.@v, .@m, .@s, getarg(1));
+ return bitwise_set(getarg(0), .@m, .@s, getarg(2));
}
// A Byte can go up to 255. There are 3 bytes. The forth can go up to 127.
-// set_nibble(VAR, VAL, BYTEID)
+// set_nibble(VAR, BYTEID, VAL)
function script set_byte {
.@v=getarg(0);
- switch (getarg(2)) {
+ switch (getarg(1)) {
case 0:
.@s=0; .@m=0xFF; break;
case 1:
- .@s=8; .@m=0XFF00; break;
+ .@s=8; .@m=0xFF00; break;
case 2:
- .@s=16; .@m=0XFF0000; break;
+ .@s=16; .@m=0xFF0000; break;
case 3:
- .@s=24; .@m=0X7F000000; break;
+ .@s=24; .@m=0x7F000000; break;
default:
- Exception("Invalid SByte: "+getarg(2), RB_DEFAULT);
+ Exception("Invalid SByte: "+getarg(1), RB_DEFAULT);
}
- return bitwise_set(.@v, .@m, .@s, getarg(1));
+ return bitwise_set(getarg(0), .@m, .@s, getarg(2));
}
// A Bitword can go up to 65535 and is fixed in position to handle Soul EXP.
@@ -171,6 +171,6 @@ function script set_byte {
function script set_bitword {
.@v=getarg(0);
- return bitwise_set(.@v, 0xFFFF, 0, getarg(1));
+ return bitwise_set(getarg(0), 0xFFFF, 0, getarg(1));
}
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 5461c4bd5..57bcd915a 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -1,6 +1,7 @@
// TMW2 scripts.
// Authors:
// Jesusalva
+// dangerDuck
// TMW Org.
// Description:
// HUB functions (Login, Logout, Death)
@@ -22,6 +23,56 @@ function script HUB_Login {
if (CHAREG_CLEANUP < gettimetick(2)-PVP_WAITTIME)
deletearray PVP_COOLDOWN;
+ // Mirror Lake functionality
+ if (getvaultid() && !getstatus(SC_JAILED)) {
+ .@gto=get_byte(##00_INFO, 3);
+ .@mlp=get_nibble(##00_INFO, 5);
+ /*debugmes "INFO: %d", ##00_INFO;
+ debugmes "BYTE: %d/%d/%d/%d", get_byte(##00_INFO, 0), get_byte(##00_INFO, 1), get_byte(##00_INFO, 2), get_byte(##00_INFO, 3);
+ debugmes "NIBBLE: %d/%d/%d/%d/%d/%d/%d/%d", get_nibble(##00_INFO, 0), get_nibble(##00_INFO, 1), get_nibble(##00_INFO, 2), get_nibble(##00_INFO, 3), get_nibble(##00_INFO, 4), get_nibble(##00_INFO, 5), get_nibble(##00_INFO, 6), get_nibble(##00_INFO, 7);
+ debugmes "Your Vault ID: %d", getvaultid();
+ debugmes "VAULT LOGIN, GTO is %d MLP is %d", .@gto, .@mlp;
+ */
+ // Work only on new chars, or chars which cleared Tulimshar.
+ if (.@gto == WORLD_ID &&
+ (!getq(General_Narrator) ||
+ (getq(General_Narrator) && BaseLevel > 20)))
+ {
+ // Warp to the proper Mirror Lake
+ switch (.@mlp) {
+ case 1: warp "018-7-1", 90, 47; LOCATION$ = "LoF"; break;
+ default: warp "014-4", 28, 31; LOCATION$ = "LoF"; break;
+ }
+
+ // Send debug information
+ debugmes("Vault User %d moved to lake %d.", getvaultid(), .@mlp);
+
+ // Handle new user (non-native) accounts
+ if (!getq(General_Narrator)) {
+ adddefaultskills();
+ getitembound MirrorLakeArmor, 1, 4;
+ equip(MirrorLakeArmor);
+ percentheal(100, 100);
+ TUTORIAL=true;
+ //BaseLevel = get_byte(##00_INFO, 0) + 1;
+ // TODO: Display quick tutorial
+ dispbottom l("Mirror Lake : Created temporary character; It'll be reset on logout.");
+ dispbottom l("Mirror Lake : Obtain help with %s.", b("@info"));
+ }
+
+ // Unset the target lake/world
+ set_byte(##00_INFO, 3, 0);
+ set_nibble(##00_INFO, 5, 0);
+ } else if (.@gto) {
+ // Heading somewhere which is not here!
+ mesc l("WARNING: If you use any Mirror Lake feature on this world, the current Mirror Lake Quest will be marked as \"Failed\"."), 1;
+ mesc l("If this is undesired, select the correct world, and if needed create a new char on it."), 1;
+ ##VAULT_GOTO=.@gto;
+ ##VAULT_MLTO=.@mlp;
+ next;
+ closeclientdialog;
+ }
+ }
return;
}
@@ -164,6 +215,9 @@ function script HUB_Logout {
setq1 HurnscaldQuest_Sagratha, 3;
setq3 HurnscaldQuest_Sagratha, 0;
}
+ // Died or logged out during Yeti King Fight
+ if (getq(HurnscaldQuest_Celestia) > 1)
+ setq HurnscaldQuest_Celestia, 1;
// First death produces a warning message
if (PC_DIE_COUNTER <= 1 && .@dead) {
dispbottom l("Dying outside a town square will cause EXP loss.");
@@ -228,7 +282,7 @@ function script HUB_Logout {
if (!.@dead) {
CHAREG_CLEANUP=gettimetick(2);
// Send updates to Vault API
- if (##VAULT) {
+ if (getvaultid()) {
.@api$=json_encode("UID", ##VAULT,
"GID", getcharid(3),
"VAR1N", "MLQUEST",
@@ -236,10 +290,22 @@ function script HUB_Logout {
"VAR2N", "MLWORLD",
"VAR2V", ##01_MLWORLD,
"VEXP", ##VAULT_EXP,
- "GOTO", 0,
- "MLTO", 0);
+ "GOTO", ##VAULT_GOTO,
+ "MLTO", ##VAULT_MLTO);
##VAULT_EXP=0;
+ ##VAULT_GOTO=0;
+ ##VAULT_MLTO=0;
api_send(API_FLUSHVAULT, .@api$);
+ // Destroy temporary characters
+ if (countitem(MirrorLakeArmor)) {
+ delitem MirrorLakeArmor, countitem(MirrorLakeArmor);
+ //clearitem(); // Hm.
+ resetlvl(2);
+ resetstatus();
+ resetskill();
+ warp "000-0", 22, 24;
+ debugmes("Vault User %d reset!", getvaultid());
+ }
}
}
@@ -786,6 +852,20 @@ function script HUB_SkillInvoke {
// and also hits behind (and on your square)
rectharm(@skillTarget, 0, 1, AdjustAttackpower(.@PW/2), HARM_PHYS, Ele_Neutral);
break;
+ case TMW2_STUNNINGSTRIKE:
+ // 70x3 = 210
+ .@PW=65+(5*@skillLv);
+ .@TM=1600+(@skillLv*200);
+ // Using a shield, so power is halved
+ if (getequipid(EQI_HAND_L) > 0)
+ .@PW=.@PW/2;
+ harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
+ sleep2(10);
+ harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
+ sleep2(10);
+ harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
+ sc_start SC_STUN, .@TM, 1, 3333, SCFLAG_NONE, @skillTarget;
+ break;
////////////////////////////////
// CLASS_OTHER
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index 2cc6eb076..0a35d2458 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -159,40 +159,46 @@ OnSun0000:
// Send salary to Town Administrators (20% from exports and 5GP/reputation)
// Strange Coins: 1 each 10 reputation points
+ .@msg$=sprintf(
+ "You've received the money for the term (%02d/%02d, the %dth legislature)",
+ gettime(GETTIME_DAYOFMONTH),
+ gettime(GETTIME_MONTH),
+ gettimeparam(GETTIME_WEEKDAY));
+
.@tax=$TULIM_EXPORT/500;
.@tax+=$TULIM_REPUTATION*5;
.@tax=min($TULIM_MONEY, .@tax);
.@cp=limit(1, $TULIM_REPUTATION/10, 10);
$TULIM_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($TULIM_MAYOR$), "Tulimshar Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($TULIM_MAYOR$), "Tulimshar Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
.@tax=$HALIN_EXPORT/500;
.@tax+=$HALIN_REPUTATION*5;
.@tax=min($HALIN_MONEY, .@tax);
.@cp=limit(1, $HALIN_REPUTATION/10, 10);
$HALIN_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($HALIN_MAYOR$), "Halinarzo Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($HALIN_MAYOR$), "Halinarzo Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
.@tax=$HURNS_EXPORT/500;
.@tax+=$HURNS_REPUTATION*5;
.@tax=min($HURNS_MONEY, .@tax);
.@cp=limit(1, $HURNS_REPUTATION/10, 10);
$HURNS_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($HURNS_MAYOR$), "Hurnscald Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($HURNS_MAYOR$), "Hurnscald Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
.@tax=$LOF_EXPORT/500;
.@tax+=$LOF_REPUTATION*5;
.@tax=min($LOF_MONEY, .@tax);
.@cp=limit(1, $LOF_REPUTATION/10, 10);
$LOF_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($LOF_MAYOR$), "LoF Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($LOF_MAYOR$), "LoF Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
.@tax=$NIVAL_EXPORT/500;
.@tax+=$NIVAL_REPUTATION*5;
.@tax=min($NIVAL_MONEY, .@tax);
.@cp=limit(1, $NIVAL_REPUTATION/10, 10);
$NIVAL_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($NIVAL_MAYOR$), "Nivalis Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($NIVAL_MAYOR$), "Nivalis Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
/* Towns with volunteer town admins
.@tax=$FROSTIA_EXPORT/500;
@@ -200,14 +206,14 @@ OnSun0000:
.@tax=min($FROSTIA_MONEY, .@tax);
.@cp=limit(1, $FROSTIA_REPUTATION/10, 10);
$FROSTIA_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($FROSTIA_MAYOR$), "Frostia Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
.@tax=$CANDOR_EXPORT/500;
.@tax+=$CANDOR_REPUTATION*5;
.@tax=min($CANDOR_MONEY, .@tax);
.@cp=limit(1, $CANDOR_REPUTATION/10, 10);
$CANDOR_MONEY-=.@tax;
- rodex_sendmail(gf_charnameid($CANDOR_MAYOR$), "Candor Townhall", "Term Income", "You've received the money for the term.", .@tax, StrangeCoin, .@cp);
+ rodex_sendmail(gf_charnameid($CANDOR_MAYOR$), "Candor Townhall", "Term Income", .@msg$, .@tax, StrangeCoin, .@cp);
*/
// Conduct elections
@@ -368,7 +374,7 @@ function script POL_TownInfo {
-// Town Managment
+// Town Management
// POL_Manage( TOWNCODE )
function script POL_Manage {
.@town$="$"+getarg(0);
@@ -432,9 +438,10 @@ function script POL_Manage {
break;
mesc l("Are you sure?");
if (askyesno() == ASK_YES) {
+ .@BN=rand2(.@cost/52, .@cost/24) + 1;
.@GP=getd("$"+getarg(0)+"_MONEY");
setd(.@town$+"_MONEY", .@GP-.@cost);
- setd(.@town$+"_EXPORT", .@EX+rand2(4,6));
+ setd(.@town$+"_EXPORT", .@EX+.@BN);
TOWN_ACTIONS[.@TP]+=1;
mesc l("Investment executed"), 2;
next;
@@ -563,7 +570,7 @@ function script POL_Manage {
}
detachrid();
attachrid(.@you);
- kamibroadcast(sprintf("%s has ANNULED THE EXILE %s from %s.",
+ kamibroadcast(sprintf("%s has ANNULLED THE EXILE %s from %s.",
.@MAYOR$, .@ex$, getarg(0)));
TOWN_ACTIONS[.@TP]+=6;
break;
diff --git a/npc/functions/util.txt b/npc/functions/util.txt
index 2ee553b51..5ca6c3d6e 100644
--- a/npc/functions/util.txt
+++ b/npc/functions/util.txt
@@ -991,7 +991,7 @@ function script gettimeparam {
if (.@p == GETTIME_WEEKDAY)
return .@a;
- // Months (estimative)
+ // Months (estimative. FIXME - use (gettime(YEAR)-1970)*12 + gettime(MONTH))
.@t=.@t/30;
if (.@p == GETTIME_MONTH)
return .@t;
diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt
index 55ae5ae9f..2911a47c1 100644
--- a/npc/functions/vault.txt
+++ b/npc/functions/vault.txt
@@ -4,12 +4,20 @@
// Description:
// Vault Utilities
+function script getvaultid {
+ // FIXME: Make this False
+ if ($BETASERVER && !debug)
+ return ##VAULT;
+ else
+ return 0;
+}
+
function script getvaultexp {
.@exp=getarg(0);
if (.@exp > 100)
Exception("ILLEGAL VAULT EXPERIENCE, FIXME URGENTLY. STOPPING SCRIPT BY FORCE WHILE DOING NOTHING.",
RB_DEBUGMES | RB_IRCBROADCAST | RB_GLOBALANNOUNCE | RB_ISFATAL);
- if (##VAULT) {
+ if (getvaultid()) {
##VAULT_EXP+=.@exp;
debugmes("Granting %d Soul Exp to %d under the Moubootaur's authority.",
.@exp, ##VAULT);
@@ -17,4 +25,17 @@ function script getvaultexp {
return;
}
+// MirrorLakeSendTo(World, Lake)
+function script MirrorLakeSendTo {
+ .@w=getarg(0);
+ .@t=getarg(1);
+ ##VAULT_GOTO=.@w;
+ ##VAULT_MLTO=.@t;
+ closeclientdialog;
+ dispbottom l("Darkness fills your vision...");
+ sleep2(1000);
+ kick(getcharid(3), 7); // 7 is not a valid kick reason
+ //atcommand("@kick "+strcharinfo(0));
+ end;
+}
diff --git a/npc/soren-2/main.txt b/npc/soren-2/main.txt
index 5fbd492e0..d732bf871 100644
--- a/npc/soren-2/main.txt
+++ b/npc/soren-2/main.txt
@@ -50,6 +50,13 @@ OnCheck:
// This doesn't works (or didn't used to), maybe because the way it's called
if (!mobcount("soren-2", "#SorenSanctum::OnCheck"))
setnpcdisplay "#SorenSanctum", NPC_SUMMONING_CIRC;
+ else
+ setnpcdisplay "#SorenSanctum", NPC_NO_SPRITE;
+ // Repeat if possible
+ if (!playerattached())
+ end;
+ if (getmap() == "soren-2")
+ addtimer2(10000, "#SorenSanctum::OnCheck");
end;
OnSanctum:
@@ -80,13 +87,13 @@ OnSanctum:
.@bonus=1;
}
- // Generate which monster/item would be dropped, depending on your (un)luck at ODDS
- .@mid=rand(1,10)+.@bonus;
+ // Generate which monster/item would be dropped, depending on your (un)luck at ODDS (FIXME - Mobs vs Player level)
+ .@mid=rand2(1,10)+.@bonus;
switch (.@mid) {
case 1:
.@monsterId = AngryRedScorpion ; break;
case 2:
- .@monsterId = CaveMaggot ; break;
+ .@monsterId = IceMaggot ; break;
case 3:
.@monsterId = SeaSlime ; break;
case 4:
@@ -116,7 +123,7 @@ OnSanctum:
case 3:
.@itemId = Aquada ; break;
case 4:
- .@itemId = StrenghtPotion ; break;
+ .@itemId = StrengthPotion ; break;
case 5:
.@itemId = Plushroom ; break;
case 6:
@@ -178,7 +185,10 @@ OnSanctum:
addtimer(rand(15000, 35000)+getusers(1)*5000, "#SorenSanctum::OnSanctum");
else
addtimer(rand(25000, 35000)+getusers(1)*5000, "#SorenSanctum::OnSanctum");
- end;
+
+ // Enforce the policy
+ addtimer2(10000, "#SorenSanctum::OnCheck");
+ goto OnCheck;