From 50f04060cd89f4730c6158b493f851e6ca7cf5c5 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Thu, 30 May 2024 21:10:15 -0400 Subject: [PATCH 01/50] feat(content): al kharid warriors --- data/src/scripts/_unpack/all.npc | 46 ------------------ .../areas/area_alkharid/configs/alkharid.npc | 48 ++++++++++++++++++- .../scripts/al_kharid_warrior.rs2 | 11 +++++ .../general/scripts/misc/npc_procs.rs2 | 40 ++++++++++++++++ 4 files changed, 98 insertions(+), 47 deletions(-) create mode 100644 data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 diff --git a/data/src/scripts/_unpack/all.npc b/data/src/scripts/_unpack/all.npc index a3fe4b33a..5adf7e3ef 100644 --- a/data/src/scripts/_unpack/all.npc +++ b/data/src/scripts/_unpack/all.npc @@ -584,52 +584,6 @@ param=defend_sound,female_hit param=death_sound,female_death category=barbarian -[alkharid_warrior] -name=Al-Kharid warrior -desc=Part of Al-Kharid's elite fighting force. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op3=Pickpocket -op2=Attack -vislevel=9 -recol1s=2340 -recol1d=4226 -recol2s=14724 -recol2d=13325 -recol3s=24075 -recol3d=18790 -recol4s=6273 -recol4d=4226 -recol5s=14801 -recol5d=18790 -model1=model_215_idk -model2=model_490_obj_wear -model3=model_251_idk -model4=model_292_idk -model5=model_151_idk -model6=model_176_idk -model7=model_254_idk -model8=model_181_idk -model9=model_541_obj_wear -model10=model_191_npc -respawnrate=25 -hitpoints=19 -attack=7 -strength=5 -defence=4 -param=attackbonus,10 -param=strengthbonus,10 -param=stabdefence,12 -param=slashdefence,15 -param=crushdefence,10 -param=magicdefence,-1 -param=rangedefence,12 -param=damagetype,^slash_style -param=attack_anim,human_sword_slash -param=defend_anim,human_sword_defend2 -param=attack_sound,hacksword_slash -// param=defend_sound,brassclash2 - [white_knight] name=White Knight desc=Nice armour! diff --git a/data/src/scripts/areas/area_alkharid/configs/alkharid.npc b/data/src/scripts/areas/area_alkharid/configs/alkharid.npc index 323400fa3..a5fa21efd 100644 --- a/data/src/scripts/areas/area_alkharid/configs/alkharid.npc +++ b/data/src/scripts/areas/area_alkharid/configs/alkharid.npc @@ -422,4 +422,50 @@ model6=model_181_idk model7=model_292_idk head1=model_53_idk_head head2=model_82_idk_head -wanderrange=2 \ No newline at end of file +wanderrange=2 + +[alkharid_warrior] +name=Al-Kharid warrior +desc=Part of Al-Kharid's elite fighting force. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op3=Pickpocket +op2=Attack +vislevel=9 +recol1s=2340 +recol1d=4226 +recol2s=14724 +recol2d=13325 +recol3s=24075 +recol3d=18790 +recol4s=6273 +recol4d=4226 +recol5s=14801 +recol5d=18790 +model1=model_215_idk +model2=model_490_obj_wear +model3=model_251_idk +model4=model_292_idk +model5=model_151_idk +model6=model_176_idk +model7=model_254_idk +model8=model_181_idk +model9=model_541_obj_wear +model10=model_191_npc +respawnrate=25 +hitpoints=19 +attack=7 +strength=5 +defence=4 +param=attackbonus,10 +param=strengthbonus,10 +param=stabdefence,12 +param=slashdefence,15 +param=crushdefence,10 +param=magicdefence,-1 +param=rangedefence,12 +param=damagetype,^slash_style +param=attack_anim,human_sword_slash +param=defend_anim,human_sword_defend2 +param=attack_sound,hacksword_slash +// param=defend_sound,brassclash2 \ No newline at end of file diff --git a/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 b/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 new file mode 100644 index 000000000..8081e9013 --- /dev/null +++ b/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 @@ -0,0 +1,11 @@ +// in osrs npc's with higher index's insta react to the player, whilst npcs with lower wait 1t +// These videos however are always insta react. 1t mustve been an osrs change later. +// https://youtu.be/D8VG03tRR1w?t=60 +// https://youtu.be/cjmEFliibGI +[ai_queue1,alkharid_warrior](int $arg) +def_npc_mode $npc_mode = npc_getmode; +~npc_default_retaliate; +if (finduid(%npc_attacking_uid) = true & $npc_mode ! opplayer2) { // in osrs it checks mode rather than ~npc_out_of_combat + // todo: npc_huntall? + ~npc_say_within_distance(npc_coord, alkharid_warrior, 5, "Brother, I will help thee with this infidel!"); +} diff --git a/data/src/scripts/general/scripts/misc/npc_procs.rs2 b/data/src/scripts/general/scripts/misc/npc_procs.rs2 index acecde5af..bb76e9b6d 100644 --- a/data/src/scripts/general/scripts/misc/npc_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/npc_procs.rs2 @@ -291,4 +291,44 @@ while ($maxX >= $minX) { $maxZ = sub($maxZ, 1); } $maxX = sub($maxX, 1); +} + +// uses for al kharid warriors +// makes all npcs that match with $npc and are within $distance, say $say and target the player; +[proc,npc_say_within_distance](coord $coord, npc $npc, int $distance, string $say) +def_int $radius = add(1, divide($distance, 8)); + +def_int $x = coordx($coord); +def_int $z = coordz($coord); + +def_int $centerX = divide($x, pow(2, 3)); +def_int $centerZ = divide($z, pow(2, 3)); + +def_int $maxX = add($centerX, $radius); +def_int $minX = sub($centerX, $radius); + +def_npc_uid $main_npc = npc_uid; + +while ($maxX >= $minX) { + def_int $zoneX = multiply($maxX, pow(2, 3)); + def_int $maxZ = add($centerZ, $radius); + def_int $minZ = sub($centerZ, $radius); + while ($maxZ >= $minZ) { + def_int $zoneZ = multiply($maxZ, pow(2, 3)); + + def_int $dx = sub($zoneX, $x); + def_int $dz = sub($zoneZ, $z); + def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); + // mes("Zone: _"); + npc_findallzone($zoneCoord); + while (npc_findnext = true) { + if (npc_type = $npc & distance($coord, npc_coord) <= $distance & npc_uid ! $main_npc & npc_getmode ! opplayer2) { + npc_say($say); + %npc_aggressive_player = uid; + ~npc_default_retaliate; + } + } + $maxZ = sub($maxZ, 1); + } + $maxX = sub($maxX, 1); } \ No newline at end of file From 39c7fed385bc05fed50755de7cf47361b5b90011 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Thu, 30 May 2024 21:15:13 -0400 Subject: [PATCH 02/50] fix(content): npc attack anims for pick pocket fails --- data/src/scripts/skill_thieving/scripts/thieving.rs2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/src/scripts/skill_thieving/scripts/thieving.rs2 b/data/src/scripts/skill_thieving/scripts/thieving.rs2 index cedb67a88..efcf4ec71 100644 --- a/data/src/scripts/skill_thieving/scripts/thieving.rs2 +++ b/data/src/scripts/skill_thieving/scripts/thieving.rs2 @@ -34,7 +34,10 @@ p_delay(0); // Birds above head. spotanim_pl(stunned_thieving, 124, 0); anim(%com_defendanim, 0); -npc_anim(human_unarmedpunch, 0); +npc_anim(npc_param(attack_anim), 0); +if (npc_param(attack_sound) ! null) { + sound_synth(npc_param(attack_sound), 0, 0); +} sound_synth(stunned, 0, 0); p_delay(0); // TODO Update this when combat is actually coded. From e2e4dc732ddaa42a2672dafec214ed052718d032 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Fri, 31 May 2024 11:12:49 -0400 Subject: [PATCH 03/50] feat(engine): npc_huntall and npc_huntnext commands --- .../scripts/engine/debug_npc_huntall.rs2 | 11 +++++++ data/src/scripts/engine.rs2 | 4 +++ src/lostcity/engine/script/ScriptIterators.ts | 16 +++++++--- src/lostcity/engine/script/ScriptOpcode.ts | 2 ++ .../engine/script/ScriptOpcodePointers.ts | 10 +++++++ .../engine/script/handlers/ServerOps.ts | 30 +++++++++++++++++++ 6 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 diff --git a/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 b/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 new file mode 100644 index 000000000..f29cd36f1 --- /dev/null +++ b/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 @@ -0,0 +1,11 @@ +[debugproc,npc_huntall] +npc_huntall(coord, 10, 0); +while (npc_huntnext = true) { + npc_say("Hello noob"); +} + +[debugproc,npc_huntall_secondary] +npc_huntall(coord, 10, 0); +while (.npc_huntnext = true) { + .npc_say("Hello noob"); +} diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index 20372166c..a6e2946c3 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -9,6 +9,9 @@ [command,huntall](coord $source, int $distance, int $checkvis) [command,huntnext]()(boolean) [command,.huntnext]()(boolean) +[command,npc_huntall](coord $source, int $distance, int $checkvis) +[command,npc_huntnext]()(boolean) +[command,.npc_huntnext]()(boolean) [command,inzone](coord $from, coord $to, coord $pos)(boolean) [command,lineofwalk](coord $from, coord $to)(boolean) [command,stat_random](int $level, int $low, int $high)(boolean) @@ -225,6 +228,7 @@ [command,npc_queue](int $ai_queue, int $arg, int $delay) [command,npc_range](coord $coord)(int) [command,npc_say](string $text) +[command,.npc_say](string $text) [command,npc_sethunt](int $distance) [command,npc_sethuntmode](hunt $hunt) [command,npc_setmode](npc_mode $mode) diff --git a/src/lostcity/engine/script/ScriptIterators.ts b/src/lostcity/engine/script/ScriptIterators.ts index f4f04e182..ab919ac1c 100644 --- a/src/lostcity/engine/script/ScriptIterators.ts +++ b/src/lostcity/engine/script/ScriptIterators.ts @@ -5,6 +5,7 @@ import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; import {hasLineOfSight, hasLineOfWalk} from '@2004scape/rsmod-pathfinder'; import Player from '#lostcity/entity/Player.js'; import Npc from '#lostcity/entity/Npc.js'; +import NpcType from '#lostcity/cache/NpcType.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; import Entity from '#lostcity/entity/Entity.js'; import Obj from '#lostcity/entity/Obj.js'; @@ -78,7 +79,7 @@ export class HuntIterator extends ScriptIterator { if (!player) { continue; } - if (Position.distanceToSW({x: this.x, z: this.z}, player) > this.distance) { + if (Position.distanceToSW({ x: this.x, z: this.z }, player) > this.distance) { continue; } if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, player.x, player.z, 1, 1, 1, 1)) { @@ -100,7 +101,14 @@ export class HuntIterator extends ScriptIterator { if (!npc) { continue; } - if (Position.distanceToSW({x: this.x, z: this.z}, npc) > this.distance) { + const npcType = NpcType.get(npc.type); + if (!npcType.op) { + continue; + } + if (!npcType.op[1]) { + continue; + } + if (Position.distanceToSW({ x: this.x, z: this.z }, npc) > this.distance) { continue; } if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { @@ -119,7 +127,7 @@ export class HuntIterator extends ScriptIterator { if (World.currentTick > this.tick) { throw new Error('[HuntIterator] tried to use an old iterator. Create a new iterator instead.'); } - if (Position.distanceToSW({x: this.x, z: this.z}, obj) > this.distance) { + if (Position.distanceToSW({ x: this.x, z: this.z }, obj) > this.distance) { continue; } if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, obj.x, obj.z, 1, 1, 1, 1)) { @@ -137,7 +145,7 @@ export class HuntIterator extends ScriptIterator { if (World.currentTick > this.tick) { throw new Error('[HuntIterator] tried to use an old iterator. Create a new iterator instead.'); } - if (Position.distanceToSW({x: this.x, z: this.z}, loc) > this.distance) { + if (Position.distanceToSW({ x: this.x, z: this.z }, loc) > this.distance) { continue; } if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, loc.x, loc.z, 1, 1, 1, 1)) { diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index dea5064b2..dea949d22 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -206,6 +206,8 @@ enum ScriptOpcode { NPC_QUEUE, // official NPC_RANGE, // official NPC_SAY, // official + NPC_HUNTALL, // official + NPC_HUNTNEXT, NPC_SETHUNT, // official NPC_SETHUNTMODE, // official NPC_SETMODE, // official diff --git a/src/lostcity/engine/script/ScriptOpcodePointers.ts b/src/lostcity/engine/script/ScriptOpcodePointers.ts index e35d572d7..abc88c076 100644 --- a/src/lostcity/engine/script/ScriptOpcodePointers.ts +++ b/src/lostcity/engine/script/ScriptOpcodePointers.ts @@ -140,6 +140,16 @@ const ScriptOpcodePointers: { set2: ['active_player2'], conditional: true }, + [ScriptOpcode.NPC_HUNTALL]: { + set: ['find_npc'] + }, + [ScriptOpcode.NPC_HUNTNEXT]: { + require: ['find_npc'], + require2: ['find_npc'], + set: ['active_npc'], + set2: ['active_npc2'], + conditional: true + }, [ScriptOpcode.IF_CLOSE]: { require: ['active_player'], require2: ['active_player2'] diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index 4df088259..1f1392d28 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -35,8 +35,10 @@ import { NumberNotNull, SpotAnimTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; +import Npc from '#lostcity/entity/Npc.js'; const ActivePlayer = [ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2]; +const ActiveNpc = [ScriptPointer.ActiveNpc, ScriptPointer.ActiveNpc2]; const ServerOps: CommandHandlers = { [ScriptOpcode.MAP_CLOCK]: state => { @@ -100,6 +102,34 @@ const ServerOps: CommandHandlers = { state.pushInt(1); }, + [ScriptOpcode.NPC_HUNTALL]: state => { + const [coord, distance, checkVis] = state.popInts(3); + + check(coord, CoordValid); + check(distance, NumberNotNull); + check(checkVis, HuntVisValid); + + const {level, x, z} = Position.unpackCoord(coord); + + state.huntIterator = new HuntIterator(World.currentTick, level, x, z, distance, checkVis, HuntModeType.NPC); + }, + + [ScriptOpcode.NPC_HUNTNEXT]: state => { + const result = state.huntIterator?.next(); + if (!result || result.done) { + state.pushInt(0); + return; + } + + if (!(result.value instanceof Npc)) { + throw new Error('[ServerOps] npc_huntnext command must result instance of Npc.'); + } + + state.activeNpc = result.value; + state.pointerAdd(ActiveNpc[state.intOperand]); + state.pushInt(1); + }, + [ScriptOpcode.INZONE]: state => { const [c1, c2, c3] = state.popInts(3); From 7acc8fcc3f4b35ea06d9f13e22044ea02860750c Mon Sep 17 00:00:00 2001 From: tannerdino Date: Fri, 31 May 2024 11:17:05 -0400 Subject: [PATCH 04/50] refactor(content): use npc_huntall for al kharid warriors --- .../scripts/al_kharid_warrior.rs2 | 9 ++++- .../general/scripts/misc/npc_procs.rs2 | 40 ------------------- 2 files changed, 8 insertions(+), 41 deletions(-) diff --git a/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 b/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 index 8081e9013..271599731 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/al_kharid_warrior.rs2 @@ -7,5 +7,12 @@ def_npc_mode $npc_mode = npc_getmode; ~npc_default_retaliate; if (finduid(%npc_attacking_uid) = true & $npc_mode ! opplayer2) { // in osrs it checks mode rather than ~npc_out_of_combat // todo: npc_huntall? - ~npc_say_within_distance(npc_coord, alkharid_warrior, 5, "Brother, I will help thee with this infidel!"); + npc_huntall(npc_coord, 5, 0); + while (npc_huntnext = true) { + if (npc_type = alkharid_warrior & npc_getmode ! opplayer2) { + npc_say("Brother, I will help thee with this infidel!"); + %npc_aggressive_player = uid; + ~npc_default_retaliate; + } + } } diff --git a/data/src/scripts/general/scripts/misc/npc_procs.rs2 b/data/src/scripts/general/scripts/misc/npc_procs.rs2 index bb76e9b6d..acecde5af 100644 --- a/data/src/scripts/general/scripts/misc/npc_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/npc_procs.rs2 @@ -291,44 +291,4 @@ while ($maxX >= $minX) { $maxZ = sub($maxZ, 1); } $maxX = sub($maxX, 1); -} - -// uses for al kharid warriors -// makes all npcs that match with $npc and are within $distance, say $say and target the player; -[proc,npc_say_within_distance](coord $coord, npc $npc, int $distance, string $say) -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - -def_npc_uid $main_npc = npc_uid; - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - // mes("Zone: _"); - npc_findallzone($zoneCoord); - while (npc_findnext = true) { - if (npc_type = $npc & distance($coord, npc_coord) <= $distance & npc_uid ! $main_npc & npc_getmode ! opplayer2) { - npc_say($say); - %npc_aggressive_player = uid; - ~npc_default_retaliate; - } - } - $maxZ = sub($maxZ, 1); - } - $maxX = sub($maxX, 1); } \ No newline at end of file From c7bc0d399ef186ea21d5d03f960c214ec13d4509 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Sat, 1 Jun 2024 17:16:06 -0400 Subject: [PATCH 05/50] feat(engine): More authentic commands engine command changes: advancestat (new) getcoord (new) getvar (updated) give (moved from proc) setlevel -> setstat setvar (updated) tele (moved from proc) proc command changes: maxlevel -> maxme jtele (consolidated into tele) tele accepts 0,50,50,0,0 or 3200 3200 syntax. Note the use of a comma and not an underscore tele can also work relative if you use tele up or tele down --- .../_test/scripts/cheats/cheat_clearinv.rs2 | 5 + .../_test/scripts/cheats/cheat_give.rs2 | 19 --- .../_test/scripts/cheats/cheat_help.rs2 | 5 +- .../{cheat_maxlevel.rs2 => cheat_maxme.rs2} | 4 +- .../_test/scripts/cheats/cheat_tele.rs2 | 38 ----- .../_test/scripts/cheats/cheat_telelevel.rs2 | 13 -- .../game_ranging/scripts/ranging.rs2 | 2 +- src/lostcity/cache/InvType.ts | 7 + src/lostcity/cache/VarPlayerType.ts | 13 +- src/lostcity/engine/World.ts | 2 +- src/lostcity/entity/Player.ts | 20 +-- src/lostcity/entity/Position.ts | 8 + .../incoming/handler/ClientCheatHandler.ts | 145 +++++++++++++----- .../incoming/handler/IfPlayerDesignHandler.ts | 2 +- .../225/incoming/handler/MoveClickHandler.ts | 4 +- 15 files changed, 162 insertions(+), 125 deletions(-) delete mode 100644 data/src/scripts/_test/scripts/cheats/cheat_give.rs2 rename data/src/scripts/_test/scripts/cheats/{cheat_maxlevel.rs2 => cheat_maxme.rs2} (91%) delete mode 100644 data/src/scripts/_test/scripts/cheats/cheat_telelevel.rs2 diff --git a/data/src/scripts/_test/scripts/cheats/cheat_clearinv.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_clearinv.rs2 index e412220dc..dd646587b 100644 --- a/data/src/scripts/_test/scripts/cheats/cheat_clearinv.rs2 +++ b/data/src/scripts/_test/scripts/cheats/cheat_clearinv.rs2 @@ -1,3 +1,4 @@ +// official name [debugproc,clearinv](inv $inv) if ($inv = null) { $inv = inv; @@ -6,6 +7,8 @@ if ($inv = null) { if ($inv = inv) { // inv is unprotected and we cannot check in content if something is (currently) inv_clear($inv); + + mes("Inventory wiped."); } else { if_close; if (p_finduid(uid) = true) { @@ -14,6 +17,8 @@ if ($inv = inv) { if ($inv = worn) { buildappearance(worn); } + + mes("Inventory wiped."); } else { @please_finish; } diff --git a/data/src/scripts/_test/scripts/cheats/cheat_give.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_give.rs2 deleted file mode 100644 index 82827bf38..000000000 --- a/data/src/scripts/_test/scripts/cheats/cheat_give.rs2 +++ /dev/null @@ -1,19 +0,0 @@ -[debugproc,give](namedobj $obj, int $count) -if ($obj = null) { - @debugusage("::give (obj) (count)", "::give rune_longsword", "::give rune_arrow 5"); - return; -} - -if ($count = 0) { - $count = 1; -} - -def_int $overflow = inv_itemspace2(inv, $obj, $count, inv_size(inv)); -$count = sub($count, $overflow); - -if ($count = 0) { - return; -} - -inv_add(inv, $obj, $count); -mes("Added x "); diff --git a/data/src/scripts/_test/scripts/cheats/cheat_help.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_help.rs2 index e422b9e94..b31ac3422 100644 --- a/data/src/scripts/_test/scripts/cheats/cheat_help.rs2 +++ b/data/src/scripts/_test/scripts/cheats/cheat_help.rs2 @@ -14,7 +14,7 @@ if (p_finduid(uid) = true) { ~mesbox("@blu@Client commands|@whi@::debug@bla@ - Toggles the debug overlay|@whi@::chat@bla@ - Switches the chat font-era|@whi@::perf@bla@ - Show FPS"); // Content - ~mesbox("@blu@Content testing|@whi@::reset@bla@ - Reset your progress|@whi@::minlevel@bla@ - Set all your stats to level 1|@whi@::maxlevel@bla@ - Set all your stats to level 99|@whi@::setlevel@bla@ - Set a skill to a specific level"); + ~mesbox("@blu@Content testing|@whi@::reset@bla@ - Reset your progress|@whi@::minlevel@bla@ - Set all your stats to level 1|@whi@::maxme@bla@ - Set all your stats to level 99|@whi@::setstat@bla@ - Set a stat to a specific level"); ~mesbox("@blu@Content testing|@whi@::addxp@bla@ - Add XP to a skill|@whi@::setxp@bla@ - Set your XP in a skill"); ~mesbox("@blu@Content testing|@whi@::bank@bla@ - Open your bank anywhere|@whi@::bank_preset@bla@ - Fill your bank with common items|@whi@::clearinv@bla@ - Clear a named inventory|@whi@::give@bla@ - Give yourself any item"); ~mesbox("@blu@Content testing|@whi@::1hp@bla@ - Set your health to 1|@whi@::foodbank@bla@ - Fill your bank with food|@whi@::energy@bla@ - Restore your run energy"); @@ -22,8 +22,7 @@ if (p_finduid(uid) = true) { ~mesbox("@blu@Content testing|@whi@::fmtest@bla@ - Give yourself items to test firemaking|@whi@::fmbank@bla@ - Fill your bank with firemaking items"); ~mesbox("@blu@Content testing|@whi@::fishtest@bla@ - Give yourself items to test fishing"); ~mesbox("@blu@Content testing|@whi@::giverunes@bla@ - Give yourself items to test magic|@whi@::magicbank@bla@ - Fill your bank with magic items"); - ~mesbox("@blu@Content testing|@whi@::tele@bla@ - Teleport to specific coordinates|@whi@::jtele@bla@ - Teleport to specific coordinates in Jagex's format"); - ~mesbox("@blu@Content testing|@whi@::north@bla@/@whi@::east@bla@/@whi@::south@bla@/@whi@::west@bla@ - Teleport 1 tile in a direction|@whi@::up@bla@/@whi@::down@bla@ - Teleport 1 tile up or down|@whi@::telelevel@bla@ - Teleport to a specific level at your current position"); + ~mesbox("@blu@Content testing|@whi@::tele@bla@ - Teleport to specific coordinates|@whi@::tele up@bla@ - Teleport up a level|@whi@::tele down@bla@ - Teleport down a level|@whi@::north@bla@/@whi@::east@bla@/@whi@::south@bla@/@whi@::west@bla@ - Teleport 1 tile in a direction"); ~mesbox("@blu@Content testing|@whi@::home@bla@ - Teleport to Lumbridge|@whi@::varrock@bla@ - Teleport to Varrock|@whi@::falador@bla@ - Teleport to Falador|@whi@::draynor@bla@ - Teleport to Draynor Village"); ~mesbox("@blu@Content testing|@whi@::portsarim@bla@ - Teleport to Port Sarim|@whi@::rimmington@bla@ - Teleport to Rimmington|@whi@::alkharid@bla@ - Teleport to Al Kharid|@whi@::seers@bla@ - Teleport to Seers Village"); ~mesbox("@blu@Content testing|@whi@::giants@bla@ - Teleport to Giants in Edgeville Dungeon"); diff --git a/data/src/scripts/_test/scripts/cheats/cheat_maxlevel.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_maxme.rs2 similarity index 91% rename from data/src/scripts/_test/scripts/cheats/cheat_maxlevel.rs2 rename to data/src/scripts/_test/scripts/cheats/cheat_maxme.rs2 index 0ff9ad365..2665a82bc 100644 --- a/data/src/scripts/_test/scripts/cheats/cheat_maxlevel.rs2 +++ b/data/src/scripts/_test/scripts/cheats/cheat_maxme.rs2 @@ -1,4 +1,5 @@ -[debugproc,maxlevel] +// official name +[debugproc,maxme] if_close; if (p_finduid(uid) = true) { def_int $max_xp = 130344310; @@ -21,6 +22,7 @@ if (p_finduid(uid) = true) { givexp(agility, $max_xp); givexp(thieving, $max_xp); givexp(runecraft, $max_xp); + mes("You're maxed."); } else { @please_finish; } diff --git a/data/src/scripts/_test/scripts/cheats/cheat_tele.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_tele.rs2 index c77fbce33..dca1e701c 100644 --- a/data/src/scripts/_test/scripts/cheats/cheat_tele.rs2 +++ b/data/src/scripts/_test/scripts/cheats/cheat_tele.rs2 @@ -1,25 +1,3 @@ -[debugproc,tele](int $x, int $z, int $y) -if ($x <= 0 & $z <= 0 & $y <= 0) { - @debugusage("::tele (x) (z) (level)", "::tele 3222 3222 0", ""); - return; -} - -if_close; -if (p_finduid(uid) = true) { - def_int $dx = sub($x, coordx(coord)); - def_int $dz = sub($z, coordz(coord)); - def_int $dy = sub($y, coordy(coord)); - p_teleport(movecoord(coord, $dx, $dy, $dz)); -} - -[debugproc,jtele](coord $coord) -if_close; -if (p_finduid(uid) = true) { - p_teleport($coord); -} else { - @please_finish; -} - [debugproc,west](int $distance) if_close; if (p_finduid(uid) = true) { @@ -36,22 +14,6 @@ if (p_finduid(uid) = true) { @please_finish; } -[debugproc,up](int $distance) -if_close; -if (p_finduid(uid) = true) { - p_teleport(movecoord(coord, 0, max($distance, 1), 0)); -} else { - @please_finish; -} - -[debugproc,down](int $distance) -if_close; -if (p_finduid(uid) = true) { - p_teleport(movecoord(coord, 0, calc(0 - max($distance, 1)), 0)); -} else { - @please_finish; -} - [debugproc,north](int $distance) if_close; if (p_finduid(uid) = true) { diff --git a/data/src/scripts/_test/scripts/cheats/cheat_telelevel.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_telelevel.rs2 deleted file mode 100644 index 0ab26271e..000000000 --- a/data/src/scripts/_test/scripts/cheats/cheat_telelevel.rs2 +++ /dev/null @@ -1,13 +0,0 @@ -[debugproc,telelevel](int $y) -if ($y <= 0) { - @debugusage("::telelevel (level)", "::telelevel 1", ""); - return; -} - -if_close; -if (p_finduid(uid) = true) { - def_int $currentY = coordy(coord); - p_teleport(movecoord(coord, 0, sub($y, $currentY), 0)); -} else { - @please_finish; -} diff --git a/data/src/scripts/minigames/game_ranging/scripts/ranging.rs2 b/data/src/scripts/minigames/game_ranging/scripts/ranging.rs2 index e61fff190..1b878cf29 100644 --- a/data/src/scripts/minigames/game_ranging/scripts/ranging.rs2 +++ b/data/src/scripts/minigames/game_ranging/scripts/ranging.rs2 @@ -1,5 +1,5 @@ // ::tele 2671 3418 0 -// ::jtele 0_41_53_47_26 +// ::tele 0,41,53,47,26 // see: https://www.youtube.com/watch?v=VuBv32OZ1ss // https://www.runehq.com/minigame/ranging-mini-game diff --git a/src/lostcity/cache/InvType.ts b/src/lostcity/cache/InvType.ts index e5b4434af..5be61b3db 100644 --- a/src/lostcity/cache/InvType.ts +++ b/src/lostcity/cache/InvType.ts @@ -12,6 +12,10 @@ export default class InvType extends ConfigType { static SCOPE_PERM = 1; static SCOPE_SHARED = 2; + // commonly referenced in-engine + static INV = -1; + static WORN = -1; + static load(dir: string) { InvType.configNames = new Map(); InvType.configs = []; @@ -34,6 +38,9 @@ export default class InvType extends ConfigType { InvType.configNames.set(config.debugname, id); } } + + InvType.INV = InvType.getId('inv'); + InvType.WORN = InvType.getId('worn'); } static get(id: number): InvType { diff --git a/src/lostcity/cache/VarPlayerType.ts b/src/lostcity/cache/VarPlayerType.ts index 9befc44ef..7c0435d4d 100644 --- a/src/lostcity/cache/VarPlayerType.ts +++ b/src/lostcity/cache/VarPlayerType.ts @@ -7,11 +7,16 @@ import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class VarPlayerType extends ConfigType { + private static configNames = new Map(); + private static configs: VarPlayerType[] = []; + static SCOPE_TEMP = 0; static SCOPE_PERM = 1; - private static configNames = new Map(); - private static configs: VarPlayerType[] = []; + // commonly referenced in-engine + static PLAYER_RUN = -1; + static TEMP_RUN = -1; + static LASTCOMBAT = -1; static load(dir: string) { VarPlayerType.configNames = new Map(); @@ -40,6 +45,10 @@ export default class VarPlayerType extends ConfigType { VarPlayerType.configNames.set(config.debugname, id); } } + + VarPlayerType.PLAYER_RUN = VarPlayerType.getId('player_run'); + VarPlayerType.TEMP_RUN = VarPlayerType.getId('temp_run'); + VarPlayerType.LASTCOMBAT = VarPlayerType.getId('lastcombat'); } static get(id: number): VarPlayerType { diff --git a/src/lostcity/engine/World.ts b/src/lostcity/engine/World.ts index cc3006954..8a277abb3 100644 --- a/src/lostcity/engine/World.ts +++ b/src/lostcity/engine/World.ts @@ -570,7 +570,7 @@ class World { player.closeModal(); player.unsetMapFlag(); player.logoutRequested = true; - player.setVar(VarPlayerType.getId('lastcombat'), 0); // temp fix for logging out in combat, since logout trigger conditions still run... + player.setVar(VarPlayerType.LASTCOMBAT, 0); // temp fix for logging out in combat, since logout trigger conditions still run... } if (!player.logoutRequested) { diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index e44ab01f9..bb7fa39df 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -446,20 +446,20 @@ export default class Player extends PathingEntity { } if (this.runenergy < 100) { - this.setVar(VarPlayerType.getId('player_run'), 0); - this.setVar(VarPlayerType.getId('temp_run'), 0); + this.setVar(VarPlayerType.PLAYER_RUN, 0); + this.setVar(VarPlayerType.TEMP_RUN, 0); } if (this.moveSpeed !== MoveSpeed.INSTANT) { this.moveSpeed = this.defaultMoveSpeed(); - if (this.getVar(VarPlayerType.getId('temp_run'))) { + if (this.getVar(VarPlayerType.TEMP_RUN)) { this.moveSpeed = MoveSpeed.RUN; } } if (!super.processMovement()) { // todo: this is running every idle tick - this.setVar(VarPlayerType.getId('temp_run'), 0); + this.setVar(VarPlayerType.TEMP_RUN, 0); } const moved = this.lastX !== this.x || this.lastZ !== this.z; @@ -479,8 +479,8 @@ export default class Player extends PathingEntity { this.runenergy = Math.max(this.runenergy - loss, 0); if (this.runenergy === 0) { - this.setVar(VarPlayerType.getId('player_run'), 0); - this.setVar(VarPlayerType.getId('temp_run'), 0); + this.setVar(VarPlayerType.PLAYER_RUN, 0); + this.setVar(VarPlayerType.TEMP_RUN, 0); } } } @@ -499,7 +499,7 @@ export default class Player extends PathingEntity { } defaultMoveSpeed(): MoveSpeed { - return this.getVar(VarPlayerType.getId('player_run')) ? MoveSpeed.RUN : MoveSpeed.WALK; + return this.getVar(VarPlayerType.PLAYER_RUN) ? MoveSpeed.RUN : MoveSpeed.WALK; } // ---- @@ -1993,18 +1993,20 @@ export default class Player extends PathingEntity { if (this.combatLevel != this.getCombatLevel()) { this.combatLevel = this.getCombatLevel(); - this.generateAppearance(InvType.getId('worn')); + this.generateAppearance(InvType.WORN); } } setLevel(stat: number, level: number) { + level = Math.min(99, Math.max(1, level)); + this.baseLevels[stat] = level; this.levels[stat] = level; this.stats[stat] = getExpByLevel(level); if (this.getCombatLevel() != this.combatLevel) { this.combatLevel = this.getCombatLevel(); - this.generateAppearance(InvType.getId('worn')); + this.generateAppearance(InvType.WORN); } } diff --git a/src/lostcity/entity/Position.ts b/src/lostcity/entity/Position.ts index b3dde7cfa..fc7dc5f82 100644 --- a/src/lostcity/entity/Position.ts +++ b/src/lostcity/entity/Position.ts @@ -124,5 +124,13 @@ export const Position = { const destHorizontal: number = destX + destWidth; const destVertical: number = destZ + destHeight; return !(destX >= srcHorizontal || destHorizontal <= srcX || destZ >= srcVertical || destVertical <= srcZ); + }, + + formatString(level: number, x: number, z: number, separator = '_'): string { + const mx = x >> 6; + const mz = z >> 6; + const lx = x & 0x3f; + const lz = z & 0x3f; + return level + separator + mx + separator + mz + separator + lx + separator + lz; } } as const; diff --git a/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts b/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts index e4b0a4bf4..4c983ba07 100644 --- a/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts +++ b/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts @@ -38,62 +38,138 @@ export default class ClientCheatHandler extends MessageHandler { player.playerLog('Cheat ran', cheat); - if (cmd === 'reload' && Environment.LOCAL_DEV) { - World.reload(); + // authentic + if (cmd === 'advancestat') { + // todo find a real usage to see if we have it right + if (args.length < 1) { + return false; + } - // todo: we're probably reloading twice now, just to get count? - const count = ScriptProvider.load('data/pack'); - player.messageGame(`Reloaded ${count} scripts.`); - } else if (cmd === 'rebuild' && Environment.LOCAL_DEV) { - World.devThread!.postMessage({ - type: 'pack' - }); - } else if (cmd === 'setvar') { - const varp = args.shift(); - if (!varp) { - player.messageGame('Usage: ::setvar '); + // ::advancestat (levels) + const stat = Player.SKILLS.indexOf(args[0]); + const level = Math.min(99, Math.max(1, tryParseInt(args[1], 1))); + + if (stat === -1) { return false; } - const value = args.shift(); - if (!value) { - player.messageGame('Usage: ::setvar '); + player.setLevel(stat, player.baseLevels[stat] + level); + } else if (cmd === 'getcoord') { + // todo find a real usage to see if we have it right + player.messageGame(Position.formatString(player.level, player.x, player.z, '_')); + } else if (cmd === 'getvar') { + // todo find a real usage to see if we have it right + if (args.length < 1) { return false; } - const varpType = VarPlayerType.getByName(varp); - if (varpType) { - player.setVar(varpType.id, parseInt(value, 10)); - player.messageGame(`Setting var ${varp} to ${value}`); - } else { - player.messageGame(`Unknown var ${varp}`); + // ::getvar + const varp = VarPlayerType.getId(args[0]); + + if (varp === -1) { + return false; } - } else if (cmd === 'getvar') { - const varp = args.shift(); - if (!varp) { - player.messageGame('Usage: ::getvar '); + + const value = player.getVar(varp); + player.messageGame('get ' + args[0] + ': ' + value); + } else if (cmd === 'give') { + if (args.length < 1) { return false; } - const varpType = VarPlayerType.getByName(varp); - if (varpType) { - player.messageGame(`Var ${varp}: ${player.vars[varpType.id]}`); - } else { - player.messageGame(`Unknown var ${varp}`); + // ::give (id) + const obj = ObjType.getId(args[0]); + const count = Math.max(1, Math.min(tryParseInt(args[1], 1), 0x7fffffff)); + + if (obj === -1) { + return false; } - } else if (cmd === 'setlevel') { + + player.invAdd(InvType.INV, obj, count, false); + } else if (cmd === 'givecrap') { + // todo find a real usage to be able to write this + } else if (cmd === 'givemany') { + // todo find a real usage to be able to write this + } else if (cmd === 'setstat') { if (args.length < 2) { - player.messageGame('Usage: ::setlevel '); return false; } + // ::setstat const stat = Player.SKILLS.indexOf(args[0]); if (stat === -1) { - player.messageGame(`Unknown stat ${args[0]}`); return false; } player.setLevel(stat, parseInt(args[1])); + } else if (cmd === 'setvar') { + if (args.length < 2) { + return false; + } + + // ::setvar + const varp = VarPlayerType.getId(args[0]); + const value = Math.max(-0x80000000, Math.min(tryParseInt(args[1], 0), 0x7fffffff)); + + if (varp === -1) { + return false; + } + + player.setVar(varp, value); + player.messageGame('set ' + args[0] + ': to ' + value); + } else if (cmd === 'tele') { + if (args.length < 1) { + return false; + } + + // ::tele level,x,z,x,z + // ::tele up + // ::tele down + + if (args[0] === 'up') { + player.teleJump(player.x, player.z, player.level + 1); + player.messageGame('::tele ' + Position.formatString(player.level, player.x, player.z, ',')); + } else if (args[0] === 'down') { + player.teleJump(player.x, player.z, player.level - 1); + player.messageGame('::tele ' + Position.formatString(player.level, player.x, player.z, ',')); + } else if (args[0].indexOf(',') === -1) { + // not authentic but rsps users are used to absolute coordinates + player.teleJump(tryParseInt(args[0], 3200), tryParseInt(args[1], 3200), tryParseInt(args[2], player.level)); + } else { + const coord = args[0].split(','); + if (coord.length !== 5) { + return false; + } + + const level = tryParseInt(coord[0], 0); + const mx = tryParseInt(coord[1], 50); + const mz = tryParseInt(coord[2], 50); + const lx = tryParseInt(coord[3], 0); + const lz = tryParseInt(coord[4], 0); + + if (level < 0 || level > 3 || + mx < 0 || mx > 255 || + mz < 0 || mz > 255 || + lx < 0 || lx > 63 || + lz < 0 || lz > 63 + ) { + return false; + } + + player.teleJump((mx << 6) + lx, (mz << 6) + lz, level); + } + } + // custom + else if (cmd === 'reload' && Environment.LOCAL_DEV) { + World.reload(); + + // todo: we're probably reloading twice now, just to get count? + const count = ScriptProvider.load('data/pack'); + player.messageGame(`Reloaded ${count} scripts.`); + } else if (cmd === 'rebuild' && Environment.LOCAL_DEV) { + World.devThread!.postMessage({ + type: 'pack' + }); } else if (cmd === 'setxp') { if (args.length < 2) { player.messageGame('Usage: ::setxp '); @@ -107,7 +183,6 @@ export default class ClientCheatHandler extends MessageHandler { } const exp = parseInt(args[1]) * 10; - // player.setLevel(stat, player.getLevelByExp(exp)); player.stats[stat] = exp; } else if (cmd === 'minlevel') { for (let i = 0; i < Player.SKILLS.length; i++) { diff --git a/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts b/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts index 9ff7eca7b..57edcaeb2 100644 --- a/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts +++ b/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts @@ -53,7 +53,7 @@ export default class IfPlayerDesignHandler extends MessageHandler { } if (player.runenergy < 100) { - player.setVar(VarPlayerType.getId('temp_run'), 0); + player.setVar(VarPlayerType.TEMP_RUN, 0); } else { - player.setVar(VarPlayerType.getId('temp_run'), message.ctrlHeld); + player.setVar(VarPlayerType.TEMP_RUN, message.ctrlHeld); } return true; From 03080e23a2cfe747a32501b4b1532dd368ec1677 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 18:14:24 -0400 Subject: [PATCH 06/50] feat(engine): npc_find command --- .../scripts/engine/debug_npc_huntall.rs2 | 10 ++++ data/src/scripts/engine.rs2 | 2 + src/lostcity/engine/script/ScriptOpcode.ts | 1 + .../engine/script/ScriptOpcodePointers.ts | 5 ++ src/lostcity/engine/script/handlers/NpcOps.ts | 50 +++++++++++++++++++ 5 files changed, 68 insertions(+) diff --git a/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 b/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 index f29cd36f1..cf8b615bf 100644 --- a/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 +++ b/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 @@ -9,3 +9,13 @@ npc_huntall(coord, 10, 0); while (.npc_huntnext = true) { .npc_say("Hello noob"); } + +[debugproc,npc_find] +if (npc_find(coord, goblin_unarmed1, 5, 0) = true) { + npc_say("Hello"); +} + +[debugproc,npc_find2] +if (.npc_find(coord, goblin_unarmed1, 5, 0) = true) { + .npc_say("Hello"); +} \ No newline at end of file diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index a6e2946c3..d2afb0825 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -222,6 +222,8 @@ [command,npc_delay](int $delay) [command,.npc_delay](int $delay) [command,npc_facesquare](coord $coord) +[command,npc_find](coord $coord, npc $npc, int $distance, int $checkvis)(boolean) +[command,.npc_find](coord $coord, npc $npc, int $distance, int $checkvis)(boolean) [command,npc_findexact](coord $coord, npc $npc)(boolean) [command,npc_findhero]()(boolean) [command,npc_param]/*(param $param)(dynamic)*/ diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index dea949d22..5044b8f12 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -194,6 +194,7 @@ enum ScriptOpcode { NPC_DEL, // official NPC_DELAY, // official NPC_FACESQUARE, // official + NPC_FIND, // official NPC_FINDEXACT, // official NPC_FINDHERO, // official NPC_FINDALLZONE, diff --git a/src/lostcity/engine/script/ScriptOpcodePointers.ts b/src/lostcity/engine/script/ScriptOpcodePointers.ts index abc88c076..573f05592 100644 --- a/src/lostcity/engine/script/ScriptOpcodePointers.ts +++ b/src/lostcity/engine/script/ScriptOpcodePointers.ts @@ -502,6 +502,11 @@ const ScriptOpcodePointers: { require: ['active_npc'], require2: ['active_npc2'] }, + [ScriptOpcode.NPC_FIND]: { + set: ['active_npc'], + set2: ['active_npc2'], + conditional: true + }, [ScriptOpcode.NPC_FINDALLZONE]: { set: ['find_npc'] }, diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index 18eca8712..625097ea0 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -12,6 +12,8 @@ import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import {NpcIterator} from '#lostcity/engine/script/ScriptIterators.js'; +import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; +import {hasLineOfSight, hasLineOfWalk} from '@2004scape/rsmod-pathfinder'; import Loc from '#lostcity/entity/Loc.js'; import Obj from '#lostcity/entity/Obj.js'; @@ -320,6 +322,54 @@ const NpcOps: CommandHandlers = { state.activeNpc.spotanim(spotanim, height, delay); }), + [ScriptOpcode.NPC_FIND]: state => { + const [coord, npcType, distance, checkVis] = state.popInts(4); + + const {level, x, z} = Position.unpackCoord(coord); + const centerX: number = Position.zone(x); + const centerZ: number = Position.zone(z); + const radius: number = (1 + (distance / 8)) | 0; + const maxX = centerX + radius; + const minX = centerX - radius; + const maxZ = centerZ + radius; + const minZ = centerZ - radius; + + let closestNpc; + let closestDistance = distance; + + for (let i: number = maxX; i >= minX; i--) { + const zoneX: number = i << 3; + for (let j: number = maxZ; j >= minZ; j--) { + const zoneZ: number = j << 3; + state.npcIterator = new NpcIterator(World.currentTick, level, zoneX, zoneZ); + for (const npc of state.npcIterator) { + if(npc && npc.type === npcType) { + if (checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(level, x, z, npc.x, npc.z, 1, 1, 1, 1)) { + continue; + } + if (checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(level, x, z, npc.x, npc.z, 1, 1, 1, 1)) { + continue; + } + const npcDistance = Position.distanceToSW({x, z}, npc); + if (npcDistance <= closestDistance) { + closestNpc = npc; + closestDistance = npcDistance; + } + } + } + } + } + + if (!closestNpc) { + state.pushInt(0); + return; + } + // not necessary but if we want to refer to the original npc again, we can + state.activeNpc = closestNpc; + state.pointerAdd(ActiveNpc[state.intOperand]); + state.pushInt(1); + }, + [ScriptOpcode.NPC_FINDALLZONE]: state => { const coord: number = check(state.popInt(), CoordValid); From 848c20b934b7466cd6748fc7e375fe2ab8fd2d6b Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 20:48:01 -0400 Subject: [PATCH 07/50] feat(engine): npc_findallany command and slight NpcIterator refactor --- .../scripts/engine/debug_npc_huntall.rs2 | 12 ++++ data/src/scripts/engine.rs2 | 2 + src/lostcity/engine/script/ScriptIterators.ts | 70 ++++++++++++++++--- src/lostcity/engine/script/ScriptOpcode.ts | 1 + .../engine/script/ScriptOpcodePointers.ts | 3 + src/lostcity/engine/script/handlers/NpcOps.ts | 66 ++++++++--------- src/lostcity/entity/NpcIteratorType.ts | 6 ++ 7 files changed, 117 insertions(+), 43 deletions(-) create mode 100644 src/lostcity/entity/NpcIteratorType.ts diff --git a/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 b/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 index cf8b615bf..e2181609e 100644 --- a/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 +++ b/data/src/scripts/_test/scripts/engine/debug_npc_huntall.rs2 @@ -18,4 +18,16 @@ if (npc_find(coord, goblin_unarmed1, 5, 0) = true) { [debugproc,npc_find2] if (.npc_find(coord, goblin_unarmed1, 5, 0) = true) { .npc_say("Hello"); +} + +[debugproc,npc_findallany] +npc_findallany(coord, 10, 0); +while (npc_findnext = true) { + npc_say("NOOOBS"); +} + +[debugproc,npc_findallany2] +.npc_findallany(coord, 10, 0); +while (.npc_findnext = true) { + .npc_say("NOOOBS"); } \ No newline at end of file diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index d2afb0825..1d72b5660 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -224,6 +224,8 @@ [command,npc_facesquare](coord $coord) [command,npc_find](coord $coord, npc $npc, int $distance, int $checkvis)(boolean) [command,.npc_find](coord $coord, npc $npc, int $distance, int $checkvis)(boolean) +[command,npc_findallany](coord $coord, int $distance, int $checkvis)(boolean) +[command,.npc_findallany](coord $coord, int $distance, int $checkvis)(boolean) [command,npc_findexact](coord $coord, npc $npc)(boolean) [command,npc_findhero]()(boolean) [command,npc_param]/*(param $param)(dynamic)*/ diff --git a/src/lostcity/engine/script/ScriptIterators.ts b/src/lostcity/engine/script/ScriptIterators.ts index ab919ac1c..663c46d44 100644 --- a/src/lostcity/engine/script/ScriptIterators.ts +++ b/src/lostcity/engine/script/ScriptIterators.ts @@ -7,6 +7,7 @@ import Player from '#lostcity/entity/Player.js'; import Npc from '#lostcity/entity/Npc.js'; import NpcType from '#lostcity/cache/NpcType.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; +import NpcIteratorType from '#lostcity/entity/NpcIteratorType.js'; import Entity from '#lostcity/entity/Entity.js'; import Obj from '#lostcity/entity/Obj.js'; @@ -166,27 +167,74 @@ export class NpcIterator extends ScriptIterator { private readonly level: number; private readonly x: number; private readonly z: number; + private readonly minX: number; + private readonly maxX: number; + private readonly minZ: number; + private readonly maxZ: number; + private readonly distance: number; + private readonly checkVis: HuntVis; + private readonly type: NpcIteratorType; - constructor(tick: number, level: number, x: number, z: number) { + constructor(tick: number, level: number, x: number, z: number, distance: number, checkVis: HuntVis, type: NpcIteratorType) { super(tick); - this.level = level; + const centerX: number = Position.zone(x); + const centerZ: number = Position.zone(z); + const radius: number = (1 + (distance / 8)) | 0; this.x = x; this.z = z; + this.level = level; + this.maxX = centerX + radius; + this.minX = centerX - radius; + this.maxZ = centerZ + radius; + this.minZ = centerZ - radius; + this.distance = distance; + this.checkVis = checkVis; + this.type = type; } protected *generator(): IterableIterator { - const npcs: Set = World.getZoneNpcs(this.x, this.z, this.level); - - for (const nid of npcs) { - if (World.currentTick > this.tick) { - throw new Error('[NpcIterator] tried to use an old iterator. Create a new iterator instead.'); + if (this.type === NpcIteratorType.ZONE) { + const npcs: Set = World.getZoneNpcs(this.x, this.z, this.level); + for (const nid of npcs) { + if (World.currentTick > this.tick) { + throw new Error('[NpcIterator] tried to use an old iterator. Create a new iterator instead.'); + } + const npc: Npc | null = World.getNpc(nid); + if (!npc) { + continue; + } + yield npc; } - const npc: Npc | null = World.getNpc(nid); - if (!npc) { - continue; + } else if (this.type === NpcIteratorType.DISTANCE) { + for (let x: number = this.maxX; x >= this.minX; x--) { + const zoneX: number = x << 3; + for (let z: number = this.maxZ; z >= this.minZ; z--) { + const zoneZ: number = z << 3; + const npcs: Set = World.getZoneNpcs(zoneX, zoneZ, this.level); + for (const nid of npcs) { + if (World.currentTick > this.tick) { + throw new Error('[NpcIterator] tried to use an old iterator. Create a new iterator instead.'); + } + const npc: Npc | null = World.getNpc(nid); + if (!npc) { + continue; + } + if (Position.distanceToSW({ x: this.x, z: this.z }, npc) > this.distance) { + continue; + } + if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { + continue; + } + if (this.checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { + continue; + } + yield npc; + } + } } - yield npc; } + + } } diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index 5044b8f12..03dda3d5b 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -195,6 +195,7 @@ enum ScriptOpcode { NPC_DELAY, // official NPC_FACESQUARE, // official NPC_FIND, // official + NPC_FINDALLANY, // official NPC_FINDEXACT, // official NPC_FINDHERO, // official NPC_FINDALLZONE, diff --git a/src/lostcity/engine/script/ScriptOpcodePointers.ts b/src/lostcity/engine/script/ScriptOpcodePointers.ts index 573f05592..244cefad2 100644 --- a/src/lostcity/engine/script/ScriptOpcodePointers.ts +++ b/src/lostcity/engine/script/ScriptOpcodePointers.ts @@ -507,6 +507,9 @@ const ScriptOpcodePointers: { set2: ['active_npc2'], conditional: true }, + [ScriptOpcode.NPC_FINDALLANY]: { + set: ['find_npc'] + }, [ScriptOpcode.NPC_FINDALLZONE]: { set: ['find_npc'] }, diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index 625097ea0..53beaa993 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -12,12 +12,11 @@ import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import {NpcIterator} from '#lostcity/engine/script/ScriptIterators.js'; -import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; -import {hasLineOfSight, hasLineOfWalk} from '@2004scape/rsmod-pathfinder'; import Loc from '#lostcity/entity/Loc.js'; import Obj from '#lostcity/entity/Obj.js'; import { Position } from '#lostcity/entity/Position.js'; +import NpcIteratorType from '#lostcity/entity/NpcIteratorType.js'; import Npc from '#lostcity/entity/Npc.js'; import NpcMode from '#lostcity/entity/NpcMode.js'; import Entity from '#lostcity/entity/Entity.js'; @@ -31,6 +30,7 @@ import { DurationValid, HitTypeValid, HuntTypeValid, + HuntVisValid, NpcModeValid, NpcStatValid, NpcTypeValid, @@ -132,7 +132,7 @@ const NpcOps: CommandHandlers = { check(id, NpcTypeValid); const {level, x, z} = Position.unpackCoord(coord); - state.npcIterator = new NpcIterator(World.currentTick, level, x, z); + state.npcIterator = new NpcIterator(World.currentTick, level, x, z, 0, 0, NpcIteratorType.ZONE); for (const npc of state.npcIterator) { if(npc && npc.type === id && npc.x === x && npc.level === level && npc.z === z) { @@ -325,57 +325,59 @@ const NpcOps: CommandHandlers = { [ScriptOpcode.NPC_FIND]: state => { const [coord, npcType, distance, checkVis] = state.popInts(4); - const {level, x, z} = Position.unpackCoord(coord); - const centerX: number = Position.zone(x); - const centerZ: number = Position.zone(z); - const radius: number = (1 + (distance / 8)) | 0; - const maxX = centerX + radius; - const minX = centerX - radius; - const maxZ = centerZ + radius; - const minZ = centerZ - radius; + check(coord, CoordValid); + check(npcType, NpcTypeValid); + check(distance, NumberNotNull); + check(checkVis, HuntVisValid); + const {level, x, z} = Position.unpackCoord(coord); let closestNpc; let closestDistance = distance; - for (let i: number = maxX; i >= minX; i--) { - const zoneX: number = i << 3; - for (let j: number = maxZ; j >= minZ; j--) { - const zoneZ: number = j << 3; - state.npcIterator = new NpcIterator(World.currentTick, level, zoneX, zoneZ); - for (const npc of state.npcIterator) { - if(npc && npc.type === npcType) { - if (checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(level, x, z, npc.x, npc.z, 1, 1, 1, 1)) { - continue; - } - if (checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(level, x, z, npc.x, npc.z, 1, 1, 1, 1)) { - continue; - } - const npcDistance = Position.distanceToSW({x, z}, npc); - if (npcDistance <= closestDistance) { - closestNpc = npc; - closestDistance = npcDistance; - } - } + const npcs = new NpcIterator(World.currentTick, level, x, z, distance, checkVis, NpcIteratorType.DISTANCE); + for (const npc of npcs) { + if(npc && npc.type === npcType) { + const npcDistance = Position.distanceToSW({x, z}, npc); + if (npcDistance <= closestDistance) { + closestNpc = npc; + closestDistance = npcDistance; } } } - if (!closestNpc) { state.pushInt(0); return; } + console.log(NpcType.get(closestNpc.type)); // not necessary but if we want to refer to the original npc again, we can state.activeNpc = closestNpc; state.pointerAdd(ActiveNpc[state.intOperand]); state.pushInt(1); }, + [ScriptOpcode.NPC_FINDALLANY]: state => { + const [coord, distance, checkVis] = state.popInts(3); + + check(coord, CoordValid); + check(distance, NumberNotNull); + check(checkVis, HuntVisValid); + + const {level, x, z} = Position.unpackCoord(coord); + + state.npcIterator = new NpcIterator(World.currentTick, level, x, z, distance, checkVis, NpcIteratorType.DISTANCE); + // not necessary but if we want to refer to the original npc again, we can + if (state._activeNpc) { + state._activeNpc2 = state._activeNpc; + state.pointerAdd(ScriptPointer.ActiveNpc2); + } + }, + [ScriptOpcode.NPC_FINDALLZONE]: state => { const coord: number = check(state.popInt(), CoordValid); const {level, x, z} = Position.unpackCoord(coord); - state.npcIterator = new NpcIterator(World.currentTick, level, x, z); + state.npcIterator = new NpcIterator(World.currentTick, level, x, z, 0, 0, NpcIteratorType.ZONE); // not necessary but if we want to refer to the original npc again, we can if (state._activeNpc) { state._activeNpc2 = state._activeNpc; diff --git a/src/lostcity/entity/NpcIteratorType.ts b/src/lostcity/entity/NpcIteratorType.ts new file mode 100644 index 000000000..524e1d932 --- /dev/null +++ b/src/lostcity/entity/NpcIteratorType.ts @@ -0,0 +1,6 @@ +enum NpcIteratorType { + ZONE, + DISTANCE +} + +export default NpcIteratorType; \ No newline at end of file From 54f2037081b36fd0d17402fc383514fa8891f866 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 21:06:04 -0400 Subject: [PATCH 08/50] refactor(content): replace ~npc_within_distance proc with npc_find command --- .../area_alkharid/scripts/shantay_pass.rs2 | 4 +- .../area_ardougne_west/scripts/clerk.rs2 | 2 +- .../area_ardougne_west/scripts/recruiter.rs2 | 4 +- .../scripts/outpost_gate.rs2 | 2 +- .../areas/area_draynor/scripts/lady_keli.rs2 | 2 +- .../area_entrana/scripts/high_priest.rs2 | 2 +- .../areas/area_gnome/scripts/elkoy.rs2 | 4 +- .../areas/area_gnome/scripts/king_bolren.rs2 | 2 +- .../area_mage_arena/scripts/mage_arena.rs2 | 2 +- .../areas/area_varrock/scripts/thessalia.rs2 | 4 +- .../areas/monastery/scripts/prayer_guild.rs2 | 4 +- .../general/scripts/misc/npc_procs.rs2 | 95 ------------------- .../game_partyroom/scripts/partyroom.rs2 | 6 +- .../quest_arthur/scripts/quest_arthur.rs2 | 8 +- .../quest_arthur/scripts/sir_mordred.rs2 | 6 +- .../scripts/quest_blackarmgang.rs2 | 2 +- .../quest_dragon/scripts/lady_lumbridge.rs2 | 2 +- .../quests/quest_elena/scripts/doors.rs2 | 10 +- .../quest_elena/scripts/plaguehouse.rs2 | 2 +- .../quests/quest_elena/scripts/sewerpipe.rs2 | 2 +- .../scripts/hemenster_fishing.rs2 | 12 +-- .../scripts/quest_fishingcompo.rs2 | 8 +- .../quest_grail/scripts/quest_grail.rs2 | 6 +- .../quest_haunted/scripts/quest_haunted.rs2 | 2 +- .../scripts/ceril_carnillean.rs2 | 2 +- .../scripts/quest_hazeelcult.rs2 | 4 +- .../scripts/quest_itgronigen.rs2 | 6 +- .../quest_priest/scripts/quest_priest.rs2 | 4 +- .../quest_prince/scripts/quest_prince.rs2 | 2 +- .../quest_squire/scripts/quest_squire.rs2 | 2 +- .../quests/quest_tree/scripts/quest_tree.rs2 | 6 +- .../quest_zanaris/scripts/quest_zanaris.rs2 | 4 +- .../scripts/stalls/stealing.rs2 | 14 +-- .../tutorial/scripts/guides/brother_brace.rs2 | 2 +- .../scripts/guides/combat_instructor.rs2 | 2 +- .../scripts/guides/financial_advisor.rs2 | 2 +- .../scripts/guides/magic_instructor.rs2 | 2 +- .../tutorial/scripts/guides/master_chef.rs2 | 2 +- .../scripts/guides/mining_instructor.rs2 | 2 +- .../tutorial/scripts/guides/quest_guide.rs2 | 2 +- .../scripts/guides/runescape_guide.rs2 | 2 +- .../scripts/guides/survival_guide.rs2 | 2 +- .../tutorial/scripts/npcs/tut_chicken.rs2 | 2 +- .../tutorial/scripts/npcs/tut_giant_rat.rs2 | 2 +- .../tutorial/scripts/tut_doors_and_gates.rs2 | 8 +- .../src/scripts/tutorial/scripts/tutorial.rs2 | 2 +- 46 files changed, 87 insertions(+), 182 deletions(-) diff --git a/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 b/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 index 085560cd6..80fb7c2ad 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 @@ -47,7 +47,7 @@ p_telejump(movecoord(coord, 0, 0, -3)); [oploc1,shantay_jail_door] def_boolean $is_inside = ~check_axis_locactive(coord); -if (%shantay_jail_progress = ^put_in_shantay_jail & npc_finduid(~npc_within_distance(coord, shantay, 12)) = true) { +if (%shantay_jail_progress = ^put_in_shantay_jail & npc_find(coord, shantay, 12, 0) = true) { if ($is_inside = false) { %shantay_jail_progress = ^paid_shantay_jail_fine; ~chatnpc(neutral, "You should be in jail! Well, no doubt the authorities in|Port Sarim know what they're doing. But if you get|into any more trouble, you'll be stuck back in jail."); @@ -67,7 +67,7 @@ if (coordz(coord) <= coordz(loc_coord)) { p_telejump(movecoord(coord, 0, 0, 3)); return; } -if (npc_finduid(~npc_within_distance(coord, shantay_pass_guard, 5)) = false) { +if (npc_find(coord, shantay_pass_guard, 5, 0) = false) { return; } if (inv_total(inv, shantay_pass) < 1) { diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 index b58ef8ae2..72994a729 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 @@ -53,7 +53,7 @@ switch_int(%elena_progress) { ~chatnpc(neutral, "I'll see what I can do I suppose."); ~quest_elena_set_progress(^quest_elena_spoke_to_clerk); ~chatnpc(neutral, "Mr there's a here who really needs to speak to you."); -if (.npc_finduid(~.npc_within_distance(coord, bravek, 7)) = true) { // yes its possible this doesnt pop off if hes too far +if (.npc_find(coord, bravek, 7, 0) = true) { // yes its possible this doesnt pop off if hes too far ~.chatnpc(confused, "I suppose they can come in then. If they keep it short."); } diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 index 0d668688d..203ea782f 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 @@ -1,9 +1,9 @@ [opnpc1,recruiter] ~chatnpc(neutral, "Citizens of West Ardougne! King Tyras needs you for his Royal Army! Who will join this noble cause?"); -if (.npc_finduid(~.npc_within_distance(coord, npc_728, 14)) = true) { +if (.npc_find(coord, npc_728, 14, 0) = true) { ~.chatnpc(angry, "Plague bringer!"); } -if (.npc_finduid(~.npc_within_distance(coord, npc_729, 14)) = true) { +if (.npc_find(coord, npc_729, 14, 0) = true) { ~.chatnpc(angry, "King Tyras is scum!"); } ~chatnpc(shock, "Tyras will be informed of these words of treason!"); diff --git a/data/src/scripts/areas/area_barbarian_outpost/scripts/outpost_gate.rs2 b/data/src/scripts/areas/area_barbarian_outpost/scripts/outpost_gate.rs2 index b478c31d9..6e98ad7ee 100644 --- a/data/src/scripts/areas/area_barbarian_outpost/scripts/outpost_gate.rs2 +++ b/data/src/scripts/areas/area_barbarian_outpost/scripts/outpost_gate.rs2 @@ -1,6 +1,6 @@ [oploc1,_outpost_gate] if(%barcrawl_progress ! ^barcrawl_complete) { - if(npc_finduid(~npc_within_distance(coord, barbarian_outpost_guard, 5)) = true) { + if(npc_find(coord, barbarian_outpost_guard, 5, 0) = true) { @outpost_guard_talk; } } diff --git a/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 b/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 index 7d134654f..ee0a2e62d 100644 --- a/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 @@ -2,7 +2,7 @@ if(%prince_progress >= ^prince_tied_keli) { npc_say("You tricked me, and tied me up, Guards kill this stranger!!"); p_delay(1); - if (npc_finduid(~npc_within_distance(coord, jail_guard, 7)) = true) { + if (npc_find(coord, jail_guard, 7, 0) = true) { npc_say("Yes M'lady"); ~npc_retaliate(0); } diff --git a/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 b/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 index 1f6b7040b..204fb07eb 100644 --- a/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 +++ b/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 @@ -4,7 +4,7 @@ if(%grail_progress < ^grail_finding_percival & %grail_progress >= ^grail_spoken_ ~chatplayer(neutral, "Hello, I am in search of the Holy Grail."); ~chatnpc(happy, "The object of which you speak did once pass through holy Entrana. I know not where it is now however."); ~chatnpc(neutral, "Nor do I really care."); - if(npc_finduid(~npc_within_distance(coord, crone, 9)) = false) { + if(npc_find(coord, crone, 9, 0) = false) { npc_add(0_44_52_35_14, crone, 500); } else { ~chatnpc(neutral, "Wait!"); diff --git a/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 b/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 index a6c0ec340..c3be0b454 100644 --- a/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 @@ -128,13 +128,13 @@ switch_int(~p_choice2("Yes please.", 1, "No thanks Elkoy.", 2)) { [label,elkoy_leavemaze_initial] p_telejump(movecoord(^elkoy_entrance_coord, 0, 0, -1)); -if(npc_finduid(~npc_within_distance(coord, elkoy_outmaze, 4)) = true) { +if(npc_find(coord, elkoy_outmaze, 4, 0) = true) { ~chatnpc(happy, "We're out of the maze now. Please hurry, we must have the orb if we are to survive."); } [label,elkoy_leavemaze_second] p_telejump(movecoord(^elkoy_entrance_coord, 0, 0, -1)); -if(npc_finduid(~npc_within_distance(coord, elkoy_outmaze, 4)) = true) { +if(npc_find(coord, elkoy_outmaze, 4, 0) = true) { ~chatnpc(happy, "Good luck friend."); } diff --git a/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 b/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 index 5a37338fc..5270b7d66 100644 --- a/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 @@ -104,7 +104,7 @@ switch_int(%tree_progress) { ~gnome_chant("En tania."); ~gnome_chant("Su tana."); ~gnome_chant("En tania."); - if(npc_finduid(~npc_within_distance(coord, king_bolren, 4)) = false) { + if(npc_find(coord, king_bolren, 4, 0) = false) { return; // should never happen, just switching active npc } npc_anim(midget_seq_199, 20); diff --git a/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 index 3cd4e5bb2..66add550c 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 @@ -146,7 +146,7 @@ sound_synth(teleport_all, 0, 0); p_delay(2); p_teleport(~coord_lineofwalk_radius(^mage_arena_finish_coord, 2)); anim(null, 0); -if (npc_finduid(~npc_within_distance(coord, kolodion, 5)) = true) { +if (npc_find(coord, kolodion, 5, 0) = true) { ~chatnpc(happy, "Well done, young adventurer; you truly are a worthy|battle mage."); @kolodion_what_now; return; diff --git a/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 b/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 index 910442bbd..b04862359 100644 --- a/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 @@ -190,7 +190,7 @@ if (%option2 = 1) { buildappearance(worn); inv_del(inv, coins, 500); -if (npc_finduid(~npc_within_distance(coord, thessalia, 4)) = true) { +if (npc_find(coord, thessalia, 4, 0) = true) { ~chatnpc(happy, "Very stylish! It really suits you!"); ~chatplayer(happy, "Thanks!"); } @@ -284,7 +284,7 @@ if (%option1 = 1) { buildappearance(worn); inv_del(inv, coins, 500); -if (npc_finduid(~npc_within_distance(coord, thessalia, 4)) = true) { +if (npc_find(coord, thessalia, 4, 0) = true) { ~chatnpc(happy, "Totally cool! That outfit looks great!"); ~chatplayer(happy, "Thanks!"); } diff --git a/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 b/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 index f9a2cc5fa..f54295704 100644 --- a/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 +++ b/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 @@ -4,11 +4,11 @@ [oploc1,loc_2641] if (%prayer_guild < 1) { - if (npc_finduid(~npc_within_distance(coord, abbot_langley, 5)) = true) { + if (npc_find(coord, abbot_langley, 5, 0) = true) { ~chatnpc(quiz, "Only members of our order can go up there."); @ask_to_join_abbot_langley2; } - if (npc_finduid(~npc_within_distance(coord, monk, 5)) = true) { + if (npc_find(coord, monk, 5, 0) = true) { ~chatnpc(quiz, "You'll need to talk to Abbot Langley about that. He's|usually to be found walking the halls of the monastery."); return; } diff --git a/data/src/scripts/general/scripts/misc/npc_procs.rs2 b/data/src/scripts/general/scripts/misc/npc_procs.rs2 index acecde5af..b5d317f39 100644 --- a/data/src/scripts/general/scripts/misc/npc_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/npc_procs.rs2 @@ -1,98 +1,3 @@ -// loops zones around a specified coord. -// the main purpose of this is to grab npc pointer efficiently -[proc,npc_within_distance](coord $coord, npc $npc, int $distance)(npc_uid) -// a radius of 1 will loop 9 zones -// a radius of 2 will loop 25 zones -// a radius of 3 will loop 49 zones -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - -def_int $closet_distance = $distance; -def_npc_uid $closest_npc = null; - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - - npc_findallzone($zoneCoord); - while (npc_findnext = true) { - if (npc_type = $npc & distance($coord, npc_coord) <= $closet_distance) { - $closet_distance = distance($coord, npc_coord); - $closest_npc = npc_uid; - } - } - $maxZ = sub($maxZ, 1); - } - $maxX = sub($maxX, 1); -} -if ($closet_distance < $distance | $closest_npc ! null) { - return($closest_npc); -} -return(null); - -// loops zones around a specified coord. -// the main purpose of this is to grab npc pointer efficiently -[proc,.npc_within_distance](coord $coord, npc $npc, int $distance)(npc_uid) -// a radius of 1 will loop 9 zones -// a radius of 2 will loop 25 zones -// a radius of 3 will loop 49 zones -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - -def_int $closet_distance = $distance; -def_npc_uid $closest_npc = null; - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - - npc_findallzone($zoneCoord); - while (.npc_findnext = true) { - if (.npc_type = $npc & distance($coord, .npc_coord) <= $closet_distance) { - $closet_distance = distance($coord, .npc_coord); - $closest_npc = .npc_uid; - } - } - $maxZ = sub($maxZ, 1); - } - $maxX = sub($maxX, 1); -} -if ($closet_distance < $distance | $closest_npc ! null) { - return($closest_npc); -} -return(null); - - [proc,npc_category_within_distance](coord $coord, category $npc_category, int $distance)(npc_uid) // a radius of 1 will loop 9 zones // a radius of 2 will loop 25 zones diff --git a/data/src/scripts/minigames/game_partyroom/scripts/partyroom.rs2 b/data/src/scripts/minigames/game_partyroom/scripts/partyroom.rs2 index 18708622f..39eb0e82c 100644 --- a/data/src/scripts/minigames/game_partyroom/scripts/partyroom.rs2 +++ b/data/src/scripts/minigames/game_partyroom/scripts/partyroom.rs2 @@ -13,7 +13,7 @@ if_close; if ($choice = 2) { return; } -if (npc_finduid(~npc_within_distance(coord, party_pete, 16)) = true) { +if (npc_find(coord, party_pete, 16, 0) = true) { ~pull_partylever(5000); @partyroom_drop_balloons(0); } @@ -35,7 +35,7 @@ if_close; if ($choice = 2) { return; } -if(npc_finduid(~npc_within_distance(coord, partyroom_dancingknight, 7)) = true) { +if(npc_find(coord, partyroom_dancingknight, 7, 0) = true) { ~mesbox("The party room knights are already here!"); return; } @@ -69,7 +69,7 @@ switch_int($arg) { npc_say("Like a party animal in the groove"); case 9: npc_queue(10, 10, 3); // 2t - if (npc_finduid(~npc_within_distance(npc_coord, party_pete, 16)) = true) { + if (npc_find(npc_coord, party_pete, 16, 0) = true) { npc_say("The party room is a silly place!"); } return; diff --git a/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 b/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 index 2adac3720..20bbf0383 100644 --- a/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 +++ b/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 @@ -79,7 +79,7 @@ p_teleport(%arhein_crate_coord); [oploc1,loc_69] -if (npc_finduid(~npc_within_distance(coord, arhein, 12)) = true) { +if (npc_find(coord, arhein, 12, 0) = true) { ~chatnpc(angry, "Hey buddy! Get away from my ship alright?"); ~chatplayer(sad, "Yeah... uh... sorry..."); } @@ -209,11 +209,11 @@ sound_synth(put_down, 0, 0); [oploc1,loc_59] if(testbit(%excalibur_components_progress, ^excalibur_rewarded) = false) { if(testbit(%excalibur_components_progress, ^excalibur_spoken_beggar) = true) { - if(npc_finduid(~npc_within_distance(coord, beggar, 1)) = false) { + if(npc_find(coord, beggar, 1, 0) = false) { npc_add(movecoord(loc_coord, 0, 0, 1), beggar, 100); } } else if(testbit(%excalibur_components_progress, ^excalibur_started) = true) { - if(npc_finduid(~npc_within_distance(coord, beggar, 1)) = false) { + if(npc_find(coord, beggar, 1, 0) = false) { npc_add(movecoord(loc_coord, 0, 0, 1), beggar, 100); } @beggar_dialogue; @@ -227,7 +227,7 @@ anim(human_reachforladdertop, 0); p_delay(0); p_telejump(movecoord(loc_coord, 0, 1, 1)); if(testbit(%excalibur_components_progress, ^excalibur_rewarded) = false & testbit(%excalibur_components_progress, ^excalibur_started) = true & map_members = true) { - if(npc_finduid(~npc_within_distance(coord, lady_of_the_lake, 4)) = false) { + if(npc_find(coord, lady_of_the_lake, 4, 0) = false) { npc_add(movecoord(coord, -1, 0, 3), lady_of_the_lake, 100); } ~chatplayer(neutral, "Hello. I am here for Excalibur. Can I have it yet?"); diff --git a/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 b/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 index 7fe45f88a..f242977e8 100644 --- a/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 +++ b/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 @@ -25,7 +25,7 @@ if(p_finduid(%npc_attacking_uid) = false) { // clear player and mordred interactions p_stopaction; npc_setmode(playerfaceclose); -if(npc_finduid(~npc_within_distance(coord, morgan_le_faye, 6)) = false) { +if(npc_find(coord, morgan_le_faye, 6, 0) = false) { npc_add(^morgan_spawn_coord, morgan_le_faye, 50); spotanim_map(small_smokepuff, npc_coord, 124, 0); } @@ -48,12 +48,12 @@ switch_int(~p_choice3("Tell me how to untrap Merlin and I might.", 1, "No. He de case 2: ~chatplayer(sad, "No. He deserves to die."); if_close; - if(npc_finduid(~npc_within_distance(coord, sir_mordred, 6)) = true) { + if(npc_find(coord, sir_mordred, 6, 0) = true) { mes("You kill Mordred."); npc_queue(4, 0, 0); p_delay(1); } - if(npc_finduid(~npc_within_distance(coord, morgan_le_faye, 6)) = true) { + if(npc_find(coord, morgan_le_faye, 6, 0) = true) { spotanim_map(small_smokepuff, npc_coord, 124, 0); npc_del; } diff --git a/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 b/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 index a3c9568ad..ed3fcbc61 100644 --- a/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 +++ b/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 @@ -89,7 +89,7 @@ loc_add(movecoord($loc_coord, $x, 0, $z), loc_1535, modulo(add($angle, 1), 4), $ [opobj3,phoenix_crossbow] // not a zone specific check, you can drop a crossbow in the nearby building to trigger this dialogue -if(npc_finduid(~npc_within_distance(coord, weaponsmaster, 10)) = true) { +if(npc_find(coord, weaponsmaster, 10, 0) = true) { @weaponsmaster_stop; } if (inv_itemspace(inv, obj_type, obj_count, inv_size(inv)) = false) { diff --git a/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 b/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 index 77a99348f..185e2abed 100644 --- a/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 +++ b/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 @@ -1,6 +1,6 @@ [oploc1,dragonslayer_gangplank_board] if (%dragon_progress < ^quest_dragon_bought_ship | %dragon_progress >= ^dragon_complete) { - if (npc_finduid(~npc_within_distance(coord, klarense, 5)) = true) { + if (npc_find(coord, klarense, 5, 0) = true) { ~chatnpc(neutral, "Hey, stay off my ship! That's private property!"); } return; diff --git a/data/src/scripts/quests/quest_elena/scripts/doors.rs2 b/data/src/scripts/quests/quest_elena/scripts/doors.rs2 index 23cef594f..697beff8a 100644 --- a/data/src/scripts/quests/quest_elena/scripts/doors.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/doors.rs2 @@ -10,18 +10,18 @@ if (~check_axis(coord, loc_coord, loc_angle) = false) { switch_int(%elena_progress) { case ^quest_elena_spoke_to_milli: { ~mesbox("The door won't open.|You notice a black cross on the door."); - if (npc_finduid(~npc_within_distance(coord, npc_719, 14)) = true) { + if (npc_find(coord, npc_719, 14, 0) = true) { ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); @multi3("But I think a kidnap victim is in here.", plague_house_but_i_think_a_kidnap_victim_is_in_here, "I fear not a mere plague.", plague_house_i_fear_not_a_mere_plague, "Thanks for the warning.", plague_house_thanks_for_the_warning); } } case ^quest_elena_spoke_cured_bravek: { - if (inv_total(inv, elena_warrant) > 0 & npc_finduid(~npc_within_distance(coord, npc_719, 14)) = true) { + if (inv_total(inv, elena_warrant) > 0 & npc_find(coord, npc_719, 14, 0) = true) { ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); ~chatplayer(neutral, "I have a warrant from to enter here."); if_close; ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); - } else if (npc_finduid(~npc_within_distance(coord, npc_719, 14)) = true) { + } else if (npc_find(coord, npc_719, 14, 0) = true) { ~mesbox("The door won't open.|You notice a black cross on the door."); ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); } @@ -29,7 +29,7 @@ switch_int(%elena_progress) { case ^quest_elena_freed_elena, ^elena_complete: ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); case default: { ~mesbox("The door won't open.|You notice a black cross on the door."); - if (npc_finduid(~npc_within_distance(coord, npc_719, 14)) = true) { + if (npc_find(coord, npc_719, 14, 0) = true) { ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); } } @@ -68,7 +68,7 @@ if (%elena_progress >= ^quest_elena_returned_book) { ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); return; } -if (npc_finduid(~npc_within_distance(coord, ted_rehnison, 7)) = false) { +if (npc_find(coord, ted_rehnison, 7, 0) = false) { return; } ~chatnpc(angry, "Go away. We don't want any."); diff --git a/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 b/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 index 6ecfdebcc..41b802d66 100644 --- a/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 @@ -38,7 +38,7 @@ switch_int(%elena_progress) { ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); } else { ~mesbox("The door is locked."); - if (npc_finduid(~npc_within_distance(coord, elena_imprisoned, 5)) = true) { + if (npc_find(coord, elena_imprisoned, 5, 0) = true) { ~chatnpc(shock, "Hey get me out of here please!"); ~chatplayer(sad, "I would do but I don't have a key."); ~chatnpc(confused, "I think there may be one around somewhere. I'm sure I heard them stashing it somewhere."); diff --git a/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 b/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 index 3e252569e..c7a6e2416 100644 --- a/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 @@ -4,7 +4,7 @@ switch_int(%elena_progress) { case ^quest_elena_opened_pipe, ^quest_elena_returned_book, ^quest_elena_spoke_to_milli, ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek, ^quest_elena_freed_elena: { if (inv_getobj(worn, ^wearpos_hat) = gasmask) { @elena_climb_through_sewerpipe; - } else if (npc_finduid(~npc_within_distance(coord, edmond, 20)) = true) { + } else if (npc_find(coord, edmond, 20, 0) = true) { ~chatnpc(neutral, "I can't let you enter the city without your gas mask on."); } } diff --git a/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 b/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 index d4676d787..f09b94fa4 100644 --- a/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 +++ b/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 @@ -7,7 +7,7 @@ if(~in_hemenster_comp = false) { return; } -if(npc_finduid(~npc_within_distance(coord, big_dave, 5)) = true) { +if(npc_find(coord, big_dave, 5, 0) = true) { @big_dave_dialogue; } @@ -15,7 +15,7 @@ if(npc_finduid(~npc_within_distance(coord, big_dave, 5)) = true) { if(~in_hemenster_comp = false) { return; } -if(npc_finduid(~npc_within_distance(coord, joshua, 5)) = true) { +if(npc_find(coord, joshua, 5, 0) = true) { @joshua_dialogue; } @@ -95,7 +95,7 @@ if(~in_hemenster_comp = false) { } // Vampire check if((npc_type = npc_234 & %fishingcompo_progress = ^fishingcompo_in_comp) | (npc_type = npc_233 & %fishingcompo_progress = ^fishingcompo_garlic_comp)) { - if(npc_finduid(~npc_within_distance(coord, sinister_stranger, 8)) = true) { + if(npc_find(coord, sinister_stranger, 8, 0) = true) { @sinister_stranger_my_spot; } } @@ -154,18 +154,18 @@ p_opnpc(2); [proc,in_hemenster_comp](boolean) if (%hemenster_comp_stage = ^hemenster_comp_not_entered) { // Havn't entered the competition yet - if(npc_finduid(~npc_within_distance(coord, bonzo, 12)) = true) { + if(npc_find(coord, bonzo, 12, 0) = true) { ~chatnpc(happy, "Hey, you need to pay to enter the competition first! Only 5 gp entrance fee!"); mes("Talk to Bonzo to pay the entrance fee."); } return (false); } else if (%hemenster_comp_stage >= ^hemenster_comp_paidfee & %fishingcompo_progress = ^fishingcompo_started) { // Entered comp but hasnt been assigned spot - if(npc_finduid(~npc_within_distance(coord, bonzo, 12)) = true) { + if(npc_find(coord, bonzo, 12, 0) = true) { @bonzo_set_places; } return (false); }else if (%hemenster_comp_stage = ^hemenster_comp_all_fish_caught) { // 3 fish caught - if(npc_finduid(~npc_within_distance(coord, bonzo, 12)) = true) { + if(npc_find(coord, bonzo, 12, 0) = true) { ~chatnpc(happy, "Okay folks, time's up!|Let's see who caught the biggest fish!"); @bonzo_handover_catch; } diff --git a/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 b/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 index ed63e4fa3..bcb776162 100644 --- a/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 +++ b/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 @@ -12,7 +12,7 @@ if(%fishingcompo_progress = ^fishingcompo_complete) { p_telejump(0_44_154_60_22); } return; -} else if(npc_finduid(~npc_within_distance(coord, mountain_dwarf, 5)) = true) { +} else if(npc_find(coord, mountain_dwarf, 5, 0) = true) { switch_int (%fishingcompo_progress) { case ^fishingcompo_not_started: @mountain_dwarf_stairs; case default: @mountain_dwarf_won; @@ -25,7 +25,7 @@ if(coordx(coord) <= coordx(loc_coord)) { // On OSRS this dialogue always happens (during the quest) when leaving from the south side of the gate, and // on both sides during an active comp. Not sure if this is a rework thing since Bonzo is sitting on a table by the south side // post-rework, but we'll use this behaviour for now - if(npc_finduid(~npc_within_distance(coord, bonzo, 12)) = true) { + if(npc_find(coord, bonzo, 12, 0) = true) { @bonzo_quits; } } @@ -92,11 +92,11 @@ if(%hemenster_comp_stage = ^hemenster_comp_paidfee) { } [label,move_hemenster_pipe] -if(npc_finduid(~npc_within_distance(coord, sinister_stranger, 8)) = true) { +if(npc_find(coord, sinister_stranger, 8, 0) = true) { ~chatnpc(angry, "Arrgh! WHAT is that GHASTLY smell???|I think I will move over here instead..."); npc_tele(0_41_53_7_43); // telejumps in classic npc_facesquare(movecoord(npc_coord, 1, 0, 0)); - if (npc_finduid(~npc_within_distance(coord, bonzo, 12)) = true) { + if (npc_find(coord, bonzo, 12, 0) = true) { %fishingcompo_progress = ^fishingcompo_garlic_comp; ~chatnpc(confused, "Hmm. You'd better go and take the area by the pipes then."); ~mesbox("Your fishing competition spot is now beside the pipes."); diff --git a/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 b/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 index d859b9c43..b9ead67d5 100644 --- a/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 @@ -3,7 +3,7 @@ if(%grail_progress > ^grail_not_started) { def_boolean $entering = ~check_axis(coord, loc_coord, loc_angle); if($entering = true) { - if(npc_finduid(~npc_within_distance(coord, merlin_workshop, 6)) = true) { + if(npc_find(coord, merlin_workshop, 6, 0) = true) { npc_del; } npc_add(1_43_54_15_44, merlin_workshop, 500); @@ -20,7 +20,7 @@ mes("The door won't open."); [oploc2,loc_23] if(%grail_progress = ^grail_finding_percival) { ~mesbox("You hear muffled noises from the sack.|You open the sack."); - if(npc_finduid(~npc_within_distance(coord, sir_percival, 4)) = false) { + if(npc_find(coord, sir_percival, 4, 0) = false) { npc_add(movecoord(loc_coord, -1, 0, -1), sir_percival, 500); } @percival_found; @@ -51,7 +51,7 @@ if(inzone(0_42_50_52_34, 0_42_50_55_37, coord) = true) { // Karamja -> fisher's [opheld1,grail_bell] ~mesbox("Ting-a-ling-a-ling!"); -if(npc_finduid(~npc_within_distance(coord, grail_maiden, 4)) = true & inzone(0_43_73_0_0, 0_43_73_63_63, coord) = true) { +if(npc_find(coord, grail_maiden, 4, 0) = true & inzone(0_43_73_0_0, 0_43_73_63_63, coord) = true) { ~chatnpc(confused, "Welcome to the Grail castle.|You should come inside,|it's cold out here."); def_coord $dest = 0_43_73_9_20; // osrs does p_teleport with controlling walkspeed, can't do 1 tile each here since the next mesbox would be stalled by p_delay diff --git a/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 b/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 index a7ac6750f..9641d4698 100644 --- a/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 +++ b/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 @@ -210,7 +210,7 @@ mes("This door is locked."); sound_synth(locked, 0, 0); [proc,change_ernest] -if(npc_finduid(~npc_within_distance(coord, ernest_chicken, 8)) = true) { +if(npc_find(coord, ernest_chicken, 8, 0) = true) { npc_changetype(ernest_human); npc_settimer(100); } diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 index 07884bec1..c592f00ef 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 @@ -124,7 +124,7 @@ if(inv_total(inv, carnillean_armour) = 0 ) { inv_del(worn, carnillean_armour, 1); } queue(hazeelcult_fake_complete, 0); -if (.npc_finduid(~.npc_within_distance(coord, butler_jones, 6)) = false) { // not sure what the distance would of been but it always works on OSRS +if (.npc_find(coord, butler_jones, 6, 0) = false) { // not sure what the distance would of been but it always works on OSRS return; } ~chatnpc(angry, "Jones! This commoner says you had something to do with the theft of my armour. What do you have to say for yourself about that?"); diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 index cb2f0e802..cd4ef689d 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 @@ -85,10 +85,10 @@ mes("You can hear there is a hollow behind this wall."); // from rs3 if(%hazeelcult_progress = ^hazeelcult_given_armour_or_scroll & %hazeelcult_side = ^hazeelcult_goodside) { ~mesbox("You search the cupbaord thoroughly. You find a bottle of poison and a mysterious amulet. You pass your discovery on to Ceril."); ~chatplayer(angry, "Ceril!"); - if (npc_finduid(~npc_within_distance(coord, ceril_carnillean, 6)) = false) { + if (npc_find(coord, ceril_carnillean, 6, 0) = false) { return; } - if (.npc_finduid(~.npc_within_distance(coord, butler_jones, 6)) = false) { + if (.npc_find(coord, butler_jones, 6, 0) = false) { return; } ~chatnpc(angry, "What do you want now you scoundrel?"); diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 index 870984ca0..020a428b3 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 @@ -105,7 +105,7 @@ if(%keepdoor_unlocked ! 0 & coordz(coord) > coordz(loc_coord)) { [label,open_keep_gate] // some guides mention you have to kill the goblin and some don't, RSC just has it aggro you // so we'll do that for now -if(npc_finduid(~npc_within_distance(coord, goblin_guard, 8)) = true) { +if(npc_find(coord, goblin_guard, 8, 0) = true) { ~npc_retaliate(0); } if(coordz(coord) > coordz(loc_coord)) { @@ -142,7 +142,7 @@ p_delay(2); // delays for 3t before doing anything, might be a rework thing switch_int(%itgronigen_progress) { case ^itgronigen_complete, ^itgronigen_claimed_wine: @observatory_telescope; case ^itgronigen_sent_telescope: - if (npc_finduid(~npc_within_distance(coord, observatory_professor_tower, 7)) = true) { + if (npc_find(coord, observatory_professor_tower, 7, 0) = true) { ~chatnpc(happy, "Well done, well done!!|Let's see what the stars have in store for us today."); @observatory_telescope; } @@ -191,7 +191,7 @@ if($constellation > 6) { // because model 3056 isn't a constellation for some re if_setmodel(telescope:com_92, calc(3049 + $constellation)); [queue,constellation_dialogue](int $constellation_numb) -if (npc_finduid(~npc_within_distance(coord, observatory_professor_tower, 7)) = false) { +if (npc_find(coord, observatory_professor_tower, 7, 0) = false) { return; } switch_int(~p_choice2("I can see a constellation.", 1, "What am I looking at?", 2)) { diff --git a/data/src/scripts/quests/quest_priest/scripts/quest_priest.rs2 b/data/src/scripts/quests/quest_priest/scripts/quest_priest.rs2 index 105b99fb6..be419abe1 100644 --- a/data/src/scripts/quests/quest_priest/scripts/quest_priest.rs2 +++ b/data/src/scripts/quests/quest_priest/scripts/quest_priest.rs2 @@ -24,7 +24,7 @@ loc_change(loc_2145, 300); if(%priest_progress = ^priest_complete) { // Don't send ghost if the quest is complete return; } -if (npc_finduid(~npc_within_distance(loc_coord, restless_ghost, 4)) = false) { +if (npc_find(loc_coord, restless_ghost, 4, 0) = false) { npc_add(0_50_49_49_58, restless_ghost, 100); } @@ -49,7 +49,7 @@ if (last_useitem = ghost_skull & %priest_progress = ^priest_obtained_skull) { if (last_useitem = ghost_skull & %priest_progress = ^priest_obtained_skull) { ~mesbox("You put the skull in the coffin."); inv_del(inv, ghost_skull, 1); - if(npc_finduid(~npc_within_distance(coord, restless_ghost, 4)) = true) { + if(npc_find(coord, restless_ghost, 4, 0) = true) { npc_del; } queue(priest_quest_complete, 0); diff --git a/data/src/scripts/quests/quest_prince/scripts/quest_prince.rs2 b/data/src/scripts/quests/quest_prince/scripts/quest_prince.rs2 index a331582c1..77b77fe1b 100644 --- a/data/src/scripts/quests/quest_prince/scripts/quest_prince.rs2 +++ b/data/src/scripts/quests/quest_prince/scripts/quest_prince.rs2 @@ -36,7 +36,7 @@ if (last_useitem ! bronze_key | coordz(coord) <= coordz(loc_coord)) { ~displaymessage(^dm_default); return; } -if(%prince_progress <= ^prince_guard_drunk | npc_finduid(~npc_within_distance(coord, lady_keli, 10)) = true) { +if(%prince_progress <= ^prince_guard_drunk | npc_find(coord, lady_keli, 10, 0) = true) { mes("You'd better get rid of Lady Keli before trying to go through there."); return; } diff --git a/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 b/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 index 1e0b705a4..5bf052390 100644 --- a/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 +++ b/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 @@ -207,7 +207,7 @@ if(inv_total(inv, blurite_ore) >= 1 & inv_total(inv, iron_bar) >= 2) { [proc,vyvin_distracted](boolean) // check if Vyvin is nearby, if hes standing near of the player // they wont be able to search the cupboard -if (npc_finduid(~npc_within_distance(coord, sir_vyvin, 1)) = true) { +if (npc_find(coord, sir_vyvin, 1, 0) = true) { ~chatnpc(angry, "HEY! Just WHAT do you THINK you are DOING??? STAY OUT of MY cupboard!"); ~mesbox("Maybe you need to get Sir Vyvin further away from his cupboard..."); return(false); diff --git a/data/src/scripts/quests/quest_tree/scripts/quest_tree.rs2 b/data/src/scripts/quests/quest_tree/scripts/quest_tree.rs2 index db78e471d..301c2e214 100644 --- a/data/src/scripts/quests/quest_tree/scripts/quest_tree.rs2 +++ b/data/src/scripts/quests/quest_tree/scripts/quest_tree.rs2 @@ -53,7 +53,7 @@ if(%tree_progress >= ^tree_ballista_fired) { ~forcewalk($start); ~agility_exactmove(human_walk_crumbledwall, 30, 2, $start, movecoord($start, 0, 0, 2), 30, 100, ^exact_north, true); p_teleport(movecoord(coord, 0, 0, 1)); - if(%tree_progress = ^tree_ballista_fired & npc_finduid(~npc_within_distance(coord, khazard_commander, 4)) = true) { + if(%tree_progress = ^tree_ballista_fired & npc_find(coord, khazard_commander, 4, 0) = true) { // TODO: OSRS respawns the NPC if dead, but it also doesn't have this cutscene (prob cause of the delays + aggo npc) p_delay(1); npc_say("What? How did you manage to get in here."); @@ -69,7 +69,7 @@ mes("The wall is damaged, but not enough to climb."); [oploc1,loc_2183] ~open_chest(loc_2182); -if(npc_finduid(~npc_within_distance(coord, khazard_commander, 5)) = true) { +if(npc_find(coord, khazard_commander, 5, 0) = true) { npc_say("Oi! You! Get out of there."); ~npc_retaliate(0); } @@ -84,7 +84,7 @@ if(%tree_progress = ^tree_ballista_fired) { } inv_add(inv, orb_of_protection, 1); ~mesbox("You search the chest.|Inside you find the gnomes' stolen orb of protection."); -if(npc_finduid(~npc_within_distance(coord, khazard_commander, 5)) = true) { +if(npc_find(coord, khazard_commander, 5, 0) = true) { npc_say("Oi! You! Hands off the property of General Khazard."); ~npc_retaliate(0); } diff --git a/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 b/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 index f004996fe..396790df6 100644 --- a/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 +++ b/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 @@ -17,7 +17,7 @@ if ($axe = null) { return; } def_coord $shamus_spawnpoint = 0_49_50_3_11; -if (npc_finduid(~npc_within_distance($shamus_spawnpoint, shamus, 15)) = true) { +if (npc_find($shamus_spawnpoint, shamus, 15, 0) = true) { ~chatnpc_specific("Shamus", shamus, angry, "Hey! Yer big elephant! Don't go choppin' down me house, now!"); return; } @@ -43,7 +43,7 @@ if(stat(woodcutting) < 36) { } if(%zanaris_progress = ^zanaris_spoken_shamus) { def_coord $spawn = 0_44_152_44_9; - if(npc_finduid(~npc_within_distance($spawn, tree_spirit_zanaris, 6)) = false) { // based off testing, edges will spawn another spirit + if(npc_find($spawn, tree_spirit_zanaris, 6, 0) = false) { // based off testing, edges will spawn another spirit npc_add($spawn, tree_spirit_zanaris, 1000); } npc_say("You must defeat me before touching the tree!"); diff --git a/data/src/scripts/skill_thieving/scripts/stalls/stealing.rs2 b/data/src/scripts/skill_thieving/scripts/stalls/stealing.rs2 index e89de0cc8..f850f7387 100644 --- a/data/src/scripts/skill_thieving/scripts/stalls/stealing.rs2 +++ b/data/src/scripts/skill_thieving/scripts/stalls/stealing.rs2 @@ -68,7 +68,7 @@ return(false); [proc,stealing_check_for_owner](dbrow $data)(boolean) def_npc $owner = db_getfield($data, stealing:owner, 0); -if (npc_finduid(~npc_within_distance(coord, $owner, 5)) = true & lineofsight(npc_coord, coord) = true) { +if (npc_find(coord, $owner, 5, 0) = true & lineofsight(npc_coord, coord) = true) { npc_say("Hey! Get your hands off there!"); return(true); } @@ -129,17 +129,17 @@ return(null); npc_say("You're the one who stole something from me!"); p_delay(1); npc_say("Guards guards!"); -if (npc_finduid(~npc_within_distance(coord, guard_ardougne, 5)) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { +if (npc_find(coord, guard_ardougne, 5, 0) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { ~npc_retaliate(0); -} else if (npc_finduid(~npc_within_distance(coord, knight_of_ardougne_1, 5)) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { +} else if (npc_find(coord, knight_of_ardougne_1, 5, 0) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { ~npc_retaliate(0); -} else if (npc_finduid(~npc_within_distance(coord, knight_of_ardougne_2, 5)) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { +} else if (npc_find(coord, knight_of_ardougne_2, 5, 0) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { ~npc_retaliate(0); -} else if (npc_finduid(~npc_within_distance(coord, paladin, 5)) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { +} else if (npc_find(coord, paladin, 5, 0) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { ~npc_retaliate(0); -} else if (npc_finduid(~npc_within_distance(coord, npc_365, 5)) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { +} else if (npc_find(coord, npc_365, 5, 0) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { ~npc_retaliate(0); -} else if (npc_finduid(~npc_within_distance(coord, hero, 5)) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { +} else if (npc_find(coord, hero, 5, 0) = true & lineofsight(npc_coord, coord) = true & npc_getmode() ! opplayer2) { ~npc_retaliate(0); } diff --git a/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 b/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 index f1f01477d..2089b1deb 100644 --- a/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 @@ -74,6 +74,6 @@ if (%tutorial_progress = ^brother_brace_after_friends_tab) { ~chatnpc(neutral, "Ok then, ."); [proc,set_hint_icon_brother_brace] -if (npc_finduid(~npc_within_distance(0_48_48_53_34, brother_brace, 10)) = true) { +if (npc_find(0_48_48_53_34, brother_brace, 10, 0) = true) { hint_npc(npc_uid); } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 b/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 index 76dcfff75..c5413c14e 100644 --- a/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 @@ -164,7 +164,7 @@ if (%tutorial_progress > ^combat_instructor_after_rat_kill_melee) { } [proc,set_hint_icon_combat_instructor] -if (npc_finduid(~npc_within_distance(0_48_148_35_38, combat_instructor, 10)) = true) { +if (npc_find(0_48_148_35_38, combat_instructor, 10, 0) = true) { hint_npc(npc_uid); } diff --git a/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 b/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 index fc5e68c0a..f25ad5ce7 100644 --- a/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 @@ -39,6 +39,6 @@ if (%tutorial_progress = ^tutorial_opened_financial_advisor_door) { [label,financial_advisor_no_thanks] [proc,set_hint_icon_financial_advisor] -if (npc_finduid(~npc_within_distance(0_48_48_56_52, financial_advisor, 5)) = true) { +if (npc_find(0_48_48_56_52, financial_advisor, 5, 0) = true) { hint_npc(npc_uid); } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 b/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 index 630760c07..524901056 100644 --- a/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 @@ -94,6 +94,6 @@ inv_add(inv, airrune, 5); inv_add(inv, mindrune, 5); [proc,set_hint_icon_magic_instructor] -if (npc_finduid(~npc_within_distance(0_49_48_5_17, magic_instructor, 10)) = true) { +if (npc_find(0_49_48_5_17, magic_instructor, 10, 0) = true) { hint_npc(npc_uid); } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 b/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 index a3633cbcf..dcd2093a4 100644 --- a/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 @@ -74,6 +74,6 @@ switch_int($option) { } [proc,set_hint_icon_master_chef] -if (npc_finduid(~npc_within_distance(0_48_48_4_11, master_chef, 10)) = true) { +if (npc_find(0_48_48_4_11, master_chef, 10, 0) = true) { hint_npc(npc_uid); } diff --git a/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 b/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 index 7eba10f1b..663eea9b7 100644 --- a/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 @@ -123,6 +123,6 @@ if (%tutorial_progress > ^mining_instructor_before_smelt_bronze_bar & inv_total( // quest guide ladder 3088 3120 0 [proc,set_hint_icon_mining_instructor] -if (npc_finduid(~npc_within_distance(0_48_148_7_33, mining_instructor, 10)) = true) { +if (npc_find(0_48_148_7_33, mining_instructor, 10, 0) = true) { hint_npc(npc_uid); } diff --git a/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 b/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 index e17e7b613..264bcf176 100644 --- a/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 @@ -42,6 +42,6 @@ if ($choice = 1) { ~chatnpc(quiz, "I don't think you're ready to go down there yet."); [proc,set_hint_icon_quest_guide] -if (npc_finduid(~npc_within_distance(0_48_48_12_52, quest_guide, 10)) = true) { +if (npc_find(0_48_48_12_52, quest_guide, 10, 0) = true) { hint_npc(npc_uid); } diff --git a/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 b/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 index 8c4e6b93e..24bf42ad8 100644 --- a/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 @@ -41,7 +41,7 @@ if (map_localdev = true) { [proc,set_hint_runescape_guide] if (%tutorial_progress < ^runescape_guide_interact_with_scenery) { - if (npc_finduid(~npc_within_distance(0_48_48_21_35, runescape_guide, 10)) = true) { + if (npc_find(0_48_48_21_35, runescape_guide, 10, 0) = true) { hint_npc(npc_uid); } } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 b/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 index 184ea2c99..26b25ee11 100644 --- a/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 @@ -146,7 +146,7 @@ switch_int($choice) { ~chatnpc(neutral, "Eating food will restore a little health. The harder something is to cook, the more it will heal you. Somewhere around here is a chef who will tell you more about food and cooking it."); [proc,set_hint_icon_survival_guide] -if (npc_finduid(~npc_within_distance(0_48_48_31_23, survival_expert, 10)) = true) { +if (npc_find(0_48_48_31_23, survival_expert, 10, 0) = true) { hint_npc(npc_uid); } diff --git a/data/src/scripts/tutorial/scripts/npcs/tut_chicken.rs2 b/data/src/scripts/tutorial/scripts/npcs/tut_chicken.rs2 index 38d244eb1..6b16bf98b 100644 --- a/data/src/scripts/tutorial/scripts/npcs/tut_chicken.rs2 +++ b/data/src/scripts/tutorial/scripts/npcs/tut_chicken.rs2 @@ -8,6 +8,6 @@ return; [proc,set_hint_icon_chicken] -if (npc_finduid(~npc_within_distance(0_49_48_3_20, tut_chicken, 10)) = true) { +if (npc_find(0_49_48_3_20, tut_chicken, 10, 0) = true) { hint_npc(npc_uid); } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/npcs/tut_giant_rat.rs2 b/data/src/scripts/tutorial/scripts/npcs/tut_giant_rat.rs2 index ddfcacba6..d55ffb24b 100644 --- a/data/src/scripts/tutorial/scripts/npcs/tut_giant_rat.rs2 +++ b/data/src/scripts/tutorial/scripts/npcs/tut_giant_rat.rs2 @@ -124,6 +124,6 @@ if (%tutorial_progress = ^combat_instructor_before_attacking_ranged) { } [proc,set_hint_icon_giant_rat] -if (npc_finduid(~npc_within_distance(0_48_148_37_47, tut_giant_rat, 10)) = true) { +if (npc_find(0_48_148_37_47, tut_giant_rat, 10, 0) = true) { hint_npc(npc_uid); } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/tut_doors_and_gates.rs2 b/data/src/scripts/tutorial/scripts/tut_doors_and_gates.rs2 index 908fa73ff..eec2d0a5a 100644 --- a/data/src/scripts/tutorial/scripts/tut_doors_and_gates.rs2 +++ b/data/src/scripts/tutorial/scripts/tut_doors_and_gates.rs2 @@ -89,7 +89,7 @@ if (%tutorial_progress = ^tutorial_has_toggled_on_run) { // Ladder to Mine [oploc1,loc_3029] if (%tutorial_progress < ^quest_guide_finished) { - if (npc_finduid(~npc_within_distance(0_48_48_12_52, quest_guide, 10)) = true) { + if (npc_find(0_48_48_12_52, quest_guide, 10, 0) = true) { @quest_guide_not_ready_to_leave_yet; } } @@ -147,13 +147,13 @@ sound_synth(door_open, 0, 0); [oploc1,_rat_pit_cage] if (%tutorial_progress < ^combat_instructor_opened_combat_interface | %tutorial_progress > ^combat_instructor_before_attacking_ranged) { - if (npc_finduid(~npc_within_distance(0_48_148_35_38, combat_instructor, 10)) = true) { + if (npc_find(0_48_148_35_38, combat_instructor, 10, 0) = true) { @combat_instructor_get_away_from_there; } } if (%tutorial_progress = ^combat_instructor_before_attacking_ranged) { - if (npc_finduid(~npc_within_distance(0_48_148_35_38, combat_instructor, 10)) = true) { + if (npc_find(0_48_148_35_38, combat_instructor, 10, 0) = true) { @combat_instructor_dont_enter_the_pit_ranged; } } @@ -190,7 +190,7 @@ sound_synth(door_open, 0, 0); [oploc1,loc_3030] if (%tutorial_progress < ^combat_instructor_after_attacking_ranged) { - if (npc_finduid(~npc_within_distance(0_48_148_35_38, combat_instructor, 10)) = true) { + if (npc_find(0_48_148_35_38, combat_instructor, 10, 0) = true) { @combat_instructor_youre_not_ready_to_continue; } } diff --git a/data/src/scripts/tutorial/scripts/tutorial.rs2 b/data/src/scripts/tutorial/scripts/tutorial.rs2 index acf5632b3..193a50d00 100644 --- a/data/src/scripts/tutorial/scripts/tutorial.rs2 +++ b/data/src/scripts/tutorial/scripts/tutorial.rs2 @@ -168,7 +168,7 @@ if (%tutorial_progress = 2) { %tutorial_progress = ^brother_brace_after_friends_tab; } else if (%tutorial_progress = ^tutorial_open_magic_tab) { %tutorial_progress = ^tutorial_opened_magic_tab; - if (npc_finduid(~npc_within_distance(0_49_48_5_17, magic_instructor, 10)) = true) { + if (npc_find(0_49_48_5_17, magic_instructor, 10, 0) = true) { hint_npc(npc_uid); @magic_instructor_opened_tab; } From f094f4a3c10a5001f5853c810df3acb3d2ac0878 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 21:23:26 -0400 Subject: [PATCH 09/50] refactor(content): quest_ball now uses npc_hunt --- .../general/scripts/misc/npc_procs.rs2 | 45 ------------------- .../quests/quest_ball/scripts/quest_ball.rs2 | 25 +++++++---- 2 files changed, 16 insertions(+), 54 deletions(-) diff --git a/data/src/scripts/general/scripts/misc/npc_procs.rs2 b/data/src/scripts/general/scripts/misc/npc_procs.rs2 index b5d317f39..66dcf63bf 100644 --- a/data/src/scripts/general/scripts/misc/npc_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/npc_procs.rs2 @@ -1,48 +1,3 @@ -[proc,npc_category_within_distance](coord $coord, category $npc_category, int $distance)(npc_uid) -// a radius of 1 will loop 9 zones -// a radius of 2 will loop 25 zones -// a radius of 3 will loop 49 zones -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - -def_int $closet_distance = $distance; -def_npc_uid $closest_npc = null; - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - // mes("Zone: _"); - npc_findallzone($zoneCoord); - while (npc_findnext = true) { - if (npc_category = $npc_category & distance($coord, npc_coord) <= $closet_distance) { - $closet_distance = distance($coord, npc_coord); - $closest_npc = npc_uid; - } - } - $maxZ = sub($maxZ, 1); - } - $maxX = sub($maxX, 1); -} -if ($closet_distance < $distance | $closest_npc ! null) { - return($closest_npc); -} -return(null); - [proc,npc_count_within_distance](coord $coord, npc $npc, int $distance)(int) // a radius of 1 will loop 9 zones // a radius of 2 will loop 25 zones diff --git a/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 b/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 index 75c3efbac..2fb686dbf 100644 --- a/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 +++ b/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 @@ -151,8 +151,12 @@ if(last_useitem = ball_shedkey) { } %ball_shed_uid = uid; softtimer(shed_var_check, 1); - if(npc_finduid(~npc_category_within_distance(coord, witches_experiment, 7)) = true) { - npc_del; + + npc_huntall(coord, 7, 0); + while (npc_huntnext = true) { + if (npc_category = witches_experiment) { + npc_del; + } } npc_add(^ball_experiment_spawn_coord, witches_experiment_p1, 500); } @@ -194,13 +198,16 @@ if(%ball_progress = ^ball_defeated_experiment) { } @pickup_obj(obj_coord, obj_type, obj_count); } -if(npc_finduid(~npc_category_within_distance(coord, witches_experiment, 7)) = true) { - mes("The shapeshifter glares at you. You feel slightly weakened."); - stat_sub(attack, calc(1 + ((stat(attack) * 5) / 100)), 0); - stat_sub(defence, calc(1 + ((stat(defence) * 5) / 100)), 0); - ~npc_retaliate(0); - queue(damage_player, 0, calc(1 + ((stat(hitpoints) * 5) / 100))); - return; +npc_huntall(coord, 7, 0); +while (npc_huntnext = true) { + if (npc_category = witches_experiment) { + mes("The shapeshifter glares at you. You feel slightly weakened."); + stat_sub(attack, calc(1 + ((stat(attack) * 5) / 100)), 0); + stat_sub(defence, calc(1 + ((stat(defence) * 5) / 100)), 0); + ~npc_retaliate(0); + queue(damage_player, 0, calc(1 + ((stat(hitpoints) * 5) / 100))); + return; + } } npc_add(^ball_experiment_spawn_coord, witches_experiment_p1, 500); mes("A shapeshifter appears, and knocks you back from the ball!"); From 1d344ef468a895abe327eca50ae735dbc7af48ad Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 21:30:29 -0400 Subject: [PATCH 10/50] refactor(content): ~npc_count_within_distance changed to ~npc_findcount --- .../scripts/wizard_grayzag.rs2 | 4 +- .../general/scripts/misc/npc_procs.rs2 | 92 +++---------------- 2 files changed, 17 insertions(+), 79 deletions(-) diff --git a/data/src/scripts/areas/area_wizard_tower/scripts/wizard_grayzag.rs2 b/data/src/scripts/areas/area_wizard_tower/scripts/wizard_grayzag.rs2 index 2afdadb53..85f00ef21 100644 --- a/data/src/scripts/areas/area_wizard_tower/scripts/wizard_grayzag.rs2 +++ b/data/src/scripts/areas/area_wizard_tower/scripts/wizard_grayzag.rs2 @@ -12,7 +12,7 @@ if (map_clock < %npc_action_delay) { npc_setmode(opplayer2); // 1/10 chance and a 5 imp cap (completely guessed) // .npc_count_within_distance so it doesnt mess up activenpc pointer. -if (random(10) = 0 & ~.npc_count_within_distance(npc_coord, imp_grayzag, 10) < 5) { // completely guessed +if (random(10) = 0 & ~.npc_findcount(npc_coord, imp_grayzag, 10, 0) < 5) { // completely guessed ~npc_spawn_imp_attack; return; } @@ -25,7 +25,7 @@ if (map_clock < %npc_action_delay) { } // 1/10 chance and a 5 imp cap (completely guessed) // .npc_count_within_distance so it doesnt mess up activenpc pointer. -if (random(10) = 0 & ~.npc_count_within_distance(npc_coord, imp_grayzag, 10) < 5) { +if (random(10) = 0 & ~.npc_findcount(npc_coord, imp_grayzag, 10, 0) < 5) { ~npc_spawn_imp_attack; return; } diff --git a/data/src/scripts/general/scripts/misc/npc_procs.rs2 b/data/src/scripts/general/scripts/misc/npc_procs.rs2 index 66dcf63bf..2b41469c0 100644 --- a/data/src/scripts/general/scripts/misc/npc_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/npc_procs.rs2 @@ -1,84 +1,22 @@ -[proc,npc_count_within_distance](coord $coord, npc $npc, int $distance)(int) -// a radius of 1 will loop 9 zones -// a radius of 2 will loop 25 zones -// a radius of 3 will loop 49 zones -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - - -def_int $total = 0; - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - // mes("Zone: _"); - npc_findallzone($zoneCoord); - while (npc_findnext = true) { - if (npc_type = $npc & distance($coord, npc_coord) <= $distance) { - $total = add($total, 1); - } - } - $maxZ = sub($maxZ, 1); +[proc,npc_findcount](coord $coord, npc $npc, int $distance, int $checkvis)(int) +npc_findallany($coord, $distance, $checkvis); +def_int $count = 0; +while (npc_findnext = true) { + if (npc_type = $npc) { + $count = add($count, 1); } - $maxX = sub($maxX, 1); } -return($total); - -[proc,.npc_count_within_distance](coord $coord, npc $npc, int $distance)(int) -// a radius of 1 will loop 9 zones -// a radius of 2 will loop 25 zones -// a radius of 3 will loop 49 zones -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - - -def_int $total = 0; - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - // mes("Zone: _"); - npc_findallzone($zoneCoord); - while (.npc_findnext = true) { - if (.npc_type = $npc & distance($coord, .npc_coord) <= $distance) { - $total = add($total, 1); - } - } - $maxZ = sub($maxZ, 1); +return ($count); + +[proc,.npc_findcount](coord $coord, npc $npc, int $distance, int $checkvis)(int) +.npc_findallany($coord, $distance, $checkvis); +def_int $count = 0; +while (.npc_findnext = true) { + if (.npc_type = $npc) { + $count = add($count, 1); } - $maxX = sub($maxX, 1); } -return($total); +return ($count); // - deletes all of one npc type within a certain number of tiles from a coord [proc,npc_del_within_distance](coord $coord, npc $npc, int $distance) From 9b64ea8b63f122eced984cdc84c2acc833f02487 Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 21:34:59 -0400 Subject: [PATCH 11/50] refactor(content): ~npc_del_within_distance removed --- .../area_mage_arena/scripts/kolodion.rs2 | 7 +- .../general/scripts/misc/npc_procs.rs2 | 75 +------------------ 2 files changed, 7 insertions(+), 75 deletions(-) diff --git a/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 index a91d66533..917cdc3a6 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 @@ -139,7 +139,12 @@ p_delay(3); p_teleport(^mage_arena_start_coord); anim(null, 0); def_npc $boss = enum(int, npc, mage_arena_bosses, %magearena_progress); -~npc_del_within_distance2(^mage_arena_start_coord, $boss, 20); // remove the boss if its the same stage, and not in combat +npc_huntall(^mage_arena_start_coord, 20, 0); +while (npc_huntnext = true) { + if (npc_type = $boss & add(%npc_lastcombat, 8) <= map_clock) { + npc_del; + } +} switch_int (%magearena_progress) { case ^mage_arena_started: // looks like the smoke appears 1t sooner than osrs (no 34 client tick delay as well) diff --git a/data/src/scripts/general/scripts/misc/npc_procs.rs2 b/data/src/scripts/general/scripts/misc/npc_procs.rs2 index 2b41469c0..7caba2a67 100644 --- a/data/src/scripts/general/scripts/misc/npc_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/npc_procs.rs2 @@ -16,77 +16,4 @@ while (.npc_findnext = true) { $count = add($count, 1); } } -return ($count); - -// - deletes all of one npc type within a certain number of tiles from a coord -[proc,npc_del_within_distance](coord $coord, npc $npc, int $distance) -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - // mes("Zone: _"); - npc_findallzone($zoneCoord); - while (npc_findnext = true) { - if (npc_type = $npc & distance($coord, npc_coord) <= $distance) { - npc_del; - } - } - $maxZ = sub($maxZ, 1); - } - $maxX = sub($maxX, 1); -} - -// - deletes all of one npc type within a certain number of tiles from a coord -// - Doesnt delete if the npc is in combat. -// - Used for mage arena -[proc,npc_del_within_distance2](coord $coord, npc $npc, int $distance) -def_int $radius = add(1, divide($distance, 8)); - -def_int $x = coordx($coord); -def_int $z = coordz($coord); - -def_int $centerX = divide($x, pow(2, 3)); -def_int $centerZ = divide($z, pow(2, 3)); - -def_int $maxX = add($centerX, $radius); -def_int $minX = sub($centerX, $radius); - -while ($maxX >= $minX) { - def_int $zoneX = multiply($maxX, pow(2, 3)); - def_int $maxZ = add($centerZ, $radius); - def_int $minZ = sub($centerZ, $radius); - while ($maxZ >= $minZ) { - def_int $zoneZ = multiply($maxZ, pow(2, 3)); - - def_int $dx = sub($zoneX, $x); - def_int $dz = sub($zoneZ, $z); - def_coord $zoneCoord = movecoord($coord, $dx, 0, $dz); - // mes("Zone: _"); - npc_findallzone($zoneCoord); - while (npc_findnext = true) { - // only delete if the npc isnt in combat - if (npc_type = $npc & distance($coord, npc_coord) <= $distance & add(%npc_lastcombat, 8) <= map_clock) { - npc_del; - } - } - $maxZ = sub($maxZ, 1); - } - $maxX = sub($maxX, 1); -} \ No newline at end of file +return ($count); \ No newline at end of file From c7676527f9ba44398310818e54af9636c6679d8b Mon Sep 17 00:00:00 2001 From: tannerdino Date: Sat, 1 Jun 2024 21:46:00 -0400 Subject: [PATCH 12/50] chore(engine): remove console.log --- src/lostcity/engine/script/handlers/NpcOps.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index 53beaa993..81994c69a 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -348,7 +348,6 @@ const NpcOps: CommandHandlers = { state.pushInt(0); return; } - console.log(NpcType.get(closestNpc.type)); // not necessary but if we want to refer to the original npc again, we can state.activeNpc = closestNpc; state.pointerAdd(ActiveNpc[state.intOperand]); From 620fb6479c4e207775b14df7477c115ad68c2194 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 2 Jun 2024 01:15:50 -0400 Subject: [PATCH 13/50] fix(content): some smithing levelup messages (#548) * fix(content): some smithing levelup messages * fix: remove unnecessary color --- .../levelup/scripts/levelup_unlocks_smithing.rs2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/src/scripts/levelup/scripts/levelup_unlocks_smithing.rs2 b/data/src/scripts/levelup/scripts/levelup_unlocks_smithing.rs2 index 711a29d30..09abb743b 100644 --- a/data/src/scripts/levelup/scripts/levelup_unlocks_smithing.rs2 +++ b/data/src/scripts/levelup/scripts/levelup_unlocks_smithing.rs2 @@ -3,7 +3,7 @@ switch_int(stat_base(smithing)) { case 2: ~objbox(bronze_mace,"You can now make @dbl@Bronze Maces@bla@."); case 3: ~objboxb(bronze_med_helm,"You can now make @dbl@Bronze Medium Helms@bla@."); - case 4: ~doubleobjbox(bronze_sword,bronze_dart_tip,"You can now make @dbl@Bronze Short Swords@bla@, and members|can make @dbl@Bronze Dart Tips@bla@ and @dbl@Bronze Wire@bla@."); + case 4: ~doubleobjbox(bronze_sword,bronze_dart_tip,"You can now make @dbl@Bronze Short Swords@bla@ and members|can make @dbl@Bronze Dart Tips@bla@ and @dbl@Bronze Wire@bla@."); case 5: ~doubleobjbox(bronze_scimitar,bronze_spear,"You can now make @dbl@Bronze Scimitars@bla@ and members|can make @dbl@Bronze Arrow Heads@bla@ and @dbl@Bronze|@dbl@Spears@bla@."); case 6: ~objboxt(bronze_longsword,"You can now make @dbl@Bronze Long Swords@bla@."); case 7: ~doubleobjbox(bronze_full_helm,bronze_knife,"You can now make @dbl@Bronze Full Helms@bla@ and members|can make @dbl@Bronze Throwing Knives@bla@."); @@ -31,8 +31,8 @@ switch_int(stat_base(smithing)) { case 31: ~doubleobjbox(iron_platelegs,steel_axe,"You can now make @dbl@Iron Plate Legs@bla@, @dbl@Iron plate skirts|@bla@and @dbl@Steel Axes@bla@."); case 32: ~objbox(steel_mace,"You can now make @dbl@Steel Maces@bla@."); case 33: ~doubleobjbox(iron_platebody,steel_med_helm,"You can now make @dbl@Iron Plate Bodies@bla@ and @dbl@Steel|@dbl@Medium Helms@bla@."); - case 34: ~doubleobjbox(steel_sword,steel_dart_tip,"You can now make @dbl@Steel Short Swords@bla@ and @dbl@Steel Nails|@bla@and members can make @dbl@Steel Dart Tips@bla@."); - case 35: ~doubleobjbox(steel_scimitar,steel_spear,"You can now make @dbl@Steel Scimitars and members can|make @dbl@Steel Arrow Heads@bla@ and @dbl@SteelSp|@dbl@ears@bla@."); + case 34: ~doubleobjbox(steel_sword,steel_dart_tip,"You can now make @dbl@Steel Short Swords@bla@ and members|can make @dbl@Steel Dart Tips@bla@."); + case 35: ~doubleobjbox(steel_scimitar,steel_spear,"You can now make @dbl@Steel Scimitars and members can|make @dbl@Steel Arrow Heads@bla@ and @dbl@Steel Spears@bla@."); case 36: ~doubleobjbox(steel_longsword,steel_studs,"You can now make @dbl@ISteel Long Swords@bla@. Members can|make @dbl@Steel Studs@bla@."); case 37: ~doubleobjbox(steel_full_helm,steel_knife,"You can now make @dbl@Steel Full Helms@bla@ and members can|make @dbl@Steel Throwing Knives@bla@."); case 38: ~objboxt(steel_sq_shield,"You can now make @dbl@Steel Square Shields@bla@."); @@ -47,7 +47,7 @@ switch_int(stat_base(smithing)) { case 51: ~objboxt(mithril_axe,"You can now make @dbl@Mithril Axes@bla@."); case 52: ~objbox(mithril_mace,"You can now make @dbl@Mithril Maces@bla@."); case 53: ~objbox(mithril_med_helm,"You can now make @dbl@Mithril Medium Helms@bla@."); - case 54: ~doubleobjbox(mithril_sword,iron_dart_tip,"You can now make @dbl@Mithril Short Swords@bla@, and members|can make @dbl@Mithril Dart Tips@bla@."); + case 54: ~doubleobjbox(mithril_sword,iron_dart_tip,"You can now make @dbl@Mithril Short Swords@bla@ and members|can make @dbl@Mithril Dart Tips@bla@."); case 55: ~doubleobjbox(mithril_scimitar,mithril_spear,"You can now make @dbl@Mithril Scimitars@bla@ and members|can make @dbl@Mithril Arrow Heads@bla@ and @dbl@Mithril|@dbl@Spears@bla@."); case 56: ~objboxt(mithril_longsword,"You can now make @dbl@Mithril Long Swords@bla@."); case 57: ~doubleobjbox(mithril_full_helm,mithril_knife,"You can now make @dbl@Mithril Full Helms@bla@ and members|can make @dbl@Mithril Throwing Knives@bla@."); @@ -63,7 +63,7 @@ switch_int(stat_base(smithing)) { case 71: ~objboxt(adamant_axe,"You can now make @dbl@Adamant Axes@bla@."); case 72: ~objbox(adamant_mace,"You can now make @dbl@Adamant Maces@bla@."); case 73: ~objbox(adamant_med_helm,"You can now make @dbl@Adamant Medium Helms@bla@."); - case 74: ~doubleobjbox(adamant_sword,adamant_dart_tip,"You can now make @dbl@Adamant Short Swords@bla@, and members|can make @dbl@Adamant Dart Tips@bla@."); + case 74: ~doubleobjbox(adamant_sword,adamant_dart_tip,"You can now make @dbl@Adamant Short Swords@bla@ and members|can make @dbl@Adamant Dart Tips@bla@."); case 75: ~doubleobjbox(adamant_scimitar,adamant_spear,"You can now make @dbl@Adamant Scimitars@bla@ and members|can make @dbl@Adamant Arrow Heads@bla@ and @dbl@Adamant|@dbl@Spears@bla@."); case 76: ~objboxt(adamant_longsword,"You can now make @dbl@Adamant Long Swords@bla@."); case 77: ~doubleobjbox(adamant_full_helm,adamant_knife,"You can now make @dbl@Adamant Full Helms@bla@ and members|can make @dbl@Adamant Throwing Knives@bla@."); @@ -77,7 +77,7 @@ switch_int(stat_base(smithing)) { case 86: ~doubleobjbox(adamant_platelegs,adamant_plateskirt,"You can now make @dbl@Adamant Plate Legs@bla@, @dbl@Adamant plate skirts@bla@ and @dbl@Rune Axes@bla@."); case 87: ~objbox(rune_mace,"You can now make @dbl@Rune Maces@bla@."); case 88: ~doubleobjbox(adamant_platebody,rune_med_helm,"You can now make @dbl@Adamant Plate Bodies@bla@ and @dbl@Rune|@dbl@Medium Helms@bla@."); - case 89: ~doubleobjbox(rune_sword,rune_dart_tip,"You can now make @dbl@Rune Short Swords@bla@, and members|can make @dbl@Rune Dart Tips@bla@."); + case 89: ~doubleobjbox(rune_sword,rune_dart_tip,"You can now make @dbl@Rune Short Swords@bla@ and members|can make @dbl@Rune Dart Tips@bla@."); case 90: ~doubleobjbox(rune_scimitar,rune_spear,"You can now make @dbl@Rune Scimitars@bla@ and members|can make @dbl@Rune Arrow Heads@bla@ and @dbl@Rune|@dbl@Spears@bla@."); case 91: ~objboxt(rune_longsword,"You can now make @dbl@Rune Long Swords@bla@."); case 92: ~doubleobjbox(rune_full_helm,rune_knife,"You can now make @dbl@Rune Full Helms@bla@ and members|can make @dbl@Rune Throwing Knives@bla@."); From 8535bf8b1ae295964c73bbe5a1f9abcffbc0381a Mon Sep 17 00:00:00 2001 From: tannerdino <61213166+tannerdino@users.noreply.github.com> Date: Sun, 2 Jun 2024 01:16:15 -0400 Subject: [PATCH 14/50] fix(content): fixed placing items on tables being broken (#547) * feat(engine): lc_width and lc_length commands * fix(content): placing items on tables was broken * fix(content): picnic bench removed from usable_table category due to floating objs * chore(content): remove todo comment in tables.rs2 * fix(content): picnic benches unusable_table to match osrs --------- Co-authored-by: tannerdino --- data/src/scripts/engine.rs2 | 2 ++ data/src/scripts/general_use/configs/tables.loc | 2 +- data/src/scripts/general_use/scripts/tables.rs2 | 11 ++--------- src/lostcity/engine/script/ScriptOpcode.ts | 2 ++ .../engine/script/handlers/LocConfigOps.ts | 14 ++++++++++++++ 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index 1d72b5660..104ff4ef1 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -307,6 +307,8 @@ [command,lc_category](loc $loc)(category) [command,lc_desc](loc $loc)(string) [command,lc_debugname](loc $loc)(string) +[command,lc_width](loc $loc)(int) +[command,lc_length](loc $loc)(int) // Obj config ops (4200-4299) [command,oc_name](obj $obj)(string) diff --git a/data/src/scripts/general_use/configs/tables.loc b/data/src/scripts/general_use/configs/tables.loc index 9d73a451f..3f6f9efa2 100644 --- a/data/src/scripts/general_use/configs/tables.loc +++ b/data/src/scripts/general_use/configs/tables.loc @@ -176,7 +176,7 @@ model=model_loc_611 width=2 length=2 blockrange=no -category=usable_table +category=unusable_table [loc_612] name=Counter diff --git a/data/src/scripts/general_use/scripts/tables.rs2 b/data/src/scripts/general_use/scripts/tables.rs2 index d591d3637..7e26f38ec 100644 --- a/data/src/scripts/general_use/scripts/tables.rs2 +++ b/data/src/scripts/general_use/scripts/tables.rs2 @@ -1,14 +1,11 @@ - - [oplocu,_usable_table] anim(human_pickuptable, 0); sound_synth(put_down, 0, 0); def_coord $obj_coord = loc_coord; -// todo: lc command for length/width? -def_int $width = 1; -def_int $length = 1; +def_int $width = lc_width(loc_type); +def_int $length = lc_length(loc_type); def_int $x = calc(coordx(loc_coord) - coordx(coord)); def_int $z = calc(coordz(loc_coord) - coordz(coord)); @@ -26,7 +23,3 @@ inv_dropslot(inv, $obj_coord, last_useslot, 1000); [oplocu,_unusable_table] mes("The table appears to be in use."); - - - - diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index 03dda3d5b..40e8363c8 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -268,6 +268,8 @@ enum ScriptOpcode { LC_NAME, LC_OP, LC_PARAM, + LC_WIDTH, + LC_LENGTH, // Obj config ops (4200-4299) OC_CATEGORY = 4200, // official diff --git a/src/lostcity/engine/script/handlers/LocConfigOps.ts b/src/lostcity/engine/script/handlers/LocConfigOps.ts index d73245178..9fe9883b2 100644 --- a/src/lostcity/engine/script/handlers/LocConfigOps.ts +++ b/src/lostcity/engine/script/handlers/LocConfigOps.ts @@ -46,6 +46,20 @@ const LocConfigOps: CommandHandlers = { const locType = LocType.get(locId); state.pushString(locType.debugname ?? 'null'); + }, + + [ScriptOpcode.LC_WIDTH]: state => { + const locId = check(state.popInt(), LocTypeValid); + + const locType = LocType.get(locId); + state.pushInt(locType.width ?? 0); + }, + + [ScriptOpcode.LC_LENGTH]: state => { + const locId = check(state.popInt(), LocTypeValid); + + const locType = LocType.get(locId); + state.pushInt(locType.length ?? 0); } }; From bd6c5aa0fcf8b615a15f26179e751ab5b85ee1d0 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 2 Jun 2024 11:02:06 -0400 Subject: [PATCH 15/50] refactor(engine): cleanup the rsmod imports (#550) --- .../engine/collision/CollisionManager.ts | 23 +++++------ src/lostcity/engine/script/ScriptIterators.ts | 23 +++++------ .../engine/script/handlers/PlayerOps.ts | 4 +- .../engine/script/handlers/ServerOps.ts | 21 ++++------ src/lostcity/engine/zone/Zone.ts | 14 +++---- src/lostcity/entity/NetworkPlayer.ts | 5 ++- src/lostcity/entity/Npc.ts | 6 ++- src/lostcity/entity/PathingEntity.ts | 38 ++++++++----------- 8 files changed, 62 insertions(+), 72 deletions(-) diff --git a/src/lostcity/engine/collision/CollisionManager.ts b/src/lostcity/engine/collision/CollisionManager.ts index ad384b6c0..3b5e1fdfd 100644 --- a/src/lostcity/engine/collision/CollisionManager.ts +++ b/src/lostcity/engine/collision/CollisionManager.ts @@ -6,7 +6,8 @@ import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; import LocType from '#lostcity/cache/LocType.js'; import Loc from '#lostcity/entity/Loc.js'; -import {allocateIfAbsent, changeFloor, changeLoc, changeNpc, changePlayer, changeRoof, changeWall, LocAngle, LocLayer, locShapeLayer} from '@2004scape/rsmod-pathfinder'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; +import {LocAngle, LocLayer} from '@2004scape/rsmod-pathfinder'; export default class CollisionManager { init(zoneManager: ZoneManager) { @@ -34,7 +35,7 @@ export default class CollisionManager { * @param add True if adding this collision. False if removing. */ changeLandCollision(x: number, z: number, level: number, add: boolean): void { - changeFloor(x, z, level, add); + rsmod.changeFloor(x, z, level, add); } /** @@ -51,18 +52,18 @@ export default class CollisionManager { * @param add True if adding this collision. False if removing. */ changeLocCollision(shape: number, angle: number, blockrange: boolean, length: number, width: number, active: number, x: number, z: number, level: number, add: boolean): void { - const locLayer: LocLayer = locShapeLayer(shape); + const locLayer: LocLayer = rsmod.locShapeLayer(shape); if (locLayer === LocLayer.WALL) { - changeWall(x, z, level, angle, shape, blockrange, false, add); + rsmod.changeWall(x, z, level, angle, shape, blockrange, false, add); } else if (locLayer === LocLayer.GROUND) { if (angle === LocAngle.NORTH || angle === LocAngle.SOUTH) { - changeLoc(x, z, level, length, width, blockrange, false, add); + rsmod.changeLoc(x, z, level, length, width, blockrange, false, add); } else { - changeLoc(x, z, level, width, length, blockrange, false, add); + rsmod.changeLoc(x, z, level, width, length, blockrange, false, add); } } else if (locLayer === LocLayer.GROUND_DECOR) { if (active === 1) { - changeFloor(x, z, level, add); + rsmod.changeFloor(x, z, level, add); } } } @@ -76,7 +77,7 @@ export default class CollisionManager { * @param add True if adding this collision. False if removing. */ changeNpcCollision(size: number, x: number, z: number, level: number, add: boolean): void { - changeNpc(x, z, level, size, add); + rsmod.changeNpc(x, z, level, size, add); } /** @@ -88,7 +89,7 @@ export default class CollisionManager { * @param add True if adding this collision. False if removing. */ changePlayerCollision(size: number, x: number, z: number, level: number, add: boolean): void { - changePlayer(x, z, level, size, add); + rsmod.changePlayer(x, z, level, size, add); } /** @@ -99,7 +100,7 @@ export default class CollisionManager { * @param add True if adding this collision. False if removing. */ changeRoofCollision(x: number, z: number, level: number, add: boolean): void { - changeRoof(x, z, level, add); + rsmod.changeRoof(x, z, level, add); } private decodeLands(lands: Int8Array, packet: Packet, mapsquareX: number, mapsquareZ: number): void { @@ -136,7 +137,7 @@ export default class CollisionManager { const absoluteZ: number = z + mapsquareZ; if (x % 7 === 0 && z % 7 === 0) { // allocate per zone - allocateIfAbsent(absoluteX, absoluteZ, level); + rsmod.allocateIfAbsent(absoluteX, absoluteZ, level); } const land: number = lands[this.packCoord(x, z, level)]; diff --git a/src/lostcity/engine/script/ScriptIterators.ts b/src/lostcity/engine/script/ScriptIterators.ts index 663c46d44..08b81ed20 100644 --- a/src/lostcity/engine/script/ScriptIterators.ts +++ b/src/lostcity/engine/script/ScriptIterators.ts @@ -2,7 +2,6 @@ import World from '#lostcity/engine/World.js'; import {Position} from '#lostcity/entity/Position.js'; import Loc from '#lostcity/entity/Loc.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; -import {hasLineOfSight, hasLineOfWalk} from '@2004scape/rsmod-pathfinder'; import Player from '#lostcity/entity/Player.js'; import Npc from '#lostcity/entity/Npc.js'; import NpcType from '#lostcity/cache/NpcType.js'; @@ -11,6 +10,8 @@ import NpcIteratorType from '#lostcity/entity/NpcIteratorType.js'; import Entity from '#lostcity/entity/Entity.js'; import Obj from '#lostcity/entity/Obj.js'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; + abstract class ScriptIterator implements IterableIterator { private readonly iterator: IterableIterator; protected readonly tick: number; @@ -83,10 +84,10 @@ export class HuntIterator extends ScriptIterator { if (Position.distanceToSW({ x: this.x, z: this.z }, player) > this.distance) { continue; } - if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, player.x, player.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFSIGHT && !rsmod.hasLineOfSight(this.level, this.x, this.z, player.x, player.z, 1, 1, 1, 1)) { continue; } - if (this.checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(this.level, this.x, this.z, player.x, player.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFWALK && !rsmod.hasLineOfWalk(this.level, this.x, this.z, player.x, player.z, 1, 1, 1, 1)) { continue; } yield player; @@ -112,10 +113,10 @@ export class HuntIterator extends ScriptIterator { if (Position.distanceToSW({ x: this.x, z: this.z }, npc) > this.distance) { continue; } - if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFSIGHT && !rsmod.hasLineOfSight(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { continue; } - if (this.checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFWALK && !rsmod.hasLineOfWalk(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { continue; } yield npc; @@ -131,10 +132,10 @@ export class HuntIterator extends ScriptIterator { if (Position.distanceToSW({ x: this.x, z: this.z }, obj) > this.distance) { continue; } - if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, obj.x, obj.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFSIGHT && !rsmod.hasLineOfSight(this.level, this.x, this.z, obj.x, obj.z, 1, 1, 1, 1)) { continue; } - if (this.checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(this.level, this.x, this.z, obj.x, obj.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFWALK && !rsmod.hasLineOfWalk(this.level, this.x, this.z, obj.x, obj.z, 1, 1, 1, 1)) { continue; } yield obj; @@ -149,10 +150,10 @@ export class HuntIterator extends ScriptIterator { if (Position.distanceToSW({ x: this.x, z: this.z }, loc) > this.distance) { continue; } - if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, loc.x, loc.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFSIGHT && !rsmod.hasLineOfSight(this.level, this.x, this.z, loc.x, loc.z, 1, 1, 1, 1)) { continue; } - if (this.checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(this.level, this.x, this.z, loc.x, loc.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFWALK && !rsmod.hasLineOfWalk(this.level, this.x, this.z, loc.x, loc.z, 1, 1, 1, 1)) { continue; } yield loc; @@ -222,10 +223,10 @@ export class NpcIterator extends ScriptIterator { if (Position.distanceToSW({ x: this.x, z: this.z }, npc) > this.distance) { continue; } - if (this.checkVis === HuntVis.LINEOFSIGHT && !hasLineOfSight(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFSIGHT && !rsmod.hasLineOfSight(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { continue; } - if (this.checkVis === HuntVis.LINEOFWALK && !hasLineOfWalk(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { + if (this.checkVis === HuntVis.LINEOFWALK && !rsmod.hasLineOfWalk(this.level, this.x, this.z, npc.x, npc.z, 1, 1, 1, 1)) { continue; } yield npc; diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index ae02c703c..2fb995b05 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -16,7 +16,7 @@ import { Position } from '#lostcity/entity/Position.js'; import ServerProt from '#lostcity/server/ServerProt.js'; import Environment from '#lostcity/util/Environment.js'; -import {findPath} from '@2004scape/rsmod-pathfinder'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; import { check, @@ -394,7 +394,7 @@ const PlayerOps: CommandHandlers = { const pos = Position.unpackCoord(coord); const player = state.activePlayer; - player.queueWaypoints(findPath(player.level, player.x, player.z, pos.x, pos.z, player.width, player.width, player.length, player.orientation)); + player.queueWaypoints(rsmod.findPath(player.level, player.x, player.z, pos.x, pos.z, player.width, player.width, player.length, player.orientation)); player.updateMovement(false); // try to walk immediately }), diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index 1f1392d28..74fe9e4ac 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -18,15 +18,8 @@ import { Position } from '#lostcity/entity/Position.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; import Player from '#lostcity/entity/Player.js'; -import { - CollisionFlag, - hasLineOfSight, - hasLineOfWalk, - isFlagged, - LocAngle, - LocLayer, - locShapeLayer -} from '@2004scape/rsmod-pathfinder'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; +import {CollisionFlag, LocLayer, LocAngle} from '@2004scape/rsmod-pathfinder'; import { check, @@ -154,7 +147,7 @@ const ServerOps: CommandHandlers = { const from = Position.unpackCoord(check(c1, CoordValid)); const to = Position.unpackCoord(check(c2, CoordValid)); - state.pushInt(hasLineOfWalk(from.level, from.x, from.z, to.x, to.z, 1, 1, 1, 1) ? 1 : 0); + state.pushInt(rsmod.hasLineOfWalk(from.level, from.x, from.z, to.x, to.z, 1, 1, 1, 1) ? 1 : 0); }, [ScriptOpcode.STAT_RANDOM]: state => { @@ -275,14 +268,14 @@ const ServerOps: CommandHandlers = { const coord = check(state.popInt(), CoordValid); const pos = Position.unpackCoord(coord); - state.pushInt(isFlagged(pos.x, pos.z, pos.level, CollisionFlag.WALK_BLOCKED) ? 1 : 0); + state.pushInt(rsmod.isFlagged(pos.x, pos.z, pos.level, CollisionFlag.WALK_BLOCKED) ? 1 : 0); }, [ScriptOpcode.MAP_INDOORS]: state => { const coord = check(state.popInt(), CoordValid); const pos = Position.unpackCoord(coord); - state.pushInt(isFlagged(pos.x, pos.z, pos.level, CollisionFlag.ROOF) ? 1 : 0); + state.pushInt(rsmod.isFlagged(pos.x, pos.z, pos.level, CollisionFlag.ROOF) ? 1 : 0); }, [ScriptOpcode.LINEOFSIGHT]: state => { @@ -291,7 +284,7 @@ const ServerOps: CommandHandlers = { const from = Position.unpackCoord(check(c1, CoordValid)); const to = Position.unpackCoord(check(c2, CoordValid)); - state.pushInt(hasLineOfSight(from.level, from.x, from.z, to.x, to.z, 1, 1, 1, 1) ? 1 : 0); + state.pushInt(rsmod.hasLineOfSight(from.level, from.x, from.z, to.x, to.z, 1, 1, 1, 1) ? 1 : 0); }, [ScriptOpcode.WORLD_DELAY]: state => { @@ -361,7 +354,7 @@ const ServerOps: CommandHandlers = { continue; } - const layer = locShapeLayer(loc.shape); + const layer = rsmod.locShapeLayer(loc.shape); if (loc.respawn !== -1 && layer === LocLayer.WALL) { continue; diff --git a/src/lostcity/engine/zone/Zone.ts b/src/lostcity/engine/zone/Zone.ts index 42c23f5f1..98da79904 100644 --- a/src/lostcity/engine/zone/Zone.ts +++ b/src/lostcity/engine/zone/Zone.ts @@ -6,7 +6,7 @@ import Player from '#lostcity/entity/Player.js'; import ServerProt from '#lostcity/server/ServerProt.js'; import World from '#lostcity/engine/World.js'; import PathingEntity from '#lostcity/entity/PathingEntity.js'; -import {locShapeLayer} from '@2004scape/rsmod-pathfinder'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; export class ZoneEvent { type = -1; @@ -256,10 +256,10 @@ export default class Zone { event.x = loc.x; event.z = loc.z; event.tick = World.currentTick; - event.layer = locShapeLayer(loc.shape); + event.layer = rsmod.locShapeLayer(loc.shape); this.updates = this.updates.filter(event => { - if (event.x === loc.x && event.z === loc.z && event.layer === locShapeLayer(loc.shape)) { + if (event.x === loc.x && event.z === loc.z && event.layer === rsmod.locShapeLayer(loc.shape)) { return false; } @@ -286,10 +286,10 @@ export default class Zone { event.x = loc.x; event.z = loc.z; event.tick = World.currentTick; - event.layer = locShapeLayer(loc.shape); + event.layer = rsmod.locShapeLayer(loc.shape); this.updates = this.updates.filter(event => { - if (event.x === loc.x && event.z === loc.z && event.layer === locShapeLayer(loc.shape)) { + if (event.x === loc.x && event.z === loc.z && event.layer === rsmod.locShapeLayer(loc.shape)) { return false; } @@ -321,7 +321,7 @@ export default class Zone { event.x = loc.x; event.z = loc.z; event.tick = World.currentTick; - event.layer = locShapeLayer(loc.shape); + event.layer = rsmod.locShapeLayer(loc.shape); this.updates.push(event); this.lastEvent = World.currentTick; @@ -334,7 +334,7 @@ export default class Zone { event.x = loc.x; event.z = loc.z; event.tick = World.currentTick; - event.layer = locShapeLayer(loc.shape); + event.layer = rsmod.locShapeLayer(loc.shape); this.updates.push(event); this.lastEvent = World.currentTick; diff --git a/src/lostcity/entity/NetworkPlayer.ts b/src/lostcity/entity/NetworkPlayer.ts index 605d1af1d..e50436f39 100644 --- a/src/lostcity/entity/NetworkPlayer.ts +++ b/src/lostcity/entity/NetworkPlayer.ts @@ -13,13 +13,14 @@ import World from '#lostcity/engine/World.js'; import Environment from '#lostcity/util/Environment.js'; -import { findPath } from '@2004scape/rsmod-pathfinder'; import Player from '#lostcity/entity/Player.js'; import ClientSocket from '#lostcity/server/ClientSocket.js'; import ClientProtRepository from '#lostcity/network/225/incoming/prot/ClientProtRepository.js'; import ClientProt from '#lostcity/network/225/incoming/prot/ClientProt.js'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; + export class NetworkPlayer extends Player { client: ClientSocket | null = null; userPath: number[] = []; @@ -88,7 +89,7 @@ export class NetworkPlayer extends Player { this.queueWaypoints(this.userPath); } else { const { x, z } = Position.unpackCoord(this.userPath[0]); - this.queueWaypoints(findPath(this.level, this.x, this.z, x, z)); + this.queueWaypoints(rsmod.findPath(this.level, this.x, this.z, x, z)); } } } diff --git a/src/lostcity/entity/Npc.ts b/src/lostcity/entity/Npc.ts index 7248c1f90..4b556d108 100644 --- a/src/lostcity/entity/Npc.ts +++ b/src/lostcity/entity/Npc.ts @@ -27,13 +27,15 @@ import HuntCheckNotTooStrong from '#lostcity/entity/hunt/HuntCheckNotTooStrong.j import LinkList from '#jagex2/datastruct/LinkList.js'; -import {CollisionFlag, CollisionType, findNaivePath} from '@2004scape/rsmod-pathfinder'; import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; import {HuntIterator} from '#lostcity/engine/script/ScriptIterators.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import Entity from '#lostcity/entity/Entity.js'; import Interaction from '#lostcity/entity/Interaction.js'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; +import {CollisionFlag, CollisionType} from '@2004scape/rsmod-pathfinder'; + export default class Npc extends PathingEntity { static ANIM = 0x2; static FACE_ENTITY = 0x4; @@ -413,7 +415,7 @@ export default class Npc extends PathingEntity { return; } // this might have to be a smart path idk tho - this.queueWaypoints(findNaivePath(this.level, this.x, this.z, this.startX, this.startZ, this.width, this.length, this.width, this.length, extraFlag, collisionStrategy)); + this.queueWaypoints(rsmod.findNaivePath(this.level, this.x, this.z, this.startX, this.startZ, this.width, this.length, this.width, this.length, extraFlag, collisionStrategy)); this.updateMovement(false); } diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index e0b8c334b..98e72d2a2 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -14,16 +14,8 @@ import { Direction, Position } from '#lostcity/entity/Position.js'; import LocType from '#lostcity/cache/LocType.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; -import { - canTravel, - CollisionFlag, - CollisionType, - findNaivePath, - findPath, - hasLineOfSight, - isFlagged, - reached -} from '@2004scape/rsmod-pathfinder'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; +import {CollisionFlag, CollisionType} from '@2004scape/rsmod-pathfinder'; type TargetSubject = { type: number, @@ -321,14 +313,14 @@ export default abstract class PathingEntity extends Entity { return false; } if (target instanceof PathingEntity) { - return reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, target.orientation, -2); + return rsmod.reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, target.orientation, -2); } else if (target instanceof Loc) { const forceapproach = LocType.get(target.type).forceapproach; - return reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, target.angle, target.shape, forceapproach); + return rsmod.reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, target.angle, target.shape, forceapproach); } // instanceof Obj - const reachedAdjacent: boolean = reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, 0, -2); - if (isFlagged(target.x, target.z, target.level, CollisionFlag.WALK_BLOCKED)) { + const reachedAdjacent: boolean = rsmod.reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, 0, -2); + if (rsmod.isFlagged(target.x, target.z, target.level, CollisionFlag.WALK_BLOCKED)) { // picking up off of tables return reachedAdjacent; } @@ -336,7 +328,7 @@ export default abstract class PathingEntity extends Entity { // picking up while walktrigger prevents movement return true; } - return reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, 0, -1); + return rsmod.reached(this.level, this.x, this.z, target.x, target.z, target.width, target.length, this.width, 0, -1); } protected inApproachDistance(range: number, target: Entity): boolean { @@ -348,7 +340,7 @@ export default abstract class PathingEntity extends Entity { // you are not within ap distance of pathing entity if you are underneath it. return false; } - return Position.distanceTo(this, target) <= range && hasLineOfSight(this.level, this.x, this.z, target.x, target.z, this.width, this.length, target.width, target.length, CollisionFlag.PLAYER); + return Position.distanceTo(this, target) <= range && rsmod.hasLineOfSight(this.level, this.x, this.z, target.x, target.z, this.width, this.length, target.width, target.length, CollisionFlag.PLAYER); } protected pathToTarget(): void { @@ -358,12 +350,12 @@ export default abstract class PathingEntity extends Entity { if (this.smart) { if (this.target instanceof PathingEntity) { - this.queueWaypoints(findPath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.target.width, this.target.length, this.target.orientation, -2)); + this.queueWaypoints(rsmod.findPath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.target.width, this.target.length, this.target.orientation, -2)); } else if (this.target instanceof Loc) { const forceapproach = LocType.get(this.target.type).forceapproach; - this.queueWaypoints(findPath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.target.width, this.target.length, this.target.angle, this.target.shape, true, forceapproach)); + this.queueWaypoints(rsmod.findPath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.target.width, this.target.length, this.target.angle, this.target.shape, true, forceapproach)); } else { - this.queueWaypoints(findPath(this.level, this.x, this.z, this.target.x, this.target.z)); + this.queueWaypoints(rsmod.findPath(this.level, this.x, this.z, this.target.x, this.target.z)); } return; } @@ -380,7 +372,7 @@ export default abstract class PathingEntity extends Entity { return; } if (this.target instanceof PathingEntity) { - this.queueWaypoints(findNaivePath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.length, this.target.width, this.target.length, extraFlag, collisionStrategy)); + this.queueWaypoints(rsmod.findNaivePath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.length, this.target.width, this.target.length, extraFlag, collisionStrategy)); } else { this.queueWaypoint(this.target.x, this.target.z); } @@ -521,17 +513,17 @@ export default abstract class PathingEntity extends Entity { } // check current direction if can travel to chosen dest. - if (canTravel(this.level, this.x, this.z, dx, dz, this.width, extraFlag, collisionStrategy)) { + if (rsmod.canTravel(this.level, this.x, this.z, dx, dz, this.width, extraFlag, collisionStrategy)) { return dir; } // check another direction if can travel to chosen dest on current z-axis. - if (dx != 0 && canTravel(this.level, this.x, this.z, dx, 0, this.width, extraFlag, collisionStrategy)) { + if (dx != 0 && rsmod.canTravel(this.level, this.x, this.z, dx, 0, this.width, extraFlag, collisionStrategy)) { return Position.face(srcX, srcZ, x, srcZ); } // check another direction if can travel to chosen dest on current x-axis. - if (dz != 0 && canTravel(this.level, this.x, this.z, 0, dz, this.width, extraFlag, collisionStrategy)) { + if (dz != 0 && rsmod.canTravel(this.level, this.x, this.z, 0, dz, this.width, extraFlag, collisionStrategy)) { return Position.face(srcX, srcZ, srcX, z); } return null; From 601e10ecb96fc7e9f902d6e65bcbbc3046866908 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Sun, 2 Jun 2024 16:30:16 -0400 Subject: [PATCH 16/50] chore: Addressed some setup failures --- Dockerfile | 2 +- README.md | 25 ++++++++++++------------- setup.sh | 10 ++++------ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 44cb67756..46f0d751e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18 +FROM node:22 WORKDIR /app diff --git a/README.md b/README.md index 0416d1017..2eec2f883 100644 --- a/README.md +++ b/README.md @@ -29,39 +29,34 @@ Now open [http://localhost](http://localhost) in your browser and play! Advanced users: You can customize your setup by copying the `.env.example` file to `.env`. This is not necessary for a simple localhost setup. +If you run into issues please see our [common issues](#common-issues) or hop in Discord. + ### Using the setup script -You can instead run `setup.sh` to get your repository ready for running the server. Manually download RuneScriptCompiler.jar, from [environment dependencies](#environment-dependencies), and then run `setup.sh` to run the above commands. +You can instead run `setup.sh` to get your repository ready for running the server. ### Using the DevContainer An alternative way to set up your environment is to utilize a [Development Container](https://containers.dev/). In order to start the Dev Container, you'll need to install [Docker](https://www.docker.com/products/docker-desktop/). If you're running Windows, I suggest getting Docker Desktop. Linux users can use whatever means they prefer to install Docker. Once docker is installed, install the VSCode extension [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). -Make sure to still grab the RuneScriptCompiler.jar from the [environment dependencies](#environment-dependencies) as that can't be automatically installed yet. - -Once that is done follow these steps: +Follow these steps: 1. Make sure Docker is running 2. Open VSCode and run `Dev Containers: Clone Repository in Container Volume` 3. Select `GitHub` as the remote Source 4. Find your fork of this repo 5. Select the branch you want to work from -6. At any point once the container has started and you can see the files in VSCode, drag the RuneScriptCompiler.jar into the root of your repo -7. Once the startup script is finished, run `npm start` - -Once the container starts, it automatically starts running `setup.sh`. You can cancel this and do the [Getting Started](#getting-started) steps manually as well. If you let the startup script finish before moving RuneScriptCompiler.jar into the root of your repo and the script fails, you just need to run `npm run server:build` again before starting your server. +6. Once the startup script is finished, run `npm start` -Another option for building your Dev Container is to instead clone your repository onto your local machine first and then run `Dev Containers: Open Folder in Container` and work that way by mounting the local files into your container. This way, you can have RuneScriptCompiler.jar in your workspace from the get-go. **Note: The npm scripts are much slower when the container is running this way.** +Once the container starts, it automatically starts running `setup.sh`. You can cancel this and do the [Getting Started](#getting-started) steps manually as well. ## Environment Dependencies -- [NodeJS 20](https://nodejs.org/) (current LTS) +- [NodeJS 20.6+](https://nodejs.org/) (22 is fine as well) - [Java 17+](https://adoptium.net/) - If you're using VS Code (recommended), [we have an extension to install here.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage) -Java is required for our RuneScript compiler. - -RuneScriptCompiler.jar is not yet open-source, sorry for any inconvenience. +Java is required for our RuneScript compiler, it will be downloded for you the first time you run `npm start`. ## Development Workflow @@ -90,6 +85,10 @@ It's recommended to install a suitable plugin/extension for your IDE, to show yo Configuration for the linter can be found in `.eslintrc.cjs`. +## Common Issues + +* `bad option: --import`: You are using node an older version of node. We are targeting 20.6+ + ## Credits Thanks to all the current contributors, every PR you submit gets us closer and closer to feature completeness. diff --git a/setup.sh b/setup.sh index 9d7c9894d..720dccdb9 100755 --- a/setup.sh +++ b/setup.sh @@ -3,10 +3,8 @@ echo "Installing node dependencies..." npm i -if [ ! -f .env ]; then - echo "Copying default .env..." - cp .env.example .env -fi +# TODO: let's build for the user here while we can, have to add RuneScriptCompiler.jar to download during build +# currently only does it during start -echo "Building..." -npm run build +# echo "Building..." +# npm run build From 14e4186918005f70714d7eb71aab7b7026616864 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Sun, 2 Jun 2024 18:29:34 -0400 Subject: [PATCH 17/50] feat(engine): Auto-updating compiler --- setup.sh | 7 ++--- src/lostcity/app.ts | 22 ++------------ src/lostcity/tools/pack/pack.ts | 6 ++++ src/lostcity/util/RuneScriptCompiler.ts | 39 +++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 24 deletions(-) create mode 100644 src/lostcity/util/RuneScriptCompiler.ts diff --git a/setup.sh b/setup.sh index 720dccdb9..fd51b4197 100755 --- a/setup.sh +++ b/setup.sh @@ -3,8 +3,5 @@ echo "Installing node dependencies..." npm i -# TODO: let's build for the user here while we can, have to add RuneScriptCompiler.jar to download during build -# currently only does it during start - -# echo "Building..." -# npm run build +echo "Building..." +npm run build diff --git a/src/lostcity/app.ts b/src/lostcity/app.ts index 95db57636..2bdaa3e94 100644 --- a/src/lostcity/app.ts +++ b/src/lostcity/app.ts @@ -1,5 +1,4 @@ import fs from 'fs'; -import axios from 'axios'; import { startWeb } from '#lostcity/web/app.js'; @@ -10,25 +9,10 @@ import WSServer from '#lostcity/server/WSServer.js'; import Environment from '#lostcity/util/Environment.js'; import { packClient, packServer } from './tools/pack/packall.js'; -import ScriptProvider from './engine/script/ScriptProvider.js'; +import { updateCompiler } from '#lostcity/util/RuneScriptCompiler.js'; -if (Environment.UPDATE_ON_STARTUP && !fs.existsSync('RuneScriptCompiler.jar')) { - // todo: put a checksum on the remote so we can download updates for existing setups - try { - const remoteVersionReq = await axios.get('https://github.com/2004scape/RuneScriptCompiler/releases/latest/download/COMPILER_VERSION.txt'); - const remoteVersion = remoteVersionReq.data; - - if (remoteVersion == ScriptProvider.COMPILER_VERSION) { - const RuneScriptCompiler = await axios.get('https://github.com/2004scape/RuneScriptCompiler/releases/latest/download/RuneScriptCompiler.jar', { - responseType: 'arraybuffer' - }); - fs.writeFileSync('RuneScriptCompiler.jar', RuneScriptCompiler.data); - } else if (remoteVersion > ScriptProvider.COMPILER_VERSION) { - console.log('notice: Please update your server. There is a new compiler available.'); - } - } catch (ex) { - console.error('There was an issue checking for compiler updates.'); - } +if (Environment.UPDATE_ON_STARTUP) { + await updateCompiler(); } if (!fs.existsSync('data/pack/client/config')) { diff --git a/src/lostcity/tools/pack/pack.ts b/src/lostcity/tools/pack/pack.ts index 978026972..a49200a3a 100644 --- a/src/lostcity/tools/pack/pack.ts +++ b/src/lostcity/tools/pack/pack.ts @@ -1,7 +1,13 @@ import { parentPort } from 'worker_threads'; import { packClient, packServer } from './packall.js'; +import Environment from '#lostcity/util/Environment.js'; +import { updateCompiler } from '#lostcity/util/RuneScriptCompiler.js'; if (!parentPort) { + if (Environment.UPDATE_ON_STARTUP) { + await updateCompiler(); + } + await packServer(); await packClient(); } diff --git a/src/lostcity/util/RuneScriptCompiler.ts b/src/lostcity/util/RuneScriptCompiler.ts new file mode 100644 index 000000000..76bd0a401 --- /dev/null +++ b/src/lostcity/util/RuneScriptCompiler.ts @@ -0,0 +1,39 @@ +import crypto from 'crypto'; +import fs from 'fs'; + +import axios from 'axios'; + +import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; + +export async function updateCompiler(): Promise { + let needsUpdate = false; + + try { + if (!fs.existsSync('RuneScriptCompiler.jar')) { + needsUpdate = true; + } else { + const sha256 = crypto.createHash('sha256'); + sha256.update(fs.readFileSync('RuneScriptCompiler.jar')); + const shasum = sha256.digest('hex'); + + const req = await axios.get('https://github.com/2004scape/RuneScriptCompiler/releases/download/' + ScriptProvider.COMPILER_VERSION + '/RuneScriptCompiler.jar.sha256'); + const expected = req.data.substring(0, 64); + + if (shasum != expected) { + needsUpdate = true; + } + } + + if (needsUpdate) { + const req = await axios.get('https://github.com/2004scape/RuneScriptCompiler/releases/download/' + ScriptProvider.COMPILER_VERSION + '/RuneScriptCompiler.jar', { + responseType: 'arraybuffer' + }); + + fs.writeFileSync('RuneScriptCompiler.jar', req.data); + } + } catch (err) { + return false; + } + + return true; +} From 8bf98eb8f37d60edb02a337de59556ecfcefc7e3 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 00:16:55 -0400 Subject: [PATCH 18/50] chore: Updated Dev Container environment (broken on Windows + WSL2 still) --- .devcontainer/Server.Dockerfile | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Server.Dockerfile b/.devcontainer/Server.Dockerfile index aa163d278..c3a766955 100644 --- a/.devcontainer/Server.Dockerfile +++ b/.devcontainer/Server.Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/typescript-node:0-18 +FROM mcr.microsoft.com/devcontainers/typescript-node:22 ARG USERNAME=vscode ARG USER_UID=2000 @@ -12,4 +12,4 @@ WORKDIR /app RUN apt-get update && apt-get install -y openjdk-17-jre-headless RUN chown vscode:vscode /app -USER vscode \ No newline at end of file +USER vscode diff --git a/Dockerfile b/Dockerfile index 46f0d751e..cdb14e900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM node:22 WORKDIR /app -RUN apt-get update && apt-get install -y openjdk-17-jre +RUN apt-get update && apt-get install -y openjdk-17-jre-headless COPY package*.json ./ From 772ff3592580e716e3a66951fc77e3425c2a3b9e Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 01:22:44 -0400 Subject: [PATCH 19/50] chore: Quickstart script for manually testing PRs --- quickstart.bat | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 quickstart.bat diff --git a/quickstart.bat b/quickstart.bat new file mode 100644 index 000000000..d850fa90b --- /dev/null +++ b/quickstart.bat @@ -0,0 +1,3 @@ +@echo off +call npm i +call npm start From 9c252c45a1a9c50151bf7aba393bb334c03d72f3 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 04:37:47 -0400 Subject: [PATCH 20/50] chore: Force npm start to run npm i This ensures dependencies are always up to date for a minor slowdown in startup time. Simplifies the instructions a bit too. Restarting shouldn't be all that common unless you're making static changes or engine changes! ...barring a breaking bug of course Engine devs should be using `npm run dev` anyways --- .env.example | 39 +++++++++++++++++++++++---------------- README.md | 20 ++++++++++++-------- package.json | 2 +- quickstart.bat | 1 - 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/.env.example b/.env.example index 200afb886..94f6b6399 100644 --- a/.env.example +++ b/.env.example @@ -1,38 +1,45 @@ -## Server settings +# This is a comment! +# Uncomment lines if you want to change them from their defaults -PUBLIC_IP=localhost -WEB_PORT=80 -GAME_PORT=43594 +# PUBLIC_IP=localhost +# WEB_PORT=80 +# GAME_PORT=43594 -# LOGIN_HOST=127.0.0.1 +# LOGIN_HOST=localhost # LOGIN_PORT=43500 # LOGIN_KEY=SuperSecretKey -# FRIEND_HOST=127.0.0.1 +# FRIEND_HOST=localhost # FRIEND_PORT=43501 # FRIEND_KEY=SuperSecretKey2 +# WORLD_ID=0 +# LOCAL_DEV=true +# MEMBERS_WORLD=true +# XP_MULTIPLIER=1 +# SHUTDOWN_TIMER=50 + +# HTTPS_ENABLED=false +# ADDRESS_SHOWPORT=true +# CLIRUNNER=false +# CI_MODE=false +# SKIP_CORS=false + # DATABASE_URL=mysql://root:password@localhost:3306/lostcity # DB_HOST=localhost # DB_NAME=lostcity # DB_USER=root # DB_PASS=password -# website management -# ADMIN_IP="127.0.0.1" +# ADMIN_IP=localhost # SKIP_CRC=false # JAVA_PATH="C:\Program Files\Eclipse Adoptium\jdk-17.0.11.9-hotspot\bin\java" # DATA_SRC_DIR=data/src # VALIDATE_PACK=true # STRICT_FOLDERS=true +# BUILD_ON_STARTUP=true +# UPDATE_ON_STARTUP=true # JMODS=player1,player2,player3 - -## World settings - -WORLD_ID=0 -MEMBERS_WORLD=true -XP_MULTIPLIER=1 -LOCAL_DEV=true -# SHUTDOWN_TIMER=50 +# CLIENT_PATHFINDER=true diff --git a/README.md b/README.md index 2eec2f883..025d0744b 100644 --- a/README.md +++ b/README.md @@ -22,19 +22,16 @@ It won't ever profit off your trademarks. Without this project, this version of 1. Download this repo to your computer 2. Install our list of [dependencies](#environment-dependencies) 3. Open the folder you downloaded in a command prompt -4. Run `npm install` -5. Run `npm start` +4. Run `npm start` Now open [http://localhost](http://localhost) in your browser and play! +Windows users: We have a script called `quickstart.bat` that will launch the server for you, combining steps 3 and 4 above. + Advanced users: You can customize your setup by copying the `.env.example` file to `.env`. This is not necessary for a simple localhost setup. If you run into issues please see our [common issues](#common-issues) or hop in Discord. -### Using the setup script - -You can instead run `setup.sh` to get your repository ready for running the server. - ### Using the DevContainer An alternative way to set up your environment is to utilize a [Development Container](https://containers.dev/). In order to start the Dev Container, you'll need to install [Docker](https://www.docker.com/products/docker-desktop/). If you're running Windows, I suggest getting Docker Desktop. Linux users can use whatever means they prefer to install Docker. Once docker is installed, install the VSCode extension [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). @@ -56,7 +53,7 @@ Once the container starts, it automatically starts running `setup.sh`. You can c - [Java 17+](https://adoptium.net/) - If you're using VS Code (recommended), [we have an extension to install here.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage) -Java is required for our RuneScript compiler, it will be downloded for you the first time you run `npm start`. +Java is required for our RuneScript compiler, it will be downloaded for you when you run `npm start`. ## Development Workflow @@ -87,7 +84,14 @@ Configuration for the linter can be found in `.eslintrc.cjs`. ## Common Issues -* `bad option: --import`: You are using node an older version of node. We are targeting 20.6+ +* `bad option: --import` +You are using an older version of Node (maybe 18). We are targeting 20.6+ + +* `'"java"' is not recognized as an internal or external command` +You do not have Java 17 installed. + +* `has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0` +You are likely using Java 8 or Java 11. You can either reinstall Java 17 or become an advanced user, and set `JAVA_PATH=path-to-java.exe` in your .env file. ## Credits diff --git a/package.json b/package.json index ce089c4de..aad0ee466 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "precommit": "prettier . --write && eslint . --ext .ts --ext .js --fix", "prepare": "husky", "server:clean": "npm run ts-loader src/lostcity/tools/server/clean.ts", - "start": "npm run ts-loader src/lostcity/app.ts", + "start": "npm i && npm run ts-loader src/lostcity/app.ts", "test": "vitest run ./src", "todo": "leasot src/ --skip-unsupported --exit-nicely", "ts-loader": "node --import @swc-node/register/esm-register --enable-source-maps --no-warnings", diff --git a/quickstart.bat b/quickstart.bat index d850fa90b..fd599aabf 100644 --- a/quickstart.bat +++ b/quickstart.bat @@ -1,3 +1,2 @@ @echo off -call npm i call npm start From 8c22b6ea72507f1908f915c483226b95389cb784 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 04:50:54 -0400 Subject: [PATCH 21/50] chore: Reformatting readme --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 025d0744b..03f440d81 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,15 @@ -# 2004scape Server +
-[Website](https://2004scape.org) | [Discord](https://discord.gg/hN3tHUmZEN) | [Rune-Server](https://www.rune-server.ee/runescape-development/rs2-server/projects/701698-lost-city-225-emulation.html) +

2004Scape Server

+ +[Website](https://2004scape.org) | [Discord](https://discord.2004scape.org) | [Rune-Server](https://www.rune-server.ee/runescape-development/rs2-server/projects/701698-lost-city-225-emulation.html) + +**status: alpha, in-development** +Contributors are welcome to help out! **disclaimer: All server code has been written from scratch for this project, Jagex has never had any source code leaks.** -**status: in-development, not ready for players**. Contributors are welcome to help out. +
--- @@ -26,11 +31,14 @@ It won't ever profit off your trademarks. Without this project, this version of Now open [http://localhost](http://localhost) in your browser and play! -Windows users: We have a script called `quickstart.bat` that will launch the server for you, combining steps 3 and 4 above. +> [!NOTE] +> Windows users: We have a script called `quickstart.bat` that will launch the server for you, combining steps 3 and 4 above. -Advanced users: You can customize your setup by copying the `.env.example` file to `.env`. This is not necessary for a simple localhost setup. +> [!NOTE] +> Advanced users: You can customize your setup by copying the `.env.example` file to `.env`. This is not necessary for a simple localhost setup. -If you run into issues please see our [common issues](#common-issues) or hop in Discord. +> [!NOTE] +> If you run into issues please see our [common issues](#common-issues) or hop in Discord. ### Using the DevContainer @@ -53,8 +61,6 @@ Once the container starts, it automatically starts running `setup.sh`. You can c - [Java 17+](https://adoptium.net/) - If you're using VS Code (recommended), [we have an extension to install here.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage) -Java is required for our RuneScript compiler, it will be downloaded for you when you run `npm start`. - ## Development Workflow Content developers (likely you!) can run `npm start` to start the server. This will watch for changes to the config and script files as well as automatically rebuild them. From 7842edc8dcbb05857ffa605ff20e0774e3057710 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 05:18:41 -0400 Subject: [PATCH 22/50] chore: Updated readme mission statement --- README.md | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 03f440d81..4ba5faa20 100644 --- a/README.md +++ b/README.md @@ -2,25 +2,27 @@

2004Scape Server

-[Website](https://2004scape.org) | [Discord](https://discord.2004scape.org) | [Rune-Server](https://www.rune-server.ee/runescape-development/rs2-server/projects/701698-lost-city-225-emulation.html) +[Website](https://2004scape.org) | [Discord](https://discord.2004scape.org) | [Rune-Server](https://www.rune-server.ee/runescape-development/rs2-server/projects/701698-lost-city-225-emulation.html) | [Getting Started](#getting-started) **status: alpha, in-development** Contributors are welcome to help out! -**disclaimer: All server code has been written from scratch for this project, Jagex has never had any source code leaks.** - +**All server code has been written from scratch for this project.** +**Jagex has never had any source code leaks.** ---- +## Mission Statement + +> [!IMPORTANT] +> Our goal is to authentically, accurately, and precisely emulate old RuneScape to our best knowledge. There are countless hours behind adding and quadruple-checking every bit of logic that goes into this. -This project aims to replicate an authentic RuneScape experience from May 2004. It should be considered an emulator first and foremost, as replicating behaviors by emulating the underlying systems is the biggest focus. The config system and scripting system is as close to authentic as we understand it, and is continually refined as we learn more info. +Caches and clients are sourced from old PCs that played the game at a given time. That gives us the original maps, models, and NPC / Item / Scenery configurations. Then we can unpack that data into a readable and workable format based on what we've been able to observe Jagex doing, as outsiders. ---- +The server side (engine, quests, combat, skills) was not preserved and that's what we're recreating here. The engine takes a lot of effort and is not perfected, but you should consider it our best interpretation of behaviors we can measure. -*To Jagex*: This project comes out of love for the game. As MMOs age, their previous versions are lost to history. An experience becomes ephemeral and time-limited. We're aware that you have no backups for this era and so we're putting in the effort to recreate what we can. -It won't ever profit off your trademarks. Without this project, this version of the game only lives in our memories. Screenshots and videos are scarce, and the original data is lost to time. This is no easy task. +We try to take very little liberties when it comes to guessing, our sources are era-videos, era-screenshots, and RS3/OSRS/RSC. -*To players*: So happy to have you interested! RuneScape 2 launched on March 29, 2004. We have no copies of that revision, but we do have some client caches from May 2004. This project emulates *May 18, 2004*, which was live until June 1 of that year. It has Treasure Trails and Big Chompy Bird Hunting. The next revision after this added Elemental Workshop I. +Our content language of choice is a recreation of RuneScript: this gives us the same limitations, and the opportunity to recreate bugs out of the same circumstances. We don't simply see a bug and add it as an edge case, we have the script and engine work together to reproduce the exact reasons behind the bug. ## Getting Started @@ -31,15 +33,15 @@ It won't ever profit off your trademarks. Without this project, this version of Now open [http://localhost](http://localhost) in your browser and play! -> [!NOTE] +> [!IMPORTANT] +> If you run into issues please see our [common issues](#common-issues) or hop in Discord. + +> [!TIP] > Windows users: We have a script called `quickstart.bat` that will launch the server for you, combining steps 3 and 4 above. -> [!NOTE] +> [!TIP] > Advanced users: You can customize your setup by copying the `.env.example` file to `.env`. This is not necessary for a simple localhost setup. -> [!NOTE] -> If you run into issues please see our [common issues](#common-issues) or hop in Discord. - ### Using the DevContainer An alternative way to set up your environment is to utilize a [Development Container](https://containers.dev/). In order to start the Dev Container, you'll need to install [Docker](https://www.docker.com/products/docker-desktop/). If you're running Windows, I suggest getting Docker Desktop. Linux users can use whatever means they prefer to install Docker. Once docker is installed, install the VSCode extension [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). @@ -59,7 +61,9 @@ Once the container starts, it automatically starts running `setup.sh`. You can c - [NodeJS 20.6+](https://nodejs.org/) (22 is fine as well) - [Java 17+](https://adoptium.net/) -- If you're using VS Code (recommended), [we have an extension to install here.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage) + +> [!TIP] +> If you're using VS Code (recommended), [we have an extension to install on the marketplace.](https://marketplace.visualstudio.com/items?itemName=2004scape.runescriptlanguage) ## Development Workflow From 05d137de873d34f82f55b268f1a73ed5e394ea68 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 05:39:31 -0400 Subject: [PATCH 23/50] fix(engine): Repath on last waypoint only --- README.md | 2 +- src/lostcity/entity/Player.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4ba5faa20..c15093041 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-

2004Scape Server

+

2004Scape Server - May 18, 2004

[Website](https://2004scape.org) | [Discord](https://discord.2004scape.org) | [Rune-Server](https://www.rune-server.ee/runescape-development/rs2-server/projects/701698-lost-city-225-emulation.html) | [Getting Started](#getting-started) diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index bb7fa39df..e485325b9 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -431,7 +431,11 @@ export default class Player extends PathingEntity { return false; } - if (repathAllowed && this.target instanceof PathingEntity && !this.interacted && this.walktrigger === -1) { + if ( + repathAllowed && + this.target instanceof PathingEntity && this.isLastWaypoint() && this.waypoints[0] !== Position.packCoord(this.target.level, this.target.x, this.target.z) && + !this.interacted && this.walktrigger === -1 + ) { this.pathToTarget(); } From 16602f585f8e95c08b786c9d1d77164bc834e73c Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 3 Jun 2024 06:26:29 -0400 Subject: [PATCH 24/50] refactor(engine): remove duplicated pointer arrays (#549) --- src/lostcity/engine/script/ScriptPointer.ts | 6 ++++++ src/lostcity/engine/script/handlers/CoreOps.ts | 4 +--- src/lostcity/engine/script/handlers/InvOps.ts | 5 +---- src/lostcity/engine/script/handlers/LocOps.ts | 4 +--- src/lostcity/engine/script/handlers/NpcOps.ts | 4 +--- src/lostcity/engine/script/handlers/ObjOps.ts | 5 +---- src/lostcity/engine/script/handlers/PlayerOps.ts | 5 +---- src/lostcity/engine/script/handlers/ServerOps.ts | 5 +---- 8 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/lostcity/engine/script/ScriptPointer.ts b/src/lostcity/engine/script/ScriptPointer.ts index c73672054..e06d365ae 100644 --- a/src/lostcity/engine/script/ScriptPointer.ts +++ b/src/lostcity/engine/script/ScriptPointer.ts @@ -18,6 +18,12 @@ enum ScriptPointer { _LAST } +export const ActiveNpc: ScriptPointer[] = [ScriptPointer.ActiveNpc, ScriptPointer.ActiveNpc2]; +export const ActiveLoc: ScriptPointer[] = [ScriptPointer.ActiveLoc, ScriptPointer.ActiveLoc2]; +export const ActiveObj: ScriptPointer[] = [ScriptPointer.ActiveObj, ScriptPointer.ActiveObj2]; +export const ActivePlayer: ScriptPointer[] = [ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2]; +export const ProtectedActivePlayer: ScriptPointer[] = [ScriptPointer.ProtectedActivePlayer, ScriptPointer.ProtectedActivePlayer2]; + /** * Wraps a command handler in another function that will check for pointer presence in the state. * diff --git a/src/lostcity/engine/script/handlers/CoreOps.ts b/src/lostcity/engine/script/handlers/CoreOps.ts index fbd360726..397697e68 100644 --- a/src/lostcity/engine/script/handlers/CoreOps.ts +++ b/src/lostcity/engine/script/handlers/CoreOps.ts @@ -7,12 +7,10 @@ import World from '#lostcity/engine/World.js'; import Script from '#lostcity/engine/script/Script.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import ScriptPointer from '#lostcity/engine/script/ScriptPointer.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; - -const ProtectedActivePlayer = [ScriptPointer.ProtectedActivePlayer, ScriptPointer.ProtectedActivePlayer2]; +import {ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; function gosub(state: ScriptState, id: number) { if (state.fp >= 50) { diff --git a/src/lostcity/engine/script/handlers/InvOps.ts b/src/lostcity/engine/script/handlers/InvOps.ts index 3c43bbc93..37fc042eb 100644 --- a/src/lostcity/engine/script/handlers/InvOps.ts +++ b/src/lostcity/engine/script/handlers/InvOps.ts @@ -5,7 +5,7 @@ import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; -import ScriptPointer, { checkedHandler } from '#lostcity/engine/script/ScriptPointer.js'; +import {ActivePlayer, checkedHandler, ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; import Obj from '#lostcity/entity/Obj.js'; import { Position } from '#lostcity/entity/Position.js'; @@ -21,9 +21,6 @@ import { ObjTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; -const ActivePlayer = [ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2]; -const ProtectedActivePlayer = [ScriptPointer.ProtectedActivePlayer, ScriptPointer.ProtectedActivePlayer2]; - const InvOps: CommandHandlers = { // inv config [ScriptOpcode.INV_ALLSTOCK]: state => { diff --git a/src/lostcity/engine/script/handlers/LocOps.ts b/src/lostcity/engine/script/handlers/LocOps.ts index e3263bc30..e24e3a72d 100644 --- a/src/lostcity/engine/script/handlers/LocOps.ts +++ b/src/lostcity/engine/script/handlers/LocOps.ts @@ -5,7 +5,7 @@ import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import ScriptPointer, { checkedHandler } from '#lostcity/engine/script/ScriptPointer.js'; +import ScriptPointer, {ActiveLoc, checkedHandler} from '#lostcity/engine/script/ScriptPointer.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import {LocIterator} from '#lostcity/engine/script/ScriptIterators.js'; @@ -22,8 +22,6 @@ import { ParamTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; -const ActiveLoc = [ScriptPointer.ActiveLoc, ScriptPointer.ActiveLoc2]; - const LocOps: CommandHandlers = { [ScriptOpcode.LOC_ADD]: state => { const [coord, type, angle, shape, duration] = state.popInts(5); diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index 81994c69a..fd295fb2a 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -6,7 +6,7 @@ import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import ScriptPointer, { checkedHandler } from '#lostcity/engine/script/ScriptPointer.js'; +import ScriptPointer, {ActiveNpc, checkedHandler} from '#lostcity/engine/script/ScriptPointer.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; @@ -40,8 +40,6 @@ import { SpotAnimTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; -const ActiveNpc = [ScriptPointer.ActiveNpc, ScriptPointer.ActiveNpc2]; - const NpcOps: CommandHandlers = { [ScriptOpcode.NPC_FINDUID]: state => { const npcUid = state.popInt(); diff --git a/src/lostcity/engine/script/handlers/ObjOps.ts b/src/lostcity/engine/script/handlers/ObjOps.ts index 0c22cb4f0..be0e65ffc 100644 --- a/src/lostcity/engine/script/handlers/ObjOps.ts +++ b/src/lostcity/engine/script/handlers/ObjOps.ts @@ -6,7 +6,7 @@ import ParamType from '#lostcity/cache/ParamType.js'; import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import ScriptPointer from '#lostcity/engine/script/ScriptPointer.js'; +import {ActiveObj, ActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import Obj from '#lostcity/entity/Obj.js'; @@ -24,9 +24,6 @@ import { ParamTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; -const ActiveObj = [ScriptPointer.ActiveObj, ScriptPointer.ActiveObj2]; -const ActivePlayer = [ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2]; - const ObjOps: CommandHandlers = { [ScriptOpcode.OBJ_ADD]: state => { const [coord, objId, count, duration] = state.popInts(4); diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 2fb995b05..c8471637d 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -2,7 +2,7 @@ import IdkType from '#lostcity/cache/IdkType.js'; import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import ScriptPointer, { checkedHandler } from '#lostcity/engine/script/ScriptPointer.js'; +import {ActivePlayer, checkedHandler, ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; @@ -32,9 +32,6 @@ import { import ColorConversion from '#lostcity/util/ColorConversion.js'; import Interaction from '#lostcity/entity/Interaction.js'; -const ActivePlayer = [ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2]; -const ProtectedActivePlayer = [ScriptPointer.ProtectedActivePlayer, ScriptPointer.ProtectedActivePlayer2]; - const PlayerOps: CommandHandlers = { [ScriptOpcode.FINDUID]: state => { const uid = state.popInt(); diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index 74fe9e4ac..fb00a1458 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -11,7 +11,7 @@ import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; -import ScriptPointer from '#lostcity/engine/script/ScriptPointer.js'; +import {ActiveNpc, ActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; import {HuntIterator} from '#lostcity/engine/script/ScriptIterators.js'; import { Position } from '#lostcity/entity/Position.js'; @@ -30,9 +30,6 @@ import { } from '#lostcity/engine/script/ScriptValidators.js'; import Npc from '#lostcity/entity/Npc.js'; -const ActivePlayer = [ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2]; -const ActiveNpc = [ScriptPointer.ActiveNpc, ScriptPointer.ActiveNpc2]; - const ServerOps: CommandHandlers = { [ScriptOpcode.MAP_CLOCK]: state => { state.pushInt(World.currentTick); From 265c149f87194d80a1371394772c16f5c888b4cb Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 14:12:29 -0400 Subject: [PATCH 25/50] fix(engine): Compare interaction position to target position --- src/lostcity/entity/PathingEntity.ts | 6 ++++++ src/lostcity/entity/Player.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 98e72d2a2..74603b672 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -52,6 +52,8 @@ export default abstract class PathingEntity extends Entity { target: Entity | null = null; targetOp: TargetOp = -1; targetSubject: TargetSubject = {type: -1, com: -1}; + targetX: number = -1; + targetZ: number = -1; apRange: number = 10; apRangeCalled: boolean = false; alreadyFacedCoord: boolean = false; @@ -382,6 +384,8 @@ export default abstract class PathingEntity extends Entity { this.target = target; this.targetOp = op; this.targetSubject = subject ?? {type: -1, com: -1}; + this.targetX = target.x; + this.targetZ = target.z; this.apRange = 10; this.apRangeCalled = false; @@ -416,6 +420,8 @@ export default abstract class PathingEntity extends Entity { this.target = null; this.targetOp = -1; this.targetSubject = {type: -1, com: -1}; + this.targetX = -1; + this.targetZ = -1; this.apRange = 10; this.apRangeCalled = false; this.alreadyFacedCoord = true; diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index e485325b9..691be0e7f 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -433,7 +433,7 @@ export default class Player extends PathingEntity { if ( repathAllowed && - this.target instanceof PathingEntity && this.isLastWaypoint() && this.waypoints[0] !== Position.packCoord(this.target.level, this.target.x, this.target.z) && + this.target instanceof PathingEntity && this.isLastWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && !this.interacted && this.walktrigger === -1 ) { this.pathToTarget(); From cfcc6204de6106bdc5578aeaa73f2506fb04348d Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 14:42:43 -0400 Subject: [PATCH 26/50] fix(engine): Update interaction position when repathing --- src/lostcity/entity/PathingEntity.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 74603b672..bc74e3b18 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -350,6 +350,9 @@ export default abstract class PathingEntity extends Entity { return; } + this.targetX = this.target.x; + this.targetZ = this.target.z; + if (this.smart) { if (this.target instanceof PathingEntity) { this.queueWaypoints(rsmod.findPath(this.level, this.x, this.z, this.target.x, this.target.z, this.width, this.target.width, this.target.length, this.target.orientation, -2)); From 81082c3603d8b6db6a84820ad35300e5d591fae5 Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 3 Jun 2024 14:43:58 -0400 Subject: [PATCH 27/50] refactor(engine): cleanup script validators and handlers (#551) refactor(engine): script validators and handlers Co-authored-by: Pazaz --- src/lostcity/cache/DbRowType.ts | 4 + src/lostcity/cache/DbTableType.ts | 4 + src/lostcity/cache/FontType.ts | 4 + src/lostcity/cache/MesanimType.ts | 4 + src/lostcity/cache/StructType.ts | 4 + src/lostcity/cache/VarNpcType.ts | 2 +- src/lostcity/cache/VarPlayerType.ts | 2 +- src/lostcity/cache/VarSharedType.ts | 2 +- .../engine/script/ScriptValidators.ts | 234 ++++++------- .../engine/script/handlers/CoreOps.ts | 63 ++-- src/lostcity/engine/script/handlers/DbOps.ts | 20 +- .../engine/script/handlers/EnumOps.ts | 9 +- src/lostcity/engine/script/handlers/InvOps.ts | 318 +++++++----------- .../engine/script/handlers/LocConfigOps.ts | 36 +- src/lostcity/engine/script/handlers/LocOps.ts | 73 ++-- .../engine/script/handlers/NpcConfigOps.ts | 29 +- src/lostcity/engine/script/handlers/NpcOps.ts | 145 +++----- .../engine/script/handlers/ObjConfigOps.ts | 81 ++--- src/lostcity/engine/script/handlers/ObjOps.ts | 39 +-- .../engine/script/handlers/PlayerOps.ts | 188 ++++------- .../engine/script/handlers/ServerOps.ts | 150 ++++----- src/lostcity/entity/Position.ts | 4 +- 22 files changed, 580 insertions(+), 835 deletions(-) diff --git a/src/lostcity/cache/DbRowType.ts b/src/lostcity/cache/DbRowType.ts index 47376cd37..cb8ee76a2 100644 --- a/src/lostcity/cache/DbRowType.ts +++ b/src/lostcity/cache/DbRowType.ts @@ -51,6 +51,10 @@ export default class DbRowType extends ConfigType { return this.get(id); } + static get count() { + return this.configs.length; + } + static getInTable(tableId: number): DbRowType[] { return DbRowType.configs.filter(config => config.tableId === tableId); } diff --git a/src/lostcity/cache/DbTableType.ts b/src/lostcity/cache/DbTableType.ts index 11710e622..316216b87 100644 --- a/src/lostcity/cache/DbTableType.ts +++ b/src/lostcity/cache/DbTableType.ts @@ -50,6 +50,10 @@ export default class DbTableType extends ConfigType { return this.get(id); } + static get count() { + return this.configs.length; + } + // ---- types: number[][] = []; diff --git a/src/lostcity/cache/FontType.ts b/src/lostcity/cache/FontType.ts index 6e7c57819..e64db3513 100644 --- a/src/lostcity/cache/FontType.ts +++ b/src/lostcity/cache/FontType.ts @@ -30,6 +30,10 @@ export default class FontType { return FontType.instances[id]; } + static get count() { + return this.instances.length; + } + // ---- charMask: Uint8Array[] = new Array(94); diff --git a/src/lostcity/cache/MesanimType.ts b/src/lostcity/cache/MesanimType.ts index 10ec7ae10..11f196a3b 100644 --- a/src/lostcity/cache/MesanimType.ts +++ b/src/lostcity/cache/MesanimType.ts @@ -49,6 +49,10 @@ export default class MesanimType extends ConfigType { return this.get(id); } + static get count() { + return this.configs.length; + } + // ---- len: number[] = new Array(4).fill(-1); diff --git a/src/lostcity/cache/StructType.ts b/src/lostcity/cache/StructType.ts index eeefd68c5..327481d23 100644 --- a/src/lostcity/cache/StructType.ts +++ b/src/lostcity/cache/StructType.ts @@ -50,6 +50,10 @@ export default class StructType extends ConfigType implements ParamHolder { return this.get(id); } + static get count() { + return this.configs.length; + } + // ---- params: ParamMap | null = null; diff --git a/src/lostcity/cache/VarNpcType.ts b/src/lostcity/cache/VarNpcType.ts index e5dac95a3..ed06fc3fb 100644 --- a/src/lostcity/cache/VarNpcType.ts +++ b/src/lostcity/cache/VarNpcType.ts @@ -51,7 +51,7 @@ export default class VarNpcType extends ConfigType { } static get count() { - return VarNpcType.configs.length; + return this.configs.length; } // ---- diff --git a/src/lostcity/cache/VarPlayerType.ts b/src/lostcity/cache/VarPlayerType.ts index 7c0435d4d..610085014 100644 --- a/src/lostcity/cache/VarPlayerType.ts +++ b/src/lostcity/cache/VarPlayerType.ts @@ -69,7 +69,7 @@ export default class VarPlayerType extends ConfigType { } static get count() { - return VarPlayerType.configs.length; + return this.configs.length; } // ---- diff --git a/src/lostcity/cache/VarSharedType.ts b/src/lostcity/cache/VarSharedType.ts index 92e7459fd..01dadc36e 100644 --- a/src/lostcity/cache/VarSharedType.ts +++ b/src/lostcity/cache/VarSharedType.ts @@ -49,7 +49,7 @@ export default class VarSharedType extends ConfigType { } static get count() { - return VarSharedType.configs.length; + return this.configs.length; } // ---- diff --git a/src/lostcity/engine/script/ScriptValidators.ts b/src/lostcity/engine/script/ScriptValidators.ts index f4945d354..c67345515 100644 --- a/src/lostcity/engine/script/ScriptValidators.ts +++ b/src/lostcity/engine/script/ScriptValidators.ts @@ -11,158 +11,114 @@ import InvType from '#lostcity/cache/InvType.js'; import CategoryType from '#lostcity/cache/CategoryType.js'; import IdkType from '#lostcity/cache/IdkType.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; - -interface ScriptValidator { - condition(input: T): boolean; - throwMessage(): string; -} - -class ScriptInputNumberNotNullValidator implements ScriptValidator { - condition = (input: number): boolean => input !== -1; - throwMessage = (): string => 'An input number was null(-1).'; -} - -class ScriptInputStringNotNullValidator implements ScriptValidator { - condition = (input: string): boolean => input.length > 0; - throwMessage = (): string => 'An input number was null(-1).'; -} - -class ScriptInputLocTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < LocType.count; - throwMessage = (): string => 'An input for a Loc type was not in a valid range which it is impossible to spawn a null Loc noob!'; -} - -class ScriptInputLocAngleValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input <= 3; - throwMessage = (): string => 'An input for a Loc angle was out of range. Range should be: 0 to 3.'; -} - -class ScriptInputLocShapeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input <= 31; - throwMessage = (): string => 'An input for a Loc shape was out of range. Range should be: 0 to 31.'; -} - -class ScriptInputDurationValidator implements ScriptValidator { - condition = (input: number): boolean => input > 0; - throwMessage = (): string => 'An input duration was out of range. Range should be greater than 0.'; -} - -class ScriptInputCoordValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input <= 0x3ffffffffff; - throwMessage = (): string => 'An input coord was out of range. Range should be: 0 to 4398046511103'; -} - -class ScriptInputParamTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < ParamType.count; - throwMessage = (): string => 'An input for a Param type was not in a valid range.'; -} - -class ScriptInputNpcTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < NpcType.count; - throwMessage = (): string => 'An input for a Npc type was not in a valid range.'; -} - -class ScriptInputNpcStatValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < 6; - throwMessage = (): string => 'An input for a Npc stat was not in a valid range. Range should be: 0 to 5'; -} - -class ScriptInputQueueValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < 20; - throwMessage = (): string => 'An input for an ai_queue was not in a valid range. Range should be: 0 to 19'; -} - -class ScriptInputHuntTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < HuntType.count; - throwMessage = (): string => 'An input for a Hunt type was not in a valid range.'; -} - -class ScriptInputNpcModeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= -1 && input <= NpcMode.APNPC5; - throwMessage = (): string => `An input for a Npc mode was not in a valid range. Range should be -1 to ${NpcMode.APNPC5}.`; -} - -class ScriptInputHitTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input <= 2; - throwMessage = (): string => 'An input for a hit type was not in a valid range. Range should be 0 to 2.'; -} - -class ScriptInputSpotAnimTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < SpotanimType.count; - throwMessage = (): string => 'An input for a SpotAnim type was not in a valid range.'; -} - -class ScriptInputEnumTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < EnumType.count; - throwMessage = (): string => 'An input for an Enum type was not in a valid range.'; +import {LocAngle, LocShape} from '@2004scape/rsmod-pathfinder'; +import {Position} from '#lostcity/entity/Position.js'; +import {ConfigType} from '#lostcity/cache/ConfigType.js'; +import SeqType from '#lostcity/cache/SeqType.js'; +import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; +import VarNpcType from '#lostcity/cache/VarNpcType.js'; +import VarSharedType from '#lostcity/cache/VarSharedType.js'; +import FontType from '#lostcity/cache/FontType.js'; +import MesanimType from '#lostcity/cache/MesanimType.js'; +import StructType from '#lostcity/cache/StructType.js'; +import DbRowType from '#lostcity/cache/DbRowType.js'; +import DbTableType from '#lostcity/cache/DbTableType.js'; + +interface ScriptValidator { + validate(input: T): R; +} + +class ScriptInputNumberNotNullValidator implements ScriptValidator { + validate(input: number): number { + if (input !== -1) return input; + throw Error('An input number was null(-1).'); + } } -class ScriptInputObjTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < ObjType.count; - throwMessage = (): string => 'An input for an Obj type was not in a valid range.'; +class ScriptInputStringNotNullValidator implements ScriptValidator { + validate(input: string): string { + if (input.length > 0) return input; + throw Error('An input string was null(-1).'); + } } -class ScriptInputObjCountValidator implements ScriptValidator { - condition = (input: number): boolean => input > 0 && input <= Inventory.STACK_LIMIT; - throwMessage = (): string => `An input for an Obj count was not in a valid range. Range should be: 1 to ${Inventory.STACK_LIMIT}.`; -} +class ScriptInputConfigTypeValidator implements ScriptValidator { + private readonly type: (input: number) => T; + private readonly count: (input: number) => boolean; + private readonly name: string; -class ScriptInputObjNotDummyValidator implements ScriptValidator { - condition = (input: number): boolean => ObjType.get(input).dummyitem === 0; - throwMessage = (): string => 'An input for an Obj was a graphic_only dummyitem.'; -} + constructor(type: (input: number) => T, count: (input: number) => boolean, name: string) { + this.type = type; + this.count = count; + this.name = name; + } -class ScriptInputInvTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < InvType.count; - throwMessage = (): string => 'An input for an Inv type was not in a valid range.'; + validate(input: number): T { + if (this.count(input)) return this.type(input); + throw new Error(`An input for a ${this.name} type was not valid to use. Input was ${input}.`); + } } -class ScriptInputCategoryTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < CategoryType.count; - throwMessage = (): string => 'An input for an Category type was not in a valid range.'; -} +class ScriptInputRangeValidator implements ScriptValidator { + protected readonly min: number; + protected readonly max: number; + protected readonly name: string; -class ScriptInputIDKTypeValidator implements ScriptValidator { - condition = (input: number): boolean => input >= 0 && input < IdkType.count; - throwMessage = (): string => 'An input for an IDK type was not in a valid range.'; -} + constructor(min: number, max: number, name: string) { + this.min = min; + this.max = max; + this.name = name; + } -class ScriptInputHuntVisValidator implements ScriptValidator { - condition = (input: number): boolean => input >= HuntVis.OFF && input <= HuntVis.LINEOFWALK; - throwMessage = (): string => `An input for a a hunt vis was not in a valid range. Range should be: ${HuntVis.OFF} to ${HuntVis.LINEOFWALK}.`; + validate(input: number): T { + if (input >= this.min && input <= this.max) { + return input as T; + } + throw new Error(`An input for a ${this.name} was out of range. Range should be: ${this.min} to ${this.max}. Input was ${input}.`); + } } -export const NumberNotNull: ScriptValidator = new ScriptInputNumberNotNullValidator(); -export const StringNotNull: ScriptValidator = new ScriptInputStringNotNullValidator(); -export const LocTypeValid: ScriptValidator = new ScriptInputLocTypeValidator(); -export const LocAngleValid: ScriptValidator = new ScriptInputLocAngleValidator(); -export const LocShapeValid: ScriptValidator = new ScriptInputLocShapeValidator(); -export const DurationValid: ScriptValidator = new ScriptInputDurationValidator(); -export const CoordValid: ScriptValidator = new ScriptInputCoordValidator(); -export const ParamTypeValid: ScriptValidator = new ScriptInputParamTypeValidator(); -export const NpcTypeValid: ScriptValidator = new ScriptInputNpcTypeValidator(); -export const NpcStatValid: ScriptValidator = new ScriptInputNpcStatValidator(); -export const QueueValid: ScriptValidator = new ScriptInputQueueValidator(); -export const HuntTypeValid: ScriptValidator = new ScriptInputHuntTypeValidator(); -export const NpcModeValid: ScriptValidator = new ScriptInputNpcModeValidator(); -export const HitTypeValid: ScriptValidator = new ScriptInputHitTypeValidator(); -export const SpotAnimTypeValid: ScriptValidator = new ScriptInputSpotAnimTypeValidator(); -export const EnumTypeValid: ScriptValidator = new ScriptInputEnumTypeValidator(); -export const ObjTypeValid: ScriptValidator = new ScriptInputObjTypeValidator(); -export const ObjStackValid: ScriptValidator = new ScriptInputObjCountValidator(); -export const ObjNotDummyValid: ScriptValidator = new ScriptInputObjNotDummyValidator(); -export const InvTypeValid: ScriptValidator = new ScriptInputInvTypeValidator(); -export const CategoryTypeValid: ScriptValidator = new ScriptInputCategoryTypeValidator(); -export const IDKTypeValid: ScriptValidator = new ScriptInputIDKTypeValidator(); -export const HuntVisValid: ScriptValidator = new ScriptInputHuntVisValidator(); - -export function check(input: T, ...validators: ScriptValidator[]): T { - for (let index: number = 0; index < validators.length; index++) { - const validator: ScriptValidator = validators[index]; - if (!validator.condition(input)) { - throw new Error(validator.throwMessage()); +class ScriptInputCoordValidator extends ScriptInputRangeValidator { + validate(input: number): Position { + if (input >= this.min && input <= this.max) { + return Position.unpackCoord(input); } + throw new Error(`An input for a ${this.name} was out of range. Range should be: ${this.min} to ${this.max}. Input was ${input}.`); } - return input; } +export const NumberNotNull: ScriptValidator = new ScriptInputNumberNotNullValidator(); +export const StringNotNull: ScriptValidator = new ScriptInputStringNotNullValidator(); +export const LocTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(LocType.get, (input: number) => input >= 0 && input < LocType.count, 'Loc'); +export const LocAngleValid: ScriptValidator = new ScriptInputRangeValidator(LocAngle.WEST, LocAngle.SOUTH, 'LocAngle'); +export const LocShapeValid: ScriptValidator = new ScriptInputRangeValidator(LocShape.WALL_STRAIGHT, LocShape.GROUND_DECOR, 'LocShape'); +export const DurationValid: ScriptValidator = new ScriptInputRangeValidator(1, 2147483647, 'Duration'); +export const CoordValid: ScriptValidator = new ScriptInputCoordValidator(0, 2147483647, 'Coord'); +export const ParamTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(ParamType.get, (input: number) => input >= 0 && input < ParamType.count, 'Param'); +export const NpcTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(NpcType.get, (input: number) => input >= 0 && input < NpcType.count, 'Npc'); +export const NpcStatValid: ScriptValidator = new ScriptInputRangeValidator(0, 6, 'NpcStat'); +export const QueueValid: ScriptValidator = new ScriptInputRangeValidator(0, 19, 'AIQueue'); +export const HuntTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(HuntType.get, (input: number) => input >= 0 && input < HuntType.count, 'Hunt'); +export const NpcModeValid: ScriptValidator = new ScriptInputRangeValidator(NpcMode.NULL, NpcMode.APNPC5, 'NpcMode'); +export const HitTypeValid: ScriptValidator = new ScriptInputRangeValidator(0, 2, 'Hit'); +export const SpotAnimTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(SpotanimType.get, (input: number) => input >= 0 && input < SpotanimType.count, 'Spotanim'); +export const EnumTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(EnumType.get, (input: number) => input >= 0 && input < EnumType.count, 'Enum'); +export const ObjTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(ObjType.get, (input: number) => input >= 0 && input < ObjType.count, 'Obj'); +export const ObjStackValid: ScriptValidator = new ScriptInputRangeValidator(1, Inventory.STACK_LIMIT, 'ObjStack'); +export const InvTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(InvType.get, (input: number) => input >= 0 && input < InvType.count, 'Inv'); +export const CategoryTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(CategoryType.get, (input: number) => input >= 0 && input < CategoryType.count, 'Cat'); +export const IDKTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(IdkType.get, (input: number) => input >= 0 && input < IdkType.count, 'Idk'); +export const HuntVisValid: ScriptValidator = new ScriptInputRangeValidator(HuntVis.OFF, HuntVis.LINEOFWALK, 'HuntVis'); +export const SeqTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(SeqType.get, (input: number) => input >= 0 && input < SeqType.count, 'Seq'); +export const VarPlayerValid: ScriptValidator = new ScriptInputConfigTypeValidator(VarPlayerType.get, (input: number) => input >= 0 && input < VarPlayerType.count, 'Varp'); +export const VarNpcValid: ScriptValidator = new ScriptInputConfigTypeValidator(VarNpcType.get, (input: number) => input >= 0 && input < VarNpcType.count, 'Varn'); +export const VarSharedValid: ScriptValidator = new ScriptInputConfigTypeValidator(VarSharedType.get, (input: number) => input >= 0 && input < VarSharedType.count, 'Vars'); +export const FontTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(FontType.get, (input: number) => input >= 0 && input < FontType.count, 'Font'); +export const MesanimValid: ScriptValidator = new ScriptInputConfigTypeValidator(MesanimType.get, (input: number) => input >= 0 && input < MesanimType.count, 'Mesanim'); +export const StructTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(StructType.get, (input: number) => input >= 0 && input < StructType.count, 'Struct'); +export const DbRowTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(DbRowType.get, (input: number) => input >= 0 && input < DbRowType.count, 'Dbrow'); +export const DbTableTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(DbTableType.get, (input: number) => input >= 0 && input < DbTableType.count, 'Dbtable'); + +export function check(input: T, validator: ScriptValidator): R { + return validator.validate(input); +} \ No newline at end of file diff --git a/src/lostcity/engine/script/handlers/CoreOps.ts b/src/lostcity/engine/script/handlers/CoreOps.ts index 397697e68..06ef65e5f 100644 --- a/src/lostcity/engine/script/handlers/CoreOps.ts +++ b/src/lostcity/engine/script/handlers/CoreOps.ts @@ -10,6 +10,7 @@ import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; +import {check, VarNpcValid, VarPlayerValid, VarSharedValid} from '#lostcity/engine/script/ScriptValidators.js'; import {ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; function gosub(state: ScriptState, id: number) { @@ -73,11 +74,11 @@ const CoreOps: CommandHandlers = { throw new Error('No active_player.'); } - const varp = VarPlayerType.get(state.intOperand & 0xffff); - if (varp.type === ScriptVarType.STRING) { - state.pushString(secondary ? state._activePlayer2!.getVar(varp.id) as string : state._activePlayer!.getVar(varp.id) as string); + const varpType: VarPlayerType = check(state.intOperand & 0xffff, VarPlayerValid); + if (varpType.type === ScriptVarType.STRING) { + state.pushString(secondary ? state._activePlayer2!.getVar(varpType.id) as string : state._activePlayer!.getVar(varpType.id) as string); } else { - state.pushInt(secondary ? state._activePlayer2!.getVar(varp.id) as number : state._activePlayer!.getVar(varp.id) as number); + state.pushInt(secondary ? state._activePlayer2!.getVar(varpType.id) as number : state._activePlayer!.getVar(varpType.id) as number); } }, @@ -89,24 +90,24 @@ const CoreOps: CommandHandlers = { throw new Error('No active_player.'); } - const varp = VarPlayerType.get(state.intOperand & 0xffff); - if (!state.pointerGet(ProtectedActivePlayer[secondary]) && varp.protect) { - throw new Error(`%${varp.debugname} requires protected access`); + const varpType: VarPlayerType = check(state.intOperand & 0xffff, VarPlayerValid); + if (!state.pointerGet(ProtectedActivePlayer[secondary]) && varpType.protect) { + throw new Error(`%${varpType.debugname} requires protected access`); } - if (varp.type === ScriptVarType.STRING) { + if (varpType.type === ScriptVarType.STRING) { const value = state.popString(); if (secondary) { - state._activePlayer2!.setVar(varp.id, value); + state._activePlayer2!.setVar(varpType.id, value); } else { - state._activePlayer!.setVar(varp.id, value); + state._activePlayer!.setVar(varpType.id, value); } } else { const value = state.popInt(); if (secondary) { - state._activePlayer2!.setVar(varp.id, value); + state._activePlayer2!.setVar(varpType.id, value); } else { - state._activePlayer!.setVar(varp.id, value); + state._activePlayer!.setVar(varpType.id, value); } } }, @@ -119,11 +120,11 @@ const CoreOps: CommandHandlers = { throw new Error('No active_npc.'); } - const varn = VarNpcType.get(state.intOperand & 0xffff); - if (varn.type === ScriptVarType.STRING) { - state.pushString(secondary ? state._activeNpc2!.getVar(varn.id) as string : state._activeNpc!.getVar(varn.id) as string); + const varnType: VarNpcType = check(state.intOperand & 0xffff, VarNpcValid); + if (varnType.type === ScriptVarType.STRING) { + state.pushString(secondary ? state._activeNpc2!.getVar(varnType.id) as string : state._activeNpc!.getVar(varnType.id) as string); } else { - state.pushInt(secondary ? state._activeNpc2!.getVar(varn.id) as number : state._activeNpc!.getVar(varn.id) as number); + state.pushInt(secondary ? state._activeNpc2!.getVar(varnType.id) as number : state._activeNpc!.getVar(varnType.id) as number); } }, @@ -135,20 +136,20 @@ const CoreOps: CommandHandlers = { throw new Error('No active_npc.'); } - const varn = VarNpcType.get(state.intOperand & 0xffff); - if (varn.type === ScriptVarType.STRING) { + const varnType: VarNpcType = check(state.intOperand & 0xffff, VarNpcValid); + if (varnType.type === ScriptVarType.STRING) { const value = state.popInt(); if (secondary) { - state._activeNpc2!.setVar(varn.id, value); + state._activeNpc2!.setVar(varnType.id, value); } else { - state._activeNpc!.setVar(varn.id, value); + state._activeNpc!.setVar(varnType.id, value); } } else { const value = state.popInt(); if (secondary) { - state._activeNpc2!.setVar(varn.id, value); + state._activeNpc2!.setVar(varnType.id, value); } else { - state._activeNpc!.setVar(varn.id, value); + state._activeNpc!.setVar(varnType.id, value); } } }, @@ -301,24 +302,22 @@ const CoreOps: CommandHandlers = { }, [ScriptOpcode.PUSH_VARS]: state => { - const vars = VarSharedType.get(state.intOperand & 0xFFFF); + const varsType: VarSharedType = check(state.intOperand & 0xffff, VarSharedValid); - if (vars.type === ScriptVarType.STRING) { - state.pushString(World.varsString[vars.id] ?? ''); + if (varsType.type === ScriptVarType.STRING) { + state.pushString(World.varsString[varsType.id] ?? ''); } else { - state.pushInt(World.vars[vars.id]); + state.pushInt(World.vars[varsType.id]); } }, [ScriptOpcode.POP_VARS]: state => { - const vars = VarSharedType.get(state.intOperand & 0xFFFF); + const varsType: VarSharedType = check(state.intOperand & 0xffff, VarSharedValid); - if (vars.type === ScriptVarType.STRING) { - const value = state.popString(); - World.varsString[vars.id] = value; + if (varsType.type === ScriptVarType.STRING) { + World.varsString[varsType.id] = state.popString(); } else { - const value = state.popInt(); - World.vars[vars.id] = value; + World.vars[varsType.id] = state.popInt(); } } }; diff --git a/src/lostcity/engine/script/handlers/DbOps.ts b/src/lostcity/engine/script/handlers/DbOps.ts index 5c5ad5512..19a55e3c0 100644 --- a/src/lostcity/engine/script/handlers/DbOps.ts +++ b/src/lostcity/engine/script/handlers/DbOps.ts @@ -5,6 +5,8 @@ import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; +import {check, DbRowTypeValid, DbTableTypeValid} from '#lostcity/engine/script/ScriptValidators.js'; + const DebugOps: CommandHandlers = { [ScriptOpcode.DB_FIND_WITH_COUNT]: state => { throw new Error('unimplemented'); @@ -22,8 +24,7 @@ const DebugOps: CommandHandlers = { state.dbRow++; - const row = DbRowType.get(state.dbRowQuery[state.dbRow]); - state.pushInt(row.id); + state.pushInt(check(state.dbRowQuery[state.dbRow], DbRowTypeValid).id); }, [ScriptOpcode.DB_GETFIELD]: state => { @@ -33,8 +34,8 @@ const DebugOps: CommandHandlers = { const column = (tableColumnPacked >> 4) & 0x7f; const tuple = tableColumnPacked & 0x3f; - const rowType = DbRowType.get(row); - const tableType = DbTableType.get(table); + const rowType: DbRowType = check(row, DbRowTypeValid); + const tableType: DbTableType = check(table, DbTableTypeValid); let values: (string | number)[]; if (rowType.tableId !== table) { @@ -60,8 +61,8 @@ const DebugOps: CommandHandlers = { const column = (tableColumnPacked >> 4) & 0x7f; const tuple = tableColumnPacked & 0x3f; - const rowType = DbRowType.get(row); - const tableType = DbTableType.get(table); + const rowType: DbRowType = check(row, DbRowTypeValid); + const tableType: DbTableType = check(table, DbTableTypeValid); if (rowType.tableId !== table) { state.pushInt(0); @@ -76,10 +77,7 @@ const DebugOps: CommandHandlers = { }, [ScriptOpcode.DB_GETROWTABLE]: state => { - const row = state.popInt(); - const rowType = DbRowType.get(row); - - state.pushInt(rowType.tableId); + state.pushInt(check(state.popInt(), DbRowTypeValid).tableId); }, [ScriptOpcode.DB_FINDBYINDEX]: state => { @@ -99,7 +97,7 @@ const DebugOps: CommandHandlers = { const column = (tableColumnPacked >> 4) & 0x7f; const tuple = tableColumnPacked & 0x3f; - state.dbTable = DbTableType.get(table); + state.dbTable = check(table, DbTableTypeValid); state.dbRow = -1; state.dbRowQuery = []; diff --git a/src/lostcity/engine/script/handlers/EnumOps.ts b/src/lostcity/engine/script/handlers/EnumOps.ts index 99c3221a5..ec93b6a9f 100644 --- a/src/lostcity/engine/script/handlers/EnumOps.ts +++ b/src/lostcity/engine/script/handlers/EnumOps.ts @@ -9,9 +9,7 @@ const EnumOps: CommandHandlers = { [ScriptOpcode.ENUM]: state => { const [inputType, outputType, enumId, key] = state.popInts(4); - check(enumId, EnumTypeValid); - - const enumType = EnumType.get(enumId); + const enumType: EnumType = check(enumId, EnumTypeValid); // verify types if (enumType.inputtype !== inputType || enumType.outputtype !== outputType) { @@ -27,10 +25,7 @@ const EnumOps: CommandHandlers = { }, [ScriptOpcode.ENUM_GETOUTPUTCOUNT]: state => { - const enumId = check(state.popInt(), EnumTypeValid); - - const enumType = EnumType.get(enumId); - state.pushInt(enumType.values.size); + state.pushInt(check(state.popInt(), EnumTypeValid).values.size); } }; diff --git a/src/lostcity/engine/script/handlers/InvOps.ts b/src/lostcity/engine/script/handlers/InvOps.ts index 37fc042eb..b19c6c962 100644 --- a/src/lostcity/engine/script/handlers/InvOps.ts +++ b/src/lostcity/engine/script/handlers/InvOps.ts @@ -1,5 +1,6 @@ import InvType from '#lostcity/cache/InvType.js'; import ObjType from '#lostcity/cache/ObjType.js'; +import CategoryType from '#lostcity/cache/CategoryType.js'; import World from '#lostcity/engine/World.js'; @@ -11,8 +12,8 @@ import Obj from '#lostcity/entity/Obj.js'; import { Position } from '#lostcity/entity/Position.js'; import { - CategoryTypeValid, check, + CategoryTypeValid, CoordValid, DurationValid, InvTypeValid, @@ -24,58 +25,54 @@ import { const InvOps: CommandHandlers = { // inv config [ScriptOpcode.INV_ALLSTOCK]: state => { - const inv = check(state.popInt(), InvTypeValid); + const invType: InvType = check(state.popInt(), InvTypeValid); - const type = InvType.get(inv); - state.pushInt(type.allstock ? 1 : 0); + state.pushInt(invType.allstock ? 1 : 0); }, // inv config [ScriptOpcode.INV_SIZE]: state => { - const inv = check(state.popInt(), InvTypeValid); + const invType: InvType = check(state.popInt(), InvTypeValid); - const type = InvType.get(inv); - state.pushInt(type.size); + state.pushInt(invType.size); }, // inv config [ScriptOpcode.INV_STOCKBASE]: state => { const [inv, obj] = state.popInts(2); - const type = InvType.get(check(inv, InvTypeValid)); + const invType: InvType = check(inv, InvTypeValid); + const objType: ObjType = check(obj, ObjTypeValid); - if (!type.stockobj || !type.stockcount) { + if (!invType.stockobj || !invType.stockcount) { state.pushInt(-1); return; } - const index = type.stockobj.indexOf(check(obj, ObjTypeValid)); - state.pushInt(index >= 0 ? type.stockcount[index] : -1); + const index = invType.stockobj.indexOf(objType.id); + state.pushInt(index >= 0 ? invType.stockcount[index] : -1); }, // inv write [ScriptOpcode.INV_ADD]: checkedHandler(ActivePlayer, state => { const [inv, objId, count] = state.popInts(3); - check(inv, InvTypeValid); - check(objId, ObjTypeValid/*, ObjNotDummyValid*/); + const invType: InvType = check(inv, InvTypeValid); + const objType: ObjType = check(objId, ObjTypeValid); check(count, ObjStackValid); - const obj = ObjType.get(objId); - - const type = InvType.get(inv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - if (!type.dummyinv && obj.dummyitem !== 0) { - throw new Error(`dummyitem in non-dummyinv: ${obj.debugname} -> ${type.debugname}`); + if (!invType.dummyinv && objType.dummyitem !== 0) { + throw new Error(`dummyitem in non-dummyinv: ${objType.debugname} -> ${invType.debugname}`); } const player = state.activePlayer; - const overflow = count - player.invAdd(inv, objId, count); + const overflow = count - player.invAdd(invType.id, objType.id, count); if (overflow > 0) { - const floorObj = new Obj(player.level, player.x, player.z, objId, overflow); + const floorObj = new Obj(player.level, player.x, player.z, objType.id, overflow); World.addObj(floorObj, player, 200); } @@ -89,82 +86,71 @@ const InvOps: CommandHandlers = { // inv write [ScriptOpcode.INV_CLEAR]: checkedHandler(ActivePlayer, state => { - const inv = check(state.popInt(), InvTypeValid); + const invType: InvType = check(state.popInt(), InvTypeValid); - const type = InvType.get(inv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - state.activePlayer.invClear(inv); + state.activePlayer.invClear(invType.id); }), // inv write [ScriptOpcode.INV_DEL]: checkedHandler(ActivePlayer, state => { const [inv, obj, count] = state.popInts(3); - check(inv, InvTypeValid); - check(obj, ObjTypeValid); + const invType: InvType = check(inv, InvTypeValid); + const objType: ObjType = check(obj, ObjTypeValid); check(count, ObjStackValid); - const type = InvType.get(inv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - state.activePlayer.invDel(inv, obj, count); + state.activePlayer.invDel(invType.id, objType.id, count); }), // inv write [ScriptOpcode.INV_DELSLOT]: checkedHandler(ActivePlayer, state => { const [inv, slot] = state.popInts(2); - check(inv, InvTypeValid); + const invType: InvType = check(inv, InvTypeValid); - const type = InvType.get(inv); - if (slot < 0 || slot >= type.size) { - throw new Error(`$slot is out of range: ${slot}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); - } - - const obj = state.activePlayer.invGetSlot(inv, slot); + const obj = state.activePlayer.invGetSlot(invType.id, slot); if (!obj) { return; } - state.activePlayer.invDelSlot(inv, slot); + state.activePlayer.invDelSlot(invType.id, slot); }), // inv write [ScriptOpcode.INV_DROPITEM]: checkedHandler(ActivePlayer, state => { const [inv, coord, obj, count, duration] = state.popInts(5); - check(inv, InvTypeValid); - check(coord, CoordValid); - check(obj, ObjTypeValid); + const invType: InvType = check(inv, InvTypeValid); + const position: Position = check(coord, CoordValid); + const objType: ObjType = check(obj, ObjTypeValid); check(count, ObjStackValid); check(duration, DurationValid); - const type = InvType.get(inv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - const pos = Position.unpackCoord(coord); - const player = state.activePlayer; - const completed = player.invDel(inv, obj, count); + const completed = player.invDel(invType.id, objType.id, count); if (completed == 0) { return; } - const objType = ObjType.get(obj); - player.playerLog('Dropped item from', type.debugname as string, objType.debugname as string); + player.playerLog('Dropped item from', invType.debugname as string, objType.debugname as string); - const floorObj = new Obj(pos.level, pos.x, pos.z, obj, completed); + const floorObj = new Obj(position.level, position.x, position.z, objType.id, completed); World.addObj(floorObj, player, duration); }), @@ -172,121 +158,98 @@ const InvOps: CommandHandlers = { [ScriptOpcode.INV_DROPSLOT]: checkedHandler(ActivePlayer, state => { const [inv, coord, slot, duration] = state.popInts(4); - check(inv, InvTypeValid); + const invType: InvType = check(inv, InvTypeValid); check(duration, DurationValid); - check(coord, CoordValid); + const position: Position = check(coord, CoordValid); - const type = InvType.get(inv); - if (slot < 0 || slot >= type.size) { - throw new Error(`$slot is out of range: ${slot}`); - } - - const obj = state.activePlayer.invGetSlot(inv, slot); + const obj = state.activePlayer.invGetSlot(invType.id, slot); if (!obj) { throw new Error('$slot is empty'); } - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - const pos = Position.unpackCoord(coord); - const player = state.activePlayer; - const completed = player.invDel(inv, obj.id, obj.count, slot); + const completed = player.invDel(invType.id, obj.id, obj.count, slot); if (completed == 0) { return; } const objType = ObjType.get(obj.id); - player.playerLog('Dropped item from', type.debugname as string, objType.debugname as string); + player.playerLog('Dropped item from', invType.debugname as string, objType.debugname as string); - const floorObj = new Obj(pos.level, pos.x, pos.z, obj.id, completed); + const floorObj = new Obj(position.level, position.x, position.z, obj.id, completed); World.addObj(floorObj, player, duration); }), // inv read [ScriptOpcode.INV_FREESPACE]: checkedHandler(ActivePlayer, state => { - const inv = check(state.popInt(), InvTypeValid); + const invType: InvType = check(state.popInt(), InvTypeValid); - state.pushInt(state.activePlayer.invFreeSpace(inv) as number); + state.pushInt(state.activePlayer.invFreeSpace(invType.id)); }), // inv read [ScriptOpcode.INV_GETNUM]: checkedHandler(ActivePlayer, state => { const [inv, slot] = state.popInts(2); - check(inv, InvTypeValid); - - const type = InvType.get(inv); - if (slot < 0 || slot >= type.size) { - throw new Error(`$slot is out of range: ${slot}`); - } - - const obj = state.activePlayer.invGetSlot(inv, slot); - state.pushInt(obj?.count ?? 0); + const invType: InvType = check(inv, InvTypeValid); + state.pushInt(state.activePlayer.invGetSlot(invType.id, slot)?.count ?? 0); }), // inv read [ScriptOpcode.INV_GETOBJ]: checkedHandler(ActivePlayer, state => { const [inv, slot] = state.popInts(2); - check(inv, InvTypeValid); - - const obj = state.activePlayer.invGetSlot(inv, slot); - state.pushInt(obj?.id ?? -1); + const invType: InvType = check(inv, InvTypeValid); + state.pushInt(state.activePlayer.invGetSlot(invType.id, slot)?.id ?? -1); }), // inv read [ScriptOpcode.INV_ITEMSPACE]: checkedHandler(ActivePlayer, state => { const [inv, obj, count, size] = state.popInts(4); - check(inv, InvTypeValid); - check(obj, ObjTypeValid); + const invType: InvType = check(inv, InvTypeValid); + const objType: ObjType = check(obj, ObjTypeValid); check(count, ObjStackValid); - const type = InvType.get(inv); - if (size < 0 || size > type.size) { + if (size < 0 || size > invType.size) { throw new Error(`$count is out of range: ${count}`); } - state.pushInt(state.activePlayer.invItemSpace(inv, obj, count, size) == 0 ? 1 : 0); + state.pushInt(state.activePlayer.invItemSpace(invType.id, objType.id, count, size) === 0 ? 1 : 0); }), // inv read [ScriptOpcode.INV_ITEMSPACE2]: checkedHandler(ActivePlayer, state => { const [inv, obj, count, size] = state.popInts(4); - check(inv, InvTypeValid); - check(obj, ObjTypeValid); + const invType: InvType = check(inv, InvTypeValid); + const objType: ObjType = check(obj, ObjTypeValid); check(count, ObjStackValid); - state.pushInt(state.activePlayer.invItemSpace(inv, obj, count, size)); + state.pushInt(state.activePlayer.invItemSpace(invType.id, objType.id, count, size)); }), // inv write [ScriptOpcode.INV_MOVEFROMSLOT]: checkedHandler(ActivePlayer, state => { const [fromInv, toInv, fromSlot] = state.popInts(3); - check(fromInv, InvTypeValid); - check(toInv, InvTypeValid); - - const type = InvType.get(fromInv); - if (fromSlot < 0 || fromSlot >= type.size) { - throw new Error(`$from_slot is out of range: ${fromSlot}`); - } + const fromInvType: InvType = check(fromInv, InvTypeValid); + const toInvType: InvType = check(toInv, InvTypeValid); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && fromInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${fromInvType.debugname}`); } - const type2 = InvType.get(toInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type2.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type2.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && toInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${toInvType.debugname}`); } const player = state.activePlayer; - const { overflow, fromObj } = player.invMoveFromSlot(fromInv, toInv, fromSlot); + const { overflow, fromObj } = player.invMoveFromSlot(fromInvType.id, toInvType.id, fromSlot); if (overflow > 0) { const floorObj = new Obj(player.level, player.x, player.z, fromObj, overflow); @@ -298,36 +261,26 @@ const InvOps: CommandHandlers = { [ScriptOpcode.INV_MOVETOSLOT]: checkedHandler(ActivePlayer, state => { const [fromInv, toInv, fromSlot, toSlot] = state.popInts(4); - check(fromInv, InvTypeValid); - check(toInv, InvTypeValid); - - const type = InvType.get(fromInv); - if (fromSlot < 0 || fromSlot >= type.size) { - throw new Error(`$from_slot is out of range: ${fromSlot}`); - } + const fromInvType: InvType = check(fromInv, InvTypeValid); + const toInvType: InvType = check(toInv, InvTypeValid); - const type2 = InvType.get(toInv); - if (toSlot < 0 || toSlot >= type2.size) { - throw new Error(`$to_slot is out of range: ${toSlot}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && fromInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${fromInvType.debugname}`); } - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && toInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${toInvType.debugname}`); } - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type2.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type2.debugname}`); - } - - state.activePlayer.invMoveToSlot(fromInv, toInv, fromSlot, toSlot); + state.activePlayer.invMoveToSlot(fromInvType.id, toInvType.id, fromSlot, toSlot); }), // inv write [ScriptOpcode.BOTH_MOVEINV]: checkedHandler(ActivePlayer, state => { const [from, to] = state.popInts(2); - check(from, InvTypeValid); - check(to, InvTypeValid); + const fromInvType: InvType = check(from, InvTypeValid); + const toInvType: InvType = check(to, InvTypeValid); const secondary = state.intOperand == 1; @@ -343,14 +296,12 @@ const InvOps: CommandHandlers = { throw new Error('player is null'); } - const type = InvType.get(from); - if (!state.pointerGet(ProtectedActivePlayer[secondary ? 1 : 0]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$from_inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[secondary ? 1 : 0]) && fromInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$from_inv requires protected access: ${fromInvType.debugname}`); } - const type2 = InvType.get(to); - if (!state.pointerGet(ProtectedActivePlayer[secondary ? 0 : 1]) && type2.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$to_inv requires protected access: ${type2.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[secondary ? 0 : 1]) && toInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$to_inv requires protected access: ${toInvType.debugname}`); } const fromInv = fromPlayer.getInventory(from); @@ -378,59 +329,54 @@ const InvOps: CommandHandlers = { [ScriptOpcode.INV_MOVEITEM]: checkedHandler(ActivePlayer, state => { const [fromInv, toInv, obj, count] = state.popInts(4); - check(fromInv, InvTypeValid); - check(toInv, InvTypeValid); - check(obj, ObjTypeValid); + const fromInvType: InvType = check(fromInv, InvTypeValid); + const toInvType: InvType = check(toInv, InvTypeValid); + const objType: ObjType = check(obj, ObjTypeValid); check(count, ObjStackValid); - const type = InvType.get(fromInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && fromInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${fromInvType.debugname}`); } - const type2 = InvType.get(toInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type2.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type2.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && toInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${toInvType.debugname}`); } - const completed = state.activePlayer.invDel(fromInv, obj, count); + const completed = state.activePlayer.invDel(fromInvType.id, objType.id, count); if (completed == 0) { return; } - state.activePlayer.invAdd(toInv, obj, completed); + state.activePlayer.invAdd(toInvType.id, objType.id, completed); }), // inv write [ScriptOpcode.INV_MOVEITEM_CERT]: checkedHandler(ActivePlayer, state => { const [fromInv, toInv, obj, count] = state.popInts(4); - check(fromInv, InvTypeValid); - check(toInv, InvTypeValid); - check(obj, ObjTypeValid); + const fromInvType = check(fromInv, InvTypeValid); + const toInvType = check(toInv, InvTypeValid); + const objType = check(obj, ObjTypeValid); check(count, ObjStackValid); - const type = InvType.get(fromInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && fromInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${fromInvType.debugname}`); } - const type2 = InvType.get(toInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type2.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type2.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && toInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${toInvType.debugname}`); } - const completed = state.activePlayer.invDel(fromInv, obj, count); + const completed = state.activePlayer.invDel(fromInvType.id, objType.id, count); if (completed == 0) { return; } - const objType = ObjType.get(obj); - let finalObj = obj; + let finalObj = objType.id; if (objType.certtemplate === -1 && objType.certlink >= 0) { finalObj = objType.certlink; } - const overflow = count - state.activePlayer.invAdd(toInv, finalObj, completed); + const overflow = count - state.activePlayer.invAdd(toInvType.id, finalObj, completed); if (overflow > 0) { const floorObj = new Obj(state.activePlayer.level, state.activePlayer.x, state.activePlayer.z, finalObj, overflow); World.addObj(floorObj, state.activePlayer, 200); @@ -442,31 +388,28 @@ const InvOps: CommandHandlers = { [ScriptOpcode.INV_MOVEITEM_UNCERT]: checkedHandler(ActivePlayer, state => { const [fromInv, toInv, obj, count] = state.popInts(4); - check(fromInv, InvTypeValid); - check(toInv, InvTypeValid); - check(obj, ObjTypeValid); + const fromInvType: InvType = check(fromInv, InvTypeValid); + const toInvType: InvType = check(toInv, InvTypeValid); + const objType: ObjType = check(obj, ObjTypeValid); check(count, ObjStackValid); - const type = InvType.get(fromInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && fromInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${fromInvType.debugname}`); } - const type2 = InvType.get(toInv); - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type2.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type2.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && toInvType.protect && fromInvType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${toInvType.debugname}`); } - const completed = state.activePlayer.invDel(fromInv, obj, count); + const completed = state.activePlayer.invDel(fromInvType.id, objType.id, count); if (completed == 0) { return; } - const objType = ObjType.get(obj); if (objType.certtemplate >= 0 && objType.certlink >= 0) { - state.activePlayer.invAdd(toInv, objType.certlink, completed); + state.activePlayer.invAdd(toInvType.id, objType.certlink, completed); } else { - state.activePlayer.invAdd(toInv, obj, completed); + state.activePlayer.invAdd(toInvType.id, objType.id, completed); } }), @@ -474,33 +417,26 @@ const InvOps: CommandHandlers = { [ScriptOpcode.INV_SETSLOT]: checkedHandler(ActivePlayer, state => { const [inv, slot, objId, count] = state.popInts(4); - check(inv, InvTypeValid); - check(objId, ObjTypeValid/*, ObjNotDummyValid*/); + const invType: InvType = check(inv, InvTypeValid); + const objType: ObjType = check(objId, ObjTypeValid); check(count, ObjStackValid); - const type = InvType.get(inv); - if (slot < 0 || slot >= type.size) { - throw new Error(`$slot is out of range: ${slot}`); - } - - const obj = ObjType.get(objId); - - if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && type.protect && type.scope !== InvType.SCOPE_SHARED) { - throw new Error(`$inv requires protected access: ${type.debugname}`); + if (!state.pointerGet(ProtectedActivePlayer[state.intOperand]) && invType.protect && invType.scope !== InvType.SCOPE_SHARED) { + throw new Error(`$inv requires protected access: ${invType.debugname}`); } - if (!type.dummyinv && obj.dummyitem !== 0) { - throw new Error(`dummyitem in non-dummyinv: ${obj.debugname} -> ${type.debugname}`); + if (!invType.dummyinv && objType.dummyitem !== 0) { + throw new Error(`dummyitem in non-dummyinv: ${objType.debugname} -> ${invType.debugname}`); } - state.activePlayer.invSet(inv, objId, count, slot); + state.activePlayer.invSet(invType.id, objType.id, count, slot); }), // inv read [ScriptOpcode.INV_TOTAL]: checkedHandler(ActivePlayer, state => { const [inv, obj] = state.popInts(2); - check(inv, InvTypeValid); + const invType: InvType = check(inv, InvTypeValid); // todo: error instead? if (obj === -1) { @@ -508,27 +444,27 @@ const InvOps: CommandHandlers = { return; } - state.pushInt(state.activePlayer.invTotal(inv, obj) as number); + state.pushInt(state.activePlayer.invTotal(invType.id, obj)); }), // inv read [ScriptOpcode.INV_TOTALCAT]: checkedHandler(ActivePlayer, state => { const [inv, category] = state.popInts(2); - check(inv, InvTypeValid); - check(category, CategoryTypeValid); + const invType: InvType = check(inv, InvTypeValid); + const catType: CategoryType = check(category, CategoryTypeValid); - state.pushInt(state.activePlayer.invTotalCat(inv, category)); + state.pushInt(state.activePlayer.invTotalCat(invType.id, catType.id)); }), // inv protocol [ScriptOpcode.INV_TRANSMIT]: checkedHandler(ActivePlayer, state => { const [inv, com] = state.popInts(2); - check(inv, InvTypeValid); + const invType: InvType = check(inv, InvTypeValid); check(com, NumberNotNull); - state.activePlayer.invListenOnCom(inv, com, state.activePlayer.uid); + state.activePlayer.invListenOnCom(invType.id, com, state.activePlayer.uid); }), // inv protocol @@ -536,10 +472,10 @@ const InvOps: CommandHandlers = { const [uid, inv, com] = state.popInts(3); check(uid, NumberNotNull); - check(inv, InvTypeValid); + const invType: InvType = check(inv, InvTypeValid); check(com, NumberNotNull); - state.activePlayer.invListenOnCom(inv, com, uid); + state.activePlayer.invListenOnCom(invType.id, com, uid); }), // inv protocol diff --git a/src/lostcity/engine/script/handlers/LocConfigOps.ts b/src/lostcity/engine/script/handlers/LocConfigOps.ts index 9fe9883b2..38e781054 100644 --- a/src/lostcity/engine/script/handlers/LocConfigOps.ts +++ b/src/lostcity/engine/script/handlers/LocConfigOps.ts @@ -9,57 +9,41 @@ import {check, LocTypeValid, ParamTypeValid} from '#lostcity/engine/script/Scrip const LocConfigOps: CommandHandlers = { [ScriptOpcode.LC_NAME]: state => { - const locId = check(state.popInt(), LocTypeValid); + const locType: LocType = check(state.popInt(), LocTypeValid); - const locType = LocType.get(locId); state.pushString(locType.name ?? locType.debugname ?? 'null'); }, [ScriptOpcode.LC_PARAM]: state => { const [locId, paramId] = state.popInts(2); - const locType = LocType.get(check(locId, LocTypeValid)); - const paramType = ParamType.get(check(paramId, ParamTypeValid)); + const locType: LocType = check(locId, LocTypeValid); + const paramType: ParamType = check(paramId, ParamTypeValid); if (paramType.isString()) { - state.pushString(ParamHelper.getStringParam(paramId, locType, paramType.defaultString)); + state.pushString(ParamHelper.getStringParam(paramType.id, locType, paramType.defaultString)); } else { - state.pushInt(ParamHelper.getIntParam(paramId, locType, paramType.defaultInt)); + state.pushInt(ParamHelper.getIntParam(paramType.id, locType, paramType.defaultInt)); } }, [ScriptOpcode.LC_CATEGORY]: state => { - const locId = check(state.popInt(), LocTypeValid); - - const locType = LocType.get(locId); - state.pushInt(locType.category); + state.pushInt(check(state.popInt(), LocTypeValid).category); }, [ScriptOpcode.LC_DESC]: state => { - const locId = check(state.popInt(), LocTypeValid); - - const locType = LocType.get(locId); - state.pushString(locType.desc ?? 'null'); + state.pushString(check(state.popInt(), LocTypeValid).desc ?? 'null'); }, [ScriptOpcode.LC_DEBUGNAME]: state => { - const locId = check(state.popInt(), LocTypeValid); - - const locType = LocType.get(locId); - state.pushString(locType.debugname ?? 'null'); + state.pushString(check(state.popInt(), LocTypeValid).debugname ?? 'null'); }, [ScriptOpcode.LC_WIDTH]: state => { - const locId = check(state.popInt(), LocTypeValid); - - const locType = LocType.get(locId); - state.pushInt(locType.width ?? 0); + state.pushInt(check(state.popInt(), LocTypeValid).width); }, [ScriptOpcode.LC_LENGTH]: state => { - const locId = check(state.popInt(), LocTypeValid); - - const locType = LocType.get(locId); - state.pushInt(locType.length ?? 0); + state.pushInt(check(state.popInt(), LocTypeValid).length); } }; diff --git a/src/lostcity/engine/script/handlers/LocOps.ts b/src/lostcity/engine/script/handlers/LocOps.ts index e24e3a72d..643f94bd9 100644 --- a/src/lostcity/engine/script/handlers/LocOps.ts +++ b/src/lostcity/engine/script/handlers/LocOps.ts @@ -1,5 +1,6 @@ import ParamType from '#lostcity/cache/ParamType.js'; import LocType from '#lostcity/cache/LocType.js'; +import SeqType from '#lostcity/cache/SeqType.js'; import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; import World from '#lostcity/engine/World.js'; @@ -19,80 +20,73 @@ import { LocAngleValid, LocShapeValid, LocTypeValid, - ParamTypeValid + ParamTypeValid, + SeqTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; +import {LocAngle, LocShape} from '@2004scape/rsmod-pathfinder'; + const LocOps: CommandHandlers = { [ScriptOpcode.LOC_ADD]: state => { const [coord, type, angle, shape, duration] = state.popInts(5); - check(coord, CoordValid); - check(type, LocTypeValid); - check(angle, LocAngleValid); - check(shape, LocShapeValid); + const position: Position = check(coord, CoordValid); + const locType: LocType = check(type, LocTypeValid); + const locAngle: LocAngle = check(angle, LocAngleValid); + const locShape: LocShape = check(shape, LocShapeValid); check(duration, DurationValid); - const pos = Position.unpackCoord(coord); - - const locType = LocType.get(type); - const loc = new Loc(pos.level, pos.x, pos.z, locType.width, locType.length, type, shape, angle); - + const loc = new Loc(position.level, position.x, position.z, locType.width, locType.length, locType.id, locShape, locAngle); World.addLoc(loc, duration); state.activeLoc = loc; state.pointerAdd(ActiveLoc[state.intOperand]); }, [ScriptOpcode.LOC_ANGLE]: checkedHandler(ActiveLoc, state => { - state.pushInt(state.activeLoc.angle); + state.pushInt(check(state.activeLoc.angle, LocAngleValid)); }), [ScriptOpcode.LOC_ANIM]: checkedHandler(ActiveLoc, state => { - const seq = state.popInt(); + const seqType: SeqType = check(state.popInt(), SeqTypeValid); const loc = state.activeLoc; - World.getZone(loc.x, loc.z, loc.level).animLoc(loc, seq); + World.getZone(loc.x, loc.z, loc.level).animLoc(loc, seqType.id); }), [ScriptOpcode.LOC_CATEGORY]: checkedHandler(ActiveLoc, state => { - const locType = LocType.get(state.activeLoc.type); - state.pushInt(locType.category); + state.pushInt(check(state.activeLoc.type, LocTypeValid).category); }), [ScriptOpcode.LOC_CHANGE]: checkedHandler(ActiveLoc, state => { const [id, duration] = state.popInts(2); - check(id, LocTypeValid); + const locType: LocType = check(id, LocTypeValid); check(duration, DurationValid); World.removeLoc(state.activeLoc, duration); - const locType = LocType.get(id); const loc = new Loc(state.activeLoc.level, state.activeLoc.x, state.activeLoc.z, locType.width, locType.length, id, state.activeLoc.shape, state.activeLoc.angle); World.addLoc(loc, duration); - state.activeLoc = loc; state.pointerAdd(ActiveLoc[state.intOperand]); }), [ScriptOpcode.LOC_COORD]: checkedHandler(ActiveLoc, state => { - const loc = state.activeLoc; - state.pushInt(Position.packCoord(loc.level, loc.x, loc.z)); + const position: Position = state.activeLoc; + state.pushInt(Position.packCoord(position.level, position.x, position.z)); }), [ScriptOpcode.LOC_DEL]: checkedHandler(ActiveLoc, state => { - const duration = check(state.popInt(), DurationValid); - - World.removeLoc(state.activeLoc, duration); + World.removeLoc(state.activeLoc, check(state.popInt(), DurationValid)); }), [ScriptOpcode.LOC_FIND]: state => { const [coord, locId] = state.popInts(2); - check(locId, LocTypeValid); - check(coord, CoordValid); + const locType: LocType = check(locId, LocTypeValid); + const position: Position = check(coord, CoordValid); - const pos = Position.unpackCoord(coord); - const loc = World.getLoc(pos.x, pos.z, pos.level, locId); + const loc = World.getLoc(position.x, position.z, position.level, locType.id); if (!loc || loc.respawn !== -1) { state.pushInt(0); return; @@ -104,11 +98,9 @@ const LocOps: CommandHandlers = { }, [ScriptOpcode.LOC_FINDALLZONE]: state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const {level, x, z} = Position.unpackCoord(coord); - - state.locIterator = new LocIterator(World.currentTick, level, x, z); + state.locIterator = new LocIterator(World.currentTick, position.level, position.x, position.z); // not necessary but if we want to refer to the original loc again, we can if (state._activeLoc) { state._activeLoc2 = state._activeLoc; @@ -129,29 +121,26 @@ const LocOps: CommandHandlers = { }, [ScriptOpcode.LOC_PARAM]: checkedHandler(ActiveLoc, state => { - const paramId = check(state.popInt(), ParamTypeValid); + const paramType: ParamType = check(state.popInt(), ParamTypeValid); - const param = ParamType.get(paramId); - const loc = LocType.get(state.activeLoc.type); - if (param.isString()) { - state.pushString(ParamHelper.getStringParam(paramId, loc, param.defaultString)); + const locType: LocType = check(state.activeLoc.type, LocTypeValid); + if (paramType.isString()) { + state.pushString(ParamHelper.getStringParam(paramType.id, locType, paramType.defaultString)); } else { - state.pushInt(ParamHelper.getIntParam(paramId, loc, param.defaultInt)); + state.pushInt(ParamHelper.getIntParam(paramType.id, locType, paramType.defaultInt)); } }), [ScriptOpcode.LOC_TYPE]: checkedHandler(ActiveLoc, state => { - state.pushInt(state.activeLoc.type); + state.pushInt(check(state.activeLoc.type, LocTypeValid).id); }), [ScriptOpcode.LOC_NAME]: checkedHandler(ActiveLoc, state => { - const loc = LocType.get(state.activeLoc.type); - - state.pushString(loc.name ?? 'null'); + state.pushString(check(state.activeLoc.type, LocTypeValid).name ?? 'null'); }), [ScriptOpcode.LOC_SHAPE]: checkedHandler(ActiveLoc, state => { - state.pushInt(state.activeLoc.shape); + state.pushInt(check(state.activeLoc.shape, LocShapeValid)); }) }; diff --git a/src/lostcity/engine/script/handlers/NpcConfigOps.ts b/src/lostcity/engine/script/handlers/NpcConfigOps.ts index d4aba054f..af4faa7ae 100644 --- a/src/lostcity/engine/script/handlers/NpcConfigOps.ts +++ b/src/lostcity/engine/script/handlers/NpcConfigOps.ts @@ -9,20 +9,16 @@ import {check, NpcTypeValid, NumberNotNull, ParamTypeValid} from '#lostcity/engi const NpcConfigOps: CommandHandlers = { [ScriptOpcode.NC_NAME]: state => { - const npcId = check(state.popInt(), NpcTypeValid); + const npcType: NpcType = check(state.popInt(), NpcTypeValid); - const npcType = NpcType.get(npcId); state.pushString(npcType.name ?? npcType.debugname ?? 'null'); }, [ScriptOpcode.NC_PARAM]: state => { const [npcId, paramId] = state.popInts(2); - check(npcId, NpcTypeValid); - check(paramId, ParamTypeValid); - - const npcType = NpcType.get(npcId); - const paramType = ParamType.get(paramId); + const npcType: NpcType = check(npcId, NpcTypeValid); + const paramType: ParamType = check(paramId, ParamTypeValid); if (paramType.isString()) { state.pushString(ParamHelper.getStringParam(paramId, npcType, paramType.defaultString)); } else { @@ -31,34 +27,23 @@ const NpcConfigOps: CommandHandlers = { }, [ScriptOpcode.NC_CATEGORY]: state => { - const npcId = check(state.popInt(), NpcTypeValid); - - const npcType = NpcType.get(npcId); - state.pushInt(npcType.category); + state.pushInt(check(state.popInt(), NpcTypeValid).category); }, [ScriptOpcode.NC_DESC]: state => { - const npcId = check(state.popInt(), NpcTypeValid); - - const npcType = NpcType.get(npcId); - state.pushString(npcType.desc ?? 'null'); + state.pushString(check(state.popInt(), NpcTypeValid).desc ?? 'null'); }, [ScriptOpcode.NC_DEBUGNAME]: state => { - const npcId = check(state.popInt(), NpcTypeValid); - - const npcType = NpcType.get(npcId); - state.pushString(npcType.debugname ?? 'null'); + state.pushString(check(state.popInt(), NpcTypeValid).debugname ?? 'null'); }, [ScriptOpcode.NC_OP]: state => { const [npcId, op] = state.popInts(2); - check(npcId, NpcTypeValid); + const npcType: NpcType = check(npcId, NpcTypeValid); check(op, NumberNotNull); - const npcType = NpcType.get(npcId); - if (!npcType.op) { state.pushString(''); return; diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index fd295fb2a..a246afb7b 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -1,7 +1,7 @@ -import HuntType from '#lostcity/cache/HuntType.js'; import ParamType from '#lostcity/cache/ParamType.js'; import NpcType from '#lostcity/cache/NpcType.js'; import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; +import SpotanimType from '#lostcity/cache/SpotanimType.js'; import World from '#lostcity/engine/World.js'; @@ -21,6 +21,7 @@ import Npc from '#lostcity/entity/Npc.js'; import NpcMode from '#lostcity/entity/NpcMode.js'; import Entity from '#lostcity/entity/Entity.js'; import Interaction from '#lostcity/entity/Interaction.js'; +import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; import Environment from '#lostcity/util/Environment.js'; @@ -60,15 +61,11 @@ const NpcOps: CommandHandlers = { [ScriptOpcode.NPC_ADD]: state => { const [coord, id, duration] = state.popInts(3); - check(coord, CoordValid); - check(id, NpcTypeValid); + const position: Position = check(coord, CoordValid); + const npcType: NpcType = check(id, NpcTypeValid); check(duration, DurationValid); - const pos = Position.unpackCoord(coord); - const npcType = NpcType.get(id); - - const npc = new Npc(pos.level, pos.x, pos.z, npcType.size, npcType.size, World.getNextNid(), npcType.id, npcType.moverestrict, npcType.blockwalk); - + const npc = new Npc(position.level, position.x, position.z, npcType.size, npcType.size, World.getNextNid(), npcType.id, npcType.moverestrict, npcType.blockwalk); npc.static = false; npc.despawn = World.currentTick + duration; World.addNpc(npc); @@ -77,7 +74,7 @@ const NpcOps: CommandHandlers = { }, [ScriptOpcode.NPC_ANIM]: checkedHandler(ActiveNpc, state => { - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const seq = state.popInt(); state.activeNpc.playAnimation(seq, delay); @@ -90,13 +87,12 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_CATEGORY]: checkedHandler(ActiveNpc, state => { - const npc = NpcType.get(state.activeNpc.type); - state.pushInt(npc.category); + state.pushInt(check(state.activeNpc.type, NpcTypeValid).category); }), [ScriptOpcode.NPC_COORD]: checkedHandler(ActiveNpc, state => { - const npc = state.activeNpc; - state.pushInt(Position.packCoord(npc.level, npc.x, npc.z)); + const position: Position = state.activeNpc; + state.pushInt(Position.packCoord(position.level, position.x, position.z)); }), [ScriptOpcode.NPC_DEL]: checkedHandler(ActiveNpc, state => { @@ -117,23 +113,21 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_FACESQUARE]: checkedHandler(ActiveNpc, state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.activeNpc.faceSquare(pos.x, pos.z); + state.activeNpc.faceSquare(position.x, position.z); }), [ScriptOpcode.NPC_FINDEXACT]: state => { const [coord, id] = state.popInts(2); - check(coord, CoordValid); - check(id, NpcTypeValid); + const position: Position = check(coord, CoordValid); + const npcType: NpcType = check(id, NpcTypeValid); - const {level, x, z} = Position.unpackCoord(coord); - state.npcIterator = new NpcIterator(World.currentTick, level, x, z, 0, 0, NpcIteratorType.ZONE); + state.npcIterator = new NpcIterator(World.currentTick, position.level, position.x, position.z, 0, 0, NpcIteratorType.ZONE); for (const npc of state.npcIterator) { - if(npc && npc.type === id && npc.x === x && npc.level === level && npc.z === z) { + if (npc.type === npcType.id && npc.x === position.x && npc.level === position.level && npc.z === position.z) { state.activeNpc = npc; state.pointerAdd(ActiveNpc[state.intOperand]); state.pushInt(1); @@ -163,46 +157,39 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_PARAM]: checkedHandler(ActiveNpc, state => { - const paramId = state.popInt(); - - check(paramId, ParamTypeValid); + const paramType: ParamType = check(state.popInt(), ParamTypeValid); - const param = ParamType.get(paramId); - const npc = NpcType.get(state.activeNpc.type); - if (param.isString()) { - state.pushString(ParamHelper.getStringParam(paramId, npc, param.defaultString)); + const npcType: NpcType = check(state.activeNpc.type, NpcTypeValid); + if (paramType.isString()) { + state.pushString(ParamHelper.getStringParam(paramType.id, npcType, paramType.defaultString)); } else { - state.pushInt(ParamHelper.getIntParam(paramId, npc, param.defaultInt)); + state.pushInt(ParamHelper.getIntParam(paramType.id, npcType, paramType.defaultInt)); } }), [ScriptOpcode.NPC_QUEUE]: checkedHandler(ActiveNpc, state => { - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const arg = state.popInt(); - const queueId = state.popInt() - 1; + const queueId = check(state.popInt(), QueueValid); - check(queueId, QueueValid); - - const type = NpcType.get(state.activeNpc.type); - const script = ScriptProvider.getByTrigger(ServerTriggerType.AI_QUEUE1 + queueId, type.id, type.category); + const npcType: NpcType = check(state.activeNpc.type, NpcTypeValid); + const script = ScriptProvider.getByTrigger(ServerTriggerType.AI_QUEUE1 + queueId - 1, npcType.id, npcType.category); if (script) { state.activeNpc.enqueueScript(script, delay, [arg]); } }), [ScriptOpcode.NPC_RANGE]: checkedHandler(ActiveNpc, state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); const npc = state.activeNpc; - - if (pos.level !== npc.level) { + if (position.level !== npc.level) { state.pushInt(-1); } else { state.pushInt( Position.distanceTo(npc, { - x: pos.x, - z: pos.z, + x: position.x, + z: position.z, width: 1, length: 1 }) @@ -219,10 +206,7 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_SETHUNTMODE]: checkedHandler(ActiveNpc, state => { - const mode = check(state.popInt(), HuntTypeValid); - - const huntType = HuntType.get(mode); - state.activeNpc.huntMode = huntType.id; + state.activeNpc.huntMode = check(state.popInt(), HuntTypeValid).id; }), [ScriptOpcode.NPC_SETMODE]: checkedHandler(ActiveNpc, state => { @@ -284,7 +268,7 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_TYPE]: checkedHandler(ActiveNpc, state => { - state.pushInt(state.activeNpc.type); + state.pushInt(check(state.activeNpc.type, NpcTypeValid).id); }), [ScriptOpcode.NPC_DAMAGE]: checkedHandler(ActiveNpc, state => { @@ -295,9 +279,7 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_NAME]: checkedHandler(ActiveNpc, state => { - const npcType = NpcType.get(state.activeNpc.type); - - state.pushString(npcType.name ?? 'null'); + state.pushString(check(state.activeNpc.type, NpcTypeValid).name ?? 'null'); }), [ScriptOpcode.NPC_UID]: checkedHandler(ActiveNpc, state => { @@ -305,37 +287,33 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_SETTIMER]: checkedHandler(ActiveNpc, state => { - const interval = check(state.popInt(), NumberNotNull); - - state.activeNpc.setTimer(interval); + state.activeNpc.setTimer(check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.SPOTANIM_NPC]: checkedHandler(ActiveNpc, state => { - const delay = state.popInt(); - const height = state.popInt(); - const spotanim = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); + const height = check(state.popInt(), NumberNotNull); + const spotanimType: SpotanimType = check(state.popInt(), SpotAnimTypeValid); - check(spotanim, SpotAnimTypeValid); - - state.activeNpc.spotanim(spotanim, height, delay); + state.activeNpc.spotanim(spotanimType.id, height, delay); }), [ScriptOpcode.NPC_FIND]: state => { - const [coord, npcType, distance, checkVis] = state.popInts(4); + const [coord, npc, distance, checkVis] = state.popInts(4); - check(coord, CoordValid); - check(npcType, NpcTypeValid); + const position: Position = check(coord, CoordValid); + const npcType: NpcType = check(npc, NpcTypeValid); check(distance, NumberNotNull); - check(checkVis, HuntVisValid); + const huntvis: HuntVis = check(checkVis, HuntVisValid); - const {level, x, z} = Position.unpackCoord(coord); let closestNpc; let closestDistance = distance; - const npcs = new NpcIterator(World.currentTick, level, x, z, distance, checkVis, NpcIteratorType.DISTANCE); + const npcs = new NpcIterator(World.currentTick, position.level, position.x, position.z, distance, huntvis, NpcIteratorType.DISTANCE); + for (const npc of npcs) { - if(npc && npc.type === npcType) { - const npcDistance = Position.distanceToSW({x, z}, npc); + if(npc && npc.type === npcType.id) { + const npcDistance = Position.distanceToSW(position, npc); if (npcDistance <= closestDistance) { closestNpc = npc; closestDistance = npcDistance; @@ -355,13 +333,11 @@ const NpcOps: CommandHandlers = { [ScriptOpcode.NPC_FINDALLANY]: state => { const [coord, distance, checkVis] = state.popInts(3); - check(coord, CoordValid); + const position: Position = check(coord, CoordValid); check(distance, NumberNotNull); - check(checkVis, HuntVisValid); + const huntvis: HuntVis = check(checkVis, HuntVisValid); - const {level, x, z} = Position.unpackCoord(coord); - - state.npcIterator = new NpcIterator(World.currentTick, level, x, z, distance, checkVis, NpcIteratorType.DISTANCE); + state.npcIterator = new NpcIterator(World.currentTick, position.level, position.x, position.z, distance, huntvis, NpcIteratorType.DISTANCE); // not necessary but if we want to refer to the original npc again, we can if (state._activeNpc) { state._activeNpc2 = state._activeNpc; @@ -370,11 +346,9 @@ const NpcOps: CommandHandlers = { }, [ScriptOpcode.NPC_FINDALLZONE]: state => { - const coord: number = check(state.popInt(), CoordValid); - - const {level, x, z} = Position.unpackCoord(coord); + const position: Position = check(state.popInt(), CoordValid); - state.npcIterator = new NpcIterator(World.currentTick, level, x, z, 0, 0, NpcIteratorType.ZONE); + state.npcIterator = new NpcIterator(World.currentTick, position.level, position.x, position.z, 0, 0, NpcIteratorType.ZONE); // not necessary but if we want to refer to the original npc again, we can if (state._activeNpc) { state._activeNpc2 = state._activeNpc; @@ -396,23 +370,19 @@ const NpcOps: CommandHandlers = { }, [ScriptOpcode.NPC_TELE]: checkedHandler(ActiveNpc, state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.activeNpc.teleport(pos.x, pos.z, pos.level); + state.activeNpc.teleport(position.x, position.z, position.level); }), [ScriptOpcode.NPC_WALK]: checkedHandler(ActiveNpc, state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.activeNpc.queueWaypoint(pos.x, pos.z); + state.activeNpc.queueWaypoint(position.x, position.z); }), [ScriptOpcode.NPC_CHANGETYPE]: checkedHandler(ActiveNpc, state => { - const id = check(state.popInt(), NpcTypeValid); - - state.activeNpc.changeType(id); + state.activeNpc.changeType(check(state.popInt(), NpcTypeValid).id); }), [ScriptOpcode.NPC_GETMODE]: checkedHandler(ActiveNpc, state => { @@ -420,9 +390,7 @@ const NpcOps: CommandHandlers = { }), [ScriptOpcode.NPC_HEROPOINTS]: checkedHandler([ScriptPointer.ActivePlayer, ...ActiveNpc], state => { - const damage = check(state.popInt(), NumberNotNull); - - state.activeNpc.addHero(state.activePlayer.uid, damage); + state.activeNpc.addHero(state.activePlayer.uid, check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.NPC_WALKTRIGGER]: checkedHandler(ActiveNpc, state => { @@ -466,8 +434,7 @@ const NpcOps: CommandHandlers = { // https://twitter.com/JagexAsh/status/1614498680144527360 [ScriptOpcode.NPC_ATTACKRANGE]: checkedHandler(ActiveNpc, state => { - const type: NpcType = NpcType.get(state.activeNpc.type); - state.pushInt(type.attackrange); + state.pushInt(check(state.activeNpc.type, NpcTypeValid).attackrange); }), }; diff --git a/src/lostcity/engine/script/handlers/ObjConfigOps.ts b/src/lostcity/engine/script/handlers/ObjConfigOps.ts index e49a42637..d58c854bb 100644 --- a/src/lostcity/engine/script/handlers/ObjConfigOps.ts +++ b/src/lostcity/engine/script/handlers/ObjConfigOps.ts @@ -9,124 +9,85 @@ import {check, ObjTypeValid, ParamTypeValid} from '#lostcity/engine/script/Scrip const ObjConfigOps: CommandHandlers = { [ScriptOpcode.OC_NAME]: state => { - const objId = check(state.popInt(), ObjTypeValid); + const objType: ObjType = check(state.popInt(), ObjTypeValid); - const objType = ObjType.get(objId); state.pushString(objType.name ?? objType.debugname ?? 'null'); }, [ScriptOpcode.OC_PARAM]: state => { const [objId, paramId] = state.popInts(2); - check(objId, ObjTypeValid); - check(paramId, ParamTypeValid); - - const obj = ObjType.get(objId); - const param = ParamType.get(paramId); - if (param.isString()) { - state.pushString(ParamHelper.getStringParam(paramId, obj, param.defaultString)); + const objType: ObjType = check(objId, ObjTypeValid); + const paramType: ParamType = check(paramId, ParamTypeValid); + if (paramType.isString()) { + state.pushString(ParamHelper.getStringParam(paramType.id, objType, paramType.defaultString)); } else { - state.pushInt(ParamHelper.getIntParam(paramId, obj, param.defaultInt)); + state.pushInt(ParamHelper.getIntParam(paramType.id, objType, paramType.defaultInt)); } }, [ScriptOpcode.OC_CATEGORY]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.category); + state.pushInt(check(state.popInt(), ObjTypeValid).category); }, [ScriptOpcode.OC_DESC]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushString(objType.desc ?? 'null'); + state.pushString(check(state.popInt(), ObjTypeValid).desc ?? 'null'); }, [ScriptOpcode.OC_MEMBERS]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.members ? 1 : 0); + state.pushInt(check(state.popInt(), ObjTypeValid).members ? 1 : 0); }, [ScriptOpcode.OC_WEIGHT]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.weight); + state.pushInt(check(state.popInt(), ObjTypeValid).weight); }, [ScriptOpcode.OC_WEARPOS]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.wearpos); + state.pushInt(check(state.popInt(), ObjTypeValid).wearpos); }, [ScriptOpcode.OC_WEARPOS2]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.wearpos2); + state.pushInt(check(state.popInt(), ObjTypeValid).wearpos2); }, [ScriptOpcode.OC_WEARPOS3]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.wearpos3); + state.pushInt(check(state.popInt(), ObjTypeValid).wearpos3); }, [ScriptOpcode.OC_COST]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const obj = ObjType.get(objId); - state.pushInt(obj?.cost); + state.pushInt(check(state.popInt(), ObjTypeValid).cost); }, [ScriptOpcode.OC_TRADEABLE]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const obj = ObjType.get(objId); - state.pushInt(obj?.tradeable ? 1 : 0); + state.pushInt(check(state.popInt(), ObjTypeValid).tradeable ? 1 : 0); }, [ScriptOpcode.OC_DEBUGNAME]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushString(objType.debugname ?? 'null'); + state.pushString(check(state.popInt(), ObjTypeValid).debugname ?? 'null'); }, [ScriptOpcode.OC_CERT]: state => { - const objId = check(state.popInt(), ObjTypeValid); + const objType: ObjType = check(state.popInt(), ObjTypeValid); - const objType = ObjType.get(objId); if (objType.certtemplate == -1 && objType.certlink >= 0) { state.pushInt(objType.certlink); } else { - state.pushInt(objId); + state.pushInt(objType.id); } }, [ScriptOpcode.OC_UNCERT]: state => { - const objId = check(state.popInt(), ObjTypeValid); + const objType: ObjType = check(state.popInt(), ObjTypeValid); - const objType = ObjType.get(objId); if (objType.certtemplate >= 0 && objType.certlink >= 0) { state.pushInt(objType.certlink); } else { - state.pushInt(objId); + state.pushInt(objType.id); } }, [ScriptOpcode.OC_STACKABLE]: state => { - const objId = check(state.popInt(), ObjTypeValid); - - const objType = ObjType.get(objId); - state.pushInt(objType.stackable ? 1 : 0); + state.pushInt(check(state.popInt(), ObjTypeValid).stackable ? 1 : 0); } }; diff --git a/src/lostcity/engine/script/handlers/ObjOps.ts b/src/lostcity/engine/script/handlers/ObjOps.ts index be0e65ffc..76ea348ec 100644 --- a/src/lostcity/engine/script/handlers/ObjOps.ts +++ b/src/lostcity/engine/script/handlers/ObjOps.ts @@ -13,12 +13,12 @@ import Obj from '#lostcity/entity/Obj.js'; import { Position } from '#lostcity/entity/Position.js'; import Environment from '#lostcity/util/Environment.js'; + import { check, CoordValid, DurationValid, InvTypeValid, - ObjNotDummyValid, ObjStackValid, ObjTypeValid, ParamTypeValid @@ -32,14 +32,16 @@ const ObjOps: CommandHandlers = { return; } - check(objId, ObjTypeValid, ObjNotDummyValid); + const objType: ObjType = check(objId, ObjTypeValid); check(duration, DurationValid); - check(coord, CoordValid); + const position: Position = check(coord, CoordValid); check(count, ObjStackValid); - const {level, x, z} = Position.unpackCoord(coord); - const obj: Obj = new Obj(level, x, z, objId, count); + if (objType.dummyitem !== 0) { + throw new Error(`attempted to add dummy item: ${objType.debugname}`); + } + const obj: Obj = new Obj(position.level, position.x, position.z, objId, count); World.addObj(obj, state.activePlayer, duration); state.activeObj = obj; state.pointerAdd(ActiveObj[state.intOperand]); @@ -54,21 +56,20 @@ const ObjOps: CommandHandlers = { }, [ScriptOpcode.OBJ_PARAM]: state => { - const paramId = check(state.popInt(), ParamTypeValid); + const paramType: ParamType = check(state.popInt(), ParamTypeValid); - const param = ParamType.get(paramId); - const obj = ObjType.get(state.activeObj.type); - if (param.isString()) { - state.pushString(ParamHelper.getStringParam(paramId, obj, param.defaultString)); + const objType: ObjType = check(state.activeObj.type, ObjTypeValid); + if (paramType.isString()) { + state.pushString(ParamHelper.getStringParam(paramType.id, objType, paramType.defaultString)); } else { - state.pushInt(ParamHelper.getIntParam(paramId, obj, param.defaultInt)); + state.pushInt(ParamHelper.getIntParam(paramType.id, objType, paramType.defaultInt)); } }, [ScriptOpcode.OBJ_NAME]: state => { - const obj = ObjType.get(state.activeObj.type); + const objType: ObjType = check(state.activeObj.type, ObjTypeValid); - state.pushString(obj.name ?? obj.debugname ?? 'null'); + state.pushString(objType.name ?? objType.debugname ?? 'null'); }, [ScriptOpcode.OBJ_DEL]: state => { @@ -80,29 +81,29 @@ const ObjOps: CommandHandlers = { }, [ScriptOpcode.OBJ_COUNT]: state => { - state.pushInt(state.activeObj.count); + state.pushInt(check(state.activeObj.count, ObjStackValid)); }, [ScriptOpcode.OBJ_TYPE]: state => { - state.pushInt(state.activeObj.type); + state.pushInt(check(state.activeObj.type, ObjTypeValid).id); }, [ScriptOpcode.OBJ_TAKEITEM]: state => { - const inv = check(state.popInt(), InvTypeValid); + const invType: InvType = check(state.popInt(), InvTypeValid); const obj = state.activeObj; if (World.getObj(obj.x, obj.z, obj.level, obj.id)) { const objType = ObjType.get(obj.type); state.activePlayer.playerLog('Picked up item', objType.debugname as string); - state.activePlayer.invAdd(inv, obj.id, obj.count); + state.activePlayer.invAdd(invType.id, obj.id, obj.count); World.removeObj(obj, state.activePlayer); } }, [ScriptOpcode.OBJ_COORD]: state => { - const obj = state.activeObj; - state.pushInt(Position.packCoord(obj.level, obj.x, obj.z)); + const position: Position = state.activeObj; + state.pushInt(Position.packCoord(position.level, position.x, position.z)); } }; diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index c8471637d..cb010fb05 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -1,4 +1,6 @@ import IdkType from '#lostcity/cache/IdkType.js'; +import SpotanimType from '#lostcity/cache/SpotanimType.js'; + import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; @@ -12,10 +14,13 @@ import { PlayerQueueType, ScriptArgument } from '#lostcity/entity/EntityQueueReq import { PlayerTimerType } from '#lostcity/entity/EntityTimer.js'; import { isNetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { Position } from '#lostcity/entity/Position.js'; +import Interaction from '#lostcity/entity/Interaction.js'; import ServerProt from '#lostcity/server/ServerProt.js'; import Environment from '#lostcity/util/Environment.js'; +import ColorConversion from '#lostcity/util/ColorConversion.js'; + import * as rsmod from '@2004scape/rsmod-pathfinder'; import { @@ -27,10 +32,10 @@ import { NpcTypeValid, NumberNotNull, ObjTypeValid, + SeqTypeValid, SpotAnimTypeValid, + StringNotNull, } from '#lostcity/engine/script/ScriptValidators.js'; -import ColorConversion from '#lostcity/util/ColorConversion.js'; -import Interaction from '#lostcity/entity/Interaction.js'; const PlayerOps: CommandHandlers = { [ScriptOpcode.FINDUID]: state => { @@ -70,7 +75,7 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.STRONGQUEUE]: checkedHandler(ActivePlayer, state => { const args = popScriptArgs(state); - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const scriptId = state.popInt(); const script = ScriptProvider.get(scriptId); @@ -82,7 +87,7 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.WEAKQUEUE]: checkedHandler(ActivePlayer, state => { const args = popScriptArgs(state); - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const scriptId = state.popInt(); const script = ScriptProvider.get(scriptId); @@ -94,7 +99,7 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.QUEUE]: checkedHandler(ActivePlayer, state => { const args = popScriptArgs(state); - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const scriptId = state.popInt(); const script = ScriptProvider.get(scriptId); @@ -105,7 +110,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.ANIM]: checkedHandler(ActivePlayer, state => { - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const seq = state.popInt(); state.activePlayer.playAnimation(seq, delay); @@ -116,17 +121,14 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.BUILDAPPEARANCE]: checkedHandler(ActivePlayer, state => { - const inv = check(state.popInt(), InvTypeValid); - - state.activePlayer.generateAppearance(inv); + state.activePlayer.generateAppearance(check(state.popInt(), InvTypeValid).id); }), [ScriptOpcode.CAM_LOOKAT]: checkedHandler(ActivePlayer, state => { const [coord, height, rotationSpeed, rotationMultiplier] = state.popInts(4); - check(coord, CoordValid); + const pos: Position = check(coord, CoordValid); - const pos = Position.unpackCoord(coord); const localX = pos.x - Position.zoneOrigin(state.activePlayer.loadedX); const localZ = pos.z - Position.zoneOrigin(state.activePlayer.loadedZ); @@ -136,9 +138,8 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.CAM_MOVETO]: checkedHandler(ActivePlayer, state => { const [coord, height, rotationSpeed, rotationMultiplier] = state.popInts(4); - check(coord, CoordValid); + const pos: Position = check(coord, CoordValid); - const pos = Position.unpackCoord(coord); const localX = pos.x - Position.zoneOrigin(state.activePlayer.loadedX); const localZ = pos.z - Position.zoneOrigin(state.activePlayer.loadedZ); @@ -156,8 +157,8 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.COORD]: checkedHandler(ActivePlayer, state => { - const player = state.activePlayer; - state.pushInt(Position.packCoord(player.level, player.x, player.z)); + const position: Position = state.activePlayer; + state.pushInt(Position.packCoord(position.level, position.x, position.z)); }), [ScriptOpcode.DISPLAYNAME]: checkedHandler(ActivePlayer, state => { @@ -165,9 +166,8 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.FACESQUARE]: checkedHandler(ActivePlayer, state => { - const coord = check(state.popInt(), CoordValid); + const pos: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); state.activePlayer.faceSquare(pos.x, pos.z); }), @@ -300,7 +300,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_DELAY]: checkedHandler(ProtectedActivePlayer, state => { - state.activePlayer.delay = state.popInt() + 1; + state.activePlayer.delay = check(state.popInt(), NumberNotNull) + 1; state.execution = ScriptState.SUSPENDED; // TODO should this wipe any pointers? }), @@ -310,7 +310,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_OPLOC]: checkedHandler(ProtectedActivePlayer, state => { - const type = state.popInt() - 1; + const type = check(state.popInt(), NumberNotNull) - 1; if (type < 0 || type >= 5) { throw new Error(`Invalid oploc: ${type + 1}`); } @@ -326,7 +326,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_OPNPC]: checkedHandler(ProtectedActivePlayer, state => { - const type = state.popInt() - 1; + const type = check(state.popInt(), NumberNotNull) - 1; if (type < 0 || type >= 5) { throw new Error(`Invalid opnpc: ${type + 1}`); } @@ -342,7 +342,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_OPNPCT]: checkedHandler(ProtectedActivePlayer, state => { - const spellId: number = state.popInt(); + const spellId: number = check(state.popInt(), NumberNotNull); if (state.activePlayer.target !== null) { return; } @@ -373,23 +373,20 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_TELEJUMP]: checkedHandler(ProtectedActivePlayer, state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.activePlayer.teleJump(pos.x, pos.z, pos.level); + state.activePlayer.teleJump(position.x, position.z, position.level); }), [ScriptOpcode.P_TELEPORT]: checkedHandler(ProtectedActivePlayer, state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.activePlayer.teleport(pos.x, pos.z, pos.level); + state.activePlayer.teleport(position.x, position.z, position.level); }), [ScriptOpcode.P_WALK]: checkedHandler(ProtectedActivePlayer, state => { - const coord = check(state.popInt(), CoordValid); + const pos: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); const player = state.activePlayer; player.queueWaypoints(rsmod.findPath(player.level, player.x, player.z, pos.x, pos.z, player.width, player.width, player.length, player.orientation)); player.updateMovement(false); // try to walk immediately @@ -448,11 +445,11 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.SPOTANIM_PL]: checkedHandler(ActivePlayer, state => { - const delay = state.popInt(); + const delay = check(state.popInt(), NumberNotNull); const height = state.popInt(); - const spotanim = check(state.popInt(), SpotAnimTypeValid); + const spotanimType: SpotanimType = check(state.popInt(), SpotAnimTypeValid); - state.activePlayer.spotanim(spotanim, height, delay); + state.activePlayer.spotanim(spotanimType.id, height, delay); }), [ScriptOpcode.STAT_HEAL]: checkedHandler(ActivePlayer, state => { @@ -487,9 +484,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.IF_OPENCHAT]: checkedHandler(ActivePlayer, state => { - const com = check(state.popInt(), NumberNotNull); - - state.activePlayer.openChat(com); + state.activePlayer.openChat(check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_OPENMAINMODALSIDEOVERLAY]: checkedHandler(ActivePlayer, state => { @@ -521,9 +516,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.IF_SETTABACTIVE]: checkedHandler(ActivePlayer, state => { - const tab = check(state.popInt(), NumberNotNull); - - state.activePlayer.writeLowPriority(ServerProt.IF_SHOWSIDE, tab); + state.activePlayer.writeLowPriority(ServerProt.IF_SHOWSIDE, check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_SETMODEL]: checkedHandler(ActivePlayer, state => { @@ -544,9 +537,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.IF_SETTABFLASH]: checkedHandler(ActivePlayer, state => { - const tab = check(state.popInt(), NumberNotNull); - - state.activePlayer.writeLowPriority(ServerProt.TUTORIAL_FLASHSIDE, tab); + state.activePlayer.writeLowPriority(ServerProt.TUTORIAL_FLASHSIDE, check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_SETANIM]: checkedHandler(ActivePlayer, state => { @@ -566,27 +557,19 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.IF_OPENMAINMODAL]: checkedHandler(ActivePlayer, state => { - const com = check(state.popInt(), NumberNotNull); - - state.activePlayer.openMainModal(com); + state.activePlayer.openMainModal(check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_OPENCHATSTICKY]: checkedHandler(ActivePlayer, state => { - const com = check(state.popInt(), NumberNotNull); - - state.activePlayer.openChatSticky(com); + state.activePlayer.openChatSticky(check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_OPENSIDEOVERLAY]: checkedHandler(ActivePlayer, state => { - const com = check(state.popInt(), NumberNotNull); - - state.activePlayer.openSideOverlay(com); + state.activePlayer.openSideOverlay(check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_SETPLAYERHEAD]: checkedHandler(ActivePlayer, state => { - const com = check(state.popInt(), NumberNotNull); - - state.activePlayer.writeLowPriority(ServerProt.IF_SETPLAYERHEAD, com); + state.activePlayer.writeLowPriority(ServerProt.IF_SETPLAYERHEAD, check(state.popInt(), NumberNotNull)); }), [ScriptOpcode.IF_SETTEXT]: checkedHandler(ActivePlayer, state => { @@ -614,9 +597,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.IF_MULTIZONE]: checkedHandler(ActivePlayer, state => { - const multi = check(state.popInt(), NumberNotNull); - - state.activePlayer.writeLowPriority(ServerProt.SET_MULTIWAY, multi === 1); + state.activePlayer.writeLowPriority(ServerProt.SET_MULTIWAY, check(state.popInt(), NumberNotNull) === 1); }), [ScriptOpcode.GIVEXP]: checkedHandler(ProtectedActivePlayer, state => { @@ -657,12 +638,12 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.MIDI_SONG]: state => { - state.activePlayer.playSong(state.popString()); + state.activePlayer.playSong(check(state.popString(), StringNotNull)); }, [ScriptOpcode.MIDI_JINGLE]: state => { - const delay = state.popInt(); - const name = state.popString(); + const delay = check(state.popInt(), NumberNotNull); + const name = check(state.popString(), StringNotNull); state.activePlayer.playJingle(delay, name); }, @@ -679,9 +660,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.CLEARSOFTTIMER]: checkedHandler(ActivePlayer, state => { - const timerId = state.popInt(); - - state.activePlayer.clearTimer(timerId); + state.activePlayer.clearTimer(state.popInt()); }), [ScriptOpcode.SETTIMER]: checkedHandler(ActivePlayer, state => { @@ -697,18 +676,14 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.CLEARTIMER]: checkedHandler(ActivePlayer, state => { - const timerId = state.popInt(); - - state.activePlayer.clearTimer(timerId); + state.activePlayer.clearTimer(state.popInt()); }), [ScriptOpcode.HINT_COORD]: state => { const [offset, coord, height] = state.popInts(3); - check(coord, CoordValid); - - const pos = Position.unpackCoord(coord); - state.activePlayer.hintTile(offset, pos.x, pos.z, height); + const position: Position = check(coord, CoordValid); + state.activePlayer.hintTile(offset, position.x, position.z, height); }, [ScriptOpcode.HINT_STOP]: state => { @@ -722,8 +697,8 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.P_EXACTMOVE]: checkedHandler(ProtectedActivePlayer, state => { const [start, end, startCycle, endCycle, direction] = state.popInts(5); - const startPos = Position.unpackCoord(check(start, CoordValid)); - const endPos = Position.unpackCoord(check(end, CoordValid)); + const startPos: Position = check(start, CoordValid); + const endPos: Position = check(end, CoordValid); state.activePlayer.unsetMapFlag(); state.activePlayer.exactMove(startPos.x, startPos.z, endPos.x, endPos.z, startCycle, endCycle, direction); @@ -754,17 +729,11 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.P_LOCMERGE]: checkedHandler(ProtectedActivePlayer, state => { const [startCycle, endCycle, southEast, northWest] = state.popInts(4); - const se = Position.unpackCoord(check(southEast, CoordValid)); - const nw = Position.unpackCoord(check(northWest, CoordValid)); - - const east = se.x; - const south = se.z; - - const west = nw.x; - const north = nw.z; + const se: Position = check(southEast, CoordValid); + const nw: Position = check(northWest, CoordValid); const loc = state.activeLoc; - World.getZone(loc.x, loc.z, loc.level).mergeLoc(loc, state.activePlayer, startCycle, endCycle, south, east, north, west); + World.getZone(loc.x, loc.z, loc.level).mergeLoc(loc, state.activePlayer, startCycle, endCycle, se.z, se.x, nw.z, nw.x); }), [ScriptOpcode.LAST_LOGIN_INFO]: state => { @@ -788,31 +757,31 @@ const PlayerOps: CommandHandlers = { }, [ScriptOpcode.BAS_READYANIM]: state => { - state.activePlayer.basReadyAnim = state.popInt(); + state.activePlayer.basReadyAnim = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.BAS_TURNONSPOT]: state => { - state.activePlayer.basTurnOnSpot = state.popInt(); + state.activePlayer.basTurnOnSpot = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.BAS_WALK_F]: state => { - state.activePlayer.basWalkForward = state.popInt(); + state.activePlayer.basWalkForward = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.BAS_WALK_B]: state => { - state.activePlayer.basWalkBackward = state.popInt(); + state.activePlayer.basWalkBackward = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.BAS_WALK_L]: state => { - state.activePlayer.basWalkLeft = state.popInt(); + state.activePlayer.basWalkLeft = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.BAS_WALK_R]: state => { - state.activePlayer.basWalkRight = state.popInt(); + state.activePlayer.basWalkRight = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.BAS_RUNNING]: state => { - state.activePlayer.basRunning = state.popInt(); + state.activePlayer.basRunning = check(state.popInt(), SeqTypeValid).id; }, [ScriptOpcode.GENDER]: state => { @@ -820,15 +789,11 @@ const PlayerOps: CommandHandlers = { }, [ScriptOpcode.HINT_NPC]: state => { - const npc_uid = check(state.popInt(), NumberNotNull); - - state.activePlayer.hintNpc(npc_uid); + state.activePlayer.hintNpc(check(state.popInt(), NumberNotNull)); }, [ScriptOpcode.HINT_PLAYER]: state => { - const player_uid = check(state.popInt(), NumberNotNull); - - state.activePlayer.hintPlayer(player_uid); + state.activePlayer.hintPlayer(check(state.popInt(), NumberNotNull)); }, [ScriptOpcode.HEADICONS_GET]: state => { @@ -836,11 +801,11 @@ const PlayerOps: CommandHandlers = { }, [ScriptOpcode.HEADICONS_SET]: state => { - state.activePlayer.headicons = state.popInt(); + state.activePlayer.headicons = check(state.popInt(), NumberNotNull); }, [ScriptOpcode.P_OPOBJ]: checkedHandler(ProtectedActivePlayer, state => { - const type = state.popInt() - 1; + const type = check(state.popInt(), NumberNotNull) - 1; if (type < 0 || type >= 5) { throw new Error(`Invalid opobj: ${type + 1}`); } @@ -856,7 +821,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_OPPLAYER]: checkedHandler(ProtectedActivePlayer, state => { - const type = state.popInt() - 1; + const type = check(state.popInt(), NumberNotNull) - 1; if (type < 0 || type >= 5) { throw new Error(`Invalid opplayer: ${type + 1}`); } @@ -876,9 +841,7 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.ALLOWDESIGN]: state => { - const allow = check(state.popInt(), NumberNotNull); - - state.activePlayer.allowDesign = allow === 1; + state.activePlayer.allowDesign = check(state.popInt(), NumberNotNull) === 1; }, [ScriptOpcode.LAST_TARGETSLOT]: state => { @@ -914,11 +877,10 @@ const PlayerOps: CommandHandlers = { }, [ScriptOpcode.HEALENERGY]: state => { - const amount = state.popInt(); // 100=1%, 1000=10%, 10000=100% + const amount = check(state.popInt(), NumberNotNull); // 100=1%, 1000=10%, 10000=100% const player = state.activePlayer; - const energy = Math.min(Math.max(player.runenergy + amount, 0), 10000); - player.runenergy = energy; + player.runenergy = Math.min(Math.max(player.runenergy + amount, 0), 10000); }, [ScriptOpcode.AFK_EVENT]: state => { @@ -933,15 +895,13 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.SETIDKIT]: (state) => { const [idkit, color] = state.popInts(2); - check(idkit, IDKTypeValid); - - const idk = IdkType.get(idkit); + const idkType: IdkType = check(idkit, IDKTypeValid); - let slot = idk.type; + let slot = idkType.type; if (state.activePlayer.gender === 1) { slot -= 7; } - state.activePlayer.body[slot] = idkit; + state.activePlayer.body[slot] = idkType.id; // 0 - hair // 1 - torso @@ -949,17 +909,17 @@ const PlayerOps: CommandHandlers = { // 3 - boots // 4 - jaw let colorSlot = -1; - if (idk.type === 0) { + if (idkType.type === 0) { colorSlot = 0; - } else if (idk.type === 1) { + } else if (idkType.type === 1) { colorSlot = 4; - } else if (idk.type === 2 || idk.type === 3) { + } else if (idkType.type === 2 || idkType.type === 3) { colorSlot = 1; - } else if (idk.type === 4) { + } else if (idkType.type === 4) { /* no-op (no hand recoloring) */ - } else if (idk.type === 5) { + } else if (idkType.type === 5) { colorSlot = 2; - } else if (idk.type === 6) { + } else if (idkType.type === 6) { colorSlot = 3; } @@ -969,7 +929,7 @@ const PlayerOps: CommandHandlers = { }, [ScriptOpcode.P_OPPLAYERT]: checkedHandler(ProtectedActivePlayer, state => { - const spellId = state.popInt(); + const spellId = check(state.popInt(), NumberNotNull); if (state.activePlayer.target !== null) { return; } diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index fb00a1458..5212e9de2 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -1,10 +1,7 @@ -import FontType from '#lostcity/cache/FontType.js'; -import LocType from '#lostcity/cache/LocType.js'; -import MesanimType from '#lostcity/cache/MesanimType.js'; import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; import ParamType from '#lostcity/cache/ParamType.js'; -import SeqType from '#lostcity/cache/SeqType.js'; import StructType from '#lostcity/cache/StructType.js'; +import SpotanimType from '#lostcity/cache/SpotanimType.js'; import World from '#lostcity/engine/World.js'; @@ -17,6 +14,8 @@ import {HuntIterator} from '#lostcity/engine/script/ScriptIterators.js'; import { Position } from '#lostcity/entity/Position.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; import Player from '#lostcity/entity/Player.js'; +import Npc from '#lostcity/entity/Npc.js'; +import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; import {CollisionFlag, LocLayer, LocAngle} from '@2004scape/rsmod-pathfinder'; @@ -24,11 +23,16 @@ import {CollisionFlag, LocLayer, LocAngle} from '@2004scape/rsmod-pathfinder'; import { check, CoordValid, + FontTypeValid, HuntVisValid, + LocTypeValid, + MesanimValid, NumberNotNull, - SpotAnimTypeValid + ParamTypeValid, + SeqTypeValid, + SpotAnimTypeValid, + StructTypeValid } from '#lostcity/engine/script/ScriptValidators.js'; -import Npc from '#lostcity/entity/Npc.js'; const ServerOps: CommandHandlers = { [ScriptOpcode.MAP_CLOCK]: state => { @@ -42,8 +46,8 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.MAP_PLAYERCOUNT]: state => { const [c1, c2] = state.popInts(2); - const from = Position.unpackCoord(check(c1, CoordValid)); - const to = Position.unpackCoord(check(c2, CoordValid)); + const from: Position = check(c1, CoordValid); + const to: Position = check(c2, CoordValid); let count = 0; for (let x = Math.floor(from.x / 8); x <= Math.ceil(to.x / 8); x++) { @@ -67,13 +71,11 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.HUNTALL]: state => { const [coord, distance, checkVis] = state.popInts(3); - check(coord, CoordValid); + const position: Position = check(coord, CoordValid); check(distance, NumberNotNull); - check(checkVis, HuntVisValid); - - const {level, x, z} = Position.unpackCoord(coord); + const huntvis: HuntVis = check(checkVis, HuntVisValid); - state.huntIterator = new HuntIterator(World.currentTick, level, x, z, distance, checkVis, HuntModeType.PLAYER); + state.huntIterator = new HuntIterator(World.currentTick, position.level, position.x, position.z, distance, huntvis, HuntModeType.PLAYER); }, [ScriptOpcode.HUNTNEXT]: state => { @@ -95,13 +97,11 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.NPC_HUNTALL]: state => { const [coord, distance, checkVis] = state.popInts(3); - check(coord, CoordValid); + const position: Position = check(coord, CoordValid); check(distance, NumberNotNull); - check(checkVis, HuntVisValid); + const huntvis: HuntVis = check(checkVis, HuntVisValid); - const {level, x, z} = Position.unpackCoord(coord); - - state.huntIterator = new HuntIterator(World.currentTick, level, x, z, distance, checkVis, HuntModeType.NPC); + state.huntIterator = new HuntIterator(World.currentTick, position.level, position.x, position.z, distance, huntvis, HuntModeType.NPC); }, [ScriptOpcode.NPC_HUNTNEXT]: state => { @@ -123,9 +123,9 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.INZONE]: state => { const [c1, c2, c3] = state.popInts(3); - const from = Position.unpackCoord(check(c1, CoordValid)); - const to = Position.unpackCoord(check(c2, CoordValid)); - const pos = Position.unpackCoord(check(c3, CoordValid)); + const from: Position = check(c1, CoordValid); + const to: Position = check(c2, CoordValid); + const pos: Position = check(c3, CoordValid); if (pos.x < from.x || pos.x > to.x) { state.pushInt(0); @@ -141,8 +141,13 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.LINEOFWALK]: state => { const [c1, c2] = state.popInts(2); - const from = Position.unpackCoord(check(c1, CoordValid)); - const to = Position.unpackCoord(check(c2, CoordValid)); + const from: Position = check(c1, CoordValid); + const to: Position = check(c2, CoordValid); + + if (from.level !== to.level) { + state.pushInt(0); + return; + } state.pushInt(rsmod.hasLineOfWalk(from.level, from.x, from.z, to.x, to.z, 1, 1, 1, 1) ? 1 : 0); }, @@ -159,42 +164,36 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.SPOTANIM_MAP]: state => { const [spotanim, coord, height, delay] = state.popInts(4); - check(spotanim, SpotAnimTypeValid); - - const {level, x, z} = Position.unpackCoord(check(coord, CoordValid)); + const position: Position = check(coord, CoordValid); + const spotanimType: SpotanimType = check(spotanim, SpotAnimTypeValid); - World.getZone(x, z, level).animMap(x, z, spotanim, height, delay); + World.getZone(position.x, position.z, position.level).animMap(position.x, position.z, spotanimType.id, height, delay); }, [ScriptOpcode.DISTANCE]: state => { const [c1, c2] = state.popInts(2); - const from = Position.unpackCoord(check(c1, CoordValid)); - const to = Position.unpackCoord(check(c2, CoordValid)); + const from: Position = check(c1, CoordValid); + const to: Position = check(c2, CoordValid); - const dx = Math.abs(from.x - to.x); - const dz = Math.abs(from.z - to.z); - - state.pushInt(Math.max(dx, dz)); + state.pushInt(Position.distanceToSW(from, to)); }, [ScriptOpcode.MOVECOORD]: state => { const [coord, x, y, z] = state.popInts(4); - const pos = Position.unpackCoord(check(coord, CoordValid)); - state.pushInt(Position.packCoord(pos.level + y, pos.x + x, pos.z + z)); + const position: Position = check(coord, CoordValid); + state.pushInt(Position.packCoord(position.level + y, position.x + x, position.z + z)); }, [ScriptOpcode.SEQLENGTH]: state => { - const seq = state.popInt(); - - state.pushInt(SeqType.get(seq).duration); + state.pushInt(check(state.popInt(), SeqTypeValid).duration); }, [ScriptOpcode.SPLIT_INIT]: state => { const [maxWidth, linesPerPage, fontId, mesanimId] = state.popInts(4); const text = state.popString(); - const font = FontType.get(fontId); + const font = check(fontId, FontTypeValid); const lines = font.split(text, maxWidth); state.splitPages = []; @@ -227,34 +226,31 @@ const ServerOps: CommandHandlers = { return; } - const mesanimType = MesanimType.get(state.splitMesanim); - state.pushInt(mesanimType.len[state.splitPages[page].length - 1]); + state.pushInt(check(state.splitMesanim, MesanimValid).len[state.splitPages[page].length - 1]); }, [ScriptOpcode.STRUCT_PARAM]: state => { const [structId, paramId] = state.popInts(2); - const param = ParamType.get(paramId); - const struct = StructType.get(structId); - if (param.isString()) { - state.pushString(ParamHelper.getStringParam(paramId, struct, param.defaultString)); + + const paramType: ParamType = check(paramId, ParamTypeValid); + const structType: StructType = check(structId, StructTypeValid); + if (paramType.isString()) { + state.pushString(ParamHelper.getStringParam(paramType.id, structType, paramType.defaultString)); } else { - state.pushInt(ParamHelper.getIntParam(paramId, struct, param.defaultInt)); + state.pushInt(ParamHelper.getIntParam(paramType.id, structType, paramType.defaultInt)); } }, [ScriptOpcode.COORDX]: state => { - const coord = check(state.popInt(), CoordValid); - state.pushInt(Position.unpackCoord(coord).x); + state.pushInt(check(state.popInt(), CoordValid).x); }, [ScriptOpcode.COORDY]: state => { - const coord = check(state.popInt(), CoordValid); - state.pushInt(Position.unpackCoord(coord).level); + state.pushInt(check(state.popInt(), CoordValid).level); }, [ScriptOpcode.COORDZ]: state => { - const coord = check(state.popInt(), CoordValid); - state.pushInt(Position.unpackCoord(coord).z); + state.pushInt(check(state.popInt(), CoordValid).z); }, [ScriptOpcode.PLAYERCOUNT]: state => { @@ -262,24 +258,27 @@ const ServerOps: CommandHandlers = { }, [ScriptOpcode.MAP_BLOCKED]: state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.pushInt(rsmod.isFlagged(pos.x, pos.z, pos.level, CollisionFlag.WALK_BLOCKED) ? 1 : 0); + state.pushInt(rsmod.isFlagged(position.x, position.z, position.level, CollisionFlag.WALK_BLOCKED) ? 1 : 0); }, [ScriptOpcode.MAP_INDOORS]: state => { - const coord = check(state.popInt(), CoordValid); + const position: Position = check(state.popInt(), CoordValid); - const pos = Position.unpackCoord(coord); - state.pushInt(rsmod.isFlagged(pos.x, pos.z, pos.level, CollisionFlag.ROOF) ? 1 : 0); + state.pushInt(rsmod.isFlagged(position.x, position.z, position.level, CollisionFlag.ROOF) ? 1 : 0); }, [ScriptOpcode.LINEOFSIGHT]: state => { const [c1, c2] = state.popInts(2); - const from = Position.unpackCoord(check(c1, CoordValid)); - const to = Position.unpackCoord(check(c2, CoordValid)); + const from: Position = check(c1, CoordValid); + const to: Position = check(c2, CoordValid); + + if (from.level !== to.level) { + state.pushInt(0); + return; + } state.pushInt(rsmod.hasLineOfSight(from.level, from.x, from.z, to.x, to.z, 1, 1, 1, 1) ? 1 : 0); }, @@ -292,24 +291,22 @@ const ServerOps: CommandHandlers = { [ScriptOpcode.PROJANIM_PL]: state => { const [srcCoord, uid, spotanim, srcHeight, dstHeight, delay, duration, peak, arc] = state.popInts(9); - check(srcCoord, CoordValid); - check(spotanim, SpotAnimTypeValid); + const srcPos: Position = check(srcCoord, CoordValid); + const spotanimType: SpotanimType = check(spotanim, SpotAnimTypeValid); const player = World.getPlayerByUid(uid); if (!player) { throw new Error(`attempted to use invalid player uid: ${uid}`); } - const srcPos = Position.unpackCoord(srcCoord); - const zone = World.getZone(srcPos.x, srcPos.z, srcPos.level); - zone.mapProjAnim(srcPos.x, srcPos.z, player.x, player.z, -player.pid - 1, spotanim, srcHeight + 100, dstHeight + 100, delay, duration, peak, arc); + World.getZone(srcPos.x, srcPos.z, srcPos.level).mapProjAnim(srcPos.x, srcPos.z, player.x, player.z, -player.pid - 1, spotanimType.id, srcHeight + 100, dstHeight + 100, delay, duration, peak, arc); }, [ScriptOpcode.PROJANIM_NPC]: state => { const [srcCoord, npcUid, spotanim, srcHeight, dstHeight, delay, duration, peak, arc] = state.popInts(9); - check(srcCoord, CoordValid); - check(spotanim, SpotAnimTypeValid); + const srcPos: Position = check(srcCoord, CoordValid); + const spotanimType: SpotanimType = check(spotanim, SpotAnimTypeValid); const slot = npcUid & 0xffff; const expectedType = (npcUid >> 16) & 0xffff; @@ -319,33 +316,28 @@ const ServerOps: CommandHandlers = { throw new Error(`attempted to use invalid npc uid: ${npcUid}`); } - const srcPos = Position.unpackCoord(srcCoord); - const zone = World.getZone(srcPos.x, srcPos.z, srcPos.level); - zone.mapProjAnim(srcPos.x, srcPos.z, npc.x, npc.z, npc.nid + 1, spotanim, srcHeight + 100, dstHeight + 100, delay, duration, peak, arc); + World.getZone(srcPos.x, srcPos.z, srcPos.level).mapProjAnim(srcPos.x, srcPos.z, npc.x, npc.z, npc.nid + 1, spotanimType.id, srcHeight + 100, dstHeight + 100, delay, duration, peak, arc); }, [ScriptOpcode.PROJANIM_MAP]: state => { const [srcCoord, dstCoord, spotanim, srcHeight, dstHeight, delay, duration, peak, arc] = state.popInts(9); - check(spotanim, SpotAnimTypeValid); + const spotanimType: SpotanimType = check(spotanim, SpotAnimTypeValid); + const srcPos: Position = check(srcCoord, CoordValid); + const dstPos: Position = check(dstCoord, CoordValid); - const srcPos = Position.unpackCoord(check(srcCoord, CoordValid)); - const dstPos = Position.unpackCoord(check(dstCoord, CoordValid)); - const zone = World.getZone(srcPos.x, srcPos.z, srcPos.level); - zone.mapProjAnim(srcPos.x, srcPos.z, dstPos.x, dstPos.z, 0, spotanim, srcHeight + 100, dstHeight, delay, duration, peak, arc); + World.getZone(srcPos.x, srcPos.z, srcPos.level).mapProjAnim(srcPos.x, srcPos.z, dstPos.x, dstPos.z, 0, spotanimType.id, srcHeight + 100, dstHeight, delay, duration, peak, arc); }, [ScriptOpcode.MAP_LOCADDUNSAFE]: state => { - const coord = check(state.popInt(), CoordValid); - - const pos = Position.unpackCoord(coord); + const pos: Position = check(state.popInt(), CoordValid); const zone = World.getZone(pos.x, pos.z, pos.level); const locs = zone.staticLocs.concat(zone.locs); for (let index = 0; index < locs.length; index++) { const loc = locs[index]; - const type = LocType.get(loc.type); + const type = check(loc.type, LocTypeValid); if (type.active !== 1) { continue; diff --git a/src/lostcity/entity/Position.ts b/src/lostcity/entity/Position.ts index fc7dc5f82..b12c503fb 100644 --- a/src/lostcity/entity/Position.ts +++ b/src/lostcity/entity/Position.ts @@ -11,6 +11,8 @@ export const Direction = { // TODO (jkm) consider making this an enum type Direction = (typeof Direction)[keyof typeof Direction]; +export type Position = {level: number, x: number, z: number}; + // TODO (jkm) consider making this a class export const Position = { zone: (pos: number) => pos >> 3, @@ -107,7 +109,7 @@ export const Position = { return 0; }, - unpackCoord(coord: number): { level: number; x: number; z: number } { + unpackCoord(coord: number): Position { const level = (coord >> 28) & 0x3; const x = (coord >> 14) & 0x3fff; const z = coord & 0x3fff; From 64db4ee4c2ae7f0f68fe0c2146a4824d382d206d Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 3 Jun 2024 18:50:42 -0400 Subject: [PATCH 28/50] fix(engine): Repath in cases where no path was set --- src/lostcity/entity/PathingEntity.ts | 7 +++++-- src/lostcity/entity/Player.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index bc74e3b18..d91c40d3d 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -306,8 +306,11 @@ export default abstract class PathingEntity extends Entity { return this.waypointIndex !== -1; } - isLastWaypoint(): boolean { - return this.waypointIndex === 0; + /* + * Returns if this PathingEntity is at the last waypoint or is out of waypoints. + */ + isLastOrNoWaypoint(): boolean { + return this.waypointIndex <= 0; } protected inOperableDistance(target: Entity): boolean { diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index 691be0e7f..dbe55087e 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -433,7 +433,7 @@ export default class Player extends PathingEntity { if ( repathAllowed && - this.target instanceof PathingEntity && this.isLastWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && + this.target instanceof PathingEntity && this.isLastOrNoWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && !this.interacted && this.walktrigger === -1 ) { this.pathToTarget(); From 1977a6be1d2be359373ae376df93b3003db12936 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Tue, 4 Jun 2024 15:20:11 -0400 Subject: [PATCH 29/50] fix(engine): stopaction on p_op, busy2 command for retal --- data/src/scripts/engine.rs2 | 2 + .../scripts/player/auto_retaliate.rs2 | 8 ++- src/lostcity/engine/script/ScriptOpcode.ts | 1 + .../engine/script/ScriptOpcodePointers.ts | 4 ++ .../engine/script/handlers/PlayerOps.ts | 61 ++++--------------- src/lostcity/entity/PathingEntity.ts | 6 +- src/lostcity/entity/Player.ts | 19 +++++- 7 files changed, 45 insertions(+), 56 deletions(-) diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index 104ff4ef1..077b3aa68 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -161,6 +161,8 @@ [command,.queue](queue $queue, int $delay) [command,busy]()(boolean) [command,.busy]()(boolean) +[command,busy2]()(boolean) +[command,.busy2]()(boolean) [command,getqueue](queue $queue)(int) [command,p_locmerge](int $startCycle, int $endCycle, coord $southEast, coord $northWest); [command,last_login_info] diff --git a/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 b/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 index 6ad86e0d6..d36426457 100644 --- a/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 +++ b/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 @@ -1,5 +1,5 @@ [queue,playerhit_n_retaliate](npc_uid $nid) -if (%auto_retaliate = ^player_auto_retaliate_on & npc_finduid($nid) = true & ~npc_is_attackable(npc_type) = true) { +if (%auto_retaliate = ^player_auto_retaliate_on & npc_finduid($nid) = true & ~npc_is_attackable(npc_type) = true & busy2 = false) { // npc flinches player if (%action_delay < map_clock) { def_obj $weapon = inv_getobj(worn, ^wearpos_rhand); @@ -16,6 +16,7 @@ if (%auto_retaliate = ^player_auto_retaliate_on & npc_finduid($nid) = true & ~np %action_delay = add(map_clock, $delay); } + p_opnpc(2); } @@ -40,7 +41,7 @@ if (%auto_retaliate = ^player_auto_retaliate_on & npc_finduid($nid) = true & ~np // proc for now [proc,.pvp_retaliate](player_uid $target_uid) -if (.%auto_retaliate = ^player_auto_retaliate_on) { +if (.%auto_retaliate = ^player_auto_retaliate_on & .busy2 = false) { // player flinches player if (.%action_delay < map_clock) { def_obj $weapon = inv_getobj(worn, ^wearpos_rhand); @@ -54,5 +55,6 @@ if (.%auto_retaliate = ^player_auto_retaliate_on) { .%action_delay = add(map_clock, $delay); } + .p_opplayer(2); -} \ No newline at end of file +} diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index 40e8363c8..10e6d9bc2 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -182,6 +182,7 @@ enum ScriptOpcode { SETIDKIT, P_CLEARPENDINGACTION, // official GETWALKTRIGGER, // official + BUSY2, // official // Npc ops (2500-2999) NPC_ADD = 2500, // official diff --git a/src/lostcity/engine/script/ScriptOpcodePointers.ts b/src/lostcity/engine/script/ScriptOpcodePointers.ts index 244cefad2..cd95739a9 100644 --- a/src/lostcity/engine/script/ScriptOpcodePointers.ts +++ b/src/lostcity/engine/script/ScriptOpcodePointers.ts @@ -52,6 +52,10 @@ const ScriptOpcodePointers: { require: ['active_player'], require2: ['active_player2'] }, + [ScriptOpcode.BUSY2]: { + require: ['active_player'], + require2: ['active_player2'] + }, [ScriptOpcode.CAM_LOOKAT]: { require: ['active_player'], require2: ['active_player2'] diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index cb010fb05..a0ac72bd2 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -314,14 +314,7 @@ const PlayerOps: CommandHandlers = { if (type < 0 || type >= 5) { throw new Error(`Invalid oploc: ${type + 1}`); } - if (state.activePlayer.target !== null) { - return; - } - if (state.activePlayer.hasWaypoints()) { - return; - } - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, state.activeLoc, ServerTriggerType.APLOC1 + type); }), @@ -330,27 +323,13 @@ const PlayerOps: CommandHandlers = { if (type < 0 || type >= 5) { throw new Error(`Invalid opnpc: ${type + 1}`); } - if (state.activePlayer.target !== null) { - return; - } - if (state.activePlayer.hasWaypoints()) { - return; - } - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, state.activeNpc, ServerTriggerType.APNPC1 + type, {type: state.activeNpc.type, com: -1}); }), [ScriptOpcode.P_OPNPCT]: checkedHandler(ProtectedActivePlayer, state => { const spellId: number = check(state.popInt(), NumberNotNull); - if (state.activePlayer.target !== null) { - return; - } - if (state.activePlayer.hasWaypoints()) { - return; - } - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, state.activeNpc, ServerTriggerType.APNPCT, {type: state.activeNpc.type, com: spellId}); }), @@ -360,16 +339,11 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.P_STOPACTION]: checkedHandler(ProtectedActivePlayer, state => { - // clear current walk queue, clear current interaction, close interface, clear suspended script? > not the script, cant emote while going thru toll - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); - state.activePlayer.unsetMapFlag(); + state.activePlayer.stopAction(); }), [ScriptOpcode.P_CLEARPENDINGACTION]: checkedHandler(ProtectedActivePlayer, state => { - // clear current interaction but leave walk queue intact - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.clearPendingAction(); }), [ScriptOpcode.P_TELEJUMP]: checkedHandler(ProtectedActivePlayer, state => { @@ -708,6 +682,10 @@ const PlayerOps: CommandHandlers = { state.pushInt(state.activePlayer.busy() ? 1 : 0); }, + [ScriptOpcode.BUSY2]: state => { + state.pushInt(state.activePlayer.hasInteraction() || state.activePlayer.hasWaypoints() ? 1 : 0); + }, + [ScriptOpcode.GETQUEUE]: state => { const scriptId = state.popInt(); @@ -815,8 +793,7 @@ const PlayerOps: CommandHandlers = { if (state.activePlayer.hasWaypoints()) { return; } - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, state.activeObj, ServerTriggerType.APOBJ1 + type); }), @@ -825,18 +802,11 @@ const PlayerOps: CommandHandlers = { if (type < 0 || type >= 5) { throw new Error(`Invalid opplayer: ${type + 1}`); } - if (state.activePlayer.target !== null) { - return; - } - if (state.activePlayer.hasWaypoints()) { - return; - } const target = state._activePlayer2; if (!target) { return; } - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, target, ServerTriggerType.APPLAYER1 + type); }), @@ -930,18 +900,11 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.P_OPPLAYERT]: checkedHandler(ProtectedActivePlayer, state => { const spellId = check(state.popInt(), NumberNotNull); - if (state.activePlayer.target !== null) { - return; - } - if (state.activePlayer.hasWaypoints()) { - return; - } const target = state._activePlayer2; if (!target) { return; } - state.activePlayer.clearInteraction(); - state.activePlayer.closeModal(); + state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, target, ServerTriggerType.APPLAYERT, {type: -1, com: spellId}); }), }; diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index d91c40d3d..4a34c0bd3 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -307,10 +307,10 @@ export default abstract class PathingEntity extends Entity { } /* - * Returns if this PathingEntity is at the last waypoint or is out of waypoints. + * Returns if this PathingEntity is at the last waypoint. */ - isLastOrNoWaypoint(): boolean { - return this.waypointIndex <= 0; + isLastWaypoint(): boolean { + return this.waypointIndex === 0; } protected inOperableDistance(target: Entity): boolean { diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index dbe55087e..3e1aba802 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -433,7 +433,7 @@ export default class Player extends PathingEntity { if ( repathAllowed && - this.target instanceof PathingEntity && this.isLastOrNoWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && + this.target instanceof PathingEntity && this.isLastWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && !this.interacted && this.walktrigger === -1 ) { this.pathToTarget(); @@ -686,6 +686,23 @@ export default class Player extends PathingEntity { } } + // clear current interaction and walk queue + stopAction() { + this.clearInteraction(); + this.closeModal(); + this.unsetMapFlag(); + } + + // clear current interaction but leave walk queue intact + clearPendingAction() { + this.clearInteraction(); + this.closeModal(); + } + + hasInteraction() { + return this.target !== null; + } + getOpTrigger() { if (!this.target) { return null; From 6fb97e8e00ed0e21549658c9aa0d94b5b377a7ff Mon Sep 17 00:00:00 2001 From: Pazaz Date: Tue, 4 Jun 2024 16:32:01 -0400 Subject: [PATCH 30/50] feat(engine): Secondary queue, timer, walktrigger support (workarounds in the compiler) --- data/src/scripts/engine.rs2 | 5 ++- .../macro events/scripts/macro_events.rs2 | 6 +-- .../scripts/woodcutting/macro_event_ent.rs2 | 2 +- data/src/scripts/player/scripts/damage.rs2 | 2 +- .../scripts/player/auto_retaliate.rs2 | 38 +++++------------ .../scripts/player/player_combat.rs2 | 1 + .../skill_combat/scripts/pvp/pvp_combat.rs2 | 2 +- .../skill_combat/scripts/pvp/pvp_magic.rs2 | 15 +++---- .../skill_combat/scripts/pvp/pvp_melee.rs2 | 8 ++-- .../skill_combat/scripts/pvp/pvp_ranged.rs2 | 8 ++-- .../skill_magic/scripts/spells/alchemy.rs2 | 2 +- .../skill_woodcutting/scripts/woodcut.rs2 | 2 +- src/lostcity/engine/script/ScriptOpcode.ts | 7 +++- .../engine/script/ScriptOpcodePointers.ts | 9 ++++ src/lostcity/engine/script/ScriptProvider.ts | 4 +- .../engine/script/handlers/PlayerOps.ts | 42 ++++++++++++++++++- src/lostcity/entity/Entity.ts | 4 +- src/lostcity/entity/PathingEntity.ts | 3 +- 18 files changed, 95 insertions(+), 65 deletions(-) diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index 077b3aa68..8bf42cdd5 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -150,6 +150,7 @@ [command,.softtimer]/*(softtimer $timer, int $interval, ...)*/ [command,clearsofttimer](softtimer $timer) [command,settimer]/*(timer $timer, int $interval, ...)*/ +[command,settimer2] // todo: will become .settimer later [command,cleartimer](timer $timer) [command,spotanim_pl](spotanim $spotanim, int $height, int $delay) [command,.spotanim_pl](spotanim $spotanim, int $height, int $delay) @@ -158,7 +159,7 @@ [command,if_closesticky] [command,p_exactmove](coord $startCoord, coord $endCoord, int $startCycle, int $endCycle, int $direction) [command,queue](queue $queue, int $delay) -[command,.queue](queue $queue, int $delay) +[command,queue2](queue $queue, int $delay) // todo: will become .queue later [command,busy]()(boolean) [command,.busy]()(boolean) [command,busy2]()(boolean) @@ -200,7 +201,7 @@ [command,allowdesign](boolean $allow) [command,last_targetslot]()(int) [command,walktrigger](walktrigger $trigger) -[command,.walktrigger](walktrigger $trigger) +[command,walktrigger2](walktrigger $trigger) // todo: will become .walktrigger later [command,getwalktrigger]()(walktrigger) [command,.getwalktrigger]()(walktrigger) [command,clearqueue](queue $queue) diff --git a/data/src/scripts/macro events/scripts/macro_events.rs2 b/data/src/scripts/macro events/scripts/macro_events.rs2 index 76ad301af..54f91e516 100644 --- a/data/src/scripts/macro events/scripts/macro_events.rs2 +++ b/data/src/scripts/macro events/scripts/macro_events.rs2 @@ -22,9 +22,9 @@ if (%macro_event > 0) { // (probably every spell) // - cooking. Confirmed: https://youtu.be/Brq99Bdl0aI?list=PLn23LiLYLb1Y3P9S9qZbijcJihiD416jT&t=198 // - using flax wheel. Confirmed: https://youtu.be/sW48OR1I86M (early osrs) -// - using anvil? Cant find a video, not implimented. -// - fletching? Cant find a video, not implimented. -// - flax picking? Cant find a video, but it is implimented. +// - using anvil? Cant find a video, not implemented. +// - fletching? Cant find a video, not implemented. +// - flax picking? Cant find a video, but it is implemented. // - smithing at furnace. Confirmed? https://youtu.be/a6NobmSGBYw // - crafting at furnace. Confirmed: https://youtu.be/7pS6s5rvvEY [proc,macro_event_general_spawn](int $event) diff --git a/data/src/scripts/macro events/scripts/woodcutting/macro_event_ent.rs2 b/data/src/scripts/macro events/scripts/woodcutting/macro_event_ent.rs2 index 50237bc9f..d9313e896 100644 --- a/data/src/scripts/macro events/scripts/woodcutting/macro_event_ent.rs2 +++ b/data/src/scripts/macro events/scripts/woodcutting/macro_event_ent.rs2 @@ -55,7 +55,7 @@ if (inv_freespace(inv) < 1) { @your_inventory_is_full($product); } if (%action_delay < map_clock) { - // scuffed implimentation for lining up skill sounds (very first chop) + // scuffed implementation for lining up skill sounds (very first chop) if (%skill_sound = calc(map_clock + 4)) { sound_synth(woodchop_4,0,20); } diff --git a/data/src/scripts/player/scripts/damage.rs2 b/data/src/scripts/player/scripts/damage.rs2 index 08fff32f2..b5aa395c4 100644 --- a/data/src/scripts/player/scripts/damage.rs2 +++ b/data/src/scripts/player/scripts/damage.rs2 @@ -174,7 +174,7 @@ if ($amount > 0) { // .queue(player_death, 0); // } if (.stat(hitpoints) = 0){ - .say("Pvp death is not implimented. Need support for .queue."); + .say("Pvp death is not implemented. Need support for .queue."); } diff --git a/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 b/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 index d36426457..f1b35ca4f 100644 --- a/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 +++ b/data/src/scripts/skill_combat/scripts/player/auto_retaliate.rs2 @@ -21,40 +21,24 @@ if (%auto_retaliate = ^player_auto_retaliate_on & npc_finduid($nid) = true & ~np } // this needs fixing, and .queue support -// [queue,.pvp_retaliate](player_uid $target_uid) -// if (.finduid($target_uid) = true & .%auto_retaliate = ^player_auto_retaliate_on) { -// // player flinches player -// if (.%action_delay < map_clock) { -// def_obj $weapon = inv_getobj(worn, ^wearpos_rhand); -// def_int $delay = 4; -// if ($weapon ! null) { -// $delay = divide(oc_param($weapon, attackrate), 2); -// } -// if (.%damagestyle = ^style_ranged_rapid) { -// $delay = sub($delay, 1); -// } - -// .%action_delay = add(map_clock, $delay); -// } -// .p_opplayer(2); -// } - -// proc for now -[proc,.pvp_retaliate](player_uid $target_uid) -if (.%auto_retaliate = ^player_auto_retaliate_on & .busy2 = false) { - // player flinches player - if (.%action_delay < map_clock) { +[queue,pvp_retaliate](player_uid $uid) +if (%auto_retaliate = ^player_auto_retaliate_on & .finduid($uid) = true & busy2 = false) { + // npc flinches player + if (%action_delay < map_clock) { def_obj $weapon = inv_getobj(worn, ^wearpos_rhand); def_int $delay = 4; if ($weapon ! null) { - $delay = divide(oc_param($weapon, attackrate), 2); + $delay = oc_param($weapon, attackrate); } - if (.%damagestyle = ^style_ranged_rapid) { + + $delay = divide($delay, 2); + + if (%damagestyle = ^style_ranged_rapid) { $delay = sub($delay, 1); } - .%action_delay = add(map_clock, $delay); + %action_delay = add(map_clock, $delay); } - .p_opplayer(2); + p_opplayer(2); } diff --git a/data/src/scripts/skill_combat/scripts/player/player_combat.rs2 b/data/src/scripts/skill_combat/scripts/player/player_combat.rs2 index 331b03c0d..eccf562ad 100644 --- a/data/src/scripts/skill_combat/scripts/player/player_combat.rs2 +++ b/data/src/scripts/skill_combat/scripts/player/player_combat.rs2 @@ -22,6 +22,7 @@ if (testbit(%attackstyle_magic, 0) = true & %attackstyle_magic = 3 & %autocast_s } if (($attackrange <= 1 & ~player_in_combat_check = false) | $distance > $attackrange) { + p_opnpc(2); p_aprange($attackrange); return; } diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 index 48f5e9d7a..73c4340ba 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 @@ -146,7 +146,7 @@ switch_int($damagestyle) { givexp(hitpoints, scale($multiplier, 1000, scale(133, 100, $base))); // needs to be a queue -[proc,.pvp_damage_player](int $damage) +[proc,.pvp_damage](int $damage) ~.damage_self($damage); if (.stat(hitpoints) = 0) { // todo: duel arena death in the death queue diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 index abc55f524..5bbd1b699 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 @@ -198,20 +198,17 @@ if (~.check_protect_prayer(^magic_style) = true) { def_int $damage = randominc($maxhit); // tick eating existed! https://oldschool.runescape.wiki/w/Update:The_Wintertodt $damage = min($damage, .stat(hitpoints)); if ($maxhit ! null) { - //.queue(pvp_damage_player, $damage, calc($duration / 30 + 1)); // delayed an extra tick in osrs + // .queue(pvp_damage, calc($duration / 30 + 1), $damage); // delayed an extra tick in osrs if (.p_finduid(.uid) = true) { // todo: queue this - ~.pvp_damage_player($damage); + ~.pvp_damage($damage); } // didnt have a flinch anim until sept 20 2006: https://oldschool.runescape.wiki/w/Update:Slug_Menace - ~give_combat_experience_pvp(%damagestyle, $damage, ~pvp_xp_multiplier(~.player_combat_level)); } // spell visual .spotanim_pl(db_getfield($spell_data, magic_spell_table:spotanim_target, 0), $duration); // auto retal -if (.p_finduid(.uid) = true) { // todo: queue this - ~.pvp_retaliate(uid); -} +queue2(pvp_retaliate, 0, uid); [proc,pvp_spell_fail](dbrow $spell_data, int $duration) // splash @@ -226,10 +223,8 @@ if (db_getfieldcount($spell_data, magic_spell_table:sound_fail) > 0) { } // no splash sound? .spotanim_pl(failedspell_impact, 92, $duration); - -if (.p_finduid(.uid) = true) { // todo: queue this - ~.pvp_retaliate(uid); -} +// auto retal +queue2(pvp_retaliate, 0, uid); [proc,pvp_spell_cast](dbrow $spell_data)(int) ~set_pk_vars; diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 index e5823aa1c..51447dcea 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 @@ -34,13 +34,11 @@ anim(%com_attackanim, 0); sound_synth(%com_attacksound, 0, 0); .sound_synth(.%com_attacksound, 0, 0); -// todo: queue these +queue2(pvp_retaliate, 0, uid); if (.p_finduid(.uid) = true) { - ~.pvp_retaliate(uid); - ~.pvp_damage_player($damage); + ~.pvp_damage($damage); } -// .queue(.pvp_retaliate, uid, 0); -// .queue(.pvp_damage, uid, $damage, 0); +// queue2(pvp_damage, calc($delay / 30), $damage); .anim(.%com_defendanim, 20); // .sound_synth(.%com_defendsound, 0, 20); diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 index 2ea500625..5e108039c 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 @@ -48,13 +48,11 @@ anim(%com_attackanim, 0); sound_synth(%com_attacksound, 0, 0); .sound_synth(.%com_attacksound, 0, 0); -// todo: queue these +queue2(pvp_retaliate, calc($delay / 30), uid); if (.p_finduid(.uid) = true) { - ~.pvp_retaliate(uid); - ~.pvp_damage_player($damage); + ~.pvp_damage($damage); } -// .queue(.pvp_retaliate, uid, calc($delay / 30)); -// .queue(.pvp_damage, uid, $damage, calc($delay / 30)); +// queue2(pvp_damage, calc($delay / 30), $damage); .anim(.%com_defendanim, 20); // .sound_synth(.%com_defendsound, 0, 20); diff --git a/data/src/scripts/skill_magic/scripts/spells/alchemy.rs2 b/data/src/scripts/skill_magic/scripts/spells/alchemy.rs2 index 9384a1e0d..84d36f444 100644 --- a/data/src/scripts/skill_magic/scripts/spells/alchemy.rs2 +++ b/data/src/scripts/skill_magic/scripts/spells/alchemy.rs2 @@ -66,7 +66,7 @@ p_delay(2); [proc,is_alchable](obj $item)(boolean) switch_obj($item) { case obj_1842 : - mes("unimplimented"); + mes("unimplemented"); return(false); case coins : mes("Coins are already made of gold."); diff --git a/data/src/scripts/skill_woodcutting/scripts/woodcut.rs2 b/data/src/scripts/skill_woodcutting/scripts/woodcut.rs2 index c3f42704f..0b19eedd7 100644 --- a/data/src/scripts/skill_woodcutting/scripts/woodcut.rs2 +++ b/data/src/scripts/skill_woodcutting/scripts/woodcut.rs2 @@ -42,7 +42,7 @@ if (afk_event = ^true) { @macro_randomwoodcutting; } if (%action_delay < map_clock) { - // scuffed implimentation for lining up skill sounds (very first chop) + // scuffed implementation for lining up skill sounds (very first chop) if (%skill_sound = calc(map_clock + 4)) { sound_synth(woodchop_4,0,20); } diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index 10e6d9bc2..da0ceb58f 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -160,8 +160,8 @@ enum ScriptOpcode { P_WALK, // official PLAYER_FINDALLZONE, // todo: replace with huntall PLAYER_FINDNEXT, // todo: replace with huntnext - QUEUE, - SAY, + QUEUE, // official + SAY, // official WALKTRIGGER, // official SETTIMER, SOFTTIMER, // official @@ -183,6 +183,9 @@ enum ScriptOpcode { P_CLEARPENDINGACTION, // official GETWALKTRIGGER, // official BUSY2, // official + QUEUE2, // workaround until .queue is supported in compiler + SETTIMER2, // workaround until .settimer is supported in compiler + WALKTRIGGER2, // workaround until .walktrigger is supported in compiler // Npc ops (2500-2999) NPC_ADD = 2500, // official diff --git a/src/lostcity/engine/script/ScriptOpcodePointers.ts b/src/lostcity/engine/script/ScriptOpcodePointers.ts index cd95739a9..c16218d9f 100644 --- a/src/lostcity/engine/script/ScriptOpcodePointers.ts +++ b/src/lostcity/engine/script/ScriptOpcodePointers.ts @@ -394,6 +394,9 @@ const ScriptOpcodePointers: { require: ['active_player'], require2: ['active_player2'] }, + [ScriptOpcode.QUEUE2]: { + require: ['active_player2'] + }, [ScriptOpcode.SAY]: { require: ['active_player'], require2: ['active_player2'] @@ -405,6 +408,9 @@ const ScriptOpcodePointers: { require: ['active_player'], require2: ['active_player2'] }, + [ScriptOpcode.WALKTRIGGER2]: { + require: ['active_player2'] + }, [ScriptOpcode.GETWALKTRIGGER]: { require: ['active_player'], require2: ['active_player2'] @@ -412,6 +418,9 @@ const ScriptOpcodePointers: { [ScriptOpcode.SETTIMER]: { require: ['active_player'] }, + [ScriptOpcode.SETTIMER2]: { + require: ['active_player2'] + }, [ScriptOpcode.SOFTTIMER]: { require: ['active_player'] }, diff --git a/src/lostcity/engine/script/ScriptProvider.ts b/src/lostcity/engine/script/ScriptProvider.ts index 3a3e60283..125d2ea22 100644 --- a/src/lostcity/engine/script/ScriptProvider.ts +++ b/src/lostcity/engine/script/ScriptProvider.ts @@ -10,7 +10,7 @@ export default class ScriptProvider { /** * The expected version of the script compiler that the runtime should be loading scripts from. */ - public static readonly COMPILER_VERSION = 15; + public static readonly COMPILER_VERSION = 16; /** * Array of loaded scripts. @@ -46,7 +46,7 @@ export default class ScriptProvider { const version = dat.g4(); if (version !== ScriptProvider.COMPILER_VERSION) { - console.error('\nFatal: Compiler is out of date. Please download the latest RuneScriptCompiler.jar and restart this.'); + console.error('\nFatal: Scripts were compiled with an older RuneScript compiler. Please try `npm run build` first and then restart the server.'); process.exit(1); } diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index a0ac72bd2..7e5210186 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -4,7 +4,7 @@ import SpotanimType from '#lostcity/cache/SpotanimType.js'; import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import {ActivePlayer, checkedHandler, ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; +import ScriptPointer, {ActivePlayer, checkedHandler, ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import ScriptState from '#lostcity/engine/script/ScriptState.js'; @@ -109,6 +109,22 @@ const PlayerOps: CommandHandlers = { state.activePlayer.enqueueScript(script, PlayerQueueType.NORMAL, delay, args); }), + [ScriptOpcode.QUEUE2]: checkedHandler(ScriptPointer.ActivePlayer2, state => { + if (!state._activePlayer2) { + return; + } + + const args = popScriptArgs(state); + const delay = check(state.popInt(), NumberNotNull); + const scriptId = state.popInt(); + + const script = ScriptProvider.get(scriptId); + if (!script) { + throw new Error(`Unable to find queue script: ${scriptId}`); + } + state._activePlayer2.enqueueScript(script, PlayerQueueType.NORMAL, delay, args); + }), + [ScriptOpcode.ANIM]: checkedHandler(ActivePlayer, state => { const delay = check(state.popInt(), NumberNotNull); const seq = state.popInt(); @@ -649,6 +665,22 @@ const PlayerOps: CommandHandlers = { state.activePlayer.setTimer(PlayerTimerType.NORMAL, script, args, interval); }), + [ScriptOpcode.SETTIMER2]: checkedHandler(ScriptPointer.ActivePlayer2, state => { + if (!state._activePlayer2) { + return; + } + + const args = popScriptArgs(state); + const interval = state.popInt(); + const timerId = state.popInt(); + + const script = ScriptProvider.get(timerId); + if (!script) { + throw new Error(`Unable to find timer script: ${timerId}`); + } + state._activePlayer2.setTimer(PlayerTimerType.NORMAL, script, args, interval); + }), + [ScriptOpcode.CLEARTIMER]: checkedHandler(ActivePlayer, state => { state.activePlayer.clearTimer(state.popInt()); }), @@ -827,6 +859,14 @@ const PlayerOps: CommandHandlers = { state.activePlayer.walktrigger = state.popInt(); }, + [ScriptOpcode.WALKTRIGGER2]: state => { + if (!state._activePlayer2) { + return; + } + + state._activePlayer2.walktrigger = state.popInt(); + }, + [ScriptOpcode.GETWALKTRIGGER]: state => { state.pushInt(state.activePlayer.walktrigger); }, diff --git a/src/lostcity/entity/Entity.ts b/src/lostcity/entity/Entity.ts index e0d460af5..3d930634f 100644 --- a/src/lostcity/entity/Entity.ts +++ b/src/lostcity/entity/Entity.ts @@ -5,8 +5,8 @@ export default abstract class Entity { z: number; // size - width: number; - length: number; + width: number = 1; + length: number = 1; // runtime variables despawn: number = -1; diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 4a34c0bd3..cb53b1763 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -310,7 +310,7 @@ export default abstract class PathingEntity extends Entity { * Returns if this PathingEntity is at the last waypoint. */ isLastWaypoint(): boolean { - return this.waypointIndex === 0; + return this.waypointIndex <= 0; } protected inOperableDistance(target: Entity): boolean { @@ -417,6 +417,7 @@ export default abstract class PathingEntity extends Entity { this.mask |= this.coordmask; } } + if (interaction === Interaction.SCRIPT) { this.pathToTarget(); } From 71705875f6fea3d20c6bbafc8f6bddcc97cb2ce3 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Tue, 4 Jun 2024 18:47:19 -0400 Subject: [PATCH 31/50] chore(engine): Updated compiler version --- src/lostcity/engine/script/ScriptProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lostcity/engine/script/ScriptProvider.ts b/src/lostcity/engine/script/ScriptProvider.ts index 125d2ea22..411269fc4 100644 --- a/src/lostcity/engine/script/ScriptProvider.ts +++ b/src/lostcity/engine/script/ScriptProvider.ts @@ -10,7 +10,7 @@ export default class ScriptProvider { /** * The expected version of the script compiler that the runtime should be loading scripts from. */ - public static readonly COMPILER_VERSION = 16; + public static readonly COMPILER_VERSION = 17; /** * Array of loaded scripts. @@ -46,7 +46,7 @@ export default class ScriptProvider { const version = dat.g4(); if (version !== ScriptProvider.COMPILER_VERSION) { - console.error('\nFatal: Scripts were compiled with an older RuneScript compiler. Please try `npm run build` first and then restart the server.'); + console.error('\nFatal: Scripts were compiled with an older RuneScript compiler. Please update it, try `npm run build` and then restart the server.'); process.exit(1); } From 3709e96cc39b39a145a3e4ffb27ea1024ba56db8 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Tue, 4 Jun 2024 19:30:27 -0400 Subject: [PATCH 32/50] feat(engine): p,mesanim support --- .../area_alkharid/scripts/border_gate.rs2 | 18 +- .../areas/area_alkharid/scripts/dommik.rs2 | 8 +- .../area_alkharid/scripts/gem_trader.rs2 | 8 +- .../areas/area_alkharid/scripts/hassan.rs2 | 24 +- .../area_alkharid/scripts/kebab_seller.rs2 | 10 +- .../area_alkharid/scripts/louie_legs.rs2 | 8 +- .../areas/area_alkharid/scripts/osman.rs2 | 102 +++--- .../areas/area_alkharid/scripts/ranael.rs2 | 6 +- .../areas/area_alkharid/scripts/shantay.rs2 | 82 ++--- .../area_alkharid/scripts/shantay_pass.rs2 | 28 +- .../area_alkharid/scripts/silk_trader.rs2 | 30 +- .../areas/area_alkharid/scripts/tanner.rs2 | 32 +- .../areas/area_alkharid/scripts/zeke.rs2 | 12 +- .../area_ardougne_east/scripts/aemad.rs2 | 8 +- .../scripts/ardounge_monk.rs2 | 4 +- .../area_ardougne_east/scripts/baker.rs2 | 6 +- .../area_ardougne_east/scripts/bartender.rs2 | 20 +- .../scripts/brother_cedric.rs2 | 66 ++-- .../scripts/brother_kojo.rs2 | 16 +- .../scripts/brother_omad.rs2 | 116 +++--- .../scripts/captain_barnaby.rs2 | 8 +- .../area_ardougne_east/scripts/caroline.rs2 | 68 ++-- .../area_ardougne_east/scripts/elena.rs2 | 16 +- .../area_ardougne_east/scripts/fur_trader.rs2 | 4 +- .../scripts/gem_merchant.rs2 | 2 +- .../scripts/holgart_ardougne.rs2 | 86 ++--- .../area_ardougne_east/scripts/horacio.rs2 | 26 +- .../scripts/rdpt_employee.rs2 | 12 +- .../scripts/silk_merchant.rs2 | 38 +- .../scripts/silver_merchant.rs2 | 4 +- .../scripts/spice_seller.rs2 | 4 +- .../scripts/wizard_cromperty.rs2 | 44 +-- .../area_ardougne_east/scripts/zenesha.rs2 | 6 +- .../area_ardougne_west/scripts/carla.rs2 | 36 +- .../area_ardougne_west/scripts/chadwell.rs2 | 8 +- .../area_ardougne_west/scripts/child.rs2 | 4 +- .../area_ardougne_west/scripts/civilian.rs2 | 54 +-- .../area_ardougne_west/scripts/clerk.rs2 | 46 +-- .../area_ardougne_west/scripts/darkmage.rs2 | 6 +- .../area_ardougne_west/scripts/doors.rs2 | 4 +- .../area_ardougne_west/scripts/kilron.rs2 | 8 +- .../areas/area_ardougne_west/scripts/man.rs2 | 14 +- .../area_ardougne_west/scripts/mourner.rs2 | 90 ++--- .../scripts/nurse_sarah.rs2 | 10 +- .../area_ardougne_west/scripts/omart.rs2 | 8 +- .../area_ardougne_west/scripts/priest.rs2 | 4 +- .../area_ardougne_west/scripts/recruiter.rs2 | 8 +- .../area_ardougne_west/scripts/woman.rs2 | 42 +-- .../scripts/barbarian_outpost_guard.rs2 | 42 +-- .../scripts/barbarian.rs2 | 24 +- .../scripts/gunthor_the_brave.rs2 | 16 +- .../area_barbarian_village/scripts/peksa.rs2 | 14 +- .../scripts/alfonse_the_waiter.rs2 | 6 +- .../area_brimhaven/scripts/bartender.rs2 | 22 +- .../areas/area_brimhaven/scripts/davon.rs2 | 10 +- .../area_brimhaven/scripts/kangai_mau.rs2 | 46 +-- .../area_brimhaven/scripts/pirate_guard.rs2 | 48 +-- .../area_camelot/scripts/king_arthur.rs2 | 92 ++--- .../areas/area_camelot/scripts/merlin.rs2 | 32 +- .../area_camelot/scripts/sir_bedivere.rs2 | 36 +- .../areas/area_camelot/scripts/sir_gawain.rs2 | 50 +-- .../areas/area_camelot/scripts/sir_kay.rs2 | 44 +-- .../area_camelot/scripts/sir_lancelot.rs2 | 40 +-- .../areas/area_camelot/scripts/sir_lucan.rs2 | 38 +- .../area_camelot/scripts/sir_palomedes.rs2 | 26 +- .../area_camelot/scripts/sir_pelleas.rs2 | 36 +- .../area_camelot/scripts/sir_tristram.rs2 | 36 +- .../areas/area_catherby/scripts/arhein.rs2 | 42 +-- .../area_catherby/scripts/candle_maker.rs2 | 28 +- .../areas/area_catherby/scripts/harry.rs2 | 6 +- .../areas/area_catherby/scripts/hickton.rs2 | 6 +- .../scripts/combat_training_camp_npcs.rs2 | 30 +- .../areas/area_draynor/scripts/aggie.rs2 | 84 ++--- .../areas/area_draynor/scripts/diango.rs2 | 4 +- .../areas/area_draynor/scripts/joe_guard.rs2 | 82 ++--- .../areas/area_draynor/scripts/lady_keli.rs2 | 86 ++--- .../areas/area_draynor/scripts/leela.rs2 | 102 +++--- .../areas/area_draynor/scripts/morgan.rs2 | 30 +- .../areas/area_draynor/scripts/ned.rs2 | 122 +++---- .../areas/area_draynor/scripts/prince_ali.rs2 | 14 +- .../scripts/professor_oddenstein.rs2 | 70 ++-- .../areas/area_draynor/scripts/traiborn.rs2 | 128 +++---- .../areas/area_draynor/scripts/veronica.rs2 | 40 +-- .../areas/area_edgeville/scripts/oracle.rs2 | 68 ++-- .../areas/area_edgeville/scripts/oziach.rs2 | 96 ++--- .../areas/area_entrana/scripts/cave_monk.rs2 | 10 +- .../areas/area_entrana/scripts/frincos.rs2 | 8 +- .../area_entrana/scripts/high_priest.rs2 | 14 +- .../area_entrana/scripts/monk_of_entrana.rs2 | 8 +- .../areas/area_falador/scripts/barmaid.rs2 | 32 +- .../areas/area_falador/scripts/cassie.rs2 | 8 +- .../area_falador/scripts/drogo_dwarf.rs2 | 12 +- .../areas/area_falador/scripts/flynn.rs2 | 6 +- .../goblin_village/general_bentnoze.rs2 | 10 +- .../area_falador/scripts/hairdresser.rs2 | 12 +- .../areas/area_falador/scripts/herquin.rs2 | 6 +- .../area_falador/scripts/mining_guild.rs2 | 4 +- .../areas/area_falador/scripts/nurmof.rs2 | 24 +- .../area_falador/scripts/sir_amik_varze.rs2 | 64 ++-- .../areas/area_falador/scripts/sir_vyvin.rs2 | 28 +- .../areas/area_falador/scripts/squire.rs2 | 8 +- .../areas/area_falador/scripts/wayne.rs2 | 6 +- .../scripts/wyson_the_gardener.rs2 | 30 +- .../area_fishing_platform/scripts/bailey.rs2 | 74 ++-- .../scripts/fisherman.rs2 | 20 +- .../scripts/holgart_island.rs2 | 8 +- .../scripts/holgart_platform.rs2 | 26 +- .../area_fishing_platform/scripts/kennith.rs2 | 44 +-- .../area_fishing_platform/scripts/kent.rs2 | 28 +- .../areas/area_gnome/scripts/aluft_gianne.rs2 | 12 +- .../areas/area_gnome/scripts/blurberry.rs2 | 18 +- .../areas/area_gnome/scripts/bolkoy.rs2 | 40 +-- .../area_gnome/scripts/commander_montai.rs2 | 92 ++--- .../areas/area_gnome/scripts/elkoy.rs2 | 144 ++++---- .../areas/area_gnome/scripts/gnome_bar.rs2 | 173 +++++---- .../areas/area_gnome/scripts/gnome_barman.rs2 | 36 +- .../area_gnome/scripts/gnome_restaurant.rs2 | 244 ++++++------- .../area_gnome/scripts/gnome_trainer.rs2 | 20 +- .../areas/area_gnome/scripts/gnome_troop.rs2 | 12 +- .../areas/area_gnome/scripts/gnome_waiter.rs2 | 20 +- .../areas/area_gnome/scripts/gnomes.rs2 | 334 +++++++++--------- .../areas/area_gnome/scripts/heckel_funch.rs2 | 12 +- .../scripts/areas/area_gnome/scripts/hudo.rs2 | 12 +- .../areas/area_gnome/scripts/kalron.rs2 | 24 +- .../areas/area_gnome/scripts/king_bolren.rs2 | 136 +++---- .../areas/area_gnome/scripts/local_gnome.rs2 | 28 +- .../areas/area_gnome/scripts/remsai.rs2 | 44 +-- .../areas/area_gnome/scripts/rometti.rs2 | 14 +- .../areas/area_gnome/scripts/spirit_tree.rs2 | 8 +- .../area_karamja/scripts/customs_officer.rs2 | 42 +-- .../areas/area_karamja/scripts/jiminua.rs2 | 6 +- .../areas/area_karamja/scripts/zambo.rs2 | 12 +- .../areas/area_lostcity/scripts/doorman.rs2 | 16 +- .../area_lostcity/scripts/fairy_queen.rs2 | 8 +- .../areas/area_lostcity/scripts/irksol.rs2 | 10 +- .../areas/area_lostcity/scripts/jakut.rs2 | 6 +- .../area_lostcity/scripts/ladder_fairy.rs2 | 10 +- .../areas/area_lostcity/scripts/lunderwin.rs2 | 14 +- .../area_lumbridge/scripts/archer_zanaris.rs2 | 28 +- .../areas/area_lumbridge/scripts/bob.rs2 | 22 +- .../areas/area_lumbridge/scripts/cook.rs2 | 20 +- .../area_lumbridge/scripts/duke_horacio.rs2 | 44 +-- .../area_lumbridge/scripts/father_aereck.rs2 | 94 ++--- .../area_lumbridge/scripts/father_urhney.rs2 | 62 ++-- .../scripts/fred_the_farmer.rs2 | 60 ++-- .../areas/area_lumbridge/scripts/hans.rs2 | 14 +- .../area_lumbridge/scripts/monk_zanaris.rs2 | 18 +- .../scripts/warrior_zanaris.rs2 | 88 ++--- .../area_lumbridge/scripts/wizard_zanaris.rs2 | 26 +- .../scripts/chamber_guardian.rs2 | 36 +- .../areas/area_mage_arena/scripts/gundai.rs2 | 8 +- .../area_mage_arena/scripts/kolodion.rs2 | 100 +++--- .../areas/area_mage_arena/scripts/lundail.rs2 | 18 +- .../area_mage_arena/scripts/mage_arena.rs2 | 2 +- .../area_port_sarim/scripts/bartender.rs2 | 24 +- .../areas/area_port_sarim/scripts/betty.rs2 | 10 +- .../areas/area_port_sarim/scripts/brian.rs2 | 8 +- .../scripts/cabin_boy_jenkins.rs2 | 20 +- .../areas/area_port_sarim/scripts/gerrant.rs2 | 6 +- .../areas/area_port_sarim/scripts/grum.rs2 | 8 +- .../area_port_sarim/scripts/klarense.rs2 | 72 ++-- .../scripts/monk_of_entrana.rs2 | 16 +- .../areas/area_port_sarim/scripts/sailors.rs2 | 14 +- .../areas/area_port_sarim/scripts/wydin.rs2 | 48 +-- .../areas/area_rimmington/scripts/hetty.rs2 | 68 ++-- .../areas/area_rimmington/scripts/rommik.rs2 | 8 +- .../areas/area_seers/scripts/bartender.rs2 | 30 +- .../areas/area_seers/scripts/galahad.rs2 | 74 ++-- .../area_seers/scripts/hemenster/big_dave.rs2 | 2 +- .../area_seers/scripts/hemenster/bonzo.rs2 | 54 +-- .../scripts/hemenster/grandpa_jack.rs2 | 38 +- .../area_seers/scripts/hemenster/joshua.rs2 | 2 +- .../scripts/hemenster/sinister_stranger.rs2 | 38 +- .../area_seers/scripts/mcgrubors_wood.rs2 | 2 +- .../area_seers/scripts/poison_salesman.rs2 | 58 +-- .../scripts/areas/area_seers/scripts/seer.rs2 | 52 +-- .../areas/area_seers/scripts/stankers.rs2 | 20 +- .../areas/area_seers/scripts/thormac.rs2 | 76 ++-- .../areas/area_shilo/scripts/fernahei.rs2 | 8 +- .../scripts/areas/area_shilo/scripts/obli.rs2 | 6 +- .../dungeon/scripts/velrak_the_explorer.rs2 | 22 +- .../areas/area_taverly/scripts/boy.rs2 | 28 +- .../areas/area_taverly/scripts/gaius.rs2 | 10 +- .../areas/area_taverly/scripts/jatix.rs2 | 8 +- .../areas/area_taverly/scripts/kaqemeex.rs2 | 66 ++-- .../area_taverly/scripts/lady_of_the_lake.rs2 | 42 +-- .../areas/area_taverly/scripts/sanfew.rs2 | 16 +- .../areas/area_varrock/scripts/apothecary.rs2 | 56 +-- .../areas/area_varrock/scripts/aubury.rs2 | 32 +- .../areas/area_varrock/scripts/baraek.rs2 | 84 ++--- .../areas/area_varrock/scripts/bartender.rs2 | 74 ++-- .../area_varrock/scripts/captain_rovin.rs2 | 58 +-- .../area_varrock/scripts/champions_guild.rs2 | 4 +- .../areas/area_varrock/scripts/curator.rs2 | 36 +- .../scripts/fancy_dress_shop_owner.rs2 | 10 +- .../area_varrock/scripts/father_lawrence.rs2 | 70 ++-- .../area_varrock/scripts/guild_master.rs2 | 12 +- .../areas/area_varrock/scripts/gypsy.rs2 | 178 +++++----- .../areas/area_varrock/scripts/harlow.rs2 | 40 +-- .../areas/area_varrock/scripts/horvik.rs2 | 10 +- .../areas/area_varrock/scripts/juliet.rs2 | 98 ++--- .../areas/area_varrock/scripts/katrine.rs2 | 118 +++---- .../areas/area_varrock/scripts/king_roald.rs2 | 28 +- .../areas/area_varrock/scripts/lowe.rs2 | 8 +- .../areas/area_varrock/scripts/reldo.rs2 | 40 +-- .../areas/area_varrock/scripts/romeo.rs2 | 102 +++--- .../areas/area_varrock/scripts/scavvo.rs2 | 8 +- .../areas/area_varrock/scripts/sir_prysin.rs2 | 114 +++--- .../areas/area_varrock/scripts/straven.rs2 | 108 +++--- .../areas/area_varrock/scripts/tea_seller.rs2 | 14 +- .../areas/area_varrock/scripts/thessalia.rs2 | 34 +- .../areas/area_varrock/scripts/tramp.rs2 | 60 ++-- .../areas/area_varrock/scripts/valaine.rs2 | 6 +- .../scripts/varrock_swordshop.rs2 | 6 +- .../area_varrock/scripts/weaponsmaster.rs2 | 18 +- .../areas/area_varrock/scripts/zaff.rs2 | 6 +- .../scripts/mountain_dwarf.rs2 | 96 ++--- .../area_wilderness/scripts/fat_tony.rs2 | 30 +- .../area_wilderness/scripts/noterazzo.rs2 | 10 +- .../area_wizard_tower/scripts/sedridor.rs2 | 168 ++++----- .../scripts/wizard_mizgog.rs2 | 56 +-- .../areas/area_yanille/scripts/bartender.rs2 | 28 +- .../area_yanille/scripts/colonel_radick.rs2 | 14 +- .../scripts/sigbert_the_adventurer.rs2 | 12 +- .../area_yanille/scripts/tower_guard.rs2 | 4 +- .../areas_heroes_guild/scripts/helemos.rs2 | 10 +- .../areas/monastery/scripts/abbot_langley.rs2 | 10 +- .../areas/monastery/scripts/brother_jered.rs2 | 20 +- .../scripts/areas/monastery/scripts/monk.rs2 | 10 +- .../areas/monastery/scripts/prayer_guild.rs2 | 16 +- data/src/scripts/engine.rs2 | 2 +- data/src/scripts/general/scripts/book.rs2 | 2 +- .../scripts/general_use/scripts/haybales.rs2 | 2 +- .../scripts/interface_bank/scripts/banker.rs2 | 12 +- .../scripts/interface_chat/scripts/chat.rs2 | 44 +-- .../general/macro_event_drunken_dwarf.rs2 | 6 +- .../scripts/general/macro_event_genie.rs2 | 6 +- .../macro_event_mysterious_old_man.rs2 | 6 +- .../scripts/duel_arena_spectator.rs2 | 68 ++-- .../game_duelarena/scripts/fadli.rs2 | 34 +- .../game_duelarena/scripts/hamid.rs2 | 26 +- .../minigames/game_duelarena/scripts/heal.rs2 | 26 +- .../game_duelarena/scripts/jaraah.rs2 | 24 +- .../game_duelarena/scripts/mubariz.rs2 | 46 +-- .../game_duelarena/scripts/zahwa.rs2 | 50 +-- .../game_partyroom/scripts/party_pete.rs2 | 42 +-- .../game_partyroom/scripts/partyroom_lucy.rs2 | 8 +- .../scripts/partyroom_megan.rs2 | 22 +- .../minigames/game_ranging/scripts/guard.rs2 | 4 +- .../game_trail/scripts/trail_clue_read.rs2 | 2 +- data/src/scripts/npc/scripts/man.rs2 | 74 ++-- data/src/scripts/npc/scripts/pirate.rs2 | 70 ++-- .../quests/quest_arthur/scripts/beggar.rs2 | 26 +- .../quest_arthur/scripts/quest_arthur.rs2 | 72 ++-- .../quest_arthur/scripts/sir_mordred.rs2 | 40 +-- .../quests/quest_ball/scripts/quest_ball.rs2 | 6 +- .../scripts/quest_blackarmgang.rs2 | 2 +- .../scripts/fortress_guard.rs2 | 6 +- .../scripts/quest_blackknight.rs2 | 52 +-- .../quests/quest_cog/scripts/quest_cog.rs2 | 28 +- .../quests/quest_cook/scripts/quest_cook.rs2 | 62 ++-- .../quests/quest_demon/scripts/delrith.rs2 | 10 +- .../quest_doric/scripts/quest_doric.rs2 | 64 ++-- .../quest_dragon/scripts/dragonslayer_ned.rs2 | 20 +- .../quest_dragon/scripts/lady_lumbridge.rs2 | 2 +- .../quests/quest_dragon/scripts/wormbrain.rs2 | 52 +-- .../quest_druid/scripts/quest_druid.rs2 | 69 ++-- .../quests/quest_elena/scripts/alrena.rs2 | 60 ++-- .../quests/quest_elena/scripts/bravek.rs2 | 70 ++-- .../quests/quest_elena/scripts/cupboard.rs2 | 2 +- .../quests/quest_elena/scripts/doors.rs2 | 40 +-- .../quests/quest_elena/scripts/edmond.rs2 | 84 ++--- .../quests/quest_elena/scripts/elena.rs2 | 8 +- .../quests/quest_elena/scripts/jethick.rs2 | 28 +- .../quests/quest_elena/scripts/mourner.rs2 | 120 +++---- .../quest_elena/scripts/plaguehouse.rs2 | 16 +- .../quests/quest_elena/scripts/rehnisons.rs2 | 44 +-- .../quests/quest_elena/scripts/sewerpipe.rs2 | 2 +- .../scripts/hemenster_fishing.rs2 | 4 +- .../scripts/quest_fishingcompo.rs2 | 14 +- .../quest_gobdip/scripts/quest_gobdip.rs2 | 94 ++--- .../scripts/black_knight_titan.rs2 | 10 +- .../quests/quest_grail/scripts/crone.rs2 | 34 +- .../quests/quest_grail/scripts/fisherman.rs2 | 20 +- .../quest_grail/scripts/grail_maiden.rs2 | 2 +- .../quest_grail/scripts/king_percival.rs2 | 6 +- .../quests/quest_grail/scripts/peasent.rs2 | 4 +- .../quest_grail/scripts/quest_grail.rs2 | 2 +- .../quest_grail/scripts/sir_percival.rs2 | 48 +-- .../quest_grail/scripts/the_fisher_king.rs2 | 36 +- .../quest_haunted/scripts/quest_haunted.rs2 | 4 +- .../quest_hazeelcult/scripts/alomone.rs2 | 96 ++--- .../quest_hazeelcult/scripts/butler_jones.rs2 | 118 +++---- .../scripts/carnillean_guard.rs2 | 52 +-- .../scripts/ceril_carnillean.rs2 | 158 ++++----- .../scripts/claus_the_chef.rs2 | 56 +-- .../quest_hazeelcult/scripts/clivet.rs2 | 142 ++++---- .../scripts/hazeel_cultist.rs2 | 38 +- .../scripts/philipe_carnillean.rs2 | 52 +-- .../scripts/quest_hazeelcult.rs2 | 48 +-- .../quest_hetty/scripts/quest_hetty.rs2 | 2 +- .../quests/quest_hunt/scripts/food_store.rs2 | 6 +- .../quests/quest_hunt/scripts/luthas.rs2 | 40 +-- .../quest_hunt/scripts/redbeard_frank.rs2 | 50 +-- .../scripts/ghost_grave_of_scorpius.rs2 | 2 +- .../quest_itgronigen/scripts/goblin_guard.rs2 | 2 +- .../scripts/observatory_assistant.rs2 | 72 ++-- .../scripts/observatory_professor.rs2 | 188 +++++----- .../scripts/quest_itgronigen.rs2 | 42 +-- .../scripts/spirit_of_scorpius.rs2 | 38 +- .../quests/quest_murder/scripts/anna.rs2 | 28 +- .../quests/quest_murder/scripts/bob.rs2 | 30 +- .../quests/quest_murder/scripts/carol.rs2 | 26 +- .../quests/quest_murder/scripts/david.rs2 | 28 +- .../quests/quest_murder/scripts/donovan.rs2 | 34 +- .../quests/quest_murder/scripts/elizabeth.rs2 | 34 +- .../quests/quest_murder/scripts/frank.rs2 | 32 +- .../quests/quest_murder/scripts/gossip.rs2 | 124 +++---- .../quests/quest_murder/scripts/hobbes.rs2 | 42 +-- .../quests/quest_murder/scripts/louisa.rs2 | 38 +- .../quests/quest_murder/scripts/mary.rs2 | 34 +- .../quest_murder/scripts/murder_guard.rs2 | 126 +++---- .../quests/quest_murder/scripts/pierre.rs2 | 36 +- .../quest_murder/scripts/quest_murder.rs2 | 2 +- .../quests/quest_murder/scripts/stanford.rs2 | 36 +- .../quest_priest/scripts/restless_ghost.rs2 | 146 ++++---- .../quest_squire/scripts/quest_squire.rs2 | 170 ++++----- .../quest_totem/scripts/quest_totem.rs2 | 2 +- .../quest_tree/scripts/khazard_warlord.rs2 | 28 +- .../quest_tree/scripts/tracker_gnome.rs2 | 120 +++---- .../quests/quest_waterfall/scripts/almera.rs2 | 58 +-- .../quests/quest_waterfall/scripts/gerald.rs2 | 24 +- .../quests/quest_waterfall/scripts/golrie.rs2 | 24 +- .../quests/quest_waterfall/scripts/hadley.rs2 | 82 ++--- .../quests/quest_waterfall/scripts/hudon.rs2 | 68 ++-- .../scripts/quest_waterfall.rs2 | 16 +- .../quest_zanaris/scripts/quest_zanaris.rs2 | 2 +- .../quests/quest_zanaris/scripts/shamus.rs2 | 42 +-- data/src/scripts/shop/scripts/generalshop.rs2 | 60 ++-- .../skill_cooking/scripts/cooking_guild.rs2 | 8 +- .../scripts/crafting_guild/crafting_guild.rs2 | 22 +- .../scripts/leather/leather.rs2 | 4 +- .../skill_fishing/scripts/fishing_guild.rs2 | 14 +- .../skill_magic/scripts/spells/telegrab.rs2 | 2 +- .../scripts/dwarf_mining_guild.rs2 | 18 +- .../tutorial/scripts/guides/brother_brace.rs2 | 48 +-- .../scripts/guides/combat_instructor.rs2 | 86 ++--- .../scripts/guides/financial_advisor.rs2 | 30 +- .../scripts/guides/magic_instructor.rs2 | 12 +- .../tutorial/scripts/guides/master_chef.rs2 | 24 +- .../scripts/guides/mining_instructor.rs2 | 74 ++-- .../tutorial/scripts/guides/quest_guide.rs2 | 24 +- .../scripts/guides/runescape_guide.rs2 | 22 +- .../scripts/guides/survival_guide.rs2 | 54 +-- .../tutorial/scripts/npcs/tut_banker.rs2 | 4 +- .../scripts/tutorial/scripts/tutorialstep.rs2 | 2 +- .../engine/script/handlers/PlayerOps.ts | 5 + .../engine/script/handlers/ServerOps.ts | 18 +- 358 files changed, 6768 insertions(+), 6743 deletions(-) diff --git a/data/src/scripts/areas/area_alkharid/scripts/border_gate.rs2 b/data/src/scripts/areas/area_alkharid/scripts/border_gate.rs2 index 8ff71323a..f9953f637 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/border_gate.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/border_gate.rs2 @@ -22,29 +22,29 @@ while (npc_findnext = true) { // osrs uses a different message. rsc uses this message. // https://youtu.be/gfWdQJH2Pmc?si=BKF8uqy1wLouzGCE&t=35 // osrs using Pay-fare option on the gate gives different messages. -~chatplayer(quiz, "Can I come through this gate?"); +~chatplayer("Can I come through this gate?"); if (%prince_progress >= ^prince_saved) { - ~chatnpc(quiz, "You may pass for free, you are a friend of Al-Kharid."); + ~chatnpc("You may pass for free, you are a friend of Al-Kharid."); @pass_toll_gate($loc_coord); } -~chatnpc(quiz, "You must pay a toll of 10 gold coins to pass."); +~chatnpc("You must pay a toll of 10 gold coins to pass."); def_int $choice = ~p_choice3("No thank you, I'll walk around.", 1, "Who does my money go to?", 2, "Yes, ok.", 3); if ($choice = 1) { - ~chatplayer(quiz, "No, thank you. I'll walk around."); - ~chatnpc(quiz, "Ok suit yourself."); + ~chatplayer("No, thank you. I'll walk around."); + ~chatnpc("Ok suit yourself."); return; } else if ($choice = 2) { - ~chatplayer(quiz, "Who does my money go to?"); - ~chatnpc(quiz, "The money goes to the city of Al-Kharid."); + ~chatplayer("Who does my money go to?"); + ~chatnpc("The money goes to the city of Al-Kharid."); return; } -~chatplayer(quiz, "Yes, ok."); +~chatplayer("Yes, ok."); if (inv_total(inv, coins) < 10) { - ~chatplayer(quiz, "Oh dear, I don't actually seem to have enough money."); + ~chatplayer("Oh dear, I don't actually seem to have enough money."); return; } diff --git a/data/src/scripts/areas/area_alkharid/scripts/dommik.rs2 b/data/src/scripts/areas/area_alkharid/scripts/dommik.rs2 index 4fd6f5c78..5c97b8d44 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/dommik.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/dommik.rs2 @@ -1,12 +1,12 @@ [opnpc1,dommik] @crafting_shop_talk; [label,crafting_shop_talk] -~chatnpc(happy, "Would you like to buy some crafting equipment?"); +~chatnpc("Would you like to buy some crafting equipment?"); def_int $option = ~p_choice2("No thanks, I've got all the Crafting equipment I need.", 1, "Let's see what you've got, then.", 2); if($option = 1) { - ~chatplayer(neutral, "No thanks; I've got all the Crafting equipment I need."); - ~chatnpc(happy, "Okay. Fare well on your travels."); + ~chatplayer("No thanks; I've got all the Crafting equipment I need."); + ~chatnpc("Okay. Fare well on your travels."); } else if($option = 2) { - ~chatplayer(neutral, "Let's see what you've got, then."); + ~chatplayer("Let's see what you've got, then."); ~openshop_activenpc; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_alkharid/scripts/gem_trader.rs2 b/data/src/scripts/areas/area_alkharid/scripts/gem_trader.rs2 index d15bdfd88..074e120f8 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/gem_trader.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/gem_trader.rs2 @@ -1,10 +1,10 @@ [opnpc1,gem_trader] -~chatnpc(neutral, "Good day to you traveller.|Would you be interested in buying some gems?"); +~chatnpc("Good day to you traveller.|Would you be interested in buying some gems?"); def_int $option = ~p_choice2("Yes please.", 1, "No thank you.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you."); - ~chatnpc(neutral, "Eh, suit yourself."); + ~chatplayer("No thank you."); + ~chatnpc("Eh, suit yourself."); } diff --git a/data/src/scripts/areas/area_alkharid/scripts/hassan.rs2 b/data/src/scripts/areas/area_alkharid/scripts/hassan.rs2 index eadbb096a..aecf71fab 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/hassan.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/hassan.rs2 @@ -1,31 +1,31 @@ [opnpc1,hassan] switch_int (%prince_progress) { case ^prince_not_started: - ~chatnpc(neutral, "Greetings I am Hassan, Chancellor to the Emir of Al- Kharid."); + ~chatnpc("Greetings I am Hassan, Chancellor to the Emir of Al- Kharid."); def_int $option = ~p_choice3("Can I help you? You must need some help here in the desert.", 1, "It's just too hot here. How can you stand it?", 2, "Do you mind if I just kill your warriors?", 3); if($option = 1) { - ~chatplayer(happy, "Can I help you? You must need some help here in the desert."); - ~chatnpc(neutral, "I need the services of someone, yes. If you are interested, see the spymaster, Osman. I manage the finances here. Come to me when you need payment."); + ~chatplayer("Can I help you? You must need some help here in the desert."); + ~chatnpc("I need the services of someone, yes. If you are interested, see the spymaster, Osman. I manage the finances here. Come to me when you need payment."); %prince_progress = ^prince_started; ~send_quest_progress(questlist:prince, %prince_progress, ^prince_complete); } else if($option = 2) { - ~chatplayer(sad, "It's just too hot here. How can you stand it?"); - ~chatnpc(neutral, "We manage, in our humble way. We are a wealthy town and we have water. It cures many thirsts."); + ~chatplayer("It's just too hot here. How can you stand it?"); + ~chatnpc("We manage, in our humble way. We are a wealthy town and we have water. It cures many thirsts."); if(inv_freespace(inv) ! 0) { inv_add(inv, jug_of_water, 1); ~objboxb(jug_of_water, "The chancellor hands you some water."); } } else if($option = 3) { - ~chatplayer(quiz, "Do you mind if I just kill your warriors?"); - ~chatnpc(neutral, "You are welcome. They are not expensive. We have them here to stop the elite guard being bothered. They are a little harder to kill."); + ~chatplayer("Do you mind if I just kill your warriors?"); + ~chatnpc("You are welcome. They are not expensive. We have them here to stop the elite guard being bothered. They are a little harder to kill."); } - case ^prince_started: ~chatnpc(quiz, "Have you found the spymaster, Osman, yet? You cannot proceed in your task without reporting to him."); - case ^prince_spoken_osman: ~chatnpc(happy, "I understand the Spymaster has hired you. I will pay the reward only when the Prince is rescued."); + case ^prince_started: ~chatnpc("Have you found the spymaster, Osman, yet? You cannot proceed in your task without reporting to him."); + case ^prince_spoken_osman: ~chatnpc("I understand the Spymaster has hired you. I will pay the reward only when the Prince is rescued."); case ^prince_saved: - ~chatnpc(happy, "You have the eternal gratitude of the Emir for rescuing his son. I am authorised to pay you 700 coins."); + ~chatnpc("You have the eternal gratitude of the Emir for rescuing his son. I am authorised to pay you 700 coins."); queue(prince_complete, 0); case ^prince_complete: //https://web.archive.org/web/20060428031722/http://www.runecrypt.com/index.php?pid=202 - ~chatnpc(happy, "You are a friend of the town of Al-Kharid.|If we have more tasks to complete, we will ask you.|Please, keep in contact.|Good employees are not easy to find."); - case default: ~chatnpc(happy, "I see you are getting on well with the rescue. Obtaining a key must have saved you some time."); + ~chatnpc("You are a friend of the town of Al-Kharid.|If we have more tasks to complete, we will ask you.|Please, keep in contact.|Good employees are not easy to find."); + case default: ~chatnpc("I see you are getting on well with the rescue. Obtaining a key must have saved you some time."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_alkharid/scripts/kebab_seller.rs2 b/data/src/scripts/areas/area_alkharid/scripts/kebab_seller.rs2 index 004f06444..6f5f66a2c 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/kebab_seller.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/kebab_seller.rs2 @@ -1,15 +1,15 @@ [opnpc1,kebab_seller] -~chatnpc(quiz, "Would you like to buy a nice kebab? Only one gold."); +~chatnpc("Would you like to buy a nice kebab? Only one gold."); @multi2("I think I'll give it a miss.", kebab_seller_miss, "Yes please.", kebab_seller_buy); [label,kebab_seller_miss] -~chatplayer(neutral, "I think I'll give it a miss."); +~chatplayer("I think I'll give it a miss."); [label,kebab_seller_buy] -~chatplayer(neutral, "Yes please."); +~chatplayer("Yes please."); if(inv_total(inv, coins) < 1) { - ~chatplayer(sad, "Oops, I forgot to bring any money with me."); - ~chatnpc(neutral, "Come back when you have some."); + ~chatplayer("Oops, I forgot to bring any money with me."); + ~chatnpc("Come back when you have some."); return; } inv_del(inv, coins, 1); diff --git a/data/src/scripts/areas/area_alkharid/scripts/louie_legs.rs2 b/data/src/scripts/areas/area_alkharid/scripts/louie_legs.rs2 index e5979b81b..b5bda92ca 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/louie_legs.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/louie_legs.rs2 @@ -1,10 +1,10 @@ [opnpc1,louie_legs] -~chatnpc(neutral, "Hey, wanna buy some armour?"); +~chatnpc("Hey, wanna buy some armour?"); def_int $option = ~p_choice2("What have you got?", 1, "No thank you.", 2); if($option = 1) { - ~chatplayer(neutral, "What have you got?"); - ~chatnpc(happy, "I provide items to help you keep your legs!"); + ~chatplayer("What have you got?"); + ~chatnpc("I provide items to help you keep your legs!"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } diff --git a/data/src/scripts/areas/area_alkharid/scripts/osman.rs2 b/data/src/scripts/areas/area_alkharid/scripts/osman.rs2 index 6b105c75b..3b6292d3d 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/osman.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/osman.rs2 @@ -3,136 +3,136 @@ switch_int (%prince_progress) { case ^prince_not_started: @osman_prequest; case ^prince_started: @osman_instructions; case ^prince_spoken_osman: @osman_items; - case ^prince_prep_finished,^prince_prep_finished,^prince_guard_drunk,^prince_tied_keli: ~chatnpc(shifty, "I hear from Leela that you are well on the way with the rescue. I am always kept informed, you know."); - case ^prince_saved: ~chatnpc(shifty, "The prince is safe and on his way home with Leela.|You can pick up your payment from the chancellor."); - case ^prince_complete: ~chatnpc(shifty, "Well done, A great rescue.|I will remember you if I have anything dangerous to do."); + case ^prince_prep_finished,^prince_prep_finished,^prince_guard_drunk,^prince_tied_keli: ~chatnpc("I hear from Leela that you are well on the way with the rescue. I am always kept informed, you know."); + case ^prince_saved: ~chatnpc("The prince is safe and on his way home with Leela.|You can pick up your payment from the chancellor."); + case ^prince_complete: ~chatnpc("Well done, A great rescue.|I will remember you if I have anything dangerous to do."); } [label,osman_prequest] -~chatnpc(shifty, "Hello, I am Osman. With what can I assist you?"); +~chatnpc("Hello, I am Osman. With what can I assist you?"); def_int $option = ~p_choice3("You don't seem very tough. Who are you?", 1, "I hear wild rumours about a prince.", 2, "I am just being nosy.", 3); if($option = 1) { - ~chatplayer(neutral, "You don't seem very tough. Who are you?"); - ~chatnpc(shifty, "I am in the employ of the Emir.|That is all you need to know."); + ~chatplayer("You don't seem very tough. Who are you?"); + ~chatnpc("I am in the employ of the Emir.|That is all you need to know."); } else if($option = 2) { - ~chatplayer(neutral, "I hear wild rumours about a prince."); - ~chatnpc(shifty, "The prince is not here. He is...away.|If you can be trusted, speak to the chancellor, Hassan."); + ~chatplayer("I hear wild rumours about a prince."); + ~chatnpc("The prince is not here. He is...away.|If you can be trusted, speak to the chancellor, Hassan."); } else if($option = 3) { - ~chatplayer(shifty, "I am just being nosy."); - ~chatnpc(shifty, "That bothers me not.|The secrets of Al-Kharid protect themselves."); + ~chatplayer("I am just being nosy."); + ~chatnpc("That bothers me not.|The secrets of Al-Kharid protect themselves."); } [label,osman_instructions] -~chatplayer(neutral, "The chancellor trusts me. I have come for instructions."); -~chatnpc(shifty, "Our prince is captive by the Lady Keli.|We just need to make the rescue.|There are two things we need you to do."); +~chatplayer("The chancellor trusts me. I have come for instructions."); +~chatnpc("Our prince is captive by the Lady Keli.|We just need to make the rescue.|There are two things we need you to do."); def_int $option = ~p_choice2("What is the first thing I must do?", 1, "What is the second thing you need?", 2); if($option = 1) { - ~chatplayer(neutral, "What is the first thing I must do?"); + ~chatplayer("What is the first thing I must do?"); @osman_first_thing; } else if($option = 2) { - ~chatplayer(neutral, "What is the second thing you need?"); + ~chatplayer("What is the second thing you need?"); @osman_second_thing; } [label,osman_first_thing] -~chatnpc(shifty, "The prince is guarded by some stupid guards and a clever woman. The woman is our only way to get the prince out. Only she can walk freely about the area."); -~chatnpc(shifty, "I think you will need to tie her up.|One coil of rope should do for that.|Then, disguise the prince as her to get him out without suspicion."); -~chatplayer(neutral, "How good must the disguise be?"); -~chatnpc(shifty, "Only enough to fool the guards at a distance.|Get a skirt like hers. Same colour, same style.|We will only have a short time."); -~chatnpc(shifty, "Get a blonde wig, too. That is up to you to make or find. Something to colour the skin of the prince."); -~chatnpc(shifty, "My daughter and top spy, Leela, can help you. She has sent word that she has discovered where they are keeping the prince."); -~chatnpc(shifty, "It's near Draynor Village. She is lurking somewhere near there now."); +~chatnpc("The prince is guarded by some stupid guards and a clever woman. The woman is our only way to get the prince out. Only she can walk freely about the area."); +~chatnpc("I think you will need to tie her up.|One coil of rope should do for that.|Then, disguise the prince as her to get him out without suspicion."); +~chatplayer("How good must the disguise be?"); +~chatnpc("Only enough to fool the guards at a distance.|Get a skirt like hers. Same colour, same style.|We will only have a short time."); +~chatnpc("Get a blonde wig, too. That is up to you to make or find. Something to colour the skin of the prince."); +~chatnpc("My daughter and top spy, Leela, can help you. She has sent word that she has discovered where they are keeping the prince."); +~chatnpc("It's near Draynor Village. She is lurking somewhere near there now."); def_int $option = ~p_choice3("Explain the first thing again.", 1, "What is the second thing you need?", 2, "Okay, I better go find some things.", 3); if($option = 1) { - ~chatplayer(neutral, "What is the first thing I must do?"); + ~chatplayer("What is the first thing I must do?"); @osman_first_thing; } else if($option = 2) { - ~chatplayer(neutral, "What is the second thing you need?"); + ~chatplayer("What is the second thing you need?"); @osman_second_thing; } else { @osman_better_go; } [label,osman_second_thing] -~chatnpc(shifty, "We need the key, or we need a copy made.|If you can get some soft clay then you can copy the key..."); -~chatnpc(shifty, "...If you can convince Lady Keli to show it to you|for a moment. She is very boastful.|It should not be too hard."); -~chatnpc(shifty, "Bring the imprint to me, with a bar of bronze."); +~chatnpc("We need the key, or we need a copy made.|If you can get some soft clay then you can copy the key..."); +~chatnpc("...If you can convince Lady Keli to show it to you|for a moment. She is very boastful.|It should not be too hard."); +~chatnpc("Bring the imprint to me, with a bar of bronze."); def_int $option = ~p_choice3("What is the first thing I must do?", 1, "What exactly is the second thing you need?", 2, "Okay, I better go find some things.", 3); if($option = 1) { - ~chatplayer(neutral, "What is the first thing I must do?"); + ~chatplayer("What is the first thing I must do?"); @osman_first_thing; } else if($option = 2) { - ~chatplayer(neutral, "What exactly is the second thing you need?"); + ~chatplayer("What exactly is the second thing you need?"); @osman_second_thing; } else { @osman_better_go; } [label,osman_better_go] -~chatplayer(neutral, "Okay, I had better go find some things."); -~chatnpc(shifty, "May good luck travel with you. Don't forget to find Leela. It can't be done without her help."); +~chatplayer("Okay, I had better go find some things."); +~chatnpc("May good luck travel with you. Don't forget to find Leela. It can't be done without her help."); %prince_progress = ^prince_spoken_osman; [label,osman_items] if(%prince_keystatus = ^prince_keyclaimed & ~obj_gettotal(bronze_key) = 0) { // guessed mesanims, dialogue from chisel (can't find any video) - ~chatplayer(sad, "I'm afraid I lost that key you gave me."); - ~chatnpc(angry, "Foolish ! A new key will cost 15gp."); + ~chatplayer("I'm afraid I lost that key you gave me."); + ~chatnpc("Foolish ! A new key will cost 15gp."); if(inv_total(inv, coins) < 15) { - ~chatplayer(sad, "I haven't got 15 coins with me."); - ~chatnpc(neutral, "Then come back to me when you do."); + ~chatplayer("I haven't got 15 coins with me."); + ~chatnpc("Then come back to me when you do."); } - ~chatplayer(neutral, "Here, I have 15gp."); + ~chatplayer("Here, I have 15gp."); inv_del(inv, coins, 15); %prince_keystatus = ^prince_keymade; ~mesbox("That is good. I will have another key made. You may collect it from Leela."); } else if(%prince_keystatus = 0 & inv_total(inv, key_print) >= 1 & inv_total(inv, bronze_bar) >= 1) { - ~chatnpc(shifty, "Well done; we can make the key now."); + ~chatnpc("Well done; we can make the key now."); inv_del(inv, key_print, 1); inv_del(inv, bronze_bar, 1); %prince_keystatus = ^prince_keymade; ~mesbox("Osman takes the key imprint and the bronze bar."); - ~chatnpc(shifty, "Pick the key up from Leela."); + ~chatnpc("Pick the key up from Leela."); @multi2("Thank you. I will try to find the other items.", osman_other_items, "Can you tell me what I still need to get?", osman_still_need); } else { @osman_still_need; } [label,osman_still_need] -~chatplayer(neutral, "Can you tell me what I still need to get?"); +~chatplayer("Can you tell me what I still need to get?"); if(%prince_progress >= ^prince_prep_finished) { if(inv_total(inv, bronze_key) > 0) { - ~chatnpc(shifty, "You have the key, good."); // RSC + ~chatnpc("You have the key, good."); // RSC } else { - ~chatnpc(shifty, "You can collect the key from Leela."); + ~chatnpc("You can collect the key from Leela."); } } else { - ~chatnpc(shifty, "A print of the key in soft clay and a bronze bar.|Then, collect the key from Leela."); + ~chatnpc("A print of the key in soft clay and a bronze bar.|Then, collect the key from Leela."); } if(inv_total(inv, wig_blonde) >= 1) { - ~chatnpc(shifty, "The wig you have got, well done."); + ~chatnpc("The wig you have got, well done."); } else { - ~chatnpc(shifty, "You need to make a blonde wig somehow. Leela may help."); + ~chatnpc("You need to make a blonde wig somehow. Leela may help."); } if(inv_total(inv, pink_skirt) >= 1) { - ~chatnpc(shifty, "You have got the skirt, good."); + ~chatnpc("You have got the skirt, good."); } else { - ~chatnpc(shifty, "You will need a skirt that looks the same as Keli's"); + ~chatnpc("You will need a skirt that looks the same as Keli's"); } if(inv_total(inv, paste) >= 1) { - ~chatnpc(shifty, "You have the skin paint, well done.|I thought you would struggle to make that."); + ~chatnpc("You have the skin paint, well done.|I thought you would struggle to make that."); } else { - ~chatnpc(shifty, "Something to make the prince's skin appear lighter."); + ~chatnpc("Something to make the prince's skin appear lighter."); } if(inv_total(inv, rope) >= 1) { - ~chatnpc(shifty, "Yes, you have the rope."); + ~chatnpc("Yes, you have the rope."); } else { - ~chatnpc(shifty, "A rope with which to tie Keli up."); + ~chatnpc("A rope with which to tie Keli up."); } -~chatnpc(shifty, "Once you have everything, go to Leela.|She must be ready to get the prince away."); +~chatnpc("Once you have everything, go to Leela.|She must be ready to get the prince away."); [label,osman_other_items] -~chatplayer(neutral, "Thank you. I will try to find the other items."); +~chatplayer("Thank you. I will try to find the other items."); [opnpcu,osman] if(%prince_progress = ^prince_spoken_osman & (last_useitem = bronze_bar | last_useitem = key_print)) { diff --git a/data/src/scripts/areas/area_alkharid/scripts/ranael.rs2 b/data/src/scripts/areas/area_alkharid/scripts/ranael.rs2 index 4bc9ae5b2..c9c4e6c4f 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/ranael.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/ranael.rs2 @@ -1,9 +1,9 @@ [opnpc1,ranael] -~chatnpc(neutral, "Do you want to buy any armoured skirts?|Designed especially for ladies who like to fight."); +~chatnpc("Do you want to buy any armoured skirts?|Designed especially for ladies who like to fight."); def_int $option = ~p_choice2("Yes please.", 1, "No thank you, that's not my scene.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you, that's not my scene."); + ~chatplayer("No thank you, that's not my scene."); } diff --git a/data/src/scripts/areas/area_alkharid/scripts/shantay.rs2 b/data/src/scripts/areas/area_alkharid/scripts/shantay.rs2 index 797a9bc18..09e387820 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/shantay.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/shantay.rs2 @@ -1,10 +1,10 @@ [opnpc1,shantay] if (%shantay_jail_progress = ^not_talked_to_shantay) { - ~chatnpc(neutral, "Hello effendi, I am Shantay."); - ~chatnpc(neutral, "I see you're new. Please read the billboard poster|before going into the desert. It'll give yer details on the|dangers you can face."); + ~chatnpc("Hello effendi, I am Shantay."); + ~chatnpc("I see you're new. Please read the billboard poster|before going into the desert. It'll give yer details on the|dangers you can face."); %shantay_jail_progress = ^talked_to_shantay; } else { - ~chatnpc(neutral, "Hello again friend. Please read the billboard poster|before going into the desert. It'll give yer details on the|dangers you can face."); + ~chatnpc("Hello again friend. Please read the billboard poster|before going into the desert. It'll give yer details on the|dangers you can face."); } @multi4("What is this place?", shantay_what_is_this_place, "Can I see what you have to sell please?", shantay_can_i_see_what_you_have_to_sell_please, "I must be going.", shantay_i_must_be_going, "I want to buy a shantay pass for 5 gold coins.", shantay_buy_shantay_pass); @@ -15,78 +15,78 @@ if (%shantay_jail_progress = ^not_talked_to_shantay) { [label,shantay_what_is_this_place] if (%shantay_jail_progress = ^put_in_shantay_jail) { %shantay_jail_progress = ^talked_to_shantay; - ~chatnpc(neutral,"You should be in jail! Well, no doubt the authorities in|Port Sarim know what they're doing. But if you get|into any more trouble, you'll be stuck back in jail."); + ~chatnpc("You should be in jail! Well, no doubt the authorities in|Port Sarim know what they're doing. But if you get|into any more trouble, you'll be stuck back in jail."); return; } -~chatplayer(neutral, "What is this place?"); -~chatnpc(neutral, "This is the pass of Shantay. I guard this area with my|men. I am responsible for keeping this pass open and|repaired."); -~chatnpc(neutral, "My men and I prevent outlaws from getting out of the|desert. And we stop the inexperienced from a dry death|in the sands. Which would you say you were?"); +~chatplayer("What is this place?"); +~chatnpc("This is the pass of Shantay. I guard this area with my|men. I am responsible for keeping this pass open and|repaired."); +~chatnpc("My men and I prevent outlaws from getting out of the|desert. And we stop the inexperienced from a dry death|in the sands. Which would you say you were?"); def_int $choice = ~p_choice3("I am definitely an outlaw, prepare to die!", 1, "I am a little inexperienced.", 2, "Er, neither, I'm an adventurer.", 3); if ($choice = 1) { - ~chatplayer(neutral, "I am definitely an outlaw, prepare to die!"); - ~chatnpc(neutral, "Ha, very funny....."); - ~chatnpc(neutral, "Guards arrest !"); + ~chatplayer("I am definitely an outlaw, prepare to die!"); + ~chatnpc("Ha, very funny....."); + ~chatnpc("Guards arrest !"); if_close; mes("The guards arrest you and place you in the jail."); p_delay(2); %shantay_jail_progress = ^put_in_shantay_jail; p_telejump(0_51_48_32_52); - ~chatnpc(neutral, "You'll have to stay in there until you pay the fine of|five gold pieces. Do you want to pay now?"); + ~chatnpc("You'll have to stay in there until you pay the fine of|five gold pieces. Do you want to pay now?"); @multi2("Yes, okay.", shantay_yes_okay_ill_pay_the_fine, "No thanks, you're not having my money.", shantay_no_thanks_youre_not_having_my_money); } if ($choice = 2) { - ~chatplayer(neutral, "I am a little inexperienced."); - ~chatnpc(neutral, "Can I recommend that you purchase a full waterskin|and a knife! These items will no doubt save your life. A|waterskin will keep water from evaporating in the desert."); - ~chatnpc(neutral, "And a keen woodsman with a knife can extract the juice|from a cactus. Before you go into the desert, it's|advisable to wear desert clothes. It's very hot in the|desert and you'll surely cook if you wear armour."); - ~chatnpc(neutral, "To keep the pass bandit free, we charge a small toll of|five gold pieces. You can buy a desert pass from me,|just ask me to open the shop. You can also use our|free banking services by clicking on the chest."); + ~chatplayer("I am a little inexperienced."); + ~chatnpc("Can I recommend that you purchase a full waterskin|and a knife! These items will no doubt save your life. A|waterskin will keep water from evaporating in the desert."); + ~chatnpc("And a keen woodsman with a knife can extract the juice|from a cactus. Before you go into the desert, it's|advisable to wear desert clothes. It's very hot in the|desert and you'll surely cook if you wear armour."); + ~chatnpc("To keep the pass bandit free, we charge a small toll of|five gold pieces. You can buy a desert pass from me,|just ask me to open the shop. You can also use our|free banking services by clicking on the chest."); } if ($choice = 3) { - ~chatplayer(neutral, "Er, neither, I'm an adventurer."); - ~chatnpc(neutral, "Great, I have just the thing for the desert adventurer.|I sell desert clothes which will keep you cool in the heat|of the desert. I also sell waterskins so that you won't|die in the desert."); - ~chatnpc(neutral, "A waterskin and a knife help you survive from the juice|of a cactus. Use the chest to store your items, we'll take|them to the bank. It's hot in the desert, you'll bake in|all that armour."); - ~chatnpc(neutral, "To keep the pass open we ask for 5 gold pieces. And|we give you a Shantay Pass, just ask to see what I sell|to buy one."); + ~chatplayer("Er, neither, I'm an adventurer."); + ~chatnpc("Great, I have just the thing for the desert adventurer.|I sell desert clothes which will keep you cool in the heat|of the desert. I also sell waterskins so that you won't|die in the desert."); + ~chatnpc("A waterskin and a knife help you survive from the juice|of a cactus. Use the chest to store your items, we'll take|them to the bank. It's hot in the desert, you'll bake in|all that armour."); + ~chatnpc("To keep the pass open we ask for 5 gold pieces. And|we give you a Shantay Pass, just ask to see what I sell|to buy one."); } @multi3("Can I See what you have to sell please?", shantay_can_i_see_what_you_have_to_sell_please, "I must be going.", shantay_i_must_be_going, "Why do I have to pay to go into the desert?", shantay_pay_for_desert); [label,shantay_pay_for_desert] -~chatplayer(neutral, "Why do I have to pay to go into the desert?"); +~chatplayer("Why do I have to pay to go into the desert?"); if_close; mes("Shantay opens his arms wide as if to embrace you."); p_delay(3); -~chatnpc(neutral, "Effendi, you insult me! I am not interested in making|a profit from you! I merely seek to cover my expenses|in keeping this pass open."); -~chatnpc(neutral, "There is repair work to carry out and also the men's|wages to consider. For the paltry sum of 5 Gold pieces,|I think we offer a great service."); +~chatnpc("Effendi, you insult me! I am not interested in making|a profit from you! I merely seek to cover my expenses|in keeping this pass open."); +~chatnpc("There is repair work to carry out and also the men's|wages to consider. For the paltry sum of 5 Gold pieces,|I think we offer a great service."); @multi2("Can I see what you have to sell please?", shantay_can_i_see_what_you_have_to_sell_please, "I must be going.", shantay_i_must_be_going); [label,shantay_ill_pay_the_fine] -~chatplayer(neutral, "I'll pay the fine."); +~chatplayer("I'll pay the fine."); // comma is NOT a typo, its from osrs // Message(type = DIALOG, text = "Shantay|Okay then..., you'll need access to your bank.") -~chatnpc(neutral, "Okay then..., you'll need access to your bank."); +~chatnpc("Okay then..., you'll need access to your bank."); @openbank; [label,shantay_no_thanks_youre_not_having_my_money] -~chatplayer(neutral, "No thanks, you're not having my money."); +~chatplayer("No thanks, you're not having my money."); // https://storage.googleapis.com/tannerdino/images/rstransport13.gif -~chatnpc(neutral, "You have a choice.|You can either pay five gold pieces or...|You can be transported to a maximum security prison|in Port Sarim."); -~chatnpc(neutral, "Will you pay the five gold pieces?"); +~chatnpc("You have a choice.|You can either pay five gold pieces or...|You can be transported to a maximum security prison|in Port Sarim."); +~chatnpc("Will you pay the five gold pieces?"); def_int $choice = ~p_choice2("Yes, okay.", 1, "No, do your worst!", 2); if ($choice = 1) { @shantay_ill_pay_the_fine; } -~chatnpc(neutral, "You are to be transported to a maximum security|prison in Port Sarim. I hope you've learnt an important|lesson from this."); +~chatnpc("You are to be transported to a maximum security|prison in Port Sarim. I hope you've learnt an important|lesson from this."); @shantay_send_player_to_port_sarim; [label,shantay_yes_okay_ill_pay_the_fine] -~chatplayer(neutral, "Yes, okay."); -~chatnpc(neutral, "Good, I see that you have come to your senses."); +~chatplayer("Yes, okay."); +~chatnpc("Good, I see that you have come to your senses."); if (inv_total(inv, coins) < 5) { - ~chatnpc(neutral, "You don't have that kind of cash on you I see."); + ~chatnpc("You don't have that kind of cash on you I see."); if (inv_total(bank, coins) >= 5) { - ~chatnpc(neutral, "But perhaps you have some in your bank? Or would you prefer the maximum security prison in Port Sarim."); - ~chatnpc(neutral, "Which is it going to be?"); + ~chatnpc("But perhaps you have some in your bank? Or would you prefer the maximum security prison in Port Sarim."); + ~chatnpc("Which is it going to be?"); @multi2("I'll pay the fine.", shantay_ill_pay_the_fine, "No thanks, you're not having my money.", shantay_no_thanks_youre_not_having_my_money); } @shantay_send_player_to_port_sarim; @@ -94,7 +94,7 @@ if (inv_total(inv, coins) < 5) { inv_del(inv, coins, 5); %shantay_jail_progress = ^paid_shantay_jail_fine; mes("You hand over five gold pieces to Shantay."); -~chatnpc(neutral, "Great Effendi, now please try to keep the peace."); +~chatnpc("Great Effendi, now please try to keep the peace."); mes("Shantay unlocks the door to the cell."); @@ -104,23 +104,23 @@ p_telejump(0_47_49_9_46); facesquare(movecoord(coord, -1, 0, 0)); [label,shantay_can_i_see_what_you_have_to_sell_please] -~chatplayer(neutral, "Can I see what you have to sell please?"); -~chatnpc(neutral, "Absolutely Effendi!"); +~chatplayer("Can I see what you have to sell please?"); +~chatnpc("Absolutely Effendi!"); ~require_members_feature; // guess ~openshop_activenpc; [label,shantay_i_must_be_going] -~chatplayer(neutral, "I must be going."); -~chatnpc(neutral, "So long..."); +~chatplayer("I must be going."); +~chatnpc("So long..."); [label,shantay_buy_shantay_pass] if (map_members = false) { - ~chatnpc(neutral, "Sorry effendi, I can't offer this service right now."); + ~chatnpc("Sorry effendi, I can't offer this service right now."); ~require_members_feature; // guess } -~chatplayer(neutral, "I want to buy a shantay pass for 5 gold coins."); +~chatplayer("I want to buy a shantay pass for 5 gold coins."); if (inv_total(inv, coins) < 5) { - ~chatnpc(neutral, "Sorry friend, the Shantay Pass is 5 gold coins. You|don't seem to have enough money!"); + ~chatnpc("Sorry friend, the Shantay Pass is 5 gold coins. You|don't seem to have enough money!"); return; } inv_add(inv, shantay_pass, 1); diff --git a/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 b/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 index 80fb7c2ad..b9e05b66d 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/shantay_pass.rs2 @@ -2,19 +2,19 @@ // though most of this dialogue has rsc relics (mes's instead of mesbox's) // the "What is this place?" is forsure pre tourist trap rework. https://web.archive.org/web/20051117094041/http://runehq.com/RHQSpecialReportsView.php?id=00523 [opnpc1,shantay_guard] -~chatnpc(neutral, "Go talk to Shantay. I'm on duty and I don't have time to talk to the likes of you!"); +~chatnpc("Go talk to Shantay. I'm on duty and I don't have time to talk to the likes of you!"); ~mesbox("The guard seems quite bad tempered, probably from having to wear heavy armour in this intense heat."); [opnpc1,shantay_pass_guard] -~chatnpc(neutral, "Hello there! What can I do for you?"); +~chatnpc("Hello there! What can I do for you?"); def_int $choice = ~p_choice2("I'd like to go into the desert please.", 1, "Nothing thanks.", 2); if ($choice = 2) { - ~chatplayer(neutral, "Nothing thanks."); + ~chatplayer("Nothing thanks."); return; } -~chatplayer(neutral, "I'd like to go into the desert please."); +~chatplayer("I'd like to go into the desert please."); if (inv_total(inv, shantay_pass) < 1) { - ~chatnpc(neutral, "You need a Shantay pass to get through this gate. See|Shantay, he will sell you one for a very reasonable|price."); + ~chatnpc("You need a Shantay pass to get through this gate. See|Shantay, he will sell you one for a very reasonable|price."); return; } ~require_members_gate; // guess @@ -28,13 +28,13 @@ if (inv_total(inv, shantay_disclaimer) < 1) { return; } } -~chatnpc(neutral, "Can I see your Shantay Desert Pass please."); +~chatnpc("Can I see your Shantay Desert Pass please."); ~objboxt(shantay_pass, "You hand over a Shantay Pass."); -~chatplayer(neutral, "Sure, here you go!"); +~chatplayer("Sure, here you go!"); inv_del(inv, shantay_pass, 1); if (inv_total(inv, shantay_disclaimer) < 1) { inv_add(inv, shantay_disclaimer, 1); - ~chatnpc(neutral, "Here, have a disclaimer... It means that Shantay isn't|responsible if you die in the desert."); + ~chatnpc("Here, have a disclaimer... It means that Shantay isn't|responsible if you die in the desert."); } if_close; p_teleport(0_51_48_40_46); @@ -50,10 +50,10 @@ def_boolean $is_inside = ~check_axis_locactive(coord); if (%shantay_jail_progress = ^put_in_shantay_jail & npc_find(coord, shantay, 12, 0) = true) { if ($is_inside = false) { %shantay_jail_progress = ^paid_shantay_jail_fine; - ~chatnpc(neutral, "You should be in jail! Well, no doubt the authorities in|Port Sarim know what they're doing. But if you get|into any more trouble, you'll be stuck back in jail."); + ~chatnpc("You should be in jail! Well, no doubt the authorities in|Port Sarim know what they're doing. But if you get|into any more trouble, you'll be stuck back in jail."); return; } - ~chatnpc(neutral, "If you want to be let out, you have to pay a fine of five gold. Do you want to pay now?"); + ~chatnpc("If you want to be let out, you have to pay a fine of five gold. Do you want to pay now?"); @multi2("Yes, okay.", shantay_yes_okay_ill_pay_the_fine, "No thanks, you're not having my money.", shantay_no_thanks_youre_not_having_my_money); } @@ -71,7 +71,7 @@ if (npc_find(coord, shantay_pass_guard, 5, 0) = false) { return; } if (inv_total(inv, shantay_pass) < 1) { - ~chatnpc(neutral, "You need a Shantay pass to get through this gate. See|Shantay, he will sell you one for a very reasonable|price."); + ~chatnpc("You need a Shantay pass to get through this gate. See|Shantay, he will sell you one for a very reasonable|price."); return; } //https://youtu.be/VXwMnz9tTUs @@ -84,13 +84,13 @@ if (inv_total(inv, shantay_disclaimer) < 1) { return; } } -~chatnpc(neutral, "Can I see your Shantay Desert Pass please."); +~chatnpc("Can I see your Shantay Desert Pass please."); ~objboxt(shantay_pass, "You hand over a Shantay Pass."); -~chatplayer(neutral, "Sure, here you go!"); +~chatplayer("Sure, here you go!"); inv_del(inv, shantay_pass, 1); if (inv_total(inv, shantay_disclaimer) < 1) { inv_add(inv, shantay_disclaimer, 1); - ~chatnpc(neutral, "Here, have a disclaimer... It means that Shantay isn't|responsible if you die in the desert."); + ~chatnpc("Here, have a disclaimer... It means that Shantay isn't|responsible if you die in the desert."); } if_close; facesquare(movecoord(coord, 0, 0, -3)); diff --git a/data/src/scripts/areas/area_alkharid/scripts/silk_trader.rs2 b/data/src/scripts/areas/area_alkharid/scripts/silk_trader.rs2 index 15204fb71..a65514c32 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/silk_trader.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/silk_trader.rs2 @@ -1,22 +1,22 @@ // dialogue taken from osrs [opnpc1,silk_trader] -~chatnpc(neutral, "Do you want to buy any fine silks?"); +~chatnpc("Do you want to buy any fine silks?"); def_int $choice = ~p_choice2("How much are they?", 1, "No. Silk doesn't suit me.", 2); if ($choice = 2) { - ~chatplayer(neutral, "No. Silk doesn't suit me."); + ~chatplayer("No. Silk doesn't suit me."); return; } -~chatplayer(neutral, "How much are they?"); -~chatnpc(neutral, "3 gp."); +~chatplayer("How much are they?"); +~chatnpc("3 gp."); $choice = ~p_choice2("No. That's too much for me", 1, "Okay, that sounds good.", 2); if ($choice = 2) { - ~chatplayer(neutral, "Okay, that sounds good."); + ~chatplayer("Okay, that sounds good."); if (inv_total(inv, coins) < 3) { - ~chatplayer(sad, "Oh dear. I don't have enough money."); - ~chatnpc(angry, "Well, come back when you do have some money!"); + ~chatplayer("Oh dear. I don't have enough money."); + ~chatnpc("Well, come back when you do have some money!"); return; } ~objbox(silk, "You buy some silk for 3 gp."); @@ -25,22 +25,22 @@ if ($choice = 2) { return; } -~chatplayer(neutral, "No. That's too much for me."); -~chatnpc(quiz, "2 gp and that's as low as I'll go."); -~chatnpc(sad, "I'm not selling it for any less. You'll probably go and|sell it in Varrock for a profit, anyway."); +~chatplayer("No. That's too much for me."); +~chatnpc("2 gp and that's as low as I'll go."); +~chatnpc("I'm not selling it for any less. You'll probably go and|sell it in Varrock for a profit, anyway."); $choice = ~p_choice2("2 gp sounds good.", 1, "No, really. I don't want it.", 2); if ($choice = 2) { - ~chatplayer(neutral, "No, really. I don't want it."); - ~chatnpc(neutral, "Okay, but that's the best price you're going to get."); + ~chatplayer("No, really. I don't want it."); + ~chatnpc("Okay, but that's the best price you're going to get."); return; } -~chatplayer(neutral, "2 gp sounds good."); +~chatplayer("2 gp sounds good."); if (inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear. I don't have enough money."); - ~chatnpc(angry, "Well, come back when you do have some money!"); + ~chatplayer("Oh dear. I don't have enough money."); + ~chatnpc("Well, come back when you do have some money!"); return; } ~objbox(silk, "You buy some silk for 2 gp."); diff --git a/data/src/scripts/areas/area_alkharid/scripts/tanner.rs2 b/data/src/scripts/areas/area_alkharid/scripts/tanner.rs2 index 5b2b8fa38..e0f5889ef 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/tanner.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/tanner.rs2 @@ -3,39 +3,39 @@ if(inv_total(inv, trail_clue_easy_simple_exp008) = 1) { @trail_tanner; } -~chatnpc(happy, "Greetings friend. I am a manufacturer of leather."); +~chatnpc("Greetings friend. I am a manufacturer of leather."); def_int $total = calc(inv_total(inv, cow_hide) + inv_total(inv, dragonhide_green) + inv_total(inv, dragonhide_blue) + inv_total(inv, dragonhide_red) + inv_total(inv, dragonhide_black)); if($total > 0) { if ($total = 1) { - ~chatnpc(default, "I see you have brought me a hide.|Would you like me to tan it for you?"); + ~chatnpc("I see you have brought me a hide.|Would you like me to tan it for you?"); } else { - ~chatnpc(default, "I see you have brought me some hides.|Would you like me to tan them for you?"); + ~chatnpc("I see you have brought me some hides.|Would you like me to tan them for you?"); } switch_int(~p_choice2_header("Yes please.", 1, "No thanks.", 2, "What would you like to say?")) { case 1 : @tan_leather_choices; case 2 : - ~chatplayer(happy, "No thanks."); - ~chatnpc(happy, text_gender("Very well, sir, as you wish.", "Very well, madam, as you wish.")); + ~chatplayer("No thanks."); + ~chatnpc(text_gender("Very well, sir, as you wish.", "Very well, madam, as you wish.")); return; } } switch_int (~p_choice2_header("Can I buy some leather then?", 1, "Leather is rather weak stuff.", 2, "What would you like to say?")) { case 1 : - ~chatplayer(quiz, "Can I buy some leather then?"); - ~chatnpc(happy, "I make leather from animal hides. Bring me some|cowhides and one gold coin per hide, and I'll tan them|into soft leather for you."); + ~chatplayer("Can I buy some leather then?"); + ~chatnpc("I make leather from animal hides. Bring me some|cowhides and one gold coin per hide, and I'll tan them|into soft leather for you."); case 2 : - ~chatplayer(default, "Leather is rather weak stuff."); - ~chatnpc(happy, "Normal leather may be quite weak, but it's very cheap - I make it from cowhides for only 1 gp per hide - and it's so easy to craft that anyone can work with it."); - ~chatnpc(happy, "Alternatively you could try hard leather. It's not so easy to craft, but I only charge 3 gp per cowhide to prepare it, and it makes much sturdier armour."); - ~chatnpc(default, "I can also tan dragonhides, suitable for crafting into the highest quality armour for rangers."); - ~chatplayer(happy, "Thanks, I'll bear it in mind."); + ~chatplayer("Leather is rather weak stuff."); + ~chatnpc("Normal leather may be quite weak, but it's very cheap - I make it from cowhides for only 1 gp per hide - and it's so easy to craft that anyone can work with it."); + ~chatnpc("Alternatively you could try hard leather. It's not so easy to craft, but I only charge 3 gp per cowhide to prepare it, and it makes much sturdier armour."); + ~chatnpc("I can also tan dragonhides, suitable for crafting into the highest quality armour for rangers."); + ~chatplayer("Thanks, I'll bear it in mind."); } [opnpcu,tanner] switch_obj(last_useitem) { case cow_hide, dragonhide_green, dragonhide_blue, dragonhide_red, dragonhide_black : @tan_leather_choices; - case leather, hardleather, dragon_leather, dragon_leather_blue, dragon_leather_red, dragon_leather_black : ~chatnpc(default, "Err... I have no use for that, I make the stuff!"); - case default : ~chatnpc(default, "Er... Thanks, but no thanks!"); + case leather, hardleather, dragon_leather, dragon_leather_blue, dragon_leather_red, dragon_leather_black : ~chatnpc("Err... I have no use for that, I make the stuff!"); + case default : ~chatnpc("Er... Thanks, but no thanks!"); } // https://web.archive.org/web/20040804232357/http://runehq.com/viewcityguide.php?id=00390 @@ -80,7 +80,7 @@ if (oc_members($hide) = true | oc_members($leather) = true) { } def_int $coins_total = inv_total(inv, coins); if ($coins_total < $cost) { - ~chatnpc(happy, "You don't have enough coins to tan these hides."); + ~chatnpc("You don't have enough coins to tan these hides."); @exit; } def_int $hides_total = calc(inv_total(inv, $hide)); @@ -93,7 +93,7 @@ inv_del(inv, coins, calc($hides_total * $cost)); inv_add(inv, $leather, $hides_total); [label,trail_tanner] -~chatnpc(quiz, "Here you go!"); +~chatnpc("Here you go!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp007, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_alkharid/scripts/zeke.rs2 b/data/src/scripts/areas/area_alkharid/scripts/zeke.rs2 index 45da4bf40..6b726e9d6 100644 --- a/data/src/scripts/areas/area_alkharid/scripts/zeke.rs2 +++ b/data/src/scripts/areas/area_alkharid/scripts/zeke.rs2 @@ -3,19 +3,19 @@ if(inv_total(inv, trail_clue_easy_simple_exp007) = 1) { @trail_zeke; } -~chatnpc(happy, "A thousand greetings, sir."); +~chatnpc("A thousand greetings, sir."); def_int $option = ~p_choice2("Do you want to trade?", 1, "Nice cloak.", 2); if($option = 1) { - ~chatplayer(quiz, "Do you want to trade?"); - ~chatnpc(happy, "Yes, certainly. I deal in scimitars."); + ~chatplayer("Do you want to trade?"); + ~chatnpc("Yes, certainly. I deal in scimitars."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Nice cloak."); - ~chatnpc(neutral, "Thank you."); + ~chatplayer("Nice cloak."); + ~chatnpc("Thank you."); } [label,trail_zeke] -~chatnpc("default", "Well done!"); +~chatnpc("Well done!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp007, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/aemad.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/aemad.rs2 index 40d67c7f9..944e92855 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/aemad.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/aemad.rs2 @@ -2,12 +2,12 @@ [opnpc1,kortan] @aemad_talk; [label,aemad_talk] -~chatnpc(happy, "Hello there. You've come to the right place if you're looking for adventurer's equipment."); +~chatnpc("Hello there. You've come to the right place if you're looking for adventurer's equipment."); def_int $option = ~p_choice2("Oh that sounds interesting.", 1, "No, I've come to the wrong place.", 2); if($option = 1) { - ~chatplayer(neutral, "Oh that sounds interesting."); + ~chatplayer("Oh that sounds interesting."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No, sorry, I've come to the wrong place."); - ~chatnpc(sad, "Hmph. Well, perhaps next time you'll need something from me?"); + ~chatplayer("No, sorry, I've come to the wrong place."); + ~chatnpc("Hmph. Well, perhaps next time you'll need something from me?"); } diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/ardounge_monk.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/ardounge_monk.rs2 index 8b34752f4..308c1b34a 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/ardounge_monk.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/ardounge_monk.rs2 @@ -2,6 +2,6 @@ switch_int (%drunkmonk_progress) { case ^drunkmonk_not_started: npc_say("Peace brother"); case ^drunkmonk_spoken_to_omad: npc_say("*yawn*"); - case ^drunkmonk_complete: ~chatnpc(drunk, "*hic* What a party! Wow!"); - case default: ~chatnpc(happy, "Can't wait for the party!"); + case ^drunkmonk_complete: ~chatnpc("*hic* What a party! Wow!"); + case default: ~chatnpc("Can't wait for the party!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/baker.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/baker.rs2 index 8a5b7ac73..fa2c01d3a 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/baker.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/baker.rs2 @@ -2,12 +2,12 @@ if (map_clock < %last_stolen_from_stall_baker) { @stall_owner_alert_guards; } -def_string $line = text_gender("Good day Sir. Would you like some nice freshly baked bread?", "Good day Madame. Would you like some nice freshly baked bread?"); -~chatnpc(happy, $line); +def_string $line = text_gender("Good day Sir. Would you like some nice freshly baked bread?", "Good day Madame. Would you like some nice freshly baked bread?"); +~chatnpc($line); def_int $option = ~p_choice2("Let's see what you have.", 1, "No thank you.", 2); if($option = 1) { ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/bartender.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/bartender.rs2 index e06762544..080e386af 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/bartender.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/bartender.rs2 @@ -1,7 +1,7 @@ [opnpc1,bartender_flyinghorse] -~chatnpc(quiz, "Would you like to buy a drink?"); -~chatplayer(quiz, "What do you serve?"); -~chatnpc(happy, "Beer!"); +~chatnpc("Would you like to buy a drink?"); +~chatplayer("What do you serve?"); +~chatnpc("Beer!"); def_int $option; if(testbit(%barcrawl_progress, ^flyinghorse_index) = false & inv_total(inv, barcrawl_card) > 0) { $option = ~p_choice3("I'll have a beer then.", 1, "I'll not have anything then.", 2, "I'm doing Alfred Grimhand's Barcrawl.", 3); @@ -10,17 +10,17 @@ if(testbit(%barcrawl_progress, ^flyinghorse_index) = false & inv_total(inv, barc } if($option = 1) { - ~chatplayer(happy, "I'll have a beer then."); - ~chatnpc(happy, "Ok, that'll be two coins."); + ~chatplayer("I'll have a beer then."); + ~chatnpc("Ok, that'll be two coins."); if (inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); return; } inv_del(inv, coins, 2); inv_add(inv, beer, 1); mes("You buy a pint of Beer."); } else if($option = 2) { - ~chatplayer(neutral, "I'll not have anything then."); + ~chatplayer("I'll not have anything then."); } else if($option = 3) { @flyinghorse_barcrawl; } @@ -31,10 +31,10 @@ if(testbit(%barcrawl_progress, ^flyinghorse_index) = false & last_useitem = barc } [label,flyinghorse_barcrawl] -~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(happy, "Fancy a bit of Heart Stopper then do you?|It'll only be 8 coins."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Fancy a bit of Heart Stopper then do you?|It'll only be 8 coins."); if(inv_total(inv, coins) < 8) { - ~chatplayer(sad, "Sorry, I don't have 8 coins."); + ~chatplayer("Sorry, I don't have 8 coins."); return; } if_close; diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/brother_cedric.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/brother_cedric.rs2 index 03b0aee5b..e9acffa35 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/brother_cedric.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/brother_cedric.rs2 @@ -5,72 +5,72 @@ switch_int (%drunkmonk_progress) { case ^drunkmonk_given_water: @cedric_fix_cart; case ^drunkmonk_fixing_cart: @cedric_get_wood; case ^drunkmonk_fixed_cart: @cedric_almost_done; - case ^drunkmonk_complete: ~chatnpc(happy, "Brother Omad sends you his thanks! He won't be in a fit state to thank you in person."); + case ^drunkmonk_complete: ~chatnpc("Brother Omad sends you his thanks! He won't be in a fit state to thank you in person."); case default: @cedric_default; } [label,cedric_default] -~chatplayer(neutral, "Hello."); -~chatnpc(drunk, "Honey, money, woman and wine!"); -~chatplayer(quiz, "Are you ok?"); -~chatnpc(drunk, "Yesshh...hic up...beautiful!"); -~chatplayer(neutral, "Take care old monk."); -~chatnpc(drunk, "La..di..da..hic..up!"); +~chatplayer("Hello."); +~chatnpc("Honey, money, woman and wine!"); +~chatplayer("Are you ok?"); +~chatnpc("Yesshh...hic up...beautiful!"); +~chatplayer("Take care old monk."); +~chatnpc("La..di..da..hic..up!"); mes("The old monk has had too much to drink."); [label,cedric_okay] -~chatplayer(quiz, "Brother Cedric are you okay?"); -~chatnpc(drunk, "Yeesshhh, I'm very, very drunk..hic..up.."); -~chatplayer(neutral, "Brother Omad needs the wine for the party."); -~chatnpc(sad, "Oh dear, oh dear, I knew I had to do something!"); -~chatnpc(sad, "Pleashhh, find me a jug of water. Once I'm sober I'll 'elp you take the wine back."); +~chatplayer("Brother Cedric are you okay?"); +~chatnpc("Yeesshhh, I'm very, very drunk..hic..up.."); +~chatplayer("Brother Omad needs the wine for the party."); +~chatnpc("Oh dear, oh dear, I knew I had to do something!"); +~chatnpc("Pleashhh, find me a jug of water. Once I'm sober I'll 'elp you take the wine back."); %drunkmonk_progress = ^drunkmonk_finding_water; [label,cedric_need_water] -~chatplayer(quiz, "Are you okay?"); -~chatnpc(drunk, "Hic up! Oh my head! I need a jug of water."); +~chatplayer("Are you okay?"); +~chatnpc("Hic up! Oh my head! I need a jug of water."); if(inv_total(inv, jug_of_water) >= 1) { - ~chatplayer(neutral, "Cedric! Here, drink! I have some water."); - ~chatnpc(drunk, "Good stuff, my head's spinning!"); + ~chatplayer("Cedric! Here, drink! I have some water."); + ~chatnpc("Good stuff, my head's spinning!"); sound_synth(liquid, 0, 0); npc_say("Gulp...gulp!"); ~objboxb(jug_of_water, "You hand the monk a jug of water."); - ~chatnpc(neutral, "Aah! That's better!"); + ~chatnpc("Aah! That's better!"); inv_del(inv, jug_of_water, 1); %drunkmonk_progress = ^drunkmonk_given_water; @cedric_fix_cart; } -~chatplayer(neutral, "I'll see if I can get some."); -~chatnpc(drunk, "Thanks! *hic*"); +~chatplayer("I'll see if I can get some."); +~chatnpc("Thanks! *hic*"); [label,cedric_fix_cart] -~chatnpc(neutral, "Now I just need to fix this cart and we can go party."); -~chatnpc(quiz, "Could you help?"); +~chatnpc("Now I just need to fix this cart and we can go party."); +~chatnpc("Could you help?"); def_int $option = ~p_choice2("No, I've helped enough monks today!", 1, "Yes, I'd be happy to!", 2); if($option = 1) { - ~chatplayer(angry, "No, I've helped enough monks today!"); - ~chatnpc(sad, "In that case I'd better drink more wine! It helps me think."); + ~chatplayer("No, I've helped enough monks today!"); + ~chatnpc("In that case I'd better drink more wine! It helps me think."); } else if ($option = 2) { - ~chatplayer(happy, "Yes, I'd be happy to!"); + ~chatplayer("Yes, I'd be happy to!"); %drunkmonk_progress = ^drunkmonk_fixing_cart; - ~chatnpc(happy, "Excellent, I just need some wood."); - ~chatplayer(happy, "OK, I'll see what I can find."); + ~chatnpc("Excellent, I just need some wood."); + ~chatplayer("OK, I'll see what I can find."); } [label,cedric_get_wood] -~chatnpc(quiz, "Did you manage to get some wood?"); +~chatnpc("Did you manage to get some wood?"); if(inv_total(inv, logs) >= 1) { ~objbox(logs, "You hand Cedric some logs."); - ~chatplayer(happy, "Here you go!"); - ~chatnpc(happy, "Well done! Now I'll fix this cart. You head back to Brother Omad and tell him I'll be there soon."); - ~chatplayer(happy, "Ok! I'll see you later!"); + ~chatplayer("Here you go!"); + ~chatnpc("Well done! Now I'll fix this cart. You head back to Brother Omad and tell him I'll be there soon."); + ~chatplayer("Ok! I'll see you later!"); inv_del(inv, logs, 1); %drunkmonk_progress = ^drunkmonk_fixed_cart; return; } -~chatplayer(neutral, "Not yet, I'm afraid."); +~chatplayer("Not yet, I'm afraid."); [label,cedric_almost_done] -~chatplayer(neutral, "Hello Cedric."); -~chatnpc(default, "Hi, I'm almost done here. Could you tell Omad that I'll be back soon?"); +~chatplayer("Hello Cedric."); +~chatnpc("Hi, I'm almost done here. Could you tell Omad that I'll be back soon?"); diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/brother_kojo.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/brother_kojo.rs2 index 9f80de9ac..9aae9b56a 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/brother_kojo.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/brother_kojo.rs2 @@ -1,13 +1,13 @@ [opnpc1,brother_kojo] if(inv_total(inv, trail_chart) > 0 & inv_total(inv, trail_sextant) > 0) { - ~chatplayer(happy, "Hello."); - ~chatnpc(happy, "Hello, traveller, how can I help?"); - ~chatplayer(neutral, "I'm trying to learn to be a navigator."); - ~chatnpc(sad, "I don't know if I can help you there."); - ~chatplayer(neutral, "The professor from the Observatory says that I need a watch."); - ~chatnpc("default", "Ah, that I can help you with. I've been thinkeing with this new idea of a watch and made a few. The problem is the villagers don't see the point as they have the Clock Tower!"); - ~chatplayer(neutral, "Can I have one?"); - ~chatnpc(happy, "You can have this one! It's the display model."); + ~chatplayer("Hello."); + ~chatnpc("Hello, traveller, how can I help?"); + ~chatplayer("I'm trying to learn to be a navigator."); + ~chatnpc("I don't know if I can help you there."); + ~chatplayer("The professor from the Observatory says that I need a watch."); + ~chatnpc("Ah, that I can help you with. I've been thinkeing with this new idea of a watch and made a few. The problem is the villagers don't see the point as they have the Clock Tower!"); + ~chatplayer("Can I have one?"); + ~chatnpc("You can have this one! It's the display model."); ~objbox(trail_watch, "Brother Kojo has given you a watch."); inv_add(inv, trail_watch, 1); return; diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/brother_omad.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/brother_omad.rs2 index 1b96ab7aa..136f5b732 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/brother_omad.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/brother_omad.rs2 @@ -10,109 +10,109 @@ switch_int (%drunkmonk_progress) { } [label,omad_whats_wrong] -~chatplayer(quiz, "Hello there, What's wrong?"); -~chatnpc(sad, "*yawn*...oh, hello...*yawn* I'm sorry! I'm just so tired! I haven't slept in a week!"); +~chatplayer("Hello there, What's wrong?"); +~chatnpc("*yawn*...oh, hello...*yawn* I'm sorry! I'm just so tired! I haven't slept in a week!"); switch_int (~p_choice2("Why can't you sleep, what's wrong?", 1, "Sorry! I'm too busy to hear your problems!", 2)) { case 1: @omad_why; - case 2: ~chatplayer(angry, "Sorry! I'm too busy to hear your problems!"); + case 2: ~chatplayer("Sorry! I'm too busy to hear your problems!"); } [label,omad_why] -~chatplayer(quiz, "Why can't you sleep, what's wrong?"); -~chatnpc(sad, "It's brother Androe's son! With his constant: Waaaaaah! Waaaaaaaaah! Androe said it's natural, but it's so annoying!"); -~chatplayer(happy, "I suppose that's what kids do."); -~chatnpc(sad, "He was fine, up until last week! Thieves broke in! They stole his favourite sleeping blanket!"); -~chatnpc(sad, "Now he won't rest until it's returned... ...and that means neither can I!"); +~chatplayer("Why can't you sleep, what's wrong?"); +~chatnpc("It's brother Androe's son! With his constant: Waaaaaah! Waaaaaaaaah! Androe said it's natural, but it's so annoying!"); +~chatplayer("I suppose that's what kids do."); +~chatnpc("He was fine, up until last week! Thieves broke in! They stole his favourite sleeping blanket!"); +~chatnpc("Now he won't rest until it's returned... ...and that means neither can I!"); switch_int (~p_choice2("Can I help at all?", 1, "I'm sorry to hear that! I hope you find his blanket.", 2)) { case 1: @omad_help; - case 2: ~chatplayer(neutral, "I'm sorry to hear that! I hope you find his blanket."); + case 2: ~chatplayer("I'm sorry to hear that! I hope you find his blanket."); } [label,omad_help] -~chatplayer(quiz, "Can I help at all?"); -~chatnpc(default, "Please do. We won't be able to help you as we are peaceful men but we would be grateful for your help!"); -~chatplayer(neutral, "Where are they?"); +~chatplayer("Can I help at all?"); +~chatnpc("Please do. We won't be able to help you as we are peaceful men but we would be grateful for your help!"); +~chatplayer("Where are they?"); %drunkmonk_progress = ^drunkmonk_spoken_to_omad; softtimer(blanket_ladder, 1); ~send_quest_progress(questlist:drunkmonk, %drunkmonk_progress, ^drunkmonk_complete); -~chatnpc(default, "They hide in a secret cave in the forest. It's hidden under a ring of stones. Please, bring back the blanket!"); +~chatnpc("They hide in a secret cave in the forest. It's hidden under a ring of stones. Please, bring back the blanket!"); [label,omad_have_blanket] -~chatplayer(neutral, "Hello."); -~chatnpc(sad, "*yawn*...oh, hello again...*yawn*"); -~chatnpc(sad, "Please tell me you have the blanket."); +~chatplayer("Hello."); +~chatnpc("*yawn*...oh, hello again...*yawn*"); +~chatnpc("Please tell me you have the blanket."); if(inv_total(inv, childs_blanket) >= 1) { - ~chatplayer(happy, "Yes! I've recovered it from the clutches of the evil thieves!"); + ~chatplayer("Yes! I've recovered it from the clutches of the evil thieves!"); ~objbox(childs_blanket, "You hand the monk the childs blanket."); - ~chatnpc(happy, "Really, that's excellent, well done! Maybe now I will be able to get some rest."); - ~chatnpc(neutral, "*yawn*..I'm off to bed! Farewell brave traveller!"); + ~chatnpc("Really, that's excellent, well done! Maybe now I will be able to get some rest."); + ~chatnpc("*yawn*..I'm off to bed! Farewell brave traveller!"); inv_del(inv, childs_blanket, 1); %drunkmonk_progress = ^drunkmonk_retrieved_blanket; return; } -~chatplayer(sad, "I'm afraid not."); -~chatnpc(sad, "I need some sleep!"); +~chatplayer("I'm afraid not."); +~chatnpc("I need some sleep!"); [label,omad_organize_party] -~chatplayer(neutral, "Hello, how are you?"); -~chatnpc(happy, "Much better now I'm sleeping well! Now I can organise the party."); -~chatplayer(happy, "Ooh! What party?"); -~chatnpc(happy, "The son of Brother Androe's birthday party. He's going to be one year old!"); -~chatplayer(happy, "That's sweet!"); -~chatnpc(happy, "It's also a great excuse for a drink!"); -~chatnpc(neutral, "We just need Brother Cedric to return with the wine."); +~chatplayer("Hello, how are you?"); +~chatnpc("Much better now I'm sleeping well! Now I can organise the party."); +~chatplayer("Ooh! What party?"); +~chatnpc("The son of Brother Androe's birthday party. He's going to be one year old!"); +~chatplayer("That's sweet!"); +~chatnpc("It's also a great excuse for a drink!"); +~chatnpc("We just need Brother Cedric to return with the wine."); def_int $option = ~p_choice2("Who's Brother Cedric?", 1, "Enjoy it! I'll see you soon!", 2); if($option = 1) { - ~chatplayer(quiz, "Who's Brother Cedric?"); - ~chatnpc(default, "Cedric is a member of the order too. We sent him out three days ago to collect wine. But he didn't return!"); - ~chatnpc(angry, "He most probably got drunk and lost in the forest!"); - ~chatnpc(quiz, "I don't suppose you could look for him?"); + ~chatplayer("Who's Brother Cedric?"); + ~chatnpc("Cedric is a member of the order too. We sent him out three days ago to collect wine. But he didn't return!"); + ~chatnpc("He most probably got drunk and lost in the forest!"); + ~chatnpc("I don't suppose you could look for him?"); @multi3("I've no time for that, sorry.", omad_no_time, "Where should I look?", omad_where_look, "Can I come to the party?", omad_come); } else if($option = 2) { - ~chatplayer(happy, "Enjoy it! I'll see you soon!"); - ~chatnpc(neutral, "Take care traveller."); + ~chatplayer("Enjoy it! I'll see you soon!"); + ~chatnpc("Take care traveller."); } [label,omad_no_time] -~chatplayer(neutral, "I've no time for that, sorry."); -~chatnpc(sad, "Okay traveller, take care."); +~chatplayer("I've no time for that, sorry."); +~chatnpc("Okay traveller, take care."); [label,omad_where_look] -~chatplayer(quiz, "Where should I look?"); -~chatnpc(happy, "Oh, he won't be far. Probably out in the forest."); -~chatplayer(neutral, "Ok, I'll go and find him."); +~chatplayer("Where should I look?"); +~chatnpc("Oh, he won't be far. Probably out in the forest."); +~chatplayer("Ok, I'll go and find him."); %drunkmonk_progress = ^drunkmonk_looking_cedric; [label,omad_come] -~chatplayer(happy, "Can I come to the party?"); -~chatnpc(neutral, "Of course, but we need the wine first."); +~chatplayer("Can I come to the party?"); +~chatnpc("Of course, but we need the wine first."); [label,omad_need_wine] -~chatplayer(neutral, "Hello brother Omad."); +~chatplayer("Hello brother Omad."); if(%drunkmonk_progress = ^drunkmonk_looking_cedric) { - ~chatnpc(neutral, "Hello adventurer, have you found Brother Cedric?"); - ~chatplayer(neutral, "Not yet."); - ~chatnpc(sad, "Well, keep looking, we need that wine!"); + ~chatnpc("Hello adventurer, have you found Brother Cedric?"); + ~chatplayer("Not yet."); + ~chatnpc("Well, keep looking, we need that wine!"); } else if(%drunkmonk_progress = ^drunkmonk_finding_water) { - ~chatnpc(sad, "Hello adventurer, have you found Brother Cedric?"); - ~chatplayer(happy, "Yes I've seen him, he's a bit drunk!"); - ~chatnpc(happy, "Well, try your best to get him back here!"); + ~chatnpc("Hello adventurer, have you found Brother Cedric?"); + ~chatplayer("Yes I've seen him, he's a bit drunk!"); + ~chatnpc("Well, try your best to get him back here!"); } [label,omad_hello_again] -~chatplayer(neutral, "Hello again brother Omad."); -~chatnpc(quiz, "Hello adventurer, where's Brother Cedric?"); -~chatplayer(neutral, "He's having a bit of trouble with his cart."); -~chatnpc(sad, "Hmmm! Maybe you could help?"); +~chatplayer("Hello again brother Omad."); +~chatnpc("Hello adventurer, where's Brother Cedric?"); +~chatplayer("He's having a bit of trouble with his cart."); +~chatnpc("Hmmm! Maybe you could help?"); [label,omad_party] -~chatplayer(happy, "Hi Omad, Brother Cedric is on his way!"); -~chatnpc(happy, "Good! Good! Now we can party!"); -~chatnpc(happy, "I have little to repay you with but please! Take these Rune Stones."); +~chatplayer("Hi Omad, Brother Cedric is on his way!"); +~chatnpc("Good! Good! Now we can party!"); +~chatnpc("I have little to repay you with but please! Take these Rune Stones."); ~objboxt(lawrune, "Brother Omad gives you 8 Law Runes."); -~chatplayer(happy, "Thanks Brother Omad!"); -~chatnpc(happy, "OK, let's party!"); +~chatplayer("Thanks Brother Omad!"); +~chatnpc("OK, let's party!"); @drunkmonk_party; [label,omad_postparty] -~chatnpc(drunk, "Dum dee do la la! *hiccup* That was some party!"); \ No newline at end of file +~chatnpc("Dum dee do la la! *hiccup* That was some party!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/captain_barnaby.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/captain_barnaby.rs2 index 5946657fd..eb408485f 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/captain_barnaby.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/captain_barnaby.rs2 @@ -1,16 +1,16 @@ [opnpc1,captain_barnaby] -~chatnpc(neutral, "Do you want to go on a trip to Brimhaven?|The trip will cost you 30 coins."); +~chatnpc("Do you want to go on a trip to Brimhaven?|The trip will cost you 30 coins."); def_int $option = ~p_choice2("Yes please.", 1, "No. thank you.", 2); switch_int ($option) { case 1: - ~chatplayer(happy, "Yes please."); + ~chatplayer("Yes please."); if (inv_total(inv, coins) < 30) { - ~chatplayer(sad, "Oh dear, I don't actually seem to have enough money."); + ~chatplayer("Oh dear, I don't actually seem to have enough money."); return; } inv_del(inv, coins, 30); ~set_sail("Brimhaven", "You pay 30 coins and board the ship.", 1_43_50_23_34, ^sail_ardougne_to_brimhaven, 7); return; case 2: - ~chatplayer(neutral, "No, thank you."); + ~chatplayer("No, thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/caroline.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/caroline.rs2 index 6221b2797..79b4d6871 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/caroline.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/caroline.rs2 @@ -7,55 +7,55 @@ switch_int(%seaslug_progress) { } [label,caroline_help] -~chatplayer(happy, "Hello there."); -~chatnpc(sad, "Is there any chance you could help me?"); -~chatplayer(quiz, "What's wrong?"); -~chatnpc(neutral, "It's my husband, he works on a fishing platform.|Once a month he takes our son, Kennith, out with him."); -~chatnpc(confused, "They usually write to me regularly, but I've heard nothing all week. It's very strange."); -~chatplayer(neutral, "Maybe the post was lost!"); -~chatnpc(confused, "Maybe, but no-one's heard from the other fishermen on the platform. Their families are becoming quite concerned."); -~chatnpc(quiz, "Is there any chance you could visit the platform and find out what's going on?"); +~chatplayer("Hello there."); +~chatnpc("Is there any chance you could help me?"); +~chatplayer("What's wrong?"); +~chatnpc("It's my husband, he works on a fishing platform.|Once a month he takes our son, Kennith, out with him."); +~chatnpc("They usually write to me regularly, but I've heard nothing all week. It's very strange."); +~chatplayer("Maybe the post was lost!"); +~chatnpc("Maybe, but no-one's heard from the other fishermen on the platform. Their families are becoming quite concerned."); +~chatnpc("Is there any chance you could visit the platform and find out what's going on?"); switch_int(~p_choice2("I suppose so, how do I get there?", 1, "I'm sorry, I'm too busy.", 2)) { case 1: - ~chatplayer(neutral, "I suppose so, how do I get there?"); - ~chatnpc(neutral, "That's very good of you traveller.|My friend Holgart will take you there."); - ~chatplayer(neutral, "Ok, I'll go and see if they're ok."); + ~chatplayer("I suppose so, how do I get there?"); + ~chatnpc("That's very good of you traveller.|My friend Holgart will take you there."); + ~chatplayer("Ok, I'll go and see if they're ok."); %seaslug_progress = ^seaslug_started; ~send_quest_progress(questlist:seaslug, %seaslug_progress, ^seaslug_complete); - ~chatnpc(neutral, "I'll reward you for your time.|It'll give me peace of mind|to know Kennith and my husband, Kent, are safe."); + ~chatnpc("I'll reward you for your time.|It'll give me peace of mind|to know Kennith and my husband, Kent, are safe."); case 2: - ~chatplayer(neutral, "I'm sorry, I'm too busy."); - ~chatnpc(sad, "That's a shame."); - ~chatplayer(neutral, "Bye."); - ~chatnpc(neutral, "Bye."); + ~chatplayer("I'm sorry, I'm too busy."); + ~chatnpc("That's a shame."); + ~chatplayer("Bye."); + ~chatnpc("Bye."); } [label,caroline_savedkennith] -~chatplayer(happy, "Hello."); -~chatnpc(happy, "Brave traveller, you've returned!"); -~chatnpc(sad, "Kennith told me about the strange goings-on at the platform. I had no idea it was so serious."); -~chatnpc(neutral, "I could have lost my son and my husband if it wasn't for you."); -~chatplayer(neutral, "We found Kent stranded on an island."); -~chatnpc(neutral, "Yes, Holgart told me and sent a rescue party out.|Kent's back home now, resting with Kennith.|I don't think he'll be doing any fishing for a while."); -~chatnpc(neutral, "Here, take these Oyster pearls as a reward.|They're worth quite a bit|and can be used to make lethal crossbow bolts."); +~chatplayer("Hello."); +~chatnpc("Brave traveller, you've returned!"); +~chatnpc("Kennith told me about the strange goings-on at the platform. I had no idea it was so serious."); +~chatnpc("I could have lost my son and my husband if it wasn't for you."); +~chatplayer("We found Kent stranded on an island."); +~chatnpc("Yes, Holgart told me and sent a rescue party out.|Kent's back home now, resting with Kennith.|I don't think he'll be doing any fishing for a while."); +~chatnpc("Here, take these Oyster pearls as a reward.|They're worth quite a bit|and can be used to make lethal crossbow bolts."); // QUEST REWARD %seaslug_progress = ^seaslug_complete; %questpoints = add(%questpoints, 1); inv_add(inv, oyster_perls, 1); givexp(fishing, 71750); queue(seaslug_quest_complete, 0); -~chatplayer(happy, "Thanks!"); -~chatnpc(happy, "Thank you.|Take care of yourself traveller."); +~chatplayer("Thanks!"); +~chatnpc("Thank you.|Take care of yourself traveller."); [label,caroline_postquest] -~chatplayer(happy, "Hello again."); -~chatnpc(happy, "Hello traveller, how are you?"); -~chatplayer(happy, "Not bad thanks, yourself?"); -~chatnpc(happy, "I'm good.|Busy as always looking after Kent and Kennith but no complaints."); +~chatplayer("Hello again."); +~chatnpc("Hello traveller, how are you?"); +~chatplayer("Not bad thanks, yourself?"); +~chatnpc("I'm good.|Busy as always looking after Kent and Kennith but no complaints."); [label,caroline_anynews] -~chatplayer(happy, "Hello Caroline."); -~chatnpc(quiz, "Brave adventurer, have you any news about my son and his father?"); -~chatplayer(neutral, "I'm working on it now Caroline."); -~chatnpc(sad, "Please bring them back safe and sound."); -~chatplayer(neutral, "I'll do my best."); \ No newline at end of file +~chatplayer("Hello Caroline."); +~chatnpc("Brave adventurer, have you any news about my son and his father?"); +~chatplayer("I'm working on it now Caroline."); +~chatnpc("Please bring them back safe and sound."); +~chatplayer("I'll do my best."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/elena.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/elena.rs2 index ae2ca5b2a..21e41b23d 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/elena.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/elena.rs2 @@ -1,10 +1,10 @@ [opnpc1,elena] -~chatplayer(happy, "Good day to you ."); -~chatnpc(happy, "You too, thanks for freeing me."); -~chatnpc(sad, "It's just a shame the mourners confiscated my equipment."); -~chatplayer(quiz, "What did they take?"); -~chatnpc(neutral, "My distillator. I can't test any plague samples without it. They're holding it in the Mourners Headquarters in West Ardougne."); -~chatnpc(quiz, "I must somehow retrieve that distillator if I am to find a cure for this awful affliction. Do you think you could help me?"); +~chatplayer("Good day to you ."); +~chatnpc("You too, thanks for freeing me."); +~chatnpc("It's just a shame the mourners confiscated my equipment."); +~chatplayer("What did they take?"); +~chatnpc("My distillator. I can't test any plague samples without it. They're holding it in the Mourners Headquarters in West Ardougne."); +~chatnpc("I must somehow retrieve that distillator if I am to find a cure for this awful affliction. Do you think you could help me?"); // TODO Biohazard quest impl. -~chatplayer(neutral, "I'm busy at the moment, I'm afraid."); -~chatnpc(neutral, "Fair enough."); +~chatplayer("I'm busy at the moment, I'm afraid."); +~chatnpc("Fair enough."); diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/fur_trader.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/fur_trader.rs2 index c0bef3d73..11c2afc15 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/fur_trader.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/fur_trader.rs2 @@ -2,12 +2,12 @@ if (map_clock < %last_stolen_from_stall_fur) { @stall_owner_alert_guards; } -~chatnpc("default", "Would you like to trade in fur?"); +~chatnpc("Would you like to trade in fur?"); def_int $option = ~p_choice2("Yes please.", 1, "No thanks.", 2); if($option = 1) { ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thanks."); + ~chatplayer("No thanks."); } diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/gem_merchant.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/gem_merchant.rs2 index 1262f3c22..b8f08208b 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/gem_merchant.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/gem_merchant.rs2 @@ -2,5 +2,5 @@ if (map_clock < %last_stolen_from_stall_gem) { @stall_owner_alert_guards; } -~chatnpc(neutral, "Here, look at my lovely gems."); +~chatnpc("Here, look at my lovely gems."); ~openshop_activenpc; \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/holgart_ardougne.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/holgart_ardougne.rs2 index 6b9501d5c..0181ebd2f 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/holgart_ardougne.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/holgart_ardougne.rs2 @@ -9,82 +9,82 @@ switch_int (%seaslug_progress) { } [label,holgart_prequest] -~chatplayer(happy, "Hello there."); -~chatnpc(happy, "Well hello m'laddy, beautiful day isn't it."); -~chatplayer(neutral, "Not bad I suppose."); -~chatnpc(happy, "Just smell that sea air... beautiful."); -~chatplayer(confused, "Hmm... lovely..."); +~chatplayer("Hello there."); +~chatnpc("Well hello m'laddy, beautiful day isn't it."); +~chatplayer("Not bad I suppose."); +~chatnpc("Just smell that sea air... beautiful."); +~chatplayer("Hmm... lovely..."); [label,holgart_wantboat] -~chatplayer(happy, "Hello."); -~chatnpc(happy, "Hello m'hearty."); -~chatplayer(neutral, "I would like a ride on your boat to the fishing platform."); -~chatnpc(sad, "I'm afraid it isn't sea worthy, it's full of holes.|To fill the holes I'll need some swamp paste."); -~chatplayer(quiz, "Swamp paste?"); -~chatnpc(neutral, "Yes, swamp tar mixed with flour and heated over a fire."); -~chatplayer(quiz, "Where can I find swamp tar?"); +~chatplayer("Hello."); +~chatnpc("Hello m'hearty."); +~chatplayer("I would like a ride on your boat to the fishing platform."); +~chatnpc("I'm afraid it isn't sea worthy, it's full of holes.|To fill the holes I'll need some swamp paste."); +~chatplayer("Swamp paste?"); +~chatnpc("Yes, swamp tar mixed with flour and heated over a fire."); +~chatplayer("Where can I find swamp tar?"); // OSRS checks if you have in your inv here, and skips from stage 1 -> 3 if you do, since RSC doesn't have this check we'll copy that -~chatnpc(sad, "Unfortunately the only supply of swamp tar is in the swamps below Lumbridge. It's too far for an old man like me to travel."); -~chatnpc(neutral, "If you make me some swamp paste I'll give you a ride in my boat."); -~chatplayer(neutral, "I'll see what I can do."); +~chatnpc("Unfortunately the only supply of swamp tar is in the swamps below Lumbridge. It's too far for an old man like me to travel."); +~chatnpc("If you make me some swamp paste I'll give you a ride in my boat."); +~chatplayer("I'll see what I can do."); %seaslug_progress = ^seaslug_spoken_holgart; [label,holgart_paste] -~chatplayer(happy, "Hello Holgart."); -~chatnpc(quiz, "Hello m'hearty. Did you manage to make some swamp paste?"); +~chatplayer("Hello Holgart."); +~chatnpc("Hello m'hearty. Did you manage to make some swamp paste?"); if(inv_total(inv, swamp_paste) < 1) { - ~chatplayer(sad, "I'm afraid not."); - ~chatnpc(neutral, "It's simply swamp tar mixed with flour heated over a fire. Unfortunately the only supply of swamp tar is in the swamps below Lumbridge."); - ~chatnpc(neutral, "I can't fix my row boat without it."); - ~chatplayer(neutral, "Ok, I'll try to find some."); + ~chatplayer("I'm afraid not."); + ~chatnpc("It's simply swamp tar mixed with flour heated over a fire. Unfortunately the only supply of swamp tar is in the swamps below Lumbridge."); + ~chatnpc("I can't fix my row boat without it."); + ~chatplayer("Ok, I'll try to find some."); return; } -~chatplayer(happy, "Yes, I have some here."); +~chatplayer("Yes, I have some here."); mes("You give Holgart the swamp paste."); inv_del(inv, swamp_paste, 1); %seaslug_progress = ^seaslug_boat_repaired; -~chatnpc(neutral, "Superb, this looks great."); +~chatnpc("Superb, this looks great."); ~mesbox("Holgart smears the paste over the under side of his boat."); -~chatnpc(happy, "That's the job done, now we can go.|Jump aboard!"); +~chatnpc("That's the job done, now we can go.|Jump aboard!"); switch_int(~p_choice2("I'll come back later.", 1, "Okay, lets do it.", 2)) { case 1: - ~chatplayer(neutral, "I'll come back later."); - ~chatnpc(neutral, "Okay then.|I'll wait here for you."); + ~chatplayer("I'll come back later."); + ~chatnpc("Okay then.|I'll wait here for you."); case 2: - ~chatplayer(happy, "Okay, lets do it."); + ~chatplayer("Okay, lets do it."); ~board_ardougne_to_fishing_platform; } [label,holgart_strangethings] -~chatplayer(happy, "Hello Holgart."); -~chatnpc(neutral, "Hello again land lover.|There's some strange goings on,|on that platform, I tell you."); +~chatplayer("Hello Holgart."); +~chatnpc("Hello again land lover.|There's some strange goings on,|on that platform, I tell you."); switch_int(~p_choice2("Will you take me there?", 1, "I'm keeping away from there.", 2)) { case 1: - ~chatplayer(quiz, "Will you take me there?"); - ~chatnpc(neutral, "Of course m'hearty. If that's what you want."); + ~chatplayer("Will you take me there?"); + ~chatnpc("Of course m'hearty. If that's what you want."); ~board_ardougne_to_fishing_platform; case 2: - ~chatplayer(neutral, "I'm keeping away from there."); - ~chatnpc(neutral, "Fair enough m'hearty."); + ~chatplayer("I'm keeping away from there."); + ~chatnpc("Fair enough m'hearty."); } [label,holgart_back_kent] -~chatplayer(confused, "Holgart, can you take me back out to Kent?"); -~chatnpc(neutral, "Righty ho traveller. Let's go."); +~chatplayer("Holgart, can you take me back out to Kent?"); +~chatnpc("Righty ho traveller. Let's go."); ~board_fishing_platform_to_island; [label,holgart_fancy] -~chatplayer(happy, "Hello again Holgart."); -~chatnpc(quiz, "Well hello again m'hearty.|Your land loving legs getting bored?|Fancy some cold wet underfoot?"); -~chatplayer(confused, "Pardon?"); -~chatnpc(neutral, "Fancy going out to sea?"); +~chatplayer("Hello again Holgart."); +~chatnpc("Well hello again m'hearty.|Your land loving legs getting bored?|Fancy some cold wet underfoot?"); +~chatplayer("Pardon?"); +~chatnpc("Fancy going out to sea?"); switch_int(~p_choice2("I'll come back later.", 1, "Okay, let's do it.", 2)) { case 1: - ~chatplayer(quiz, "I'll come back later."); - ~chatnpc(neutral, "Okay then. I'll wait here for you."); + ~chatplayer("I'll come back later."); + ~chatnpc("Okay then. I'll wait here for you."); case 2: - ~chatplayer(happy, "Okay, let's do it."); - ~chatnpc(neutral, "Hold on tight!"); + ~chatplayer("Okay, let's do it."); + ~chatnpc("Hold on tight!"); ~board_ardougne_to_fishing_platform; } diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/horacio.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/horacio.rs2 index 4c3f17c26..6e0cf967c 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/horacio.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/horacio.rs2 @@ -1,26 +1,26 @@ [opnpc1,horacio] -~chatnpc(happy, "It's a fine day to be out in the garden isn't it?"); +~chatnpc("It's a fine day to be out in the garden isn't it?"); def_int $option = ~p_choice2("Yes, it's very nice.", 1, "So... who are you?", 2); if($option = 1) { - ~chatplayer(neutral, "Yes, it's very nice."); - ~chatnpc(happy, "Days like these make me glad to be alive!"); + ~chatplayer("Yes, it's very nice."); + ~chatnpc("Days like these make me glad to be alive!"); } else if ($option = 2) { - ~chatplayer(quiz, "So... who are you?"); - ~chatnpc(neutral, "My name is Horacio Dobson. I'm the gardener to Lord Handelmort. Take a look around this beautiful garden, all of this is my handiwork."); + ~chatplayer("So... who are you?"); + ~chatnpc("My name is Horacio Dobson. I'm the gardener to Lord Handelmort. Take a look around this beautiful garden, all of this is my handiwork."); if(%totem_progress >= ^totem_started) { @multi2("So... do you garden round the back too?", horacio_garden_back, "Do you need any help?", horacio_help); } } [label,horacio_garden_back] -~chatplayer(quiz, "So... do you garden round the back too?"); -~chatnpc(happy, "That I do!"); -~chatplayer(quiz, "Doesn't all of the security around the house get in your way then?"); +~chatplayer("So... do you garden round the back too?"); +~chatnpc("That I do!"); +~chatplayer("Doesn't all of the security around the house get in your way then?"); // https://storage.googleapis.com/tannerdino/images/1_18.png -~chatnpc(neutral, "Ah, I'm used to all that. I have|my keys, the guard dogs know me, and|I know the combination to the door lock.|It's rather easy, it's his middle name."); -~chatplayer(quiz, "Whose middle name?"); -~chatnpc(confused, "Hum. I probably shouldn't have said that. Forget I mentioned it."); +~chatnpc("Ah, I'm used to all that. I have|my keys, the guard dogs know me, and|I know the combination to the door lock.|It's rather easy, it's his middle name."); +~chatplayer("Whose middle name?"); +~chatnpc("Hum. I probably shouldn't have said that. Forget I mentioned it."); [label,horacio_help] -~chatplayer(quiz, "Do you need any help?"); -~chatnpc(happy, "Trying to muscle in on my job eh? I'm more than happy to do this all by myself!"); \ No newline at end of file +~chatplayer("Do you need any help?"); +~chatnpc("Trying to muscle in on my job eh? I'm more than happy to do this all by myself!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/rdpt_employee.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/rdpt_employee.rs2 index 3e4d08e4c..d49c5324d 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/rdpt_employee.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/rdpt_employee.rs2 @@ -1,15 +1,15 @@ [opnpc1,rdpt_employee] -~chatnpc(neutral, "Welcome to RDPT!"); +~chatnpc("Welcome to RDPT!"); if(%totem_progress = ^totem_crate_marked) { def_int $option = ~p_choice2("So, when are you going to deliver this crate?", 1, "Thank you, it's interesting in here.", 2); if($option = 1) { - ~chatplayer(quiz, "So, when are you going to deliver this crate?"); + ~chatplayer("So, when are you going to deliver this crate?"); %totem_progress = ^totem_crate_delivered; - ~chatnpc(neutral, "Well... I guess we could do it now..."); + ~chatnpc("Well... I guess we could do it now..."); } else if ($option = 2) { - ~chatplayer(neutral, "Thank you, it's interesting in here."); - ~chatnpc(neutral, "We're the premier delivery service in ALL of RuneScape!"); + ~chatplayer("Thank you, it's interesting in here."); + ~chatnpc("We're the premier delivery service in ALL of RuneScape!"); } return; } -~chatplayer(neutral, "Thank you very much."); \ No newline at end of file +~chatplayer("Thank you very much."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/silk_merchant.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/silk_merchant.rs2 index 9c9f25995..eb95511a6 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/silk_merchant.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/silk_merchant.rs2 @@ -3,51 +3,51 @@ if (map_clock < %last_stolen_from_stall_silk) { @stall_owner_alert_guards; } if(inv_total(inv, silk) > 0) { //TODO - Add check for when player last stole from the Ardougne Silk Stall. - ~chatplayer("neutral", "Hello. I have some fine silk from Al-Kharid to sell to you."); - ~chatnpc("quiz", "Ah I may be interested in that. What sort of price were you looking at per piece of silk?"); + ~chatplayer("Hello. I have some fine silk from Al-Kharid to sell to you."); + ~chatnpc("Ah I may be interested in that. What sort of price were you looking at per piece of silk?"); def_int $option = ~p_choice4("20 coins.", 1, "80 coins.", 2, "120 coins.", 3, "200 coins.", 4); if($option = 1) { - ~chatplayer(neutral, "20 coins."); - ~chatnpc(happy, "Ok suits me."); + ~chatplayer("20 coins."); + ~chatnpc("Ok suits me."); ~silk_merchant_sell_silk(20); } else if($option = 2) { - ~chatplayer(neutral, "80 coins."); - ~chatnpc(shock, "80 coins? That's a bit steep!|How about 40 coins?"); + ~chatplayer("80 coins."); + ~chatnpc("80 coins? That's a bit steep!|How about 40 coins?"); $option = ~p_choice3("Ok, 40 sounds good.", 1, "50 and that's my final price.", 2, "No, that is not enough.", 3); if($option = 1) { - ~chatplayer(neutral, "Ok, 40 sounds good."); + ~chatplayer("Ok, 40 sounds good."); ~silk_merchant_sell_silk(40); } else if($option = 2) { - ~chatplayer(neutral, "50, and that's my final price."); - ~chatnpc(happy, "Done."); + ~chatplayer("50, and that's my final price."); + ~chatnpc("Done."); ~silk_merchant_sell_silk(50); } else if($option = 3) { - ~chatplayer(neutral, "No, that is not enough."); + ~chatplayer("No, that is not enough."); } } else if($option = 3) { - ~chatplayer(neutral, "120 coins."); - ~chatnpc(neutral, "You'll never get that much for it. I'll be generous and give you 50 for it."); + ~chatplayer("120 coins."); + ~chatnpc("You'll never get that much for it. I'll be generous and give you 50 for it."); $option = ~p_choice3("Ok, I guess 50 will do.", 1, "I'll give it to you for 60.", 2, "No, that is not enough.", 3); if($option = 1) { - ~chatplayer(neutral, "Ok, I guess 50 will do."); + ~chatplayer("Ok, I guess 50 will do."); ~silk_merchant_sell_silk(50); } else if($option = 2) { - ~chatplayer(happy, "I'll give it to you for 60."); - ~chatnpc("default", "You drive a hard bargain, but|I guess that will have to do."); + ~chatplayer("I'll give it to you for 60."); + ~chatnpc("You drive a hard bargain, but|I guess that will have to do."); ~silk_merchant_sell_silk(60); } else if($option = 3) { - ~chatplayer(neutral, "No, that is not enough."); + ~chatplayer("No, that is not enough."); } } else if($option = 4) { - ~chatplayer(neutral, "200 coins."); - ~chatnpc(angry, "Don't be ridiculous! That is far too much. You insult me with that price."); + ~chatplayer("200 coins."); + ~chatnpc("Don't be ridiculous! That is far too much. You insult me with that price."); } } else { - ~chatnpc("happy", "I buy silk. If you ever want to|sell any silk, bring it here."); + ~chatnpc("I buy silk. If you ever want to|sell any silk, bring it here."); } [proc,silk_merchant_sell_silk](int $price) diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/silver_merchant.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/silver_merchant.rs2 index c246f4082..2a065a69f 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/silver_merchant.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/silver_merchant.rs2 @@ -3,12 +3,12 @@ if (map_clock < %last_stolen_from_stall_silver) { npc_say("You stole from me. Talk to me when you've considered your actions!"); return; } -~chatnpc(happy, "Silver! Silver!|Best prices for buying and selling in all Kandarin!"); +~chatnpc("Silver! Silver!|Best prices for buying and selling in all Kandarin!"); def_int $option = ~p_choice2("Yes please.", 1, "No thank you.", 2); if($option = 1) { ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/spice_seller.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/spice_seller.rs2 index 9c1af991d..dd711602a 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/spice_seller.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/spice_seller.rs2 @@ -2,12 +2,12 @@ if (map_clock < %last_stolen_from_stall_spice) { @stall_owner_alert_guards; } -~chatnpc("neutral", "Are you interested in buying or selling spice?"); +~chatnpc("Are you interested in buying or selling spice?"); def_int $option = ~p_choice2("Yes please.", 1, "No thanks.", 2); if($option = 1) { ~openshop_activenpc; } else if($option = 2) { - ~chatplayer("neutral", "No thanks."); + ~chatplayer("No thanks."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/wizard_cromperty.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/wizard_cromperty.rs2 index 54f7e77b0..a4a7a314a 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/wizard_cromperty.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/wizard_cromperty.rs2 @@ -1,55 +1,55 @@ [opnpc1,wizard_cromperty] -~chatnpc(neutral, "Hello there.|My name is Cromperty.|I am a Wizard, and an inventor."); +~chatnpc("Hello there.|My name is Cromperty.|I am a Wizard, and an inventor."); @multi2("Two jobs? That's got to be tough.", cromperty_two_jobs, "So what have you invented?", cromperty_what_invented); [label,cromperty_two_jobs] -~chatplayer(neutral, "Two jobs? That's got to be tough."); -~chatnpc(happy, "Not when you combine them it isn't!|I invent MAGIC things!"); +~chatplayer("Two jobs? That's got to be tough."); +~chatnpc("Not when you combine them it isn't!|I invent MAGIC things!"); def_int $option = ~p_choice2("So what have you invented?", 1, "Well, I shall leave you to your inventing.", 2); if($option = 1) { @cromperty_what_invented; } else if($option = 2) { - ~chatplayer(confused, "Well, I shall leave you to your inventing."); - ~chatnpc(neutral, "Thank you for dropping by! Stop again anytime!"); + ~chatplayer("Well, I shall leave you to your inventing."); + ~chatnpc("Thank you for dropping by! Stop again anytime!"); } [label,cromperty_what_invented] -~chatplayer(quiz, "So what have you invented?"); -~chatnpc(happy, "Ah! My latest invention is my patent pending teleportation block! It emits a low level magical signal, that will allow me to locate it anywhere in the world, and teleport anything"); -~chatnpc(happy, "directly to it! I hope to revolutionise the entire teleportation system! Don't you think I'm great? Uh, I mean it's great?"); +~chatplayer("So what have you invented?"); +~chatnpc("Ah! My latest invention is my patent pending teleportation block! It emits a low level magical signal, that will allow me to locate it anywhere in the world, and teleport anything"); +~chatnpc("directly to it! I hope to revolutionise the entire teleportation system! Don't you think I'm great? Uh, I mean it's great?"); def_int $option = ~p_choice3("So where is the other block?", 1, "Can I be teleported please?", 2, "Well done, that's very clever.", 3); if($option = 1) { - ~chatplayer(quiz, "So where is the other block?"); - ~chatnpc(confused, "Well... Hmm. I would guess somewhere between here and the Wizards' Tower in Misthalin. All I know is that it hasn't got there yet as the wizards there would have contacted me."); - ~chatnpc(sad, "I'm using the RPDT for delivery. They assured me it would be delivered promptly."); + ~chatplayer("So where is the other block?"); + ~chatnpc("Well... Hmm. I would guess somewhere between here and the Wizards' Tower in Misthalin. All I know is that it hasn't got there yet as the wizards there would have contacted me."); + ~chatnpc("I'm using the RPDT for delivery. They assured me it would be delivered promptly."); $option = ~p_choice2("Can I be teleported please?", 1, "Who are the RPDT?", 2); if($option = 1) { @cromperty_teleport; } else if($option = 2) { - ~chatplayer(quiz, "Who are the RPDT?"); - ~chatnpc(happy, "The RuneScape Parcel Delivery Team. They come very highly recommended. Their motto is: 'We aim to deliver your stuff at some point after you have paid us!'"); + ~chatplayer("Who are the RPDT?"); + ~chatnpc("The RuneScape Parcel Delivery Team. They come very highly recommended. Their motto is: 'We aim to deliver your stuff at some point after you have paid us!'"); } } else if($option = 2) { @cromperty_teleport; } else if($option = 3) { - ~chatplayer(neutral, "Well done, that's very clever."); - ~chatnpc(happy, "Yes it is isn't it? Forgive me for feeling a little smug, this is a major breakthrough in the field of teleportation!"); + ~chatplayer("Well done, that's very clever."); + ~chatnpc("Yes it is isn't it? Forgive me for feeling a little smug, this is a major breakthrough in the field of teleportation!"); } [label,cromperty_teleport] -~chatplayer(quiz, "Can I be teleported please?"); -~chatnpc(neutral, "By all means! I'm afraid I can't give you any specifics as to where you will come out however. Presumably wherever the other block is located."); +~chatplayer("Can I be teleported please?"); +~chatnpc("By all means! I'm afraid I can't give you any specifics as to where you will come out however. Presumably wherever the other block is located."); def_int $option = ~p_choice2("Yes, that sounds good. Teleport me!", 1, "That sounds dangerous. Leave me here.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes, that sounds good. Teleport me!"); - ~chatnpc(happy, "Okey dokey! Ready?"); + ~chatplayer("Yes, that sounds good. Teleport me!"); + ~chatnpc("Okey dokey! Ready?"); if(%totem_progress < ^totem_complete) { @rdpt_teleport; } - ~chatnpc(confused, "Hmm.... that's odd... I can't seem to get a signal..."); + ~chatnpc("Hmm.... that's odd... I can't seem to get a signal..."); } else if($option = 2) { - ~chatplayer(shock, "That sounds dangerous. Leave me here."); - ~chatnpc(neutral, "As you wish."); + ~chatplayer("That sounds dangerous. Leave me here."); + ~chatnpc("As you wish."); } [label,rdpt_teleport] diff --git a/data/src/scripts/areas/area_ardougne_east/scripts/zenesha.rs2 b/data/src/scripts/areas/area_ardougne_east/scripts/zenesha.rs2 index 5172e5097..dfae2e9fa 100644 --- a/data/src/scripts/areas/area_ardougne_east/scripts/zenesha.rs2 +++ b/data/src/scripts/areas/area_ardougne_east/scripts/zenesha.rs2 @@ -1,9 +1,9 @@ [opnpc1,zenesha] -~chatnpc(happy, "Hello there! I sell plate mail bodies,|are you interested?"); +~chatnpc("Hello there! I sell plate mail bodies,|are you interested?"); def_int $option = ~p_choice2("I'm interested.", 1, "Sorry, I'm not interested.", 2); if($option = 1) { - ~chatplayer(neutral, "I'm interested."); + ~chatplayer("I'm interested."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Sorry, I'm not interested."); + ~chatplayer("Sorry, I'm not interested."); } diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/carla.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/carla.rs2 index 958a7ef33..176945677 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/carla.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/carla.rs2 @@ -1,26 +1,26 @@ [opnpc1,carla] -~chatplayer(happy, "Hello."); -~chatnpc(sad, "Oh, hello."); -~chatplayer(quiz, "You seem upset... What's wrong?"); -~chatnpc(sad, "My son fell ill with the plague..."); -~chatplayer(sad, "That's awful, I'm sorry."); -~chatnpc(sad, "It would be easier to cope with if I could have spent his last few days with him."); -~chatplayer(quiz, "Why didn't you?"); -~chatnpc(sad, "Those mourners came and whisked him away. He didn't even seem that ill, I thought it was a common cold... But the mourners said that he was infected and had to be taken away."); -~chatnpc(sad, "Two days later the mourners returned and told me he had died."); -~chatplayer(sad, "Again, I'm sorry. Life can be harsh."); +~chatplayer("Hello."); +~chatnpc("Oh, hello."); +~chatplayer("You seem upset... What's wrong?"); +~chatnpc("My son fell ill with the plague..."); +~chatplayer("That's awful, I'm sorry."); +~chatnpc("It would be easier to cope with if I could have spent his last few days with him."); +~chatplayer("Why didn't you?"); +~chatnpc("Those mourners came and whisked him away. He didn't even seem that ill, I thought it was a common cold... But the mourners said that he was infected and had to be taken away."); +~chatnpc("Two days later the mourners returned and told me he had died."); +~chatplayer("Again, I'm sorry. Life can be harsh."); @multi3("Where did the plague come from?", carla_where_did_the_plague_come_from, "Have there been many victims of the plague?", carla_have_there_been_many_victims_of_the_plague, "I hope things get easier for you.", carla_i_hope_things_get_eaiser_for_you); [label,carla_where_did_the_plague_come_from] -~chatplayer(quiz, "Where did the plague come from?"); -~chatnpc(angry, "It's down to King Tyras. He and his men brought the plague here from the west, and then left us to suffer. One day he'll pay for what he's done!"); +~chatplayer("Where did the plague come from?"); +~chatnpc("It's down to King Tyras. He and his men brought the plague here from the west, and then left us to suffer. One day he'll pay for what he's done!"); [label,carla_have_there_been_many_victims_of_the_plague] -~chatplayer(quiz, "Have there been many victims of the plague?"); -~chatnpc(sad, "You could say that... I've heard reports that half of West Ardougne is infected! Many have lost friends and family..."); -~chatplayer(quiz, "It sounds an awful way to live."); -~chatnpc(sad, "People are very depressed and scared. I've never met anyone fully infected though. I suppose we should be grateful to the mourners for that."); +~chatplayer("Have there been many victims of the plague?"); +~chatnpc("You could say that... I've heard reports that half of West Ardougne is infected! Many have lost friends and family..."); +~chatplayer("It sounds an awful way to live."); +~chatnpc("People are very depressed and scared. I've never met anyone fully infected though. I suppose we should be grateful to the mourners for that."); [label,carla_i_hope_things_get_eaiser_for_you] -~chatplayer(sad, "I hope things get easier for you."); -~chatnpc(sad, "Me too..."); +~chatplayer("I hope things get easier for you."); +~chatnpc("Me too..."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/chadwell.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/chadwell.rs2 index b2f6e63f4..71faad42d 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/chadwell.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/chadwell.rs2 @@ -1,11 +1,11 @@ [opnpc1,chadwell] -~chatnpc(neutral, "Good day. What can I get you?"); +~chatnpc("Good day. What can I get you?"); @multi2("Let's see what you've got.", chadwell_lets_see_what_youve_got, "Nothing thanks.", chadwell_nothing_thanks); [label,chadwell_lets_see_what_youve_got] -~chatplayer(happy, "Let's see what you've got."); +~chatplayer("Let's see what you've got."); ~openshop_activenpc; [label,chadwell_nothing_thanks] -~chatplayer(neutral, "Nothing thanks."); -~chatnpc(happy, "Okay then."); +~chatplayer("Nothing thanks."); +~chatnpc("Okay then."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/child.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/child.rs2 index 51f3c2514..12c1f7707 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/child.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/child.rs2 @@ -2,5 +2,5 @@ [opnpc1,child_brown] @child_im_not_allowed_to_speak_with_strangers; [label,child_im_not_allowed_to_speak_with_strangers] -~chatplayer(neutral, "Hello there."); -~chatnpc(neutral, "I'm not allowed to speak with strangers."); +~chatplayer("Hello there."); +~chatnpc("I'm not allowed to speak with strangers."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/civilian.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/civilian.rs2 index 7f7214be4..ca0fd6e4b 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/civilian.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/civilian.rs2 @@ -1,54 +1,54 @@ [opnpc1,civilian_blonde] -~chatplayer(happy, "Hello there."); -~chatnpc(neutral, "Oh hello, I'm sorry, I'm a bit worn out."); -~chatplayer(neutral, "Busy day?"); -~chatnpc(neutral, "Oh, It's those mice! They're everywhere! What I really need is a cat. But they're hard to come by nowadays."); +~chatplayer("Hello there."); +~chatnpc("Oh hello, I'm sorry, I'm a bit worn out."); +~chatplayer("Busy day?"); +~chatnpc("Oh, It's those mice! They're everywhere! What I really need is a cat. But they're hard to come by nowadays."); @civilian_talk_about_cats; [opnpc1,civilian_brown] -~chatplayer(happy, "Hi there."); -~chatnpc(happy, "Good day to you traveller."); -~chatplayer(neutral, "What are you up to?"); -~chatnpc(bored, "Chasing mice as usual! It's all I seem to do nowadays."); -~chatplayer(neutral, "You must waste a lot of time?"); -~chatnpc(neutral, "Yes, but what can you do? It's not like there's many cats around here!"); +~chatplayer("Hi there."); +~chatnpc("Good day to you traveller."); +~chatplayer("What are you up to?"); +~chatnpc("Chasing mice as usual! It's all I seem to do nowadays."); +~chatplayer("You must waste a lot of time?"); +~chatnpc("Yes, but what can you do? It's not like there's many cats around here!"); @civilian_talk_about_cats; [opnpc1,civilian_bald] -~chatplayer(happy, "Hello there."); -~chatnpc(neutral, "I'm a bit busy to talk right now, sorry."); -~chatplayer(neutral, "Why? What are you doing?"); -~chatnpc(angry, "Trying to kill these mice! What I really need is a cat!"); +~chatplayer("Hello there."); +~chatnpc("I'm a bit busy to talk right now, sorry."); +~chatplayer("Why? What are you doing?"); +~chatnpc("Trying to kill these mice! What I really need is a cat!"); @civilian_talk_about_cats; [label,civilian_talk_about_cats] if (~civilian_player_has_cat = false) { - ~chatplayer(neutral, "No, you're right, you don't see many around."); + ~chatplayer("No, you're right, you don't see many around."); return; } @multi2("I have a cat that I could sell.", civilian_i_have_a_cat_i_could_sell, "Nope, they're not easy to get hold of.", civilian_ok_then_youve_got_a_deal); [label,civilian_i_have_a_cat_i_could_sell] -~chatplayer(happy, "I have a cat that I could sell."); -~chatnpc(happy, "You don't say, is that it ?"); -~chatplayer(happy, "Say hello to a real mouse killer!"); -~chatnpc(happy, "Hmmm, not bad, not bad at all. Looks like it's a lively one."); -~chatplayer(confused, "Erm...kind of..."); -~chatnpc(neutral, "I don't have much in the way of money. I do have these!"); +~chatplayer("I have a cat that I could sell."); +~chatnpc("You don't say, is that it ?"); +~chatplayer("Say hello to a real mouse killer!"); +~chatnpc("Hmmm, not bad, not bad at all. Looks like it's a lively one."); +~chatplayer("Erm...kind of..."); +~chatnpc("I don't have much in the way of money. I do have these!"); ~objbox(deathrune, "The peasant shows you a sack of Death Runes."); -~chatnpc(happy, "The dwarves bring them from the mine for us. Tell you what, I'll give you 100 Death Runes for the cat."); +~chatnpc("The dwarves bring them from the mine for us. Tell you what, I'll give you 100 Death Runes for the cat."); @multi2("Nope, I'm not parting for that.", civilian_im_not_parting_for_that, "Ok then, you've got a deal.", civilian_ok_then_youve_got_a_deal); [label,civilian_nope_theyre_not_easy_to_get_hold_of] -~chatplayer(neutral, "Nope, they're not easy to get hold of."); +~chatplayer("Nope, they're not easy to get hold of."); [label,civilian_im_not_parting_for_that] -~chatplayer(angry, "Nope, I'm not parting for that."); -~chatnpc(angry, "Well, I'm not giving you anymore!"); +~chatplayer("Nope, I'm not parting for that."); +~chatnpc("Well, I'm not giving you anymore!"); [label,civilian_ok_then_youve_got_a_deal] -~chatplayer(happy, "Ok then, you've got a deal."); -~chatnpc(happy, "Great! Hand over the cat and I'll give you the runes."); +~chatplayer("Ok then, you've got a deal."); +~chatnpc("Great! Hand over the cat and I'll give you the runes."); [proc,civilian_player_has_cat]()(boolean) if (inv_totalcat(inv, category_29) > 0 | inv_totalcat(inv, category_30) > 0 | inv_totalcat(inv, category_31) > 0) { diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 index 72994a729..16d55a9c0 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/clerk.rs2 @@ -1,62 +1,62 @@ [opnpc1,clerk] switch_int(%elena_progress) { case ^quest_elena_spoke_to_plague_house: { - ~chatnpc(neutral, "Hello, welcome to the Civic Office of West Ardougne. How can I help you?"); + ~chatnpc("Hello, welcome to the Civic Office of West Ardougne. How can I help you?"); @multi3("I need permission to enter a plague house.", clerk_i_need_permission, "Who is through that door?", clerk_who_is_through_that_door, "I'm just looking thanks.", clerk_im_just_looking_thanks); } case ^quest_elena_spoke_to_clerk: @clerk_bravek_will_see_you_now; case default: { - ~chatnpc(neutral, "Hello, welcome to the Civic Office of West Ardougne. How can I help you?"); + ~chatnpc("Hello, welcome to the Civic Office of West Ardougne. How can I help you?"); @multi2("Who is through that door?", clerk_who_is_through_that_door, "I'm just looking thanks.", clerk_im_just_looking_thanks); } } [label,clerk_who_is_through_that_door] -~chatplayer(quiz, "Who is through that door?"); -~chatnpc(neutral, "The city warder is in there."); -~chatplayer(quiz, "Can I go in?"); +~chatplayer("Who is through that door?"); +~chatnpc("The city warder is in there."); +~chatplayer("Can I go in?"); switch_int(%elena_progress) { case ^quest_elena_spoke_to_plague_house: { - ~chatnpc(neutral, "He has asked not to be disturbed."); + ~chatnpc("He has asked not to be disturbed."); @multi2("This is urgent though!", clerk_this_is_urgent_though, "Ok I will leave him alone.", clerk_ok_i_will_leave_him_alone); } - case ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek, ^quest_elena_freed_elena, ^elena_complete: ~chatnpc(neutral, "I suppose so."); - case default: ~chatnpc(neutral, "He has asked not to be disturbed."); + case ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek, ^quest_elena_freed_elena, ^elena_complete: ~chatnpc("I suppose so."); + case default: ~chatnpc("He has asked not to be disturbed."); } [label,clerk_im_just_looking_thanks] -~chatplayer(neutral, "I'm just looking thanks."); +~chatplayer("I'm just looking thanks."); [label,clerk_i_need_permission] -~chatplayer(neutral, "I need permission to enter a plague house."); -~chatnpc(neutral, "Rather you than me! Well, the mourners normally deal with that stuff, you should speak to them. Their headquarters are right near the city gate."); +~chatplayer("I need permission to enter a plague house."); +~chatnpc("Rather you than me! Well, the mourners normally deal with that stuff, you should speak to them. Their headquarters are right near the city gate."); @multi3("I'll try asking them then.", clerk_ill_try_asking_them_then, "Surely you don't let them run everything for you?", clerk_surely_you_dont_let_them_run_everything_for_you, "This is urgent though!", clerk_this_is_urgent_though); [label,clerk_ill_try_asking_them_then] -~chatplayer(neutral, "I'll try asking them then."); +~chatplayer("I'll try asking them then."); [label,clerk_surely_you_dont_let_them_run_everything_for_you] -~chatplayer(quiz, "Surely you don't let them run everything for you?"); -~chatnpc(default, "Well, they do know what they're doing here. If they did start doing something badly , the city warder, would have the power to override. I can't see that happening though."); +~chatplayer("Surely you don't let them run everything for you?"); +~chatnpc("Well, they do know what they're doing here. If they did start doing something badly , the city warder, would have the power to override. I can't see that happening though."); @multi2("I'll try asking them then.", clerk_ill_try_asking_them_then, "Can I speak to anyway?", clerk_can_i_speak_to_bravek_anyway); [label,clerk_can_i_speak_to_bravek_anyway] -~chatplayer(quiz, "Can I speak to anyway?"); -~chatnpc(neutral, "He has asked not to be disturbed."); +~chatplayer("Can I speak to anyway?"); +~chatnpc("He has asked not to be disturbed."); @multi2("This is urgent though!", clerk_this_is_urgent_though, "Ok I will leave him alone.", clerk_ok_i_will_leave_him_alone); [label,clerk_ok_i_will_leave_him_alone] -~chatplayer(neutral, "Ok I will leave him alone."); +~chatplayer("Ok I will leave him alone."); [label,clerk_this_is_urgent_though] -~chatplayer(angry, "This is urgent though!"); -~chatnpc(neutral, "I'll see what I can do I suppose."); +~chatplayer("This is urgent though!"); +~chatnpc("I'll see what I can do I suppose."); ~quest_elena_set_progress(^quest_elena_spoke_to_clerk); -~chatnpc(neutral, "Mr there's a here who really needs to speak to you."); +~chatnpc("Mr there's a here who really needs to speak to you."); if (.npc_find(coord, bravek, 7, 0) = true) { // yes its possible this doesnt pop off if hes too far - ~.chatnpc(confused, "I suppose they can come in then. If they keep it short."); + ~.chatnpc("I suppose they can come in then. If they keep it short."); } [label,clerk_bravek_will_see_you_now] -~chatnpc(neutral, " will see you now but keep it short!"); -~chatplayer(happy, "Thanks, I won't take much of his time."); +~chatnpc(" will see you now but keep it short!"); +~chatplayer("Thanks, I won't take much of his time."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/darkmage.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/darkmage.rs2 index 3b1a27f46..c5270869c 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/darkmage.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/darkmage.rs2 @@ -1,5 +1,5 @@ [opnpc1,darkmage] -~chatnpc(angry, "Why do you interrupt me, traveller? I am experimenting with dark magic; it is a dangerous craft, and I prefer not to be disturbed."); -~chatplayer(neutral, "I'm just looking around."); -~chatnpc(sad, "There's nothing to see here, just despair and death."); +~chatnpc("Why do you interrupt me, traveller? I am experimenting with dark magic; it is a dangerous craft, and I prefer not to be disturbed."); +~chatplayer("I'm just looking around."); +~chatnpc("There's nothing to see here, just despair and death."); // TODO staves stuff - jordan diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/doors.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/doors.rs2 index e036c005a..b68f0d79e 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/doors.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/doors.rs2 @@ -15,10 +15,10 @@ p_delay(1); mes("...But they will not open."); [label,west_ardougne_mourner_headquarters_doors] -~chatnpc_specific(nc_name(npc_357), npc_357, neutral, "Back away citizen. Only mourners are allowed inside the headquarters."); +~chatnpc_specific(nc_name(npc_357), npc_357, "Back away citizen. Only mourners are allowed inside the headquarters."); [label,bravek_go_away_im_busy] -~chatnpc_specific(nc_name(bravek), bravek, angry, "Go away, I'm busy! I'm... Umm... In a meeting!"); +~chatnpc_specific(nc_name(bravek), bravek, "Go away, I'm busy! I'm... Umm... In a meeting!"); [label,bravek_enter_room] ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/kilron.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/kilron.rs2 index 58cb69d20..583d79fe5 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/kilron.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/kilron.rs2 @@ -1,5 +1,5 @@ [opnpc1,kilron] -~chatplayer(happy, "Hello there."); -~chatnpc(happy, "Hello."); -~chatplayer(quiz, "How are you?"); -~chatnpc(neutral, "Busy."); +~chatplayer("Hello there."); +~chatnpc("Hello."); +~chatplayer("How are you?"); +~chatnpc("Busy."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/man.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/man.rs2 index d5c46511e..2b72b3c56 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/man.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/man.rs2 @@ -3,20 +3,20 @@ [opnpc1,npc_729] @man_woman_go_away_outsider; // skinny man non attackable [label,man_woman_curse_king_tyras] -~chatplayer(happy, "Good day."); -~chatnpc(sad, "We don't have good days here anymore. Curse King Tyras."); +~chatplayer("Good day."); +~chatnpc("We don't have good days here anymore. Curse King Tyras."); switch_int(%elena_progress) { case ^quest_elena_freed_elena, ^elena_complete: @multi2("Oh okay, bad day then.", man_woman_bad_day_then, "Why, what has he done?", man_woman_what_has_he_done); case default: @multi3("Oh okay, bad day then.", man_woman_bad_day_then, "Why, what has he done?", man_woman_what_has_he_done, "I'm looking for a woman called .", man_woman_im_looking_for_a_woman); } [label,man_woman_bad_day_then] -~chatplayer(confused, "Oh okay, bad day then."); +~chatplayer("Oh okay, bad day then."); [label,man_woman_what_has_he_done] -~chatplayer(quiz, "Why, what has he done?"); -~chatnpc(angry, "His army curses our city with this plague then wanders off again, leaving us to clear up the pieces."); +~chatplayer("Why, what has he done?"); +~chatnpc("His army curses our city with this plague then wanders off again, leaving us to clear up the pieces."); [label,man_woman_im_looking_for_a_woman] -~chatplayer(neutral, "I'm looking for a woman called ."); -~chatnpc(neutral, "Not heard of her."); +~chatplayer("I'm looking for a woman called ."); +~chatnpc("Not heard of her."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/mourner.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/mourner.rs2 index 3a7b9e37c..723eb2213 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/mourner.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/mourner.rs2 @@ -15,7 +15,7 @@ switch_int(%elena_progress) { // } // // search again to get the closest one just in case // // npc_finduid(~npc_within_distance(coord, npc_719, 14)); -// ~chatplayer(neutral, "I have a warrant from to enter here."); +// ~chatplayer("I have a warrant from to enter here."); // loc_findallzone(coord); // while (loc_findnext = true) { // if (loc_type = loc_2534 & loc_coord = 0_39_51_45_9) { @@ -41,7 +41,7 @@ switch_int(%elena_progress) { // } // // search again to get the closest one just in case // // npc_finduid(~npc_within_distance(coord, npc_719, 14)); -// ~chatplayer(neutral, "I have a warrant from to enter here."); +// ~chatplayer("I have a warrant from to enter here."); // loc_findallzone(coord); // while (loc_findnext = true) { // if (loc_type = loc_2534 & loc_coord = 0_39_51_45_9) { @@ -55,33 +55,33 @@ switch_int(%elena_progress) { //} [label,mourner_stand_back_citizen] -~chatnpc(neutral, "Stand back citizen, do not approach me."); +~chatnpc("Stand back citizen, do not approach me."); [label,mourner_talk_to_player] if (~inzone_coord_pair_table(ardougne_west, coord) = true) { - ~chatnpc(confused, "Hmmm, how did you get over here? You're not one of this rabble. Ah well, you'll have to stay. Can't risk you going back now."); + ~chatnpc("Hmmm, how did you get over here? You're not one of this rabble. Ah well, you'll have to stay. Can't risk you going back now."); @multi3("So what's a mourner?", mourner_so_whats_a_mourner, "I haven't got the plague though...", mourner_i_havent_got_the_plague_though, "I'm looking for a woman named .", mourner_im_looking_for_a_woman); } else { @mourner_outside_gates; } [label,mourner_so_whats_a_mourner] -~chatplayer(quiz, "So what's a mourner?"); -~chatnpc(neutral, "We're working for King Lathas of East Ardougne. He has tasked us with containing the accursed plague sweeping West Ardougne."); -~chatnpc(default, "We also do our best to ease these people's suffering. We're nicknamed mourners because we spend a lot of time at plague victim funerals, no one else is allowed to risk attending."); -~chatnpc(neutral, "It's a demanding job, and we get little thanks from the people here."); +~chatplayer("So what's a mourner?"); +~chatnpc("We're working for King Lathas of East Ardougne. He has tasked us with containing the accursed plague sweeping West Ardougne."); +~chatnpc("We also do our best to ease these people's suffering. We're nicknamed mourners because we spend a lot of time at plague victim funerals, no one else is allowed to risk attending."); +~chatnpc("It's a demanding job, and we get little thanks from the people here."); [label,mourner_i_havent_got_the_plague_though] -~chatplayer(angry, "I haven't got the plague though..."); -~chatnpc(neutral, "Can't risk you being a carrier. That protective clothing you have isn't regulation issue. It won't meet safety standards."); +~chatplayer("I haven't got the plague though..."); +~chatnpc("Can't risk you being a carrier. That protective clothing you have isn't regulation issue. It won't meet safety standards."); [label,mourner_im_looking_for_a_woman] -~chatplayer(neutral, "I'm looking for a woman named ."); -~chatnpc(neutral, "Ah yes, I've heard of her. A healer I believe. She must be mad coming over here voluntarily."); -~chatnpc(neutral, "I hear rumours she has probably caught the plague now. Very tragic, a stupid waste of life."); +~chatplayer("I'm looking for a woman named ."); +~chatnpc("Ah yes, I've heard of her. A healer I believe. She must be mad coming over here voluntarily."); +~chatnpc("I hear rumours she has probably caught the plague now. Very tragic, a stupid waste of life."); [label,head_mourner_talk_to_player] -~chatnpc(neutral, "How did you get into West Ardougne? Ah well you'll have to stay, can't risk you spreading the plague outside."); +~chatnpc("How did you get into West Ardougne? Ah well you'll have to stay, can't risk you spreading the plague outside."); switch_int(%elena_progress) { case ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek: { @multi4("I need clearance to enter a plague house.", head_mourner_i_need_clearance, "So what's a mourner?", mourner_so_whats_a_mourner, "I haven't got the plague though...", mourner_i_havent_got_the_plague_though, "I'm looking for a woman named .", mourner_im_looking_for_a_woman); @@ -91,50 +91,50 @@ switch_int(%elena_progress) { } [label,head_mourner_i_need_clearance] -~chatplayer(neutral, "I need clearance to enter a plague house. It's in the south east corner of West Ardougne."); -~chatnpc(shock, "You must be nuts, absolutely not!"); +~chatplayer("I need clearance to enter a plague house. It's in the south east corner of West Ardougne."); +~chatnpc("You must be nuts, absolutely not!"); @multi3("There's a kidnap victim inside!", head_mourner_theres_a_kidnap_victim_inside, "I've got a gas mask though...", head_mourner_ive_got_a_gas_mask_though, "Yes, I'm utterly crazy.", head_mourner_yes_im_utterly_crazy); [label,head_mourner_theres_a_kidnap_victim_inside] -~chatplayer(angry, "There's a kidnap victim inside!"); -~chatnpc(neutral, "Well they're as good as dead then, no point in trying to save them."); +~chatplayer("There's a kidnap victim inside!"); +~chatnpc("Well they're as good as dead then, no point in trying to save them."); [label,head_mourner_ive_got_a_gas_mask_though] -~chatplayer(confused, "I've got a gas mask though..."); -~chatnpc(neutral, "It's not regulation. Anyway you're not properly trained to deal with the plague."); -~chatplayer(confused, "How do I get trained?"); -~chatnpc(neutral, "It requires a strict 18 months of training."); -~chatplayer(angry, "I don't have that sort of time."); +~chatplayer("I've got a gas mask though..."); +~chatnpc("It's not regulation. Anyway you're not properly trained to deal with the plague."); +~chatplayer("How do I get trained?"); +~chatnpc("It requires a strict 18 months of training."); +~chatplayer("I don't have that sort of time."); [label,head_mourner_yes_im_utterly_crazy] -~chatplayer(confused, "Yes, I'm utterly crazy."); -~chatnpc(angry, "You're wasting my time, I have a lot of work to do!"); +~chatplayer("Yes, I'm utterly crazy."); +~chatnpc("You're wasting my time, I have a lot of work to do!"); [label,mourner_outside_gates] -~chatplayer(happy, "Hi."); -~chatnpc(quiz, "What are you up to?"); -~chatplayer(neutral, "Just sight-seeing."); -~chatnpc(shock, "This is no place for sight-seeing. Don't you know there's been a plague outbreak?"); -~chatplayer(neutral, "Yes, I had heard."); -~chatnpc(neutral, "Then I suggest you leave as soon as you can."); +~chatplayer("Hi."); +~chatnpc("What are you up to?"); +~chatplayer("Just sight-seeing."); +~chatnpc("This is no place for sight-seeing. Don't you know there's been a plague outbreak?"); +~chatplayer("Yes, I had heard."); +~chatnpc("Then I suggest you leave as soon as you can."); @multi3("What brought the plague to Ardougne?", mourner_what_brought_the_plague_to_ardougne, "What are the symptoms of the plague?", mourner_what_are_the_symptoms_of_the_plague, "Thanks for the advice.", mourner_thanks_for_the_advice); [label,mourner_what_brought_the_plague_to_ardougne] -~chatplayer(quiz, "What brought the plague to Ardougne?"); -~chatnpc(neutral, "It's all down to King Tyras of West Ardougne. It started came back from one of his visits to the lands west of here."); -~chatnpc(neutral, "Some of his men must have unknowingly caught it out there and brought it back with them."); -~chatplayer(quiz, "Does he know how bad the sitation is now?"); -~chatnpc(angry, "If he did he wouldn't care. I believe he wants his people to suffer, he's an evil man."); -~chatplayer(shock, "Isn't that treason?"); -~chatnpc(angry, "He's not my king."); +~chatplayer("What brought the plague to Ardougne?"); +~chatnpc("It's all down to King Tyras of West Ardougne. It started came back from one of his visits to the lands west of here."); +~chatnpc("Some of his men must have unknowingly caught it out there and brought it back with them."); +~chatplayer("Does he know how bad the sitation is now?"); +~chatnpc("If he did he wouldn't care. I believe he wants his people to suffer, he's an evil man."); +~chatplayer("Isn't that treason?"); +~chatnpc("He's not my king."); [label,mourner_what_are_the_symptoms_of_the_plague] -~chatplayer(quiz, "What are the symptoms of the plague?"); -~chatnpc(neutral, "The first signs are typical flu symptoms. These tend to be followed by severe nightmares, horrifying hallucinations which drive many to madness."); -~chatplayer(shock, "Sounds nasty."); -~chatnpc(sad, "It gets worse. Next the victim's blood changes into a thick black tar-like liquid, at this point they're past help."); -~chatnpc(sad, "Their skin is cold to the touch, the victim is now brain dead. Their body however lives on driven by the virus, roaming like a zombie, spreading itself further wherever possible."); -~chatplayer(shock, "I think I've heard enough."); +~chatplayer("What are the symptoms of the plague?"); +~chatnpc("The first signs are typical flu symptoms. These tend to be followed by severe nightmares, horrifying hallucinations which drive many to madness."); +~chatplayer("Sounds nasty."); +~chatnpc("It gets worse. Next the victim's blood changes into a thick black tar-like liquid, at this point they're past help."); +~chatnpc("Their skin is cold to the touch, the victim is now brain dead. Their body however lives on driven by the virus, roaming like a zombie, spreading itself further wherever possible."); +~chatplayer("I think I've heard enough."); [label,mourner_thanks_for_the_advice] -~chatplayer(neutral, "Thanks for the advice."); +~chatplayer("Thanks for the advice."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/nurse_sarah.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/nurse_sarah.rs2 index a94002898..8e8de52d0 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/nurse_sarah.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/nurse_sarah.rs2 @@ -1,6 +1,6 @@ [opnpc1,nurse_sarah] -~chatplayer(happy, "Hello there."); -~chatnpc(happy, "Hello my dear, how are you feeling?"); -~chatplayer(happy, "I'm okay thanks."); -~chatnpc(happy, "Well in that case I'd better get back to work. Take care."); -~chatplayer(happy, "You too."); +~chatplayer("Hello there."); +~chatnpc("Hello my dear, how are you feeling?"); +~chatplayer("I'm okay thanks."); +~chatnpc("Well in that case I'd better get back to work. Take care."); +~chatplayer("You too."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/omart.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/omart.rs2 index e7fe3df09..733cfed39 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/omart.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/omart.rs2 @@ -1,5 +1,5 @@ [opnpc1,omart] -~chatplayer(happy, "Hello there."); -~chatnpc(happy, "Hello."); -~chatplayer(quiz, "How are you?"); -~chatnpc(neutral, "Fine thanks."); +~chatplayer("Hello there."); +~chatnpc("Hello."); +~chatplayer("How are you?"); +~chatnpc("Fine thanks."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/priest.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/priest.rs2 index 4a7ae5cf4..19bee76ee 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/priest.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/priest.rs2 @@ -1,3 +1,3 @@ [opnpc1,npc_358] -~chatplayer(neutral, "Hello there."); -~chatnpc(sad, "I wish there was more I could do for these people."); +~chatplayer("Hello there."); +~chatnpc("I wish there was more I could do for these people."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 index 203ea782f..94e5184c0 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/recruiter.rs2 @@ -1,11 +1,11 @@ [opnpc1,recruiter] -~chatnpc(neutral, "Citizens of West Ardougne! King Tyras needs you for his Royal Army! Who will join this noble cause?"); +~chatnpc("Citizens of West Ardougne! King Tyras needs you for his Royal Army! Who will join this noble cause?"); if (.npc_find(coord, npc_728, 14, 0) = true) { - ~.chatnpc(angry, "Plague bringer!"); + ~.chatnpc("Plague bringer!"); } if (.npc_find(coord, npc_729, 14, 0) = true) { - ~.chatnpc(angry, "King Tyras is scum!"); + ~.chatnpc("King Tyras is scum!"); } -~chatnpc(shock, "Tyras will be informed of these words of treason!"); +~chatnpc("Tyras will be informed of these words of treason!"); obj_add(npc_coord, tomato, 1, 200); ~mesbox("Someone throws a at the ."); diff --git a/data/src/scripts/areas/area_ardougne_west/scripts/woman.rs2 b/data/src/scripts/areas/area_ardougne_west/scripts/woman.rs2 index 0768ba260..225994a83 100644 --- a/data/src/scripts/areas/area_ardougne_west/scripts/woman.rs2 +++ b/data/src/scripts/areas/area_ardougne_west/scripts/woman.rs2 @@ -7,38 +7,38 @@ [opnpc1,npc_363] @woman_bah_those_mourners; // woman needs slim fast [label,woman_life_is_tough] -~chatplayer(happy, "Hello, how's it going?"); -~chatnpc(sad, "Life is tough."); +~chatplayer("Hello, how's it going?"); +~chatnpc("Life is tough."); switch_int(%elena_progress) { case ^quest_elena_freed_elena, ^elena_complete: @multi2("Yes, living in a plague city must be hard.", woman_living_in_a_plague_city_must_be_hard, "I'm sorry to hear that.", woman_im_sorry_to_hear_that); case default: @multi3("Yes, living in a plague city must be hard.", woman_living_in_a_plague_city_must_be_hard, "I'm sorry to hear that.", woman_im_sorry_to_hear_that, "I'm looking for a lady called .", woman_im_looking_for_a_lady); } [label,woman_living_in_a_plague_city_must_be_hard] -~chatplayer(sad, "Yes, living in a plague city must be hard."); -~chatnpc(angry, "Plague? Pah, that's no excuse for the treatment we've received. It's obvious pretty quickly if someone has the plague."); -~chatnpc(shifty, "I'm thinking about making a break for it. I'm perfectly healthy, not gonna infect anyone."); +~chatplayer("Yes, living in a plague city must be hard."); +~chatnpc("Plague? Pah, that's no excuse for the treatment we've received. It's obvious pretty quickly if someone has the plague."); +~chatnpc("I'm thinking about making a break for it. I'm perfectly healthy, not gonna infect anyone."); [label,woman_im_sorry_to_hear_that] -~chatplayer(sad, "I'm sorry to hear that."); -~chatnpc(sad, "Well, ain't much either you or me can do about it."); +~chatplayer("I'm sorry to hear that."); +~chatnpc("Well, ain't much either you or me can do about it."); [label,woman_im_looking_for_a_lady] -~chatplayer(neutral, "I'm looking for a lady called ."); -~chatnpc(neutral, "I've not heard of her. Old knows a lot of people, maybe he'll know where you can find her."); +~chatplayer("I'm looking for a lady called ."); +~chatnpc("I've not heard of her. Old knows a lot of people, maybe he'll know where you can find her."); [label,man_woman_help_me_out_of_this_hell_hole] -~chatplayer(happy, "Good day."); -~chatnpc(shock, "An outsider! Can you get me out of this hell hole?"); -~chatplayer(sad, "Sorry, that's not what I'm here to do."); +~chatplayer("Good day."); +~chatnpc("An outsider! Can you get me out of this hell hole?"); +~chatplayer("Sorry, that's not what I'm here to do."); [label,man_woman_go_away_outsider] -~chatplayer(happy, "Hello there."); -~chatnpc(angry, "Go away. People from the outside shut us in like animals. I have nothing to say to you."); +~chatplayer("Hello there."); +~chatnpc("Go away. People from the outside shut us in like animals. I have nothing to say to you."); [label,woman_bah_those_mourners] -~chatplayer(happy, "Hello, how's it going?"); -~chatnpc(shock, "Bah, those mourners... they're meant to be helping us, but I think they're doing more harm than good. They won't even let me send a letter out to my family."); +~chatplayer("Hello, how's it going?"); +~chatnpc("Bah, those mourners... they're meant to be helping us, but I think they're doing more harm than good. They won't even let me send a letter out to my family."); switch_int(%elena_progress) { case ^quest_elena_freed_elena: // nothing case ^elena_complete: // nothing @@ -46,10 +46,10 @@ switch_int(%elena_progress) { } [label,woman_have_you_seen_a_lady_around_here] -~chatplayer(quiz, "Have you seen a lady called around here?"); -~chatnpc(happy, "Yes, I've seen her. Very helpful person."); -~chatnpc(sad, "Not for the last few days though... I thought maybe she'd gone home."); +~chatplayer("Have you seen a lady called around here?"); +~chatnpc("Yes, I've seen her. Very helpful person."); +~chatnpc("Not for the last few days though... I thought maybe she'd gone home."); [label,woman_you_should_stand_up_to_them_more] -~chatplayer(neutral, "You should stand up to them more."); -~chatnpc(sad, "Oh I'm not one to cause a fuss."); +~chatplayer("You should stand up to them more."); +~chatnpc("Oh I'm not one to cause a fuss."); diff --git a/data/src/scripts/areas/area_barbarian_outpost/scripts/barbarian_outpost_guard.rs2 b/data/src/scripts/areas/area_barbarian_outpost/scripts/barbarian_outpost_guard.rs2 index 273d6dfe1..28e9c83cf 100644 --- a/data/src/scripts/areas/area_barbarian_outpost/scripts/barbarian_outpost_guard.rs2 +++ b/data/src/scripts/areas/area_barbarian_outpost/scripts/barbarian_outpost_guard.rs2 @@ -4,49 +4,49 @@ [label,outpost_guard_talk] switch_int(%barcrawl_progress) { case 0: @outpost_guard_start; - case 2: ~chatnpc(happy, "'Ello friend."); + case 2: ~chatnpc("'Ello friend."); case default: @outpost_guard_progress; } [label,outpost_guard_start] -~chatnpc(neutral, "Oi, whaddya want?"); +~chatnpc("Oi, whaddya want?"); def_int $option = ~p_choice2("I want to come through this gate.", 1, "I want some money.", 2); if($option = 1) { - ~chatplayer(neutral, "I want to come through this gate."); - ~chatnpc(neutral, "Barbarians only.|Are you a barbarian?|You don't look like one."); + ~chatplayer("I want to come through this gate."); + ~chatnpc("Barbarians only.|Are you a barbarian?|You don't look like one."); $option = ~p_choice2("Hmm, yep you've got me there.", 1, "Looks can be deceiving, I am in fact a barbarian.", 2); if($option = 1) { - ~chatplayer(sad, "Hmm, yep you've got me there."); + ~chatplayer("Hmm, yep you've got me there."); } else if($option = 2) { - ~chatplayer(shifty, "Looks can be deceiving, I am in fact a barbarian."); - ~chatnpc(shifty, "If you're a barbarian you need to be able to drink like one. We barbarians like a good drink."); - ~chatnpc(happy, "I have the perfect challenge for you...|The Alfred Grimhand Barcrawl!|First completed by Alfred Grimhand."); + ~chatplayer("Looks can be deceiving, I am in fact a barbarian."); + ~chatnpc("If you're a barbarian you need to be able to drink like one. We barbarians like a good drink."); + ~chatnpc("I have the perfect challenge for you...|The Alfred Grimhand Barcrawl!|First completed by Alfred Grimhand."); %barcrawl_progress = ^barcrawl_started; inv_add(inv, barcrawl_card, 1); ~mesbox("The guard hands you a Barcrawl card"); - ~chatnpc(neutral, "Take that card to each of the bars named on it.|The bartenders will know what it means.|We're kinda well known."); - ~chatnpc(neutral, "They'll give you their strongest drink and sign your card. When you've done all that, we'll be happy to let you in."); + ~chatnpc("Take that card to each of the bars named on it.|The bartenders will know what it means.|We're kinda well known."); + ~chatnpc("They'll give you their strongest drink and sign your card. When you've done all that, we'll be happy to let you in."); } } else if($option = 2) { - ~chatplayer(neutral, "I want some money."); - ~chatnpc(angry, "Do I look like a bank to you?"); + ~chatplayer("I want some money."); + ~chatnpc("Do I look like a bank to you?"); } [label,outpost_guard_progress] -~chatnpc(quiz, "So, how's the Barcrawl coming along?"); +~chatnpc("So, how's the Barcrawl coming along?"); if(inv_total(inv, barcrawl_card) = 0 & inv_total(bank, barcrawl_card) = 0) { - ~chatplayer(sad, "I've lost my barcrawl card..."); - ~chatnpc(angry, "What are you like?|You're gonna have to start all over now."); + ~chatplayer("I've lost my barcrawl card..."); + ~chatnpc("What are you like?|You're gonna have to start all over now."); %barcrawl_progress = 1; inv_add(inv, barcrawl_card, 1); ~mesbox("The guard hands you a Barcrawl card"); } else if(inv_total(bank, barcrawl_card) > 0 & inv_total(inv, barcrawl_card) = 0 ) { // RSC mes, OSRS is "Not too bad. I've got my barcrawl card stored somewhere for safe-keeping.", probably changed because of the multiple non-bank storages. - ~chatplayer(neutral, "Not too bad, my barcrawl card is in my bank now."); - ~chatnpc(neutral, "You need to take it with you when you're going on a barcrawl."); + ~chatplayer("Not too bad, my barcrawl card is in my bank now."); + ~chatnpc("You need to take it with you when you're going on a barcrawl."); } else { if(~visited_all_bars = true) { - ~chatplayer(confused, "I tink I jusht 'bout done dem all... but I losht count..."); + ~chatplayer("I tink I jusht 'bout done dem all... but I losht count..."); %barcrawl_progress = ^barcrawl_complete; // remove any dupe cards the player might have, this wont prevent drop tricking to keep one // (which will allow you to restart the minigame, this is consistent with OSRS) @@ -55,8 +55,8 @@ if(inv_total(inv, barcrawl_card) = 0 & inv_total(bank, barcrawl_card) = 0) { inv_del(bank, barcrawl_card, inv_total(inv, barcrawl_card)); } ~mesbox("You give the card to the barbarian"); - ~chatnpc(happy, "Yep that seems fine, you can come in now.|I never learned to read,|but you look like you've drunk plenty."); + ~chatnpc("Yep that seems fine, you can come in now.|I never learned to read,|but you look like you've drunk plenty."); } - ~chatplayer(sad, "I haven't finished it yet."); - ~chatnpc(neutral, "Well come back when you have, you lightweight."); + ~chatplayer("I haven't finished it yet."); + ~chatnpc("Well come back when you have, you lightweight."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_barbarian_village/scripts/barbarian.rs2 b/data/src/scripts/areas/area_barbarian_village/scripts/barbarian.rs2 index 653fb4a2c..0226e11b4 100644 --- a/data/src/scripts/areas/area_barbarian_village/scripts/barbarian.rs2 +++ b/data/src/scripts/areas/area_barbarian_village/scripts/barbarian.rs2 @@ -1,31 +1,31 @@ [opnpc1,barbarian] -~chatplayer(happy, "Hello!"); +~chatplayer("Hello!"); switch_int(random(11)) { case 0: - ~chatnpc(neutral, "Hello!"); + ~chatnpc("Hello!"); case 1: ~mesbox("The barbarian grunts."); case 2: - ~chatnpc(happy, "Good day, my dear fellow."); + ~chatnpc("Good day, my dear fellow."); case 3: - ~chatnpc(angry, "Ug"); + ~chatnpc("Ug"); case 4: ~mesbox("The barbarian ignores you."); case 5: - ~chatnpc(angry, "Grr!"); + ~chatnpc("Grr!"); case 6: - ~chatnpc(angry, "Wanna fight?"); + ~chatnpc("Wanna fight?"); npc_setmode(opplayer2); case 7: - ~chatnpc(angry, "I'm a little busy right now.|We're getting ready for our next barbarian raid!"); + ~chatnpc("I'm a little busy right now.|We're getting ready for our next barbarian raid!"); case 8: - ~chatnpc(angry, "Go away!|This is our village!"); + ~chatnpc("Go away!|This is our village!"); case 9: - ~chatnpc(quiz, "Who are you?"); - ~chatplayer(happy, "I'm a bold adventurer!"); - ~chatnpc(quiz, "You don't look very strong..."); + ~chatnpc("Who are you?"); + ~chatplayer("I'm a bold adventurer!"); + ~chatnpc("You don't look very strong..."); case 10: - ~chatnpc(quiz, "Beer?"); + ~chatnpc("Beer?"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_barbarian_village/scripts/gunthor_the_brave.rs2 b/data/src/scripts/areas/area_barbarian_village/scripts/gunthor_the_brave.rs2 index 9fb340a01..5223cb3fe 100644 --- a/data/src/scripts/areas/area_barbarian_village/scripts/gunthor_the_brave.rs2 +++ b/data/src/scripts/areas/area_barbarian_village/scripts/gunthor_the_brave.rs2 @@ -1,24 +1,24 @@ [opnpc1,gunthor_the_brave] switch_int(random(6)) { case 0: - ~chatnpc(happy, "Ah, you've come for a fight!"); + ~chatnpc("Ah, you've come for a fight!"); case 1: - ~chatnpc(quiz, "What do you want?"); - ~chatplayer(quiz, "What are you offering?"); - ~chatnpc(angry, "A fight!"); + ~chatnpc("What do you want?"); + ~chatplayer("What are you offering?"); + ~chatnpc("A fight!"); case 2: - ~chatnpc(happy, "You look funny!"); + ~chatnpc("You look funny!"); case 3: - ~chatnpc(quiz, "Wanna fight?"); + ~chatnpc("Wanna fight?"); case 4: - ~chatnpc(angry, "Grrr!"); + ~chatnpc("Grrr!"); case 5: - ~chatnpc(angry, "Go away!"); + ~chatnpc("Go away!"); } // Always attacks the player. diff --git a/data/src/scripts/areas/area_barbarian_village/scripts/peksa.rs2 b/data/src/scripts/areas/area_barbarian_village/scripts/peksa.rs2 index 1f3c606cd..0882e07c3 100644 --- a/data/src/scripts/areas/area_barbarian_village/scripts/peksa.rs2 +++ b/data/src/scripts/areas/area_barbarian_village/scripts/peksa.rs2 @@ -1,5 +1,5 @@ [opnpc1,peksa] -~chatnpc(quiz, "Are you interested in buying or selling a helmet?"); +~chatnpc("Are you interested in buying or selling a helmet?"); def_int $option; if(%scorpcatcher_progress = ^scorpcatcher_second_hint) { $option = ~p_choice3("I could be, yes.", 1, "No, I'll pass on that.", 2, "I've heard you have a small scorpion in your possession.", 3); @@ -8,13 +8,13 @@ if(%scorpcatcher_progress = ^scorpcatcher_second_hint) { } if($option = 1) { - ~chatplayer(neutral, "I could be, yes."); + ~chatplayer("I could be, yes."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No, I'll pass on that."); + ~chatplayer("No, I'll pass on that."); } else if($option = 3) { - ~chatplayer(shifty, "I've heard you have a small scorpion in your possession."); - ~chatnpc(quiz, "Now how could you know about that, I wonder?|Mind you, I don't have it anymore."); - ~chatnpc(shifty, "I gave it as a present to my brother Ivor when I visited our outpost northwest of Camelot."); - ~chatnpc(laugh, "Well, actually I hid it in his bed so it would nip him.|It was a bit of a surprise gift."); + ~chatplayer("I've heard you have a small scorpion in your possession."); + ~chatnpc("Now how could you know about that, I wonder?|Mind you, I don't have it anymore."); + ~chatnpc("I gave it as a present to my brother Ivor when I visited our outpost northwest of Camelot."); + ~chatnpc("Well, actually I hid it in his bed so it would nip him.|It was a bit of a surprise gift."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_brimhaven/scripts/alfonse_the_waiter.rs2 b/data/src/scripts/areas/area_brimhaven/scripts/alfonse_the_waiter.rs2 index 9c8fffbbb..18fd80634 100644 --- a/data/src/scripts/areas/area_brimhaven/scripts/alfonse_the_waiter.rs2 +++ b/data/src/scripts/areas/area_brimhaven/scripts/alfonse_the_waiter.rs2 @@ -1,9 +1,9 @@ [opnpc1,alfonse_the_waiter] -~chatnpc(neutral, "Welcome to the Shrimp and Parrot.|Would you like to order, sir?"); +~chatnpc("Welcome to the Shrimp and Parrot.|Would you like to order, sir?"); def_int $option = ~p_choice2("Yes please.", 1, "No thank you.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if ($option = 2) { - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } diff --git a/data/src/scripts/areas/area_brimhaven/scripts/bartender.rs2 b/data/src/scripts/areas/area_brimhaven/scripts/bartender.rs2 index 3c30994a6..825b084cc 100644 --- a/data/src/scripts/areas/area_brimhaven/scripts/bartender.rs2 +++ b/data/src/scripts/areas/area_brimhaven/scripts/bartender.rs2 @@ -1,5 +1,5 @@ [opnpc1,bartender_brimhaven] -~chatnpc(laugh, "Yohoho me hearty what would you like to drink?"); +~chatnpc("Yohoho me hearty what would you like to drink?"); def_int $option; if(testbit(%barcrawl_progress, ^deadman_index) = false & inv_total(inv, barcrawl_card) > 0) { $option = ~p_choice4("Nothing, thank you.", 1, "A pint of Grog please.", 2, "A bottle of rum please.", 3, "I'm doing Alfred Grimhand's barcrawl.", 4); @@ -7,22 +7,22 @@ if(testbit(%barcrawl_progress, ^deadman_index) = false & inv_total(inv, barcrawl $option = ~p_choice3("Nothing, thank you.", 1, "A pint of Grog please.", 2, "A bottle of rum please.", 3); } switch_int ($option) { - case 1: ~chatplayer(neutral, "Nothing, thank you."); + case 1: ~chatplayer("Nothing, thank you."); case 2: - ~chatplayer(happy, "A pint of Grog please."); - ~chatnpc(happy, "One grog coming right up, that'll be three coins."); + ~chatplayer("A pint of Grog please."); + ~chatnpc("One grog coming right up, that'll be three coins."); if (inv_total(inv, coins) < 3) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); return; } inv_del(inv, coins, 3); inv_add(inv, grog, 1); mes("You buy a pint of Grog."); case 3: - ~chatplayer(happy, "A bottle of rum please."); - ~chatnpc(happy, "That'll be 27 coins."); + ~chatplayer("A bottle of rum please."); + ~chatnpc("That'll be 27 coins."); if (inv_total(inv, coins) < 3) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); return; } inv_del(inv, coins, 27); @@ -37,10 +37,10 @@ if(testbit(%barcrawl_progress, ^deadman_index) = false & last_useitem = barcrawl } [label,deadman_barcrawl] -~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(happy, "Haha time to be breaking out the old Supergrog.|That'll be 15 coins please."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Haha time to be breaking out the old Supergrog.|That'll be 15 coins please."); if(inv_total(inv, coins) < 15) { - ~chatplayer(sad, "Sorry I don't have 15 coins."); + ~chatplayer("Sorry I don't have 15 coins."); return; } if_close; diff --git a/data/src/scripts/areas/area_brimhaven/scripts/davon.rs2 b/data/src/scripts/areas/area_brimhaven/scripts/davon.rs2 index e41f6cc13..377360ee7 100644 --- a/data/src/scripts/areas/area_brimhaven/scripts/davon.rs2 +++ b/data/src/scripts/areas/area_brimhaven/scripts/davon.rs2 @@ -1,15 +1,15 @@ [opnpc1,davon] -~chatnpc(default, "Psst! Come here if you want to do some amulet trading."); +~chatnpc("Psst! Come here if you want to do some amulet trading."); def_int $option = ~p_choice3("What are you selling?", 1, "What do you mean pssst?", 2, "Why don't you ever restock some types of amulets?", 3); switch_int ($option) { case 1: ~openshop_activenpc; case 2: - ~chatplayer(default, "What do you mean pssst?"); - ~chatnpc(default, "Errr, I was...I was clearing my throat."); + ~chatplayer("What do you mean pssst?"); + ~chatnpc("Errr, I was...I was clearing my throat."); case 3: - ~chatplayer(default, "Why don't you ever restock some types of amulets?"); - ~chatnpc(default, "Some of these amulets are very hard to get. I have to wait until an adventurer supplies me."); + ~chatplayer("Why don't you ever restock some types of amulets?"); + ~chatnpc("Some of these amulets are very hard to get. I have to wait until an adventurer supplies me."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_brimhaven/scripts/kangai_mau.rs2 b/data/src/scripts/areas/area_brimhaven/scripts/kangai_mau.rs2 index 0b181481d..400619f9a 100644 --- a/data/src/scripts/areas/area_brimhaven/scripts/kangai_mau.rs2 +++ b/data/src/scripts/areas/area_brimhaven/scripts/kangai_mau.rs2 @@ -6,64 +6,64 @@ switch_int (%totem_progress) { } [label,kangai_mau_prequest] -~chatnpc(neutral, "Hello. I Kangai Mau of the Rantuki tribe."); +~chatnpc("Hello. I Kangai Mau of the Rantuki tribe."); def_int $option = ~p_choice3("And what are you doing in Brimhaven?", 1, "I'm in search of adventure!", 2, "Who are the Rantuki tribe?", 3); if($option = 1) { @kangai_mau_brimhaven; } else if($option = 2) { - ~chatplayer(happy, "I'm in search of adventure!"); - ~chatnpc(neutral, "Adventure is something I may be able to give."); + ~chatplayer("I'm in search of adventure!"); + ~chatnpc("Adventure is something I may be able to give."); @kangai_mau_mission; } else if($option = 3) { - ~chatplayer(quiz, "Who are the Rantuki tribe?"); - ~chatnpc(angry, "A proud and noble tribe of Karamja. But now we are few, as men come from across sea, steal our land, and settle on our hunting grounds."); + ~chatplayer("Who are the Rantuki tribe?"); + ~chatnpc("A proud and noble tribe of Karamja. But now we are few, as men come from across sea, steal our land, and settle on our hunting grounds."); @kangai_mau_brimhaven; } [label,kangai_mau_brimhaven] // OSRS cut out a lot of suboption dialogue from here on to get straight to the quest... // https://www.youtube.com/watch?v=JrsT--Rr0Kk& this video covers them! -~chatplayer(quiz, "And what are you doing in Brimhaven?"); -~chatnpc(happy, "I looking for someone brave|to go on important mission for me.|Someone skilled in thievery and sneaking about.|I am told I can find such people in Brimhaven."); +~chatplayer("And what are you doing in Brimhaven?"); +~chatnpc("I looking for someone brave|to go on important mission for me.|Someone skilled in thievery and sneaking about.|I am told I can find such people in Brimhaven."); def_int $option = ~p_choice2("Tell me of this mission.", 1, "Yep, I have heard there are many of that type here.", 2); if($option = 1) { - ~chatplayer(neutral, "Tell me of this mission."); + ~chatplayer("Tell me of this mission."); @kangai_mau_mission; } else if($option = 2) { - ~chatplayer(neutral, "Yep, I have heard there are many of that type here."); - ~chatnpc(sad, "Let's hope I find some help soon."); + ~chatplayer("Yep, I have heard there are many of that type here."); + ~chatnpc("Let's hope I find some help soon."); } [label,kangai_mau_mission] -~chatnpc(happy, "I need someone to go on a mission|to the city of Ardougne.|There you will find the house of Lord Handelmort.|In his house he has our tribal totem."); -~chatnpc(neutral, "We need it back."); +~chatnpc("I need someone to go on a mission|to the city of Ardougne.|There you will find the house of Lord Handelmort.|In his house he has our tribal totem."); +~chatnpc("We need it back."); @multi3("Ok, I will get it back.", kangai_mau_start_totem, "Why does he have it?", kangai_mau_why, "How can I find Handelmort's house?", kangai_mau_house); [label,kangai_mau_start_totem] %totem_progress = ^totem_started; ~send_quest_progress(questlist:totem, %totem_progress, ^totem_complete); -~chatplayer(neutral, "Ok, I will get it back."); -~chatnpc(neutral, "Best of luck with that adventurer."); +~chatplayer("Ok, I will get it back."); +~chatnpc("Best of luck with that adventurer."); [label,kangai_mau_why] -~chatplayer(quiz, "Why does he have it?"); -~chatnpc(happy, "Lord Handelmort is an Ardougnese explorer which means he think he have the right to come to my tribal home, steal our stuff and put in his private museum."); +~chatplayer("Why does he have it?"); +~chatnpc("Lord Handelmort is an Ardougnese explorer which means he think he have the right to come to my tribal home, steal our stuff and put in his private museum."); @multi2("Ok, I will get it back.", kangai_mau_start_totem, "How can I find Handelmort's house?", kangai_mau_house); [label,kangai_mau_house] -~chatplayer(neutral, "How can I find Handelmort's house? Ardougne IS a big place..."); -~chatnpc(neutral, "I dont know Ardougne. You tell me."); +~chatplayer("How can I find Handelmort's house? Ardougne IS a big place..."); +~chatnpc("I dont know Ardougne. You tell me."); @multi2("Ok, I will get it back.", kangai_mau_start_totem, "Why does he have it?", kangai_mau_why); [label,kangai_mau_totem_back] -~chatnpc(neutral, "Have you got our totem back?"); +~chatnpc("Have you got our totem back?"); if(inv_total(inv, totem) > 0 & %totem_progress = 4) { // shouldn't be able to get totem without progress = 4 anyways - ~chatplayer(neutral, "Yes I have."); - ~chatnpc(happy, "You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe."); + ~chatplayer("Yes I have."); + ~chatnpc("You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe."); ~mesbox("You hand over the Tribal Totem."); inv_del(inv, totem, 1); queue(totem_quest_complete, 0); return; } -~chatplayer(sad, "No, it's not that easy."); -~chatnpc(angry, "Bah, you no good."); +~chatplayer("No, it's not that easy."); +~chatnpc("Bah, you no good."); diff --git a/data/src/scripts/areas/area_brimhaven/scripts/pirate_guard.rs2 b/data/src/scripts/areas/area_brimhaven/scripts/pirate_guard.rs2 index 5c6105c53..00b713fcb 100644 --- a/data/src/scripts/areas/area_brimhaven/scripts/pirate_guard.rs2 +++ b/data/src/scripts/areas/area_brimhaven/scripts/pirate_guard.rs2 @@ -1,46 +1,46 @@ [opnpc1,pirate_guard] -~chatplayer(neutral, "Hello!"); +~chatplayer("Hello!"); def_int $rand = random(18); if($rand = 0) { - ~chatnpc(angry, "Batton down the hatches there's a storm brewin!"); + ~chatnpc("Batton down the hatches there's a storm brewin!"); } else if ($rand = 1) { - ~chatnpc(angry, "Ahoy there!"); + ~chatnpc("Ahoy there!"); } else if ($rand = 2) { - ~chatnpc(angry, "Arrh! I be in search of buried treasure!"); + ~chatnpc("Arrh! I be in search of buried treasure!"); } else if ($rand = 3) { - ~chatnpc(angry, "Avast behind!"); - ~chatplayer(angry, "I'm not that fat!"); + ~chatnpc("Avast behind!"); + ~chatplayer("I'm not that fat!"); } else if ($rand = 4) { - ~chatnpc(angry, "All hands on deck!"); + ~chatnpc("All hands on deck!"); } else if ($rand = 5) { - ~chatnpc(angry, "Pieces of eight! pieces of eight!"); - ~chatnpc(quiz, "Oh wait that's the parrot's line."); + ~chatnpc("Pieces of eight! pieces of eight!"); + ~chatnpc("Oh wait that's the parrot's line."); } else if ($rand = 6) { - ~chatnpc(angry, "Great blackbeard's beard!"); + ~chatnpc("Great blackbeard's beard!"); } else if ($rand = 7) { - ~chatnpc(angry, "Arrh be off with ye!"); + ~chatnpc("Arrh be off with ye!"); } else if ($rand = 8) { - ~chatnpc(angry, "Oooh arrh!"); - ~chatnpc(quiz, "No wait. That's a farmer."); + ~chatnpc("Oooh arrh!"); + ~chatnpc("No wait. That's a farmer."); } else if ($rand = 9) { - ~chatnpc(angry, "Arrh!"); + ~chatnpc("Arrh!"); } else if ($rand = 10) { - ~chatnpc(angry, "Arrh I'll keel haul ye!"); + ~chatnpc("Arrh I'll keel haul ye!"); } else if ($rand = 11) { - ~chatnpc(angry, "Avast me hearties!"); + ~chatnpc("Avast me hearties!"); } else if ($rand = 12) { - ~chatnpc(angry, "Yo ho ho and a bottle of alcopop!"); + ~chatnpc("Yo ho ho and a bottle of alcopop!"); } else if ($rand = 13) { - ~chatnpc(angry, "I'm the scourge ofr the six seas!"); - ~chatplayer(neutral, "Don't you mean the seven seas?"); - ~chatnpc(angry, "I'm the scourge of the seven seas!"); + ~chatnpc("I'm the scourge ofr the six seas!"); + ~chatplayer("Don't you mean the seven seas?"); + ~chatnpc("I'm the scourge of the seven seas!"); } else if ($rand = 14) { - ~chatnpc(angry, "Shiver me timbers!"); + ~chatnpc("Shiver me timbers!"); } else if ($rand = 15) { - ~chatnpc(angry, "Arrh arrh!"); + ~chatnpc("Arrh arrh!"); } else if ($rand = 16) { - ~chatnpc(angry, "Good day to you my dear sir!"); + ~chatnpc("Good day to you my dear sir!"); } else if ($rand = 17) { - ~chatnpc(angry, "Yo ho ho me hearties!"); + ~chatnpc("Yo ho ho me hearties!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/king_arthur.rs2 b/data/src/scripts/areas/area_camelot/scripts/king_arthur.rs2 index 5917e0f0d..69a54c9d9 100644 --- a/data/src/scripts/areas/area_camelot/scripts/king_arthur.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/king_arthur.rs2 @@ -2,39 +2,39 @@ if(%grail_progress > ^grail_not_started) { switch_int(%grail_progress) { case ^grail_complete: - ~chatnpc(happy, "Thank you for retrieving the Grail!|You shall be long remembered|as one of the greatest heroes|amongst the Knights of the Round Table!"); + ~chatnpc("Thank you for retrieving the Grail!|You shall be long remembered|as one of the greatest heroes|amongst the Knights of the Round Table!"); case ^grail_finding_percival: - ~chatplayer(neutral, "Hello, do you have a knight named Sir Percival?"); - ~chatnpc(neutral, "Ah yes. I remember young Percival.|He rode off on a quest a couple of months ago.|We are getting a bit worried, he's not back yet..."); - ~chatnpc(neutral, "He was going to try and recover the golden boots of Arkaneeses."); - ~chatplayer(quiz, "Any idea which way that would be?"); - ~chatnpc(neutral, "Not exactly.|We discovered some magic golden feathers|that are said to point the way to the boots..."); - ~chatnpc(neutral, "They certainly point somewhere."); + ~chatplayer("Hello, do you have a knight named Sir Percival?"); + ~chatnpc("Ah yes. I remember young Percival.|He rode off on a quest a couple of months ago.|We are getting a bit worried, he's not back yet..."); + ~chatnpc("He was going to try and recover the golden boots of Arkaneeses."); + ~chatplayer("Any idea which way that would be?"); + ~chatnpc("Not exactly.|We discovered some magic golden feathers|that are said to point the way to the boots..."); + ~chatnpc("They certainly point somewhere."); // https://web.archive.org/web/20041115150440im_/http://img31.imageshack.us/img31/5648/feather.jpg - ~chatnpc(neutral, "Just blowing gently on them|will supposedly show the way to go."); + ~chatnpc("Just blowing gently on them|will supposedly show the way to go."); // https://youtu.be/FPNmOhs8jdw?si=_OTwHKKLGifRzd5M&t=653 if(inv_freespace(inv) = 0) { - ~chatnpc(bored, "Free up some space and I'll give you a feather."); + ~chatnpc("Free up some space and I'll give you a feather."); return; } if(~obj_gettotal(magic_gold_feather) = 0) { inv_add(inv, magic_gold_feather, 1); ~mesbox("King Arthur gives you a feather."); } else { - ~chatnpc(bored, "You've got one of the feathers somewhere - off you go."); // think these check dialogues may have been added to osrs but not sure + ~chatnpc("You've got one of the feathers somewhere - off you go."); // think these check dialogues may have been added to osrs but not sure } case default: - ~chatnpc(quiz, "How goes thy quest?"); + ~chatnpc("How goes thy quest?"); if(inv_total(inv, holy_grail) > 0 & %grail_progress = ^grail_given_whistle) { - ~chatplayer(happy, "I have retrieved the Grail!"); - ~chatnpc(happy, "Wow! Incredible! You truly are a splendid knight!"); + ~chatplayer("I have retrieved the Grail!"); + ~chatnpc("Wow! Incredible! You truly are a splendid knight!"); queue(grail_quest_complete, 0); return; } - ~chatplayer(neutral, "I am making progress, but I have not recovered the Grail yet."); - ~chatnpc(neutral, "Well, the Grail IS very elusive, it may take some perseverance."); + ~chatplayer("I am making progress, but I have not recovered the Grail yet."); + ~chatnpc("Well, the Grail IS very elusive, it may take some perseverance."); if(%grail_progress = ^grail_started) { - ~chatnpc(neutral, "As I said before, speak to Merlin in the workshop by the library."); + ~chatnpc("As I said before, speak to Merlin in the workshop by the library."); } } } else { @@ -46,58 +46,58 @@ if(%grail_progress > ^grail_not_started) { } [label,arthur_merlin_free] -~chatplayer(happy, "I have freed Merlin from his crystal!"); -~chatnpc(happy, "Ah. A good job, well done.|I dub thee a Knight Of The Round Table.|You are now an honorary knight."); +~chatplayer("I have freed Merlin from his crystal!"); +~chatnpc("Ah. A good job, well done.|I dub thee a Knight Of The Round Table.|You are now an honorary knight."); queue(arthur_quest_complete, 0); [label,arthur_grailstart] -~chatplayer(neutral, "Now I am a knight of the round table, do you have any more quests for me?"); -~chatnpc(neutral, "Aha! I'm glad you are here! I am sending out various knights on an important quest. I was wondering if you too would like to take up this quest?"); +~chatplayer("Now I am a knight of the round table, do you have any more quests for me?"); +~chatnpc("Aha! I'm glad you are here! I am sending out various knights on an important quest. I was wondering if you too would like to take up this quest?"); switch_int(~p_choice2("Tell me of this quest.", 1, "I am weary of questing for the time being...", 2)) { case 1: - ~chatplayer(quiz, "Tell me of this quest."); - ~chatnpc(neutral, "Well, we recently found out that the Holy Grail has passed into RuneScape world."); - ~chatnpc(neutral, "This is most fortuitous!"); - ~chatnpc(neutral, "None of my knights ever did return with it last time. Now we have the opportunity to give it another go, maybe this time we will have more luck!"); + ~chatplayer("Tell me of this quest."); + ~chatnpc("Well, we recently found out that the Holy Grail has passed into RuneScape world."); + ~chatnpc("This is most fortuitous!"); + ~chatnpc("None of my knights ever did return with it last time. Now we have the opportunity to give it another go, maybe this time we will have more luck!"); switch_int(~p_choice2("I'd enjoy trying that.", 1, "I may come back and try that later.", 2)) { case 1: - ~chatplayer(neutral, "I'd enjoy trying that."); + ~chatplayer("I'd enjoy trying that."); %grail_progress = ^grail_started; ~send_quest_progress(questlist:grail, %grail_progress, ^grail_complete); - ~chatnpc(neutral, "Go speak to Merlin. He may be able to give a better clue as to where it is now you have freed him from that crystal."); - ~chatnpc(neutral, "He has set up his workshop in the room next to the library."); + ~chatnpc("Go speak to Merlin. He may be able to give a better clue as to where it is now you have freed him from that crystal."); + ~chatnpc("He has set up his workshop in the room next to the library."); case 2: - ~chatplayer(neutral, "I may come back and try that later."); - ~chatnpc(neutral, "Be sure that you come speak to me soon then."); + ~chatplayer("I may come back and try that later."); + ~chatnpc("Be sure that you come speak to me soon then."); } case 2: - ~chatplayer(sad, "I am weary of questing for the time being..."); - ~chatnpc(neutral, "Maybe later then?"); - ~chatplayer(neutral, "Maybe so."); + ~chatplayer("I am weary of questing for the time being..."); + ~chatnpc("Maybe later then?"); + ~chatplayer("Maybe so."); } [label,arthur_firstmeet] -~chatnpc(neutral, "Welcome to my court. I am King Arthur of the Knights of the Round Table."); +~chatnpc("Welcome to my court. I am King Arthur of the Knights of the Round Table."); switch_int(~p_choice3("I want to become a Knight of the Round Table!", 1, "So what are you doing in RuneScape?", 2, "Thank you very much.", 3)) { case 1: - ~chatplayer(neutral, "I want to become a Knight of the Round Table!"); + ~chatplayer("I want to become a Knight of the Round Table!"); if(%arthur_progress > ^arthur_not_started) { - ~chatnpc(neutral, "Well then you must complete your quest to rescue Merlin. Talk to my knights if you need any help."); + ~chatnpc("Well then you must complete your quest to rescue Merlin. Talk to my knights if you need any help."); return; } - ~chatnpc(neutral, "Really? Well then you will need to go on a quest to prove yourself worthy."); - ~chatnpc(neutral, "My knights all appreciate a good quest."); - ~chatnpc(sad, "Unfortunately, our current quest is to rescue Merlin."); - ~chatnpc(confused, "Back in England, he got himself trapped in some|sort of magical crystal. We've moved|him from the cave we found him in and now|he's upstairs in his tower."); + ~chatnpc("Really? Well then you will need to go on a quest to prove yourself worthy."); + ~chatnpc("My knights all appreciate a good quest."); + ~chatnpc("Unfortunately, our current quest is to rescue Merlin."); + ~chatnpc("Back in England, he got himself trapped in some|sort of magical crystal. We've moved|him from the cave we found him in and now|he's upstairs in his tower."); %arthur_progress = ^arthur_started; ~send_quest_progress(questlist:arthur, %arthur_progress, ^arthur_complete); - ~chatplayer(neutral, "I will see what I can do then."); - ~chatnpc(neutral, "Talk to my knights if you need any help."); + ~chatplayer("I will see what I can do then."); + ~chatnpc("Talk to my knights if you need any help."); case 2: - ~chatplayer(neutral, "So what are you doing in RuneScape?"); - ~chatnpc(neutral, "Well legend says we will return to Britain in its time of greatest need. But that's not for quite a while yet."); - ~chatnpc(neutral, "So we've moved the whole outfit here for now."); - ~chatnpc(neutral, "We're passing the time in RuneScape!"); + ~chatplayer("So what are you doing in RuneScape?"); + ~chatnpc("Well legend says we will return to Britain in its time of greatest need. But that's not for quite a while yet."); + ~chatnpc("So we've moved the whole outfit here for now."); + ~chatnpc("We're passing the time in RuneScape!"); case 3: - ~chatplayer(happy, "Thank you very much."); + ~chatplayer("Thank you very much."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/merlin.rs2 b/data/src/scripts/areas/area_camelot/scripts/merlin.rs2 index 1a84c2737..15697dce6 100644 --- a/data/src/scripts/areas/area_camelot/scripts/merlin.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/merlin.rs2 @@ -1,31 +1,31 @@ [opnpc1,merlin_arthur] -~chatplayer(happy, "Hello."); -~chatnpc(confused, "Excuse me for rushing off like this,|but I must get back to my workroom."); +~chatplayer("Hello."); +~chatnpc("Excuse me for rushing off like this,|but I must get back to my workroom."); npc_del; [opnpc1,merlin_workshop] switch_int (%grail_progress) { case ^grail_complete: - ~chatnpc(happy, "Congratulations, brave knight, on aiding Camelot in so many ways! If we ever require help again, I will make sure to call upon you!"); - ~chatplayer(happy, "Thanks!"); - case ^grail_given_whistle: ~chatnpc(happy, "My magic powers tell me that you have discovered the Grail! Take it to Arthur immediately!"); + ~chatnpc("Congratulations, brave knight, on aiding Camelot in so many ways! If we ever require help again, I will make sure to call upon you!"); + ~chatplayer("Thanks!"); + case ^grail_given_whistle: ~chatnpc("My magic powers tell me that you have discovered the Grail! Take it to Arthur immediately!"); case default: - ~chatplayer(neutral, "Hello. King Arthur has sent me on a quest for the Holy Grail. He thought you could offer some assistance."); - ~chatnpc(happy, "Ah yes... the Holy Grail..."); - ~chatnpc(happy, "That is a powerful artefact indeed.|Returning it here would help Camelot a lot."); - ~chatnpc(happy, "Due to its nature the Holy Grail is likely to reside in a holy place."); - ~chatplayer(quiz, "Any suggestions?"); - ~chatnpc(quiz, "I believe there is a holy island somewhere not far away... I'm not entirely sure... I spent too long inside that crystal! Anyway, go and talk to someone over there."); + ~chatplayer("Hello. King Arthur has sent me on a quest for the Holy Grail. He thought you could offer some assistance."); + ~chatnpc("Ah yes... the Holy Grail..."); + ~chatnpc("That is a powerful artefact indeed.|Returning it here would help Camelot a lot."); + ~chatnpc("Due to its nature the Holy Grail is likely to reside in a holy place."); + ~chatplayer("Any suggestions?"); + ~chatnpc("I believe there is a holy island somewhere not far away... I'm not entirely sure... I spent too long inside that crystal! Anyway, go and talk to someone over there."); if(%grail_progress = ^grail_started) { %grail_progress = ^grail_spoken_merlin; } - ~chatnpc(happy, "I suppose you could also try speaking to Sir Galahad?"); - ~chatnpc(happy, "He returned from the quest many years after everyone else. He seems to know something about it, but he can only speak about those experiences cryptically."); + ~chatnpc("I suppose you could also try speaking to Sir Galahad?"); + ~chatnpc("He returned from the quest many years after everyone else. He seems to know something about it, but he can only speak about those experiences cryptically."); switch_int(~p_choice2("Thank you for the advice.", 1, "Where can I find Sir Galahad?", 2)) { case 1: - ~chatplayer(neutral, "Thank you for the advice."); + ~chatplayer("Thank you for the advice."); case 2: - ~chatplayer(quiz, "Where can I find Sir Galahad?"); - ~chatnpc(happy, "Galahad now lives a life of religious contemplation. He lives somewhere west of McGrubor's Wood I think."); + ~chatplayer("Where can I find Sir Galahad?"); + ~chatnpc("Galahad now lives a life of religious contemplation. He lives somewhere west of McGrubor's Wood I think."); } } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_bedivere.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_bedivere.rs2 index bc8a610b3..1e4860a6d 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_bedivere.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_bedivere.rs2 @@ -1,28 +1,28 @@ [opnpc1,sir_bedivere] -~chatnpc(happy, "May I help you?"); +~chatnpc("May I help you?"); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatnpc(happy, "You are looking for the Grail now adventurer?"); - ~chatplayer(neutral, "Absolutely."); - ~chatnpc(happy, "The best of luck to you! Make the name of Camelot proud, and bring it back to us."); + ~chatnpc("You are looking for the Grail now adventurer?"); + ~chatplayer("Absolutely."); + ~chatnpc("The best of luck to you! Make the name of Camelot proud, and bring it back to us."); return; } switch_int (%arthur_progress) { case ^arthur_not_started: - ~chatplayer(neutral, "I'm really just looking for a quest..."); - ~chatnpc(neutral, "Fortune favours us both then adventurer.|I suggest you go and speak to King Arthur."); + ~chatplayer("I'm really just looking for a quest..."); + ~chatnpc("Fortune favours us both then adventurer.|I suggest you go and speak to King Arthur."); case ^arthur_started: - ~chatplayer(quiz, "Merlin's in a crystal. Little help?"); - ~chatnpc(sad, "That is what we were hoping for from you, adventurer!"); - ~chatplayer(confused, "Hmmm. Well, ok, thanks anyway."); + ~chatplayer("Merlin's in a crystal. Little help?"); + ~chatnpc("That is what we were hoping for from you, adventurer!"); + ~chatplayer("Hmmm. Well, ok, thanks anyway."); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: - ~chatplayer(quiz, "I don't suppose you have any idea how to break into Mordred's fort do you?"); - ~chatnpc(sad, "I am afraid not. Would that we could! Mordred and his cronies have been thorns in our side for far too long already!"); - ~chatplayer(neutral, "Ok. Thanks. See you later!"); - ~chatnpc(neutral, "Take care adventurer, Mordred is an evil and powerful foe."); + ~chatplayer("I don't suppose you have any idea how to break into Mordred's fort do you?"); + ~chatnpc("I am afraid not. Would that we could! Mordred and his cronies have been thorns in our side for far too long already!"); + ~chatplayer("Ok. Thanks. See you later!"); + ~chatnpc("Take care adventurer, Mordred is an evil and powerful foe."); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatplayer(quiz, "Know anything about Excalibur?"); - ~chatnpc(confused, "Um... it's a really good sword?"); - ~chatplayer(quiz, "Know where I can find it?"); - ~chatnpc(neutral, "Nope, sorry."); - case ^arthur_complete: ~chatnpc(happy, "All Knights of the Round thank you for your assistance in this trying time for us."); + ~chatplayer("Know anything about Excalibur?"); + ~chatnpc("Um... it's a really good sword?"); + ~chatplayer("Know where I can find it?"); + ~chatnpc("Nope, sorry."); + case ^arthur_complete: ~chatnpc("All Knights of the Round thank you for your assistance in this trying time for us."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_gawain.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_gawain.rs2 index 03fda2b7d..e92d0b277 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_gawain.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_gawain.rs2 @@ -1,13 +1,13 @@ [opnpc1,sir_gawain] -~chatnpc(happy, "Good day to you !"); +~chatnpc("Good day to you !"); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatplayer(neutral, "I seek the Grail in the name of Camelot!"); - ~chatnpc(neutral, "The Grail? That is truly a noble quest indeed. None but Galahad have come close."); - ~chatplayer(quiz, "Galahad? Who is he?"); - ~chatnpc(neutral, "He used to be one of the Knights of the Round Table, but he mysteriously disappeared many years ago."); - ~chatplayer(neutral, "Why would he quit being a Knight?"); - ~chatnpc(sad, "|That is a good question."); - ~chatnpc(sad, "I'm afraid I don't have the answer."); + ~chatplayer("I seek the Grail in the name of Camelot!"); + ~chatnpc("The Grail? That is truly a noble quest indeed. None but Galahad have come close."); + ~chatplayer("Galahad? Who is he?"); + ~chatnpc("He used to be one of the Knights of the Round Table, but he mysteriously disappeared many years ago."); + ~chatplayer("Why would he quit being a Knight?"); + ~chatnpc("|That is a good question."); + ~chatnpc("I'm afraid I don't have the answer."); return; } def_int $option; @@ -16,38 +16,38 @@ switch_int (%arthur_progress) { case ^arthur_started: $option = ~p_choice3("Good day.", 1, "Any ideas on how to get Merlin out of that crystal?", 3, "Do you know how Merlin got trapped?", 4); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: $option = ~p_choice2("Any idea how to get into Morgan Le Faye's stronghold?", 5, "Hello again.", 6); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatplayer(quiz, "Any ideas on finding Excalibur?"); - ~chatnpc(sad, "Unfortunately not, adventurer."); + ~chatplayer("Any ideas on finding Excalibur?"); + ~chatnpc("Unfortunately not, adventurer."); } switch_int ($option) { case 1: - ~chatplayer(neutral, "Good day."); + ~chatplayer("Good day."); case 2: - ~chatplayer(neutral, "Know you of any quests sir knight?"); + ~chatplayer("Know you of any quests sir knight?"); if(%arthur_progress = ^arthur_complete) { - ~chatnpc(confused, "I think you've done the main quest we were on right now..."); + ~chatnpc("I think you've done the main quest we were on right now..."); return; } - ~chatnpc(neutral, "The king is the man to talk to if you want a quest."); + ~chatnpc("The king is the man to talk to if you want a quest."); case 3: - ~chatplayer(neutral, "Any ideas on how to get Merlin out of that crystal?"); - ~chatnpc(confused, "I'm a little stumped myself.|We've tried opening it with anything and everything!"); + ~chatplayer("Any ideas on how to get Merlin out of that crystal?"); + ~chatnpc("I'm a little stumped myself.|We've tried opening it with anything and everything!"); case 4: - ~chatplayer(quiz, "Do you know how Merlin got trapped?"); - ~chatnpc(angry, "I would guess this is the work of the evil Morgan Le Faye!"); - ~chatplayer(quiz, "And where could I find her?"); - ~chatnpc(angry, "She lives in her stronghold to the south of here,|guarded by some renegade knights led by Sir Mordred."); + ~chatplayer("Do you know how Merlin got trapped?"); + ~chatnpc("I would guess this is the work of the evil Morgan Le Faye!"); + ~chatplayer("And where could I find her?"); + ~chatnpc("She lives in her stronghold to the south of here,|guarded by some renegade knights led by Sir Mordred."); %arthur_progress = ^arthur_spoken_gawain; switch_int(~p_choice2("Any idea how to get into Morgan Le Faye's stronghold?", 1, "Thank you for the information.", 2)) { case 1: @sir_gawain_lefaye_stronghold; case 2: - ~chatplayer(neutral, "Thank you for the information."); - ~chatnpc(happy, "It is the least I can do."); + ~chatplayer("Thank you for the information."); + ~chatnpc("It is the least I can do."); } case 5: @sir_gawain_lefaye_stronghold; - case 6: ~chatplayer(neutral, "Hello again."); + case 6: ~chatplayer("Hello again."); } [label,sir_gawain_lefaye_stronghold] -~chatplayer(quiz, "Any idea how to get into Morgan Le Faye's stronghold?"); -~chatnpc(confused, "No, you've got me stumped there..."); \ No newline at end of file +~chatplayer("Any idea how to get into Morgan Le Faye's stronghold?"); +~chatnpc("No, you've got me stumped there..."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_kay.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_kay.rs2 index a2744df68..85640bcc2 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_kay.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_kay.rs2 @@ -2,40 +2,40 @@ if(inv_total(inv, trail_clue_easy_simple_exp026) = 1) { @trail_sir_kay; } -~chatnpc(happy, "Good morrow !"); +~chatnpc("Good morrow !"); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatnpc(happy, "I hear you are questing for the Holy Grail?!"); - ~chatplayer(neutral, "That's right. Any hints?"); - ~chatnpc(happy, "Unfortunately not, Sirrah."); + ~chatnpc("I hear you are questing for the Holy Grail?!"); + ~chatplayer("That's right. Any hints?"); + ~chatnpc("Unfortunately not, Sirrah."); return; } switch_int(%arthur_progress) { case ^arthur_not_started: - ~chatplayer(neutral, "Morning. Know where an adventurer has to go to find a quest around here?"); - ~chatnpc(neutral, "An adventurer eh? There is no service finer than serving the bountiful King Arthur, and I happen to know there's an important quest to fulfill."); + ~chatplayer("Morning. Know where an adventurer has to go to find a quest around here?"); + ~chatnpc("An adventurer eh? There is no service finer than serving the bountiful King Arthur, and I happen to know there's an important quest to fulfill."); case ^arthur_started: - ~chatplayer(quiz, "Any ideas on getting Merlin out of that crystal?"); - ~chatnpc(sad, "Unfortunately not, Sirrah."); - ~chatnpc(sad, "'Tis a magick most powerful and foul."); - ~chatnpc(sad, "The only person I know of who would possibly have been of help is Merlin..."); - ~chatplayer(neutral, "Yeah, that's not actually too helpful."); - ~chatnpc(sad, "I am well aware of that, adventurer."); + ~chatplayer("Any ideas on getting Merlin out of that crystal?"); + ~chatnpc("Unfortunately not, Sirrah."); + ~chatnpc("'Tis a magick most powerful and foul."); + ~chatnpc("The only person I know of who would possibly have been of help is Merlin..."); + ~chatplayer("Yeah, that's not actually too helpful."); + ~chatnpc("I am well aware of that, adventurer."); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: - ~chatplayer(quiz, "Any ideas on getting into Mordred's fort?"); - ~chatnpc(angry, "Mordred... So you think he may be involved with the curse upon Merlin?"); - ~chatplayer(quiz, "Good a guess as any right?"); - ~chatnpc(sad, "I think that you may be onto something there. Unfortunately his fortress is impregnable!"); - ~chatplayer(neutral, "...I'll figure something out."); + ~chatplayer("Any ideas on getting into Mordred's fort?"); + ~chatnpc("Mordred... So you think he may be involved with the curse upon Merlin?"); + ~chatplayer("Good a guess as any right?"); + ~chatnpc("I think that you may be onto something there. Unfortunately his fortress is impregnable!"); + ~chatplayer("...I'll figure something out."); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatnpc(quiz, "Any ideas on finding Excalibur?"); - ~chatnpc(happy, "Unfortunately not, Sirrah."); + ~chatnpc("Any ideas on finding Excalibur?"); + ~chatnpc("Unfortunately not, Sirrah."); case ^arthur_complete: - ~chatnpc(happy, "Sir Knight! Many thanks for your assistance in restoring Merlin to his former freedom!"); - ~chatplayer(neutral, "Hey, no problem."); + ~chatnpc("Sir Knight! Many thanks for your assistance in restoring Merlin to his former freedom!"); + ~chatplayer("Hey, no problem."); } [label,trail_sir_kay] -~chatnpc(happy, "A valiant effort!"); +~chatnpc("A valiant effort!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp026, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_lancelot.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_lancelot.rs2 index 79fe56922..88ce085f0 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_lancelot.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_lancelot.rs2 @@ -1,11 +1,11 @@ [opnpc1,sir_lancelot] -~chatnpc(happy, "Greetings! I am Sir Lancelot, the greatest Knight in the land! What do you want?"); +~chatnpc("Greetings! I am Sir Lancelot, the greatest Knight in the land! What do you want?"); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatplayer(neutral, "I am questing for the Holy Grail."); - ~chatnpc(neutral, "The Grail? Ha! Frankly, little , you're not in that league."); - ~chatplayer(quiz, "Why do you say that?"); - ~chatnpc(neutral, "You got lucky with freeing Merlin but there's no way a puny wannabe like you is going to find the Holy Grail where so many others have failed."); - ~chatplayer(sad, "We'll see about that."); + ~chatplayer("I am questing for the Holy Grail."); + ~chatnpc("The Grail? Ha! Frankly, little , you're not in that league."); + ~chatplayer("Why do you say that?"); + ~chatnpc("You got lucky with freeing Merlin but there's no way a puny wannabe like you is going to find the Holy Grail where so many others have failed."); + ~chatplayer("We'll see about that."); return; } def_int $option; @@ -13,25 +13,25 @@ switch_int (%arthur_progress) { case ^arthur_not_started: $option = ~p_choice2("You're a little full of yourself aren't you?", 1, "I seek a quest!", 2); case ^arthur_started, ^arthur_spoken_lancelot, ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: $option = ~p_choice2("I want to get Merlin out of the crystal.", 3, "You're a little full of yourself aren't you?", 1); case ^arthur_spoken_gawain: $option = ~p_choice3("I want to get Merlin out of the crystal.", 3, "You're a little full of yourself aren't you?", 1, "Any ideas on how to get into Morgan Le Faye's stronghold?", 4); - case ^arthur_complete: ~chatnpc(neutral, "Hmmm. I heard you freed Merlin.|Either you're better than you look or you got lucky.|I think the latter."); + case ^arthur_complete: ~chatnpc("Hmmm. I heard you freed Merlin.|Either you're better than you look or you got lucky.|I think the latter."); } switch_int($option) { case 1: - ~chatplayer(quiz, "You're a little full of yourself aren't you?"); - ~chatnpc(happy, "I have every right to be proud of myself."); - ~chatnpc(happy, "My prowess in battle is world renowned!"); + ~chatplayer("You're a little full of yourself aren't you?"); + ~chatnpc("I have every right to be proud of myself."); + ~chatnpc("My prowess in battle is world renowned!"); case 2: - ~chatplayer(happy, "I seek a quest!"); - ~chatnpc(neutral, "Leave questing to the professionals."); - ~chatnpc(happy, "Such as myself."); + ~chatplayer("I seek a quest!"); + ~chatnpc("Leave questing to the professionals."); + ~chatnpc("Such as myself."); case 3: - ~chatplayer(neutral, "I want to get Merlin out of the crystal."); - ~chatnpc(angry, "Well, if the Knights of the Round Table can't manage it, I can't see how a commoner like you could succeed where we have failed."); + ~chatplayer("I want to get Merlin out of the crystal."); + ~chatnpc("Well, if the Knights of the Round Table can't manage it, I can't see how a commoner like you could succeed where we have failed."); case 4: - ~chatplayer(quiz, "Any ideas on how to get into Morgan Le Faye's stronghold?"); - ~chatnpc(happy, "That stronghold is built in a strong defensive position."); - ~chatnpc(happy, "It's on a big rock sticking out into the sea."); + ~chatplayer("Any ideas on how to get into Morgan Le Faye's stronghold?"); + ~chatnpc("That stronghold is built in a strong defensive position."); + ~chatnpc("It's on a big rock sticking out into the sea."); %arthur_progress = ^arthur_spoken_lancelot; - ~chatnpc(neutral, "There are two ways in that I know of, the large|heavy front doors, and the sea entrance,|only penetrable by boat."); - ~chatnpc(neutral, "They get all their deliveries by boat from Catherby."); + ~chatnpc("There are two ways in that I know of, the large|heavy front doors, and the sea entrance,|only penetrable by boat."); + ~chatnpc("They get all their deliveries by boat from Catherby."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_lucan.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_lucan.rs2 index af975b10c..01393417c 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_lucan.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_lucan.rs2 @@ -1,29 +1,29 @@ [opnpc1,sir_lucan] -~chatnpc(happy, "Hello there adventurer."); +~chatnpc("Hello there adventurer."); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatplayer(neutral, "I seek the Grail of legend!"); - ~chatnpc(happy, "I'm afraid I don't have any suggestions..."); - ~chatplayer(happy, "Thanks. I'll try and find someone who does."); + ~chatplayer("I seek the Grail of legend!"); + ~chatnpc("I'm afraid I don't have any suggestions..."); + ~chatplayer("Thanks. I'll try and find someone who does."); return; } switch_int (%arthur_progress) { case ^arthur_not_started: - ~chatplayer(neutral, "I'm looking for a quest..."); - ~chatnpc(happy, "Talk to the King then adventurer. He is always looking for men of bravery to aid him in his actions."); + ~chatplayer("I'm looking for a quest..."); + ~chatnpc("Talk to the King then adventurer. He is always looking for men of bravery to aid him in his actions."); case ^arthur_started: - ~chatplayer(quiz, "Any suggestions on freeing Merlin?"); - ~chatnpc(neutral, "I've tried all the weapons I can find, yet none are powerful enough to break his crystal prison..."); - ~chatnpc(neutral, "Perhaps the mighty Excalibur would be|strong enough..."); - ~chatplayer(happy, "Excalibur eh? Where would I find that?"); - ~chatnpc(neutral, "The Lady of the Lake is looking after it I believe... but I know not where she resides currently."); - ~chatplayer(happy, "Thanks. I'll try and find someone who does."); + ~chatplayer("Any suggestions on freeing Merlin?"); + ~chatnpc("I've tried all the weapons I can find, yet none are powerful enough to break his crystal prison..."); + ~chatnpc("Perhaps the mighty Excalibur would be|strong enough..."); + ~chatplayer("Excalibur eh? Where would I find that?"); + ~chatnpc("The Lady of the Lake is looking after it I believe... but I know not where she resides currently."); + ~chatplayer("Thanks. I'll try and find someone who does."); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: - ~chatplayer(quiz, "I need to get into Mordred's Fortress."); - ~chatnpc(neutral, "So... you think Mordred's behind this? I'm afraid I don't have any suggestions..."); - ~chatplayer(happy, "Thanks. I'll try and find someone who does."); + ~chatplayer("I need to get into Mordred's Fortress."); + ~chatnpc("So... you think Mordred's behind this? I'm afraid I don't have any suggestions..."); + ~chatplayer("Thanks. I'll try and find someone who does."); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatplayer(quiz, "I need to find Excalibur."); - ~chatnpc(happy, "I'm afraid I don't have any suggestions..."); - ~chatplayer(happy, "Thanks. I'll try and find someone who does."); - case ^arthur_complete: ~chatnpc(happy, "Congratulations on freeing Merlin!"); + ~chatplayer("I need to find Excalibur."); + ~chatnpc("I'm afraid I don't have any suggestions..."); + ~chatplayer("Thanks. I'll try and find someone who does."); + case ^arthur_complete: ~chatnpc("Congratulations on freeing Merlin!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_palomedes.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_palomedes.rs2 index 2d95a7198..c98c70c4a 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_palomedes.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_palomedes.rs2 @@ -1,24 +1,24 @@ [opnpc1,sir_palomedes] -~chatnpc(happy, "Hello there adventurer, what do you want of me?"); +~chatnpc("Hello there adventurer, what do you want of me?"); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatplayer(neutral, "I'd like some advice on finding the Grail."); - ~chatnpc(happy, "Sorry, I cannot help you with that."); + ~chatplayer("I'd like some advice on finding the Grail."); + ~chatnpc("Sorry, I cannot help you with that."); return; } switch_int (%arthur_progress) { case ^arthur_not_started: - ~chatplayer(neutral, "I'd like some advice on finding a quest."); - ~chatnpc(happy, "I do not know of any myself... but it would perhaps be worth your while asking the King if he has any tasks for you."); + ~chatplayer("I'd like some advice on finding a quest."); + ~chatnpc("I do not know of any myself... but it would perhaps be worth your while asking the King if he has any tasks for you."); case ^arthur_started: - ~chatplayer(quiz, "I'd like some advice on breaking that Crystal Merlin's trapped in."); - ~chatnpc(happy, "Sorry, I cannot help you with that."); + ~chatplayer("I'd like some advice on breaking that Crystal Merlin's trapped in."); + ~chatnpc("Sorry, I cannot help you with that."); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: - ~chatplayer(quiz, "I'd like some advice on breaking into Mordred's fort."); - ~chatnpc(happy, "Sorry, I cannot help you with that."); + ~chatplayer("I'd like some advice on breaking into Mordred's fort."); + ~chatnpc("Sorry, I cannot help you with that."); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatplayer(quiz, "I'd like some advice on finding Excalibur."); - ~chatnpc(happy, "orry, I cannot help you with that."); + ~chatplayer("I'd like some advice on finding Excalibur."); + ~chatnpc("orry, I cannot help you with that."); case ^arthur_complete: - ~chatnpc(happy, "After your help freeing Merlin, my help is the least I can offer as a man of honour."); - ~chatplayer(happy, "Nothing right now, but I'll bear it in mind. Thanks."); + ~chatnpc("After your help freeing Merlin, my help is the least I can offer as a man of honour."); + ~chatplayer("Nothing right now, but I'll bear it in mind. Thanks."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_pelleas.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_pelleas.rs2 index 4bfddf7b6..dc017be39 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_pelleas.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_pelleas.rs2 @@ -1,28 +1,28 @@ [opnpc1,sir_pelleas] -~chatnpc(happy, "Greetings to the court of King Arthur!"); +~chatnpc("Greetings to the court of King Arthur!"); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatplayer(neutral, "Any suggestions on finding the Grail?"); - ~chatnpc(neutral, "My best guess would be some sort of spell. Merlin is our magic expert. Ask him?"); - ~chatnpc(neutral, "Although having said that, I believe Galahad found its location once..."); - ~chatplayer(quiz, "Really? Know where I can find him?"); - ~chatnpc(neutral, "I'm afraid not. He left here many moons ago and I know not where he went."); + ~chatplayer("Any suggestions on finding the Grail?"); + ~chatnpc("My best guess would be some sort of spell. Merlin is our magic expert. Ask him?"); + ~chatnpc("Although having said that, I believe Galahad found its location once..."); + ~chatplayer("Really? Know where I can find him?"); + ~chatnpc("I'm afraid not. He left here many moons ago and I know not where he went."); return; } switch_int (%arthur_progress) { case ^arthur_not_started: - ~chatplayer(neutral, "Hello. I'm looking for a quest. Who should I talk to?"); - ~chatnpc(neutral, "King Arthur will let you know.|I believe he has a quest at the moment."); + ~chatplayer("Hello. I'm looking for a quest. Who should I talk to?"); + ~chatnpc("King Arthur will let you know.|I believe he has a quest at the moment."); case ^arthur_started: - ~chatplayer(quiz, "Any suggestions on freeing Merlin?"); - ~chatnpc(neutral, "My best guess would be some sort of magic. Unfortunately Merlin is our magic expert."); - ~chatplayer(quiz, "Ok, well, thanks anyway."); + ~chatplayer("Any suggestions on freeing Merlin?"); + ~chatnpc("My best guess would be some sort of magic. Unfortunately Merlin is our magic expert."); + ~chatplayer("Ok, well, thanks anyway."); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: - ~chatplayer(quiz, "Any suggestions on getting into Mordred's fort?"); - ~chatnpc(neutral, "My best guess would be using magic. Unfortunately Merlin is our magic expert."); - ~chatplayer(quiz, "Ok, well, thanks anyway."); + ~chatplayer("Any suggestions on getting into Mordred's fort?"); + ~chatnpc("My best guess would be using magic. Unfortunately Merlin is our magic expert."); + ~chatplayer("Ok, well, thanks anyway."); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatplayer(quiz, "Any suggestions on finding Excalibur?"); - ~chatnpc(neutral, "My best guess would be using magic. Unfortunately Merlin is our magic expert."); - ~chatplayer(quiz, "Ok, well, thanks anyway."); - case ^arthur_complete: ~chatnpc(neutral, "You are a very talented Knight indeed to have freed Merlin so quickly. You have all of our gratitude."); + ~chatplayer("Any suggestions on finding Excalibur?"); + ~chatnpc("My best guess would be using magic. Unfortunately Merlin is our magic expert."); + ~chatplayer("Ok, well, thanks anyway."); + case ^arthur_complete: ~chatnpc("You are a very talented Knight indeed to have freed Merlin so quickly. You have all of our gratitude."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_camelot/scripts/sir_tristram.rs2 b/data/src/scripts/areas/area_camelot/scripts/sir_tristram.rs2 index 649ca1dd9..f1655697c 100644 --- a/data/src/scripts/areas/area_camelot/scripts/sir_tristram.rs2 +++ b/data/src/scripts/areas/area_camelot/scripts/sir_tristram.rs2 @@ -1,29 +1,29 @@ [opnpc1,sir_tristram] -~chatnpc(happy, "Hail Arthur, King of the Britons!"); -~chatplayer(quiz, "Um... Hello."); +~chatnpc("Hail Arthur, King of the Britons!"); +~chatplayer("Um... Hello."); if(%grail_progress > ^grail_not_started & %grail_progress < ^grail_complete) { - ~chatplayer(neutral, "I am seeking the Grail..."); - ~chatnpc(neutral, "Good luck with that!"); + ~chatplayer("I am seeking the Grail..."); + ~chatnpc("Good luck with that!"); return; } switch_int (%arthur_progress) { case ^arthur_not_started: - ~chatplayer(neutral, "I'm looking for adventure!|More specifically, some sort of quest."); - ~chatnpc(confused, "...Then hail Arthur, King of Britons, like I just said."); - ~chatplayer(neutral, "Oh. Ok."); - ~chatplayer(neutral, "I thought you just had a weird way of saying hello is all."); + ~chatplayer("I'm looking for adventure!|More specifically, some sort of quest."); + ~chatnpc("...Then hail Arthur, King of Britons, like I just said."); + ~chatplayer("Oh. Ok."); + ~chatplayer("I thought you just had a weird way of saying hello is all."); case ^arthur_started: - ~chatplayer(quiz, "Do you know much about breaking magical crystals?"); - ~chatnpc(neutral, "Funnily enough..."); - ~chatnpc(neutral, "Absolutely nothing."); - ~chatplayer(neutral, "Ok. Goodbye."); + ~chatplayer("Do you know much about breaking magical crystals?"); + ~chatnpc("Funnily enough..."); + ~chatnpc("Absolutely nothing."); + ~chatplayer("Ok. Goodbye."); case ^arthur_spoken_gawain, ^arthur_spoken_lancelot: - ~chatplayer(quiz, "I need to get into Mordred's Fort..."); - ~chatnpc(neutral, "Good luck with that!"); + ~chatplayer("I need to get into Mordred's Fort..."); + ~chatnpc("Good luck with that!"); case ^arthur_spoken_morgan_lefaye, ^arthur_excalibur_bound, ^arthur_freed_merlin: - ~chatplayer(quiz, "I need to find Excalibur..."); - ~chatnpc(happy, "Good luck with that!"); + ~chatplayer("I need to find Excalibur..."); + ~chatnpc("Good luck with that!"); case ^arthur_complete: - ~chatnpc(happy, "Thanks for freeing Merlin."); - ~chatplayer(neutral, "No problem. It was easy."); + ~chatnpc("Thanks for freeing Merlin."); + ~chatplayer("No problem. It was easy."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_catherby/scripts/arhein.rs2 b/data/src/scripts/areas/area_catherby/scripts/arhein.rs2 index 9bdf92c06..9d221ec99 100644 --- a/data/src/scripts/areas/area_catherby/scripts/arhein.rs2 +++ b/data/src/scripts/areas/area_catherby/scripts/arhein.rs2 @@ -2,16 +2,16 @@ if(inv_total(inv, trail_clue_easy_simple_exp025) = 1) { @trail_arhein; } -~chatnpc(happy, "Hello! Would you like to trade?"); +~chatnpc("Hello! Would you like to trade?"); def_int $option = ~p_choice3("Yes.", 1, "No thank you.", 2, "Is that your ship?", 3); if($option = 1) { - ~chatplayer(neutral, "Sure."); + ~chatplayer("Sure."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } else if($option = 3) { - ~chatplayer(quiz, "Is that your ship?"); - ~chatnpc(happy, "Yes, I use it to make deliveries to my customers up and down the coast. These crates here are all ready for my next trip."); + ~chatplayer("Is that your ship?"); + ~chatnpc("Yes, I use it to make deliveries to my customers up and down the coast. These crates here are all ready for my next trip."); if(%arthur_progress = ^arthur_spoken_lancelot) { @multi3("Do you deliver to the fort just down the coast?", arhein_fort, "Where do you deliver to?", arhein_deliver, "Are you rich then?", arhein_rich); } @@ -19,37 +19,37 @@ if($option = 1) { } [label,arhein_deliver] -~chatplayer(neutral, "Where do you deliver to?"); -~chatnpc(happy, "Oh, various places up and down the coast.|Mostly Karamja and Port Sarim."); +~chatplayer("Where do you deliver to?"); +~chatnpc("Oh, various places up and down the coast.|Mostly Karamja and Port Sarim."); def_int $option = ~p_choice2("I don't suppose I could get a lift anywhere?", 1, "Well, good luck with your business.", 2); if($option = 1) { - ~chatplayer(neutral, "I don't suppose I could get a lift anywhere?"); - ~chatnpc(happy, "Sorry pal, but I'm afraid I'm not quite ready to sail yet."); + ~chatplayer("I don't suppose I could get a lift anywhere?"); + ~chatnpc("Sorry pal, but I'm afraid I'm not quite ready to sail yet."); // https://web.archive.org/web/20050521020137im_/http://www.runeweb.net/fireball/Merlin%20Crystal%20Images/merlin8.PNG - ~chatnpc(happy, "I'm waiting on a big delivery of candles|which I need to deliver further along the coast."); + ~chatnpc("I'm waiting on a big delivery of candles|which I need to deliver further along the coast."); } else if($option = 2) { - ~chatplayer(neutral, "Well, good luck with your business."); - ~chatnpc(happy, "Thanks buddy!"); + ~chatplayer("Well, good luck with your business."); + ~chatnpc("Thanks buddy!"); } [label,arhein_rich] -~chatplayer(neutral, "Are you rich then?"); -~chatnpc(happy, "Business is going reasonably well...|I wouldn't say I was the richest of merchants ever,|but I'm doing fairly well all things considered."); +~chatplayer("Are you rich then?"); +~chatnpc("Business is going reasonably well...|I wouldn't say I was the richest of merchants ever,|but I'm doing fairly well all things considered."); [label,arhein_fort] -~chatplayer(neutral, "Do you deliver to the fort just down the coast?"); -~chatnpc(happy, "Yes, I do have orders to deliver there from time to time. I think I may have some bits and pieces for them when I leave here next actually."); +~chatplayer("Do you deliver to the fort just down the coast?"); +~chatnpc("Yes, I do have orders to deliver there from time to time. I think I may have some bits and pieces for them when I leave here next actually."); switch_int(~p_choice2("Can you drop me off on the way down please?", 1, "Aren't you worried about supplying evil knights?", 2)) { case 1: - ~chatplayer(neutral, "Can you drop me off on the way down please?"); - ~chatnpc(happy, "I don't think Sir Mordred would like that.|He wants as few outsiders visiting as possible.|I wouldn't want to lose his business."); + ~chatplayer("Can you drop me off on the way down please?"); + ~chatnpc("I don't think Sir Mordred would like that.|He wants as few outsiders visiting as possible.|I wouldn't want to lose his business."); case 2: - ~chatplayer(neutral, "Aren't you worried about supplying evil knights?"); - ~chatnpc(happy, "Hey, you gotta take business where you can find it these days! Besides, if I didn't supply them, someone else would."); + ~chatplayer("Aren't you worried about supplying evil knights?"); + ~chatnpc("Hey, you gotta take business where you can find it these days! Besides, if I didn't supply them, someone else would."); } [label,trail_arhein] -~chatnpc(default, "Well done, matey!"); +~chatnpc("Well done, matey!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp025, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_catherby/scripts/candle_maker.rs2 b/data/src/scripts/areas/area_catherby/scripts/candle_maker.rs2 index aa352041a..fa87b230a 100644 --- a/data/src/scripts/areas/area_catherby/scripts/candle_maker.rs2 +++ b/data/src/scripts/areas/area_catherby/scripts/candle_maker.rs2 @@ -1,18 +1,18 @@ [opnpc1,candle_maker] if(testbit(%excalibur_components_progress, ^blackcandle_index) = true) { - ~chatnpc(quiz, "Have you got any wax yet?"); + ~chatnpc("Have you got any wax yet?"); if(inv_total(inv, bucket_wax) = 0) { - ~chatplayer(sad, "Nope, not yet."); + ~chatplayer("Nope, not yet."); return; } - ~chatplayer(happy, "Yes, I have some now."); + ~chatplayer("Yes, I have some now."); ~mesbox("You exchange the wax with the candle maker for a black candle."); inv_del(inv, bucket_wax, 1); inv_add(inv, black_candle, 1); %excalibur_components_progress = togglebit(%excalibur_components_progress, ^blackcandle_index); return; } -~chatnpc(happy, "Hi! Would you be interested|in some of my fine candles?"); +~chatnpc("Hi! Would you be interested|in some of my fine candles?"); def_int $option; if(%arthur_progress = ^arthur_spoken_morgan_lefaye) { $option = ~p_choice3("Have you got any black candles?", 3, "Yes please.", 1, "No thank you.", 2); @@ -20,18 +20,18 @@ if(%arthur_progress = ^arthur_spoken_morgan_lefaye) { $option = ~p_choice2("Yes Please.", 1, "No thank you.", 2); } if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(happy, "No thank you."); + ~chatplayer("No thank you."); } else if($option = 3) { - ~chatplayer(quiz, "Have you got any black candles?"); - ~chatnpc(shock, "BLACK candles???"); - ~chatnpc(confused, "Hmmm. In the candle making trade,|we have a tradition that|it's very bad luck to make black candles."); - ~chatnpc(confused, "VERY bad luck."); - ~chatplayer(angry, "I will pay good money for one..."); - ~chatnpc(confused, "I still dunno..."); - ~chatnpc(confused, "Tell you what. I'll supply you with a black candle..."); - ~chatnpc(confused, "IF you can bring me a bucket FULL of wax."); + ~chatplayer("Have you got any black candles?"); + ~chatnpc("BLACK candles???"); + ~chatnpc("Hmmm. In the candle making trade,|we have a tradition that|it's very bad luck to make black candles."); + ~chatnpc("VERY bad luck."); + ~chatplayer("I will pay good money for one..."); + ~chatnpc("I still dunno..."); + ~chatnpc("Tell you what. I'll supply you with a black candle..."); + ~chatnpc("IF you can bring me a bucket FULL of wax."); %excalibur_components_progress = togglebit(%excalibur_components_progress, ^blackcandle_index); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_catherby/scripts/harry.rs2 b/data/src/scripts/areas/area_catherby/scripts/harry.rs2 index db14086a1..a4898e34e 100644 --- a/data/src/scripts/areas/area_catherby/scripts/harry.rs2 +++ b/data/src/scripts/areas/area_catherby/scripts/harry.rs2 @@ -1,9 +1,9 @@ [opnpc1,harry] -~chatnpc(happy, "Welcome, you can buy fishing equipment at my store. We'll also give you a good price for any fish that you catch."); +~chatnpc("Welcome, you can buy fishing equipment at my store. We'll also give you a good price for any fish that you catch."); def_int $option = ~p_choice2("Let's see what you've got then.", 1, "Sorry, I'm not interested.", 2); if($option = 1) { - ~chatplayer(neutral, "Let's see what you've got then."); + ~chatplayer("Let's see what you've got then."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Sorry, I'm not interested."); + ~chatplayer("Sorry, I'm not interested."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_catherby/scripts/hickton.rs2 b/data/src/scripts/areas/area_catherby/scripts/hickton.rs2 index b3e86d8a4..eca70d37e 100644 --- a/data/src/scripts/areas/area_catherby/scripts/hickton.rs2 +++ b/data/src/scripts/areas/area_catherby/scripts/hickton.rs2 @@ -1,9 +1,9 @@ [opnpc1,hickton] -~chatnpc(neutral, "Welcome to Hickton's Archery Store.|Do you want to see my wares?"); +~chatnpc("Welcome to Hickton's Archery Store.|Do you want to see my wares?"); def_int $option = ~p_choice2("Yes, please.", 1, "No, I prefer to bash things close up.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes, please."); + ~chatplayer("Yes, please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No, I prefer to bash things close up."); + ~chatplayer("No, I prefer to bash things close up."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_combat_training/scripts/combat_training_camp_npcs.rs2 b/data/src/scripts/areas/area_combat_training/scripts/combat_training_camp_npcs.rs2 index 8a3e943d9..04f7d1228 100644 --- a/data/src/scripts/areas/area_combat_training/scripts/combat_training_camp_npcs.rs2 +++ b/data/src/scripts/areas/area_combat_training/scripts/combat_training_camp_npcs.rs2 @@ -2,48 +2,48 @@ // TODO - facial animations. // TODO - linebreaks. [opnpc1,npc_561] -~chatplayer(neutral, "Hello."); -~chatnpc(neutral, "So, are you looking to buy weapons? King Lathas keeps us very well stocked."); +~chatplayer("Hello."); +~chatnpc("So, are you looking to buy weapons? King Lathas keeps us very well stocked."); def_int $option = ~p_choice2("What do you have?", 0, "No thanks.", 1); switch_int ($option) { case 0: { - ~chatplayer(neutral, "What do you have?"); - ~chatnpc(neutral, "Take a look."); + ~chatplayer("What do you have?"); + ~chatnpc("Take a look."); ~openshop_activenpc; } case 1: { - ~chatplayer(neutral, "No thanks."); + ~chatplayer("No thanks."); } } // Mace Guard // TODO - facial animations. [opnpc1,npc_344] -~chatplayer(neutral, "Hello there."); -~chatnpc(neutral, "What do you want - leave us be!"); +~chatplayer("Hello there."); +~chatnpc("What do you want - leave us be!"); // Crossbow Guard // TODO - facial animations. // TODO - linebreaks. [opnpc1,npc_346] -~chatplayer(neutral, "Hello."); +~chatplayer("Hello."); def_int $random = random(2); switch_int ($random) { case 0: { - ~chatnpc(neutral, "Hello soldier."); - ~chatplayer(neutral, "I'm more of an adventurer really."); - ~chatnpc(neutral, "In this day and age we're all soldiers. No time to waste gassing, Fight! Fight! Fight!"); + ~chatnpc("Hello soldier."); + ~chatplayer("I'm more of an adventurer really."); + ~chatnpc("In this day and age we're all soldiers. No time to waste gassing, Fight! Fight! Fight!"); } case 1: { - ~chatnpc(neutral, "Well hello brave warrior. These ogres have been terrorising the area, they've eaten four of our children this week alone."); - ~chatplayer(neutral, "Brutes!"); - ~chatnpc(neutral, "So we decided to use them for target practice. A fair punishment."); - ~chatplayer(neutral, "Indeed."); + ~chatnpc("Well hello brave warrior. These ogres have been terrorising the area, they've eaten four of our children this week alone."); + ~chatplayer("Brutes!"); + ~chatnpc("So we decided to use them for target practice. A fair punishment."); + ~chatplayer("Indeed."); } } \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/aggie.rs2 b/data/src/scripts/areas/area_draynor/scripts/aggie.rs2 index 9d2104a9f..9273753f4 100644 --- a/data/src/scripts/areas/area_draynor/scripts/aggie.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/aggie.rs2 @@ -1,5 +1,5 @@ [opnpc1,aggie] -~chatnpc(happy, "What can I help you with?"); +~chatnpc("What can I help you with?"); def_int $option; if(%prince_progress >= ^prince_spoken_osman & %prince_progress < ^prince_saved) { $option = ~p_choice5("Could you think of a way to make skin paste?", 5, "What could you make for me?", 1, "Cool, do you turn people into frogs?", 2, "You mad old witch, you can't help me.", 3, "Can you make dyes for me please?", 4); @@ -8,29 +8,29 @@ if(%prince_progress >= ^prince_spoken_osman & %prince_progress < ^prince_saved) } if($option = 1) { - ~chatplayer(quiz, "What could you make for me?"); - ~chatnpc(neutral, "I mostly just make what I find pretty. I sometimes make dye for the women's clothes, brighten the place up. I can make red, yellow and blue dyes. Would you like some?"); + ~chatplayer("What could you make for me?"); + ~chatnpc("I mostly just make what I find pretty. I sometimes make dye for the women's clothes, brighten the place up. I can make red, yellow and blue dyes. Would you like some?"); @aggie_dyes; } else if($option = 2) { - ~chatplayer(happy, "Cool, do you turn people into frogs?"); - ~chatnpc(neutral, "Oh, not for years, but if you meet a talking chicken, you have probably met the professor in the manor north of here. A few years ago it was flying fish. That machine is a menace."); + ~chatplayer("Cool, do you turn people into frogs?"); + ~chatnpc("Oh, not for years, but if you meet a talking chicken, you have probably met the professor in the manor north of here. A few years ago it was flying fish. That machine is a menace."); } else if($option = 3) { - ~chatplayer(angry, "You mad old witch, you can't help me."); + ~chatplayer("You mad old witch, you can't help me."); @aggie_fine; } else if($option = 4) { - ~chatplayer(quiz, "Can you make dyes for me please?"); - ~chatnpc(quiz, "What sort of dye would you like? Red, yellow or blue?"); + ~chatplayer("Can you make dyes for me please?"); + ~chatnpc("What sort of dye would you like? Red, yellow or blue?"); @aggie_dyes; } else if($option = 5) { - ~chatplayer(quiz, "Could you think of a way to make skin paste?"); + ~chatplayer("Could you think of a way to make skin paste?"); if(inv_total(inv, redberry) > 0 & inv_total(inv, pot_of_flour) > 0 & (inv_total(inv, bucket_water) > 0 | inv_total(inv, jug_of_water) > 0) & inv_total(inv, ashes) > 0) { - ~chatnpc(happy, "Yes I can, I see you already have the ingredients. Would you like me to mix some for you now?"); + ~chatnpc("Yes I can, I see you already have the ingredients. Would you like me to mix some for you now?"); @multi2("Yes please. Mix me some skin paste.", aggie_mix_paste, "No thank you, I don't need any skin paste right now.", aggie_no_paste); } else { - ~chatnpc(happy, "Why, it's one of my most popular potions.|The women here, they like to have smooth looking skin.|And I must admit, some of the men buy it as well."); - ~chatnpc(happy, "I can make it for you, just get me what's needed."); - ~chatplayer(quiz, "What do you need to make it?"); - ~chatnpc(neutral, "Well dearie, you need a base for the paste.|That's a mix of ash, flour and water.|Then you need redberries to colour it as you want.|Bring me those four items and I will make you some."); + ~chatnpc("Why, it's one of my most popular potions.|The women here, they like to have smooth looking skin.|And I must admit, some of the men buy it as well."); + ~chatnpc("I can make it for you, just get me what's needed."); + ~chatplayer("What do you need to make it?"); + ~chatnpc("Well dearie, you need a base for the paste.|That's a mix of ash, flour and water.|Then you need redberries to colour it as you want.|Bring me those four items and I will make you some."); } } @@ -45,46 +45,46 @@ switch_obj(last_useitem) { [label,aggie_fine] if(inv_total(inv, coins) >= 21 & inv_total(inv, coins) < 101) { inv_del(inv, coins, 5); - ~chatnpc(angry, "Oh, you like to call a witch names do you?"); + ~chatnpc("Oh, you like to call a witch names do you?"); npc_anim(human_pickpocket, 0); sound_synth(pick, 0, 0); ~objbox(coins_250, "Aggie waves her hands about, and you seem to be 5 coins poorer."); - ~chatnpc(neutral, "That's a fine for insulting a witch. You should learn some respect."); + ~chatnpc("That's a fine for insulting a witch. You should learn some respect."); } else if(inv_total(inv, coins) >= 101) { inv_del(inv, coins, 20); - ~chatnpc(angry, "Oh, you like to call a witch names do you?"); + ~chatnpc("Oh, you like to call a witch names do you?"); npc_anim(human_pickpocket, 0); sound_synth(pick, 0, 0); ~objbox(coins_250, "Aggie waves her hands about, and you seem to be 20 coins poorer."); - ~chatnpc(neutral, "That's a fine for insulting a witch. You should learn some respect."); + ~chatnpc("That's a fine for insulting a witch. You should learn some respect."); } else if(inv_total(inv, pot_of_flour) >= 1) { inv_del(inv, pot_of_flour, 1); - ~chatnpc(angry, "Oh, you like to call a witch names do you?"); + ~chatnpc("Oh, you like to call a witch names do you?"); npc_anim(human_pickpocket, 0); sound_synth(pick, 0, 0); ~objbox(pot_of_flour, "Aggie waves her hands near you, and you seem to have lost some flour."); - ~chatnpc(neutral, "Thank you for your kind present of flour.|I am sure you never meant to insult me."); + ~chatnpc("Thank you for your kind present of flour.|I am sure you never meant to insult me."); } else { - ~chatnpc(angry, "You should be careful about insulting a witch. You never know what shape you could wake up in."); + ~chatnpc("You should be careful about insulting a witch. You never know what shape you could wake up in."); } [label,aggie_dyes] def_int $option = ~p_choice4("What do you need to make red dye?", 1, "What do you need to make yellow dye?", 2, "What do you need to make blue dye?", 3, "No thanks, I am happy the colour I am.", 4); if($option = 1) { - ~chatplayer(quiz, "What do you need to make red dye?"); - ~chatnpc(neutral, "3 lots of redberries and 5 coins to you."); + ~chatplayer("What do you need to make red dye?"); + ~chatnpc("3 lots of redberries and 5 coins to you."); @multi3("Okay, make me some red dye please.", aggie_red_dye, "I don't think I have all the ingredients yet.", aggie_ingredients, "I can do without dye at that price.", aggie_without_dye); } else if($option = 2) { - ~chatplayer(quiz, "What do you need to make yellow dye?"); - ~chatnpc(neutral, "Yellow is a strange colour to get, comes from onion skins. I need 2 onions and 5 coins to make yellow dye."); + ~chatplayer("What do you need to make yellow dye?"); + ~chatnpc("Yellow is a strange colour to get, comes from onion skins. I need 2 onions and 5 coins to make yellow dye."); @multi3("Okay, make me some yellow dye please.", aggie_yellow_dye, "I don't think I have all the ingredients yet.", aggie_ingredients, "I can do without dye at that price.", aggie_without_dye); } else if($option = 3) { - ~chatplayer(quiz, "What do you need to make blue dye?"); - ~chatnpc(neutral, "2 woad leaves and 5 coins to you."); + ~chatplayer("What do you need to make blue dye?"); + ~chatnpc("2 woad leaves and 5 coins to you."); @multi3("Okay, make me some blue dye please.", aggie_blue_dye, "I don't think I have all the ingredients yet.", aggie_ingredients, "I can do without dye at that price.", aggie_without_dye); } else if($option = 4) { - ~chatplayer(neutral, "No thanks, I am happy the colour I am."); - ~chatnpc(neutral, "You are easily pleased with yourself then.|When you need dyes, come to me."); + ~chatplayer("No thanks, I am happy the colour I am."); + ~chatnpc("You are easily pleased with yourself then.|When you need dyes, come to me."); } [label,aggie_yellow_dye] @@ -95,7 +95,7 @@ if(inv_total(inv, onion) < 2) { ~mesbox("You don't have enough coins to pay for the dye!"); return; } -~chatplayer(neutral, "Okay, make me some yellow dye please."); +~chatplayer("Okay, make me some yellow dye please."); inv_del(inv, coins, 5); inv_del(inv, onion, 2); inv_add(inv, yellow_dye, 1); @@ -109,7 +109,7 @@ if(inv_total(inv, redberry) < 3) { ~mesbox("You don't have enough coins to pay for the dye!"); return; } -~chatplayer(neutral, "Okay, make me some red dye please."); +~chatplayer("Okay, make me some red dye please."); inv_del(inv, coins, 5); inv_del(inv, redberry, 3); inv_add(inv, red_dye, 1); @@ -123,37 +123,37 @@ if(inv_total(inv, woad_leaf) < 2) { ~mesbox("You don't have enough coins to pay for the dye!"); return; } -~chatplayer(neutral, "Okay, make me some blue dye please."); +~chatplayer("Okay, make me some blue dye please."); inv_del(inv, coins, 5); inv_del(inv, woad_leaf, 2); inv_add(inv, blue_dye, 1); ~objboxb(blue_dye, "You hand the woad leaves and payment to Aggie.|Aggie takes a blue bottle from nowhere and hands it to you."); [label,aggie_ingredients] -~chatplayer(confused, "I don't think I have all the ingredients yet."); -~chatnpc(neutral, "You know what you need to get now, come back when you have them. Goodbye for now."); +~chatplayer("I don't think I have all the ingredients yet."); +~chatnpc("You know what you need to get now, come back when you have them. Goodbye for now."); [label,aggie_without_dye] -~chatplayer(angry, "I can do without dye at that price."); -~chatnpc(neutral, "That's your choice, but I would think you have killed for less. I can see it in your eyes."); +~chatplayer("I can do without dye at that price."); +~chatnpc("That's your choice, but I would think you have killed for less. I can see it in your eyes."); [label,aggie_mix_paste] -~chatplayer(happy, "Yes please. Mix me some skin paste."); -~chatnpc(happy, "That should be simple. Hand the things to Aggie then."); +~chatplayer("Yes please. Mix me some skin paste."); +~chatnpc("That should be simple. Hand the things to Aggie then."); if(inv_total(inv, bucket_water) > 0) { inv_del(inv, bucket_water, 1); } else if(inv_total(inv, jug_of_water) > 0) { inv_del(inv, jug_of_water, 1); } ~mesbox("You hand the ash, flour, water and redberries to Aggie.|Aggie tips the ingredients into a cauldron|and mutters some words."); -~chatnpc(confused, "Tourniquet, Fenderbaum, Tottenham, Marshmallow, Marblearch."); +~chatnpc("Tourniquet, Fenderbaum, Tottenham, Marshmallow, Marblearch."); inv_del(inv, redberry, 1); inv_del(inv, pot_of_flour, 1); inv_del(inv, ashes, 1); inv_add(inv, paste, 1); ~mesbox("Aggie hands you the skin paste."); -~chatnpc(happy, "There you go dearie, your skin potion.|That will make you look good at the Varrock dances."); +~chatnpc("There you go dearie, your skin potion.|That will make you look good at the Varrock dances."); [label,aggie_no_paste] -~chatplayer(neutral, "No thank you, I don't need any skin paste right now."); -~chatnpc(neutral, "Okay dearie, that's always your choice."); \ No newline at end of file +~chatplayer("No thank you, I don't need any skin paste right now."); +~chatnpc("Okay dearie, that's always your choice."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/diango.rs2 b/data/src/scripts/areas/area_draynor/scripts/diango.rs2 index 64a4caae4..0db261ac7 100644 --- a/data/src/scripts/areas/area_draynor/scripts/diango.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/diango.rs2 @@ -1,5 +1,5 @@ [opnpc1,diango] -~chatnpc(happy, "Howdy there partner!|Want to see my toy horseys?"); +~chatnpc("Howdy there partner!|Want to see my toy horseys?"); @multi2( "Toy horseys?", diango_option1, "I'm fine, thanks.", exit @@ -15,7 +15,7 @@ // todo: this should probably branch into a little conversation before opening the shop // spinning plates -> that's right. there's a funny story behind them, their shipment was held up by thieves. // this type of anecdote but for toy horseys ^ -~chatplayer(quiz, "Toy horseys?"); +~chatplayer("Toy horseys?"); ~openshop_activenpc; [label,toy_horsey_say](seq $anim) diff --git a/data/src/scripts/areas/area_draynor/scripts/joe_guard.rs2 b/data/src/scripts/areas/area_draynor/scripts/joe_guard.rs2 index fb4e3ceb3..f678482fa 100644 --- a/data/src/scripts/areas/area_draynor/scripts/joe_guard.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/joe_guard.rs2 @@ -11,7 +11,7 @@ if(last_useitem = beer) { if(%prince_progress = ^prince_prep_finished) { @joe_beer; } - ~chatplayer(neutral, "I don't see any need to give the guard my beer. I'll keep it for myself."); + ~chatplayer("I don't see any need to give the guard my beer. I'll keep it for myself."); return; } ~displaymessage(^dm_default); @@ -20,80 +20,80 @@ if(last_useitem = beer) { @multi4("I have some beer here, fancy one?", joe_beer, "Tell me about the life of a guard.", joe_life, "What did you want to be when you were a boy?", joe_boy, "I had better leave, I don't want trouble.", joe_leave); [label,joe_beer] -~chatplayer(happy, "I have some beer here, fancy one?"); -~chatnpc(happy, "Ah, that would be lovely,|just one now, just to wet my throat."); -~chatplayer(neutral, "Of course, it must be tough being here without a drink."); +~chatplayer("I have some beer here, fancy one?"); +~chatnpc("Ah, that would be lovely,|just one now, just to wet my throat."); +~chatplayer("Of course, it must be tough being here without a drink."); if(inv_total(inv, beer) <= 0) { - ~chatplayer(sad, "Oh dear, seems like I don't have any beer."); + ~chatplayer("Oh dear, seems like I don't have any beer."); return; } else { ~mesbox("You hand a beer to the guard, he drinks it in seconds."); inv_del(inv, beer, 1); } -~chatnpc(happy, "That was perfect, I can't thank you enough."); -~chatplayer(happy, "How are you? Still ok? Not too drunk?"); +~chatnpc("That was perfect, I can't thank you enough."); +~chatplayer("How are you? Still ok? Not too drunk?"); if(inv_total(inv, beer) < 2) { - ~chatnpc(happy, "No, I don't get drunk with only one drink. You would need a few to do that. But thanks for the beer."); + ~chatnpc("No, I don't get drunk with only one drink. You would need a few to do that. But thanks for the beer."); return; } -~chatplayer(happy, "Would you care for another, my friend?"); -~chatnpc(bored, "I better not, I don't want to be drunk on duty."); -~chatplayer(happy, "Here, just keep these for later,|I hate to see a thirsty guard."); +~chatplayer("Would you care for another, my friend?"); +~chatnpc("I better not, I don't want to be drunk on duty."); +~chatplayer("Here, just keep these for later,|I hate to see a thirsty guard."); inv_del(inv, beer, 2); %prince_progress = ^prince_guard_drunk; ~mesbox("You hand two more beers to the guard.|He takes a sip of one, and then he drinks them both."); -~chatnpc(confused, "Franksh, that wash just what I need to shtay on guard. No more beersh, I don't want to get drunk."); +~chatnpc("Franksh, that wash just what I need to shtay on guard. No more beersh, I don't want to get drunk."); ~mesbox("The guard is drunk, and no longer a problem."); [label,joe_life] -~chatplayer(neutral, "Tell me about the life of a guard."); -~chatnpc(happy, "Well, the hours are good....."); -~chatnpc(sad, ".... But most of those hours are a drag. If only I had spent more time in Knight school when I was a young boy. Maybe I wouldn't be here now, scared of Keli."); +~chatplayer("Tell me about the life of a guard."); +~chatnpc("Well, the hours are good....."); +~chatnpc(".... But most of those hours are a drag. If only I had spent more time in Knight school when I was a young boy. Maybe I wouldn't be here now, scared of Keli."); @multi3("Hey, chill out, I won't cause you trouble.", joe_chill_out, "What did you want to be when you were a boy?", joe_boy, "I had better leave, I don't want trouble.", joe_leave); [label,joe_boy] -~chatplayer(neutral, "What did you want to be when you were a boy?"); -~chatnpc(bored, "Well, I loved to sit by the lake, with my toes in the water and shoot the fish with my bow and arrow."); -~chatplayer(confused, "That was a strange hobby for a little boy."); -~chatnpc(happy, "It kept us from goblin hunting, which was what most boys did. What are you here for?"); +~chatplayer("What did you want to be when you were a boy?"); +~chatnpc("Well, I loved to sit by the lake, with my toes in the water and shoot the fish with my bow and arrow."); +~chatplayer("That was a strange hobby for a little boy."); +~chatnpc("It kept us from goblin hunting, which was what most boys did. What are you here for?"); @multi3("Hey, chill out, I won't cause you trouble.", joe_chill_out, "Tell me about the life of a guard.", joe_life, "I had better leave, I don't want trouble.", joe_leave); [label,joe_chill_out] -~chatplayer(happy, "Hey, chill out, I won't cause you trouble. I was just wondering what you do to relax."); -~chatnpc(neutral, "You never relax with these people, but it's a good career for a young man and some of the shouting I rather like."); -~chatnpc(angry, "RESISTANCE IS USELESS!"); +~chatplayer("Hey, chill out, I won't cause you trouble. I was just wondering what you do to relax."); +~chatnpc("You never relax with these people, but it's a good career for a young man and some of the shouting I rather like."); +~chatnpc("RESISTANCE IS USELESS!"); @multi4("So what do you buy with these great wages?", joe_wages, "Tell me about the life of a guard.", joe_life, "Would you be interested in making a little more money?", joe_money, "I had better leave, I don't want trouble.", joe_leave); [label,joe_wages] -~chatplayer(happy, "So what do you buy with these great wages?"); -~chatnpc(bored, "Really, after working here, there's only time for a drink or three. All us guards go to the same bar and drink ourselves stupid."); -~chatnpc(happy, "It's what I enjoy these days, that fade into unconciousness. I can't resist the sight of a really cold beer."); +~chatplayer("So what do you buy with these great wages?"); +~chatnpc("Really, after working here, there's only time for a drink or three. All us guards go to the same bar and drink ourselves stupid."); +~chatnpc("It's what I enjoy these days, that fade into unconciousness. I can't resist the sight of a really cold beer."); @multi3("Tell me about the life of a guard.", joe_life, "What did you want to be when you were a boy?", joe_boy, "I had better leave, I don't want trouble.", joe_leave); [label,joe_money] -~chatplayer(happy, "Would you be interested in making a little more money?"); -~chatnpc(angry, "WHAT?! Are you trying to bribe me? I may not be a great guard, but I am loyal. How DARE you try to bribe me!"); -~chatplayer(shock, "No, no, you've got the wrong idea, totally. I just wondered if you wanted some part-time bodyguard work."); -~chatnpc(neutral, "Oh... sorry. No, I don't need money. As long as you were not offering me a bribe."); +~chatplayer("Would you be interested in making a little more money?"); +~chatnpc("WHAT?! Are you trying to bribe me? I may not be a great guard, but I am loyal. How DARE you try to bribe me!"); +~chatplayer("No, no, you've got the wrong idea, totally. I just wondered if you wanted some part-time bodyguard work."); +~chatnpc("Oh... sorry. No, I don't need money. As long as you were not offering me a bribe."); @multi3("Tell me about the life of a guard.", joe_life, "What did you want to be when you were a boy?", joe_boy, "I had better leave, I don't want trouble.", joe_leave); [label,joe_leave] -~chatplayer(neutral, "I had better leave, I don't want trouble."); -~chatnpc(happy, "Thanks, I appreciate that. Talking on duty can be punishable by having your mouth stitched up. These are tough people, no mistake."); +~chatplayer("I had better leave, I don't want trouble."); +~chatnpc("Thanks, I appreciate that. Talking on duty can be punishable by having your mouth stitched up. These are tough people, no mistake."); [label,joe_prequest] -~chatnpc(neutral, "Hi, I'm Joe, door guard for Lady Keli."); -~chatplayer(quiz, "Hi, who are you guarding here?"); -~chatnpc(shifty, "Can't say, all very secret. You should get out of here. I am not supposed to talk while I guard."); +~chatnpc("Hi, I'm Joe, door guard for Lady Keli."); +~chatplayer("Hi, who are you guarding here?"); +~chatnpc("Can't say, all very secret. You should get out of here. I am not supposed to talk while I guard."); [label,joe_drunk] // https://youtu.be/UHv5WzFKTsg?si=UAmcVfLQ5zi5_ngZ&t=657 -~chatnpc(confused, "Halt! Who goes there?"); -~chatplayer(quiz, "Hello friend, I am just rescuing the prince, is that ok?"); -~chatnpc(confused, "Thatsh a funny joke. You are lucky I am shober. Go in peace, friend."); +~chatnpc("Halt! Who goes there?"); +~chatplayer("Hello friend, I am just rescuing the prince, is that ok?"); +~chatnpc("Thatsh a funny joke. You are lucky I am shober. Go in peace, friend."); [label,joe_postquest] -~chatnpc(angry, "Halt! Who goes there? Friend or foe?"); -~chatplayer(neutral, "Hi friend, I am just checking out things here."); -~chatnpc(shifty, "The Prince got away, I am in trouble. I better not talk to you, they are not sure I was drunk."); -~chatplayer(neutral, "I won't say anything, your secret is safe with me."); +~chatnpc("Halt! Who goes there? Friend or foe?"); +~chatplayer("Hi friend, I am just checking out things here."); +~chatnpc("The Prince got away, I am in trouble. I better not talk to you, they are not sure I was drunk."); +~chatplayer("I won't say anything, your secret is safe with me."); diff --git a/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 b/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 index ee0a2e62d..0114ed2bd 100644 --- a/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/lady_keli.rs2 @@ -8,96 +8,96 @@ if(%prince_progress >= ^prince_tied_keli) { } return; } -~chatplayer(happy, "Are you the famous Lady Keli? Leader of the toughest gang of mercenary killers around?"); -~chatnpc(bored, "I am Keli, you have heard of me then?"); +~chatplayer("Are you the famous Lady Keli? Leader of the toughest gang of mercenary killers around?"); +~chatnpc("I am Keli, you have heard of me then?"); @multi4("Heard of you? You are famous in RuneScape!", lady_keli_famous, "I have heard a little, but I think Katrine is tougher.", lady_keli_katrine, "I have heard rumours that you kill people.", lady_keli_kill, "No I have never really heard of you.", lady_keli_never); [label,lady_keli_famous] -~chatplayer(happy, "The great Lady Keli, of course I have heard of you. You are famous in RuneScape!"); -~chatnpc(happy, "That's very kind of you to say. Reputations are not easily earned. I have managed to succeed where many fail."); +~chatplayer("The great Lady Keli, of course I have heard of you. You are famous in RuneScape!"); +~chatnpc("That's very kind of you to say. Reputations are not easily earned. I have managed to succeed where many fail."); @multi4("I think Katrine is still tougher.", lady_keli_still_katrine, "What is your latest plan then?", lady_keli_plan, "You must have trained a lot for this work.", lady_keli_trained, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_kill] -~chatplayer(neutral, "I have heard rumours that you kill people."); -~chatnpc(neutral, "There's always someone ready to spread rumours.|I hear all sort of ridiculous things these days."); +~chatplayer("I have heard rumours that you kill people."); +~chatnpc("There's always someone ready to spread rumours.|I hear all sort of ridiculous things these days."); @multi4("I think Katrine is still tougher.", lady_keli_still_katrine, "What is your latest plan then?", lady_keli_plan, "You must have trained a lot for this work.", lady_keli_trained, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_trained] -~chatplayer(happy, "You must have trained a lot for this work."); -~chatnpc(angry, "I have used a sword since I was a small girl.|I stabbed three people before I was 6 years old."); +~chatplayer("You must have trained a lot for this work."); +~chatnpc("I have used a sword since I was a small girl.|I stabbed three people before I was 6 years old."); @multi3("What is your latest plan then?", lady_keli_plan, "I should not disturb someone as tough as you.", lady_keli_not_disturb, "I think Katrine is still tougher.", lady_keli_still_katrine); [label,lady_keli_never] -~chatplayer(neutral, "No I have never really heard of you."); -~chatnpc(shock, "You must be new to this land then. EVERYONE knows of Lady Keli and her prowess with the sword."); +~chatplayer("No I have never really heard of you."); +~chatnpc("You must be new to this land then. EVERYONE knows of Lady Keli and her prowess with the sword."); @multi4("No, still doesn't ring a bell.", lady_keli_bell, "Yes, of course I have heard of you.", lady_keli_famous, "You must have trained a lot for this work.", lady_keli_trained, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_bell] -~chatplayer(confused, "No, still doesn't ring a bell."); -~chatnpc(angry, "Well, you know of me now. I will wring your neck if you do not show respect."); +~chatplayer("No, still doesn't ring a bell."); +~chatnpc("Well, you know of me now. I will wring your neck if you do not show respect."); @multi3("I do not show respect to killers and hoodlums.", lady_keli_hoodlums, "You must have trained a lot for this work", lady_keli_trained, "I should not disturb someone as tough as you, great lady", lady_keli_not_disturb); [label,lady_keli_not_disturb] -~chatplayer(happy, "I should not disturb someone as tough as you, great lady."); -~chatnpc(neutral, "I need to do a lot of work, goodbye. When you get a little tougher, maybe I will give you a job."); +~chatplayer("I should not disturb someone as tough as you, great lady."); +~chatnpc("I need to do a lot of work, goodbye. When you get a little tougher, maybe I will give you a job."); [label,lady_keli_hoodlums] -~chatplayer(neutral, "I do not show respect to killers and hoodlums."); -~chatnpc(angry, "You should, you really should. I am wealthy enough to place a bounty on your head. Or just remove your head myself. Now go, I am busy, too busy to fight a would-be hoodlum."); +~chatplayer("I do not show respect to killers and hoodlums."); +~chatnpc("You should, you really should. I am wealthy enough to place a bounty on your head. Or just remove your head myself. Now go, I am busy, too busy to fight a would-be hoodlum."); [label,lady_keli_katrine] -~chatplayer(neutral, "I have heard a little, but I think Katrine is tougher."); -~chatnpc(angry, "Well you can think that all you like. I know those blackarm cowards dare not leave the city. Out here, I am the toughest. You can tell them that! Now get out of my sight, before I call my guards."); +~chatplayer("I have heard a little, but I think Katrine is tougher."); +~chatnpc("Well you can think that all you like. I know those blackarm cowards dare not leave the city. Out here, I am the toughest. You can tell them that! Now get out of my sight, before I call my guards."); [label,lady_keli_still_katrine] -~chatplayer(neutral, "I think Katrine is still tougher."); -~chatnpc(angry, "Well you can think that all you like. I know those blackarm cowards dare not leave the city. Out here, I am the toughest. You can tell them that! Now get out of my sight, before I call my guards."); +~chatplayer("I think Katrine is still tougher."); +~chatnpc("Well you can think that all you like. I know those blackarm cowards dare not leave the city. Out here, I am the toughest. You can tell them that! Now get out of my sight, before I call my guards."); [label,lady_keli_plan] -~chatplayer(neutral, "What is your latest plan then?|Of course, you need not go into specific details."); -~chatnpc(neutral, "Well, I can tell you I have a valuable prisoner here in my cells."); -~chatnpc(neutral, "I can expect a high reward to be paid very soon for this guy. I can't tell you who he is, but he is a lot colder now."); +~chatplayer("What is your latest plan then?|Of course, you need not go into specific details."); +~chatnpc("Well, I can tell you I have a valuable prisoner here in my cells."); +~chatnpc("I can expect a high reward to be paid very soon for this guy. I can't tell you who he is, but he is a lot colder now."); @multi4("Ah I see. You must have been very skillful.", lady_keli_skillful, "Thats great, are you sure they will pay?", lady_keli_pay, "Can you be sure they will not try to get him out?", lady_keli_out, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_skillful] -~chatplayer(neutral, "You must have been very skillful."); -~chatnpc(neutral, "Yes. I did most of the work. We had to grab the Pr..."); -~chatnpc(neutral, "Er, we had to grab him without his ten bodyguards noticing. It was a stroke of genius."); +~chatplayer("You must have been very skillful."); +~chatnpc("Yes. I did most of the work. We had to grab the Pr..."); +~chatnpc("Er, we had to grab him without his ten bodyguards noticing. It was a stroke of genius."); @multi3("Are you sure they will pay?", lady_keli_pay, "Can you be sure they will not try to get him out?", lady_keli_out, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_pay] -~chatplayer(quiz, "Are you sure they will pay?"); -~chatnpc(neutral, "They will pay, or we will cut his hair off and send it to them."); -~chatplayer(quiz, "How about trying something tougher? Maybe cut his finger off?"); -~chatnpc(neutral, "That's a good idea, I could use talented people like you. I may call on you if I need work doing."); +~chatplayer("Are you sure they will pay?"); +~chatnpc("They will pay, or we will cut his hair off and send it to them."); +~chatplayer("How about trying something tougher? Maybe cut his finger off?"); +~chatnpc("That's a good idea, I could use talented people like you. I may call on you if I need work doing."); @multi3("You must have been very skillful.", lady_keli_skillful, "Can you be sure they will not try to get him out?", lady_keli_out, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_out] -~chatplayer(neutral, "Can you be sure they will not try to get him out?"); -~chatnpc(neutral, "There is no way to release him.|The only key to the door is on a chain around my neck|and the locksmith who made the lock|died suddenly when he had finished."); -~chatnpc(neutral, "There is not another key like this in the world."); +~chatplayer("Can you be sure they will not try to get him out?"); +~chatnpc("There is no way to release him.|The only key to the door is on a chain around my neck|and the locksmith who made the lock|died suddenly when he had finished."); +~chatnpc("There is not another key like this in the world."); @multi3("Could I see the key please?", lady_keli_key_please, "That is a good way to keep secrets.", lady_keli_secrets, "I should not disturb someone as tough as you.", lady_keli_not_disturb); [label,lady_keli_secrets] -~chatplayer(neutral, "That is a good way to keep secrets."); -~chatnpc(neutral, "It is the best way I know.|Dead men tell no tales."); -~chatplayer(neutral, "I am glad I know none of your secrets, Keli."); +~chatplayer("That is a good way to keep secrets."); +~chatnpc("It is the best way I know.|Dead men tell no tales."); +~chatplayer("I am glad I know none of your secrets, Keli."); [label,lady_keli_key_please] -~chatplayer(neutral, "Could I see the key please? Just for a moment. It would be something I can tell my grandchildren. When you are even more famous than you are now."); -~chatnpc(happy, "As you put it that way I am sure you can see it.|You cannot steal the key, it is on a Runite chain."); +~chatplayer("Could I see the key please? Just for a moment. It would be something I can tell my grandchildren. When you are even more famous than you are now."); +~chatnpc("As you put it that way I am sure you can see it.|You cannot steal the key, it is on a Runite chain."); ~mesbox("Keli shows you a small key on a strong looking chain."); if(%prince_progress = ^prince_spoken_osman & inv_total(inv, soft_clay) >= 1) { @multi2("Could I touch the key for a moment?", lady_keli_touch_key, "I should not disturb someone as tough as you.", lady_keli_not_disturb); } else { - ~chatnpc(neutral, "There, run along now, I am very busy."); + ~chatnpc("There, run along now, I am very busy."); } [label,lady_keli_touch_key] -~chatplayer(happy, "Could I touch the key a moment please?"); -~chatnpc(neutral, "Only for a moment then."); +~chatplayer("Could I touch the key a moment please?"); +~chatnpc("Only for a moment then."); ~mesbox("You put a piece of your soft clay in your hand.|As you touch the key, you take an imprint of it."); inv_del(inv, soft_clay, 1); inv_add(inv, key_print, 1); -~chatplayer(happy, "Thank you so much, you are too kind, o great Keli."); -~chatnpc(neutral, "You are welcome, run along now, I am very busy."); \ No newline at end of file +~chatplayer("Thank you so much, you are too kind, o great Keli."); +~chatnpc("You are welcome, run along now, I am very busy."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/leela.rs2 b/data/src/scripts/areas/area_draynor/scripts/leela.rs2 index 86d5cecdf..59748b5ab 100644 --- a/data/src/scripts/areas/area_draynor/scripts/leela.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/leela.rs2 @@ -1,29 +1,29 @@ [opnpc1,leela] switch_int (%prince_progress) { case ^prince_not_started, ^prince_started: - ~chatplayer(happy, "What are you waiting here for?"); - ~chatnpc(neutral, "That is no concern of yours, adventurer."); + ~chatplayer("What are you waiting here for?"); + ~chatnpc("That is no concern of yours, adventurer."); case ^prince_spoken_osman, ^prince_prep_finished: @leela_help; - case ^prince_guard_drunk: ~chatnpc(neutral, "Great! The guard is now harmless. Now you just need to use the rope on Keli to remove her. Then you can go in and give everything to the prince."); - case ^prince_tied_keli: ~chatnpc(neutral, "You should carry on, get in and rescue the prince. Keli is sharp, she won't stay tied up long."); // from chisel - case ^prince_saved, ^prince_complete: ~chatnpc(happy, "Thank you, Al-Kharid will forever owe you for your help.|I think that if there is ever anything that needs to be done,|you will be someone they can rely on.");; + case ^prince_guard_drunk: ~chatnpc("Great! The guard is now harmless. Now you just need to use the rope on Keli to remove her. Then you can go in and give everything to the prince."); + case ^prince_tied_keli: ~chatnpc("You should carry on, get in and rescue the prince. Keli is sharp, she won't stay tied up long."); // from chisel + case ^prince_saved, ^prince_complete: ~chatnpc("Thank you, Al-Kharid will forever owe you for your help.|I think that if there is ever anything that needs to be done,|you will be someone they can rely on.");; } [label,leela_help] if(%prince_keystatus = ^prince_keymade) { - ~chatnpc(neutral, "My father sent this key for you.|Be careful not to lose it."); + ~chatnpc("My father sent this key for you.|Be careful not to lose it."); ~mesbox("Leela gives you a copy of the key to the prince's door."); inv_add(inv, bronze_key, 1); %prince_keystatus = ^prince_prep_finished; } if(%prince_keystatus = ^prince_keyclaimed & inv_total(inv, bronze_key) = 0 & inv_total(bank, bronze_key) = 0) { - ~chatplayer(sad, "I'm afraid I lost that key you gave me."); - ~chatnpc(angry, "Foolish ! A new key will cost 15 coins."); + ~chatplayer("I'm afraid I lost that key you gave me."); + ~chatnpc("Foolish ! A new key will cost 15 coins."); if(inv_total(inv, coins) < 15) { - ~chatplayer(sad, "I haven't got 15 coins with me."); - ~chatnpc(neutral, "Then come back to me when you do."); + ~chatplayer("I haven't got 15 coins with me."); + ~chatnpc("Then come back to me when you do."); } - ~chatplayer(neutral, "Here, I have 15 coins."); + ~chatplayer("Here, I have 15 coins."); ~mesbox("Leela gives you another key."); inv_add(inv, bronze_key, 1); inv_del(inv, coins, 15); @@ -31,96 +31,96 @@ if(%prince_keystatus = ^prince_keyclaimed & inv_total(inv, bronze_key) = 0 & inv } if(%prince_progress = ^prince_spoken_osman & inv_total(inv, bronze_key) >= 1 & inv_total(inv, wig_blonde) >= 1 & inv_total(inv, pink_skirt) >= 1 & inv_total(inv, paste) >= 1) { %prince_progress = ^prince_prep_finished; - ~chatnpc(shifty, "Good, you have all the basic equipment. Next to deal with the guard on the door. He is talkative, try to find a weakness in him."); + ~chatnpc("Good, you have all the basic equipment. Next to deal with the guard on the door. He is talkative, try to find a weakness in him."); } else if(%prince_progress = ^prince_prep_finished) { // mesanims guessed cause no video + not on osrs, dialogue from chisel - ~chatnpc(neutral, "Ok now, you have all the basic equipment.|What are your plans to stop the guard interfering?"); + ~chatnpc("Ok now, you have all the basic equipment.|What are your plans to stop the guard interfering?"); switch_int(~p_choice4("I haven't spoken to him yet.", 1, "I was going to attack him.", 2, "I hoped to get him drunk.", 3, "Maybe I could bribe him to leave.", 4)) { case 1: - ~chatplayer(neutral, "I haven't spoken to him yet."); - ~chatnpc(neutral, "Well, speaking to him may find a weakness he has.|See if there's something that could stop him bothering us."); + ~chatplayer("I haven't spoken to him yet."); + ~chatnpc("Well, speaking to him may find a weakness he has.|See if there's something that could stop him bothering us."); case 2: - ~chatplayer(neutral, "I was going to attack him."); - ~chatnpc(bored, "I don't think you should. If you do the rest of the gang and Keli would attack you. The door guard should be removed first, to make it easy."); + ~chatplayer("I was going to attack him."); + ~chatnpc("I don't think you should. If you do the rest of the gang and Keli would attack you. The door guard should be removed first, to make it easy."); case 3: - ~chatplayer(neutral, "I hoped to get him drunk."); - ~chatnpc(neutral, "Well, that's possible. These guards do like a drink.|I would think it will take at least 3 beers to do it well.|You would probably have to do it all at the same time too.|The effects of the local beer wear off quickly."); + ~chatplayer("I hoped to get him drunk."); + ~chatnpc("Well, that's possible. These guards do like a drink.|I would think it will take at least 3 beers to do it well.|You would probably have to do it all at the same time too.|The effects of the local beer wear off quickly."); case 4: - ~chatplayer(neutral, "Maybe I could bribe him to leave."); - ~chatnpc(shifty, "You could try. I don't think the emir will pay anything towards it. And we did bribe one of their guards once."); - ~chatnpc(shifty, "Keli killed him in front of the other guards, as a deterrent. It would probably take a lot of gold."); + ~chatplayer("Maybe I could bribe him to leave."); + ~chatnpc("You could try. I don't think the emir will pay anything towards it. And we did bribe one of their guards once."); + ~chatnpc("Keli killed him in front of the other guards, as a deterrent. It would probably take a lot of gold."); } - ~chatnpc(neutral, "Good luck with the guard. When the guard is out you can tie up Keli."); + ~chatnpc("Good luck with the guard. When the guard is out you can tie up Keli."); } else { - ~chatplayer(neutral, "I am here to help you free the prince."); - ~chatnpc(neutral, "Your employment is known to me.|Now, do you know all that we need to make the break?"); + ~chatplayer("I am here to help you free the prince."); + ~chatnpc("Your employment is known to me.|Now, do you know all that we need to make the break?"); @multi4("I must make a disguise. What do you suggest?", leela_disguise, "I need to get the key made.", leela_need_key, "What can I do with the guards?", leela_guards, "I will go and get the rest of the escape equipment.", leela_rest_escape); } [label,leela_disguise] -~chatplayer(quiz, "I must make a disguise. What do you suggest?"); -~chatnpc(bored, "Only the lady Keli, can wander about outside the jail. The guards will shoot to kill if they see the prince out so we need a disguise good enough to fool them at a distance."); +~chatplayer("I must make a disguise. What do you suggest?"); +~chatnpc("Only the lady Keli, can wander about outside the jail. The guards will shoot to kill if they see the prince out so we need a disguise good enough to fool them at a distance."); if(inv_total(inv, wig_blonde) >= 1) { - ~chatnpc(neutral, "The wig you have got, well done."); + ~chatnpc("The wig you have got, well done."); } else { - ~chatnpc(neutral, "You need a wig, maybe made from wool. If you find someone who can work with wool ask them about it. There's a witch nearby may be able to help you dye it."); + ~chatnpc("You need a wig, maybe made from wool. If you find someone who can work with wool ask them about it. There's a witch nearby may be able to help you dye it."); } if(inv_total(inv, pink_skirt) >= 1) { - ~chatnpc(neutral, "You have got the skirt, good."); + ~chatnpc("You have got the skirt, good."); } else { - ~chatnpc(neutral, "You will need to get a pink skirt, same as Keli's."); + ~chatnpc("You will need to get a pink skirt, same as Keli's."); } if(inv_total(inv, paste) >= 1) { - ~chatnpc(neutral, "You have the skin paint, well done.|I thought you would struggle to make that."); + ~chatnpc("You have the skin paint, well done.|I thought you would struggle to make that."); } else { - ~chatnpc(neutral, "We still need something to colour the Prince's skin lighter. There's a witch close to here. She knows about many things. She may know some way to make the skin lighter."); + ~chatnpc("We still need something to colour the Prince's skin lighter. There's a witch close to here. She knows about many things. She may know some way to make the skin lighter."); } if(inv_total(inv, wig_blonde) >= 1 & inv_total(inv, pink_skirt) >= 1 & inv_total(inv, paste) >= 1) { - ~chatnpc(neutral, "You do have everything for the disguise."); + ~chatnpc("You do have everything for the disguise."); } if(inv_total(inv, rope) >= 1) { - ~chatnpc(shifty, "You have the rope I see, to tie up Keli.|That will be the most dangerous part of the plan."); + ~chatnpc("You have the rope I see, to tie up Keli.|That will be the most dangerous part of the plan."); } else { - ~chatnpc(shifty, "You will still need some rope to tie up Keli, of course. I heard that there was a good rope maker around here..."); + ~chatnpc("You will still need some rope to tie up Keli, of course. I heard that there was a good rope maker around here..."); } @multi3("I need to get the key made.", leela_need_key, "What can I do with the guards?", leela_guards, "I will go and get the rest of the escape equipment.", leela_rest_escape); [label,leela_need_key] -~chatplayer(neutral, "I need to get the key made."); -~chatnpc(neutral, "Yes, that is most important.|There is no way you can get the real key.|It is on a chain around Keli's neck. Almost impossible to steal."); -~chatnpc(shifty, "Get some soft clay and get her to show you the key somehow. Then take the print, with bronze, to my father."); +~chatplayer("I need to get the key made."); +~chatnpc("Yes, that is most important.|There is no way you can get the real key.|It is on a chain around Keli's neck. Almost impossible to steal."); +~chatnpc("Get some soft clay and get her to show you the key somehow. Then take the print, with bronze, to my father."); @multi3("I must make a disguise. What do you suggest?", leela_disguise, "What can I do with the guards?", leela_guards, "I will go and get the rest of the escape equipment.", leela_rest_escape); [label,leela_guards] -~chatplayer(neutral, "What can I do with the guards?"); -~chatnpc(bored, "Most of the guards will be easy. The disguise will get past them. The only guard who will be a problem will be the one at the door."); -~chatnpc(bored, "We can discuss this more when you have the rest of the escape kit."); +~chatplayer("What can I do with the guards?"); +~chatnpc("Most of the guards will be easy. The disguise will get past them. The only guard who will be a problem will be the one at the door."); +~chatnpc("We can discuss this more when you have the rest of the escape kit."); @multi3("I must make a disguise. What do you suggest?", leela_disguise, "I need to get the key made.", leela_need_key, "I will go and get the rest of the escape equipment.", leela_rest_escape); [label,leela_rest_escape] -~chatplayer(neutral, "I will go and get the rest of the escape equipment."); -~chatnpc(shifty, "Good, I shall await your return with everything."); +~chatplayer("I will go and get the rest of the escape equipment."); +~chatnpc("Good, I shall await your return with everything."); [label,leela_post_key] if(inv_total(inv, bronze_key) = 0 & inv_total(bank, bronze_key) = 0) { - ~chatplayer(sad, "I'm afraid I lost that key you gave me."); - ~chatnpc(angry, "Foolish ! A new key will cost 15 coins."); + ~chatplayer("I'm afraid I lost that key you gave me."); + ~chatnpc("Foolish ! A new key will cost 15 coins."); if(inv_total(inv, coins) < 15) { - ~chatplayer(sad, "I haven't got 15 coins with me."); - ~chatnpc(neutral, "Then come back to me when you do."); + ~chatplayer("I haven't got 15 coins with me."); + ~chatnpc("Then come back to me when you do."); } - ~chatplayer(neutral, "Here, I have 15 coins."); + ~chatplayer("Here, I have 15 coins."); ~mesbox("Leela gives you another key."); inv_add(inv, bronze_key, 1); inv_del(inv, coins, 15); } else if (%prince_progress >= ^prince_guard_drunk) { - ~chatnpc(neutral, "Great! The guard is now harmless.|Now you just need to use the rope on Keli to remove her.|Then you can go in and give everything to the prince."); + ~chatnpc("Great! The guard is now harmless.|Now you just need to use the rope on Keli to remove her.|Then you can go in and give everything to the prince."); } else if(inv_total(inv, bronze_key) >= 1 & inv_total(inv, wig_blonde) >= 1 & inv_total(inv, pink_skirt) >= 1 & inv_total(inv, paste) >= 1) { - ~chatnpc(shifty, "Good, you have all the basic equipment. Next to deal with the guard on the door. He is talkative, try to find a weakness in him."); + ~chatnpc("Good, you have all the basic equipment. Next to deal with the guard on the door. He is talkative, try to find a weakness in him."); } else { @leela_help; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/morgan.rs2 b/data/src/scripts/areas/area_draynor/scripts/morgan.rs2 index a373177d4..c00384761 100644 --- a/data/src/scripts/areas/area_draynor/scripts/morgan.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/morgan.rs2 @@ -9,31 +9,31 @@ switch_int (%vampire_progress) { } [label,morgan_before_vampire_slayer] -~chatnpc(shock, "Please please help us, bold adventurer!"); -~chatplayer(happy, "What's the problem?"); -~chatnpc(shock, "Our little village has been dreadfully ravaged by an evil vampire! He lives in the basement of the manor to the north, we need someone to get rid of him once and for all!"); +~chatnpc("Please please help us, bold adventurer!"); +~chatplayer("What's the problem?"); +~chatnpc("Our little village has been dreadfully ravaged by an evil vampire! He lives in the basement of the manor to the north, we need someone to get rid of him once and for all!"); switch_int (~p_choice3("No, vampires are scary!", 1, "Ok, I'm up for an adventure.", 2, "Have you got any tips on killing the vampire?", 3)) { case 1: @morgan_decline_vampire_slayer; - case 2: ~chatplayer(quiz, "Okay, I'm up for an adventure."); - case 3: ~chatplayer(quiz, "Have you got any tips on killing the vampire?"); + case 2: ~chatplayer("Okay, I'm up for an adventure."); + case 3: ~chatplayer("Have you got any tips on killing the vampire?"); case default: ~displaymessage(^dm_default); } -~chatnpc(default, "I think first you should seek help. I have a friend who is a retired vampire hunter, his name is Dr. Harlow. He may be able to give you some tips. He can normally be found in the Jolly Boar Inn in Varrock, he's a bit of"); -~chatnpc(quiz, "an old soak these days. Mention his old friend Morgan, I'm sure he wouldn't want me killed by a vampire."); +~chatnpc("I think first you should seek help. I have a friend who is a retired vampire hunter, his name is Dr. Harlow. He may be able to give you some tips. He can normally be found in the Jolly Boar Inn in Varrock, he's a bit of"); +~chatnpc("an old soak these days. Mention his old friend Morgan, I'm sure he wouldn't want me killed by a vampire."); ~quest_vampire_set_progress(^quest_vampire_started); -~chatplayer(quiz, "I'll look him up then."); +~chatplayer("I'll look him up then."); [label,morgan_decline_vampire_slayer] -~chatplayer(shock, "No, vampires are scary!"); -~chatnpc(sad, "I don't blame you."); +~chatplayer("No, vampires are scary!"); +~chatnpc("I don't blame you."); [label,morgan_during_vampire_slayer] -~chatnpc(happy, "How are you doing with the quest?"); -~chatplayer(confused, "I'm still working on it."); -~chatnpc(shock, "Please hurry! Every day we live in fear that we will be the vampire's next victim!"); +~chatnpc("How are you doing with the quest?"); +~chatplayer("I'm still working on it."); +~chatnpc("Please hurry! Every day we live in fear that we will be the vampire's next victim!"); [label,morgan_after_vampire_slayer] -~chatplayer(happy, "I have slain the foul creature!"); -~chatnpc(neutral, "Thank you, thank you! You will always be a hero in our village!"); +~chatplayer("I have slain the foul creature!"); +~chatnpc("Thank you, thank you! You will always be a hero in our village!"); diff --git a/data/src/scripts/areas/area_draynor/scripts/ned.rs2 b/data/src/scripts/areas/area_draynor/scripts/ned.rs2 index 043b2c825..5aba04ff2 100644 --- a/data/src/scripts/areas/area_draynor/scripts/ned.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/ned.rs2 @@ -24,7 +24,7 @@ if (last_useitem = crandor_map) { } [label,trail_ned] -~chatnpc(happy, "Well done!"); +~chatnpc("Well done!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp021, 1); if(~trail_clue_easy_complete = true) { @@ -35,7 +35,7 @@ if(~trail_clue_easy_complete = true) { } [label,standard_ned] -~chatnpc(neutral, "Why hello there, me friends call me Ned.|I was a man of the sea, but it's past me now.|Could I be making or selling you some rope?"); +~chatnpc("Why hello there, me friends call me Ned.|I was a man of the sea, but it's past me now.|Could I be making or selling you some rope?"); def_int $option; if(%prince_progress >= ^prince_spoken_osman & %prince_progress < ^prince_saved) { if (~quest_dragon_getting_map_parts = true & %dragon_ned_hired = ^false) { @@ -55,16 +55,16 @@ if($option = 1) { } else if($option = 2) { @ned_decline_rope; } else if($option = 3) { - ~chatplayer(quiz, "Ned, could you make other things from wool?"); - ~chatnpc(happy, "I am sure I can. What are you thinking of?"); + ~chatplayer("Ned, could you make other things from wool?"); + ~chatnpc("I am sure I can. What are you thinking of?"); @multi3("Could you knit me a sweater?", ned_sweater, "How about some sort of wig?", ned_wig, "Could you repair the arrow holes in the back of my shirt?", ned_arrow_holes); } else if ($option = 4) { @ned_dragon_slayer_before_hired; } [label,ned_start_rope_purchase] -~chatplayer(neutral, "Yes, I would like some rope."); -~chatnpc(happy, "Well, I can sell you some rope for 15 coins.|Or I can be making you some if you gets me 4 balls of wool.|I strands them together I does, makes em strong."); +~chatplayer("Yes, I would like some rope."); +~chatnpc("Well, I can sell you some rope for 15 coins.|Or I can be making you some if you gets me 4 balls of wool.|I strands them together I does, makes em strong."); if(inv_total(inv, ball_of_wool) < 4) { @multi3("Okay, please sell me some rope.", ned_rope, "That's a little more than I want to pay.", ned_more_pay, "I will go and get some wool.", ned_get_wool); } else { @@ -76,70 +76,70 @@ if(inv_total(inv, coins) < 15) { ~mesbox("You don't have enough coins to buy any rope!"); return; } -~chatplayer(neutral, "Okay, please sell me some rope."); -~chatnpc(happy, "There you go, finest rope in RuneScape."); +~chatplayer("Okay, please sell me some rope."); +~chatnpc("There you go, finest rope in RuneScape."); ~mesbox("You hand Ned 15 coins.|Ned gives you a coil of rope."); inv_del(inv, coins, 15); inv_add(inv, rope, 1); [label,ned_decline_rope] -~chatplayer(neutral, "No thanks, Ned. I don't need any."); -~chatnpc(neutral, "Well, old Neddy is always here if you do.|Tell your friends. I can always be using the business."); +~chatplayer("No thanks, Ned. I don't need any."); +~chatnpc("Well, old Neddy is always here if you do.|Tell your friends. I can always be using the business."); [label,ned_get_wool] -~chatplayer(neutral, "I will go and get some wool."); -~chatnpc(neutral, "Aye, you do that.|Remember, it takes 4 balls of wool to make strong rope."); +~chatplayer("I will go and get some wool."); +~chatnpc("Aye, you do that.|Remember, it takes 4 balls of wool to make strong rope."); [label,ned_more_pay] -~chatplayer(neutral, "That's a little more than I want to pay."); -~chatnpc(bored, "Well, if you ever need rope that's the price. Sorry.|An old sailor needs money for a little drop o' rum."); +~chatplayer("That's a little more than I want to pay."); +~chatnpc("Well, if you ever need rope that's the price. Sorry.|An old sailor needs money for a little drop o' rum."); [label,ned_have_wool] -~chatplayer(neutral, "I have some balls of wool.|Could you make me some rope?"); -~chatnpc(happy, "Sure I can."); +~chatplayer("I have some balls of wool.|Could you make me some rope?"); +~chatnpc("Sure I can."); ~mesbox("You hand over 4 balls of wool.|Ned gives you a coil of rope."); inv_del(inv, ball_of_wool, 4); inv_add(inv, rope, 1); [label,ned_sweater] -~chatplayer(neutral, "Could you knit me a sweater?"); -~chatnpc(angry, "Do I look like a member of a sewing circle?|Be off wi' you. I have fought monsters that would turn your hair blue."); -~chatnpc(angry, "I don't need to be laughed at just 'cos I am getting a bit old."); +~chatplayer("Could you knit me a sweater?"); +~chatnpc("Do I look like a member of a sewing circle?|Be off wi' you. I have fought monsters that would turn your hair blue."); +~chatnpc("I don't need to be laughed at just 'cos I am getting a bit old."); [label,ned_arrow_holes] -~chatplayer(quiz, "Could you repair the arrow holes in the back of my shirt?"); -~chatnpc(neutral, "Ah yes, it's a tough world these days.|There's a few brave enough to attack from 10 metres away."); +~chatplayer("Could you repair the arrow holes in the back of my shirt?"); +~chatnpc("Ah yes, it's a tough world these days.|There's a few brave enough to attack from 10 metres away."); ~mesbox("Ned pulls out a needle and attacks your shirt."); -~chatnpc(happy, "There you go, good as new."); -~chatplayer(neutral, "Thanks Ned. Maybe next time they will attack me face to face."); +~chatnpc("There you go, good as new."); +~chatplayer("Thanks Ned. Maybe next time they will attack me face to face."); [label,ned_wig] -~chatplayer(quiz, "How about some sort of wig?"); -~chatnpc(happy, "Well... That's an interesting thought.|Yes, I think I could do something.|Give me 3 balls of wool and I might be able to do it."); +~chatplayer("How about some sort of wig?"); +~chatnpc("Well... That's an interesting thought.|Yes, I think I could do something.|Give me 3 balls of wool and I might be able to do it."); if(inv_total(inv, ball_of_wool) < 3) { - ~chatplayer(happy, "Great, I will get some. I think a wig would be useful."); + ~chatplayer("Great, I will get some. I think a wig would be useful."); return; } @multi2("I have that now. Please, make me a wig.", ned_make_wig, "I will come back when I need you to make me one.", ned_come_back); [label,ned_make_wig] -~chatplayer(neutral, "I have that now. Please, make me a wig."); -~chatnpc(neutral, "Okay, I will have a go."); +~chatplayer("I have that now. Please, make me a wig."); +~chatnpc("Okay, I will have a go."); ~mesbox("You hand Ned 3 balls of wool. Ned works with the wool.|His hands move with a speed you couldn't imagine."); if(inv_total(inv, ball_of_wool) >= 3) { inv_del(inv, ball_of_wool, 3); inv_add(inv, wig_grey, 1); - ~chatnpc(happy, "Here you go, how's that for a quick effort?|Not bad I think!"); + ~chatnpc("Here you go, how's that for a quick effort?|Not bad I think!"); ~mesbox("Ned gives you a pretty good wig."); - ~chatplayer(neutral, "Thanks Ned, there's more to you than meets the eye."); + ~chatplayer("Thanks Ned, there's more to you than meets the eye."); } [label,ned_come_back] -~chatplayer(neutral, "I will come back when I need you to make me one."); +~chatplayer("I will come back when I need you to make me one."); [label,ned_dragon_slayer_before_hired] -~chatplayer(quiz, "You're a sailor? Could you take me to the island of Crandor?"); -~chatnpc(sad, "Well, I was a sailor. I've not been able to get work at|sea these days, though. They say I'm too old."); +~chatplayer("You're a sailor? Could you take me to the island of Crandor?"); +~chatnpc("Well, I was a sailor. I've not been able to get work at|sea these days, though. They say I'm too old."); // from https://web.archive.org/web/20060828222012/http://www.trillionareguild.com/runescape/dragon.php // 14) From this point you must go to Draynor Village and talk to Ned, ask him // to sail you to Crandor on Lady Lumbridge, he will say if you find a seaworthy @@ -147,10 +147,10 @@ if(inv_total(inv, ball_of_wool) >= 3) { // // this lines up perfectly with rsc dialogue, this dialogue is much different in osrs. ~mesbox("There is a wistfull look in Ned's eyes."); -~chatnpc(sad, "I miss those days.|If you could get me a ship I would take you anywhere."); // :3 +~chatnpc("I miss those days.|If you could get me a ship I would take you anywhere."); // :3 %dragon_ned_hired = ^true; if (%dragon_progress >= ^quest_dragon_spoken_to_oziach & %dragon_progress < ^quest_dragon_bought_ship) { - ~chatplayer(neutral, "I will work on finding a sea worthy ship then."); //rsc + ~chatplayer("I will work on finding a sea worthy ship then."); //rsc return; } @ned_so_wheres_your_ship; @@ -158,64 +158,64 @@ if (%dragon_progress >= ^quest_dragon_spoken_to_oziach & %dragon_progress < ^que [label,ned_so_wheres_your_ship] if (%dragon_progress = ^quest_dragon_repaired_ship) { - ~chatplayer(happy, "As it happens I do have a ship ready to sail!"); - ~chatnpc(happy, "That'd be grand, where is it?"); - ~chatplayer(neutral, "It's called Lady Lumbridge and it's docked in Port Sarim."); // rsc says "the Lumbridge Lady" - ~chatnpc(neutral, "I'll meet you there then."); // guessed - ~chatnpc(neutral, "Just show me the map and we can get ready to go!"); + ~chatplayer("As it happens I do have a ship ready to sail!"); + ~chatnpc("That'd be grand, where is it?"); + ~chatplayer("It's called Lady Lumbridge and it's docked in Port Sarim."); // rsc says "the Lumbridge Lady" + ~chatnpc("I'll meet you there then."); // guessed + ~chatnpc("Just show me the map and we can get ready to go!"); return; } if (%dragon_progress = ^quest_dragon_bought_ship) { - ~chatplayer(neutral, "It's called Lady Lumbridge and it's docked in Port Sarim."); // rsc - ~chatnpc(neutral, "That old pile of junk? Last I heard, she wasn't seaworthy."); // osrs - ~chatplayer(neutral, "Yes, good point. I'd better go and fix her up."); // osrs + ~chatplayer("It's called Lady Lumbridge and it's docked in Port Sarim."); // rsc + ~chatnpc("That old pile of junk? Last I heard, she wasn't seaworthy."); // osrs + ~chatplayer("Yes, good point. I'd better go and fix her up."); // osrs return; } if (%dragon_progress >= ^quest_dragon_spoken_to_oziach & %dragon_progress < ^quest_dragon_bought_ship) { - ~chatplayer(neutral, "Well, I don't actually have a ship yet."); // osrs - ~chatnpc(neutral, "Ah, well. Let me know when you do. The place to look would be Port Sarim."); // osrs + ~chatplayer("Well, I don't actually have a ship yet."); // osrs + ~chatnpc("Ah, well. Let me know when you do. The place to look would be Port Sarim."); // osrs return; } [label,ned_dragon_slayer_hired] -~chatnpc(neutral, "Hello there lad."); +~chatnpc("Hello there lad."); def_int $choice = ~p_choice2("So are you going to take me to Crandor Island now then?", 1, "So are you still up to sailing this ship?", 2); if ($choice = 1) { // island is lowercase. Not a typo // https://youtu.be/kCMB4I_aJJM?list=PLn23LiLYLb1aqrojPTi1_Np81LJku2Nd0&t=134 - ~chatplayer(quiz, "So are you going to take me to Crandor island now then?"); + ~chatplayer("So are you going to take me to Crandor island now then?"); if (%dragon_progress < ^quest_dragon_repaired_ship) { - ~chatnpc(neutral, "I said I would and old Ned is a man of his word!"); // osrs - ~chatnpc(quiz, "So where's your ship?"); + ~chatnpc("I said I would and old Ned is a man of his word!"); // osrs + ~chatnpc("So where's your ship?"); @ned_so_wheres_your_ship; } else if (%dragon_progress = ^quest_dragon_ned_given_map) { - ~chatnpc(neutral, "I said I would and old Ned is a man of his word! I'll meet you on board the Lady Lumbridge in Port Sarim."); + ~chatnpc("I said I would and old Ned is a man of his word! I'll meet you on board the Lady Lumbridge in Port Sarim."); return; } - ~chatnpc(neutral, "Ok, show me the map and we'll set sail now."); + ~chatnpc("Ok, show me the map and we'll set sail now."); if (inv_total(inv, crandor_map) < 1) { return; } @give_map_to_ned; } if ($choice = 2) { - ~chatplayer(quiz, "So are you still up to sailing this ship?"); - ~chatnpc(neutral, "I said I would and old Ned is a man of his word!"); // missing dialogue. So i took a part of his dialogue from osrs + ~chatplayer("So are you still up to sailing this ship?"); + ~chatnpc("I said I would and old Ned is a man of his word!"); // missing dialogue. So i took a part of his dialogue from osrs } [label,ned_dragon_slayer_back_in_draynor_after_visiting_crandor] -~chatnpc(neutral, "Hello there lad."); +~chatnpc("Hello there lad."); // repairing ship again existed: https://web.archive.org/web/20051104084237/http://www.nomadgaming.com/index.php?page=rs2_dragonslayer //osrs -~chatplayer(confused, "How did you get back from Crandor?"); -~chatnpc(neutral, "I got towed back by a passing friendly whale."); -~chatnpc(quiz, "Anyway, would you like me to make some rope while you're here?"); +~chatplayer("How did you get back from Crandor?"); +~chatnpc("I got towed back by a passing friendly whale."); +~chatnpc("Anyway, would you like me to make some rope while you're here?"); def_int $choice = ~p_choice3("Can you take me to Crandor again?", 1, "Yes, I would like some rope.", 2, "No thanks Ned, I don't need any.", 3); if ($choice = 1) { - ~chatplayer(quiz, "Can you take me to Crandor again?"); - ~chatnpc(neutral, "Aye, that I could. I'll meet you at the Port Sarim docks again. I'll try to steer a little better this time!"); + ~chatplayer("Can you take me to Crandor again?"); + ~chatnpc("Aye, that I could. I'll meet you at the Port Sarim docks again. I'll try to steer a little better this time!"); %dragon_ned_hired = ^true; return; } @@ -234,5 +234,5 @@ if (%dragon_ned_hired = 0 | %dragon_progress ! ^quest_dragon_repaired_ship) { ~mesbox("You give the map to Ned."); inv_del(inv, crandor_map, inv_total(inv, crandor_map)); %dragon_progress = ^quest_dragon_ned_given_map; -~chatplayer(quiz, "Here you go."); -~chatnpc(neutral, "I'll meet you at the ship then."); \ No newline at end of file +~chatplayer("Here you go."); +~chatnpc("I'll meet you at the ship then."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/prince_ali.rs2 b/data/src/scripts/areas/area_draynor/scripts/prince_ali.rs2 index 136ed6565..b490941e0 100644 --- a/data/src/scripts/areas/area_draynor/scripts/prince_ali.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/prince_ali.rs2 @@ -2,14 +2,14 @@ if(%prince_progress = ^prince_tied_keli) { @prince_rescue; } -~chatnpc(neutral, "I owe you my life for that escape.|You cannot help me this time, they know who you are.|Go in peace, friend of Al-Kharid."); +~chatnpc("I owe you my life for that escape.|You cannot help me this time, they know who you are.|Go in peace, friend of Al-Kharid."); [label,prince_rescue] -~chatplayer(happy, "Prince, I come to rescue you."); -~chatnpc(neutral, "That is very very kind of you, how do I get out?"); -~chatplayer(happy, "With a disguise. I have removed the Lady Keli.|She is tied up, but will not stay tied up for long."); +~chatplayer("Prince, I come to rescue you."); +~chatnpc("That is very very kind of you, how do I get out?"); +~chatplayer("With a disguise. I have removed the Lady Keli.|She is tied up, but will not stay tied up for long."); if(inv_total(inv, bronze_key) >= 1 & inv_total(inv, wig_blonde) >= 1 & inv_total(inv, pink_skirt) >= 1 & inv_total(inv, paste) >= 1) { - ~chatplayer(neutral, "Take this disguise, and this key."); + ~chatplayer("Take this disguise, and this key."); ~mesbox("You hand over the disguise and key over to Prince Ali."); inv_del(inv, bronze_key, 1); inv_del(inv, wig_blonde, 1); @@ -17,8 +17,8 @@ if(inv_total(inv, bronze_key) >= 1 & inv_total(inv, wig_blonde) >= 1 & inv_total inv_del(inv, paste, 1); %prince_progress = ^prince_saved; npc_changetype(npc_921); - ~chatnpc_specific("Prince Ali", lady_keli, happy, "Thank you my friend, I must leave you now.|My father will pay you well for this."); - ~chatplayer(happy, "Go to Leela, she is close to here."); + ~chatnpc_specific("Prince Ali", lady_keli, "Thank you my friend, I must leave you now.|My father will pay you well for this."); + ~chatplayer("Go to Leela, she is close to here."); npc_del; ~mesbox("The prince has escaped, well done!|You are now a friend of Al-Kharid|and may pass through the Al-Kharid toll gate for free."); } diff --git a/data/src/scripts/areas/area_draynor/scripts/professor_oddenstein.rs2 b/data/src/scripts/areas/area_draynor/scripts/professor_oddenstein.rs2 index 59304a512..da54f6d8a 100644 --- a/data/src/scripts/areas/area_draynor/scripts/professor_oddenstein.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/professor_oddenstein.rs2 @@ -6,28 +6,28 @@ switch_int(%haunted_progress) { } [label,oddenstein_nonquest] -~chatnpc(neutral, "Be careful in here.|Lots of dangerous equipment in here."); +~chatnpc("Be careful in here.|Lots of dangerous equipment in here."); @multi2("What does this machine do?", oddenstein_machine, "Is this your house?", oddenstein_house); [label,oddenstein_machine] -~chatplayer(quiz, "What does this machine do?"); -~chatnpc(neutral, "Nothing at the moment,|as it's broken.|It's meant to be a transmutation machine."); -~chatnpc(neutral, "It has also spent time as a time travel machine,|and a dramatic lightning generator,|and a thing for generating monsters."); +~chatplayer("What does this machine do?"); +~chatnpc("Nothing at the moment,|as it's broken.|It's meant to be a transmutation machine."); +~chatnpc("It has also spent time as a time travel machine,|and a dramatic lightning generator,|and a thing for generating monsters."); [label,oddenstein_house] -~chatplayer(quiz, "Is this your house?"); -~chatnpc(neutral, "No, I'm just one of the tenants.|It belongs to the count|who lives in the basement."); +~chatplayer("Is this your house?"); +~chatnpc("No, I'm just one of the tenants.|It belongs to the count|who lives in the basement."); [label,oddenstein_looking] def_int $option = ~p_choice3("I'm looking for a guy called Ernest.", 1, "What does this machine do?", 2, "Is this your house?", 3); if($option = 1) { - ~chatplayer(quiz, "I'm looking for a guy called Ernest."); - ~chatnpc(happy, "Ah Ernest, top notch bloke.|He's helping me with my experiments."); - ~chatplayer(quiz, "So you know where he is then?"); - ~chatnpc(happy, "He's that chicken over there."); - ~chatplayer(confused, "Ernest is a chicken?|Are you sure?"); - ~chatnpc(happy, "Oh, he isn't normally a chicken,|or at least he wasn't|until he helped me test my pouletmorph machine."); - ~chatnpc(happy, "It was originally going to be called a transmutation machine. But after testing pouletmorph seems more appropriate."); + ~chatplayer("I'm looking for a guy called Ernest."); + ~chatnpc("Ah Ernest, top notch bloke.|He's helping me with my experiments."); + ~chatplayer("So you know where he is then?"); + ~chatnpc("He's that chicken over there."); + ~chatplayer("Ernest is a chicken?|Are you sure?"); + ~chatnpc("Oh, he isn't normally a chicken,|or at least he wasn't|until he helped me test my pouletmorph machine."); + ~chatnpc("It was originally going to be called a transmutation machine. But after testing pouletmorph seems more appropriate."); @multi2("I'm glad Veronica didn't actually get engaged to a chicken.", oddenstein_chicken, "Change him back this instant!", oddenstein_change_back); } else if($option = 2) { @oddenstein_machine; @@ -36,30 +36,30 @@ if($option = 1) { } [label,oddenstein_chicken] -~chatplayer(neutral, "I'm glad Veronica didn't actually get engaged to a chicken."); -~chatnpc(quiz, "Who's Veronica?"); -~chatplayer(neutral, "Ernest's fiancee.|She probably doesn't want to marry a chicken."); -~chatnpc(quiz, "Ooh I dunno.|She could have free eggs for breakfast."); -~chatplayer(neutral, "I think you'd better change him back."); +~chatplayer("I'm glad Veronica didn't actually get engaged to a chicken."); +~chatnpc("Who's Veronica?"); +~chatplayer("Ernest's fiancee.|She probably doesn't want to marry a chicken."); +~chatnpc("Ooh I dunno.|She could have free eggs for breakfast."); +~chatplayer("I think you'd better change him back."); @oddenstein_not_easy; [label,oddenstein_change_back] -~chatplayer(angry, "Change him back this instant!"); +~chatplayer("Change him back this instant!"); @oddenstein_not_easy; [label,oddenstein_not_easy] -~chatnpc(confused, "Um, it's not so easy..."); -~chatnpc(sad, "My machine is broken,|and the house gremlins|have run off with some vital bits."); -~chatplayer(neutral, "Well I can look out for them."); -~chatnpc(neutral, "That would be a help.|They'll be somewhere in the manor house or its grounds,|the gremlins never go further than the entrance gate."); +~chatnpc("Um, it's not so easy..."); +~chatnpc("My machine is broken,|and the house gremlins|have run off with some vital bits."); +~chatplayer("Well I can look out for them."); +~chatnpc("That would be a help.|They'll be somewhere in the manor house or its grounds,|the gremlins never go further than the entrance gate."); %haunted_progress = ^haunted_spoken_to_oddenstein; -~chatnpc(neutral, "I'm missing the pressure gauge and a rubber tube.|They've also taken my oil can,|which I'm going to need to get this thing started again."); +~chatnpc("I'm missing the pressure gauge and a rubber tube.|They've also taken my oil can,|which I'm going to need to get this thing started again."); [label,oddenstein_items] -~chatnpc(quiz, "Have you found anything yet?"); +~chatnpc("Have you found anything yet?"); if(inv_total(inv, pressure_gauge) > 0 & inv_total(inv, oil_can) > 0 & inv_total(inv, rubber_tube) > 0) { - ~chatplayer(happy, "I have everything!"); - ~chatnpc(happy, "Give 'em here then."); + ~chatplayer("I have everything!"); + ~chatnpc("Give 'em here then."); if_close; // osrs has this as messages with p_delay, but based of rsc and similar scenarios in non-reworked quests, this is probably what it used to be (confirm this if possible) mes("You give a rubber tube, a pressure gauge, "); @@ -76,9 +76,9 @@ if(inv_total(inv, pressure_gauge) > 0 & inv_total(inv, oil_can) > 0 & inv_total( inv_del(inv, oil_can, 1); inv_del(inv, rubber_tube, 1); queue(haunted_quest_complete, 0); // reward is queued as soon as changetype completes in OSRS - ~chatnpc_specific("Ernest", ernest_human, happy, "Thank you .|It was dreadfully irritating being a chicken.|How can I ever thank you?"); - ~chatplayer(shifty, "Well a cash reward is always nice..."); - ~chatnpc_specific("Ernest", ernest_human, neutral, "Of course, of course."); + ~chatnpc_specific("Ernest", ernest_human, "Thank you .|It was dreadfully irritating being a chicken.|How can I ever thank you?"); + ~chatplayer("Well a cash reward is always nice..."); + ~chatnpc_specific("Ernest", ernest_human, "Of course, of course."); ~mesbox("Ernest hands you 300 coins."); } else if(inv_total(inv, pressure_gauge) > 0 | inv_total(inv, oil_can) > 0 | inv_total(inv, rubber_tube) > 0) { def_string $player_items = ""; @@ -99,10 +99,10 @@ if(inv_total(inv, pressure_gauge) > 0 & inv_total(inv, oil_can) > 0 & inv_total( $oddenstein_items = append($oddenstein_items, "|A pressure gauge."); } mes($player_items); - ~chatplayer(neutral, "I have found some of the things you need:<$player_items>"); - ~chatnpc(bored, "Well that's a start, you still need to find:<$oddenstein_items>"); - ~chatplayer(neutral, "Ok, I'll try and find them."); + ~chatplayer("I have found some of the things you need:<$player_items>"); + ~chatnpc("Well that's a start, you still need to find:<$oddenstein_items>"); + ~chatplayer("Ok, I'll try and find them."); } else { - ~chatplayer(sad, "I'm afraid I don't have any yet!"); - ~chatnpc(neutral, "I need a rubber tube, a pressure gauge and a can of oil. Then your friend can stop being a chicken."); + ~chatplayer("I'm afraid I don't have any yet!"); + ~chatnpc("I need a rubber tube, a pressure gauge and a can of oil. Then your friend can stop being a chicken."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/traiborn.rs2 b/data/src/scripts/areas/area_draynor/scripts/traiborn.rs2 index 2e7890268..1972db3ee 100644 --- a/data/src/scripts/areas/area_draynor/scripts/traiborn.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/traiborn.rs2 @@ -8,14 +8,14 @@ if (%demon_progress < 3 | %demon_progress > 29 | inv_total(inv, demon_traiborn_k } [label,demon_slayer_traiborn_bones_dialogue] -~chatnpc(confused, "How are you doing finding bones?"); +~chatnpc("How are you doing finding bones?"); if(inv_total(inv, bones) < 1) { - ~chatplayer(bored, "I haven't got any at the moment."); - ~chatnpc(confused, "Never mind. Keep working on it."); + ~chatplayer("I haven't got any at the moment."); + ~chatnpc("Never mind. Keep working on it."); } else { - ~chatplayer(happy, "I have some bones."); - ~chatnpc(confused, "Give 'em here then."); + ~chatplayer("I have some bones."); + ~chatnpc("Give 'em here then."); @demon_slayer_traiborn_give_bones; } @@ -39,35 +39,35 @@ if ($demon_progress < 2 | %demon_progress > 28) { } [label,traiborn_dialogue] -~chatnpc(shock, "Ello young thingummywut."); +~chatnpc("Ello young thingummywut."); def_int $option = ~traiborn_dialogue_options(%demon_progress); if ($option = 1) { - ~chatplayer(shock, "What's a thingummywut?"); + ~chatplayer("What's a thingummywut?"); @traiborn_thingummywut_shock; } else if ($option = 2) { - ~chatplayer(neutral, "Teach me to be a mighty and powerful wizard."); + ~chatplayer("Teach me to be a mighty and powerful wizard."); @traiborn_teach_me; } else { - ~chatplayer(neutral, "I need to get a key given to you by Sir Prysin"); - ~chatnpc(confused, "Sir Prysin? Who's that? What would I want his key for?"); + ~chatplayer("I need to get a key given to you by Sir Prysin"); + ~chatnpc("Sir Prysin? Who's that? What would I want his key for?"); def_int $option_key = ~p_choice3("He told me you were looking after it for him.", 1, "He's one of the King's knights.", 2, "Well, have you got any keys knocking around?", 3); if ($option_key = 1) { - ~chatplayer(neutral, "He told me you were looking after it for him."); - ~chatnpc(confused, "That wasn't very clever of him. I'd lose my head if it wasn't screwed on. Go and tell him to find someone else to look after his valuables in future."); + ~chatplayer("He told me you were looking after it for him."); + ~chatnpc("That wasn't very clever of him. I'd lose my head if it wasn't screwed on. Go and tell him to find someone else to look after his valuables in future."); def_int $option_insult_or_key = ~p_choice2("Okay, I'll go and tell him that.", 1, "Well, have you got any keys knocking around?", 2); if ($option_insult_or_key = 1) { - ~chatplayer(happy, "Okay, I'll go and tell him that."); - ~chatnpc(happy, "Oh that's great, if it wouldn't be too much trouble."); + ~chatplayer("Okay, I'll go and tell him that."); + ~chatnpc("Oh that's great, if it wouldn't be too much trouble."); @demon_slayer_traiborn_be_off_keys_around; } else { @demon_slayer_traiborn_keys_around; } } else if ($option_key = 2) { - ~chatplayer(neutral, "He's one of the King's knights."); - ~chatnpc(happy, "Say, I remember a knight with a key. He had nice shoes... | ...and didn't like my homemade spinach rolls. Would you like a spinach roll?"); + ~chatplayer("He's one of the King's knights."); + ~chatnpc("Say, I remember a knight with a key. He had nice shoes... | ...and didn't like my homemade spinach rolls. Would you like a spinach roll?"); @traiborn_spinach_roll; } else { @demon_slayer_traiborn_keys_around; @@ -75,38 +75,38 @@ if ($option = 1) { } [label,demon_slayer_traiborn_lost_key] -~chatplayer(sad, "I've lost the key you gave to me."); -~chatnpc(confused, "Yes I know, it was returned to me. If you want it back you're going to have to collect another 25 sets of bones"); +~chatplayer("I've lost the key you gave to me."); +~chatnpc("Yes I know, it was returned to me. If you want it back you're going to have to collect another 25 sets of bones"); ~set_demon_progress(3); [label,traiborn_teach_me] -~chatnpc(shock, "Wizard eh? You don't want any truck with that sort. They're not to be trusted. That's what I've heard anyways."); +~chatnpc("Wizard eh? You don't want any truck with that sort. They're not to be trusted. That's what I've heard anyways."); def_int $option = ~p_choice2("So aren't you a wizard?", 1, "Oh I'd better stop talking to you then.", 2); if ($option = 1) { - ~chatplayer(neutral, "So aren't you a wizard?"); - ~chatnpc(angry, "How dare you? Of course I'm a wizard. Now don't be so cheeky or I'll turn you into a frog."); + ~chatplayer("So aren't you a wizard?"); + ~chatnpc("How dare you? Of course I'm a wizard. Now don't be so cheeky or I'll turn you into a frog."); } else { - ~chatplayer(neutral, "Oh I'd better stop talking to you then."); - ~chatnpc(happy, "Cheerio then. It was nice chatting to you."); + ~chatplayer("Oh I'd better stop talking to you then."); + ~chatnpc("Cheerio then. It was nice chatting to you."); } [label,traiborn_thingummywut_shock] -~chatnpc(shock, "A thingummywut? Where? Where?"); -~chatnpc(shock, "Those pesky thingummywuts. They get everywhere. They leave a terrible mess too."); +~chatnpc("A thingummywut? Where? Where?"); +~chatnpc("Those pesky thingummywuts. They get everywhere. They leave a terrible mess too."); def_int $option = ~p_choice2("Err you just called me a thingummywut.", 1, "Tell me what they look like and I'll mash 'em.", 2); if ($option = 1) { - ~chatplayer(happy, "Err you just called me thingummywut."); + ~chatplayer("Err you just called me thingummywut."); @traiborn_thingummywut_player; } else { - ~chatplayer(angry, "Tell me what they look like and I'll mash 'em."); + ~chatplayer("Tell me what they look like and I'll mash 'em."); @traiborn_thingummywut_mash; } [label,traiborn_thingummywut_player] -~chatnpc(shock, "You're a thingummywut? I've never seen one up close before. They said I was mad!"); -~chatnpc(shock, "Now you are my proof! There ARE thingummywuts in this tower. Now where can I find a cage big enough to keep you?"); +~chatnpc("You're a thingummywut? I've never seen one up close before. They said I was mad!"); +~chatnpc("Now you are my proof! There ARE thingummywuts in this tower. Now where can I find a cage big enough to keep you?"); def_int $option = ~p_choice2("Err I'd better be off really.", 1, "They're right, you are mad.", 2); if ($option = 1) { @@ -116,33 +116,33 @@ if ($option = 1) { } [label,traiborn_thingummywut_mash] -~chatnpc(shock, "Don't be ridiculous. No-one has ever seen one."); -~chatnpc(shock, "They're invisible, or a myth, or a figment of my imagination. Can't remember which right now."); +~chatnpc("Don't be ridiculous. No-one has ever seen one."); +~chatnpc("They're invisible, or a myth, or a figment of my imagination. Can't remember which right now."); [label,traiborn_be_off] -~chatplayer(neutral, "Err I'd better be off really."); -~chatnpc(confused, "Oh ok, have a good time, and watch out for sheep! They're more cunning than they look."); +~chatplayer("Err I'd better be off really."); +~chatnpc("Oh ok, have a good time, and watch out for sheep! They're more cunning than they look."); [label,traiborn_mad] -~chatplayer(happy, "They're right, you are mad."); -~chatnpc(sad, "That's a pity. I thought maybe there were winding me up."); +~chatplayer("They're right, you are mad."); +~chatnpc("That's a pity. I thought maybe there were winding me up."); [label,demon_slayer_traiborn_keys_around] -~chatplayer(neutral, "Well, have you got any keys knocking around?"); -~chatnpc(confused, "Now you come to mention it, yes I do have a key. It's in my special closet of valuable stuff. Now how do I get into that?"); -~chatnpc(confused, "I sealed it using one of my magic rituals. So it would make sense that another ritual would open it again."); -~chatplayer(neutral, "So do you know what ritual to use?"); -~chatnpc(neutral, "let me think a second."); -~chatnpc(confused, "Yes a simple drazier style ritual should suffice. Hmm, main problem with that is I'll need 25 sets of bones. Now where am I going to get hold of something like that?"); +~chatplayer("Well, have you got any keys knocking around?"); +~chatnpc("Now you come to mention it, yes I do have a key. It's in my special closet of valuable stuff. Now how do I get into that?"); +~chatnpc("I sealed it using one of my magic rituals. So it would make sense that another ritual would open it again."); +~chatplayer("So do you know what ritual to use?"); +~chatnpc("let me think a second."); +~chatnpc("Yes a simple drazier style ritual should suffice. Hmm, main problem with that is I'll need 25 sets of bones. Now where am I going to get hold of something like that?"); def_int $option = ~p_choice2(" Hmm, that's too bad. I really need that key.", 1, "I'll get the bones for you.", 2); if ($option = 1) { - ~chatplayer(sad, "Hmm, that's too bad. I really need that key"); - ~chatnpc(neutral, "Ahh well, sorry I couldn't be any more help."); + ~chatplayer("Hmm, that's too bad. I really need that key"); + ~chatnpc("Ahh well, sorry I couldn't be any more help."); } else { - ~chatplayer(neutral, "I'll help get the bones for you."); - ~chatnpc(happy, "Ooh that would be very good of you."); - ~chatplayer(neutral, "Okay, I'll speak to you when I've got some bones."); + ~chatplayer("I'll help get the bones for you."); + ~chatnpc("Ooh that would be very good of you."); + ~chatplayer("Okay, I'll speak to you when I've got some bones."); if (%demon_progress = 2) { ~update_demon_progress; } @@ -160,50 +160,50 @@ if ($option = 1) { def_int $option = ~p_choice2("Yes please.", 1, "Just tell me if you have the key.", 2); if ($option = 1) { - ~chatplayer(happy, "Yes please."); + ~chatplayer("Yes please."); ~objbox(spinach_roll, "Traiborn digs around in the pockets of his robes.|After a few moments he triumphantly presents you with|a spinach roll."); inv_add(inv, spinach_roll, 1); - ~chatplayer(happy, "Thank you very much."); + ~chatplayer("Thank you very much."); @demon_slayer_traiborn_be_off_keys_around; } else { - ~chatplayer(neutral, "Just tell me if you have the key."); - ~chatnpc(confused, "The key? The key to what?"); - ~chatnpc(confused, "There's more than one key in the world don't you know? Would be a bit odd if there was only the one."); + ~chatplayer("Just tell me if you have the key."); + ~chatnpc("The key? The key to what?"); + ~chatnpc("There's more than one key in the world don't you know? Would be a bit odd if there was only the one."); def_int $option_silverlight_or_insult = ~p_choice2("It's the key to get a sword called Silverlight.", 1, "You've lost it, haven't you?", 2); if ($option_silverlight_or_insult = 1) { - ~chatplayer(neutral, "It's the key to get a sword called Silverlight."); - ~chatnpc(confused, "Silverlight? Never heard of that.|Sounds a good name for a ship. Are you sure it's not the name of a ship, rather than a sword?"); + ~chatplayer("It's the key to get a sword called Silverlight."); + ~chatnpc("Silverlight? Never heard of that.|Sounds a good name for a ship. Are you sure it's not the name of a ship, rather than a sword?"); def_int $option_ship_or_keys = ~p_choice2("Yeah, pretty sure.", 1, "Are you sure it's not the name of a ship, rather than a sword?", 2); if ($option_ship_or_keys = 1) { - ~chatplayer(neutral, "Yeah, pretty sure."); - ~chatnpc(confused, "That's a pity. Waste of a name."); + ~chatplayer("Yeah, pretty sure."); + ~chatnpc("That's a pity. Waste of a name."); @demon_slayer_traiborn_be_off_keys_around; } else { @demon_slayer_traiborn_keys_around; } } else { - ~chatplayer(neutral, "You've lost it haven't you?"); - ~chatnpc(angry, "Me? Lose things? That's a nasty accusation."); + ~chatplayer("You've lost it haven't you?"); + ~chatnpc("Me? Lose things? That's a nasty accusation."); @demon_slayer_traiborn_keys_around; } } [label,demon_slayer_traiborn_stop_giving_bones] if (%demon_progress = 28) { - ~chatnpc(happy, "Hurrah! That's all 25 sets of bones."); + ~chatnpc("Hurrah! That's all 25 sets of bones."); @demon_slayer_traiborn_incantation; } else { - ~chatplayer(neutral, "That's all of them."); - ~chatnpc(confused, "I still need more."); - ~chatplayer(neutral, "Ok, I'll look for some more."); + ~chatplayer("That's all of them."); + ~chatnpc("I still need more."); + ~chatplayer("Ok, I'll look for some more."); } [label,demon_slayer_traiborn_incantation] ~mesbox("Traiborn places the bones in a circle on the floor."); ~mesbox("Traiborn waves his arms about."); -~chatnpc(confused, "Wings of dark and colour too,|Spreading in the morning dew;|Locked away I have a key;|Return it now, please, unto me."); +~chatnpc("Wings of dark and colour too,|Spreading in the morning dew;|Locked away I have a key;|Return it now, please, unto me."); ~mesbox("The wizard waves his arms some more."); if_close(); p_delay(2); @@ -213,5 +213,5 @@ p_delay(2); if (%demon_progress = 28) { ~update_demon_progress; } -~chatplayer(happy, "Thank you very much."); -~chatnpc(happy, "Not a problem for a friend of Sir What's-his-face."); \ No newline at end of file +~chatplayer("Thank you very much."); +~chatnpc("Not a problem for a friend of Sir What's-his-face."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_draynor/scripts/veronica.rs2 b/data/src/scripts/areas/area_draynor/scripts/veronica.rs2 index 7d978b646..1e23c95f6 100644 --- a/data/src/scripts/areas/area_draynor/scripts/veronica.rs2 +++ b/data/src/scripts/areas/area_draynor/scripts/veronica.rs2 @@ -6,37 +6,37 @@ switch_int (%haunted_progress) { } [label,haunted_start] -~chatnpc(shock, "Can you please help me?|I'm in a terrible spot of trouble."); +~chatnpc("Can you please help me?|I'm in a terrible spot of trouble."); def_int $option = ~p_choice2("Aha, sounds like a quest. I'll help.", 1, "No, I'm looking for something to kill.", 2); if($option = 1) { - ~chatplayer(happy, "Aha, sounds like a quest. I'll help."); - ~chatnpc(neutral, "Yes yes, I suppose it is a quest.|My fiance Ernest and I came upon this house here."); - ~chatnpc(neutral, "Seeing as we were a little lost|Ernest decided to go in and ask for directions."); - ~chatnpc(neutral, "That was an hour ago.|That house looks very spooky,|can you go and see if you can find him for me?"); + ~chatplayer("Aha, sounds like a quest. I'll help."); + ~chatnpc("Yes yes, I suppose it is a quest.|My fiance Ernest and I came upon this house here."); + ~chatnpc("Seeing as we were a little lost|Ernest decided to go in and ask for directions."); + ~chatnpc("That was an hour ago.|That house looks very spooky,|can you go and see if you can find him for me?"); %haunted_progress = ^haunted_started; ~send_quest_progress(questlist:haunted, %haunted_progress, 3); - ~chatplayer(neutral, "Ok, I'll see what I can do."); - ~chatnpc(happy, "Thank you, thank you.|I'm very grateful."); + ~chatplayer("Ok, I'll see what I can do."); + ~chatnpc("Thank you, thank you.|I'm very grateful."); } else if($option = 2) { - ~chatplayer(neutral, "No, I'm looking for something to kill."); - ~chatnpc(shock, "Oooh, you violent person you."); + ~chatplayer("No, I'm looking for something to kill."); + ~chatnpc("Oooh, you violent person you."); } [label,veronica_sweetheart] -~chatnpc(quiz, "Have you found my sweetheart yet?"); +~chatnpc("Have you found my sweetheart yet?"); if(%haunted_progress = ^haunted_spoken_to_oddenstein) { - ~chatplayer(happy, "Yes, he's a chicken."); - ~chatnpc(confused, "I know he's not exactly brave|but I think you're being a little harsh."); - ~chatplayer(neutral, "No no, he's been turned into an actual chicken|by a mad scientist."); + ~chatplayer("Yes, he's a chicken."); + ~chatnpc("I know he's not exactly brave|but I think you're being a little harsh."); + ~chatplayer("No no, he's been turned into an actual chicken|by a mad scientist."); ~mesbox("Veronica lets out an ear piercing shriek."); - ~chatnpc(shock, "Eeeeek!|My poor darling,|why must these things happen to us?"); - ~chatplayer(neutral, "Well I'm doing my best to turn him back."); - ~chatnpc(neutral, "Well be quick,|I'm sure being a chicken can't be good for him."); + ~chatnpc("Eeeeek!|My poor darling,|why must these things happen to us?"); + ~chatplayer("Well I'm doing my best to turn him back."); + ~chatnpc("Well be quick,|I'm sure being a chicken can't be good for him."); } else if(%haunted_progress = ^haunted_started) { - ~chatplayer(sad, "No, not yet."); + ~chatplayer("No, not yet."); } [label,veronica_postquest] -~chatnpc(happy, "Thank you for rescuing Ernest."); -~chatplayer(quiz, "Where is he now?"); -~chatnpc(neutral, "Oh he went off to talk to some green warty guy.|I'm sure he'll be back soon."); \ No newline at end of file +~chatnpc("Thank you for rescuing Ernest."); +~chatplayer("Where is he now?"); +~chatnpc("Oh he went off to talk to some green warty guy.|I'm sure he'll be back soon."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_edgeville/scripts/oracle.rs2 b/data/src/scripts/areas/area_edgeville/scripts/oracle.rs2 index d4fb2bfdd..8f10b515b 100644 --- a/data/src/scripts/areas/area_edgeville/scripts/oracle.rs2 +++ b/data/src/scripts/areas/area_edgeville/scripts/oracle.rs2 @@ -9,45 +9,45 @@ if (~quest_dragon_getting_map_parts = true & %dragon_oracle >= ^quest_dragon_kno [label,oracle_seek_map_piece] -~chatplayer(neutral, "I seek a piece of the map to the island of Crandor."); +~chatplayer("I seek a piece of the map to the island of Crandor."); %dragon_oracle = ^quest_dragon_has_spoken_to_oracle; // osrs -~chatnpc(neutral, "The map's behind a door below,|but entering is rather tough.|This is what you need to know:|You must use the following stuff."); -~chatnpc(neutral, "First, a drink used by a mage.|Next, some worm string, changed to sheet.|Then, a small crustacean cage.|Last, a bowl that's not seen heat."); +~chatnpc("The map's behind a door below,|but entering is rather tough.|This is what you need to know:|You must use the following stuff."); +~chatnpc("First, a drink used by a mage.|Next, some worm string, changed to sheet.|Then, a small crustacean cage.|Last, a bowl that's not seen heat."); // Different than rsc, https://www.rsbandb.com/forums/viewtopic.php?f=2&t=6503&hilit=oracle // https://www.rsbandb.com/forums/viewtopic.php?f=1&t=2268&p=14226&hilit=oracle#p14226 [label,oracle_random] -~chatplayer(quiz, "Can you impart your wise knowledge to me, O Oracle?"); +~chatplayer("Can you impart your wise knowledge to me, O Oracle?"); def_int $random = random(30); switch_int ($random) { - case 0 : ~chatnpc(neutral, "Capes are always in fashion!"); - case 1 : ~chatnpc(neutral, "The light at the end of the tunnel is the demon-infested lava pit."); - case 2 : ~chatnpc(neutral, "Beware the cabbage: it is both green AND leafy."); - case 3 : ~chatnpc(neutral, "They say that ham does not mix well with other kinds of meat."); - case 4 : ~chatnpc(neutral, "A woodchuck does not chuck wood."); - case 5 : ~chatnpc(sad, "No. I'm not in the mood."); - case 6 : ~chatnpc(neutral, "It's not you; it's me."); - case 7 : ~chatnpc(neutral, "Too many cooks spoil the anchovy pizza."); - case 8 : ~chatnpc(neutral, "The God Wars are over...as long as the thing they were fighting over remains hidden."); - case 9 : ~chatnpc(neutral, "He who uses the power of custard mixes it with his tears."); - case 10 : ~chatnpc(neutral, "Nothing like a tasty fish."); - case 11 : ~chatnpc(neutral, "Don't judge a book by its cover - judge it on its' grammar and, punctuation."); - case 12 : ~chatnpc(happy, "Yes, I can. But I'm not going to."); - case 13 : ~chatnpc(neutral, "A bird in the hand can make a tasty snack."); - case 14 : ~chatnpc(neutral, "Pies...they're great, aren't they?"); - case 15 : ~chatnpc(neutral, "Who guards the guardsmen?"); - case 16 : ~chatnpc(neutral, "The great snake of Guthix guards more than she knows."); - case 17 : ~chatnpc(shifty, "Do not fear the dragons...fear their kin."); - case 18 : ~chatnpc(neutral, "Everyone you know will one day be dead."); - case 19 : ~chatnpc(neutral, "If a tree falls in the forest and no one is around, then nobody gets Woodcutting xp."); - case 20 : ~chatnpc(neutral, "Sometimes you get lucky, sometimes you don't."); - case 21 : ~chatnpc(neutral, "The chicken came before the egg."); - case 22 : ~chatnpc(neutral, "Is it time to wake up? I am not sure..."); - case 23 : ~chatnpc(neutral, "When in Asgarnia, do as the Asgarnians do."); - case 24 : ~chatnpc(neutral, "An answer is unimportant; it is the question that matters."); - case 25 : ~chatnpc(neutral, "The goblins will never make up their minds on their own."); - case 26 : ~chatnpc(neutral, "Jas left a stone behind."); - case 27 : ~chatnpc(neutral, "Many secrets are buried under this land."); - case 28 : ~chatnpc(neutral, "There are no crisps at the party."); - case 29 : ~chatnpc(neutral, "Help wanted? Enquire within."); + case 0 : ~chatnpc("Capes are always in fashion!"); + case 1 : ~chatnpc("The light at the end of the tunnel is the demon-infested lava pit."); + case 2 : ~chatnpc("Beware the cabbage: it is both green AND leafy."); + case 3 : ~chatnpc("They say that ham does not mix well with other kinds of meat."); + case 4 : ~chatnpc("A woodchuck does not chuck wood."); + case 5 : ~chatnpc("No. I'm not in the mood."); + case 6 : ~chatnpc("It's not you; it's me."); + case 7 : ~chatnpc("Too many cooks spoil the anchovy pizza."); + case 8 : ~chatnpc("The God Wars are over...as long as the thing they were fighting over remains hidden."); + case 9 : ~chatnpc("He who uses the power of custard mixes it with his tears."); + case 10 : ~chatnpc("Nothing like a tasty fish."); + case 11 : ~chatnpc("Don't judge a book by its cover - judge it on its' grammar and, punctuation."); + case 12 : ~chatnpc("Yes, I can. But I'm not going to."); + case 13 : ~chatnpc("A bird in the hand can make a tasty snack."); + case 14 : ~chatnpc("Pies...they're great, aren't they?"); + case 15 : ~chatnpc("Who guards the guardsmen?"); + case 16 : ~chatnpc("The great snake of Guthix guards more than she knows."); + case 17 : ~chatnpc("Do not fear the dragons...fear their kin."); + case 18 : ~chatnpc("Everyone you know will one day be dead."); + case 19 : ~chatnpc("If a tree falls in the forest and no one is around, then nobody gets Woodcutting xp."); + case 20 : ~chatnpc("Sometimes you get lucky, sometimes you don't."); + case 21 : ~chatnpc("The chicken came before the egg."); + case 22 : ~chatnpc("Is it time to wake up? I am not sure..."); + case 23 : ~chatnpc("When in Asgarnia, do as the Asgarnians do."); + case 24 : ~chatnpc("An answer is unimportant; it is the question that matters."); + case 25 : ~chatnpc("The goblins will never make up their minds on their own."); + case 26 : ~chatnpc("Jas left a stone behind."); + case 27 : ~chatnpc("Many secrets are buried under this land."); + case 28 : ~chatnpc("There are no crisps at the party."); + case 29 : ~chatnpc("Help wanted? Enquire within."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_edgeville/scripts/oziach.rs2 b/data/src/scripts/areas/area_edgeville/scripts/oziach.rs2 index 00f25a656..54333124f 100644 --- a/data/src/scripts/areas/area_edgeville/scripts/oziach.rs2 +++ b/data/src/scripts/areas/area_edgeville/scripts/oziach.rs2 @@ -3,30 +3,30 @@ [opnpc1,npc_747] if (%dragon_progress = ^quest_dragon_spoken_to_guildmaster) { // rsc - ~chatnpc(shifty, "Aye, 'tis a fair day my friend."); + ~chatnpc("Aye, 'tis a fair day my friend."); @multi3("Can you sell me some Rune plate mail?", oziach_can_sell_rune_plate, "I'm not your friend.", oziach_not_friend, "Yes, it's a very nice day.", oziach_nice_day); } // osrs, very similar to rsc if (%dragon_progress < ^dragon_complete & %dragon_progress > 0) { - ~chatnpc(quiz, "So how is thy quest going?"); + ~chatnpc("So how is thy quest going?"); @multi2("So where can I find this dragon?", oziach_find_dragon, "Where can I get an antidragon shield?", oziach_dragon_shield); } if (%dragon_progress = ^dragon_complete) { @oziach_dragon_complete; } //default -~chatnpc(shifty, "Aye, 'tis a fair day my friend."); +~chatnpc("Aye, 'tis a fair day my friend."); @multi2("I'm not your friend.", oziach_not_friend, "Yes, it's a very nice day.", oziach_nice_day); [opnpc3,npc_747] if (%dragon_progress < ^quest_dragon_spoken_to_oziach) { //osrs - ~chatnpc(angry, "I ain't got nothing to sell ye, adventurer."); + ~chatnpc("I ain't got nothing to sell ye, adventurer."); return; } if (%dragon_progress < ^dragon_complete) { // osrs - ~chatnpc(angry, "I'm not sellin' ye anything till you've slayed that dragon!"); + ~chatnpc("I'm not sellin' ye anything till you've slayed that dragon!"); return; } if (%dragon_progress = ^dragon_complete) { @@ -36,86 +36,86 @@ if (%dragon_progress = ^dragon_complete) { // rsc and osrs [label,oziach_not_friend] -~chatplayer(angry, "I'm not your friend."); -~chatnpc(angry, "I'm surprised if you're anyone's friend with those kind of manners."); +~chatplayer("I'm not your friend."); +~chatnpc("I'm surprised if you're anyone's friend with those kind of manners."); [label,oziach_can_sell_rune_plate] // rsc -~chatplayer(quiz, "Can you sell me some Rune plate mail?"); +~chatplayer("Can you sell me some Rune plate mail?"); // rsc & osrs -~chatnpc(shock, "So, how does thee know I 'ave some?"); +~chatnpc("So, how does thee know I 'ave some?"); @multi2("The guildmaster of the Champions' Guild told me.", oziach_guildmaster, "I am a master detective.", oziach_detective); [label,oziach_nice_day] -~chatplayer(neutral, "Yes, it's a very nice day."); +~chatplayer("Yes, it's a very nice day."); // rsc. osrs oziach is really mean here for no reason :( -~chatnpc(neutral, "Aye, may the gods walk by yer side."); +~chatnpc("Aye, may the gods walk by yer side."); // i think part of some of the later dragon slayer reworks made oziach meaner // so i took the mean part out of the osrs dialogue [label,oziach_detective] -~chatplayer(neutral, "I am a master detective."); +~chatplayer("I am a master detective."); //Line breaks are guessed, based off other dialogues of the time. dialogue also says rune platemail, so its probably old. -~chatnpc(neutral, "Well, however you found out about it,|I'm not going to let just anyone wear my rune platemail.|It's only for heroes."); +~chatnpc("Well, however you found out about it,|I'm not going to let just anyone wear my rune platemail.|It's only for heroes."); // before the rework, oziach would give instructions on map pieces and what not. // the reworked dialogue shows oziach saying guild master tells the player oziach has a quest to give. // Seems like that part didnt exist before the rework. So im using the rsc dialogue here [label,oziach_guildmaster] -~chatplayer(neutral, "The guildmaster of the Champions' Guild told me."); +~chatplayer("The guildmaster of the Champions' Guild told me."); // i do line breaks here to match rsc's -~chatnpc(neutral, "Well if you're worthy of his advise, you must have something going for you."); -~chatnpc(neutral, "He has been known to let some weaklin's into his guild though."); -~chatnpc(neutral, "I don't want just any old pumpkinmush to have this armour jus cos they have a large amount of cash."); -~chatnpc(neutral, "This is armour fit for a hero to be sure.|So you'll need to prove to me that you're a hero before you can buy some."); +~chatnpc("Well if you're worthy of his advise, you must have something going for you."); +~chatnpc("He has been known to let some weaklin's into his guild though."); +~chatnpc("I don't want just any old pumpkinmush to have this armour jus cos they have a large amount of cash."); +~chatnpc("This is armour fit for a hero to be sure.|So you'll need to prove to me that you're a hero before you can buy some."); def_int $choice = ~p_choice2("So how am I meant to prove that?", 0, "That's a pity, I'm not a hero.", 1); if ($choice = 1) { - ~chatplayer(sad, "That's a pity, I'm not a hero."); + ~chatplayer("That's a pity, I'm not a hero."); return; } -~chatplayer(quiz, "So how am I meant to prove that?"); +~chatplayer("So how am I meant to prove that?"); // extra line break after "Evlarg," -~chatnpc(neutral, "Well if you want to prove yourself, you could try and defeat Elvarg, the dragon of the Isle of Crandor."); +~chatnpc("Well if you want to prove yourself, you could try and defeat Elvarg, the dragon of the Isle of Crandor."); $choice = ~p_choice3("A dragon, that sounds like fun!", 0, "And will I need anything to defeat this dragon?", 1, "I may be a champion, but I don't think I'm up to dragon killing yet", 2); if ($choice = 2) { - ~chatplayer(sad, "I may be a champion, but I don't think I'm up to dragon killing yet"); - ~chatnpc(neutral, "Yes, I can understand that."); + ~chatplayer("I may be a champion, but I don't think I'm up to dragon killing yet"); + ~chatnpc("Yes, I can understand that."); return; } if ($choice = 0) { - ~chatplayer(neutral, "A dragon, that sounds like fun!"); + ~chatplayer("A dragon, that sounds like fun!"); } else if ($choice = 1) { - ~chatplayer(neutral, "And will I need anything to defeat this dragon?"); - ~chatnpc(neutral, "It's funny you should say that."); + ~chatplayer("And will I need anything to defeat this dragon?"); + ~chatnpc("It's funny you should say that."); } -~chatnpc(neutral, "Elvarg really is one of the most powerful dragons|I really wouldn't recommend charging in without special equipment."); -~chatnpc(neutral, "Her breath is the main thing to watch out for.|You can get fried very fast, unless you have a special flameproof antidragon shield."); -~chatnpc(neutral, "It won't totally protect you|but it should prevent some of the damage to you."); +~chatnpc("Elvarg really is one of the most powerful dragons|I really wouldn't recommend charging in without special equipment."); +~chatnpc("Her breath is the main thing to watch out for.|You can get fried very fast, unless you have a special flameproof antidragon shield."); +~chatnpc("It won't totally protect you|but it should prevent some of the damage to you."); %dragon_progress = ^quest_dragon_spoken_to_oziach; //rsc does it here @multi2("So where can I find this dragon?", oziach_find_dragon, "Where can I get an antidragon shield?", oziach_dragon_shield); [label,oziach_dragon_shield] -~chatplayer(quiz, "Where can I get an antidragon shield?"); -~chatnpc(neutral, "I believe the Duke of Lumbridge Castle may have one in his armoury."); +~chatplayer("Where can I get an antidragon shield?"); +~chatnpc("I believe the Duke of Lumbridge Castle may have one in his armoury."); %dragon_shield = ^quest_dragon_knows_about_shield; @multi2("So where can I find this dragon?", oziach_find_dragon, "Ok I'll try and get everything together.", oziach_farewell); [label,oziach_find_dragon] -~chatplayer(quiz, "So where can I find this dragon?"); -~chatnpc(neutral, "That is a problem too yes.|No one knows where the Isle of Crandor is located."); -~chatnpc(neutral, "There was a map, but it has torn up into three pieces which are now scattered across Asgarnia."); -~chatnpc(neutral, "You'll also struggle to find someone bold enough to take a ship to Crandor Island"); +~chatplayer("So where can I find this dragon?"); +~chatnpc("That is a problem too yes.|No one knows where the Isle of Crandor is located."); +~chatnpc("There was a map, but it has torn up into three pieces which are now scattered across Asgarnia."); +~chatnpc("You'll also struggle to find someone bold enough to take a ship to Crandor Island"); @multi4("Where is the first piece of the map?", oziach_first_piece, "Where is the second piece of the map?", oziach_second_piece, "Where is the third piece of the map?", oziach_third_piece, "Where can I get an antidragon shield?", oziach_dragon_shield); [label,oziach_first_piece] -~chatplayer(quiz, "Where is the first piece of the map?"); -~chatnpc(neutral, "Deep in a strange building known as Melzar's maze|located north west of Rimmington."); +~chatplayer("Where is the first piece of the map?"); +~chatnpc("Deep in a strange building known as Melzar's maze|located north west of Rimmington."); if (%dragon_progress < ^quest_dragon_maze_key) { - ~chatnpc(neutral, "You will need this to get in|this is the key to the front entrance to the maze."); + ~chatnpc("You will need this to get in|this is the key to the front entrance to the maze."); inv_add(inv, maze_key, 1); ~objbox(maze_key, "Oziach hands you a key."); %dragon_progress = ^quest_dragon_maze_key; @@ -123,33 +123,33 @@ if (%dragon_progress < ^quest_dragon_maze_key) { @multi4("Where can I get an antidragon shield?", oziach_dragon_shield, "Where is the second piece of the map?", oziach_second_piece, "Where is the third piece of the map?", oziach_third_piece, "Ok I'll try and get everything together.", oziach_farewell); [label,oziach_second_piece] -~chatplayer(quiz, "Where is the second piece of the map?"); +~chatplayer("Where is the second piece of the map?"); %dragon_oracle = ^quest_dragon_knows_about_oracle; -~chatnpc(neutral, "You will need to talk to the oracle on the ice mountain."); +~chatnpc("You will need to talk to the oracle on the ice mountain."); @multi4("Where can I get an antidragon shield?", oziach_dragon_shield, "Where is the first piece of the map?", oziach_first_piece, "Where is the third piece of the map?", oziach_third_piece, "Ok I'll try and get everything together.", oziach_farewell); [label,oziach_third_piece] -~chatplayer(quiz, "Where is the third piece of the map?"); -~chatnpc(neutral, "That was stolen by one of the goblins from the goblin village."); +~chatplayer("Where is the third piece of the map?"); +~chatnpc("That was stolen by one of the goblins from the goblin village."); %dragon_goblin = ^quest_dragon_knows_about_goblin; @multi4("Where can I get an antidragon shield?", oziach_dragon_shield, "Where is the first piece of the map?", oziach_first_piece, "Where is the second piece of the map?", oziach_second_piece, "Ok I'll try and get everything together.", oziach_farewell); [label,oziach_farewell] -~chatplayer(neutral, "Ok I'll try and get everything together."); -~chatnpc(neutral, "Fare ye well."); +~chatplayer("Ok I'll try and get everything together."); +~chatnpc("Fare ye well."); [label,oziach_dragon_complete] // rsc -~chatplayer(happy, "I have slain the dragon!"); -~chatnpc(happy, "Well done!"); +~chatplayer("I have slain the dragon!"); +~chatnpc("Well done!"); %dragon_progress = calc(^dragon_complete + 1); def_int $choice = ~p_choice2("Can I buy a rune plate mail body now please?", 0, "Thank you.", 1); if ($choice = 1) { - ~chatplayer(happy, "Thank you."); + ~chatplayer("Thank you."); return; } if ($choice = 0) { - ~chatplayer(happy, "Can I buy a rune plate mail body now please?"); + ~chatplayer("Can I buy a rune plate mail body now please?"); ~openshop_activenpc; return; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_entrana/scripts/cave_monk.rs2 b/data/src/scripts/areas/area_entrana/scripts/cave_monk.rs2 index 0a66deb4f..8b5aabd1d 100644 --- a/data/src/scripts/areas/area_entrana/scripts/cave_monk.rs2 +++ b/data/src/scripts/areas/area_entrana/scripts/cave_monk.rs2 @@ -1,14 +1,14 @@ [opnpc1,cave_monk] @cave_monk_chat; [label,cave_monk_chat] -~chatnpc(confused, "Be careful going in there! You are unarmed, and there is much evilness lurking down there! The evilness seems to block off our contact with our gods,"); -~chatnpc(confused, "so our prayers seem to have less effect down there. Oh, also, you won't be able to come back this way - This ladder only goes one way!"); -~chatnpc(confused, "The only exit from the caves below is a portal which leads only to the deepest wilderness!"); +~chatnpc("Be careful going in there! You are unarmed, and there is much evilness lurking down there! The evilness seems to block off our contact with our gods,"); +~chatnpc("so our prayers seem to have less effect down there. Oh, also, you won't be able to come back this way - This ladder only goes one way!"); +~chatnpc("The only exit from the caves below is a portal which leads only to the deepest wilderness!"); def_int $option = ~p_choice2("I don't think I'm strong enough to enter then.", 1, "Well that is a risk I will have to take.", 2); if($option = 1) { - ~chatplayer(sad, "I don't think I'm strong enough to enter then."); + ~chatplayer("I don't think I'm strong enough to enter then."); } else if ($option = 2) { - ~chatplayer(neutral, "Well that is a risk I will have to take."); + ~chatplayer("Well that is a risk I will have to take."); mes("You climb down the ladder."); p_telejump(0_44_152_6_46); stat_sub(prayer, calc((stat(prayer) * 95) / 100), 0); diff --git a/data/src/scripts/areas/area_entrana/scripts/frincos.rs2 b/data/src/scripts/areas/area_entrana/scripts/frincos.rs2 index 7f2216fed..dbb7ca0d1 100644 --- a/data/src/scripts/areas/area_entrana/scripts/frincos.rs2 +++ b/data/src/scripts/areas/area_entrana/scripts/frincos.rs2 @@ -1,11 +1,11 @@ [opnpc1,frincos] -~chatnpc(neutral, "Hello, how can I help you?"); +~chatnpc("Hello, how can I help you?"); def_int $option = ~p_choice3("What are you selling?", 1, "You can't; I'm beyond help.", 2, "I'm okay, thank you.", 3); if($option = 1) { - ~chatplayer(neutral, "What are you selling?"); + ~chatplayer("What are you selling?"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "You can't; I'm beyond help."); + ~chatplayer("You can't; I'm beyond help."); } else if($option = 3) { - ~chatplayer(neutral, "I'm okay, thank you."); + ~chatplayer("I'm okay, thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 b/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 index 204fb07eb..14777e7c5 100644 --- a/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 +++ b/data/src/scripts/areas/area_entrana/scripts/high_priest.rs2 @@ -1,17 +1,17 @@ [opnpc1,high_priest] -~chatnpc(happy, "Many greetings. Welcome to our fair island."); +~chatnpc("Many greetings. Welcome to our fair island."); if(%grail_progress < ^grail_finding_percival & %grail_progress >= ^grail_spoken_merlin) { - ~chatplayer(neutral, "Hello, I am in search of the Holy Grail."); - ~chatnpc(happy, "The object of which you speak did once pass through holy Entrana. I know not where it is now however."); - ~chatnpc(neutral, "Nor do I really care."); + ~chatplayer("Hello, I am in search of the Holy Grail."); + ~chatnpc("The object of which you speak did once pass through holy Entrana. I know not where it is now however."); + ~chatnpc("Nor do I really care."); if(npc_find(coord, crone, 9, 0) = false) { npc_add(0_44_52_35_14, crone, 500); } else { - ~chatnpc(neutral, "Wait!"); + ~chatnpc("Wait!"); } @crone_the_grail; } -~chatnpc(happy, "Enjoy your stay here.|May it be spiritually uplifting!"); +~chatnpc("Enjoy your stay here.|May it be spiritually uplifting!"); [opnpcu,high_priest] -~chatnpc(confused, "No thank you, I am not accepting donations for the church at this time."); \ No newline at end of file +~chatnpc("No thank you, I am not accepting donations for the church at this time."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_entrana/scripts/monk_of_entrana.rs2 b/data/src/scripts/areas/area_entrana/scripts/monk_of_entrana.rs2 index 7a981d555..9f4054bc1 100644 --- a/data/src/scripts/areas/area_entrana/scripts/monk_of_entrana.rs2 +++ b/data/src/scripts/areas/area_entrana/scripts/monk_of_entrana.rs2 @@ -1,10 +1,10 @@ [opnpc1,monk_of_entrana_island] -~chatnpc(happy, "Do you wish to leave holy Entrana?"); +~chatnpc("Do you wish to leave holy Entrana?"); def_int $option = ~p_choice2("Yes, I'm ready to go.", 1, "Not just yet.", 2); if($option = 1){ - ~chatplayer(neutral, "Yes, I'm ready to go."); - ~chatnpc(happy, "Okay, let's board..."); + ~chatplayer("Yes, I'm ready to go."); + ~chatnpc("Okay, let's board..."); ~set_sail("Port Sarim", "The ship takes you to Port Sarim.", 1_47_50_40_31, ^sail_entrana_to_port_sarim, 14); } else if($option = 2) { - ~chatplayer(neutral, "Not just yet."); + ~chatplayer("Not just yet."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/barmaid.rs2 b/data/src/scripts/areas/area_falador/scripts/barmaid.rs2 index 0b65be2b3..1a6aee095 100644 --- a/data/src/scripts/areas/area_falador/scripts/barmaid.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/barmaid.rs2 @@ -14,11 +14,11 @@ def_int $option = ~p_choice2("Hi, what ales are you serving?", 1, "I'm doing Alf if($option = 1) { @barmaid_what_ales; } else if($option = 2) { - ~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); - ~chatnpc(laugh, "Heehee, this'll be fun!"); - ~chatnpc(shifty, "You'll be after our Hand of Death cocktail, then.|Lots of expensive parts to the cocktail, though,|so it will cost you 70 coins."); + ~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); + ~chatnpc("Heehee, this'll be fun!"); + ~chatnpc("You'll be after our Hand of Death cocktail, then.|Lots of expensive parts to the cocktail, though,|so it will cost you 70 coins."); if(inv_total(inv, coins) < 70) { - ~chatplayer(sad, "I don't have that much money on me."); + ~chatplayer("I don't have that much money on me."); return; } if_close; @@ -47,39 +47,39 @@ if($option = 1) { } [label,barmaid_what_ales] -~chatplayer(quiz, "Hi, what ales are you serving?"); -~chatnpc(happy, "Well, you can either have a nice Asgarnian Ale, a Wizard's Mind Bomb or a Dwarven Stout."); +~chatplayer("Hi, what ales are you serving?"); +~chatnpc("Well, you can either have a nice Asgarnian Ale, a Wizard's Mind Bomb or a Dwarven Stout."); def_int $option = ~p_choice4("One Asgarnian Ale, please.", 1, "I'll try the Mind Bomb.", 2, "Can I have a Dwarven Stout?", 3, "I don't feel like any of those.", 4); if($option = 1) { - ~chatplayer(happy, "One Asgarnian Ale, please."); - ~chatnpc(happy, "That'll be two gold."); + ~chatplayer("One Asgarnian Ale, please."); + ~chatnpc("That'll be two gold."); if(inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear, I don't seem to have enough money."); + ~chatplayer("Oh dear, I don't seem to have enough money."); return; } inv_del(inv, coins, 2); inv_add(inv, asgarnian_ale, 1); mes("You buy an Asgarnian Ale."); } else if ($option = 2) { - ~chatplayer(happy, "I'll try the Mind Bomb."); - ~chatnpc(happy, "That'll be two gold."); + ~chatplayer("I'll try the Mind Bomb."); + ~chatnpc("That'll be two gold."); if(inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear, I don't seem to have enough money."); + ~chatplayer("Oh dear, I don't seem to have enough money."); return; } inv_del(inv, coins, 2); inv_add(inv, wizards_mind_bomb, 1); mes("You buy a pint of Wizard's Mind Bomb."); } else if($option = 3) { - ~chatplayer(quiz, "Can I have a Dwarven Stout?"); - ~chatnpc(happy, "That'll be three gold."); + ~chatplayer("Can I have a Dwarven Stout?"); + ~chatnpc("That'll be three gold."); if(inv_total(inv, coins) < 3) { - ~chatplayer(sad, "Oh dear, I don't seem to have enough money."); + ~chatplayer("Oh dear, I don't seem to have enough money."); return; } inv_del(inv, coins, 3); inv_add(inv, dwarven_stout, 1); mes("You buy a pint of Dwarven Stout."); } else if($option = 4) { - ~chatplayer(neutral, "I don't feel like any of those."); + ~chatplayer("I don't feel like any of those."); } diff --git a/data/src/scripts/areas/area_falador/scripts/cassie.rs2 b/data/src/scripts/areas/area_falador/scripts/cassie.rs2 index 22ffe2a4c..0d0b10f74 100644 --- a/data/src/scripts/areas/area_falador/scripts/cassie.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/cassie.rs2 @@ -1,10 +1,10 @@ [opnpc1,cassie] -~chatplayer(quiz, "What wares are you selling?"); -~chatnpc(happy, "I buy and sell shields, do you want to trade?"); +~chatplayer("What wares are you selling?"); +~chatnpc("I buy and sell shields, do you want to trade?"); def_int $option = ~p_choice2("Yes please.", 1, "No thank you.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/drogo_dwarf.rs2 b/data/src/scripts/areas/area_falador/scripts/drogo_dwarf.rs2 index b54d25362..82519a803 100644 --- a/data/src/scripts/areas/area_falador/scripts/drogo_dwarf.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/drogo_dwarf.rs2 @@ -1,13 +1,13 @@ [opnpc1,drogo_dwarf] -~chatnpc(happy, "Ello, welcome to my Mining shop, friend!"); +~chatnpc("Ello, welcome to my Mining shop, friend!"); def_int $option = ~p_choice3("Do you want to trade?", 1, "Hello, shorty.", 2, "Why don't you ever restock ores and bars?", 3); if($option = 1) { - ~chatplayer(neutral, "Do you want to trade?"); + ~chatplayer("Do you want to trade?"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(happy, "Hello, shorty."); - ~chatnpc(angry, "I may be short, but at least I've got manners."); + ~chatplayer("Hello, shorty."); + ~chatnpc("I may be short, but at least I've got manners."); } else if($option = 3) { - ~chatplayer(quiz, "Why don't you ever restock ores and bars?"); - ~chatnpc(happy, "The only ores and bars I sell are those sold to me."); + ~chatplayer("Why don't you ever restock ores and bars?"); + ~chatnpc("The only ores and bars I sell are those sold to me."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/flynn.rs2 b/data/src/scripts/areas/area_falador/scripts/flynn.rs2 index e0bb598a4..f630e5f76 100644 --- a/data/src/scripts/areas/area_falador/scripts/flynn.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/flynn.rs2 @@ -1,9 +1,9 @@ [opnpc1,falador_flynn] -~chatnpc(happy, "Hello. Do you want to buy or sell any maces?"); +~chatnpc("Hello. Do you want to buy or sell any maces?"); def_int $option = ~p_choice2("No thanks.", 1, "Well, I'll have a look, anyway.", 2); if($option = 1) { - ~chatplayer(neutral, "No thanks."); + ~chatplayer("No thanks."); } else if($option = 2) { - ~chatplayer(neutral, "Well, I'll have a look, anyway."); // line not in OSRS + ~chatplayer("Well, I'll have a look, anyway."); // line not in OSRS ~openshop_activenpc; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/goblin_village/general_bentnoze.rs2 b/data/src/scripts/areas/area_falador/scripts/goblin_village/general_bentnoze.rs2 index 2cd1fc6b1..dc31fb971 100644 --- a/data/src/scripts/areas/area_falador/scripts/goblin_village/general_bentnoze.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/goblin_village/general_bentnoze.rs2 @@ -4,13 +4,13 @@ if (~quest_dragon_getting_map_parts = true & %dragon_goblin = ^quest_dragon_knows_about_goblin) { def_int $choice = ~p_choice2("I've heard that one of your number has got hold of|part of a map.", 0, "So how is life for the goblins?", 1); if ($choice = 0) { - ~chatplayer(neutral, "I've heard that one of your number has got hold of|part of a map."); - ~chatnpc(neutral, "Aha, that'd be Wormbrain."); - ~chatplayer(quiz, "Where would he be?"); - ~chatnpc(neutral, "Wormbrain steals too much.|He got caught.|Now he lives in Port Sarim town jail."); + ~chatplayer("I've heard that one of your number has got hold of|part of a map."); + ~chatnpc("Aha, that'd be Wormbrain."); + ~chatplayer("Where would he be?"); + ~chatnpc("Wormbrain steals too much.|He got caught.|Now he lives in Port Sarim town jail."); return; } - ~chatplayer(quiz, "So how is life for the goblins?"); + ~chatplayer("So how is life for the goblins?"); } switch_int (%gobdip_progress) { case 6 : @goblin_diplomacy_completed; diff --git a/data/src/scripts/areas/area_falador/scripts/hairdresser.rs2 b/data/src/scripts/areas/area_falador/scripts/hairdresser.rs2 index f94966c1f..facb146a5 100644 --- a/data/src/scripts/areas/area_falador/scripts/hairdresser.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/hairdresser.rs2 @@ -5,23 +5,23 @@ if (gender = ^gender_female) { @not_written_yet; } -~chatnpc(happy, "Good afternoon sir. In need of a haircut are we? Perhaps a shave too?"); +~chatnpc("Good afternoon sir. In need of a haircut are we? Perhaps a shave too?"); @multi3("I'd like a haircut please.", hairdresser_b1_s1, "I'd like a shave please.", hairdresser_b1_s2, "No thank you.", hairdresser_b1_s3); [label,hairdresser_b1_s1] -~chatplayer(happy, "I'd like a haircut please."); -~chatnpc(happy, "Certainly sir. I cut men's hair at the bargain rate of only 1000 gold coins. I'll even throw in a free recolour!"); -~chatnpc(happy, "Please select the hairstyle and colour you would like from this brochure."); +~chatplayer("I'd like a haircut please."); +~chatnpc("Certainly sir. I cut men's hair at the bargain rate of only 1000 gold coins. I'll even throw in a free recolour!"); +~chatnpc("Please select the hairstyle and colour you would like from this brochure."); @not_written_yet; [label,hairdresser_b1_s2] -~chatplayer(happy, "I'd like a shave please."); +~chatplayer("I'd like a shave please."); // TODO: dialogue @not_written_yet; [label,hairdresser_b1_s3] -~chatplayer(happy, "No thank you."); +~chatplayer("No thank you."); // on confirm: Hope you like the new do! diff --git a/data/src/scripts/areas/area_falador/scripts/herquin.rs2 b/data/src/scripts/areas/area_falador/scripts/herquin.rs2 index dd2b41b28..b1ca6ffcf 100644 --- a/data/src/scripts/areas/area_falador/scripts/herquin.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/herquin.rs2 @@ -1,9 +1,9 @@ [opnpc1,herquin] def_int $option = ~p_choice2("Do you wish to trade?", 1, "Sorry I don't want to talk to you actually.", 2); if($option = 1) { - ~chatplayer(neutral, "Do you wish to trade?"); - ~chatnpc(happy, "Why yes this a jewel shop after all."); + ~chatplayer("Do you wish to trade?"); + ~chatnpc("Why yes this a jewel shop after all."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Sorry I don't want to talk to you actually."); + ~chatplayer("Sorry I don't want to talk to you actually."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/mining_guild.rs2 b/data/src/scripts/areas/area_falador/scripts/mining_guild.rs2 index 5003e4d16..704b54e2b 100644 --- a/data/src/scripts/areas/area_falador/scripts/mining_guild.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/mining_guild.rs2 @@ -1,6 +1,6 @@ [oploc1,loc_2113] if (stat(mining) < 60) { - ~chatnpc_specific("Dwarf", npc_382, neutral, "Sorry, but you're not experienced enough to go in there."); + ~chatnpc_specific("Dwarf", npc_382, "Sorry, but you're not experienced enough to go in there."); ~mesbox("You need a Mining level of 60 to access the Mining Guild."); return; } @@ -9,7 +9,7 @@ p_arrivedelay; [oploc1,loc_2112] if (stat(mining) < 60) { - ~chatnpc_specific("Dwarf", npc_382, neutral, "Sorry, but you're not experienced enough to go in there."); + ~chatnpc_specific("Dwarf", npc_382, "Sorry, but you're not experienced enough to go in there."); ~mesbox("You need a Mining level of 60 to access the Mining Guild."); return; } diff --git a/data/src/scripts/areas/area_falador/scripts/nurmof.rs2 b/data/src/scripts/areas/area_falador/scripts/nurmof.rs2 index 4199bf2ff..58890b7af 100644 --- a/data/src/scripts/areas/area_falador/scripts/nurmof.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/nurmof.rs2 @@ -1,5 +1,5 @@ [opnpc1,nurmof] -~chatnpc(happy, "Greetings and welcome to my pickaxe shop. Do you want to buy my premium quality pickaxes?"); +~chatnpc("Greetings and welcome to my pickaxe shop. Do you want to buy my premium quality pickaxes?"); def_int $option; if (~has_broken_pickaxe = true) { @@ -9,16 +9,16 @@ if (~has_broken_pickaxe = true) { } if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No, thank you."); + ~chatplayer("No, thank you."); } else if($option = 3) { - ~chatplayer(neutral, "Are your pickaxes better than other pickaxes, then?"); - ~chatnpc(happy, "Of course they are! My pickaxes are made of higher grade metal than your ordinary bronze pickaxes, allowing you to mine that ore just a little bit faster than normal."); + ~chatplayer("Are your pickaxes better than other pickaxes, then?"); + ~chatnpc("Of course they are! My pickaxes are made of higher grade metal than your ordinary bronze pickaxes, allowing you to mine that ore just a little bit faster than normal."); } else if ($option = 4) { - ~chatplayer(sad, "Can you repair my pickaxe for me?"); // guess - ~chatnpc(shock, "Of course I can, though the materials may cost you.|Just hand me the pickaxe and I'll have a look."); // taken from bob fixing axe + ~chatplayer("Can you repair my pickaxe for me?"); // guess + ~chatnpc("Of course I can, though the materials may cost you.|Just hand me the pickaxe and I'll have a look."); // taken from bob fixing axe return; } @@ -30,13 +30,13 @@ if (oc_param($item, to_be_fixed_by_nurmof) = ^true) { // dialogue is guessed and // found a video https://youtu.be/43nVXcCOOCM // doesnt show all the dialogue but shows that its likely the same as bob fixing axes if (inv_total(inv, coins) < $cost) { - ~chatnpc(sad, "I'll need gp to repair that."); // bob osrs + ~chatnpc("I'll need gp to repair that."); // bob osrs return; } if ($cost > 0) { - ~chatnpc(neutral, "Quite badly damaged, but easy to repair. Would you like me to repair it for gp?"); + ~chatnpc("Quite badly damaged, but easy to repair. Would you like me to repair it for gp?"); } else { - ~chatnpc(neutral, "Quite badly damaged, but easy to repair. Would you like me to repair it for free?"); + ~chatnpc("Quite badly damaged, but easy to repair. Would you like me to repair it for free?"); } def_int $option = ~p_choice2("Yes, please.", 1, "No, thank you.", 2); @@ -48,7 +48,7 @@ if (oc_param($item, to_be_fixed_by_nurmof) = ^true) { // dialogue is guessed and return; } if (inv_total(inv, coins) < $cost) { - ~chatplayer(sad, "Sorry, I don't have enough money with me."); // complete guess + ~chatplayer("Sorry, I don't have enough money with me."); // complete guess return; } // fix pickaxe @@ -59,7 +59,7 @@ if (oc_param($item, to_be_fixed_by_nurmof) = ^true) { // dialogue is guessed and return; } } else { - ~chatnpc(neutral, "Sorry friend, but I can't do anything with that."); // bob osrs + ~chatnpc("Sorry friend, but I can't do anything with that."); // bob osrs } [proc,has_broken_pickaxe]()(boolean) diff --git a/data/src/scripts/areas/area_falador/scripts/sir_amik_varze.rs2 b/data/src/scripts/areas/area_falador/scripts/sir_amik_varze.rs2 index becaeaf83..9e2900c9d 100644 --- a/data/src/scripts/areas/area_falador/scripts/sir_amik_varze.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/sir_amik_varze.rs2 @@ -6,73 +6,73 @@ switch_int (%blackknight_progress) { } [label,black_knights_fortress_sir_amik_prequest] -~chatnpc(quiz, "I am the leader of the White Knights of Falador.|Why do you seek my audience?"); +~chatnpc("I am the leader of the White Knights of Falador.|Why do you seek my audience?"); def_int $option = ~p_choice2("I seek a quest!", 1, "I don't, I'm just looking around.", 2); if ($option = 1) { - ~chatplayer(neutral, "I seek a quest."); + ~chatplayer("I seek a quest."); if (%questpoints < 12) { - ~chatnpc(neutral, "Well I do have a task, but it is very dangerous and it's critical to us that no mistakes are made. I couldn't possibly let an unexperienced quester like yourself go."); + ~chatnpc("Well I do have a task, but it is very dangerous and it's critical to us that no mistakes are made. I couldn't possibly let an unexperienced quester like yourself go."); mes("You need at least 12 quest points before you may attempt this quest."); } else { @black_knights_fortress_sir_amik_meets_requirements; } } else { - ~chatplayer(neutral, "I don't, I'm just looking around."); - ~chatnpc(neutral, "Ok, don't break anything."); + ~chatplayer("I don't, I'm just looking around."); + ~chatnpc("Ok, don't break anything."); } [label,black_knights_fortress_sir_amik_meets_requirements] -~chatnpc(neutral, "Well, I need some spy work doing.|It's quite dangerous.|You will need to go into the Black Knight's fortress."); +~chatnpc("Well, I need some spy work doing.|It's quite dangerous.|You will need to go into the Black Knight's fortress."); def_int $option = ~p_choice2("I laugh in the face of danger!", 1, "I go and cower in a corner at the first sign of danger!", 2); if ($option = 1) { - ~chatplayer(happy, "I laugh in the face of danger."); - ~chatnpc(neutral, "Well that's good. Don't get too overconfident though."); + ~chatplayer("I laugh in the face of danger."); + ~chatnpc("Well that's good. Don't get too overconfident though."); @black_knights_fortress_sir_amik_come_along_at_the_right_time; } else { - ~chatplayer(quiz, "I go and cower in a corner at the first sign of danger!"); - ~chatnpc(confused, "Err..."); - ~chatnpc(confused, "Well."); - ~chatnpc(quiz, "Spy work does involve a little hiding in corners I suppose."); + ~chatplayer("I go and cower in a corner at the first sign of danger!"); + ~chatnpc("Err..."); + ~chatnpc("Well."); + ~chatnpc("Spy work does involve a little hiding in corners I suppose."); def_int $give_it_a_go_or_no = ~p_choice2("Oh, I suppose I'll give it a go then.", 1, "No, I'm not convinced.", 2); if ($give_it_a_go_or_no = 1) { @black_knights_fortress_sir_amik_come_along_at_the_right_time; } else { - ~chatplayer(neutral, "No, I'm not convinced."); + ~chatplayer("No, I'm not convinced."); } } [label,black_knights_fortress_sir_amik_come_along_at_the_right_time] -~chatnpc(neutral, "You've come along just right actually.|All of my knights are already known to the Black Knights."); -~chatnpc(sad, "Subtlety isn't exactly our strong point."); -~chatplayer(quiz, "So what needs doing?"); -~chatnpc(angry, "Well the Black Knights have started making strange threats to us. Demanding large amounts of money and land, and threatening to invade Falador if we don't pay."); -~chatnpc(neutral, "Now normally this wouldn't be a problem."); -~chatnpc(sad, "But they claim to have a powerful new secret weapon."); -~chatnpc(neutral, "What I want you to do is get inside their fortress.|Find out what their secret weapon is.|And then sabotage it. You will be well paid."); -~chatplayer(neutral, "Ok, I'll give it a try."); +~chatnpc("You've come along just right actually.|All of my knights are already known to the Black Knights."); +~chatnpc("Subtlety isn't exactly our strong point."); +~chatplayer("So what needs doing?"); +~chatnpc("Well the Black Knights have started making strange threats to us. Demanding large amounts of money and land, and threatening to invade Falador if we don't pay."); +~chatnpc("Now normally this wouldn't be a problem."); +~chatnpc("But they claim to have a powerful new secret weapon."); +~chatnpc("What I want you to do is get inside their fortress.|Find out what their secret weapon is.|And then sabotage it. You will be well paid."); +~chatplayer("Ok, I'll give it a try."); ~update_blackknight_progress; [label,black_knights_fortress_sir_amik_in_progress] if (%blackknight_progress = 1) { - ~chatnpc(quiz, "How's the mission going?"); - ~chatplayer(neutral, "I haven't managed to find what the secret weapon is yet."); + ~chatnpc("How's the mission going?"); + ~chatplayer("I haven't managed to find what the secret weapon is yet."); } else if (%blackknight_progress = 2) { - ~chatnpc(quiz, "How' the mission going?"); - ~chatplayer(neutral, "I've found out what the Black Knight's secret weapon is. It's a potion of invincibility."); - ~chatnpc(sad, "That is bad news.|If you can sabotage it somehow, you will be paid well."); + ~chatnpc("How' the mission going?"); + ~chatplayer("I've found out what the Black Knight's secret weapon is. It's a potion of invincibility."); + ~chatnpc("That is bad news.|If you can sabotage it somehow, you will be paid well."); } else if (%blackknight_progress = 3) { - ~chatplayer(neutral, "I have ruined the Black Knight's invincibility potion.|That should put a stop to your problem."); - ~chatnpc(quiz, "Yes we have just received a message from the Black Knights saying they withdraw their demands. Which confirms your story."); - ~chatplayer(neutral, "You said you were going to pay me."); - ~chatnpc(happy, "Yes, that's right."); + ~chatplayer("I have ruined the Black Knight's invincibility potion.|That should put a stop to your problem."); + ~chatnpc("Yes we have just received a message from the Black Knights saying they withdraw their demands. Which confirms your story."); + ~chatplayer("You said you were going to pay me."); + ~chatnpc("Yes, that's right."); ~update_blackknight_progress; queue(black_knights_fortress_quest_complete, 0); } [label,black_knights_fortress_sir_amik_postquest] -~chatplayer(happy, "Hello Sir Amik."); -~chatnpc(happy, "Hello, friend!"); \ No newline at end of file +~chatplayer("Hello Sir Amik."); +~chatnpc("Hello, friend!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/sir_vyvin.rs2 b/data/src/scripts/areas/area_falador/scripts/sir_vyvin.rs2 index 051c32653..686e61be6 100644 --- a/data/src/scripts/areas/area_falador/scripts/sir_vyvin.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/sir_vyvin.rs2 @@ -1,24 +1,24 @@ [opnpc1,sir_vyvin] -~chatplayer(neutral, "Hello."); -~chatnpc(neutral, "Greetings traveller."); +~chatplayer("Hello."); +~chatnpc("Greetings traveller."); @multi3("Do you have anything to trade?", sir_vyvin_trade, "Why are there so many knights in this city?", sir_vyvin_knights, "Can I distract you for a minute?", sir_vyvin_distract); [label,sir_vyvin_trade] -~chatplayer(quiz, "Do you have anything to trade?"); -~chatnpc(neutral, "No, I'm sorry."); +~chatplayer("Do you have anything to trade?"); +~chatnpc("No, I'm sorry."); [label,sir_vyvin_knights] -~chatplayer(quiz, "Why are there so many knights in this city?"); -~chatnpc(default, "We are the White Knights of Falador. We are the most powerful order of knights in the land. We are helping the king Vallance rule the kingdom as he is getting old and tired."); +~chatplayer("Why are there so many knights in this city?"); +~chatnpc("We are the White Knights of Falador. We are the most powerful order of knights in the land. We are helping the king Vallance rule the kingdom as he is getting old and tired."); [label,sir_vyvin_distract] -~chatplayer(happy, "Can I just talk to you very slowly for a few minutes, while I distract you, so that my friend over there can do something while you're busy being distracted by me?"); -~chatnpc(confused, "... ...what?"); -~chatnpc(confused, "I'm... not sure what you're asking me... you want to join the White Knights?"); -~chatplayer(happy, "Nope. I'm just trying to distract you."); -~chatnpc(confused, "... ...you are very odd."); -~chatplayer(happy, "So can I distract you some more?"); -~chatnpc(confused, "... ...I don't think I want to talk to you anymore."); -~chatplayer(happy, "Ok. My work here is done. 'Bye!"); +~chatplayer("Can I just talk to you very slowly for a few minutes, while I distract you, so that my friend over there can do something while you're busy being distracted by me?"); +~chatnpc("... ...what?"); +~chatnpc("I'm... not sure what you're asking me... you want to join the White Knights?"); +~chatplayer("Nope. I'm just trying to distract you."); +~chatnpc("... ...you are very odd."); +~chatplayer("So can I distract you some more?"); +~chatnpc("... ...I don't think I want to talk to you anymore."); +~chatplayer("Ok. My work here is done. 'Bye!"); diff --git a/data/src/scripts/areas/area_falador/scripts/squire.rs2 b/data/src/scripts/areas/area_falador/scripts/squire.rs2 index 72f916f4a..1ba120ecb 100644 --- a/data/src/scripts/areas/area_falador/scripts/squire.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/squire.rs2 @@ -5,15 +5,15 @@ if(inv_total(inv, trail_clue_easy_simple_exp017) = 1) { } else if(%squire_progress = 0) { @squire_start; } else if(%squire_progress = ^squire_complete) { - ~chatnpc(happy, "Hello friend! Many thanks for all of your help! Vyvin never even realised it was a different sword, and I still have my job!"); - ~chatplayer(happy, "I'm glad the new sword worked out alright."); + ~chatnpc("Hello friend! Many thanks for all of your help! Vyvin never even realised it was a different sword, and I still have my job!"); + ~chatplayer("I'm glad the new sword worked out alright."); } else { - ~chatnpc(quiz, "So how are you doing getting a sword?"); + ~chatnpc("So how are you doing getting a sword?"); @squire_status_report; } [label,trail_squire] -~chatnpc(quiz, "OK, here you go."); +~chatnpc("OK, here you go."); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp017, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_falador/scripts/wayne.rs2 b/data/src/scripts/areas/area_falador/scripts/wayne.rs2 index 71f99bb7f..152831e07 100644 --- a/data/src/scripts/areas/area_falador/scripts/wayne.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/wayne.rs2 @@ -1,9 +1,9 @@ [opnpc1,wayne] -~chatnpc(happy, "Welcome to Wayne's Chains.|Do you wanna buy or sell some chain mail?"); +~chatnpc("Welcome to Wayne's Chains.|Do you wanna buy or sell some chain mail?"); def_int $option = ~p_choice2("Yes please.", 1, "No thanks.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thanks."); + ~chatplayer("No thanks."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_falador/scripts/wyson_the_gardener.rs2 b/data/src/scripts/areas/area_falador/scripts/wyson_the_gardener.rs2 index 9a9e3d135..226dd43bd 100644 --- a/data/src/scripts/areas/area_falador/scripts/wyson_the_gardener.rs2 +++ b/data/src/scripts/areas/area_falador/scripts/wyson_the_gardener.rs2 @@ -1,21 +1,21 @@ [opnpc1,wyson] -~chatnpc(neutral, "I'm the gardener around here.|Do you have any gardening that needs doing?"); +~chatnpc("I'm the gardener around here.|Do you have any gardening that needs doing?"); def_int $option = ~p_choice2("I'm looking for woad leaves.", 1, "Not right now, thanks.", 2); if($option = 1) { - ~chatplayer(neutral, "I'm looking for woad leaves."); - ~chatnpc(shifty, "How much are you willing to pay?"); + ~chatplayer("I'm looking for woad leaves."); + ~chatnpc("How much are you willing to pay?"); $option = ~p_choice4("How about 5 coins?", 1, "How about 10 coins?", 2, "How about 15 coins?", 3, "How about 20 coins?", 4); if($option = 1) { - ~chatplayer(neutral, "How about 5 coins?"); - ~chatnpc(angry, "No no, that's far too little.|Woad leaves are hard to get.|I used to have plenty but someone|kept stealing them off me!"); + ~chatplayer("How about 5 coins?"); + ~chatnpc("No no, that's far too little.|Woad leaves are hard to get.|I used to have plenty but someone|kept stealing them off me!"); } else if($option = 2) { - ~chatplayer(neutral, "How about 10 coins?"); - ~chatnpc(angry, "No no, that's far too little.|Woad leaves are hard to get.|I used to have plenty but someone|kept stealing them off me!"); + ~chatplayer("How about 10 coins?"); + ~chatnpc("No no, that's far too little.|Woad leaves are hard to get.|I used to have plenty but someone|kept stealing them off me!"); } else if($option = 3) { - ~chatplayer(neutral, "How about 15 coins?"); - ~chatnpc(neutral, "Mmmm... okay, sounds fair."); + ~chatplayer("How about 15 coins?"); + ~chatnpc("Mmmm... okay, sounds fair."); if(inv_total(inv, coins) < 15) { - ~chatplayer(sad, "I don't have enough coins to buy the leaves.|I'll come back later."); + ~chatplayer("I don't have enough coins to buy the leaves.|I'll come back later."); } else { inv_del(inv, coins, 15); inv_add(inv, woad_leaf, 1); @@ -23,12 +23,12 @@ if($option = 1) { mes("Wyson the gardener gives you a woad leaf."); } } else if($option = 4) { - ~chatplayer(neutral, "How about 20 coins?"); - ~chatnpc(happy, "Okay, that's more than fair."); + ~chatplayer("How about 20 coins?"); + ~chatnpc("Okay, that's more than fair."); if(inv_total(inv, coins) < 20) { - ~chatplayer(sad, "I don't have enough coins to buy the leaves.|I'll come back later."); + ~chatplayer("I don't have enough coins to buy the leaves.|I'll come back later."); } else { - ~chatnpc(happy, "Here, have two, you're a generous person."); + ~chatnpc("Here, have two, you're a generous person."); inv_del(inv, coins, 20); inv_add(inv, woad_leaf, 2); mes("You give Wyson 20 coins."); @@ -36,5 +36,5 @@ if($option = 1) { } } } else if($option = 2) { - ~chatplayer(neutral, "Not right now, thanks."); + ~chatplayer("Not right now, thanks."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_fishing_platform/scripts/bailey.rs2 b/data/src/scripts/areas/area_fishing_platform/scripts/bailey.rs2 index 1bdad99eb..14bf339c4 100644 --- a/data/src/scripts/areas/area_fishing_platform/scripts/bailey.rs2 +++ b/data/src/scripts/areas/area_fishing_platform/scripts/bailey.rs2 @@ -1,55 +1,55 @@ [opnpc1,bailey] switch_int(%seaslug_progress) { case ^seaslug_boat_repaired, ^seaslug_spoken_kennith, ^seaslug_sailed_kent: - ~chatplayer(happy, "Hello."); - ~chatnpc(worried, "Well hello there.|What are you doing here?"); - ~chatplayer(neutral, "I'm trying to find out what happened|to a boy named Kennith."); - ~chatnpc(neutral, "Oh you mean Kent's son.|He's around somewhere, probably hiding|if he knows what's good for him."); - ~chatplayer(quiz, "Hiding from what?"); - ~chatnpc(neutral, "Haven't you seen all those things out there?"); - ~chatplayer(quiz, "The sea slugs?"); - ~chatnpc(shifty, "Ever since we pulled up that haul,|something strange has been going on."); - ~chatnpc(shifty, "The fishermen spend all day pulling in hauls of fish,|only to throw back the fish and keep those nasty sea slugs."); - ~chatnpc(shifty, "What am I supposed to do with those?|I haven't figured out how to kill one yet,|if I put them near the stove they squirm|and jump away."); - ~chatplayer(confused, "I doubt they would taste too good."); + ~chatplayer("Hello."); + ~chatnpc("Well hello there.|What are you doing here?"); + ~chatplayer("I'm trying to find out what happened|to a boy named Kennith."); + ~chatnpc("Oh you mean Kent's son.|He's around somewhere, probably hiding|if he knows what's good for him."); + ~chatplayer("Hiding from what?"); + ~chatnpc("Haven't you seen all those things out there?"); + ~chatplayer("The sea slugs?"); + ~chatnpc("Ever since we pulled up that haul,|something strange has been going on."); + ~chatnpc("The fishermen spend all day pulling in hauls of fish,|only to throw back the fish and keep those nasty sea slugs."); + ~chatnpc("What am I supposed to do with those?|I haven't figured out how to kill one yet,|if I put them near the stove they squirm|and jump away."); + ~chatplayer("I doubt they would taste too good."); case ^seaslug_spoken_kent: - ~chatplayer(happy, "Hello."); - ~chatnpc(shock, "Oh, thank the gods it's you.|They've all gone mad I tell you,|one of the fishermen tried to|throw me into the sea!"); - ~chatplayer(neutral, "They're all being controlled by the sea slugs."); - ~chatnpc(neutral, "I figured as much."); - ~chatplayer(neutral, "I need to get Kennith off this platform,|but I can't get past the fishermen."); - ~chatnpc(neutral, "The sea slugs are scared of heat,|I figured that out when I tried to cook them."); + ~chatplayer("Hello."); + ~chatnpc("Oh, thank the gods it's you.|They've all gone mad I tell you,|one of the fishermen tried to|throw me into the sea!"); + ~chatplayer("They're all being controlled by the sea slugs."); + ~chatnpc("I figured as much."); + ~chatplayer("I need to get Kennith off this platform,|but I can't get past the fishermen."); + ~chatnpc("The sea slugs are scared of heat,|I figured that out when I tried to cook them."); if(inv_total(inv, unlit_torch) = 0) { - ~chatnpc(neutral, "Here."); + ~chatnpc("Here."); ~objbox(unlit_torch, "Bailey gives you a torch."); inv_add(inv, unlit_torch, 1); - ~chatnpc(neutral, "I doubt the fishermen will come near you if you can get this torch lit."); - ~chatnpc(confused, "The only problem is all the wood and flint are damp...|I can't light a thing!"); + ~chatnpc("I doubt the fishermen will come near you if you can get this torch lit."); + ~chatnpc("The only problem is all the wood and flint are damp...|I can't light a thing!"); return; } - ~chatplayer(confused, "I'd better find a way to light this torch, and soon."); + ~chatplayer("I'd better find a way to light this torch, and soon."); case ^seaslug_lit_torch, ^seaslug_kennith_need_escape, ^seaslug_panel_opened: if(inv_total(inv, lit_torch) > 0) { - ~chatplayer(happy, "I've managed to light the torch."); - ~chatnpc(neutral, "Well done traveller,|you'd better get Kennith out of here soon."); - ~chatnpc(neutral, "The fishermen are becoming stranger by the minute,|and they keep pulling up those blasted sea slugs."); + ~chatplayer("I've managed to light the torch."); + ~chatnpc("Well done traveller,|you'd better get Kennith out of here soon."); + ~chatnpc("The fishermen are becoming stranger by the minute,|and they keep pulling up those blasted sea slugs."); } else if(inv_total(inv, unlit_torch) > 0) { - ~chatplayer(confused, "I'd better find a way to light this torch, and soon."); + ~chatplayer("I'd better find a way to light this torch, and soon."); } else { - ~chatplayer(sad, "I've managed to lose my torch."); - ~chatnpc(neutral, "That was silly, fortunately I have another.|Here, take it."); + ~chatplayer("I've managed to lose my torch."); + ~chatnpc("That was silly, fortunately I have another.|Here, take it."); inv_add(inv, unlit_torch, 1); } case ^seaslug_saved_kennith: - ~chatplayer(happy, "Hello Bailey."); - ~chatnpc(happy, "Hello again.|I saw you managed to get Kennith off the platform.|Well done. He wasn't safe around those slugs."); - ~chatplayer(quiz, "Are you going to come back with us?"); - ~chatnpc(sad, "No, these fishermen are my friends,|I'm sure they can be saved.|I'm going to stay and try to get rid of all these slugs."); - ~chatplayer(neutral, "You're braver than most.|Take care of yourself Bailey."); - ~chatnpc(neutral, "You too traveller."); + ~chatplayer("Hello Bailey."); + ~chatnpc("Hello again.|I saw you managed to get Kennith off the platform.|Well done. He wasn't safe around those slugs."); + ~chatplayer("Are you going to come back with us?"); + ~chatnpc("No, these fishermen are my friends,|I'm sure they can be saved.|I'm going to stay and try to get rid of all these slugs."); + ~chatplayer("You're braver than most.|Take care of yourself Bailey."); + ~chatnpc("You too traveller."); case ^seaslug_complete: - ~chatplayer(happy, "Hello Bailey."); - ~chatnpc(happy, "Well hello again traveller.|What brings you back out here?"); - ~chatplayer(neutral, "Just looking around."); - ~chatnpc(neutral, "Well don't go touching any of those blasted slugs."); + ~chatplayer("Hello Bailey."); + ~chatnpc("Well hello again traveller.|What brings you back out here?"); + ~chatplayer("Just looking around."); + ~chatnpc("Well don't go touching any of those blasted slugs."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_fishing_platform/scripts/fisherman.rs2 b/data/src/scripts/areas/area_fishing_platform/scripts/fisherman.rs2 index 5d63c9451..8c0606c63 100644 --- a/data/src/scripts/areas/area_fishing_platform/scripts/fisherman.rs2 +++ b/data/src/scripts/areas/area_fishing_platform/scripts/fisherman.rs2 @@ -1,20 +1,20 @@ [opnpc1,_fisherman_platform] // RSC has 1 variant use one dialogue and 2 use another, RS2 has 4 variants, looks like RS2 probably uses random (but added new dialogues after rework) -~chatplayer(happy, "Hello there."); +~chatplayer("Hello there."); ~mesbox("His eyes are fixated|starting at the sea.."); if_close; p_delay(2); if(random(2) = 0) { - ~chatnpc(shock, "Keep away human...|Leave or face the deep blue..."); - ~chatplayer(confused, "Pardon?"); - ~chatnpc(shock, "You will all end up in the blue...|Deep deep under the blue..."); + ~chatnpc("Keep away human...|Leave or face the deep blue..."); + ~chatplayer("Pardon?"); + ~chatnpc("You will all end up in the blue...|Deep deep under the blue..."); } else { - ~chatnpc(shock, "Must find family..."); - ~chatplayer(confused, "What?"); - ~chatnpc(shock, "Soon we will all be together..."); - ~chatplayer(quiz, "Are you ok?"); - ~chatnpc(shock, "Must find family...|They are all under the blue...|Deep deep under the blue..."); - ~chatplayer(confused, "Ermm... I'll leave you to it then."); + ~chatnpc("Must find family..."); + ~chatplayer("What?"); + ~chatnpc("Soon we will all be together..."); + ~chatplayer("Are you ok?"); + ~chatnpc("Must find family...|They are all under the blue...|Deep deep under the blue..."); + ~chatplayer("Ermm... I'll leave you to it then."); } diff --git a/data/src/scripts/areas/area_fishing_platform/scripts/holgart_island.rs2 b/data/src/scripts/areas/area_fishing_platform/scripts/holgart_island.rs2 index d5918148e..6bf0d0ecb 100644 --- a/data/src/scripts/areas/area_fishing_platform/scripts/holgart_island.rs2 +++ b/data/src/scripts/areas/area_fishing_platform/scripts/holgart_island.rs2 @@ -1,9 +1,9 @@ [opnpc1,holgart_island] if(%seaslug_progress ! ^seaslug_sailed_kent) { - ~chatplayer(neutral, "We'd better get back to the platform|so we can see what's going on."); - ~chatnpc(shifty, "You're right. It all sounds pretty creepy."); + ~chatplayer("We'd better get back to the platform|so we can see what's going on."); + ~chatnpc("You're right. It all sounds pretty creepy."); ~board_ardougne_to_fishing_platform; return; } -~chatplayer(quiz, "Where are we?"); -~chatnpc(neutral, "Someway off mainland still.|You'd better see if me old matey's okay."); \ No newline at end of file +~chatplayer("Where are we?"); +~chatnpc("Someway off mainland still.|You'd better see if me old matey's okay."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_fishing_platform/scripts/holgart_platform.rs2 b/data/src/scripts/areas/area_fishing_platform/scripts/holgart_platform.rs2 index b10ccbe17..ee76ea65c 100644 --- a/data/src/scripts/areas/area_fishing_platform/scripts/holgart_platform.rs2 +++ b/data/src/scripts/areas/area_fishing_platform/scripts/holgart_platform.rs2 @@ -6,30 +6,30 @@ switch_int(%seaslug_progress) { } [label,holgart_platform_standard] -~chatplayer(happy, "Hey, Holgart."); -~chatnpc(shifty, "Have you had enough of this place yet?|It's really starting to scare me."); +~chatplayer("Hey, Holgart."); +~chatnpc("Have you had enough of this place yet?|It's really starting to scare me."); switch_int(~p_choice2("No, I'm going to stay a while.", 1, "Okay, let's go back.", 2)) { case 1: - ~chatplayer(neutral, "No, I'm going to stay a while."); - ~chatnpc(shifty, "Okay... you're the boss."); + ~chatplayer("No, I'm going to stay a while."); + ~chatnpc("Okay... you're the boss."); case 2: - ~chatplayer(neutral, "Okay, let's go back."); - ~chatnpc(happy, "Okay m'hearty, jump on."); + ~chatplayer("Okay, let's go back."); + ~chatnpc("Okay m'hearty, jump on."); ~board_fishing_platform_to_ardougne; } [label,holgart_something_strange] -~chatplayer(confused, "Holgart, something strange is going on here."); -~chatnpc(confused, "You're telling me, none of the sailors seem to remember who I am."); -~chatplayer(confused, "Apparently Kennith's father left for help a couple of days ago."); -~chatnpc(confused, "That's a worry, no-one's heard from him on shore.|Come on, we'd better go look for him."); +~chatplayer("Holgart, something strange is going on here."); +~chatnpc("You're telling me, none of the sailors seem to remember who I am."); +~chatplayer("Apparently Kennith's father left for help a couple of days ago."); +~chatnpc("That's a worry, no-one's heard from him on shore.|Come on, we'd better go look for him."); %seaslug_progress = ^seaslug_sailed_kent; ~board_fishing_platform_to_island; [label,holgart_kid_shore] -~chatplayer(quiz, "Did you get the kid back to shore?"); -~chatnpc(neutral, "Yes, he's safe and sound with his parents.|Your turn to return to land now adventurer."); -~chatplayer(happy, "Looking forward to it."); +~chatplayer("Did you get the kid back to shore?"); +~chatnpc("Yes, he's safe and sound with his parents.|Your turn to return to land now adventurer."); +~chatplayer("Looking forward to it."); ~board_fishing_platform_to_ardougne; [proc,board_fishing_platform_to_island] diff --git a/data/src/scripts/areas/area_fishing_platform/scripts/kennith.rs2 b/data/src/scripts/areas/area_fishing_platform/scripts/kennith.rs2 index 6538a38dd..27f633347 100644 --- a/data/src/scripts/areas/area_fishing_platform/scripts/kennith.rs2 +++ b/data/src/scripts/areas/area_fishing_platform/scripts/kennith.rs2 @@ -1,33 +1,33 @@ [label,kennith_chat] switch_int(%seaslug_progress) { case ^seaslug_boat_repaired: - ~chatplayer(quiz, "Are you okay young one?"); - ~chatnpc(sad, "No, I want my daddy!"); - ~chatplayer(quiz, "Where is your father?"); - ~chatnpc(sad, "He went to get help days ago."); - ~chatnpc(sad, "The nasty fishermen tried to throw|me and daddy into the sea.|So he told me to hide here."); - ~chatplayer(neutral, "That's good advice,|you stay here and I'll go|try and find your father."); + ~chatplayer("Are you okay young one?"); + ~chatnpc("No, I want my daddy!"); + ~chatplayer("Where is your father?"); + ~chatnpc("He went to get help days ago."); + ~chatnpc("The nasty fishermen tried to throw|me and daddy into the sea.|So he told me to hide here."); + ~chatplayer("That's good advice,|you stay here and I'll go|try and find your father."); %seaslug_progress = ^seaslug_spoken_kennith; case ^seaslug_spoken_kennith: - ~chatplayer(quiz, "Are you okay?"); - ~chatnpc(sad, "I want to see daddy!"); - ~chatplayer(neutral, "I'm working on it."); + ~chatplayer("Are you okay?"); + ~chatnpc("I want to see daddy!"); + ~chatplayer("I'm working on it."); case ^seaslug_lit_torch: - ~chatplayer(quiz, "Hello Kennith,|are you okay?"); - ~chatnpc(sad, "No, I want my daddy."); - ~chatplayer(neutral, "You'll be able to see him soon.|First we need to get you back to land,|come with me to the boat."); - ~chatnpc(shock, "No!"); - ~chatplayer(confused, "What, why not?"); - ~chatnpc(shock, "I'm scared of those nasty sea slugs.|I won't go near them."); - ~chatplayer(neutral, "Okay, you wait here and I'll go figure another way to get you out."); + ~chatplayer("Hello Kennith,|are you okay?"); + ~chatnpc("No, I want my daddy."); + ~chatplayer("You'll be able to see him soon.|First we need to get you back to land,|come with me to the boat."); + ~chatnpc("No!"); + ~chatplayer("What, why not?"); + ~chatnpc("I'm scared of those nasty sea slugs.|I won't go near them."); + ~chatplayer("Okay, you wait here and I'll go figure another way to get you out."); %seaslug_progress = ^seaslug_kennith_need_escape; case ^seaslug_panel_opened: - ~chatplayer(neutral, "Kennith, I've made an opening in the wall. You can come out through there."); - ~chatnpc(quiz, "Are there any sea slugs on the other side?"); - ~chatplayer(happy, "Not one."); - ~chatnpc(quiz, "How will I get downstairs?"); - ~chatplayer(neutral, "I'll figure that out in a moment."); - ~chatnpc(neutral, "Ok, when you have I'll come out."); + ~chatplayer("Kennith, I've made an opening in the wall. You can come out through there."); + ~chatnpc("Are there any sea slugs on the other side?"); + ~chatplayer("Not one."); + ~chatnpc("How will I get downstairs?"); + ~chatplayer("I'll figure that out in a moment."); + ~chatnpc("Ok, when you have I'll come out."); %seaslug_progress = ^seaslug_need_kennith_path; case default: mes("He doesn't seem interested in talking."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_fishing_platform/scripts/kent.rs2 b/data/src/scripts/areas/area_fishing_platform/scripts/kent.rs2 index 6b8ba5203..7b3e85ba1 100644 --- a/data/src/scripts/areas/area_fishing_platform/scripts/kent.rs2 +++ b/data/src/scripts/areas/area_fishing_platform/scripts/kent.rs2 @@ -1,22 +1,22 @@ [opnpc1,kent] if(%seaslug_progress ! ^seaslug_sailed_kent) { - ~chatplayer(happy, "Hello."); - ~chatnpc(shock, "Oh my, I must get back to shore."); + ~chatplayer("Hello."); + ~chatnpc("Oh my, I must get back to shore."); return; } -~chatnpc(happy, "Oh thank Saradomin!|I thought I'd be left out here forever."); -~chatplayer(neutral, "Your wife sent me out to find you and your boy.|Kennith's fine by the way, he's on the platform."); -~chatnpc(neutral, "I knew the row boat wasn't sea worthy. I couldn't risk bringing him along but you must get him off that platform."); -~chatplayer(quiz, "What's going on here?"); -~chatnpc(neutral, "Five days ago we pulled in a huge catch. As well as fish we caught small slug like creatures, hundreds of them."); -~chatnpc(neutral, "That's when the fishermen began to act strange."); -~chatnpc(neutral, "It was the sea slugs, they attach themselves to your body and somehow take over the mind of the carrier."); -~chatnpc(neutral, "I told Kennith to hide until I returned but I was washed up here."); -~chatnpc(neutral, "Please go back and get my boy, you can send help for me later."); +~chatnpc("Oh thank Saradomin!|I thought I'd be left out here forever."); +~chatplayer("Your wife sent me out to find you and your boy.|Kennith's fine by the way, he's on the platform."); +~chatnpc("I knew the row boat wasn't sea worthy. I couldn't risk bringing him along but you must get him off that platform."); +~chatplayer("What's going on here?"); +~chatnpc("Five days ago we pulled in a huge catch. As well as fish we caught small slug like creatures, hundreds of them."); +~chatnpc("That's when the fishermen began to act strange."); +~chatnpc("It was the sea slugs, they attach themselves to your body and somehow take over the mind of the carrier."); +~chatnpc("I told Kennith to hide until I returned but I was washed up here."); +~chatnpc("Please go back and get my boy, you can send help for me later."); if_close; %seaslug_progress = ^seaslug_spoken_kent; p_delay(2); -~chatnpc(shock, "Traveller wait!"); +~chatnpc("Traveller wait!"); if_close; mes("Kent reaches behind your neck."); p_delay(1); @@ -25,5 +25,5 @@ p_delay(1); mes("He pulls a sea slug from under your top."); p_delay(1); obj_add(coord, sea_slug, 1, ^lootdrop_duration); -~chatnpc(neutral, "A few more minutes and that thing would have full control of your body."); -~chatplayer(shock, "Yuck! Thanks Kent."); \ No newline at end of file +~chatnpc("A few more minutes and that thing would have full control of your body."); +~chatplayer("Yuck! Thanks Kent."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/aluft_gianne.rs2 b/data/src/scripts/areas/area_gnome/scripts/aluft_gianne.rs2 index 2d2bd20b9..2c43544cc 100644 --- a/data/src/scripts/areas/area_gnome/scripts/aluft_gianne.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/aluft_gianne.rs2 @@ -9,9 +9,9 @@ switch_int(%gnome_restaurant_progress) { case 6 : @gnome_restaurant_complete; case default : if (%gnome_restaurant_progress = 7 | %gnome_restaurant_progress > 16) { - ~chatplayer(default, "Hello again Aluft."); - ~chatnpc(happy, "Well hello there ."); - ~chatnpc(neutral, "Have you come to help me out?"); + ~chatplayer("Hello again Aluft."); + ~chatnpc("Well hello there ."); + ~chatnpc("Have you come to help me out?"); @gnome_restaurant_job_start; } if (%gnome_restaurant_progress > 7 & %gnome_restaurant_progress < 17) { @@ -33,9 +33,9 @@ if ($category = category_128 | $category = category_125) { case 6 : @gnome_restaurant_complete; case default : if (%gnome_restaurant_progress = 7 | %gnome_restaurant_progress > 16) { - ~chatplayer(default, "Hello again Aluft."); - ~chatnpc(happy, "Well hello there ."); - ~chatnpc(neutral, "Have you come to help me out?"); + ~chatplayer("Hello again Aluft."); + ~chatnpc("Well hello there ."); + ~chatnpc("Have you come to help me out?"); @gnome_restaurant_job_start; } if (%gnome_restaurant_progress > 7 & %gnome_restaurant_progress < 17) { diff --git a/data/src/scripts/areas/area_gnome/scripts/blurberry.rs2 b/data/src/scripts/areas/area_gnome/scripts/blurberry.rs2 index 60a77d5b4..4ef6db450 100644 --- a/data/src/scripts/areas/area_gnome/scripts/blurberry.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/blurberry.rs2 @@ -13,9 +13,9 @@ switch_int(%gnome_bar_progress) { case default : if (%gnome_bar_progress = 7 | %gnome_bar_progress > 12) { // rsc dialogue - ~chatplayer(default, "Hello again Blurberry!"); - ~chatnpc(default, "Well hello traveller."); - ~chatnpc(neutral,"I'm quite busy as usual, any chance you could help?"); + ~chatplayer("Hello again Blurberry!"); + ~chatnpc("Well hello traveller."); + ~chatnpc("I'm quite busy as usual, any chance you could help?"); @gnome_bar_cocktail_job_start; } if (%gnome_bar_progress > 7 & %gnome_bar_progress < 13) { @@ -30,7 +30,7 @@ if(testbit(%barcrawl_progress, ^blurberry_index) = false & last_useitem = barcra def_category $category = oc_category(last_useitem); if ($category = category_83 | $category = category_15) { switch_int(%gnome_bar_progress) { - case 0 : ~chatnpc(default, "Nice cocktail, but I don't need any right now..."); + case 0 : ~chatnpc("Nice cocktail, but I don't need any right now..."); case 1 : @gnome_bar_assign_fruit_blast; case 2 : @gnome_bar_assign_drunk_dragon; case 3 : @gnome_bar_assign_ssg; @@ -39,7 +39,7 @@ if ($category = category_83 | $category = category_15) { case 6 : @gnome_bar_complete; case default : if (%gnome_bar_progress = 7 | %gnome_bar_progress > 12) { - ~chatnpc(default, "Nice cocktail, but I don't need any right now..."); + ~chatnpc("Nice cocktail, but I don't need any right now..."); } if (%gnome_bar_progress > 7 & %gnome_bar_progress < 13) { @gnome_bar_cocktail_job_finish; @@ -49,10 +49,10 @@ if ($category = category_83 | $category = category_15) { } [label,blurberry_barcrawl] -~chatplayer(neutral, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(neutral, "Ah, you've come to the best stop on your list!|I'll give you my famous Fire Toad Blast!|It'll cost you 10 coins."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Ah, you've come to the best stop on your list!|I'll give you my famous Fire Toad Blast!|It'll cost you 10 coins."); if(inv_total(inv, coins) < 10) { - ~chatplayer(sad, "I don't have 10 coins right now."); + ~chatplayer("I don't have 10 coins right now."); return; } if_close; @@ -66,4 +66,4 @@ mes("Blurberry signs your card."); p_delay(2); ~damage_self(calc((stat(hitpoints) * 5) / 100)); // In OSRS this closes so you never see it (because damage is strongqueued, which isn't the case in 225) -~chatplayer(confused, "Danks bery mush..."); \ No newline at end of file +~chatplayer("Danks bery mush..."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/bolkoy.rs2 b/data/src/scripts/areas/area_gnome/scripts/bolkoy.rs2 index 59e87873a..ac3882978 100644 --- a/data/src/scripts/areas/area_gnome/scripts/bolkoy.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/bolkoy.rs2 @@ -1,36 +1,36 @@ [opnpc1,bolkoy] switch_int(%tree_progress) { case ^tree_retrieved_orb: - ~chatplayer(neutral, "Hello."); + ~chatplayer("Hello."); if(inv_total(inv, orb_of_protection) > 0) { - ~chatnpc(shock, "Amazing, you recovered the orb."); - ~chatnpc(happy, "Well I am impressed.|Would you like to buy something?"); + ~chatnpc("Amazing, you recovered the orb."); + ~chatnpc("Well I am impressed.|Would you like to buy something?"); } else { - ~chatnpc(neutral, "I'm Bolkoy the village shopkeeper.|Would you like to buy something?"); + ~chatnpc("I'm Bolkoy the village shopkeeper.|Would you like to buy something?"); } case ^tree_returned_first_orb: - ~chatplayer(neutral, "Hi."); - ~chatnpc(sad, "Oh, hello there.|Have you heard? They took|the other orbs, it's terrible.|I suppose the show must go on."); - ~chatnpc(sad, "Would you like to buy something?"); + ~chatplayer("Hi."); + ~chatnpc("Oh, hello there.|Have you heard? They took|the other orbs, it's terrible.|I suppose the show must go on."); + ~chatnpc("Would you like to buy something?"); case ^tree_defeated_warlord: - ~chatplayer(happy, "Hello."); - ~chatnpc(happy, "Hello there.|You're that hero who saved the orbs.|Soon we will perform the ritual|and the village will be safe again."); - ~chatnpc(happy, "Anyway, would you like anything from my shop?"); + ~chatplayer("Hello."); + ~chatnpc("Hello there.|You're that hero who saved the orbs.|Soon we will perform the ritual|and the village will be safe again."); + ~chatnpc("Anyway, would you like anything from my shop?"); case ^tree_complete: - ~chatplayer(happy, "Hello."); - ~chatnpc(happy, "Welcome, welcome. It's good to see you again. The village is much safer now you have returned the orbs."); - ~chatnpc(happy, "By the way, I'm the village shop keeper.|Would you like to buy something?"); + ~chatplayer("Hello."); + ~chatnpc("Welcome, welcome. It's good to see you again. The village is much safer now you have returned the orbs."); + ~chatnpc("By the way, I'm the village shop keeper.|Would you like to buy something?"); case default: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Hello stranger, new to these parts?"); - ~chatnpc(happy, "I'm Bolkoy by the way.|I'm the village shopkeeper.|Would you like to buy something?"); + ~chatplayer("Hello there."); + ~chatnpc("Hello stranger, new to these parts?"); + ~chatnpc("I'm Bolkoy by the way.|I'm the village shopkeeper.|Would you like to buy something?"); } switch_int(~p_choice2("What have you got?", 1, "No thank you.", 2)) { case 1: - ~chatplayer(quiz, "What have you got?"); - ~chatnpc(neutral, "Take a look."); + ~chatplayer("What have you got?"); + ~chatnpc("Take a look."); ~openshop_activenpc; case 2: - ~chatplayer(neutral, "No thank you."); - ~chatnpc(neutral, "Ok, maybe later."); + ~chatplayer("No thank you."); + ~chatnpc("Ok, maybe later."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/commander_montai.rs2 b/data/src/scripts/areas/area_gnome/scripts/commander_montai.rs2 index 79b2bcbf6..2f3e1c2ec 100644 --- a/data/src/scripts/areas/area_gnome/scripts/commander_montai.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/commander_montai.rs2 @@ -1,74 +1,74 @@ [opnpc1,commander_montai] switch_int(%tree_progress) { case ^tree_not_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "I can't talk now.|Can't you see we're trying to win a battle here?|If we can't hold back Khazard's men|we're all doomed."); + ~chatplayer("Hello."); + ~chatnpc("I can't talk now.|Can't you see we're trying to win a battle here?|If we can't hold back Khazard's men|we're all doomed."); case ^tree_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello traveller, are you here to help or just to watch?"); - ~chatplayer(neutral, "I've been sent by King Bolren to retrieve the orb of protection."); - ~chatnpc(happy, "Excellent we need all the help we can get."); - ~chatnpc(neutral, "I'm commander Montai.|The orb is in the Khazard stronghold to the north,|but until we weaken their defences|we can't get close."); - ~chatplayer(quiz, "What can I do?"); - ~chatnpc(neutral, "Firstly we need to strengthen our own defences. We desperately need wood to make more battlements, once the battlements are gone it's all over. Six loads of normal logs should do it."); + ~chatplayer("Hello."); + ~chatnpc("Hello traveller, are you here to help or just to watch?"); + ~chatplayer("I've been sent by King Bolren to retrieve the orb of protection."); + ~chatnpc("Excellent we need all the help we can get."); + ~chatnpc("I'm commander Montai.|The orb is in the Khazard stronghold to the north,|but until we weaken their defences|we can't get close."); + ~chatplayer("What can I do?"); + ~chatnpc("Firstly we need to strengthen our own defences. We desperately need wood to make more battlements, once the battlements are gone it's all over. Six loads of normal logs should do it."); switch_int(~p_choice2("Ok, I'll gather some wood.", 1, "Sorry, I no longer want to be involved.", 2)) { case 1: - ~chatplayer(neutral, "Ok, I'll gather some wood."); + ~chatplayer("Ok, I'll gather some wood."); %tree_progress = ^tree_spoken_montai; - ~chatnpc(neutral, "Please be as quick as you can, I don't know how much longer we can hold out."); + ~chatnpc("Please be as quick as you can, I don't know how much longer we can hold out."); case 2: - ~chatplayer(sad, "Sorry I no longer want to be involved."); - ~chatnpc(sad, "That's a shame, we could have done with your help."); + ~chatplayer("Sorry I no longer want to be involved."); + ~chatnpc("That's a shame, we could have done with your help."); } case ^tree_spoken_montai: - ~chatplayer(neutral, "Hello."); + ~chatplayer("Hello."); if(inv_total(inv, logs) < 6) { - ~chatnpc(neutral, "Hello again, we're still desperate for wood soldier. We need six loads of normal logs."); - ~chatplayer(neutral, "I'll see what I can do."); - ~chatnpc(neutral, "Thank you."); + ~chatnpc("Hello again, we're still desperate for wood soldier. We need six loads of normal logs."); + ~chatplayer("I'll see what I can do."); + ~chatnpc("Thank you."); return; } - ~chatnpc(neutral, "Hello again, we're still desperate for wood soldier."); + ~chatnpc("Hello again, we're still desperate for wood soldier."); inv_del(inv, logs, 6); %tree_progress = ^tree_given_logs_montai; - ~chatplayer(happy, "I have some here.|@whi@(You give six loads of logs to the commander.)"); - ~chatnpc(happy, "That's excellent, now we can make more defensive battlements. Give me a moment to organise the troops and then come speak to me. I'll inform you of our next phase of attack."); + ~chatplayer("I have some here.|@whi@(You give six loads of logs to the commander.)"); + ~chatnpc("That's excellent, now we can make more defensive battlements. Give me a moment to organise the troops and then come speak to me. I'll inform you of our next phase of attack."); case ^tree_given_logs_montai: - ~chatplayer(neutral, "How are you doing Montai?"); - ~chatnpc(bored, "We're hanging in there soldier.|For the next phase of our attack|we need to breach their stronghold."); - ~chatnpc(bored, "The ballista can break through the stronghold wall,|and then we can advance and seize back the orb."); - ~chatplayer(quiz, "So what's the problem?"); - ~chatnpc(bored, "From this distance we can't get an accurate enough shot. We need the correct coordinates of the stronghold for a direct hit. I've sent out three tracker gnomes to gather them."); - ~chatplayer(quiz, "Have they returned?"); - ~chatnpc(sad, "I'm afraid not, and we're running out of time.|I need you to go into the heart of the battlefield,|find the trackers, and bring back the coordinates."); - ~chatnpc(quiz, "Do you think you can do it?"); + ~chatplayer("How are you doing Montai?"); + ~chatnpc("We're hanging in there soldier.|For the next phase of our attack|we need to breach their stronghold."); + ~chatnpc("The ballista can break through the stronghold wall,|and then we can advance and seize back the orb."); + ~chatplayer("So what's the problem?"); + ~chatnpc("From this distance we can't get an accurate enough shot. We need the correct coordinates of the stronghold for a direct hit. I've sent out three tracker gnomes to gather them."); + ~chatplayer("Have they returned?"); + ~chatnpc("I'm afraid not, and we're running out of time.|I need you to go into the heart of the battlefield,|find the trackers, and bring back the coordinates."); + ~chatnpc("Do you think you can do it?"); switch_int(~p_choice2("No, I've had enough of your battle.", 1, "I'll try my best.", 2)) { case 1: - ~chatplayer(sad, "No, I've had enough of your battle."); - ~chatnpc(sad, "I understand, this isn't your fight."); + ~chatplayer("No, I've had enough of your battle."); + ~chatnpc("I understand, this isn't your fight."); case 2: - ~chatplayer(neutral, "I'll try my best."); - ~chatnpc(happy, "Thank you, you're braver than most."); + ~chatplayer("I'll try my best."); + ~chatnpc("Thank you, you're braver than most."); %tree_progress = ^tree_finding_trackers; - ~chatnpc(bored, "I don't know how long I will be able to hold out.|Once you have the coordinates|come back and fire the ballista|right into those monsters."); - ~chatnpc(bored, "If you can retrieve the orb and bring safety back to my people, none of the blood spilled on this field will be in vain."); + ~chatnpc("I don't know how long I will be able to hold out.|Once you have the coordinates|come back and fire the ballista|right into those monsters."); + ~chatnpc("If you can retrieve the orb and bring safety back to my people, none of the blood spilled on this field will be in vain."); } case ^tree_finding_trackers: - ~chatplayer(neutral, "Hello."); - ~chatnpc(bored, "Hello warrior. We need the coordinates|for a direct hit from the ballista.|Once you have a direct hit you will be able|to enter the stronghold and retrieve the orb."); + ~chatplayer("Hello."); + ~chatnpc("Hello warrior. We need the coordinates|for a direct hit from the ballista.|Once you have a direct hit you will be able|to enter the stronghold and retrieve the orb."); case ^tree_ballista_fired: - ~chatplayer(happy, "I've breached the stronghold."); - ~chatnpc(happy, "I saw, that was a beautiful sight. The Khazard troops didn't know what hit them."); - ~chatnpc(neutral, "Now is the time to retrieve the orb. It's all in your hands. I'll be praying for you."); + ~chatplayer("I've breached the stronghold."); + ~chatnpc("I saw, that was a beautiful sight. The Khazard troops didn't know what hit them."); + ~chatnpc("Now is the time to retrieve the orb. It's all in your hands. I'll be praying for you."); case ^tree_retrieved_orb: - ~chatplayer(happy, "I have the orb of protection."); - ~chatnpc(happy, "Incredible, for a human you really are something."); - ~chatplayer(confused, "Thanks... I think!"); - ~chatnpc(neutral, "I'll stay here with my troops and try and hold Khazard's men back. You return the orb to the gnome village. Go as quick as you can, the village is still unprotected."); + ~chatplayer("I have the orb of protection."); + ~chatnpc("Incredible, for a human you really are something."); + ~chatplayer("Thanks... I think!"); + ~chatnpc("I'll stay here with my troops and try and hold Khazard's men back. You return the orb to the gnome village. Go as quick as you can, the village is still unprotected."); case ^tree_returned_first_orb, ^tree_defeated_warlord, ^tree_complete: - ~chatplayer(quiz, "Hello Montai, how are you?"); - ~chatnpc(bored, "I'm ok, this battle is going|to take longer to win than I expected.|The Khazard troops won't give up even without the orb."); - ~chatplayer(happy, "Hang in there."); + ~chatplayer("Hello Montai, how are you?"); + ~chatnpc("I'm ok, this battle is going|to take longer to win than I expected.|The Khazard troops won't give up even without the orb."); + ~chatplayer("Hang in there."); } //[ai_timer,commander_montai] catapult code, disabled for now, odd bug diff --git a/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 b/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 index c3be0b454..a6360007c 100644 --- a/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/elkoy.rs2 @@ -19,24 +19,24 @@ switch_int(%tree_progress) { } [label,elkoy_intro] -~chatplayer(neutral, "Hello there."); -~chatnpc(happy, "Hello, welcome to our maze.|I'm Elkoy the tree gnome."); -~chatplayer(quiz, "I haven't heard of your sort."); -~chatnpc(sad, "There's not many of us left.|Once you could find tree gnomes|anywhere in the world, now we hide|in small groups to avoid capture."); -~chatplayer(quiz, "Capture by whom?"); -~chatnpc(angry, "Tree gnomes have been hunted|for so called 'fun' since as|long as I can remember."); -~chatnpc(sad, "Our main threat nowadays|are General Khazard's troops.|They know no mercy, but are also very dense.|They'll never find their way through our maze."); -~chatnpc(neutral, "Have fun."); +~chatplayer("Hello there."); +~chatnpc("Hello, welcome to our maze.|I'm Elkoy the tree gnome."); +~chatplayer("I haven't heard of your sort."); +~chatnpc("There's not many of us left.|Once you could find tree gnomes|anywhere in the world, now we hide|in small groups to avoid capture."); +~chatplayer("Capture by whom?"); +~chatnpc("Tree gnomes have been hunted|for so called 'fun' since as|long as I can remember."); +~chatnpc("Our main threat nowadays|are General Khazard's troops.|They know no mercy, but are also very dense.|They'll never find their way through our maze."); +~chatnpc("Have fun."); [label,elkoy_looking_orbs] if(%tree_progress = ^tree_started) { - ~chatplayer(happy, "Hello Elkoy."); - ~chatnpc(sad, "Oh my! Oh my!"); - ~chatplayer(quiz, "What's wrong?"); - ~chatnpc(sad, "The orb, they have the orb. We're doomed.|Do you need me to show you back to the village?"); + ~chatplayer("Hello Elkoy."); + ~chatnpc("Oh my! Oh my!"); + ~chatplayer("What's wrong?"); + ~chatnpc("The orb, they have the orb. We're doomed.|Do you need me to show you back to the village?"); } else { - ~chatplayer(neutral, "Hello."); - ~chatnpc(sad, "You must retrieve the orb, or the gnome village is doomed. Do you need me to show you through the maze?"); + ~chatplayer("Hello."); + ~chatnpc("You must retrieve the orb, or the gnome village is doomed. Do you need me to show you through the maze?"); } @elkoy_maze_preorb; @@ -47,136 +47,136 @@ if(npc_type = elkoy_maze) { } switch_int(~p_choice2("Yes please.", 1, "Not now, thanks.", 2)) { case 1: - ~chatplayer(happy, "Yes please."); - ~chatnpc(happy, "Ok then, follow me."); + ~chatplayer("Yes please."); + ~chatnpc("Ok then, follow me."); p_telejump($dest_coord); - ~chatnpc_specific("Elkoy", elkoy_maze, sad, "Please help us get our orb back."); + ~chatnpc_specific("Elkoy", elkoy_maze, "Please help us get our orb back."); case 2: - ~chatplayer(neutral, "Not now, thanks."); + ~chatplayer("Not now, thanks."); } [label,elkoy_retrieved_orb_outside] if(inv_total(inv, orb_of_protection) = 0) { @elkoy_missing_first_orb; } -~chatplayer(happy, "Hello Elkoy."); -~chatnpc(shock, "You're back! And the orb?"); -~chatplayer(happy, "I have it here."); -~chatnpc(happy, "You're our saviour. Please return it to the village and we are all saved. Would you like me to show you the way to the village?"); +~chatplayer("Hello Elkoy."); +~chatnpc("You're back! And the orb?"); +~chatplayer("I have it here."); +~chatnpc("You're our saviour. Please return it to the village and we are all saved. Would you like me to show you the way to the village?"); switch_int(~p_choice2("Yes please.", 1, "No thanks Elkoy.", 2)) { case 1: - ~chatplayer(happy, "Yes please."); - ~chatnpc(happy, "Ok then, follow me."); + ~chatplayer("Yes please."); + ~chatnpc("Ok then, follow me."); p_telejump(^elkoy_maze_coord); - ~chatnpc_specific("Elkoy", elkoy_maze, happy, "Here we are. Take the orb to King Bolren, I'm sure he'll be pleased to see you."); + ~chatnpc_specific("Elkoy", elkoy_maze, "Here we are. Take the orb to King Bolren, I'm sure he'll be pleased to see you."); case 2: - ~chatplayer(sad, "No thanks Elkoy."); - ~chatnpc(sad, "Please, we must have the orb if we are to survive."); + ~chatplayer("No thanks Elkoy."); + ~chatnpc("Please, we must have the orb if we are to survive."); } [label,elkoy_retrieved_orb_inside] if(inv_total(inv, orb_of_protection) = 0) { @elkoy_missing_first_orb; } -~chatplayer(happy, "Hello Elkoy. I have the orb."); -~chatnpc(happy, "Take it to King Bolren, I'm sure he'll be pleased to see you."); +~chatplayer("Hello Elkoy. I have the orb."); +~chatnpc("Take it to King Bolren, I'm sure he'll be pleased to see you."); switch_int(~p_choice2("Can you show me out of the village?", 1, "Okay.", 2)) { case 1: - ~chatplayer(quiz, "Can you show me out of the village?"); - ~chatnpc(happy, "Ok then, follow me."); + ~chatplayer("Can you show me out of the village?"); + ~chatnpc("Ok then, follow me."); p_telejump(^elkoy_entrance_coord); - ~chatnpc_specific("Elkoy", elkoy_maze, sad, "Please return with our orb soon."); - case 2: ~chatplayer(happy, "Okay."); + ~chatnpc_specific("Elkoy", elkoy_maze, "Please return with our orb soon."); + case 2: ~chatplayer("Okay."); } [label,elkoy_missing_first_orb] -~chatplayer(happy, "Hello Elkoy."); -~chatnpc(shock, "You're back! And the orb?"); -~chatplayer(sad, "No, I'm afraid not."); -~chatnpc(sad, "Please, we must have the orb if we are to survive.|Do you need me to show you through the maze?"); +~chatplayer("Hello Elkoy."); +~chatnpc("You're back! And the orb?"); +~chatplayer("No, I'm afraid not."); +~chatnpc("Please, we must have the orb if we are to survive.|Do you need me to show you through the maze?"); @elkoy_maze_preorb; [label,elkoy_stolen_orbs_inside] ~elkoy_did_you_hear; switch_int(~p_choice2("Can you show me out of the village?", 1, "I'm very sorry.", 2)) { case 1: - ~chatplayer(quiz, "Can you show me out of the village?"); - ~chatnpc(happy, "Ok then, follow me."); + ~chatplayer("Can you show me out of the village?"); + ~chatnpc("Ok then, follow me."); p_telejump(^elkoy_entrance_coord); - ~chatnpc_specific("Elkoy", elkoy_maze, sad, "Please help us find the orbs."); - case 2: ~chatplayer(sad, "I'm very sorry."); + ~chatnpc_specific("Elkoy", elkoy_maze, "Please help us find the orbs."); + case 2: ~chatplayer("I'm very sorry."); } [label,elkoy_stolen_orbs_outside] ~elkoy_did_you_hear; -~chatnpc(sad, "Would you like me to show you the way to the village?"); +~chatnpc("Would you like me to show you the way to the village?"); switch_int(~p_choice2("Yes please.", 1, "No thanks Elkoy.", 2)) { case 1: - ~chatplayer(happy, "Yes please."); - ~chatnpc(happy, "Ok then, follow me."); + ~chatplayer("Yes please."); + ~chatnpc("Ok then, follow me."); p_telejump(^elkoy_maze_coord); - ~chatnpc_specific("Elkoy", elkoy_maze, sad, "Here we are. Despite what has happened here, I hope you feel welcome."); + ~chatnpc_specific("Elkoy", elkoy_maze, "Here we are. Despite what has happened here, I hope you feel welcome."); case 2: - ~chatplayer(neutral, "No thanks Elkoy."); - ~chatnpc(neutral, "Ok then, take care."); + ~chatplayer("No thanks Elkoy."); + ~chatnpc("Ok then, take care."); } [proc,elkoy_did_you_hear] -~chatplayer(neutral, "Hello Elkoy."); -~chatnpc(sad, "Did you hear?"); -~chatnpc(sad, "Khazard's men have pillaged the village! They slaughtered many, and took the other orbs in an attempt to lead us out of the maze. When will the misery end?"); +~chatplayer("Hello Elkoy."); +~chatnpc("Did you hear?"); +~chatnpc("Khazard's men have pillaged the village! They slaughtered many, and took the other orbs in an attempt to lead us out of the maze. When will the misery end?"); [label,elkoy_leavemaze_initial] p_telejump(movecoord(^elkoy_entrance_coord, 0, 0, -1)); if(npc_find(coord, elkoy_outmaze, 4, 0) = true) { - ~chatnpc(happy, "We're out of the maze now. Please hurry, we must have the orb if we are to survive."); + ~chatnpc("We're out of the maze now. Please hurry, we must have the orb if we are to survive."); } [label,elkoy_leavemaze_second] p_telejump(movecoord(^elkoy_entrance_coord, 0, 0, -1)); if(npc_find(coord, elkoy_outmaze, 4, 0) = true) { - ~chatnpc(happy, "Good luck friend."); + ~chatnpc("Good luck friend."); } [label,elkoy_hero_outside] -~chatplayer(happy, "Hello Elkoy."); -~chatnpc(happy, "You truly are a hero."); -~chatplayer(neutral, "Thanks."); -~chatnpc(happy, "You saved us by returning the orbs of protection. I'm humbled and wish you well."); -~chatnpc(happy, "Would you like me to show you the way to the village?"); +~chatplayer("Hello Elkoy."); +~chatnpc("You truly are a hero."); +~chatplayer("Thanks."); +~chatnpc("You saved us by returning the orbs of protection. I'm humbled and wish you well."); +~chatnpc("Would you like me to show you the way to the village?"); @elkoy_jumpmaze_postquest; [label,elkoy_hero_inside] -~chatplayer(happy, "Hello Elkoy."); -~chatnpc(happy, "You truly are a hero."); -~chatplayer(neutral, "Thanks."); -~chatnpc(happy, "You saved us by returning the orbs of protection. I'm humbled and wish you well. Would you like me to show you through the maze?"); +~chatplayer("Hello Elkoy."); +~chatnpc("You truly are a hero."); +~chatplayer("Thanks."); +~chatnpc("You saved us by returning the orbs of protection. I'm humbled and wish you well. Would you like me to show you through the maze?"); @elkoy_jumpmaze_postquest; [label,elkoy_postquest_outside] -~chatplayer(happy, "Hello Elkoy."); -~chatnpc(happy, "Hi there, I hope life is treating you well. Would you like me to show you the way to the village?"); +~chatplayer("Hello Elkoy."); +~chatnpc("Hi there, I hope life is treating you well. Would you like me to show you the way to the village?"); @elkoy_jumpmaze_postquest; [label,elkoy_postquest_inside] -~chatplayer(happy, "Hello Elkoy."); -~chatnpc(happy, "Hi there, I hope life is treating you well. Would you like me to show you the way out of the village?"); +~chatplayer("Hello Elkoy."); +~chatnpc("Hi there, I hope life is treating you well. Would you like me to show you the way out of the village?"); @elkoy_jumpmaze_postquest; [label,elkoy_jumpmaze_postquest] def_coord $dest_coord = ^elkoy_maze_coord; -def_string $message = "Here we are. Feel free to look around."; +def_string $message = "Here we are. Feel free to look around."; if(npc_type = elkoy_maze) { $dest_coord = ^elkoy_entrance_coord; - $message = "Here we are. Have a safe journey."; + $message = "Here we are. Have a safe journey."; } switch_int(~p_choice2("Yes please.", 1, "No thanks Elkoy.", 2)) { case 1: - ~chatplayer(happy, "Yes please."); - ~chatnpc(happy, "Ok then, follow me."); + ~chatplayer("Yes please."); + ~chatnpc("Ok then, follow me."); p_telejump($dest_coord); - ~chatnpc_specific("Elkoy", elkoy_maze, happy, $message); + ~chatnpc_specific("Elkoy", elkoy_maze, $message); case 2: - ~chatplayer(neutral, "No thanks Elkoy."); - ~chatnpc(neutral, "Ok then, take care."); + ~chatplayer("No thanks Elkoy."); + ~chatnpc("Ok then, take care."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/gnome_bar.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnome_bar.rs2 index 27613014b..c5d36fba7 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnome_bar.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnome_bar.rs2 @@ -1,27 +1,27 @@ // *********************** TUTORIAL ************************ [label,gnome_bar_start] -~chatplayer(default, "Hello."); -~chatnpc(happy, "Well hello there . If you're looking for a cocktail|the barman will happily make you one."); -~chatplayer(default, "He looks pretty busy."); -~chatnpc(happy, "I know, I just can't find any skilled staff.|I don't suppose you're looking for some part time work?|The pay isn't great but its a good way to meet people."); +~chatplayer("Hello."); +~chatnpc("Well hello there . If you're looking for a cocktail|the barman will happily make you one."); +~chatplayer("He looks pretty busy."); +~chatnpc("I know, I just can't find any skilled staff.|I don't suppose you're looking for some part time work?|The pay isn't great but its a good way to meet people."); def_int $choice = ~p_choice2("No thanks, I prefer to stay this side of the bar.", 1, "Ok then I'll give it a go.", 2); if ($choice = 1) { - ~chatplayer(default, "No thanks, I prefer to stay this side of the bar."); + ~chatplayer("No thanks, I prefer to stay this side of the bar."); return; } -~chatplayer(happy, "Ok then I'll give it a go."); -~chatnpc(happy, "Excellent. It's not an easy job, I'll have to try you out first. I'm sure you'll be great though."); +~chatplayer("Ok then I'll give it a go."); +~chatnpc("Excellent. It's not an easy job, I'll have to try you out first. I'm sure you'll be great though."); inv_add(inv, cocktail_guide, 1); %gnome_bar_progress = 1; -~chatnpc(happy, "Here, take this cocktail guide. The book tells you how to|make all the cocktails we serve. I'll tell you what I need|and you can make them."); -~chatplayer(happy, "Sounds easy enough."); -~chatnpc(default, "Take a look at the book then come and talk to me."); +~chatnpc("Here, take this cocktail guide. The book tells you how to|make all the cocktails we serve. I'll tell you what I need|and you can make them."); +~chatplayer("Sounds easy enough."); +~chatnpc("Take a look at the book then come and talk to me."); [label,gnome_bar_assign_fruit_blast] -~chatplayer(default, "Hello Blurberry."); -~chatnpc(happy, "Hi, are you ready to make your first cocktail?"); -~chatplayer(happy, "Absolutely."); -~chatnpc(happy, "Ok then, to start with make a Fruit Blast. Here, you'll|need these ingredients, but I'm afraid I can't give you|any more if you mess up."); +~chatplayer("Hello Blurberry."); +~chatnpc("Hi, are you ready to make your first cocktail?"); +~chatplayer("Absolutely."); +~chatnpc("Ok then, to start with make a Fruit Blast. Here, you'll|need these ingredients, but I'm afraid I can't give you|any more if you mess up."); inv_add(inv, lemon, 2); inv_add(inv, orange, 1); inv_add(inv, pineapple, 1); @@ -30,16 +30,16 @@ inv_add(inv, knife, 1); inv_add(inv, cocktail_shaker, 1); %gnome_bar_progress = 2; ~mesbox("Blurberry gives you two lemons, one orange, one pineapple, a cocktail shaker, a glass and a knife."); -~chatnpc(default, "Let me know when you're done."); +~chatnpc("Let me know when you're done."); [label,gnome_bar_assign_drunk_dragon] -~chatnpc(neutral, "So where's my Fruit Blast?"); +~chatnpc("So where's my Fruit Blast?"); if (inv_total(inv, fruit_blast) > 0) { - ~chatplayer(happy, "Here you go."); + ~chatplayer("Here you go."); ~mesbox("You give Blurberry the Fruit Blast. He takes a sip..."); - ~chatnpc(happy, "Hmmm... not bad, not bad at all."); + ~chatnpc("Hmmm... not bad, not bad at all."); // slightly different than rsc and osrs. rsc has the "I wont be able to give you any more" after he gives u items - ~chatnpc(quiz, "Now can you make me a Drunk Dragon?"); + ~chatnpc("Now can you make me a Drunk Dragon?"); inv_del(inv, fruit_blast, 1); inv_add(inv, cocktail_glass, 1); inv_add(inv, vodka, 1); @@ -49,30 +49,30 @@ if (inv_total(inv, fruit_blast) > 0) { inv_add(inv, pot_of_cream, 1); %gnome_bar_progress = 3; ~mesbox("Blurberry gives you some vodka, some gin, some dwellberries, some pineapple, and some cream."); - ~chatnpc(neutral, "I'm afraid I won't be able to give you anymore if you make a mistake though."); - ~chatnpc(neutral, "Let me know when it's done."); + ~chatnpc("I'm afraid I won't be able to give you anymore if you make a mistake though."); + ~chatnpc("Let me know when it's done."); return; } ~gnome_bar_cocktail_checks(premade_fruit_blast, "Fruit Blast"); if (inv_total(inv, fruit_blast) < 1) { - ~chatnpc(angry, "I don't know what you have there but it's no Fruit|Blast!"); + ~chatnpc("I don't know what you have there but it's no Fruit|Blast!"); return; } [label,gnome_bar_assign_ssg] -~chatplayer(default, "Hello Blurberry."); -~chatnpc(quiz, "Hello again , how did you do?"); +~chatplayer("Hello Blurberry."); +~chatnpc("Hello again , how did you do?"); if (inv_total(inv, drunk_dragon) > 0) { - ~chatplayer(happy, "Here you go."); + ~chatplayer("Here you go."); ~mesbox("You give Blurberry the Drunk Dragon. He takes a sip..."); - ~chatnpc(happy, "Woooo, that's some good stuff. I can sell that.|There you go, your share of the profit."); + ~chatnpc("Woooo, that's some good stuff. I can sell that.|There you go, your share of the profit."); // not sure if this is an mesbox or even exists. exists in rsc. not in 2006 inv_add(inv, coins, 1); ~mesbox("Blurberry gives you 1 gold coin."); - ~chatplayer(happy, "Thanks."); - ~chatnpc(neutral, "Okay then now I need an SGG"); - ~chatplayer(confused, "A what?"); - ~chatnpc(neutral, "A Short Green Guy, and don't bring me a gnome.|Here's all you need."); + ~chatplayer("Thanks."); + ~chatnpc("Okay then now I need an SGG"); + ~chatplayer("A what?"); + ~chatnpc("A Short Green Guy, and don't bring me a gnome.|Here's all you need."); inv_del(inv, drunk_dragon, 1); inv_add(inv, cocktail_glass, 1); inv_add(inv, vodka, 1); @@ -84,21 +84,21 @@ if (inv_total(inv, drunk_dragon) > 0) { } ~gnome_bar_cocktail_checks(premade_drunk_dragon, "Drunk Dragon"); if (inv_total(inv, drunk_dragon) < 1) { - ~chatnpc(angry, "I don't know what you have there but it's no Drunk|Dragon!"); + ~chatnpc("I don't know what you have there but it's no Drunk|Dragon!"); return; } [label,gnome_bar_assign_chocolate_saturday] -~chatplayer(neutral, "Hi Blurberry."); -~chatnpc(quiz, "So, have you got my SGG?"); +~chatplayer("Hi Blurberry."); +~chatnpc("So, have you got my SGG?"); if (inv_total(inv, short_green_guy) > 0) { - ~chatplayer(happy, "Here you go."); + ~chatplayer("Here you go."); ~mesbox("You give Blurberry the SGG. He takes a sip..."); - ~chatnpc(happy, "Hmmm, not bad, not bad at all. I can sell that.|There you go, that's your share."); + ~chatnpc("Hmmm, not bad, not bad at all. I can sell that.|There you go, that's your share."); inv_add(inv, coins, 1); ~mesbox("Blurberry gives you 1 gold coin."); - ~chatnpc(neutral, "You're doing quite well, I'm impressed."); - ~chatnpc(neutral, "Ok let's try a Choc Saturday, I love them."); + ~chatnpc("You're doing quite well, I'm impressed."); + ~chatnpc("Ok let's try a Choc Saturday, I love them."); inv_del(inv, short_green_guy, 1); inv_add(inv, cocktail_glass, 1); inv_add(inv, whisky, 1); @@ -113,18 +113,18 @@ if (inv_total(inv, short_green_guy) > 0) { } ~gnome_bar_cocktail_checks(premade_short_green_guy, "SGG"); if (inv_total(inv, short_green_guy) < 1) { - ~chatnpc(angry, "I don't know what you have there but it's no SGG!"); + ~chatnpc("I don't know what you have there but it's no SGG!"); return; } [label,gnome_bar_assign_blurberry_special] -~chatplayer(neutral, "Hello Blurberry."); -~chatnpc(neutral, "Hello, how did it go with the Choc Saturday?"); +~chatplayer("Hello Blurberry."); +~chatnpc("Hello, how did it go with the Choc Saturday?"); if (inv_total(inv, chocolate_saturday) > 0) { - ~chatplayer(quiz, "Here, try some."); + ~chatplayer("Here, try some."); ~mesbox("You give Blurberry the Choc Saturday. He takes a sip..."); - ~chatnpc(happy, "That's blurberry-tastic! You're quite a bartender."); - ~chatnpc(happy, "Okay, let's test you once more. Make me a|Blurberry Special then we'll see if you have what it takes.|Here's your ingredients."); + ~chatnpc("That's blurberry-tastic! You're quite a bartender."); + ~chatnpc("Okay, let's test you once more. Make me a|Blurberry Special then we'll see if you have what it takes.|Here's your ingredients."); inv_del(inv, chocolate_saturday, 1); inv_add(inv, cocktail_glass, 1); inv_add(inv, vodka, 1); @@ -135,39 +135,39 @@ if (inv_total(inv, chocolate_saturday) > 0) { inv_add(inv, lime, 1); inv_add(inv, equa_leaves, 1); %gnome_bar_progress = 6; - ~chatplayer(neutral, "Ok, I'll try my best."); - ~chatnpc(neutral, "I'm sure you'll make a great bartender."); + ~chatplayer("Ok, I'll try my best."); + ~chatnpc("I'm sure you'll make a great bartender."); return; } ~gnome_bar_cocktail_checks(premade_chocolate_saturday, "Choc Saturday"); if (inv_total(inv, chocolate_saturday) < 1) { - ~chatplayer(sad, "I haven't managed to make it yet."); - ~chatnpc(neutral, "Ok, it's one Choc Saturday I need. Let me know when|it's done."); + ~chatplayer("I haven't managed to make it yet."); + ~chatnpc("Ok, it's one Choc Saturday I need. Let me know when|it's done."); return; } [label,gnome_bar_complete] -~chatplayer(neutral, "Hi again."); -~chatnpc(neutral, "So how did you do?"); +~chatplayer("Hi again."); +~chatnpc("So how did you do?"); if (inv_total(inv, blurberry_special) > 0) { - ~chatplayer(quiz, "I think I've made it right."); + ~chatplayer("I think I've made it right."); ~mesbox("You give Blurberry the Blurberry Special. He takes a sip..."); inv_del(inv, blurberry_special, 1); inv_add(inv, cocktail_glass, 1); %gnome_bar_progress = 7; - ~chatnpc(shock, "Well I never... incredible. Not many manage to get that|right, but this is perfect!"); - ~chatnpc(quiz, "It would be an honour to have you on the team."); - ~chatplayer(quiz, "Thanks!"); - ~chatnpc(quiz, "Now if you ever want to make some money or want|to improve your cooking skills, just come and see me.|I'll tell you what drinks we need, and if you can, you make them."); - ~chatplayer(confused, "What about ingredients?"); - ~chatnpc(happy, "I'm afraid I can't give you anymore for free, but you can buy them from Heckel Funch the grocer."); - ~chatnpc(happy, "I'll always pay you more for the cocktail than you paid for the ingredients and it's a great way to learn how to prepare food and drinks."); + ~chatnpc("Well I never... incredible. Not many manage to get that|right, but this is perfect!"); + ~chatnpc("It would be an honour to have you on the team."); + ~chatplayer("Thanks!"); + ~chatnpc("Now if you ever want to make some money or want|to improve your cooking skills, just come and see me.|I'll tell you what drinks we need, and if you can, you make them."); + ~chatplayer("What about ingredients?"); + ~chatnpc("I'm afraid I can't give you anymore for free, but you can buy them from Heckel Funch the grocer."); + ~chatnpc("I'll always pay you more for the cocktail than you paid for the ingredients and it's a great way to learn how to prepare food and drinks."); return; } ~gnome_bar_cocktail_checks(premade_blurberry_special, "Blurberry Special"); if (inv_total(inv, blurberry_special) < 1) { - ~chatplayer(sad, "I haven't managed to make it yet."); - ~chatnpc(neutral, "I need one Blurberry Special. Let me know when|it's done."); + ~chatplayer("I haven't managed to make it yet."); + ~chatnpc("I need one Blurberry Special. Let me know when|it's done."); return; } @@ -177,19 +177,18 @@ if (inv_total(inv, blurberry_special) < 1) { // if (inv_total(inv, cocktail_shaker) < 1) { // def_int $choice = ~p_choice2("I'm afraid I lost the cocktail shaker you gave me.", 1, "I've not finished yet.", 2); // if ($choice = 1) { -// ~chatplayer(sad, "I'm afraid I lost the cocktail shaker you gave me."); +// ~chatplayer("I'm afraid I lost the cocktail shaker you gave me."); // inv_add(inv, cocktail_shaker, 1); -// ~chatnpc(happy, "I can see how that would make it hard to mix cocktails.|I'll give you another one, but please try not lose any|more."); +// ~chatnpc("I can see how that would make it hard to mix cocktails.|I'll give you another one, but please try not lose any|more."); // @exit; // } -// ~chatplayer(default, "I've not finished yet."); -// ~chatnpc(default, "Ok, well let me know when you're done."); +// ~chatplayer("I've not finished yet."); +// ~chatnpc("Ok, well let me know when you're done."); // @exit; // } -def_string $string = "No, I need you to make the <$name> yourself. I'm|afraid it doesn't really work if you try to sell the bar its|own drinks."; if (inv_total(inv, $premade_cocktail) > 0) { - ~chatplayer(happy, "I think I've got one."); - ~chatnpc(happy, $string); + ~chatplayer("I think I've got one."); + ~chatnpc("No, I need you to make the <$name> yourself. I'm|afraid it doesn't really work if you try to sell the bar its|own drinks."); @exit; } // *********************** TUTORIAL ************************ @@ -198,35 +197,35 @@ if (inv_total(inv, $premade_cocktail) > 0) { [label,gnome_bar_cocktail_job_start] def_int $choice = ~p_choice2("I'm quite busy myself, sorry.", 1, "Ok then, what do you need?", 2); if ($choice = 1) { - ~chatplayer(default, "I'm quite busy myself, sorry."); - ~chatnpc(default, "That's ok, come back when you're free."); + ~chatplayer("I'm quite busy myself, sorry."); + ~chatnpc("That's ok, come back when you're free."); return; } -~chatplayer(happy, "Ok then, what do you need?"); +~chatplayer("Ok then, what do you need?"); def_int $rand = randominc(5); %gnome_bar_progress = calc(7 + $rand); switch_int($rand) { case 1 : - ~chatnpc(default, "Can you make me one Pineapple Punch, one Choc Saturday and one Drunk Dragon!"); - ~chatplayer(default, "Ok then I'll be back soon."); + ~chatnpc("Can you make me one Pineapple Punch, one Choc Saturday and one Drunk Dragon!"); + ~chatplayer("Ok then I'll be back soon."); case 2 : - ~chatnpc(default, "Ok, I need two Wizard Blizzards and an SGG!"); - ~chatplayer(default, "No problem!"); + ~chatnpc("Ok, I need two Wizard Blizzards and an SGG!"); + ~chatplayer("No problem!"); case 3 : - ~chatnpc(default, "Ok, I need one Wizard Blizzard, one Pineapple Punch, one Blurberry Special and two Fruit Blasts!"); - ~chatplayer(default, "I'll do my best."); + ~chatnpc("Ok, I need one Wizard Blizzard, one Pineapple Punch, one Blurberry Special and two Fruit Blasts!"); + ~chatplayer("I'll do my best."); case 4 : - ~chatnpc(default, "I just need two SGG's and one Blurberry Special!"); - ~chatplayer(default, "No problem!"); + ~chatnpc("I just need two SGG's and one Blurberry Special!"); + ~chatplayer("No problem!"); case default : - ~chatnpc(default, "I just need one Fruit Blast!"); - ~chatplayer(default, "No problem!"); + ~chatnpc("I just need one Fruit Blast!"); + ~chatplayer("No problem!"); } [label,gnome_bar_cocktail_job_finish] -~chatplayer(default,"Hi."); -~chatnpc(neutral, "Have you made the order?"); +~chatplayer("Hi."); +~chatnpc("Have you made the order?"); switch_int(%gnome_bar_progress) { case 8 : ~gnome_bar_cocktail_job_checks ( @@ -270,7 +269,7 @@ switch_int(%gnome_bar_progress) { ); } if (%gnome_bar_progress = 13) { - ~chatnpc(neutral, "Could you make me another order?"); + ~chatnpc("Could you make me another order?"); @gnome_bar_cocktail_job_start; } @@ -279,18 +278,18 @@ if (%gnome_bar_progress = 13) { // "Making gnome cocktails earns 60 xp, with no bonus from Blurberry" // no bonus xp for gnome bar if (inv_total(inv, $cocktail1) >= $count1 & inv_total(inv, $cocktail2) >= $count2 & inv_total(inv, $cocktail3) >= $count3 & inv_total(inv, $cocktail4) >= $count4) { - ~chatplayer(default, "Here you go, <$order>."); + ~chatplayer("Here you go, <$order>."); inv_del(inv, $cocktail1, $count1); inv_del(inv, $cocktail2, $count2); inv_del(inv, $cocktail3, $count3); inv_del(inv, $cocktail4, $count4); %gnome_bar_progress = 13; ~mesbox("You give blurberry <$order>."); - ~chatnpc(default, $order_succeed); + ~chatnpc(append("", $order_succeed)); inv_add(inv, coins, $coins); ~mesbox("Blurberry gives you gold coins."); return; } -~chatplayer(sad, "Not yet."); -~chatnpc(default, "Ok, I need <$order>."); -~chatnpc(default, "Let me know when you're done."); \ No newline at end of file +~chatplayer("Not yet."); +~chatnpc("Ok, I need <$order>."); +~chatnpc("Let me know when you're done."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/gnome_barman.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnome_barman.rs2 index 2e8dbad88..4dc7f90fa 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnome_barman.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnome_barman.rs2 @@ -1,5 +1,5 @@ [opnpc1,gnome_barman] -~chatnpc(happy, "Good day to you. What can I get you to drink?"); +~chatnpc("Good day to you. What can I get you to drink?"); def_int $choice; if (inv_totalcat(inv, category_83) > 0) { if(testbit(%barcrawl_progress, ^blurberry_index) = false & inv_total(inv, barcrawl_card) > 0) { @@ -16,40 +16,40 @@ if (inv_totalcat(inv, category_83) > 0) { } switch_int($choice) { case 1 : - ~chatplayer(quiz, "What do you have."); - ~chatnpc(happy, "Here, take a look at our menu."); + ~chatplayer("What do you have."); + ~chatnpc("Here, take a look at our menu."); ~openshop_activenpc; return; case 2 : - ~chatplayer(neutral, "Nothing thanks."); - ~chatnpc(neutral, "Ok, take it easy."); + ~chatplayer("Nothing thanks."); + ~chatnpc("Ok, take it easy."); return; case 3 : - ~chatplayer(neutral, "Actually I'd like to sell some drinks."); - ~chatnpc(default, "If you want to sell any cocktails you've made yourself|I suggest you talk to Blurberry, he's the one who owns|the bar."); - ~chatplayer(neutral, "Thank you."); + ~chatplayer("Actually I'd like to sell some drinks."); + ~chatnpc("If you want to sell any cocktails you've made yourself|I suggest you talk to Blurberry, he's the one who owns|the bar."); + ~chatplayer("Thank you."); return; case 5 : @gnome_barman_barcrawl; } -~chatplayer(quiz, "I was just wanting to buy a cocktail ingredient actually."); -~chatnpc(quiz, "Sure thing, what did you want?"); +~chatplayer("I was just wanting to buy a cocktail ingredient actually."); +~chatnpc("Sure thing, what did you want?"); def_namedobj $item; $choice = ~p_choice4("A lemon", 1, "An orange.", 2, "A cocktail shaker.", 3, "Nothing thanks.", 4); switch_int($choice) { case 1 : - ~chatplayer(neutral, "A lemon."); + ~chatplayer("A lemon."); $item = lemon; case 2 : - ~chatplayer(neutral, "An orange."); + ~chatplayer("An orange."); $item = orange; case 3 : - ~chatplayer(neutral, "A cocktail shaker."); + ~chatplayer("A cocktail shaker."); $item = cocktail_shaker; case default : - ~chatplayer(neutral, "Actually nothing thanks."); + ~chatplayer("Actually nothing thanks."); return; } -~chatnpc(neutral, "20 coins please."); +~chatnpc("20 coins please."); if (inv_total(inv, coins) < 20) { if_close; mes("You do not have enough money to buy that."); @@ -59,9 +59,9 @@ inv_del(inv, coins, 20); inv_add(inv, $item, 1); [label,gnome_barman_barcrawl] -~chatplayer(happy, "I'm trying to do Alfred Grimhand's barcrawl."); -~chatnpc(laugh, "Oh, another silly human come to have his mind melted? You should take that barcrawl card to Blurberry - he always likes to serve the Fire Toad Blast himself!"); -~chatplayer(confused, "Um... thanks?!"); +~chatplayer("I'm trying to do Alfred Grimhand's barcrawl."); +~chatnpc("Oh, another silly human come to have his mind melted? You should take that barcrawl card to Blurberry - he always likes to serve the Fire Toad Blast himself!"); +~chatplayer("Um... thanks?!"); [opnpcu,gnome_barman] if(testbit(%barcrawl_progress, ^blurberry_index) = false & last_useitem = barcrawl_card) { diff --git a/data/src/scripts/areas/area_gnome/scripts/gnome_restaurant.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnome_restaurant.rs2 index 7ed0e43c9..5e3a43512 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnome_restaurant.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnome_restaurant.rs2 @@ -1,31 +1,31 @@ [label,gnome_restaurant_start] -~chatplayer(default, "Hello."); -~chatnpc(happy, "Well hello there. Are you hungry? If so you've come to|the right place. Eat green, eat gnome cuisine. My|waiter will be glad to take your order."); -~chatplayer(default, "Thanks."); -~chatnpc(quiz,"On the other hand if you looking for some work, I have a cook's position available."); +~chatplayer("Hello."); +~chatnpc("Well hello there. Are you hungry? If so you've come to|the right place. Eat green, eat gnome cuisine. My|waiter will be glad to take your order."); +~chatplayer("Thanks."); +~chatnpc("On the other hand if you looking for some work, I have a cook's position available."); def_int $choice = ~p_choice2("No thanks, I'm no cook.", 1, "Ok, I'll give it a go.", 2); if ($choice = 1) { - ~chatplayer(default, "No thanks, I'm no cook."); - ~chatnpc(quiz, "In that case, please eat and enjoy."); + ~chatplayer("No thanks, I'm no cook."); + ~chatnpc("In that case, please eat and enjoy."); return; } -~chatplayer(quiz, "Ok, I'll give it a go."); -~chatnpc(happy, "Well that's great. I'm Aluft Gianne, owner of this|restaurant, and you are...?"); -~chatplayer(default, "Most people call me ."); -~chatnpc(happy, "Really? Sorry, how rude of me. It just takes a little|while to get used to the funny names you humans|have."); -~chatnpc(happy, "Of course if you're going to work for me I'll have to|see what you're like first. Here, take a look at our|menu."); +~chatplayer("Ok, I'll give it a go."); +~chatnpc("Well that's great. I'm Aluft Gianne, owner of this|restaurant, and you are...?"); +~chatplayer("Most people call me ."); +~chatnpc("Really? Sorry, how rude of me. It just takes a little|while to get used to the funny names you humans|have."); +~chatnpc("Of course if you're going to work for me I'll have to|see what you're like first. Here, take a look at our|menu."); %gnome_restaurant_progress = 1; inv_add(inv, gianne_cook_book, 1); ~mesbox("Aluft hands you a cook book."); -~chatnpc(neutral, "When you've had a look at the book, come back here|and I'll let you prepare a few dishes."); -~chatplayer(happy, "Ok then."); +~chatnpc("When you've had a look at the book, come back here|and I'll let you prepare a few dishes."); +~chatplayer("Ok then."); [label,gnome_restaurant_assign_cheese_tom_batta] -~chatplayer(default, "Hi Mr Gianne."); -~chatnpc(happy, "Hello . So what did you think of the book?"); -~chatplayer(confused, "I'm not too sure about toad's legs."); -~chatnpc(happy, "They're a gnome delicacy, you'll love them. But we'll start with something simple, can you make me a cheese and tomato gnome batta? Here's what you need."); +~chatplayer("Hi Mr Gianne."); +~chatnpc("Hello . So what did you think of the book?"); +~chatplayer("I'm not too sure about toad's legs."); +~chatnpc("They're a gnome delicacy, you'll love them. But we'll start with something simple, can you make me a cheese and tomato gnome batta? Here's what you need."); inv_add(inv, tomato, 1); inv_add(inv, cheese, 1); inv_add(inv, equa_leaves, 1); @@ -33,18 +33,18 @@ inv_add(inv, gianne_dough, 1); inv_add(inv, batta_tin, 1); %gnome_restaurant_progress = 2; ~mesbox("Aluft gives you one tomato, some cheese, some equa leaves and some dough"); -~chatplayer(default, "Thanks!"); -~chatnpc(happy, "Let me know how you get on."); +~chatplayer("Thanks!"); +~chatnpc("Let me know how you get on."); [label,gnome_restaurant_assign_chocolate_bomb] -~chatplayer(default, "Hi Mr Gianne."); -~chatnpc(happy, "Call me Aluft. So how did you get on?"); +~chatplayer("Hi Mr Gianne."); +~chatnpc("Call me Aluft. So how did you get on?"); if (inv_total(inv, cheese_tom_batta) > 0) { - ~chatplayer(default, "No problem, it was easy."); + ~chatplayer("No problem, it was easy."); ~mesbox("You give Aluft the batta. He sniffs it then takes a bite..."); - ~chatnpc(happy, "Not bad, not bad at all."); - ~chatnpc(default, "Ok now for something a little harder. Try and make me a chocolate bomb. They're my favourite. Here's everything you need."); + ~chatnpc("Not bad, not bad at all."); + ~chatnpc("Ok now for something a little harder. Try and make me a chocolate bomb. They're my favourite. Here's everything you need."); inv_del(inv, cheese_tom_batta, 1); inv_add(inv, chocolate_bar, 4); inv_add(inv, equa_leaves, 1); @@ -54,33 +54,33 @@ if (inv_total(inv, cheese_tom_batta) > 0) { inv_add(inv, gnomebowl_mould, 1); %gnome_restaurant_progress = 3; ~mesbox("Aluft gives you four bars of chocolate, some equa leaves, some chocolate dust, some dough, and some cream."); - ~chatplayer(happy, "Ok Aluft, I'll be back soon."); + ~chatplayer("Ok Aluft, I'll be back soon."); return; } if (inv_total(inv, batta_tin) < 1) { def_int $choice = ~p_choice2("I'm afraid I've lost the batta tin you gave to me.", 1, "Erm, I've not quite finished it yet.", 2); if ($choice = 1) { - ~chatplayer(sad, "I'm afraid I've lost the batta tin you gave to me."); + ~chatplayer("I'm afraid I've lost the batta tin you gave to me."); inv_add(inv, batta_tin, 1); - ~chatnpc(default, "Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); return; } } else { ~gnome_restaurant_food_check(premade_cheese_tom_batta, "batta"); } if (inv_total(inv, cheese_tom_batta) < 1) { - ~chatplayer(confused, "Erm, I've not quite finished it yet."); - ~chatnpc(default, "Ok, let me know when you have. I just need one cheese and tomato batta."); + ~chatplayer("Erm, I've not quite finished it yet."); + ~chatnpc("Ok, let me know when you have. I just need one cheese and tomato batta."); } [label,gnome_restaurant_assign_toad_batta] -~chatplayer(default, "Hello Aluft."); -~chatnpc(quiz, "Hello there, how did you get on?"); +~chatplayer("Hello Aluft."); +~chatnpc("Hello there, how did you get on?"); if (inv_total(inv, chocolate_bomb) > 0) { - ~chatplayer(happy, "Here you go."); + ~chatplayer("Here you go."); ~mesbox("You give Aluft the chocolate bomb. He takes a bite..."); - ~chatnpc(happy, "Yes, yes, yes, that's superb. I'm really impressed."); - ~chatnpc(default, "Ok then, can you make me a toad batta? Here's what|you need."); + ~chatnpc("Yes, yes, yes, that's superb. I'm really impressed."); + ~chatnpc("Ok then, can you make me a toad batta? Here's what|you need."); inv_del(inv, chocolate_bomb, 1); inv_add(inv, cheese, 1); inv_add(inv, gianne_dough, 1); @@ -89,40 +89,40 @@ if (inv_total(inv, chocolate_bomb) > 0) { %gnome_restaurant_progress = 4; ~mesbox("Aluft gives you some cheese, some dough, some equa leaves, and some gnome spice."); // guides say you have to get toad legs your self. this dialogue is from rsc - ~chatnpc(happy, "I'm afraid all our toad's legs are served fresh."); - ~chatplayer(bored, "Nice."); - ~chatnpc(happy, "So you'll need to go to the swamp on ground level and catch a toad. Let me know when the batta's ready."); + ~chatnpc("I'm afraid all our toad's legs are served fresh."); + ~chatplayer("Nice."); + ~chatnpc("So you'll need to go to the swamp on ground level and catch a toad. Let me know when the batta's ready."); return; } if (inv_total(inv, gnomebowl_mould) < 1) { def_int $choice = ~p_choice2("I'm afraid I've lost the gnomebowl mould you gave to me.", 1, "I haven't made it yet.", 2); if ($choice = 1) { - ~chatplayer(sad, "I'm afraid I've lost the gnomebowl mould you gave to me."); + ~chatplayer("I'm afraid I've lost the gnomebowl mould you gave to me."); inv_add(inv, gnomebowl_mould, 1); - ~chatnpc(default, "Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); return; } } else { ~gnome_restaurant_food_check(premade_chocolate_bomb, "gnomebowl"); } if (inv_total(inv, chocolate_bomb) < 1) { - ~chatplayer(default, "I haven't made it yet."); - ~chatnpc(default, "Just follow the instructions carefully. I need one chocolate bomb."); + ~chatplayer("I haven't made it yet."); + ~chatnpc("Just follow the instructions carefully. I need one chocolate bomb."); return; } [label,gnome_restaurant_assign_worm_hole] -~chatplayer(default, "Hi Mr Gianne."); -~chatnpc(default, "Aluft."); -~chatplayer(default, "Sorry, Aluft."); -~chatnpc(quiz, "So where's my toad batta?"); +~chatplayer("Hi Mr Gianne."); +~chatnpc("Aluft."); +~chatplayer("Sorry, Aluft."); +~chatnpc("So where's my toad batta?"); if (inv_total(inv, toad_batta) > 0) { - ~chatplayer(happy, "Here you go, that was no problem."); + ~chatplayer("Here you go, that was no problem."); ~mesbox("You give Aluft the toad batta. He takes a bite..."); - ~chatnpc(happy, "Ooh, that's some good toad. Very nice."); - ~chatnpc(default, "Let's see if you can make a worm hole."); - ~chatplayer(confused, "A worm hole?"); - ~chatnpc(default, "Yes, it's in the cook book I gave you. You'll have to get the worms from the swamp. But here's everything else you'll need. Let me know when you're done."); + ~chatnpc("Ooh, that's some good toad. Very nice."); + ~chatnpc("Let's see if you can make a worm hole."); + ~chatplayer("A worm hole?"); + ~chatnpc("Yes, it's in the cook book I gave you. You'll have to get the worms from the swamp. But here's everything else you'll need. Let me know when you're done."); inv_del(inv, toad_batta, 1); inv_add(inv, gianne_dough, 1); inv_add(inv, onion, 2); @@ -134,31 +134,31 @@ if (inv_total(inv, toad_batta) > 0) { if (inv_total(inv, batta_tin) < 1) { def_int $choice = ~p_choice2("I'm afraid I've lost the batta tin you gave to me.", 1, "I'm not done yet.", 2); if ($choice = 1) { - ~chatplayer(sad, "I'm afraid I've lost the batta tin you gave to me."); + ~chatplayer("I'm afraid I've lost the batta tin you gave to me."); inv_add(inv, batta_tin, 1); - ~chatnpc(default, "Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); return; } } else { ~gnome_restaurant_food_check(premade_toad_batta, "batta"); } if (inv_total(inv, toad_batta) < 1) { - ~chatplayer(default, "I'm not done yet."); - ~chatnpc(default, "Ok, quick as you can though."); - ~chatplayer(happy, "No problem."); + ~chatplayer("I'm not done yet."); + ~chatnpc("Ok, quick as you can though."); + ~chatplayer("No problem."); return; } [label,gnome_restaurant_assign_toad_crunchies] -~chatplayer(default, "Hello again Aluft."); -~chatnpc(quiz, "hello , how did you do?"); +~chatplayer("Hello again Aluft."); +~chatnpc("hello , how did you do?"); if (inv_total(inv, worm_hole) > 0) { - ~chatplayer(happy, "Here you go."); + ~chatplayer("Here you go."); ~mesbox("You give Aluft the worm hole. He takes a bite..."); - ~chatnpc(happy, "Hmm, that's actually really good."); - ~chatnpc(default, "How about you make me some toad crunchies for desert? Then I'll decide whether I can take you on."); - ~chatplayer(confused, "Toad crunchies?"); - ~chatnpc(happy, "Thats right, here's all you need except the toad's legs."); + ~chatnpc("Hmm, that's actually really good."); + ~chatnpc("How about you make me some toad crunchies for desert? Then I'll decide whether I can take you on."); + ~chatplayer("Toad crunchies?"); + ~chatnpc("Thats right, here's all you need except the toad's legs."); inv_del(inv, worm_hole, 1); inv_add(inv, gianne_dough, 1); inv_add(inv, equa_leaves, 1); @@ -166,15 +166,15 @@ if (inv_total(inv, worm_hole) > 0) { inv_add(inv, crunchy_tray, 1); %gnome_restaurant_progress = 6; ~mesbox("Aluft gives you some dough, some equa leaves, and some gnome spice."); - ~chatnpc(default, "Let me know when you're done."); + ~chatnpc("Let me know when you're done."); return; } if (inv_total(inv, gnomebowl_mould) < 1) { def_int $choice = ~p_choice2("I'm afraid I've lost the gnomebowl mould you gave to me.", 1, "I'm not done yet.", 2); if ($choice = 1) { - ~chatplayer(sad, "I'm afraid I've lost the gnomebowl mould you gave to me."); + ~chatplayer("I'm afraid I've lost the gnomebowl mould you gave to me."); inv_add(inv, gnomebowl_mould, 1); - ~chatnpc(default, "Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); return; } } else { @@ -182,25 +182,25 @@ if (inv_total(inv, gnomebowl_mould) < 1) { } if (inv_total(inv, worm_hole) < 1) { - ~chatplayer(default, "I'm not done yet."); - ~chatnpc(default, "Ok, quick as you can though. I need one worm hole."); - ~chatplayer(happy, "No problem."); + ~chatplayer("I'm not done yet."); + ~chatnpc("Ok, quick as you can though. I need one worm hole."); + ~chatplayer("No problem."); return; } [label,gnome_restaurant_complete] -~chatplayer(default, "Hi Aluft."); -~chatnpc(quiz, "Hello , how are you getting on?"); +~chatplayer("Hi Aluft."); +~chatnpc("Hello , how are you getting on?"); if (inv_total(inv, toad_crunchies) > 0) { - ~chatplayer(happy, "Here, see what you think."); + ~chatplayer("Here, see what you think."); ~mesbox("You give Aluft the toad crunchies. He takes a bite..."); inv_del(inv, toad_crunchies, 1); %gnome_restaurant_progress = 7; - ~chatnpc(quiz, "Well for a human you certainly can cook. I'd love to have you on the team."); - ~chatnpc(quiz, "If you ever want to make some money or want to improve your cooking skills, just come and see me. I'll tell you what meals I need, and if you can, you make them."); - ~chatplayer(confused, "What about ingredients?"); - ~chatnpc(happy, "Well you know where to find toads and worms. You can buy the rest from Hudo Glenfad the grocer."); - ~chatnpc(happy, "I'll always pay you much more for the meal than you paid for the ingredients, and it's a great way to improve you cooking skills."); + ~chatnpc("Well for a human you certainly can cook. I'd love to have you on the team."); + ~chatnpc("If you ever want to make some money or want to improve your cooking skills, just come and see me. I'll tell you what meals I need, and if you can, you make them."); + ~chatplayer("What about ingredients?"); + ~chatnpc("Well you know where to find toads and worms. You can buy the rest from Hudo Glenfad the grocer."); + ~chatnpc("I'll always pay you much more for the meal than you paid for the ingredients, and it's a great way to improve you cooking skills."); // Doesnt seem like he gives gianne dough in this rev // https://web.archive.org/web/20051210095941/http://runescape.salmoneus.net/gnome_food.html return; @@ -209,9 +209,9 @@ if (inv_total(inv, crunchy_tray) < 1) { def_int $choice = ~p_choice2("I'm afraid I've lost the crunchy tray you gave to me.", 1, "No luck so far.", 2); if ($choice = 1) { // No typos here. choice uses 'crunchy', and chat uses 'crunchie'. This is from osrs - ~chatplayer(sad, "I'm afraid I've lost the crunchie tray you gave to me."); + ~chatplayer("I'm afraid I've lost the crunchie tray you gave to me."); inv_add(inv, crunchy_tray, 1); - ~chatnpc(default, "Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you another one. Obviously I can't expect|you to cook without the proper utensils."); return; } } else { @@ -219,15 +219,15 @@ if (inv_total(inv, crunchy_tray) < 1) { } if (inv_total(inv, toad_crunchies) < 1) { - ~chatplayer(default, "No luck so far."); - ~chatnpc(default, "Ok then but don't take too long. I need some toad crunchies."); + ~chatplayer("No luck so far."); + ~chatnpc("Ok then but don't take too long. I need some toad crunchies."); return; } [proc,gnome_restaurant_food_check](obj $food, string $food_name) if (inv_total(inv, $food) > 0) { - ~chatplayer(default, "I think I've got one."); - ~chatnpc(neutral, "That looks identical to the <$food_name> I cooked not five|minutes ago. You'll have to prove to me that you can|make one yourself."); + ~chatplayer("I think I've got one."); + ~chatnpc("That looks identical to the <$food_name> I cooked not five|minutes ago. You'll have to prove to me that you can|make one yourself."); @exit; } // ***************** END OF TUTORIAL ************************* @@ -259,59 +259,59 @@ if ($container_total < 3) { } $choice = ~p_choice3("Sorry Alufy, I'm too busy.", 1, "I would be glad to help.", 2, "I'm afraid I've lost the <$cooking_utensil> you gave me.", 3); if ($choice = 3) { - ~chatplayer(sad, "I'm afraid I've lost the <$cooking_utensil2> you gave me."); + ~chatplayer("I'm afraid I've lost the <$cooking_utensil2> you gave me."); if ($crunchy_tray_total < 1) inv_add(inv, crunchy_tray, 1); if ($batta_tin_total < 1) inv_add(inv, batta_tin, 1); if ($gnomebowl_mould_total < 1) inv_add(inv, gnomebowl_mould, 1); - ~chatnpc(default, "Ok, I'll give you some more. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you some more. Obviously I can't expect|you to cook without the proper utensils."); return; } } else { $choice = ~p_choice2("Sorry Alufy, I'm too busy.", 1, "I would be glad to help.", 2); } if ($choice = 1) { - ~chatplayer(default, "Sorry Alufy, I'm too busy."); - ~chatnpc(happy, "No worries, let me know when you're free."); + ~chatplayer("Sorry Alufy, I'm too busy."); + ~chatnpc("No worries, let me know when you're free."); return; } -~chatplayer(quiz, "I would be glad to help"); +~chatplayer("I would be glad to help"); def_int $rand = randominc(9); %gnome_restaurant_progress = calc(7 + $rand); switch_int($rand) { case 1 : - ~chatnpc(neutral, "Can you make me two worm batta's, a toad batta, and a vegetable batta please?"); - ~chatplayer(default, "Ok then."); + ~chatnpc("Can you make me two worm batta's, a toad batta, and a vegetable batta please?"); + ~chatplayer("Ok then."); case 2 : - ~chatnpc(neutral, "Ok, I need a chocolate bomb, two portions of choc chip crunchies and two portions of toad crunchies."); - ~chatplayer(default, "No problem."); + ~chatnpc("Ok, I need a chocolate bomb, two portions of choc chip crunchies and two portions of toad crunchies."); + ~chatplayer("No problem."); case 3 : - ~chatnpc(neutral, "I need two portions of choc chip crunchies please."); - ~chatplayer(default, "No problem."); + ~chatnpc("I need two portions of choc chip crunchies please."); + ~chatplayer("No problem."); case 4 : - ~chatnpc(neutral, "I just need a chocolate bomb and two portions of choc chip crunchies please."); - ~chatplayer(default, "No problem."); + ~chatnpc("I just need a chocolate bomb and two portions of choc chip crunchies please."); + ~chatplayer("No problem."); case 5 : - ~chatnpc(quiz, "Excellent, I need two vegetable batta's and a worm hole."); - ~chatplayer(default, "No problem."); + ~chatnpc("Excellent, I need two vegetable batta's and a worm hole."); + ~chatplayer("No problem."); case 6 : - ~chatnpc(neutral, "can you make me a a veg ball, a tangled toad's legs, and a worm hole please?"); - ~chatplayer(default, "Ok then."); + ~chatnpc("can you make me a a veg ball, a tangled toad's legs, and a worm hole please?"); + ~chatplayer("Ok then."); case 7 : - ~chatnpc(neutral, "I need a cheese and tomato batta, a veg ball, and two portions of worm crunchies please."); - ~chatplayer(default, "Ok, I'll do my best."); + ~chatnpc("I need a cheese and tomato batta, a veg ball, and two portions of worm crunchies please."); + ~chatplayer("Ok, I'll do my best."); case 8 : - ~chatnpc(neutral, "Can you make a two portions of spicy crunchies, a fruit batta, a chocolate bomb, and a veg ball please chef."); - ~chatplayer(default, "I'll try."); + ~chatnpc("Can you make a two portions of spicy crunchies, a fruit batta, a chocolate bomb, and a veg ball please chef."); + ~chatplayer("I'll try."); case default : - ~chatnpc(neutral, "I just need a tangled toad's legs and two portions of worm crunchies please."); - ~chatplayer(default, "Ok, I'll do my best."); + ~chatnpc("I just need a tangled toad's legs and two portions of worm crunchies please."); + ~chatplayer("Ok, I'll do my best."); } [label,gnome_restaurant_job_finish] -~chatplayer(default, "Hi Aluft."); +~chatplayer("Hi Aluft."); switch_int(%gnome_restaurant_progress) { case 8 : - ~chatnpc(default, "Hello again, are the dishes ready?"); + ~chatnpc("Hello again, are the dishes ready?"); ~gnome_restaurant_job_checks("All done, here you go.", "two worm batta's, a toad batta, and a vegetable batta", "I need ", ", be as quick as you can", 45, worm_batta, 2, toad_batta, 1, @@ -319,7 +319,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 9 : - ~chatnpc(default, "Hello again, are the dishes ready?"); + ~chatnpc("Hello again, are the dishes ready?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "a chocolate bomb, two portions of choc chip crunchies and two portions of toad crunchies", "Ok, I need ", ". Don't take too long, it's a full house tonight.", 75, chocolate_bomb, 1, choc_chip_crunchies, 2, @@ -327,7 +327,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 10 : - ~chatnpc(default, "Hello again how did you do?"); + ~chatnpc("Hello again how did you do?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "two portions of choc chip crunchies", "I just need ", ". Should be easy", 30, choc_chip_crunchies, 2, null, 0, @@ -335,7 +335,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 11 : - ~chatnpc(default, "Hello again how did you do?"); + ~chatnpc("Hello again how did you do?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "a chocolate bomb and two portions of choc chip crunchies", "I need ", " please", 45, chocolate_bomb, 1, choc_chip_crunchies, 2, @@ -343,7 +343,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 12 : - ~chatnpc(default, "Hello again how did you do?"); + ~chatnpc("Hello again how did you do?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "two vegetable batta's and a worm hole", "Ok, I need ", ", but try not to take too long, it's a full house tonight", 45, vegetable_batta, 2, worm_hole, 1, @@ -351,7 +351,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 13 : - ~chatnpc(default, "Hello again, are the dishes ready?"); + ~chatnpc("Hello again, are the dishes ready?"); ~gnome_restaurant_job_checks("All done, here you go.", "a veg ball, a tangled toad's legs, and a worm hole", "I need ", " please", 45, veg_ball, 1, tangled_toads_legs, 1, @@ -359,7 +359,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 14 : - ~chatnpc(default, "Hello again how did you do?"); + ~chatnpc("Hello again how did you do?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "a cheese and tomato batta, a veg ball, and two portions of worm crunchies", "I need ", " please", 60, cheese_tom_batta, 1, veg_ball, 1, @@ -367,7 +367,7 @@ switch_int(%gnome_restaurant_progress) { null, 0, null, 0); case 15 : - ~chatnpc(default, "Hello again, are the dishes ready?"); + ~chatnpc("Hello again, are the dishes ready?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "two portions of spicy crunchies, a fruit batta, a chocolate bomb, and a veg ball", "I need ", " please", 45, spicy_crunchies, 2, fruit_batta, 1, @@ -375,7 +375,7 @@ switch_int(%gnome_restaurant_progress) { veg_ball, 1, null, 0); case 16 : - ~chatnpc(default, "Hello again, are the dishes ready?"); + ~chatnpc("Hello again, are the dishes ready?"); ~gnome_restaurant_job_checks("Here you go Aluft.", "a tangled toad's legs and two portions of worm crunchies", "I just need ", " please", 45, tangled_toads_legs, 1, worm_crunchies, 2, @@ -384,13 +384,13 @@ switch_int(%gnome_restaurant_progress) { null, 0); } if (%gnome_restaurant_progress = 17) { - ~chatnpc(default, "Can you stay and make another dish?"); + ~chatnpc("Can you stay and make another dish?"); @gnome_restaurant_job_start; } [proc,gnome_restaurant_job_checks](string $finish, string $order, string $order_fail_start, string $order_fail_end, int $coins, namedobj $dish1, int $count1, namedobj $dish2, int $count2, namedobj $dish3, int $count3, namedobj $dish4, int $count4, namedobj $dish5, int $count5) if (inv_total(inv, $dish1) >= $count1 & inv_total(inv, $dish2) >= $count2 & inv_total(inv, $dish3) >= $count3 & inv_total(inv, $dish4) >= $count4 & inv_total(inv, $dish5) >= $count5) { - ~chatplayer(default, $finish); + ~chatplayer(append("", $finish)); inv_del(inv, $dish1, $count1); inv_del(inv, $dish2, $count2); inv_del(inv, $dish3, $count3); @@ -401,7 +401,7 @@ if (inv_total(inv, $dish1) >= $count1 & inv_total(inv, $dish2) >= $count2 & inv_ givexp(cooking, calc(($count1 + $count2 + $count3 + $count4 + $count5) * 600)); %gnome_restaurant_progress = 17; ~mesbox("You give Aluft <$order>."); - ~chatnpc(default, "They look great, well done. Here's your share of the profit."); + ~chatnpc("They look great, well done. Here's your share of the profit."); inv_add(inv, coins, $coins); ~mesbox("Aluft gives you gold coins."); return; @@ -431,14 +431,14 @@ if ($container_total < 3) { $choice = ~p_choice2("I'm not done yet.", 1, "I'm afraid I've lost the <$cooking_utensil> you gave me.", 2); if ($choice = 2) { - ~chatplayer(sad, "I'm afraid I've lost the <$cooking_utensil2> you gave me."); + ~chatplayer("I'm afraid I've lost the <$cooking_utensil2> you gave me."); if ($crunchy_tray_total < 1) inv_add(inv, crunchy_tray, 1); if ($batta_tin_total < 1) inv_add(inv, batta_tin, 1); if ($gnomebowl_mould_total < 1) inv_add(inv, gnomebowl_mould, 1); - ~chatnpc(default, "Ok, I'll give you some more. Obviously I can't expect|you to cook without the proper utensils."); + ~chatnpc("Ok, I'll give you some more. Obviously I can't expect|you to cook without the proper utensils."); return; } } -~chatplayer(sad, "I'm not done yet."); -~chatnpc(default, "<$order_fail_start><$order><$order_fail_end>."); +~chatplayer("I'm not done yet."); +~chatnpc("<$order_fail_start><$order><$order_fail_end>."); diff --git a/data/src/scripts/areas/area_gnome/scripts/gnome_trainer.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnome_trainer.rs2 index c51a7fe16..823b06a2e 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnome_trainer.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnome_trainer.rs2 @@ -1,17 +1,17 @@ [opnpc1,gnome_trainer] def_int $rand_value = random(4); if($rand_value = 0) { - ~chatplayer(neutral, "Hello how are you?"); - ~chatnpc(angry, "I'm amazed by how much humans chat. The sign over there says training area, not pointless conversation area."); + ~chatplayer("Hello how are you?"); + ~chatnpc("I'm amazed by how much humans chat. The sign over there says training area, not pointless conversation area."); } else if($rand_value = 1) { - ~chatplayer(neutral, "Hello, what is this place?"); - ~chatnpc(happy, "This, my friend, is where we train. Here we improve our agility. It's an essential skill."); - ~chatplayer(neutral, "It looks easy enough."); - ~chatnpc(happy, "If you complete the course in order from the slippery log to the end, your agility will increase much faster than by repeating just one obstacle."); + ~chatplayer("Hello, what is this place?"); + ~chatnpc("This, my friend, is where we train. Here we improve our agility. It's an essential skill."); + ~chatplayer("It looks easy enough."); + ~chatnpc("If you complete the course in order from the slippery log to the end, your agility will increase much faster than by repeating just one obstacle."); } else if($rand_value = 2) { - ~chatplayer(happy, "This is fun!"); - ~chatnpc(angry, "This is training soldier. If you want fun go make some cocktails."); + ~chatplayer("This is fun!"); + ~chatnpc("This is training soldier. If you want fun go make some cocktails."); } else if($rand_value = 3) { - ~chatplayer(happy, "Hello there."); - ~chatnpc(default, "This isn't a grannies' tea party, let's see some sweat human. Go! Go! Go!"); + ~chatplayer("Hello there."); + ~chatnpc("This isn't a grannies' tea party, let's see some sweat human. Go! Go! Go!"); } diff --git a/data/src/scripts/areas/area_gnome/scripts/gnome_troop.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnome_troop.rs2 index 9e496f784..ab49c81cf 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnome_troop.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnome_troop.rs2 @@ -1,12 +1,12 @@ [opnpc1,_gnome_troop] switch_int(random(3)) { case 0: - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "Death to Khazard, and all who serve him."); + ~chatplayer("Hello."); + ~chatnpc("Death to Khazard, and all who serve him."); case 1: - ~chatplayer(neutral, "Hi."); - ~chatnpc(angry, "Draw your sword warrior,|and fight along side us."); + ~chatplayer("Hi."); + ~chatnpc("Draw your sword warrior,|and fight along side us."); case 2: - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "I can't talk now,|can't you see we're trying|to win a battle here."); + ~chatplayer("Hello."); + ~chatnpc("I can't talk now,|can't you see we're trying|to win a battle here."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/gnome_waiter.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnome_waiter.rs2 index fab983466..eefb7237b 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnome_waiter.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnome_waiter.rs2 @@ -1,6 +1,6 @@ [opnpc1,npc_851] -~chatplayer(neutral, "Hello."); -~chatnpc(sad, "Hello sir, can I tempt you with any of the dishes on|our new menu?"); +~chatplayer("Hello."); +~chatnpc("Hello sir, can I tempt you with any of the dishes on|our new menu?"); def_int $choice; if (inv_totalcat(inv, category_125) > 0 | inv_totalcat(inv, category_128) > 0) { $choice = ~p_choice3("I'll take a look.", 1, "Not really.", 2, "Actually, I'd like to sell some dishes.", 3); @@ -8,15 +8,15 @@ if (inv_totalcat(inv, category_125) > 0 | inv_totalcat(inv, category_128) > 0) { $choice = ~p_choice2("I'll take a look.", 1, "Not really.", 2); } if ($choice = 2) { - ~chatplayer(neutral, "Not really."); - ~chatnpc(sad, "That's your choice sir, enjoy your stay."); + ~chatplayer("Not really."); + ~chatnpc("That's your choice sir, enjoy your stay."); } else if ($choice = 3) { - ~chatplayer(neutral, "Actually, I'd like to sell some dishes."); - ~chatnpc(sad, "Mr Gianne is the one to talk to if you want to sell any dishes you've made yourself. He is the owner and head chef of this establishment."); - ~chatplayer(neutral, "Thank you."); + ~chatplayer("Actually, I'd like to sell some dishes."); + ~chatnpc("Mr Gianne is the one to talk to if you want to sell any dishes you've made yourself. He is the owner and head chef of this establishment."); + ~chatplayer("Thank you."); } else { - ~chatplayer(happy, "I'll take a look."); - ~chatnpc(sad, "I hope you like what you see. Although all these|premade dishes are good to eat - they were made by|the last human assistant chef. He wasn't up to Chef's|exacting standards - and you may find that they will"); - ~chatnpc(sad, "not be accepted by some people as the 'real' thing."); + ~chatplayer("I'll take a look."); + ~chatnpc("I hope you like what you see. Although all these|premade dishes are good to eat - they were made by|the last human assistant chef. He wasn't up to Chef's|exacting standards - and you may find that they will"); + ~chatnpc("not be accepted by some people as the 'real' thing."); ~openshop_activenpc; } diff --git a/data/src/scripts/areas/area_gnome/scripts/gnomes.rs2 b/data/src/scripts/areas/area_gnome/scripts/gnomes.rs2 index 2b6dcf464..7a56dfcdd 100644 --- a/data/src/scripts/areas/area_gnome/scripts/gnomes.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/gnomes.rs2 @@ -5,255 +5,255 @@ [label,talk_to_gnome] def_int $rand = random(5); -~chatplayer(neutral, "Hello."); +~chatplayer("Hello."); switch_int ($rand) { case 0 : - ~chatnpc(neutral, "Can't stop sorry! Busy, busy, busy!"); + ~chatnpc("Can't stop sorry! Busy, busy, busy!"); ~mesbox("The gnome is too busy to talk."); case 1 : - ~chatnpc(neutral, "Hello traveller. Are you enjoying your stay?"); - ~chatplayer(happy, "It's a nice place."); - ~chatnpc(neutral, "Yes, we try to keep it that way."); + ~chatnpc("Hello traveller. Are you enjoying your stay?"); + ~chatplayer("It's a nice place."); + ~chatnpc("Yes, we try to keep it that way."); case 2 : - ~chatplayer(confused, "Are you OK?"); + ~chatplayer("Are you OK?"); ~mesbox("The gnome seems a little drunk."); - ~chatnpc(drunk, "Youssh go gesshh em."); - ~chatplayer(confused, "Pardon?"); - ~chatnpc(drunk, "Gessh ush a cosshtail."); - ~chatplayer(neutral, "A what?"); - ~chatnpc(drunk, "Blurssh berry."); + ~chatnpc("Youssh go gesshh em."); + ~chatplayer("Pardon?"); + ~chatnpc("Gessh ush a cosshtail."); + ~chatplayer("A what?"); + ~chatnpc("Blurssh berry."); ~mesbox("I think he's had enough!"); case 3 : - ~chatnpc(sad, "I don't think I can take much more!"); - ~chatplayer(confused, "What's wrong?"); - ~chatnpc(sad, "It's just the wife, she won't stop moaning!"); - ~chatplayer(neutral, "Maybe you should give her less to moan about."); - ~chatnpc(sad, "She'll always find something."); + ~chatnpc("I don't think I can take much more!"); + ~chatplayer("What's wrong?"); + ~chatnpc("It's just the wife, she won't stop moaning!"); + ~chatplayer("Maybe you should give her less to moan about."); + ~chatnpc("She'll always find something."); case 4 : - ~chatnpc(neutral, "How's life treating you?"); - ~chatplayer(happy, "Not bad, not bad at all."); - ~chatnpc(sad, "It's good to see a human with a positive attitude."); + ~chatnpc("How's life treating you?"); + ~chatplayer("Not bad, not bad at all."); + ~chatnpc("It's good to see a human with a positive attitude."); } [label,talk_to_gnome_woman] def_int $rand = random(5); -~chatplayer(neutral, "Hello."); +~chatplayer("Hello."); switch_int ($rand) { case 0 : - ~chatnpc(neutral, "Hello adventurer, here's some wise words."); - ~chatplayer(neutral, "OK."); - ~chatnpc(neutral, "Happiness is inward and not outward. So it does not|depend on what we have but on what we are!"); + ~chatnpc("Hello adventurer, here's some wise words."); + ~chatplayer("OK."); + ~chatnpc("Happiness is inward and not outward. So it does not|depend on what we have but on what we are!"); case 1 : - ~chatnpc(neutral, "Hello traveller. Are you eating properly? You look tired."); - ~chatplayer(neutral, "I think so."); - ~chatnpc(neutral, "Here get this worm down you. It'll do you the world of|good."); + ~chatnpc("Hello traveller. Are you eating properly? You look tired."); + ~chatplayer("I think so."); + ~chatnpc("Here get this worm down you. It'll do you the world of|good."); ~objbox(obj_943, "The gnome gives you a worm."); inv_add(inv, king_worm, 1); - ~chatplayer(neutral, "Thanks!"); + ~chatplayer("Thanks!"); case 2 : - ~chatnpc(neutral, "Well good day to you kind . Are you new to these|parts?"); - ~chatplayer(confused, "Kind of."); - ~chatnpc(happy, "Well if you're looking for a good night out: Blurberry's|cocktail bar is great!"); + ~chatnpc("Well good day to you kind . Are you new to these|parts?"); + ~chatplayer("Kind of."); + ~chatnpc("Well if you're looking for a good night out: Blurberry's|cocktail bar is great!"); case 3 : - ~chatnpc(neutral, "Hi. I've never seen so many humans in my life."); - ~chatplayer(happy, "Good attitude!"); - ~chatnpc(laugh, "So we're both learning."); + ~chatnpc("Hi. I've never seen so many humans in my life."); + ~chatplayer("Good attitude!"); + ~chatnpc("So we're both learning."); case 4 : - ~chatplayer(neutral, "How are you?"); - ~chatnpc(neutral, "Not bad, a little worn out."); - ~chatplayer(neutral, "Maybe you should have a lie down."); - ~chatnpc(neutral, "With three kids to feed I've no time for naps!"); - ~chatplayer(neutral, "Sounds like hard work!"); - ~chatnpc(neutral, "It is but they're worth it."); + ~chatplayer("How are you?"); + ~chatnpc("Not bad, a little worn out."); + ~chatplayer("Maybe you should have a lie down."); + ~chatnpc("With three kids to feed I've no time for naps!"); + ~chatplayer("Sounds like hard work!"); + ~chatnpc("It is but they're worth it."); } [opnpc1,gnome_child_yellow] def_int $rand = ~random_range(1, 12); -~chatplayer(neutral, "Hello."); +~chatplayer("Hello."); switch_int ($rand) { case 1 : - ~chatnpc(neutral, "I have a riddle for you."); - ~chatplayer(neutral, "OK."); - ~chatnpc(neutral, "A tree which is planted on Monday and doubles in size each day is fully grown on the following Sunday. On what day is it half grown?"); - ~chatplayer(neutral, "Erm... I'm not sure."); - ~chatnpc(neutral, "Saturday. You big folk really aren't the quickest!"); + ~chatnpc("I have a riddle for you."); + ~chatplayer("OK."); + ~chatnpc("A tree which is planted on Monday and doubles in size each day is fully grown on the following Sunday. On what day is it half grown?"); + ~chatplayer("Erm... I'm not sure."); + ~chatnpc("Saturday. You big folk really aren't the quickest!"); case 2 : - ~chatnpc(neutral, "To be or not to be."); - ~chatplayer(neutral, "Hey I know that. Where's it from?"); - ~chatnpc(neutral, "Existentialism for insects."); + ~chatnpc("To be or not to be."); + ~chatplayer("Hey I know that. Where's it from?"); + ~chatnpc("Existentialism for insects."); case 3 : - ~chatnpc(neutral, "My mum says: A friendly look, a kindly smile one good act, and life's worthwhile!"); - ~chatplayer(neutral, "Sweet."); + ~chatnpc("My mum says: A friendly look, a kindly smile one good act, and life's worthwhile!"); + ~chatplayer("Sweet."); case 4 : - ~chatnpc(neutral, "I wrote a few children's books."); - ~chatplayer(neutral, "Really."); - ~chatnpc(neutral, "Yep... but not on purpose!"); + ~chatnpc("I wrote a few children's books."); + ~chatplayer("Really."); + ~chatnpc("Yep... but not on purpose!"); case 5 : - ~chatnpc(neutral, "The human mind is a tremendous thing."); + ~chatnpc("The human mind is a tremendous thing."); case 6 : - ~chatnpc(neutral, "Bla bla bla!"); - ~chatplayer(neutral, "What?"); - ~chatnpc(neutral, "Bla bla bla!"); + ~chatnpc("Bla bla bla!"); + ~chatplayer("What?"); + ~chatnpc("Bla bla bla!"); ~mesbox("Rude little gnome!"); case 7 : - ~chatnpc(neutral, "Real generosity is doing something nice for someone who will never find it out."); - ~chatplayer(neutral, "Thanks for the quote."); + ~chatnpc("Real generosity is doing something nice for someone who will never find it out."); + ~chatplayer("Thanks for the quote."); case 8 : - ~chatnpc(neutral, "Hardy, ha ha! Hee, hee hee!"); - ~chatplayer(neutral, "Are you OK?"); - ~chatnpc(neutral, "I'm a little tree gnome. That is me!"); - ~chatplayer(neutral, "I've heard better."); + ~chatnpc("Hardy, ha ha! Hee, hee hee!"); + ~chatplayer("Are you OK?"); + ~chatnpc("I'm a little tree gnome. That is me!"); + ~chatplayer("I've heard better."); case 9 : - ~chatnpc(neutral, "I have a riddle for you."); - ~chatplayer(neutral, "OK."); - ~chatnpc(default, "I am the beginning of eternity and the end of time and|space. I am the beginning of every end and the end of|every place. What am I?"); - ~chatplayer(confused, "Err...?"); - ~chatplayer(angry, "Erm...not sure...annoying."); - ~chatnpc(laugh, "I'm 'e'! Hee hee! Do you get it?"); + ~chatnpc("I have a riddle for you."); + ~chatplayer("OK."); + ~chatnpc("I am the beginning of eternity and the end of time and|space. I am the beginning of every end and the end of|every place. What am I?"); + ~chatplayer("Err...?"); + ~chatplayer("Erm...not sure...annoying."); + ~chatnpc("I'm 'e'! Hee hee! Do you get it?"); case 10 : - ~chatnpc(neutral, "I worship Guthix, the god of balance."); - ~chatnpc(neutral, "He really does have exceptional co-ordination."); + ~chatnpc("I worship Guthix, the god of balance."); + ~chatnpc("He really does have exceptional co-ordination."); case 11 : - ~chatplayer(neutral, "Hello, are you alright?"); - ~chatnpc(sad, "Not really, I just saw a man with a wooden leg."); - ~chatplayer(neutral, "So?!"); - ~chatnpc(shock, "He had a real foot!"); + ~chatplayer("Hello, are you alright?"); + ~chatnpc("Not really, I just saw a man with a wooden leg."); + ~chatplayer("So?!"); + ~chatnpc("He had a real foot!"); case 12 : - ~chatplayer(neutral, "What are you doing?"); - ~chatnpc(neutral, "I'm making wine out of raisins."); - ~chatplayer(neutral, "Why?"); - ~chatnpc(neutral, "So I don't have to wait for it to age."); - ~chatnpc(laugh, "Hee hee!"); + ~chatplayer("What are you doing?"); + ~chatnpc("I'm making wine out of raisins."); + ~chatplayer("Why?"); + ~chatnpc("So I don't have to wait for it to age."); + ~chatnpc("Hee hee!"); case 13 : - ~chatnpc(neutral, "Nice weather we're having today."); - ~chatnpc(neutral, "But then it doesn't tend to rain much around here."); + ~chatnpc("Nice weather we're having today."); + ~chatnpc("But then it doesn't tend to rain much around here."); } [opnpc1,gnome_child_green] def_int $rand = ~random_range(1, 13); -~chatplayer(neutral, "Hi there."); +~chatplayer("Hi there."); switch_int ($rand) { case 1 : - ~chatnpc(angry, "Hey big , watch where you're standing."); - ~chatnpc(laugh, "I wouldn't want to make a mess of your shoes."); + ~chatnpc("Hey big , watch where you're standing."); + ~chatnpc("I wouldn't want to make a mess of your shoes."); case 2 : - ~chatnpc(neutral, "Have you seen our big tree?"); - ~chatplayer(happy, "Yes I have!"); - ~chatnpc(happy, "It's not small!"); + ~chatnpc("Have you seen our big tree?"); + ~chatplayer("Yes I have!"); + ~chatnpc("It's not small!"); case 3 : - ~chatnpc(neutral, "You are the contained centre of an O."); - ~chatplayer(confused, "Pardon?"); - ~chatnpc(neutral, "While me, I'm much more. I am the pyramidic containment of an A."); - ~chatplayer(confused, "You're strange."); + ~chatnpc("You are the contained centre of an O."); + ~chatplayer("Pardon?"); + ~chatnpc("While me, I'm much more. I am the pyramidic containment of an A."); + ~chatplayer("You're strange."); case 4 : - ~chatnpc(neutral, "I'm trying to make a comeback!"); - ~chatplayer(bored, "Really?"); - ~chatnpc(sad, "It's hard when you haven't been anywhere."); + ~chatnpc("I'm trying to make a comeback!"); + ~chatplayer("Really?"); + ~chatnpc("It's hard when you haven't been anywhere."); case 5 : - ~chatnpc(worried, "Aaaaarrggghh... humans! Run for your lives!"); + ~chatnpc("Aaaaarrggghh... humans! Run for your lives!"); ~mesbox("The gnome backs away"); case 6 : - ~chatnpc(neutral, "Hello brave adventurer. A warrior like you should go a long way."); - ~chatplayer(happy, "Thanks."); - ~chatnpc(laugh, "The further, the better! Hee hee!"); + ~chatnpc("Hello brave adventurer. A warrior like you should go a long way."); + ~chatplayer("Thanks."); + ~chatnpc("The further, the better! Hee hee!"); case 7 : - ~chatnpc(neutral, "Es ataris eto meriz ip prit es gutus!"); - ~chatplayer(confused, "Pardon?"); - ~chatnpc(neutral, "Es ataris eto meriz ip prit es gutus!"); + ~chatnpc("Es ataris eto meriz ip prit es gutus!"); + ~chatplayer("Pardon?"); + ~chatnpc("Es ataris eto meriz ip prit es gutus!"); case 8 : - ~chatnpc(neutral, "Oh hello."); - ~chatplayer(neutral, "How are you?"); - ~chatnpc(sad, "Not great, it's just... well... people just don't seem to take me seriously!"); + ~chatnpc("Oh hello."); + ~chatplayer("How are you?"); + ~chatnpc("Not great, it's just... well... people just don't seem to take me seriously!"); case 9 : - ~chatnpc(neutral, "How are you?"); - ~chatplayer(neutral, "I'm fine thanks."); + ~chatnpc("How are you?"); + ~chatplayer("I'm fine thanks."); case 10 : - ~chatnpc(neutral, "Why don't you make like a tree..."); - ~chatnpc(neutral, "...and leave!"); - ~chatplayer(laugh, "Funny!"); - ~chatnpc(laugh, "Hee hee!"); + ~chatnpc("Why don't you make like a tree..."); + ~chatnpc("...and leave!"); + ~chatplayer("Funny!"); + ~chatnpc("Hee hee!"); case 11 : - ~chatnpc(neutral, "Top of the morning to you."); - ~chatplayer(neutral, "Thanks."); - ~chatnpc(laugh, "And bottom of the afternoon."); + ~chatnpc("Top of the morning to you."); + ~chatplayer("Thanks."); + ~chatnpc("And bottom of the afternoon."); case 12 : - ~chatnpc(neutral, "The only thing that is constant..."); - ~chatnpc(neutral, "...is change!"); + ~chatnpc("The only thing that is constant..."); + ~chatnpc("...is change!"); case 13 : - ~chatnpc(neutral, "Have you seen our big tree?"); - ~chatplayer(happy, "Yes I have!"); - ~chatnpc(neutral, "It's very grand."); - ~chatnpc(laugh, "Hee hee!"); + ~chatnpc("Have you seen our big tree?"); + ~chatplayer("Yes I have!"); + ~chatnpc("It's very grand."); + ~chatnpc("Hee hee!"); } [opnpc1,gnome_child_blue] def_int $rand = ~random_range(1, 13); -~chatplayer(neutral, "Hi."); +~chatplayer("Hi."); switch_int ($rand) { case 1 : - ~chatnpc(happy, "She loves me!"); - ~chatplayer(bored, "Really."); - ~chatnpc(happy, "She does I tell you. She really loves me!"); + ~chatnpc("She loves me!"); + ~chatplayer("Really."); + ~chatnpc("She does I tell you. She really loves me!"); case 2 : - ~chatnpc(sad, "Hello."); - ~chatplayer(neutral, "Are you alright?"); - ~chatnpc(sad, "I just want something to happen!"); - ~chatplayer(neutral, "Like what?"); - ~chatnpc(sad, "Something, anything, I don't know what!"); + ~chatnpc("Hello."); + ~chatplayer("Are you alright?"); + ~chatnpc("I just want something to happen!"); + ~chatplayer("Like what?"); + ~chatnpc("Something, anything, I don't know what!"); case 3 : - ~chatnpc(neutral, "A little inaccuracy sometimes saves tons of explanation!"); - ~chatplayer(neutral, "True."); + ~chatnpc("A little inaccuracy sometimes saves tons of explanation!"); + ~chatplayer("True."); case 4 : // changed in osrs at some point. Mustve been some D&I change // osrs wiki has old dialogue though - ~chatnpc(neutral, "Hello. Why are you so tall?"); - ~chatplayer(neutral, "Um... I've always been this height."); - ~chatnpc(neutral, "Maybe you should eat more worms."); + ~chatnpc("Hello. Why are you so tall?"); + ~chatplayer("Um... I've always been this height."); + ~chatnpc("Maybe you should eat more worms."); case 5 : - ~chatnpc(neutral, "Low."); - ~chatplayer(confused, "What?"); - ~chatnpc(neutral, "When?"); - ~chatplayer(angry, "Cheeky!"); - ~chatnpc(laugh, "Hee hee!"); + ~chatnpc("Low."); + ~chatplayer("What?"); + ~chatnpc("When?"); + ~chatplayer("Cheeky!"); + ~chatnpc("Hee hee!"); case 6 : ~mesbox("The gnome is praying."); - ~chatnpc(neutral, "Guthix's angels fly so high as to be beyond our sight but they are always looking down upon us."); - ~chatplayer(neutral, "Maybe."); + ~chatnpc("Guthix's angels fly so high as to be beyond our sight but they are always looking down upon us."); + ~chatplayer("Maybe."); case 7 : - ~chatnpc(happy, "Hello, would you like a worm?"); - ~chatplayer(confused, "Erm... OK."); + ~chatnpc("Hello, would you like a worm?"); + ~chatplayer("Erm... OK."); ~objbox(obj_943, "The gnome gives you a worm."); inv_add(inv, king_worm, 1); - ~chatplayer(happy, "Thanks."); - ~chatnpc(neutral, "In the gnome village those who are needy receive what they need, and those who are able give what they can."); + ~chatplayer("Thanks."); + ~chatnpc("In the gnome village those who are needy receive what they need, and those who are able give what they can."); case 8 : - ~chatnpc(neutral, "Dimensionality is a function of consciousness."); - ~chatplayer(laugh, "What?"); - ~chatnpc(neutral, "That's all you need to know."); + ~chatnpc("Dimensionality is a function of consciousness."); + ~chatplayer("What?"); + ~chatnpc("That's all you need to know."); case 9 : - ~chatnpc(neutral, "I've been thinking."); - ~chatplayer(neutral, "OK."); - ~chatnpc(neutral, "Surely, if you're scared to die..."); - ~chatnpc(neutral, "...you're not living, right?"); - ~chatplayer(neutral, "Maybe!"); + ~chatnpc("I've been thinking."); + ~chatplayer("OK."); + ~chatnpc("Surely, if you're scared to die..."); + ~chatnpc("...you're not living, right?"); + ~chatplayer("Maybe!"); case 10 : - ~chatplayer(neutral, "How are you?"); - ~chatnpc(shifty, "A warning traveller! The new world will rise from the underground!"); - ~chatplayer(confused, "What do you mean, underground?"); - ~chatnpc(shifty, "Just a warning!"); + ~chatplayer("How are you?"); + ~chatnpc("A warning traveller! The new world will rise from the underground!"); + ~chatplayer("What do you mean, underground?"); + ~chatnpc("Just a warning!"); case 11 : - ~chatnpc(neutral, "Some advice traveller. We can walk, run, row or fly but never lose sight of the reason for the journey or miss the chance to see a rainbow on the way."); - ~chatplayer(happy, "I like that."); + ~chatnpc("Some advice traveller. We can walk, run, row or fly but never lose sight of the reason for the journey or miss the chance to see a rainbow on the way."); + ~chatplayer("I like that."); case 12 : - ~chatplayer(happy, "You look happy."); - ~chatnpc(happy, "I'm always at peace with myself."); - ~chatplayer(neutral, "How do you manage that?"); - ~chatnpc(neutral, "I know, therefore I am."); + ~chatplayer("You look happy."); + ~chatnpc("I'm always at peace with myself."); + ~chatplayer("How do you manage that?"); + ~chatnpc("I know, therefore I am."); case 13 : ~mesbox("The gnome appears to be singing."); - ~chatnpc(happy, "Oh baby, oh my sweet."); - ~chatplayer(neutral, "Are you talking to me?"); - ~chatnpc(neutral, "No, I'm just singing."); - ~chatnpc(happy, "I'm gonna sweep you off your feet."); + ~chatnpc("Oh baby, oh my sweet."); + ~chatplayer("Are you talking to me?"); + ~chatnpc("No, I'm just singing."); + ~chatnpc("I'm gonna sweep you off your feet."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/heckel_funch.rs2 b/data/src/scripts/areas/area_gnome/scripts/heckel_funch.rs2 index 1245e0d81..64ae3d2f7 100644 --- a/data/src/scripts/areas/area_gnome/scripts/heckel_funch.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/heckel_funch.rs2 @@ -1,13 +1,13 @@ [opnpc1,npc_603] -~chatplayer(happy, "Hello there."); -~chatnpc(happy, "Good day to you my friend, a beautiful one at that. Would you like some groceries? I have all sorts. Alcohol also, if you're partial to a drink."); +~chatplayer("Hello there."); +~chatnpc("Good day to you my friend, a beautiful one at that. Would you like some groceries? I have all sorts. Alcohol also, if you're partial to a drink."); def_int $choice = ~p_choice2("No thank you.", 1, "I'll have a look.", 2); if ($choice = 1) { - ~chatplayer(neutral, "No thank you."); - ~chatnpc(neutral, "Ahh well, all the best to you."); + ~chatplayer("No thank you."); + ~chatnpc("Ahh well, all the best to you."); return; } -~chatplayer(neutral, "I'll have a look."); -~chatnpc(neutral, "There's a good human."); +~chatplayer("I'll have a look."); +~chatnpc("There's a good human."); ~openshop_activenpc; \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/hudo.rs2 b/data/src/scripts/areas/area_gnome/scripts/hudo.rs2 index 4798c4447..263cd1af0 100644 --- a/data/src/scripts/areas/area_gnome/scripts/hudo.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/hudo.rs2 @@ -1,12 +1,12 @@ [opnpc1,npc_600] -~chatplayer(neutral, "Hello there."); -~chatnpc(neutral, "Hello there traveller. Would you like some groceries? I|have a large selection."); +~chatplayer("Hello there."); +~chatnpc("Hello there traveller. Would you like some groceries? I|have a large selection."); def_int $choice = ~p_choice2("No thank you.", 1, "I'll have a look.", 2); if ($choice = 1) { - ~chatplayer(neutral, "No thank you."); - ~chatnpc(neutral, "No problem."); + ~chatplayer("No thank you."); + ~chatnpc("No problem."); return; } -~chatplayer(neutral, "I'll have a look."); -~chatnpc(happy, "Great stuff."); +~chatplayer("I'll have a look."); +~chatnpc("Great stuff."); ~openshop_activenpc; \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/kalron.rs2 b/data/src/scripts/areas/area_gnome/scripts/kalron.rs2 index b1dcacb18..0cfe24bf9 100644 --- a/data/src/scripts/areas/area_gnome/scripts/kalron.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/kalron.rs2 @@ -1,20 +1,20 @@ [opnpc1,kalron] switch_int(%tree_progress) { case ^tree_not_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(sad, "Gotta find a way out.|We built this maze for protection|but I can't get used to it.|I'm always getting lost."); + ~chatplayer("Hello."); + ~chatnpc("Gotta find a way out.|We built this maze for protection|but I can't get used to it.|I'm always getting lost."); case ^tree_started, ^tree_spoken_montai, ^tree_given_logs_montai, ^tree_finding_trackers, ^tree_ballista_fired, ^tree_retrieved_orb: - ~chatplayer(neutral, "Hello, how are you?"); - ~chatnpc(sad, "Oh my. I'll never find my way back|before Khazard's men come and hunt me down."); + ~chatplayer("Hello, how are you?"); + ~chatnpc("Oh my. I'll never find my way back|before Khazard's men come and hunt me down."); case ^tree_returned_first_orb: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(sad, "Oh my, oh my,|the village has been pillaged|and I'm still lost.|Oh dear."); + ~chatplayer("Hello there."); + ~chatnpc("Oh my, oh my,|the village has been pillaged|and I'm still lost.|Oh dear."); case ^tree_defeated_warlord: - ~chatplayer(neutral, "Hello little man."); - ~chatnpc(sad, "Hello. I hope they come out and find me soon.|It's getting cold."); + ~chatplayer("Hello little man."); + ~chatnpc("Hello. I hope they come out and find me soon.|It's getting cold."); case ^tree_complete: - ~chatplayer(neutral, "Hello there, you look lost."); - ~chatnpc(angry, "Are you trying to be funny?"); - ~chatplayer(neutral, "No."); - ~chatnpc(angry, "Hmmm."); + ~chatplayer("Hello there, you look lost."); + ~chatnpc("Are you trying to be funny?"); + ~chatplayer("No."); + ~chatnpc("Hmmm."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 b/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 index 5270b7d66..68198c56a 100644 --- a/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/king_bolren.rs2 @@ -1,93 +1,93 @@ [opnpc1,king_bolren] switch_int(%tree_progress) { case ^tree_not_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(happy, "Well hello stranger.|My name's Bolren, I'm the king of the tree gnomes."); - ~chatnpc(shock, "I'm surprised you made it in,|maybe I made the maze too easy."); - ~chatplayer(neutral, "Maybe."); - ~chatnpc(sad, "I'm afraid I have more serious concerns at the moment. Very serious."); + ~chatplayer("Hello."); + ~chatnpc("Well hello stranger.|My name's Bolren, I'm the king of the tree gnomes."); + ~chatnpc("I'm surprised you made it in,|maybe I made the maze too easy."); + ~chatplayer("Maybe."); + ~chatnpc("I'm afraid I have more serious concerns at the moment. Very serious."); switch_int(~p_choice2("I'll leave you to it then.", 1, "Can I help at all?", 2)) { case 1: - ~chatplayer(bored, "I'll leave you to it then."); - ~chatnpc(neutral, "Ok, take care."); + ~chatplayer("I'll leave you to it then."); + ~chatnpc("Ok, take care."); case 2: - ~chatplayer(quiz, "Can I help at all?"); - ~chatnpc(happy, "I'm glad you asked."); - ~chatnpc(sad, "The truth is my people are in grave danger. We have always been protected by the Spirit Tree. No creature of dark can harm us while its three orbs are in place."); - ~chatnpc(sad, "We are not a violent race, but we fight when we must. Many gnomes have fallen battling the dark forces of Khazard to the North."); - ~chatnpc(sad, "We became desperate,|so we took one orb of protection to the battlefield.|It was a foolish move."); - ~chatnpc(sad, "Khazard troops seized the orb.|Now we are completely defenceless."); - ~chatplayer(quiz, "How can I help?"); - ~chatnpc(neutral, "You would be a huge benefit on the battlefield.|If you would go there and try to retrieve the|orb, my people and I will be forever grateful."); + ~chatplayer("Can I help at all?"); + ~chatnpc("I'm glad you asked."); + ~chatnpc("The truth is my people are in grave danger. We have always been protected by the Spirit Tree. No creature of dark can harm us while its three orbs are in place."); + ~chatnpc("We are not a violent race, but we fight when we must. Many gnomes have fallen battling the dark forces of Khazard to the North."); + ~chatnpc("We became desperate,|so we took one orb of protection to the battlefield.|It was a foolish move."); + ~chatnpc("Khazard troops seized the orb.|Now we are completely defenceless."); + ~chatplayer("How can I help?"); + ~chatnpc("You would be a huge benefit on the battlefield.|If you would go there and try to retrieve the|orb, my people and I will be forever grateful."); switch_int(~p_choice2("I would be glad to help.", 1, "I'm sorry but I won't be involved.", 2)) { case 1: - ~chatplayer(neutral, "I would be glad to help."); + ~chatplayer("I would be glad to help."); %tree_progress = ^tree_started; ~send_quest_progress(questlist:tree, %tree_progress, ^tree_complete); - ~chatnpc(neutral, "Thank you. The battlefield is to the north of the maze. Commander Montai will inform you of their current situation."); - ~chatnpc(sad, "That is if he's still alive."); - ~chatnpc(neutral, "My assistant shall guide you out. Good luck friend, try your best to return the orb."); + ~chatnpc("Thank you. The battlefield is to the north of the maze. Commander Montai will inform you of their current situation."); + ~chatnpc("That is if he's still alive."); + ~chatnpc("My assistant shall guide you out. Good luck friend, try your best to return the orb."); @elkoy_leavemaze_initial; case 2: - ~chatplayer(neutral, "I'm sorry but I won't be involved."); - ~chatnpc(neutral, "Ok then, travel safe."); + ~chatplayer("I'm sorry but I won't be involved."); + ~chatnpc("Ok then, travel safe."); } } case ^tree_started: - ~chatplayer(neutral, "Hello Bolren."); - ~chatnpc(neutral, "Hello traveller, we must retrieve the orb.|It's being held by Khazard troops north of here."); - ~chatplayer(neutral, "Ok, I'll try my best."); + ~chatplayer("Hello Bolren."); + ~chatnpc("Hello traveller, we must retrieve the orb.|It's being held by Khazard troops north of here."); + ~chatplayer("Ok, I'll try my best."); case ^tree_spoken_montai, ^tree_given_logs_montai, ^tree_finding_trackers, ^tree_ballista_fired: - ~chatplayer(neutral, "Hello Bolren."); - ~chatnpc(neutral, "The orb is being held at the battlefield north of the maze."); + ~chatplayer("Hello Bolren."); + ~chatnpc("The orb is being held at the battlefield north of the maze."); case ^tree_retrieved_orb: if(inv_total(inv, orb_of_protection) = 0) { - ~chatplayer(neutral, "Hello Bolren."); - ~chatnpc(quiz, "Do you have the orb?"); - ~chatplayer(sad, "No, I'm afraid not."); - ~chatnpc(sad, "Please, we must have the orb if we are to survive."); + ~chatplayer("Hello Bolren."); + ~chatnpc("Do you have the orb?"); + ~chatplayer("No, I'm afraid not."); + ~chatnpc("Please, we must have the orb if we are to survive."); return; } - ~chatplayer(happy, "I have the orb."); - ~chatnpc(sad, "Oh my... The misery, the horror!"); - ~chatplayer(quiz, "King Bolren, are you OK?"); - ~chatnpc(sad, "Thank you traveller, but it's too late. We're all doomed."); - ~chatplayer(quiz, "What happened?"); - ~chatnpc(sad, "They came in the night.|I don't know how many, but enough."); - ~chatplayer(quiz, "Who?"); - ~chatnpc(sad, "Khazard troops.|They slaughtered anyone who got in their way.|Women, children, my wife."); - ~chatplayer(sad, "I'm sorry."); - ~chatnpc(sad, "They took the other orbs,|now we are defenceless."); - ~chatplayer(quiz, "Where did they take them?"); - ~chatnpc(sad, "They headed north of the stronghold.|A warlord carries the orbs."); + ~chatplayer("I have the orb."); + ~chatnpc("Oh my... The misery, the horror!"); + ~chatplayer("King Bolren, are you OK?"); + ~chatnpc("Thank you traveller, but it's too late. We're all doomed."); + ~chatplayer("What happened?"); + ~chatnpc("They came in the night.|I don't know how many, but enough."); + ~chatplayer("Who?"); + ~chatnpc("Khazard troops.|They slaughtered anyone who got in their way.|Women, children, my wife."); + ~chatplayer("I'm sorry."); + ~chatnpc("They took the other orbs,|now we are defenceless."); + ~chatplayer("Where did they take them?"); + ~chatnpc("They headed north of the stronghold.|A warlord carries the orbs."); switch_int(~p_choice2("I will find the warlord and bring back the orbs.", 1, "I'm sorry but I can't help.", 2)) { case 1: - ~chatplayer(neutral, "I will find the warlord and bring back the orbs."); - ~chatnpc(neutral, "You are brave,|but this task will be tough even for you.|I wish you the best of luck.|Once again you are our only hope."); + ~chatplayer("I will find the warlord and bring back the orbs."); + ~chatnpc("You are brave,|but this task will be tough even for you.|I wish you the best of luck.|Once again you are our only hope."); %tree_progress = ^tree_returned_first_orb; inv_del(inv, orb_of_protection, 1); - ~chatnpc(neutral, "I will safeguard this orb|and pray for your safe return.|My assistant will guide you out."); + ~chatnpc("I will safeguard this orb|and pray for your safe return.|My assistant will guide you out."); @elkoy_leavemaze_second; case 2: - ~chatplayer(neutral, "I'm sorry but I can't help."); - ~chatnpc(sad, "I understand, this isn't your battle."); + ~chatplayer("I'm sorry but I can't help."); + ~chatnpc("I understand, this isn't your battle."); } case ^tree_returned_first_orb: - ~chatplayer(neutral, "Hello Bolren."); - ~chatnpc(sad, "The orbs are gone,|taken north of the battlefield by a Khazard warlord.|We're all doomed."); + ~chatplayer("Hello Bolren."); + ~chatnpc("The orbs are gone,|taken north of the battlefield by a Khazard warlord.|We're all doomed."); case ^tree_defeated_warlord: - ~chatplayer(neutral, "Bolren, I have returned."); - ~chatnpc(shock, "You made it back! Do you have the orbs?"); + ~chatplayer("Bolren, I have returned."); + ~chatnpc("You made it back! Do you have the orbs?"); if(inv_total(inv, orbs_of_protection)= 0) { - ~chatplayer(neutral, "No, I'm afraid not."); - ~chatnpc(sad, "Please, we must have the orbs if we are to survive."); + ~chatplayer("No, I'm afraid not."); + ~chatnpc("Please, we must have the orbs if we are to survive."); return; } - ~chatplayer(happy, "I have them here."); - ~chatnpc(happy, "Hooray, you're amazing. I didn't think it was possible but you've saved us."); - ~chatnpc(happy, "Once the orbs are replaced we will be safe once more. We must begin the ceremony immediately."); - ~chatplayer(quiz, "What does the ceremony involve?"); - ~chatnpc(neutral, "The spirit tree has looked over us for centuries. Now we must pay our respects."); + ~chatplayer("I have them here."); + ~chatnpc("Hooray, you're amazing. I didn't think it was possible but you've saved us."); + ~chatnpc("Once the orbs are replaced we will be safe once more. We must begin the ceremony immediately."); + ~chatplayer("What does the ceremony involve?"); + ~chatnpc("The spirit tree has looked over us for centuries. Now we must pay our respects."); // no varbits yet (this is in the same range as the tracker stuff added in ~2005, so assuming this just works differently) // going to queue the quest finish instead here inv_del(inv, orbs_of_protection, 1); @@ -111,19 +111,19 @@ switch_int(%tree_progress) { spotanim_npc(gnome_globes, 20, 124); p_delay(6); ~mesbox("The orbs of protection come to rest gently in the branches of the ancient spirit tree."); - ~chatnpc(happy, "Now at last my people are safe once more.|We can live in peace again."); - ~chatplayer(happy, "I'm pleased I could help."); - ~chatnpc(neutral, "You are modest brave traveller."); - ~chatnpc(happy, "Please, for your efforts take this amulet. It's made from the same sacred stone as the orbs of protection. It will help keep you safe on your journeys."); - ~chatplayer(happy, "Thank you King Bolren."); - ~chatnpc(happy, "The tree has many other powers, some of which I cannot reveal. As a friend of the gnome people, I can now allow you to use the tree's magic to teleport to other trees grown from related seeds."); + ~chatnpc("Now at last my people are safe once more.|We can live in peace again."); + ~chatplayer("I'm pleased I could help."); + ~chatnpc("You are modest brave traveller."); + ~chatnpc("Please, for your efforts take this amulet. It's made from the same sacred stone as the orbs of protection. It will help keep you safe on your journeys."); + ~chatplayer("Thank you King Bolren."); + ~chatnpc("The tree has many other powers, some of which I cannot reveal. As a friend of the gnome people, I can now allow you to use the tree's magic to teleport to other trees grown from related seeds."); case ^tree_complete: - ~chatplayer(neutral, "Hello again, Bolren."); - ~chatnpc(happy, "Hello there. It's good to see you again."); + ~chatplayer("Hello again, Bolren."); + ~chatnpc("Hello there. It's good to see you again."); // dialogue was changed on OSRS recently, guessing mesanims here if(~obj_gettotal(gnome_amulet) = 0) { - ~chatplayer(sad, "I've lost my amulet."); - ~chatnpc(neutral, "Oh dear. Here, take another. We truly are indebted to you."); + ~chatplayer("I've lost my amulet."); + ~chatnpc("Oh dear. Here, take another. We truly are indebted to you."); inv_add(inv, gnome_amulet, 1); // not sure if there was a space check originally, guessing no cause no proof otherwise } } diff --git a/data/src/scripts/areas/area_gnome/scripts/local_gnome.rs2 b/data/src/scripts/areas/area_gnome/scripts/local_gnome.rs2 index e37aa8f46..23a0d698c 100644 --- a/data/src/scripts/areas/area_gnome/scripts/local_gnome.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/local_gnome.rs2 @@ -1,22 +1,22 @@ [opnpc1,local_gnome] switch_int(%tree_progress) { case ^tree_retrieved_orb: - ~chatplayer(neutral, "Hello little man."); - ~chatnpc(happy, "Little man stronger than big man. Hee hee, lardi dee, lardi da."); + ~chatplayer("Hello little man."); + ~chatnpc("Little man stronger than big man. Hee hee, lardi dee, lardi da."); case ^tree_returned_first_orb: - ~chatplayer(neutral, "Hi."); - ~chatnpc(happy, "Must save the orbs and kill the Khazard warlord.|That will be fun, hee hee."); + ~chatplayer("Hi."); + ~chatnpc("Must save the orbs and kill the Khazard warlord.|That will be fun, hee hee."); case ^tree_defeated_warlord: - ~chatplayer(neutral, "Hello gnome."); - ~chatnpc(happy, "Soon we're gonna have the sacred ceremony|and boy am I going to party.|Lock up your daughters.|Hee hee."); + ~chatplayer("Hello gnome."); + ~chatnpc("Soon we're gonna have the sacred ceremony|and boy am I going to party.|Lock up your daughters.|Hee hee."); case ^tree_complete: - ~chatplayer(neutral, "Hello."); - ~chatnpc(happy, "You're the best!"); - ~chatplayer(happy, "Thanks."); - ~chatnpc(happy, "Well I'm better. Hee hee."); + ~chatplayer("Hello."); + ~chatnpc("You're the best!"); + ~chatplayer("Thanks."); + ~chatnpc("Well I'm better. Hee hee."); case default: - ~chatplayer(neutral, "Hello."); - ~chatnpc(happy, "Lardi dee, lardi da."); - ~chatplayer(confused, "Are you alright?"); - ~chatnpc(happy, "Hee hee, lardi da, lardi dee.|@whi@(The gnome appears to be singing.)"); + ~chatplayer("Hello."); + ~chatnpc("Lardi dee, lardi da."); + ~chatplayer("Are you alright?"); + ~chatnpc("Hee hee, lardi da, lardi dee.|@whi@(The gnome appears to be singing.)"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/remsai.rs2 b/data/src/scripts/areas/area_gnome/scripts/remsai.rs2 index 96f4bd8fa..e64eaad2d 100644 --- a/data/src/scripts/areas/area_gnome/scripts/remsai.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/remsai.rs2 @@ -1,35 +1,35 @@ [opnpc1,remsai] switch_int(%tree_progress) { case ^tree_not_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(happy, "Well done, well done.|Not many find their way in here."); - ~chatnpc(happy, "I'm Remsai, a tree gnome.|We live in this maze for our protection.|Have a look around and enjoy."); + ~chatplayer("Hello."); + ~chatnpc("Well done, well done.|Not many find their way in here."); + ~chatnpc("I'm Remsai, a tree gnome.|We live in this maze for our protection.|Have a look around and enjoy."); case ^tree_started, ^tree_spoken_montai, ^tree_given_logs_montai, ^tree_finding_trackers, ^tree_ballista_fired: - ~chatnpc(sad, "Oh my, oh my!"); - ~chatplayer(quiz, "What's wrong?"); - ~chatnpc(sad, "The orb, they have the orb.|It must be returned or we're doomed."); + ~chatnpc("Oh my, oh my!"); + ~chatplayer("What's wrong?"); + ~chatnpc("The orb, they have the orb.|It must be returned or we're doomed."); case ^tree_retrieved_orb: - ~chatplayer(neutral, "Hello Remsai."); - ~chatnpc(quiz, "Hello, did you find the orb?"); + ~chatplayer("Hello Remsai."); + ~chatnpc("Hello, did you find the orb?"); if(inv_total(inv, orb_of_protection) > 0) { - ~chatplayer(happy, "I have it here."); - ~chatnpc(happy, "You're our saviour."); + ~chatplayer("I have it here."); + ~chatnpc("You're our saviour."); } else if(inv_total(bank, orb_of_protection) > 0) { // only dialogue that does a bank check as well for some reason - ~chatplayer(sad, "Yes, although I've not got it with me right now."); - ~chatnpc(sad, "Please, we must have the orb if we are to survive."); + ~chatplayer("Yes, although I've not got it with me right now."); + ~chatnpc("Please, we must have the orb if we are to survive."); } else { - ~chatplayer(sad, "No, I'm afraid not."); - ~chatnpc(sad, "Please, we must have the orb if we are to survive."); + ~chatplayer("No, I'm afraid not."); + ~chatnpc("Please, we must have the orb if we are to survive."); } case ^tree_returned_first_orb: - ~chatplayer(quiz, "Are you ok?"); - ~chatnpc(sad, "Khazard's men came.|Without the orb we were defenceless.|They killed many and then took our last hope,|the other orbs."); - ~chatnpc(sad, "Now surely we're all doomed.|Without them the spirit tree is useless."); + ~chatplayer("Are you ok?"); + ~chatnpc("Khazard's men came.|Without the orb we were defenceless.|They killed many and then took our last hope,|the other orbs."); + ~chatnpc("Now surely we're all doomed.|Without them the spirit tree is useless."); case ^tree_defeated_warlord: - ~chatplayer(happy, "I've returned."); - ~chatnpc(happy, "You're back, well done brave adventurer.|Now the orbs are safe|we can perform the ritual for the spirit tree.|We can live in peace once again."); + ~chatplayer("I've returned."); + ~chatnpc("You're back, well done brave adventurer.|Now the orbs are safe|we can perform the ritual for the spirit tree.|We can live in peace once again."); case ^tree_complete: - ~chatplayer(happy, "Hello."); - ~chatnpc(happy, "Hi there traveller.|You're a legend around these parts."); // double space between break in osrs - ~chatplayer(happy, "Thanks Remsai."); + ~chatplayer("Hello."); + ~chatnpc("Hi there traveller.|You're a legend around these parts."); // double space between break in osrs + ~chatplayer("Thanks Remsai."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/rometti.rs2 b/data/src/scripts/areas/area_gnome/scripts/rometti.rs2 index f5d67e10e..5ae55110c 100644 --- a/data/src/scripts/areas/area_gnome/scripts/rometti.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/rometti.rs2 @@ -1,13 +1,13 @@ [opnpc1,npc_601] -~chatplayer(neutral, "Hello."); -~chatnpc(default, "Hello traveller. Have a look at my latest range of|gnome fashion. Rometti is the ultimate label in gnome|high society."); -~chatplayer(bored, "Really."); -~chatnpc(neutral, "Pastels are all the rage this season."); +~chatplayer("Hello."); +~chatnpc("Hello traveller. Have a look at my latest range of|gnome fashion. Rometti is the ultimate label in gnome|high society."); +~chatplayer("Really."); +~chatnpc("Pastels are all the rage this season."); def_int $choice = ~p_choice2("I've no time for fashion.", 1, "OK then, let's have a look.", 2); if ($choice = 1) { - ~chatplayer(neutral, "I've no time for fashion."); - ~chatnpc(neutral, "Hmm... I did wonder."); + ~chatplayer("I've no time for fashion."); + ~chatnpc("Hmm... I did wonder."); return; } -~chatplayer(neutral, "OK then, let's have a look."); +~chatplayer("OK then, let's have a look."); ~openshop_activenpc; \ No newline at end of file diff --git a/data/src/scripts/areas/area_gnome/scripts/spirit_tree.rs2 b/data/src/scripts/areas/area_gnome/scripts/spirit_tree.rs2 index 31e40eb6c..57151c7d5 100644 --- a/data/src/scripts/areas/area_gnome/scripts/spirit_tree.rs2 +++ b/data/src/scripts/areas/area_gnome/scripts/spirit_tree.rs2 @@ -14,10 +14,10 @@ if(%tree_progress ! ^tree_complete) { ~mesbox("You friend of gnome people, you friend of mine.|Would you like me to take you somewhere?"); switch_int(~p_choice2("No thanks, old tree.", 1, "Where can I go?", 2)) { case 1: - ~chatplayer(neutral, "No thanks, old tree."); + ~chatplayer("No thanks, old tree."); return; case 2: - ~chatplayer(quiz, "Where can I go?"); + ~chatplayer("Where can I go?"); ~mesbox("The tree talks again..."); ~mesbox("You can travel to the trees|which are related to me."); } @@ -38,10 +38,10 @@ if(%tree_progress ! ^tree_complete) { ~mesbox("Hello gnome friend. Would you like to|travel to the home of the tree gnomes?"); switch_int(~p_choice2("Yes please.", 1, "No thank you.", 2)) { case 1: - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); @spirit_tree_tele(^village_tree); case 2: - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } [label,spirit_tree_tele](coord $dest) diff --git a/data/src/scripts/areas/area_karamja/scripts/customs_officer.rs2 b/data/src/scripts/areas/area_karamja/scripts/customs_officer.rs2 index 6239021b5..e8c9cc66a 100644 --- a/data/src/scripts/areas/area_karamja/scripts/customs_officer.rs2 +++ b/data/src/scripts/areas/area_karamja/scripts/customs_officer.rs2 @@ -1,52 +1,52 @@ [opnpc1,customs_officer] -~chatnpc(neutral, "Can I help you?"); +~chatnpc("Can I help you?"); @multi2("Can I journey on this ship?", customs_journey, "Does Karamja have unusual customs then?", customs_unusual); [label,customs_unusual] -~chatplayer(quiz, "Does Karamja have any unusual customs then?"); -~chatnpc(neutral, "I'm not that sort of customs officer."); +~chatplayer("Does Karamja have any unusual customs then?"); +~chatnpc("I'm not that sort of customs officer."); [label,customs_journey] -~chatplayer(quiz, "Can I journey on this ship?"); +~chatplayer("Can I journey on this ship?"); if (%hunt_progress >= 2) { if (inv_total(inv, karamja_rum) > 0) { @customs_spot_inspection; } - ~chatnpc(neutral, "Hey, I know you, you work at the plantation."); - ~chatnpc(neutral, "I don't think you'll try smuggling anything, you just need to pay a boarding charge of 30 coins."); + ~chatnpc("Hey, I know you, you work at the plantation."); + ~chatnpc("I don't think you'll try smuggling anything, you just need to pay a boarding charge of 30 coins."); @customs_pass_search; } -~chatnpc(quiz, "You need to be searched before you can board."); +~chatnpc("You need to be searched before you can board."); @multi3("Why?", customs_why, "Search away, I have nothing to hide.", customs_search, "You're not putting your hands on my things!", customs_dont_touch); [label,customs_spot_inspection] -~chatnpc(neutral, "Spot inspection. You don't mind do you?"); -~chatnpc(neutral, "Aha, trying to smuggle rum eh?"); +~chatnpc("Spot inspection. You don't mind do you?"); +~chatnpc("Aha, trying to smuggle rum eh?"); -~chatplayer(shifty, "Umm... it's for personal use?"); +~chatplayer("Umm... it's for personal use?"); inv_del(inv, karamja_rum, 28); mes("The customs officer confiscates your rum."); [label,customs_why] -~chatplayer(quiz, "Why?"); -~chatnpc(neutral, "Because Asgarnia has banned the import of intoxicating|spirits."); +~chatplayer("Why?"); +~chatnpc("Because Asgarnia has banned the import of intoxicating|spirits."); @multi2("Search away, I have nothing to hide.", customs_search, "You're not putting your hands on my things!", customs_dont_touch); [label,customs_dont_touch] -~chatplayer(shock, "You're not putting your hands on my things!"); -~chatnpc(bored, "You're not getting on this ship then."); +~chatplayer("You're not putting your hands on my things!"); +~chatnpc("You're not getting on this ship then."); [label,customs_search] -~chatplayer(happy, "Search away, I have nothing to hide."); +~chatplayer("Search away, I have nothing to hide."); if (inv_total(inv, karamja_rum) > 0) { - ~chatnpc(neutral, "Aha, trying to smuggle rum are we?"); - ~chatplayer(shifty, "Umm... it's for personal use?"); + ~chatnpc("Aha, trying to smuggle rum are we?"); + ~chatplayer("Umm... it's for personal use?"); inv_del(inv, karamja_rum, 28); mes("The customs officer confiscates your rum."); @@ -55,7 +55,7 @@ if (inv_total(inv, karamja_rum) > 0) { } // interestingly this is said even if your inventory is empty -~chatnpc(neutral, "Well you've got some odd stuff, but it's all legal. Now|you need to pay a boarding charge of 30 coins."); +~chatnpc("Well you've got some odd stuff, but it's all legal. Now|you need to pay a boarding charge of 30 coins."); @customs_pass_search; [label,customs_pass_search] @@ -64,13 +64,13 @@ switch_int ($option) { case 1: @customs_pay; case 2: - ~chatplayer(neutral, "Oh, I'll not bother then."); + ~chatplayer("Oh, I'll not bother then."); } [label,customs_pay] -~chatplayer(neutral, "Ok."); +~chatplayer("Ok."); if (inv_total(inv, coins) < 30) { - ~chatplayer(sad, "Oh dear, I don't actually seem to have enough money."); + ~chatplayer("Oh dear, I don't actually seem to have enough money."); return; } diff --git a/data/src/scripts/areas/area_karamja/scripts/jiminua.rs2 b/data/src/scripts/areas/area_karamja/scripts/jiminua.rs2 index fb5f758ef..17404aec0 100644 --- a/data/src/scripts/areas/area_karamja/scripts/jiminua.rs2 +++ b/data/src/scripts/areas/area_karamja/scripts/jiminua.rs2 @@ -1,13 +1,13 @@ [opnpc1,jiminua] -~chatnpc(default, "Welcome to the Jungle Store.|Can I help you at all?"); +~chatnpc("Welcome to the Jungle Store.|Can I help you at all?"); def_int $option = ~p_choice2("Yes please. What are you selling?", 1, "No thanks.", 2); switch_int ($option) { case 1: - ~chatplayer(default, "Yes please. What are you selling?"); + ~chatplayer("Yes please. What are you selling?"); ~openshop_activenpc; case 2: - ~chatplayer(default, "No thanks."); + ~chatplayer("No thanks."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_karamja/scripts/zambo.rs2 b/data/src/scripts/areas/area_karamja/scripts/zambo.rs2 index 577f82be9..c4edcf522 100644 --- a/data/src/scripts/areas/area_karamja/scripts/zambo.rs2 +++ b/data/src/scripts/areas/area_karamja/scripts/zambo.rs2 @@ -1,5 +1,5 @@ [opnpc1,zambo] -~chatnpc(quiz, "Hey, are you wanting to try some of my fine wines and spirits? All brewed locally on Karamja island."); +~chatnpc("Hey, are you wanting to try some of my fine wines and spirits? All brewed locally on Karamja island."); def_int $option; if(testbit(%barcrawl_progress, ^karamjaspirits_index) = false & inv_total(inv, barcrawl_card) > 0) { @@ -9,7 +9,7 @@ if(testbit(%barcrawl_progress, ^karamjaspirits_index) = false & inv_total(inv, b } switch_int ($option) { case 1: p_opnpc(3); - case 2: ~chatplayer(neutral, "No, thank you."); + case 2: ~chatplayer("No, thank you."); case 3: @karamjaspirits_barcrawl; } @@ -19,10 +19,10 @@ if(testbit(%barcrawl_progress, ^karamjaspirits_index) = false & last_useitem = b } [label,karamjaspirits_barcrawl] -~chatplayer(neutral, "I'm doing Alfred Grimhand's barcrawl."); -~chatnpc(neutral, "Ah, you'll be wanting some Ape Bite Liqueur then. It's got a lovely banana taste, and it'll only cost you 7 coins."); +~chatplayer("I'm doing Alfred Grimhand's barcrawl."); +~chatnpc("Ah, you'll be wanting some Ape Bite Liqueur then. It's got a lovely banana taste, and it'll only cost you 7 coins."); if(inv_total(inv, coins) < 7) { - ~chatplayer(sad, "I don't have 7 coins right now."); + ~chatplayer("I don't have 7 coins right now."); return; } if_close; @@ -34,4 +34,4 @@ p_delay(2); mes("Zambo signs your card."); p_delay(2); %barcrawl_progress = setbit(%barcrawl_progress, ^karamjaspirits_index); -~chatplayer(confused, "Mmmmm, dat was luverly..."); \ No newline at end of file +~chatplayer("Mmmmm, dat was luverly..."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_lostcity/scripts/doorman.rs2 b/data/src/scripts/areas/area_lostcity/scripts/doorman.rs2 index 38ad7fa85..c65e4ad2f 100644 --- a/data/src/scripts/areas/area_lostcity/scripts/doorman.rs2 +++ b/data/src/scripts/areas/area_lostcity/scripts/doorman.rs2 @@ -2,14 +2,14 @@ [opnpc1,door_man] mes("The Door man does not appear interested in talking."); [label,door_man_chat] -~chatnpc(neutral, "You cannot pass through this door without paying the trading tax."); -~chatplayer(quiz, "What do I need to pay?"); -~chatnpc(neutral, "One diamond."); +~chatnpc("You cannot pass through this door without paying the trading tax."); +~chatplayer("What do I need to pay?"); +~chatnpc("One diamond."); def_int $option = ~p_choice3("Okay...", 1, "A diamond? Are you crazy?", 2, "I haven't brought my diamonds with me.", 3); if($option = 1) { - ~chatplayer(neutral, "Okay..."); + ~chatplayer("Okay..."); if(inv_total(inv, diamond) = 0) { - ~chatplayer(sad, "I haven't brought my diamonds with me."); + ~chatplayer("I haven't brought my diamonds with me."); return; } if_close; @@ -17,10 +17,10 @@ if($option = 1) { mes("You give the doorman a diamond."); ~open_and_close_door(loc_1535, ~check_axis(coord, loc_coord, loc_angle), false); } else if($option = 2) { - ~chatplayer(confused, "A diamond?|Are you crazy?"); - ~chatnpc(neutral, "Nope. Those are the rules."); + ~chatplayer("A diamond?|Are you crazy?"); + ~chatnpc("Nope. Those are the rules."); } else if($option = 3) { - ~chatplayer(sad, "I haven't brought my diamonds with me."); + ~chatplayer("I haven't brought my diamonds with me."); } [oploc1,loc_2411] diff --git a/data/src/scripts/areas/area_lostcity/scripts/fairy_queen.rs2 b/data/src/scripts/areas/area_lostcity/scripts/fairy_queen.rs2 index 1d61a22c4..c062817c6 100644 --- a/data/src/scripts/areas/area_lostcity/scripts/fairy_queen.rs2 +++ b/data/src/scripts/areas/area_lostcity/scripts/fairy_queen.rs2 @@ -1,9 +1,9 @@ [opnpc1,fairy_queen] def_int $option = ~p_choice2("How do crops and such survive down here?", 1, "What's so good about this place?", 2); if($option = 1) { - ~chatplayer(quiz, "How do crops and such survive down here?|Surely they need a bit of sunlight?"); - ~chatnpc(neutral, "Clearly you come from a plane dependent on sunlight.|Down here, the plants grow in the aura of faerie."); + ~chatplayer("How do crops and such survive down here?|Surely they need a bit of sunlight?"); + ~chatnpc("Clearly you come from a plane dependent on sunlight.|Down here, the plants grow in the aura of faerie."); } else if($option = 2) { - ~chatplayer(neutral, "What's so good about this place?"); - ~chatnpc(neutral, "Zanaris is a meeting point of cultures.|Those from many worlds converge here to exchange knowledge and goods."); + ~chatplayer("What's so good about this place?"); + ~chatnpc("Zanaris is a meeting point of cultures.|Those from many worlds converge here to exchange knowledge and goods."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lostcity/scripts/irksol.rs2 b/data/src/scripts/areas/area_lostcity/scripts/irksol.rs2 index df15e9bc6..1989d8b12 100644 --- a/data/src/scripts/areas/area_lostcity/scripts/irksol.rs2 +++ b/data/src/scripts/areas/area_lostcity/scripts/irksol.rs2 @@ -1,11 +1,11 @@ [opnpc1,irksol] -~chatnpc(neutral, "Selling ruby rings! The best deals on rings in over twenty four hundred planes of existence!"); +~chatnpc("Selling ruby rings! The best deals on rings in over twenty four hundred planes of existence!"); def_int $option = ~p_choice2("I'm interested in these deals.", 1, "No thanks, just browsing.", 2); if($option = 1) { - ~chatplayer(neutral, "I'm interested in these deals."); - ~chatnpc(neutral, "Aha! A connoisseur! Check out these beauties!"); + ~chatplayer("I'm interested in these deals."); + ~chatnpc("Aha! A connoisseur! Check out these beauties!"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thanks, just browsing."); - ~chatnpc(neutral, "Fair enough."); + ~chatplayer("No thanks, just browsing."); + ~chatnpc("Fair enough."); } diff --git a/data/src/scripts/areas/area_lostcity/scripts/jakut.rs2 b/data/src/scripts/areas/area_lostcity/scripts/jakut.rs2 index 110433471..e2d64fe33 100644 --- a/data/src/scripts/areas/area_lostcity/scripts/jakut.rs2 +++ b/data/src/scripts/areas/area_lostcity/scripts/jakut.rs2 @@ -1,9 +1,9 @@ [opnpc1,jakut] -~chatnpc(neutral, "Dragon swords! Here, Dragon swords!|Straight from Frenaskrae!"); +~chatnpc("Dragon swords! Here, Dragon swords!|Straight from Frenaskrae!"); def_int $option = ~p_choice2("Yes please.", 1, "No thanks, I'm just browsing.", 2); if($option = 1) { - ~chatplayer(happy, "Yes please!"); + ~chatplayer("Yes please!"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thanks, I'm just browsing."); + ~chatplayer("No thanks, I'm just browsing."); } diff --git a/data/src/scripts/areas/area_lostcity/scripts/ladder_fairy.rs2 b/data/src/scripts/areas/area_lostcity/scripts/ladder_fairy.rs2 index 21e4bf07f..a0f1b7d62 100644 --- a/data/src/scripts/areas/area_lostcity/scripts/ladder_fairy.rs2 +++ b/data/src/scripts/areas/area_lostcity/scripts/ladder_fairy.rs2 @@ -9,14 +9,14 @@ while (npc_findnext = true) { } [label,ladder_fairy_talk] -~chatnpc(neutral, "This ladder will take you out of Zanaris.|It leads to the place known as Al Kharid in your realm.|Once passed you can not return this way."); -~chatnpc(neutral, "Before leaving make sure that you have fully sampled the delights of our marketplace."); +~chatnpc("This ladder will take you out of Zanaris.|It leads to the place known as Al Kharid in your realm.|Once passed you can not return this way."); +~chatnpc("Before leaving make sure that you have fully sampled the delights of our marketplace."); def_int $option = ~p_choice2("I think I'll stay down here a bit longer.", 1, "Yes, I'm ready to leave.", 2); if($option = 1) { - ~chatplayer(neutral, "I think I'll stay down here a bit longer."); - ~chatnpc(neutral, "As you wish."); + ~chatplayer("I think I'll stay down here a bit longer."); + ~chatnpc("As you wish."); } else if($option = 2) { - ~chatplayer(neutral, "Yes, I'm ready to leave."); + ~chatplayer("Yes, I'm ready to leave."); mes("You climb up the ladder."); p_telejump(0_50_49_60_35); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lostcity/scripts/lunderwin.rs2 b/data/src/scripts/areas/area_lostcity/scripts/lunderwin.rs2 index abf3c9936..de60d993a 100644 --- a/data/src/scripts/areas/area_lostcity/scripts/lunderwin.rs2 +++ b/data/src/scripts/areas/area_lostcity/scripts/lunderwin.rs2 @@ -1,10 +1,10 @@ [opnpc1,lunderwin] -~chatnpc(neutral, "Buying cabbage am I, not have such thing where I from. Will pay money much handsome for wondrous object, cabbage you called."); -~chatnpc(neutral, "Say I 100 gold coins each fair price to be giving yes?"); +~chatnpc("Buying cabbage am I, not have such thing where I from. Will pay money much handsome for wondrous object, cabbage you called."); +~chatnpc("Say I 100 gold coins each fair price to be giving yes?"); if(inv_total(inv, cabbage) > 0) { switch_int(~p_choice2("Yes, I will sell you all my cabbages.", 1, "No, I will keep my cabbbages.", 2)) { case 1: - ~chatplayer(neutral, "Yes, I'll sell you all my cabbages."); + ~chatplayer("Yes, I'll sell you all my cabbages."); if_close; while(inv_total(inv, cabbage) > 0) { // RSC sells 1 at a time with delay, OSRS technically does as well but with no delay, we'll copy RSC here @@ -13,10 +13,10 @@ if(inv_total(inv, cabbage) > 0) { inv_del(inv, cabbage, 1); inv_add(inv, coins, 100); } - ~chatnpc(neutral, "Business good doing with you! Please, again come, buying always."); - case 2: ~chatplayer(neutral, "No, I will keep my cabbbages."); + ~chatnpc("Business good doing with you! Please, again come, buying always."); + case 2: ~chatplayer("No, I will keep my cabbbages."); } return; } -~chatplayer(sad, "Alas, I have no cabbages either..."); -~chatnpc(sad, "Pity be that, I want badly do."); \ No newline at end of file +~chatplayer("Alas, I have no cabbages either..."); +~chatnpc("Pity be that, I want badly do."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/archer_zanaris.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/archer_zanaris.rs2 index bb43a160d..e364891de 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/archer_zanaris.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/archer_zanaris.rs2 @@ -1,25 +1,25 @@ [opnpc1,archer_zanaris] if(map_members = false) { // From RS3 - ~chatplayer(quiz, "Hey there, are you camping?"); - ~chatnpc(neutral, "Not just camping; we're adventurers out on a mission,|sorry I can't share the details with you!"); + ~chatplayer("Hey there, are you camping?"); + ~chatnpc("Not just camping; we're adventurers out on a mission,|sorry I can't share the details with you!"); return; } switch_int (%zanaris_progress) { case ^zanaris_not_started: - ~chatplayer(quiz, "Why are you guys hanging around here?"); - ~chatnpc(angry, "(ahem)...'Guys'?"); - ~chatplayer(neutral, "Uh... yeah, sorry about that.|Why are you all standing around out here?"); - ~chatnpc(neutral, "Well, that's really none of your business."); + ~chatplayer("Why are you guys hanging around here?"); + ~chatnpc("(ahem)...'Guys'?"); + ~chatplayer("Uh... yeah, sorry about that.|Why are you all standing around out here?"); + ~chatnpc("Well, that's really none of your business."); return; case ^zanaris_started: - ~chatplayer(quiz, "So I hear theres a leprechaun around here who can show me the way to Zanaris?"); - ~chatnpc(shock, "...W-what? How did you..?"); - ~chatnpc(angry, "No. You're wrong. Now go away."); + ~chatplayer("So I hear theres a leprechaun around here who can show me the way to Zanaris?"); + ~chatnpc("...W-what? How did you..?"); + ~chatnpc("No. You're wrong. Now go away."); case default: - ~chatplayer(quiz, "So you didn't find the entrance to Zanaris yet, huh?"); - ~chatnpc(angry, "Don't tell me a novice like YOU has found it!"); - ~chatplayer(neutral, "Yep. Found it REALLY easily too."); - ~chatnpc(confused, "...I cannot believe that someone like YOU could find the portal where experienced adventurers such as ourselves could not."); - ~chatplayer(happy, "Believe what you want. Enjoy your little camp fire."); + ~chatplayer("So you didn't find the entrance to Zanaris yet, huh?"); + ~chatnpc("Don't tell me a novice like YOU has found it!"); + ~chatplayer("Yep. Found it REALLY easily too."); + ~chatnpc("...I cannot believe that someone like YOU could find the portal where experienced adventurers such as ourselves could not."); + ~chatplayer("Believe what you want. Enjoy your little camp fire."); return; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/bob.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/bob.rs2 index df4dd1e57..623c0bdef 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/bob.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/bob.rs2 @@ -1,18 +1,18 @@ [opnpc1,bob] // This line isn't in OSRS (or launch? based on https://youtu.be/UJ94TeagEfE?si=MEO3k-HBgsEuKE2D&t=48), but exists in RSC // although RSC also wouldn't have the option for axe repairs -~chatnpc(quiz, "Hello. How can I help you?"); +~chatnpc("Hello. How can I help you?"); def_int $option = ~p_choice3("Give me a quest!", 1, "Have you anything to sell?", 2, "Can you repair my items for me?", 3); if($option = 1) { - ~chatplayer(happy, "Give me a quest!"); - ~chatnpc(angry, "Get yer own!"); + ~chatplayer("Give me a quest!"); + ~chatnpc("Get yer own!"); } else if($option = 2) { - ~chatplayer(quiz, "Have you anything to sell?"); - ~chatnpc(happy, "Yes! I buy and sell axes! Take your pick (or axe)!"); + ~chatplayer("Have you anything to sell?"); + ~chatnpc("Yes! I buy and sell axes! Take your pick (or axe)!"); ~openshop_activenpc; } else if($option = 3) { - ~chatplayer(sad, "Can you repair my items for me?"); - ~chatnpc(shock, "Of course I'll repair it, though the materials may cost you. Just hand me the item and I'll have a look."); + ~chatplayer("Can you repair my items for me?"); + ~chatnpc("Of course I'll repair it, though the materials may cost you. Just hand me the item and I'll have a look."); } @@ -23,13 +23,13 @@ def_int $cost = oc_cost($item); if (oc_param($item, to_be_fixed_by_bob) = ^true) { // https://youtu.be/bdvD8uxlEAs?list=PLn23LiLYLb1aYjPgadhUQGX61AeHWaT4y if (inv_total(inv, coins) < $cost) { - ~chatnpc(sad, "I'll need gp to repair that."); // osrs + ~chatnpc("I'll need gp to repair that."); // osrs return; } if ($cost > 0) { - ~chatnpc(neutral, "Quite badly damaged, but easy to repair. Would you like me to repair it for gp?"); + ~chatnpc("Quite badly damaged, but easy to repair. Would you like me to repair it for gp?"); } else { - ~chatnpc(neutral, "Quite badly damaged, but easy to repair. Would you like me to repair it for free?"); + ~chatnpc("Quite badly damaged, but easy to repair. Would you like me to repair it for free?"); } def_int $option = ~p_choice2("Yes, please.", 1, "No, thank you.", 2); @@ -47,5 +47,5 @@ if (oc_param($item, to_be_fixed_by_bob) = ^true) { return; } } else { - ~chatnpc(neutral, "Sorry friend, but I can't do anything with that."); // osrs + ~chatnpc("Sorry friend, but I can't do anything with that."); // osrs } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/cook.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/cook.rs2 index 17ccdec8e..3bfc9a935 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/cook.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/cook.rs2 @@ -1,26 +1,26 @@ [opnpc1,cook] if(%cook_progress = 0) { - ~chatnpc("sad", "What am I to do?"); + ~chatnpc("What am I to do?"); @cooks_assistant_start; } else if(%cook_progress = 1) { @cooks_assistant_inprogress; } else if(%cook_progress = ^cook_complete) { - ~chatnpc("happy", "How is the adventuring going, my friend?"); + ~chatnpc("How is the adventuring going, my friend?"); def_int $option = ~p_choice4("I am getting strong and mighty.", 1, "I keep on dying.", 2, "Nice hat!", 3, "Can I use your range?", 4); if($option = 1) { - ~chatplayer("happy", "I am getting strong and mighty."); - ~chatnpc("happy", "Glad to hear it."); + ~chatplayer("I am getting strong and mighty."); + ~chatnpc("Glad to hear it."); } else if($option = 2) { - ~chatplayer("sad", "I keep on dying."); - ~chatnpc("happy", "Ah well, at least you keep coming back to life!"); + ~chatplayer("I keep on dying."); + ~chatnpc("Ah well, at least you keep coming back to life!"); } else if($option = 3) { - ~chatplayer("happy", "Nice hat!"); - ~chatnpc("sad", "Err thank you. It's a pretty ordinary cooks hat really."); + ~chatplayer("Nice hat!"); + ~chatnpc("Err thank you. It's a pretty ordinary cooks hat really."); } else if($option = 4) { - ~chatplayer("neutral", "Can I use your range?"); - ~chatnpc("happy", "Go ahead - it's a very good range.|It's easier to use than most other ranges."); + ~chatplayer("Can I use your range?"); + ~chatnpc("Go ahead - it's a very good range.|It's easier to use than most other ranges."); } } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/duke_horacio.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/duke_horacio.rs2 index 44a3face0..aa0ea58a0 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/duke_horacio.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/duke_horacio.rs2 @@ -1,5 +1,5 @@ [opnpc1,duke_horacio] -~chatnpc(neutral, "Greetings. Welcome to my castle."); +~chatnpc("Greetings. Welcome to my castle."); if (%dragon_shield = ^quest_dragon_knows_about_shield & inv_total(inv, dragonfire_shield) < 1 & inv_total(worn, dragonfire_shield) < 1) { @multi3("I seek a shield that will protect me from the dragon's breath.", duke_horacio_shield, "Have you any quests for me?", ~duke_handle_rune_mysteries, "Where can I find money?", duke_horacio_money); @@ -16,20 +16,20 @@ else if (%runemysteries_progress = ^runemysteries_complete) return(duke_rune_mys else return (duke_rune_mysteries_in_progress); [label,duke_horacio_money] -~chatplayer(neutral, "Where can I find money?"); -~chatnpc(neutral, "I've heard that the blacksmiths are prosperous amongst the peasantry. Maybe you could try your hand at that?"); +~chatplayer("Where can I find money?"); +~chatnpc("I've heard that the blacksmiths are prosperous amongst the peasantry. Maybe you could try your hand at that?"); [label,duke_rune_mysteries_start] -~chatplayer(quiz, "Have you any quests for me?"); -~chatnpc(neutral, "Well, it's not really a quest but I recently discovered this strange talisman."); -~chatnpc(neutral, "It seems to be a mystical and I have never seen anything like it before. Would you take it to the head wizard at"); -~chatnpc(neutral, "the Wizards' Tower for me? It's just south-west of here and should not take you very long at all. I would be awfully grateful."); +~chatplayer("Have you any quests for me?"); +~chatnpc("Well, it's not really a quest but I recently discovered this strange talisman."); +~chatnpc("It seems to be a mystical and I have never seen anything like it before. Would you take it to the head wizard at"); +~chatnpc("the Wizards' Tower for me? It's just south-west of here and should not take you very long at all. I would be awfully grateful."); def_int $option = ~p_choice2("Sure, no problem.", 1, "Not right now.", 2); if ($option = 1) { - ~chatplayer(neutral, "Sure, no problem."); + ~chatplayer("Sure, no problem."); %runemysteries_progress = 1; ~send_quest_progress(questlist:runemysteries, %runemysteries_progress, 5); - ~chatnpc(neutral, "Thank you very much, stranger. I am sure the head wizard will reward you for such an interesting find."); + ~chatnpc("Thank you very much, stranger. I am sure the head wizard will reward you for such an interesting find."); if(inv_freespace(inv) = 0) { ~mesbox("The Duke tries to hand you the talisman, but you don't have enough room to take it."); } else { @@ -38,35 +38,35 @@ if ($option = 1) { inv_add(inv, air_talisman, 1); } } else if($option = 2) { - ~chatplayer(neutral, "Not right now."); - ~chatnpc(neutral, "As you wish. Hopefully I can find someone else to help."); + ~chatplayer("Not right now."); + ~chatnpc("As you wish. Hopefully I can find someone else to help."); } [label,duke_rune_mysteries_in_progress] if(~obj_gettotal(air_talisman) = 0) { - ~chatnpc(neutral, "Did you speak to the head wizard for me yet, adventurer?"); - ~chatplayer(neutral, "No, I lost that talisman that you gave me."); + ~chatnpc("Did you speak to the head wizard for me yet, adventurer?"); + ~chatplayer("No, I lost that talisman that you gave me."); if(inv_freespace(inv) = 0) { ~objbox(air_talisman, "The Duke tries to hand you a talisman, but you don't have enough room to take it."); } else { - ~chatnpc(neutral, "Ah, that would explain it. One of my servants found this outside, and it seemed too much of a coincidence that more than one strange."); + ~chatnpc("Ah, that would explain it. One of my servants found this outside, and it seemed too much of a coincidence that more than one strange."); inv_add(inv, air_talisman, 1); - ~chatnpc(neutral, "object would appear on my land in such a short period of time. Please take this to the head wizard at the Wizards' Tower, south-west of here, and don't lose it this time."); + ~chatnpc("object would appear on my land in such a short period of time. Please take this to the head wizard at the Wizards' Tower, south-west of here, and don't lose it this time."); } } else { - ~chatnpc(neutral, "The only task remotely approaching a quest is the delivery of that talisman I gave you to the head wizard of the Wizards' Tower,"); - ~chatnpc(neutral, "south-west of here. I suggest you deliver it to him as soon as possible. I have the oddest feeling that it is important..."); + ~chatnpc("The only task remotely approaching a quest is the delivery of that talisman I gave you to the head wizard of the Wizards' Tower,"); + ~chatnpc("south-west of here. I suggest you deliver it to him as soon as possible. I have the oddest feeling that it is important..."); } [label,duke_rune_mysteries_complete] -~chatplayer(neutral, "Have you any quests for me?"); -//~chatnpc(neutral, "The only job I had was the delivery of that talisman, so I'm afraid not."); -~chatnpc(neutral, "All is well for me."); // rsc +~chatplayer("Have you any quests for me?"); +//~chatnpc("The only job I had was the delivery of that talisman, so I'm afraid not."); +~chatnpc("All is well for me."); // rsc // dragon slayer [label,duke_horacio_shield] // Dialogue is taken from rsc -~chatplayer(neutral, "I seek a shield that will protect me from the dragon's breath."); -~chatnpc(quiz, "A knight going on a dragon quest, hmm?|A most worthy cause.|Guard this well my friend."); +~chatplayer("I seek a shield that will protect me from the dragon's breath."); +~chatnpc("A knight going on a dragon quest, hmm?|A most worthy cause.|Guard this well my friend."); inv_add(inv, dragonfire_shield, 1); ~objboxt(dragonfire_shield, "The Duke hands you a shield."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/father_aereck.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/father_aereck.rs2 index c99340a52..ba8c3a366 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/father_aereck.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/father_aereck.rs2 @@ -6,79 +6,79 @@ switch_int(%priest_progress) { } [label,father_aereck_default] -~chatnpc(happy, "Welcome to the church of holy Saradomin."); +~chatnpc("Welcome to the church of holy Saradomin."); switch_int (~p_choice3("Who's Saradomin?", 1, "Nice place you've got here.", 2, "I'm looking for a quest.", 3)) { case 1: - ~chatplayer(quiz, "Who's Saradomin?"); - ~chatnpc(shock, "Surely you have heard of the god, Saradomin?"); - ~chatnpc(neutral, "He who creates the forces of goodness and purity in this world? I cannot believe your ignorance!"); - ~chatnpc(neutral, "This is the God with more followers than any other!.. At least in this part of the world."); - ~chatnpc(neutral, "He who created this world along with his brothers Guthix and Zamorak?"); + ~chatplayer("Who's Saradomin?"); + ~chatnpc("Surely you have heard of the god, Saradomin?"); + ~chatnpc("He who creates the forces of goodness and purity in this world? I cannot believe your ignorance!"); + ~chatnpc("This is the God with more followers than any other!.. At least in this part of the world."); + ~chatnpc("He who created this world along with his brothers Guthix and Zamorak?"); switch_int (~p_choice2("Oh, THAT Saradomin...", 1, "Oh, sorry. I'm not from this world.", 2)) { case 1: - ~chatplayer(neutral, "Oh, THAT Saradomin..."); - ~chatnpc(confused, "There... is only one Saradomin..."); + ~chatplayer("Oh, THAT Saradomin..."); + ~chatnpc("There... is only one Saradomin..."); case 2: - ~chatplayer(neutral, "Oh, sorry. I'm not from this world."); - ~chatnpc(shock, "..."); - ~chatnpc(neutral, "That's... strange."); - ~chatnpc(neutral, "I thought things not from this world were all slime and tenticles."); + ~chatplayer("Oh, sorry. I'm not from this world."); + ~chatnpc("..."); + ~chatnpc("That's... strange."); + ~chatnpc("I thought things not from this world were all slime and tenticles."); switch_int (~p_choice2("You don't understand. This is a computer game!", 1, "I am - do you like my disguise?", 2)) { case 1: - ~chatplayer(neutral, "You don't understand. This is a computer game!"); - ~chatnpc(confused, "I... beg your pardon?"); - ~chatplayer(neutral, "Never mind."); + ~chatplayer("You don't understand. This is a computer game!"); + ~chatnpc("I... beg your pardon?"); + ~chatplayer("Never mind."); case 2: - ~chatplayer(happy, "I am - do you like my disguise?"); - ~chatnpc(shock, "Aargh! Begone foul creature from another dimension!"); - ~chatplayer(happy, "Ok, ok, I was only joking..."); + ~chatplayer("I am - do you like my disguise?"); + ~chatnpc("Aargh! Begone foul creature from another dimension!"); + ~chatplayer("Ok, ok, I was only joking..."); } } case 2: - ~chatplayer(happy, "Nice place you've got here."); - ~chatnpc(happy, "It is, isn't it?|It was built over 230 years ago."); + ~chatplayer("Nice place you've got here."); + ~chatnpc("It is, isn't it?|It was built over 230 years ago."); case 3: - ~chatplayer(happy, "I'm looking for a quest."); + ~chatplayer("I'm looking for a quest."); switch_int(%priest_progress) { case 0: - ~chatnpc(happy, "That's lucky, I need someone to do a quest for me."); + ~chatnpc("That's lucky, I need someone to do a quest for me."); %priest_progress = ^priest_started; ~send_quest_progress(questlist:priest, %priest_progress, ^priest_complete); - ~chatplayer(happy, "Ok, let me help then."); - ~chatnpc(happy, "Thank you. The problem is, there is a ghost in the church graveyard: I would like you to get rid of it."); - ~chatnpc(happy, "If you need any help, my friend Father Urhney is an expert on ghosts."); - ~chatnpc(happy, "I believe he is currently living as a hermit. He has a little shack somewhere in the swamps south of here. I'm sure if you told him that I sent you he'd be willing to help."); - ~chatnpc(happy, "My name is father Aereck by the way.|Pleased to meet you."); - ~chatplayer(happy, "Likewise."); - ~chatnpc(neutral, "Take care travelling through the swamps.|I have heard they can be quite dangerous."); - ~chatplayer(happy, "I will, thanks."); - case ^priest_complete: ~chatnpc(happy, "Sorry, I only had the one quest."); + ~chatplayer("Ok, let me help then."); + ~chatnpc("Thank you. The problem is, there is a ghost in the church graveyard: I would like you to get rid of it."); + ~chatnpc("If you need any help, my friend Father Urhney is an expert on ghosts."); + ~chatnpc("I believe he is currently living as a hermit. He has a little shack somewhere in the swamps south of here. I'm sure if you told him that I sent you he'd be willing to help."); + ~chatnpc("My name is father Aereck by the way.|Pleased to meet you."); + ~chatplayer("Likewise."); + ~chatnpc("Take care travelling through the swamps.|I have heard they can be quite dangerous."); + ~chatplayer("I will, thanks."); + case ^priest_complete: ~chatnpc("Sorry, I only had the one quest."); } } [label,father_aereck_priest_inprogress] -~chatnpc(neutral, "Have you got rid of the ghost yet?"); +~chatnpc("Have you got rid of the ghost yet?"); switch_int (%priest_progress) { case ^priest_started: - ~chatplayer(sad, "I can't find father Urhney at the moment."); - ~chatnpc(happy, "Well, to get to the swamp he is in you need to go round the back of the castle. The swamp is on the otherside of the fence to the south."); - ~chatnpc(happy, "You'll have to go through the wood to the west to get round the fence. Then you'll have to go right into the eastern depths of the swamp."); + ~chatplayer("I can't find father Urhney at the moment."); + ~chatnpc("Well, to get to the swamp he is in you need to go round the back of the castle. The swamp is on the otherside of the fence to the south."); + ~chatnpc("You'll have to go through the wood to the west to get round the fence. Then you'll have to go right into the eastern depths of the swamp."); case ^priest_spoken_urhney: - ~chatplayer(neutral, "I had a talk with Father Urhney. He has given me this funny amulet to talk to the ghost with."); - ~chatnpc(confused, "I always wondered what that amulet was... Well, I hope it's useful. Tell me when you get rid of the ghost!"); + ~chatplayer("I had a talk with Father Urhney. He has given me this funny amulet to talk to the ghost with."); + ~chatnpc("I always wondered what that amulet was... Well, I hope it's useful. Tell me when you get rid of the ghost!"); case ^priest_spoken_ghost: - ~chatplayer(neutral, "I've found out that the ghost's corpse has lost its skull. If I can find the skull the ghost will go."); - ~chatnpc(neutral, "That WOULD explain it."); - ~chatnpc(neutral, "Hmmmmm. Well, I haven't seen any skulls."); - ~chatplayer(confused, "Yes, I think a warlock has stolen it."); - ~chatnpc(angry, "I hate warlocks."); - ~chatnpc(happy, "Ah well, good luck!"); + ~chatplayer("I've found out that the ghost's corpse has lost its skull. If I can find the skull the ghost will go."); + ~chatnpc("That WOULD explain it."); + ~chatnpc("Hmmmmm. Well, I haven't seen any skulls."); + ~chatplayer("Yes, I think a warlock has stolen it."); + ~chatnpc("I hate warlocks."); + ~chatnpc("Ah well, good luck!"); case ^priest_obtained_skull: if(inv_total(inv, ghost_skull) = 0) { // this only checks the player inv - ~chatplayer(sad, "Well, I found the ghost's skull but then lost it."); - ~chatnpc(neutral, "Don't worry, I'm sure you'll find it again."); + ~chatplayer("Well, I found the ghost's skull but then lost it."); + ~chatnpc("Don't worry, I'm sure you'll find it again."); return; } - ~chatplayer(happy, "I've finally found the ghost's skull!"); - ~chatnpc(happy, "Great! Put it in the ghost's coffin and see what happens!"); + ~chatplayer("I've finally found the ghost's skull!"); + ~chatnpc("Great! Put it in the ghost's coffin and see what happens!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/father_urhney.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/father_urhney.rs2 index f70e04f95..d75e668ce 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/father_urhney.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/father_urhney.rs2 @@ -1,5 +1,5 @@ [opnpc1,father_urhney] -~chatnpc(angry, "Go away! I'm meditating!"); +~chatnpc("Go away! I'm meditating!"); if (%priest_progress = ^priest_started) { @multi3("Well, that's friendly.", father_urhney_well_thats_friendly, "Father Aereck sent me to talk to you.", father_urhney_priest_father_aereck_sent_me, "I've come to repossess your house.", father_urhney_repossess_house); } else if (%priest_progress >= ^priest_spoken_urhney & ~obj_gettotal(amulet_of_ghostspeak) = 0) { @@ -9,57 +9,57 @@ if (%priest_progress = ^priest_started) { } [label,father_urhney_well_thats_friendly] -~chatplayer(neutral, "Well, that's friendly."); -~chatnpc(angry, "I SAID go AWAY."); -~chatplayer(neutral, "Okay, okay..."); +~chatplayer("Well, that's friendly."); +~chatnpc("I SAID go AWAY."); +~chatplayer("Okay, okay..."); [label,father_urhney_repossess_house] -~chatplayer(neutral, "I've come to repossess your house."); -~chatnpc(shock, "Under what grounds???"); +~chatplayer("I've come to repossess your house."); +~chatnpc("Under what grounds???"); def_int $option = ~p_choice2("Repeated failure on mortgage payments.", 1, "I don't know, I just wanted this house.", 2); if ($option = 1) { - ~chatplayer(neutral, "Repeated failure on mortgage payments."); - ~chatnpc(angry, "What?"); - ~chatnpc(angry, "But... I don't have a mortgage!|I built this house myself!"); - ~chatplayer(neutral, "Sorry. I must have got the wrong address.|All the houses look the same around here."); + ~chatplayer("Repeated failure on mortgage payments."); + ~chatnpc("What?"); + ~chatnpc("But... I don't have a mortgage!|I built this house myself!"); + ~chatplayer("Sorry. I must have got the wrong address.|All the houses look the same around here."); } else if ($option = 2) { - ~chatplayer(sad, "I don't know. I just wanted this house..."); - ~chatnpc(angry, "Oh... go away and stop wasting my time!"); + ~chatplayer("I don't know. I just wanted this house..."); + ~chatnpc("Oh... go away and stop wasting my time!"); } [label,father_urhney_priest_father_aereck_sent_me] -~chatplayer(neutral, "Father Aereck sent me to talk to you."); -~chatnpc(angry, "I suppose I'd better talk to you then.|What problems has he got himself into this time?"); +~chatplayer("Father Aereck sent me to talk to you."); +~chatnpc("I suppose I'd better talk to you then.|What problems has he got himself into this time?"); def_int $option = ~p_choice2("He's got a ghost haunting his graveyard.", 1,"You mean he gets himself into lots of problems?", 2); if ($option = 1) { @father_urhney_priest_hes_got_a_ghost; } else if ($option = 2) { - ~chatplayer(quiz, "You mean he gets himself into lots of problems?"); - ~chatnpc(neutral, "Yeah. For example, when we were trainee priests|he kept on getting stuck up bell ropes."); - ~chatnpc(angry, "Anyway. I don't have time for chitchat.|What's his problem THIS time?"); + ~chatplayer("You mean he gets himself into lots of problems?"); + ~chatnpc("Yeah. For example, when we were trainee priests|he kept on getting stuck up bell ropes."); + ~chatnpc("Anyway. I don't have time for chitchat.|What's his problem THIS time?"); @father_urhney_priest_hes_got_a_ghost; } [label,father_urhney_priest_hes_got_a_ghost] -~chatplayer(neutral, "He's got a ghost haunting his graveyard."); -~chatnpc(angry, "Oh, the silly fool."); -~chatnpc(angry, "I leave town for just five months,|and ALREADY he can't manage."); -~chatnpc(sad, "(sigh)"); -~chatnpc(angry, "Well, I can't go back and exorcise it.|I vowed not to leave this place.|Until I had done a full two years of prayer and meditiation."); -~chatnpc(neutral, "Tell you what I can do though;|take this amulet."); +~chatplayer("He's got a ghost haunting his graveyard."); +~chatnpc("Oh, the silly fool."); +~chatnpc("I leave town for just five months,|and ALREADY he can't manage."); +~chatnpc("(sigh)"); +~chatnpc("Well, I can't go back and exorcise it.|I vowed not to leave this place.|Until I had done a full two years of prayer and meditiation."); +~chatnpc("Tell you what I can do though;|take this amulet."); %priest_progress = ^priest_spoken_urhney; inv_add(inv, amulet_of_ghostspeak, 1); ~mesbox("Father Urhney hands you an amulet."); -~chatnpc(neutral, "It is an Amulet of Ghostspeak."); -~chatnpc(neutral, "So called, because when you wear it you can speak to ghosts. A lot of ghosts are doomed to be ghosts because they have left some important task uncompleted."); -~chatnpc(neutral, "Maybe if you know what this task is,|you can get rid of the ghost.|I'm not making any guarantees mind you,|but it is the best I can do right now."); -~chatplayer(neutral, "Thank you. I'll give it a try!"); +~chatnpc("It is an Amulet of Ghostspeak."); +~chatnpc("So called, because when you wear it you can speak to ghosts. A lot of ghosts are doomed to be ghosts because they have left some important task uncompleted."); +~chatnpc("Maybe if you know what this task is,|you can get rid of the ghost.|I'm not making any guarantees mind you,|but it is the best I can do right now."); +~chatplayer("Thank you. I'll give it a try!"); [label,father_urhney_priest_lost_amulet] -~chatplayer(happy, "I've lost the amulet."); +~chatplayer("I've lost the amulet."); ~mesbox("Father Urhney sighs."); -~chatnpc(angry, "How careless can you get?|Those things aren't easy to come by you know!|It's a good job I've got a spare."); +~chatnpc("How careless can you get?|Those things aren't easy to come by you know!|It's a good job I've got a spare."); inv_add(inv, amulet_of_ghostspeak, 1); ~mesbox("Father Urhney hands you an amulet."); -~chatnpc(angry, "Be more careful this time."); -~chatplayer(neutral, "Okay, I'll try to be."); \ No newline at end of file +~chatnpc("Be more careful this time."); +~chatplayer("Okay, I'll try to be."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/fred_the_farmer.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/fred_the_farmer.rs2 index df954ebd6..f5425256e 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/fred_the_farmer.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/fred_the_farmer.rs2 @@ -8,13 +8,13 @@ if(%sheep_progress = ^sheep_not_started) { } [label,fred_start] -~chatnpc(angry, "What are you doing on my land? You're not the one keeps leaving all my gates open and letting out all my sheep?"); +~chatnpc("What are you doing on my land? You're not the one keeps leaving all my gates open and letting out all my sheep?"); def_int $option = ~p_choice3("I'm looking for a quest.", 1, "I'm looking for something to kill.", 2, "I'm lost.", 3); if($option = 1) { - ~chatplayer(neutral, "I'm looking for a quest."); - ~chatnpc(neutral, "You're after a quest, you say? Actually I could do with a bit of help."); - ~chatnpc(neutral, "My sheep are getting mighty woolly. I'd be much obliged if you could shear them. And while you're at it spin the wool for me too."); - ~chatnpc(happy, "Yes, that's it. Bring me 20 balls of wool. And I'm sure I could sort out some sort of payment. Of course, there's the small matter of The Thing."); + ~chatplayer("I'm looking for a quest."); + ~chatnpc("You're after a quest, you say? Actually I could do with a bit of help."); + ~chatnpc("My sheep are getting mighty woolly. I'd be much obliged if you could shear them. And while you're at it spin the wool for me too."); + ~chatnpc("Yes, that's it. Bring me 20 balls of wool. And I'm sure I could sort out some sort of payment. Of course, there's the small matter of The Thing."); @multi3("Yes okay. I can do that.", fred_yes_okay, "That doesn't sound a very exciting quest.", fred_not_exciting, "What do you mean, The Thing?", fred_the_thing); } else if($option = 2) { @fred_something_to_kill; @@ -23,46 +23,46 @@ if($option = 1) { } [label,fred_something_to_kill] -~chatplayer(happy, "I'm looking for something to kill."); -~chatnpc(angry, "What, on my land? Leave my livestock alone you scoundrel!"); +~chatplayer("I'm looking for something to kill."); +~chatnpc("What, on my land? Leave my livestock alone you scoundrel!"); [label,fred_im_lost] -~chatplayer(sad, "I'm lost."); -~chatnpc(confused, "How can you be lost? Just follow the road east and south. You'll end up in Lumbridge fairly quickly."); +~chatplayer("I'm lost."); +~chatnpc("How can you be lost? Just follow the road east and south. You'll end up in Lumbridge fairly quickly."); [label,fred_not_exciting] -~chatplayer(neutral, "That doesn't sound a very exciting quest."); -~chatnpc(default, "Well what do you expect if you ask a farmer for a quest? Now are you going to help me or not?"); +~chatplayer("That doesn't sound a very exciting quest."); +~chatnpc("Well what do you expect if you ask a farmer for a quest? Now are you going to help me or not?"); @multi2("Yes okay. I can do that.", fred_yes_okay, "No, I'll give it a miss.", fred_no_miss); [label,fred_the_thing] -~chatplayer(quiz, "What do you mean, The Thing?"); -~chatnpc(shifty, "I wouldn't worry about it. Something ate all the previous shearers. They probably got unlucky. So are you going to help me?"); +~chatplayer("What do you mean, The Thing?"); +~chatnpc("I wouldn't worry about it. Something ate all the previous shearers. They probably got unlucky. So are you going to help me?"); @multi2("Yes okay. I can do that.", fred_yes_okay, "Erm, I'm a bit worried about this thing.", fred_worried_thing); [label,fred_no_miss] -~chatplayer(neutral, "No, I'll give it a miss."); +~chatplayer("No, I'll give it a miss."); [label,fred_worried_thing] -~chatplayer(confused, "Erm, I'm a bit worried about this thing."); -~chatnpc(shifty, "I'm sure it's nothing to worry about. It's possible the other shearers aren't dead at all. And are just hiding in the woods or something."); -~chatplayer(neutral, "I'm not convinced."); +~chatplayer("Erm, I'm a bit worried about this thing."); +~chatnpc("I'm sure it's nothing to worry about. It's possible the other shearers aren't dead at all. And are just hiding in the woods or something."); +~chatplayer("I'm not convinced."); [label,fred_yes_okay] -~chatplayer(happy, "Yes okay. I can do that."); -~chatnpc(neutral, "Ok I'll see you when you have some wool."); +~chatplayer("Yes okay. I can do that."); +~chatnpc("Ok I'll see you when you have some wool."); %sheep_progress = ^sheep_started; ~send_quest_progress_colour(questlist:sheep, %sheep_progress, ^sheep_started); [label,fred_progressed] -~chatnpc(neutral, "How are you doing getting those balls of wool?"); +~chatnpc("How are you doing getting those balls of wool?"); if(inv_total(inv, ball_of_wool) > 0) { - ~chatplayer(happy, "I have some."); - ~chatnpc(neutral, "Give 'em here then."); + ~chatplayer("I have some."); + ~chatnpc("Give 'em here then."); @fred_give_wool; } else { - ~chatplayer(happy, "I haven't got any at the moment."); - ~chatnpc(happy, "Ah well at least you haven't been eaten."); + ~chatplayer("I haven't got any at the moment."); + ~chatnpc("Ah well at least you haven't been eaten."); } [label,fred_give_wool] @@ -79,15 +79,15 @@ if(inv_total(inv, ball_of_wool) > 0 & %sheep_progress ! ^sheep_last_wool) { [label,fred_end_giving_wool] if(%sheep_progress = ^sheep_last_wool & inv_total(inv, ball_of_wool) > 0) { - ~chatplayer(happy, "I have your last ball of wool."); - ~chatnpc(sad, "I guess I'd better pay you then."); + ~chatplayer("I have your last ball of wool."); + ~chatnpc("I guess I'd better pay you then."); queue(sheep_complete, 0); return; } -~chatplayer(happy, "That's all I've got so far."); -~chatnpc(neutral, "I need more before I can pay you."); -~chatplayer(neutral, "Ok, I'll work on it."); +~chatplayer("That's all I've got so far."); +~chatnpc("I need more before I can pay you."); +~chatplayer("Ok, I'll work on it."); [label,fred_post_quest] -~chatnpc(angry, "What are you doing on my land?"); +~chatnpc("What are you doing on my land?"); @multi2("I'm looking for something to kill.", fred_something_to_kill, "I'm lost.", fred_im_lost); \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/hans.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/hans.rs2 index a147202ad..ab2a42972 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/hans.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/hans.rs2 @@ -4,25 +4,25 @@ if(inv_total(inv, trail_clue_easy_simple_exp005) = 1) { @trail_hans_exp001; } -~chatnpc(neutral, "Hello. What are you doing here?"); +~chatnpc("Hello. What are you doing here?"); def_int $option = ~p_choice3("I'm looking for whoever is in charge of this place.", 1, "I have come to kill everyone in this castle.", 2, "I don't know. I'm lost. Where am i?", 3); if ($option = 1) { - ~chatplayer(neutral, "I'm looking for whoever is in charge of this place."); - ~chatnpc(neutral, "Sorry, I don't know where he is right now."); + ~chatplayer("I'm looking for whoever is in charge of this place."); + ~chatnpc("Sorry, I don't know where he is right now."); } else if ($option = 2) { - ~chatplayer(angry, "I have come to kill everyone in this castle."); + ~chatplayer("I have come to kill everyone in this castle."); npc_say("HELP HELP!"); npc_setmode(playerescape); if_close; world_delay(2); npc_setmode(null); } else if ($option = 3) { - ~chatplayer(confused, "I don't know. I'm lost. Where am I?"); - ~chatnpc(neutral, "You are in Lumbridge Castle."); + ~chatplayer("I don't know. I'm lost. Where am I?"); + ~chatnpc("You are in Lumbridge Castle."); } [label,trail_hans_exp001] -~chatnpc(quiz, "Well done, you've solved the clue!"); +~chatnpc("Well done, you've solved the clue!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp007, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_lumbridge/scripts/monk_zanaris.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/monk_zanaris.rs2 index b05ed4b6b..21dd73006 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/monk_zanaris.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/monk_zanaris.rs2 @@ -1,19 +1,19 @@ [opnpc1,monk_zanaris] if(map_members = false) { // From RS3 - ~chatplayer(happy, "Top of the day to you!"); - ~chatnpc(neutral, "Yes, Saradomin has certainly blessed us today!"); + ~chatplayer("Top of the day to you!"); + ~chatnpc("Yes, Saradomin has certainly blessed us today!"); return; } switch_int (%zanaris_progress) { case ^zanaris_not_started: - ~chatplayer(quiz, "Why are all of you standing around here?"); - ~chatnpc(angry, "None of your business. Get lost."); + ~chatplayer("Why are all of you standing around here?"); + ~chatnpc("None of your business. Get lost."); return; case ^zanaris_started: - ~chatplayer(quiz, "Have you found the tree with the leprechaun yet?"); - ~chatnpc(confused, "No, we've looked for ages but haven't... Hey!|Wait a minute! How did you know about that?"); - ~chatplayer(happy, "Thanks for the information!"); - ~chatnpc(angry, "...You tricked me. I'm not talking to you anymore."); + ~chatplayer("Have you found the tree with the leprechaun yet?"); + ~chatnpc("No, we've looked for ages but haven't... Hey!|Wait a minute! How did you know about that?"); + ~chatplayer("Thanks for the information!"); + ~chatnpc("...You tricked me. I'm not talking to you anymore."); return; - case default: ~chatnpc(neutral, "I already told you. I'm not talking to you anymore."); + case default: ~chatnpc("I already told you. I'm not talking to you anymore."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/warrior_zanaris.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/warrior_zanaris.rs2 index 1ccf08029..8cdc71cd3 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/warrior_zanaris.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/warrior_zanaris.rs2 @@ -1,98 +1,98 @@ [opnpc1,warrior_zanaris] if(map_members = false) { // from RS3 - ~chatplayer(happy, "Greetings! You look like a warrior."); - ~chatnpc(neutral, "Greetings to you to and yes indeed, the warrior's path is the one I travel. Sorry I can't stay to chat, I'm on a mission with my companions and we must break camp to continue our quest."); + ~chatplayer("Greetings! You look like a warrior."); + ~chatnpc("Greetings to you to and yes indeed, the warrior's path is the one I travel. Sorry I can't stay to chat, I'm on a mission with my companions and we must break camp to continue our quest."); return; } switch_int (%zanaris_progress) { case ^zanaris_not_started: - ~chatnpc(neutral, "Hello there traveller."); + ~chatnpc("Hello there traveller."); @multi2("What are you camped here for?", warrior_camped_out, "Do you know any good adventures I can go on?", warrior_adventures); return; case ^zanaris_started: - ~chatplayer(quiz, "So let me get this straight: I need to search the trees around here for a leprechaun; and then when I find him, he will tell me where this 'Zanaris' is?"); + ~chatplayer("So let me get this straight: I need to search the trees around here for a leprechaun; and then when I find him, he will tell me where this 'Zanaris' is?"); // https://web.archive.org/web/20050520195439im_/http://www.runeweb.net/fireball/Lost%20City%20Images/LostCity1.PNG - ~chatnpc(confused, "What? How did you know that?|Uh... I mean, no, no you're very wrong.|Very wrong, and not right at all, and I|definitely didn't tell you about that at all."); + ~chatnpc("What? How did you know that?|Uh... I mean, no, no you're very wrong.|Very wrong, and not right at all, and I|definitely didn't tell you about that at all."); return; case ^zanaris_complete: - ~chatplayer(happy, "Hey, thanks for all the information. It REALLY helped me out in finding the lost city of Zanaris and all."); - ~chatnpc(sad, "Oh please don't say that anymore! If the rest of my party knew I'd helped you they'd probably throw me out and make me walk home by myself!"); - ~chatnpc(quiz, "So anyway, what have you found out? Where is the fabled Zanaris? Is it all the legends say it is?"); - ~chatplayer(happy, "You know.... I think I'll keep that to myself."); + ~chatplayer("Hey, thanks for all the information. It REALLY helped me out in finding the lost city of Zanaris and all."); + ~chatnpc("Oh please don't say that anymore! If the rest of my party knew I'd helped you they'd probably throw me out and make me walk home by myself!"); + ~chatnpc("So anyway, what have you found out? Where is the fabled Zanaris? Is it all the legends say it is?"); + ~chatplayer("You know.... I think I'll keep that to myself."); return; case default: - ~chatplayer(quiz, "Have you found anything yet?"); - ~chatnpc(happy, "We're still searching for Zanaris...GAH! I mean we're not doing anything here at all."); - ~chatplayer(sad, "I haven't found it yet either."); + ~chatplayer("Have you found anything yet?"); + ~chatnpc("We're still searching for Zanaris...GAH! I mean we're not doing anything here at all."); + ~chatplayer("I haven't found it yet either."); return; } [label,warrior_camped_out] -~chatplayer(quiz, "What are you camped here for?"); -~chatnpc(neutral, "We're looking for Zanaris...GAH! I mean we're not here for any particular reason at all."); +~chatplayer("What are you camped here for?"); +~chatnpc("We're looking for Zanaris...GAH! I mean we're not here for any particular reason at all."); @multi3("Who's Zanaris?", warrior_who_zanaris, "What's Zanaris?", warrior_what_zanaris, "What makes you think it's out here?", warrior_think_here); [label,warrior_who_zanaris] -~chatplayer(quiz, "Who's Zanaris?"); -~chatnpc(neutral, "Ahahahaha! Zanaris isn't a person! It's a magical hidden city filled with treasures and rich.. uh, nothing. It's nothing."); +~chatplayer("Who's Zanaris?"); +~chatnpc("Ahahahaha! Zanaris isn't a person! It's a magical hidden city filled with treasures and rich.. uh, nothing. It's nothing."); @multi2("If it's hidden how are you planning to find it?", warrior_if_hidden, "There's no such thing!", warrior_no_such_thing); [label,warrior_what_zanaris] -~chatplayer(quiz, "What's Zanaris?"); -~chatnpc(neutral, "I don't think we want other people competing with us to find it. Forget I said anything."); +~chatplayer("What's Zanaris?"); +~chatnpc("I don't think we want other people competing with us to find it. Forget I said anything."); def_int $option = ~p_choice2("Please tell me.", 1, "Oh well. Never mind.", 2); if($option = 1) { @warrior_please_tell; } else if($option = 2) { - ~chatplayer(neutral, "Oh well. Never mind."); + ~chatplayer("Oh well. Never mind."); } [label,warrior_think_here] -~chatplayer(quiz, "What makes you think it's out here?"); -~chatnpc(neutral, "Don't you know of the legends that tell of the magical city, hidden in the swam... Uh, no, you're right, we're wasting our time here."); +~chatplayer("What makes you think it's out here?"); +~chatnpc("Don't you know of the legends that tell of the magical city, hidden in the swam... Uh, no, you're right, we're wasting our time here."); @multi2("If it's hidden how are you planning to find it?", warrior_if_hidden, "There's no such thing!", warrior_no_such_thing); [label,warrior_if_hidden] -~chatplayer(quiz, "If it's hidden how are you planning to find it?"); -~chatnpc(neutral, "Well, we don't want to tell anyone else about that, because we don't want anyone else sharing in all that glory and treasure."); +~chatplayer("If it's hidden how are you planning to find it?"); +~chatnpc("Well, we don't want to tell anyone else about that, because we don't want anyone else sharing in all that glory and treasure."); def_int $option = ~p_choice2("Please tell me?", 1, "Looks like you don't know either.", 2); if($option = 1) { @warrior_please_tell; } else if($option = 2) { - ~chatplayer(confused, "Well, it looks to me like YOU don't know EITHER seeing as you're all just sat around here."); - ~chatnpc(angry, "Of course we know! We just haven't found which tree the stupid leprechaun's hiding in yet!"); - ~chatplayer(quiz, "Leprechaun?"); - ~chatnpc(angry, "GAH! I didn't mean to tell you that! Look, just forget I said anything okay?"); - ~chatplayer(quiz, "So a leprechaun knows where Zanaris is eh?"); + ~chatplayer("Well, it looks to me like YOU don't know EITHER seeing as you're all just sat around here."); + ~chatnpc("Of course we know! We just haven't found which tree the stupid leprechaun's hiding in yet!"); + ~chatplayer("Leprechaun?"); + ~chatnpc("GAH! I didn't mean to tell you that! Look, just forget I said anything okay?"); + ~chatplayer("So a leprechaun knows where Zanaris is eh?"); %zanaris_progress = ^zanaris_started; ~send_quest_progress(questlist:zanaris, %zanaris_progress, ^zanaris_complete); - ~chatnpc(confused, "Ye.. uh, no. No, not at all. And even if he did - which he doesn't - he DEFINITELY ISN'T hiding in some tree around here. Nope, definitely not. Honestly."); - ~chatplayer(happy, "Thanks for the help!"); - ~chatnpc(confused, "Help? What help? I didn't help! Please don't say I did, I'll get in trouble!"); + ~chatnpc("Ye.. uh, no. No, not at all. And even if he did - which he doesn't - he DEFINITELY ISN'T hiding in some tree around here. Nope, definitely not. Honestly."); + ~chatplayer("Thanks for the help!"); + ~chatnpc("Help? What help? I didn't help! Please don't say I did, I'll get in trouble!"); } [label,warrior_no_such_thing] -~chatplayer(angry, "There's no such thing!"); -~chatnpc(neutral, "When we've found Zanaris you'll... GAH! I mean, we're not here for any particular reason at all."); +~chatplayer("There's no such thing!"); +~chatnpc("When we've found Zanaris you'll... GAH! I mean, we're not here for any particular reason at all."); @multi3("Who's Zanaris?", warrior_who_zanaris, "What's Zanaris?", warrior_what_zanaris, "What makes you think it's out here?", warrior_think_here); [label,warrior_adventures] -~chatplayer(quiz, "Do you know any good adventures I can go on?"); -~chatnpc(neutral, "Well we're on an adventure right now.|Mind you, this is OUR adventure and|we don't want to share it - find your own!"); +~chatplayer("Do you know any good adventures I can go on?"); +~chatnpc("Well we're on an adventure right now.|Mind you, this is OUR adventure and|we don't want to share it - find your own!"); def_int $option = ~p_choice2("Please tell me?", 1, "I don't think you've found a good adventure at all!", 2); if($option = 1) { @warrior_please_tell; } else if($option = 2) { - ~chatplayer(angry, "I don't think you've found a good adventure at all!"); - ~chatnpc(angry, "Hah! Adventurers of our calibre don't just hang around in forests for fun, whelp!"); - ~chatplayer(quiz, "Oh really?"); + ~chatplayer("I don't think you've found a good adventure at all!"); + ~chatnpc("Hah! Adventurers of our calibre don't just hang around in forests for fun, whelp!"); + ~chatplayer("Oh really?"); @warrior_camped_out; } [label,warrior_please_tell] -~chatplayer(quiz, "Please tell me?"); -~chatnpc(neutral, "No."); -~chatplayer(quiz, "Please?"); -~chatnpc(neutral, "No!"); -~chatplayer(quiz, "PLEEEEEEEEEEEEEEEEEEEEEEASE???"); -~chatnpc(angry, "NO!"); \ No newline at end of file +~chatplayer("Please tell me?"); +~chatnpc("No."); +~chatplayer("Please?"); +~chatnpc("No!"); +~chatplayer("PLEEEEEEEEEEEEEEEEEEEEEEASE???"); +~chatnpc("NO!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_lumbridge/scripts/wizard_zanaris.rs2 b/data/src/scripts/areas/area_lumbridge/scripts/wizard_zanaris.rs2 index c5b8bda76..c7d1e9db1 100644 --- a/data/src/scripts/areas/area_lumbridge/scripts/wizard_zanaris.rs2 +++ b/data/src/scripts/areas/area_lumbridge/scripts/wizard_zanaris.rs2 @@ -1,24 +1,24 @@ [opnpc1,wizard_zanaris] if(map_members = false) { // RS3 - ~chatplayer(happy, "Hello!"); - ~chatnpc(neutral, "Blast! I was in the middle of my magical meditations - now you've gone and spoiled it! Why did you have to interrupt me?"); - ~chatplayer(happy, "Oh, sorry. I was just trying to be friendly."); - ~chatnpc(neutral, "Never mind! Good day to you, sir."); + ~chatplayer("Hello!"); + ~chatnpc("Blast! I was in the middle of my magical meditations - now you've gone and spoiled it! Why did you have to interrupt me?"); + ~chatplayer("Oh, sorry. I was just trying to be friendly."); + ~chatnpc("Never mind! Good day to you, sir."); return; } switch_int (%zanaris_progress) { case ^zanaris_not_started: - ~chatplayer(quiz, "Why are all of you standing around here?"); - ~chatnpc(happy, "Hahaha you dare talk to a mighty wizard such as myself? I bet you can't even cast windstrike yet amateur!"); - ~chatplayer(neutral, "...You're an idiot."); + ~chatplayer("Why are all of you standing around here?"); + ~chatnpc("Hahaha you dare talk to a mighty wizard such as myself? I bet you can't even cast windstrike yet amateur!"); + ~chatplayer("...You're an idiot."); return; case ^zanaris_started: - ~chatplayer(quiz, "Found that leprechaun yet?"); - ~chatnpc(happy, "Hahaha go away amateur!|You're not worthy of joining our great group!"); - ~chatplayer(neutral, "...right."); + ~chatplayer("Found that leprechaun yet?"); + ~chatnpc("Hahaha go away amateur!|You're not worthy of joining our great group!"); + ~chatplayer("...right."); case default: - ~chatnpc(happy, "Hahaha you're such an amateur!"); - ~chatnpc(happy, "Go away and play with some cabbage amateur!"); - ~chatplayer(neutral, "...right."); + ~chatnpc("Hahaha you're such an amateur!"); + ~chatnpc("Go away and play with some cabbage amateur!"); + ~chatplayer("...right."); return; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_mage_arena/scripts/chamber_guardian.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/chamber_guardian.rs2 index 29dc6d042..5df2803c8 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/chamber_guardian.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/chamber_guardian.rs2 @@ -1,18 +1,18 @@ [opnpc1,chamber_guardian] if (%magearena_progress <= ^mage_arena_complete) { - ~chatplayer(happy, "Hello my friend, Kolodion sent me down."); - ~chatnpc(angry, "Sssshhh... the gods are talking. I can hear their|whispers."); - ~chatnpc(quiz, "Can you hear them adventurer, they're calling you."); - ~chatplayer(confused, "Erm... ok!"); - ~chatnpc(shifty, "Go chant at the statue of the god you most wish to|represent in this world, you will be rewarded."); - ~chatnpc(shifty, "Once you are done, come back to me. I shall supply|you with a mage staff ready for battle."); + ~chatplayer("Hello my friend, Kolodion sent me down."); + ~chatnpc("Sssshhh... the gods are talking. I can hear their|whispers."); + ~chatnpc("Can you hear them adventurer, they're calling you."); + ~chatplayer("Erm... ok!"); + ~chatnpc("Go chant at the statue of the god you most wish to|represent in this world, you will be rewarded."); + ~chatnpc("Once you are done, come back to me. I shall supply|you with a mage staff ready for battle."); return; } else if (%magearena_progress > ^mage_arena_prayed_at_statue & %magearena_progress < ^mage_arena_staff_given) { // after praying at the statue: - ~chatplayer(neutral, "Hi."); - ~chatnpc(quiz, "Hello adventurer, have you made your choice?"); - ~chatplayer(neutral, "I have."); - ~chatnpc(neutral, "Good, good, I hope you have chosen well. I will now|present you with a magic staff. This, along with the|cape awarded to you by your chosen god, are all the|weapons and armour you will need here."); + ~chatplayer("Hi."); + ~chatnpc("Hello adventurer, have you made your choice?"); + ~chatplayer("I have."); + ~chatnpc("Good, good, I hope you have chosen well. I will now|present you with a magic staff. This, along with the|cape awarded to you by your chosen god, are all the|weapons and armour you will need here."); // check staff type def_namedobj $staff = saradominstaff; switch_int(%magearena_progress) { @@ -27,19 +27,19 @@ if (%magearena_progress <= ^mage_arena_complete) { } // default -~chatplayer(neutral, "Hello again."); -~chatnpc(quiz, "Hello adventurer, are you looking for another staff?"); +~chatplayer("Hello again."); +~chatnpc("Hello adventurer, are you looking for another staff?"); def_int $choice = ~p_choice3("What do you have to offer?", 1, "No thanks.", 2, "Tell me what you know about the charge spell.", 3); if ($choice = 1) { ~openshop_activenpc; } else if ($choice = 2) { - ~chatplayer(neutral, "No thanks."); - ~chatnpc(neutral, "Well let me know if you need one."); + ~chatplayer("No thanks."); + ~chatnpc("Well let me know if you need one."); } else if ($choice = 3) { - ~chatplayer(quiz, "Tell me what you know about the charge spell."); - ~chatnpc(shifty, "We believe the spells are gifts from the gods. The|charge spell draws even more power from the cosmos."); - ~chatnpc(shifty, "While wearing a matching cape and staff it will add|50% more damage to that already caused by battle|mage spells for several minutes."); - ~chatplayer(happy, "Good stuff."); + ~chatplayer("Tell me what you know about the charge spell."); + ~chatnpc("We believe the spells are gifts from the gods. The|charge spell draws even more power from the cosmos."); + ~chatnpc("While wearing a matching cape and staff it will add|50% more damage to that already caused by battle|mage spells for several minutes."); + ~chatplayer("Good stuff."); } [opnpc3,chamber_guardian] diff --git a/data/src/scripts/areas/area_mage_arena/scripts/gundai.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/gundai.rs2 index 777321b01..8b6c1848a 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/gundai.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/gundai.rs2 @@ -1,11 +1,11 @@ [opnpc1,gundai] -~chatplayer(quiz, "Hello, what are you doing out here?"); -~chatnpc(happy, "I'm a banker, the only one around these dangerous parts."); +~chatplayer("Hello, what are you doing out here?"); +~chatnpc("I'm a banker, the only one around these dangerous parts."); def_int $choice = ~p_choice2("Cool, I'd like to access my bank account please.", 1, "Well, now I know.", 2); if ($choice = 2) { - ~chatplayer(neutral, "Well, now I know."); - ~chatnpc(neutral, "Knowledge is power my friend."); + ~chatplayer("Well, now I know."); + ~chatnpc("Knowledge is power my friend."); return; } @openbank; \ No newline at end of file diff --git a/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 index 917cdc3a6..1ce3cf46e 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/kolodion.rs2 @@ -1,15 +1,15 @@ [opnpc1,kolodion] if (%magearena_progress < ^mage_arena_started) { - ~chatplayer(neutral, "Hello there. What is this place?"); + ~chatplayer("Hello there. What is this place?"); // https://web.archive.org/web/20050306051554/http://runevillage.com/rs2specialMageArena.php // "You must have level 60 Magic or higher, (Wizard’s Mind Bomb doesn't work in the Arena)" if (stat_base(magic) < 60) { - ~chatnpc(angry, "Do not waste my time with trivial questions. I am the|Great Kolodion, master of battle magic. I have an arena|to run."); - ~chatplayer(quiz, "Can I enter?"); - ~chatnpc(angry, "Hah! A wizard of your level? Don't be absurd."); + ~chatnpc("Do not waste my time with trivial questions. I am the|Great Kolodion, master of battle magic. I have an arena|to run."); + ~chatplayer("Can I enter?"); + ~chatnpc("Hah! A wizard of your level? Don't be absurd."); return; } - ~chatnpc(shifty, "I am the great Kolodion, master of battle magic, and|this is my battle arena. Top wizards travel from all over|Gielinor to fight here."); + ~chatnpc("I am the great Kolodion, master of battle magic, and|this is my battle arena. Top wizards travel from all over|Gielinor to fight here."); @multi3("Can I fight here?", kolodion_can_i_fight_here, "What's the point of that?", kolodion_whats_the_point, "That's barbaric!", kolodion_barbaric); } if (~mage_arena_in_progress = true) { @@ -17,98 +17,98 @@ if (~mage_arena_in_progress = true) { } else if (%magearena_progress = ^mage_arena_started) { @kolodion_lets_fight; } else if (%magearena_progress = ^mage_arena_complete) { - ~chatplayer(neutral, "Hello, Kolodion."); - ~chatnpc(shifty, "Hello, young mage. You're a tough one."); + ~chatplayer("Hello, Kolodion."); + ~chatnpc("Hello, young mage. You're a tough one."); @kolodion_what_now; } // default -~chatplayer(neutral, "Hello, Kolodion."); -~chatnpc(shifty, "Hey there, how are you? Are you enjoying the|bloodshed?"); -~chatplayer(neutral, "It's not bad; I've seen worse."); +~chatplayer("Hello, Kolodion."); +~chatnpc("Hey there, how are you? Are you enjoying the|bloodshed?"); +~chatplayer("It's not bad; I've seen worse."); def_int $choice = ~p_choice3("I think I've had enough for now.", 1, "How can I use my new spells outside of the arena?", 2, "Are there any more challenges available?", 3); if ($choice = 1) { - ~chatplayer(bored, "I think I've had enough for now."); - ~chatnpc(neutral, "A shame. You're a good battle mage. I hope to see you|soon."); + ~chatplayer("I think I've had enough for now."); + ~chatnpc("A shame. You're a good battle mage. I hope to see you|soon."); return; } else if ($choice = 2) { - ~chatplayer(quiz, "How can I use my new spells outside of the arena?"); - ~chatnpc(shifty, "Experience, my friend, experience. Once you've used|the spell enough times in the arena, you'll be able to use|them in the rest of Gielinor."); - ~chatplayer(happy, "Good stuff."); - ~chatnpc(happy, "Not so good for the citizens; they won't stand a chance."); - ~chatplayer(quiz, "How am I doing so far?"); + ~chatplayer("How can I use my new spells outside of the arena?"); + ~chatnpc("Experience, my friend, experience. Once you've used|the spell enough times in the arena, you'll be able to use|them in the rest of Gielinor."); + ~chatplayer("Good stuff."); + ~chatnpc("Not so good for the citizens; they won't stand a chance."); + ~chatplayer("How am I doing so far?"); // check for each spell if they're unlocked if (%saradomin_strike_casts < ^mage_arena_spell_finished) { - ~chatnpc(neutral, "You still need to train with the strike spell inside the|arena before you can use it outside."); + ~chatnpc("You still need to train with the strike spell inside the|arena before you can use it outside."); } else { - ~chatnpc(happy, "You're experienced enough to use the strike spell|anywhere."); + ~chatnpc("You're experienced enough to use the strike spell|anywhere."); } if (%claws_of_guthix_casts < ^mage_arena_spell_finished) { - ~chatnpc(neutral, "You still need to train with the claw spell inside the|arena before you can use it outside."); + ~chatnpc("You still need to train with the claw spell inside the|arena before you can use it outside."); } else { - ~chatnpc(happy, "You're experienced enough to use the claw spell|anywhere."); + ~chatnpc("You're experienced enough to use the claw spell|anywhere."); } if (%flames_of_zamorak_casts < ^mage_arena_spell_finished) { - ~chatnpc(neutral, "You still need to train with the flame spell inside the|arena before you can use it outside."); + ~chatnpc("You still need to train with the flame spell inside the|arena before you can use it outside."); } else { - ~chatnpc(happy, "You're experienced enough to use the flame spell|anywhere."); + ~chatnpc("You're experienced enough to use the flame spell|anywhere."); } return; } else if ($choice = 3) { - ~chatplayer(quiz, "Are there any more challenges available?"); + ~chatplayer("Are there any more challenges available?"); // check if the player has learned the god spells - ~chatnpc(sad, "You still need to learn how to cast all god spells outside|of the arena."); - ~chatnpc(neutral, "I've made a note of the spells you still need to learn in|your journal."); + ~chatnpc("You still need to learn how to cast all god spells outside|of the arena."); + ~chatnpc("I've made a note of the spells you still need to learn in|your journal."); return; } [label,kolodion_can_i_fight_here] -~chatplayer(quiz, "Can I fight here?"); -~chatnpc(shifty, "My arena is open to any high level wizard, but this is|no game. Many wizards fall in this arena, never to rise|again. The strongest mages have been destroyed."); -~chatnpc(quiz, "If you're sure you want in?"); +~chatplayer("Can I fight here?"); +~chatnpc("My arena is open to any high level wizard, but this is|no game. Many wizards fall in this arena, never to rise|again. The strongest mages have been destroyed."); +~chatnpc("If you're sure you want in?"); @multi2("Yes indeedy.", kolodion_yes_indeedy, "No I don't.", kolodion_no_i_dont); [label,kolodion_whats_the_point] -~chatplayer(quiz, "What's the point of that?"); -~chatnpc(neutral, "We learn how to use our magic to its fullest and how|to channel the forces of the cosmos into our world..."); -~chatnpc(happy, "But mainly, I just like blasting people into dust."); +~chatplayer("What's the point of that?"); +~chatnpc("We learn how to use our magic to its fullest and how|to channel the forces of the cosmos into our world..."); +~chatnpc("But mainly, I just like blasting people into dust."); @multi2("Can I fight here?", kolodion_can_i_fight_here, "That's barbaric!", kolodion_barbaric); [label,kolodion_barbaric] -~chatplayer(shock, "That's barbaric!"); -~chatnpc(happy, "Nope, it's magic. But I know what you mean. So do|you want to join us?"); +~chatplayer("That's barbaric!"); +~chatnpc("Nope, it's magic. But I know what you mean. So do|you want to join us?"); @multi2("Yes indeedy.", kolodion_yes_indeedy, "No I don't.", kolodion_no_i_dont); [label,kolodion_yes_indeedy] -~chatplayer(happy, "Yes indeedy."); -~chatnpc(happy, "Good, good. You have a healthy sense of competition."); -~chatnpc(neutral, "Remember, traveller - in my arena, hand-to-hand|combat is useless. Your strength will diminish as you|enter the arena, but the spells you can learn are|amongst the most powerful in all of Gielinor."); -~chatnpc(neutral, "Before I can accept you in, we must duel.|You may not take armour or weapons into the arena."); // second sentence is rsc +~chatplayer("Yes indeedy."); +~chatnpc("Good, good. You have a healthy sense of competition."); +~chatnpc("Remember, traveller - in my arena, hand-to-hand|combat is useless. Your strength will diminish as you|enter the arena, but the spells you can learn are|amongst the most powerful in all of Gielinor."); +~chatnpc("Before I can accept you in, we must duel.|You may not take armour or weapons into the arena."); // second sentence is rsc @multi2("Okay, let's fight.", kolodion_lets_fight, "No thanks.", exit); [label,kolodion_no_i_dont] -~chatplayer(angry, "No I don't."); -~chatnpc(neutral, "Your loss."); +~chatplayer("No I don't."); +~chatnpc("Your loss."); [label,kolodion_lets_fight] -~chatplayer(happy, "Okay, let's fight."); -~chatnpc(neutral, "I must first check that you are up to scratch."); +~chatplayer("Okay, let's fight."); +~chatnpc("I must first check that you are up to scratch."); if (~can_enter_mage_arena = false) { ~mesbox("You cannot enter the arena while carrying weapons or armour."); // rsc, might be mes return; } -~chatplayer(happy, "You don't need to worry about that."); -~chatnpc(neutral, "Not just any magician can enter - only the most|powerful and most feared. Before you can use the|power of this arena, you must prove yourself against|me."); +~chatplayer("You don't need to worry about that."); +~chatnpc("Not just any magician can enter - only the most|powerful and most feared. Before you can use the|power of this arena, you must prove yourself against|me."); %magearena_progress = 1; @kolodion_teleport; [label,kolodion_return] -~chatplayer(happy, "Hi."); -~chatnpc(neutral, "You return, young conjurer. You obviously have a|taste for the dark side of magic."); +~chatplayer("Hi."); +~chatnpc("You return, young conjurer. You obviously have a|taste for the dark side of magic."); if (~can_enter_mage_arena = false) { ~mesbox("You cannot enter the arena while carrying weapons or armour."); // rsc, might be mes return; @@ -118,10 +118,10 @@ if (~can_enter_mage_arena = false) { @kolodion_teleport; [label,kolodion_what_now] -~chatplayer(quiz, "What now?"); -~chatnpc(shifty, "Step into the magic pool. It will take you to a chamber.|There, you must decide which god you will represent in|the arena."); -~chatplayer(happy, "Thanks, Kolodion."); -~chatnpc(happy, "That's what I'm here for."); +~chatplayer("What now?"); +~chatnpc("Step into the magic pool. It will take you to a chamber.|There, you must decide which god you will represent in|the arena."); +~chatplayer("Thanks, Kolodion."); +~chatnpc("That's what I'm here for."); [label,kolodion_teleport] // for some reason you can move for 1 tick during this diff --git a/data/src/scripts/areas/area_mage_arena/scripts/lundail.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/lundail.rs2 index 5379c8bc1..bf2a4fe88 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/lundail.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/lundail.rs2 @@ -1,19 +1,19 @@ [opnpc1,lundail] -~chatnpc(happy, "Hello ."); -~chatnpc(neutral, "How can I help you, brave adventurer?"); +~chatnpc("Hello ."); +~chatnpc("How can I help you, brave adventurer?"); def_int $choice = ~p_choice2("What are you selling?", 1, "What's that big old building above us?", 2); if ($choice = 1) { - ~chatplayer(quiz, "What are you selling?"); - ~chatnpc(neutral, "I sell runes. I've got some good stuff, some really powerful little rocks. Take a look."); + ~chatplayer("What are you selling?"); + ~chatnpc("I sell runes. I've got some good stuff, some really powerful little rocks. Take a look."); ~openshop_activenpc; return; } -~chatplayer(quiz, "What's that big old building above us?"); -~chatnpc(happy, "That, my friend, is the mage battle arena. Top mages come from all over Gielinor to compete in the arena."); -~chatplayer(neutral, "Wow."); -~chatnpc(confused, "Few return, most get fried, hence the smell."); -~chatplayer(confused, "Hmmm.. I did notice."); +~chatplayer("What's that big old building above us?"); +~chatnpc("That, my friend, is the mage battle arena. Top mages come from all over Gielinor to compete in the arena."); +~chatplayer("Wow."); +~chatnpc("Few return, most get fried, hence the smell."); +~chatplayer("Hmmm.. I did notice."); [opnpc3,lundail] ~openshop_activenpc; \ No newline at end of file diff --git a/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 b/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 index 66add550c..126322d25 100644 --- a/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 +++ b/data/src/scripts/areas/area_mage_arena/scripts/mage_arena.rs2 @@ -147,7 +147,7 @@ p_delay(2); p_teleport(~coord_lineofwalk_radius(^mage_arena_finish_coord, 2)); anim(null, 0); if (npc_find(coord, kolodion, 5, 0) = true) { - ~chatnpc(happy, "Well done, young adventurer; you truly are a worthy|battle mage."); + ~chatnpc("Well done, young adventurer; you truly are a worthy|battle mage."); @kolodion_what_now; return; } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/bartender.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/bartender.rs2 index b337742d4..da872d230 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/bartender.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/bartender.rs2 @@ -18,8 +18,8 @@ switch_int ($option) { case 2: @goblin_diplomacy_start; case 3: @rustyanchor_barcrawl; case 4: - ~chatplayer(neutral, "Have you heard any more rumours in here?"); - ~chatnpc(neutral, "No, it hasn't been very busy lately."); + ~chatplayer("Have you heard any more rumours in here?"); + ~chatnpc("No, it hasn't been very busy lately."); } [opnpcu,bartender_port_sarim] @@ -29,24 +29,24 @@ if(testbit(%barcrawl_progress, ^rustyanchor_index) = false & last_useitem = barc ~displaymessage(^dm_default); [label,bartender_port_sarim_beer] -~chatplayer(happy, "Could I buy a beer please?"); -~chatnpc(happy, "Sure, that will be 2 gold coins please."); +~chatplayer("Could I buy a beer please?"); +~chatnpc("Sure, that will be 2 gold coins please."); if(inv_total(inv, coins) < 2) { - ~chatplayer(sad, "I don't have enough coins."); + ~chatplayer("I don't have enough coins."); return; } -~chatplayer(happy, "Ok, here you go."); +~chatplayer("Ok, here you go."); inv_del(inv, coins, 2); inv_add(inv, beer, 1); ~mesbox("You buy a pint of beer!"); [label,rustyanchor_barcrawl] -~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(confused, "Are you sure? You look a bit skinny for that."); -~chatplayer(neutral, "Just give me whatever I need to drink here."); -~chatnpc(happy, "Ok one Black Skull Ale coming up, 8 coins please."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Are you sure? You look a bit skinny for that."); +~chatplayer("Just give me whatever I need to drink here."); +~chatnpc("Ok one Black Skull Ale coming up, 8 coins please."); if(inv_total(inv, coins) < 7) { - ~chatplayer(sad, "I don't have 8 coins with me."); + ~chatplayer("I don't have 8 coins with me."); return; } if_close; @@ -62,7 +62,7 @@ mes("The bartender signs your card."); say("Hiccup!"); [label,trail_bartender_port_sarim] -~chatnpc(happy, "Congratulations! Here you go."); +~chatnpc("Congratulations! Here you go."); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp020, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_port_sarim/scripts/betty.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/betty.rs2 index 8196379cb..111db53a4 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/betty.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/betty.rs2 @@ -1,11 +1,11 @@ [opnpc1,betty] -~chatnpc(happy, "Welcome to the magic emporium."); +~chatnpc("Welcome to the magic emporium."); def_int $option = ~p_choice2("Can I see your wares?", 1, "Sorry I'm not into magic.", 2); if($option = 1) { - ~chatplayer(quiz, "Can I see your wares?"); - ~chatnpc(happy, "Yes."); + ~chatplayer("Can I see your wares?"); + ~chatnpc("Yes."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Sorry I'm not into magic."); - ~chatnpc(happy, "Send anyone my way who is."); + ~chatplayer("Sorry I'm not into magic."); + ~chatnpc("Send anyone my way who is."); } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/brian.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/brian.rs2 index a6c78b16b..335d130e9 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/brian.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/brian.rs2 @@ -1,10 +1,10 @@ [opnpc1,brian] def_int $option = ~p_choice2("So, are you selling something?", 1, "'Ello.", 2); if($option = 1) { - ~chatplayer(neutral, "So, are you selling something?"); - ~chatnpc(neutral, "Yep, take a look at these great axes!"); + ~chatplayer("So, are you selling something?"); + ~chatnpc("Yep, take a look at these great axes!"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "'Ello."); - ~chatnpc(neutral, "'Ello!"); + ~chatplayer("'Ello."); + ~chatnpc("'Ello!"); } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/cabin_boy_jenkins.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/cabin_boy_jenkins.rs2 index 5f3754253..ed69fbb7c 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/cabin_boy_jenkins.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/cabin_boy_jenkins.rs2 @@ -1,21 +1,21 @@ [opnpc1,cabin_boy_jenkins] -~chatnpc(happy, "Ahoy! What d'ye think of yer ship then?"); +~chatnpc("Ahoy! What d'ye think of yer ship then?"); @multi3("I'm ready to go back to shore.", jenkins_back_to_shore, "I'd like to inspect her some more.", jenkins_inspect_her_more, "Can you sail this ship to Crandor?", jenkins_can_crandor); [label,jenkins_back_to_shore] -~chatplayer(neutral, "I'm ready to go back to shore."); +~chatplayer("I'm ready to go back to shore."); p_telejump(0_47_50_39_4); ~mesbox("You disembark from the ship."); [label,jenkins_inspect_her_more] -~chatplayer(neutral, "I'd like to inspect her some more."); -~chatnpc(neutral, "Aye."); +~chatplayer("I'd like to inspect her some more."); +~chatnpc("Aye."); [label,jenkins_can_crandor] -~chatplayer(quiz, "Can you sail this ship to Crandor?"); -~chatnpc(neutral, "Not me, sir! I'm just an 'umble cabin boy. You'll need|a proper cap'n."); -~chatplayer(quiz, "Where can I find a captain?"); -~chatnpc(confused, "The cap'ns round 'ere seem to be a mite scared of|Crandor. I ask 'em why and they just say it was afore|my time,"); -~chatnpc(shifty, "but there is one cap'n I reckon might 'elp. I 'eard|there's a retired 'un who lives in Draynor Village who's|so desperate to sail again 'e'd take any job."); -~chatnpc(neutral, "I can't remember 'is name, but 'e lives in Draynor|Village an' makes rope."); \ No newline at end of file +~chatplayer("Can you sail this ship to Crandor?"); +~chatnpc("Not me, sir! I'm just an 'umble cabin boy. You'll need|a proper cap'n."); +~chatplayer("Where can I find a captain?"); +~chatnpc("The cap'ns round 'ere seem to be a mite scared of|Crandor. I ask 'em why and they just say it was afore|my time,"); +~chatnpc("but there is one cap'n I reckon might 'elp. I 'eard|there's a retired 'un who lives in Draynor Village who's|so desperate to sail again 'e'd take any job."); +~chatnpc("I can't remember 'is name, but 'e lives in Draynor|Village an' makes rope."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_port_sarim/scripts/gerrant.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/gerrant.rs2 index f926657a6..bd8b0467c 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/gerrant.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/gerrant.rs2 @@ -1,9 +1,9 @@ [opnpc1,gerrant] -~chatnpc(happy, "Welcome! You can buy fishing equipment at my store.|We'll also buy anything you catch off you."); +~chatnpc("Welcome! You can buy fishing equipment at my store.|We'll also buy anything you catch off you."); def_int $option = ~p_choice2("Let's see what you've got then.", 1, "Sorry, I'm not interested.", 2); if($option = 1) { - ~chatplayer(neutral, "Let's see what you've got then."); + ~chatplayer("Let's see what you've got then."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Sorry, I'm not interested."); + ~chatplayer("Sorry, I'm not interested."); } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/grum.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/grum.rs2 index cf7b946f4..943679bd9 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/grum.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/grum.rs2 @@ -1,10 +1,10 @@ [opnpc1,grum] -~chatnpc(happy, "Would you like to buy or sell some gold jewellery?"); +~chatnpc("Would you like to buy or sell some gold jewellery?"); def_int $option = ~p_choice2("Yes please.", 1, "No, I'm not that rich.", 2); if($option = 1) { - ~chatplayer(happy, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(happy, "No, I'm not that rich."); - ~chatnpc(angry, "Get out then! We don't want any riff-raff in here."); + ~chatplayer("No, I'm not that rich."); + ~chatnpc("Get out then! We don't want any riff-raff in here."); } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/klarense.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/klarense.rs2 index 731138ed5..e6ecf87ee 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/klarense.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/klarense.rs2 @@ -2,7 +2,7 @@ // and https://gitlab.com/open-runescape-classic/core/-/blob/develop/server/plugins/com/openrsc/server/plugins/authentic/npcs/portsarim/Klarense.java [opnpc1,klarense] if (%dragon_progress < ^quest_dragon_bought_ship & %dragon_progress >= ^quest_dragon_spoken_to_oziach) { - ~chatnpc(neutral, "You're interested in a trip on the Lady Lumbridge are|you? I admit she looks fine, but she isn't seaworthy|right now."); + ~chatnpc("You're interested in a trip on the Lady Lumbridge are|you? I admit she looks fine, but she isn't seaworthy|right now."); @multi4("Do you know when she will be seaworthy?", klarense_when_sea_worthy, "Would you take me to Crandor Isle when it's ready?", klarense_crandor_when_ready, "I don't suppose I could buy it?", klarense_buy, @@ -10,7 +10,7 @@ if (%dragon_progress < ^quest_dragon_bought_ship & %dragon_progress >= ^quest_dr ); } else if (%dragon_progress >= ^quest_dragon_bought_ship & %dragon_progress < ^quest_dragon_sailed_to_crandor) { // https://youtu.be/juRWRm7hrGM?list=PLn23LiLYLb1aqrojPTi1_Np81LJku2Nd0&t=47 - // ~chatnpc(neutral, "Hello, captain! Here to inspect your new ship? Just a|little work and she'll be seaworthy again."); // osrs + // ~chatnpc("Hello, captain! Here to inspect your new ship? Just a|little work and she'll be seaworthy again."); // osrs @multi4("So would you like to sail this ship to Crandor Isle for me?", klarense_crandor_for_me, // rsc "So; what needs fixing on this ship?", klarense_fixing, // not a typo "What are you going to do now you don't have a ship?", klarense_no_ship, @@ -18,8 +18,8 @@ if (%dragon_progress < ^quest_dragon_bought_ship & %dragon_progress >= ^quest_dr ); } else if (%dragon_progress = ^quest_dragon_sailed_to_crandor) { // osrs - ~chatnpc(shock, "Wow! You sure are lucky! Seems the Lady Lumbridge just washed right up into the dock by herself!"); - ~chatnpc(neutral, "She's pretty badly damaged, though..."); + ~chatnpc("Wow! You sure are lucky! Seems the Lady Lumbridge just washed right up into the dock by herself!"); + ~chatnpc("She's pretty badly damaged, though..."); @multi4("So would you like to sail this ship to Crandor Isle for me?", klarense_crandor_for_me, // rsc "So; what needs fixing on this ship?", klarense_fixing, // not a typo "What are you going to do now you don't have a ship?", klarense_no_ship, @@ -29,15 +29,15 @@ if (%dragon_progress < ^quest_dragon_bought_ship & %dragon_progress >= ^quest_dr // no idea if this is supposed to exist. This dialogue is from osrs // people are saying you cant sail the ship after the quest is completed. // https://www.neoseeker.com/forums/2410/t419625-neds-ship-on-crandor/ - ~chatplayer(quiz, "Hey, that's my ship!"); - ~chatnpc(neutral, "No, it's not. It may, to the untrained eye, at first|appear to be the Lady Lumbridge, but it is definitely|not. It's my new ship. It just happens to look slightly|similar, is all."); - ~chatplayer(angry, "It has Lady Lumbridge painted out and 'Klarense's|Cruiser' painted over it!"); - ~chatnpc(neutral, "Nope, you're mistaken. It's my new boat."); - ~chatplayer(quiz, "Well will you at least take me to Crandor in it?"); - ~chatnpc(neutral, "Nope. I don't take passengers on my ship."); - ~chatplayer(angry, "Argh!"); + ~chatplayer("Hey, that's my ship!"); + ~chatnpc("No, it's not. It may, to the untrained eye, at first|appear to be the Lady Lumbridge, but it is definitely|not. It's my new ship. It just happens to look slightly|similar, is all."); + ~chatplayer("It has Lady Lumbridge painted out and 'Klarense's|Cruiser' painted over it!"); + ~chatnpc("Nope, you're mistaken. It's my new boat."); + ~chatplayer("Well will you at least take me to Crandor in it?"); + ~chatnpc("Nope. I don't take passengers on my ship."); + ~chatplayer("Argh!"); } else { - ~chatnpc(neutral, "You're interested in a trip on the Lady Lumbridge are|you? I admit she looks fine, but she isn't seaworthy|right now."); + ~chatnpc("You're interested in a trip on the Lady Lumbridge are|you? I admit she looks fine, but she isn't seaworthy|right now."); @multi2("Do you know when she will be seaworthy?", klarense_when_sea_worthy, "Ah well, nevermind.", klarense_nevermind ); @@ -45,56 +45,56 @@ if (%dragon_progress < ^quest_dragon_bought_ship & %dragon_progress >= ^quest_dr // in osrs this dialogue is very long, so its probably part of the rework? // in the video of klarense dialogue, a lot of the dialogue is shorter than osrs. so this is rsc dialogue [label,klarense_crandor_for_me] -~chatplayer(quiz, "So would you like to sail this ship to Crandor for me?"); -~chatnpc(worried, "No not me, I'm frightened of dragons."); +~chatplayer("So would you like to sail this ship to Crandor for me?"); +~chatnpc("No not me, I'm frightened of dragons."); [label,klarense_fixing] -~chatplayer(quiz, "So; what needs fixing on this ship?"); +~chatplayer("So; what needs fixing on this ship?"); if (%dragon_planks < 3) { // osrs and rsc are similar, so i chose osrs - ~chatnpc(neutral, "Well, the big gaping hole in the hold is the problem. You'll need a few wooden planks hammered in with steel nails to fix it."); + ~chatnpc("Well, the big gaping hole in the hold is the problem. You'll need a few wooden planks hammered in with steel nails to fix it."); return; } // Exists in osrs but no idea if it exists for our version -~chatnpc(neutral, "I dunno. It looks fine to me."); -~chatplayer(quiz, "But you said it needed fix-"); -~chatnpc(neutral, "Yes, but that was before you fixed it!"); +~chatnpc("I dunno. It looks fine to me."); +~chatplayer("But you said it needed fix-"); +~chatnpc("Yes, but that was before you fixed it!"); [label,klarense_board_ship] -~chatplayer(quiz, "Can I board the ship now?"); -~chatnpc(neutral, "Sure thing, she's all yours."); +~chatplayer("Can I board the ship now?"); +~chatnpc("Sure thing, she's all yours."); [label,klarense_no_ship] -~chatplayer(quiz, "What are you going to do now you don't have a ship?"); -~chatnpc(neutral, "Oh, I'll be fine. Ive got work as Port Sarim's first lifeguard!"); +~chatplayer("What are you going to do now you don't have a ship?"); +~chatnpc("Oh, I'll be fine. Ive got work as Port Sarim's first lifeguard!"); [label,klarense_when_sea_worthy] -~chatplayer(quiz, "Do you know when she will be seaworthy?"); -~chatnpc(neutral, "No, not really. Port Sarim's shipbuilders aren't very|efficient. So it would be quite a while..."); +~chatplayer("Do you know when she will be seaworthy?"); +~chatnpc("No, not really. Port Sarim's shipbuilders aren't very|efficient. So it would be quite a while..."); [label,klarense_crandor_when_ready] -~chatplayer(quiz, "Would you take me to Crandor Isle when it's ready?"); -~chatnpc(neutral, "Well, even if I knew how to get there, I wouldnt like to|risk it. Especially after going to all the effort of fixing|the old girl up."); +~chatplayer("Would you take me to Crandor Isle when it's ready?"); +~chatnpc("Well, even if I knew how to get there, I wouldnt like to|risk it. Especially after going to all the effort of fixing|the old girl up."); [label,klarense_buy] -~chatplayer(quiz, "I don't suppose I could buy it?"); -~chatnpc(neutral, "I guess you could... I'm sure the work needed to do|on it wouldn't be too expensive. How does 2000 gold|sound for a price?"); -~chatnpc(neutral, "I'll even throw in my Cabin boy Jenkins for free! He'll|swab the decks and splice the mainsails for you!"); +~chatplayer("I don't suppose I could buy it?"); +~chatnpc("I guess you could... I'm sure the work needed to do|on it wouldn't be too expensive. How does 2000 gold|sound for a price?"); +~chatnpc("I'll even throw in my Cabin boy Jenkins for free! He'll|swab the decks and splice the mainsails for you!"); def_int $choice = ~p_choice2("Yep, sounds good.", 0, "I'm not paying that much for a broken boat!", 1); if ($choice = 1) { - ~chatplayer(angry, "I'm not paying that much for a broken boat!"); - ~chatnpc(neutral, "That's fair enough, I suppose."); // osrs + ~chatplayer("I'm not paying that much for a broken boat!"); + ~chatnpc("That's fair enough, I suppose."); // osrs return; } -~chatplayer(quiz, "Yep, sounds good."); +~chatplayer("Yep, sounds good."); if (inv_total(inv, coins) < 2000) { - ~chatplayer(sad, "...except I don't have that kind of money on me..."); + ~chatplayer("...except I don't have that kind of money on me..."); return; } inv_del(inv, coins, 2000); %dragon_progress = ^quest_dragon_bought_ship; -~chatnpc(quiz, "Okey dokey, she's all yours!"); +~chatnpc("Okey dokey, she's all yours!"); [label,klarense_nevermind] -~chatplayer(sad, "Ah well, nevermind."); \ No newline at end of file +~chatplayer("Ah well, nevermind."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_port_sarim/scripts/monk_of_entrana.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/monk_of_entrana.rs2 index e060434a8..a6bcb45ec 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/monk_of_entrana.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/monk_of_entrana.rs2 @@ -3,23 +3,23 @@ if(map_members = false) { // guessing, OSRS has the new member mesbox, RS3 has a mes("The Monk of Entrana does not appear interested in talking."); return; } -~chatnpc(quiz, "Do you seek passage to holy Entrana? If so, you must leave your weaponry and armour behind. This is Saradomin's will."); +~chatnpc("Do you seek passage to holy Entrana? If so, you must leave your weaponry and armour behind. This is Saradomin's will."); def_int $option = ~p_choice2("No, not right now.", 1, "Yes, okay, I'm ready to go.", 2); if($option = 1){ - ~chatplayer(neutral, "No, not right now."); - ~chatnpc(neutral, "Very well."); + ~chatplayer("No, not right now."); + ~chatnpc("Very well."); } else if($option = 2) { - ~chatplayer(happy, "Yes, okay, I'm ready to go."); - ~chatnpc(neutral, "Very well. One moment please."); + ~chatplayer("Yes, okay, I'm ready to go."); + ~chatnpc("Very well. One moment please."); ~mesbox("The monk quickly searches you."); if(~has_entrana_restricted_items = true) { - ~chatnpc(angry, "NO WEAPONS OR ARMOUR are permitted on holy Entrana AT ALL. We will not allow you to travel there in breach of mighty Saradomin's edict."); - ~chatnpc(neutral, "Do not try and deceive us again. Come back when you have laid down your Zamorakian instruments of death."); + ~chatnpc("NO WEAPONS OR ARMOUR are permitted on holy Entrana AT ALL. We will not allow you to travel there in breach of mighty Saradomin's edict."); + ~chatnpc("Do not try and deceive us again. Come back when you have laid down your Zamorakian instruments of death."); return; } // Taking the boat again lets you skip dialogue on OSRS if you've gone through it once in the current session (tracked w/varbit) // I don't think they'd waste a varp on this in 2004 so this probably wasn't the case originally - ~chatnpc(neutral, "All is satisfactory. You may board the boat now."); + ~chatnpc("All is satisfactory. You may board the boat now."); ~set_sail("Entrana", "After a quick search, the monk smiles at you and allows you to board.", 1_44_52_18_3, ^sail_port_sarim_to_entrana, 13); } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/sailors.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/sailors.rs2 index 69e42f1d8..2e59f0877 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/sailors.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/sailors.rs2 @@ -1,6 +1,6 @@ [opnpc1,_sailor] -~chatnpc(quiz, "Do you want to go on a trip to Karamja?"); -~chatnpc(neutral, "The trip will cost you 30 coins."); +~chatnpc("Do you want to go on a trip to Karamja?"); +~chatnpc("The trip will cost you 30 coins."); def_int $option; if (%dragon_progress >= ^quest_dragon_spoken_to_oziach & %dragon_progress < ^dragon_complete) { $option = ~p_choice3("I'd rather go to Crandor Isle.", 3, "Yes please.", 1, "No, thank you.", 2); @@ -9,18 +9,18 @@ if (%dragon_progress >= ^quest_dragon_spoken_to_oziach & %dragon_progress < ^dra } switch_int ($option) { case 1: - ~chatplayer(happy, "Yes please."); + ~chatplayer("Yes please."); @sailor_yes; case 2: - ~chatplayer(neutral, "No, thank you."); + ~chatplayer("No, thank you."); case 3: - ~chatplayer(neutral, "I'd rather go to Crandor Isle."); - ~chatnpc(shock, "No I need to stay alive, I have|a wife and family to support."); + ~chatplayer("I'd rather go to Crandor Isle."); + ~chatnpc("No I need to stay alive, I have|a wife and family to support."); } [label,sailor_yes] if (inv_total(inv, coins) < 30) { - ~chatplayer(sad, "Oh dear, I don't actually seem to have enough money."); + ~chatplayer("Oh dear, I don't actually seem to have enough money."); return; } diff --git a/data/src/scripts/areas/area_port_sarim/scripts/wydin.rs2 b/data/src/scripts/areas/area_port_sarim/scripts/wydin.rs2 index e34b5cad2..7ca500a47 100644 --- a/data/src/scripts/areas/area_port_sarim/scripts/wydin.rs2 +++ b/data/src/scripts/areas/area_port_sarim/scripts/wydin.rs2 @@ -3,7 +3,7 @@ if (%food_store_employed = 1) { @wydin_employed_chat; } -~chatnpc(happy, "Welcome to my food store! Would you like to buy anything?"); +~chatnpc("Welcome to my food store! Would you like to buy anything?"); if (%hunt_progress = 0) { @multi3("Yes please.", wydin_open_shop, "No, thank you.", wydin_no, "What can you recommend?", wydin_recommend); } else if (%hunt_progress = 1) { @@ -11,56 +11,56 @@ if (%hunt_progress = 0) { } [label,wydin_employed_chat] -~chatnpc(quiz, "Is it nice and tidy round the back now?"); +~chatnpc("Is it nice and tidy round the back now?"); def_int $choice = ~p_choice4("Yes, can I work out front now?", 1, "Yes, are you going to pay me yet?", 2, "No, it's a complete mess", 3, "Can I buy something please?", 4); switch_int ($choice) { case 1: - ~chatplayer(happy, "Yes, can I work out front now?"); - ~chatnpc(neutral, "I'm the one who works here."); + ~chatplayer("Yes, can I work out front now?"); + ~chatnpc("I'm the one who works here."); case 2: - ~chatplayer(happy, "Yes, are you going to pay me yet?"); - ~chatnpc(shifty, "Umm... No, not yet."); + ~chatplayer("Yes, are you going to pay me yet?"); + ~chatnpc("Umm... No, not yet."); case 3: - ~chatplayer(sad, "No, it's a complete mess."); - ~chatnpc(neutral, "Ah well, it'll give you something to do, won't it."); + ~chatplayer("No, it's a complete mess."); + ~chatnpc("Ah well, it'll give you something to do, won't it."); case 4: - ~chatplayer(quiz, "Can I buy something please?"); - ~chatnpc(happy, "Yes, of course."); + ~chatplayer("Can I buy something please?"); + ~chatnpc("Yes, of course."); p_opnpc(3); } [label,wydin_job] -~chatplayer(quiz, "Can I get a job here?"); -~chatnpc(neutral, "Well, you're keen, I'll give you that. Okay, I'll give you a go. Have you got your own white apron?"); +~chatplayer("Can I get a job here?"); +~chatnpc("Well, you're keen, I'll give you that. Okay, I'll give you a go. Have you got your own white apron?"); if (inv_total(inv, white_apron) = 0 & inv_total(worn, white_apron) = 0) { - ~chatplayer(sad, "No, I haven't."); - ~chatnpc(neutral, "Well, you can't work here unless you have a white apron. Health and safety regulations, you understand."); + ~chatplayer("No, I haven't."); + ~chatnpc("Well, you can't work here unless you have a white apron. Health and safety regulations, you understand."); return; } -~chatplayer(happy, "Yes, I have one right here."); +~chatplayer("Yes, I have one right here."); %food_store_employed = 1; -~chatnpc(happy, "Wow - you are well prepared! You're hired. Go through to the back and tidy up for me, please."); +~chatnpc("Wow - you are well prepared! You're hired. Go through to the back and tidy up for me, please."); [label,wydin_open_shop] -~chatplayer(happy, "Yes please."); +~chatplayer("Yes please."); p_opnpc(3); [label,wydin_no] -~chatplayer(neutral, "No, thank you."); +~chatplayer("No, thank you."); [label,wydin_recommend] -~chatplayer(quiz, "What can you recommend?"); -~chatnpc(happy, "We have this really exotic fruit all the way from Karamja. It's called a banana."); +~chatplayer("What can you recommend?"); +~chatnpc("We have this really exotic fruit all the way from Karamja. It's called a banana."); @multi2("Hmm, I think I'll try one.", wydin_recommend_try, "I don't like the sound of that.", wydin_recommend_no); [label,wydin_recommend_try] -~chatplayer(neutral, "Hmm, I think I'll try one."); -~chatnpc(neutral, "Great. You might as well take a look at the rest of my wares as well."); +~chatplayer("Hmm, I think I'll try one."); +~chatnpc("Great. You might as well take a look at the rest of my wares as well."); p_opnpc(3); [label,wydin_recommend_no] -~chatplayer("default", "I don't like the sound of that."); -~chatnpc(neutral, "Well, it's your choice, but I do recommend them."); +~chatplayer("I don't like the sound of that."); +~chatnpc("Well, it's your choice, but I do recommend them."); diff --git a/data/src/scripts/areas/area_rimmington/scripts/hetty.rs2 b/data/src/scripts/areas/area_rimmington/scripts/hetty.rs2 index 9a22d6167..31dcfa49f 100644 --- a/data/src/scripts/areas/area_rimmington/scripts/hetty.rs2 +++ b/data/src/scripts/areas/area_rimmington/scripts/hetty.rs2 @@ -1,83 +1,83 @@ [opnpc1,hetty] switch_int(%hetty_progress) { case ^hetty_not_started: - ~chatnpc("neutral", "What could you want with an old woman like me?"); + ~chatnpc("What could you want with an old woman like me?"); def_int $option = ~p_choice2("I am in search of a quest.", 1, "I've heard that you are a witch.", 2); if($option = 1) { @hetty_search_quest; } else if($option = 2) { - ~chatplayer("happy", "I've heard that you are a witch."); - ~chatnpc("sad", "Yes it does seem to be getting fairly common knowledge."); - ~chatnpc("sad", "I fear I may get a visit from the witch hunters of Falador before long."); + ~chatplayer("I've heard that you are a witch."); + ~chatnpc("Yes it does seem to be getting fairly common knowledge."); + ~chatnpc("I fear I may get a visit from the witch hunters of Falador before long."); } case ^hetty_started: - ~chatnpc(happy, "So have you found the things for the potion?"); + ~chatnpc("So have you found the things for the potion?"); if(inv_total(inv, burnt_meat) > 0 & inv_total(inv, rats_tail) > 0 & inv_total(inv, eye_of_newt) > 0 & inv_total(inv, onion) > 0) { - ~chatplayer("happy", "Yes I have everything!"); - ~chatnpc("happy", "Excellent, can I have them then?"); + ~chatplayer("Yes I have everything!"); + ~chatnpc("Excellent, can I have them then?"); ~mesbox("You pass the ingredients to Hetty and she puts them all into her cauldron. Hetty closes her eyes and begins to chant. The cauldron bubbles mysteriously."); - ~chatplayer("neutral", "Well, is it ready?"); + ~chatplayer("Well, is it ready?"); inv_del(inv, burnt_meat, 1); inv_del(inv, rats_tail, 1); inv_del(inv, eye_of_newt, 1); inv_del(inv, onion, 1); %hetty_progress = ^hetty_objects_given; - ~chatnpc("happy", "Ok, now drink from the cauldron."); + ~chatnpc("Ok, now drink from the cauldron."); return; } else { - ~chatplayer("sad", "No, not yet."); // rsc - ~chatnpc("sad", "Well I can't make the potion without them! Remember... You need an eye of newt, a rat's tail, an onion, and a piece of burnt meat. Off you go dear!"); + ~chatplayer("No, not yet."); // rsc + ~chatnpc("Well I can't make the potion without them! Remember... You need an eye of newt, a rat's tail, an onion, and a piece of burnt meat. Off you go dear!"); } case ^hetty_objects_given: - ~chatnpc(angry, "Well are you going to drink the potion or not?"); + ~chatnpc("Well are you going to drink the potion or not?"); case ^hetty_complete: - ~chatnpc("happy", "How's your magic coming along?"); - ~chatplayer("happy", "I'm practicing and slowly getting better."); - ~chatnpc("happy", "Good, good."); + ~chatnpc("How's your magic coming along?"); + ~chatplayer("I'm practicing and slowly getting better."); + ~chatnpc("Good, good."); } [label,hetty_search_quest] -~chatplayer("neutral", "I am in search of a quest."); -~chatnpc("neutral", "Hmmmm... Maybe I can think of something for you."); -~chatnpc("happy", "Would you like to become more proficient in the dark arts?"); +~chatplayer("I am in search of a quest."); +~chatnpc("Hmmmm... Maybe I can think of something for you."); +~chatnpc("Would you like to become more proficient in the dark arts?"); def_int $option = ~p_choice3("Yes help me become one with my darker side.", 1, "No I have my principles and honour.", 2, "What, you mean improve my magic?", 3); if($option = 1) { - ~chatplayer("happy", "Yes help me become one with my darker side."); + ~chatplayer("Yes help me become one with my darker side."); @hetty_darker_self; } else if($option = 2) { - ~chatplayer("neutral", "No I have my principles and honour."); - ~chatnpc("sad", "Suit yourself, but you're missing out."); + ~chatplayer("No I have my principles and honour."); + ~chatnpc("Suit yourself, but you're missing out."); } else if($option = 3) { // https://www.youtube.com/watch?v=Bp27LZSB_60 - ~chatplayer("sad", "What, you mean improve my magic?"); + ~chatplayer("What, you mean improve my magic?"); ~mesbox("The witch sighs."); - ~chatnpc("neutral", "Yes, improve your magic..."); - ~chatnpc("sad", "Do you have no sense of drama?"); + ~chatnpc("Yes, improve your magic..."); + ~chatnpc("Do you have no sense of drama?"); $option = ~p_choice3("Yes I'd like to improve my magic.", 1, "No, I'm not interested.", 2, "Show me the mysteries of the dark arts....", 3); if($option = 1) { - ~chatplayer("happy", "Yes I'd like to improve my magic."); + ~chatplayer("Yes I'd like to improve my magic."); ~mesbox("The witch sighs."); @hetty_darker_self; } else if($option = 2) { // not sure about the mesanims here - ~chatplayer("neutral", "No, I'm not interested."); - ~chatnpc("neutral", "Many aren't to start off with."); + ~chatplayer("No, I'm not interested."); + ~chatnpc("Many aren't to start off with."); ~mesbox("The witch smiles mysteriously."); - ~chatnpc("happy", "But I think you'll be drawn back to this place."); + ~chatnpc("But I think you'll be drawn back to this place."); } else if($option = 3) { - ~chatplayer("happy", "Show me the mysteries of the dark arts..."); + ~chatplayer("Show me the mysteries of the dark arts..."); ~mesbox("The witch smiles mysteriously."); @hetty_darker_self; } } [label,hetty_darker_self] -~chatnpc("happy", "Ok I'm going to make a potion to help bring out your darker self."); -~chatnpc("neutral", "You will need certain ingredients."); -~chatplayer("neutral", "What do I need?"); +~chatnpc("Ok I'm going to make a potion to help bring out your darker self."); +~chatnpc("You will need certain ingredients."); +~chatplayer("What do I need?"); %hetty_progress = ^hetty_started; ~send_quest_progress(questlist:hetty, %hetty_progress, ^hetty_complete); -~chatnpc("neutral", "You need an eye of newt, a rat's tail, an onion... Oh and a piece of burnt meat."); -~chatplayer("happy", "Great, I'll go and get them."); +~chatnpc("You need an eye of newt, a rat's tail, an onion... Oh and a piece of burnt meat."); +~chatplayer("Great, I'll go and get them."); diff --git a/data/src/scripts/areas/area_rimmington/scripts/rommik.rs2 b/data/src/scripts/areas/area_rimmington/scripts/rommik.rs2 index ddfe4bc7f..1921995b5 100644 --- a/data/src/scripts/areas/area_rimmington/scripts/rommik.rs2 +++ b/data/src/scripts/areas/area_rimmington/scripts/rommik.rs2 @@ -1,10 +1,10 @@ [opnpc1,rommik] -~chatnpc(happy, "Would you like to buy some crafting equipment?"); +~chatnpc("Would you like to buy some crafting equipment?"); def_int $option = ~p_choice2("No thanks, I've got all the Crafting equipment I need.", 1, "Let's see what you've got, then.", 2); if($option = 1) { - ~chatplayer(neutral, "No thanks; I've got all the Crafting equipment I need."); - ~chatnpc(happy, "Okay. Fare well on your travels."); + ~chatplayer("No thanks; I've got all the Crafting equipment I need."); + ~chatnpc("Okay. Fare well on your travels."); } else if($option = 2) { - ~chatplayer(neutral, "Let's see what you've got, then."); + ~chatplayer("Let's see what you've got, then."); ~openshop_activenpc; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/bartender.rs2 b/data/src/scripts/areas/area_seers/scripts/bartender.rs2 index 3495e42fd..b41173d21 100644 --- a/data/src/scripts/areas/area_seers/scripts/bartender.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/bartender.rs2 @@ -1,5 +1,5 @@ [opnpc1,bartender_seers] -~chatnpc(happy, "Good morning, what would you like?"); +~chatnpc("Good morning, what would you like?"); if(testbit(%barcrawl_progress, ^forestersarms_index) = false & inv_total(inv, barcrawl_card) > 0) { @multi4("What do you have?", bartender_seers_what_have, "Beer please.", bartender_seers_beer, "I'm doing Alfred Grimhand's Barcrawl.", forestersarms_barcrawl, "I don't really want anything thanks.", bartender_seers_thanks); } else { @@ -12,31 +12,31 @@ if(testbit(%barcrawl_progress, ^forestersarms_index) = false & last_useitem = ba } [label,bartender_seers_what_have] -~chatplayer(quiz, "What do you have?"); -~chatnpc(happy, "Well we have beer, or if you want some food, we have our home made stew and meat pies."); +~chatplayer("What do you have?"); +~chatnpc("Well we have beer, or if you want some food, we have our home made stew and meat pies."); @multi4("Beer please.", bartender_seers_beer, "I'll try the meat pie.", bartender_seers_meat_pie, "Could I have some stew please?", bartender_seers_stew, "I don't really want anything thanks.", bartender_seers_thanks); [label,bartender_seers_beer] -~chatplayer(happy, "Beer please."); -~chatnpc(happy, "One beer coming up. Ok, that'll be two coins."); +~chatplayer("Beer please."); +~chatnpc("One beer coming up. Ok, that'll be two coins."); @bartender_seers_transaction(beer, 2); [label,bartender_seers_stew] -~chatplayer(quiz, "Could I have some stew please?"); -~chatnpc(happy, "A bowl of stew, that'll be 20 coins please."); +~chatplayer("Could I have some stew please?"); +~chatnpc("A bowl of stew, that'll be 20 coins please."); @bartender_seers_transaction(stew, 20); [label,bartender_seers_meat_pie] -~chatplayer(happy, "I'll try the meat pie."); -~chatnpc(happy, "Ok, that'll be 16 coins."); +~chatplayer("I'll try the meat pie."); +~chatnpc("Ok, that'll be 16 coins."); @bartender_seers_transaction(meat_pie, 16); [label,bartender_seers_transaction](namedobj $food_name, int $price) if(inv_freespace(inv) = 0) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough space to carry it."); + ~chatplayer("Oh dear. I don't seem to have enough space to carry it."); return; } else if(inv_total(inv, coins) < $price) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); return; } else { inv_del(inv, coins, $price); @@ -44,13 +44,13 @@ if(inv_freespace(inv) = 0) { } [label,bartender_seers_thanks] -~chatplayer(neutral, "I don't really want anything thanks."); +~chatplayer("I don't really want anything thanks."); [label,forestersarms_barcrawl] -~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(neutral, "Oh you're a barbarian then.|Now which of these barrels contained the Liverbane Ale?|That'll be 18 coins please."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Oh you're a barbarian then.|Now which of these barrels contained the Liverbane Ale?|That'll be 18 coins please."); if(inv_total(inv, coins) < 18) { - ~chatplayer(sad, "Sorry, I don't have 18 coins."); + ~chatplayer("Sorry, I don't have 18 coins."); return; } if_close; diff --git a/data/src/scripts/areas/area_seers/scripts/galahad.rs2 b/data/src/scripts/areas/area_seers/scripts/galahad.rs2 index 18eae1b0f..a31dfe03a 100644 --- a/data/src/scripts/areas/area_seers/scripts/galahad.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/galahad.rs2 @@ -1,33 +1,33 @@ [opnpc1,galahad] if(%grail_progress = ^grail_complete) { - ~chatnpc(neutral, "Would you like a cup of tea? I'll just put the kettle on."); + ~chatnpc("Would you like a cup of tea? I'll just put the kettle on."); ~mesbox("Brother Galahad hangs a kettle over the fire."); - ~chatplayer(happy, "I returned the Holy Grail to Camelot!"); - ~chatnpc(neutral, "I'm impressed! That's something I was never able to do. Half a moment; your cup of tea is ready."); + ~chatplayer("I returned the Holy Grail to Camelot!"); + ~chatnpc("I'm impressed! That's something I was never able to do. Half a moment; your cup of tea is ready."); @galahad_give_tea; } if(%grail_progress = ^grail_failed_defeat_titan) { - ~chatnpc(neutral, "How goes thy quest?"); - ~chatplayer(sad, "I now need to defeat a black knight titan.|He seems invulnerable!"); - ~chatnpc(confused, "A black knight titan hmm?|Haven't seen one of them about in a while..."); - ~chatnpc(neutral, "You'll need a special sword to defeat it, such as excalibur. You should be able to get that from the lady of the lake ...if you haven't already."); + ~chatnpc("How goes thy quest?"); + ~chatplayer("I now need to defeat a black knight titan.|He seems invulnerable!"); + ~chatnpc("A black knight titan hmm?|Haven't seen one of them about in a while..."); + ~chatnpc("You'll need a special sword to defeat it, such as excalibur. You should be able to get that from the lady of the lake ...if you haven't already."); if(inv_total(inv, holy_table_napkin) = 0 & inv_total(bank, holy_table_napkin) = 0) { def_int $option = ~p_choice2("Thank you I shall continue with my quest", 1, "I have lost the holy table napkin", 2); // broken punc if($option = 2) { - ~chatplayer(sad, "I have lost the holy table napkin..."); + ~chatplayer("I have lost the holy table napkin..."); ~mesbox("Galahad gives you another table napkin."); inv_add(inv, holy_table_napkin, 1); - ~chatnpc(happy, "Lucky I had more than one, eh?"); + ~chatnpc("Lucky I had more than one, eh?"); ~mesbox("Galahad winks at you."); - ~chatnpc(happy, "Try not to lose this one!"); + ~chatnpc("Try not to lose this one!"); return; } } - ~chatplayer(neutral, "Thank you. I shall continue with my quest."); - ~chatnpc(neutral, "Half a moment, your cup of tea is ready."); + ~chatplayer("Thank you. I shall continue with my quest."); + ~chatnpc("Half a moment, your cup of tea is ready."); @galahad_give_tea; } -~chatnpc(neutral, "Welcome to my home.|It's rare for me to have guests!|Would you like a cup of tea?|I'll just put the kettle on."); +~chatnpc("Welcome to my home.|It's rare for me to have guests!|Would you like a cup of tea?|I'll just put the kettle on."); ~mesbox("Brother Galahad hangs a kettle over the fire."); def_int $choice; if(%grail_progress = ^grail_spoken_crone & inv_total(inv, holy_table_napkin) = 0) { // no bank check @@ -39,60 +39,60 @@ if(%grail_progress = ^grail_spoken_crone & inv_total(inv, holy_table_napkin) = 0 } switch_int($choice) { case 1: - ~chatplayer(quiz, "Are you any relation to Sir Galahad?"); - ~chatnpc(neutral, "I AM Sir Galahad."); - ~chatnpc(neutral, "Although I've retired as a Knight, and now live as a solitary monk. Also, I prefer to be known as brother rather than sir now. Half a moment, your cup of tea is ready."); + ~chatplayer("Are you any relation to Sir Galahad?"); + ~chatnpc("I AM Sir Galahad."); + ~chatnpc("Although I've retired as a Knight, and now live as a solitary monk. Also, I prefer to be known as brother rather than sir now. Half a moment, your cup of tea is ready."); case 2: - ~chatplayer(neutral, "Do you get lonely out here on your own?"); - ~chatnpc(neutral, "Sometimes I do, yes. Still not many people to share my solidarity with, as most of the religious men around here are worshippers of Saradomin. Half a moment, your cup of tea is ready."); + ~chatplayer("Do you get lonely out here on your own?"); + ~chatnpc("Sometimes I do, yes. Still not many people to share my solidarity with, as most of the religious men around here are worshippers of Saradomin. Half a moment, your cup of tea is ready."); case 3: - ~chatplayer(neutral, "I'm on a quest to find the Holy Grail!"); - ~chatnpc(neutral, "Ah... the Grail... yes... that did fill me with wonder! Oh, that I could have stayed forever! The spear, the food, the people..."); + ~chatplayer("I'm on a quest to find the Holy Grail!"); + ~chatnpc("Ah... the Grail... yes... that did fill me with wonder! Oh, that I could have stayed forever! The spear, the food, the people..."); @multi4("So how can I find it?", galahad_how, "What are you talking about?", galahad_what, "Why did you leave?", galahad_why_leave, "Why didn't you bring the Grail with you?", galahad_why_grail); case 4: - ~chatplayer(neutral, "I seek an item from the realm of the Fisher King."); - ~chatnpc(neutral, "Funny you should mention that, but when I left there I took this small cloth from the table as a keepsake."); + ~chatplayer("I seek an item from the realm of the Fisher King."); + ~chatnpc("Funny you should mention that, but when I left there I took this small cloth from the table as a keepsake."); @galahad_borrow_cloth; } @galahad_give_tea; [label,galahad_how] -~chatplayer(neutral, "So how can I find it?"); -~chatnpc(neutral, "I did not find it through looking - though admittedly I looked long and hard - eventually, it found me."); +~chatplayer("So how can I find it?"); +~chatnpc("I did not find it through looking - though admittedly I looked long and hard - eventually, it found me."); @multi4("What are you talking about?", galahad_what, "Why did you leave?", galahad_why_leave, "Why didn't you bring the Grail with you?", galahad_why_grail, "Well, I'd better be going then.", galahad_get_going); [label,galahad_what] -~chatplayer(neutral, "What are you talking about?"); -~chatnpc(neutral, "The Grail castle...|It's... hard to describe with words.|It mostly felt like a dream!"); +~chatplayer("What are you talking about?"); +~chatnpc("The Grail castle...|It's... hard to describe with words.|It mostly felt like a dream!"); @multi4("So how can I find it?", galahad_how, "Why did you leave?", galahad_why_leave, "Why didn't you bring the Grail with you?", galahad_why_grail, "Well, I'd better be going then.", galahad_get_going); [label,galahad_why_leave] -~chatplayer(neutral, "Why did you leave?"); -~chatnpc(neutral, "Apparently the time is getting close when the world will need Arthur and his knights of the round table again."); -~chatnpc(sad, "And that includes me."); -~chatnpc(neutral, "Leaving was tough for me,|so I took this small cloth from the table as a keepsake."); +~chatplayer("Why did you leave?"); +~chatnpc("Apparently the time is getting close when the world will need Arthur and his knights of the round table again."); +~chatnpc("And that includes me."); +~chatnpc("Leaving was tough for me,|so I took this small cloth from the table as a keepsake."); if(%grail_progress >= ^grail_spoken_crone & inv_total(inv, holy_table_napkin) = 0) { @galahad_borrow_cloth; } [label,galahad_why_grail] -~chatplayer(neutral, "Why didn't you bring the Grail with you?"); -~chatnpc(neutral, "...I'm not sure.|Because... it seemed to be... NEEDED in the Grail castle?|Half a moment, your cup of tea is ready."); +~chatplayer("Why didn't you bring the Grail with you?"); +~chatnpc("...I'm not sure.|Because... it seemed to be... NEEDED in the Grail castle?|Half a moment, your cup of tea is ready."); @galahad_give_tea; [label,galahad_get_going] -~chatplayer(neutral, "Well, I'd better be going then."); -~chatnpc(neutral, "Half a moment, your cup of tea is ready."); +~chatplayer("Well, I'd better be going then."); +~chatnpc("Half a moment, your cup of tea is ready."); ~mesbox("Sir Galahad gives you a cup of tea."); inv_add(inv, cup_of_tea, 1); -~chatnpc(neutral, "If you do come across any particularily difficult obstacles on your quest, do not hesitate to ask my advice."); -~chatnpc(neutral, "I know more about the realm of the Grail than many, and I have a feeling you may need to come back and speak to me anyway..."); +~chatnpc("If you do come across any particularily difficult obstacles on your quest, do not hesitate to ask my advice."); +~chatnpc("I know more about the realm of the Grail than many, and I have a feeling you may need to come back and speak to me anyway..."); [label,galahad_give_tea] ~mesbox("Sir Galahad gives you a cup of tea."); inv_add(inv, cup_of_tea, 1); [label,galahad_borrow_cloth] -~chatplayer(quiz, "I don't suppose I could borrow that?|It could come in useful on my quest."); +~chatplayer("I don't suppose I could borrow that?|It could come in useful on my quest."); ~mesbox("Galahad reluctantly passes you a small cloth."); inv_add(inv, holy_table_napkin, 1); diff --git a/data/src/scripts/areas/area_seers/scripts/hemenster/big_dave.rs2 b/data/src/scripts/areas/area_seers/scripts/hemenster/big_dave.rs2 index 42b204eaf..ce85c8199 100644 --- a/data/src/scripts/areas/area_seers/scripts/hemenster/big_dave.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/hemenster/big_dave.rs2 @@ -1,2 +1,2 @@ [opnpc1,big_dave] @big_dave_dialogue; -[label,big_dave_dialogue] ~chatnpc(angry, "Oi whaddya think ya doin'?|I'm fishin' here.|Now beat it!"); \ No newline at end of file +[label,big_dave_dialogue] ~chatnpc("Oi whaddya think ya doin'?|I'm fishin' here.|Now beat it!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/hemenster/bonzo.rs2 b/data/src/scripts/areas/area_seers/scripts/hemenster/bonzo.rs2 index 3b9e67bed..3c9a6641f 100644 --- a/data/src/scripts/areas/area_seers/scripts/hemenster/bonzo.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/hemenster/bonzo.rs2 @@ -1,7 +1,7 @@ [opnpc1,bonzo] if(%fishingcompo_progress = ^fishingcompo_started) { if(%hemenster_comp_stage = ^hemenster_comp_paidfee) { - ~chatplayer(neutral, "I'll enter the competition please."); + ~chatplayer("I'll enter the competition please."); @bonzo_set_places; } @bonzo_waiting_entry; @@ -13,29 +13,29 @@ if(%fishingcompo_progress = ^fishingcompo_in_comp | %fishingcompo_progress = ^fi } [label,bonzo_waiting_entry] -~chatnpc(happy, "Roll up, roll up!"); -~chatnpc(happy, "Enter the great Hemenster fishing competition!"); -~chatnpc(happy, "Only 5gp entrance fee!"); +~chatnpc("Roll up, roll up!"); +~chatnpc("Enter the great Hemenster fishing competition!"); +~chatnpc("Only 5gp entrance fee!"); def_int $option = ~p_choice2("I'll enter the competition please.", 1, "No thanks, I'll just watch the fun.", 2); if($option = 1) { - ~chatplayer(neutral, "I'll enter the competition please."); - ~chatnpc(happy, "Marvelous!"); + ~chatplayer("I'll enter the competition please."); + ~chatnpc("Marvelous!"); if(inv_total(inv, coins) < 5) { - ~chatplayer(sad, "I don't have the 5gp though..."); - ~chatnpc(angry, "No pay, no play."); + ~chatplayer("I don't have the 5gp though..."); + ~chatnpc("No pay, no play."); return; } inv_del(inv, coins, 5); %hemenster_comp_stage = ^hemenster_comp_paidfee; ~objbox(coins_250, "You pay Bonzo 5 coins."); - ~chatnpc(happy, "Ok, we've got all the fishermen!|It's time to roll!"); + ~chatnpc("Ok, we've got all the fishermen!|It's time to roll!"); @bonzo_set_places; } else if($option = 2) { - ~chatplayer(neutral, "No thanks, I'll just watch the fun."); + ~chatplayer("No thanks, I'll just watch the fun."); } [label,bonzo_set_places] -~chatnpc(neutral, "Ok, nearly everyone is in their place already.|You fish in the spot by the willow tree,|and the Sinister Stranger, you fish by the pipes."); +~chatnpc("Ok, nearly everyone is in their place already.|You fish in the spot by the willow tree,|and the Sinister Stranger, you fish by the pipes."); if(%hemenster_pipe_stashed = true) { @move_hemenster_pipe; } @@ -43,12 +43,12 @@ if(%hemenster_pipe_stashed = true) { ~mesbox("Your fishing competition spot is beside the willow tree."); [label,bonzo_howdoing] -~chatnpc(happy, "So how are you doing so far?"); +~chatnpc("So how are you doing so far?"); if(%hemenster_comp_stage = ^hemenster_comp_paidfee) { // fee paid, no fish caught yet - ~chatplayer(confused, "I think I might still be able to find a bigger fish."); + ~chatplayer("I think I might still be able to find a bigger fish."); return; } -~chatplayer(happy, "I caught some fish! Here..."); +~chatplayer("I caught some fish! Here..."); @bonzo_handover_catch; [label,bonzo_handover_catch] @@ -58,39 +58,39 @@ if(inv_total(inv, raw_giant_carp) > 0) { inv_del(inv, raw_giant_carp, 3); %fishingcompo_progress = ^fishingcompo_won_comp; inv_add(inv, fishing_trophy, 1); - ~chatnpc(happy, "We have a new winner!|The heroic-looking person who was fishing by the pipes|has caught the biggest carp|I've seen since Grandpa Jack used to compete!"); + ~chatnpc("We have a new winner!|The heroic-looking person who was fishing by the pipes|has caught the biggest carp|I've seen since Grandpa Jack used to compete!"); ~objboxb(fishing_trophy, "You are given the Hemenster fishing trophy!"); } else { inv_del(inv, raw_sardine, 3); %fishingcompo_progress = ^fishingcompo_started; %hemenster_comp_stage = ^hemenster_comp_not_entered; - ~chatnpc(happy, "And the winner is... The stranger in black!"); + ~chatnpc("And the winner is... The stranger in black!"); } [label,bonzo_quits] -~chatnpc(neutral, "So you're calling it quits here for now?"); +~chatnpc("So you're calling it quits here for now?"); def_int $option = ~p_choice2("Yes I'll compete again another day.", 1, "Actually I'll go back and catch some more.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes I'll compete again another day."); + ~chatplayer("Yes I'll compete again another day."); %fishingcompo_progress = ^fishingcompo_started; // in OSRS this sets to paid w/no fish caught, in RSC you have to pay again so we'll copy that %hemenster_comp_stage = ^hemenster_comp_not_entered; p_teleport(movecoord(loc_coord, 1, 0, 0)); ~open_fishingcompo_gate; } else if($option = 2) { - ~chatplayer(neutral, "Actually I'll go back and catch some more."); - ~chatnpc(happy, "Good luck!"); + ~chatplayer("Actually I'll go back and catch some more."); + ~chatnpc("Good luck!"); } [label,bonzo_champ] -~chatnpc(happy, "Hello champ!"); +~chatnpc("Hello champ!"); if(%fishingcompo_progress = ^fishingcompo_won_comp & inv_total(inv, fishing_trophy) = 0) { - ~chatplayer(sad, "I don't feel like a champ..."); - ~chatnpc(quiz, "Why not champ?"); - ~chatplayer(sad, "I lost my fishing trophy..."); - ~chatnpc(happy, "Is that all chump? Don't worry, I have a spare!"); + ~chatplayer("I don't feel like a champ..."); + ~chatnpc("Why not champ?"); + ~chatplayer("I lost my fishing trophy..."); + ~chatnpc("Is that all chump? Don't worry, I have a spare!"); inv_add(inv, fishing_trophy, 1); return; } -~chatnpc(happy, "So any hints on how to fish?"); -~chatplayer(neutral, "I think I'll keep them to myself."); \ No newline at end of file +~chatnpc("So any hints on how to fish?"); +~chatplayer("I think I'll keep them to myself."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/hemenster/grandpa_jack.rs2 b/data/src/scripts/areas/area_seers/scripts/hemenster/grandpa_jack.rs2 index 7f5bc07dd..22ef74c86 100644 --- a/data/src/scripts/areas/area_seers/scripts/hemenster/grandpa_jack.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/hemenster/grandpa_jack.rs2 @@ -1,35 +1,35 @@ [opnpc1,grandpa_jack] def_string $gender = text_gender("man", "lady"); -~chatnpc(happy, "Hello young <$gender>!|Come to visit old Grandpa Jack?|I can tell ye stories for sure.|I used to be the best fisherman these parts have seen!"); +~chatnpc("Hello young <$gender>!|Come to visit old Grandpa Jack?|I can tell ye stories for sure.|I used to be the best fisherman these parts have seen!"); def_int $option; switch_int (%fishingcompo_progress) { case ^fishingcompo_started,^fishingcompo_in_comp,^fishingcompo_garlic_comp: $option = ~p_choice3("Tell me a story then.", 1, "Are you entering the fishing competition?", 3, "Sorry, I don't have time now.", 2); case default: $option = ~p_choice2("Tell me a story then.", 1, "Sorry, I don't have time now.", 2); } if($option = 1) { - ~chatplayer(neutral, "Tell me a story then."); - ~chatnpc(happy, "Well, when I were a young man|we used to take fishing trips over to Catherby;|The fishing over there - now that was something!"); - ~chatnpc(happy, "Anyway, we decided to do a bit of fishing with our nets,|I wasn't having the best of days|turning up nothing but old boots and bits of seaweed.|Then my net suddenly got really heavy!"); - ~chatnpc(neutral, "I pulled it up..."); - ~chatnpc(happy, "To my amazement I'd caught this little chest thing!"); - ~chatnpc(happy, "Even more amazing was when I opened it|it contained a diamond the size of a radish!|That's the best catch I've ever had!"); + ~chatplayer("Tell me a story then."); + ~chatnpc("Well, when I were a young man|we used to take fishing trips over to Catherby;|The fishing over there - now that was something!"); + ~chatnpc("Anyway, we decided to do a bit of fishing with our nets,|I wasn't having the best of days|turning up nothing but old boots and bits of seaweed.|Then my net suddenly got really heavy!"); + ~chatnpc("I pulled it up..."); + ~chatnpc("To my amazement I'd caught this little chest thing!"); + ~chatnpc("Even more amazing was when I opened it|it contained a diamond the size of a radish!|That's the best catch I've ever had!"); } else if($option = 2) { - ~chatplayer(neutral, "Sorry, I don't have time now."); - ~chatnpc(sad, "Sigh..."); - ~chatnpc(neutral, "Young people - always in such a rush."); + ~chatplayer("Sorry, I don't have time now."); + ~chatnpc("Sigh..."); + ~chatnpc("Young people - always in such a rush."); } else if($option = 3) { - ~chatplayer(neutral, "Are you entering the fishing competition?"); - ~chatnpc(happy, "Ah... the Hemenster fishing competition..."); - ~chatnpc(happy, "I know all about that... I won that four years straight! I'm too old for that lark now though..."); + ~chatplayer("Are you entering the fishing competition?"); + ~chatnpc("Ah... the Hemenster fishing competition..."); + ~chatnpc("I know all about that... I won that four years straight! I'm too old for that lark now though..."); $option = ~p_choice2("I don't suppose you could give me any hints?", 1, "That's less competition for me then.", 2); if($option = 1) { - ~chatplayer(confused, "I don't suppose you could give me any hints?"); - ~chatnpc(happy, "Well, you sometimes get these really big fish|in the water just by the outflow pipes."); - ~chatnpc(neutral, "I think they're some kind of carp..."); - ~chatnpc(happy, "Try to get a spot round there.|The best sort of bait for them is red vine worms."); - ~chatnpc(happy, "I used to get those from McGrubor's wood, north of here. Just dig around in the red vines up there."); + ~chatplayer("I don't suppose you could give me any hints?"); + ~chatnpc("Well, you sometimes get these really big fish|in the water just by the outflow pipes."); + ~chatnpc("I think they're some kind of carp..."); + ~chatnpc("Try to get a spot round there.|The best sort of bait for them is red vine worms."); + ~chatnpc("I used to get those from McGrubor's wood, north of here. Just dig around in the red vines up there."); // no garlic advice here i'm assuming } else if($option = 2) { - ~chatplayer(confused, "That's less competition for me then."); + ~chatplayer("That's less competition for me then."); } } \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/hemenster/joshua.rs2 b/data/src/scripts/areas/area_seers/scripts/hemenster/joshua.rs2 index 0c819c294..11bbae799 100644 --- a/data/src/scripts/areas/area_seers/scripts/hemenster/joshua.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/hemenster/joshua.rs2 @@ -1,2 +1,2 @@ [opnpc1,joshua] @joshua_dialogue; -[label,joshua_dialogue] ~chatnpc(angry, "This is my fishing spot.|Ya don't wanna be fishing 'ere mate.|Cos I'll break your knuckles!"); \ No newline at end of file +[label,joshua_dialogue] ~chatnpc("This is my fishing spot.|Ya don't wanna be fishing 'ere mate.|Cos I'll break your knuckles!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/hemenster/sinister_stranger.rs2 b/data/src/scripts/areas/area_seers/scripts/hemenster/sinister_stranger.rs2 index 6475cba37..5b41a8bc1 100644 --- a/data/src/scripts/areas/area_seers/scripts/hemenster/sinister_stranger.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/hemenster/sinister_stranger.rs2 @@ -1,44 +1,44 @@ [opnpc1,sinister_stranger] -~chatnpc(confused, "..."); +~chatnpc("..."); def_int $option = ~p_choice3("...?", 1, "Who are you?", 2, "So... you like fishing?", 3); if($option = 1) { - ~chatplayer(confused, "...?"); - ~chatnpc(confused, "..."); + ~chatplayer("...?"); + ~chatnpc("..."); } else if($option = 2) { - ~chatplayer(neutral, "Who are you?"); - ~chatnpc(neutral, "My name iz Vlad. I come from far avay, vere the sun iz not so bright."); + ~chatplayer("Who are you?"); + ~chatnpc("My name iz Vlad. I come from far avay, vere the sun iz not so bright."); @multi2("You're a vampire aren't you?", sinister_stranger_vampire, "Is it nice there?", sinister_stranger_nice); } else if($option = 3) { @sinister_stranger_fishing; } [label,sinister_stranger_vampire] -~chatplayer(confused, "You're a vampire aren't you?"); -~chatnpc(angry, "Just because I can't stand the smell of garlic|and I don't like bright sunlight|doesn't necessarily mean I'm a vampire!"); +~chatplayer("You're a vampire aren't you?"); +~chatnpc("Just because I can't stand the smell of garlic|and I don't like bright sunlight|doesn't necessarily mean I'm a vampire!"); [label,sinister_stranger_nice] -~chatplayer(neutral, "Is it nice there?"); -~chatnpc(happy, "It is vonderful!|The vomen are beautiful|and the nights are long!"); +~chatplayer("Is it nice there?"); +~chatnpc("It is vonderful!|The vomen are beautiful|and the nights are long!"); @multi3("You're a vampire aren't you?", sinister_stranger_vampire, "So you like fishing?", sinister_stranger_fishing, "Well, good look with the fishing.", sinister_stranger_luck); [label,sinister_stranger_fishing] -~chatplayer(neutral, "So... you like fishing?"); -~chatnpc(neutral, "My doctor told me to take up a velaxing hobby.|Vhen I am stressed I tend to get a little.."); -~chatnpc(angry, "..thirsty."); +~chatplayer("So... you like fishing?"); +~chatnpc("My doctor told me to take up a velaxing hobby.|Vhen I am stressed I tend to get a little.."); +~chatnpc("..thirsty."); @multi3("You're a vampire aren't you?", sinister_stranger_vampire, "If you get thirsty you should drink something.", sinister_stranger_thirsty, "Well, good look with the fishing.", sinister_stranger_luck); [label,sinister_stranger_thirsty] -~chatplayer(neutral, "If you get thirsty you should drink something."); -~chatnpc(happy, "I think I may do that soon..."); +~chatplayer("If you get thirsty you should drink something."); +~chatnpc("I think I may do that soon..."); [label,sinister_stranger_luck] -~chatplayer(neutral, "Well, good luck with the fishing."); -~chatnpc(angry, "Luck has nothing to do vith it|it is all in the technique."); +~chatplayer("Well, good luck with the fishing."); +~chatnpc("Luck has nothing to do vith it|it is all in the technique."); [label,sinister_stranger_my_spot] -~chatnpc(angry, "I think you will find that is my spot."); +~chatnpc("I think you will find that is my spot."); // pipes spot only if(%fishingcompo_progress = ^fishingcompo_in_comp) { - ~chatplayer(confused, "Can't you go to another spot?"); - ~chatnpc(angry, "I like this place.|I like to savour the aroma coming from these pipes."); + ~chatplayer("Can't you go to another spot?"); + ~chatnpc("I like this place.|I like to savour the aroma coming from these pipes."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/mcgrubors_wood.rs2 b/data/src/scripts/areas/area_seers/scripts/mcgrubors_wood.rs2 index a98802c71..d8f80e33a 100644 --- a/data/src/scripts/areas/area_seers/scripts/mcgrubors_wood.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/mcgrubors_wood.rs2 @@ -4,7 +4,7 @@ if(coordz(coord) > coordz(loc_coord)) { sound_synth(locked, 0, 0); return; } -~chatnpc_specific("Forester", forester_mcgrubor, angry, "Hey! You can't come through here!|This is private land!"); +~chatnpc_specific("Forester", forester_mcgrubor, "Hey! You can't come through here!|This is private land!"); ~mesbox("You will need to find another way in."); [oploc1,loc_51] diff --git a/data/src/scripts/areas/area_seers/scripts/poison_salesman.rs2 b/data/src/scripts/areas/area_seers/scripts/poison_salesman.rs2 index 00017927d..f67cd5e4a 100644 --- a/data/src/scripts/areas/area_seers/scripts/poison_salesman.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/poison_salesman.rs2 @@ -1,10 +1,10 @@ [opnpc1,poison_salesman] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(sad, "I'm afraid I'm all sold out of poison at the moment. People know a bargain when they see it!"); + ~chatnpc("I'm afraid I'm all sold out of poison at the moment. People know a bargain when they see it!"); case ^murder_started: - ~chatplayer(neutral, "I'm investigating the murder at the Sinclair house."); - ~chatnpc(neutral, "There was a murder at the Sinclair House??? That's terrible! And I was only there the other day too! They bought the last of my Patented Multi Purpose Poison!"); + ~chatplayer("I'm investigating the murder at the Sinclair house."); + ~chatnpc("There was a murder at the Sinclair House??? That's terrible! And I was only there the other day too! They bought the last of my Patented Multi Purpose Poison!"); def_int $choice; if(inv_total(inv, pungent_pot) > 0) { $choice = ~p_choice4("Patented Multi Purpose Poison?", 1, "Who did you sell Poison to at the house?", 2, "Can I buy some Poison?", 3, "I have this pot I found at the murder scene...", 4); @@ -13,37 +13,37 @@ switch_int(%murder_progress) { } switch_int($choice) { case 1: - ~chatplayer(neutral, "Patented Multi Purpose Poison?"); - ~chatnpc(neutral, "Aaaaah... a miracle of modern apothecaries!"); - ~chatnpc(happy, "This exclusive concoction has been tested on all known forms of life and been proven to kill them all in varying dilutions from cockroaches to king dragons!"); - ~chatnpc(happy, "So incredibly versatile, it can be used as pest control, a cleansing agent, drain cleaner, metal polish and washes whiter than white,"); - ~chatnpc(happy, "all with our uniquely fragrant concoction that is immediately recognisable across the land as Peter Potter's Patented Poison potion!!!"); + ~chatplayer("Patented Multi Purpose Poison?"); + ~chatnpc("Aaaaah... a miracle of modern apothecaries!"); + ~chatnpc("This exclusive concoction has been tested on all known forms of life and been proven to kill them all in varying dilutions from cockroaches to king dragons!"); + ~chatnpc("So incredibly versatile, it can be used as pest control, a cleansing agent, drain cleaner, metal polish and washes whiter than white,"); + ~chatnpc("all with our uniquely fragrant concoction that is immediately recognisable across the land as Peter Potter's Patented Poison potion!!!"); ~mesbox("The salesman stops for breath."); - ~chatnpc(neutral, "I'd love to sell you some but I've sold out recently. That's just how good it is! Three hundred and twenty eight people in this area alone cannot be wrong!"); - ~chatnpc(neutral, "Nine out of Ten poisoners prefer it in controlled tests!"); - ~chatnpc(neutral, "Can I help you with anything else?"); - ~chatnpc(neutral, "Perhaps I can take your name and add it to our mailing list of poison users? We will only send you information related to the use of poison and other Peter Potter Products!"); - ~chatplayer(confused, "Uh... no, it's ok. Really."); + ~chatnpc("I'd love to sell you some but I've sold out recently. That's just how good it is! Three hundred and twenty eight people in this area alone cannot be wrong!"); + ~chatnpc("Nine out of Ten poisoners prefer it in controlled tests!"); + ~chatnpc("Can I help you with anything else?"); + ~chatnpc("Perhaps I can take your name and add it to our mailing list of poison users? We will only send you information related to the use of poison and other Peter Potter Products!"); + ~chatplayer("Uh... no, it's ok. Really."); case 2: - ~chatplayer(neutral, "Who did you sell Poison to at the house?"); - ~chatnpc(happy, "Well, Peter Potter's Patented Multi Purpose Poison is a product of such obvious quality that I am glad to say I managed to sell a bottle to each of the Sinclairs!"); - ~chatnpc(happy, "Anna, Bob, Carol, David, Elizabeth and Frank all bought a bottle! In fact they bought the last of my supplies!"); + ~chatplayer("Who did you sell Poison to at the house?"); + ~chatnpc("Well, Peter Potter's Patented Multi Purpose Poison is a product of such obvious quality that I am glad to say I managed to sell a bottle to each of the Sinclairs!"); + ~chatnpc("Anna, Bob, Carol, David, Elizabeth and Frank all bought a bottle! In fact they bought the last of my supplies!"); %murder_poisonproof_progress = ^poisonproof_spoken_salesman; - ~chatnpc(happy, "Maybe I can take your name and address and I will personally come and visit you when stocks return?"); - ~chatplayer(confused, "Uh... no, it's ok."); + ~chatnpc("Maybe I can take your name and address and I will personally come and visit you when stocks return?"); + ~chatplayer("Uh... no, it's ok."); case 3: - ~chatplayer(neutral, "Can I buy some Poison?"); - ~chatnpc(neutral, "I'm afraid I am totally out of stock at the moment after my successful trip to the Sinclairs' House the other day."); - ~chatnpc(happy, "But don't worry! Our factories are working overtime to produce Peter Potter's Patented Multi Purpose Poison!"); - ~chatnpc(happy, "Possibly the finest multi purpose poison and cleaner yet available to the general market."); - ~chatnpc(happy, "And its unique fragrance makes it the number one choice for cleaners and exterminators the whole country over!"); + ~chatplayer("Can I buy some Poison?"); + ~chatnpc("I'm afraid I am totally out of stock at the moment after my successful trip to the Sinclairs' House the other day."); + ~chatnpc("But don't worry! Our factories are working overtime to produce Peter Potter's Patented Multi Purpose Poison!"); + ~chatnpc("Possibly the finest multi purpose poison and cleaner yet available to the general market."); + ~chatnpc("And its unique fragrance makes it the number one choice for cleaners and exterminators the whole country over!"); case 4: - ~chatplayer(neutral, "I have this pot I found at the murder scene..."); + ~chatplayer("I have this pot I found at the murder scene..."); ~mesbox("You show the poison salesman the pot you found at the murder scene with the unusual smell."); - ~chatnpc(confused, "Hmmm... yes, that smells exactly like my Patented Multi Purpose Poison, but I don't see how it could be. It quite clearly says on the label of all bottles"); - ~chatnpc(confused, "'Not to be taken internally - EXTREMELY POISONOUS'."); - ~chatplayer(confused, "Perhaps someone else put it in his wine?"); - ~chatnpc(confused, "Yes... I suppose that could have happened..."); + ~chatnpc("Hmmm... yes, that smells exactly like my Patented Multi Purpose Poison, but I don't see how it could be. It quite clearly says on the label of all bottles"); + ~chatnpc("'Not to be taken internally - EXTREMELY POISONOUS'."); + ~chatplayer("Perhaps someone else put it in his wine?"); + ~chatnpc("Yes... I suppose that could have happened..."); } - case ^murder_complete: ~chatnpc(neutral, "I hear you're pretty smart to have solved the Sinclair Murder!"); + case ^murder_complete: ~chatnpc("I hear you're pretty smart to have solved the Sinclair Murder!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/seer.rs2 b/data/src/scripts/areas/area_seers/scripts/seer.rs2 index 93b5079ff..c504d3289 100644 --- a/data/src/scripts/areas/area_seers/scripts/seer.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/seer.rs2 @@ -27,32 +27,32 @@ switch_int (%scorpcatcher_progress) { @multi2("Many greetings.", seer_many_greetings, "I seek knowledge and power!", seer_knowledge_and_power); } -[proc,seers_greetings] ~chatnpc(happy, "Many greetings."); +[proc,seers_greetings] ~chatnpc("Many greetings."); [label,seer_many_greetings] -~chatplayer(happy, "Many greetings."); -~chatnpc(happy, "Remember, whenever you set out to do something, something else must be done first."); +~chatplayer("Many greetings."); +~chatnpc("Remember, whenever you set out to do something, something else must be done first."); [label,seer_knowledge_and_power] -~chatplayer(neutral, "I seek knowledge and power!"); -~chatnpc(neutral, "Knowledge comes from experience, power comes from battleaxes."); +~chatplayer("I seek knowledge and power!"); +~chatnpc("Knowledge comes from experience, power comes from battleaxes."); [label,seer_locate_scorp] -~chatplayer(neutral, "I need to locate some scorpions."); -~chatnpc(happy, "Well you have come to the right place.|I am a master of animal detection."); -~chatnpc(quiz, "Do you need to locate any particular scorpion?|Scorpions are a creature somewhat in abundance."); -~chatplayer(neutral, "I'm looking for some lesser Kharid scorpions.|They belong to Thormac the Sorcerer."); +~chatplayer("I need to locate some scorpions."); +~chatnpc("Well you have come to the right place.|I am a master of animal detection."); +~chatnpc("Do you need to locate any particular scorpion?|Scorpions are a creature somewhat in abundance."); +~chatplayer("I'm looking for some lesser Kharid scorpions.|They belong to Thormac the Sorcerer."); @seer_looking_glass; [label,seer_thormac] -~chatplayer(happy, "Your friend Thormac sent me to speak to you."); -~chatnpc(quiz, "What does the old fellow want?"); -~chatplayer(sad, "He's lost his valuable lesser Kharid scorpions."); -~chatnpc(happy, "Well you have come to the right place.|I am a master of animal detection."); +~chatplayer("Your friend Thormac sent me to speak to you."); +~chatnpc("What does the old fellow want?"); +~chatplayer("He's lost his valuable lesser Kharid scorpions."); +~chatnpc("Well you have come to the right place.|I am a master of animal detection."); @seer_looking_glass; [label,seer_looking_glass] -~chatnpc(neutral, "Let me look into my looking glass."); +~chatnpc("Let me look into my looking glass."); if_close; mes("The seer produces a small mirror"); p_delay(3); @@ -60,28 +60,28 @@ mes("The seer gazes into the mirror"); p_delay(3); mes("The seer smoothes his hair with his hand"); p_delay(3); -~chatnpc(confused, "I can see a scorpion that you seek.|It would appear to be near some nasty spiders.|I can see two coffins there as well."); +~chatnpc("I can see a scorpion that you seek.|It would appear to be near some nasty spiders.|I can see two coffins there as well."); %scorpcatcher_progress = ^scorpcatcher_first_hint; -~chatnpc(confused, "The scorpion seems to be going through some crack in the wall. It's gone into some sort of secret room."); -~chatnpc(neutral, "Well see if you can find that scorpion then, and I'll try and get you some information on the others."); +~chatnpc("The scorpion seems to be going through some crack in the wall. It's gone into some sort of secret room."); +~chatnpc("Well see if you can find that scorpion then, and I'll try and get you some information on the others."); [label,seer_where_scorp] -~chatplayer(quiz, "Where did you say that scorpion was again?"); +~chatplayer("Where did you say that scorpion was again?"); @seer_looking_glass; [label,seer_first_scorp] -~chatplayer(happy, "Hi, I've retrieved the scorpion from near the spiders."); -~chatnpc(confused, "Well, I've checked my looking glass.|There seems to be a kharid scorpion in a little village in the east,|surrounded by lots of uncivilised-looking warriors.|Some kind of merchant there seems to have picked it up."); -~chatnpc(neutral, "That's all I can tell you about that scorpion."); +~chatplayer("Hi, I've retrieved the scorpion from near the spiders."); +~chatnpc("Well, I've checked my looking glass.|There seems to be a kharid scorpion in a little village in the east,|surrounded by lots of uncivilised-looking warriors.|Some kind of merchant there seems to have picked it up."); +~chatnpc("That's all I can tell you about that scorpion."); %scorpcatcher_progress = ^scorpcatcher_second_hint; -~chatplayer(happy, "Any more scorpions?"); -~chatnpc(neutral, "It's good that you should ask.|I have information on the last scorpion for you."); +~chatplayer("Any more scorpions?"); +~chatnpc("It's good that you should ask.|I have information on the last scorpion for you."); @seer_last_scorp; [label,seer_second_scorp] -~chatplayer(happy, "I've retrieved the second scorpion."); -~chatnpc(neutral, "That's lucky because I've got some information on the last scorpion for you."); +~chatplayer("I've retrieved the second scorpion."); +~chatnpc("That's lucky because I've got some information on the last scorpion for you."); @seer_last_scorp; [label,seer_last_scorp] -~chatnpc(confused, "It seems to be in some sort of upstairs room.|There seems to be some sort of brown clothing lying on a table."); \ No newline at end of file +~chatnpc("It seems to be in some sort of upstairs room.|There seems to be some sort of brown clothing lying on a table."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/stankers.rs2 b/data/src/scripts/areas/area_seers/scripts/stankers.rs2 index 2a184acf7..6230a3993 100644 --- a/data/src/scripts/areas/area_seers/scripts/stankers.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/stankers.rs2 @@ -1,25 +1,25 @@ [opnpc1,stankers] -~chatnpc(happy, "Hello bold adventurer."); +~chatnpc("Hello bold adventurer."); switch_int(~p_choice2("Are these your trucks?", 1, "Hello Mr. Stankers.", 2)) { case 1: - ~chatplayer(neutral, "Are these your trucks?"); - ~chatnpc(happy, "Yes, I use them to transport coal over the river.|I will let other people use them too,|I'm a nice person like that..."); - ~chatnpc(happy, "Just put coal in a truck and I'll move it down to my depot over the river."); + ~chatplayer("Are these your trucks?"); + ~chatnpc("Yes, I use them to transport coal over the river.|I will let other people use them too,|I'm a nice person like that..."); + ~chatnpc("Just put coal in a truck and I'll move it down to my depot over the river."); case 2: - ~chatplayer(happy, "Hello Mr. Stankers."); - ~chatnpc(neutral, "Would you like a poison chalice?"); + ~chatplayer("Hello Mr. Stankers."); + ~chatnpc("Would you like a poison chalice?"); @multi3("Yes please.", stankers_yes, "What's a poison chalice?", stankers_what, "No thank you.", stankers_no); } [label,stankers_yes] -~chatplayer(happy, "Yes please."); +~chatplayer("Yes please."); inv_add(inv, poison_chalice, 1); mes("Stankers hands you a glass of strangely coloured liquid..."); [label,stankers_what] -~chatplayer(confused, "What's a poison chalice?"); -~chatnpc(neutral, "It's an exciting drink I've invented.|I don't know what it tastes like,|I haven't tried it myself."); +~chatplayer("What's a poison chalice?"); +~chatnpc("It's an exciting drink I've invented.|I don't know what it tastes like,|I haven't tried it myself."); @multi2("Yes please.", stankers_yes, "No thank you.", stankers_no); [label,stankers_no] -~chatplayer(neutral, "No thank you."); \ No newline at end of file +~chatplayer("No thank you."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_seers/scripts/thormac.rs2 b/data/src/scripts/areas/area_seers/scripts/thormac.rs2 index 121c8a43b..d54ad5e15 100644 --- a/data/src/scripts/areas/area_seers/scripts/thormac.rs2 +++ b/data/src/scripts/areas/area_seers/scripts/thormac.rs2 @@ -9,48 +9,48 @@ switch_int (%scorpcatcher_progress) { // COMMENTED OUT FOR NOW: Not sure if this is an OSRS update, you can only start the quest if the barcrawl has been previously completed // (this doesn't include if you use a dupe card to redo the barcrawl, which is why i'm checking it like this) //if(testbit(%barcrawl_progress, 1) = false) { -// ~chatnpc(neutral, "Hello I am Thormac the sorcerer."); -// ~chatplayer(quiz, "Do you need anything?"); -// ~chatnpc(neutral, "Not right now, but thank you for offering."); +// ~chatnpc("Hello I am Thormac the sorcerer."); +// ~chatplayer("Do you need anything?"); +// ~chatnpc("Not right now, but thank you for offering."); // ~mesbox("You do not meet all of the requirements to start|the Scorpion Catcher quest."); // return; //} -~chatnpc(neutral, "Hello I am Thormac the sorcerer.|I don't suppose you could be of assistance to me?"); +~chatnpc("Hello I am Thormac the sorcerer.|I don't suppose you could be of assistance to me?"); switch_int(~p_choice2("What do you need assistance with?", 1, "I'm a little busy.", 2)) { case 1: - ~chatplayer(quiz, "What do you need assistance with?"); - ~chatnpc(sad, "I've lost my pet scorpions.|They're lesser Kharid scorpions, a very rare breed."); - ~chatnpc(sad, "I left their cage door open,|now I don't know where they've gone."); - ~chatnpc(neutral, "There's three of them, and they're quick little beasties. They're all over RuneScape."); + ~chatplayer("What do you need assistance with?"); + ~chatnpc("I've lost my pet scorpions.|They're lesser Kharid scorpions, a very rare breed."); + ~chatnpc("I left their cage door open,|now I don't know where they've gone."); + ~chatnpc("There's three of them, and they're quick little beasties. They're all over RuneScape."); @multi3("So how would I go about catching them then?", thormac_how_catch, "What's in it for me?", thormac_for_me, "I'm not interested then.", thormac_not_interest); - case 2: ~chatplayer(neutral, "I'm a little busy."); + case 2: ~chatplayer("I'm a little busy."); } [label,thormac_how_catch] -~chatplayer(quiz, "So how would I go about catching them then?"); +~chatplayer("So how would I go about catching them then?"); if(inv_total(inv, scorpion_cage_empty) > 0) { - ~chatnpc(neutral, "Well you have the scorpion cage I gave you,|you can catch them using that."); + ~chatnpc("Well you have the scorpion cage I gave you,|you can catch them using that."); } else { - ~chatnpc(neutral, "Well I have a scorpion cage here|which you can use to catch them in."); + ~chatnpc("Well I have a scorpion cage here|which you can use to catch them in."); if_close; inv_add(inv, scorpion_cage_empty, 1); mes("Thormac gives you a cage."); p_delay(4); // RSC has this as 3 ticks, based off this it's prob 5 here: https://youtu.be/wpCnoBA5d1w?si=p4viTMMFsviVo5Gx&t=46 } -~chatnpc(neutral, "If you go up to the village of Seers, to the North of here, one of them will be able to tell you where the scorpions are now."); +~chatnpc("If you go up to the village of Seers, to the North of here, one of them will be able to tell you where the scorpions are now."); @multi2("What's in it for me?", thormac_for_me, "Ok, I will do it then", thormac_startquest); [label,thormac_for_me] -~chatplayer(quiz, "What's in it for me?"); -~chatnpc(neutral, "Well I suppose I can aid you with my skills as a staff sorcerer. Most battlestaffs around here are pretty puny. I can beef them up for you a bit."); +~chatplayer("What's in it for me?"); +~chatnpc("Well I suppose I can aid you with my skills as a staff sorcerer. Most battlestaffs around here are pretty puny. I can beef them up for you a bit."); @multi2("What's in it for me?", thormac_for_me, "Ok, I will do it then", thormac_startquest); [label,thormac_not_interest] -~chatplayer(neutral, "I'm not interested."); -~chatnpc(sad, "Blast! I suppose I'll have to find someone else then."); +~chatplayer("I'm not interested."); +~chatnpc("Blast! I suppose I'll have to find someone else then."); [label,thormac_startquest] -~chatplayer(happy, "Ok, I will do it then."); +~chatplayer("Ok, I will do it then."); // Not sure about this but can't find any videos of the whats in it for me -> ok path (changed from OSRS last year) // in which you wouldnt the cage before starting the quest, wiki from 2021 says the cage is added to your inv here if(inv_total(inv, scorpion_cage_empty) = 0) { @@ -61,16 +61,16 @@ if(inv_total(inv, scorpion_cage_empty) = 0) { ~send_quest_progress(questlist:scorpcatcher, %scorpcatcher_progress, ^scorpcatcher_complete); [label,thormac_how_goes] -~chatnpc(quiz, "How goes your quest?"); +~chatnpc("How goes your quest?"); if(inv_total(inv,scorpion_cage_all) > 0) { - ~chatplayer(happy, "I have retrieved all your scorpions."); - ~chatnpc(happy, "Aha, my little scorpions home at last!"); + ~chatplayer("I have retrieved all your scorpions."); + ~chatnpc("Aha, my little scorpions home at last!"); queue(scorpcatcher_quest_complete, 0); return; } if(inv_total(bank, scorpion_cage_all) > 0) { - ~chatplayer(sad, "I've not brought all the scorpions with me."); - ~chatnpc(neutral, "Well go and fetch them then."); + ~chatplayer("I've not brought all the scorpions with me."); + ~chatnpc("Well go and fetch them then."); return; } if(inv_totalcat(inv, scorpcage) = 0 & inv_totalcat(bank, scorpcage) = 0) { @@ -80,46 +80,46 @@ if(inv_totalcat(inv, scorpcage) = 0 & inv_totalcat(bank, scorpcage) = 0) { } [label,thormac_lost_cage] -~chatplayer(sad, "I've lost my cage."); -~chatnpc(neutral, "Ok, here's another cage."); +~chatplayer("I've lost my cage."); +~chatnpc("Ok, here's another cage."); if(inv_freespace(inv) = 0) { - ~chatplayer(sad, "Oh, wait, I don't have space to carry one."); - ~chatnpc(neutral, "Then you had better free some space and come back!"); + ~chatplayer("Oh, wait, I don't have space to carry one."); + ~chatnpc("Then you had better free some space and come back!"); return; } inv_add(inv, scorpion_cage_empty, 1); -~chatnpc(laugh, "You're almost as bad at losing things as me."); +~chatnpc("You're almost as bad at losing things as me."); [label,thormac_not_yet] -~chatplayer(sad, "I've not caught all the scorpions yet."); -~chatnpc(neutral, "Well remember to go speak to the Seers, North of here, if you need any help."); +~chatplayer("I've not caught all the scorpions yet."); +~chatnpc("Well remember to go speak to the Seers, North of here, if you need any help."); [label,thormac_thankyou] -~chatnpc(happy, "Thank you for rescuing my scorpions."); +~chatnpc("Thank you for rescuing my scorpions."); def_int $option = ~p_choice2("That's ok.", 1, "You said you'd enchant my battlestaff for me.", 2); if($option = 1) { - ~chatplayer(happy, "That's ok."); + ~chatplayer("That's ok."); } else if($option = 2) { // 1-1 with RSC but changed battlestaff names to match RS2 - ~chatplayer(quiz, "You said you'd enchant my battlestaff for me."); - ~chatnpc(neutral, "Yes, it'll cost you 40,000 coins for the materials needed though. Which sort of staff did you want enchanting?"); + ~chatplayer("You said you'd enchant my battlestaff for me."); + ~chatnpc("Yes, it'll cost you 40,000 coins for the materials needed though. Which sort of staff did you want enchanting?"); switch_int (~p_choice5("Fire battlestaff.", 1, "Water battlestaff.", 2, "Air battlestaff.", 3, "Earth battlestaff.", 4, "I won't bother yet actually.", 5)) { case 1: @thormac_makestaff("Fire battlestaff", fire_battlestaff, mystic_fire_staff); case 2: @thormac_makestaff("Water battlestaff", water_battlestaff, mystic_water_staff); case 3: @thormac_makestaff("Air battlestaff", air_battlestaff, mystic_air_staff); case 4: @thormac_makestaff("Earth battlestaff", earth_battlestaff, mystic_earth_staff); - case 5: ~chatplayer(neutral, "I won't bother yet actually."); + case 5: ~chatplayer("I won't bother yet actually."); } } [label,thormac_makestaff](string $staff_name, namedobj $bstaff, namedobj $enchantedstaff) -~chatplayer(happy, "<$staff_name> please."); +~chatplayer("<$staff_name> please."); if(inv_total(inv, $bstaff) = 0) { - ~chatplayer(sad, "I don't have <~add_article(lowercase($staff_name))> yet though."); + ~chatplayer("I don't have <~add_article(lowercase($staff_name))> yet though."); return; } if(inv_total(inv, coins) < 40000) { - ~chatplayer(sad, "I'll just get the money for you."); + ~chatplayer("I'll just get the money for you."); return; } inv_del(inv, coins, 40000); diff --git a/data/src/scripts/areas/area_shilo/scripts/fernahei.rs2 b/data/src/scripts/areas/area_shilo/scripts/fernahei.rs2 index d7cbb5853..acadad962 100644 --- a/data/src/scripts/areas/area_shilo/scripts/fernahei.rs2 +++ b/data/src/scripts/areas/area_shilo/scripts/fernahei.rs2 @@ -1,12 +1,12 @@ [opnpc1,fernahei] -~chatnpc(default, "Welcome to Fernahei's Fishing Shop Bwana!|Would you like to see my items?"); +~chatnpc("Welcome to Fernahei's Fishing Shop Bwana!|Would you like to see my items?"); def_int $option = ~p_choice2("Yes please!", 1, "No, but thanks for the offer.", 2); switch_int ($option) { case 1: - ~chatplayer(happy, "Yes please!"); + ~chatplayer("Yes please!"); ~openshop_activenpc; case 2: - ~chatplayer(default, "No, but thanks for the offer."); - ~chatnpc(default, "That's fine and thanks for your interest."); + ~chatplayer("No, but thanks for the offer."); + ~chatnpc("That's fine and thanks for your interest."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_shilo/scripts/obli.rs2 b/data/src/scripts/areas/area_shilo/scripts/obli.rs2 index ee0025d7a..74d4781ad 100644 --- a/data/src/scripts/areas/area_shilo/scripts/obli.rs2 +++ b/data/src/scripts/areas/area_shilo/scripts/obli.rs2 @@ -1,11 +1,11 @@ [opnpc1,obli] -~chatnpc(default, "Welcome to Obli's General Store Bwana!|Would you like to see my items?"); +~chatnpc("Welcome to Obli's General Store Bwana!|Would you like to see my items?"); def_int $option = ~p_choice2("Yes please!", 1, "No, but thanks for the offer.", 2); switch_int ($option) { case 1: - ~chatplayer(happy, "Yes please!"); + ~chatplayer("Yes please!"); ~openshop_activenpc; case 2: - ~chatplayer(default, "No, but thanks for the offer."); + ~chatplayer("No, but thanks for the offer."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_taverly/dungeon/scripts/velrak_the_explorer.rs2 b/data/src/scripts/areas/area_taverly/dungeon/scripts/velrak_the_explorer.rs2 index 15c063f15..11cbbe303 100644 --- a/data/src/scripts/areas/area_taverly/dungeon/scripts/velrak_the_explorer.rs2 +++ b/data/src/scripts/areas/area_taverly/dungeon/scripts/velrak_the_explorer.rs2 @@ -1,25 +1,25 @@ [opnpc1,velrak_the_explorer] if(inv_total(inv, dusty_key) > 0) { - ~chatplayer(quiz, "Are you still here?"); - ~chatnpc(sad, "Yes... I'm still plucking up the courage|to run out past those Black Knights.."); + ~chatplayer("Are you still here?"); + ~chatnpc("Yes... I'm still plucking up the courage|to run out past those Black Knights.."); return; } -~chatnpc(happy, "Thank you for rescuing me!|It isn't very comfy in this cell!"); +~chatnpc("Thank you for rescuing me!|It isn't very comfy in this cell!"); def_int $option = ~p_choice2("So... do you know anywhere good to explore?", 1, "Do I get a reward?", 2); if($option = 1) { - ~chatplayer(quiz, "So... do you know anywhere good to explore?"); - ~chatnpc(sad, "Well, this dungeon was quite good to explore|...until I got captured, anyway.|I was given a key to an inner part of this dungeon|by a mysterious cloaked stranger!"); - ~chatnpc(sad, "It's rather tough for me to get that far into the dungeon however... I just keep getting captured!|Would you like to give it a go?"); + ~chatplayer("So... do you know anywhere good to explore?"); + ~chatnpc("Well, this dungeon was quite good to explore|...until I got captured, anyway.|I was given a key to an inner part of this dungeon|by a mysterious cloaked stranger!"); + ~chatnpc("It's rather tough for me to get that far into the dungeon however... I just keep getting captured!|Would you like to give it a go?"); $option = ~p_choice2("Yes please!", 1, "Do I get a reward?", 2); if($option = 1) { - ~chatplayer(happy, "Yes please!"); + ~chatplayer("Yes please!"); inv_add(inv, dusty_key, 1); ~mesbox("Velrak reaches somewhere mysterious and passes you a key."); } else if($option = 2) { - ~chatplayer(confused, "No, it's too dangerous for me too."); - ~chatnpc(neutral, "I don't blame you!"); + ~chatplayer("No, it's too dangerous for me too."); + ~chatnpc("I don't blame you!"); } } else if($option = 2) { - ~chatplayer(quiz, "Do I get a reward? For freeing you and all..."); - ~chatnpc(sad, "Well... not really... The Black Knights took all of my stuff before throwing me in here to rot!"); + ~chatplayer("Do I get a reward? For freeing you and all..."); + ~chatnpc("Well... not really... The Black Knights took all of my stuff before throwing me in here to rot!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_taverly/scripts/boy.rs2 b/data/src/scripts/areas/area_taverly/scripts/boy.rs2 index 0c2c11b65..927b6116f 100644 --- a/data/src/scripts/areas/area_taverly/scripts/boy.rs2 +++ b/data/src/scripts/areas/area_taverly/scripts/boy.rs2 @@ -1,38 +1,38 @@ [opnpc1,boy] switch_int(%ball_progress) { case ^ball_not_started: - ~chatplayer(happy, "Hello young man."); + ~chatplayer("Hello young man."); ~mesbox("The boy sobs."); switch_int(~p_choice2("What's the matter?", 1, "Well if you're not going to answer, I'll go.", 2)) { case 1: - ~chatplayer(quiz, "What's the matter?"); - ~chatnpc(sad, "I've kicked my ball over that hedge, into that garden!|The old lady who lives there is scary...|She's locked the ball in her wooden shed!|Can you get my ball back for me please?"); + ~chatplayer("What's the matter?"); + ~chatnpc("I've kicked my ball over that hedge, into that garden!|The old lady who lives there is scary...|She's locked the ball in her wooden shed!|Can you get my ball back for me please?"); switch_int(~p_choice2("Ok, I'll see what I can do.", 1, "Get it back yourself.", 2)) { case 1: %ball_progress = ^ball_started; ~send_quest_progress(questlist:ball, %ball_progress, ^ball_complete); - ~chatplayer(neutral, "Ok, I'll see what I can do."); - ~chatnpc(happy, "Thanks !"); + ~chatplayer("Ok, I'll see what I can do."); + ~chatnpc("Thanks !"); case 2: - ~chatplayer(angry, "Get it back yourself."); - ~chatnpc(angry, "You're a meany!"); + ~chatplayer("Get it back yourself."); + ~chatnpc("You're a meany!"); ~mesbox("The boy starts crying again."); } case 2: - ~chatplayer(angry, "Well if you're not going to answer, I'll go."); + ~chatplayer("Well if you're not going to answer, I'll go."); ~mesbox("The boy sniffs slightly."); } case ^ball_complete: - ~chatnpc(happy, "Thank you for getting my ball back!"); + ~chatnpc("Thank you for getting my ball back!"); case default: if(inv_total(inv, boy_ball) > 0) { - ~chatplayer(neutral, "Hi, I have got your ball back. It was MUCH harder than I thought it would be."); + ~chatplayer("Hi, I have got your ball back. It was MUCH harder than I thought it would be."); ~mesbox("You give the ball back."); - ~chatnpc(happy, "Thank you so much!"); + ~chatnpc("Thank you so much!"); queue(ball_quest_complete, 0); return; } - ~chatnpc(quiz, "Have you got my ball back yet?"); - ~chatplayer(sad, "Not yet."); - ~chatnpc(angry, "Well, it's in the shed in that garden."); + ~chatnpc("Have you got my ball back yet?"); + ~chatplayer("Not yet."); + ~chatnpc("Well, it's in the shed in that garden."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_taverly/scripts/gaius.rs2 b/data/src/scripts/areas/area_taverly/scripts/gaius.rs2 index 45b047cab..8400950bc 100644 --- a/data/src/scripts/areas/area_taverly/scripts/gaius.rs2 +++ b/data/src/scripts/areas/area_taverly/scripts/gaius.rs2 @@ -2,18 +2,18 @@ if(inv_total(inv, trail_clue_easy_simple_exp023) = 1) { @trail_gaius; } -~chatnpc(happy, "Welcome to my two-handed sword shop."); +~chatnpc("Welcome to my two-handed sword shop."); def_int $option = ~p_choice2("Let's trade.", 1, "Thanks, but not today.", 2); if($option = 1) { - ~chatplayer(neutral, "Let's trade."); + ~chatplayer("Let's trade."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "Thanks, but not today."); - ~chatnpc(happy, "Very well, but do please call again."); + ~chatplayer("Thanks, but not today."); + ~chatnpc("Very well, but do please call again."); } [label,trail_gaius] -~chatnpc("default", "Here you go."); +~chatnpc("Here you go."); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp021, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_taverly/scripts/jatix.rs2 b/data/src/scripts/areas/area_taverly/scripts/jatix.rs2 index 023786f25..a7582c502 100644 --- a/data/src/scripts/areas/area_taverly/scripts/jatix.rs2 +++ b/data/src/scripts/areas/area_taverly/scripts/jatix.rs2 @@ -1,11 +1,11 @@ [opnpc1,jatix] -~chatnpc(neutral, "Hello, how can I help you?"); +~chatnpc("Hello, how can I help you?"); def_int $option = ~p_choice3("What are you selling?", 1, "You can't; I'm beyond help.", 2, "I'm okay, thank you.", 3); if($option = 1) { - ~chatplayer(neutral, "What are you selling?"); + ~chatplayer("What are you selling?"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(sad, "You can't; I'm beyond help."); + ~chatplayer("You can't; I'm beyond help."); } else if($option = 3) { - ~chatplayer(neutral, "I'm okay, thank you."); + ~chatplayer("I'm okay, thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_taverly/scripts/kaqemeex.rs2 b/data/src/scripts/areas/area_taverly/scripts/kaqemeex.rs2 index 2b01a628f..586640b26 100644 --- a/data/src/scripts/areas/area_taverly/scripts/kaqemeex.rs2 +++ b/data/src/scripts/areas/area_taverly/scripts/kaqemeex.rs2 @@ -1,56 +1,56 @@ [opnpc1,kaqemeex] -~chatplayer("neutral", "Hello there."); +~chatplayer("Hello there."); if(%druid_progress = 0) { - ~chatnpc("quiz", "What bring you to our holy monument?"); + ~chatnpc("What bring you to our holy monument?"); @multi3("Who are you?", kaqemeex_who_are_you, "I'm in search of a quest.", druidic_ritual_start_1, "Did you build this?", kaqemeex_did_you_build); } else if(%druid_progress = 3) { @druid_completion; } else if(%druid_progress = ^druid_complete) { // TODO - dialogue from RSC, haven't been able to find any dialogue from RS2, before release of skillcapes. - ~chatnpc(neutral, "Hello again. How is the Herblore going?"); + ~chatnpc("Hello again. How is the Herblore going?"); def_int $option = ~p_choice3("Very well, thank you.", 1, "I need more practice at it.", 2, "Can you explain the fundamentals again?", 3); if($option = 1) { - ~chatplayer(quiz, "Very well thank you."); - ~chatnpc(quiz, "That is good to hear."); + ~chatplayer("Very well thank you."); + ~chatnpc("That is good to hear."); } else if($option = 2) { - ~chatplayer(neutral, "I need more practice at it..."); - ~chatnpc(neutral, "Persistence is key to success."); + ~chatplayer("I need more practice at it..."); + ~chatnpc("Persistence is key to success."); } else if($option = 3) { - ~chatplayer(neutral, "Can you explain the fundamentals again?"); - ~chatnpc(neutral, "Indeed I will..."); - ~chatnpc(neutral, "Herblore is the skill of working with herbs and other|ingredients, to make useful potions and poison."); - ~chatnpc(neutral, "First you will need a vial, which can be found or made|with the crafting skill."); - ~chatnpc(neutral, "Then you must gather the herbs needed to make the|potion you want."); - ~chatnpc(neutral, "You must fill your vial with water and add the|ingredients you need. There are normally 2 ingredients|to each type of potion."); - ~chatnpc(neutral, "Bear in mind, you must first clean each herb before|you can use it."); - ~chatnpc(neutral, "You may also have to grind some ingredients before|you can use them. You will need a pestle and mortar|in order to do this."); - ~chatnpc(neutral, "Herbs can be found on the ground, and are also|dropped by some monsters when you kill them."); - ~chatnpc(neutral, "Let's try an example Attack potion: The first ingredient|is Guam leaf; the next is Eye of Newt."); - ~chatnpc(neutral, "Mix these in your water-filled vial, and you will produce|an Attack potion. Drink this potion to increase your|Attack level."); - ~chatnpc(neutral, "Different potions also require different Herblore levels|before you can make them."); - ~chatnpc(neutral, "Good luck with your Herblore practices, and a good day to you."); - ~chatplayer(neutral, "Thanks for your help."); + ~chatplayer("Can you explain the fundamentals again?"); + ~chatnpc("Indeed I will..."); + ~chatnpc("Herblore is the skill of working with herbs and other|ingredients, to make useful potions and poison."); + ~chatnpc("First you will need a vial, which can be found or made|with the crafting skill."); + ~chatnpc("Then you must gather the herbs needed to make the|potion you want."); + ~chatnpc("You must fill your vial with water and add the|ingredients you need. There are normally 2 ingredients|to each type of potion."); + ~chatnpc("Bear in mind, you must first clean each herb before|you can use it."); + ~chatnpc("You may also have to grind some ingredients before|you can use them. You will need a pestle and mortar|in order to do this."); + ~chatnpc("Herbs can be found on the ground, and are also|dropped by some monsters when you kill them."); + ~chatnpc("Let's try an example Attack potion: The first ingredient|is Guam leaf; the next is Eye of Newt."); + ~chatnpc("Mix these in your water-filled vial, and you will produce|an Attack potion. Drink this potion to increase your|Attack level."); + ~chatnpc("Different potions also require different Herblore levels|before you can make them."); + ~chatnpc("Good luck with your Herblore practices, and a good day to you."); + ~chatplayer("Thanks for your help."); } } [label,kaqemeex_who_are_you] -~chatplayer("quiz", "Who are you?"); -~chatnpc("neutral", "We are the druids of Guthix. We worship our got at|our famous stone circles."); +~chatplayer("Who are you?"); +~chatnpc("We are the druids of Guthix. We worship our got at|our famous stone circles."); @multi3("What about the stone circle full of dark wizards?", druidic_ritual_start_2, "So what's so good about Guthix?", kaqemeex_about_guthix, "Well, I'll be on my way now.", kaqemeex_leaving_now); [label,kaqemeex_did_you_build] -~chatplayer("quiz", "Did you build this?"); -~chatnpc("default", "What, personally? No, of course I didn't. However, out|forefathers did. The first Druids of Guthix built many|stone circles across these lands over eight hundred|years ago."); -~chatnpc("sad", "Unfortunately we only know of two remaining, and of|those only one is usable by us anymore."); +~chatplayer("Did you build this?"); +~chatnpc("What, personally? No, of course I didn't. However, out|forefathers did. The first Druids of Guthix built many|stone circles across these lands over eight hundred|years ago."); +~chatnpc("Unfortunately we only know of two remaining, and of|those only one is usable by us anymore."); @multi3("What about the stone circle full of dark wizards?", druidic_ritual_start_2, "I'm in search of a quest.", druidic_ritual_start_1, "Well, I'll be on my way now.", kaqemeex_leaving_now); [label,kaqemeex_leaving_now] -~chatplayer("neutral", "Well, I'll be on my way now."); -~chatnpc("neutral", "Goodbye adventurer. I feel we shall meet again."); +~chatplayer("Well, I'll be on my way now."); +~chatnpc("Goodbye adventurer. I feel we shall meet again."); [label,kaqemeex_about_guthix] -~chatplayer("quiz", "So what's so good about Guthix?"); -~chatnpc("neutral", "Guthix is the oldest and most powerful god in Gielinor.|His existence is vital to this world. He is the god of|balande, and nature; he is also a very part of this world."); -~chatnpc("default", "He exists in the tree, and the flowers, the water and|the rocks. He is everywhere. His purpose is to ensure|balande in everything in this world, and as such we|worship him."); -~chatplayer("confused", "He sounds kind of boring..."); -~chatnpc("neutral", "Some day when your mind achieve enlightenment you|will see the true beauty of his power."); \ No newline at end of file +~chatplayer("So what's so good about Guthix?"); +~chatnpc("Guthix is the oldest and most powerful god in Gielinor.|His existence is vital to this world. He is the god of|balande, and nature; he is also a very part of this world."); +~chatnpc("He exists in the tree, and the flowers, the water and|the rocks. He is everywhere. His purpose is to ensure|balande in everything in this world, and as such we|worship him."); +~chatplayer("He sounds kind of boring..."); +~chatnpc("Some day when your mind achieve enlightenment you|will see the true beauty of his power."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_taverly/scripts/lady_of_the_lake.rs2 b/data/src/scripts/areas/area_taverly/scripts/lady_of_the_lake.rs2 index 4c1941768..61bdac4ee 100644 --- a/data/src/scripts/areas/area_taverly/scripts/lady_of_the_lake.rs2 +++ b/data/src/scripts/areas/area_taverly/scripts/lady_of_the_lake.rs2 @@ -1,5 +1,5 @@ [opnpc1,lady_of_the_lake] -~chatnpc(neutral, "Good day to you ."); +~chatnpc("Good day to you ."); def_int $option; if(%arthur_progress >= ^arthur_spoken_morgan_lefaye & ~obj_gettotal(excalibur) = 0) { $option = ~p_choice3("Who are you?", 1, "Good day.", 2, "I seek the sword Excalibur.", 3); @@ -8,36 +8,36 @@ if(%arthur_progress >= ^arthur_spoken_morgan_lefaye & ~obj_gettotal(excalibur) = } switch_int($option) { case 1: - ~chatplayer(neutral, "Who are you?"); - ~chatnpc(neutral, "I am the Lady of the Lake."); + ~chatplayer("Who are you?"); + ~chatnpc("I am the Lady of the Lake."); case 2: - ~chatplayer(neutral, "Good day."); + ~chatplayer("Good day."); case 3: - ~chatplayer(confused, "I seek the sword Excalibur."); - ~chatnpc(neutral, "Aye, I have that artefact in my possession."); - ~chatnpc(neutral, "'Tis very valuable, and not an artefact to be given away lightly."); - ~chatnpc(neutral, "I would want to give it away only to one who is worthy and good."); + ~chatplayer("I seek the sword Excalibur."); + ~chatnpc("Aye, I have that artefact in my possession."); + ~chatnpc("'Tis very valuable, and not an artefact to be given away lightly."); + ~chatnpc("I would want to give it away only to one who is worthy and good."); if(%arthur_progress = ^arthur_freed_merlin) { - ~chatnpc(neutral, "...But you have already proved thyself to be worthy of wielding it once already. I shall return it to you if you can prove yourself to still be worthy."); - ~chatplayer(quiz, "...And how can I do that?"); - ~chatnpc(neutral, "Why, by proving yourself to be above material goods."); - ~chatplayer(quiz, "...And how can I do that?"); - ~chatnpc(happy, "500 gold coins ought to do it."); + ~chatnpc("...But you have already proved thyself to be worthy of wielding it once already. I shall return it to you if you can prove yourself to still be worthy."); + ~chatplayer("...And how can I do that?"); + ~chatnpc("Why, by proving yourself to be above material goods."); + ~chatplayer("...And how can I do that?"); + ~chatnpc("500 gold coins ought to do it."); if(inv_total(inv, coins) < 500) { - ~chatplayer(sad, "I don't have that kind of money..."); - ~chatnpc(neutral, "Well, come back when you do."); + ~chatplayer("I don't have that kind of money..."); + ~chatnpc("Well, come back when you do."); return; } - ~chatplayer(happy, "Ok, here you go."); - ~chatnpc(happy, "You are still worthy to wield Excalibur! And thanks for the cash! I felt like getting a new haircut!"); + ~chatplayer("Ok, here you go."); + ~chatnpc("You are still worthy to wield Excalibur! And thanks for the cash! I felt like getting a new haircut!"); inv_del(inv, coins, 500); inv_add(inv, excalibur, 1); return; } - ~chatplayer(quiz, "And how am I meant to prove that?"); - ~chatnpc(neutral, "I shall set a test for you."); - ~chatnpc(neutral, "First I need you to travel to Port Sarim.|Then go to the upstairs room of the jeweller's shop there."); - ~chatplayer(happy, "Ok. That seems easy enough."); + ~chatplayer("And how am I meant to prove that?"); + ~chatnpc("I shall set a test for you."); + ~chatnpc("First I need you to travel to Port Sarim.|Then go to the upstairs room of the jeweller's shop there."); + ~chatplayer("Ok. That seems easy enough."); // OSRS probably uses a seperate varp for this since you can reset by retalking to the lady %excalibur_components_progress = clearbit_range(%excalibur_components_progress, ^excalibur_started, ^excalibur_rewarded); %excalibur_components_progress = setbit(%excalibur_components_progress, ^excalibur_started); diff --git a/data/src/scripts/areas/area_taverly/scripts/sanfew.rs2 b/data/src/scripts/areas/area_taverly/scripts/sanfew.rs2 index a6d78bc30..f13b2036c 100644 --- a/data/src/scripts/areas/area_taverly/scripts/sanfew.rs2 +++ b/data/src/scripts/areas/area_taverly/scripts/sanfew.rs2 @@ -1,5 +1,5 @@ [opnpc1,sanfew] -~chatnpc("quiz", "What can I do for you young 'un?"); +~chatnpc("What can I do for you young 'un?"); if(%druid_progress = 1) { @multi2("I've been sent to help purify the Varrock stone circle.", druid_sanfew_information, "Actually I don't need to speak to you.", sanfew_dont_need); } else if(%druid_progress = 2) { @@ -11,13 +11,13 @@ if(%druid_progress = 1) { } [label,sanfew_teach_herblore] -~chatplayer(quiz, "So... I've heard you druids might be able to teach me herblore..."); -~chatnpc(neutral, "Herblore eh? You're probably best off talking to Kaqemeex about that; he's the best herblore teacher we currently have. I believe at the moment he's at out stone circle just North of here."); -~chatplayer(happy, "Thanks."); +~chatplayer("So... I've heard you druids might be able to teach me herblore..."); +~chatnpc("Herblore eh? You're probably best off talking to Kaqemeex about that; he's the best herblore teacher we currently have. I believe at the moment he's at out stone circle just North of here."); +~chatplayer("Thanks."); [label,sanfew_dont_need] -~chatplayer(confused, "Actually, I don't need to speak to you."); -~chatnpc(neutral, "Well, we all make mistakes sometimes."); +~chatplayer("Actually, I don't need to speak to you."); +~chatnpc("Well, we all make mistakes sometimes."); if(%druid_progress > 2) { // guess they made a label with the exact same dialogue? mes("Sanfew grunts."); } else { @@ -25,5 +25,5 @@ if(%druid_progress > 2) { // guess they made a label with the exact same dialogu } [label,sanfew_more_work] -~chatplayer(quiz, "Have you any more work for me to help reclaim the stone circle?"); -~chatnpc(neutral, "Well, not right now I don't think young 'un. In fact, I need to make some more preparations myself for the ritual. Rest assured, if I need any more help I will ask you again."); \ No newline at end of file +~chatplayer("Have you any more work for me to help reclaim the stone circle?"); +~chatnpc("Well, not right now I don't think young 'un. In fact, I need to make some more preparations myself for the ritual. Rest assured, if I need any more help I will ask you again."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/apothecary.rs2 b/data/src/scripts/areas/area_varrock/scripts/apothecary.rs2 index 72611b482..f426c430b 100644 --- a/data/src/scripts/areas/area_varrock/scripts/apothecary.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/apothecary.rs2 @@ -9,18 +9,18 @@ if(%romeojuliet_progress = ^romeojuliet_spoken_father) { } [label,apothecary_standard] -~chatnpc(neutral, "I am the Apothecary."); -~chatnpc(neutral, "I have potions to brew.|Do you need anything specific?"); +~chatnpc("I am the Apothecary."); +~chatnpc("I have potions to brew.|Do you need anything specific?"); switch_int(~p_choice3("Can you make a strength potion?", 1, "Do you know any potion to make hair fall out?", 2, "Have you got any good potions to give away?", 3)) { case 1: - ~chatplayer(neutral, "Can you make a strength potion?"); + ~chatplayer("Can you make a strength potion?"); if(inv_total(inv, limpwurt_root) > 0 & inv_total(inv, red_spiders_eggs) > 0 & inv_total(inv, coins) > 4) { - ~chatplayer(happy, "I have the root and spiders eggs needed to make it."); - ~chatnpc(neutral, "Well give me them and 5 gold and I'll make you your potion."); + ~chatplayer("I have the root and spiders eggs needed to make it."); + ~chatnpc("Well give me them and 5 gold and I'll make you your potion."); def_int $option = ~p_choice2("Yes ok.", 1, "No thanks.", 2); if($option = 1) { - ~chatplayer(happy, "Yes ok."); + ~chatplayer("Yes ok."); ~mesbox("You give a limpwurt root, some red spider|eggs and 5 coins to the Apothecary.|The Apothecary brews up a potion."); inv_del(inv, red_spiders_eggs, 1); inv_del(inv, limpwurt_root, 1); @@ -28,29 +28,29 @@ switch_int(~p_choice3("Can you make a strength potion?", 1, "Do you know any pot inv_add(inv, 4dose1strength, 1); ~mesbox("The Apothecary gives you a strength potion."); } else if($option = 2) { - ~chatplayer(neutral, "No thanks."); + ~chatplayer("No thanks."); } } else { - ~chatnpc(happy, "Yes. But the ingredients are a little hard to find.|If you ever get them I will make it for you, for a cost."); - ~chatplayer(quiz, "So what are the ingredients?"); - ~chatnpc(neutral, "You'll need to find to find the eggs of the deadly red spider and a limpwurt root."); - ~chatnpc(neutral, "Oh and you'll have to pay me 5 coins."); - ~chatplayer(happy, "Ok, I'll look out for them."); + ~chatnpc("Yes. But the ingredients are a little hard to find.|If you ever get them I will make it for you, for a cost."); + ~chatplayer("So what are the ingredients?"); + ~chatnpc("You'll need to find to find the eggs of the deadly red spider and a limpwurt root."); + ~chatnpc("Oh and you'll have to pay me 5 coins."); + ~chatplayer("Ok, I'll look out for them."); } case 2: - ~chatplayer(happy, "Do you know a potion to make hair fall out?"); - ~chatnpc(happy, "I do indeed. I gave it to my mother.|That's why I now live alone."); + ~chatplayer("Do you know a potion to make hair fall out?"); + ~chatnpc("I do indeed. I gave it to my mother.|That's why I now live alone."); case 3: - ~chatplayer(happy, "Have you got any good potions to give away?"); + ~chatplayer("Have you got any good potions to give away?"); if(random(2) = 0) { if(inv_total(inv, potion) > 0) { - ~chatnpc(happy, "Only that spot cream. Hope you enjoy it."); + ~chatnpc("Only that spot cream. Hope you enjoy it."); return; } inv_add(inv, potion, 1); - ~chatnpc(neutral, "Ok then. Try this potion."); + ~chatnpc("Ok then. Try this potion."); } else { - ~chatnpc(sad, "Sorry, charity is not my strong point."); + ~chatnpc("Sorry, charity is not my strong point."); } } @@ -59,22 +59,22 @@ if(inv_total(inv, cadaver) > 0) { @apothecary_standard; } if(inv_total(inv, cadaver_berries) > 0) { - ~chatnpc(happy, "Well done. You have the berries."); + ~chatnpc("Well done. You have the berries."); ~mesbox("You hand over the berries,|which the Apothecary shakes up in|a vial of strange liquid."); - ~chatnpc(happy, "Here is what you need."); + ~chatnpc("Here is what you need."); inv_del(inv, cadaver_berries, 1); inv_add(inv, cadaver, 1); ~mesbox("The Apothecary gives you a Cadaver potion."); } else { - ~chatnpc(neutral, "Keep searching for the berries.|They are needed for the potion."); + ~chatnpc("Keep searching for the berries.|They are needed for the potion."); } [label,apothecary_lawrence_sent] -~chatplayer(neutral, "Apothecary. Father Lawrence sent me."); -~chatplayer(neutral, "I need a Cadaver potion to help Romeo and Juliet."); -~chatnpc(neutral, "Cadaver potion. It's pretty nasty. And hard to make."); -~chatnpc(neutral, "Wing of rat, tail of frog.|Ear of snake and horn of dog."); -~chatnpc(neutral, "I have all of that, but I need some Cadaver berries."); -~chatnpc(neutral, "You will have to find them while I get the rest ready."); -~chatnpc(neutral, "Bring them here when you have them.|But be careful. They are nasty."); +~chatplayer("Apothecary. Father Lawrence sent me."); +~chatplayer("I need a Cadaver potion to help Romeo and Juliet."); +~chatnpc("Cadaver potion. It's pretty nasty. And hard to make."); +~chatnpc("Wing of rat, tail of frog.|Ear of snake and horn of dog."); +~chatnpc("I have all of that, but I need some Cadaver berries."); +~chatnpc("You will have to find them while I get the rest ready."); +~chatnpc("Bring them here when you have them.|But be careful. They are nasty."); %romeojuliet_progress = ^romeojuliet_spoken_apothecary; diff --git a/data/src/scripts/areas/area_varrock/scripts/aubury.rs2 b/data/src/scripts/areas/area_varrock/scripts/aubury.rs2 index 600e9eec9..a3392743c 100644 --- a/data/src/scripts/areas/area_varrock/scripts/aubury.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/aubury.rs2 @@ -4,7 +4,7 @@ if (~rune_mysteries_handle_aubury = true) { return; } -~chatnpc(quiz, "Do you want to buy some runes?"); +~chatnpc("Do you want to buy some runes?"); def_int $choice = ~p_choice3("Yes please!", 1, "Oh, it's a rune shop. No thank you, then.", 2, "Can you teleport me to the Rune Essence?", 3); @@ -16,12 +16,12 @@ if ($choice = 1) { return; } -~chatplayer(happy, "Can you teleport me to the Rune Essence?"); +~chatplayer("Can you teleport me to the Rune Essence?"); @teleport_to_essence_mine(^essence_mine_to_aubury); [label,aubury_rune_shop] -~chatplayer(happy, "Oh, it's a rune shop. No thank you, then."); -~chatnpc(happy, "Well, if you find someone who does want runes, please send them my way."); +~chatplayer("Oh, it's a rune shop. No thank you, then."); +~chatnpc("Well, if you find someone who does want runes, please send them my way."); [proc,rune_mysteries_handle_aubury](boolean) @@ -33,7 +33,7 @@ return(false); [label,rune_mysteries_aubury] // aubury cannot teleport until this quest is complete if (%runemysteries_progress = 0 | %runemysteries_progress = 1) { - ~chatnpc(quiz, "Do you want to buy some runes?"); + ~chatnpc("Do you want to buy some runes?"); def_int $choice = ~p_choice2("Yes please!", 1, "Oh, it's a rune shop. No thank you, then.", 2); if ($choice = 1) { ~openshop_activenpc; @@ -46,7 +46,7 @@ if (%runemysteries_progress = 0 | %runemysteries_progress = 1) { } if (%runemysteries_progress = 2 & inv_total(inv, research_package) > 0) { - ~chatnpc(quiz, "Do you want to buy some runes?"); + ~chatnpc("Do you want to buy some runes?"); def_int $choice = ~p_choice3("Yes please!", 1, "Oh, it's a rune shop. No thank you, then.", 2, "I have been sent here with a package for you.", 3); if ($choice = 1) { @@ -58,18 +58,18 @@ if (%runemysteries_progress = 2 & inv_total(inv, research_package) > 0) { return; } - ~chatplayer(neutral, "I have been sent here with a package for you. It's from the head wizard at the Wizards' Tower."); - ~chatnpc(neutral, "Really? But... surely he can't have..? Please, let me have it, it must be extremely important for him to have sent a stranger."); + ~chatplayer("I have been sent here with a package for you. It's from the head wizard at the Wizards' Tower."); + ~chatnpc("Really? But... surely he can't have..? Please, let me have it, it must be extremely important for him to have sent a stranger."); inv_del(inv, research_package, 1); %runemysteries_progress = 3; ~mesbox("You hand Aubury the research package."); - ~chatnpc(neutral, "This... is incredible. Please, give me a few moments to quickly look over this, and then talk to me again."); + ~chatnpc("This... is incredible. Please, give me a few moments to quickly look over this, and then talk to me again."); return; } if(%runemysteries_progress = 3) { - ~chatnpc(neutral, "My gratitude to you adventurer for bringing me these research notes. I notice that you brought the head wizard a special talisman that was the key to our finally unlocking the puzzle."); - ~chatnpc(neutral, "Combined with the information I had already already collated regarding the Rune Essence, I think we have finally unlocked the power to"); - ~chatnpc(neutral, "...no. I am getting ahead of myself. Please take this summary of my research back to the head wizard at the Wizards' Tower. I trust his judgement on whether to let you in on our little secret or not."); + ~chatnpc("My gratitude to you adventurer for bringing me these research notes. I notice that you brought the head wizard a special talisman that was the key to our finally unlocking the puzzle."); + ~chatnpc("Combined with the information I had already already collated regarding the Rune Essence, I think we have finally unlocked the power to"); + ~chatnpc("...no. I am getting ahead of myself. Please take this summary of my research back to the head wizard at the Wizards' Tower. I trust his judgement on whether to let you in on our little secret or not."); ~mesbox("Aubury gives you his research notes."); if (inv_freespace(inv) = 0) { ~objbox(notes, "Aubury tries to hand you the Research Notes, but you don't have enough room to take them."); @@ -80,17 +80,17 @@ if(%runemysteries_progress = 3) { return; } if(%runemysteries_progress = 4) { - ~chatnpc(neutral, "I suggest you take those research notes of mine back to the head wizard at the Wizards' Tower."); + ~chatnpc("I suggest you take those research notes of mine back to the head wizard at the Wizards' Tower."); if(~obj_gettotal(notes) = 0) { - ~chatplayer(neutral, "I can't... I lost them..."); - ~chatplayer(neutral, "Well, luckily I have duplicates. It's a good thing they are written in code, I would not want the wrong kind of person to get access to the information contained within."); + ~chatplayer("I can't... I lost them..."); + ~chatplayer("Well, luckily I have duplicates. It's a good thing they are written in code, I would not want the wrong kind of person to get access to the information contained within."); if (inv_freespace(inv) = 0) { ~objbox(notes, "Aubury tries to hand you the Research Notes, but you don't have enough room to take them."); return; } inv_add(inv, notes, 1); } else { - ~chatplayer(neutral, "Ok then, I will do that."); + ~chatplayer("Ok then, I will do that."); } return; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/baraek.rs2 b/data/src/scripts/areas/area_varrock/scripts/baraek.rs2 index 26869a64d..a15a8aa25 100644 --- a/data/src/scripts/areas/area_varrock/scripts/baraek.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/baraek.rs2 @@ -19,104 +19,104 @@ if(%phoenixgang_progress = 3) { // you wont get options for selling both furs wh } } [label,baraek_sell_fur] -~chatplayer(quiz, "Can you sell me some furs?"); -~chatnpc(neutral, "Yeah, sure. They're 20 gold coins each."); +~chatplayer("Can you sell me some furs?"); +~chatnpc("Yeah, sure. They're 20 gold coins each."); switch_int(~p_choice2("Yeah, Okay, here you go.", 1, "20 gold coins? That's an outrage!", 2)) { case 1: - ~chatplayer(neutral, "Yeah, OK, here you go."); + ~chatplayer("Yeah, OK, here you go."); if(inv_total(inv, coins) < 20) { - ~chatplayer(sad, "Oh dear, I don't have enough money!"); - ~chatnpc(neutral, "Well, my best price is 18 coins."); + ~chatplayer("Oh dear, I don't have enough money!"); + ~chatnpc("Well, my best price is 18 coins."); def_int $option = ~p_choice2("OK, here you go.", 1, "No thanks, I'll leave it.", 2); if($option = 1) { - ~chatplayer(neutral, "OK, here you go."); + ~chatplayer("OK, here you go."); if(inv_total(inv, coins) < 18) { - ~chatplayer(sad, "Oh dear, I don't have that either."); - ~chatnpc(sad, "Well, I can't go any cheaper than that mate.|I have a family to feed."); + ~chatplayer("Oh dear, I don't have that either."); + ~chatnpc("Well, I can't go any cheaper than that mate.|I have a family to feed."); return; } inv_add(inv, bear_fur, 1); ~objboxt(bear_fur, "Baraek sells you a fur."); } else if($option = 2) { - ~chatplayer(neutral, "No thanks, I'll leave it."); - ~chatnpc(neutral, "It's your loss mate."); + ~chatplayer("No thanks, I'll leave it."); + ~chatnpc("It's your loss mate."); } return; } inv_add(inv, bear_fur, 1); ~objbox(bear_fur, "Baraek sells you a fur."); case 2: - ~chatplayer(angry, "20 gold coins? That's an outrage!"); - ~chatnpc(sad, "Well, I can't go any cheaper than that mate.|I have a family to feed."); + ~chatplayer("20 gold coins? That's an outrage!"); + ~chatnpc("Well, I can't go any cheaper than that mate.|I have a family to feed."); } [label,baraek_quest] -~chatplayer(neutral, "Hello! I am in search of a quest."); -~chatnpc(neutral, "Sorry kiddo, I'm a fur trader not a damsel in distress."); +~chatplayer("Hello! I am in search of a quest."); +~chatnpc("Sorry kiddo, I'm a fur trader not a damsel in distress."); [label,baraek_buy_fur] -~chatplayer(quiz, "Would you like to buy my fur?"); -~chatnpc(neutral, "Let's have a look at it."); +~chatplayer("Would you like to buy my fur?"); +~chatnpc("Let's have a look at it."); ~objboxt(bear_fur, "You hand Baraek your fur to look at."); if_close; p_delay(3); -~chatnpc(neutral, "It's not in the best condition. I guess I could give you 12 coins for each one."); +~chatnpc("It's not in the best condition. I guess I could give you 12 coins for each one."); def_int $option = ~p_choice2("OK, here you go.", 1, "No thanks, I'll leave it.", 2); if($option = 1) { - ~chatplayer(neutral, "Yeah, that'll do."); + ~chatplayer("Yeah, that'll do."); if_close; while(inv_total(inv, bear_fur) > 0) { inv_del(inv, bear_fur, 1); inv_add(inv, coins, 12); p_delay(0); } - ~chatplayer(happy, "Thanks!"); + ~chatplayer("Thanks!"); } else if($option = 2) { - ~chatplayer(angry, "I think I'll keep hold of it actually!"); - ~chatnpc(sad, "Oh ok.|Didn't want it anyway!"); + ~chatplayer("I think I'll keep hold of it actually!"); + ~chatnpc("Oh ok.|Didn't want it anyway!"); } [label,baraek_grey_wolf_fur] -~chatplayer(quiz, "Would you like to buy my grey wolf fur?"); -~chatnpc(happy, "GREY WOLF FUR??? NOW you're talking!"); -~chatnpc(happy, "Grey wolf fur is something of a desirable item to me."); -~chatnpc(happy, "I'll take all you have for 120 gold pieces per fur, does that sound fair?"); +~chatplayer("Would you like to buy my grey wolf fur?"); +~chatnpc("GREY WOLF FUR??? NOW you're talking!"); +~chatnpc("Grey wolf fur is something of a desirable item to me."); +~chatnpc("I'll take all you have for 120 gold pieces per fur, does that sound fair?"); def_int $option = ~p_choice2("Yep, sounds fine.", 1, "No! I almost got my throat torn out by a wolf to get this!", 2); if($option = 1) { - ~chatplayer(happy, "Yep, sounds fine."); + ~chatplayer("Yep, sounds fine."); if_close; while(inv_total(inv, grey_wolf_fur) > 0) { inv_del(inv, grey_wolf_fur, 1); inv_add(inv, coins, 120); p_delay(0); } - ~chatplayer(happy, "Thanks!"); + ~chatplayer("Thanks!"); } else if($option = 2) { - ~chatplayer(angry, "No! I almost got my throat torn out by a wolf to get this!"); + ~chatplayer("No! I almost got my throat torn out by a wolf to get this!"); } [label,baraek_phoenixgang] -~chatplayer(quiz, "Can you tell me where I can find the Phoenix Gang?"); -~chatnpc(angry, "Sh sh sh, not so loud!|You don't want to get me in trouble!"); -~chatplayer(quiz, "So DO you know where they are?"); -~chatnpc(neutral, "I may do."); -~chatnpc(neutral, "But I don't want to get into trouble for revealing their hideout."); -~chatnpc(neutral, "Of course, if I was, say|20 gold coins richer I may happen to be|more inclined to take that sort of risk..."); +~chatplayer("Can you tell me where I can find the Phoenix Gang?"); +~chatnpc("Sh sh sh, not so loud!|You don't want to get me in trouble!"); +~chatplayer("So DO you know where they are?"); +~chatnpc("I may do."); +~chatnpc("But I don't want to get into trouble for revealing their hideout."); +~chatnpc("Of course, if I was, say|20 gold coins richer I may happen to be|more inclined to take that sort of risk..."); switch_int(~p_choice3("Okay. Have 20 gold coins.", 1, "No. I don't like things like bribery.", 2, "Yes. I'd like to be 20 gold coins richer too.", 3)) { case 1: - ~chatplayer(neutral, "Okay. Have 20 gold coins."); + ~chatplayer("Okay. Have 20 gold coins."); if(inv_total(inv, coins) < 20) { - ~chatplayer(neutral, "Uh....oops. My mistake. I don't have 20 coins. Silly me."); + ~chatplayer("Uh....oops. My mistake. I don't have 20 coins. Silly me."); return; } inv_del(inv, coins, 20); %phoenixgang_progress = 4; - ~chatnpc(neutral, "Ok, to get to the gang hideout, enter Varrock through the south gate. Then, if you take the first turning east, somewhere along there is an alleyway to the south. The door at the end of there is the entrance to the Phoenix"); - ~chatnpc(neutral, "Gang. They're operating there under the name of the VTAM Corporation. Be careful. The Phoenixes ain't the types to be messed about."); - ~chatplayer(happy, "Thanks!"); + ~chatnpc("Ok, to get to the gang hideout, enter Varrock through the south gate. Then, if you take the first turning east, somewhere along there is an alleyway to the south. The door at the end of there is the entrance to the Phoenix"); + ~chatnpc("Gang. They're operating there under the name of the VTAM Corporation. Be careful. The Phoenixes ain't the types to be messed about."); + ~chatplayer("Thanks!"); case 2: - ~chatplayer(angry, "No. I don't like things like bribery."); - ~chatnpc(happy, "Heh. If you wanna deal with the Phoenix Gang|they're involved in much worse than a bit of bribery."); + ~chatplayer("No. I don't like things like bribery."); + ~chatnpc("Heh. If you wanna deal with the Phoenix Gang|they're involved in much worse than a bit of bribery."); case 3: - ~chatplayer(happy, "Yes. I'd like to be 20 gold coins richer too."); + ~chatplayer("Yes. I'd like to be 20 gold coins richer too."); } diff --git a/data/src/scripts/areas/area_varrock/scripts/bartender.rs2 b/data/src/scripts/areas/area_varrock/scripts/bartender.rs2 index eeec7a4a4..38fb92ecc 100644 --- a/data/src/scripts/areas/area_varrock/scripts/bartender.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/bartender.rs2 @@ -1,5 +1,5 @@ [opnpc1,bartender_jollyboar] // Jolly Boar Inn -~chatnpc(happy, "Can I help you?"); +~chatnpc("Can I help you?"); def_int $option; if(testbit(%barcrawl_progress, ^jollyboar_index) = false & inv_total(inv, barcrawl_card) > 0) { $option = ~p_choice4("I'll have a beer please.", 1, "Any hints where I can go adventuring?", 2, "Heard any good gossip?", 3, "I'm doing Alfred Grimhands Barcrawl.", 4); @@ -8,25 +8,25 @@ if(testbit(%barcrawl_progress, ^jollyboar_index) = false & inv_total(inv, barcra } switch_int ($option) { case 1: - ~chatplayer(happy, "I'll have a pint of beer please."); - ~chatnpc(happy, "Ok, that'll be two coins please."); + ~chatplayer("I'll have a pint of beer please."); + ~chatnpc("Ok, that'll be two coins please."); if (inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear, I don't seem to have enough money."); + ~chatplayer("Oh dear, I don't seem to have enough money."); } else { inv_del(inv, coins, 2); inv_add(inv, beer, 1); mes("You buy a pint of beer."); } case 2: - ~chatplayer(happy, "Any hints on where I can go adventuring?"); - ~chatnpc(quiz, "Ooh, now. Let me see..."); - ~chatnpc(quiz, "Well there is the Varrock sewers. There are tales of untold horrors coming out at night and stealing babies from houses."); - ~chatplayer(happy, "Sounds perfect! Where's the entrance?"); - ~chatnpc(quiz, "It's just to the east of the palace."); + ~chatplayer("Any hints on where I can go adventuring?"); + ~chatnpc("Ooh, now. Let me see..."); + ~chatnpc("Well there is the Varrock sewers. There are tales of untold horrors coming out at night and stealing babies from houses."); + ~chatplayer("Sounds perfect! Where's the entrance?"); + ~chatnpc("It's just to the east of the palace."); case 3: - ~chatplayer(happy, "Heard any gossip?"); - ~chatnpc(confused, "I'm not that well up on the gossip out here. I've heard that the bartender in the Blue Moon Inn has gone a little crazy, he keeps claiming he is part of something called an online game."); - ~chatnpc(confused, "What that means, I don't know. That's probably old news by now though."); + ~chatplayer("Heard any gossip?"); + ~chatnpc("I'm not that well up on the gossip out here. I've heard that the bartender in the Blue Moon Inn has gone a little crazy, he keeps claiming he is part of something called an online game."); + ~chatnpc("What that means, I don't know. That's probably old news by now though."); case 4: @jollyboar_barcrawl; case default: ~displaymessage(^dm_default); } @@ -37,10 +37,10 @@ if(testbit(%barcrawl_progress, ^jollyboar_index) = false & last_useitem = barcra } [label,jollyboar_barcrawl] -~chatplayer(neutral, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(neutral, "Ah, there seems to be a fair few doing that one these days. My supply of Olde Suspiciouse is starting to run low, it'll cost you 10 coins."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Ah, there seems to be a fair few doing that one these days. My supply of Olde Suspiciouse is starting to run low, it'll cost you 10 coins."); if(inv_total(inv, coins) < 10) { - ~chatplayer(sad, "I don't have 10 coins right now."); + ~chatplayer("I don't have 10 coins right now."); return; } if_close; @@ -59,7 +59,7 @@ p_delay(2); %barcrawl_progress = setbit(%barcrawl_progress, ^jollyboar_index); mes("The bartender signs your card."); p_delay(2); -~chatplayer(confused, "Thanksh very mush..."); +~chatplayer("Thanksh very mush..."); [opnpc1,bartender_varrock] @@ -67,7 +67,7 @@ p_delay(2); if(inv_total(inv, trail_clue_easy_simple_exp010) = 1) { @trail_bartender_varrock; } -~chatnpc(quiz, "What can I do yer for?"); +~chatnpc("What can I do yer for?"); def_int $option; if(testbit(%barcrawl_progress, ^bluemoon_index) = false & inv_total(inv, barcrawl_card) > 0) { $option = ~p_choice4("A glass of your finest ale please.", 1, "Can you recommend where an adventurer might make his fortune?", 2, "Do you know where I can get some good equipment?", 3, "I'm doing Alfred Grimhand's Barcrawl.", 4); @@ -75,34 +75,34 @@ if(testbit(%barcrawl_progress, ^bluemoon_index) = false & inv_total(inv, barcraw $option = ~p_choice3("A glass of your finest ale please.", 1, "Can you recommend where an adventurer might make his fortune?", 2, "Do you know where I can get some good equipment?", 3); } if($option = 1) { - ~chatplayer(happy, "A glass of your finest ale please."); - ~chatnpc(happy, "No problemo. That'll be 2 coins."); + ~chatplayer("A glass of your finest ale please."); + ~chatnpc("No problemo. That'll be 2 coins."); if (inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); return; } inv_del(inv, coins, 2); inv_add(inv, beer, 1); mes("You buy a pint of beer."); } else if($option = 2) { - ~chatplayer(quiz, "Can you recommend where an adventurer might make his fortune?"); - ~chatnpc(shifty, "Ooh I don't know if I should be giving away information, makes the computer game too easy."); + ~chatplayer("Can you recommend where an adventurer might make his fortune?"); + ~chatnpc("Ooh I don't know if I should be giving away information, makes the computer game too easy."); switch_int(~p_choice3("Oh ah well...", 1, "Computer game? What are you talking about?", 2, "Just a small clue?", 3)) { case 1: - ~chatplayer(confused, "Oh ah well..."); + ~chatplayer("Oh ah well..."); case 2: - ~chatplayer(confused, "Computer game?|What are you talking about?"); - ~chatnpc(shifty, "This world around us...|is a computer game... called RuneScape."); - ~chatplayer(confused, "Nope, still don't understand what you are talking about. What's a computer?"); - ~chatnpc(shifty, "It's a sort of magic box thing,|which can do all sorts of stuff."); - ~chatplayer(angry, "I give up.|You're obviously completely mad!"); + ~chatplayer("Computer game?|What are you talking about?"); + ~chatnpc("This world around us...|is a computer game... called RuneScape."); + ~chatplayer("Nope, still don't understand what you are talking about. What's a computer?"); + ~chatnpc("It's a sort of magic box thing,|which can do all sorts of stuff."); + ~chatplayer("I give up.|You're obviously completely mad!"); case 3: - ~chatplayer(quiz, "Just a small clue?"); - ~chatnpc(shifty, "Go and talk to the bartender at the Jolly Boar Inn,|he doesn't seem to mind giving away clues."); + ~chatplayer("Just a small clue?"); + ~chatnpc("Go and talk to the bartender at the Jolly Boar Inn,|he doesn't seem to mind giving away clues."); } } else if($option = 3) { - ~chatplayer(quiz, "Do you know where I can get some good equipment?"); - ~chatnpc(neutral, "Well, there's the sword shop across the road,|or there's also all sorts of shops up around the market."); + ~chatplayer("Do you know where I can get some good equipment?"); + ~chatnpc("Well, there's the sword shop across the road,|or there's also all sorts of shops up around the market."); } else if($option = 4) { @bluemoon_barcrawl; } @@ -113,11 +113,11 @@ if(testbit(%barcrawl_progress, ^bluemoon_index) = false & last_useitem = barcraw } [label,bluemoon_barcrawl] -~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(sad, "Oh no not another of you guys.|These barbarian barcrawls cause too much damage to my bar."); -~chatnpc(neutral, "You're going to have to pay 50 gold for the Uncle Humphrey's Gutrot."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("Oh no not another of you guys.|These barbarian barcrawls cause too much damage to my bar."); +~chatnpc("You're going to have to pay 50 gold for the Uncle Humphrey's Gutrot."); if(inv_total(inv, coins) < 50) { - ~chatplayer(sad, "I don't have 50 coins."); + ~chatplayer("I don't have 50 coins."); return; } if_close; @@ -139,7 +139,7 @@ p_delay(2); say("Blearrgh!"); [label,trail_bartender_varrock] -~chatnpc("default", "Nicely solved!"); +~chatnpc("Nicely solved!"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp010, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/areas/area_varrock/scripts/captain_rovin.rs2 b/data/src/scripts/areas/area_varrock/scripts/captain_rovin.rs2 index cecdca74f..452d35ab3 100644 --- a/data/src/scripts/areas/area_varrock/scripts/captain_rovin.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/captain_rovin.rs2 @@ -2,54 +2,54 @@ @demon_slayer_captain_rovin; [label,demon_slayer_captain_rovin] -~chatnpc(angry, "What are you doing up here? Only the palace guards are allowed up here."); +~chatnpc("What are you doing up here? Only the palace guards are allowed up here."); def_int $option = ~demon_slayer_captain_rovin_dialogue_options; if ($option = 1) { - ~chatplayer(neutral, "I am one of the palace guards."); - ~chatnpc(angry, "No, you're not! I know all the palace guards."); + ~chatplayer("I am one of the palace guards."); + ~chatnpc("No, you're not! I know all the palace guards."); def_int $palace_guard_option = ~p_choice2("I'm a new recruit.", 1, "I've had extensive plastic surgery.", 2); if ($palace_guard_option = 1) { - ~chatplayer(neutral, "I'm a new recruit."); - ~chatnpc(neutral, "I interview all the new recruits. I'd know if you were one of them."); - ~chatplayer("happy", "That blows that story out of the water then."); - ~chatnpc(angry, "Get out of my sight."); + ~chatplayer("I'm a new recruit."); + ~chatnpc("I interview all the new recruits. I'd know if you were one of them."); + ~chatplayer("That blows that story out of the water then."); + ~chatnpc("Get out of my sight."); } else if ($palace_guard_option = 2) { - ~chatplayer(neutral, "I've had extensive plastic surgery."); - ~chatnpc(neutral, "What sort of surgery is that? I've never heard of it. Besides, you look reasonably healthy.."); - ~chatnpc(angry, "Why is this relevant anyway? You still shouldn't be here."); + ~chatplayer("I've had extensive plastic surgery."); + ~chatnpc("What sort of surgery is that? I've never heard of it. Besides, you look reasonably healthy.."); + ~chatnpc("Why is this relevant anyway? You still shouldn't be here."); } } else if ($option = 2) { - ~chatplayer(neutral, "What about the King? Surely you'd let him up here."); - ~chatnpc(neutral, "Well, yes, I suppose we'd let him up. He doesn't generally want to come up here, but if he did want to, he could."); - ~chatnpc(angry, "Anyway, you're not the King either. So get out of my sight."); + ~chatplayer("What about the King? Surely you'd let him up here."); + ~chatnpc("Well, yes, I suppose we'd let him up. He doesn't generally want to come up here, but if he did want to, he could."); + ~chatnpc("Anyway, you're not the King either. So get out of my sight."); } else if ($option = 3) { - ~chatplayer(neutral, "Yes, I know, but this is important."); - ~chatnpc(neutral, "Ok, I'm listening. Tell me what's so important."); + ~chatplayer("Yes, I know, but this is important."); + ~chatnpc("Ok, I'm listening. Tell me what's so important."); def_int $important_option = ~p_choice3("There's a demon who wants to invade this city.", 1, "Erm I forgot.", 2, "The castle has just received its ale delivery.", 3); if ($important_option = 1) { - ~chatplayer(neutral, "There's a demon who wants to invade the city."); - ~chatnpc(neutral, "Is it a powerful demon?"); - ~chatplayer(sad, "Yes, very."); - ~chatnpc(worried, "As good as the palace guards are, I don't know if they're up to taking on a very powerful demon."); - ~chatplayer(neutral, "It's not them who are going to fight the demon, it's me."); - ~chatnpc(shock, "What, all by yourself? How are you going to do that?"); - ~chatplayer(neutral, "I'm going to use the powerful sword Silverlight, which I believe you have one of the keys for?"); - ~chatnpc(quiz, "Yes you are right. Here you go."); + ~chatplayer("There's a demon who wants to invade the city."); + ~chatnpc("Is it a powerful demon?"); + ~chatplayer("Yes, very."); + ~chatnpc("As good as the palace guards are, I don't know if they're up to taking on a very powerful demon."); + ~chatplayer("It's not them who are going to fight the demon, it's me."); + ~chatnpc("What, all by yourself? How are you going to do that?"); + ~chatplayer("I'm going to use the powerful sword Silverlight, which I believe you have one of the keys for?"); + ~chatnpc("Yes you are right. Here you go."); if_close(); p_delay(2); mes("Captain rovin hands you a key."); inv_add(inv, demon_rovin_key, 1); } else if ($important_option = 2) { - ~chatplayer(sad, "Erm I forgot."); - ~chatnpc(angry, "Well it can't be that important then."); - ~chatplayer(neutral, "How do you know?"); - ~chatnpc(angry, "Just go away."); + ~chatplayer("Erm I forgot."); + ~chatnpc("Well it can't be that important then."); + ~chatplayer("How do you know?"); + ~chatnpc("Just go away."); } else if ($important_option = 3) { - ~chatplayer("happy", "The castle has just received its ale delivery."); - ~chatnpc(neutral, "Now that is important. However I'm the wrong person to speak to about it. Go talk to the kitchen staff."); + ~chatplayer("The castle has just received its ale delivery."); + ~chatnpc("Now that is important. However I'm the wrong person to speak to about it. Go talk to the kitchen staff."); } } diff --git a/data/src/scripts/areas/area_varrock/scripts/champions_guild.rs2 b/data/src/scripts/areas/area_varrock/scripts/champions_guild.rs2 index 8fbd9a6bd..cda183eaa 100644 --- a/data/src/scripts/areas/area_varrock/scripts/champions_guild.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/champions_guild.rs2 @@ -1,7 +1,7 @@ [oploc1,loc_1805] if (%questpoints < 32) { mes("The door won't open - you need at least 32 Quest Points."); - ~chatnpc_specific("Guild master", guild_master, angry, "You have not proved yourself worthy to enter here yet."); + ~chatnpc_specific("Guild master", guild_master, "You have not proved yourself worthy to enter here yet."); return; } // the sound in osrs is 1t early (if entering), so i cant use the proc @@ -39,5 +39,5 @@ loc_add($loc_coord, loc_83, $angle, $shape, 2); loc_add(movecoord($loc_coord, $x, 0, $z), $replacement, modulo(add($angle, 1), 4), $shape, 2); if ($entering = true) { - ~chatnpc_specific("Guild master", guild_master, happy, "Greetings bold adventurer. Welcome to the guild of Champions."); + ~chatnpc_specific("Guild master", guild_master, "Greetings bold adventurer. Welcome to the guild of Champions."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/curator.rs2 b/data/src/scripts/areas/area_varrock/scripts/curator.rs2 index 5f57b36f9..e60140e98 100644 --- a/data/src/scripts/areas/area_varrock/scripts/curator.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/curator.rs2 @@ -1,36 +1,36 @@ [opnpc1,curator] -~chatnpc(neutral, "Welcome to the museum of Varrock."); +~chatnpc("Welcome to the museum of Varrock."); if(%phoenixgang_progress = ^phoenixgang_joined | %blackarmgang_progress = ^blackarmgang_joined) { if(inv_total(inv, arravshield1) > 0 & inv_total(inv, arravshield2) > 0) { // mostly 1-1 with RSC - ~chatplayer(quiz, "I have retrieved the shield of Arrav|and I would like to claim my reward."); - ~chatnpc(shock, "The shield of Arrav?|Let me see that!"); + ~chatplayer("I have retrieved the shield of Arrav|and I would like to claim my reward."); + ~chatnpc("The shield of Arrav?|Let me see that!"); ~mesbox("The curator peers at the shield."); - ~chatnpc(shock, "This is incredible!"); - ~chatnpc(shock, "That shield has been missing for over twenty-five years!"); - ~chatnpc(neutral, "Leave the shield here with me|and I'll write you out a certificate|saying that you have returned the shield,|so that you can claim your reward from the King."); - ~chatplayer(neutral, "Can I have two certificates?|I needed significant help from a friend to get the shield.|We'll split the reward."); - ~chatnpc(happy, "Yes, certainly.|Please hand over the shield."); + ~chatnpc("This is incredible!"); + ~chatnpc("That shield has been missing for over twenty-five years!"); + ~chatnpc("Leave the shield here with me|and I'll write you out a certificate|saying that you have returned the shield,|so that you can claim your reward from the King."); + ~chatplayer("Can I have two certificates?|I needed significant help from a friend to get the shield.|We'll split the reward."); + ~chatnpc("Yes, certainly.|Please hand over the shield."); ~mesbox("You hand over the shield parts."); inv_del(inv, arravshield1, 1); inv_del(inv, arravshield2, 1); inv_add(inv, arravcert_scroll, 2); ~mesbox("The curator writes out two certificates."); - ~chatnpc(happy, "Take these to the king|and he'll pay you both handsomely.|Please tell your friend to speak to me|after giving him his certificate."); + ~chatnpc("Take these to the king|and he'll pay you both handsomely.|Please tell your friend to speak to me|after giving him his certificate."); return; } else if(inv_total(inv, arravshield1) > 0 | inv_total(inv, arravshield2) > 0) { - ~chatplayer(quiz, "I have half the shield of Arrav here.|Can I get a reward?"); - ~chatnpc(neutral, "Well it might be worth a small reward.|The entire shield would be worth much more."); - ~chatplayer(happy, "Ok, I'll hang onto it.|And see if I can find the other half."); + ~chatplayer("I have half the shield of Arrav here.|Can I get a reward?"); + ~chatnpc("Well it might be worth a small reward.|The entire shield would be worth much more."); + ~chatplayer("Ok, I'll hang onto it.|And see if I can find the other half."); return; } } def_int $option = ~p_choice2("Have you any interesting news?", 1, "Do you know where I could find any treasure?", 2); if($option = 1) { - ~chatplayer(quiz, "Have you any interesting news?"); - ~chatnpc(neutral, "No, I'm only interested in old stuff."); + ~chatplayer("Have you any interesting news?"); + ~chatnpc("No, I'm only interested in old stuff."); } else if($option = 2) { - ~chatplayer(quiz, "Do you know where I could find any treasure?"); - ~chatnpc(neutral, "Look around you! This museum is full of treasures!"); - ~chatplayer(sad, "No, I meant treasures for ME."); - ~chatnpc(neutral, "Any treasures this museum knows about it goes to great lengths to acquire"); + ~chatplayer("Do you know where I could find any treasure?"); + ~chatnpc("Look around you! This museum is full of treasures!"); + ~chatplayer("No, I meant treasures for ME."); + ~chatnpc("Any treasures this museum knows about it goes to great lengths to acquire"); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/fancy_dress_shop_owner.rs2 b/data/src/scripts/areas/area_varrock/scripts/fancy_dress_shop_owner.rs2 index b7dd63e14..3056b865f 100644 --- a/data/src/scripts/areas/area_varrock/scripts/fancy_dress_shop_owner.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/fancy_dress_shop_owner.rs2 @@ -1,12 +1,12 @@ [opnpc1,fancy_dress_shop_owner] -~chatnpc(happy, "Now you look like someone who goes to a lot of fancy dress parties."); -~chatplayer(confused, "Errr...what are you saying exactly?"); -~chatnpc(happy, "I'm just saying that perhaps you would like to peruse my selection of garments."); +~chatnpc("Now you look like someone who goes to a lot of fancy dress parties."); +~chatplayer("Errr...what are you saying exactly?"); +~chatnpc("I'm just saying that perhaps you would like to peruse my selection of garments."); // using RSC order def_int $option = ~p_choice2("I think I might just leave the perusing for now thanks.", 1, "Okay, lets see what you've got then.", 2); if($option = 1) { - ~chatplayer(neutral, "I think I might just leave the perusing for now, thanks."); + ~chatplayer("I think I might just leave the perusing for now, thanks."); } else if($option = 2) { - ~chatplayer(happy, "Okay, lets see what you've got then."); + ~chatplayer("Okay, lets see what you've got then."); ~openshop_activenpc; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/father_lawrence.rs2 b/data/src/scripts/areas/area_varrock/scripts/father_lawrence.rs2 index ad97cbf2d..0ea12ee1a 100644 --- a/data/src/scripts/areas/area_varrock/scripts/father_lawrence.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/father_lawrence.rs2 @@ -3,60 +3,60 @@ switch_int (%romeojuliet_progress) { case ^romeojuliet_not_started: @father_lawrence_prequest; case ^romeojuliet_passed_message: @father_lawrence_help; case ^romeojuliet_spoken_father: - ~chatnpc(quiz, "Ah, have you found the Apothecary yet?"); - ~chatnpc(neutral, "Remember, Cadaver potion, for Father Lawrence."); + ~chatnpc("Ah, have you found the Apothecary yet?"); + ~chatnpc("Remember, Cadaver potion, for Father Lawrence."); case ^romeojuliet_spoken_apothecary: - ~chatnpc(quiz, "Did you find the Apothecary?"); + ~chatnpc("Did you find the Apothecary?"); if(inv_total(inv, cadaver) > 0) { - ~chatplayer("default", "I've got the Cadaver potion."); - ~chatnpc("default", "Good! Good work! Ok, take it to Juliet, she's expecting you."); - ~chatnpc("default", "I'll talk to Romeo and make sure he knows what to do."); + ~chatplayer("I've got the Cadaver potion."); + ~chatnpc("Good! Good work! Ok, take it to Juliet, she's expecting you."); + ~chatnpc("I'll talk to Romeo and make sure he knows what to do."); } else if(inv_total(inv, cadaver_berries) > 0) { - ~chatplayer(happy, "I am on my way back to him with the ingredients."); - ~chatnpc(happy, "Good work. Get the potion to Juliet when you have it."); - ~chatnpc(happy, "I will tell Romeo to be ready."); + ~chatplayer("I am on my way back to him with the ingredients."); + ~chatnpc("Good work. Get the potion to Juliet when you have it."); + ~chatnpc("I will tell Romeo to be ready."); } else { - ~chatplayer(neutral, "Yes, I must find some berries."); - ~chatnpc(neutral, "Well, take care. They are poisonous to the touch."); - ~chatnpc("default", "You will need gloves."); + ~chatplayer("Yes, I must find some berries."); + ~chatnpc("Well, take care. They are poisonous to the touch."); + ~chatnpc("You will need gloves."); } case default: - ~chatnpc(happy, "Oh to be a father in the times of whiskey."); - ~chatnpc(happy, "I sing and I drink and I wake up in gutters."); + ~chatnpc("Oh to be a father in the times of whiskey."); + ~chatnpc("I sing and I drink and I wake up in gutters."); def_int $option = random(2); if($option = 0) { - ~chatnpc(happy, "Top of the morning to you."); + ~chatnpc("Top of the morning to you."); } else if($option = 1) { - ~chatnpc(sad, "To err is human, to forgive, quite difficult."); - ~chatnpc(sad, "I need a think I drink."); + ~chatnpc("To err is human, to forgive, quite difficult."); + ~chatnpc("I need a think I drink."); } } [label,father_lawrence_prequest] -~chatnpc(neutral, "Hello adventurer, do you seek a quest?"); +~chatnpc("Hello adventurer, do you seek a quest?"); switch_int(~p_choice3("I am always looking for a quest.", 1, "No, I prefer just to kill things.", 2, "Can you recommend a good bar?", 3)) { case 1: - ~chatplayer(happy, "I am always looking for a quest."); - ~chatnpc(neutral, "Well, I see poor Romeo wandering around the square. I think he may need help."); - ~chatnpc(sad, "I was helping him and Juliet to meet,|but it became impossible."); - ~chatnpc(happy, "I am sure he can use some help."); + ~chatplayer("I am always looking for a quest."); + ~chatnpc("Well, I see poor Romeo wandering around the square. I think he may need help."); + ~chatnpc("I was helping him and Juliet to meet,|but it became impossible."); + ~chatnpc("I am sure he can use some help."); case 2: - ~chatplayer(happy, "No, I prefer just to kill things."); - ~chatnpc(happy, "That's a fine career in these lands.|There is more that needs killing every day."); + ~chatplayer("No, I prefer just to kill things."); + ~chatnpc("That's a fine career in these lands.|There is more that needs killing every day."); case 3: - ~chatplayer(neutral, "Can you recommend a good bar?"); - ~chatnpc(angry, "Drinking will be the death of you."); - ~chatnpc(neutral, "But the Blue Moon in the city is cheap enough."); - ~chatnpc(happy, "And providing you buy one drink an hour they let you stay all night."); + ~chatplayer("Can you recommend a good bar?"); + ~chatnpc("Drinking will be the death of you."); + ~chatnpc("But the Blue Moon in the city is cheap enough."); + ~chatnpc("And providing you buy one drink an hour they let you stay all night."); } [label,father_lawrence_help] -~chatplayer(neutral, "Romeo sent me. He says you can help."); -~chatnpc(confused, "Ah Romeo, yes. A fine lad, but a little bit confused."); -~chatplayer(neutral, "Juliet must be rescued from her father's control."); -~chatnpc(happy, "I know just the thing. A potion to make her appear dead."); -~chatnpc(happy, "Then Romeo can collect her from the crypt."); -~chatnpc(happy, "Go to the Apothecary, tell him I sent you."); -~chatnpc(happy, "You will need a Cadaver potion."); +~chatplayer("Romeo sent me. He says you can help."); +~chatnpc("Ah Romeo, yes. A fine lad, but a little bit confused."); +~chatplayer("Juliet must be rescued from her father's control."); +~chatnpc("I know just the thing. A potion to make her appear dead."); +~chatnpc("Then Romeo can collect her from the crypt."); +~chatnpc("Go to the Apothecary, tell him I sent you."); +~chatnpc("You will need a Cadaver potion."); %romeojuliet_progress = ^romeojuliet_spoken_father; \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/guild_master.rs2 b/data/src/scripts/areas/area_varrock/scripts/guild_master.rs2 index e592c7735..d7c7c8acb 100644 --- a/data/src/scripts/areas/area_varrock/scripts/guild_master.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/guild_master.rs2 @@ -1,14 +1,14 @@ [opnpc1,guild_master] // osrs -~chatnpc(neutral, "Greetings!"); +~chatnpc("Greetings!"); // rsc def_int $choice = ~p_choice2("What is this place?", 0, "Do you know where I could get a Rune Plate mail body?", 1); if ($choice = 1) { @guild_master_start_dragon_quest; } -~chatplayer(quiz, "What is this place?"); +~chatplayer("What is this place?"); // rsc (not including typos) & osrs -~chatnpc(neutral, "This is the Champions' Guild. Only adventurers who have proved themselves worthy by gaining influence from quests are allowed in here."); +~chatnpc("This is the Champions' Guild. Only adventurers who have proved themselves worthy by gaining influence from quests are allowed in here."); // most guides say that the guild master mentions oziach @@ -16,11 +16,11 @@ if ($choice = 1) { // so portions of this dialogue is from osrs [label,guild_master_start_dragon_quest] // https://web.archive.org/web/20051231060826/http://runescape.salmoneus.net/guilds/guild_champs.html -~chatplayer(quiz, "Do you know where I could get a Rune Plate mail body?"); +~chatplayer("Do you know where I could get a Rune Plate mail body?"); //I have a friend called Oziach (rsc), who could help you out with one.(https://web.archive.org/web/20051104235547/http://www.tip.it/runescape/index.php?rs2quest_id=21) -~chatnpc(neutral, "I have a friend called Oziach, who could help you out with one."); +~chatnpc("I have a friend called Oziach, who could help you out with one."); // osrs -~chatnpc(neutral, "Oziach lives in a hut, by the cliffs to the west of Edgeville. He can be a little...odd...sometimes, though."); +~chatnpc("Oziach lives in a hut, by the cliffs to the west of Edgeville. He can be a little...odd...sometimes, though."); if (%dragon_progress = ^quest_dragon_not_started) { %dragon_progress = ^quest_dragon_spoken_to_guildmaster; ~send_quest_progress(questlist:dragon, %dragon_progress, ^dragon_complete); diff --git a/data/src/scripts/areas/area_varrock/scripts/gypsy.rs2 b/data/src/scripts/areas/area_varrock/scripts/gypsy.rs2 index e6b0eac27..7be612539 100644 --- a/data/src/scripts/areas/area_varrock/scripts/gypsy.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/gypsy.rs2 @@ -2,9 +2,9 @@ if (%demon_progress = 0) { @demon_slayer_not_started_gypsy; } else if (%demon_progress = 1) { - ~chatnpc(neutral, "How goes the quest?"); - ~chatplayer(happy, "I'm still working on it."); - ~chatnpc(happy, "Well if you need any advice I'm always here, young one."); + ~chatnpc("How goes the quest?"); + ~chatplayer("I'm still working on it."); + ~chatnpc("Well if you need any advice I'm always here, young one."); def_int $option = ~p_choice4("What is the magical incantation?", 1, "Where can I find Silverlight?", 2, "Well I'd better press on with it.", 3, "Stop calling me that!", 4); if ($option = 1) { @@ -18,9 +18,9 @@ if (%demon_progress = 0) { } } else if (%demon_progress > 2 & %demon_progress < ^demon_complete) { if (inv_total(inv, silverlight) < 1 & inv_getobj(worn, 3) ! silverlight) { - ~chatnpc(neutral, "How goes the quest?"); - ~chatplayer(happy, "I have found Sir Prysin. Unfortunately, I haven't got the sword yet. He made it complicated for me!"); - ~chatnpc(neutral, "Ok, hurry, we haven't much time."); + ~chatnpc("How goes the quest?"); + ~chatplayer("I have found Sir Prysin. Unfortunately, I haven't got the sword yet. He made it complicated for me!"); + ~chatnpc("Ok, hurry, we haven't much time."); def_int $option = ~p_choice2("What is the magical incantation?", 1, "Well I'd better press on with it.", 2); if ($option = 1) { @@ -29,70 +29,70 @@ if (%demon_progress = 0) { @demon_slayer_gypsy_press_on_with_it; } } else { - ~chatnpc(neutral, "How goes the quest?"); - ~chatplayer(happy, "I have the sword now.|I Just need to kill the demon, I think."); - ~chatnpc(happy, "Yep, that's right."); + ~chatnpc("How goes the quest?"); + ~chatplayer("I have the sword now.|I Just need to kill the demon, I think."); + ~chatnpc("Yep, that's right."); def_int $option = ~p_choice3("What is the magical incantation?", 1, "Well I'd better press on with it.", 2, "Where can I find the demon?", 3); if ($option = 1) { @demon_slayer_gypsy_incantation; } else if ($option = 2) { @demon_slayer_gypsy_press_on_with_it; }else { - ~chatplayer(quiz, "Where can I find the demon?"); - ~chatnpc(neutral, "Just head south and you should find the stone circle just outside the city gate."); + ~chatplayer("Where can I find the demon?"); + ~chatnpc("Just head south and you should find the stone circle just outside the city gate."); } } } else if (%demon_progress = ^demon_complete) { - ~chatnpc(neutral, "Greetings young one."); - ~chatnpc(happy, "You're a hero now. That was a good bit of demonslaying."); + ~chatnpc("Greetings young one."); + ~chatnpc("You're a hero now. That was a good bit of demonslaying."); def_int $option = ~p_choice3("How do you know I killed it?", 1, "Thanks.", 2, "Stop calling me that!", 3); if ($option = 1) { - ~chatplayer(confused, "How do you know I killed it?"); - ~chatnpc(neutral, "You forget. I'm good at knowing things."); + ~chatplayer("How do you know I killed it?"); + ~chatnpc("You forget. I'm good at knowing things."); } else if ($option = 2) { - ~chatplayer(neutral, "Thanks."); + ~chatplayer("Thanks."); } else { @demon_slayer_gypsy_stop_calling_me_that; } } [label,demon_slayer_gypsy_press_on_with_it] -~chatplayer(quiz, "Well I'd better press on with it."); -~chatnpc(happy, "See you anon."); +~chatplayer("Well I'd better press on with it."); +~chatnpc("See you anon."); [label,demon_slayer_gypsy_stop_calling_me_that] - ~chatplayer(angry, "Stop calling me that!"); - ~chatnpc(laugh,"In the scheme of things you are very young."); + ~chatplayer("Stop calling me that!"); + ~chatnpc("In the scheme of things you are very young."); def_int $option = ~p_choice2("Ok, but how old are you?", 1, "Oh, if its in the scheme of things that's ok.", 2); if ($option = 1) { - ~chatplayer(neutral, "Ok, but how old are you?"); + ~chatplayer("Ok, but how old are you?"); @demon_slayer_gypsy_how_old_are_you; } else if ($option = 2) { - ~chatplayer(confused, "Oh, if its in the scheme of things that's ok."); - ~chatnpc(laugh, "You show wisdom for one so young."); + ~chatplayer("Oh, if its in the scheme of things that's ok."); + ~chatnpc("You show wisdom for one so young."); } [label,demon_slayer_not_started_gypsy] -~chatnpc(neutral, "Hello young one. Cross my palm with silver and the future will be revealed to you."); +~chatnpc("Hello young one. Cross my palm with silver and the future will be revealed to you."); def_int $option = ~p_choice3("Ok, here you go.", 1, "Who are you calling young one?!", 2, "No, I don't believe in that stuff.", 3); if ($option = 1) { @demon_slayer_gypsy_quest_start; } else if ($option = 2) { - ~chatplayer(angry, "Who are you calling young one?!"); - ~chatnpc(quiz, "You have been on this world a relatively short time, at least compared to me. So do you want your fortune told or not?"); + ~chatplayer("Who are you calling young one?!"); + ~chatnpc("You have been on this world a relatively short time, at least compared to me. So do you want your fortune told or not?"); $option = ~p_choice3("Yes, please.", 1, "No, I don't believe in that stuff.", 2, "Ooh, how old are you then?", 3); if ($option = 1) { - ~chatplayer(quiz, "Yes, please."); - ~chatnpc(neutral, "Cross my palm with silver then."); + ~chatplayer("Yes, please."); + ~chatnpc("Cross my palm with silver then."); @demon_slayer_gypsy_money_for_fortune; } else if ($option = 2) { @demon_slayer_gypsy_dont_believe; } else if ($option = 3) { - ~chatplayer(neutral, "Ooh, how old are you then?"); + ~chatplayer("Ooh, how old are you then?"); @demon_slayer_gypsy_how_old_are_you; } } else if ($option = 3) { @@ -100,38 +100,38 @@ if ($option = 1) { } [label,demon_slayer_gypsy_how_old_are_you] -~chatnpc(quiz, "Older than you imagine."); +~chatnpc("Older than you imagine."); def_int $option = ~p_choice3("Believe me, I have a good imagination.", 1, "How do you know how old I think you are?", 2, "Oh, pretty old then.", 3); if ($option = 1) { - ~chatplayer(quiz, "Believe me, I have a good imagination."); - ~chatnpc(quiz, "You seem like just the sort of person who would want their fortune told then."); + ~chatplayer("Believe me, I have a good imagination."); + ~chatnpc("You seem like just the sort of person who would want their fortune told then."); $option = ~p_choice2("No, I don't believe in that stuff.", 1, "Yes, please.", 2); if ($option = 1) { @demon_slayer_gypsy_dont_believe; } else if ($option = 2){ - ~chatnpc(neutral, "Cross my palm with silver then."); + ~chatnpc("Cross my palm with silver then."); @demon_slayer_gypsy_money_for_fortune; } } else if ($option = 2) { - ~chatplayer(neutral, "How do you know how old I think you are?"); - ~chatnpc("default", "I have the power to know. Just as I have the power to foresee the future."); + ~chatplayer("How do you know how old I think you are?"); + ~chatnpc("I have the power to know. Just as I have the power to foresee the future."); $option = ~p_choice3("Ok, what am I thinking now?", 1, "Ok, but how old are you?", 2, "Go on then, what's my future?", 3); if ($option = 1) { - ~chatplayer(neutral, "Ok, what am I thinking now?"); - ~chatnpc(neutral, "You are thinking that I'll never guess what you are thinking."); + ~chatplayer("Ok, what am I thinking now?"); + ~chatnpc("You are thinking that I'll never guess what you are thinking."); } else if ($option = 2) { - ~chatplayer(neutral, "Ok, but how old are you?"); + ~chatplayer("Ok, but how old are you?"); @demon_slayer_gypsy_age_riddle; } else if ($option = 3) { - ~chatplayer(neutral, "Go on then, what's my future?"); - ~chatnpc(neutral, "Hello young one. Cross my palm with silver and the future will be revealed to you."); + ~chatplayer("Go on then, what's my future?"); + ~chatnpc("Hello young one. Cross my palm with silver and the future will be revealed to you."); @demon_slayer_gypsy_money_for_fortune; } } else if ($option = 3) { - ~chatplayer(laugh, "Oh, pretty old then."); - ~chatnpc(angry, "Yes I'm old! Don't rub it in."); + ~chatplayer("Oh, pretty old then."); + ~chatnpc("Yes I'm old! Don't rub it in."); } [label,demon_slayer_gypsy_money_for_fortune] @@ -140,51 +140,51 @@ if ($option = 1) { if ($option = 1) { @demon_slayer_gypsy_quest_start; } else if ($option = 2) { - ~chatplayer(sad, "Oh you want me to pay. No thanks."); - ~chatnpc(angry, "Go away then."); + ~chatplayer("Oh you want me to pay. No thanks."); + ~chatnpc("Go away then."); } [label,demon_slayer_gypsy_quest_start] -~chatplayer(quiz, "Ok, here you go."); +~chatplayer("Ok, here you go."); if (inv_total(inv, coins) = 0) { - ~chatplayer(sad, "Oh dear. I don't have any money."); + ~chatplayer("Oh dear. I don't have any money."); } else if (inv_total(inv, coins) > 0) { inv_del(inv, coins, 1); - ~chatnpc(happy, "Come closer, and listen carefully to what the future holds for you, as I peer into the swirling mists of the crystal ball."); - ~chatnpc(neutral, "I can see images forming. I can see you."); - ~chatnpc(confused, "You are holding a very impressive looking sword. I'm sure I recognise that sword..."); - ~chatnpc(confused, "There is a big dark shadow appearing now."); - ~chatnpc(worried, "Aaargh!"); + ~chatnpc("Come closer, and listen carefully to what the future holds for you, as I peer into the swirling mists of the crystal ball."); + ~chatnpc("I can see images forming. I can see you."); + ~chatnpc("You are holding a very impressive looking sword. I'm sure I recognise that sword..."); + ~chatnpc("There is a big dark shadow appearing now."); + ~chatnpc("Aaargh!"); def_int $option = ~p_choice3("Very interesting. What does that Aaargh bit mean?", 1, "Are you alright?", 2, "Aaargh?", 3); if ($option = 1) { - ~chatplayer(confused, "Very interesting. What does that Aaargh bit mean?"); + ~chatplayer("Very interesting. What does that Aaargh bit mean?"); } else if ($option = 2) { - ~chatplayer(confused, "Are you alright?"); + ~chatplayer("Are you alright?"); } else if ($option = 3) { - ~chatplayer(confused, "Aaargh?"); + ~chatplayer("Aaargh?"); } - ~chatnpc(worried, "It's Delrith! Delrith is coming!"); + ~chatnpc("It's Delrith! Delrith is coming!"); def_int $who_is_delrith = ~p_choice2("Who's Delrith?", 1, "Get a grip!", 2); if ($who_is_delrith = 1) { - ~chatplayer(confused, "Who's Delrith?"); + ~chatplayer("Who's Delrith?"); @demon_slayer_gypsy_who_is_delrith; } else if ($who_is_delrith = 2) { - ~chatplayer(angry, "Get a grip!"); - ~chatnpc(sad, "Sorry. I didn't expect to see Delrith... I had to break away quickly in case he detected me."); + ~chatplayer("Get a grip!"); + ~chatnpc("Sorry. I didn't expect to see Delrith... I had to break away quickly in case he detected me."); @demon_slayer_gypsy_who_is_delrith; } } [label,demon_slayer_gypsy_who_is_delrith] -~chatnpc(sad, "Delrith..."); -~chatnpc(neutral, "Delrith is a powerful demon."); -~chatnpc(worried, "Oh! I really hope he didn't see me looking at him through my crystal ball!"); -~chatnpc(sad, "He tried to destroy this city 150 years ago. He was stopped just in time by the great hero Wally."); -~chatnpc(sad, "Using his magic sword Silverlight, Wally managed to trap the demon in the stone circle just south of this city."); -~chatnpc(shock, "Ye gods! Silverlight was the sword you were holding in my vision! You are the one destined to stop the demon this time."); +~chatnpc("Delrith..."); +~chatnpc("Delrith is a powerful demon."); +~chatnpc("Oh! I really hope he didn't see me looking at him through my crystal ball!"); +~chatnpc("He tried to destroy this city 150 years ago. He was stopped just in time by the great hero Wally."); +~chatnpc("Using his magic sword Silverlight, Wally managed to trap the demon in the stone circle just south of this city."); +~chatnpc("Ye gods! Silverlight was the sword you were holding in my vision! You are the one destined to stop the demon this time."); def_int $option = ~p_choice3("How am I meant to fight a demon who can destroy cities?", 1, "Okay, where is he? I'll kill him for you!", 2, "Wally doesn't sound like a very heroic name.", 3); if ($option = 1) { @@ -196,10 +196,10 @@ if ($option = 1) { } [label,demon_slayer_gypsy_wally] -~chatplayer("happy", "Wally doesn't sound a very heroic name."); -~chatnpc(neutral, "Yes I know. Maybe that is why history doesn't remember him. However he was a very great hero."); -~chatnpc(neutral, "Who knows how much pain and suffering Delrith would have brought forth without Wally to stop him!"); -~chatnpc(neutral, "It looks like you are going to need to perform similar heroics."); +~chatplayer("Wally doesn't sound a very heroic name."); +~chatnpc("Yes I know. Maybe that is why history doesn't remember him. However he was a very great hero."); +~chatnpc("Who knows how much pain and suffering Delrith would have brought forth without Wally to stop him!"); +~chatnpc("It looks like you are going to need to perform similar heroics."); def_int $option = ~p_choice2("How am I meant to fight a demon who can destroy cities?", 1, "Okay, where is he? I'll kill him for you!", 2); if ($option = 1) { @@ -209,20 +209,20 @@ if ($option = 1) { } [label,demon_slayer_gypsy_destroy_cities] -~chatplayer(worried, "How am I meant to fight a demon who can destroy cities?!"); -~chatnpc(worried, "I admit it won't be easy."); +~chatplayer("How am I meant to fight a demon who can destroy cities?!"); +~chatnpc("I admit it won't be easy."); @demon_slayer_gypsy_destroy_delrith; [label,demon_slayer_gypsy_kill_him_for_you] -~chatplayer("happy", "Okay, where is he? I'll kill him for you!"); -~chatnpc(worried, "Well you can't just go and fight, he can't be harmed by ordinary weapons."); +~chatplayer("Okay, where is he? I'll kill him for you!"); +~chatnpc("Well you can't just go and fight, he can't be harmed by ordinary weapons."); @demon_slayer_gypsy_destroy_delrith; [label,demon_slayer_gypsy_destroy_delrith] -~chatnpc(neutral, "Wally managed to arrive at the stone circle just as Delrith was summoned by a cult of chaos druids..."); -~chatnpc(happy, "By reciting the correct magical incantation, and thrusting Silverlight into Delrith while he was newly summoned, Wally was able to imprison Delrith in the stone block in the centre of the circle."); -~chatnpc(sad, "Delrith will come forth from the stone circle again."); -~chatnpc(sad, "I would imagine an evil sorcerer is already starting on the rituals to summon Delrith as we speak."); +~chatnpc("Wally managed to arrive at the stone circle just as Delrith was summoned by a cult of chaos druids..."); +~chatnpc("By reciting the correct magical incantation, and thrusting Silverlight into Delrith while he was newly summoned, Wally was able to imprison Delrith in the stone block in the centre of the circle."); +~chatnpc("Delrith will come forth from the stone circle again."); +~chatnpc("I would imagine an evil sorcerer is already starting on the rituals to summon Delrith as we speak."); ~update_demon_progress; @demon_slayer_gypsy_more_info; @@ -236,12 +236,12 @@ if ($option = 1) { } [label,demon_slayer_gypsy_incantation] -~chatplayer(neutral, "What is the magical incantation?"); -~chatnpc(neutral, "Oh yes, let me think a second..."); +~chatplayer("What is the magical incantation?"); +~chatnpc("Oh yes, let me think a second..."); // This was not randomized with RSC, but might've been after the demon slayer rework in 2006. //https://web.archive.org/web/20041115013147/http://runescape.salmoneus.net/quests/DemonSlayer.html -~chatnpc(happy, "Alright, I think I've got it now, it goes.... Carlem... Aber... Camerinthum... Purchai... Gabindo. Have you got that?"); -~chatplayer(happy, "I think so, yes."); +~chatnpc("Alright, I think I've got it now, it goes.... Carlem... Aber... Camerinthum... Purchai... Gabindo. Have you got that?"); +~chatplayer("I think so, yes."); def_int $option = ~p_choice2("Okay, thanks. I'll do my best to stop the demon.", 1, "Where can I find Silverlight?", 2); if ($option = 1) { @@ -251,13 +251,13 @@ if ($option = 1) { } [label,demon_slayer_gypsy_ill_do_my_best] -~chatplayer(neutral, "Okay, thanks. I'll do my best to stop the demon."); -~chatnpc("happy", "Good luck, and may Guthix be with you!"); +~chatplayer("Okay, thanks. I'll do my best to stop the demon."); +~chatnpc("Good luck, and may Guthix be with you!"); [label,demon_slayer_gypsy_silverlight] -~chatplayer(neutral, "Where can I find Silverlight?"); -~chatnpc(neutral, "Silverlight has been passed down through Wally's descendants. I believe it is currently in the care of one of the King's knights called Sir Prysin."); -~chatnpc(happy, "He shouldn't be too hard to find. He lives in the royal palace in this city. Tell him Gypsy Aris sent you."); +~chatplayer("Where can I find Silverlight?"); +~chatnpc("Silverlight has been passed down through Wally's descendants. I believe it is currently in the care of one of the King's knights called Sir Prysin."); +~chatnpc("He shouldn't be too hard to find. He lives in the royal palace in this city. Tell him Gypsy Aris sent you."); def_int $option = ~p_choice2("Okay, thanks. I'll do my best to stop the demon.", 1, "What is the magical incantation?", 2); if ($option = 1) { @@ -267,9 +267,9 @@ if ($option = 1) { } [label,demon_slayer_gypsy_age_riddle] -~chatnpc(quiz, "Count the number of legs of the chairs in the blue moon inn and multiply that number by seven."); -~chatplayer(confused, "Errr yeah whatever."); +~chatnpc("Count the number of legs of the chairs in the blue moon inn and multiply that number by seven."); +~chatplayer("Errr yeah whatever."); [label,demon_slayer_gypsy_dont_believe] -~chatplayer(neutral, "No, I don't believe in that stuff."); -~chatnpc(confused, "Ok suit yourself."); \ No newline at end of file +~chatplayer("No, I don't believe in that stuff."); +~chatnpc("Ok suit yourself."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/harlow.rs2 b/data/src/scripts/areas/area_varrock/scripts/harlow.rs2 index 46e7b56d0..4f816f2fa 100644 --- a/data/src/scripts/areas/area_varrock/scripts/harlow.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/harlow.rs2 @@ -1,56 +1,56 @@ [opnpc1,harlow] -~chatnpc(confused, "Buy me a drrink pleassh..."); +~chatnpc("Buy me a drrink pleassh..."); switch_int (%vampire_progress) { case ^quest_vampire_started: @harlow_during_vampire_slayer; case ^quest_vampire_spoke_to_harlow: @harlow_during_vampire_slayer_buy_beer; - case default: ~chatplayer(quiz, "I think you've had enough."); + case default: ~chatplayer("I think you've had enough."); } [label,harlow_during_vampire_slayer] switch_int (~p_choice2("No, you've had enough.", 1, "Morgan needs your help!", 2)) { case 1: @harlow_decline_drink; - case 2: ~chatplayer(shock, "Morgan needs your help!"); + case 2: ~chatplayer("Morgan needs your help!"); case default: ~displaymessage(^dm_default); } -~chatnpc(confused, "Morgan you shhay..?"); -~chatplayer(quiz, "His village is being terrorised by a vampire! He told me to ask you about how I can stop it."); -~chatnpc(confused, "Buy me a beer... then I'll teash you what you need to know..."); -~chatplayer(shock, "But this is your friend Morgan we're talking about!"); -~chatnpc(confused, "Buy ush a drink anyway..."); +~chatnpc("Morgan you shhay..?"); +~chatplayer("His village is being terrorised by a vampire! He told me to ask you about how I can stop it."); +~chatnpc("Buy me a beer... then I'll teash you what you need to know..."); +~chatplayer("But this is your friend Morgan we're talking about!"); +~chatnpc("Buy ush a drink anyway..."); ~quest_vampire_set_progress(^quest_vampire_spoke_to_harlow); [label,harlow_during_vampire_slayer_buy_beer] if (inv_total(inv, stake) > 0) { switch_int (~p_choice2("No, you've had enough.", 1, "Okay mate.", 2)) { case 1: @harlow_decline_drink; - case 2: ~chatplayer(happy, "Okay mate."); + case 2: ~chatplayer("Okay mate."); case default: ~displaymessage(^dm_default); } } if (inv_total(inv, beer) < 1) { - ~chatplayer(quiz, "I'll just go and buy one."); + ~chatplayer("I'll just go and buy one."); return; } -~chatplayer(happy, "Here you go."); +~chatplayer("Here you go."); inv_del(inv, beer, 1); ~objboxb(beer, "You give a beer to Dr Harlow."); // beer is bugged? -~chatnpc(confused, "Cheersh matey..."); -~chatplayer(quiz, "So tell me how to kill vampires then."); -~chatnpc(confused, "Yesh Yesh vampires, I was very good at|killing em once..."); +~chatnpc("Cheersh matey..."); +~chatplayer("So tell me how to kill vampires then."); +~chatnpc("Yesh Yesh vampires, I was very good at|killing em once..."); ~mesbox("Dr Harlow appears to sober up slightly."); if (inv_total(inv, stake) > 0) { - ~chatnpc(quiz, "Don't forget to take your stake with you, otherwise he'll just regenerate. Yes, you must have a stake to finish it off... I'd give you a stake but you've got one in your inventory."); + ~chatnpc("Don't forget to take your stake with you, otherwise he'll just regenerate. Yes, you must have a stake to finish it off... I'd give you a stake but you've got one in your inventory."); } else { - ~chatnpc(quiz, "Well, you're going to need a stake, otherwise he'll just regenerate. Yes, you must have a stake to finish it off... I just happen to have one with me."); + ~chatnpc("Well, you're going to need a stake, otherwise he'll just regenerate. Yes, you must have a stake to finish it off... I just happen to have one with me."); inv_add(inv, stake, 1); ~objboxt(stake, "Dr Harlow hands you a stake."); } -~chatnpc(default, "You'll need a hammer as well, to drive it in properly, your everyday general store hammer will do. One last thing... It's wise to carry garlic with you, vampires are somewhat weakened if they can smell garlic. Morgan"); -~chatnpc(quiz, "always liked garlic, you should try his house. But remember, a vampire is still a dangerous foe!"); -~chatplayer(happy, "Thank you very much!"); +~chatnpc("You'll need a hammer as well, to drive it in properly, your everyday general store hammer will do. One last thing... It's wise to carry garlic with you, vampires are somewhat weakened if they can smell garlic. Morgan"); +~chatnpc("always liked garlic, you should try his house. But remember, a vampire is still a dangerous foe!"); +~chatplayer("Thank you very much!"); [label,harlow_decline_drink] -~chatplayer(quiz, "No, you've had enough."); +~chatplayer("No, you've had enough."); diff --git a/data/src/scripts/areas/area_varrock/scripts/horvik.rs2 b/data/src/scripts/areas/area_varrock/scripts/horvik.rs2 index c4ece11ee..9b7f19351 100644 --- a/data/src/scripts/areas/area_varrock/scripts/horvik.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/horvik.rs2 @@ -1,11 +1,11 @@ [opnpc1,horvik] -~chatnpc(happy, "Hello, do you need any help?"); +~chatnpc("Hello, do you need any help?"); def_int $option = ~p_choice2("No thanks. I'm just looking around.", 1, "Do you want to trade?", 2); if($option = 1) { - ~chatplayer(happy, "No thanks. I'm just looking around."); - ~chatnpc(happy, "Well, come and see me if you're ever in need of armour!"); + ~chatplayer("No thanks. I'm just looking around."); + ~chatnpc("Well, come and see me if you're ever in need of armour!"); } else if($option = 2) { - ~chatplayer(quiz, "Do you want to trade?"); - ~chatnpc(happy, "Yes, I have a fine selection of armour."); + ~chatplayer("Do you want to trade?"); + ~chatnpc("Yes, I have a fine selection of armour."); ~openshop_activenpc; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/juliet.rs2 b/data/src/scripts/areas/area_varrock/scripts/juliet.rs2 index 94d038ff9..22510b013 100644 --- a/data/src/scripts/areas/area_varrock/scripts/juliet.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/juliet.rs2 @@ -7,58 +7,58 @@ switch_int (%romeojuliet_progress) { case ^romeojuliet_spoken_father: @juliet_found_father; case ^romeojuliet_spoken_apothecary: @juliet_potion_made; case ^romeojuliet_juliet_crypt: - ~chatnpc(quiz, "Have you seen Romeo?|He will reward you for your help."); - ~chatnpc(happy, "He is the wealth in this story.|I am just the glamour."); + ~chatnpc("Have you seen Romeo?|He will reward you for your help."); + ~chatnpc("He is the wealth in this story.|I am just the glamour."); case ^romeojuliet_complete: @juliet_postquest; } [label,juliet_start] -~chatnpc(sad, "Romeo, Romeo, wherefore art thou Romeo?"); -~chatnpc(sad, "Bold adventurer,|have you seen Romeo on your travels?"); -~chatnpc(sad, "Skinny guy, a bit wishy washy, head full of poetry."); +~chatnpc("Romeo, Romeo, wherefore art thou Romeo?"); +~chatnpc("Bold adventurer,|have you seen Romeo on your travels?"); +~chatnpc("Skinny guy, a bit wishy washy, head full of poetry."); def_int $option = ~p_choice4("Yes I have met him.", 1, "No, I think I would have remembered if I had.", 2, "I guess I could find him.", 3, "I think you could do better.", 4); if($option = 1) { - ~chatplayer(neutral, "I did see Romeo somewhere.|He seemed a bit depressed."); - ~chatnpc(quiz, "Yes, that would be him.|Could you please deliver a message to him?"); + ~chatplayer("I did see Romeo somewhere.|He seemed a bit depressed."); + ~chatnpc("Yes, that would be him.|Could you please deliver a message to him?"); $option = ~p_choice2("Certainly, I will do so straight away!", 1, "No, he was a little too weird for me.", 2); if($option = 1) { @juliet_agree_message; } else if($option = 2) { - ~chatplayer(neutral, "No."); - ~chatnpc(sad, "Oh dear, that will be the ruin of our love."); - ~chatnpc(sad, "Well, I will just stay here and worry."); - ~chatnpc(sad, "You unromantic soul."); + ~chatplayer("No."); + ~chatnpc("Oh dear, that will be the ruin of our love."); + ~chatnpc("Well, I will just stay here and worry."); + ~chatnpc("You unromantic soul."); } } else if($option = 2) { - ~chatplayer(neutral, "No, I think I would have remembered."); - ~chatnpc(quiz, "Could you please deliver a message to him?"); + ~chatplayer("No, I think I would have remembered."); + ~chatnpc("Could you please deliver a message to him?"); $option = ~p_choice2("Certainly, I will do so straight away!", 1, "No, I have better things to do.", 2); if($option = 1) { @juliet_agree_message; } else if($option = 2) { - ~chatplayer(neutral, "No, I have better things to do."); - ~chatnpc(sad, "I will not keep you from them. Goodbye."); + ~chatplayer("No, I have better things to do."); + ~chatnpc("I will not keep you from them. Goodbye."); } } else if($option = 3) { - ~chatplayer(happy, "I guess I could find him."); - ~chatnpc(happy, "That is most kind of you!"); - ~chatnpc(happy, "Could you please deliver a message to him?"); + ~chatplayer("I guess I could find him."); + ~chatnpc("That is most kind of you!"); + ~chatnpc("Could you please deliver a message to him?"); @juliet_agree_message; } else if($option = 4) { - ~chatplayer(neutral, "I think you could do better."); - ~chatnpc(sad, "He has his good points."); - ~chatnpc(angry, "He doesn't spend all day on the internet, at least."); + ~chatplayer("I think you could do better."); + ~chatnpc("He has his good points."); + ~chatnpc("He doesn't spend all day on the internet, at least."); } [label,juliet_from_romeo] -~chatplayer(neutral, "Juliet, I come from Romeo."); -~chatplayer(neutral, "He begs I tell you he cares still."); -~chatnpc(sad, "Please, take this message to him."); +~chatplayer("Juliet, I come from Romeo."); +~chatplayer("He begs I tell you he cares still."); +~chatnpc("Please, take this message to him."); @juliet_agree_message; [label,juliet_agree_message] -~chatplayer(happy, "Certainly, I will deliver your message straight away."); -~chatnpc(sad, "It may be our only hope."); +~chatplayer("Certainly, I will deliver your message straight away."); +~chatnpc("It may be our only hope."); inv_add(inv, juliet_message, 1); %romeojuliet_progress = ^romeojuliet_spoken_juliet; ~send_quest_progress(questlist:romeojuliet, %romeojuliet_progress, ^romeojuliet_complete); @@ -66,44 +66,44 @@ inv_add(inv, juliet_message, 1); [label,juliet_deliver_letter] if(inv_total(inv, juliet_message) > 0 | inv_total(bank, juliet_message) > 0) { - ~chatnpc(sad, "Please, deliver the message to Romeo with all speed!"); + ~chatnpc("Please, deliver the message to Romeo with all speed!"); } else { - ~chatnpc(angry, "How could you lose this most important message?"); - ~chatnpc(sad, "Please, take this message to him, and please don't lose it."); + ~chatnpc("How could you lose this most important message?"); + ~chatnpc("Please, take this message to him, and please don't lose it."); ~mesbox("Juliet gives you another message."); inv_add(inv, juliet_message, 1); } [label,juliet_message_passed] -~chatplayer(happy, "I have passed on your message."); -~chatplayer(happy, "Now I go to Father Lawrence for help."); -~chatnpc(neutral, "Yes, he knows many things that can be done."); -~chatnpc(happy, "I hope you find him soon!"); +~chatplayer("I have passed on your message."); +~chatplayer("Now I go to Father Lawrence for help."); +~chatnpc("Yes, he knows many things that can be done."); +~chatnpc("I hope you find him soon!"); [label,juliet_found_father] -~chatplayer(happy, "I found the Father. Now I seek the Apothecary."); -~chatnpc(neutral, "I do not know where he lives."); -~chatnpc(sad, "But please, make haste. My father is close."); +~chatplayer("I found the Father. Now I seek the Apothecary."); +~chatnpc("I do not know where he lives."); +~chatnpc("But please, make haste. My father is close."); [label,juliet_potion_made] if(inv_total(inv, cadaver) = 0) { - ~chatplayer(happy, "I have to get a potion made for you."); - ~chatplayer(neutral, "Not done that bit yet though. Still trying."); - ~chatnpc(neutral, "Fair luck to you, the end is close."); + ~chatplayer("I have to get a potion made for you."); + ~chatplayer("Not done that bit yet though. Still trying."); + ~chatnpc("Fair luck to you, the end is close."); return; } -~chatplayer(happy, "I have a Cadaver potion from Father Lawrence."); -~chatplayer(neutral, "It should make you seem dead,|and get you away from this place."); +~chatplayer("I have a Cadaver potion from Father Lawrence."); +~chatplayer("It should make you seem dead,|and get you away from this place."); ~mesbox("You pass the potion to Juliet."); inv_del(inv, cadaver, 1); %romeojuliet_progress = ^romeojuliet_juliet_crypt; -~chatnpc(happy, "Wonderful. I just hope Romeo can|remember to get me from the crypt."); -~chatnpc(happy, "Many thanks kind friend."); -~chatnpc(neutral, "Please go to Romeo, make sure he understands."); -~chatnpc(sad, "He can be a bit dense sometimes."); +~chatnpc("Wonderful. I just hope Romeo can|remember to get me from the crypt."); +~chatnpc("Many thanks kind friend."); +~chatnpc("Please go to Romeo, make sure he understands."); +~chatnpc("He can be a bit dense sometimes."); [label,juliet_postquest] -~chatnpc(angry, "I sat in that cold crypt for ages waiting for Romeo."); -~chatnpc(angry, "That useless fool never showed up."); -~chatnpc(angry, "And all I got was indigestion.|I am done with men like him."); -~chatnpc(angry, "Now go away before I call my father!"); \ No newline at end of file +~chatnpc("I sat in that cold crypt for ages waiting for Romeo."); +~chatnpc("That useless fool never showed up."); +~chatnpc("And all I got was indigestion.|I am done with men like him."); +~chatnpc("Now go away before I call my father!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/katrine.rs2 b/data/src/scripts/areas/area_varrock/scripts/katrine.rs2 index b1b0c4cd6..8e3385a50 100644 --- a/data/src/scripts/areas/area_varrock/scripts/katrine.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/katrine.rs2 @@ -1,8 +1,8 @@ [opnpc1,katrine] if(%phoenixgang_progress >= ^phoenixgang_joined) { - ~chatnpc(angry, "You've got some guts coming here,|Phoenix !"); + ~chatnpc("You've got some guts coming here,|Phoenix !"); ~mesbox("Katrine spits."); - ~chatnpc(angry, "Now get lost!"); + ~chatnpc("Now get lost!"); return; } switch_int(%blackarmgang_progress) { @@ -12,8 +12,8 @@ switch_int(%blackarmgang_progress) { } [label,katrine_standard] -~chatplayer(quiz, "What is this place?"); -~chatnpc(neutral, "It's a private business.|Can I help you at all?"); +~chatplayer("What is this place?"); +~chatnpc("It's a private business.|Can I help you at all?"); def_int $option; if(%blackarmgang_progress = ^blackarmgang_started) { $option = ~p_choice3("I've heard you're the Black Arm Gang.", 3, "What sort of business?", 1, "I'm looking for fame and riches.", 2); @@ -22,99 +22,99 @@ if(%blackarmgang_progress = ^blackarmgang_started) { } switch_int($option) { case 1: - ~chatplayer(quiz, "What sort of business?"); - ~chatnpc(neutral, "A small, family business.|We give financial advice to other companies."); + ~chatplayer("What sort of business?"); + ~chatnpc("A small, family business.|We give financial advice to other companies."); case 2: - ~chatplayer(neutral, "I'm looking for fame and riches."); - ~chatnpc(shock, "And you expect to find it up the back streets of Varrock?"); + ~chatplayer("I'm looking for fame and riches."); + ~chatnpc("And you expect to find it up the back streets of Varrock?"); case 3: - ~chatplayer(quiz, "I've heard you're the Black Arm Gang."); - ~chatnpc(angry, "Who told you that?"); + ~chatplayer("I've heard you're the Black Arm Gang."); + ~chatnpc("Who told you that?"); $option = ~p_choice3("I'd rather not reveal my sources.", 1, "It was the tramp outside.", 2, "Everyone knows - it's no great secret.", 3); if($option = 1) { - ~chatplayer(neutral, "I'd rather not reveal my sources."); - ~chatnpc(neutral, "Yes, I can understand that.|So what do you want with us?"); + ~chatplayer("I'd rather not reveal my sources."); + ~chatnpc("Yes, I can understand that.|So what do you want with us?"); } else if($option = 2) { - ~chatplayer(neutral, "It was the tramp outside."); - ~chatnpc(neutral, "Is that guy still out there?|He's getting to be a nuisance.|Remind me to send someone to kill him."); - ~chatnpc(neutral, "So now you've found us,|what do you want?"); + ~chatplayer("It was the tramp outside."); + ~chatnpc("Is that guy still out there?|He's getting to be a nuisance.|Remind me to send someone to kill him."); + ~chatnpc("So now you've found us,|what do you want?"); } else if($option = 3) { - ~chatplayer(neutral, "Everyone knows.|It's no great secret."); - ~chatnpc(shock, "I thought we were safe back here!"); - ~chatplayer(neutral, "Oh no, not at all...|It's so obvious!|Even the town guard have caught on..."); - ~chatnpc(neutral, "Wow! We MUST be obvious! I guess they'll be expecting bribes again soon in that case."); - ~chatnpc(neutral, "Thanks for the information."); - ~chatnpc(quiz, "Is there anything else you want to tell me?"); + ~chatplayer("Everyone knows.|It's no great secret."); + ~chatnpc("I thought we were safe back here!"); + ~chatplayer("Oh no, not at all...|It's so obvious!|Even the town guard have caught on..."); + ~chatnpc("Wow! We MUST be obvious! I guess they'll be expecting bribes again soon in that case."); + ~chatnpc("Thanks for the information."); + ~chatnpc("Is there anything else you want to tell me?"); } @multi3("I want to become a member of your gang.", katrine_gangmember, "I want some hints for becoming a thief.", katrine_hint, "I'm looking for the door out of here.", katrine_doorout); } [label,katrine_gangmember] -~chatplayer(neutral, "I want to become a member of your gang."); -~chatnpc(neutral, "How unusual."); -~chatnpc(neutral, "Normally we recruit for our gang|by watching local thugs and thieves in action.|People don't normally waltz in here|saying 'hello, can I play'."); -~chatnpc(neutral, "How can I be sure you can be trusted?"); +~chatplayer("I want to become a member of your gang."); +~chatnpc("How unusual."); +~chatnpc("Normally we recruit for our gang|by watching local thugs and thieves in action.|People don't normally waltz in here|saying 'hello, can I play'."); +~chatnpc("How can I be sure you can be trusted?"); switch_int (~p_choice2("Well, you can give me a try can't you?", 1, "Well, people tell me I have an honest face.", 2)) { case 1: - ~chatplayer(neutral, "Well, you can give me a try can't you?"); - ~chatnpc(neutral, "I'm not so sure."); + ~chatplayer("Well, you can give me a try can't you?"); + ~chatnpc("I'm not so sure."); case 2: - ~chatplayer(happy, "Well, people tell me I have an honest face!"); - ~chatnpc(neutral, "... How unusual. Someone honest wanting to join a gang of thieves. Excuse me if I remain unconvinced."); + ~chatplayer("Well, people tell me I have an honest face!"); + ~chatnpc("... How unusual. Someone honest wanting to join a gang of thieves. Excuse me if I remain unconvinced."); } -~chatnpc(neutral, "Thinking about it... I may have a solution actually."); -~chatnpc(neutral, "Our rival gang - the Phoenix Gang -|has a weapons stash a little east of here."); -~chatnpc(neutral, "We're fresh out of crossbows,|so if you could steal a couple of crossbows for us|it would be very much appreciated."); -~chatnpc(neutral, "Then I'll be happy to call you a Black Arm."); +~chatnpc("Thinking about it... I may have a solution actually."); +~chatnpc("Our rival gang - the Phoenix Gang -|has a weapons stash a little east of here."); +~chatnpc("We're fresh out of crossbows,|so if you could steal a couple of crossbows for us|it would be very much appreciated."); +~chatnpc("Then I'll be happy to call you a Black Arm."); switch_int (~p_choice2("Ok, no problem.", 1, "Sounds a little tricky. Got anything easier?", 2)) { case 1: - ~chatplayer(happy, "Ok, no problem."); + ~chatplayer("Ok, no problem."); %blackarmgang_progress = 2; - ~chatnpc(neutral, "Great! You'll find the Phoenix gang's weapon stash just next to a temple, due east of here."); + ~chatnpc("Great! You'll find the Phoenix gang's weapon stash just next to a temple, due east of here."); case 2: - ~chatplayer(confused, "Sounds a little tricky..."); - ~chatplayer(quiz, "Got anything easier?"); - ~chatnpc(angry, "If you're not up to a little bit of danger|I don't think you've got anything to offer our gang."); + ~chatplayer("Sounds a little tricky..."); + ~chatplayer("Got anything easier?"); + ~chatnpc("If you're not up to a little bit of danger|I don't think you've got anything to offer our gang."); } [label,katrine_hint] -~chatplayer(neutral, "I want some hints for becoming a thief."); -~chatnpc(neutral, "Well, I'm sorry luv,|I'm not giving away any of my secrets."); -~chatnpc(neutral, "Not to people who ain't Black Arm members anyway."); +~chatplayer("I want some hints for becoming a thief."); +~chatnpc("Well, I'm sorry luv,|I'm not giving away any of my secrets."); +~chatnpc("Not to people who ain't Black Arm members anyway."); [label,katrine_doorout] -~chatplayer(neutral, "I'm looking for the door out of here."); +~chatplayer("I'm looking for the door out of here."); ~mesbox("Katrine groans."); -~chatnpc(confused, "Try... the one you just came in?"); +~chatnpc("Try... the one you just came in?"); [label,katrine_got_yet] -~chatnpc(quiz, "Have you got those crossbows for me yet?"); +~chatnpc("Have you got those crossbows for me yet?"); if(inv_total(inv,phoenix_crossbow) >= 2) { - ~chatplayer(happy, "Yes, I have."); + ~chatplayer("Yes, I have."); ~mesbox("You give the crossbows to Katrine."); inv_del(inv, phoenix_crossbow, 2); %blackarmgang_progress = ^blackarmgang_joined; - ~chatnpc(neutral, "Ok. You can join our gang now.|Feel free to enter any of the rooms of the ganghouse."); + ~chatnpc("Ok. You can join our gang now.|Feel free to enter any of the rooms of the ganghouse."); return; } else if(inv_total(inv,phoenix_crossbow) = 1) { - ~chatplayer(neutral, "I have one..."); - ~chatnpc(neutral, "I need two.|Come back when you have them."); + ~chatplayer("I have one..."); + ~chatnpc("I need two.|Come back when you have them."); return; } -~chatplayer(sad, "No, I haven't found them yet."); -~chatnpc(neutral, "I need two crossbows|stolen from the Phoenix Gang weapons stash,|which if you head east for a bit,|is a building on the south side of the road."); -~chatnpc(neutral, "Come back when you got 'em."); +~chatplayer("No, I haven't found them yet."); +~chatnpc("I need two crossbows|stolen from the Phoenix Gang weapons stash,|which if you head east for a bit,|is a building on the south side of the road."); +~chatnpc("Come back when you got 'em."); [label,katrine_blackarmmember] -~chatplayer(neutral, "Hey."); -~chatnpc(neutral, "Hey."); +~chatplayer("Hey."); +~chatnpc("Hey."); switch_int (~p_choice2("Who are all those people in there?", 1, "Teach me to be a top class criminal.", 2)) { case 1: - ~chatplayer(quiz, "Who are all those people in there?"); - ~chatnpc(neutral, "They're just various rogues and thieves."); - ~chatplayer(quiz, "They don't say a lot..."); - ~chatnpc(neutral, "Nope."); + ~chatplayer("Who are all those people in there?"); + ~chatnpc("They're just various rogues and thieves."); + ~chatplayer("They don't say a lot..."); + ~chatnpc("Nope."); case 2: - ~chatplayer(neutral, "Teach me to be a top class criminal."); - ~chatnpc(neutral, "Teach yourself."); + ~chatplayer("Teach me to be a top class criminal."); + ~chatnpc("Teach yourself."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/king_roald.rs2 b/data/src/scripts/areas/area_varrock/scripts/king_roald.rs2 index c0286fa8d..686978d9e 100644 --- a/data/src/scripts/areas/area_varrock/scripts/king_roald.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/king_roald.rs2 @@ -7,33 +7,33 @@ if(last_useitem = arravcert_scroll) { // copying rsc logic here, no dialogue without both shield pieces or the certificate [label,roald_dialogue] -~chatplayer(happy, "Greetings, your majesty."); +~chatplayer("Greetings, your majesty."); if(inv_total(inv, arravcert_scroll) > 0) { - ~chatplayer(happy, "Your majesty.|I have come to claim the reward|for the return of the Shield Of Arrav."); + ~chatplayer("Your majesty.|I have come to claim the reward|for the return of the Shield Of Arrav."); if(%phoenixgang_progress < ^phoenixgang_joined & %blackarmgang_progress < ^blackarmgang_joined) { - ~chatnpc(confused, "The name on this certificate isn't yours!|I can't give you the reward|unless you do the quest yourself!"); + ~chatnpc("The name on this certificate isn't yours!|I can't give you the reward|unless you do the quest yourself!"); return; } if(%phoenixgang_progress = ^phoenixgang_complete | %blackarmgang_progress = ^blackarmgang_complete) { - ~chatnpc(confused, "You have already claimed the reward.|You can't claim it twice!"); + ~chatnpc("You have already claimed the reward.|You can't claim it twice!"); ~mesbox("Why don't you give this certificate|to the person who helped you get the shield?"); return; } ~objbox(arravcert_scroll, "You show the certificate to the king."); - ~chatnpc(happy, "My goodness! This claim is for the reward offered by my father many years ago!"); - ~chatnpc(happy, "I never thought I'd see anyone claim this reward!"); - ~chatnpc(happy, "I see you are claiming half the reward,|so I will give you half of the bounty.|That comes to exactly 600 gold coins!"); + ~chatnpc("My goodness! This claim is for the reward offered by my father many years ago!"); + ~chatnpc("I never thought I'd see anyone claim this reward!"); + ~chatnpc("I see you are claiming half the reward,|so I will give you half of the bounty.|That comes to exactly 600 gold coins!"); ~objbox(coins_250, "You hand over a certificate.|The king gives you 600 gold coins."); queue(blackarmgang_quest_complete, 0); return; } if(inv_total(inv, arravshield1) > 0 & inv_total(inv, arravshield2) > 0) { - ~chatplayer(happy, "Your majesty,|I have recovered the Shield Of Arrav;|I would like to claim the reward."); - ~chatnpc(neutral, "The Shield of Arrav, eh? Yes, I do recall my father, King Roald, put a reward out for that."); - ~chatnpc(neutral, "Very well."); - ~chatnpc(neutral, "If you get the authenticity of the shield verified|by the curator at the museum|and then return here with authentication,|I will grant you your reward."); + ~chatplayer("Your majesty,|I have recovered the Shield Of Arrav;|I would like to claim the reward."); + ~chatnpc("The Shield of Arrav, eh? Yes, I do recall my father, King Roald, put a reward out for that."); + ~chatnpc("Very well."); + ~chatnpc("If you get the authenticity of the shield verified|by the curator at the museum|and then return here with authentication,|I will grant you your reward."); return; } -~chatnpc(neutral, "Do you have anything of importance to say?"); -~chatplayer(neutral, "...Not really."); -~chatnpc(neutral, "You will have to excuse me, then.|I am very busy|as I have a kingdom to run!"); \ No newline at end of file +~chatnpc("Do you have anything of importance to say?"); +~chatplayer("...Not really."); +~chatnpc("You will have to excuse me, then.|I am very busy|as I have a kingdom to run!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/lowe.rs2 b/data/src/scripts/areas/area_varrock/scripts/lowe.rs2 index 6fa993238..89bc2b6cc 100644 --- a/data/src/scripts/areas/area_varrock/scripts/lowe.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/lowe.rs2 @@ -1,10 +1,10 @@ [opnpc1,lowe] -~chatnpc(neutral, "Welcome to Lowe's Archery Emporium.|Do you want to see my wares?"); +~chatnpc("Welcome to Lowe's Archery Emporium.|Do you want to see my wares?"); def_int $option = ~p_choice2("Yes please.", 1, "No, I prefer to bash things close up.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No, I prefer to bash things close up."); - ~chatnpc(neutral, "Humph, philistine."); + ~chatplayer("No, I prefer to bash things close up."); + ~chatnpc("Humph, philistine."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/reldo.rs2 b/data/src/scripts/areas/area_varrock/scripts/reldo.rs2 index baa492ef0..981b7278f 100644 --- a/data/src/scripts/areas/area_varrock/scripts/reldo.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/reldo.rs2 @@ -2,7 +2,7 @@ if(%phoenixgang_progress = ^phoenixgang_read_book) { @reldo_read_book; } -~chatnpc(default, "Hello stranger."); +~chatnpc("Hello stranger."); if(%squire_progress = 1 & %phoenixgang_progress = 0) { // knights sword started and arrav not started @multi4("I'm in search of a quest", reldo_phoenixstart, "Do you have anything to trade?", reldo_trade, "What do you do?", reldo_what_do, "What do you know about the Imcando dwarves?", reldo_imcando_dwaves); } else if(%squire_progress = 1) { // knights sword started and arrav in progress @@ -14,31 +14,31 @@ if(%squire_progress = 1 & %phoenixgang_progress = 0) { // knights sword started } [label,reldo_trade] -~chatplayer(quiz, "Do you have anything to trade?"); -~chatnpc(neutral, "Only knowledge."); -~chatplayer(quiz, "How much do you want for that then?"); -~chatnpc(laugh, "No, sorry, that was just my little joke. I'm not the trading type."); -~chatplayer(neutral, "Ah well."); +~chatplayer("Do you have anything to trade?"); +~chatnpc("Only knowledge."); +~chatplayer("How much do you want for that then?"); +~chatnpc("No, sorry, that was just my little joke. I'm not the trading type."); +~chatplayer("Ah well."); [label,reldo_what_do] -~chatplayer(quiz, "What do you do?"); -~chatnpc(neutral, "I am the palace librarian."); -~chatplayer(neutral, "Ah. That's why you're in the library then."); -~chatnpc(neutral, "Yes."); -~chatnpc(neutral, "Although I would probably be in here even if I didn't work here. I like reading. Someday I hope to catalogue all of the information stored in these books so all may read it."); +~chatplayer("What do you do?"); +~chatnpc("I am the palace librarian."); +~chatplayer("Ah. That's why you're in the library then."); +~chatnpc("Yes."); +~chatnpc("Although I would probably be in here even if I didn't work here. I like reading. Someday I hope to catalogue all of the information stored in these books so all may read it."); [label,reldo_phoenixstart] -~chatplayer(neutral, "I'm in search of a quest."); -~chatnpc(neutral, "Hmmm. I don't... believe there are any here..."); -~chatnpc(confused, "Let me think actually..."); -~chatnpc(neutral, "If you look in a book called 'The Shield of Arrav',|you'll find a quest in there."); +~chatplayer("I'm in search of a quest."); +~chatnpc("Hmmm. I don't... believe there are any here..."); +~chatnpc("Let me think actually..."); +~chatnpc("If you look in a book called 'The Shield of Arrav',|you'll find a quest in there."); %phoenixgang_progress = ^phoenixgang_started; ~send_quest_progress(questlist:blackarmgang, %phoenixgang_progress, ^phoenixgang_complete); -~chatnpc(neutral, "I'm not sure where the book is mind you...|but I'm sure it's around here somewhere."); +~chatnpc("I'm not sure where the book is mind you...|but I'm sure it's around here somewhere."); [label,reldo_read_book] -~chatplayer(quiz, "Ok. I've read the book.|Do you know where I can find the Phoenix Gang?"); -~chatnpc(neutral, "No, I don't.|I think I know someone who might however."); +~chatplayer("Ok. I've read the book.|Do you know where I can find the Phoenix Gang?"); +~chatnpc("No, I don't.|I think I know someone who might however."); %phoenixgang_progress = 3; -~chatnpc(neutral, "If I were you I would talk to|Baraek, the fur trader in the market place.|I've heard he has connections with the Phoenix Gang."); -~chatplayer(happy, "Thanks, I'll try that!"); \ No newline at end of file +~chatnpc("If I were you I would talk to|Baraek, the fur trader in the market place.|I've heard he has connections with the Phoenix Gang."); +~chatplayer("Thanks, I'll try that!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/romeo.rs2 b/data/src/scripts/areas/area_varrock/scripts/romeo.rs2 index 375337fd6..b9727d8b4 100644 --- a/data/src/scripts/areas/area_varrock/scripts/romeo.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/romeo.rs2 @@ -1,98 +1,98 @@ [opnpc1,romeo] switch_int (%romeojuliet_progress) { case ^romeojuliet_not_started: @romeojuliet_start; - case ^romeojuliet_spoken_romeo: ~chatnpc(sad, "Please find my Juliet, I am so, so sad."); + case ^romeojuliet_spoken_romeo: ~chatnpc("Please find my Juliet, I am so, so sad."); case ^romeojuliet_spoken_juliet: @romeo_messagefrom; case ^romeojuliet_passed_message: - ~chatnpc(sad, "Please friend, how goes our quest?"); - ~chatnpc(sad, "Father Lawrence must be told. Only he can help."); + ~chatnpc("Please friend, how goes our quest?"); + ~chatnpc("Father Lawrence must be told. Only he can help."); case ^romeojuliet_spoken_father: @romeo_father; case ^romeojuliet_spoken_apothecary: @romeo_potion; case ^romeojuliet_juliet_crypt: @romeo_allset; case ^romeojuliet_complete: - ~chatnpc(sad, "I heard Juliet had died. Terrible business."); - ~chatnpc(happy, "Her cousin and I are getting on well though.|Thanks for your help!"); + ~chatnpc("I heard Juliet had died. Terrible business."); + ~chatnpc("Her cousin and I are getting on well though.|Thanks for your help!"); } [label,romeojuliet_start] -~chatnpc(sad, "Juliet, Juliet, Juliet! Wherefore Art thou?"); // space is intentional -~chatnpc(sad, "Kind friend, have you seen Juliet?"); -~chatnpc(sad, "She's disappeared and I can't find her anywhere."); +~chatnpc("Juliet, Juliet, Juliet! Wherefore Art thou?"); // space is intentional +~chatnpc("Kind friend, have you seen Juliet?"); +~chatnpc("She's disappeared and I can't find her anywhere."); switch_int(~p_choice3("Yes, I have seen her.", 1, "No, but that's girls for you.", 2, "Can I help find her for you?", 3)) { case 1: - ~chatplayer(happy, "Yes, I have seen her."); - ~chatplayer(shifty, "I think it was her... Blonde? A bit stressed?"); - ~chatnpc(happy, "Yes, that sounds like her.|Please tell her I long to be with her."); + ~chatplayer("Yes, I have seen her."); + ~chatplayer("I think it was her... Blonde? A bit stressed?"); + ~chatnpc("Yes, that sounds like her.|Please tell her I long to be with her."); @multi2("Yes, I will tell her.", romeo_tell_her, "Sorry, I am too busy. Maybe later?", romeo_busy); case 2: - ~chatplayer(happy, "No, but that's girls for you."); - ~chatnpc(sad, "Not my dear Juliet, she is different."); - ~chatnpc(quiz, "Could you find her for me?|Please tell her I long to be with her."); + ~chatplayer("No, but that's girls for you."); + ~chatnpc("Not my dear Juliet, she is different."); + ~chatnpc("Could you find her for me?|Please tell her I long to be with her."); @multi2("Yes, I will tell her how you feel.", romeo_tell_her, "I can't, it sounds like work to me.", romeo_work); case 3: - ~chatplayer(happy, "Can I help find her for you?"); - ~chatnpc(happy, "Oh would you? That would be wonderful!"); - ~chatnpc(happy, "Please tell her I long to be with her."); + ~chatplayer("Can I help find her for you?"); + ~chatnpc("Oh would you? That would be wonderful!"); + ~chatnpc("Please tell her I long to be with her."); @romeo_tell_her; } [label,romeo_tell_her] -~chatplayer(neutral, "Yes, I will tell her how you feel."); -~chatnpc(happy, "You are the saviour of my heart, thank you."); -~chatplayer(neutral, "Err, yes. Ok. Thats.... Nice."); +~chatplayer("Yes, I will tell her how you feel."); +~chatnpc("You are the saviour of my heart, thank you."); +~chatplayer("Err, yes. Ok. Thats.... Nice."); %romeojuliet_progress = ^romeojuliet_spoken_romeo; ~send_quest_progress(questlist:romeojuliet, %romeojuliet_progress, ^romeojuliet_complete); [label,romeo_busy] -~chatplayer(quiz, "Sorry, I am too busy. Maybe later?"); -~chatnpc(sad, "Well if you do find her, I would be most grateful."); +~chatplayer("Sorry, I am too busy. Maybe later?"); +~chatnpc("Well if you do find her, I would be most grateful."); [label,romeo_work] -~chatplayer(bored, "I can't, it sounds like work to me."); -~chatnpc(angry, "Well, I guess you are not the romantic type.|Goodbye!"); +~chatplayer("I can't, it sounds like work to me."); +~chatnpc("Well, I guess you are not the romantic type.|Goodbye!"); [label,romeo_messagefrom] -~chatplayer(happy, "Romeo, I have a message from Juliet."); +~chatplayer("Romeo, I have a message from Juliet."); ~mesbox("You pass Juliet's message to Romeo."); inv_del(inv, juliet_message, 1); %romeojuliet_progress = ^romeojuliet_passed_message; -~chatnpc(sad, "Tragic news. Her father is opposing our marriage."); -~chatnpc(sad, "If her father sees me, he will kill me."); -~chatnpc(sad, "I dare not go near his lands."); -~chatnpc(sad, "She says Father Lawrence can help us."); -~chatnpc(sad, "Please find him for me. Tell him of our plight."); +~chatnpc("Tragic news. Her father is opposing our marriage."); +~chatnpc("If her father sees me, he will kill me."); +~chatnpc("I dare not go near his lands."); +~chatnpc("She says Father Lawrence can help us."); +~chatnpc("Please find him for me. Tell him of our plight."); [label,romeo_father] -~chatnpc(quiz, "Did you find the Father? What did he suggest?"); +~chatnpc("Did you find the Father? What did he suggest?"); def_int $option = ~p_choice2("He sent me to the Apothecary.", 1, "He seems keen for you to marry Juliet.", 2); if($option = 1) { - ~chatplayer(neutral, "He sent me to the Apothecary."); - ~chatnpc(neutral, "I know him."); - ~chatnpc(neutral, "He lives near the town square,|the small house behind the sloped building."); - ~chatnpc(happy, "Good luck."); + ~chatplayer("He sent me to the Apothecary."); + ~chatnpc("I know him."); + ~chatnpc("He lives near the town square,|the small house behind the sloped building."); + ~chatnpc("Good luck."); } else if($option = 2) { - ~chatplayer(happy, "He seems keen for you to marry Juliet."); - ~chatnpc(neutral, "I think he wants some peace."); - ~chatnpc(happy, "He was our messenger before you|were kind enough to help us."); + ~chatplayer("He seems keen for you to marry Juliet."); + ~chatnpc("I think he wants some peace."); + ~chatnpc("He was our messenger before you|were kind enough to help us."); } [label,romeo_potion] if(inv_total(inv, cadaver) > 0) { - ~chatnpc(neutral, "Ah, you have the potion."); - ~chatnpc(neutral, "I was told what to do by the good Father."); - ~chatnpc(neutral, "Better get it to Juliet. She knows what is happening."); + ~chatnpc("Ah, you have the potion."); + ~chatnpc("I was told what to do by the good Father."); + ~chatnpc("Better get it to Juliet. She knows what is happening."); return; } -~chatnpc(happy, "I hope the potion is near ready."); -~chatnpc(happy, "It is the last step for the great plan."); -~chatnpc(happy, "I hope I will be with my dear one soon."); +~chatnpc("I hope the potion is near ready."); +~chatnpc("It is the last step for the great plan."); +~chatnpc("I hope I will be with my dear one soon."); [label,romeo_allset] -~chatplayer(happy, "Romeo, it's all set. Juliet has the potion."); -~chatnpc(neutral, "Ah right."); -~chatnpc(neutral, "What potion would that be then?"); -~chatplayer(neutral, "The one to get her to the crypt."); -~chatnpc(neutral, "Ah right."); -~chatnpc(sad, "So she is dead then. Aww that's a shame."); -~chatnpc(sad, "Thanks for your help anyway."); +~chatplayer("Romeo, it's all set. Juliet has the potion."); +~chatnpc("Ah right."); +~chatnpc("What potion would that be then?"); +~chatplayer("The one to get her to the crypt."); +~chatnpc("Ah right."); +~chatnpc("So she is dead then. Aww that's a shame."); +~chatnpc("Thanks for your help anyway."); queue(romeo_and_juliet_complete, 0); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/scavvo.rs2 b/data/src/scripts/areas/area_varrock/scripts/scavvo.rs2 index bbb633828..ac10397fe 100644 --- a/data/src/scripts/areas/area_varrock/scripts/scavvo.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/scavvo.rs2 @@ -1,12 +1,12 @@ [opnpc1,scavvo] -~chatnpc(happy, "'Ello matey!|D'ya wanna buy some exciting new toys?"); +~chatnpc("'Ello matey!|D'ya wanna buy some exciting new toys?"); switch_int(~p_choice3("No, toys are for kids.", 1, "Let's have a look then.", 2, "Ooh, goody goody, toys!", 3)) { case 1: - ~chatplayer(confused, "No, toys are for kids."); + ~chatplayer("No, toys are for kids."); case 2: - ~chatplayer(happy, "Let's have a look then."); + ~chatplayer("Let's have a look then."); ~openshop_activenpc; case 3: - ~chatplayer(happy, "Ooh goody goody, toys!"); + ~chatplayer("Ooh goody goody, toys!"); ~openshop_activenpc; } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/sir_prysin.rs2 b/data/src/scripts/areas/area_varrock/scripts/sir_prysin.rs2 index e47d4d7ba..e2f3500f1 100644 --- a/data/src/scripts/areas/area_varrock/scripts/sir_prysin.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/sir_prysin.rs2 @@ -4,67 +4,67 @@ if (%demon_progress = 0 | %demon_progress = 1) { } else if (%demon_progress > 1 & %demon_progress < ^demon_complete) { @demon_slayer_sir_prysin_key_search_progress; } else if (%demon_progress = ^demon_complete) { - ~chatnpc(happy, "Hello. I've heard you stopped the demon, well done."); - ~chatplayer(neutral, "Yes, that's right."); - ~chatnpc(happy, "Thank you."); + ~chatnpc("Hello. I've heard you stopped the demon, well done."); + ~chatplayer("Yes, that's right."); + ~chatnpc("Thank you."); } [label,demon_slayer_sir_prysin_pre_silverlight] -~chatnpc(neutral, "Hello, who are you?"); +~chatnpc("Hello, who are you?"); def_int $option = ~demon_slayer_sir_prysin_options(%demon_progress); if ($option = 1) { - ~chatplayer(neutral, "I am a mighty adventurer, who are you?"); - ~chatnpc(neutral, "I am Sir Prysin. A bold and famous knight of the realm."); + ~chatplayer("I am a mighty adventurer, who are you?"); + ~chatnpc("I am Sir Prysin. A bold and famous knight of the realm."); } else if ($option = 2) { - ~chatplayer(confused, "I was hoping you could tell me."); - ~chatnpc(neutral, "Well I've never met you before."); + ~chatplayer("I was hoping you could tell me."); + ~chatnpc("Well I've never met you before."); } else { - ~chatplayer(neutral, "Gypsy Aris said I should come and talk to you."); + ~chatplayer("Gypsy Aris said I should come and talk to you."); @demon_slayer_sir_prysin_gypsy; } [label,demon_slayer_sir_prysin_key_search_progress] if (inv_total(inv, silverlight) < 1 & inv_getobj(worn, 3) ! silverlight) { - ~chatnpc(neutral, "So how are you doing with getting the keys?"); + ~chatnpc("So how are you doing with getting the keys?"); if (inv_total(inv, demon_traiborn_key) > 0 & inv_total(inv, demon_rovin_key) > 0 & inv_total(inv, demon_prysin_key) > 0) { @demon_slayer_prysin_got_them; } else if (inv_total(inv, demon_traiborn_key) < 1 & inv_total(inv, demon_rovin_key) < 1 & inv_total(inv, demon_prysin_key) < 1) { - ~chatplayer(happy, "I've not found any of them yet."); + ~chatplayer("I've not found any of them yet."); } else { - ~chatplayer(neutral, "I've made a start."); + ~chatplayer("I've made a start."); } if (inv_total(inv, demon_traiborn_key) > 0) { - ~chatplayer(neutral, "I've got the key off Wizard Traiborn."); + ~chatplayer("I've got the key off Wizard Traiborn."); } if (inv_total(inv, demon_rovin_key) > 0) { - ~chatplayer(neutral, "I've got the key off Captain Rovin."); + ~chatplayer("I've got the key off Captain Rovin."); } if (inv_total(inv, demon_prysin_key) > 0) { - ~chatplayer(neutral, "I've got the key You dropped down the drain."); + ~chatplayer("I've got the key You dropped down the drain."); } def_int $option = ~p_choice2("Can you remind me where all they keys were again?", 1, "I'm still looking.", 2); if ($option = 1) { - ~chatplayer(neutral, "Can you remind me where all they keys were again?"); + ~chatplayer("Can you remind me where all they keys were again?"); @demon_slayer_sir_prysin_keys; } else { - ~chatplayer(neutral, "I'm still looking."); - ~chatnpc(neutral, "Ok, tell me when you've got them all."); + ~chatplayer("I'm still looking."); + ~chatnpc("Ok, tell me when you've got them all."); } } else { - ~chatnpc(neutral, "You sorted out that demon yet?"); - ~chatplayer(happy, "No, not yet."); - ~chatnpc(neutral, "Well get on with it. He'll be pretty powerful when he gets to full strength."); + ~chatnpc("You sorted out that demon yet?"); + ~chatplayer("No, not yet."); + ~chatnpc("Well get on with it. He'll be pretty powerful when he gets to full strength."); } [label,demon_slayer_prysin_got_them] -~chatplayer(happy, "I've got all three keys!"); -~chatnpc(happy, "Excellent! Now I can give you Silverlight."); +~chatplayer("I've got all three keys!"); +~chatnpc("Excellent! Now I can give you Silverlight."); if_close(); mes("You give all three keys to Sir Prysin."); inv_del(inv, demon_traiborn_key, 1); @@ -76,50 +76,50 @@ p_delay(2); inv_add(inv, silverlight, 1); [label,demon_slayer_sir_prysin_gypsy] -~chatnpc(neutral, "Gypsy Aris? Is she still alive? I remember her from when I was pretty young. Well what do you need to talk to me about?"); +~chatnpc("Gypsy Aris? Is she still alive? I remember her from when I was pretty young. Well what do you need to talk to me about?"); def_int $option = ~p_choice2("I need to find Silverlight.", 1, "Yes, she is still alive.", 2); if ($option = 1) { @demon_slayer_sir_prysin_silverlight; } else if ($option = 2) { - ~chatplayer(happy, "Yes she is still alive. She lives right outside the castle!"); - ~chatnpc(neutral, "I would have thought she would have died by now. She was pretty old when I was a lad."); - ~chatnpc(neutral, "Anyway, what can I do for you?"); + ~chatplayer("Yes she is still alive. She lives right outside the castle!"); + ~chatnpc("I would have thought she would have died by now. She was pretty old when I was a lad."); + ~chatnpc("Anyway, what can I do for you?"); @demon_slayer_sir_prysin_silverlight; } [label,demon_slayer_sir_prysin_silverlight] -~chatplayer(neutral, "I need to find Silverlight."); -~chatnpc(neutral, "What do you need to find that for?"); -~chatplayer(neutral, "I need it to fight Delrith."); -~chatnpc(neutral, "Delrith? I thought the world was rid of him."); +~chatplayer("I need to find Silverlight."); +~chatnpc("What do you need to find that for?"); +~chatplayer("I need it to fight Delrith."); +~chatnpc("Delrith? I thought the world was rid of him."); def_int $option = ~p_choice2("Well, the gypsy's crystal ball seems to think otherwise.", 1, "He's back and unfortunately I've got to deal with him.", 2); if ($option = 1) { - ~chatplayer(neutral, "Well the gypsy's crystal ball seems to think otherwise."); - ~chatnpc(neutral, "Well if the ball says so, I'd better help you."); + ~chatplayer("Well the gypsy's crystal ball seems to think otherwise."); + ~chatnpc("Well if the ball says so, I'd better help you."); } else if ($option = 2) { - ~chatplayer(sad, "He's back and unfortunately I've got to deal with him."); - ~chatnpc(neutral, "You don't look up to much. I suppose Silverlight may be good enough to carry you through though."); + ~chatplayer("He's back and unfortunately I've got to deal with him."); + ~chatnpc("You don't look up to much. I suppose Silverlight may be good enough to carry you through though."); } -~chatnpc(neutral, "The problem is getting Silverlight."); -~chatplayer(sad, "You mean you don't have it?"); -~chatnpc(neutral, "Oh I do have it, but it is so powerful that I have to put it in a special box which needs three different keys to open it. That way it won't fall into the wrong hands."); +~chatnpc("The problem is getting Silverlight."); +~chatplayer("You mean you don't have it?"); +~chatnpc("Oh I do have it, but it is so powerful that I have to put it in a special box which needs three different keys to open it. That way it won't fall into the wrong hands."); def_int $option_keys = ~p_choice2("So give me the keys!", 1, "And why is this a problem?", 2); if ($option_keys = 1) { - ~chatplayer(quiz, "So give me the keys!"); - ~chatnpc(neutral, "Um, well it's not so easy."); + ~chatplayer("So give me the keys!"); + ~chatnpc("Um, well it's not so easy."); @demon_slayer_sir_prysin_keys; } else if ($option_keys = 2) { - ~chatplayer(neutral, "And why is this a problem?"); + ~chatplayer("And why is this a problem?"); @demon_slayer_sir_prysin_keys; } [label,demon_slayer_sir_prysin_keys] -~chatnpc(neutral, "I kept one of the keys. I gave the other two to other people for safe keeping."); -~chatnpc(neutral, "One I gave to Rovin, the captain of the palace guard."); -~chatnpc(neutral, "I gave the other to the wizard Traiborn."); +~chatnpc("I kept one of the keys. I gave the other two to other people for safe keeping."); +~chatnpc("One I gave to Rovin, the captain of the palace guard."); +~chatnpc("I gave the other to the wizard Traiborn."); if (%demon_progress < 2) { ~update_demon_progress; } @@ -134,10 +134,10 @@ if ($option_keys = 1) { } [label,demon_slayer_sir_prysin_key_inquiry] -~chatplayer(neutral, "Can you give me your key?"); -~chatnpc(sad, "Um.... ah...."); -~chatnpc(sad, "Well there's a problem there as well."); -~chatnpc(sad, "I managed to drop the key in the drain just outside the palace kitchen. It is just inside and I can't reach it."); +~chatplayer("Can you give me your key?"); +~chatnpc("Um.... ah...."); +~chatnpc("Well there's a problem there as well."); +~chatnpc("I managed to drop the key in the drain just outside the palace kitchen. It is just inside and I can't reach it."); def_int $option = ~p_choice3("So what does the drain lead to?", 1, "Where can I find Captain Rovin?", 2, "Where does the wizard live?", 3); if ($option = 1) { @@ -149,8 +149,8 @@ if ($option = 1) { } [label,demon_slayer_sir_captain_rovin_key_inquiry] -~chatplayer(neutral, "Where can I find Captain Rovin?"); -~chatnpc(neutral, "Captain Rovin lives at the top of the guards' quarters in the north-west wing of this palace."); +~chatplayer("Where can I find Captain Rovin?"); +~chatnpc("Captain Rovin lives at the top of the guards' quarters in the north-west wing of this palace."); def_int $option = ~p_choice3("Can you give me your key?", 1, "Where does the wizard live?", 2, "Well I'd better go key hunting.", 3); if ($option = 1) { @@ -162,9 +162,9 @@ if ($option = 1) { } [label,demon_slayer_sir_wizard_traiborn_inquiry] -~chatplayer(neutral, "Where does the wizard live?"); -~chatnpc(neutral, "Wizard Traiborn?"); -~chatnpc(neutral, "He is one of the wizards who lives in the tower on the little island just off the south coast. I believe his quarters are on the first floor of the tower."); +~chatplayer("Where does the wizard live?"); +~chatnpc("Wizard Traiborn?"); +~chatnpc("He is one of the wizards who lives in the tower on the little island just off the south coast. I believe his quarters are on the first floor of the tower."); def_int $option = ~p_choice3("Can you give me your key?", 1, "Where can I find Captain Rovin?", 2, "Well I'd better go key hunting.", 3); if ($option = 1) { @@ -176,8 +176,8 @@ if ($option = 1) { } [label,demon_slayer_sir_prysin_drain] -~chatplayer(neutral, "So what does the drain connect to?"); -~chatnpc(neutral, "It is the drain for the drainpipe running from the sink in the kitchen down to the palace sewers."); +~chatplayer("So what does the drain connect to?"); +~chatnpc("It is the drain for the drainpipe running from the sink in the kitchen down to the palace sewers."); def_int $option = ~p_choice3("Where can I find Captain Rovin?", 1, "Where does the wizard live?", 2, "Well I'd better go key hunting.", 3); if ($option = 1) { @@ -189,8 +189,8 @@ if ($option = 1) { } [label,demon_slayer_better_go_key_hunting] -~chatplayer(happy, "Well I'd better go key hunting."); -~chatnpc(happy, "Ok, goodbye."); +~chatplayer("Well I'd better go key hunting."); +~chatnpc("Ok, goodbye."); [proc,demon_slayer_sir_prysin_options](int $demon_progress)(int) if ($demon_progress = 0) { diff --git a/data/src/scripts/areas/area_varrock/scripts/straven.rs2 b/data/src/scripts/areas/area_varrock/scripts/straven.rs2 index 9511da955..578e4cd6f 100644 --- a/data/src/scripts/areas/area_varrock/scripts/straven.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/straven.rs2 @@ -6,7 +6,7 @@ switch_int (%phoenixgang_progress) { case ^phoenixgang_spoken_straven: @straven_mission; case ^phoenixgang_joined, ^phoenixgang_complete: @straven_gangmember; case default: - ~chatplayer(quiz, "What's through that door?"); + ~chatplayer("What's through that door?"); @straven_cant_enter; } @@ -15,14 +15,14 @@ if(last_useitem = blackarmgang_scroll) { if(%phoenixgang_progress = ^phoenixgang_spoken_straven) { @straven_mission; } else if(%phoenixgang_progress >= ^phoenixgang_joined) { - ~chatnpc(quiz, "You've already given me that intelligence report!|Why are you offering me another copy of it?"); + ~chatnpc("You've already given me that intelligence report!|Why are you offering me another copy of it?"); return; } } ~displaymessage(^dm_default); [label,straven_cant_enter] -~chatnpc(neutral, "Hey! You can't go in there. Only authorised personnel of the VTAM Corporation are allowed beyond this point."); +~chatnpc("Hey! You can't go in there. Only authorised personnel of the VTAM Corporation are allowed beyond this point."); def_int $option; if(%phoenixgang_progress = 4) { $option = ~p_choice3("I know who you are!", 1, "How do I get a job with the VTAM corporation?", 2, "Why not?", 3); @@ -31,86 +31,86 @@ if(%phoenixgang_progress = 4) { } switch_int ($option) { case 1: - ~chatplayer(sad, "I know who you are!"); - ~chatnpc(neutral, "I see.|Carry on?"); - ~chatplayer(sad, "This is the headquarters of the Phoenix Gang,|the most powerful crime syndicate this city has ever seen!"); - ~chatnpc(neutral, "And supposing we were this crime gang,|what would you want with us?"); + ~chatplayer("I know who you are!"); + ~chatnpc("I see.|Carry on?"); + ~chatplayer("This is the headquarters of the Phoenix Gang,|the most powerful crime syndicate this city has ever seen!"); + ~chatnpc("And supposing we were this crime gang,|what would you want with us?"); $option = ~p_choice2("I'd like to offer you my services.", 1, "I want nothing. I was just making sure you were them.", 2); if($option = 1) { - ~chatplayer(happy, "I'd like to offer you my services."); - ~chatnpc(neutral, "You mean you'd like to join the Phoenix Gang?"); - ~chatnpc(neutral, "Well, the Phoenix Gang doesn't let people join just like that."); - ~chatnpc(neutral, "You can't be too careful, you understand."); - ~chatnpc(neutral, "Generally someone has to prove their loyalty before they can join."); - ~chatplayer(quiz, "How would I go about doing that?"); - ~chatnpc(neutral, "Let me think...|I have an idea."); - ~chatnpc(neutral, "A rival gang of ours,|called the Black Arm Gang|is supposedly meeting a contact from Port Sarim today.|In the Blue Moon Inn"); + ~chatplayer("I'd like to offer you my services."); + ~chatnpc("You mean you'd like to join the Phoenix Gang?"); + ~chatnpc("Well, the Phoenix Gang doesn't let people join just like that."); + ~chatnpc("You can't be too careful, you understand."); + ~chatnpc("Generally someone has to prove their loyalty before they can join."); + ~chatplayer("How would I go about doing that?"); + ~chatnpc("Let me think...|I have an idea."); + ~chatnpc("A rival gang of ours,|called the Black Arm Gang|is supposedly meeting a contact from Port Sarim today.|In the Blue Moon Inn"); %phoenixgang_progress = 8; - ~chatnpc(neutral, "by the south entrance to this city.|The name of the contact is Jonny the Beard.|Kill him and bring back his intelligence report."); - ~chatplayer(happy, "Ok, I'll get right on it."); + ~chatnpc("by the south entrance to this city.|The name of the contact is Jonny the Beard.|Kill him and bring back his intelligence report."); + ~chatplayer("Ok, I'll get right on it."); } else if($option = 2) { - ~chatplayer(happy, "I want nothing. I was just making sure you were them."); - ~chatnpc(neutral, "Well then get lost and stop wasting my time."); + ~chatplayer("I want nothing. I was just making sure you were them."); + ~chatnpc("Well then get lost and stop wasting my time."); } case 2: - ~chatplayer(quiz, "How do I get a job with the VTAM corporation?"); - ~chatnpc(neutral, "Get a copy of the Varrock Herald.|If we have any positions right now,|they'll be advertised in there."); + ~chatplayer("How do I get a job with the VTAM corporation?"); + ~chatnpc("Get a copy of the Varrock Herald.|If we have any positions right now,|they'll be advertised in there."); case 3: - ~chatplayer(quiz, "Why not?"); - ~chatnpc(neutral, "Sorry. That's classified information."); + ~chatplayer("Why not?"); + ~chatnpc("Sorry. That's classified information."); } [label,straven_mission] -~chatnpc(neutral, "How's your little mission going?"); +~chatnpc("How's your little mission going?"); if(inv_total(inv, blackarmgang_scroll) > 0) { - ~chatplayer(happy, "I have the intelligence report!"); - ~chatnpc(neutral, "Let's see it then."); + ~chatplayer("I have the intelligence report!"); + ~chatnpc("Let's see it then."); ~mesbox("You hand over the report.|The man reads the report."); - ~chatnpc(neutral, "Yes. Yes, this is very good."); - ~chatnpc(happy, "Ok! You can join the Phoenix Gang!|I am Straven, one of the gang leaders."); - ~chatplayer(neutral, "Nice to meet you."); - ~chatnpc(neutral, "Take this key."); + ~chatnpc("Yes. Yes, this is very good."); + ~chatnpc("Ok! You can join the Phoenix Gang!|I am Straven, one of the gang leaders."); + ~chatplayer("Nice to meet you."); + ~chatnpc("Take this key."); %phoenixgang_progress = 9; inv_del(inv, blackarmgang_scroll, 1); inv_add(inv, weapon_store_key, 1); ~objbox(weapon_store_key, "Straven hands you a key."); - ~chatnpc(neutral, "This key will give you access to our weapons supply depot round the front of this building."); + ~chatnpc("This key will give you access to our weapons supply depot round the front of this building."); return; } -~chatplayer(sad, "I haven't managed to find the report yet..."); -~chatnpc(neutral, "You need to kill Jonny the Beard,|who should be in the Blue Moon Inn."); +~chatplayer("I haven't managed to find the report yet..."); +~chatnpc("You need to kill Jonny the Beard,|who should be in the Blue Moon Inn."); [label,straven_gangmember] -~chatnpc(neutral, "Greetings fellow gang member."); +~chatnpc("Greetings fellow gang member."); if(inv_total(inv, weapon_store_key) = 0 & inv_total(bank, weapon_store_key) = 0) { - ~chatplayer(sad, "I'm afraid I've lost the key you gave me..."); - ~chatnpc(neutral, "You really need to be more careful.|We don't want that key falling into the wrong hands.|Ah well...|Have this spare. Don't lose THIS one."); + ~chatplayer("I'm afraid I've lost the key you gave me..."); + ~chatnpc("You really need to be more careful.|We don't want that key falling into the wrong hands.|Ah well...|Have this spare. Don't lose THIS one."); inv_add(inv, weapon_store_key, 1); ~objbox(weapon_store_key, "Straven hands you a key."); return; } def_int $option = ~p_choice2("I've heard you've got some cool treasures in this place...", 1, "I want nothing. I was just making sure you were them.", 2); if($option = 1) { - ~chatplayer(neutral, "I've heard you've got some cool treasures in this place..."); - ~chatnpc(happy, "Oh yeah, we've all stolen some stuff in our time.|Those candlesticks down here, for example,|were quite a challenge to get out of the palace."); - ~chatplayer(quiz, "And the shield of Arrav? I heard you got that!"); - ~chatnpc(shock, "Woah... that's a blast from the past!|We stole that years and years ago!|We don't even have all the shield anymore."); - ~chatnpc(neutral, "About five years ago|we had a massive fight in our gang|and the shield got broken in half during that fight."); - ~chatnpc(neutral, "Shortly after the fight|some gang members decided|they didn't want to be part of our gang anymore.|So they split off to form their own gang."); - ~chatnpc(angry, "The Black Arm Gang."); - ~chatnpc(neutral, "On their way out|they looted what treasures they could from us - |which included one of the halves of the shield.|We've been rivals with the Black Arms ever since."); + ~chatplayer("I've heard you've got some cool treasures in this place..."); + ~chatnpc("Oh yeah, we've all stolen some stuff in our time.|Those candlesticks down here, for example,|were quite a challenge to get out of the palace."); + ~chatplayer("And the shield of Arrav? I heard you got that!"); + ~chatnpc("Woah... that's a blast from the past!|We stole that years and years ago!|We don't even have all the shield anymore."); + ~chatnpc("About five years ago|we had a massive fight in our gang|and the shield got broken in half during that fight."); + ~chatnpc("Shortly after the fight|some gang members decided|they didn't want to be part of our gang anymore.|So they split off to form their own gang."); + ~chatnpc("The Black Arm Gang."); + ~chatnpc("On their way out|they looted what treasures they could from us - |which included one of the halves of the shield.|We've been rivals with the Black Arms ever since."); } else if($option = 2) { - ~chatplayer(quiz, "Any suggestions for where I can go thieving?"); - ~chatnpc(neutral, "You can always try the marketplace in Ardougne.|LOTS of opportunity there!"); + ~chatplayer("Any suggestions for where I can go thieving?"); + ~chatnpc("You can always try the marketplace in Ardougne.|LOTS of opportunity there!"); } else if($option = 3) { - ~chatplayer(happy, "Where's the Black Arm Gang hideout?|I wanna go sabotage 'em!"); - ~chatnpc(neutral, "That would be a little tricky;|their security is pretty good."); - ~chatnpc(neutral, "Not as good as ours, obviously."); - ~chatnpc(neutral, "But still good."); - ~chatnpc(neutral, "If you really want to go there,|it's in the alleyway|to the west as you come in the south gate."); - ~chatnpc(neutral, "One of our operatives is often near the alley,|a red haired tramp.|He may be able to give you some ideas."); - ~chatplayer(happy, "Thanks for the help!"); + ~chatplayer("Where's the Black Arm Gang hideout?|I wanna go sabotage 'em!"); + ~chatnpc("That would be a little tricky;|their security is pretty good."); + ~chatnpc("Not as good as ours, obviously."); + ~chatnpc("But still good."); + ~chatnpc("If you really want to go there,|it's in the alleyway|to the west as you come in the south gate."); + ~chatnpc("One of our operatives is often near the alley,|a red haired tramp.|He may be able to give you some ideas."); + ~chatplayer("Thanks for the help!"); } [label,straven_blackarmdog] -~chatnpc(neutral, "You stay away from here!|Black Arm dog!"); \ No newline at end of file +~chatnpc("You stay away from here!|Black Arm dog!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/tea_seller.rs2 b/data/src/scripts/areas/area_varrock/scripts/tea_seller.rs2 index 41149fe34..5808edbd9 100644 --- a/data/src/scripts/areas/area_varrock/scripts/tea_seller.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/tea_seller.rs2 @@ -5,19 +5,19 @@ if (map_clock < %last_stolen_from_stall_tea) { } // osrs: -~chatnpc(happy, "Greetings!|Are you in need of refreshment?"); +~chatnpc("Greetings!|Are you in need of refreshment?"); def_int $choice = ~p_choice3("Yes please.", 1, "What are you selling?", 2, "No thanks.", 3); if ($choice = 3) { - ~chatplayer(neutral, "No thanks."); - ~chatnpc(happy, "Well, if you're sure.|You know where to come if you do!"); + ~chatplayer("No thanks."); + ~chatnpc("Well, if you're sure.|You know where to come if you do!"); return; } if ($choice = 2) { - ~chatplayer(neutral, "What are you selling?"); - ~chatnpc(happy, "Only the most delicious infusion|of the leaves of the tea plant.|Grown in the exotic regions of this world.|Buy yourself a cup !"); + ~chatplayer("What are you selling?"); + ~chatnpc("Only the most delicious infusion|of the leaves of the tea plant.|Grown in the exotic regions of this world.|Buy yourself a cup !"); return; } -~chatplayer(neutral, "Yes please."); +~chatplayer("Yes please."); ~openshop_activenpc; [opnpc3,tea_seller] @@ -25,4 +25,4 @@ if ($choice = 2) { ~openshop_activenpc; -[opobj3,obj_712] ~chatnpc_specific(nc_name(tea_seller), tea_seller, angry, "Hey! Put that back! Those are for display only!"); \ No newline at end of file +[opobj3,obj_712] ~chatnpc_specific(nc_name(tea_seller), tea_seller, "Hey! Put that back! Those are for display only!"); \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 b/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 index b04862359..0b59ac508 100644 --- a/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/thessalia.rs2 @@ -2,24 +2,24 @@ // todo: options to retrieve scythe/bunny ears [opnpc1,thessalia] -~chatnpc(happy, "Do you want to buy any fine clothes?"); +~chatnpc("Do you want to buy any fine clothes?"); @multi2("What have you got?", thessalia_b1_s1, "No, thank you.", thessalia_b1_s2); [label,thessalia_b1_s1] -~chatplayer(quiz, "What have you got?"); -~chatnpc(happy, "Well, I have a number of fine pieces of clothing on sale or, if you prefer I can offer you an exclusive, total clothing makeover?"); +~chatplayer("What have you got?"); +~chatnpc("Well, I have a number of fine pieces of clothing on sale or, if you prefer I can offer you an exclusive, total clothing makeover?"); @multi2("Tell me more about this makeover.", thessalia_b2_s1, "I'd just like to buy some clothes.", thessalia_b2_s2); [label,thessalia_b1_s2] -~chatplayer(neutral, "No, thank you."); -~chatnpc(happy, "Well, please return if you change your mind."); +~chatplayer("No, thank you."); +~chatnpc("Well, please return if you change your mind."); [label,thessalia_b2_s1] -~chatplayer(neutral, "Tell me more about this makeover."); -~chatnpc(happy, "Certainly!"); -~chatnpc(happy, "Here at Thessalia's fine clothing boutique, we offer a unique service where we will totally revamp your outfit to your choosing, for... wait for it..."); -~chatnpc(happy, "A fee of only 500 gold coins! Tired of always wearing the same old outfit, day in, day out? This is the service for you!"); -~chatnpc(happy, "So what do you say? Interested? We can change either your top, or your legwear for only 500 gold an item!"); +~chatplayer("Tell me more about this makeover."); +~chatnpc("Certainly!"); +~chatnpc("Here at Thessalia's fine clothing boutique, we offer a unique service where we will totally revamp your outfit to your choosing, for... wait for it..."); +~chatnpc("A fee of only 500 gold coins! Tired of always wearing the same old outfit, day in, day out? This is the service for you!"); +~chatnpc("So what do you say? Interested? We can change either your top, or your legwear for only 500 gold an item!"); @multi4("I'd like to change my top please.", thessalia_b3_s1, "I'd like to change my legwear please.", thessalia_b3_s2, "I'd just like to buy some clothes.", thessalia_b2_s2, "No, thank you.", thessalia_b1_s2); [label,thessalia_b3_s1] @@ -27,7 +27,7 @@ %option2 = 0; %option3 = 0; -~chatnpc(happy, "Just select what style and colour you would like from this catalogue, and then give me the 500 coins when you've picked."); +~chatnpc("Just select what style and colour you would like from this catalogue, and then give me the 500 coins when you've picked."); if (gender = ^gender_male) { if_openmainmodal(player_kit_tailor_torso_man); @@ -41,7 +41,7 @@ if (gender = ^gender_male) { %option2 = 0; %option3 = 0; -~chatnpc(happy, "Just select what style and colour you would like from this catalogue, and then give me the 500 coins when you've picked."); +~chatnpc("Just select what style and colour you would like from this catalogue, and then give me the 500 coins when you've picked."); if (gender = ^gender_male) { if_openmainmodal(player_kit_tailor_legs_man); @@ -51,7 +51,7 @@ if (gender = ^gender_male) { } [label,thessalia_b2_s2] -~chatplayer(neutral, "I'd just like to buy some clothes."); +~chatplayer("I'd just like to buy some clothes."); ~openshop_activenpc; // ---- @@ -191,8 +191,8 @@ buildappearance(worn); inv_del(inv, coins, 500); if (npc_find(coord, thessalia, 4, 0) = true) { - ~chatnpc(happy, "Very stylish! It really suits you!"); - ~chatplayer(happy, "Thanks!"); + ~chatnpc("Very stylish! It really suits you!"); + ~chatplayer("Thanks!"); } // ---- @@ -285,6 +285,6 @@ buildappearance(worn); inv_del(inv, coins, 500); if (npc_find(coord, thessalia, 4, 0) = true) { - ~chatnpc(happy, "Totally cool! That outfit looks great!"); - ~chatplayer(happy, "Thanks!"); + ~chatnpc("Totally cool! That outfit looks great!"); + ~chatplayer("Thanks!"); } diff --git a/data/src/scripts/areas/area_varrock/scripts/tramp.rs2 b/data/src/scripts/areas/area_varrock/scripts/tramp.rs2 index 88041f333..e29d5f389 100644 --- a/data/src/scripts/areas/area_varrock/scripts/tramp.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/tramp.rs2 @@ -1,39 +1,39 @@ [opnpc1,tramp_orange] -~chatnpc(sad, "Spare some change guv?"); +~chatnpc("Spare some change guv?"); switch_int(~p_choice4("Sorry, I haven't got any.", 1, "Go get a job!", 2, "Ok. Here you go.", 3, "Is there anything down this alleyway?", 4)) { case 1: - ~chatplayer(sad, "Sorry, I haven't got any."); - ~chatnpc(sad, "Thanks anyway."); + ~chatplayer("Sorry, I haven't got any."); + ~chatnpc("Thanks anyway."); case 2: - ~chatplayer(angry, "Go get a job!"); - ~chatnpc(angry, "You startin?|I hope your nose falls off!"); + ~chatplayer("Go get a job!"); + ~chatnpc("You startin?|I hope your nose falls off!"); case 3: - ~chatplayer(happy, "Ok. Here you go."); + ~chatplayer("Ok. Here you go."); if(inv_total(inv, coins) = 0) { - ~chatplayer(sad, "Oh wait. I haven't got any, sorry."); - ~chatnpc(sad, "Thanks anyway."); + ~chatplayer("Oh wait. I haven't got any, sorry."); + ~chatnpc("Thanks anyway."); return; } inv_del(inv, coins, 1); - ~chatnpc(happy, "Hey, thanks a lot!"); + ~chatnpc("Hey, thanks a lot!"); def_int $choice = ~p_choice2("No problem.", 1, "Don't I get some sort of quest hint or something now?", 2); if($choice = 1) { - ~chatplayer(neutral, "No problem."); + ~chatplayer("No problem."); } else if($choice = 2) { - ~chatplayer(quiz, "So...don't I get some sort of quest hint or something now?"); - ~chatnpc(sad, "No, that's not why I'm asking for money.|I just need to eat..."); + ~chatplayer("So...don't I get some sort of quest hint or something now?"); + ~chatnpc("No, that's not why I'm asking for money.|I just need to eat..."); } case 4: - ~chatplayer(quiz, "Is there anything down this alleyway?"); - ~chatnpc(neutral, "Yes, there is actually.|A notorious gang of thieves and hoodlums,|called the Black Arm Gang."); + ~chatplayer("Is there anything down this alleyway?"); + ~chatnpc("Yes, there is actually.|A notorious gang of thieves and hoodlums,|called the Black Arm Gang."); def_int $option = ~p_choice2("Thanks for the warning!", 1, "Do you think they would let me join?", 2); if($option = 1) { - ~chatplayer(happy, "Thanks for the warning!"); - ~chatnpc(happy, "Don't worry about it."); + ~chatplayer("Thanks for the warning!"); + ~chatnpc("Don't worry about it."); } else if($option = 2) { - ~chatplayer(quiz, "Do you think they would let me join?"); + ~chatplayer("Do you think they would let me join?"); if(%blackarmgang_progress >= ^blackarmgang_joined) { // In Black arm - ~chatnpc(confused, "I was under the impression you were already a member..."); + ~chatnpc("I was under the impression you were already a member..."); return; } if(%phoenixgang_progress >= ^phoenixgang_joined) { // In phoenix @@ -43,28 +43,28 @@ switch_int(~p_choice4("Sorry, I haven't got any.", 1, "Go get a job!", 2, "Ok. H %blackarmgang_progress = 1; ~send_quest_progress(questlist:blackarmgang, %blackarmgang_progress, ^blackarmgang_complete); } - ~chatnpc(neutral, "You never know.|You'll find a lady down there called Katrine.|Speak to her."); - ~chatnpc(neutral, "But don't upset her, she's pretty dangerous."); + ~chatnpc("You never know.|You'll find a lady down there called Katrine.|Speak to her."); + ~chatnpc("But don't upset her, she's pretty dangerous."); } } [label,tramp_phoenixmember] -~chatnpc(neutral, "No. You're a collaborator with the Phoenix Gang. There's no way they'll let you join now."); +~chatnpc("No. You're a collaborator with the Phoenix Gang. There's no way they'll let you join now."); switch_int(~p_choice2("How did you know I was in the Phoenix Gang?", 1, "Any ideas how I could get in there then?", 2)) { case 1: - ~chatplayer(quiz, "How did YOU know I was in the Phoenix Gang?"); - ~chatnpc(neutral, "In my current profession I spend a lot of time on the streets and you hear these sorta things sometimes"); // intentional typo + ~chatplayer("How did YOU know I was in the Phoenix Gang?"); + ~chatnpc("In my current profession I spend a lot of time on the streets and you hear these sorta things sometimes"); // intentional typo case 2: - ~chatplayer(quiz, "Any ideas how I could get in there then?"); - ~chatnpc(neutral, "Hmmm. I dunno."); - ~chatnpc(neutral, "Your best bet would probably be to find someone else... Someone who ISN'T a member of the Phoenix Gang, and get them to infiltrate the ranks of the Black Arm Gang for you."); - ~chatnpc(neutral, "If you find someone like that,|tell 'em to come to me first."); + ~chatplayer("Any ideas how I could get in there then?"); + ~chatnpc("Hmmm. I dunno."); + ~chatnpc("Your best bet would probably be to find someone else... Someone who ISN'T a member of the Phoenix Gang, and get them to infiltrate the ranks of the Black Arm Gang for you."); + ~chatnpc("If you find someone like that,|tell 'em to come to me first."); def_int $option = ~p_choice2("Ok. Good plan!", 1, "Like who?", 2); if($option = 1) { - ~chatplayer(happy, "Ok. Good plan!"); + ~chatplayer("Ok. Good plan!"); } else if($option = 2) { - ~chatplayer(quiz, "Like who?"); - ~chatnpc(neutral, "There's plenty of other adventurers about|besides yourself.|I'm sure if you asked one of them nicely|they would help you."); + ~chatplayer("Like who?"); + ~chatnpc("There's plenty of other adventurers about|besides yourself.|I'm sure if you asked one of them nicely|they would help you."); } } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/valaine.rs2 b/data/src/scripts/areas/area_varrock/scripts/valaine.rs2 index 27f6a209a..e9e8b5f53 100644 --- a/data/src/scripts/areas/area_varrock/scripts/valaine.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/valaine.rs2 @@ -1,9 +1,9 @@ [opnpc1,valaine] -~chatnpc(neutral, "Hello there.|Want to have a look at what we're selling today?"); +~chatnpc("Hello there.|Want to have a look at what we're selling today?"); switch_int(~p_choice2("Yes please.", 1, "No thank you.", 2)) { case 1: - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; case 2: - ~chatplayer(neutral, "No thank you."); + ~chatplayer("No thank you."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/varrock_swordshop.rs2 b/data/src/scripts/areas/area_varrock/scripts/varrock_swordshop.rs2 index ba56b7114..0003e3916 100644 --- a/data/src/scripts/areas/area_varrock/scripts/varrock_swordshop.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/varrock_swordshop.rs2 @@ -2,11 +2,11 @@ [opnpc1,shop_assistant_varrock_swordshop] @varrock_swordshop_talk; [label,varrock_swordshop_talk] -~chatnpc(happy, "Hello, bold adventurer!|Can I interest you in some swords?"); +~chatnpc("Hello, bold adventurer!|Can I interest you in some swords?"); def_int $option = ~p_choice2("Yes, please!", 1, "No, I'm okay for swords right now.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes, please!"); + ~chatplayer("Yes, please!"); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No, I'm okay for swords right now."); + ~chatplayer("No, I'm okay for swords right now."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/weaponsmaster.rs2 b/data/src/scripts/areas/area_varrock/scripts/weaponsmaster.rs2 index 45a7ecbd6..766224b86 100644 --- a/data/src/scripts/areas/area_varrock/scripts/weaponsmaster.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/weaponsmaster.rs2 @@ -1,24 +1,24 @@ [opnpc1,weaponsmaster] -~chatplayer(neutral, "Hello."); +~chatplayer("Hello."); if(%phoenixgang_progress >= ^phoenixgang_joined) { - ~chatnpc(happy, "Hello fellow Phoenix!|What are you after?"); + ~chatnpc("Hello fellow Phoenix!|What are you after?"); switch_int (~p_choice2("I'm after a weapon or two.", 1, "I'm looking for treasure.", 2)) { case 1: - ~chatplayer(neutral, "I'm after a weapon or two."); - ~chatnpc(neutral, "No problem. Feel free to look around."); + ~chatplayer("I'm after a weapon or two."); + ~chatnpc("No problem. Feel free to look around."); case 2: - ~chatplayer(neutral, "I'm looking for treasure."); - ~chatnpc(happy, "We've not got any up here.|Go mug someone somewhere|if you want some treasure."); + ~chatplayer("I'm looking for treasure."); + ~chatnpc("We've not got any up here.|Go mug someone somewhere|if you want some treasure."); } } else { - ~chatnpc(angry, "Hey! Who are you?|You're not meant to be here!"); + ~chatnpc("Hey! Who are you?|You're not meant to be here!"); ~npc_retaliate(0); } [label,weaponsmaster_stop] if(%phoenixgang_progress >= ^phoenixgang_joined) { - ~chatnpc(angry, "Hey! That's Stravens'!|He won't like you messing with that!"); + ~chatnpc("Hey! That's Stravens'!|He won't like you messing with that!"); } else { - ~chatnpc(angry, "Stop! thief!"); + ~chatnpc("Stop! thief!"); ~npc_retaliate(0); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_varrock/scripts/zaff.rs2 b/data/src/scripts/areas/area_varrock/scripts/zaff.rs2 index 8170d22d5..baf9c980d 100644 --- a/data/src/scripts/areas/area_varrock/scripts/zaff.rs2 +++ b/data/src/scripts/areas/area_varrock/scripts/zaff.rs2 @@ -1,11 +1,11 @@ [opnpc1,zaff] -~chatnpc(happy, "Would you like to buy or sell some staffs?"); +~chatnpc("Would you like to buy or sell some staffs?"); def_int $option = ~p_choice2("Yes, please!", 1, "No, thank you.", 2); if($option = 1) { - ~chatplayer(neutral, "Yes, please!"); + ~chatplayer("Yes, please!"); ~openshop_zaff; } else if($option = 2) { - ~chatplayer(neutral, "No, thank you."); + ~chatplayer("No, thank you."); } [opnpc3,zaff] diff --git a/data/src/scripts/areas/area_white_wolf_mountain/scripts/mountain_dwarf.rs2 b/data/src/scripts/areas/area_white_wolf_mountain/scripts/mountain_dwarf.rs2 index 174ca01f2..90a28cf20 100644 --- a/data/src/scripts/areas/area_white_wolf_mountain/scripts/mountain_dwarf.rs2 +++ b/data/src/scripts/areas/area_white_wolf_mountain/scripts/mountain_dwarf.rs2 @@ -1,120 +1,120 @@ [opnpc1,mountain_dwarf] switch_int (%fishingcompo_progress) { case ^fishingcompo_not_started: @mountain_dwarf_start; - case ^fishingcompo_complete: ~chatnpc(happy, "Welcome, oh great Fishing Champion!|Feel free to pop by any time."); + case ^fishingcompo_complete: ~chatnpc("Welcome, oh great Fishing Champion!|Feel free to pop by any time."); case default: @mountain_dwarf_won; } [label,mountain_dwarf_start] -~chatnpc(angry, "Hmmph. What do you want?"); +~chatnpc("Hmmph. What do you want?"); def_int $option = ~p_choice2("I was just wondering what was down those stairs?", 1, "I was just stopping to say hello!", 2); if($option = 1) { - ~chatplayer(neutral, "I was just wondering what was down those stairs?"); - ~chatnpc(angry, "You can't go down there!"); + ~chatplayer("I was just wondering what was down those stairs?"); + ~chatnpc("You can't go down there!"); @multi3("I didn't want to anyway.", mountain_dwarf_didnt_want, "Why not?", mountain_dwarf_why, "I'm bigger than you. Let me by.", mountain_dwarf_bigger); } else if($option = 2) { - ~chatplayer(neutral, "I was just stopping to say hello!"); - ~chatnpc(neutral, "Hello then."); // Ends here in RSC, loops back in OSRS (probably changed w/rework) + ~chatplayer("I was just stopping to say hello!"); + ~chatnpc("Hello then."); // Ends here in RSC, loops back in OSRS (probably changed w/rework) } [label,mountain_dwarf_stairs] -~chatnpc(angry, "Hoi there! halt!"); -~chatnpc(angry, "You can't come in here!"); +~chatnpc("Hoi there! halt!"); +~chatnpc("You can't come in here!"); @multi3("Why not?", mountain_dwarf_why, "Oh, sorry, I hadn't realised it was private.", mountain_dwarf_private, "I'm bigger than you. Let me by!", mountain_dwarf_bigger); [label,mountain_dwarf_bigger] -~chatplayer(angry, "I'm bigger than you.|Let me by!"); -~chatnpc(angry, "Go away!|You're not going to bully your way in here!"); +~chatplayer("I'm bigger than you.|Let me by!"); +~chatnpc("Go away!|You're not going to bully your way in here!"); [label,mountain_dwarf_didnt_want] -~chatplayer(neutral, "I didn't want to anyway."); -~chatnpc(neutral, "Good."); +~chatplayer("I didn't want to anyway."); +~chatnpc("Good."); [label,mountain_dwarf_why] -~chatplayer(neutral, "Why not?"); -~chatnpc(neutral, "This is the home of the Mountain Dwarves.|How would you like it if I wanted to take a shortcut through your home?"); +~chatplayer("Why not?"); +~chatnpc("This is the home of the Mountain Dwarves.|How would you like it if I wanted to take a shortcut through your home?"); def_int $option = ~p_choice3("Ooh... is this a shortcut to somewhere?", 1, "Oh, sorry, I hadn't realised it was private.", 2, "If you were my friend I wouldn't mind.", 3); if($option = 1) { - ~chatplayer(happy, "Ooh... is this a shortcut to somewhere?"); + ~chatplayer("Ooh... is this a shortcut to somewhere?"); // Took RSC version and reworded slightly (similar to OSRS), not confirmed if this is correct - ~chatnpc(neutral, "Well, it is a lot easier to go|this way to get past White Wolf Mountain|than through those wolf filled passes."); + ~chatnpc("Well, it is a lot easier to go|this way to get past White Wolf Mountain|than through those wolf filled passes."); } else if($option = 2) { @mountain_dwarf_private; } else if($option = 3) { - ~chatplayer(happy, "If you were my friend I wouldn't mind."); - ~chatnpc(neutral, "Yes, but I don't even know you."); + ~chatplayer("If you were my friend I wouldn't mind."); + ~chatnpc("Yes, but I don't even know you."); @multi2("Well, let's be friends!", mountain_dwarf_friends, "You're a grumpy little man aren't you?", mountain_dwarf_grumpy); } [label,mountain_dwarf_private] -~chatplayer(neutral, "Oh, sorry, I hadn't realised it was private."); +~chatplayer("Oh, sorry, I hadn't realised it was private."); [label,mountain_dwarf_friends] -~chatplayer(happy, "Well, let's be friends!"); +~chatplayer("Well, let's be friends!"); // If you're below 10 fishing on OSRS, he will say "I'd rather not, thank you." and a mesbox // is sent after noting you need 10 fishing to start the quest, this isn't the case on RSC (instead, you won't // be able to fish from the spot in Hemenster with sub 10 fishing). The strict start req was likely added w/the 2006 rework -~chatnpc(neutral, "I don't make friends easily.|People need to earn my trust first."); +~chatnpc("I don't make friends easily.|People need to earn my trust first."); def_int $option = ~p_choice2("And how am I meant to do that?", 1, "You're a grumpy little man aren't you?", 2); if($option = 1) { - ~chatplayer(confused, "And how am I meant to do that?"); - ~chatnpc(neutral, "My, we are the persistent one aren't we?"); - ~chatnpc(neutral, "Well, there's a certain gold artefact we're after.|We dwarves are big fans of gold! This artefact is the first prize at the Hemenster fishing competition."); - ~chatnpc(happy, "Fortunately we have acquired a pass to enter that competition..."); - ~chatnpc(sad, "Unfortunately Dwarves don't make good fishermen."); + ~chatplayer("And how am I meant to do that?"); + ~chatnpc("My, we are the persistent one aren't we?"); + ~chatnpc("Well, there's a certain gold artefact we're after.|We dwarves are big fans of gold! This artefact is the first prize at the Hemenster fishing competition."); + ~chatnpc("Fortunately we have acquired a pass to enter that competition..."); + ~chatnpc("Unfortunately Dwarves don't make good fishermen."); def_int $start = ~p_choice2("Fortunately I'm alright at fishing!", 1, "I'm not much of a fisherman either.", 2); if($start = 1) { - ~chatplayer(happy, "Fortunately I'm alright at fishing!"); - ~chatnpc(happy, "Okay, I entrust you with our competition pass.|Go to Hemenster and do us proud!"); + ~chatplayer("Fortunately I'm alright at fishing!"); + ~chatnpc("Okay, I entrust you with our competition pass.|Go to Hemenster and do us proud!"); %fishingcompo_progress = ^fishingcompo_started; ~send_quest_progress(questlist:fishingcompo, %fishingcompo_progress, ^fishingcompo_complete); inv_add(inv, fishing_pass, 1); } else if($start = 2) { // Option doesn't exist post-rework so some guessing here - ~chatplayer(sad, "I'm not much of a fisherman either."); - ~chatnpc(angry, "What good are you?"); + ~chatplayer("I'm not much of a fisherman either."); + ~chatnpc("What good are you?"); } } else if($option = 2) { @mountain_dwarf_grumpy; } [label,mountain_dwarf_spare_pass] -~chatplayer(sad, "I need another competition pass."); -~chatnpc(confused, "Hmmm. It's a good job they sent us spares."); +~chatplayer("I need another competition pass."); +~chatnpc("Hmmm. It's a good job they sent us spares."); inv_add(inv, fishing_pass, 1); -~chatnpc(confused, "There you go."); +~chatnpc("There you go."); [label,mountain_dwarf_grumpy] -~chatplayer(angry, "You're a grumpy little man aren't you?"); -~chatnpc(angry, "Don't you know it."); +~chatplayer("You're a grumpy little man aren't you?"); +~chatnpc("Don't you know it."); [label,mountain_dwarf_won] -~chatnpc(confused, "Have you won yet?"); +~chatnpc("Have you won yet?"); if(%fishingcompo_progress = ^fishingcompo_won_comp) { - ~chatplayer(happy, "Yes I have!"); - ~chatnpc(happy, "Well done! So where is the trophy?"); + ~chatplayer("Yes I have!"); + ~chatnpc("Well done! So where is the trophy?"); if(inv_total(inv, fishing_trophy) > 0) { - ~chatplayer(happy, "I have it right here!"); + ~chatplayer("I have it right here!"); ~mesbox("You give the trophy to the dwarf."); inv_del(inv, fishing_trophy, 1); queue(fishingcompo_quest_complete, 0); - ~chatnpc(happy, "Okay, we will let you in now."); + ~chatnpc("Okay, we will let you in now."); } else { - ~chatplayer(confused, "I don't have it with me."); - ~chatnpc(confused, "You'd better go get it then hadn't you?"); + ~chatplayer("I don't have it with me."); + ~chatnpc("You'd better go get it then hadn't you?"); } return; } if(inv_total(inv, fishing_pass) = 0 & inv_total(bank, fishing_pass) = 0) { def_int $option = ~p_choice2("I need another competition pass.", 1, "No, it takes preparation to win fishing competitions.", 2); if($option = 1) { - ~chatplayer(sad, "I need another competition pass."); - ~chatnpc(confused, "Hmmm. It's a good job they sent us spares."); + ~chatplayer("I need another competition pass."); + ~chatnpc("Hmmm. It's a good job they sent us spares."); inv_add(inv, fishing_pass, 1); - ~chatnpc(confused, "There you go."); + ~chatnpc("There you go."); } else if($option = 2) { - ~chatplayer(neutral, "No, it takes preparation to win fishing competitions."); - ~chatnpc(confused, "Maybe that's where we are going wrong when we try fishing?"); + ~chatplayer("No, it takes preparation to win fishing competitions."); + ~chatnpc("Maybe that's where we are going wrong when we try fishing?"); } } -~chatplayer(sad, "No, not yet."); \ No newline at end of file +~chatplayer("No, not yet."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_wilderness/scripts/fat_tony.rs2 b/data/src/scripts/areas/area_wilderness/scripts/fat_tony.rs2 index eb7f6c0b3..727e5ca2e 100644 --- a/data/src/scripts/areas/area_wilderness/scripts/fat_tony.rs2 +++ b/data/src/scripts/areas/area_wilderness/scripts/fat_tony.rs2 @@ -1,34 +1,34 @@ [opnpc1,fat_tony] -~chatnpc(angry, "Go away I'm very busy!"); +~chatnpc("Go away I'm very busy!"); def_int $option = ~p_choice3("Sorry to disturb you.", 1, "What are you busy doing?", 2, "Have you anything to sell?", 3); if($option = 1) { - ~chatplayer(neutral, "Sorry to disturb you."); + ~chatplayer("Sorry to disturb you."); } else if($option = 2) { - ~chatplayer(quiz, "What are you busy doing?"); - ~chatnpc(neutral, "I'm cooking pizzas for the people in this camp."); - ~chatnpc(sad, "Not that these louts appreciate my gourmet cooking!"); + ~chatplayer("What are you busy doing?"); + ~chatnpc("I'm cooking pizzas for the people in this camp."); + ~chatnpc("Not that these louts appreciate my gourmet cooking!"); @multi3("So what is a gourmet chef doing cooking for bandits?", fat_tony_gourmet, "Can I have some pizza too?", fat_tony_pizza, "Okay, I'll leave you to it.", fat_tony_leave); } else if($option = 3) { - ~chatplayer(quiz, "Have you anything to sell?"); - ~chatnpc(neutral, "Well I guess I can sell you some half made pizzas."); + ~chatplayer("Have you anything to sell?"); + ~chatnpc("Well I guess I can sell you some half made pizzas."); ~openshop_activenpc; } [label,fat_tony_gourmet] -~chatplayer(quiz, "So what is a gourmet chef doing cooking for bandits?"); -~chatnpc(sad, "Well I'm an outlaw.|I was accused of giving the king food poisoning!|The thought of it! I think he just drank too much wine that night."); -~chatnpc(sad, "I had to flee the kingdom of Misthalin!|The bandits give me refuge here as long as I cook for them."); +~chatplayer("So what is a gourmet chef doing cooking for bandits?"); +~chatnpc("Well I'm an outlaw.|I was accused of giving the king food poisoning!|The thought of it! I think he just drank too much wine that night."); +~chatnpc("I had to flee the kingdom of Misthalin!|The bandits give me refuge here as long as I cook for them."); @multi2("Can I have some pizza too?", fat_tony_pizza, "Okay, I'll leave you to it.", fat_tony_leave); [label,fat_tony_pizza] -~chatplayer(quiz, "Can I have some pizza too?"); -~chatnpc(neutral, "Well this pizza is really meant to be for the bandits.|I guess I could sell you some pizza bases though"); +~chatplayer("Can I have some pizza too?"); +~chatnpc("Well this pizza is really meant to be for the bandits.|I guess I could sell you some pizza bases though"); switch_int(~p_choice2("Yes, Okay.", 1, "Oh if I have to pay I don't want any.", 2)) { case 1: - ~chatplayer(neutral, "Yes, Okay."); + ~chatplayer("Yes, Okay."); ~openshop_activenpc; - case 2: ~chatplayer(neutral, "Oh if I have to pay I don't want any."); + case 2: ~chatplayer("Oh if I have to pay I don't want any."); } [label,fat_tony_leave] -~chatplayer(neutral, "Okay, I'll leave you to it."); \ No newline at end of file +~chatplayer("Okay, I'll leave you to it."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_wilderness/scripts/noterazzo.rs2 b/data/src/scripts/areas/area_wilderness/scripts/noterazzo.rs2 index 16a24506e..ec60ac6f5 100644 --- a/data/src/scripts/areas/area_wilderness/scripts/noterazzo.rs2 +++ b/data/src/scripts/areas/area_wilderness/scripts/noterazzo.rs2 @@ -1,12 +1,12 @@ [opnpc1,noterazzo] -~chatnpc(shifty, "Hey wanna trade? I'll give the best deals you can find."); +~chatnpc("Hey wanna trade? I'll give the best deals you can find."); def_int $option = ~p_choice3("Yes please.", 1, "No thanks.", 2, "How can you afford to give such good deals?", 3); if($option = 1) { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thanks."); + ~chatplayer("No thanks."); } else if($option = 3) { - ~chatplayer(quiz, "How can you afford to give such good deals?"); - ~chatnpc(shifty, "The general stores in Asgarnia and Misthalin are heavily taxed. It really makes it hard for them to run an effective business. For some reason taxmen don't visit my store."); + ~chatplayer("How can you afford to give such good deals?"); + ~chatnpc("The general stores in Asgarnia and Misthalin are heavily taxed. It really makes it hard for them to run an effective business. For some reason taxmen don't visit my store."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_wizard_tower/scripts/sedridor.rs2 b/data/src/scripts/areas/area_wizard_tower/scripts/sedridor.rs2 index d43ea6ff9..e0730e57e 100644 --- a/data/src/scripts/areas/area_wizard_tower/scripts/sedridor.rs2 +++ b/data/src/scripts/areas/area_wizard_tower/scripts/sedridor.rs2 @@ -1,10 +1,10 @@ [opnpc1,sedridor] -~chatnpc(neutral, "Welcome adventurer, to the world renowned|Wizards' Tower. How may I help you?"); +~chatnpc("Welcome adventurer, to the world renowned|Wizards' Tower. How may I help you?"); // we don't support teleporting until the quest is complete if(%runemysteries_progress = 0) { def_int $option = ~p_choice2("Nothing thanks, I'm just looking around.", 1, "What are you doing down here?", 2); if ($option = 1) { - ~chatplayer(neutral, "Nothing thanks. I'm just looking around."); + ~chatplayer("Nothing thanks. I'm just looking around."); return; } if ($option = 2) { @@ -14,59 +14,59 @@ if(%runemysteries_progress = 0) { @rune_mysteries; } else if(%runemysteries_progress = 2) { if(~obj_gettotal(research_package) = 0) { - ~chatplayer(neutral, "...I lost the package you gave me."); - ~chatnpc(neutral, "You WHAT?"); - ~chatnpc(neutral, "Tch, that was really very careless of you. Luckily as head wizard I have great powers, and will be able to teleport it back here without too much effort."); - ~chatnpc(neutral, "Ok, I have retrieved it. Luckily it doesn't appear to have been damaged. Now please take it to Aubury, and try not to lose it again."); + ~chatplayer("...I lost the package you gave me."); + ~chatnpc("You WHAT?"); + ~chatnpc("Tch, that was really very careless of you. Luckily as head wizard I have great powers, and will be able to teleport it back here without too much effort."); + ~chatnpc("Ok, I have retrieved it. Luckily it doesn't appear to have been damaged. Now please take it to Aubury, and try not to lose it again."); if (inv_freespace(inv) = 0) { ~objbox(research_package, "Sedridor tries to hand you the Research Package, but you don't have enough room to take them."); return; } inv_add(inv, research_package, 1); } else { - ~chatnpc(neutral, "How goes your quest? Have you delivered the research notes to my friend Aubury yet?"); - ~chatplayer(neutral, "Not yet..."); - ~chatnpc(neutral, "Well, please do so as soon as possible. Remember: to get to Varrock, head due North, through Draynor Village, around Draynor Manor, and then head East when"); - ~chatnpc(neutral, "you get to the Barbarian village. The man you seek is named Aubury, and he owns the rune shop there. It is vital he receives this package."); + ~chatnpc("How goes your quest? Have you delivered the research notes to my friend Aubury yet?"); + ~chatplayer("Not yet..."); + ~chatnpc("Well, please do so as soon as possible. Remember: to get to Varrock, head due North, through Draynor Village, around Draynor Manor, and then head East when"); + ~chatnpc("you get to the Barbarian village. The man you seek is named Aubury, and he owns the rune shop there. It is vital he receives this package."); } } else if (%runemysteries_progress = 4) { - ~chatnpc(neutral, "Ah, . How goes our quest? Have you delivered the research notes to my friend Aubury yet?"); - ~chatplayer(neutral, "Yes, I have. He gave me some research notes to pass on to you."); - ~chatnpc(neutral, "May I have his notes then?"); + ~chatnpc("Ah, . How goes our quest? Have you delivered the research notes to my friend Aubury yet?"); + ~chatplayer("Yes, I have. He gave me some research notes to pass on to you."); + ~chatnpc("May I have his notes then?"); if(~obj_gettotal(notes) = 0) { - ~chatplayer(neutral, "Uh... I kind of... lost them..."); - ~chatnpc(neutral, "You did? You are extremely careless aren't you? I suggest you go and speak to Aubury once more, with luck he will have made copies of his research."); + ~chatplayer("Uh... I kind of... lost them..."); + ~chatnpc("You did? You are extremely careless aren't you? I suggest you go and speak to Aubury once more, with luck he will have made copies of his research."); return; } if(inv_total(inv, notes) = 0) { - ~chatplayer(neutral, "Sure, I'll go and get them from the bank."); + ~chatplayer("Sure, I'll go and get them from the bank."); return; } - ~chatplayer(neutral, "Sure. I have them here."); - ~chatnpc(neutral, "Well, before you hand them over to me, as you have been nothing but truthful with me to this point, and I admire that in an adventurer, I will let you into the secret of our research."); - ~chatnpc(neutral, "Now as you may or may not know, many|centuries ago, the wizards at this Tower|learnt the secret of creating Rune Stones, which|allowed us to cast Magic very easily."); - ~chatnpc(neutral, "When this Tower was burnt down the secret of creating runes was lost to us for all time... except it wasn't. Some months ago, while searching these ruins for information from old days,"); - ~chatnpc(neutral, "I came upon a scroll, almost destroyed, that detailed a magical rock deep in the icefields of the North, closed off from access by anything other than magical means."); - ~chatnpc(neutral, "This rock was called the 'Rune Essence' by the|magicians who studied its powers. Apparently, by simply|breaking a chunk from it, a Rune Stone could be|fashioned very quickly and easily at certain"); - ~chatnpc(neutral, "elemental altars that were scattered across the land|back then. Now, this is an intersting little piece of|history, but not much use to us as modern wizards|without access to the Rune Essence,"); - ~chatnpc(neutral, "or these elemental altars. This is where you and|Aubury come into this story. A few weeks back,|Aubury discovered in a standard delivery of runes|to his store, a parchment detailing a"); - ~chatnpc(neutral, "teleportation spell that he had never come across before. To his shock, when cast it took him to a strange rock he had never encountered before... yet that felt strangely familiar..."); - ~chatnpc(neutral, "As I'm sure you have now guessed, he had discovered a portal leading to the mythical Rune Essence. As soon as he told me of this spell I saw the importance of his find,"); - ~chatnpc(neutral, "for if we could but find the elemental altars spoken|of in the ancient texts, we would once more be able|to create runes as our ancestors had done! It would|be the saviour of the wizards' art!"); - ~chatplayer(neutral, "I'm still not sure how I fit into|this little story of yours..."); - ~chatnpc(neutral, "You haven't guessed? This talisman you brought me...|it is the key to the elemental altar of air! When|you hold it next, it will direct you towards"); - ~chatnpc(neutral, "the entrance to the long forgotten Air Altar! By|bringing pieces of the Rune Essence to the Air Temple,|you will be able to fashion your own Air Runes!"); - ~chatnpc(neutral, "And this is not all! By finding other talismans similar to this one, you will eventually be able to craft every rune that is available on this world! Just"); - ~chatnpc(neutral, "as our ancestors did! I cannot stress enough what a find this is! Now, due to the risks involved of letting this mighty power fall into the wrong hands"); - ~chatnpc(neutral, "I will keep the teleport skill to the Rune Essence|a closely guarded secret, shared only by myself|and those Magic users around the world|whom I trust enough to keep it."); - ~chatnpc(neutral, "This means that if any evil power should discover|the talismans required to enter the elemental|temples, we will be able to prevent their access|to the Rune Essence and prevent"); - ~chatnpc(neutral, "tragedy befalling this world. I know not where the|temples are located, nor do I know where the talismans|have been scattered to in this land, but I now"); - ~chatnpc(neutral, "return your Air Talisman to you. Find the Air|Temple, and you will be able to charge your Rune|Essences to become Air Runes at will. Any time"); - ~chatnpc(neutral, "you wish to visit the Rune Essence, speak to me|or Aubury and we will open a portal to that|mystical place for you to visit."); - ~chatplayer(neutral, "So only you and Aubury know the teleport|spell to the Rune Essence?"); - ~chatnpc(neutral, "No... there are others... whom I will tell of your|authorisation to visit that place. When you speak|to them, they will know you, and grant you|access to that place when asked."); - ~chatnpc(neutral, "Use the Air Talisman to locate the air temple,|and use any further talismans you find to locate|the other missing elemental temples.|Now... my research notes please?"); + ~chatplayer("Sure. I have them here."); + ~chatnpc("Well, before you hand them over to me, as you have been nothing but truthful with me to this point, and I admire that in an adventurer, I will let you into the secret of our research."); + ~chatnpc("Now as you may or may not know, many|centuries ago, the wizards at this Tower|learnt the secret of creating Rune Stones, which|allowed us to cast Magic very easily."); + ~chatnpc("When this Tower was burnt down the secret of creating runes was lost to us for all time... except it wasn't. Some months ago, while searching these ruins for information from old days,"); + ~chatnpc("I came upon a scroll, almost destroyed, that detailed a magical rock deep in the icefields of the North, closed off from access by anything other than magical means."); + ~chatnpc("This rock was called the 'Rune Essence' by the|magicians who studied its powers. Apparently, by simply|breaking a chunk from it, a Rune Stone could be|fashioned very quickly and easily at certain"); + ~chatnpc("elemental altars that were scattered across the land|back then. Now, this is an intersting little piece of|history, but not much use to us as modern wizards|without access to the Rune Essence,"); + ~chatnpc("or these elemental altars. This is where you and|Aubury come into this story. A few weeks back,|Aubury discovered in a standard delivery of runes|to his store, a parchment detailing a"); + ~chatnpc("teleportation spell that he had never come across before. To his shock, when cast it took him to a strange rock he had never encountered before... yet that felt strangely familiar..."); + ~chatnpc("As I'm sure you have now guessed, he had discovered a portal leading to the mythical Rune Essence. As soon as he told me of this spell I saw the importance of his find,"); + ~chatnpc("for if we could but find the elemental altars spoken|of in the ancient texts, we would once more be able|to create runes as our ancestors had done! It would|be the saviour of the wizards' art!"); + ~chatplayer("I'm still not sure how I fit into|this little story of yours..."); + ~chatnpc("You haven't guessed? This talisman you brought me...|it is the key to the elemental altar of air! When|you hold it next, it will direct you towards"); + ~chatnpc("the entrance to the long forgotten Air Altar! By|bringing pieces of the Rune Essence to the Air Temple,|you will be able to fashion your own Air Runes!"); + ~chatnpc("And this is not all! By finding other talismans similar to this one, you will eventually be able to craft every rune that is available on this world! Just"); + ~chatnpc("as our ancestors did! I cannot stress enough what a find this is! Now, due to the risks involved of letting this mighty power fall into the wrong hands"); + ~chatnpc("I will keep the teleport skill to the Rune Essence|a closely guarded secret, shared only by myself|and those Magic users around the world|whom I trust enough to keep it."); + ~chatnpc("This means that if any evil power should discover|the talismans required to enter the elemental|temples, we will be able to prevent their access|to the Rune Essence and prevent"); + ~chatnpc("tragedy befalling this world. I know not where the|temples are located, nor do I know where the talismans|have been scattered to in this land, but I now"); + ~chatnpc("return your Air Talisman to you. Find the Air|Temple, and you will be able to charge your Rune|Essences to become Air Runes at will. Any time"); + ~chatnpc("you wish to visit the Rune Essence, speak to me|or Aubury and we will open a portal to that|mystical place for you to visit."); + ~chatplayer("So only you and Aubury know the teleport|spell to the Rune Essence?"); + ~chatnpc("No... there are others... whom I will tell of your|authorisation to visit that place. When you speak|to them, they will know you, and grant you|access to that place when asked."); + ~chatnpc("Use the Air Talisman to locate the air temple,|and use any further talismans you find to locate|the other missing elemental temples.|Now... my research notes please?"); inv_del(inv, notes, 1); inv_add(inv, air_talisman, 1); @@ -78,10 +78,10 @@ if(%runemysteries_progress = 0) { def_int $option = ~p_choice2("Nothing thanks, I'm just looking around.", 1, "Can you teleport me to the Rune Essence?", 2); if ($option = 1) { - ~chatplayer(neutral, "Nothing thanks. I'm just looking around."); + ~chatplayer("Nothing thanks. I'm just looking around."); } if ($option = 2) { - ~chatplayer(neutral, "Can you teleport me to the Rune Essence?"); + ~chatplayer("Can you teleport me to the Rune Essence?"); @teleport_to_essence_mine(^essence_mine_to_sedridor); } } @@ -89,51 +89,51 @@ if(%runemysteries_progress = 0) { [label,rune_mysteries] def_int $option = ~p_choice3("Nothing thanks. I'm just looking around.", 1, "What are you doing down here?", 2, "I'm looking for the head wizard.", 3); if ($option = 1) { - ~chatplayer(neutral, "Nothing thanks. I'm just looking around."); + ~chatplayer("Nothing thanks. I'm just looking around."); } else if ($option = 2) { @sedridor_2; } else if ($option = 3) { - ~chatplayer(neutral, "I'm looking for the head wizard."); - ~chatnpc(neutral, "Oh you are, are you?|And just why would you be doing that?"); - ~chatplayer(neutral, "The Duke of Lumbridge sent me to find him. I have this weird talisman he found. He said the head wizard would be very interested in it."); - ~chatnpc(neutral, "Did he now? HmmmMMMMMmmmmm.|Well that IS interesting. Hand it over then adventurer,|let me see what all the hubbub about it is.|Just some amulet I'll wager."); + ~chatplayer("I'm looking for the head wizard."); + ~chatnpc("Oh you are, are you?|And just why would you be doing that?"); + ~chatplayer("The Duke of Lumbridge sent me to find him. I have this weird talisman he found. He said the head wizard would be very interested in it."); + ~chatnpc("Did he now? HmmmMMMMMmmmmm.|Well that IS interesting. Hand it over then adventurer,|let me see what all the hubbub about it is.|Just some amulet I'll wager."); $option = ~p_choice2("Ok, here you are.", 1, "No, I'll only give it to the head wizard.", 2); if ($option = 1) { @seridor_3; } else if ($option = 2) { - ~chatplayer(neutral, "No, I'll only give it to the head wizard."); - ~chatnpc(neutral, "Hmmm. Well, I admire your caution adventurer, perhaps I can prove myself? I will use my mental powers to discover..."); - ~chatnpc(neutral, "Your name is... !"); - ~chatplayer(neutral, "You're right!"); - ~chatnpc(neutral, "Well I am head wizard you know! You don't get to my position without learning a few tricks along the way!"); - ~chatnpc(neutral, "So now I have proved myself to you why don't you hand over that talisman, hmm?"); + ~chatplayer("No, I'll only give it to the head wizard."); + ~chatnpc("Hmmm. Well, I admire your caution adventurer, perhaps I can prove myself? I will use my mental powers to discover..."); + ~chatnpc("Your name is... !"); + ~chatplayer("You're right!"); + ~chatnpc("Well I am head wizard you know! You don't get to my position without learning a few tricks along the way!"); + ~chatnpc("So now I have proved myself to you why don't you hand over that talisman, hmm?"); @seridor_3; } } [label,sedridor_2] -~chatnpc(neutral, "That is indeed a good question. Here in the cellar of the Wizards' Tower you find the remains of the old Wizards' Tower, destroyed by fire"); -~chatnpc(neutral, "many years past by the treachery of the Zamorakians. Many mysteries were lost, which we try to find once more. By building this Tower on the remains of the old,"); -~chatnpc(neutral, "we sought to show the world of our dedication to learning the mysteries of Magic. I am here searching through these fragments for knowledge from the artefacts from our past"); -~chatplayer(neutral, "And have you found anything useful?"); -~chatnpc(neutral, "Aaaah... that would be telling adventurer. Anything I have found I cannot speak freely of, for fear the treachery of the past might be repeated."); +~chatnpc("That is indeed a good question. Here in the cellar of the Wizards' Tower you find the remains of the old Wizards' Tower, destroyed by fire"); +~chatnpc("many years past by the treachery of the Zamorakians. Many mysteries were lost, which we try to find once more. By building this Tower on the remains of the old,"); +~chatnpc("we sought to show the world of our dedication to learning the mysteries of Magic. I am here searching through these fragments for knowledge from the artefacts from our past"); +~chatplayer("And have you found anything useful?"); +~chatnpc("Aaaah... that would be telling adventurer. Anything I have found I cannot speak freely of, for fear the treachery of the past might be repeated."); def_int $option = ~p_choice2("Ok, well I'll leave you to it.", 1, "What do you mean treachery?", 2); if ($option = 1) { - ~chatplayer(neutral, "Ok, well I'll leave you to it."); + ~chatplayer("Ok, well I'll leave you to it."); } else if ($option = 2) { - ~chatnpc(neutral, "Well, it is a long story from the past... Many years ago, this Wizards' Tower was a focus of great learning, as we mages studied together to try and learn the secrets behind"); - ~chatnpc(neutral, "the Rune Stones that allow us to use Magic. Who makes them? Where do they come from? How many types are there? What spells can they produce? All these questions and more are still unknown to us,"); - ~chatnpc(neutral, "but were once known to our ancestors. Legends tell us that in the past the mages who lived here could fashion Rune Stones almost at will, and as many as they desired."); - ~chatplayer(neutral, "But they cannot anymore?"); - ~chatnpc(neutral, "No, unfortunately not. Many years past, the Wizards who follow Zamorak, the god of chaos, burned this Tower to the ground, and all who were inside."); - ~chatnpc(neutral, "To this day we do not fully know why they did this terrible act, but all our research, all of our greatest magical minds were destroyed in one fell swoop."); - ~chatnpc(neutral, "This is why I spend my time searching through these few remains we have left from the glorious old Tower. I hope someday to find something that will tell us once more of the mysteries of"); - ~chatnpc(neutral, "the runes that we use daily, which dwindle in supply with each use. Someday I hope we may once more create our own runes, and the Wizards' Tower will once more be a place of glory!"); - ~chatplayer(neutral, "Ok, well I'll leave you to it."); + ~chatnpc("Well, it is a long story from the past... Many years ago, this Wizards' Tower was a focus of great learning, as we mages studied together to try and learn the secrets behind"); + ~chatnpc("the Rune Stones that allow us to use Magic. Who makes them? Where do they come from? How many types are there? What spells can they produce? All these questions and more are still unknown to us,"); + ~chatnpc("but were once known to our ancestors. Legends tell us that in the past the mages who lived here could fashion Rune Stones almost at will, and as many as they desired."); + ~chatplayer("But they cannot anymore?"); + ~chatnpc("No, unfortunately not. Many years past, the Wizards who follow Zamorak, the god of chaos, burned this Tower to the ground, and all who were inside."); + ~chatnpc("To this day we do not fully know why they did this terrible act, but all our research, all of our greatest magical minds were destroyed in one fell swoop."); + ~chatnpc("This is why I spend my time searching through these few remains we have left from the glorious old Tower. I hope someday to find something that will tell us once more of the mysteries of"); + ~chatnpc("the runes that we use daily, which dwindle in supply with each use. Someday I hope we may once more create our own runes, and the Wizards' Tower will once more be a place of glory!"); + ~chatplayer("Ok, well I'll leave you to it."); } [label,seridor_3] -~chatplayer(neutral, "Ok here you are."); +~chatplayer("Ok here you are."); if (inv_total(inv, air_talisman) = 0) { // unofficial text ~mesbox("Ooops, look's like I've forgotten to bring the item in question."); @@ -141,20 +141,20 @@ if (inv_total(inv, air_talisman) = 0) { } inv_del(inv, air_talisman, 1); ~mesbox("You hand the Talisman to the wizard."); -~chatnpc(shock, "Wow! This is... incredible!"); -~chatnpc(shock, "Th-this talisman you brought me...! It is the last piece|of the puzzle, I think! Finally! The legacy of our|ancestors... it will return to us once more!"); -~chatnpc(neutral, "I need time to study this, . Can you please do me this task while I study this talisman you have brought me? In the mighty town of Varrock, which"); -~chatnpc(neutral, "is located North East of here, there is a certain shop that sells magical runes. I have in this package all of the research I have done relating to the Rune Stones, and"); -~chatnpc(neutral, "require somebody to take them to the shopkeeper so that he may share my research and offer me his insights. Do this thing for me, and bring back what he gives you,"); -~chatnpc(neutral, "and if my suspicions are correct. I will let you into the knowledge of one of the greatest secrets this world has ever known! A secret so powerful that it destroyed the"); -~chatnpc(neutral, "original Wizards' Tower all of those centuries|ago! My research, combined with this mysterious|talisman... I cannot believe the answer to|the mysteries is so close now!"); -~chatnpc(neutral, "Do this thing for me . Be rewarded in a|way you can never imagine."); +~chatnpc("Wow! This is... incredible!"); +~chatnpc("Th-this talisman you brought me...! It is the last piece|of the puzzle, I think! Finally! The legacy of our|ancestors... it will return to us once more!"); +~chatnpc("I need time to study this, . Can you please do me this task while I study this talisman you have brought me? In the mighty town of Varrock, which"); +~chatnpc("is located North East of here, there is a certain shop that sells magical runes. I have in this package all of the research I have done relating to the Rune Stones, and"); +~chatnpc("require somebody to take them to the shopkeeper so that he may share my research and offer me his insights. Do this thing for me, and bring back what he gives you,"); +~chatnpc("and if my suspicions are correct. I will let you into the knowledge of one of the greatest secrets this world has ever known! A secret so powerful that it destroyed the"); +~chatnpc("original Wizards' Tower all of those centuries|ago! My research, combined with this mysterious|talisman... I cannot believe the answer to|the mysteries is so close now!"); +~chatnpc("Do this thing for me . Be rewarded in a|way you can never imagine."); def_int $option = ~p_choice2("Yes, certainly.", 1, "No, I'm busy.", 2); if ($option = 1) { - ~chatplayer(neutral, "Yes, certainly."); - ~chatnpc(neutral, "Take this package, and head directly North|from here, through Draynor village, until you reach|the Barbarian Village. Then head East from there|until you reach Varrock."); - ~chatnpc(neutral, "Once in Varrock, take this package to the owner of the rune shop. His name is Aubury. You may find it|helpful to ask one of Varrock's citizens for directions."); - ~chatnpc(neutral, "as Varrock can be a confusing place for the first time visitor. He will give you a special item - bring it back to me, and I shall show you the mystery of the runes..."); + ~chatplayer("Yes, certainly."); + ~chatnpc("Take this package, and head directly North|from here, through Draynor village, until you reach|the Barbarian Village. Then head East from there|until you reach Varrock."); + ~chatnpc("Once in Varrock, take this package to the owner of the rune shop. His name is Aubury. You may find it|helpful to ask one of Varrock's citizens for directions."); + ~chatnpc("as Varrock can be a confusing place for the first time visitor. He will give you a special item - bring it back to me, and I shall show you the mystery of the runes..."); if (inv_freespace(inv) = 0) { ~mesbox("The head wizard tries to hand you the Research Package, but you don't have enough room to take it."); return; @@ -162,11 +162,11 @@ if ($option = 1) { inv_add(inv, research_package, 1); %runemysteries_progress = 2; ~mesbox("The head wizard gives you a package."); - ~chatnpc(neutral, "Best of luck with your quest, ."); + ~chatnpc("Best of luck with your quest, ."); } else if ($option = 2) { - ~chatplayer(neutral, "No, I'm busy."); + ~chatplayer("No, I'm busy."); // TODO find out what happens here inv_add(inv, air_talisman, 1); ~mesbox("Sedridor hands you back the Talisman."); - ~chatnpc(neutral, "Perhaphs I will see you later ."); + ~chatnpc("Perhaphs I will see you later ."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_wizard_tower/scripts/wizard_mizgog.rs2 b/data/src/scripts/areas/area_wizard_tower/scripts/wizard_mizgog.rs2 index 2fa28e28a..d4f9114bf 100644 --- a/data/src/scripts/areas/area_wizard_tower/scripts/wizard_mizgog.rs2 +++ b/data/src/scripts/areas/area_wizard_tower/scripts/wizard_mizgog.rs2 @@ -1,64 +1,64 @@ [opnpc1,wizard_mizgog] switch_int(%imp_progress) { case ^imp_not_started: - ~chatnpc(neutral, "Hello there."); + ~chatnpc("Hello there."); @multi2("Give me a quest!", mizgog_givequest, "Most of your friends are pretty quiet aren't they?", mizgog_quiet); case ^imp_started: - ~chatnpc(happy, "So how are you doing finding my beads?"); + ~chatnpc("So how are you doing finding my beads?"); if(inv_total(inv, imp_black_bead) > 0 & inv_total(inv, imp_white_bead) > 0 & inv_total(inv, imp_yellow_bead) > 0 & inv_total(inv, imp_red_bead) > 0) { - ~chatplayer(happy, "I've got all four beads.|It was hard work I can tell you."); - ~chatnpc(happy, "Give them here and I'll sort out a reward."); + ~chatplayer("I've got all four beads.|It was hard work I can tell you."); + ~chatnpc("Give them here and I'll sort out a reward."); ~mesbox("You give four coloured beads to Wizard Mizgog."); inv_del(inv, imp_black_bead, 1); inv_del(inv, imp_white_bead, 1); inv_del(inv, imp_yellow_bead, 1); inv_del(inv, imp_red_bead, 1); queue(imp_quest_complete, 0); - ~chatnpc(happy, "Here's your reward then,|an amulet of accuracy."); + ~chatnpc("Here's your reward then,|an amulet of accuracy."); mes("The Wizard hands you an amulet."); return; } if(inv_total(inv, imp_black_bead) = 0 & inv_total(inv, imp_white_bead) = 0 & inv_total(inv, imp_yellow_bead) = 0 & inv_total(inv, imp_red_bead) = 0) { - ~chatplayer(sad, "I have not found any yet."); - ~chatnpc(neutral, "Well get on with it.|I've lost a white bead, a red bead,|a black bead, and a yellow bead.|Go kill some imps!"); + ~chatplayer("I have not found any yet."); + ~chatnpc("Well get on with it.|I've lost a white bead, a red bead,|a black bead, and a yellow bead.|Go kill some imps!"); } else { - ~chatplayer(happy, "I have found some of your beads."); - ~chatnpc(neutral, "Come back when you have them all.|The colour of the four beads that I need|are red, yellow, black, and white.|Go chase some imps!"); + ~chatplayer("I have found some of your beads."); + ~chatnpc("Come back when you have them all.|The colour of the four beads that I need|are red, yellow, black, and white.|Go chase some imps!"); } case ^imp_complete: - ~chatnpc(neutral, "Hello there."); + ~chatnpc("Hello there."); def_int $option = ~p_choice2("Got any more quests?", 1, "Most of your friends are pretty quiet aren't they?", 2); if($option = 1) { - ~chatplayer(neutral, "Got any more quests?"); - ~chatnpc(neutral, "No, everything is good with the world today."); + ~chatplayer("Got any more quests?"); + ~chatnpc("No, everything is good with the world today."); } else if($option = 2) { @mizgog_quiet; } } [label,mizgog_givequest] -~chatplayer(neutral, "Give me a quest!"); -~chatnpc(happy, "Give me a quest what?"); +~chatplayer("Give me a quest!"); +~chatnpc("Give me a quest what?"); def_int $option = ~p_choice3("Give me a quest please.", 1, "Give me a quest or else!", 2, "Just stop messing around and give me a quest!", 3); if($option = 1) { - ~chatplayer(neutral, "Give me a quest please."); - ~chatnpc(happy, "Well seeing as you asked nicely...|I could do with some help."); - ~chatnpc(sad, "The wizard Grayzag next door|decided he didn't like me.|So he cast a spell of summoning,|and summoned hundreds of little imps."); - ~chatnpc(sad, "These imps stole all sorts of my things.|Most of these things I don't really care about,|just eggs and balls of string and things."); - ~chatnpc(sad, "But they stole my four magical beads.|There was a red one, a yellow one,|a black one, and a white one."); - ~chatnpc(sad, "These imps have now spread out all over the kingdom.|Could you get my beads back for me?"); + ~chatplayer("Give me a quest please."); + ~chatnpc("Well seeing as you asked nicely...|I could do with some help."); + ~chatnpc("The wizard Grayzag next door|decided he didn't like me.|So he cast a spell of summoning,|and summoned hundreds of little imps."); + ~chatnpc("These imps stole all sorts of my things.|Most of these things I don't really care about,|just eggs and balls of string and things."); + ~chatnpc("But they stole my four magical beads.|There was a red one, a yellow one,|a black one, and a white one."); + ~chatnpc("These imps have now spread out all over the kingdom.|Could you get my beads back for me?"); %imp_progress = ^imp_started; ~send_quest_progress(questlist:imp, %imp_progress, ^imp_complete); - ~chatplayer(happy, "I'll try."); + ~chatplayer("I'll try."); } else if($option = 2) { - ~chatplayer(sad, "Give me a quest or else!"); - ~chatnpc(happy, "Or else what? You'll attack me?"); - ~chatnpc(laugh, "Hahaha!"); + ~chatplayer("Give me a quest or else!"); + ~chatnpc("Or else what? You'll attack me?"); + ~chatnpc("Hahaha!"); } else if($option = 3) { - ~chatplayer(angry, "Just stop messing around and give me a quest!"); - ~chatnpc(happy, "Ah now you're assuming I have one to give."); + ~chatplayer("Just stop messing around and give me a quest!"); + ~chatnpc("Ah now you're assuming I have one to give."); } [label,mizgog_quiet] -~chatplayer(neutral, "Most of your friends are pretty quiet aren't they?"); -~chatnpc(neutral, "Yes, they've mostly got their heads in the clouds,|thinking about magic."); \ No newline at end of file +~chatplayer("Most of your friends are pretty quiet aren't they?"); +~chatnpc("Yes, they've mostly got their heads in the clouds,|thinking about magic."); \ No newline at end of file diff --git a/data/src/scripts/areas/area_yanille/scripts/bartender.rs2 b/data/src/scripts/areas/area_yanille/scripts/bartender.rs2 index 3a833aeff..3f2e472fc 100644 --- a/data/src/scripts/areas/area_yanille/scripts/bartender.rs2 +++ b/data/src/scripts/areas/area_yanille/scripts/bartender.rs2 @@ -1,9 +1,9 @@ [opnpc1,bartender_dragoninn] -~chatnpc(quiz, "What can I get you?"); -~chatplayer(quiz, "What's on the menu?"); +~chatnpc("What can I get you?"); +~chatplayer("What's on the menu?"); // also sells beer in OSRS, just these 2 in RSC, sals and RHQ mentions it's only 2 drinks as well // so i'm guessing it was changed with watchtower rework -~chatnpc(happy, "Dragon Bitter and Greenman's Ale."); +~chatnpc("Dragon Bitter and Greenman's Ale."); def_int $option; if(testbit(%barcrawl_progress, ^dragoninn_index) = false & inv_total(inv, barcrawl_card) > 0) { $option = ~p_choice4("I'll give it a miss I think.", 1, "I'll try the Dragon Bitter.", 2, "Can I have some Greenman's Ale?", 3, "I'm doing Alfred Grimhand's Barcrawl.", 4); @@ -13,23 +13,23 @@ if(testbit(%barcrawl_progress, ^dragoninn_index) = false & inv_total(inv, barcra switch_int($option) { case 1: - ~chatplayer(neutral, "I'll give it a miss I think."); - ~chatnpc(happy, "Come back when you're a little thirstier."); + ~chatplayer("I'll give it a miss I think."); + ~chatnpc("Come back when you're a little thirstier."); case 2: - ~chatplayer(happy, "I'll try the Dragon Bitter."); - ~chatnpc(happy, "Ok, that'll be two coins."); + ~chatplayer("I'll try the Dragon Bitter."); + ~chatnpc("Ok, that'll be two coins."); if (inv_total(inv, coins) < 2) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); } else { inv_del(inv, coins, 2); inv_add(inv, dragon_bitter, 1); mes("You buy a pint of Dragon Bitter."); } case 3: - ~chatplayer(quiz, "Can I have some Greenman's Ale?"); - ~chatnpc(happy, "Ok, that'll be ten coins."); + ~chatplayer("Can I have some Greenman's Ale?"); + ~chatnpc("Ok, that'll be ten coins."); if (inv_total(inv, coins) < 10) { - ~chatplayer(sad, "Oh dear. I don't seem to have enough money."); + ~chatplayer("Oh dear. I don't seem to have enough money."); } else { inv_del(inv, coins, 10); inv_add(inv, greenmans_ale, 1); @@ -44,10 +44,10 @@ if(testbit(%barcrawl_progress, ^dragoninn_index) = false & last_useitem = barcra } [label,dragoninn_barcrawl] -~chatplayer(happy, "I'm doing Alfred Grimhand's Barcrawl."); -~chatnpc(happy, "I suppose you'll be wanting some Fire Brandy.|That'll cost you 12 coins."); +~chatplayer("I'm doing Alfred Grimhand's Barcrawl."); +~chatnpc("I suppose you'll be wanting some Fire Brandy.|That'll cost you 12 coins."); if(inv_total(inv, coins) < 12) { - ~chatplayer(sad, "Sorry I don't have 12 coins."); + ~chatplayer("Sorry I don't have 12 coins."); return; } if_close; diff --git a/data/src/scripts/areas/area_yanille/scripts/colonel_radick.rs2 b/data/src/scripts/areas/area_yanille/scripts/colonel_radick.rs2 index e588c10c5..f9a1fa87a 100644 --- a/data/src/scripts/areas/area_yanille/scripts/colonel_radick.rs2 +++ b/data/src/scripts/areas/area_yanille/scripts/colonel_radick.rs2 @@ -1,15 +1,15 @@ [opnpc1,colonel_radick] -~chatnpc(confused, "Who goes there?|Friend or foe?"); +~chatnpc("Who goes there?|Friend or foe?"); def_int $option = ~p_choice3("Friend.", 1, "Foe!", 2, "Why is this town so heavily defended?", 3); if($option = 1) { - ~chatplayer(happy, "Friend."); - ~chatnpc(happy, "Ok good to hear it."); + ~chatplayer("Friend."); + ~chatnpc("Ok good to hear it."); } else if($option = 2) { - ~chatplayer(angry, "Foe!"); - ~chatnpc(confused, "Oh righty..."); + ~chatplayer("Foe!"); + ~chatnpc("Oh righty..."); ~npc_retaliate(0); } else if($option = 3) { - ~chatplayer(neutral, "Why is this town so heavily defended?"); - ~chatnpc(neutral, "Yanille is on the southwest border of Kandarin,|Beyond here you go into the Feldip hills|which is major Ogre territory.|Our job is to defend Yanille from the ogres."); + ~chatplayer("Why is this town so heavily defended?"); + ~chatnpc("Yanille is on the southwest border of Kandarin,|Beyond here you go into the Feldip hills|which is major Ogre territory.|Our job is to defend Yanille from the ogres."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_yanille/scripts/sigbert_the_adventurer.rs2 b/data/src/scripts/areas/area_yanille/scripts/sigbert_the_adventurer.rs2 index 917fb1e4e..2a0166373 100644 --- a/data/src/scripts/areas/area_yanille/scripts/sigbert_the_adventurer.rs2 +++ b/data/src/scripts/areas/area_yanille/scripts/sigbert_the_adventurer.rs2 @@ -1,12 +1,12 @@ [opnpc1,sigbert_the_adventurer] -~chatnpc(neutral, "I'd be very careful going down there friend."); +~chatnpc("I'd be very careful going down there friend."); def_int $option = ~p_choice2("Why what's down there?", 1, "Fear not I am very strong", 2); if($option = 1) { - ~chatplayer(neutral, "Why what's down there ?"); - ~chatnpc(happy, "Salarin the twisted.|One of Kandarin's most dangerous chaos druids.|I tried to take him on, then suddenly felt immensely weak."); - ~chatnpc(happy, "I hear he's susceptible to attacks from the mind.|However I have no idea what that means,|so it's not much help to me."); + ~chatplayer("Why what's down there ?"); + ~chatnpc("Salarin the twisted.|One of Kandarin's most dangerous chaos druids.|I tried to take him on, then suddenly felt immensely weak."); + ~chatnpc("I hear he's susceptible to attacks from the mind.|However I have no idea what that means,|so it's not much help to me."); } else if($option = 2) { - ~chatplayer(happy, "Fear not, I am very strong"); - ~chatnpc(neutral, "You might find you are not so strong shortly..."); + ~chatplayer("Fear not, I am very strong"); + ~chatnpc("You might find you are not so strong shortly..."); } \ No newline at end of file diff --git a/data/src/scripts/areas/area_yanille/scripts/tower_guard.rs2 b/data/src/scripts/areas/area_yanille/scripts/tower_guard.rs2 index fdec92cad..fea08237c 100644 --- a/data/src/scripts/areas/area_yanille/scripts/tower_guard.rs2 +++ b/data/src/scripts/areas/area_yanille/scripts/tower_guard.rs2 @@ -1,3 +1,3 @@ [opnpc1,tower_guard] -~chatplayer(neutral, "Hello. What are you doing here?"); -~chatnpc(neutral, "We are the tower guards - our business is our own!"); \ No newline at end of file +~chatplayer("Hello. What are you doing here?"); +~chatnpc("We are the tower guards - our business is our own!"); \ No newline at end of file diff --git a/data/src/scripts/areas/areas_heroes_guild/scripts/helemos.rs2 b/data/src/scripts/areas/areas_heroes_guild/scripts/helemos.rs2 index 63fb7d8cc..9b3be5b22 100644 --- a/data/src/scripts/areas/areas_heroes_guild/scripts/helemos.rs2 +++ b/data/src/scripts/areas/areas_heroes_guild/scripts/helemos.rs2 @@ -1,15 +1,15 @@ [opnpc1,helemos] -~chatnpc(default, "Welcome to the Heroes' Guild!"); +~chatnpc("Welcome to the Heroes' Guild!"); def_int $choice = ~p_choice2("So do you sell anything here?", 1, "So what can I do here?", 2); switch_int ($choice) { case 1: - ~chatplayer(default, "So do you sell anything good here?"); - ~chatnpc(default, "Why yes! We DO run an exclusive shop for our members!"); + ~chatplayer("So do you sell anything good here?"); + ~chatnpc("Why yes! We DO run an exclusive shop for our members!"); ~openshop_activenpc; case 2: - ~chatplayer(default, "So what can I do here?"); - ~chatnpc(default, "Look around... there are all sorts of things to keep our guild members entertained!"); + ~chatplayer("So what can I do here?"); + ~chatnpc("Look around... there are all sorts of things to keep our guild members entertained!"); } \ No newline at end of file diff --git a/data/src/scripts/areas/monastery/scripts/abbot_langley.rs2 b/data/src/scripts/areas/monastery/scripts/abbot_langley.rs2 index 472b61c62..b061ea90f 100644 --- a/data/src/scripts/areas/monastery/scripts/abbot_langley.rs2 +++ b/data/src/scripts/areas/monastery/scripts/abbot_langley.rs2 @@ -1,5 +1,5 @@ [opnpc1,abbot_langley] -~chatnpc(quiz, "Greetings traveller."); +~chatnpc("Greetings traveller."); if (%prayer_guild < 1) { @multi3("Can you heal me? I'm injured.", can_you_heal_me_im_injured, "Isn't this place built a bit out the way?", isnt_this_place_built_a_bit_out_the_way, "How do I get further into the monastery?", ask_to_join_abbot_langley); } else { @@ -7,12 +7,12 @@ if (%prayer_guild < 1) { } [label,ask_to_join_abbot_langley] -~chatplayer(happy, "How do I get further into the monastery?"); -~chatnpc(quiz, "I'm sorry but only members of our order are allowed|in the second level of the monastery."); +~chatplayer("How do I get further into the monastery?"); +~chatnpc("I'm sorry but only members of our order are allowed|in the second level of the monastery."); @ask_to_join_abbot_langley2; [label,can_you_heal_me_im_injured] -~chatplayer(happy, "Can you heal me? I'm injured."); -~chatnpc(quiz, "Ok."); +~chatplayer("Can you heal me? I'm injured."); +~chatnpc("Ok."); stat_heal(hitpoints, calc(4 + scale(12, 100, stat_base(hitpoints))), 0); ~mesbox(" places his hands on your head.|You feel a little better."); \ No newline at end of file diff --git a/data/src/scripts/areas/monastery/scripts/brother_jered.rs2 b/data/src/scripts/areas/monastery/scripts/brother_jered.rs2 index ed0088dc2..dd3bd106c 100644 --- a/data/src/scripts/areas/monastery/scripts/brother_jered.rs2 +++ b/data/src/scripts/areas/monastery/scripts/brother_jered.rs2 @@ -1,31 +1,31 @@ [opnpc1,brother_jered] def_int $choice = ~p_choice2("What can you do to help a bold adventurer like myself?", 1, "Praise be to Saradomin!", 2); if ($choice = 2) { - ~chatplayer(short, "Praise be to Saradomin!"); - ~chatnpc(short, "Yes! Praise he who brings life to this world."); + ~chatplayer("Praise be to Saradomin!"); + ~chatnpc("Yes! Praise he who brings life to this world."); return; } -~chatplayer(happy, "What can you do to help a bold adventurer like myself?"); +~chatplayer("What can you do to help a bold adventurer like myself?"); // osrs but skill capes taken out. if (inv_total(inv, obj_1716) > 0) { - ~chatnpc(neutral, "Well I can bless that star of Saradomin you have!"); + ~chatnpc("Well I can bless that star of Saradomin you have!"); } else if (inv_total(inv, unstrung_symbol) > 0) { - ~chatnpc(neutral, "Well if you put a string on that holy symbol I can|bless it for you."); + ~chatnpc("Well if you put a string on that holy symbol I can|bless it for you."); return; } else { - ~chatnpc(neutral, "I can tell you about holy symbols."); - ~chatplayer(quiz, "Tell me about holy symbols."); - ~chatnpc(neutral, "If you have a silver star, which is the holy symbol of|Saradomin, then I can bless it. Then if you are|wearing it, it will help you when you are praying."); + ~chatnpc("I can tell you about holy symbols."); + ~chatplayer("Tell me about holy symbols."); + ~chatnpc("If you have a silver star, which is the holy symbol of|Saradomin, then I can bless it. Then if you are|wearing it, it will help you when you are praying."); return; } // osrs has rly weird dialogue here so im using openrsc // "Bless star, please.|Tell me about the Skillcape of Prayer.|None of those, thanks." $choice = ~p_choice2("Yes please.", 1, "No thank you.", 2); if ($choice = 2) { - ~chatplayer(quiz, "No thank you."); + ~chatplayer("No thank you."); return; } -~chatplayer(quiz, "Yes please."); +~chatplayer("Yes please."); // https://i.imgur.com/0AuttJO.png 2006 // https://web.archive.org/web/20060518200959/http://runevillage.com/rs2Guilds/guild2Prayer.php inv_del(inv, obj_1716, 1); diff --git a/data/src/scripts/areas/monastery/scripts/monk.rs2 b/data/src/scripts/areas/monastery/scripts/monk.rs2 index 41e07bd74..67ba19a8a 100644 --- a/data/src/scripts/areas/monastery/scripts/monk.rs2 +++ b/data/src/scripts/areas/monastery/scripts/monk.rs2 @@ -15,7 +15,7 @@ npc_anim(human_castheal,0); %npc_attacking_uid = %npc_aggressive_player; [opnpc1,monk] -~chatnpc(quiz, "Greetings traveller."); +~chatnpc("Greetings traveller."); if (%prayer_guild < 1) { @multi3("Can you heal me? I'm injured.", monk_heal_player, "Isn't this place built a bit out the way?", isnt_this_place_built_a_bit_out_the_way, "How do I get further into the monastery?", ask_to_join_monk); } else { @@ -23,8 +23,8 @@ if (%prayer_guild < 1) { } [label,monk_heal_player] -~chatplayer(happy, "Can you heal me? I'm injured."); -~chatnpc(quiz, "Ok."); +~chatplayer("Can you heal me? I'm injured."); +~chatnpc("Ok."); if_close; sound_synth(heal, 0, 0); spotanim_pl(heal_casting, 120, 0); @@ -33,5 +33,5 @@ stat_heal(hitpoints, calc(2 + scale(20, 100, stat_base(hitpoints))), 0); mes("You feel a little better."); [label,ask_to_join_monk] -~chatplayer(happy, "How do I get further into the monastery?"); -~chatnpc(quiz, "You'll need to talk to Abbot Langley about that. He's|usually to be found walking the halls of the monastery."); \ No newline at end of file +~chatplayer("How do I get further into the monastery?"); +~chatnpc("You'll need to talk to Abbot Langley about that. He's|usually to be found walking the halls of the monastery."); \ No newline at end of file diff --git a/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 b/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 index f54295704..23c27c7c2 100644 --- a/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 +++ b/data/src/scripts/areas/monastery/scripts/prayer_guild.rs2 @@ -1,15 +1,15 @@ [label,isnt_this_place_built_a_bit_out_the_way] -~chatplayer(happy, "Isn't this place built a bit out the way?"); -~chatnpc(quiz, "We like it that way actually! We get disturbed less. We|still get rather a large amount of travellers looking for|sanctuary and healing here as it is!"); +~chatplayer("Isn't this place built a bit out the way?"); +~chatnpc("We like it that way actually! We get disturbed less. We|still get rather a large amount of travellers looking for|sanctuary and healing here as it is!"); [oploc1,loc_2641] if (%prayer_guild < 1) { if (npc_find(coord, abbot_langley, 5, 0) = true) { - ~chatnpc(quiz, "Only members of our order can go up there."); + ~chatnpc("Only members of our order can go up there."); @ask_to_join_abbot_langley2; } if (npc_find(coord, monk, 5, 0) = true) { - ~chatnpc(quiz, "You'll need to talk to Abbot Langley about that. He's|usually to be found walking the halls of the monastery."); + ~chatnpc("You'll need to talk to Abbot Langley about that. He's|usually to be found walking the halls of the monastery."); return; } // else just mesbox @@ -21,15 +21,15 @@ if (%prayer_guild < 1) { [label,ask_to_join_abbot_langley2] def_int $choice = ~p_choice2("Well can I join your order?", 1, "Oh, sorry.", 2); if ($choice = 2) { - ~chatplayer(sad, "Oh, sorry."); + ~chatplayer("Oh, sorry."); return; } -~chatplayer(quiz, "Well can I join your order?"); +~chatplayer("Well can I join your order?"); if (stat(prayer) < 31) { - ~chatnpc(quiz, "No. I am sorry, but I feel you are not devout enough."); + ~chatnpc("No. I am sorry, but I feel you are not devout enough."); return; } -~chatnpc(neutral, "Ok, I see you are someone suitable for our order. You|may join."); +~chatnpc("Ok, I see you are someone suitable for our order. You|may join."); %prayer_guild = 1; // altar diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index 8bf42cdd5..0af7075cc 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -19,7 +19,7 @@ [command,distance](coord $coord1, coord $coord2)(int) [command,movecoord](coord $coord, int $x, int $y, int $z)(coord) [command,seqlength](seq $seq)(int) -[command,split_init](string $text, int $width, int $lines, fontmetrics $font, mesanim $chathead) +[command,split_init](string $text, int $width, int $lines, fontmetrics $font) [command,split_pagecount]()(int) [command,split_get](int $page, int $line)(string) [command,split_linecount](int $page)(int) diff --git a/data/src/scripts/general/scripts/book.rs2 b/data/src/scripts/general/scripts/book.rs2 index 66b7c9156..744b7d165 100644 --- a/data/src/scripts/general/scripts/book.rs2 +++ b/data/src/scripts/general/scripts/book.rs2 @@ -19,7 +19,7 @@ switch_obj (%open_book) { p_delay(0); [proc,book](string $title, string $string) -split_init($string, 175, 22, q8, null); +split_init($string, 175, 22, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { diff --git a/data/src/scripts/general_use/scripts/haybales.rs2 b/data/src/scripts/general_use/scripts/haybales.rs2 index 7cd83d5b5..e52b69e09 100644 --- a/data/src/scripts/general_use/scripts/haybales.rs2 +++ b/data/src/scripts/general_use/scripts/haybales.rs2 @@ -21,7 +21,7 @@ def_int $rand = random(100); if ($rand < 2) { ~damage_self(1); } else if ($rand < 12) { - ~chatplayer(quiz, "Wow! A needle!|Now what are the chances of finding that?"); + ~chatplayer("Wow! A needle!|Now what are the chances of finding that?"); inv_add(inv, needle, 1); } else { mes("You find nothing of interest."); diff --git a/data/src/scripts/interface_bank/scripts/banker.rs2 b/data/src/scripts/interface_bank/scripts/banker.rs2 index 0fafb9489..4683f92ee 100644 --- a/data/src/scripts/interface_bank/scripts/banker.rs2 +++ b/data/src/scripts/interface_bank/scripts/banker.rs2 @@ -10,16 +10,16 @@ if (npc_range(coord) > 2) { [label,talk_to_banker] // TODO: Confirm this for 2004. -~chatnpcrange("quiz", "Good day, how may I help you?"); +~chatnpcrange("Good day, how may I help you?"); def_int $option = ~p_choice2("I'd like to access my bank account, please.", 1, "What is this place?", 2); switch_int ($option) { case 1 : - ~chatplayer("quiz", "I'd like to access my bank account, please."); + ~chatplayer("I'd like to access my bank account, please."); @openbank; case 2 : - ~chatplayer("neutral", "What is this place?"); - ~chatnpcrange("quiz", "This is a branch of the Bank of RuneScape. We have branches in many towns."); - ~chatplayer("neutral", "And what do you do?"); - ~chatnpcrange("quiz", "We will look after your items and money for you. Leave your valuables with us if you want to keep them safe."); + ~chatplayer("What is this place?"); + ~chatnpcrange("This is a branch of the Bank of RuneScape. We have branches in many towns."); + ~chatplayer("And what do you do?"); + ~chatnpcrange("We will look after your items and money for you. Leave your valuables with us if you want to keep them safe."); } \ No newline at end of file diff --git a/data/src/scripts/interface_chat/scripts/chat.rs2 b/data/src/scripts/interface_chat/scripts/chat.rs2 index 6f204ef8d..9592a5968 100644 --- a/data/src/scripts/interface_chat/scripts/chat.rs2 +++ b/data/src/scripts/interface_chat/scripts/chat.rs2 @@ -248,8 +248,8 @@ if ($lines = 0) { if_openchat($interface); -[proc,chatplayer](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,chatplayer](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -300,8 +300,8 @@ if ($lines = 0) { } if_openchat($interface); -[proc,chatnpc](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,chatnpc](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -312,8 +312,8 @@ while ($page < $pagetotal) { $page = calc($page + 1); } -[proc,.chatnpc](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,.chatnpc](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -324,8 +324,8 @@ while ($page < $pagetotal) { $page = calc($page + 1); } -[proc,chatnpcrange](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,chatnpcrange](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -336,8 +336,8 @@ while ($page < $pagetotal) { $page = calc($page + 1); } -[proc,.chatnpcrange](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,.chatnpcrange](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -348,8 +348,8 @@ while ($page < $pagetotal) { $page = calc($page + 1); } -[proc,chatnpcnoturn](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,chatnpcnoturn](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -359,8 +359,8 @@ while ($page < $pagetotal) { $page = calc($page + 1); } -[proc,.chatnpcnoturn](mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,.chatnpcnoturn](string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -370,8 +370,8 @@ while ($page < $pagetotal) { $page = calc($page + 1); } -[proc,chatnpc_specific](string $npc_name, npc $npc, mesanim $chathead, string $string) -split_init($string, 380, 4, q8, $chathead); +[proc,chatnpc_specific](string $npc_name, npc $npc, string $string) +split_init($string, 380, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -417,7 +417,7 @@ if ($lines = 0) { if_openchat($interface); [proc,mesbox](string $string) -split_init($string, 470, 5, q8, null); +split_init($string, 470, 5, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -462,7 +462,7 @@ if ($lines = 0) { .if_openchat($interface); [proc,.mesbox](string $string) -split_init($string, 470, 5, q8, null); +split_init($string, 470, 5, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -510,7 +510,7 @@ if ($lines = 0) { if_openchat($interface); [proc,objbox](obj $obj, string $string) -split_init($string, 400, 4, q8, null); +split_init($string, 400, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -520,7 +520,7 @@ while ($page < $pagetotal) { } [proc,objboxt](obj $obj, string $string) -split_init($string, 400, 4, q8, null); +split_init($string, 400, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -530,7 +530,7 @@ while ($page < $pagetotal) { } [proc,objboxb](obj $obj, string $string) -split_init($string, 400, 4, q8, null); +split_init($string, 400, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { @@ -584,7 +584,7 @@ if ($lines = 0) { if_openchat($interface); [proc,doubleobjbox](obj $obj_1, obj $obj_2, string $string) -split_init($string, 350, 4, q8, null); +split_init($string, 350, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { diff --git a/data/src/scripts/macro events/scripts/general/macro_event_drunken_dwarf.rs2 b/data/src/scripts/macro events/scripts/general/macro_event_drunken_dwarf.rs2 index 0be4d2bcb..437d71985 100644 --- a/data/src/scripts/macro events/scripts/general/macro_event_drunken_dwarf.rs2 +++ b/data/src/scripts/macro events/scripts/general/macro_event_drunken_dwarf.rs2 @@ -21,11 +21,11 @@ npc_del; [opnpc1,macro_event_drunken_dwarf] if (uid ! %npc_attacking_uid) { - ~chatnpc(drunk, "You're not my matey!"); // osrs + ~chatnpc("You're not my matey!"); // osrs return; } if (%macro_event = ^no_macro_event | %macro_event_uid ! npc_uid) { - ~chatnpc(drunk, "'Ave a good 'un buddy!"); // osrs + ~chatnpc("'Ave a good 'un buddy!"); // osrs return; } inv_add(inv, kebab, 1); @@ -33,7 +33,7 @@ inv_add(inv, beer, 1); %macro_event = ^no_macro_event; npc_queue(6, 0, 0); // say good bye -~chatnpc(drunk, "I 'new it were you matey! 'Ere, have some ob the good stuff!"); // osrs +~chatnpc("I 'new it were you matey! 'Ere, have some ob the good stuff!"); // osrs [ai_timer,macro_event_drunken_dwarf] if (~npc_out_of_combat = false) { diff --git a/data/src/scripts/macro events/scripts/general/macro_event_genie.rs2 b/data/src/scripts/macro events/scripts/general/macro_event_genie.rs2 index 3a4153189..90afd6fb6 100644 --- a/data/src/scripts/macro events/scripts/general/macro_event_genie.rs2 +++ b/data/src/scripts/macro events/scripts/general/macro_event_genie.rs2 @@ -22,11 +22,11 @@ npc_delay(2); [opnpc1,macro_event_genie] if (uid ! %npc_attacking_uid) { - ~chatnpc(sad, "Sorry, I'm trying to talk to , but seems to be ignoring me."); // osrs + ~chatnpc("Sorry, I'm trying to talk to , but seems to be ignoring me."); // osrs return; } if (%macro_event = ^no_macro_event | %macro_event_uid ! npc_uid) { - ~chatnpc(neutral, "Have a nice day, ."); + ~chatnpc("Have a nice day, ."); return; } %macro_event = ^no_macro_event; @@ -34,7 +34,7 @@ inv_add(inv, lamp, 1); // delays are taken from this video: https://youtu.be/EN4c2hV65Qk?list=PLn23LiLYLb1Y3P9S9qZbijcJihiD416jT npc_queue(6, 0, 2); // sept 2006 https://imgur.com/undefined -~chatnpc(neutral, "Ah, so you are there . I'm so glad you|summoned me. Please take this lamp, and make your|wish!"); +~chatnpc("Ah, so you are there . I'm so glad you|summoned me. Please take this lamp, and make your|wish!"); [ai_timer,macro_event_genie] if (~macro_event_lost_and_follow = true) { diff --git a/data/src/scripts/macro events/scripts/general/macro_event_mysterious_old_man.rs2 b/data/src/scripts/macro events/scripts/general/macro_event_mysterious_old_man.rs2 index 5d43ae721..a7ff2aa2e 100644 --- a/data/src/scripts/macro events/scripts/general/macro_event_mysterious_old_man.rs2 +++ b/data/src/scripts/macro events/scripts/general/macro_event_mysterious_old_man.rs2 @@ -22,18 +22,18 @@ npc_delay(2); [opnpc1,macro_event_mysterious_old_man_general] if (uid ! %npc_attacking_uid) { // https://youtu.be/U_TRFGTfIY0?t=276 - ~chatnpc(neutral, "Sorry, but I'm trying to talk to . However he appears to be ignoring me..."); + ~chatnpc("Sorry, but I'm trying to talk to . However he appears to be ignoring me..."); return; } if (%macro_event = ^no_macro_event | %macro_event_uid ! npc_uid) { - ~chatnpc(neutral, "Goodbye."); + ~chatnpc("Goodbye."); return; } %macro_event = ^no_macro_event; inv_add(inv, ~macro_event_mysterious_old_man_general_reward); // dialogue taken from osrs. Neutral is a guess. npc_queue(6, 0, 2); // say goodbye to player -~chatnpc(neutral, "Ah, so you are there. I hoped you would talk to me, I get so lonely. Here, have a present! I must be going now though."); +~chatnpc("Ah, so you are there. I hoped you would talk to me, I get so lonely. Here, have a present! I must be going now though."); // delays are taken from this video: https://youtu.be/JeQUY1m1wRo?list=PLn23LiLYLb1bQ7Hwp77KoNBjKvpZQTfJT&t=137 [proc,macro_event_mysterious_old_man_general_reward]()(namedobj, int) diff --git a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_spectator.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_spectator.rs2 index a2660c1f3..20435b9ab 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_spectator.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_spectator.rs2 @@ -6,54 +6,54 @@ [opnpc1,jeed] @duel_arena_spectator_dialogue; [label,duel_arena_spectator_dialogue] -~chatplayer(neutral, "Hi!"); +~chatplayer("Hi!"); def_int $random = random(13); switch_int ($random) { case 0: - ~chatnpc(happy, "Ooh. This is exciting!"); - ~chatplayer(happy, "Yup!"); + ~chatnpc("Ooh. This is exciting!"); + ~chatplayer("Yup!"); case 1: - ~chatnpc(neutral, "I wouldn't want to be the poor guy that has to clean up after the duels."); - ~chatplayer(neutral, "Me neither."); + ~chatnpc("I wouldn't want to be the poor guy that has to clean up after the duels."); + ~chatplayer("Me neither."); case 2: //https://youtu.be/jUEwHgmSVsw?list=PLn23LiLYLb1Zo7wVV7wY2Zj1VV4zz6LBK - ~chatnpc(neutral, "My son just won his first duel!"); - ~chatplayer(neutral, "Congratulations!"); - ~chatnpc(neutral, "He ripped his opponent in half!"); - ~chatplayer(neutral, "That's gotta hurt!"); - ~chatnpc(neutral, "He's only 10 as well!"); - ~chatplayer(neutral, "You gotta start 'em young!"); + ~chatnpc("My son just won his first duel!"); + ~chatplayer("Congratulations!"); + ~chatnpc("He ripped his opponent in half!"); + ~chatplayer("That's gotta hurt!"); + ~chatnpc("He's only 10 as well!"); + ~chatplayer("You gotta start 'em young!"); case 3: - ~chatnpc(neutral, "Hmph."); + ~chatnpc("Hmph."); case 4: - ~chatnpc(happy, "My favourite fighter is Mubariz!"); - ~chatplayer(neutral, "The guy at the information kiosk?"); - ~chatnpc(happy, "Yeah! He rocks!"); - ~chatplayer(neutral, "Takes all sorts, I guess."); + ~chatnpc("My favourite fighter is Mubariz!"); + ~chatplayer("The guy at the information kiosk?"); + ~chatnpc("Yeah! He rocks!"); + ~chatplayer("Takes all sorts, I guess."); case 5: - ~chatnpc(happy, "Hi! I'm here to watch the duels!"); - ~chatplayer(happy, "Me too!"); + ~chatnpc("Hi! I'm here to watch the duels!"); + ~chatplayer("Me too!"); case 6: - ~chatnpc(happy, "Did you know they think this place dates back to the second age?!"); - ~chatplayer(neutral, "Really?"); - ~chatnpc(happy, "Yeah. The guy at the information kiosk was telling me."); + ~chatnpc("Did you know they think this place dates back to the second age?!"); + ~chatplayer("Really?"); + ~chatnpc("Yeah. The guy at the information kiosk was telling me."); case 7: - ~chatnpc(angry, "Can't you see I'm watching the duels?"); - ~chatplayer(neutral, "I'm sorry!"); + ~chatnpc("Can't you see I'm watching the duels?"); + ~chatplayer("I'm sorry!"); case 8: - ~chatnpc(happy, "Well. This beats doing the shopping!"); + ~chatnpc("Well. This beats doing the shopping!"); case 9: - ~chatnpc(happy, "Hi!"); + ~chatnpc("Hi!"); case 10: - ~chatnpc(happy, "Knock knock!"); - ~chatplayer(neutral, "Who's there?"); - ~chatnpc(happy, "Boo."); - ~chatplayer(neutral, "Boo who?"); - ~chatnpc(happy, "Don't cry, it's just me!"); + ~chatnpc("Knock knock!"); + ~chatplayer("Who's there?"); + ~chatnpc("Boo."); + ~chatplayer("Boo who?"); + ~chatnpc("Don't cry, it's just me!"); case 11: - ~chatnpc(happy, "Why did the skeleton burp?"); - ~chatplayer(neutral, "I don't know?"); - ~chatnpc(happy, "'Cause it didn't have the guts to fart!"); + ~chatnpc("Why did the skeleton burp?"); + ~chatplayer("I don't know?"); + ~chatnpc("'Cause it didn't have the guts to fart!"); case default: - ~chatnpc(laugh, "Waaaaassssssuuuuupp?!."); + ~chatnpc("Waaaaassssssuuuuupp?!."); } \ No newline at end of file diff --git a/data/src/scripts/minigames/game_duelarena/scripts/fadli.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/fadli.rs2 index b1882dc2f..004286358 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/fadli.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/fadli.rs2 @@ -1,33 +1,33 @@ [opnpc1,fadli] -~chatplayer(default, "Hi."); -~chatnpc(default, "What?"); +~chatplayer("Hi."); +~chatnpc("What?"); def_int $option = ~p_choice4("What do you do?", 1, "What is this place?", 2, "I'd like to access my bank, please.", 3, "Do you watch any matches?", 4); switch_int ($option) { case 1: - ~chatplayer(default, "What do you do?"); - ~chatnpc(default, "You can store your stuff here if you want. You can dump anything you don't want to carry whilst you're fighting duels and then pick it up again on the way out."); - ~chatnpc(default, "To be honest I'm wasted here."); - ~chatnpc(default, "I should be winning duels in the arena! I'm the best warrior in Al Kharid!"); - ~chatplayer(default, "Easy, tiger!"); + ~chatplayer("What do you do?"); + ~chatnpc("You can store your stuff here if you want. You can dump anything you don't want to carry whilst you're fighting duels and then pick it up again on the way out."); + ~chatnpc("To be honest I'm wasted here."); + ~chatnpc("I should be winning duels in the arena! I'm the best warrior in Al Kharid!"); + ~chatplayer("Easy, tiger!"); case 2: - ~chatplayer(default, "What is this place?"); - ~chatnpc(default, "Isn't it obvious?"); - ~chatnpc(default, "This is the Duel Arena...duh!"); + ~chatplayer("What is this place?"); + ~chatnpc("Isn't it obvious?"); + ~chatnpc("This is the Duel Arena...duh!"); case 3: - ~chatplayer(default, "I'd like to access my bank, please."); - ~chatnpc(default, "Sure."); + ~chatplayer("I'd like to access my bank, please."); + ~chatnpc("Sure."); @openbank; case 4: - ~chatplayer(default, "Do you watch any matches?"); - ~chatnpc(default, "When I can."); - ~chatnpc(default, "Most aren't any good so I throw rotten fruit at them!"); - ~chatplayer(default, "Heh. Can I buy some?"); - ~chatnpc(default, "Sure."); + ~chatplayer("Do you watch any matches?"); + ~chatnpc("When I can."); + ~chatnpc("Most aren't any good so I throw rotten fruit at them!"); + ~chatplayer("Heh. Can I buy some?"); + ~chatnpc("Sure."); ~require_members_store_owner; // complete guess, this could be earlier in the dialogue ~openshop_activenpc; } diff --git a/data/src/scripts/minigames/game_duelarena/scripts/hamid.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/hamid.rs2 index 4a4740e23..eee5f4f96 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/hamid.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/hamid.rs2 @@ -2,26 +2,26 @@ // TODO - Treasure Trails -~chatplayer(default, "Hi!"); -~chatnpc(default, "Hello traveller. How can I be of assistance?"); +~chatplayer("Hi!"); +~chatnpc("Hello traveller. How can I be of assistance?"); def_int $choice = ~p_choice3("Can you heal me?", 1, "What's a Monk doing in a place such as this?", 2, "Which monastery do you come from?", 3); switch_int ($choice) { case 1: - ~chatplayer(default, "Can you heal me?"); - ~chatnpc(default, "You'd be better off speaking to one of the nurses."); - ~chatnpc(default, "They are so... nice... afterall!"); // Typo consistent with OSRS. + ~chatplayer("Can you heal me?"); + ~chatnpc("You'd be better off speaking to one of the nurses."); + ~chatnpc("They are so... nice... afterall!"); // Typo consistent with OSRS. case 2: - ~chatplayer(default, "What's a Monk doing in a place such as this?"); - ~chatnpc(default, "Well don't tell anyone but I came here because of the nurses!"); - ~chatplayer(default, "Really?"); - ~chatnpc(default, "It beats being stuck in the monastery!"); + ~chatplayer("What's a Monk doing in a place such as this?"); + ~chatnpc("Well don't tell anyone but I came here because of the nurses!"); + ~chatplayer("Really?"); + ~chatnpc("It beats being stuck in the monastery!"); case 3: - ~chatplayer(default, "Which monastery do you come from?"); - ~chatnpc(default, "I belong to a monastery north of Falador."); - ~chatplayer(default, "You're a long way from home?"); - ~chatnpc(default, "Yeh. I miss the guys."); + ~chatplayer("Which monastery do you come from?"); + ~chatnpc("I belong to a monastery north of Falador."); + ~chatplayer("You're a long way from home?"); + ~chatnpc("Yeh. I miss the guys."); } diff --git a/data/src/scripts/minigames/game_duelarena/scripts/heal.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/heal.rs2 index 2d0beb661..9192bfbd4 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/heal.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/heal.rs2 @@ -1,17 +1,17 @@ [opnpc1,_healer] -~chatplayer(default, "Hi!"); -~chatnpc(default, "Hi. How can I help you?"); +~chatplayer("Hi!"); +~chatnpc("Hi. How can I help you?"); def_int $choice = ~p_choice3("Can you heal me?", 0, "Do you see a lot of injured fighters?", 1, "Do you come here often?", 2); switch_int ($choice) { case 0: - ~chatplayer(default, "Can you heal me?"); + ~chatplayer("Can you heal me?"); if (stat(hitpoints) >= stat_base(hitpoints)) { - ~chatnpc(default, "You look healthy to me!"); + ~chatnpc("You look healthy to me!"); } else { - ~chatnpc(default, "Of course!"); + ~chatnpc("Of course!"); npc_anim(human_pickpocket, 0); p_delay(0); mes("You feel a little better."); @@ -20,15 +20,15 @@ switch_int ($choice) { } case 1: - ~chatplayer(default, "Do you see a lot of injured fighters?"); - ~chatnpc(default, "Yes I do. Thankfully we can cope with almost anything.|Jaraah really is a wonderful surgeon, his methods are a little unorthodox but he gets the job done."); - ~chatnpc(default, "I shouldn't tell you this but his nickname is 'The Butcher'."); - ~chatplayer(default, "That's reassuring."); + ~chatplayer("Do you see a lot of injured fighters?"); + ~chatnpc("Yes I do. Thankfully we can cope with almost anything.|Jaraah really is a wonderful surgeon, his methods are a little unorthodox but he gets the job done."); + ~chatnpc("I shouldn't tell you this but his nickname is 'The Butcher'."); + ~chatplayer("That's reassuring."); case 2: - ~chatplayer(default, "Do you come here often?"); - ~chatnpc(default, "I work here, so yes!"); - ~chatnpc(default, "You're silly!"); + ~chatplayer("Do you come here often?"); + ~chatnpc("I work here, so yes!"); + ~chatnpc("You're silly!"); } [opnpc3,_healer] @@ -36,7 +36,7 @@ switch_int ($choice) { [label,heal_duelarena] if (stat(hitpoints) >= stat_base(hitpoints)) { - ~chatnpc(default, "You look healthy to me!"); + ~chatnpc("You look healthy to me!"); } else { npc_anim(human_pickpocket, 0); p_delay(0); diff --git a/data/src/scripts/minigames/game_duelarena/scripts/jaraah.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/jaraah.rs2 index 24ad0d97d..8690bee6b 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/jaraah.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/jaraah.rs2 @@ -1,17 +1,17 @@ [opnpc1,jaraah] -~chatplayer(default, "Hi!"); -~chatnpc(default, "What? Can't you see I'm busy?!"); +~chatplayer("Hi!"); +~chatnpc("What? Can't you see I'm busy?!"); def_int $choice = ~p_choice3("Can you heal me?", 0, "You must see some gruesome things?", 1, "Why do they call you 'The Butcher'?", 2); switch_int ($choice) { case 0: - ~chatplayer(default, "Can you heal me?"); + ~chatplayer("Can you heal me?"); if (stat(hitpoints) >= stat_base(hitpoints)) { - ~chatnpc(default, "You look healthy to me!"); + ~chatnpc("You look healthy to me!"); } else { - ~chatnpc(default, "Okay, this will hurt you more than it will me."); + ~chatnpc("Okay, this will hurt you more than it will me."); npc_anim(human_pickpocket, 0); p_delay(0); mes("You feel a little better."); @@ -20,15 +20,15 @@ switch_int ($choice) { } case 1: - ~chatplayer(default, "You must see some gruesome things?"); - ~chatnpc(default, "It's a gruesome business and with the tools they give me it gets more gruesome before it gets better!"); + ~chatplayer("You must see some gruesome things?"); + ~chatnpc("It's a gruesome business and with the tools they give me it gets more gruesome before it gets better!"); case 2: - ~chatplayer(default, "Why do they call you 'The Butcher'?"); - ~chatnpc(default, "'The Butcher'?'"); - ~chatnpc(default, "Ha!"); - ~chatnpc(default, "Would you like me to demonstrate?"); - ~chatplayer(default, "Er...I'll give it a miss, thanks."); + ~chatplayer("Why do they call you 'The Butcher'?"); + ~chatnpc("'The Butcher'?'"); + ~chatnpc("Ha!"); + ~chatnpc("Would you like me to demonstrate?"); + ~chatplayer("Er...I'll give it a miss, thanks."); } [opnpc3,jaraah] diff --git a/data/src/scripts/minigames/game_duelarena/scripts/mubariz.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/mubariz.rs2 index 40ef957be..6f147bfba 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/mubariz.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/mubariz.rs2 @@ -3,38 +3,38 @@ // RS3 dialogue: https://runescape.wiki/w/Transcript:Mubariz?oldid=27948630 // To try and take as many updates into account, any older reference/image/video would be fantastic. [opnpc1,mubariz] -~chatplayer(default, "Hi!"); -~chatnpc(default, "Welcome to the Duel Arena!"); -~chatplayer(default, "Thanks! I need some information."); -~chatnpc(default, "What would you like to know?"); +~chatplayer("Hi!"); +~chatnpc("Welcome to the Duel Arena!"); +~chatplayer("Thanks! I need some information."); +~chatnpc("What would you like to know?"); def_int $choice = ~p_choice4("What is this place?", 0, "How do I challenge someone to a duel?", 1, "What kind of options are there?", 2, "This place looks really old, where did it come from?", 3); switch_int ($choice) { case 0: - ~chatplayer(default, "What is this place?"); - ~chatnpc(default, "The Duel Arena has six duel arenas where you can fight other players in a controlled environment. We have our own dedicated hospital where we guarantee to put you back together, even if you lose."); - ~chatnpc(default, "Inbetween the arenas are walkways where you can watch the fights and challenge other players."); - ~chatplayer(default, "Sounds great. Thanks!"); - ~chatnpc(default, "See you in the arenas!"); + ~chatplayer("What is this place?"); + ~chatnpc("The Duel Arena has six duel arenas where you can fight other players in a controlled environment. We have our own dedicated hospital where we guarantee to put you back together, even if you lose."); + ~chatnpc("Inbetween the arenas are walkways where you can watch the fights and challenge other players."); + ~chatplayer("Sounds great. Thanks!"); + ~chatnpc("See you in the arenas!"); case 1: - ~chatplayer(default, "How do I challenge someone to a duel?"); - ~chatnpc(default, "When you go to the arena you'll go up an access ramp to the walkways that overlook the duel arenas.|From the walkway you can watch the duels and challenge other players."); - ~chatnpc(default, "You'll know you're in the right place as you'll have a 'Challenge' option when you right-click a player."); + ~chatplayer("How do I challenge someone to a duel?"); + ~chatnpc("When you go to the arena you'll go up an access ramp to the walkways that overlook the duel arenas.|From the walkway you can watch the duels and challenge other players."); + ~chatnpc("You'll know you're in the right place as you'll have a 'Challenge' option when you right-click a player."); case 2: - ~chatplayer(default, "What kind of options are there?"); - ~chatnpc(default, "You and your opponent can offer items as a stake. If you win, you recieve what your opponent staked, but, if you lose, your oppenent will get whatever items you staked."); - ~chatnpc(default, "You can choose to use rules to spice things up a bit. For instance if you both agree to use the 'No Magic' rule then neither player can use magic to attack the other player. The fight will be restricted to ranging and"); - ~chatnpc(default, "melee only."); - ~chatnpc(default, "The rules are fairly self-evident with lots of different combinations for you to try out!"); - ~chatplayer(default, "Cool! Thanks!"); + ~chatplayer("What kind of options are there?"); + ~chatnpc("You and your opponent can offer items as a stake. If you win, you recieve what your opponent staked, but, if you lose, your oppenent will get whatever items you staked."); + ~chatnpc("You can choose to use rules to spice things up a bit. For instance if you both agree to use the 'No Magic' rule then neither player can use magic to attack the other player. The fight will be restricted to ranging and"); + ~chatnpc("melee only."); + ~chatnpc("The rules are fairly self-evident with lots of different combinations for you to try out!"); + ~chatplayer("Cool! Thanks!"); case 3: - ~chatplayer(default, "This place looks really old, where did it come from?"); - ~chatnpc(default, "The archaeologists that are excavating the area east of Varrock have been working on this site as well. From these cliffs they uncovered this huge building. The experts think it may date back to the second age!"); - ~chatnpc(default, "Now that the archaeologists have moved out, a group of warriors, headed by myself, have bought the land and converted it to a set of duel arenas. The best fighters around the world come here to fight!"); - ~chatplayer(default, "I challenge you!"); - ~chatnpc(default, "Ho! Ho! Ho!"); + ~chatplayer("This place looks really old, where did it come from?"); + ~chatnpc("The archaeologists that are excavating the area east of Varrock have been working on this site as well. From these cliffs they uncovered this huge building. The experts think it may date back to the second age!"); + ~chatnpc("Now that the archaeologists have moved out, a group of warriors, headed by myself, have bought the land and converted it to a set of duel arenas. The best fighters around the world come here to fight!"); + ~chatplayer("I challenge you!"); + ~chatnpc("Ho! Ho! Ho!"); } \ No newline at end of file diff --git a/data/src/scripts/minigames/game_duelarena/scripts/zahwa.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/zahwa.rs2 index f42f9c9c1..25faab68a 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/zahwa.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/zahwa.rs2 @@ -4,43 +4,43 @@ def_int $random = random(8); switch_int ($random) { case 0: - ~chatplayer(happy, "Hi!"); - ~chatnpc(default, "Hi!"); + ~chatplayer("Hi!"); + ~chatnpc("Hi!"); case 1: - ~chatplayer(happy, "Hi!"); - ~chatnpc(sad, "Ughhhh...."); + ~chatplayer("Hi!"); + ~chatnpc("Ughhhh...."); case 2: - ~chatplayer(default, "Hi!"); - ~chatnpc(default, "I could've 'ad 'im!"); - ~chatplayer(default, "Er..."); - ~chatnpc(default, "I was robbed!"); - ~chatplayer(default, "Right."); - ~chatnpc(default, "It was rigged I tell you!"); - ~chatplayer(default, "Uh huh."); - ~chatnpc(default, "Leave me alone!"); + ~chatplayer("Hi!"); + ~chatnpc("I could've 'ad 'im!"); + ~chatplayer("Er..."); + ~chatnpc("I was robbed!"); + ~chatplayer("Right."); + ~chatnpc("It was rigged I tell you!"); + ~chatplayer("Uh huh."); + ~chatnpc("Leave me alone!"); case 3: - ~chatplayer(default, "Are you alright?"); - ~chatnpc(default, "NURSE!"); + ~chatplayer("Are you alright?"); + ~chatnpc("NURSE!"); case 4: - ~chatplayer(default, "Are you alright?"); - ~chatnpc(default, "Do I look alright?!"); + ~chatplayer("Are you alright?"); + ~chatnpc("Do I look alright?!"); case 5: - ~chatplayer(default, "Are you alright?"); - ~chatnpc(default, "Yeh. The nurses here are...wonderful!"); + ~chatplayer("Are you alright?"); + ~chatnpc("Yeh. The nurses here are...wonderful!"); case 6: - ~chatplayer(default, "Are you alright?"); - ~chatnpc(default, "It's just a flesh wound!"); + ~chatplayer("Are you alright?"); + ~chatnpc("It's just a flesh wound!"); case 7: - ~chatplayer(confused, "Are you alright?"); - ~chatnpc(sad, "Can't....go....on!"); - ~chatnpc(sad, "Leave me behind!"); - ~chatplayer(confused, "I'll leave you here, OK?"); - ~chatnpc(sad, "Oh. OK."); + ~chatplayer("Are you alright?"); + ~chatnpc("Can't....go....on!"); + ~chatnpc("Leave me behind!"); + ~chatplayer("I'll leave you here, OK?"); + ~chatnpc("Oh. OK."); } \ No newline at end of file diff --git a/data/src/scripts/minigames/game_partyroom/scripts/party_pete.rs2 b/data/src/scripts/minigames/game_partyroom/scripts/party_pete.rs2 index dee4cf1d7..3500938fd 100644 --- a/data/src/scripts/minigames/game_partyroom/scripts/party_pete.rs2 +++ b/data/src/scripts/minigames/game_partyroom/scripts/party_pete.rs2 @@ -1,32 +1,32 @@ [opnpc1,party_pete] // dialogue from OSRS, but I think it's mostly unchanged (besides the new option which I didn't include) // since it references the gold chest (falador one is white) and Kandarin (which is where seers is, not falador) -~chatnpc(happy, "Hi! I'm Party Pete.|Welcome to the Party Room!"); +~chatnpc("Hi! I'm Party Pete.|Welcome to the Party Room!"); switch_int(~p_choice4("So what's this room for?", 1, "What's the big lever over there for?", 2, "What's the gold chest for?", 3, "I wanna party!", 4)) { case 1: - ~chatplayer(confused, "So what's this room for?"); - ~chatnpc(laugh, "This room is for partying the night away!"); - ~chatplayer(laugh, "How do you have a party in RuneScape?"); - ~chatnpc(happy, "Get a few mates round, get the beers in and have fun!"); - ~chatnpc(neutral, "Some players organise parties so keep an eye open!"); - ~chatplayer(happy, "Woop! Thanks Pete!"); + ~chatplayer("So what's this room for?"); + ~chatnpc("This room is for partying the night away!"); + ~chatplayer("How do you have a party in RuneScape?"); + ~chatnpc("Get a few mates round, get the beers in and have fun!"); + ~chatnpc("Some players organise parties so keep an eye open!"); + ~chatplayer("Woop! Thanks Pete!"); case 2: - ~chatplayer(confused, "What's the big lever over there for?"); - ~chatnpc(happy, "Simple. With the lever you can do some fun stuff."); - ~chatplayer(confused, "What kind of stuff?"); - ~chatnpc(happy, "A balloon drop costs 5000 gold. For this you get 200 balloons dropped across the whole of the party room. You can then have fun popping the balloons! If there are items in the Party Drop Chest they will be inside"); - ~chatnpc(happy, "the balloons! For 2000 gold you can summon the Party Room Knights who will dance for your delight."); - ~chatnpc(laugh, "Their singing isn't a delight though!"); + ~chatplayer("What's the big lever over there for?"); + ~chatnpc("Simple. With the lever you can do some fun stuff."); + ~chatplayer("What kind of stuff?"); + ~chatnpc("A balloon drop costs 5000 gold. For this you get 200 balloons dropped across the whole of the party room. You can then have fun popping the balloons! If there are items in the Party Drop Chest they will be inside"); + ~chatnpc("the balloons! For 2000 gold you can summon the Party Room Knights who will dance for your delight."); + ~chatnpc("Their singing isn't a delight though!"); case 3: - ~chatplayer(confused, "What's the gold chest for?"); - ~chatnpc(neutral, "Any items that are in the chest will be dropped inside the balloons when you pull the lever!"); - ~chatplayer(happy, "Cool! Sounds like a fun way to do a drop party!"); - ~chatnpc(laugh, "Exactly!"); - ~chatnpc(neutral, "A word of warning though. Any items that you put into the chest can't be taken out again and it costs 5000 gold pieces for each balloon drop."); + ~chatplayer("What's the gold chest for?"); + ~chatnpc("Any items that are in the chest will be dropped inside the balloons when you pull the lever!"); + ~chatplayer("Cool! Sounds like a fun way to do a drop party!"); + ~chatnpc("Exactly!"); + ~chatnpc("A word of warning though. Any items that you put into the chest can't be taken out again and it costs 5000 gold pieces for each balloon drop."); case 4: - ~chatplayer(happy, "I wanna party!"); - ~chatnpc(happy, "I've won the Dance Trophy at the Kandarin Ball three years in a trot!"); - ~chatplayer(laugh, "Show me your moves Pete!"); + ~chatplayer("I wanna party!"); + ~chatnpc("I've won the Dance Trophy at the Kandarin Ball three years in a trot!"); + ~chatplayer("Show me your moves Pete!"); if_close; npc_anim(seq_784, 0); } diff --git a/data/src/scripts/minigames/game_partyroom/scripts/partyroom_lucy.rs2 b/data/src/scripts/minigames/game_partyroom/scripts/partyroom_lucy.rs2 index f567cc89d..60609af6e 100644 --- a/data/src/scripts/minigames/game_partyroom/scripts/partyroom_lucy.rs2 +++ b/data/src/scripts/minigames/game_partyroom/scripts/partyroom_lucy.rs2 @@ -3,11 +3,11 @@ if (npc_range(coord) > 2) { p_aprange(2); return; } -~chatnpc(happy, "Hi! I'm Lucy. Welcome to the Party Room!"); -~chatplayer(happy, "One beer please Lucy!"); -~chatnpc(happy, "Coming right up ! That's two gold please."); +~chatnpc("Hi! I'm Lucy. Welcome to the Party Room!"); +~chatplayer("One beer please Lucy!"); +~chatnpc("Coming right up ! That's two gold please."); if(inv_total(inv, coins) < 2) { - ~chatplayer(sad, "I'm sorry but I don't have enough money!"); + ~chatplayer("I'm sorry but I don't have enough money!"); return; } inv_del(inv, coins, 2); diff --git a/data/src/scripts/minigames/game_partyroom/scripts/partyroom_megan.rs2 b/data/src/scripts/minigames/game_partyroom/scripts/partyroom_megan.rs2 index 451403741..d72b42b1d 100644 --- a/data/src/scripts/minigames/game_partyroom/scripts/partyroom_megan.rs2 +++ b/data/src/scripts/minigames/game_partyroom/scripts/partyroom_megan.rs2 @@ -1,25 +1,25 @@ [opnpc1,partyroom_megan] -~chatnpc(happy, "Hi! I'm Megan. Welcome to the Party Room!"); +~chatnpc("Hi! I'm Megan. Welcome to the Party Room!"); switch_int(~p_choice3("One beer please Megan!", 1, "Can you dance, Megan?", 2, "Do you have any news?", 3)) { case 1: - ~chatplayer(happy, "One beer please Megan!"); - ~chatnpc(happy, "Coming right up ! That's two gold please."); + ~chatplayer("One beer please Megan!"); + ~chatnpc("Coming right up ! That's two gold please."); if(inv_total(inv, coins) < 2) { - ~chatplayer(sad, "I'm sorry but I don't have enough money!"); + ~chatplayer("I'm sorry but I don't have enough money!"); return; } inv_del(inv, coins, 2); inv_add(inv, beer, 1); ~objboxb(beer, "Megan has given you a beer."); case 2: - ~chatplayer(confused, "Can you dance, Megan?"); - ~chatnpc(happy, "Can I dance?!"); - ~chatnpc(laugh, "CAN I dance?!!"); - ~chatplayer(happy, "Dance with me Megan!"); + ~chatplayer("Can you dance, Megan?"); + ~chatnpc("Can I dance?!"); + ~chatnpc("CAN I dance?!!"); + ~chatplayer("Dance with me Megan!"); anim(seq_784, 0); npc_anim(seq_784, 0); case 3: - ~chatplayer(neutral, "Do you have any news?"); - ~chatnpc(neutral, "Not at the moment. I've heard that the known world is expanding as new places are discovered."); - ~chatnpc(happy, "These are exciting times indeed!"); + ~chatplayer("Do you have any news?"); + ~chatnpc("Not at the moment. I've heard that the known world is expanding as new places are discovered."); + ~chatnpc("These are exciting times indeed!"); } \ No newline at end of file diff --git a/data/src/scripts/minigames/game_ranging/scripts/guard.rs2 b/data/src/scripts/minigames/game_ranging/scripts/guard.rs2 index 10b77d7e2..db8cf64fa 100644 --- a/data/src/scripts/minigames/game_ranging/scripts/guard.rs2 +++ b/data/src/scripts/minigames/game_ranging/scripts/guard.rs2 @@ -1,3 +1,3 @@ [opnpc1,npc_678] -~chatplayer(default, "Hello there."); -~chatnpc(default, "Greetings traveller. Enjoy your time at the Ranging Guild."); \ No newline at end of file +~chatplayer("Hello there."); +~chatnpc("Greetings traveller. Enjoy your time at the Ranging Guild."); \ No newline at end of file diff --git a/data/src/scripts/minigames/game_trail/scripts/trail_clue_read.rs2 b/data/src/scripts/minigames/game_trail/scripts/trail_clue_read.rs2 index cb6a4f727..ae594c8fa 100644 --- a/data/src/scripts/minigames/game_trail/scripts/trail_clue_read.rs2 +++ b/data/src/scripts/minigames/game_trail/scripts/trail_clue_read.rs2 @@ -3,7 +3,7 @@ if_openmainmodal($map); [proc,full_trail_readclue](string $string) -split_init($string, 340, 8, q8, null); +split_init($string, 340, 8, q8); def_int $pagetotal = split_pagecount; def_int $lines = split_linecount(0); diff --git a/data/src/scripts/npc/scripts/man.rs2 b/data/src/scripts/npc/scripts/man.rs2 index 4faa0c646..b8a656a58 100644 --- a/data/src/scripts/npc/scripts/man.rs2 +++ b/data/src/scripts/npc/scripts/man.rs2 @@ -1,56 +1,56 @@ [opnpc1,_citizen] -~chatplayer(happy, "Hello, how's it going?"); +~chatplayer("Hello, how's it going?"); switch_int(random(23)) { case 0: - ~chatnpc(neutral, "How can I help you?"); + ~chatnpc("How can I help you?"); def_int $option = ~p_choice3("Do you want to trade?", 1, "I'm in search of a quest.", 2, "I'm in search of enemies to kill.", 3); if ($option = 1) { - ~chatplayer(neutral, "Do you want to trade?"); - ~chatnpc(neutral, "No, I have nothing I wish to get rid of.|If you want to do some trading,|there are plenty of shops and market stalls around though."); + ~chatplayer("Do you want to trade?"); + ~chatnpc("No, I have nothing I wish to get rid of.|If you want to do some trading,|there are plenty of shops and market stalls around though."); } else if ($option = 2) { - ~chatplayer(happy, "I'm in search of a quest."); - ~chatnpc(neutral, "I'm sorry I can't help you there."); + ~chatplayer("I'm in search of a quest."); + ~chatnpc("I'm sorry I can't help you there."); } else if ($option = 3) { - ~chatplayer(neutral, "I'm in search of enemies to kill."); - ~chatnpc(neutral, "I've heard there are many fearsome|creatures that dwell under the ground..."); + ~chatplayer("I'm in search of enemies to kill."); + ~chatnpc("I've heard there are many fearsome|creatures that dwell under the ground..."); } - case 1: ~chatnpc(happy, "I'm very well thank you."); - case 2: ~chatnpc(angry, "No I don't have any spare change."); - case 3: ~chatnpc(neutral, "That is classified information."); - case 4: ~chatnpc(happy, "Not too bad thanks."); - case 5: ~chatnpc(neutral, "I think we need a new king.|The one we've got isn't very good."); - case 6: ~chatnpc(happy, "Hello there! Nice weather we've been having."); - case 7: ~chatnpc(angry, "Get out of my way, I'm in a hurry!"); - case 8: ~chatnpc(neutral, "I'm a little worried -|I've heard there's lots of people going about,|killing citizens at random."); - case 9: ~chatnpc(angry, "None of your business."); - case 10: ~chatnpc(angry, "No, I don't want to buy anything!"); - case 11: ~chatnpc(happy, "Hello."); - case 12: ~chatnpc(neutral, "I'm busy right now."); - case 13: ~chatnpc(happy, "Yo, wassup!"); - case 14:~chatnpc(confused, "Do I know you? I'm in a hurry!"); + case 1: ~chatnpc("I'm very well thank you."); + case 2: ~chatnpc("No I don't have any spare change."); + case 3: ~chatnpc("That is classified information."); + case 4: ~chatnpc("Not too bad thanks."); + case 5: ~chatnpc("I think we need a new king.|The one we've got isn't very good."); + case 6: ~chatnpc("Hello there! Nice weather we've been having."); + case 7: ~chatnpc("Get out of my way, I'm in a hurry!"); + case 8: ~chatnpc("I'm a little worried -|I've heard there's lots of people going about,|killing citizens at random."); + case 9: ~chatnpc("None of your business."); + case 10: ~chatnpc("No, I don't want to buy anything!"); + case 11: ~chatnpc("Hello."); + case 12: ~chatnpc("I'm busy right now."); + case 13: ~chatnpc("Yo, wassup!"); + case 14:~chatnpc("Do I know you? I'm in a hurry!"); case 15: - ~chatnpc(happy, "I'm fine, how are you?"); - ~chatplayer(happy, "Very well thank you."); + ~chatnpc("I'm fine, how are you?"); + ~chatplayer("Very well thank you."); case 16: - ~chatnpc(confused, "Who are you?"); - ~chatplayer(happy, "I'm a bold adventurer."); - ~chatnpc(happy, "Ah, a very noble profession."); + ~chatnpc("Who are you?"); + ~chatplayer("I'm a bold adventurer."); + ~chatnpc("Ah, a very noble profession."); case 17: - ~chatnpc(angry, "Are you asking for a fight?"); + ~chatnpc("Are you asking for a fight?"); ~npc_retaliate(0); case 18: - ~chatnpc(neutral, "Not too bad, but I'm a little worried|about the increase of goblins these days."); - ~chatplayer(happy, "Don't worry, I'll kill them."); + ~chatnpc("Not too bad, but I'm a little worried|about the increase of goblins these days."); + ~chatplayer("Don't worry, I'll kill them."); case 19: inv_add(inv, flier, 1); - ~chatnpc(happy, "Have this flier..."); + ~chatnpc("Have this flier..."); case 20: - ~chatplayer(happy, "I'm in search of a quest."); - ~chatnpc(neutral, "I'm sorry I can't help you there."); + ~chatplayer("I'm in search of a quest."); + ~chatnpc("I'm sorry I can't help you there."); case 21: - ~chatplayer(neutral, "I'm in search of enemies to kill."); - ~chatnpc(neutral, "I've heard there are many fearsome|creatures that dwell under the ground..."); + ~chatplayer("I'm in search of enemies to kill."); + ~chatnpc("I've heard there are many fearsome|creatures that dwell under the ground..."); case 22: - ~chatplayer(neutral, "Do you want to trade?"); - ~chatnpc(neutral, "No, I have nothing I wish to get rid of.|If you want to do some trading,|there are plenty of shops and market stalls around though."); + ~chatplayer("Do you want to trade?"); + ~chatnpc("No, I have nothing I wish to get rid of.|If you want to do some trading,|there are plenty of shops and market stalls around though."); } diff --git a/data/src/scripts/npc/scripts/pirate.rs2 b/data/src/scripts/npc/scripts/pirate.rs2 index 4e28fd2e3..a248f7cad 100644 --- a/data/src/scripts/npc/scripts/pirate.rs2 +++ b/data/src/scripts/npc/scripts/pirate.rs2 @@ -1,68 +1,68 @@ [opnpc1,_pirate] -~chatplayer(neutral, "Hello!"); +~chatplayer("Hello!"); def_int $rand = random(29); if($rand = 0) { - ~chatnpc(neutral, "Batton down the hatches there's a storm brewin!"); + ~chatnpc("Batton down the hatches there's a storm brewin!"); } else if ($rand = 1) { - ~chatnpc(neutral, "Great blackbeard's beard!"); + ~chatnpc("Great blackbeard's beard!"); } else if ($rand = 2) { - ~chatnpc(neutral, "All hands on deck!"); + ~chatnpc("All hands on deck!"); } else if ($rand = 3) { - ~chatnpc(neutral, "I think ye'll be talking a long walk off a short plank!"); + ~chatnpc("I think ye'll be talking a long walk off a short plank!"); } else if ($rand = 4) { - ~chatnpc(neutral, "Arrrh ye lily livered landlubber!"); + ~chatnpc("Arrrh ye lily livered landlubber!"); } else if ($rand = 5) { - ~chatnpc(neutral, "I'm the scourge of the six seas!"); - ~chatplayer(neutral, "Don't you mean the seven seas?"); - ~chatnpc(neutral, "I'm the scourge of the seven seas!"); + ~chatnpc("I'm the scourge of the six seas!"); + ~chatplayer("Don't you mean the seven seas?"); + ~chatnpc("I'm the scourge of the seven seas!"); } else if ($rand = 6) { - ~chatnpc(neutral, "Yo ho ho and a bottle of alcopop!"); + ~chatnpc("Yo ho ho and a bottle of alcopop!"); } else if ($rand = 7) { - ~chatnpc(neutral, "Arrh be off with ye!"); + ~chatnpc("Arrh be off with ye!"); } else if ($rand = 8) { - ~chatnpc(neutral, "Shiver me timbers!"); + ~chatnpc("Shiver me timbers!"); } else if ($rand = 9) { - ~chatnpc(neutral, "Man overboard!"); + ~chatnpc("Man overboard!"); } else if ($rand = 10) { - ~chatnpc(neutral, "Arrh!"); + ~chatnpc("Arrh!"); } else if ($rand = 11) { - ~chatnpc(neutral, "Yo ho ho me hearties!"); + ~chatnpc("Yo ho ho me hearties!"); } else if ($rand = 12) { - ~chatnpc(neutral, "A pox on ye!"); + ~chatnpc("A pox on ye!"); } else if ($rand = 13) { - ~chatnpc(neutral, "Oooh arrh!"); - ~chatnpc(quiz, "No wait. That's a farmer."); + ~chatnpc("Oooh arrh!"); + ~chatnpc("No wait. That's a farmer."); } else if ($rand = 14) { - ~chatnpc(neutral, "I'm the scourge of the seven seas!"); + ~chatnpc("I'm the scourge of the seven seas!"); } else if ($rand = 15) { - ~chatnpc(neutral, "Arrh arrh!"); + ~chatnpc("Arrh arrh!"); } else if ($rand = 16) { - ~chatnpc(neutral, "Yo ho ho and a bottle of rum!"); + ~chatnpc("Yo ho ho and a bottle of rum!"); } else if ($rand = 17) { - ~chatnpc(neutral, "Splice the mainbrace!"); + ~chatnpc("Splice the mainbrace!"); } else if ($rand = 18) { - ~chatnpc(neutral, "Arrh I'll keel haul ye!"); + ~chatnpc("Arrh I'll keel haul ye!"); } else if ($rand = 19) { - ~chatnpc(neutral, "Ahoy there!"); + ~chatnpc("Ahoy there!"); } else if ($rand = 20) { - ~chatnpc(neutral, "Avast behind!"); - ~chatplayer(angry, "I'm not that fat!"); + ~chatnpc("Avast behind!"); + ~chatplayer("I'm not that fat!"); } else if ($rand = 21) { - ~chatnpc(neutral, "Arrh ye scurvy sea dog!"); + ~chatnpc("Arrh ye scurvy sea dog!"); } else if ($rand = 22) { - ~chatnpc(neutral, "Pieces of eight! pieces of eight!"); - ~chatnpc(neutral, "Pieces of eight! pieces of eight!"); + ~chatnpc("Pieces of eight! pieces of eight!"); + ~chatnpc("Pieces of eight! pieces of eight!"); } else if ($rand = 23) { - ~chatnpc(neutral, "Keel haul them I say!"); + ~chatnpc("Keel haul them I say!"); } else if ($rand = 24) { - ~chatnpc(neutral, "Good day to you my dear sir!"); + ~chatnpc("Good day to you my dear sir!"); } else if ($rand = 25) { - ~chatnpc(neutral, "Arrh! I be in search of buried treasure!"); + ~chatnpc("Arrh! I be in search of buried treasure!"); } else if ($rand = 26) { - ~chatnpc(neutral, "You'll be joining Davey Jone sin his locker!"); + ~chatnpc("You'll be joining Davey Jone sin his locker!"); } else if ($rand = 27) { - ~chatnpc(neutral, "3 days at port for resupply then out on the high sea!"); + ~chatnpc("3 days at port for resupply then out on the high sea!"); } else if ($rand = 28) { - ~chatnpc(neutral, "Avast me hearties!"); + ~chatnpc("Avast me hearties!"); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arthur/scripts/beggar.rs2 b/data/src/scripts/quests/quest_arthur/scripts/beggar.rs2 index 28ea20331..e0bc3a3cc 100644 --- a/data/src/scripts/quests/quest_arthur/scripts/beggar.rs2 +++ b/data/src/scripts/quests/quest_arthur/scripts/beggar.rs2 @@ -1,51 +1,51 @@ [opnpc1,beggar] if(testbit(%excalibur_components_progress, ^excalibur_spoken_beggar) = true) { - ~chatnpc(quiz, "Have you got any bread for me yet?"); + ~chatnpc("Have you got any bread for me yet?"); switch_int (~p_choice2("Yes, here you go.", 1, "No, I still have none.", 2)) { case 1: - ~chatplayer(neutral, "Yes, here you go."); + ~chatplayer("Yes, here you go."); if(inv_total(inv, bread) = 0) { - ~chatplayer(neutral, "Actually, I'm wrong. I still don't have any bread. Sorry."); + ~chatplayer("Actually, I'm wrong. I still don't have any bread. Sorry."); return; } @give_beggar_bread; - case 2: ~chatplayer(neutral, "Sorry, no, I still have none."); + case 2: ~chatplayer("Sorry, no, I still have none."); } } else { ~mesbox("The beggar isn't interested in talking."); } [label,beggar_dialogue] -~chatnpc(sad, "Please kind ... my family and I are starving..."); -~chatnpc(sad, "Could you find it in your heart to spare me a simple loaf of bread?"); +~chatnpc("Please kind ... my family and I are starving..."); +~chatnpc("Could you find it in your heart to spare me a simple loaf of bread?"); switch_int (~p_choice2("Yes certainly.", 1, "No I don't have any bread with me.", 2)) { case 1: - ~chatplayer(neutral, "Yes, certainly."); + ~chatplayer("Yes, certainly."); if(inv_total(inv, bread) = 0) { - ~chatplayer(sad, "... except I don't have any bread on me at the moment..."); + ~chatplayer("... except I don't have any bread on me at the moment..."); @ignore_beggar; return; } @give_beggar_bread; case 2: - ~chatplayer(neutral, "No, I don't have any bread with me."); + ~chatplayer("No, I don't have any bread with me."); @ignore_beggar; } [label,give_beggar_bread] ~mesbox("You give bread to the beggar."); inv_del(inv, bread, 1); -~chatnpc(happy, "Thank you very much!"); +~chatnpc("Thank you very much!"); npc_changetype(lady_of_the_lake); // re add if beggar doesn't exist ~mesbox("The beggar has turned into the Lady of the Lake!"); -~chatnpc(neutral, "Well done. You have passed my test."); -~chatnpc(neutral, "Here is Excalibur, guard it well."); +~chatnpc("Well done. You have passed my test."); +~chatnpc("Here is Excalibur, guard it well."); %excalibur_components_progress = setbit(%excalibur_components_progress, ^excalibur_rewarded); inv_add(inv, excalibur, 1); npc_del; [label,ignore_beggar] -~chatnpc(neutral, "Well, if you get some, you know where to come."); +~chatnpc("Well, if you get some, you know where to come."); if_close; %excalibur_components_progress = setbit(%excalibur_components_progress, ^excalibur_spoken_beggar); ~open_and_close_door(loc_1535, ~check_axis(coord, loc_coord, loc_angle), false); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 b/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 index 20bbf0383..6d289e193 100644 --- a/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 +++ b/data/src/scripts/quests/quest_arthur/scripts/quest_arthur.rs2 @@ -80,8 +80,8 @@ p_teleport(%arhein_crate_coord); [oploc1,loc_69] if (npc_find(coord, arhein, 12, 0) = true) { - ~chatnpc(angry, "Hey buddy! Get away from my ship alright?"); - ~chatplayer(sad, "Yeah... uh... sorry..."); + ~chatnpc("Hey buddy! Get away from my ship alright?"); + ~chatplayer("Yeah... uh... sorry..."); } [oploc1,_keep_lefaye_door] @@ -107,25 +107,25 @@ sound_synth(door_open, 0, 0); [oploc2,_keep_lefaye_door] if(~check_axis(coord, loc_coord, loc_angle) = false) { - ~chatplayer(confused, "Uh... I don't think anyone outside will answer me if I knock on the door..."); + ~chatplayer("Uh... I don't think anyone outside will answer me if I knock on the door..."); return; } ~mesbox("You knock at the door. You hear a voice from inside..."); -~chatnpc_specific(nc_name(renegade_knight), renegade_knight, angry, "Yes? What do you want?"); -~chatplayer(confused, "Um...."); +~chatnpc_specific(nc_name(renegade_knight), renegade_knight, "Yes? What do you want?"); +~chatplayer("Um...."); switch_int(~p_choice4("Pizza Delivery!", 1, "Have you ever thought about letting Saradomin into your life?", 2, "Can I interest you in some double glazing?", 3, "Would you like to buy some lucky heather?", 4)) { case 1: - ~chatplayer(happy, "Pizza delivery!"); - ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, angry, "We didn't order any Pizza. Get lost!"); + ~chatplayer("Pizza delivery!"); + ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, "We didn't order any Pizza. Get lost!"); case 2: - ~chatplayer(happy, "Have you ever considered letting the glory of Saradomin into your life? I have some pamphlets you may be interested in reading and discussing with me."); - ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, angry, "No. Go away."); + ~chatplayer("Have you ever considered letting the glory of Saradomin into your life? I have some pamphlets you may be interested in reading and discussing with me."); + ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, "No. Go away."); case 3: - ~chatplayer(happy, "Can I interest you in some double glazing? An old castle like this must get very draughty in the winter..."); - ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, angry, "No. Get out of here before I run you through."); + ~chatplayer("Can I interest you in some double glazing? An old castle like this must get very draughty in the winter..."); + ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, "No. Get out of here before I run you through."); case 4: - ~chatplayer(happy, "Would you like to buy some lucky heather?"); - ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, angry, "No. Go away."); + ~chatplayer("Would you like to buy some lucky heather?"); + ~chatnpc_specific(nc_name(renegade_knight), renegade_knight, "No. Go away."); } ~mesbox("It looks like you'll have to find another way in..."); @@ -159,7 +159,7 @@ if(inzone(movecoord(^camelot_magic_symbol, -1, 0, -1), movecoord(^camelot_magic_ npc_add(^camelot_magic_symbol, thrantax_the_mighty, 100); spotanim_map(small_smokepuff, npc_coord, 124, 0); ~mesbox("Suddenly a mighty spirit appears!"); - ~chatplayer(shock, "Now what were those magic words again?"); + ~chatplayer("Now what were those magic words again?"); def_int $rand = random(3); def_int $choice; switch_int($rand) { @@ -169,32 +169,32 @@ if(inzone(movecoord(^camelot_magic_symbol, -1, 0, -1), movecoord(^camelot_magic_ } switch_int($choice) { case 1: - ~chatplayer(quiz, "Snarthtrick..."); - ~chatplayer(quiz, "Candato..."); - ~chatplayer(quiz, "Termon!"); + ~chatplayer("Snarthtrick..."); + ~chatplayer("Candato..."); + ~chatplayer("Termon!"); // respawn if removed - ~chatnpc(angry, "GRAAAAAARGH!"); + ~chatnpc("GRAAAAAARGH!"); inv_del(inv, lit_black_candle, 1); ~npc_retaliate(0); case 2: - ~chatplayer(quiz, "Snarthon..."); - ~chatplayer(quiz, "Candtrick..."); - ~chatplayer(quiz, "Termanto!"); + ~chatplayer("Snarthon..."); + ~chatplayer("Candtrick..."); + ~chatplayer("Termanto!"); // respawn if removed - ~chatnpc(angry, "GRAAAAAARGH!"); - ~chatnpc(angry, "Thou hast me in thine control.|So that I mayst return from whence I came,|I must grant thee a boon.|What dost thou wish of me?"); - ~chatplayer(shock, "I wish to free Merlin from his giant crystal!"); - ~chatnpc(angry, "GRAAAAAARGH!"); + ~chatnpc("GRAAAAAARGH!"); + ~chatnpc("Thou hast me in thine control.|So that I mayst return from whence I came,|I must grant thee a boon.|What dost thou wish of me?"); + ~chatplayer("I wish to free Merlin from his giant crystal!"); + ~chatnpc("GRAAAAAARGH!"); // can't make black candles after this point, not sure about the chaos altar varp but we'll clear that as well %excalibur_components_progress = clearbit_range(%excalibur_components_progress, ^chaosaltar_index, ^blackcandle_index); %arthur_progress = ^arthur_excalibur_bound; - ~chatnpc(angry, "The deed is done. Thou mayst now shatter Merlin's crystal with Excalibur, and I can once more rest. Begone! And leave me once more in peace."); + ~chatnpc("The deed is done. Thou mayst now shatter Merlin's crystal with Excalibur, and I can once more rest. Begone! And leave me once more in peace."); npc_del; case 3: - ~chatplayer(quiz, "Snarthanto..."); - ~chatplayer(quiz, "Candon..."); - ~chatplayer(quiz, "Termtrick!"); - ~chatnpc(angry, "GRAAAAAARGH!"); + ~chatplayer("Snarthanto..."); + ~chatplayer("Candon..."); + ~chatplayer("Termtrick!"); + ~chatnpc("GRAAAAAARGH!"); inv_del(inv, lit_black_candle, 1); ~npc_retaliate(0); } @@ -230,9 +230,9 @@ if(testbit(%excalibur_components_progress, ^excalibur_rewarded) = false & testbi if(npc_find(coord, lady_of_the_lake, 4, 0) = false) { npc_add(movecoord(coord, -1, 0, 3), lady_of_the_lake, 100); } - ~chatplayer(neutral, "Hello. I am here for Excalibur. Can I have it yet?"); - ~chatnpc(neutral, "I don't think you are worthy enough."); - ~chatnpc(neutral, "Come back when you are a better person."); + ~chatplayer("Hello. I am here for Excalibur. Can I have it yet?"); + ~chatnpc("I don't think you are worthy enough."); + ~chatnpc("Come back when you are a better person."); } [oplocu,loc_62] @@ -259,9 +259,9 @@ switch_obj(last_useitem) { %excalibur_components_progress = 0; %arthur_progress = ^arthur_freed_merlin; sound_synth(mine_quick, 0, 0); - ~chatnpc(happy, "Thank you! Thank you! Thank you!"); - ~chatnpc(shock, "It's not fun being trapped in a giant crystal!"); - ~chatnpc(happy, "Go speak to King Arthur, I'm sure he'll reward you!"); + ~chatnpc("Thank you! Thank you! Thank you!"); + ~chatnpc("It's not fun being trapped in a giant crystal!"); + ~chatnpc("Go speak to King Arthur, I'm sure he'll reward you!"); ~mesbox("You have set Merlin free. Now talk to King Arthur."); npc_del; case default: diff --git a/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 b/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 index f242977e8..9cb1d6ae3 100644 --- a/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 +++ b/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 @@ -1,7 +1,7 @@ [opnpc1,sir_mordred] // https://web.archive.org/web/20050521020137im_/http://www.runeweb.net/fireball/Merlin%20Crystal%20Images/merlin10.PNG -~chatnpc(angry, "You DARE to invade MY stronghold?!?!"); -~chatnpc(angry, "Have at thee knave!!!"); +~chatnpc("You DARE to invade MY stronghold?!?!"); +~chatnpc("Have at thee knave!!!"); ~npc_retaliate(0); [opnpc2,sir_mordred] @@ -29,24 +29,24 @@ if(npc_find(coord, morgan_le_faye, 6, 0) = false) { npc_add(^morgan_spawn_coord, morgan_le_faye, 50); spotanim_map(small_smokepuff, npc_coord, 124, 0); } -~chatnpc(sad, "STOP! Please... spare my son."); +~chatnpc("STOP! Please... spare my son."); switch_int(~p_choice3("Tell me how to untrap Merlin and I might.", 1, "No. He deserves to die.", 2, "Ok then.", 3)) { case 1: - ~chatplayer(sad, "Tell me how to untrap Merlin and I might."); - ~chatnpc(neutral, "You have guessed correctly that I'm responsible for that."); - ~chatnpc(neutral, "I suppose I can live with that fool Merlin being loose for the sake of my son."); - ~chatnpc(neutral, "Setting him free won't be easy though."); - ~chatnpc(neutral, "You will need to find a magic symbol as close to the crystal as you can find."); - ~chatnpc(neutral, "You will then need to drop some bats' bones on the magic symbol while holding a lit black candle."); - ~chatnpc(neutral, "This will summon a mighty spirit named Thrantax."); - ~chatnpc(neutral, "You will need to bind him with magic words."); - ~chatnpc(neutral, "Then you will need the sword Excalibur with which the spell was bound in order to shatter the crystal."); + ~chatplayer("Tell me how to untrap Merlin and I might."); + ~chatnpc("You have guessed correctly that I'm responsible for that."); + ~chatnpc("I suppose I can live with that fool Merlin being loose for the sake of my son."); + ~chatnpc("Setting him free won't be easy though."); + ~chatnpc("You will need to find a magic symbol as close to the crystal as you can find."); + ~chatnpc("You will then need to drop some bats' bones on the magic symbol while holding a lit black candle."); + ~chatnpc("This will summon a mighty spirit named Thrantax."); + ~chatnpc("You will need to bind him with magic words."); + ~chatnpc("Then you will need the sword Excalibur with which the spell was bound in order to shatter the crystal."); if(%arthur_progress = ^arthur_spoken_lancelot) { %arthur_progress = ^arthur_spoken_morgan_lefaye; } @multi3("So where can I find Excalibur?", lefaye_excalibur, "OK I will go do all that.", lefaye_ok, "What are the magic words?", lefaye_magic_words); case 2: - ~chatplayer(sad, "No. He deserves to die."); + ~chatplayer("No. He deserves to die."); if_close; if(npc_find(coord, sir_mordred, 6, 0) = true) { mes("You kill Mordred."); @@ -58,25 +58,25 @@ switch_int(~p_choice3("Tell me how to untrap Merlin and I might.", 1, "No. He de npc_del; } case 3: - ~chatplayer(neutral, "OK then."); + ~chatplayer("OK then."); spotanim_map(small_smokepuff, npc_coord, 124, 0); npc_del; ~mesbox("Morgan Le Faye vanishes."); } [label,lefaye_excalibur] -~chatplayer(neutral, "So where can I find Excalibur?"); -~chatnpc(neutral, "The lady of the lake has it.|I don't know if she'll give it to you though,|she can be rather temperamental."); +~chatplayer("So where can I find Excalibur?"); +~chatnpc("The lady of the lake has it.|I don't know if she'll give it to you though,|she can be rather temperamental."); @multi2("What are the magic words?", lefaye_magic_words, "OK I will go do all that.", lefaye_ok); [label,lefaye_magic_words] -~chatplayer(neutral, "What are the magic words?"); -~chatnpc(neutral, "You will find the magic words at the base of one of the chaos altars."); -~chatnpc(neutral, "Which chaos altar I cannot remember."); +~chatplayer("What are the magic words?"); +~chatnpc("You will find the magic words at the base of one of the chaos altars."); +~chatnpc("Which chaos altar I cannot remember."); @multi2("So where can I find Excalibur?", lefaye_excalibur, "OK I will go do all that.", lefaye_ok); [label,lefaye_ok] -~chatplayer(neutral, "Ok, I will go do all that."); +~chatplayer("Ok, I will go do all that."); spotanim_map(small_smokepuff, npc_coord, 124, 0); npc_del; ~mesbox("Morgan Le Faye vanishes."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 b/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 index 2fb686dbf..5aeeeabe9 100644 --- a/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 +++ b/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 @@ -23,7 +23,7 @@ if(last_useitem = ball_doorkey | $leaving = true) { [label,open_witch_house_door](boolean $leaving) if($leaving ! true & (%ball_progress < ^ball_started | %ball_progress = ^ball_complete)) { - ~chatplayer(neutral, "It would be rude to break into this house."); + ~chatplayer("It would be rude to break into this house."); return; } // angles on these doors don't visually match osrs, but they actually do have the same loc_angle @@ -120,7 +120,7 @@ if(last_useitem = magnet) { [oploc1,loc_2862] if(%ball_progress < ^ball_unlocked_mousedoor) { ~mesbox("This door is locked."); - ~chatplayer(confused, "Strange... I can't see any kind of lock or handle to open this door..."); + ~chatplayer("Strange... I can't see any kind of lock or handle to open this door..."); return; } ~open_and_close_door2(loc_1535, ~check_axis(coord, loc_coord, loc_angle), false); @@ -146,7 +146,7 @@ if(last_useitem = ball_shedkey) { %ball_shed_uid = null; } if(%ball_shed_uid ! null) { - ~chatplayer(neutral, "I'd better not go in there yet... I think I can hear someone inside!"); + ~chatplayer("I'd better not go in there yet... I think I can hear someone inside!"); return; } %ball_shed_uid = uid; diff --git a/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 b/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 index ed3fcbc61..aa8830ed7 100644 --- a/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 +++ b/data/src/scripts/quests/quest_blackarmgang/scripts/quest_blackarmgang.rs2 @@ -7,7 +7,7 @@ if(inv_total(inv, arrav_book) > 0) { mes("You already own 'The Shield of Arrav', the book that was kept here."); return; } -~chatplayer(happy, "Aha! 'The Shield of Arrav'!|Exactly what I was looking for."); +~chatplayer("Aha! 'The Shield of Arrav'!|Exactly what I was looking for."); ~mesbox("You take the book from the bookcase."); inv_add(inv, arrav_book, 1); diff --git a/data/src/scripts/quests/quest_blackknight/scripts/fortress_guard.rs2 b/data/src/scripts/quests/quest_blackknight/scripts/fortress_guard.rs2 index a2106e032..d7c2197fc 100644 --- a/data/src/scripts/quests/quest_blackknight/scripts/fortress_guard.rs2 +++ b/data/src/scripts/quests/quest_blackknight/scripts/fortress_guard.rs2 @@ -1,7 +1,7 @@ [opnpc1,fortress_guard] if ((inv_getobj(worn, ^wearpos_hat) ! bronze_med_helm) | (inv_getobj(worn, ^wearpos_torso) ! iron_chainbody)) { - ~chatnpc(angry, "Get lost. This is private property."); + ~chatnpc("Get lost. This is private property."); } else { - ~chatnpc(angry, "Hey! Get back on duty!"); - ~chatplayer(confused, "Uh..."); + ~chatnpc("Hey! Get back on duty!"); + ~chatplayer("Uh..."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_blackknight/scripts/quest_blackknight.rs2 b/data/src/scripts/quests/quest_blackknight/scripts/quest_blackknight.rs2 index 418a6ba1d..8b936ec46 100644 --- a/data/src/scripts/quests/quest_blackknight/scripts/quest_blackknight.rs2 +++ b/data/src/scripts/quests/quest_blackknight/scripts/quest_blackknight.rs2 @@ -36,27 +36,27 @@ while (npc_findnext = true) { } [label,blackknight_entrance_fortress_guard] -~chatnpc(angry, "Hey, you can't come in here!|This is a high security military installation."); +~chatnpc("Hey, you can't come in here!|This is a high security military installation."); def_int $option = ~p_choice3("Yes, but I work here!", 1, "Oh sorry.", 2, "So who does it belong to?", 3); if ($option = 1) { - ~chatplayer(angry, "Yes, but I work here!"); - ~chatnpc(angry, "Well this the guards entrance. I might be new here but I can tell you're not a guard.|You're not even wearing proper guards uniform!"); + ~chatplayer("Yes, but I work here!"); + ~chatnpc("Well this the guards entrance. I might be new here but I can tell you're not a guard.|You're not even wearing proper guards uniform!"); def_int $beg_or_more_info = ~p_choice2("Pleaassee let me in!", 1, "So what is this uniform?", 2); if ($beg_or_more_info = 1) { - ~chatplayer(sad, "Pleaassee let me in!"); - ~chatnpc(angry, "Go away, you're getting annoying."); + ~chatplayer("Pleaassee let me in!"); + ~chatnpc("Go away, you're getting annoying."); } else if ($beg_or_more_info = 2) { - ~chatplayer(neutral, "So what is this uniform?"); - ~chatnpc(confused, "Well you can see me wearing it.|It's iron chain mail and a medium bronze helmet."); + ~chatplayer("So what is this uniform?"); + ~chatnpc("Well you can see me wearing it.|It's iron chain mail and a medium bronze helmet."); } } else if ($option = 2) { - ~chatplayer(neutral, "Oh sorry."); - ~chatnpc(angry, "Don't let it happen again."); + ~chatplayer("Oh sorry."); + ~chatnpc("Don't let it happen again."); // TODO: Set all black knights in the banquet hall to attack player and yell "Die intruder!" } else if ($option = 3) { - ~chatplayer(neutral, "So who does it belong to?"); - ~chatnpc(angry, "This fortress belongs to the order of Black Knights known as the Kinshra."); + ~chatplayer("So who does it belong to?"); + ~chatnpc("This fortress belongs to the order of Black Knights known as the Kinshra."); } [oploc1,blackknight_banquet_hall_door] @@ -82,12 +82,12 @@ if ($is_inside = false) { } [label,blackknight_banquet_hall_fortress_guard](boolean $is_inside) -~chatnpc(neutral, "I wouldn't go in there if I woz you.|Those Black Knights are in an important meeting;|They said they'd kill anyone who went in there!"); +~chatnpc("I wouldn't go in there if I woz you.|Those Black Knights are in an important meeting;|They said they'd kill anyone who went in there!"); def_int $option = ~p_choice2("Ok I won't.", 1, "I don't care. I'm going in anyway.", 2); if ($option = 1) { - ~chatplayer(neutral, "Ok I won't."); + ~chatplayer("Ok I won't."); } else { - ~chatplayer(neutral, "I don't care. I'm going in anyway."); + ~chatplayer("I don't care. I'm going in anyway."); ~open_and_close_door(loc_param(next_loc_stage), $is_inside, false); // TODO: Set all black knights in the banquet hall to attack player and yell "Die intruder!" def_boolean $has_spoken = false; @@ -118,10 +118,10 @@ if (%blackknight_progress = 2) { p_delay(2); mes("You hear the witch groan in dismay."); p_delay(2); - ~chatplayer(quiz, "Right I think that's successfully sabotaged the secret weapon."); + ~chatplayer("Right I think that's successfully sabotaged the secret weapon."); ~update_blackknight_progress; } else { - ~chatplayer(confused, "Why would I want to do that?"); + ~chatplayer("Why would I want to do that?"); } [label,black_knights_fortress_incorrect_cabbage] @@ -133,21 +133,21 @@ if (%blackknight_progress = 2) { mes("Not helping her."); p_delay(2); } else { - ~chatplayer(confused, "Why would I want to do that?"); + ~chatplayer("Why would I want to do that?"); } // Listening at grate [oploc1,blackknight_grate] if (%blackknight_progress = 1) { - ~chatnpc_specific("Black Knight", black_knight_knight, quiz, "So, how's the secret weapon coming along?"); - ~chatnpc_specific("Witch", black_knight_witch, happy, "The invincibility potion is almost ready..."); - ~chatnpc_specific("Witch", black_knight_witch, happy, "It's taken me five years but it's almost ready."); - ~chatnpc_specific("Witch", black_knight_witch, neutral, "Greldo the Goblin here|is just going to fetch the last ingredient for me."); - ~chatnpc_specific("Witch", black_knight_witch, neutral, "It's a specially grown cabbage.|Grown by my cousin Helda who lives in Draynor Manor."); - ~chatnpc_specific("Witch", black_knight_witch, neutral, "The soil there is slightly magical.|And it gives the cabbages slight magic properties."); - ~chatnpc_specific("Witch", black_knight_witch, shock, "Not to mention the trees!"); - ~chatnpc_specific("Witch", black_knight_witch, neutral, "Now remember Greldo only a Draynor Manor cabbage will do. Don't get lazy and bring any old cabbage.|That would entirely wreck the potion."); - ~chatnpc_specific("Greldo", greldo, "default", "Yes mithreth."); + ~chatnpc_specific("Black Knight", black_knight_knight, "So, how's the secret weapon coming along?"); + ~chatnpc_specific("Witch", black_knight_witch, "The invincibility potion is almost ready..."); + ~chatnpc_specific("Witch", black_knight_witch, "It's taken me five years but it's almost ready."); + ~chatnpc_specific("Witch", black_knight_witch, "Greldo the Goblin here|is just going to fetch the last ingredient for me."); + ~chatnpc_specific("Witch", black_knight_witch, "It's a specially grown cabbage.|Grown by my cousin Helda who lives in Draynor Manor."); + ~chatnpc_specific("Witch", black_knight_witch, "The soil there is slightly magical.|And it gives the cabbages slight magic properties."); + ~chatnpc_specific("Witch", black_knight_witch, "Not to mention the trees!"); + ~chatnpc_specific("Witch", black_knight_witch, "Now remember Greldo only a Draynor Manor cabbage will do. Don't get lazy and bring any old cabbage.|That would entirely wreck the potion."); + ~chatnpc_specific("Greldo", greldo, "Yes mithreth."); ~update_blackknight_progress; } else { mes("I can't hear much right now."); diff --git a/data/src/scripts/quests/quest_cog/scripts/quest_cog.rs2 b/data/src/scripts/quests/quest_cog/scripts/quest_cog.rs2 index b1b30314d..bdd7f9f8a 100644 --- a/data/src/scripts/quests/quest_cog/scripts/quest_cog.rs2 +++ b/data/src/scripts/quests/quest_cog/scripts/quest_cog.rs2 @@ -1,28 +1,28 @@ [label,cog_start_quest] -~chatplayer("default", "Hello monk."); -~chatnpc("default", "Hello adventurer. My name is Brother Kojo. Do you happen to know the time?"); -~chatplayer("default", "No, sorry, I don't"); -~chatnpc("default", "Exactly! This clock tower has recently broken down,|and without it nobody can tell the correct time. I must|fix it before the town people become too angry!"); -~chatnpc("default", "I don't suppose you could assist me in the repairs? I'll|pay you for your help."); +~chatplayer("Hello monk."); +~chatnpc("Hello adventurer. My name is Brother Kojo. Do you happen to know the time?"); +~chatplayer("No, sorry, I don't"); +~chatnpc("Exactly! This clock tower has recently broken down,|and without it nobody can tell the correct time. I must|fix it before the town people become too angry!"); +~chatnpc("I don't suppose you could assist me in the repairs? I'll|pay you for your help."); @cog_start_options; [label,cog_start_options] def_int $option = ~p_choice3("OK old monk, what can I do?", 1, "How much reward are we talking?", 2, "Not now old monk.", 3); if($option = 1) { - ~chatplayer("default", "OK old monk, what can I do?"); + ~chatplayer("OK old monk, what can I do?"); %cog_progress = 1; ~send_quest_progress(questlist:cog, %cog_progress, 15); - ~chatnpc("default", "Oh, thank you kind sir!|In the cellar below, you'll find four cogs.|They're too heavy for me, but you should be able to carry them one at a time."); - ~chatnpc("default", "I know one goes on each floor... but I can't exactly remember which goes where specifically. Oh well, I'm sure you can figure it out fairly easily."); - ~chatplayer("default", "Well, I'll do my best."); - ~chatnpc("default", "Thank you again! And remember to be careful, the cellar is full of strange beasts!"); + ~chatnpc("Oh, thank you kind sir!|In the cellar below, you'll find four cogs.|They're too heavy for me, but you should be able to carry them one at a time."); + ~chatnpc("I know one goes on each floor... but I can't exactly remember which goes where specifically. Oh well, I'm sure you can figure it out fairly easily."); + ~chatplayer("Well, I'll do my best."); + ~chatnpc("Thank you again! And remember to be careful, the cellar is full of strange beasts!"); } else if($option = 2) { - ~chatplayer("default", "So... how much reward are we talking then?"); - ~chatnpc("default", "Well, I'm only a monk so I'm not exactly rich, btu I assure you I will give you a fair reward for the tiem spent assisting me in repairing the clock."); + ~chatplayer("So... how much reward are we talking then?"); + ~chatnpc("Well, I'm only a monk so I'm not exactly rich, btu I assure you I will give you a fair reward for the tiem spent assisting me in repairing the clock."); @cog_start_options; } else if($option = 3) { - ~chatplayer("default", "Not now old monk."); - ~chatnpc("default", "OK then. Come back and let me know if you change your mind."); + ~chatplayer("Not now old monk."); + ~chatnpc("OK then. Come back and let me know if you change your mind."); } [opobj3,black_cog] diff --git a/data/src/scripts/quests/quest_cook/scripts/quest_cook.rs2 b/data/src/scripts/quests/quest_cook/scripts/quest_cook.rs2 index 9cd9ff6ef..3fedf49b5 100644 --- a/data/src/scripts/quests/quest_cook/scripts/quest_cook.rs2 +++ b/data/src/scripts/quests/quest_cook/scripts/quest_cook.rs2 @@ -4,79 +4,79 @@ def_int $option = ~p_choice4("What's wrong?", 1, "Well you could give me all you if($option = 1) { @cooks_assistant_whats_wrong; } else if($option = 2) { - ~chatplayer("neutral", "Well you could give me all your money!"); - ~chatnpc("sad", "Haha, very funny!"); + ~chatplayer("Well you could give me all your money!"); + ~chatnpc("Haha, very funny!"); } else if($option = 3) { - ~chatplayer("neutral", "You don't look very happy."); - ~chatnpc("sad", "No, I'm not."); + ~chatplayer("You don't look very happy."); + ~chatnpc("No, I'm not."); $option = ~p_choice2("What's wrong?", 1, "I'd take the rest of the day off if I were you.", 2); if($option = 1) { @cooks_assistant_whats_wrong; } else if($option = 2) { - ~chatplayer("neutral", "I'd take the rest of the day of if I were you."); - ~chatnpc("sad", "No, that's the worst thing I could do - I'd get in terrible trouble."); + ~chatplayer("I'd take the rest of the day of if I were you."); + ~chatnpc("No, that's the worst thing I could do - I'd get in terrible trouble."); @cooks_assistant_whats_wrong; } } else if ($option = 4) { - ~chatplayer("happy", "Nice hat!"); - ~chatnpc("sad", "Err thank you. It's a pretty ordinary cooks hat really."); + ~chatplayer("Nice hat!"); + ~chatnpc("Err thank you. It's a pretty ordinary cooks hat really."); } [label,cooks_assistant_whats_wrong] -~chatplayer("neutral", "What's wrong?"); -~chatnpc("worried", "Ooh dear, I'm in a terrible mess!|It's the Duke's birthday today,|I'm meant to be making him a big cake for this evening."); -~chatnpc("sad", "Unfortunately, I've forgotten to buy some of the ingredients. I'll never get them in time now. I don't suppose you could help me?"); +~chatplayer("What's wrong?"); +~chatnpc("Ooh dear, I'm in a terrible mess!|It's the Duke's birthday today,|I'm meant to be making him a big cake for this evening."); +~chatnpc("Unfortunately, I've forgotten to buy some of the ingredients. I'll never get them in time now. I don't suppose you could help me?"); def_int $option = ~p_choice2("Yes, I'll help you.", 1, "No, I don't feel like it. Maybe later.", 2); if($option = 1) { %cook_progress = 1; ~send_quest_progress(questlist:cook, %cook_progress, ^cook_complete); - ~chatplayer("happy","Yes, I'll help you."); - ~chatnpc("happy","Oh thank you, thank you.|I need milk, eggs and flour.|I'd be very grateful if you can get them to me."); + ~chatplayer("Yes, I'll help you."); + ~chatnpc("Oh thank you, thank you.|I need milk, eggs and flour.|I'd be very grateful if you can get them to me."); } else if($option = 2) { - ~chatplayer("neutral", "No, I don't feel like it. Maybe later."); - ~chatnpc("sad", "OK, suit yourself!"); + ~chatplayer("No, I don't feel like it. Maybe later."); + ~chatnpc("OK, suit yourself!"); } [label,cooks_assistant_inprogress] -~chatnpc("sad", "How are you getting on with finding the ingredients?"); +~chatnpc("How are you getting on with finding the ingredients?"); if(inv_total(inv, pot_of_flour) > 0 & inv_total(inv, egg) > 0 & inv_total(inv, bucket_milk) > 0) { @cooks_assistant_completion; } if(inv_total(inv, pot_of_flour) = 0 & inv_total(inv, egg) = 0 & inv_total(inv, bucket_milk) = 0) { - ~chatplayer("neutral", "I'm afraid I don't have any yet!"); - ~chatnpc("sad", "Oh dear, oh dear!|I need flour, eggs and milk.|Without them I am doomed!"); + ~chatplayer("I'm afraid I don't have any yet!"); + ~chatnpc("Oh dear, oh dear!|I need flour, eggs and milk.|Without them I am doomed!"); return; } else { - ~chatplayer("happy", "I have found some of the things you asked for."); + ~chatplayer("I have found some of the things you asked for."); if(inv_total(inv, bucket_milk) > 0) { - ~chatplayer("happy", "I have some milk."); + ~chatplayer("I have some milk."); } if(inv_total(inv, pot_of_flour) > 0) { - ~chatplayer("happy", "I have some flour."); + ~chatplayer("I have some flour."); } if(inv_total(inv, egg) > 0) { - ~chatplayer("happy", "I have an egg."); + ~chatplayer("I have an egg."); } } -~chatnpc("sad", "Great, but can you get the other ingredients as well?|You still need to find..."); +~chatnpc("Great, but can you get the other ingredients as well?|You still need to find..."); if(inv_total(inv, bucket_milk) = 0) { - ~chatnpc("happy", "Some milk."); + ~chatnpc("Some milk."); } if(inv_total(inv, pot_of_flour) = 0) { - ~chatnpc("happy", "Some flour."); + ~chatnpc("Some flour."); } if(inv_total(inv, egg) = 0) { - ~chatnpc("happy", "An egg."); + ~chatnpc("An egg."); } -~chatplayer(happy, "OK, I'll try and find that for you."); +~chatplayer("OK, I'll try and find that for you."); [label,cooks_assistant_completion] -~chatplayer("happy", "I now have everything you need for your cake!"); -~chatplayer("happy", "Milk, flour, and an egg!"); -~chatnpc("happy", "I am saved, thank you!"); +~chatplayer("I now have everything you need for your cake!"); +~chatplayer("Milk, flour, and an egg!"); +~chatnpc("I am saved, thank you!"); ~mesbox("You give some milk, an egg and some flour to the cook."); inv_del(inv, egg, 1); inv_del(inv, bucket_milk, 1); @@ -94,7 +94,7 @@ if (%cook_progress = 0) { npc_findallzone($cook_kitchen_centre); while(npc_findnext = true) { if(npc_type = cook) { - ~chatnpc("angry", "Hey, who said you could use that?"); + ~chatnpc("Hey, who said you could use that?"); return; } } diff --git a/data/src/scripts/quests/quest_demon/scripts/delrith.rs2 b/data/src/scripts/quests/quest_demon/scripts/delrith.rs2 index 4a4dedc20..423bd895f 100644 --- a/data/src/scripts/quests/quest_demon/scripts/delrith.rs2 +++ b/data/src/scripts/quests/quest_demon/scripts/delrith.rs2 @@ -55,20 +55,20 @@ while (npc_findnext = true) { p_stopaction; p_delay(1); -~chatplayer(neutral, "Now what was that incantation again?"); +~chatplayer("Now what was that incantation again?"); def_int $option = ~p_choice4("Carlem Gabindo Purchai Zaree Camerinthum", 1, "Purchai Zaree Gabindo Carlem Camerinthum", 2, "Purchai Camerinthum Aber Gabindo Carlem", 3, "Carlem Aber Camerinthum Purchai Gabindo", 4); if ($option = 1) { - ~chatplayer(happy, "Carlem Gabindo Purchai Zaree Camerinthum"); + ~chatplayer("Carlem Gabindo Purchai Zaree Camerinthum"); @demon_slayer_wrong_incantation; } else if ($option = 2) { - ~chatplayer(happy, "Purchai Zaree Gabindo Carlem Camerinthum"); + ~chatplayer("Purchai Zaree Gabindo Carlem Camerinthum"); @demon_slayer_wrong_incantation; } else if ($option = 3) { - ~chatplayer(happy, "Purchai Camerinthum Aber Gabindo Carlem"); + ~chatplayer("Purchai Camerinthum Aber Gabindo Carlem"); @demon_slayer_wrong_incantation; } else if ($option = 4) { - ~chatplayer(happy, "Carlem Aber Camerinthum Purchai Gabindo"); + ~chatplayer("Carlem Aber Camerinthum Purchai Gabindo"); @demon_slayer_correct_incantation; } diff --git a/data/src/scripts/quests/quest_doric/scripts/quest_doric.rs2 b/data/src/scripts/quests/quest_doric/scripts/quest_doric.rs2 index bb593943f..6924c2c94 100644 --- a/data/src/scripts/quests/quest_doric/scripts/quest_doric.rs2 +++ b/data/src/scripts/quests/quest_doric/scripts/quest_doric.rs2 @@ -54,55 +54,55 @@ if (%doric_progress = 0) { } [label,doric_not_started_anvil] -~chatnpc(angry, "Hey who said you could use that! My anvils get enough work with my own use. I make pickaxes, and it takes a lot of hard work."); +~chatnpc("Hey who said you could use that! My anvils get enough work with my own use. I make pickaxes, and it takes a lot of hard work."); def_int $option = ~p_choice2("Sorry, would it be OK if I used your anvils?", 1, "I didn't want to use your anvils anyway.", 2); if ($option = 1) { - ~chatplayer(quiz, "Sorry, would it be OK if I used your anvils?"); - ~chatnpc(neutral, "If you could get me some more materials then I could let you use them"); + ~chatplayer("Sorry, would it be OK if I used your anvils?"); + ~chatnpc("If you could get me some more materials then I could let you use them"); @start_quest_options; } else if ($option = 2) { - ~chatplayer(bored, "I didn't want to use your anvils anyway."); - ~chatnpc(confused, "That is your choice."); + ~chatplayer("I didn't want to use your anvils anyway."); + ~chatnpc("That is your choice."); } [label,doric_not_started] -~chatnpc(quiz, "Hello traveller, what brings you to my humble smithy?"); +~chatnpc("Hello traveller, what brings you to my humble smithy?"); def_int $option = ~p_choice4("I wanted to use your anvils.", 1, "Mind your own business, shortstuff!", 2, "I was just checking out the landscape.", 3, "What do you make here?", 4); if ($option = 1) { - ~chatplayer(neutral, "I wanted to use your anvils."); - ~chatnpc(happy, "My anvils get enough work with my own use. I make amulets, it takes a lot of work. If you could get me some more materials, I could let you use them."); + ~chatplayer("I wanted to use your anvils."); + ~chatnpc("My anvils get enough work with my own use. I make amulets, it takes a lot of work. If you could get me some more materials, I could let you use them."); @start_quest_options; } else if ($option = 2) { - ~chatplayer(angry, "Mind your own business, shortstuff!"); - ~chatnpc(confused, "How nice to meet someone with such pleasant manners. Do come again when you need to shout at someone smaller than you!"); + ~chatplayer("Mind your own business, shortstuff!"); + ~chatnpc("How nice to meet someone with such pleasant manners. Do come again when you need to shout at someone smaller than you!"); } else if ($option = 3) { - ~chatplayer(neutral, "I was just checking out the landscape."); - ~chatnpc(happy, "We have a fine town here, it suits us very well. Please enjoy your travels, and do visit my friends in their mine."); + ~chatplayer("I was just checking out the landscape."); + ~chatnpc("We have a fine town here, it suits us very well. Please enjoy your travels, and do visit my friends in their mine."); } else if ($option = 4) { - ~chatplayer(quiz, "What do you make here?"); - ~chatnpc(happy, "I make amulets. I am the best maker of them in Runescape!"); - ~chatplayer(neutral, "Do you have any to sell?"); - ~chatnpc(happy, "Not at the moment, sorry. Try again later."); + ~chatplayer("What do you make here?"); + ~chatnpc("I make amulets. I am the best maker of them in Runescape!"); + ~chatplayer("Do you have any to sell?"); + ~chatnpc("Not at the moment, sorry. Try again later."); } [label,start_quest_options] def_int $option = ~p_choice2("Yes, I will get you materials.", 1 , "No, hitting rocks is for the boring people, sorry.", 2); if ($option = 1) { - ~chatplayer(happy, "Yes, I will get you materials."); - ~chatnpc("default", "Well, clay is what I use more than anything. I make casts. Could you get me 6 clay, and 4 copper ore and 2 iron ore please? I could pay a little, and let you use my anvils."); - ~chatplayer(quiz, "Certainly, I will get them for you. Goodbye."); + ~chatplayer("Yes, I will get you materials."); + ~chatnpc("Well, clay is what I use more than anything. I make casts. Could you get me 6 clay, and 4 copper ore and 2 iron ore please? I could pay a little, and let you use my anvils."); + ~chatplayer("Certainly, I will get them for you. Goodbye."); ~update_doric_progress; } else if ($option = 2) { - ~chatplayer(bored, "No, hitting rocks is for the boring people, sorry."); - ~chatnpc(confused, "That is your choice. Nice to meet you anyway."); + ~chatplayer("No, hitting rocks is for the boring people, sorry."); + ~chatnpc("That is your choice. Nice to meet you anyway."); } [label,doric_materials] -~chatnpc(quiz, "Have you got my materials yet, traveller?"); +~chatnpc("Have you got my materials yet, traveller?"); if (inv_total(inv, clay) > 5 & inv_total(inv, copper_ore) > 3 & inv_total(inv, iron_ore) > 1) { - ~chatplayer(happy, "I have everything you need!"); - ~chatnpc(happy, "Many thanks, pass them here please."); + ~chatplayer("I have everything you need!"); + ~chatnpc("Many thanks, pass them here please."); // Remove ores here inv_del(inv, clay, 6); inv_del(inv, copper_ore, 4); @@ -112,21 +112,21 @@ if (inv_total(inv, clay) > 5 & inv_total(inv, copper_ore) > 3 & inv_total(inv, i // Talked With Tanner about being able to miss coins and it feels like a correct thing to do. queue(doric_quest_complete, 0); - ~chatnpc(quiz, "I can spare you some coins for your trouble."); + ~chatnpc("I can spare you some coins for your trouble."); // Add coins here inv_add(inv, coins, 180); mes("Doric hands you 180 coins"); - ~chatnpc(quiz, "Please use my anvils any time you want."); + ~chatnpc("Please use my anvils any time you want."); } else { - ~chatplayer(sad, "Sorry, I don't have them all yet."); - ~chatnpc(neutral, "Not to worry stick at it. Remember, I need 6 Clay, 4 Copper ore and 2 Iron ore."); + ~chatplayer("Sorry, I don't have them all yet."); + ~chatnpc("Not to worry stick at it. Remember, I need 6 Clay, 4 Copper ore and 2 Iron ore."); } [label,doric_post_complete] -~chatnpc(neutral, "Hello traveller, how is your Metalworking coming along?"); -~chatplayer(quiz, "No too bad, thanks Doric."); -~chatnpc(quiz, "Good, the love of metal is a thing close to my heart."); +~chatnpc("Hello traveller, how is your Metalworking coming along?"); +~chatplayer("No too bad, thanks Doric."); +~chatnpc("Good, the love of metal is a thing close to my heart."); // Reward Scroll [queue,doric_quest_complete] @@ -140,7 +140,7 @@ givexp(mining, 13000); // Treasure Trail [label,trail_doric] -~chatnpc("default", "So you've come to the right place?"); +~chatnpc("So you've come to the right place?"); ~trail_clue_progress; inv_del(inv, trail_clue_easy_simple_exp022, 1); if(~trail_clue_easy_complete = true) { diff --git a/data/src/scripts/quests/quest_dragon/scripts/dragonslayer_ned.rs2 b/data/src/scripts/quests/quest_dragon/scripts/dragonslayer_ned.rs2 index 71c0162a3..1cd6b432f 100644 --- a/data/src/scripts/quests/quest_dragon/scripts/dragonslayer_ned.rs2 +++ b/data/src/scripts/quests/quest_dragon/scripts/dragonslayer_ned.rs2 @@ -12,14 +12,14 @@ mes("Wall: ."); // just incase the player gets to crandor with this varp value // since ned is also on crandor if ((%dragon_progress = ^quest_dragon_ned_given_map | %dragon_progress = ^quest_dragon_sailed_to_crandor) & coordy(coord) = 3) { - ~chatnpc(quiz, "Ah! There you are! Ready to go?"); + ~chatnpc("Ah! There you are! Ready to go?"); def_int $choice = ~p_choice2("Yep lets go!", 1, "No I'm not quite ready yet...", 2); if ($choice = 2) { - ~chatplayer(neutral, "No I'm not quite ready yet..."); - ~chatnpc(neutral, "Well, you go do whatever you need to do. I'll wait here for you until you're ready."); + ~chatplayer("No I'm not quite ready yet..."); + ~chatnpc("Well, you go do whatever you need to do. I'll wait here for you until you're ready."); return; } - ~chatplayer(quiz, "Yep lets go!"); + ~chatplayer("Yep lets go!"); mes("You feel the ship begin to move..."); mes("The ship is sailing across the ocean..."); %boat_takeoff = ^sail_port_sarim_to_crandor; @@ -37,8 +37,8 @@ if ((%dragon_progress = ^quest_dragon_ned_given_map | %dragon_progress = ^quest_ if_settext(ship_journey:com_0, "You Journey on the ship...."); // reset text // https://youtu.be/ucaYfz3ihWs?list=PLn23LiLYLb1aqrojPTi1_Np81LJku2Nd0&t=28 ~mesbox("You hear a loud crack as the ship comes to a juddering halt."); - ~chatnpc(neutral,"Um... I think we're there. I probably should have paid closer attention."); - ~chatplayer(angry, "Gee.. you think?"); + ~chatnpc("Um... I think we're there. I probably should have paid closer attention."); + ~chatplayer("Gee.. you think?"); return; } else { // https://youtu.be/uETjjZFKWus?list=PLn23LiLYLb1aqrojPTi1_Np81LJku2Nd0&t=10 @@ -46,13 +46,13 @@ if ((%dragon_progress = ^quest_dragon_ned_given_map | %dragon_progress = ^quest_ def_int $choice = ~p_choice2("Is the ship ready to sail back?", 1, "So are you enjoying this exotic island vacation?", 2); // MISSING DIALOGUE: if ($choice = 1) { - ~chatplayer(quiz, "Is the ship ready to sail back?"); - ~chatnpc(sad, "I'm afraid not. It looks like we're stranded."); // complete guess + ~chatplayer("Is the ship ready to sail back?"); + ~chatnpc("I'm afraid not. It looks like we're stranded."); // complete guess return; } if ($choice = 2) { - ~chatplayer(quiz, "So are you enjoying this exotic island vacation?"); - ~chatnpc(sad, "Not really. I'm afraid we're stranded here."); // complete guess + ~chatplayer("So are you enjoying this exotic island vacation?"); + ~chatnpc("Not really. I'm afraid we're stranded here."); // complete guess return; } } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 b/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 index 185e2abed..e6ebd2b7f 100644 --- a/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 +++ b/data/src/scripts/quests/quest_dragon/scripts/lady_lumbridge.rs2 @@ -1,7 +1,7 @@ [oploc1,dragonslayer_gangplank_board] if (%dragon_progress < ^quest_dragon_bought_ship | %dragon_progress >= ^dragon_complete) { if (npc_find(coord, klarense, 5, 0) = true) { - ~chatnpc(neutral, "Hey, stay off my ship! That's private property!"); + ~chatnpc("Hey, stay off my ship! That's private property!"); } return; } diff --git a/data/src/scripts/quests/quest_dragon/scripts/wormbrain.rs2 b/data/src/scripts/quests/quest_dragon/scripts/wormbrain.rs2 index 087a6502f..8402abba1 100644 --- a/data/src/scripts/quests/quest_dragon/scripts/wormbrain.rs2 +++ b/data/src/scripts/quests/quest_dragon/scripts/wormbrain.rs2 @@ -26,19 +26,19 @@ if (~quest_dragon_getting_map_parts = false | inv_total(inv, crandor_map_part2) @multi3("I believe you've got a piece of map that I need.", wormbrain_map, "What are you in for?", wormbrain_in_for, "Sorry, thought this was a zoo.", wormbrain_zoo); [label,wormbrain_in_for] -~chatplayer(quiz, "What are you in for?"); -~chatnpc(confused, "Me not sure. Me pick some stuff up and take it away."); -~chatplayer(neutral, "Well, did the stuff belong to you?"); -~chatnpc(confused, "Umm...no."); -~chatplayer(neutral, "Well, that would be why then."); -~chatnpc(sad, "Oh, right."); +~chatplayer("What are you in for?"); +~chatnpc("Me not sure. Me pick some stuff up and take it away."); +~chatplayer("Well, did the stuff belong to you?"); +~chatnpc("Umm...no."); +~chatplayer("Well, that would be why then."); +~chatnpc("Oh, right."); [label,wormbrain_zoo] -~chatplayer(neutral, "Sorry, thought this was a zoo."); +~chatplayer("Sorry, thought this was a zoo."); [label,wormbrain_map] -~chatplayer(quiz, "I believe you've got a piece of map that I need."); -~chatnpc(quiz, "So? Why should I be giving it to you? What you do for Wormbrain?"); +~chatplayer("I believe you've got a piece of map that I need."); +~chatnpc("So? Why should I be giving it to you? What you do for Wormbrain?"); // "I'm not going to do anything for you. Forget it", // "I'll let you live. I could just kill you", // "I suppose I could pay you for the map piece ...", @@ -48,37 +48,37 @@ if (~quest_dragon_getting_map_parts = false | inv_total(inv, crandor_map_part2) [label,wormbrain_forget_it] -~chatplayer(neutral, "I'm not going to do anything for you. Forget it."); -~chatnpc(neutral, "Be dat way then."); +~chatplayer("I'm not going to do anything for you. Forget it."); +~chatnpc("Be dat way then."); [label,wormbrain_kill] -~chatplayer(angry, "I'll let you live. I could just kill you."); -~chatnpc(laugh, "Ha! Me in here and you out dere. You not get map|piece."); +~chatplayer("I'll let you live. I could just kill you."); +~chatnpc("Ha! Me in here and you out dere. You not get map|piece."); [label,wormbrain_pay] -~chatplayer(shifty, "I suppose I could pay you for the map piece. Say, 500 coins?"); // osrs -~chatnpc(laugh, "Me not stoopid, it worth at least 10,000 coins!"); +~chatplayer("I suppose I could pay you for the map piece. Say, 500 coins?"); // osrs +~chatnpc("Me not stoopid, it worth at least 10,000 coins!"); @multi2("You must be joking! Forget it.", wormbrain_forget_it, "Alright then, 10,000 it is.", wormbrain_accept_pay); [label,wormbrain_accept_pay] -~chatplayer(neutral, "Alright then, 10,000 coins it is."); +~chatplayer("Alright then, 10,000 coins it is."); if (inv_total(inv, coins) < 10000) { - ~chatplayer(sad, "Oops, I don't have enough on me."); - ~chatnpc(neutral, "Comes back when you has enough."); + ~chatplayer("Oops, I don't have enough on me."); + ~chatnpc("Comes back when you has enough."); return; } inv_del(inv, coins, 10000); inv_add(inv, crandor_map_part2, 1); ~mesbox("You buy the map piece from Wormbrain."); -~chatnpc(laugh, "Fank you very much! Now me can bribe da guards, hehehe."); +~chatnpc("Fank you very much! Now me can bribe da guards, hehehe."); [label,wormbrain_story] -~chatplayer(quiz, "Where did you get the map piece from?"); -~chatnpc(laugh, "We rob house of stupid wizard. She very old, not put|up much fight at all. Hahaha!"); -~chatplayer(angry, "Uh... Hahaha."); -~chatnpc(neutral, "Her house full of pictures of a city on island and old|pictures of people. Me not recognise island."); -~chatnpc(shifty, "Me find map piece. Me not know what it is, but it in|locked box so me figure it important."); -~chatnpc(sad, "But, by the time me get box open, other goblins gone.|Then me not run fast enough and guards catch me."); -~chatnpc(happy, "But now you want map piece so must be special! What|you do for me to get it?"); +~chatplayer("Where did you get the map piece from?"); +~chatnpc("We rob house of stupid wizard. She very old, not put|up much fight at all. Hahaha!"); +~chatplayer("Uh... Hahaha."); +~chatnpc("Her house full of pictures of a city on island and old|pictures of people. Me not recognise island."); +~chatnpc("Me find map piece. Me not know what it is, but it in|locked box so me figure it important."); +~chatnpc("But, by the time me get box open, other goblins gone.|Then me not run fast enough and guards catch me."); +~chatnpc("But now you want map piece so must be special! What|you do for me to get it?"); @multi3("I'm not going to do anything for you. Forget it.", wormbrain_forget_it, "I'll let you live. I could just kill you.", wormbrain_kill, "I suppose I could pay you for the map piece...", wormbrain_pay); diff --git a/data/src/scripts/quests/quest_druid/scripts/quest_druid.rs2 b/data/src/scripts/quests/quest_druid/scripts/quest_druid.rs2 index fe80cd5ea..4700ffcae 100644 --- a/data/src/scripts/quests/quest_druid/scripts/quest_druid.rs2 +++ b/data/src/scripts/quests/quest_druid/scripts/quest_druid.rs2 @@ -1,8 +1,8 @@ [label,druidic_ritual_start_1] -~chatplayer(neutral, "I'm in search of a quest."); -~chatnpc(neutral, "Hmm. I think I may have a worthwhile quest for you|actually. I don't know if you are familiar with the stone|circle south of Varrock or not, but..."); -~chatnpc("default", "That used to be OUR stone circle. Unfortunately,|many many years ago, dark wizards cast a wicked spell|upon it so that they could corrupt its power for their|own evil ends."); -~chatnpc("default", "When they cursed the rocks for their rituals they made|them uselss for us and our magics. We require a brave|adventurer to go on a quest for us to help purify the|circle of Varrock."); +~chatplayer("I'm in search of a quest."); +~chatnpc("Hmm. I think I may have a worthwhile quest for you|actually. I don't know if you are familiar with the stone|circle south of Varrock or not, but..."); +~chatnpc("That used to be OUR stone circle. Unfortunately,|many many years ago, dark wizards cast a wicked spell|upon it so that they could corrupt its power for their|own evil ends."); +~chatnpc("When they cursed the rocks for their rituals they made|them uselss for us and our magics. We require a brave|adventurer to go on a quest for us to help purify the|circle of Varrock."); def_int $option = ~p_choice3("Ok, I will try and help.", 1, "No, that doesn't sound very interesting.", 2, "So... is there anything in this for me?", 3); if($option = 1) { @@ -10,78 +10,77 @@ if($option = 1) { } else if($option = 2) { @druid_not_interested; } else if($option = 3) { - ~chatplayer("default", "So... is there anything in this for me?"); - ~chatnpc("default", "We druids value wisdom over wealth, so if you expect material gain, you will be disappointed."); - ~chatnpc("default", "We are, however, very skilled in the art of Herblore, which we will share with you if you can assist us with this task. You may find such wisdom a greater reward than mere money."); + ~chatplayer("So... is there anything in this for me?"); + ~chatnpc("We druids value wisdom over wealth, so if you expect material gain, you will be disappointed."); + ~chatnpc("We are, however, very skilled in the art of Herblore, which we will share with you if you can assist us with this task. You may find such wisdom a greater reward than mere money."); } [label,druidic_ritual_start_2] -~chatplayer(quiz, "What about the stone circle full of dark wizards?"); -~chatnpc("default", "That used to be OUR stone circle. Unfortunately,|many many years ago, dark wizards cast a wicked spell|upon it so that they could corrupt its power for their|own evil ends."); -~chatnpc("default", "When they cursed the rocks for their rituals they made|them uselss for us and our magics. We require a brave|adventurer to go on a quest for us to help purify the|circle of Varrock."); +~chatplayer("What about the stone circle full of dark wizards?"); +~chatnpc("That used to be OUR stone circle. Unfortunately,|many many years ago, dark wizards cast a wicked spell|upon it so that they could corrupt its power for their|own evil ends."); +~chatnpc("When they cursed the rocks for their rituals they made|them uselss for us and our magics. We require a brave|adventurer to go on a quest for us to help purify the|circle of Varrock."); @multi2("Ok, I will try and help.", druid_agree_to_help, "No, that doesn't sound very interesting.", druid_not_interested); [label,druid_agree_to_help] -~chatplayer(neutral, "Ok, I will try to help."); +~chatplayer("Ok, I will try to help."); %druid_progress = 1; -~chatnpc("default", "Excellent. Go to the village south of this place and speak|to my fellow druid, Sanfew, who is working on the|purification ritual. He knows what is required to|complete it."); -~chatplayer(neutral, "Will do."); +~chatnpc("Excellent. Go to the village south of this place and speak|to my fellow druid, Sanfew, who is working on the|purification ritual. He knows what is required to|complete it."); +~chatplayer("Will do."); ~send_quest_progress(questlist:druid, %druid_progress, ^druid_complete); [label,druid_not_interested] -~chatplayer(confused, "No, that doesn't sound very interesting."); -~chatnpc(neutral, "I will not try and change your mind adventurer. Some|day when you have matured you may reconsider your|position. We will wait until then"); +~chatplayer("No, that doesn't sound very interesting."); +~chatnpc("I will not try and change your mind adventurer. Some|day when you have matured you may reconsider your|position. We will wait until then"); [label,druid_sanfew_information] -~chatplayer(neutral, "I've been sent to assist you with the ritual to puriy the|Varrockian stone circle."); -~chatnpc("default", "Well, what I'm struggling with right now is the meats|needed for the potion to honor Guthix. I need the raw|meat of four different animals for it, but not just any|old meats will do."); -~chatnpc(neutral, "Each meat has to be dipped individually into the|Cauldron of thunder for it to work correctly."); +~chatplayer("I've been sent to assist you with the ritual to puriy the|Varrockian stone circle."); +~chatnpc("Well, what I'm struggling with right now is the meats|needed for the potion to honor Guthix. I need the raw|meat of four different animals for it, but not just any|old meats will do."); +~chatnpc("Each meat has to be dipped individually into the|Cauldron of thunder for it to work correctly."); @druid_sanfew_questions; [label,druid_sanfew_questions] def_int $option = ~p_choice2("Where can I find this cauldron?", 1, "Ok, I'll do that then.", 2); if($option = 1) { - ~chatplayer(quiz, "Where can I find this cauldron?"); - ~chatnpc("default", "It is located somewhere in the mysterious underground|halls which are located somewhere in the woods just|South of here. They are too dangerous for me to go|myself however."); + ~chatplayer("Where can I find this cauldron?"); + ~chatnpc("It is located somewhere in the mysterious underground|halls which are located somewhere in the woods just|South of here. They are too dangerous for me to go|myself however."); @druid_sanfew_questions; } else if($option = 2) { %druid_progress = 2; - ~chatplayer("default", "Ok, I'll do that then."); - ~chatnpc("default", "Well thank you very much!"); + ~chatplayer("Ok, I'll do that then."); + ~chatnpc("Well thank you very much!"); } [label,druid_sanfew_give_ingredients] -~chatnpc(quiz, "Did you bring me the required ingredients for the|potion?"); +~chatnpc("Did you bring me the required ingredients for the|potion?"); if(inv_total(inv, druid_enchanted_beef) > 0 & inv_total(inv, druid_enchanted_rat) > 0 & inv_total(inv, druid_enchanted_bear) > 0& inv_total(inv, druid_enchanted_chicken) > 0) { - ~chatplayer(happy, "Yes, I have all four now!"); - def_string $line = text_gender("Well hand'em over then lad!", "Well hand'em over then lass!"); - ~chatnpc(happy, $line); + ~chatplayer("Yes, I have all four now!"); + ~chatnpc(text_gender("Well hand'em over then lad!", "Well hand'em over then lass!")); inv_del(inv, druid_enchanted_beef, 1); inv_del(inv, druid_enchanted_rat, 1); inv_del(inv, druid_enchanted_bear, 1); inv_del(inv, druid_enchanted_chicken, 1); %druid_progress = 3; - ~chatnpc(happy, "Thank you so much adventurer! These meats will allow|our potion to honour Guthix to be completed, and bring|one step closer to reclaiming our stone circle!"); - ~chatnpc(neutral, "Now go and talk to Kaqemeex and he will introduce|you to the wonderful world of herblor and potion|making!"); + ~chatnpc("Thank you so much adventurer! These meats will allow|our potion to honour Guthix to be completed, and bring|one step closer to reclaiming our stone circle!"); + ~chatnpc("Now go and talk to Kaqemeex and he will introduce|you to the wonderful world of herblor and potion|making!"); } else { - ~chatplayer(sad, "No, not yet..."); - ~chatnpc(neutral, "Well let me know when you do young 'un."); + ~chatplayer("No, not yet..."); + ~chatnpc("Well let me know when you do young 'un."); def_int $option = ~p_choice2("What was I meant to be doing again?", 1, "I'll get on with it.", 2); if($option = 1) { - ~chatplayer(neutral, "What was I meant to be doing again?"); - ~chatnpc(neutral, "Trouble with your memory eh young'un? I need the raw meats of four different animals that have been dipped into the Cauldron of Thunder so I can make my potion to honour Guthix."); - ~chatplayer(neutral, "Ooooh yeah, I remember."); + ~chatplayer("What was I meant to be doing again?"); + ~chatnpc("Trouble with your memory eh young'un? I need the raw meats of four different animals that have been dipped into the Cauldron of Thunder so I can make my potion to honour Guthix."); + ~chatplayer("Ooooh yeah, I remember."); @druid_sanfew_questions; } else if($option = 2) { - ~chatplayer(happy, "I'll get on with it."); + ~chatplayer("I'll get on with it."); } } [label,druid_completion] -~chatnpc(neutral, "I have word from Sanfew that you have been very helpful in assisting him with his preparations for the purification ritual. As promised I will now teach you the ancient arts of Herblore."); +~chatnpc("I have word from Sanfew that you have been very helpful in assisting him with his preparations for the purification ritual. As promised I will now teach you the ancient arts of Herblore."); // additional dialogue here added after osrs: https://www.youtube.com/watch?v=n8RIbXtW5V4 queue(druid_quest_complete, 0); diff --git a/data/src/scripts/quests/quest_elena/scripts/alrena.rs2 b/data/src/scripts/quests/quest_elena/scripts/alrena.rs2 index 39c556335..fb93c56cb 100644 --- a/data/src/scripts/quests/quest_elena/scripts/alrena.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/alrena.rs2 @@ -1,19 +1,19 @@ [opnpc1,alrena] switch_int(%elena_progress) { case ^quest_elena_not_started: { - ~chatplayer(neutral, "Hello Madam."); - ~chatnpc(neutral, "Oh, hello there."); - ~chatplayer(quiz, "Are you ok?"); - ~chatnpc(sad, "Not too bad... I've just got some|troubles on my mind..."); + ~chatplayer("Hello Madam."); + ~chatnpc("Oh, hello there."); + ~chatplayer("Are you ok?"); + ~chatnpc("Not too bad... I've just got some|troubles on my mind..."); } case ^quest_elena_started: { - ~chatplayer(neutral, "Hello, has asked me to help find your daughter."); - ~chatnpc(neutral, "Yes he told me. I've begun making your special gas mask, but I need some to finish it."); + ~chatplayer("Hello, has asked me to help find your daughter."); + ~chatnpc("Yes he told me. I've begun making your special gas mask, but I need some to finish it."); if (inv_total(inv, dwellberry) = 0) { - ~chatplayer(neutral, "I'll try to get some."); - ~chatnpc(neutral, "The best place to look is in McGrubor's Wood to the north."); + ~chatplayer("I'll try to get some."); + ~chatnpc("The best place to look is in McGrubor's Wood to the north."); } else { - ~chatplayer(happy, "Yes I've got some here."); + ~chatplayer("Yes I've got some here."); ~objbox(dwellberry, "You give the to ."); if_close; mes(" crushes the berries into a smooth paste."); @@ -24,36 +24,36 @@ switch_int(%elena_progress) { ~quest_elena_set_progress(^quest_elena_gasmask); inv_del(inv, dwellberry, 1); inv_add(inv, gasmask, 1); - ~chatnpc(neutral, "There we go, all done. While in West Ardougne you must wear this at all times, or you'll never make it back."); + ~chatnpc("There we go, all done. While in West Ardougne you must wear this at all times, or you'll never make it back."); ~objbox(gasmask, " has given you a gas mask."); - ~chatnpc(neutral, "While you two are digging, I'll make a spare mask.|I'll hide it in the cupboard incase the mourners come in."); + ~chatnpc("While you two are digging, I'll make a spare mask.|I'll hide it in the cupboard incase the mourners come in."); } } case ^quest_elena_gasmask, ^quest_elena_mud_patch1, ^quest_elena_mud_patch2, ^quest_elena_mud_patch3: { - ~chatplayer(happy, "Hello ."); - ~chatnpc(happy, "Hello darling, how's that tunnel coming along?"); - ~chatplayer(happy, "We're getting there..."); - ~chatnpc(happy, "Well I'm sure you're quicker than ."); - ~chatplayer(happy, "I just need to soften the soil and then we'll start digging."); - ~chatnpc(happy, "If you lose your protective clothing, I've made a spare set. They're hidden in the cupboard incase the mourners come in."); + ~chatplayer("Hello ."); + ~chatnpc("Hello darling, how's that tunnel coming along?"); + ~chatplayer("We're getting there..."); + ~chatnpc("Well I'm sure you're quicker than ."); + ~chatplayer("I just need to soften the soil and then we'll start digging."); + ~chatnpc("If you lose your protective clothing, I've made a spare set. They're hidden in the cupboard incase the mourners come in."); } case ^quest_elena_mud_patch4: { - ~chatplayer(happy, "Hello again ."); - ~chatnpc(neutral, "How's the tunnel going?"); - ~chatplayer(neutral, "I'm getting there."); - ~chatnpc(shifty, "One of the mourners has been sniffling around asking questions about you and , you should keep an eye out for him."); - ~chatplayer(neutral, "Ok, thanks "); + ~chatplayer("Hello again ."); + ~chatnpc("How's the tunnel going?"); + ~chatplayer("I'm getting there."); + ~chatnpc("One of the mourners has been sniffling around asking questions about you and , you should keep an eye out for him."); + ~chatplayer("Ok, thanks "); } case ^quest_elena_opened_tunnel: { - ~chatplayer(happy, "Hello ."); - ~chatnpc(neutral, "Hi, have you managed to get through to West Ardougne?"); - ~chatplayer(sad, "Not yet, but I should be going soon."); - ~chatnpc(sad, "Make sure you wear your mask while you are over there! I can't think of a worse way to die."); + ~chatplayer("Hello ."); + ~chatnpc("Hi, have you managed to get through to West Ardougne?"); + ~chatplayer("Not yet, but I should be going soon."); + ~chatnpc("Make sure you wear your mask while you are over there! I can't think of a worse way to die."); } case ^quest_elena_tied_rope, ^quest_elena_opened_pipe, ^quest_elena_returned_book, ^quest_elena_spoke_to_milli, ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek: { - ~chatplayer(neutral, "Hello ."); - ~chatnpc(confused, "Hello, any word on ?"); - ~chatplayer(sad, "Not yet I'm afraid."); + ~chatplayer("Hello ."); + ~chatnpc("Hello, any word on ?"); + ~chatplayer("Not yet I'm afraid."); } - case ^quest_elena_freed_elena, ^elena_complete: ~chatnpc(happy, "Thank you for rescuing my daughter! has told me of your bravery entering a house that could have been plague infected. I can't thank you enough!"); + case ^quest_elena_freed_elena, ^elena_complete: ~chatnpc("Thank you for rescuing my daughter! has told me of your bravery entering a house that could have been plague infected. I can't thank you enough!"); } diff --git a/data/src/scripts/quests/quest_elena/scripts/bravek.rs2 b/data/src/scripts/quests/quest_elena/scripts/bravek.rs2 index 920f3dedf..340a7c314 100644 --- a/data/src/scripts/quests/quest_elena/scripts/bravek.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/bravek.rs2 @@ -12,44 +12,44 @@ switch_obj(last_useitem) { } [label,bravek_my_head_hurts] -~chatnpc(confused, "My head hurts! I'll speak to you another day..."); +~chatnpc("My head hurts! I'll speak to you another day..."); @multi2("This is really important though!", bravek_this_is_really_important_though, "Ok, goodbye.", bravek_okay_goodbye); [label,bravek_this_is_really_important_though] -~chatplayer(angry, "This is really important though!"); -~chatnpc(confused, "I can't possibly speak to you with my head spinning like this... I went a bit heavy on the drink again last night. Curse my herbalist, she made the best hang over cures. Darn inconvenient of her catching the plague."); +~chatplayer("This is really important though!"); +~chatnpc("I can't possibly speak to you with my head spinning like this... I went a bit heavy on the drink again last night. Curse my herbalist, she made the best hang over cures. Darn inconvenient of her catching the plague."); @multi3("Ok, goodbye", bravek_okay_goodbye, "You shouldn't drink so much then!", bravek_you_shouldnt_drink_so_much_then, "Do you know what is in the cure?", bravek_do_you_know_what_is_in_the_cure); [label,bravek_thanks_again_for_the_hangover_cure] -~chatnpc(happy, "Thanks again for the hangover cure."); +~chatnpc("Thanks again for the hangover cure."); switch_int(%elena_progress) { case ^quest_elena_spoke_cured_bravek: { if (inv_total(inv, elena_warrant) > 0) { - ~chatplayer(happy, "Not a problem, happy to help out."); - ~chatnpc(happy, "I'm just having a little drop of whisky, then I'll feel really good."); + ~chatplayer("Not a problem, happy to help out."); + ~chatnpc("I'm just having a little drop of whisky, then I'll feel really good."); } else { - ~chatnpc(quiz, "Ah now what was it you wanted me to do for you?"); - ~chatplayer(shock, "I need to rescue . She's now a kidnap victim! She's being held in a plague house, I need permission to enter."); + ~chatnpc("Ah now what was it you wanted me to do for you?"); + ~chatplayer("I need to rescue . She's now a kidnap victim! She's being held in a plague house, I need permission to enter."); @bravek_well_the_mourners_deal_with_that_sort_of_thing; } } case default: { - ~chatplayer(happy, "Not a problem, happy to help out."); - ~chatnpc(happy, "I'm just having a little drop of whisky, then I'll feel really good."); + ~chatplayer("Not a problem, happy to help out."); + ~chatnpc("I'm just having a little drop of whisky, then I'll feel really good."); } } [label,bravek_okay_goodbye] -~chatplayer(neutral, "Ok, goodbye."); +~chatplayer("Ok, goodbye."); [label,bravek_you_shouldnt_drink_so_much_then] -~chatplayer(angry, "You shouldn't drink so much then!"); -~chatnpc(sad, "Well position of responsibility are hard, I need something to take my mind off things... Especially with the problems this place has."); +~chatplayer("You shouldn't drink so much then!"); +~chatnpc("Well position of responsibility are hard, I need something to take my mind off things... Especially with the problems this place has."); @multi3("Ok, goodbye", bravek_okay_goodbye, "Do you know what is in the cure?", bravek_do_you_know_what_is_in_the_cure, "I don't think drink is the solution.", bravek_i_dont_think_drink_is_the_solution); [label,bravek_do_you_know_what_is_in_the_cure] -~chatplayer(quiz, "Do you know what is in the cure?"); -~chatnpc(confused, "Hmmm let me think... Ouch! Thinking not clever. Ah here, she did scribble it down for me."); +~chatplayer("Do you know what is in the cure?"); +~chatnpc("Hmmm let me think... Ouch! Thinking not clever. Ah here, she did scribble it down for me."); ~quest_elena_set_progress(^quest_elena_spoke_to_bravek); inv_add(inv, elena_scruffy_note, 1); ~objbox(elena_scruffy_note, " hands you a tatty piece of paper."); @@ -58,53 +58,53 @@ inv_add(inv, elena_scruffy_note, 1); if (%elena_progress ! ^quest_elena_spoke_to_bravek) { return; // sanity check } -~chatnpc(sad, "*uurgh*|My head still hurts too much to think straight.|Oh for one of Trudi's hangover cures..."); +~chatnpc("*uurgh*|My head still hurts too much to think straight.|Oh for one of Trudi's hangover cures..."); if (inv_total(inv, hangover_cure) > 0) { - ~chatplayer(happy, "Try this."); + ~chatplayer("Try this."); inv_del(inv, hangover_cure, 1); npc_say("Grruurgh!"); // TODO i fuckin lost the animation here that he does... -jordan ~quest_elena_set_progress(^quest_elena_spoke_cured_bravek); ~objbox(hangover_cure, "You give the . gulps down the foul-looking liquid."); - ~chatnpc(happy, "Ooh that's much better!|Thanks, that's the clearest my head has felt in a month. Ah now, what was it you wanted me to do for you?"); - ~chatplayer(shock, "I need to rescue a kidnap victim called . She's being held in a plague house, I need permission to enter."); + ~chatnpc("Ooh that's much better!|Thanks, that's the clearest my head has felt in a month. Ah now, what was it you wanted me to do for you?"); + ~chatplayer("I need to rescue a kidnap victim called . She's being held in a plague house, I need permission to enter."); @bravek_well_the_mourners_deal_with_that_sort_of_thing; } [label,bravek_i_dont_think_drink_is_the_solution] -~chatplayer(confused, "I don't think drink is the solution."); -~chatnpc(sad, "*uurgh*|My head still hurts too much to think straight.|Oh for one of Trudi's hangover cures..."); +~chatplayer("I don't think drink is the solution."); +~chatnpc("*uurgh*|My head still hurts too much to think straight.|Oh for one of Trudi's hangover cures..."); [label,bravek_well_the_mourners_deal_with_that_sort_of_thing] -~chatnpc(neutral, "Well the mourners deal with that sort of thing..."); +~chatnpc("Well the mourners deal with that sort of thing..."); @multi3("Ok, I'll go speak to them.", bravek_okay_ill_go_speak_to_them, "Is that all anyone says around here?", bravek_is_that_all_anyone_says_around_here, "They won't listen to me!", bravek_they_wont_listen_to_me); [label,bravek_okay_ill_go_speak_to_them] -~chatplayer(neutral, "Ok, I'll go speak to them."); +~chatplayer("Ok, I'll go speak to them."); [label,bravek_is_that_all_anyone_says_around_here] -~chatplayer(angry, "Is that all anyone says around here?"); -~chatnpc(neutral, "Well, they know best about plague issues."); +~chatplayer("Is that all anyone says around here?"); +~chatnpc("Well, they know best about plague issues."); @multi2("Don't you want to take an interest in it at all?", bravek_dont_you_want_to_take_an_interest, "They won't listen to me!", bravek_they_wont_listen_to_me); [label,bravek_they_wont_listen_to_me] -~chatplayer(angry, "They won't listen to me!"); -~chatplayer(angry, "They say I'm not properly equipped to go in the house, though I do have a very effective gas mask."); -~chatnpc(confused, "Hmmm, well I guess they're not taking the issue of a kidnapping seriously enough. They do go a bit far sometimes."); -~chatnpc(neutral, "I've heard of , she has helped us a lot... Okay, I'll give you this warrant to enter the house."); +~chatplayer("They won't listen to me!"); +~chatplayer("They say I'm not properly equipped to go in the house, though I do have a very effective gas mask."); +~chatnpc("Hmmm, well I guess they're not taking the issue of a kidnapping seriously enough. They do go a bit far sometimes."); +~chatnpc("I've heard of , she has helped us a lot... Okay, I'll give you this warrant to enter the house."); inv_add(inv, elena_warrant, 1); ~objboxt(elena_warrant, " hands you a ."); [label,bravek_dont_you_want_to_take_an_interest] -~chatplayer(quiz, "Don't you want to take an interest in it at all?"); -~chatnpc(shock, "Nope I don't wish to take a deep interest in plagues. That stuff is too scary for me!"); +~chatplayer("Don't you want to take an interest in it at all?"); +~chatnpc("Nope I don't wish to take a deep interest in plagues. That stuff is too scary for me!"); @multi3("I see why people say you're a weak leader.", bravek_i_see_why_people_say_youre_a_weak_leader, "Okay, I'll talk to the mourners.", bravek_okay_ill_talk_to_the_mourners, "They won't listen to me!", bravek_they_wont_listen_to_me); [label,bravek_i_see_why_people_say_youre_a_weak_leader] -~chatplayer(shifty, "I see why people say you're a weak leader."); -~chatnpc(neutral, "Bah, people always criticise their leaders but delegating is the only way to lead. I delegate all plague issues to the mourners."); -~chatplayer(angry, "This whole city is a plague issue!"); +~chatplayer("I see why people say you're a weak leader."); +~chatnpc("Bah, people always criticise their leaders but delegating is the only way to lead. I delegate all plague issues to the mourners."); +~chatplayer("This whole city is a plague issue!"); [label,bravek_okay_ill_talk_to_the_mourners] -~chatplayer(neutral, "Okay, I'll talk to the mourners."); +~chatplayer("Okay, I'll talk to the mourners."); diff --git a/data/src/scripts/quests/quest_elena/scripts/cupboard.rs2 b/data/src/scripts/quests/quest_elena/scripts/cupboard.rs2 index 9694668b4..78bec6e29 100644 --- a/data/src/scripts/quests/quest_elena/scripts/cupboard.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/cupboard.rs2 @@ -8,7 +8,7 @@ if (~obj_gettotal(gasmask) = 0) { ~objbox(gasmask, "You find a protective mask."); } else if (inv_total(bank, gasmask) > 0 & (inv_total(inv, gasmask) = 0 & inv_total(worn, gasmask) = 0)) { ~mesbox("The cupboard is empty."); - ~chatplayer(neutral, "I think I've still got one of 's gas masks in my bank."); + ~chatplayer("I think I've still got one of 's gas masks in my bank."); } else { mes("You search the cupboard but you find nothing."); } diff --git a/data/src/scripts/quests/quest_elena/scripts/doors.rs2 b/data/src/scripts/quests/quest_elena/scripts/doors.rs2 index 697beff8a..4a9446146 100644 --- a/data/src/scripts/quests/quest_elena/scripts/doors.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/doors.rs2 @@ -11,57 +11,57 @@ switch_int(%elena_progress) { case ^quest_elena_spoke_to_milli: { ~mesbox("The door won't open.|You notice a black cross on the door."); if (npc_find(coord, npc_719, 14, 0) = true) { - ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); + ~chatnpcrange("I'd stand away from there. That black cross means that house has been touched by the plague."); @multi3("But I think a kidnap victim is in here.", plague_house_but_i_think_a_kidnap_victim_is_in_here, "I fear not a mere plague.", plague_house_i_fear_not_a_mere_plague, "Thanks for the warning.", plague_house_thanks_for_the_warning); } } case ^quest_elena_spoke_cured_bravek: { if (inv_total(inv, elena_warrant) > 0 & npc_find(coord, npc_719, 14, 0) = true) { - ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); - ~chatplayer(neutral, "I have a warrant from to enter here."); + ~chatnpcrange("I'd stand away from there. That black cross means that house has been touched by the plague."); + ~chatplayer("I have a warrant from to enter here."); if_close; ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); } else if (npc_find(coord, npc_719, 14, 0) = true) { ~mesbox("The door won't open.|You notice a black cross on the door."); - ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); + ~chatnpcrange("I'd stand away from there. That black cross means that house has been touched by the plague."); } } case ^quest_elena_freed_elena, ^elena_complete: ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); case default: { ~mesbox("The door won't open.|You notice a black cross on the door."); if (npc_find(coord, npc_719, 14, 0) = true) { - ~chatnpcrange(neutral, "I'd stand away from there. That black cross means that house has been touched by the plague."); + ~chatnpcrange("I'd stand away from there. That black cross means that house has been touched by the plague."); } } } [label,plague_house_but_i_think_a_kidnap_victim_is_in_here] -~chatplayer(neutral, "But I think a kidnap victim is in here."); -~chatnpcrange(neutral, "Sounds unlikely, even kidnappers wouldn't go in there. Even if someone is in there, they're probably dead by now."); +~chatplayer("But I think a kidnap victim is in here."); +~chatnpcrange("Sounds unlikely, even kidnappers wouldn't go in there. Even if someone is in there, they're probably dead by now."); @multi2("Good point.", plague_house_good_point, "I want to check anyway.", plague_house_i_want_to_check_anyway); [label,plague_house_good_point] // TODO unconfirmed details of this dialogue -jordan -~chatplayer(neutral, "Good point."); +~chatplayer("Good point."); [label,plague_house_i_want_to_check_anyway] -~chatplayer(neutral, "I want to check anyway."); -~chatnpcrange(neutral, "You don't have clearance to go in there."); +~chatplayer("I want to check anyway."); +~chatnpcrange("You don't have clearance to go in there."); @plague_house_how_do_i_get_clearance; [label,plague_house_i_fear_not_a_mere_plague] -~chatplayer(neutral, "I fear not a mere plague."); -~chatnpc(neutral, "That's irrelevant. You don't have clearance to go in there."); +~chatplayer("I fear not a mere plague."); +~chatnpc("That's irrelevant. You don't have clearance to go in there."); @plague_house_how_do_i_get_clearance; [label,plague_house_how_do_i_get_clearance] -~chatplayer(quiz, "How do I get clearance?"); -~chatnpcrange(neutral, "Well you'd need to apply to the , or I suppose the city warder."); +~chatplayer("How do I get clearance?"); +~chatnpcrange("Well you'd need to apply to the , or I suppose the city warder."); ~quest_elena_set_progress(^quest_elena_spoke_to_plague_house); -~chatnpcrange(neutral, "I wouldn't get your hopes up though."); +~chatnpcrange("I wouldn't get your hopes up though."); [label,plague_house_thanks_for_the_warning] -~chatplayer(neutral, "Thanks for the warning."); +~chatplayer("Thanks for the warning."); [label,rehnissons_enter_house] if (%elena_progress >= ^quest_elena_returned_book) { @@ -71,18 +71,18 @@ if (%elena_progress >= ^quest_elena_returned_book) { if (npc_find(coord, ted_rehnison, 7, 0) = false) { return; } -~chatnpc(angry, "Go away. We don't want any."); +~chatnpc("Go away. We don't want any."); switch_int(%elena_progress) { case ^quest_elena_opened_pipe: { if (inv_total(inv, elena_book) > 0) { - ~chatplayer(neutral, "I'm a friend of 's, I have come to return a book he borrowed."); - ~chatnpc(neutral, "Oh... Why didn't you say, come in then."); + ~chatplayer("I'm a friend of 's, I have come to return a book he borrowed."); + ~chatnpc("Oh... Why didn't you say, come in then."); if_close; // very regarded ~quest_elena_set_progress(^quest_elena_returned_book); ~open_and_close_door(loc_param(next_loc_stage), ~check_axis(coord, loc_coord, loc_angle), false); inv_del(inv, elena_book, 1); ~objbox(elena_book, "You hand the book to Ted as you enter."); - ~chatnpc(happy, "Thanks, I've been missing that."); + ~chatnpc("Thanks, I've been missing that."); } } } diff --git a/data/src/scripts/quests/quest_elena/scripts/edmond.rs2 b/data/src/scripts/quests/quest_elena/scripts/edmond.rs2 index 08a0c4d71..b4f866acb 100644 --- a/data/src/scripts/quests/quest_elena/scripts/edmond.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/edmond.rs2 @@ -1,82 +1,82 @@ [opnpc1,edmond] switch_int(%elena_progress) { case ^quest_elena_not_started: { - ~chatplayer(happy, "Hello old man."); + ~chatplayer("Hello old man."); ~mesbox("The man looks upset."); - ~chatplayer(quiz, "What's wrong?"); - ~chatnpc(sad, "I've got to find my daughter. I pray that she is still alive."); + ~chatplayer("What's wrong?"); + ~chatnpc("I've got to find my daughter. I pray that she is still alive."); @multi2("What's happened to her?", edmond_what_happened_to_elena, "Well, good luck finding her.", edmond_goodluck_finding_elena); } case ^quest_elena_started: { - ~chatplayer(happy, "Hello Edmond."); - ~chatnpc(quiz, "Have you got the ?"); + ~chatplayer("Hello Edmond."); + ~chatnpc("Have you got the ?"); if (inv_total(inv, dwellberry) = 0) { - ~chatplayer(sad, "Sorry, I'm afraid not."); - ~chatnpc(neutral, "You'll probably find them in McGrubor's Wood to the north."); + ~chatplayer("Sorry, I'm afraid not."); + ~chatnpc("You'll probably find them in McGrubor's Wood to the north."); } else { - ~chatplayer(happy, "Yes, I have some here."); - ~chatnpc(neutral, "Take them to my wife ."); + ~chatplayer("Yes, I have some here."); + ~chatnpc("Take them to my wife ."); } } case ^quest_elena_gasmask, ^quest_elena_mud_patch1, ^quest_elena_mud_patch2, ^quest_elena_mud_patch3, ^quest_elena_mud_patch4: { - ~chatplayer(happy, "Hi , I've got the gas mask now."); - ~chatnpc(neutral, "Good stuff, now for the digging. Beneath are the Ardougne sewers. There you'll find access to West Ardougne."); - ~chatnpc(default, "The problem is the soil is rock hard. You'll need to pour on some buckets of water to soften it up. I'll keep an eye out for the mourners."); + ~chatplayer("Hi , I've got the gas mask now."); + ~chatnpc("Good stuff, now for the digging. Beneath are the Ardougne sewers. There you'll find access to West Ardougne."); + ~chatnpc("The problem is the soil is rock hard. You'll need to pour on some buckets of water to soften it up. I'll keep an eye out for the mourners."); } case ^quest_elena_opened_tunnel: { - ~chatplayer(confused, ", I can't get through to West Ardougne! There's an iron grill blocking my way. I can't pull it off alone."); - ~chatnpc(neutral, "If you get some rope you could tie to the grill, then we could both pull it from here."); + ~chatplayer(", I can't get through to West Ardougne! There's an iron grill blocking my way. I can't pull it off alone."); + ~chatnpc("If you get some rope you could tie to the grill, then we could both pull it from here."); } case ^quest_elena_tied_rope: { - ~chatplayer(neutral, "I've tied the other end of this rope to the grill."); + ~chatplayer("I've tied the other end of this rope to the grill."); ~mesbox(" gets a good grip on the ripe. Together you tug the rope. You hear a clunk as you both fly backwards..."); - ~chatnpc(neutral, "That's done the job."); - ~chatnpc(neutral, "Remember to always wear the gasmask,|otherwise you'll die over there for certain...|Please bring my Elena back safe and sound."); + ~chatnpc("That's done the job."); + ~chatnpc("Remember to always wear the gasmask,|otherwise you'll die over there for certain...|Please bring my Elena back safe and sound."); ~quest_elena_set_progress(^quest_elena_opened_pipe); } case ^quest_elena_opened_pipe, ^quest_elena_returned_book, ^quest_elena_spoke_to_milli, ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek: { - ~chatplayer(neutral, "Hello."); - ~chatnpc(quiz, "Have you found yet?"); - ~chatplayer(sad, "Not yet, it's a big city over there."); - ~chatnpc(sad, "I hope it's not too late."); + ~chatplayer("Hello."); + ~chatnpc("Have you found yet?"); + ~chatplayer("Not yet, it's a big city over there."); + ~chatnpc("I hope it's not too late."); } case ^quest_elena_freed_elena: { - ~chatnpc(happy, "Thank you, thank you! beat you back by minutes. Now I said I'd give you a reward. What can I give you as a reward I wonder? Here take this magic scroll, I have little use for it but it may help you."); + ~chatnpc("Thank you, thank you! beat you back by minutes. Now I said I'd give you a reward. What can I give you as a reward I wonder? Here take this magic scroll, I have little use for it but it may help you."); queue(quest_elena_complete, 0); - ~chatnpc(happy, "Now I'd recommend you go and see Elena. She'll want to thank you herself. She lives in the house opposite ours."); + ~chatnpc("Now I'd recommend you go and see Elena. She'll want to thank you herself. She lives in the house opposite ours."); } case ^elena_complete: { - ~chatplayer(happy, "Hello there."); - ~chatnpc(happy, "Ah hello. Thank you again for rescuing my daughter."); - ~chatplayer(happy, "No problem."); + ~chatplayer("Hello there."); + ~chatnpc("Ah hello. Thank you again for rescuing my daughter."); + ~chatplayer("No problem."); } } [label,edmond_what_happened_to_elena] -~chatplayer(quiz, "What's happened to her?"); -~chatnpc(sad, "'s a missionary and a healer.|Three weeks ago she managed to cross the Ardougne wall."); -~chatnpc(sad, "No one's allowed to cross the wall in case they spread the plague, but after hearing the screams of suffering, she felt she had to help."); -~chatnpc(sad, "She said she'd be gone for a few days, but we've heard nothing since"); +~chatplayer("What's happened to her?"); +~chatnpc("'s a missionary and a healer.|Three weeks ago she managed to cross the Ardougne wall."); +~chatnpc("No one's allowed to cross the wall in case they spread the plague, but after hearing the screams of suffering, she felt she had to help."); +~chatnpc("She said she'd be gone for a few days, but we've heard nothing since"); @multi3("Tell me more about the plague.", edmond_tell_me_more, "Can I help find her?", edmond_can_i_help_find_elena, "I'm sorry, I have to go.", edmond_sorry_i_have_to_go); [label,edmond_tell_me_more] -~chatplayer(neutral, "Tell me more about the plague."); -~chatnpc(sad, "The mourners can tell you more than me, they're the only ones allowed to cross the border. I do know the plague is a horrible way to go... That's why felt she had to go help."); +~chatplayer("Tell me more about the plague."); +~chatnpc("The mourners can tell you more than me, they're the only ones allowed to cross the border. I do know the plague is a horrible way to go... That's why felt she had to go help."); @multi2("Can I help find her?", edmond_can_i_help_find_elena, "I'm sorry, I have to go.", edmond_sorry_i_have_to_go); [label,edmond_can_i_help_find_elena] -~chatplayer(quiz, "Can I help find her?"); -~chatnpc(confused, "Really, would you? I've been working on a plan to get over the wall, but I'm too old and tired to carry it through."); -~chatnpc(neutral, "If you're going over, the first thing you'll need is protection. My wife made a special gasmask for with rubbed into it."); -~chatnpc(neutral, " help repel the virus.|We need some more though..."); -~chatplayer(quiz, "Where can I find these ?"); +~chatplayer("Can I help find her?"); +~chatnpc("Really, would you? I've been working on a plan to get over the wall, but I'm too old and tired to carry it through."); +~chatnpc("If you're going over, the first thing you'll need is protection. My wife made a special gasmask for with rubbed into it."); +~chatnpc(" help repel the virus.|We need some more though..."); +~chatplayer("Where can I find these ?"); ~quest_elena_set_progress(^quest_elena_started); -~chatnpc(neutral, "The only place I know is McGrubor's Wood to the north."); -~chatplayer(neutral, "Okay, I'll go get some."); +~chatnpc("The only place I know is McGrubor's Wood to the north."); +~chatplayer("Okay, I'll go get some."); [label,edmond_sorry_i_have_to_go] -~chatplayer(neutral, "I'm sorry, I have to go."); -~chatnpc(sad, "Okay, then, goodbye."); +~chatplayer("I'm sorry, I have to go."); +~chatnpc("Okay, then, goodbye."); [label,edmond_goodluck_finding_elena] -~chatplayer(neutral, "Well, good luck finding her."); +~chatplayer("Well, good luck finding her."); diff --git a/data/src/scripts/quests/quest_elena/scripts/elena.rs2 b/data/src/scripts/quests/quest_elena/scripts/elena.rs2 index 8bfaeca52..0577958d4 100644 --- a/data/src/scripts/quests/quest_elena/scripts/elena.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/elena.rs2 @@ -2,10 +2,10 @@ switch_int(%elena_progress) { case ^elena_complete: ~displaymessage(^dm_default); // TODO not sure what would happen here. case default: { - ~chatplayer(happy, "Hi, you're free to go! Your kidnappers don't seem to be about right now."); - ~chatnpc(neutral, "Thank you, being kidnapped was so inconvenient. I was on my way back to East Ardougne with some samples, I want to see if I can diagnose a cure for this plague."); - ~chatplayer(neutral, "Well you can leave via the manhole in the middle of the city."); + ~chatplayer("Hi, you're free to go! Your kidnappers don't seem to be about right now."); + ~chatnpc("Thank you, being kidnapped was so inconvenient. I was on my way back to East Ardougne with some samples, I want to see if I can diagnose a cure for this plague."); + ~chatplayer("Well you can leave via the manhole in the middle of the city."); ~quest_elena_set_progress(^quest_elena_freed_elena); - ~chatnpc(neutral, "Go and see my father,|I'll make sure he adequately rewards you."); + ~chatnpc("Go and see my father,|I'll make sure he adequately rewards you."); } } diff --git a/data/src/scripts/quests/quest_elena/scripts/jethick.rs2 b/data/src/scripts/quests/quest_elena/scripts/jethick.rs2 index 3d997a68b..f1599adc4 100644 --- a/data/src/scripts/quests/quest_elena/scripts/jethick.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/jethick.rs2 @@ -1,35 +1,35 @@ [opnpc1,jethick] if (%elena_progress >= ^quest_elena_returned_book) { - ~chatnpc(neutral, "Hello. We don't get many newcomers around here."); + ~chatnpc("Hello. We don't get many newcomers around here."); return; } switch_int(%elena_progress) { case ^quest_elena_opened_pipe: { - ~chatnpc(neutral, "Hello, I don't recognise you. We don't get many newcomers around here."); + ~chatnpc("Hello, I don't recognise you. We don't get many newcomers around here."); @multi2("I'm looking for a woman from East Ardougne.", jethick_im_looking_for_a_woman, "So who's in charge here?", jethick_whos_in_charge_here); } - case default: ~chatnpc(neutral, "Hello, I don't recognise you. We don't get many newcomers around here."); + case default: ~chatnpc("Hello, I don't recognise you. We don't get many newcomers around here."); } [label,jethick_im_looking_for_a_woman] -~chatplayer(happy, "I'm looking for a woman from East Ardougne."); -~chatnpc(confused, "East Ardougnian women are easier to find in East Ardougne. Not many would come to West Ardougne to find one. Any particular woman you have in mind?"); -~chatplayer(happy, "Yes, a lady called ."); -~chatnpc(confused, "What does she look like?"); +~chatplayer("I'm looking for a woman from East Ardougne."); +~chatnpc("East Ardougnian women are easier to find in East Ardougne. Not many would come to West Ardougne to find one. Any particular woman you have in mind?"); +~chatplayer("Yes, a lady called ."); +~chatnpc("What does she look like?"); if (inv_total(inv, elena_picture) > 0) { ~objboxt(elena_picture, "You show the picture to ."); - ~chatnpc(neutral, "Ah yes, I recognise her. She was over here to help aid plague victims. I think she is staying over with the Rehnison family."); - ~chatnpc(neutral, "They live in the small timbered building at the far north side of town. I've not seen her around here in a while mind you."); + ~chatnpc("Ah yes, I recognise her. She was over here to help aid plague victims. I think she is staying over with the Rehnison family."); + ~chatnpc("They live in the small timbered building at the far north side of town. I've not seen her around here in a while mind you."); if (~obj_gettotal(elena_book) = 0) { - ~chatnpc(neutral, "I don't suppose you could run me a little errand while you're over there? I borrowed this book from them, can you return it?"); + ~chatnpc("I don't suppose you could run me a little errand while you're over there? I borrowed this book from them, can you return it?"); inv_add(inv, elena_book, 1); ~objbox(elena_book, " gives you a book."); } } else { - ~chatplayer(confused, "Um... brown hair, in her twenties..."); - ~chatnpc(confused, "Hmmm, that doesn't narrow it down a huge amount... I'll need to know more than that."); + ~chatplayer("Um... brown hair, in her twenties..."); + ~chatnpc("Hmmm, that doesn't narrow it down a huge amount... I'll need to know more than that."); } [label,jethick_whos_in_charge_here] -~chatplayer(quiz, "So who's in charge here?"); -~chatnpc(angry, "Well, King tyras has wandered off in to the west kingdom. He doesn't care about the mess he's left here. The city warder is in charge at the moment. He's not much better."); +~chatplayer("So who's in charge here?"); +~chatnpc("Well, King tyras has wandered off in to the west kingdom. He doesn't care about the mess he's left here. The city warder is in charge at the moment. He's not much better."); diff --git a/data/src/scripts/quests/quest_elena/scripts/mourner.rs2 b/data/src/scripts/quests/quest_elena/scripts/mourner.rs2 index a813e53d3..9e933f062 100644 --- a/data/src/scripts/quests/quest_elena/scripts/mourner.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/mourner.rs2 @@ -2,91 +2,91 @@ switch_int(%elena_progress) { case ^quest_elena_not_started: { // TODO i missed this part of the dialogue so partial guessed (emotions). -jordan - ~chatplayer(happy, "Hello there."); - ~chatnpc(quiz, "Do you have a problem traveller?"); - ~chatplayer(confused, "No, I just wondered why you're wearing that outfit... Is it fancy dress?"); - ~chatnpc(neutral, "No! It's for protection."); - ~chatplayer(confused, "Protection from what?"); - ~chatnpc(neutral, "The plague of course..."); + ~chatplayer("Hello there."); + ~chatnpc("Do you have a problem traveller?"); + ~chatplayer("No, I just wondered why you're wearing that outfit... Is it fancy dress?"); + ~chatnpc("No! It's for protection."); + ~chatplayer("Protection from what?"); + ~chatnpc("The plague of course..."); } case ^quest_elena_started: { // TODO i missed this part of the dialogue so partial guessed (emotions). -jordan - ~chatplayer(happy, "Hello."); - ~chatnpc(quiz, "What do you want?"); + ~chatplayer("Hello."); + ~chatnpc("What do you want?"); @multi2("Who are you?", mourner_who_are_you, "Nothing, just being polite.", mourner_nothing_just_being_polite); } case ^quest_elena_gasmask: { // TODO i missed this part of the dialogue so partial guessed (emotions). -jordan - ~chatplayer(happy, "Hello."); - ~chatnpc(quiz, "Are you ok?"); - ~chatplayer(happy, "Yes, I'm fine thanks."); - ~chatnpc(quiz, "Have you experienced any plague symptoms?"); + ~chatplayer("Hello."); + ~chatnpc("Are you ok?"); + ~chatplayer("Yes, I'm fine thanks."); + ~chatnpc("Have you experienced any plague symptoms?"); @multi3("What are the symptoms?", mourner_who_are_you, "No, I feel fine.", mourner_nothing_just_being_polite, "No, but can you tell me where the plague came from?", mourner_no_but_can_you_tell_me_where_the_plague_came_from); } case ^quest_elena_mud_patch1, ^quest_elena_mud_patch2, ^quest_elena_mud_patch3, ^quest_elena_mud_patch4: { - ~chatplayer(happy, "Hello."); - ~chatnpc(quiz, "What are you up to with old man ?"); - ~chatplayer(confused, "Nothing, we've just been chatting."); - ~chatnpc(quiz, "What about his daughter?"); - ~chatplayer(confused, "Oh, you know about that then?"); - ~chatnpc(quiz, "We know about everything that goes on in Ardougne. We have to if we are to contain the plague."); - ~chatplayer(confused, "Have you see his daughter recently?"); - ~chatnpc(neutral, "I imagine she's caught the plague. Either way she won't be allowed out of West Ardougne, the risk is too great."); + ~chatplayer("Hello."); + ~chatnpc("What are you up to with old man ?"); + ~chatplayer("Nothing, we've just been chatting."); + ~chatnpc("What about his daughter?"); + ~chatplayer("Oh, you know about that then?"); + ~chatnpc("We know about everything that goes on in Ardougne. We have to if we are to contain the plague."); + ~chatplayer("Have you see his daughter recently?"); + ~chatnpc("I imagine she's caught the plague. Either way she won't be allowed out of West Ardougne, the risk is too great."); } case ^quest_elena_opened_tunnel: { - ~chatplayer(happy, "Hello there."); - ~chatnpc(quiz, "Been digging have we?"); - ~chatplayer(confused, "What do you mean?"); - ~chatnpc(neutral, "Your hands are covered in mud."); - ~chatplayer(shifty, "Oh that..."); - ~chatnpc(quiz, "Funny, you don't look like the gardening type."); - ~chatplayer(happy, "Oh no, I love gardening! It's my favorite pastime."); + ~chatplayer("Hello there."); + ~chatnpc("Been digging have we?"); + ~chatplayer("What do you mean?"); + ~chatnpc("Your hands are covered in mud."); + ~chatplayer("Oh that..."); + ~chatnpc("Funny, you don't look like the gardening type."); + ~chatplayer("Oh no, I love gardening! It's my favorite pastime."); } case ^quest_elena_tied_rope: { - ~chatplayer(happy, "Hello there."); - ~chatnpc(quiz, "What are you up to?"); - ~chatplayer(confused, "What do you mean?"); - ~chatnpc(quiz, "You and that fella, you're looking very suspicious."); - ~chatplayer(shifty, "We're just gardening. Have you heard any news about West Ardougne?"); - ~chatnpc(angry, "Just the usual, everyone's sick or dying. I'm furious at King Tyras for bringing this plague to our lands."); + ~chatplayer("Hello there."); + ~chatnpc("What are you up to?"); + ~chatplayer("What do you mean?"); + ~chatnpc("You and that fella, you're looking very suspicious."); + ~chatplayer("We're just gardening. Have you heard any news about West Ardougne?"); + ~chatnpc("Just the usual, everyone's sick or dying. I'm furious at King Tyras for bringing this plague to our lands."); } case ^quest_elena_opened_pipe, ^quest_elena_returned_book, ^quest_elena_spoke_to_milli, ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek, ^quest_elena_freed_elena, ^elena_complete: { - ~chatplayer(happy, "Hello."); - ~chatnpc(quiz, "What are you up to?"); - ~chatplayer(neutral, "Nothing."); - ~chatnpc(quiz, "I don't trust you."); - ~chatplayer(neutral, "You don't have to."); - ~chatnpc(angry, "If I find you attempting to cross the wall I'll make sure you never return."); + ~chatplayer("Hello."); + ~chatnpc("What are you up to?"); + ~chatplayer("Nothing."); + ~chatnpc("I don't trust you."); + ~chatplayer("You don't have to."); + ~chatnpc("If I find you attempting to cross the wall I'll make sure you never return."); } } [label,mourner_who_are_you] -~chatplayer(quiz, "Who are you?"); -~chatnpc(neutral, "I'm a mourner. It's my job to help heal the plague victims of West Ardougne and to make sure the disease is contained."); -~chatplayer(neutral, "Very noble of you."); -~chatnpc(neutral, "If you come down with any symptoms such as flu or nightmares let me know immediately."); +~chatplayer("Who are you?"); +~chatnpc("I'm a mourner. It's my job to help heal the plague victims of West Ardougne and to make sure the disease is contained."); +~chatplayer("Very noble of you."); +~chatnpc("If you come down with any symptoms such as flu or nightmares let me know immediately."); [label,mourner_nothing_just_being_polite] -~chatplayer(neutral, "Nothing, just being polite."); -~chatnpc(neutral, "Hmmm, ok then. Be on your way."); +~chatplayer("Nothing, just being polite."); +~chatnpc("Hmmm, ok then. Be on your way."); [label,mourner_what_are_the_symptoms] -~chatplayer(quiz, "What are the symptoms?"); -~chatnpc(neutral, "First you'll come down with heavy flu, this is usually followed by horrifying nightmares."); -~chatplayer(neutral, "I used to have nightmares when I was younger."); -~chatnpc(neutral, "Not like these I assure you. Soon after a thick black liquid will seep from your nose and eyes."); -~chatplayer(shock, "Yuck!"); -~chatnpc(neutral, "When it gets to that stage there's nothing we can do for you."); +~chatplayer("What are the symptoms?"); +~chatnpc("First you'll come down with heavy flu, this is usually followed by horrifying nightmares."); +~chatplayer("I used to have nightmares when I was younger."); +~chatnpc("Not like these I assure you. Soon after a thick black liquid will seep from your nose and eyes."); +~chatplayer("Yuck!"); +~chatnpc("When it gets to that stage there's nothing we can do for you."); [label,mourner_no_i_feel_fine] -~chatplayer(happy, "No, I feel fine."); -~chatnpc(neutral, "Well if you take a turn for the worse let me know straight away."); -~chatplayer(quiz, "Can you cure it then?"); -~chatnpc(neutral, "No... But you will have to be treated."); -~chatplayer(quiz, "Treated?"); -~chatnpc(neutral, "We have to take measures to contain the disease. That's why you must let us know immediately if you take a turn for the worse."); +~chatplayer("No, I feel fine."); +~chatnpc("Well if you take a turn for the worse let me know straight away."); +~chatplayer("Can you cure it then?"); +~chatnpc("No... But you will have to be treated."); +~chatplayer("Treated?"); +~chatnpc("We have to take measures to contain the disease. That's why you must let us know immediately if you take a turn for the worse."); [label,mourner_no_but_can_you_tell_me_where_the_plague_came_from] -~chatplayer(quiz, "No, but can you tell me where the plague came from?"); -~chatnpc(neutral, "It all started when King Tyras of West Ardougne came back from one of his visits to the lands west of here."); -~chatnpc(neutral, "Some of his men must have unknowingly caught it out there and brought it back with them"); +~chatplayer("No, but can you tell me where the plague came from?"); +~chatnpc("It all started when King Tyras of West Ardougne came back from one of his visits to the lands west of here."); +~chatnpc("Some of his men must have unknowingly caught it out there and brought it back with them"); diff --git a/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 b/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 index 41b802d66..84747e1f1 100644 --- a/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/plaguehouse.rs2 @@ -39,9 +39,9 @@ switch_int(%elena_progress) { } else { ~mesbox("The door is locked."); if (npc_find(coord, elena_imprisoned, 5, 0) = true) { - ~chatnpc(shock, "Hey get me out of here please!"); - ~chatplayer(sad, "I would do but I don't have a key."); - ~chatnpc(confused, "I think there may be one around somewhere. I'm sure I heard them stashing it somewhere."); + ~chatnpc("Hey get me out of here please!"); + ~chatplayer("I would do but I don't have a key."); + ~chatnpc("I think there may be one around somewhere. I'm sure I heard them stashing it somewhere."); @multi2("Have you caught the plague?", elena_improsoned_have_you_caught_the_plague, "Okay, I'll look for it.", elena_improsioned_ok_ill_look_for_it); } } @@ -49,10 +49,10 @@ switch_int(%elena_progress) { } [label,elena_improsoned_have_you_caught_the_plague] -~chatplayer(quiz, "Have you caught the plague?"); -~chatnpc(neutral, "No, I have none of the symptoms."); -~chatplayer(confused, "Strange, I was told this house was plague infected."); -~chatnpc(neutral, "I suppose that was a cover up by the kidnappers."); +~chatplayer("Have you caught the plague?"); +~chatnpc("No, I have none of the symptoms."); +~chatplayer("Strange, I was told this house was plague infected."); +~chatnpc("I suppose that was a cover up by the kidnappers."); [label,elena_improsioned_ok_ill_look_for_it] -~chatplayer(neutral, "Okay, I'll look for it."); +~chatplayer("Okay, I'll look for it."); diff --git a/data/src/scripts/quests/quest_elena/scripts/rehnisons.rs2 b/data/src/scripts/quests/quest_elena/scripts/rehnisons.rs2 index bf59281b4..2ba987070 100644 --- a/data/src/scripts/quests/quest_elena/scripts/rehnisons.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/rehnisons.rs2 @@ -14,42 +14,42 @@ p_telejump(0_39_52_31_3); [label,rehnisons_i_hear_a_woman_is_staying_here] switch_int(%elena_progress) { case ^quest_elena_returned_book: { - ~chatplayer(happy, "Hi, I hear a woman called is staying here."); - ~chatnpc(sad, "Yes she was staying here,|but slightly over a week ago|she was getting ready to go back."); - ~chatnpc(sad, "However she never managed to leave.|My daughter Milli was playing near the west wall|when she saw some shadowy figures jump out and grab her.|Milli is upstairs if you wish to speak to her."); // TODO this chathead should be null or something idk - jordan - ~chatnpc(sad, "Milli is upstairs if you wish to speak to her."); + ~chatplayer("Hi, I hear a woman called is staying here."); + ~chatnpc("Yes she was staying here,|but slightly over a week ago|she was getting ready to go back."); + ~chatnpc("However she never managed to leave.|My daughter Milli was playing near the west wall|when she saw some shadowy figures jump out and grab her.|Milli is upstairs if you wish to speak to her."); // TODO this chathead should be null or something idk - jordan + ~chatnpc("Milli is upstairs if you wish to speak to her."); } case ^quest_elena_spoke_to_milli, ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek: { - ~chatnpc(quiz, "Any luck with finding yet?"); - ~chatplayer(sad, "Not yet..."); - ~chatnpc(sad, "I wish you luck, she did a lot for us"); + ~chatnpc("Any luck with finding yet?"); + ~chatplayer("Not yet..."); + ~chatnpc("I wish you luck, she did a lot for us"); } case ^quest_elena_freed_elena, ^elena_complete: { - ~chatnpc(quiz, "Any luck finding yet?"); - ~chatplayer(happy, "Yes, she is safe at home now."); - ~chatnpc(happy, "That's good to hear, she helped us a lot."); + ~chatnpc("Any luck finding yet?"); + ~chatplayer("Yes, she is safe at home now."); + ~chatnpc("That's good to hear, she helped us a lot."); } } [label,rehnisons_ask_milli_what_happened] switch_int(%elena_progress) { case ^quest_elena_returned_book: { - ~chatplayer(neutral, "Hello.|Your parents say you saw what happened to ..."); - ~chatnpc(sad, "*sniff*|Yes I was near the south east corner|when I saw walking by."); - ~chatnpc(sad, "I was about to run to greet her|when some men jumped out.|Shoved a sack over her head|and dragged her into a building."); - ~chatplayer(quiz, "Which building?"); - ~chatnpc(sad, "It was the mossy windowless building|in that south east corner of West Ardougne."); + ~chatplayer("Hello.|Your parents say you saw what happened to ..."); + ~chatnpc("*sniff*|Yes I was near the south east corner|when I saw walking by."); + ~chatnpc("I was about to run to greet her|when some men jumped out.|Shoved a sack over her head|and dragged her into a building."); + ~chatplayer("Which building?"); + ~chatnpc("It was the mossy windowless building|in that south east corner of West Ardougne."); ~quest_elena_set_progress(^quest_elena_spoke_to_milli); } case ^quest_elena_spoke_to_milli, ^quest_elena_spoke_to_plague_house, ^quest_elena_spoke_to_clerk, ^quest_elena_spoke_to_bravek, ^quest_elena_spoke_cured_bravek: { - ~chatnpc(quiz, "Have you found yet?"); - ~chatplayer(sad, "No... I am still looking"); - ~chatnpc(sad, "I hope you find her...|She was nice."); + ~chatnpc("Have you found yet?"); + ~chatplayer("No... I am still looking"); + ~chatnpc("I hope you find her...|She was nice."); } case ^elena_complete: { - ~chatnpc(quiz, "Have you found yet?"); - ~chatplayer(happy, "Yes, she's safe at home now."); - ~chatnpc(neutral, "I hope she comes and visits sometime."); - ~chatplayer(neutral, "Maybe."); + ~chatnpc("Have you found yet?"); + ~chatplayer("Yes, she's safe at home now."); + ~chatnpc("I hope she comes and visits sometime."); + ~chatplayer("Maybe."); } } diff --git a/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 b/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 index c7a6e2416..4f9183e24 100644 --- a/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 +++ b/data/src/scripts/quests/quest_elena/scripts/sewerpipe.rs2 @@ -5,7 +5,7 @@ switch_int(%elena_progress) { if (inv_getobj(worn, ^wearpos_hat) = gasmask) { @elena_climb_through_sewerpipe; } else if (npc_find(coord, edmond, 20, 0) = true) { - ~chatnpc(neutral, "I can't let you enter the city without your gas mask on."); + ~chatnpc("I can't let you enter the city without your gas mask on."); } } case ^elena_complete: { diff --git a/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 b/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 index f09b94fa4..ddcbccba6 100644 --- a/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 +++ b/data/src/scripts/quests/quest_fishingcompo/scripts/hemenster_fishing.rs2 @@ -155,7 +155,7 @@ p_opnpc(2); [proc,in_hemenster_comp](boolean) if (%hemenster_comp_stage = ^hemenster_comp_not_entered) { // Havn't entered the competition yet if(npc_find(coord, bonzo, 12, 0) = true) { - ~chatnpc(happy, "Hey, you need to pay to enter the competition first! Only 5 gp entrance fee!"); + ~chatnpc("Hey, you need to pay to enter the competition first! Only 5 gp entrance fee!"); mes("Talk to Bonzo to pay the entrance fee."); } return (false); @@ -166,7 +166,7 @@ if (%hemenster_comp_stage = ^hemenster_comp_not_entered) { // Havn't entered the return (false); }else if (%hemenster_comp_stage = ^hemenster_comp_all_fish_caught) { // 3 fish caught if(npc_find(coord, bonzo, 12, 0) = true) { - ~chatnpc(happy, "Okay folks, time's up!|Let's see who caught the biggest fish!"); + ~chatnpc("Okay folks, time's up!|Let's see who caught the biggest fish!"); @bonzo_handover_catch; } return (false); diff --git a/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 b/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 index bcb776162..8297d1217 100644 --- a/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 +++ b/data/src/scripts/quests/quest_fishingcompo/scripts/quest_fishingcompo.rs2 @@ -33,10 +33,10 @@ if(coordx(coord) <= coordx(loc_coord)) { ~open_fishingcompo_gate; return; } -~chatnpc_specific("Morris", morris, neutral, "Competition pass please."); +~chatnpc_specific("Morris", morris, "Competition pass please."); if(inv_total(inv, fishing_pass) > 0) { ~objboxt(fishing_pass, "You show Morris your pass."); - ~chatnpc_specific("Morris", morris, happy, "Move on through."); + ~chatnpc_specific("Morris", morris, "Move on through."); if_close; p_teleport(loc_coord); ~open_fishingcompo_gate; @@ -44,10 +44,10 @@ if(inv_total(inv, fishing_pass) > 0) { } def_int $option = ~p_choice2("I don't have one of them.", 1, "What do I need that for?", 2); if($option = 1) { - ~chatplayer(sad, "I don't have one of them."); + ~chatplayer("I don't have one of them."); } else if($option = 2) { - ~chatplayer(confused, "What do I need that for?"); - ~chatnpc_specific("Morris", morris, neutral, "This is the entrance to the Hemenster fishing|competition. It's a high class competition.|Invitation only."); + ~chatplayer("What do I need that for?"); + ~chatnpc_specific("Morris", morris, "This is the entrance to the Hemenster fishing|competition. It's a high class competition.|Invitation only."); } [proc,open_fishingcompo_gate] @@ -93,12 +93,12 @@ if(%hemenster_comp_stage = ^hemenster_comp_paidfee) { [label,move_hemenster_pipe] if(npc_find(coord, sinister_stranger, 8, 0) = true) { - ~chatnpc(angry, "Arrgh! WHAT is that GHASTLY smell???|I think I will move over here instead..."); + ~chatnpc("Arrgh! WHAT is that GHASTLY smell???|I think I will move over here instead..."); npc_tele(0_41_53_7_43); // telejumps in classic npc_facesquare(movecoord(npc_coord, 1, 0, 0)); if (npc_find(coord, bonzo, 12, 0) = true) { %fishingcompo_progress = ^fishingcompo_garlic_comp; - ~chatnpc(confused, "Hmm. You'd better go and take the area by the pipes then."); + ~chatnpc("Hmm. You'd better go and take the area by the pipes then."); ~mesbox("Your fishing competition spot is now beside the pipes."); } } diff --git a/data/src/scripts/quests/quest_gobdip/scripts/quest_gobdip.rs2 b/data/src/scripts/quests/quest_gobdip/scripts/quest_gobdip.rs2 index 4003c5a04..6ba7e154a 100644 --- a/data/src/scripts/quests/quest_gobdip/scripts/quest_gobdip.rs2 +++ b/data/src/scripts/quests/quest_gobdip/scripts/quest_gobdip.rs2 @@ -1,59 +1,59 @@ [label,goblin_diplomacy_greet_general_bentnoze] -~chatnpc(goblinchat, "Red armour best."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "No, it has to be green!"); -~chatnpc(goblinchat, "Go away, human, we busy."); +~chatnpc("Red armour best."); +~chatnpc_specific("General Wartface", general_wartface, "No, it has to be green!"); +~chatnpc("Go away, human, we busy."); @goblin_diplomacy_greet_player_reply; [label,goblin_diplomacy_greet_general_wartface] -~chatnpc(goblinchat, "Green armour best."); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "No, no, red every time."); -~chatnpc(goblinchat, "Go away, human, we busy."); +~chatnpc("Green armour best."); +~chatnpc_specific("General Bentnoze", general_bentnoze, "No, no, red every time."); +~chatnpc("Go away, human, we busy."); @goblin_diplomacy_greet_player_reply; [label,goblin_diplomacy_start] -~chatplayer(neutral, "Not very busy in here today, is it?"); -~chatnpc(shifty, "No, it was earlier. There was a guy in here saying the goblins up by the mountain are arguing again. Of all things, about the colour of their armour."); -~chatnpc(angry, "Knowing the goblins, it could easily turn into a full blown war. Which wouldn't be good. Goblin wars make such a mess of the countryside."); -~chatplayer(neutral, "Well, if I have time, I'll see if I can go and knock some sense into them."); +~chatplayer("Not very busy in here today, is it?"); +~chatnpc("No, it was earlier. There was a guy in here saying the goblins up by the mountain are arguing again. Of all things, about the colour of their armour."); +~chatnpc("Knowing the goblins, it could easily turn into a full blown war. Which wouldn't be good. Goblin wars make such a mess of the countryside."); +~chatplayer("Well, if I have time, I'll see if I can go and knock some sense into them."); %gobdip_progress = 1; ~send_quest_progress(questlist:gobdip, %gobdip_progress, ^gobdip_complete); [label,goblin_diplomacy_orange_armour] -~chatplayer("confused", "Do you want me to pick an armour colour for you?"); -~chatplayer("quiz", "Different to either green or red?"); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Hmm, me dunno what that'd look like. You'd have to bring me some, so us could decide."); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "Yep, bring us orange armour."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Yep orange might be good."); +~chatplayer("Do you want me to pick an armour colour for you?"); +~chatplayer("Different to either green or red?"); +~chatnpc_specific("General Wartface", general_wartface, "Hmm, me dunno what that'd look like. You'd have to bring me some, so us could decide."); +~chatnpc_specific("General Bentnoze", general_bentnoze, "Yep, bring us orange armour."); +~chatnpc_specific("General Wartface", general_wartface, "Yep orange might be good."); %gobdip_progress = 2; [label,goblin_diplomacy_blue_armour] -~chatplayer("quiz", "I have some orange armour."); +~chatplayer("I have some orange armour."); inv_del(inv, goblin_mail_orange, 1); %gobdip_progress = 3; ~mesbox("You give some goblin armour to the goblins."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "No. I don't like that much."); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "It clashes with my skin colour."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Try bringing us blue armour."); +~chatnpc_specific("General Wartface", general_wartface, "No. I don't like that much."); +~chatnpc_specific("General Bentnoze", general_bentnoze, "It clashes with my skin colour."); +~chatnpc_specific("General Wartface", general_wartface, "Try bringing us blue armour."); [label,goblin_diplomacy_brown_armour] -~chatplayer("quiz", "I have some blue armour."); +~chatplayer("I have some blue armour."); inv_del(inv, goblin_mail_blue, 1); %gobdip_progress = 4; ~mesbox("You give some goblin armour to the goblins."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Doesn't seem quite right."); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "Maybe if it was a bit lighter."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Yeah try brown."); -~chatplayer(goblinchat, "I thought that was the armour you were changing from? But never mind, anything is worth a try."); +~chatnpc_specific("General Wartface", general_wartface, "Doesn't seem quite right."); +~chatnpc_specific("General Bentnoze", general_bentnoze, "Maybe if it was a bit lighter."); +~chatnpc_specific("General Wartface", general_wartface, "Yeah try brown."); +~chatplayer("I thought that was the armour you were changing from? But never mind, anything is worth a try."); [label,goblin_diplomacy_finish] -~chatplayer("quiz", "Ok I've got brown armour."); +~chatplayer("Ok I've got brown armour."); inv_del(inv, goblin_mail, 1); %gobdip_progress = 5; ~mesbox("You give some goblin armour to the goblins."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "This is rather nice."); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "Yes I could see myself wearing somethin' like that."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "It's a deal then brown armour it is."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Thank you for sorting our argument."); +~chatnpc_specific("General Wartface", general_wartface, "This is rather nice."); +~chatnpc_specific("General Bentnoze", general_bentnoze, "Yes I could see myself wearing somethin' like that."); +~chatnpc_specific("General Wartface", general_wartface, "It's a deal then brown armour it is."); +~chatnpc_specific("General Wartface", general_wartface, "Thank you for sorting our argument."); queue(goblin_diplomacy_complete_quest, 0); [queue,goblin_diplomacy_complete_quest] @@ -63,8 +63,8 @@ inv_add(inv, gold_bar, 1); ~send_quest_complete(questlist:gobdip, gold_bar, 250, ^gobdip_questpoints, "You have completed the\\nGoblin Diplomacy Quest!"); [label,goblin_diplomacy_completed] -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Now you've solved our argument we gotta think of something else to do."); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "Yep, we bored now."); +~chatnpc_specific("General Wartface", general_wartface, "Now you've solved our argument we gotta think of something else to do."); +~chatnpc_specific("General Bentnoze", general_bentnoze, "Yep, we bored now."); [label,goblin_diplomacy_greet_player_reply] switch_int (%gobdip_progress) { @@ -85,43 +85,43 @@ switch_int ($option) { } [label,goblin_diplomacy_greet_player_reply_stage_2] -~chatnpc(goblinchat, "Oh it you."); +~chatnpc("Oh it you."); if (inv_total(inv, goblin_mail_orange) = 0) { - ~chatnpc(goblinchat, "Have you got some orange goblin armour yet?"); - ~chatplayer(bored, "Err no."); - ~chatnpc(goblinchat, "Come back when you have some."); + ~chatnpc("Have you got some orange goblin armour yet?"); + ~chatplayer("Err no."); + ~chatnpc("Come back when you have some."); return; } @goblin_diplomacy_blue_armour; [label,goblin_diplomacy_greet_player_reply_stage_3] if (inv_total(inv, goblin_mail_blue) = 0) { - ~chatnpc(goblinchat, "Have you got some brown goblin armour yet?"); - ~chatplayer(bored, "Err, no."); - ~chatnpc(goblinchat, "Come back when you have some."); + ~chatnpc("Have you got some brown goblin armour yet?"); + ~chatplayer("Err, no."); + ~chatnpc("Come back when you have some."); return; } @goblin_diplomacy_brown_armour; [label,goblin_diplomacy_greet_player_reply_stage_4] if (inv_total(inv, goblin_mail) = 0) { - ~chatnpc(goblinchat, "Have you got some brown goblin armour yet?"); - ~chatplayer(bored, "Err, no."); - ~chatnpc(goblinchat, "Come back when you have some."); + ~chatnpc("Have you got some brown goblin armour yet?"); + ~chatplayer("Err, no."); + ~chatnpc("Come back when you have some."); return; } @goblin_diplomacy_finish; [label,goblin_diplomacy_greet_player_reply_stage_1_option_1] -~chatplayer("confused", "Why are you arguing about the colour of your armour?"); -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "We decide to celebrate goblin new century by changing colour of our armour, brown get boring after a bit. We want change."); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Problem is they want different change to us."); +~chatplayer("Why are you arguing about the colour of your armour?"); +~chatnpc_specific("General Bentnoze", general_bentnoze, "We decide to celebrate goblin new century by changing colour of our armour, brown get boring after a bit. We want change."); +~chatnpc_specific("General Wartface", general_wartface, "Problem is they want different change to us."); @goblin_diplomacy_greet_player_reply; [label,goblin_diplomacy_greet_player_reply_stage_1_option_2] -~chatplayer("confused", "Wouldn't you prefer peace?"); -~chatnpc_specific("General Wartface", general_wartface, goblinchat, "Yeah peace is good as long as it peace wearing green armour."); +~chatplayer("Wouldn't you prefer peace?"); +~chatnpc_specific("General Wartface", general_wartface, "Yeah peace is good as long as it peace wearing green armour."); // https://storage.googleapis.com/tannerdino/images/Convo1.png -~chatnpc_specific("General Bentnoze", general_bentnoze, goblinchat, "But green too much like skin.|Nearly make you look naked!"); +~chatnpc_specific("General Bentnoze", general_bentnoze, "But green too much like skin.|Nearly make you look naked!"); @goblin_diplomacy_greet_player_reply; diff --git a/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 b/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 index 384d88492..626c14912 100644 --- a/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 @@ -1,10 +1,10 @@ [opnpc1,black_knight_titan] -~chatnpc(angry, "@red@I am the Black Knight Titan!|@red@You must pass through|@red@me before you can|@red@continue in this realm!"); +~chatnpc("@red@I am the Black Knight Titan!|@red@You must pass through|@red@me before you can|@red@continue in this realm!"); switch_int(~p_choice2("Ok, have at ye oh evil knight!", 1, "Actually I think I'll run away!", 2)) { case 1: - ~chatplayer(angry, "Ok, have at ye oh evil knight!"); + ~chatplayer("Ok, have at ye oh evil knight!"); ~npc_retaliate(0); - case 2: ~chatplayer(shock, "Actually I think I'll run away!"); + case 2: ~chatplayer("Actually I think I'll run away!"); } [opnpc2,black_knight_titan] @@ -36,8 +36,8 @@ if(inv_total(worn, excalibur) = 0) { // if this was queued we'll need to regain %grail_progress = ^grail_failed_defeat_titan; } mes("Maybe you need something more to beat the titan?"); - ~chatnpc(angry, "@red@Puny mortal...|@red@You cannot defeat me..."); - ~chatnpc(angry, "@red@I...|@red@Am...|@red@INVINCIBLE!!!"); + ~chatnpc("@red@Puny mortal...|@red@You cannot defeat me..."); + ~chatnpc("@red@I...|@red@Am...|@red@INVINCIBLE!!!"); } else { mes("Well done! You have defeated the Black Knight Titan!"); def_coord $dest = movecoord(npc_coord, 1, 0, 0); diff --git a/data/src/scripts/quests/quest_grail/scripts/crone.rs2 b/data/src/scripts/quests/quest_grail/scripts/crone.rs2 index 07b148dda..dc7fe18e3 100644 --- a/data/src/scripts/quests/quest_grail/scripts/crone.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/crone.rs2 @@ -1,37 +1,37 @@ [opnpc1,crone] -~chatnpc(happy, "Hello deary."); -~chatplayer(confused, "Um... hello."); +~chatnpc("Hello deary."); +~chatplayer("Um... hello."); [label,crone_the_grail] -~chatnpc(quiz, "Did you say the Grail?|You are a Grail knight, yes?|Well you'd better hurry. A Fisher King is in pain."); -~chatplayer(sad, "Well I would, but I don't know where I am going!"); -~chatnpc(neutral, "Go to where the six heads face,|blow the whistle and away you go!"); +~chatnpc("Did you say the Grail?|You are a Grail knight, yes?|Well you'd better hurry. A Fisher King is in pain."); +~chatplayer("Well I would, but I don't know where I am going!"); +~chatnpc("Go to where the six heads face,|blow the whistle and away you go!"); if(%grail_progress = ^grail_spoken_merlin) { %grail_progress = 4; } @multi4("What are the six heads?", crone_six_heads, "What's a Fisher King?", crone_fisherking, "Ok, I will go searching.", crone_searching, "What do you mean by the whistle?", crone_whistle); [label,crone_six_heads] -~chatplayer(quiz, "What are the six heads?"); -~chatnpc(neutral, "The six stone heads have appeared just recently in the world. They all face the point of realm crossing. Find where two of the heads face,"); -~chatnpc(neutral, "and you should be able to pinpoint where it is."); +~chatplayer("What are the six heads?"); +~chatnpc("The six stone heads have appeared just recently in the world. They all face the point of realm crossing. Find where two of the heads face,"); +~chatnpc("and you should be able to pinpoint where it is."); @multi4("What's a Fisher King?", crone_fisherking, "Ok, I will go searching.", crone_searching, "What do you mean by the whistle?", crone_whistle, "The point of realm crossing?", crone_realm); [label,crone_fisherking] -~chatplayer(quiz, "What's a Fisher King?"); -~chatnpc(neutral, "The Fisher King is the owner and slave of the Grail..."); +~chatplayer("What's a Fisher King?"); +~chatnpc("The Fisher King is the owner and slave of the Grail..."); @multi3("What are the six heads?", crone_six_heads, "Ok, I will go searching..", crone_searching, "What do you mean by the whistle?", crone_whistle); // .. is intentional [label,crone_whistle] -~chatplayer(neutral, "What do you mean by the whistle?"); -~chatnpc(neutral, "You don't know about the whistles yet?|The whistles are easy."); -~chatnpc(neutral, "You will need one to get to and from the Fisher King's realm. They reside in a haunted manor house in Misthalin, though you may not perceive them unless you carry something from the realm of the Fisher King..."); +~chatplayer("What do you mean by the whistle?"); +~chatnpc("You don't know about the whistles yet?|The whistles are easy."); +~chatnpc("You will need one to get to and from the Fisher King's realm. They reside in a haunted manor house in Misthalin, though you may not perceive them unless you carry something from the realm of the Fisher King..."); @multi3("What are the six heads?", crone_six_heads, "What's a Fisher King?", crone_fisherking, "Ok, I will go searching.", crone_searching); [label,crone_searching] -~chatplayer(neutral, "Ok, I will go searching."); -~chatnpc(neutral, "Good luck with that."); +~chatplayer("Ok, I will go searching."); +~chatnpc("Good luck with that."); [label,crone_realm] -~chatplayer(neutral, "The point of realm crossing?"); -~chatnpc(neutral, "The realm of the Fisher King is not quite of this reality. It is of a reality very close to ours though... Where it is easiest to cross, THAT is a point of realm crossing."); +~chatplayer("The point of realm crossing?"); +~chatnpc("The realm of the Fisher King is not quite of this reality. It is of a reality very close to ours though... Where it is easiest to cross, THAT is a point of realm crossing."); diff --git a/data/src/scripts/quests/quest_grail/scripts/fisherman.rs2 b/data/src/scripts/quests/quest_grail/scripts/fisherman.rs2 index bb67d9f81..4247ebb87 100644 --- a/data/src/scripts/quests/quest_grail/scripts/fisherman.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/fisherman.rs2 @@ -1,17 +1,17 @@ [opnpc1,grail_fisherman] -~chatnpc(happy, "Hi! I don't get many visitors here!"); +~chatnpc("Hi! I don't get many visitors here!"); switch_int(~p_choice3("How's the fishing?", 1, "Any idea how to get into the castle?", 2, "Yes, well, this place is a dump.", 3)) { case 1: - ~chatplayer(quiz, "How's the fishing?"); - ~chatnpc(sad, "Not amazing.|Not many fish can live in this gungey stuff.|I remember when this was a pleasant river|teeming with every sort of fish..."); + ~chatplayer("How's the fishing?"); + ~chatnpc("Not amazing.|Not many fish can live in this gungey stuff.|I remember when this was a pleasant river|teeming with every sort of fish..."); case 2: - ~chatplayer(quiz, "Any idea how to get into the castle?"); - ~chatnpc(shock, "Why, that's easy!"); - ~chatnpc(neutral, "Just ring one of the bells outside."); - ~chatplayer(quiz, "...I didn't see any bells."); - ~chatnpc(neutral, "You must be blind then. There's ALWAYS bells there when I go to the castle."); + ~chatplayer("Any idea how to get into the castle?"); + ~chatnpc("Why, that's easy!"); + ~chatnpc("Just ring one of the bells outside."); + ~chatplayer("...I didn't see any bells."); + ~chatnpc("You must be blind then. There's ALWAYS bells there when I go to the castle."); obj_add(0_43_73_10_22, grail_bell, 1, 500); case 3: - ~chatplayer(angry, "Yes, well, this place is a dump!"); - ~chatnpc(neutral, "This place used to be very beautiful,|however, as our king grows old and weak,|the land seems to be dying too."); + ~chatplayer("Yes, well, this place is a dump!"); + ~chatnpc("This place used to be very beautiful,|however, as our king grows old and weak,|the land seems to be dying too."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_grail/scripts/grail_maiden.rs2 b/data/src/scripts/quests/quest_grail/scripts/grail_maiden.rs2 index 3a9dfb804..69f5a84a4 100644 --- a/data/src/scripts/quests/quest_grail/scripts/grail_maiden.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/grail_maiden.rs2 @@ -1,2 +1,2 @@ [opnpc1,grail_maiden] -~chatnpc(happy, "Welcome to the Grail castle."); \ No newline at end of file +~chatnpc("Welcome to the Grail castle."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_grail/scripts/king_percival.rs2 b/data/src/scripts/quests/quest_grail/scripts/king_percival.rs2 index 992bf371f..8242e1076 100644 --- a/data/src/scripts/quests/quest_grail/scripts/king_percival.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/king_percival.rs2 @@ -1,4 +1,4 @@ [opnpc1,king_percival] -~chatnpc(happy, "You missed all the excitement!"); -~chatnpc(happy, "I got here and agreed to take over duties as king here, then before my eyes the most miraculous changes occured here... grass and trees were growing outside before our very eyes!"); -~chatnpc(happy, "Thank you very much for showing me the way home."); \ No newline at end of file +~chatnpc("You missed all the excitement!"); +~chatnpc("I got here and agreed to take over duties as king here, then before my eyes the most miraculous changes occured here... grass and trees were growing outside before our very eyes!"); +~chatnpc("Thank you very much for showing me the way home."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_grail/scripts/peasent.rs2 b/data/src/scripts/quests/quest_grail/scripts/peasent.rs2 index c809212e0..e5b11c2b0 100644 --- a/data/src/scripts/quests/quest_grail/scripts/peasent.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/peasent.rs2 @@ -1,5 +1,5 @@ [opnpc1,peasent_unhappy] -~chatnpc(sad, "Woe is me!|Our crops are all failing...|how shall I feed myself this winter?"); +~chatnpc("Woe is me!|Our crops are all failing...|how shall I feed myself this winter?"); [opnpc1,peasent_happy] -~chatnpc(happy, "Oh happy day!|Suddenly our crops are growing again!|It'll be a bumper harvest this year!"); \ No newline at end of file +~chatnpc("Oh happy day!|Suddenly our crops are growing again!|It'll be a bumper harvest this year!"); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 b/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 index b9ead67d5..7977a2e7c 100644 --- a/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/quest_grail.rs2 @@ -52,7 +52,7 @@ if(inzone(0_42_50_52_34, 0_42_50_55_37, coord) = true) { // Karamja -> fisher's [opheld1,grail_bell] ~mesbox("Ting-a-ling-a-ling!"); if(npc_find(coord, grail_maiden, 4, 0) = true & inzone(0_43_73_0_0, 0_43_73_63_63, coord) = true) { - ~chatnpc(confused, "Welcome to the Grail castle.|You should come inside,|it's cold out here."); + ~chatnpc("Welcome to the Grail castle.|You should come inside,|it's cold out here."); def_coord $dest = 0_43_73_9_20; // osrs does p_teleport with controlling walkspeed, can't do 1 tile each here since the next mesbox would be stalled by p_delay p_teleport($dest); diff --git a/data/src/scripts/quests/quest_grail/scripts/sir_percival.rs2 b/data/src/scripts/quests/quest_grail/scripts/sir_percival.rs2 index 992b9ca99..d556fb5e8 100644 --- a/data/src/scripts/quests/quest_grail/scripts/sir_percival.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/sir_percival.rs2 @@ -1,50 +1,50 @@ [opnpc1,sir_percival] switch_int(%grail_progress) { case ^grail_finding_percival: @percival_found; - case ^grail_given_whistle: ~chatnpc(neutral, "I said I will see you there then!"); + case ^grail_given_whistle: ~chatnpc("I said I will see you there then!"); case ^grail_complete: - ~chatplayer(quiz, "Aren't you supposed to be at the Grail Castle?"); - ~chatnpc(confused, "Huh? I think you're confusing me with somebody else..."); + ~chatplayer("Aren't you supposed to be at the Grail Castle?"); + ~chatnpc("Huh? I think you're confusing me with somebody else..."); case default: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello yourself."); + ~chatplayer("Hello."); + ~chatnpc("Hello yourself."); } [label,percival_found] -~chatnpc(happy, "Wow, thank you! I could hardly breathe in there!"); +~chatnpc("Wow, thank you! I could hardly breathe in there!"); @multi3("How did you end up in a sack?", percival_sack, "Come with me, I shall make you a king.", percival_make_king, "Your father wishes to speak to you.", percival_father); [label,percival_sack] -~chatplayer(quiz, "How did you end up in a sack?"); -~chatnpc(sad, "It's a little embarrassing really."); -~chatnpc(sad, "After going on a long and challenging quest|to retrieve the boots of Arkaneeses,|defeating many powerful enemies on the way,|I fell into a goblin trap!"); -~chatnpc(sad, "I've been kept as a slave here for the last 3 months!"); -~chatnpc(sad, "A day or so ago, they decided it was a fun game|to put me in this sack:|then they forgot about me!"); -~chatnpc(sad, "I'm now very hungry, and my bones feel very stiff."); +~chatplayer("How did you end up in a sack?"); +~chatnpc("It's a little embarrassing really."); +~chatnpc("After going on a long and challenging quest|to retrieve the boots of Arkaneeses,|defeating many powerful enemies on the way,|I fell into a goblin trap!"); +~chatnpc("I've been kept as a slave here for the last 3 months!"); +~chatnpc("A day or so ago, they decided it was a fun game|to put me in this sack:|then they forgot about me!"); +~chatnpc("I'm now very hungry, and my bones feel very stiff."); @multi2("Come with me, I shall make you a king.", percival_make_king, "Your father wishes to speak to you.", percival_father); [label,percival_make_king] -~chatplayer(neutral, "Come with me, I shall make you a king."); -~chatnpc(quiz, "What are you talking about?"); -~chatnpc(quiz, "The king of where?"); -~chatplayer(sad, "Your father is apparently someone called the Fisher King. He is dying and wishes you to be his heir."); +~chatplayer("Come with me, I shall make you a king."); +~chatnpc("What are you talking about?"); +~chatnpc("The king of where?"); +~chatplayer("Your father is apparently someone called the Fisher King. He is dying and wishes you to be his heir."); @percival_told_that; [label,percival_father] -~chatplayer(neutral, "Your father wishes to speak to you."); -~chatnpc(quiz, "My father? You have spoken to him recently?"); -~chatplayer(sad, "He is dying and wishes you to be his heir."); +~chatplayer("Your father wishes to speak to you."); +~chatnpc("My father? You have spoken to him recently?"); +~chatplayer("He is dying and wishes you to be his heir."); @percival_told_that; [label,percival_told_that] -~chatnpc(sad, "I have been told that before."); -~chatnpc(sad, "I have not been able to find that castle again though..."); -~chatplayer(neutral, "Well, I do have the means to get us there - a magic whistle!"); +~chatnpc("I have been told that before."); +~chatnpc("I have not been able to find that castle again though..."); +~chatplayer("Well, I do have the means to get us there - a magic whistle!"); if(inv_total(inv, magic_whistle) > 0) { ~mesbox("You give a whistle to Sir Percival. You tell sir Percival what to do with the whistle."); - ~chatnpc(neutral, "Ok, I will see you there then!"); + ~chatnpc("Ok, I will see you there then!"); inv_del(inv, magic_whistle, 1); %grail_progress = ^grail_given_whistle; return; } -~chatplayer(neutral, "I will just go and get you one."); \ No newline at end of file +~chatplayer("I will just go and get you one."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_grail/scripts/the_fisher_king.rs2 b/data/src/scripts/quests/quest_grail/scripts/the_fisher_king.rs2 index a7ab89ef5..56ca89c5a 100644 --- a/data/src/scripts/quests/quest_grail/scripts/the_fisher_king.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/the_fisher_king.rs2 @@ -1,33 +1,33 @@ [opnpc1,the_fisher_king] -~chatnpc(happy, "Ah! You got inside at last!|You spent all that time fumbling around outside,|I thought you'd never make it here."); +~chatnpc("Ah! You got inside at last!|You spent all that time fumbling around outside,|I thought you'd never make it here."); @multi3("How did you know what I have been doing?", fisher_king_how, "I seek the Holy Grail.", fisher_king_grail, "You don't look too well.", fisher_king_well); [label,fisher_king_how] -~chatplayer(confused, "How did you know what I have been doing?"); -~chatnpc(neutral, "Oh, I can see what is happening in my realm.|I have sent clues to help you get here,|such as the fisherman, and the crone."); +~chatplayer("How did you know what I have been doing?"); +~chatnpc("Oh, I can see what is happening in my realm.|I have sent clues to help you get here,|such as the fisherman, and the crone."); @multi3("I seek the Holy Grail.", fisher_king_grail, "You don't look too well.", fisher_king_well, "Do you mind if I have a look around?", fisher_king_look); [label,fisher_king_grail] -~chatplayer(neutral, "I seek the Holy Grail."); -~chatnpc(happy, "Ah excellent. A knight come to seek the Holy Grail.|Maybe our land can be restored to its former glory."); -~chatnpc(happy, "At the moment the Grail cannot be removed from the castle. Legend has it a questing knight will one day work out how to restore our land; then he will claim the Grail as his prize."); -~chatplayer(neutral, "Any ideas how I can restore the land?"); -~chatnpc(sad, "None at all."); +~chatplayer("I seek the Holy Grail."); +~chatnpc("Ah excellent. A knight come to seek the Holy Grail.|Maybe our land can be restored to its former glory."); +~chatnpc("At the moment the Grail cannot be removed from the castle. Legend has it a questing knight will one day work out how to restore our land; then he will claim the Grail as his prize."); +~chatplayer("Any ideas how I can restore the land?"); +~chatnpc("None at all."); @multi2("You don't look too well.", fisher_king_well, "Do you mind if I have a look around?", fisher_king_look); [label,fisher_king_look] -~chatplayer(quiz, "Do you mind if I have a look around?"); -~chatnpc(happy, "No, not at all. Please, be my guest."); +~chatplayer("Do you mind if I have a look around?"); +~chatnpc("No, not at all. Please, be my guest."); [label,fisher_king_well] -~chatplayer(neutral, "You don't look too well."); -~chatnpc(sad, "Nope, I don't feel so good either."); -~chatnpc(neutral, "I fear my life is running short...|Alas, my son and heir is not here.|I am waiting for my son to return to this castle."); -~chatnpc(neutral, "If you could find my son, that would be a great weight off my shoulders."); -~chatplayer(quiz, "Who is your son?"); -~chatnpc(neutral, "He is known as Percival."); -~chatnpc(neutral, "I believe he is a knight of the round table."); -~chatplayer(neutral, "I shall go and see if I can find him."); +~chatplayer("You don't look too well."); +~chatnpc("Nope, I don't feel so good either."); +~chatnpc("I fear my life is running short...|Alas, my son and heir is not here.|I am waiting for my son to return to this castle."); +~chatnpc("If you could find my son, that would be a great weight off my shoulders."); +~chatplayer("Who is your son?"); +~chatnpc("He is known as Percival."); +~chatnpc("I believe he is a knight of the round table."); +~chatplayer("I shall go and see if I can find him."); if(%grail_progress < ^grail_finding_percival) { %grail_progress = ^grail_finding_percival; } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 b/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 index 9641d4698..669895c5a 100644 --- a/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 +++ b/data/src/scripts/quests/quest_haunted/scripts/quest_haunted.rs2 @@ -77,14 +77,14 @@ if($dist > 0) { [oploc1,loc_153] if(%manor_fountain_poisoned = 1) { if(inv_total(inv, pressure_gauge) = 0 & %haunted_progress < ^haunted_complete) { - ~chatplayer(quiz, "There seems to be a pressure gauge in here.|There are also some dead fish."); + ~chatplayer("There seems to be a pressure gauge in here.|There are also some dead fish."); ~mesbox("You get the pressure gauge from the fountain."); inv_add(inv, pressure_gauge, 1); } else { ~mesbox("It's full of dead fish!"); // same message as OSRS but should probably be a mesbox according to rsc } } else { - ~chatplayer(quiz, "There seems to be a pressure gauge in here.|There are a lot of pirhanas in there though.|I can't get the gauge out."); + ~chatplayer("There seems to be a pressure gauge in here.|There are a lot of pirhanas in there though.|I can't get the gauge out."); } [opheldu,poison] diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 index b8fb8d89f..acde69217 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 @@ -2,88 +2,88 @@ switch_int(%hazeelcult_progress) { case ^hazeelcult_clivet_decision: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "How did YOU get in here?"); - ~chatplayer(sad, "I've come for the Carnillean family armour. Hand it over, or face the consequences."); - ~chatnpc(angry, "I thought I made it clear to the butler you could not be allowed to interfere with our mission. The incompetent fool must be going soft."); - ~chatplayer(confused, "So the butler's part of your sordid little cult huh? Why is it ALWAYS the butler? I should have known..."); - ~chatnpc(angry, "Well you won't live long enough to tell anyone! DIE!!!"); + ~chatnpc("How did YOU get in here?"); + ~chatplayer("I've come for the Carnillean family armour. Hand it over, or face the consequences."); + ~chatnpc("I thought I made it clear to the butler you could not be allowed to interfere with our mission. The incompetent fool must be going soft."); + ~chatplayer("So the butler's part of your sordid little cult huh? Why is it ALWAYS the butler? I should have known..."); + ~chatnpc("Well you won't live long enough to tell anyone! DIE!!!"); ~npc_retaliate(0); } else { - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "Can't you see I'm busy???"); + ~chatplayer("Hello."); + ~chatnpc("Can't you see I'm busy???"); } case ^hazeelcult_poured_poison: - ~chatplayer(neutral, "Hi there."); - ~chatnpc(neutral, "Well well well... So we have a new recruit. Clivet told me of your desire to join us in our glorious task to resurrect the mighty Hazeel from his slumber."); - ~chatnpc(neutral, "To accomplish this, we require the ancient words of summoning which will restore his shattered body, so that he can bring vengeance upon his enemies."); - ~chatnpc(neutral, "Hazeel in his mighty cunning anticipated that he might be defeated and secured within his home somewhere a powerful magical scroll that could restore him."); - ~chatnpc(neutral, "The words to this powerful enchantment are hidden within the Carnillean mansion, right under the nose of his unsuspecting foes. We already have an agent in place there"); - ~chatnpc(neutral, "in their Butler Jones, a faithful follower to Hazeel. His loyalty to Hazeel is beyond questioning, yet he has been unsuccessful in locating the scroll containing the spell so far."); - ~chatnpc(neutral, "Go back to the mansion, and assist us in finding this enchantment, so that together we can restore Hazeel to his true power and glory!"); + ~chatplayer("Hi there."); + ~chatnpc("Well well well... So we have a new recruit. Clivet told me of your desire to join us in our glorious task to resurrect the mighty Hazeel from his slumber."); + ~chatnpc("To accomplish this, we require the ancient words of summoning which will restore his shattered body, so that he can bring vengeance upon his enemies."); + ~chatnpc("Hazeel in his mighty cunning anticipated that he might be defeated and secured within his home somewhere a powerful magical scroll that could restore him."); + ~chatnpc("The words to this powerful enchantment are hidden within the Carnillean mansion, right under the nose of his unsuspecting foes. We already have an agent in place there"); + ~chatnpc("in their Butler Jones, a faithful follower to Hazeel. His loyalty to Hazeel is beyond questioning, yet he has been unsuccessful in locating the scroll containing the spell so far."); + ~chatnpc("Go back to the mansion, and assist us in finding this enchantment, so that together we can restore Hazeel to his true power and glory!"); %hazeelcult_progress = ^hazeelcult_finished_side_task; case ^hazeelcult_finished_side_task: - ~chatplayer(neutral, "Hello Alomone."); + ~chatplayer("Hello Alomone."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "Out of my way idiot! We are preparing matters your puny mind could not hope to understand!"); + ~chatnpc("Out of my way idiot! We are preparing matters your puny mind could not hope to understand!"); } else { - ~chatnpc(neutral, "Hazeel has waited long enough to return! It is IMPERATIVE you find that spell!"); - ~chatplayer(neutral, "Yeah yeah yeah, I'm on it, I'm ON it."); + ~chatnpc("Hazeel has waited long enough to return! It is IMPERATIVE you find that spell!"); + ~chatplayer("Yeah yeah yeah, I'm on it, I'm ON it."); } case ^hazeelcult_given_armour_or_scroll: - ~chatplayer(neutral, "Hi."); + ~chatplayer("Hi."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "I have no time to waste with the likes of you do-gooder."); + ~chatnpc("I have no time to waste with the likes of you do-gooder."); } else { - ~chatnpc(quiz, "Have you brought me the scroll of restoration to complete the ritual?"); + ~chatnpc("Have you brought me the scroll of restoration to complete the ritual?"); if(inv_total(inv, scroll_of_hazeel) = 0) { - ~chatplayer(sad, "Nope, sorry."); - ~chatnpc(neutral, "You must find it and bring it to me! Without it we cannot resurrect Hazeel and our efforts to do so will fail!"); + ~chatplayer("Nope, sorry."); + ~chatnpc("You must find it and bring it to me! Without it we cannot resurrect Hazeel and our efforts to do so will fail!"); return; } // TODO: confirm queue usage, and opnpc1 on hazeel, this cutscene has been completely changed unfortunately // https://www.youtube.com/watch?v=NqgES3kGOHI - ~chatplayer(neutral, "Yep. Got it right here."); - ~chatnpc(happy, "FINALLY! Quickly, give it to me and I will begin the ritual!"); + ~chatplayer("Yep. Got it right here."); + ~chatnpc("FINALLY! Quickly, give it to me and I will begin the ritual!"); ~mesbox("You hand Alomone the scroll of Hazeel."); - ~chatnpc(happy, "Yes... YES! With the words contained within this scroll our Lord shall return to this realm and bring destruction to our enemies!"); - ~chatnpc(happy, "Watch adventurer, and witness the glorious rebirth of Hazeel!"); - ~chatnpc(neutral, "Lord Hazeel... Lord Zamorak... I call upon the powers of evil... The forces of chaos... The strength of hatred..."); - ~chatnpc(neutral, "Sentente sillaberi junque dithmento! Ia! Ia! dextrimon encanto! termando... imcando... solly enty rando... sentente! Ia! Ia! Indenti zaggarati g'thxa!"); + ~chatnpc("Yes... YES! With the words contained within this scroll our Lord shall return to this realm and bring destruction to our enemies!"); + ~chatnpc("Watch adventurer, and witness the glorious rebirth of Hazeel!"); + ~chatnpc("Lord Hazeel... Lord Zamorak... I call upon the powers of evil... The forces of chaos... The strength of hatred..."); + ~chatnpc("Sentente sillaberi junque dithmento! Ia! Ia! dextrimon encanto! termando... imcando... solly enty rando... sentente! Ia! Ia! Indenti zaggarati g'thxa!"); ~mesbox("Alomone continues to recite the scroll. It is a language you have never heard and do not understand at all."); - ~chatnpc(neutral, "Dintenta! Sententa! Retenta! Q'exjta! Ia! Sottottott! Ia! Dysmenta junque fammatio svelken! Sottey! Sentey! SOLOMENT!"); + ~chatnpc("Dintenta! Sententa! Retenta! Q'exjta! Ia! Sottottott! Ia! Dysmenta junque fammatio svelken! Sottey! Sentey! SOLOMENT!"); ~mesbox("As Alomone finishes reading from the scroll you hear a shrill scream emanate from Hazeel's coffin."); if_close; npc_add(0_40_151_47_5, hazeel, 100); npc_anim(seq_801, 0); p_delay(5); queue(hazeel_leave, 0, npc_uid); // this is probably queued here? - ~chatnpc(neutral, "My loyal followers. I have pride in you all. Never did I expect to return to this land and I see I have much to attend to."); - ~chatnpc(neutral, "Soon this world will cower once more at the name Hazeel, and my fury will blaze across mine enemies just as my loyal followers gain their rewards."); + ~chatnpc("My loyal followers. I have pride in you all. Never did I expect to return to this land and I see I have much to attend to."); + ~chatnpc("Soon this world will cower once more at the name Hazeel, and my fury will blaze across mine enemies just as my loyal followers gain their rewards."); ~mesbox("Hazeel turns to look at your directly."); - ~chatnpc(neutral, "Adventurer. I know that thy efforts were principal in my return to this plane of existence. I offer you my thanks directly."); - ~chatnpc(neutral, "You may not be a follower of Zamorak directly but your cunning and treachery mark you as a friend to the Mahjarrat. Rest assured; I will call on your assistance again."); - ~chatnpc(neutral, "Weak as I am now, my strength shall return, and my followers will be greatly rewarded when my powers peak once more. Join me in my cause as my servant, and all"); - ~chatnpc(neutral, "the riches of this plane shall be yours to share, in domination over all who oppose my kind. You would be wise to pledge yourself now while you still may."); - ~chatplayer(angry, "I serve nobody but myself."); - ~chatnpc(neutral, "Your insolence shall be overlooked this time for I am in truth in your debt. Come close: I shall reward you with wealth such as you deserve."); - ~chatnpc(neutral, "Although your true reward will be later, when Zamorak and I, together, lay waste to this miserable planet, and you are spared as an ally to us."); + ~chatnpc("Adventurer. I know that thy efforts were principal in my return to this plane of existence. I offer you my thanks directly."); + ~chatnpc("You may not be a follower of Zamorak directly but your cunning and treachery mark you as a friend to the Mahjarrat. Rest assured; I will call on your assistance again."); + ~chatnpc("Weak as I am now, my strength shall return, and my followers will be greatly rewarded when my powers peak once more. Join me in my cause as my servant, and all"); + ~chatnpc("the riches of this plane shall be yours to share, in domination over all who oppose my kind. You would be wise to pledge yourself now while you still may."); + ~chatplayer("I serve nobody but myself."); + ~chatnpc("Your insolence shall be overlooked this time for I am in truth in your debt. Come close: I shall reward you with wealth such as you deserve."); + ~chatnpc("Although your true reward will be later, when Zamorak and I, together, lay waste to this miserable planet, and you are spared as an ally to us."); ~mesbox("Hazeel gives you some coins. They seem to be extremely ancient."); - ~chatnpc(neutral, "And now I must leave you loyal subjects for time is short, and I have many pressing matters to address before I may make my return. I must leave now, and head Northwards"); - ~chatnpc(neutral, "to join my fellow mahjarrat and regain my strength and powers. I shall return when I am ready to fight my enemies and much blood shall flow across these lands!"); + ~chatnpc("And now I must leave you loyal subjects for time is short, and I have many pressing matters to address before I may make my return. I must leave now, and head Northwards"); + ~chatnpc("to join my fellow mahjarrat and regain my strength and powers. I shall return when I am ready to fight my enemies and much blood shall flow across these lands!"); ~mesbox("The cultists let out a mighty cheer"); // intentional missing period } case ^hazeelcult_complete: - ~chatplayer(neutral, "Hello again."); + ~chatplayer("Hello again."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "You have crossed my path too many times intruder. Leave or face my wrath."); - ~chatplayer(neutral, "Yeah, whatever."); + ~chatnpc("You have crossed my path too many times intruder. Leave or face my wrath."); + ~chatplayer("Yeah, whatever."); } else { - ~chatnpc(happy, "Now Lord Hazeel is returned unto us we await his strength to return so that we may smite our enemies!"); - ~chatplayer(neutral, "Hey, good for you."); + ~chatnpc("Now Lord Hazeel is returned unto us we await his strength to return so that we may smite our enemies!"); + ~chatplayer("Hey, good for you."); } case default: - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "What? An intruder? Kill him!"); + ~chatplayer("Hello."); + ~chatnpc("What? An intruder? Kill him!"); ~npc_retaliate(0); } diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/butler_jones.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/butler_jones.rs2 index 0f93294cf..c1e75e6cb 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/butler_jones.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/butler_jones.rs2 @@ -2,90 +2,90 @@ switch_int(%hazeelcult_progress) { case ^hazeelcult_complete: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(neutral, "Hello stranger."); - ~chatnpc(neutral, "Why hello there."); - ~chatplayer(quiz, "I take it you're the new butler...?"); - ~chatnpc(neutral, "That's right. I hear that they had some problems with the last one."); - ~chatplayer(neutral, "Yes, you could say that..."); + ~chatplayer("Hello stranger."); + ~chatnpc("Why hello there."); + ~chatplayer("I take it you're the new butler...?"); + ~chatnpc("That's right. I hear that they had some problems with the last one."); + ~chatplayer("Yes, you could say that..."); } else { - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "It's an honour to be in your presence again, adventurer. I hope things are well?"); - ~chatplayer(neutral, "Not bad, thanks. Yourself?"); - ~chatnpc(neutral, "Unfortunately, I am still forced to deal with this insufferable family. Many generations have passed, but they are still the enemy. As such, they must be kept a close eye on."); - ~chatnpc(neutral, "Still, I have no doubt that the time will soon come for me to leave this place. Our lord will certainly have need of me elsewhere once his current work is complete."); - ~chatplayer(neutral, "I see. Well good luck with it all."); + ~chatplayer("Hello there."); + ~chatnpc("It's an honour to be in your presence again, adventurer. I hope things are well?"); + ~chatplayer("Not bad, thanks. Yourself?"); + ~chatnpc("Unfortunately, I am still forced to deal with this insufferable family. Many generations have passed, but they are still the enemy. As such, they must be kept a close eye on."); + ~chatnpc("Still, I have no doubt that the time will soon come for me to leave this place. Our lord will certainly have need of me elsewhere once his current work is complete."); + ~chatplayer("I see. Well good luck with it all."); } case ^hazeelcult_given_armour_or_scroll: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "Cretin. Did you think you could 'save the day' just by accusing me? We've been planning this for YEARS. your meddling has been nothing more than a minor inconvenience."); - ~chatnpc(angry, "When Lord Hazeel returns, the likes of you and the arrogant Carnilleans will be first to suffer his vengeance."); - ~chatplayer(angry, "Not if I can help it!"); - ~chatnpc(angry, "That's basically my point. You cannot help it. Now begone!"); + ~chatnpc("Cretin. Did you think you could 'save the day' just by accusing me? We've been planning this for YEARS. your meddling has been nothing more than a minor inconvenience."); + ~chatnpc("When Lord Hazeel returns, the likes of you and the arrogant Carnilleans will be first to suffer his vengeance."); + ~chatplayer("Not if I can help it!"); + ~chatnpc("That's basically my point. You cannot help it. Now begone!"); } else { - ~chatplayer(neutral, "Hello Jones."); - ~chatnpc(neutral, "Have you recovered the scroll?"); + ~chatplayer("Hello Jones."); + ~chatnpc("Have you recovered the scroll?"); if(inv_total(inv, scroll_of_hazeel) = 0) { - ~chatplayer(confused, "Uh... yeah... about that.. I don't exactly have it right now..."); - ~chatnpc(angry, "Incompetent fool! The future of our entire plans relies on that scroll! You MUST find it and take it back to our hideout as soon as possible!"); + ~chatplayer("Uh... yeah... about that.. I don't exactly have it right now..."); + ~chatnpc("Incompetent fool! The future of our entire plans relies on that scroll! You MUST find it and take it back to our hideout as soon as possible!"); return; } - ~chatplayer(happy, "I have it right here."); - ~chatnpc(shock, "Incredible!"); - ~chatnpc(neutral, "Quick, get it back to our hideout! These are glorious times indeed adventurer, when the mighty Hazeel returns things are REALLY going to change around here!"); + ~chatplayer("I have it right here."); + ~chatnpc("Incredible!"); + ~chatnpc("Quick, get it back to our hideout! These are glorious times indeed adventurer, when the mighty Hazeel returns things are REALLY going to change around here!"); } case ^hazeelcult_finished_side_task: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(neutral, "Jones. We need to talk."); - ~chatnpc(quiz, "Yes? You need some help with your quest?"); - ~chatplayer(angry, "Drop the act Jones. I know you're in league with the cultists."); - ~chatnpc(shock, "W-what? N-no I'm not, don't be silly!"); - ~chatplayer(angry, "Listen pal, I went to your hideout, I heard them talking about you. You're fooling nobody."); - ~chatnpc(angry, "You think you're so smart don't you? You might think you know what's going on but you have no idea."); - ~chatplayer(neutral, "I know all I need to know and when I reveal the truth you're going directly to jail."); - ~chatnpc(angry, "Oh, you think so do you? You think that silly old fool Ceril will take YOUR word over MINE? He trusts me completely!"); - ~chatplayer(neutral, "We'll see about that."); - ~chatnpc(angry, "This is your last warning adventurer: keep your nose out of our business."); + ~chatplayer("Jones. We need to talk."); + ~chatnpc("Yes? You need some help with your quest?"); + ~chatplayer("Drop the act Jones. I know you're in league with the cultists."); + ~chatnpc("W-what? N-no I'm not, don't be silly!"); + ~chatplayer("Listen pal, I went to your hideout, I heard them talking about you. You're fooling nobody."); + ~chatnpc("You think you're so smart don't you? You might think you know what's going on but you have no idea."); + ~chatplayer("I know all I need to know and when I reveal the truth you're going directly to jail."); + ~chatnpc("Oh, you think so do you? You think that silly old fool Ceril will take YOUR word over MINE? He trusts me completely!"); + ~chatplayer("We'll see about that."); + ~chatnpc("This is your last warning adventurer: keep your nose out of our business."); } else { if(inv_total(worn, mark_of_hazeel) > 0) { - ~chatnpc(happy, "Hello again friend. I see you have the mark now; You should keep it covered up."); - ~chatplayer(confused, "That? Oh, it's nothing. Just an old amulet."); + ~chatnpc("Hello again friend. I see you have the mark now; You should keep it covered up."); + ~chatplayer("That? Oh, it's nothing. Just an old amulet."); } else { - ~chatnpc(happy, "Hello again friend. I see you decided to keep the mark of Hazeel discreetly about you."); - ~chatplayer(confused, "Mark of Hazeel? I'm sure I don't know what you mean."); + ~chatnpc("Hello again friend. I see you decided to keep the mark of Hazeel discreetly about you."); + ~chatplayer("Mark of Hazeel? I'm sure I don't know what you mean."); } - ~chatnpc(happy, "You don't have to pretend with me, friend! Our cause is one and the same; the sooner Lord Hazeel is avenged the better for this city... and for us!"); - ~chatplayer(quiz, "So do you have any idea where the scroll with the enchantment is?"); - ~chatnpc(neutral, "No idea I'm afraid. I KNOW it's somewhere in this house, but for the life of me I can't find it anywhere. I've searched high and low for it!"); - ~chatplayer(quiz, "And Sir Ceril doesn't suspect a thing?"); - ~chatnpc(neutral, "Ha! That silly old fool? He can't see the forest for the trees."); - ~chatplayer(neutral, "I'll keep on looking then..."); + ~chatnpc("You don't have to pretend with me, friend! Our cause is one and the same; the sooner Lord Hazeel is avenged the better for this city... and for us!"); + ~chatplayer("So do you have any idea where the scroll with the enchantment is?"); + ~chatnpc("No idea I'm afraid. I KNOW it's somewhere in this house, but for the life of me I can't find it anywhere. I've searched high and low for it!"); + ~chatplayer("And Sir Ceril doesn't suspect a thing?"); + ~chatnpc("Ha! That silly old fool? He can't see the forest for the trees."); + ~chatplayer("I'll keep on looking then..."); } case ^hazeelcult_poured_poison: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Hello friend. I heard about your handiwork. Quite amusing really. I'm sure Hazeel will be pleased anyway; Keep up the good work!"); + ~chatplayer("Hello there."); + ~chatnpc("Hello friend. I heard about your handiwork. Quite amusing really. I'm sure Hazeel will be pleased anyway; Keep up the good work!"); case ^hazeelcult_clivet_decision: @butler_jones_howlong; case ^hazeelcult_started: - ~chatplayer(quiz, "Hello. What is this building?"); - ~chatnpc(neutral, "This is the home of Sir Ceril Carnillean of the noble Carnillean family. You're welcome to look around, but I'm afraid I'll have to keep an eye on you."); - ~chatnpc(neutral, "Recently we've been having a real problem with thieves and strange cultists coming out of the forest for some reason."); - ~chatplayer(neutral, "That's a shame."); - ~chatnpc(neutral, "Yes, well, these things are bound to happen when you're as wealthy as the Carnilleans."); + ~chatplayer("Hello. What is this building?"); + ~chatnpc("This is the home of Sir Ceril Carnillean of the noble Carnillean family. You're welcome to look around, but I'm afraid I'll have to keep an eye on you."); + ~chatnpc("Recently we've been having a real problem with thieves and strange cultists coming out of the forest for some reason."); + ~chatplayer("That's a shame."); + ~chatnpc("Yes, well, these things are bound to happen when you're as wealthy as the Carnilleans."); @multi3("Have you any more info on the Carnilleans?", butler_jones_info, "How long have you worked here?", butler_jones_howlong, "Ok then, take care.", butler_jones_takecare); case ^hazeelcult_not_started, ^hazeelcult_spoken_clivet: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Hello. How are you today?"); - ~chatplayer(neutral, "Good thank you, and yourself?"); - ~chatnpc(neutral, "Fine and dandy."); + ~chatplayer("Hello there."); + ~chatnpc("Hello. How are you today?"); + ~chatplayer("Good thank you, and yourself?"); + ~chatnpc("Fine and dandy."); } [label,butler_jones_info] -~chatplayer(quiz, "Have you any more info on the Carnilleans?"); -~chatnpc(neutral, "There's a lot I could tell you about the Carnillean family history. However, I'm afraid if I did speak about such matters I would be at risk of losing my job."); +~chatplayer("Have you any more info on the Carnilleans?"); +~chatnpc("There's a lot I could tell you about the Carnillean family history. However, I'm afraid if I did speak about such matters I would be at risk of losing my job."); [label,butler_jones_howlong] -~chatplayer(quiz, "How long have you worked here?"); -~chatnpc(neutral, "Long enough to know the Carnilleans are not as innocent or noble as they seem."); +~chatplayer("How long have you worked here?"); +~chatnpc("Long enough to know the Carnilleans are not as innocent or noble as they seem."); [label,butler_jones_takecare] -~chatplayer(neutral, "Ok then, take care."); -~chatnpc(neutral, "You too."); \ No newline at end of file +~chatplayer("Ok then, take care."); +~chatnpc("You too."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/carnillean_guard.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/carnillean_guard.rs2 index 2e361672a..79dfd7126 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/carnillean_guard.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/carnillean_guard.rs2 @@ -1,43 +1,43 @@ [opnpc1,carnillean_guard] switch_int(%hazeelcult_progress) { case ^hazeelcult_not_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello there. I haven't seen you around here before. If you've come to admire the Carnillean family home I must warn you not to cause any trouble."); - ~chatnpc(neutral, "Due to recent criminal activities against such prominent Ardougnians, I have been sent here on special guard duty to ensure the Carnilleans' security."); - ~chatnpc(neutral, "Anyone caught interfering with the person or possessions of any Carnilleans will be taken to jail so quickly that their feet won't even touch the floor!"); - ~chatplayer(confused, "Well, I wasn't actually planning on doing anything like that..."); - ~chatnpc(neutral, "Glad to hear it. Let's keep it that way, hmmm?"); + ~chatplayer("Hello."); + ~chatnpc("Hello there. I haven't seen you around here before. If you've come to admire the Carnillean family home I must warn you not to cause any trouble."); + ~chatnpc("Due to recent criminal activities against such prominent Ardougnians, I have been sent here on special guard duty to ensure the Carnilleans' security."); + ~chatnpc("Anyone caught interfering with the person or possessions of any Carnilleans will be taken to jail so quickly that their feet won't even touch the floor!"); + ~chatplayer("Well, I wasn't actually planning on doing anything like that..."); + ~chatnpc("Glad to hear it. Let's keep it that way, hmmm?"); case ^hazeelcult_poured_poison: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Hello. The sarge is furious with me! Apparently those loony cultists have been back somehow without me noticing! I got a right roasting earlier..."); - ~chatnpc(neutral, "I don't exactly know what they got up to in the house... but that's besides the point. Sir Ceril was extremely upset, and I don't blame him."); + ~chatplayer("Hello there."); + ~chatnpc("Hello. The sarge is furious with me! Apparently those loony cultists have been back somehow without me noticing! I got a right roasting earlier..."); + ~chatnpc("I don't exactly know what they got up to in the house... but that's besides the point. Sir Ceril was extremely upset, and I don't blame him."); case ^hazeelcult_started, ^hazeelcult_spoken_clivet, ^hazeelcult_clivet_decision, ^hazeelcult_finished_side_task: if(%hazeelcult_progress = ^hazeelcult_finished_side_task & %hazeelcult_side = ^hazeelcult_evilside) { - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello again adventurer. Still hanging around here eh? Let me know if you spot any of those loony cultists sniffing around."); + ~chatplayer("Hello."); + ~chatnpc("Hello again adventurer. Still hanging around here eh? Let me know if you spot any of those loony cultists sniffing around."); return; } - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello. I hear tell you're after that loony cult who broke in the other night. It always gladdens me when civilians assist the law like this."); + ~chatplayer("Hello."); + ~chatnpc("Hello. I hear tell you're after that loony cult who broke in the other night. It always gladdens me when civilians assist the law like this."); case ^hazeelcult_given_armour_or_scroll: - ~chatplayer(neutral, "Hello guard."); + ~chatplayer("Hello guard."); if(%hazeelcult_side = ^hazeelcult_evilside) { - ~chatnpc(neutral, "Hello adventurer. I hope you find the cult soon we have a horrible suspicion that there's been another burglary."); - ~chatplayer(neutral, "That's worrying."); - ~chatnpc(neutral, "Yes, it is. What's worse is I have no idea how they keep doing it. It's like they do it under my very nose!"); + ~chatnpc("Hello adventurer. I hope you find the cult soon we have a horrible suspicion that there's been another burglary."); + ~chatplayer("That's worrying."); + ~chatnpc("Yes, it is. What's worse is I have no idea how they keep doing it. It's like they do it under my very nose!"); } else { - ~chatnpc(neutral, "Hello adventurer. I hear you accused Jones the butler of being an accomplice of that loony cult. Is that true?"); - ~chatplayer(sad, "That's true, but nobody believes me."); - ~chatnpc(neutral, "You have my utter faith adventurer. I can't openly defy my employer, Sir Ceril, but I'd like you to know that I think you're on the right track there."); - ~chatplayer(happy, "Hey, thanks! That actually does make me feel a bit better!"); - ~chatnpc(neutral, "You've already proven to me that you're a law-abiding citizen. Besides, I always found it suspicious that Jones would just show up here on the doorstep the very day after the old butler died in such suspicious"); - ~chatnpc(neutral, "circumstances. Good luck in clearing your name. You have my support."); + ~chatnpc("Hello adventurer. I hear you accused Jones the butler of being an accomplice of that loony cult. Is that true?"); + ~chatplayer("That's true, but nobody believes me."); + ~chatnpc("You have my utter faith adventurer. I can't openly defy my employer, Sir Ceril, but I'd like you to know that I think you're on the right track there."); + ~chatplayer("Hey, thanks! That actually does make me feel a bit better!"); + ~chatnpc("You've already proven to me that you're a law-abiding citizen. Besides, I always found it suspicious that Jones would just show up here on the doorstep the very day after the old butler died in such suspicious"); + ~chatnpc("circumstances. Good luck in clearing your name. You have my support."); } case ^hazeelcult_complete: - ~chatplayer(neutral, "Hello."); + ~chatplayer("Hello."); if(%hazeelcult_side = ^hazeelcult_evilside) { - ~chatnpc(angry, "You again? Didn't I make it clear you're not welcome around here? Clear off before you make me get rough with you!"); + ~chatnpc("You again? Didn't I make it clear you're not welcome around here? Clear off before you make me get rough with you!"); } else { - ~chatnpc(neutral, "Hello again adventurer. Still hanging around here eh? I'll be honest, I'm glad someone of your ability is around to assist me in case of trouble."); + ~chatnpc("Hello again adventurer. Still hanging around here eh? I'll be honest, I'm glad someone of your ability is around to assist me in case of trouble."); } } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 index c592f00ef..0f86fc646 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/ceril_carnillean.rs2 @@ -2,122 +2,122 @@ switch_int(%hazeelcult_progress) { case ^hazeelcult_not_started: // OSRS changed this dialogue quite a bit in 2023 (of course), using wiki/RSC + the linked video as reference - ~chatplayer(neutral, "Hello there."); - ~chatnpc(angry, "Blooming, thieving, weirdo cultists! Why don't they leave me alone? String 'em all up, that's what I say!"); + ~chatplayer("Hello there."); + ~chatnpc("Blooming, thieving, weirdo cultists! Why don't they leave me alone? String 'em all up, that's what I say!"); // https://youtu.be/R5MdMtqvxaM?si=OepNhbR7fcTPaijN&t=19 switch_int(~p_choice3("What's wrong?", 1, "You probably deserve it.", 2, "You seem uptight, I'll leave you alone.", 3)) { case 1: - ~chatplayer(quiz, "What's wrong?"); - ~chatnpc(angry, "It's those blooming cultists from the forest! Those freaks keep breaking into my house!"); - ~chatplayer(quiz, "Have they taken much?"); - ~chatnpc(angry, "They first broke in months ago and stole a suit of armour. The strange thing is that they've broken in four more times since but taken nothing."); - ~chatplayer(quiz, "And you are...?"); - ~chatnpc(angry, "Why, I am Sir Ceril Carnillean! We really are quite a famous bloodline... who've played a vital role in the politics of Ardougne for many generations."); - ~chatnpc(angry, "Perhaps you would be able to assist me in returning the stolen armour? For a modest cash reward of course!"); + ~chatplayer("What's wrong?"); + ~chatnpc("It's those blooming cultists from the forest! Those freaks keep breaking into my house!"); + ~chatplayer("Have they taken much?"); + ~chatnpc("They first broke in months ago and stole a suit of armour. The strange thing is that they've broken in four more times since but taken nothing."); + ~chatplayer("And you are...?"); + ~chatnpc("Why, I am Sir Ceril Carnillean! We really are quite a famous bloodline... who've played a vital role in the politics of Ardougne for many generations."); + ~chatnpc("Perhaps you would be able to assist me in returning the stolen armour? For a modest cash reward of course!"); switch_int(~p_choice2("No thanks. I've got other plans.", 1, "Yes, of course, I'd be happy to help.", 2)) { case 1: - ~chatplayer(neutral, "No thanks. I've got other plans."); - ~chatnpc(angry, "Well no wonder I'm the one with the big house and you're the one on the streets."); + ~chatplayer("No thanks. I've got other plans."); + ~chatnpc("Well no wonder I'm the one with the big house and you're the one on the streets."); case 2: - ~chatplayer(neutral, "Yes, of course, I'd be happy to help."); - ~chatnpc(neutral, "That's very noble of you sirrah! I caught a glimpse of the thieves leaving but due to... uh.. yeah, my cold I was unable to give chase."); - ~chatnpc(neutral, "They're some kind of crazy cult who dress all in black, and hang out near the cave entrance in the forest south of here."); - ~chatplayer(quiz, "How do you know that?"); - ~chatnpc(neutral, "My old butler, Higson, once followed them to their hideout there. Unfortunately the next night he died in his sleep."); - ~chatplayer(shock, "That's awful!"); + ~chatplayer("Yes, of course, I'd be happy to help."); + ~chatnpc("That's very noble of you sirrah! I caught a glimpse of the thieves leaving but due to... uh.. yeah, my cold I was unable to give chase."); + ~chatnpc("They're some kind of crazy cult who dress all in black, and hang out near the cave entrance in the forest south of here."); + ~chatplayer("How do you know that?"); + ~chatnpc("My old butler, Higson, once followed them to their hideout there. Unfortunately the next night he died in his sleep."); + ~chatplayer("That's awful!"); %hazeelcult_progress = ^hazeelcult_started; ~send_quest_progress(questlist:hazeelcult, %hazeelcult_progress, ^hazeelcult_complete); - ~chatnpc(neutral, "No, it's ok. A replacement arrived the next day. He's been great - cooks an excellent broth!"); - ~chatplayer(neutral, "Ok. I'll see what I can do."); + ~chatnpc("No, it's ok. A replacement arrived the next day. He's been great - cooks an excellent broth!"); + ~chatplayer("Ok. I'll see what I can do."); } case 2: - ~chatplayer(neutral, "You probably deserve it."); - ~chatnpc(angry, "And who are YOU to judge ME? Hmmm. You look like a peasant anyway. I'm wasting my time talking to you."); + ~chatplayer("You probably deserve it."); + ~chatnpc("And who are YOU to judge ME? Hmmm. You look like a peasant anyway. I'm wasting my time talking to you."); case 3: - ~chatplayer(neutral, "You seem uptight. I'll leave you alone."); - ~chatnpc(neutral, "Yes, I doubt you could help anyway."); + ~chatplayer("You seem uptight. I'll leave you alone."); + ~chatnpc("Yes, I doubt you could help anyway."); } case ^hazeelcult_started, ^hazeelcult_spoken_clivet: - ~chatplayer(neutral, "Hello Ceril."); - ~chatnpc(angry, "That's SIR Ceril to you, you impudent scamp. Show a bit of respect to your betters. And shouldn't you be recovering my armour?"); - ~chatplayer(neutral, "Yeah yeah, I'm on it, I'm ON it."); + ~chatplayer("Hello Ceril."); + ~chatnpc("That's SIR Ceril to you, you impudent scamp. Show a bit of respect to your betters. And shouldn't you be recovering my armour?"); + ~chatplayer("Yeah yeah, I'm on it, I'm ON it."); case ^hazeelcult_clivet_decision: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(quiz, "Have you had any luck yet?"); - ~chatplayer(neutral, "Hello Ceril. Yes, I found their hideout."); - ~chatnpc(happy, "SIR Ceril to you. But good work there! BLOOMING good work! Hand over the armour then."); - ~chatplayer(confused, "Uh... yeah... about that... I interrogated a cult member at the hideout's entrance, but he managed to escape into the sewer system."); - ~chatplayer(neutral, "Seems they have some sort of grievance against you and your family. Something about some guy called Hazeel?"); - ~chatnpc(confused, "Hazeel? Uh... umm... err.. hmmmm."); - ~chatnpc(angry, "Nope, they're obviously a bunch of blooming loonies! Go find them and bring me back my blooming armour! Nobody steals from Sir Ceril Carnillean!!!"); + ~chatnpc("Have you had any luck yet?"); + ~chatplayer("Hello Ceril. Yes, I found their hideout."); + ~chatnpc("SIR Ceril to you. But good work there! BLOOMING good work! Hand over the armour then."); + ~chatplayer("Uh... yeah... about that... I interrogated a cult member at the hideout's entrance, but he managed to escape into the sewer system."); + ~chatplayer("Seems they have some sort of grievance against you and your family. Something about some guy called Hazeel?"); + ~chatnpc("Hazeel? Uh... umm... err.. hmmmm."); + ~chatnpc("Nope, they're obviously a bunch of blooming loonies! Go find them and bring me back my blooming armour! Nobody steals from Sir Ceril Carnillean!!!"); } else { - ~chatnpc(quiz, "Have you had any luck yet?"); - ~chatplayer(neutral, "I'm afraid not Ceril."); - ~chatnpc(angry, "That's SIR Ceril you blooming scoundrel! Show respect when addressing someone of my rank! It's strange you haven't recovered it yet though as Jones seemed quite sure of their location."); - ~chatplayer(neutral, "Yeah, well, just unlucky I guess."); + ~chatnpc("Have you had any luck yet?"); + ~chatplayer("I'm afraid not Ceril."); + ~chatnpc("That's SIR Ceril you blooming scoundrel! Show respect when addressing someone of my rank! It's strange you haven't recovered it yet though as Jones seemed quite sure of their location."); + ~chatplayer("Yeah, well, just unlucky I guess."); } case ^hazeelcult_poured_poison: - ~chatplayer(neutral, "Hello again."); - ~chatnpc(sad, "Oh.. the inhumanity... the cruelty.. the misery... the pain... my son is a good boy, really, but how could he give his dinner to Scruffy without having the servants test it for poison first? How? How could he be so"); - ~chatnpc(sad, "thoughtless and careless? He knows we are all under threat!"); - ~chatplayer(quiz, "Scruffy?"); - ~chatnpc(sad, "He's been with our family for twenty years... that's 140 in dog years! The poor dog... what did HE ever do to deserve such a fate???"); - ~chatplayer(quiz, "Your DOG got poisoned???"); - ~chatplayer(angry, "That's not right."); - ~chatnpc(angry, "I agree! I hope whichever evildoer is responsible gets the full weight of the law brought upon them!"); - ~chatplayer(confused, "Uh.... yeah... me too."); + ~chatplayer("Hello again."); + ~chatnpc("Oh.. the inhumanity... the cruelty.. the misery... the pain... my son is a good boy, really, but how could he give his dinner to Scruffy without having the servants test it for poison first? How? How could he be so"); + ~chatnpc("thoughtless and careless? He knows we are all under threat!"); + ~chatplayer("Scruffy?"); + ~chatnpc("He's been with our family for twenty years... that's 140 in dog years! The poor dog... what did HE ever do to deserve such a fate???"); + ~chatplayer("Your DOG got poisoned???"); + ~chatplayer("That's not right."); + ~chatnpc("I agree! I hope whichever evildoer is responsible gets the full weight of the law brought upon them!"); + ~chatplayer("Uh.... yeah... me too."); case ^hazeelcult_finished_side_task: // https://youtu.be/R5MdMtqvxaM?si=yhrFdqvFO4ucwsjr&t=334 and https://youtu.be/R5MdMtqvxaM?si=fQgsP_0Ax9CI19U9&t=394 if(%hazeelcult_side = ^hazeelcult_goodside) { if(inv_total(inv, carnillean_armour) = 0 & inv_total(worn, carnillean_armour) = 0) { - ~chatplayer(neutral, "Ceril. How are you?"); - ~chatnpc(quiz, "I'm fine. Where's my armour?"); - ~chatplayer(confused, "Uh... I didn't get it yet... I DID find the cult's hideout though!"); - ~chatnpc(angry, "Well what are you waiting for? I'm not paying you to blooming sight see you know!"); + ~chatplayer("Ceril. How are you?"); + ~chatnpc("I'm fine. Where's my armour?"); + ~chatplayer("Uh... I didn't get it yet... I DID find the cult's hideout though!"); + ~chatnpc("Well what are you waiting for? I'm not paying you to blooming sight see you know!"); return; } @ceril_give_armour; } else { - ~chatplayer(neutral, "Ceril. How are you?"); - ~chatnpc(sad, "Oh cruel world! Scruffy... I knew you well... I... just... don't think I can... go on without..."); + ~chatplayer("Ceril. How are you?"); + ~chatnpc("Oh cruel world! Scruffy... I knew you well... I... just... don't think I can... go on without..."); ~mesbox("Sir Ceril breaks down into tears."); - ~chatplayer(angry, "Loosen up already. It was only a DOG."); + ~chatplayer("Loosen up already. It was only a DOG."); } case ^hazeelcult_given_armour_or_scroll: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(angry, "You owe me money."); - ~chatnpc(angry, "I owe you nothing you scoundrel! Now get out or I'll have Jones throw you out!"); + ~chatplayer("You owe me money."); + ~chatnpc("I owe you nothing you scoundrel! Now get out or I'll have Jones throw you out!"); } else { - ~chatplayer(quiz, "Hello Ceril. How's things?"); - ~chatnpc(confused, "SIR Ceril! SIR! And I'm not sure but I think the thieves have been back in my house."); - ~chatplayer(quiz, "What makes you say that?"); - ~chatnpc(confused, "Well, either I'm going crazy, or theres been an intruder in Jones' room upstairs!"); - ~chatplayer(neutral, "Oh, heh, ok then."); + ~chatplayer("Hello Ceril. How's things?"); + ~chatnpc("SIR Ceril! SIR! And I'm not sure but I think the thieves have been back in my house."); + ~chatplayer("What makes you say that?"); + ~chatnpc("Well, either I'm going crazy, or theres been an intruder in Jones' room upstairs!"); + ~chatplayer("Oh, heh, ok then."); } case ^hazeelcult_complete: - ~chatplayer(neutral, "Hello Ceril."); + ~chatplayer("Hello Ceril."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(neutral, "Well hello again adventurer! It's good to see you again! If it wasn't for your quick thinking the treacherous Jones would have poisoned my family and me by now! We are in your debt."); - ~chatplayer(neutral, "Don't worry about it, a good deed is its own reward. And that 2000 gold didn't hurt either."); + ~chatnpc("Well hello again adventurer! It's good to see you again! If it wasn't for your quick thinking the treacherous Jones would have poisoned my family and me by now! We are in your debt."); + ~chatplayer("Don't worry about it, a good deed is its own reward. And that 2000 gold didn't hurt either."); } else { - ~chatnpc(sad, "Oooooh... I may be wrong... but ever since I asked for your help things around here have gone from bad to worse..."); - ~chatnpc(angry, "I think you'd better keep out of my way. And for the LAST time: it's SIR Ceril. SIR! It's not that hard to blooming remember!"); + ~chatnpc("Oooooh... I may be wrong... but ever since I asked for your help things around here have gone from bad to worse..."); + ~chatnpc("I think you'd better keep out of my way. And for the LAST time: it's SIR Ceril. SIR! It's not that hard to blooming remember!"); } } [label,ceril_give_armour] if(coordy(coord) = 0) { - ~chatplayer(neutral, "Ceril. How are you?"); + ~chatplayer("Ceril. How are you?"); } -~chatplayer(happy, "Look! I've recovered your armour!"); -~chatnpc(happy, "Well done! I must say I am very impressed! Come on, hand it over."); -~chatnpc(happy, "Before we send you on your way with your payment, I'll just get Jones to whip you up a batch of his special broth."); -~chatplayer(confused, "I'd rather not if it's all the same to you. I overheard the cultists talking, and apparently Jones is in league with them."); +~chatplayer("Look! I've recovered your armour!"); +~chatnpc("Well done! I must say I am very impressed! Come on, hand it over."); +~chatnpc("Before we send you on your way with your payment, I'll just get Jones to whip you up a batch of his special broth."); +~chatplayer("I'd rather not if it's all the same to you. I overheard the cultists talking, and apparently Jones is in league with them."); if(coordy(coord) = 0) { - ~chatnpc(angry, "W-what? RIGHT! You! Come with me upstairs! We're going to blooming well sort this out right now once and for all!"); + ~chatnpc("W-what? RIGHT! You! Come with me upstairs! We're going to blooming well sort this out right now once and for all!"); return; } -~chatnpc(angry, "W-what? RIGHT! You! We're going to blooming well sort this out right now once and for all!"); +~chatnpc("W-what? RIGHT! You! We're going to blooming well sort this out right now once and for all!"); if(inv_total(inv, carnillean_armour) = 0 ) { inv_del(inv, carnillean_armour, 1); } else if(inv_total(worn, carnillean_armour) = 0) { @@ -127,12 +127,12 @@ queue(hazeelcult_fake_complete, 0); if (.npc_find(coord, butler_jones, 6, 0) = false) { // not sure what the distance would of been but it always works on OSRS return; } -~chatnpc(angry, "Jones! This commoner says you had something to do with the theft of my armour. What do you have to say for yourself about that?"); -~.chatnpc(neutral, "It wasn't me m'lud. I am, as you know, a loyal servant."); -~chatnpc(angry, "Humph. Quite right too. I cannot fathom why this scoundrel would accuse you of such a crime without evidence to back up his accusations."); -~chatnpc(neutral, "Right. I have decided. I have given my word as a nobleman to reward you for your efforts in retrieving my armour."); -~chatnpc(neutral, "but I must also compensate Jones for this terrible slander you have made against him."); +~chatnpc("Jones! This commoner says you had something to do with the theft of my armour. What do you have to say for yourself about that?"); +~.chatnpc("It wasn't me m'lud. I am, as you know, a loyal servant."); +~chatnpc("Humph. Quite right too. I cannot fathom why this scoundrel would accuse you of such a crime without evidence to back up his accusations."); +~chatnpc("Right. I have decided. I have given my word as a nobleman to reward you for your efforts in retrieving my armour."); +~chatnpc("but I must also compensate Jones for this terrible slander you have made against him."); ~mesbox("Sir Ceril gives you 5 gold. Sir Ceril gives Jones 1995 gold."); -~chatnpc(angry, "Now take it and leave you scoundrel! And don't darken my doorstep again!"); -~.chatnpc(happy, "Don't worry m'lud, this fool won't be bothering us any more."); +~chatnpc("Now take it and leave you scoundrel! And don't darken my doorstep again!"); +~.chatnpc("Don't worry m'lud, this fool won't be bothering us any more."); ~mesbox("Jones smirks at you. You are going to need more than words to prove Jones' treachery."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/claus_the_chef.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/claus_the_chef.rs2 index 3da122a57..8cd65f5ca 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/claus_the_chef.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/claus_the_chef.rs2 @@ -1,45 +1,45 @@ [opnpc1,claus_the_chef] switch_int(%hazeelcult_progress) { case ^hazeelcult_complete: - ~chatplayer(neutral, "Hiya."); + ~chatplayer("Hiya."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(happy, "Well hello there adventurer! Are we fit and well?"); - ~chatplayer(neutral, "Yep, fine thanks."); - ~chatnpc(happy, "Glad to hear it."); + ~chatnpc("Well hello there adventurer! Are we fit and well?"); + ~chatplayer("Yep, fine thanks."); + ~chatnpc("Glad to hear it."); } else { - ~chatnpc(angry, "Get out of my kitchen scoundrel. You're NOT welcome HERE."); - ~chatplayer(neutral, "Ok ok, keep your hair on."); - ~chatnpc(angry, "Is THAT supposed to be FUNNY? OUT! Before I call the Guard!"); + ~chatnpc("Get out of my kitchen scoundrel. You're NOT welcome HERE."); + ~chatplayer("Ok ok, keep your hair on."); + ~chatnpc("Is THAT supposed to be FUNNY? OUT! Before I call the Guard!"); } case ^hazeelcult_finished_side_task, ^hazeelcult_given_armour_or_scroll: if(%hazeelcult_progress = ^hazeelcult_finished_side_task & %hazeelcult_side = ^hazeelcult_evilside) { - ~chatplayer(neutral, "Hello Claus."); - ~chatnpc(confused, "I... just CAN'T understand it! How? HOW could someone poison my delicious food without me even noticing??? I... I just don't understand!"); - ~chatnpc(sad, "Oh man... I hope I don't lose my job over this... but HOW? How did they do it? And why would the villain want to kill poor Scruffy anyway? He was such a good dog..."); + ~chatplayer("Hello Claus."); + ~chatnpc("I... just CAN'T understand it! How? HOW could someone poison my delicious food without me even noticing??? I... I just don't understand!"); + ~chatnpc("Oh man... I hope I don't lose my job over this... but HOW? How did they do it? And why would the villain want to kill poor Scruffy anyway? He was such a good dog..."); ~mesbox("Claus wipes away a tear."); - ~chatplayer(neutral, "Yeah. It's a real mystery, huh?"); + ~chatplayer("Yeah. It's a real mystery, huh?"); } else if(%hazeelcult_progress = ^hazeelcult_given_armour_or_scroll & %hazeelcult_side = ^hazeelcult_evilside) { - ~chatplayer(neutral, "Hello there."); - ~chatnpc(sad, "Those animals... how could they do that to poor Scruffy? What kind of lowlife would do that???"); - ~chatplayer(neutral, "Get over it, it was only a dog."); + ~chatplayer("Hello there."); + ~chatnpc("Those animals... how could they do that to poor Scruffy? What kind of lowlife would do that???"); + ~chatplayer("Get over it, it was only a dog."); } else { - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Hello! How are you today??"); - ~chatplayer(neutral, "Not bad, thanks."); - ~chatnpc(neutral, "Good good."); + ~chatplayer("Hello there."); + ~chatnpc("Hello! How are you today??"); + ~chatplayer("Not bad, thanks."); + ~chatnpc("Good good."); } case ^hazeelcult_poured_poison: - ~chatnpc(neutral, "Hello there. Caught any of those weird thieves yet?"); - ~chatplayer(neutral, "Nope. Afraid not."); - ~chatnpc(neutral, "Well, keep at it!"); + ~chatnpc("Hello there. Caught any of those weird thieves yet?"); + ~chatplayer("Nope. Afraid not."); + ~chatnpc("Well, keep at it!"); case ^hazeelcult_clivet_decision: - ~chatplayer(neutral, "Hiya."); - ~chatnpc(quiz, "You're that adventurer the family asked to help get those weird cultists who keep breaking in, right?"); - ~chatplayer(neutral, "That's me."); - ~chatnpc(neutral, "Good luck with that!"); + ~chatplayer("Hiya."); + ~chatnpc("You're that adventurer the family asked to help get those weird cultists who keep breaking in, right?"); + ~chatplayer("That's me."); + ~chatnpc("Good luck with that!"); case default: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Sorry! Can't stop to chat! You would be AMAZED at how many meals this family gets through daily!"); + ~chatplayer("Hello there."); + ~chatnpc("Sorry! Can't stop to chat! You would be AMAZED at how many meals this family gets through daily!"); } [oplocu,loc_2859] @@ -55,4 +55,4 @@ if(last_useitem = poison) { } return; } -~chatnpc_specific(nc_name(claus_the_chef), claus_the_chef, angry, "Oi! I don't want people messing around with my range!"); \ No newline at end of file +~chatnpc_specific(nc_name(claus_the_chef), claus_the_chef, "Oi! I don't want people messing around with my range!"); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/clivet.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/clivet.rs2 index df56371d6..78330efdb 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/clivet.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/clivet.rs2 @@ -1,118 +1,118 @@ [opnpc1,clivet] switch_int(%hazeelcult_progress) { case ^hazeelcult_not_started: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(shifty, "What do you want adventurer?"); - ~chatplayer(neutral, "Just passing by."); - ~chatnpc(neutral, "You have no business here. Leave.... now."); + ~chatplayer("Hello there."); + ~chatnpc("What do you want adventurer?"); + ~chatplayer("Just passing by."); + ~chatnpc("You have no business here. Leave.... now."); case ^hazeelcult_started: - ~chatplayer(quiz, "Do you know the Carnilleans?"); - ~chatnpc(angry, "You mind your business, I'll mind mine."); - ~chatplayer(angry, "Look, I KNOW you're hiding something. I've heard theres a cult hideout down here."); - ~chatnpc(angry, "If you want to stay healthy you'll leave now."); - ~chatplayer(angry, "I have my orders."); - ~chatnpc(neutral, "So... that two faced cold hearted snob has made you fall for his propaganda eh?"); - ~chatplayer(angry, "Sir Ceril Carnillean is a man of honour!"); - ~chatnpc(neutral, "Is he now? Is he REALLY? There is a lot more to the Carnilleans than meets the eye you fool..."); - ~chatnpc(angry, "And none of it is honourable."); + ~chatplayer("Do you know the Carnilleans?"); + ~chatnpc("You mind your business, I'll mind mine."); + ~chatplayer("Look, I KNOW you're hiding something. I've heard theres a cult hideout down here."); + ~chatnpc("If you want to stay healthy you'll leave now."); + ~chatplayer("I have my orders."); + ~chatnpc("So... that two faced cold hearted snob has made you fall for his propaganda eh?"); + ~chatplayer("Sir Ceril Carnillean is a man of honour!"); + ~chatnpc("Is he now? Is he REALLY? There is a lot more to the Carnilleans than meets the eye you fool..."); + ~chatnpc("And none of it is honourable."); %hazeelcult_progress = ^hazeelcult_spoken_clivet; @multi2("What do you mean?", clivet_what_do_you_mean, "I've heard enough of your rubbish.", clivet_rubbish); case ^hazeelcult_spoken_clivet: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "So. You've returned. Now do you want to know the truth about the 'honourable' Carnilleans?"); + ~chatplayer("Hello."); + ~chatnpc("So. You've returned. Now do you want to know the truth about the 'honourable' Carnilleans?"); @multi2("What do you mean?", clivet_what_do_you_mean, "I've heard enough of your rubbish.", clivet_rubbish); case ^hazeelcult_clivet_decision: - ~chatplayer(neutral, "Hello there."); + ~chatplayer("Hello there."); if(%hazeelcult_side = ^hazeelcult_goodside) { // guessing mesanims here - ~chatnpc(angry, "Oh no... not you again."); - ~chatplayer(quiz, "WHERE is the cult hideout?"); - ~chatnpc(angry, "You're more of a fool than you look if you think you will ever find it. When Lord Hazeel is revived you will be first to grovel for his mercy!"); + ~chatnpc("Oh no... not you again."); + ~chatplayer("WHERE is the cult hideout?"); + ~chatnpc("You're more of a fool than you look if you think you will ever find it. When Lord Hazeel is revived you will be first to grovel for his mercy!"); } else { - ~chatnpc(neutral, "You have a mission for us adventurer. Go to the Carnilliean household and poison their meal to prove your loyalty."); + ~chatnpc("You have a mission for us adventurer. Go to the Carnilliean household and poison their meal to prove your loyalty."); if(inv_total(inv, poison) = 0) { // no bank check - ~chatplayer(sad, "I lost the poison you gave me..."); + ~chatplayer("I lost the poison you gave me..."); inv_add(inv, poison, 1); - ~chatnpc(angry, "Useless. Take this and don't mess up this time. Lord Hazeel is depending on you."); + ~chatnpc("Useless. Take this and don't mess up this time. Lord Hazeel is depending on you."); } } case ^hazeelcult_poured_poison: - ~chatplayer(neutral, "Hello."); - ~chatplayer(neutral, "I poured the poison into the Carnillean's meal as requested. It didn't quite go to plan however."); - ~chatnpc(neutral, "Yes, we heard all about it from one of our sources. Hazeel has eyes everywhere! You have now proved your loyalty and will be rewarded when Hazeel is revived!"); - ~chatplayer(neutral, "Ok. So what's next?"); - ~chatnpc(neutral, "Here. Wear this amulet; it is called The Sign Of Hazeel. Not only will it identify you as one of our brotherhood to other followers but it is also key to finding our hideout."); + ~chatplayer("Hello."); + ~chatplayer("I poured the poison into the Carnillean's meal as requested. It didn't quite go to plan however."); + ~chatnpc("Yes, we heard all about it from one of our sources. Hazeel has eyes everywhere! You have now proved your loyalty and will be rewarded when Hazeel is revived!"); + ~chatplayer("Ok. So what's next?"); + ~chatnpc("Here. Wear this amulet; it is called The Sign Of Hazeel. Not only will it identify you as one of our brotherhood to other followers but it is also key to finding our hideout."); if(inv_total(inv, mark_of_hazeel) > 0) { - ~chatnpc(neutral, "But of course, you already knew that, as you already have The Sign Of Hazeel."); + ~chatnpc("But of course, you already knew that, as you already have The Sign Of Hazeel."); return; } inv_add(inv, mark_of_hazeel, 1); - ~chatplayer(quiz, "How does this amulet help do that then?"); - ~chatnpc(neutral, "Hazeel in his wisdom when he built this lair did so by making it inaccessible unless the flow of the sewers is controlled exactly by the sewer valves above ground."); - ~chatnpc(neutral, "Each sewer valve must be correctly set before the water level is such that you may enter. The secret of the correct settings is contained in these amulets which honour him."); - ~chatnpc(neutral, "Starting from left to right, follow the design of the amulet to locate each sewer valve, and then turn each so as to follow the amulet design."); - ~chatnpc(neutral, "When you solve the sequence you may enter our hideout where our leader, Alomone, awaits you."); + ~chatplayer("How does this amulet help do that then?"); + ~chatnpc("Hazeel in his wisdom when he built this lair did so by making it inaccessible unless the flow of the sewers is controlled exactly by the sewer valves above ground."); + ~chatnpc("Each sewer valve must be correctly set before the water level is such that you may enter. The secret of the correct settings is contained in these amulets which honour him."); + ~chatnpc("Starting from left to right, follow the design of the amulet to locate each sewer valve, and then turn each so as to follow the amulet design."); + ~chatnpc("When you solve the sequence you may enter our hideout where our leader, Alomone, awaits you."); case ^hazeelcult_finished_side_task: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(neutral, "Hello again."); - ~chatnpc(angry, "You again! You meddle in our affairs too much! When Lord Hazeel returns to this realm he will lay a mighty vengeance upon you!"); + ~chatplayer("Hello again."); + ~chatnpc("You again! You meddle in our affairs too much! When Lord Hazeel returns to this realm he will lay a mighty vengeance upon you!"); } else { - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello once more adventurer. All we need is Hazeels' magical scroll to bring him forth once more to this world."); + ~chatplayer("Hello."); + ~chatnpc("Hello once more adventurer. All we need is Hazeels' magical scroll to bring him forth once more to this world."); } case ^hazeelcult_given_armour_or_scroll: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(neutral, "Hello again."); - ~chatnpc(angry, "You again. Mark my words meddler; when Lord Hazeel returns you will be punished most severely for your interference in our schemes."); + ~chatplayer("Hello again."); + ~chatnpc("You again. Mark my words meddler; when Lord Hazeel returns you will be punished most severely for your interference in our schemes."); } else { - ~chatplayer(neutral, "Hello again."); - ~chatnpc(quiz, "Have you acquired the enchanted scroll required to resurrect Hazeel yet?"); + ~chatplayer("Hello again."); + ~chatnpc("Have you acquired the enchanted scroll required to resurrect Hazeel yet?"); if(inv_total(inv, scroll_of_hazeel) = 0) { - ~chatplayer(confused, "Uh... yeah... about that... I seem to have, errm, misplayed it somewhere..."); - ~chatnpc(angry, "Incompetent cretin! Return to the Carnillean household and do not return again without it!"); + ~chatplayer("Uh... yeah... about that... I seem to have, errm, misplayed it somewhere..."); + ~chatnpc("Incompetent cretin! Return to the Carnillean household and do not return again without it!"); return; } - ~chatplayer(neutral, "Yes, it was in the house all along. Jones can't have looked that hard for it."); - ~chatnpc(happy, "At last! The pieces are all in place for the glorious resurrection of Lord Hazeel! Now is the starting point for a new page in history, and our chance for vengeance!"); - ~chatnpc(happy, "Quickly now! Take the scroll to Alomone so that we may begin the ritual... and when Lord Hazeel returns I promise you that you shall be well rewarded!"); + ~chatplayer("Yes, it was in the house all along. Jones can't have looked that hard for it."); + ~chatnpc("At last! The pieces are all in place for the glorious resurrection of Lord Hazeel! Now is the starting point for a new page in history, and our chance for vengeance!"); + ~chatnpc("Quickly now! Take the scroll to Alomone so that we may begin the ritual... and when Lord Hazeel returns I promise you that you shall be well rewarded!"); } case ^hazeelcult_complete: - ~chatplayer(neutral, "Hello."); + ~chatplayer("Hello."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "You may have won this battle meddler, but the war rages on. Go bother some goblins or something for when Hazeel returns your destruction is assured."); + ~chatnpc("You may have won this battle meddler, but the war rages on. Go bother some goblins or something for when Hazeel returns your destruction is assured."); } else { - ~chatnpc(happy, "It is good to see you once more. Did I not tell you how glorious Lord Hazeel is? With each day his power grows, and soon, very soon, we shall rule these lands!"); - ~chatnpc(happy, " In the meantime I await his return here patiently until he calls upon me."); + ~chatnpc("It is good to see you once more. Did I not tell you how glorious Lord Hazeel is? With each day his power grows, and soon, very soon, we shall rule these lands!"); + ~chatnpc(" In the meantime I await his return here patiently until he calls upon me."); } } [label,clivet_what_do_you_mean] -~chatplayer(quiz, "What do you mean?"); -~chatnpc(neutral, "The Carnillean home does not belong to them. The builder of the house was Lord Hazeel, one of the Mahjarrat followers of Zamorak. Many years ago there was a civil war"); -~chatnpc(neutral, "in this land, and the hateful Saradominists declared war upon all Zamorakians who lived here. Lord Hazeel nobly would not repent his beliefs, and the Carnilleans harrassed"); -~chatnpc(neutral, "Hazeel and his followers for many decades. One fateful night, under cover of darkness, they stormed his home in an angry mob torturing and butchering all loyal"); -~chatnpc(neutral, "Zamorakians they encountered inside. The following morning, the Carnillean forefathers moved into the empty household and claimed it as their own."); -~chatnpc(neutral, "They have grown fat on the hard work of Lord Hazeel ever since. Unluckily for them Lord Hazeel as a Mahjarrat had access to powers and enchantments they knew nothing"); -~chatnpc(neutral, "about, and made preparations for his return when first they began to storm his home. Soon the day will come when he will return to wreak his vengeance upon the thieves!"); -~chatplayer(neutral, "The politics and histories of Ardougne do not concern me. I have been given a job and intend to see it through to the end."); -~chatnpc(neutral, "Well then friend, perhaps I can offer you a different job then? Sooner or later Our master WILL return to this land; those faithful to him will be well rewarded."); -~chatnpc(neutral, "Join our cult and assist us in his restoration, and you will be well rewarded; try and prevent his return and suffer the wrath of Zamorak and the Mahjarrat."); +~chatplayer("What do you mean?"); +~chatnpc("The Carnillean home does not belong to them. The builder of the house was Lord Hazeel, one of the Mahjarrat followers of Zamorak. Many years ago there was a civil war"); +~chatnpc("in this land, and the hateful Saradominists declared war upon all Zamorakians who lived here. Lord Hazeel nobly would not repent his beliefs, and the Carnilleans harrassed"); +~chatnpc("Hazeel and his followers for many decades. One fateful night, under cover of darkness, they stormed his home in an angry mob torturing and butchering all loyal"); +~chatnpc("Zamorakians they encountered inside. The following morning, the Carnillean forefathers moved into the empty household and claimed it as their own."); +~chatnpc("They have grown fat on the hard work of Lord Hazeel ever since. Unluckily for them Lord Hazeel as a Mahjarrat had access to powers and enchantments they knew nothing"); +~chatnpc("about, and made preparations for his return when first they began to storm his home. Soon the day will come when he will return to wreak his vengeance upon the thieves!"); +~chatplayer("The politics and histories of Ardougne do not concern me. I have been given a job and intend to see it through to the end."); +~chatnpc("Well then friend, perhaps I can offer you a different job then? Sooner or later Our master WILL return to this land; those faithful to him will be well rewarded."); +~chatnpc("Join our cult and assist us in his restoration, and you will be well rewarded; try and prevent his return and suffer the wrath of Zamorak and the Mahjarrat."); switch_int(~p_choice2("You're crazy, I'd never help you.", 1, "So what would I have to do?", 2)) { case 1: - ~chatplayer(angry, "You're crazy, I'd never help you."); + ~chatplayer("You're crazy, I'd never help you."); @clivet_fool; case 2: - ~chatplayer(quiz, "So what would I have to do?"); - ~chatnpc(neutral, "You must prove your loyalty to our cause. Killing one of the Carnillean household should be sufficient proof of your dedication to resurrecting our master Lord Hazeel."); - ~chatnpc(quiz, "So what say you adventurer? Join our side against the Carnillean thieves?"); + ~chatplayer("So what would I have to do?"); + ~chatnpc("You must prove your loyalty to our cause. Killing one of the Carnillean household should be sufficient proof of your dedication to resurrecting our master Lord Hazeel."); + ~chatnpc("So what say you adventurer? Join our side against the Carnillean thieves?"); switch_int(~p_choice2("No. I won't do it.", 1, "Ok, count me in.", 2)) { case 1: - ~chatplayer(angry, "No. I won't do it."); + ~chatplayer("No. I won't do it."); @clivet_fool; case 2: - ~chatplayer(neutral, "Ok, count me in."); - ~chatnpc(neutral, "Excellent. It takes a rare character to see through the cursed Carnillean lies. I can tell you are a of exactly the right character to join the followers of Hazeel."); - ~chatnpc(neutral, "Here. Take this poison. Pour it into their food, and once the deed is done, return here and speak to me once more."); + ~chatplayer("Ok, count me in."); + ~chatnpc("Excellent. It takes a rare character to see through the cursed Carnillean lies. I can tell you are a of exactly the right character to join the followers of Hazeel."); + ~chatnpc("Here. Take this poison. Pour it into their food, and once the deed is done, return here and speak to me once more."); inv_add(inv, poison, 1); %hazeelcult_side = ^hazeelcult_evilside; %hazeelcult_progress = ^hazeelcult_clivet_decision; @@ -121,11 +121,11 @@ switch_int(~p_choice2("You're crazy, I'd never help you.", 1, "So what would I h [label,clivet_rubbish] // https://youtu.be/R5MdMtqvxaM?si=J64ldVsZ-1de4-26&t=117 -~chatplayer(angry, "I've heard enough of your rubbish!"); -~chatnpc(angry, "Then leave, fool!"); +~chatplayer("I've heard enough of your rubbish!"); +~chatnpc("Then leave, fool!"); [label,clivet_fool] -~chatnpc(neutral, "Then you are a fool. Go back to your small minded mundane little life; you will never know the glories you could have tasted as one of us!"); +~chatnpc("Then you are a fool. Go back to your small minded mundane little life; you will never know the glories you could have tasted as one of us!"); ~mesbox("The man jumps onto the raft and pushes off down into the sewer system."); %hazeelcult_side = ^hazeelcult_goodside; %hazeelcult_progress = ^hazeelcult_clivet_decision; diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/hazeel_cultist.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/hazeel_cultist.rs2 index e59594704..2499373c1 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/hazeel_cultist.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/hazeel_cultist.rs2 @@ -2,46 +2,46 @@ switch_int(%hazeelcult_progress) { case ^hazeelcult_poured_poison: // guessed mesanims - ~chatplayer(neutral, "Hiya."); - ~chatnpc(neutral, "Hello. Oh, are you new?"); - ~chatplayer(neutral, "That's right."); - ~chatnpc(neutral, "Well, it's always good to have a new recruit. Soon we shall retrive Hazeels' scroll and the ritual to revive him can begin!"); + ~chatplayer("Hiya."); + ~chatnpc("Hello. Oh, are you new?"); + ~chatplayer("That's right."); + ~chatnpc("Well, it's always good to have a new recruit. Soon we shall retrive Hazeels' scroll and the ritual to revive him can begin!"); case ^hazeelcult_not_started, ^hazeelcult_started, ^hazeelcult_spoken_clivet: - ~chatplayer(neutral, "Hi."); - ~chatnpc(confused, "What? Who are you and why did you come here? It doesn't matter, leave now adventurer. While you still can."); + ~chatplayer("Hi."); + ~chatnpc("What? Who are you and why did you come here? It doesn't matter, leave now adventurer. While you still can."); case ^hazeelcult_clivet_decision: - ~chatplayer(neutral, "Hello there."); + ~chatplayer("Hello there."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(confused, "What? How did you get in here? Who are you and why do you come here? It doesn't matter, you will not live long enough to tell anyone of our hideout!"); + ~chatnpc("What? How did you get in here? Who are you and why do you come here? It doesn't matter, you will not live long enough to tell anyone of our hideout!"); ~npc_retaliate(0); } else { - ~chatnpc(angry, "Leave me alone, can't you see I'm busy? We have a lot to do preparing for the imminent return of Lord Hazeel"); // no period + ~chatnpc("Leave me alone, can't you see I'm busy? We have a lot to do preparing for the imminent return of Lord Hazeel"); // no period } case ^hazeelcult_poured_poison, ^hazeelcult_finished_side_task: if(%hazeelcult_side = ^hazeelcult_goodside) { @hazeel_cultist_goodsidequest; } else { - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "Well hello! Until we have retrieved the scroll of Hazeel we cannot resurrect our master. You must find it and bring it to us."); + ~chatplayer("Hello there."); + ~chatnpc("Well hello! Until we have retrieved the scroll of Hazeel we cannot resurrect our master. You must find it and bring it to us."); } case ^hazeelcult_given_armour_or_scroll: if(%hazeelcult_side = ^hazeelcult_goodside) { @hazeel_cultist_goodsidequest; } else { - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Welcome back adventurer! Since you have brought us the scroll of Hazeel we can now perform the resurrection ceremony! Soon our master will return!"); + ~chatplayer("Hello."); + ~chatnpc("Welcome back adventurer! Since you have brought us the scroll of Hazeel we can now perform the resurrection ceremony! Soon our master will return!"); } case ^hazeelcult_complete: - ~chatplayer(neutral, "Hello."); + ~chatplayer("Hello."); if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatnpc(angry, "It's the meddler! The one who blew Jones' cover! I don't know why you came to this place but it is here that you will die."); + ~chatnpc("It's the meddler! The one who blew Jones' cover! I don't know why you came to this place but it is here that you will die."); ~npc_retaliate(0); } else { - ~chatnpc(neutral, "The adventurer returns. We await the return of our Lord from his business in the north here, so that we may wreak vengeance on his enemies."); - ~chatnpc(neutral, "I bow before you in honour for your efforts in bringing Lord Hazeel back to this realm to lead us into glory once more!"); + ~chatnpc("The adventurer returns. We await the return of our Lord from his business in the north here, so that we may wreak vengeance on his enemies."); + ~chatnpc("I bow before you in honour for your efforts in bringing Lord Hazeel back to this realm to lead us into glory once more!"); } } [label,hazeel_cultist_goodsidequest] -~chatplayer(neutral, "Hello there."); -~chatnpc(confused, "What? An intruder? HERE? How did you get in here? You must leave! NOW!"); \ No newline at end of file +~chatplayer("Hello there."); +~chatnpc("What? An intruder? HERE? How did you get in here? You must leave! NOW!"); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/philipe_carnillean.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/philipe_carnillean.rs2 index 7151970ef..bc51fd712 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/philipe_carnillean.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/philipe_carnillean.rs2 @@ -3,33 +3,33 @@ switch_int(%hazeelcult_progress) { case ^hazeelcult_not_started: @philipe_toys; case ^hazeelcult_started, ^hazeelcult_spoken_clivet, ^hazeelcult_clivet_decision: @philipe_carnillean_breakin; case ^hazeelcult_poured_poison: - ~chatplayer(neutral, "Hello youngster."); + ~chatplayer("Hello youngster."); ~mesbox("The boy looks very upset."); - ~chatnpc(sad, "Someone killed scruffy. I liked scruffy. He never told me off."); - ~chatplayer(neutral, "Yeah. It's a real shame."); - ~chatnpc(sad, "I want my mommy."); + ~chatnpc("Someone killed scruffy. I liked scruffy. He never told me off."); + ~chatplayer("Yeah. It's a real shame."); + ~chatnpc("I want my mommy."); case ^hazeelcult_finished_side_task: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(neutral, "Hello youngster."); + ~chatplayer("Hello youngster."); @philipe_carnillean_breakin; } else { @philipe_carnillean_breakin; } case ^hazeelcult_given_armour_or_scroll: - ~chatplayer(neutral, "Hello youngster."); + ~chatplayer("Hello youngster."); if(%hazeelcult_side = ^hazeelcult_goodside) { @philipe_jones; } else { - ~chatnpc(quiz, "Why are you still here?"); - ~chatplayer(neutral, "Just looking around."); - ~chatnpc(quiz, "Have you got me some toys?"); - ~chatplayer(neutral, "Nope."); - ~chatnpc(angry, "Then I don't like you!"); - ~chatplayer(neutral, "Gee. I guess I'll just have to live with that then."); + ~chatnpc("Why are you still here?"); + ~chatplayer("Just looking around."); + ~chatnpc("Have you got me some toys?"); + ~chatplayer("Nope."); + ~chatnpc("Then I don't like you!"); + ~chatplayer("Gee. I guess I'll just have to live with that then."); } case ^hazeelcult_complete: if(%hazeelcult_side = ^hazeelcult_goodside) { - ~chatplayer(neutral, "Hello youngster."); + ~chatplayer("Hello youngster."); @philipe_jones; } else { @philipe_toys; @@ -37,20 +37,20 @@ switch_int(%hazeelcult_progress) { } [label,philipe_toys] -~chatplayer(neutral, "Hello there."); -~chatnpc(quiz, "What have you brought me? I want some more toys!"); -~chatplayer(neutral, "I'm afraid I don't have any toys."); -~chatnpc(angry, "TOYS! I WANT TOYS!"); +~chatplayer("Hello there."); +~chatnpc("What have you brought me? I want some more toys!"); +~chatplayer("I'm afraid I don't have any toys."); +~chatnpc("TOYS! I WANT TOYS!"); [label,philipe_jones] -~chatnpc(angry, "Daddy says you don't like Mr Jones. Mr Jones is nice. He brings me toys and sweets."); -~chatplayer(neutral, "Jones is a bad man, Philipe."); -~chatnpc(angry, "You're a bad ! I don't like you!"); -~chatplayer(neutral, "I'll try and console myself about that disappointment somehow."); +~chatnpc("Daddy says you don't like Mr Jones. Mr Jones is nice. He brings me toys and sweets."); +~chatplayer("Jones is a bad man, Philipe."); +~chatnpc("You're a bad ! I don't like you!"); +~chatplayer("I'll try and console myself about that disappointment somehow."); [label,philipe_carnillean_breakin] -~chatplayer(neutral, "Hello."); -~chatnpc(quiz, "Mommy said you're here to kill all the nasty people that keep breaking in."); -~chatplayer(confused, "Something like that."); -~chatnpc(quiz, "Can I watch?"); -~chatplayer(shock, "No!"); \ No newline at end of file +~chatplayer("Hello."); +~chatnpc("Mommy said you're here to kill all the nasty people that keep breaking in."); +~chatplayer("Something like that."); +~chatnpc("Can I watch?"); +~chatplayer("No!"); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 index cd4ef689d..d6c2bc05c 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/quest_hazeelcult.rs2 @@ -84,40 +84,40 @@ mes("You can hear there is a hollow behind this wall."); // from rs3 [oploc1,loc_2851] if(%hazeelcult_progress = ^hazeelcult_given_armour_or_scroll & %hazeelcult_side = ^hazeelcult_goodside) { ~mesbox("You search the cupbaord thoroughly. You find a bottle of poison and a mysterious amulet. You pass your discovery on to Ceril."); - ~chatplayer(angry, "Ceril!"); + ~chatplayer("Ceril!"); if (npc_find(coord, ceril_carnillean, 6, 0) = false) { return; } if (.npc_find(coord, butler_jones, 6, 0) = false) { return; } - ~chatnpc(angry, "What do you want now you scoundrel?"); - ~chatplayer(angry, "Look what I've found in the cupboard!"); + ~chatnpc("What do you want now you scoundrel?"); + ~chatplayer("Look what I've found in the cupboard!"); ~mesbox("You hand Ceril the bottle of poison."); - ~chatnpc(shock, "I... I don't believe it! Poison! JONES!"); - ~.chatnpc(neutral, "You called m'lud?"); - ~chatnpc(angry, "JONES! Just WHAT is this POISON doing here???"); - ~.chatnpc(worried, "P-p-poison??? yeah... uh... well, hmm... Oh, it's for Killing rats."); - ~.chatnpc(neutral, "Yes, that's right. Killing rats. I am but a loyal butler sir."); - ~chatnpc(angry, "Rats eh? Yes, fair enough. Sorry to have doubted you old boy."); - ~chatplayer(angry, "Then how about this?"); + ~chatnpc("I... I don't believe it! Poison! JONES!"); + ~.chatnpc("You called m'lud?"); + ~chatnpc("JONES! Just WHAT is this POISON doing here???"); + ~.chatnpc("P-p-poison??? yeah... uh... well, hmm... Oh, it's for Killing rats."); + ~.chatnpc("Yes, that's right. Killing rats. I am but a loyal butler sir."); + ~chatnpc("Rats eh? Yes, fair enough. Sorry to have doubted you old boy."); + ~chatplayer("Then how about this?"); ~mesbox("You show Ceril the amulet from the cupboard."); - ~chatnpc(shock, "Wh-what??? I've seen this amulet before... The thieves that broke in... One of them was wearing an identical amulet! Jones! I don't believe it!"); - ~chatnpc(angry, "Jones! We trusted you! We took you into our home!"); - ~.chatnpc(angry, "You senile old fool... It was all too easy! I should have killed you and your pathetic family weeks ago!"); - ~chatnpc(sad, "To think we took you in and trusted you... and this is how you repay us..."); - ~chatnpc(angry, "GUARD!"); + ~chatnpc("Wh-what??? I've seen this amulet before... The thieves that broke in... One of them was wearing an identical amulet! Jones! I don't believe it!"); + ~chatnpc("Jones! We trusted you! We took you into our home!"); + ~.chatnpc("You senile old fool... It was all too easy! I should have killed you and your pathetic family weeks ago!"); + ~chatnpc("To think we took you in and trusted you... and this is how you repay us..."); + ~chatnpc("GUARD!"); ~mesbox("A Guard rushes into the house."); - ~chatnpc(angry, "Take him away. Attempted murder and burglary."); - ~.chatnpc(angry, "Don't think this is the last you have heard of me Ceril. You and your family will pay dearly for this. GLORY TO HAZEEL! ALL PRAISE ZAMORAK!"); - ~chatnpc_specific(nc_name(carnillean_guard), carnillean_guard, neutral, "Now now. Come along quietly. There'll be no revenge where YOU'RE going - Port Sarim Jail."); + ~chatnpc("Take him away. Attempted murder and burglary."); + ~.chatnpc("Don't think this is the last you have heard of me Ceril. You and your family will pay dearly for this. GLORY TO HAZEEL! ALL PRAISE ZAMORAK!"); + ~chatnpc_specific(nc_name(carnillean_guard), carnillean_guard, "Now now. Come along quietly. There'll be no revenge where YOU'RE going - Port Sarim Jail."); .npc_del; - ~chatnpc(sad, "It looks like I am indebted to you sirrah!"); - ~chatplayer(neutral, "No problem. We all make mistakes."); - ~chatnpc(sad, "But if it weren't for you... My whole family... we could have been... I apologise for my harshness before."); - ~chatnpc(neutral, "the very least I can do is to reward you for your noble efforts, and to offer my sincerest apologies as a Lord and gentleman."); - ~chatplayer(happy, "Thank you Lord Ceril."); - ~chatnpc(happy, "No, no, thank YOU! Feel free to stop by anytime adventurer!"); + ~chatnpc("It looks like I am indebted to you sirrah!"); + ~chatplayer("No problem. We all make mistakes."); + ~chatnpc("But if it weren't for you... My whole family... we could have been... I apologise for my harshness before."); + ~chatnpc("the very least I can do is to reward you for your noble efforts, and to offer my sincerest apologies as a Lord and gentleman."); + ~chatplayer("Thank you Lord Ceril."); + ~chatnpc("No, no, thank YOU! Feel free to stop by anytime adventurer!"); queue(hazeelcult_quest_complete, 0); return; } diff --git a/data/src/scripts/quests/quest_hetty/scripts/quest_hetty.rs2 b/data/src/scripts/quests/quest_hetty/scripts/quest_hetty.rs2 index 18ca950bc..2e7f58682 100644 --- a/data/src/scripts/quests/quest_hetty/scripts/quest_hetty.rs2 +++ b/data/src/scripts/quests/quest_hetty/scripts/quest_hetty.rs2 @@ -3,7 +3,7 @@ if(%hetty_progress = ^hetty_objects_given) { ~mesbox("You drink from the cauldron, it tastes horrible! You feel yourself imbued with power."); queue(hetty_quest_complete, 0); } else { - ~chatplayer("neutral", "As nice as that looks I think I'll give it a miss for now."); + ~chatplayer("As nice as that looks I think I'll give it a miss for now."); } [queue,hetty_quest_complete] diff --git a/data/src/scripts/quests/quest_hunt/scripts/food_store.rs2 b/data/src/scripts/quests/quest_hunt/scripts/food_store.rs2 index ecdf10ebd..9e959d461 100644 --- a/data/src/scripts/quests/quest_hunt/scripts/food_store.rs2 +++ b/data/src/scripts/quests/quest_hunt/scripts/food_store.rs2 @@ -13,11 +13,11 @@ if ($entering = true) { ~open_and_close_door(loc_2070, $entering, false); [label,wydin_employees_only] -~chatnpc(neutral, "Hey, you can't go in there. Only employees of the grocery store can go in."); -~chatplayer(neutral, "Sorry, I didn't realise."); +~chatnpc("Hey, you can't go in there. Only employees of the grocery store can go in."); +~chatplayer("Sorry, I didn't realise."); [label,wydin_apron_required] -~chatnpc(neutral, "Can you put your apron on before going in there, please?"); +~chatnpc("Can you put your apron on before going in there, please?"); [label,wydin_get_pointer](label $l) npc_findallzone(coord); diff --git a/data/src/scripts/quests/quest_hunt/scripts/luthas.rs2 b/data/src/scripts/quests/quest_hunt/scripts/luthas.rs2 index 893a88a0c..a4b3c26c3 100644 --- a/data/src/scripts/quests/quest_hunt/scripts/luthas.rs2 +++ b/data/src/scripts/quests/quest_hunt/scripts/luthas.rs2 @@ -1,12 +1,12 @@ [opnpc1,luthas] if (%plantation_employed = 0) { - ~chatnpc(happy, "Hello I'm Luthas, I run the banana plantation here."); + ~chatnpc("Hello I'm Luthas, I run the banana plantation here."); @multi2("Could you offer me employment on your plantation?", luthas_employment, "That customs officer is annoying isn't she?", luthas_annoying_customs); } if (%crate_bananas = 10) { - ~chatplayer(happy, "I've filled a crate with bananas."); - ~chatnpc(happy, "Well done, here's your payment."); + ~chatplayer("I've filled a crate with bananas."); + ~chatnpc("Well done, here's your payment."); mes("Luthas hands you 30 coins."); inv_add(inv, coins, 30); @@ -20,37 +20,37 @@ if (%crate_bananas = 10) { @multi4("Will you pay me for another crate full?", luthas_another, "Thank you, I'll be on my way", luthas_thanks, "So where are these bananas going to be delivered to?", luthas_where_delivered, "That customs officer is annoying isn't she?", luthas_annoying_customs); } -~chatnpc(quiz, "Have you completed your task yet?"); +~chatnpc("Have you completed your task yet?"); @multi4("What did I have to do again?", luthas_what_to_do, "No, the crate isn't full yet.", luthas_crate_not_full, "So where are these bananas going to be delivered to?", luthas_where_delivered, "That customs officer is annoying isn't she?", luthas_annoying_customs); [label,luthas_employment] -~chatplayer(quiz, "Could you offer me employment on your plantation?"); -~chatnpc(happy, "Yes, I can sort something out. There's a crate ready to be loaded onto the ship."); -~chatnpc(happy, "If you could fill it up with bananas, I'll pay you 30 gold."); +~chatplayer("Could you offer me employment on your plantation?"); +~chatnpc("Yes, I can sort something out. There's a crate ready to be loaded onto the ship."); +~chatnpc("If you could fill it up with bananas, I'll pay you 30 gold."); %plantation_employed = 1; [label,luthas_annoying_customs] -~chatplayer(shifty, "That customs officer is annoying isn't she?"); -~chatnpc(neutral, "Well I know her pretty well. She doesn't cause me any trouble any more."); -~chatnpc(neutral, "She doesn't even search my export crates any more. She knows they only contain bananas."); +~chatplayer("That customs officer is annoying isn't she?"); +~chatnpc("Well I know her pretty well. She doesn't cause me any trouble any more."); +~chatnpc("She doesn't even search my export crates any more. She knows they only contain bananas."); [label,luthas_what_to_do] -~chatplayer(quiz, "What did I have to do again?"); -~chatnpc(happy, "There's a crate ready to be loaded onto the ship. If you could fill it up with bananas, I'll pay you 30 gold."); +~chatplayer("What did I have to do again?"); +~chatnpc("There's a crate ready to be loaded onto the ship. If you could fill it up with bananas, I'll pay you 30 gold."); [label,luthas_crate_not_full] -~chatplayer(sad, "No, the crate isn't full yet..."); -~chatnpc(angry, "Well come back when it is."); +~chatplayer("No, the crate isn't full yet..."); +~chatnpc("Well come back when it is."); [label,luthas_where_delivered] -~chatplayer(quiz, "So where are these bananas going to be delivered to?"); -~chatnpc(neutral, "I sell them to Wydin who runs a grocery store in Port Sarim."); +~chatplayer("So where are these bananas going to be delivered to?"); +~chatnpc("I sell them to Wydin who runs a grocery store in Port Sarim."); [label,luthas_another] -~chatplayer(quiz, "Will you pay me for another crate full?"); -~chatnpc(happy, "Yes certainly."); -~chatnpc(neutral, "If you go outside you should see the old crate has been loaded on to the ship, and there is another empty crate in its place."); +~chatplayer("Will you pay me for another crate full?"); +~chatnpc("Yes certainly."); +~chatnpc("If you go outside you should see the old crate has been loaded on to the ship, and there is another empty crate in its place."); %plantation_employed = 1; [label,luthas_thanks] -~chatplayer(happy, "Thank you, I'll be on my way."); +~chatplayer("Thank you, I'll be on my way."); diff --git a/data/src/scripts/quests/quest_hunt/scripts/redbeard_frank.rs2 b/data/src/scripts/quests/quest_hunt/scripts/redbeard_frank.rs2 index 8639faa70..a296f865a 100644 --- a/data/src/scripts/quests/quest_hunt/scripts/redbeard_frank.rs2 +++ b/data/src/scripts/quests/quest_hunt/scripts/redbeard_frank.rs2 @@ -1,11 +1,11 @@ [opnpc1,redbeard_frank] -~chatnpc(laugh, "Arr, Matey!"); +~chatnpc("Arr, Matey!"); if (%hunt_progress = 1) { @redboard_progress; } else if (%hunt_progress = 2 & inv_total(inv, hunt_chest_key) = 0) { - ~chatplayer(sad, "I seem to have lost my chest key..."); - ~chatnpc(neutral, "Arr, silly you. Fortunately I took the precaution to have another one made."); + ~chatplayer("I seem to have lost my chest key..."); + ~chatnpc("Arr, silly you. Fortunately I took the precaution to have another one made."); ~objbox(hunt_chest_key, "Frank hands you a chest key"); inv_add(inv, hunt_chest_key, 1); @@ -22,20 +22,20 @@ if (%hunt_progress = 0) { } [label,redboard_progress] -~chatnpc(quiz, "Have ye brought some rum for yer ol' mate Frank?"); +~chatnpc("Have ye brought some rum for yer ol' mate Frank?"); if (inv_total(inv, karamja_rum) >= 1) { - ~chatplayer(happy, "Yes, I've got some."); + ~chatplayer("Yes, I've got some."); @redbeard_hand_rum; return; } -~chatplayer(sad, "No, not yet."); +~chatplayer("No, not yet."); [label,redbeard_hand_rum] -~chatnpc(shifty, "Now a deal's a deal, I'll tell ye about the treasure. I used to serve under a pirate captain called One-Eyed Hector."); -~chatnpc(shifty, "Hector were very successful and became very rich. But about a year ago we were boarded by the Customs and Excise Agents."); -~chatnpc(sad, "Hector were killed along with many of the crew, I were one of the few to escape and I escaped with this."); +~chatnpc("Now a deal's a deal, I'll tell ye about the treasure. I used to serve under a pirate captain called One-Eyed Hector."); +~chatnpc("Hector were very successful and became very rich. But about a year ago we were boarded by the Customs and Excise Agents."); +~chatnpc("Hector were killed along with many of the crew, I were one of the few to escape and I escaped with this."); %hunt_progress = 2; @@ -43,36 +43,36 @@ inv_del(inv, karamja_rum, 1); inv_add(inv, hunt_chest_key, 1); ~objbox(hunt_chest_key, "Frank happily takes the rum... ... and hands you a key."); -~chatnpc(shifty, "This be Hector's key. I believe it opens his chest in his old room in the Blue Moon Inn in Varrock."); -~chatnpc(neutral, "With any luck his treasure will be in there."); +~chatnpc("This be Hector's key. I believe it opens his chest in his old room in the Blue Moon Inn in Varrock."); +~chatnpc("With any luck his treasure will be in there."); def_int $option = ~p_choice2("Ok thanks, I'll go and get it.", 1, "So why didn't you ever get it?", 2); if ($option = 1) { - ~chatplayer(happy, "Ok thanks, I'll go and get it."); + ~chatplayer("Ok thanks, I'll go and get it."); } else if ($option = 2) { - ~chatplayer(quiz, "So why didn't you ever get it?"); - ~chatnpc(sad, "I'm not allowed in the Blue Moon Inn. Apparently I'm a drunken trouble maker."); + ~chatplayer("So why didn't you ever get it?"); + ~chatnpc("I'm not allowed in the Blue Moon Inn. Apparently I'm a drunken trouble maker."); } [label,redbeard_treasure] -~chatplayer(shifty, "I'm in search of treasure."); -~chatnpc(shifty, "Arr, treasure you be after eh? Well I might be able to tell you where to find some... For a price..."); -~chatplayer(quiz, "What sort of price?"); -~chatnpc(neutral, "Well for example if you can get me a bottle of rum... Not just any rum mind..."); -~chatnpc(happy, "I'd like some rum made on Karamja Island. There's no rum like Karamja Rum!"); +~chatplayer("I'm in search of treasure."); +~chatnpc("Arr, treasure you be after eh? Well I might be able to tell you where to find some... For a price..."); +~chatplayer("What sort of price?"); +~chatnpc("Well for example if you can get me a bottle of rum... Not just any rum mind..."); +~chatnpc("I'd like some rum made on Karamja Island. There's no rum like Karamja Rum!"); %hunt_progress = 1; ~send_quest_progress(questlist:hunt, %hunt_progress, ^hunt_complete); [label,redbeard_arr] -~chatplayer(laugh, "Arr!"); -~chatnpc(laugh, "Arr!"); +~chatplayer("Arr!"); +~chatnpc("Arr!"); @redbeard_options; [label,redbeard_trade] -~chatplayer(quiz, "Do you have anything for trade?"); -~chatnpc(neutral, "Nothin' at the moment, but then again the Customs Agents are on the warpath right now."); +~chatplayer("Do you have anything for trade?"); +~chatnpc("Nothin' at the moment, but then again the Customs Agents are on the warpath right now."); [opnpcu,redbeard_frank] if (last_useitem ! karamja_rum) { @@ -83,8 +83,8 @@ if (last_useitem ! karamja_rum) { // I'm unsure what happens if you attempt this when progress = 0, // but it shouldn't be possible anyway. if (%hunt_progress = 1) { - ~chatplayer(happy, "Frank, I have some Karamja Rum."); + ~chatplayer("Frank, I have some Karamja Rum."); @redbeard_hand_rum; } else { - ~chatnpc(happy, "Thanks fer the thought, but I still have to finish this bottle."); + ~chatnpc("Thanks fer the thought, but I still have to finish this bottle."); } diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/ghost_grave_of_scorpius.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/ghost_grave_of_scorpius.rs2 index d09b1a0c5..6da25226d 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/ghost_grave_of_scorpius.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/ghost_grave_of_scorpius.rs2 @@ -1,3 +1,3 @@ [opnpc1,ghost_grave_of_scorpius] -~chatnpc(angry, "We are waiting for you to join us."); +~chatnpc("We are waiting for you to join us."); ~npc_retaliate(0); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/goblin_guard.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/goblin_guard.rs2 index e037d4fe0..24c43d229 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/goblin_guard.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/goblin_guard.rs2 @@ -1,3 +1,3 @@ [opnpc1,goblin_guard] -~chatnpc(goblinchat, "What are you doing here?|This is our domain now. Begone foul human!"); +~chatnpc("What are you doing here?|This is our domain now. Begone foul human!"); ~npc_retaliate(0); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/observatory_assistant.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/observatory_assistant.rs2 index 9374fd305..e51c5fa53 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/observatory_assistant.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/observatory_assistant.rs2 @@ -1,83 +1,83 @@ [opnpc1,observatory_assistant] switch_int(%itgronigen_progress) { case ^itgronigen_claimed_wine: - ~chatnpc(happy, "Thanks again."); + ~chatnpc("Thanks again."); case ^itgronigen_complete: - ~chatnpc(happy, "Well, hello again.|Thanks for helping out the professor."); - ~chatnpc(happy, "You've made my life much easier!|Have a drink on me!"); + ~chatnpc("Well, hello again.|Thanks for helping out the professor."); + ~chatnpc("You've made my life much easier!|Have a drink on me!"); inv_add(inv, jug_wine, 1); %itgronigen_progress = ^itgronigen_claimed_wine; ~objboxb(jug_wine, "The assistant gives you some wine."); - ~chatplayer(happy, "Thanks very much."); + ~chatplayer("Thanks very much."); case ^itgronigen_sent_telescope: // guides don't mention you can claim the wine before finishing the quest so // i'm guessing it's the OSRS dialogue without the instructions on how to get there - ~chatplayer(neutral, "Hello again."); - ~chatnpc(happy, "Ah, it's the telescope repairman! The professor is waiting for you in the Observatory."); + ~chatplayer("Hello again."); + ~chatnpc("Ah, it's the telescope repairman! The professor is waiting for you in the Observatory."); case ^itgronigen_given_mould: - ~chatnpc(quiz, "How can I help you?"); + ~chatnpc("How can I help you?"); switch_int(~p_choice2("I can't make the lens!", 1, "I dont need any help, thanks.", 2)) { case 1: - ~chatplayer(sad, "I can't make the lens!"); - ~chatnpc(neutral, "Crafting objects like this requires skill.|You may need to practice more first..."); + ~chatplayer("I can't make the lens!"); + ~chatnpc("Crafting objects like this requires skill.|You may need to practice more first..."); case 2: @assistant_dontneedhelp; } case ^itgronigen_given_glass: - ~chatnpc(quiz, "How can I help you?"); + ~chatnpc("How can I help you?"); switch_int(~p_choice2("I can't find the lens mould.", 1, "I dont need any help, thanks.", 2)) { case 1: - ~chatplayer(quiz, "I can't find the lens mould."); - ~chatnpc(quiz, "Can't you find the mould?"); + ~chatplayer("I can't find the lens mould."); + ~chatnpc("Can't you find the mould?"); // https://storage.googleapis.com/tannerdino/images/10_lens.png - ~chatnpc(neutral, "I'm sure I heard one of those goblins talking about it...|I bet they have hidden it somewhere."); + ~chatnpc("I'm sure I heard one of those goblins talking about it...|I bet they have hidden it somewhere."); case 2: @assistant_dontneedhelp; } case ^itgronigen_given_bronze: - ~chatnpc(quiz, "How can I help you?"); + ~chatnpc("How can I help you?"); switch_int(~p_choice2("I'm having problems getting glass.", 1, "I dont need any help, thanks.", 2)) { case 1: - ~chatplayer(quiz, "I'm having problems getting glass."); - ~chatnpc(quiz, "Don't you know how to make glass?"); - ~chatnpc(neutral, "Unfortunately we dont have those skills.|I remember reading about that somewhere..."); + ~chatplayer("I'm having problems getting glass."); + ~chatnpc("Don't you know how to make glass?"); + ~chatnpc("Unfortunately we dont have those skills.|I remember reading about that somewhere..."); case 2: @assistant_dontneedhelp; } case ^itgronigen_given_planks: - ~chatnpc(quiz, "How can I help you?"); + ~chatnpc("How can I help you?"); switch_int(~p_choice2("I can't see any bronze around.", 1, "I dont need any help, thanks.", 2)) { case 1: - ~chatplayer(quiz, "I can't see any bronze around."); - ~chatnpc(neutral, "You'll need to use tin and copper ore on a furnace|to produce this metal."); + ~chatplayer("I can't see any bronze around."); + ~chatnpc("You'll need to use tin and copper ore on a furnace|to produce this metal."); case 2: @assistant_dontneedhelp; } case ^itgronigen_started: - ~chatnpc(quiz, "How can I help you?"); + ~chatnpc("How can I help you?"); switch_int(~p_choice2("I can't find any planks!", 1, "I dont need any help, thanks.", 2)) { case 1: - ~chatplayer(quiz, "I can't find any planks!"); - ~chatnpc(neutral, "I understand planks can be found at the barbarian outpost, to the north east of Ardougne. You will probably have to trek over there to find some..."); + ~chatplayer("I can't find any planks!"); + ~chatnpc("I understand planks can be found at the barbarian outpost, to the north east of Ardougne. You will probably have to trek over there to find some..."); case 2: @assistant_dontneedhelp; } case ^itgronigen_not_started: - ~chatnpc(neutral, "Hello wanderer.|Do you require any assistance?"); + ~chatnpc("Hello wanderer.|Do you require any assistance?"); switch_int(~p_choice3("Yes, what do you two do here?", 1, "No, just looking around thanks.", 2, "Can I have a look through that telescope?", 3)) { case 1: - ~chatplayer(quiz, "Yes, what do you two do here?"); - ~chatnpc(happy, "Glad you ask. This is the Observatory reception."); - ~chatnpc(happy, "Up on the cliff is the Observatory dome,|from which you can view the heavens."); - ~chatnpc(sad, "That is, before the telescope was damaged by those monsters outside..."); + ~chatplayer("Yes, what do you two do here?"); + ~chatnpc("Glad you ask. This is the Observatory reception."); + ~chatnpc("Up on the cliff is the Observatory dome,|from which you can view the heavens."); + ~chatnpc("That is, before the telescope was damaged by those monsters outside..."); case 2: - ~chatplayer(happy, "No, just looking around thanks."); - ~chatnpc(happy, "Okay, just don't break anything.|If you need any help, let me know."); + ~chatplayer("No, just looking around thanks."); + ~chatnpc("Okay, just don't break anything.|If you need any help, let me know."); ~mesbox("The assistant continues with his work."); case 3: - ~chatplayer(quiz, "Can I have a look through that telescope?"); - ~chatnpc(neutral, "You can. You won't see much though."); - ~chatplayer(quiz, "And that's because?"); - ~chatnpc(neutral, "Just talk to the professor. He'll fill you in."); + ~chatplayer("Can I have a look through that telescope?"); + ~chatnpc("You can. You won't see much though."); + ~chatplayer("And that's because?"); + ~chatnpc("Just talk to the professor. He'll fill you in."); } } [label,assistant_dontneedhelp] -~chatplayer(happy, "I dont need any help, thanks."); -~chatnpc(happy, "Oh, okay then if you are sure."); +~chatplayer("I dont need any help, thanks."); +~chatnpc("Oh, okay then if you are sure."); ~mesbox("The assistant continues with his work."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/observatory_professor.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/observatory_professor.rs2 index cfc119a9f..8358ea956 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/observatory_professor.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/observatory_professor.rs2 @@ -2,19 +2,19 @@ // TODO: treasure trails dialogue switch_int(%itgronigen_progress) { case ^itgronigen_complete, ^itgronigen_claimed_wine: - ~chatnpc(happy, "Aha, my friend returns."); - ~chatnpc(happy, "Thanks for all your help with the telescope.|What can I do for you?"); // still has this linebreak in OSRS + ~chatnpc("Aha, my friend returns."); + ~chatnpc("Thanks for all your help with the telescope.|What can I do for you?"); // still has this linebreak in OSRS // using OSRS dialogue here, seems like it's probably unchanged switch_int (~p_choice2("Do you need any more help with the telescope?", 1, "Nothing, thanks.", 2)) { case 1: - ~chatplayer(happy, "Do you need any more help with the telescope?"); - ~chatnpc(happy, "Not right now,"); - ~chatnpc(happy, "but the stars may hold a secret for you."); + ~chatplayer("Do you need any more help with the telescope?"); + ~chatnpc("Not right now,"); + ~chatnpc("but the stars may hold a secret for you."); case 2: - ~chatplayer(happy, "Nothing, thanks."); - ~chatnpc(happy, "Okay, no problem. See you again."); + ~chatplayer("Nothing, thanks."); + ~chatnpc("Okay, no problem. See you again."); } - case ^itgronigen_sent_telescope: ~chatnpc(happy, "The telescope is now repaired!|Let's go to the Observatory."); // dialogue doesn't exist on OSRS at all + case ^itgronigen_sent_telescope: ~chatnpc("The telescope is now repaired!|Let's go to the Observatory."); // dialogue doesn't exist on OSRS at all case ^itgronigen_given_mould: @professor_lens; case ^itgronigen_given_glass: @professor_mould; case ^itgronigen_given_bronze: @professor_glass; @@ -23,118 +23,118 @@ switch_int(%itgronigen_progress) { case ^itgronigen_not_started: // this whole dialogue is quite different compared to OSRS, and unfortunately we have no RS2 reference so this // is mostly RSC + grammar corrected - ~chatnpc(neutral, "Hello adventurer.|What brings you to these parts?"); + ~chatnpc("Hello adventurer.|What brings you to these parts?"); switch_int (~p_choice4("I am lost!!!", 1, "I'd like to have a look through that telescope.", 2, "What's the ladder over there for?", 3, "It is of no concern of yours...", 4)) { case 1: - ~chatplayer(sad, "I am lost!!!"); - ~chatnpc(neutral, "Lost? It must have been those gnomes that led you astray."); - ~chatnpc(neutral, "Head north-east to find the city of Ardougne."); - ~chatplayer(neutral, "I'm sure I'll find the way."); - ~chatplayer(happy, "Thanks for all your help."); - ~chatnpc(neutral, "No problem at all. Come and visit again!"); + ~chatplayer("I am lost!!!"); + ~chatnpc("Lost? It must have been those gnomes that led you astray."); + ~chatnpc("Head north-east to find the city of Ardougne."); + ~chatplayer("I'm sure I'll find the way."); + ~chatplayer("Thanks for all your help."); + ~chatnpc("No problem at all. Come and visit again!"); ~mesbox("The professor carries on with his studies."); case 2: - ~chatplayer(neutral, "I'd like to have a look through that telescope."); - ~chatnpc(neutral, "So would I!"); - ~chatnpc(sad, "The trouble is, its not working."); - ~chatplayer(quiz, "What do you mean?"); - ~chatnpc(neutral, "Did you see those houses outside?"); - ~chatplayer(neutral, "Up on the hill? Yes, I've seen them."); - ~chatnpc(neutral, "It's a family of goblins."); - ~chatnpc(sad, "Since they moved here they have caused nothing but trouble."); - ~chatnpc(neutral, "Last week, my telescope was tampered with."); - ~chatnpc(angry, "Now, parts need replacing before it can be used again."); - ~chatnpc(quiz, "Err, I don't suppose you would be willing to help?"); + ~chatplayer("I'd like to have a look through that telescope."); + ~chatnpc("So would I!"); + ~chatnpc("The trouble is, its not working."); + ~chatplayer("What do you mean?"); + ~chatnpc("Did you see those houses outside?"); + ~chatplayer("Up on the hill? Yes, I've seen them."); + ~chatnpc("It's a family of goblins."); + ~chatnpc("Since they moved here they have caused nothing but trouble."); + ~chatnpc("Last week, my telescope was tampered with."); + ~chatnpc("Now, parts need replacing before it can be used again."); + ~chatnpc("Err, I don't suppose you would be willing to help?"); switch_int (~p_choice2("Sounds interesting, what can I do for you?", 1, "Oh, sorry, I don't have time for that.", 2)) { case 1: - ~chatplayer(happy, "Sounds interesting, what can I do for you?"); - ~chatnpc(happy, "Oh, thanks so much."); - ~chatnpc(happy, "I need three new parts for the telescope so it can be used again."); - ~chatnpc(neutral, "I need wood to make a new tripod,|bronze to make a new tube|and glass for a replacement lens."); - ~chatnpc(happy, "My assistant will help you obtaining these."); - ~chatnpc(happy, "Go talk to him if you need some advice."); - ~chatplayer(quiz, "Okay what do I need to do?"); - ~chatnpc(neutral, "First I need three planks of wood for the tripod."); + ~chatplayer("Sounds interesting, what can I do for you?"); + ~chatnpc("Oh, thanks so much."); + ~chatnpc("I need three new parts for the telescope so it can be used again."); + ~chatnpc("I need wood to make a new tripod,|bronze to make a new tube|and glass for a replacement lens."); + ~chatnpc("My assistant will help you obtaining these."); + ~chatnpc("Go talk to him if you need some advice."); + ~chatplayer("Okay what do I need to do?"); + ~chatnpc("First I need three planks of wood for the tripod."); %itgronigen_progress = ^itgronigen_started; ~send_quest_progress(questlist:itgronigen, %itgronigen_progress, ^itgronigen_complete); case 2: - ~chatplayer(neutral, "Oh, sorry, I don't have time for that."); - ~chatnpc(sad, "Oh dear. I really do need some help."); - ~chatnpc(neutral, "If you see anyone who can help then please send them my way."); + ~chatplayer("Oh, sorry, I don't have time for that."); + ~chatnpc("Oh dear. I really do need some help."); + ~chatnpc("If you see anyone who can help then please send them my way."); ~mesbox("The professor carries on with his duties."); } case 3: - ~chatplayer(quiz, "What's the ladder over there for?"); - ~chatnpc(neutral, "The ladder leads to the entrance of the cavern|that leads from here to the observatory."); + ~chatplayer("What's the ladder over there for?"); + ~chatnpc("The ladder leads to the entrance of the cavern|that leads from here to the observatory."); case 4: - ~chatplayer(neutral, "It is of no concern of yours..."); - ~chatnpc(angry, "Okay okay, there's no need to be insulting!"); + ~chatplayer("It is of no concern of yours..."); + ~chatnpc("Okay okay, there's no need to be insulting!"); } } [label,professor_glass] -~chatnpc(neutral, "How are you getting on finding me some glass?"); +~chatnpc("How are you getting on finding me some glass?"); if(inv_total(inv, molten_glass) = 0) { - ~chatplayer(neutral, "Still working on it."); - ~chatnpc(neutral, "I really need it. Please hurry."); + ~chatplayer("Still working on it."); + ~chatnpc("I really need it. Please hurry."); return; } -~chatplayer(happy, "Here it is!"); +~chatplayer("Here it is!"); // rsc version doesn't ever remove the molten glass, old guides say he removes and gives it back (same as post-rework) // so we'll do something similar here inv_del(inv, molten_glass, 1); %itgronigen_progress = ^itgronigen_given_glass; -~chatnpc(happy, "Excellent! Now all I need is to make the lens..."); -~chatnpc(sad, "Oh no, I can't use this glass!|Until I find the lens mould used to cast it."); -~chatplayer(quiz, "What do you mean, lens mould?"); -~chatnpc(neutral, "I need my lens mould.|Without it I'll never get the correct shape."); -~chatnpc(neutral, "I'll have to ask you to try and find it."); +~chatnpc("Excellent! Now all I need is to make the lens..."); +~chatnpc("Oh no, I can't use this glass!|Until I find the lens mould used to cast it."); +~chatplayer("What do you mean, lens mould?"); +~chatnpc("I need my lens mould.|Without it I'll never get the correct shape."); +~chatnpc("I'll have to ask you to try and find it."); [label,professor_planks] -~chatnpc(happy, "It's my helping hand, back again!"); -~chatnpc(quiz, "Do you have the planks yet?"); +~chatnpc("It's my helping hand, back again!"); +~chatnpc("Do you have the planks yet?"); if(inv_total(inv, plank) < 3) { - ~chatplayer(happy, "Sorry, not yet. Three planks was it?"); - ~chatnpc(happy, "It was indeed."); + ~chatplayer("Sorry, not yet. Three planks was it?"); + ~chatnpc("It was indeed."); return; } -~chatplayer(happy, "Yes, I've got them. Here they are."); +~chatplayer("Yes, I've got them. Here they are."); inv_del(inv, plank, 3); %itgronigen_progress = ^itgronigen_given_planks; -~chatnpc(happy, "Well done, I can start the tripod construction now."); -~chatnpc(happy, "Now, the bronze for the tube."); +~chatnpc("Well done, I can start the tripod construction now."); +~chatnpc("Now, the bronze for the tube."); [label,professor_bronze] -~chatnpc(happy, "Hello again, do you have the bronze yet?"); +~chatnpc("Hello again, do you have the bronze yet?"); if(inv_total(inv, bronze_bar) = 0) { - ~chatplayer(sad, "Not yet."); - ~chatnpc(neutral, "Please bring me one, then."); + ~chatplayer("Not yet."); + ~chatnpc("Please bring me one, then."); return; } -~chatplayer(happy, "Yes, I have it."); +~chatplayer("Yes, I have it."); inv_del(inv, bronze_bar, 1); %itgronigen_progress = ^itgronigen_given_bronze; -~chatnpc(happy, "Great. Now all I need is the lens made."); -~chatnpc(happy, "Please get me some molten glass."); +~chatnpc("Great. Now all I need is the lens made."); +~chatnpc("Please get me some molten glass."); [label,professor_mould] -~chatnpc(quiz, "Did you bring me the mould?"); +~chatnpc("Did you bring me the mould?"); if(inv_total(inv, lens_mould) = 0) { - ~chatplayer(neutral, "I haven't found it yet."); - ~chatnpc(neutral, "Perhaps the goblins have stolen it?"); + ~chatplayer("I haven't found it yet."); + ~chatnpc("Perhaps the goblins have stolen it?"); return; } // basing this off what guides have written (sals and runehq) -~chatplayer(happy, "Yes, I've managed to find it."); -~chatnpc(happy, "At last, you've brought all the items I need|to repair the telescope."); -~chatnpc(sad, "Oh no! I can't do this."); -~chatplayer(quiz, "What do you mean?"); -~chatnpc(shifty, "My crafting skill is not good enough|to finish this off."); -~chatnpc(happy, "You can use the mould with molten glass to make a new lens."); -~chatnpc(happy, "As long as you have practiced your crafting skills."); +~chatplayer("Yes, I've managed to find it."); +~chatnpc("At last, you've brought all the items I need|to repair the telescope."); +~chatnpc("Oh no! I can't do this."); +~chatplayer("What do you mean?"); +~chatnpc("My crafting skill is not good enough|to finish this off."); +~chatnpc("You can use the mould with molten glass to make a new lens."); +~chatnpc("As long as you have practiced your crafting skills."); if(inv_freespace(inv) = 0) { // TODO: check mesanims on this - ~chatplayer(neutral, "Hold on a second. I don't have space to carry it all."); - ~chatnpc(neutral, "Hurry and free up some space, then."); + ~chatplayer("Hold on a second. I don't have space to carry it all."); + ~chatnpc("Hurry and free up some space, then."); return; } %itgronigen_progress = ^itgronigen_given_mould; @@ -142,25 +142,25 @@ inv_add(inv, molten_glass, 1); ~objboxt(molten_glass, "The professor gives you back the molten glass."); [label,professor_lens] -~chatnpc(quiz, "Is the lens finished?"); +~chatnpc("Is the lens finished?"); if(inv_total(inv, lens) = 0) { - ~chatplayer(neutral, "I haven't finished it yet."); - ~chatnpc(neutral, "Oh, okay please hurry."); + ~chatplayer("I haven't finished it yet."); + ~chatnpc("Oh, okay please hurry."); return; } -~chatplayer(happy, "Yes, here it is."); +~chatplayer("Yes, here it is."); inv_del(inv, lens, 1); %itgronigen_progress = ^itgronigen_sent_telescope; -~chatnpc(happy, "Wonderful, at last I can fix the telescope."); +~chatnpc("Wonderful, at last I can fix the telescope."); if(inv_total(inv, lens_mould) > 0) { - ~chatnpc(happy, "I'll take back that mould for use again."); + ~chatnpc("I'll take back that mould for use again."); inv_del(inv, lens_mould, 1); } -~chatnpc(neutral, "Meet me at the Observatory later..."); +~chatnpc("Meet me at the Observatory later..."); [label,professor_friend_of_gods] -~chatnpc(happy, "By Saradomin's earlobes!|You must be a friend of the gods indeed."); -~chatnpc(happy, "Look in your backpack for your reward,|in payment for your work."); +~chatnpc("By Saradomin's earlobes!|You must be a friend of the gods indeed."); +~chatnpc("Look in your backpack for your reward,|in payment for your work."); // This opnpcu interaction might've been added with the rework, not adding the interactions with the assistant because // it's all dialogue from after the rework (compared to the RSC version anyways) @@ -169,8 +169,8 @@ if(inv_total(inv, lens_mould) > 0) { def_obj $used_item = last_useitem; if(last_useitem = plank | last_useitem = molten_glass | last_useitem = bronze_bar | last_useitem = lens_mould | last_useitem = lens) { if(oc_cert($used_item) = $used_item & oc_uncert($used_item) ! $used_item) { - ~chatplayer(happy, "What do you think of this!"); - ~chatnpc(neutral, "I'd rather you show me the actual item, as opposed to the note form."); + ~chatplayer("What do you think of this!"); + ~chatnpc("I'd rather you show me the actual item, as opposed to the note form."); return; } if(last_useitem = plank & %itgronigen_progress = ^itgronigen_started) { @@ -185,19 +185,19 @@ if(last_useitem = plank | last_useitem = molten_glass | last_useitem = bronze_ba @professor_lens; } } -~chatplayer(happy, "What do you think of this!"); -~chatnpc(neutral, "Wonderful. You must be very proud to have it."); +~chatplayer("What do you think of this!"); +~chatnpc("Wonderful. You must be very proud to have it."); [opnpc1,observatory_professor_tower] // mostly 1-1 with RSC (with fixes) because this dialogue doesn't exist post-rework switch_int(%itgronigen_progress) { case ^itgronigen_complete, ^itgronigen_claimed_wine: - ~chatnpc(happy, "Hello friend.|The stars hold many secrets."); - ~chatnpc(happy, "The moon rises in Scorpio..."); - case ^itgronigen_sent_telescope: ~chatnpc(happy, "Hello friend.|It's time to use the telescope."); + ~chatnpc("Hello friend.|The stars hold many secrets."); + ~chatnpc("The moon rises in Scorpio..."); + case ^itgronigen_sent_telescope: ~chatnpc("Hello friend.|It's time to use the telescope."); case ^itgronigen_not_started: - ~chatnpc(sad, "Hello friend. This is my poor telescope.|It's been tampered with and is not working."); - ~chatnpc(neutral, "If you're good at crafting,|I would appreciate your help!|Come to the reception if you can."); + ~chatnpc("Hello friend. This is my poor telescope.|It's been tampered with and is not working."); + ~chatnpc("If you're good at crafting,|I would appreciate your help!|Come to the reception if you can."); case default: - ~chatnpc(neutral, "Hello friend.|I hope you get all the parts soon.|Return to the reception|when you have the things I need."); + ~chatnpc("Hello friend.|I hope you get all the parts soon.|Return to the reception|when you have the things I need."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 index 020a428b3..c82d31615 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/quest_itgronigen.rs2 @@ -2,8 +2,8 @@ p_arrivedelay; if(%itgronigen_progress < ^itgronigen_complete) { // dialogue doesn't exist on OSRS - ~chatnpc_specific(nc_name(observatory_assistant), observatory_assistant, neutral, "Take great care down there.|Remember the goblins have taken over the cavern."); - ~chatplayer(neutral, "Oh, okay thanks for the warning."); + ~chatnpc_specific(nc_name(observatory_assistant), observatory_assistant, "Take great care down there.|Remember the goblins have taken over the cavern."); + ~chatplayer("Oh, okay thanks for the warning."); if_close; } anim(human_pickupfloor, 0); @@ -134,7 +134,7 @@ if(%keepdoor_unlocked = 0) { inv_del(inv, keep_key, 1); } if(coordz(coord) < coordz(loc_coord)) { - ~chatplayer(neutral, "I'd better be quick,|there may be more guards about."); + ~chatplayer("I'd better be quick,|there may be more guards about."); } [oploc1,loc_2210] @@ -143,7 +143,7 @@ switch_int(%itgronigen_progress) { case ^itgronigen_complete, ^itgronigen_claimed_wine: @observatory_telescope; case ^itgronigen_sent_telescope: if (npc_find(coord, observatory_professor_tower, 7, 0) = true) { - ~chatnpc(happy, "Well done, well done!!|Let's see what the stars have in store for us today."); + ~chatnpc("Well done, well done!!|Let's see what the stars have in store for us today."); @observatory_telescope; } case default: mes("It seems the telescope is not operational at the moment."); @@ -196,54 +196,54 @@ if (npc_find(coord, observatory_professor_tower, 7, 0) = false) { } switch_int(~p_choice2("I can see a constellation.", 1, "What am I looking at?", 2)) { case 1: - ~chatplayer(happy, "I can see a constellation."); - ~chatnpc(happy, "Yes, with this device|the heavens are opened to us..."); + ~chatplayer("I can see a constellation."); + ~chatnpc("Yes, with this device|the heavens are opened to us..."); @constellation_reward($constellation_numb); case 2: - ~chatplayer(quiz, "What am I looking at?"); - ~chatnpc(happy, "This is the revealed sky."); + ~chatplayer("What am I looking at?"); + ~chatnpc("This is the revealed sky."); @constellation_reward($constellation_numb); } [label,constellation_reward](int $constellation_numb) -~chatnpc(happy, "The constellation you saw was..."); +~chatnpc("The constellation you saw was..."); switch_int($constellation_numb) { case ^sign_capricorn: - ~chatnpc(happy, "Capricorn the goat.|You are granted an increase in strength."); + ~chatnpc("Capricorn the goat.|You are granted an increase in strength."); givexp(strength, 8750); case ^sign_virgo: - ~chatnpc(happy, "Virgo the virtuous.|The strong and peaceful nature of Virgo boosts your defence."); + ~chatnpc("Virgo the virtuous.|The strong and peaceful nature of Virgo boosts your defence."); givexp(defence, 8750); case ^sign_libra: // https://web.archive.org/web/20050521225136/http://www.runeweb.net/index.php?page=rs2-quest-observator mentions it in text - ~chatnpc(happy, "Libra the scales.|The scales of justice award you with law runes."); + ~chatnpc("Libra the scales.|The scales of justice award you with law runes."); inv_add(inv, lawrune, 3); case ^sign_aquarius: - ~chatnpc(happy, "Aquarius the water-bearer.|The Gods of water award you with water runes."); + ~chatnpc("Aquarius the water-bearer.|The Gods of water award you with water runes."); inv_add(inv, waterrune, 25); case ^sign_scorpio: - ~chatnpc(happy, "Scorpio the scorpion.|The scorpion gives you poison from it's sting."); + ~chatnpc("Scorpio the scorpion.|The scorpion gives you poison from it's sting."); inv_add(inv, weapon_poison, 1); case ^sign_leo: - ~chatnpc(happy, "Leo the lion.|The power of the lion has increased your hitpoints."); + ~chatnpc("Leo the lion.|The power of the lion has increased your hitpoints."); givexp(hitpoints, 8750); case ^sign_aries: - ~chatnpc(happy, "Aries the ram.|The ram's strength improves your attack abilites."); + ~chatnpc("Aries the ram.|The ram's strength improves your attack abilites."); givexp(attack, 8750); case ^sign_sagittarius: - ~chatnpc(happy, "Sagittarius the Centaur.|The Gods award you a maple longbow."); + ~chatnpc("Sagittarius the Centaur.|The Gods award you a maple longbow."); inv_add(inv, maple_longbow, 1); case ^sign_gemini: - ~chatnpc(happy, "Gemini the twins.|The double nature of Gemini awards you a two-handed weapon."); + ~chatnpc("Gemini the twins.|The double nature of Gemini awards you a two-handed weapon."); inv_add(inv, black_2h_sword, 1); case ^sign_pisces: - ~chatnpc(happy, "Pisces the fish.|The gods rain food from the sea on you."); + ~chatnpc("Pisces the fish.|The gods rain food from the sea on you."); inv_add(inv, tuna, 3); case ^sign_taurus: - ~chatnpc(happy, "Taurus the bull.|You are given the strength of a bull."); + ~chatnpc("Taurus the bull.|You are given the strength of a bull."); inv_add(inv, 1dose2strength, 1); case ^sign_cancer: - ~chatnpc(happy, "Cancer the crab.|The armoured crab gives you an amulet of defence."); + ~chatnpc("Cancer the crab.|The armoured crab gives you an amulet of defence."); inv_add(inv, amulet_of_defence, 1); } givexp(crafting, 22500); diff --git a/data/src/scripts/quests/quest_itgronigen/scripts/spirit_of_scorpius.rs2 b/data/src/scripts/quests/quest_itgronigen/scripts/spirit_of_scorpius.rs2 index 84a29912e..dc0427e17 100644 --- a/data/src/scripts/quests/quest_itgronigen/scripts/spirit_of_scorpius.rs2 +++ b/data/src/scripts/quests/quest_itgronigen/scripts/spirit_of_scorpius.rs2 @@ -1,7 +1,7 @@ [opnpc1,spirit_of_scorpius] -~chatnpc(angry, "Who treads upon my grave?"); +~chatnpc("Who treads upon my grave?"); if(%itgronigen_progress < ^itgronigen_complete) { - ~chatnpc(angry, "How dare you disturb me!"); + ~chatnpc("How dare you disturb me!"); return; } def_int $option; @@ -12,42 +12,42 @@ if(%scorpius_given_symbol = 1) { } switch_int($option) { case 1: - ~chatplayer(neutral, "I seek your wisdom."); - ~chatnpc(neutral, "Indeed, I feel you have beheld the far places in the heavens."); - ~chatnpc(neutral, "My Lord instructs me to help you."); - ~chatnpc(neutral, "Here is a mould to make a token for our Lord;|a mould for the unholy symbol of Zamorak."); + ~chatplayer("I seek your wisdom."); + ~chatnpc("Indeed, I feel you have beheld the far places in the heavens."); + ~chatnpc("My Lord instructs me to help you."); + ~chatnpc("Here is a mould to make a token for our Lord;|a mould for the unholy symbol of Zamorak."); %scorpius_given_symbol = 1; inv_add(inv, unholy_mould, 1); mes("The ghost gives you a casting mould."); case 2: - ~chatplayer(neutral, "I have come to seek a blessing."); + ~chatplayer("I have come to seek a blessing."); if(inv_total(inv, unpowered_symbol) > 0) { - ~chatnpc(happy, "I see you have the unholy symbol of our Lord.|I will bless it for you."); + ~chatnpc("I see you have the unholy symbol of our Lord.|I will bless it for you."); mes("The ghost mutters in a strange voice."); mes("The unholy symbol throbs with power."); if_close; inv_del(inv, unpowered_symbol, 1); inv_add(inv, unholy_symbol, 1); p_delay(5); - ~chatnpc(neutral, "The symbol of our Lord has been blessed with power!"); - ~chatnpc(neutral, "My master calls."); + ~chatnpc("The symbol of our Lord has been blessed with power!"); + ~chatnpc("My master calls."); } else if(inv_total(inv, unholy_symbol) > 0) { - ~chatnpc(happy, "I see you have the unholy symbol of our Lord.|It is blessed with the Lord Zamorak's power."); - ~chatnpc(happy, "Come to me when your faith weakens."); + ~chatnpc("I see you have the unholy symbol of our Lord.|It is blessed with the Lord Zamorak's power."); + ~chatnpc("Come to me when your faith weakens."); } else { - ~chatnpc(angry, "No blessings will be given to those|who have no symbol of our Lord's love."); + ~chatnpc("No blessings will be given to those|who have no symbol of our Lord's love."); } case 3: - ~chatplayer(neutral, "I need another mould for the unholy symbol."); + ~chatplayer("I need another mould for the unholy symbol."); if(inv_total(inv, unholy_mould) > 0) { - ~chatnpc(neutral, "One you already have, another is not needed."); - ~chatplayer(happy, "Leave me be."); // this is npc dialogue in RSC, probably broken when converting over and never fixed + ~chatnpc("One you already have, another is not needed."); + ~chatplayer("Leave me be."); // this is npc dialogue in RSC, probably broken when converting over and never fixed return; } - ~chatnpc(neutral, "To lose an object is easy to replace.|To lose the affections of our Lord is impossible to forgive."); + ~chatnpc("To lose an object is easy to replace.|To lose the affections of our Lord is impossible to forgive."); inv_add(inv, unholy_mould, 1); mes("The ghost hands you another mould."); case 4: - ~chatplayer(angry, "I have come to kill you."); - ~chatnpc(neutral, "The might of mortals, to me, is as the dust to the sea."); + ~chatplayer("I have come to kill you."); + ~chatnpc("The might of mortals, to me, is as the dust to the sea."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/anna.rs2 b/data/src/scripts/quests/quest_murder/scripts/anna.rs2 index e00135206..13bc22de6 100644 --- a/data/src/scripts/quests/quest_murder/scripts/anna.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/anna.rs2 @@ -2,8 +2,8 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("She is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "Oh really? What do you want to know then?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("Oh really? What do you want to know then?"); def_int $option; if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you when the murder happened?", 2, "Do you recognise this thread?", 3, "Why'd you buy poison the other day?", 4); @@ -16,27 +16,27 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "It was clearly an intruder."); - ~chatplayer(confused, "Well, I don't think it was."); - ~chatnpc(angry, "It was one of our lazy servants then."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("It was clearly an intruder."); + ~chatplayer("Well, I don't think it was."); + ~chatnpc("It was one of our lazy servants then."); case 2: - ~chatplayer(neutral, "Where were you when the murder happened?"); - ~chatnpc(neutral, "In the library. No one else was there so|you'll just have to take my word for it."); + ~chatplayer("Where were you when the murder happened?"); + ~chatnpc("In the library. No one else was there so|you'll just have to take my word for it."); case 3: - ~chatplayer(confused, "Do you recognise this thread?"); + ~chatplayer("Do you recognise this thread?"); ~mesbox("You show Anna the thread from the study."); if(inv_total(inv, murder_green_thread) > 0) { - ~chatnpc(neutral, "It's some Green thread. It's not exactly uncommon is it? My trousers are made of the same material."); + ~chatnpc("It's some Green thread. It's not exactly uncommon is it? My trousers are made of the same material."); return; } - ~chatnpc(neutral, "Not really, no. Thread is fairly common."); + ~chatnpc("Not really, no. Thread is fairly common."); case 4: - ~chatplayer(neutral, "Why'd you buy poison the other day?"); - ~chatnpc(angry, "That useless Gardener Stanford has let his compost heap fester. It's an eyesore to the garden! So I bought some poison from a travelling salesman so that I could kill off some of the wildlife living in it."); + ~chatplayer("Why'd you buy poison the other day?"); + ~chatnpc("That useless Gardener Stanford has let his compost heap fester. It's an eyesore to the garden! So I bought some poison from a travelling salesman so that I could kill off some of the wildlife living in it."); if(%murder_murderer_id = ^murderer_anna & %murder_poisonproof_progress = ^poisonproof_spoken_salesman) { %murder_poisonproof_progress = ^poisonproof_spoken_murderer; } } - case ^murder_complete: ~chatnpc(neutral, "Apparently you aren't as stupid as you look."); + case ^murder_complete: ~chatnpc("Apparently you aren't as stupid as you look."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/bob.rs2 b/data/src/scripts/quests/quest_murder/scripts/bob.rs2 index 98e447589..dfc4079c9 100644 --- a/data/src/scripts/quests/quest_murder/scripts/bob.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/bob.rs2 @@ -2,8 +2,8 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("He is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "I suppose I had better talk to you then."); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("I suppose I had better talk to you then."); def_int $option; if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you when the murder happened?", 2, "Do you recognise this thread?", 3, "Why'd you buy poison the other day?", 4); @@ -16,29 +16,29 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "I don't really care as long as no one thinks it's me. Maybe it was that strange poison seller who headed towards the seers village."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("I don't really care as long as no one thinks it's me. Maybe it was that strange poison seller who headed towards the seers village."); case 2: - ~chatplayer(neutral, "Where were you when the murder happened?"); - ~chatnpc(neutral, "I was walking by myself in the garden."); - ~chatplayer(neutral, "And can anyone vouch for that?"); - ~chatnpc(neutral, "No. But I was."); + ~chatplayer("Where were you when the murder happened?"); + ~chatnpc("I was walking by myself in the garden."); + ~chatplayer("And can anyone vouch for that?"); + ~chatnpc("No. But I was."); case 3: - ~chatplayer(confused, "Do you recognise this thread?"); + ~chatplayer("Do you recognise this thread?"); ~mesbox("You show him the thread you discovered."); if(inv_total(inv, murder_red_thread) > 0) { // no period - ~chatnpc(confused, "It's some red thread. I suppose you think that's some kind of clue? It looks like the material my trousers are made of"); + ~chatnpc("It's some red thread. I suppose you think that's some kind of clue? It looks like the material my trousers are made of"); return; } - ~chatnpc(confused, "It's some thread. great clue. No, really."); + ~chatnpc("It's some thread. great clue. No, really."); case 4: - ~chatplayer(neutral, "Why'd you buy poison the other day?"); - ~chatnpc(confused, "What's it to you anyway?"); - ~chatnpc(angry, "If you absolutely must know, we had a problem with the beehive in the garden, and as all of our servants are so pathetically useless, I decided I would deal with it myself. So I did."); + ~chatplayer("Why'd you buy poison the other day?"); + ~chatnpc("What's it to you anyway?"); + ~chatnpc("If you absolutely must know, we had a problem with the beehive in the garden, and as all of our servants are so pathetically useless, I decided I would deal with it myself. So I did."); if(%murder_murderer_id = ^murderer_bob & %murder_poisonproof_progress = ^poisonproof_spoken_salesman) { // TODO: figure out exactly when these would get set for each murderer %murder_poisonproof_progress = ^poisonproof_spoken_murderer; } } - case ^murder_complete: ~chatnpc(neutral, "Apparently you aren't as stupid as you look."); + case ^murder_complete: ~chatnpc("Apparently you aren't as stupid as you look."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/carol.rs2 b/data/src/scripts/quests/quest_murder/scripts/carol.rs2 index ceb5d6a9a..839ee8660 100644 --- a/data/src/scripts/quests/quest_murder/scripts/carol.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/carol.rs2 @@ -2,8 +2,8 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("She is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "Well, ask what you want to know then."); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("Well, ask what you want to know then."); def_int $option; if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you when the murder happened?", 2, "Do you recognise this thread?", 3, "Why'd you buy poison the other day?", 4); @@ -16,26 +16,26 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "I don't know. I think it's very convenient|that you have arrived here so soon after it happened.|Maybe it was you."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("I don't know. I think it's very convenient|that you have arrived here so soon after it happened.|Maybe it was you."); case 2: - ~chatplayer(neutral, "Where were you when the murder happened?"); - ~chatnpc(angry, "Why? Are you accusing me of something?|You seem to have a very high opinion of yourself|I was in my room if you must know, alone."); + ~chatplayer("Where were you when the murder happened?"); + ~chatnpc("Why? Are you accusing me of something?|You seem to have a very high opinion of yourself|I was in my room if you must know, alone."); case 3: - ~chatplayer(confused, "Do you recognise this thread?"); + ~chatplayer("Do you recognise this thread?"); ~mesbox("You show Carol the thread found at the crime scene."); if(inv_total(inv, murder_red_thread) > 0) { - ~chatnpc(neutral, "It's some red thread... it kind of looks like the|Same material as my trousers. But obviously it's not."); + ~chatnpc("It's some red thread... it kind of looks like the|Same material as my trousers. But obviously it's not."); return; } - ~chatnpc(confused, "It's some thread. Sorry, do you have a point here? Or do you just enjoy wasting peoples time?"); + ~chatnpc("It's some thread. Sorry, do you have a point here? Or do you just enjoy wasting peoples time?"); case 4: - ~chatplayer(neutral, "Why'd you buy poison the other day?"); - ~chatnpc(confused, "I don't see what on earth it has to|do with you, but the drain outside was"); - ~chatnpc(angry, "blocked, and as nobody else here has the|intelligence to even unblock a simple drain|I felt I had to do it myself."); + ~chatplayer("Why'd you buy poison the other day?"); + ~chatnpc("I don't see what on earth it has to|do with you, but the drain outside was"); + ~chatnpc("blocked, and as nobody else here has the|intelligence to even unblock a simple drain|I felt I had to do it myself."); if(%murder_murderer_id = ^murderer_carol & %murder_poisonproof_progress = ^poisonproof_spoken_salesman) { // TODO: figure out exactly when these would get set for each murderer %murder_poisonproof_progress = ^poisonproof_spoken_murderer; } } - case ^murder_complete: ~chatnpc(neutral, "Apparently you aren't as stupid as you look."); + case ^murder_complete: ~chatnpc("Apparently you aren't as stupid as you look."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/david.rs2 b/data/src/scripts/quests/quest_murder/scripts/david.rs2 index 2900a3ad7..a7a790515 100644 --- a/data/src/scripts/quests/quest_murder/scripts/david.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/david.rs2 @@ -2,8 +2,8 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("He is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "And? Make this quick, I have better things to do|than be interrogated by halfwits all day."); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("And? Make this quick, I have better things to do|than be interrogated by halfwits all day."); def_int $option; if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you when the murder happened?", 2, "Do you recognise this thread?", 3, "Why'd you buy poison the other day?", 4); @@ -16,28 +16,28 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "I don't really know or care.|Frankly, the old man deserved to die."); - ~chatnpc(neutral, "There was a suspicious red headed man who came|to the house the other day selling poison now I|think about it. Last I saw he was headed towards|the tavern in the Seers village."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("I don't really know or care.|Frankly, the old man deserved to die."); + ~chatnpc("There was a suspicious red headed man who came|to the house the other day selling poison now I|think about it. Last I saw he was headed towards|the tavern in the Seers village."); case 2: - ~chatplayer(neutral, "Where were you when the murder happened?"); - ~chatnpc(angry, "That is none of your business.|Are we finished now, or are you just going|to stand there irritating me with your|idiotic questions all day?"); + ~chatplayer("Where were you when the murder happened?"); + ~chatnpc("That is none of your business.|Are we finished now, or are you just going|to stand there irritating me with your|idiotic questions all day?"); case 3: - ~chatplayer(confused, "Do you recognise this thread?"); + ~chatplayer("Do you recognise this thread?"); ~mesbox("You show him the thread you found on the study window"); if(inv_total(inv, murder_green_thread) > 0) { // no period - ~chatnpc(angry, "It's some Green thread, like my trousers are made of.|Are you finished? I'm not sure which I dislike more|about you, your face or your general bad odour"); + ~chatnpc("It's some Green thread, like my trousers are made of.|Are you finished? I'm not sure which I dislike more|about you, your face or your general bad odour"); return; } - ~chatnpc(confused, "No. Can I go yet? Your face irritates me."); + ~chatnpc("No. Can I go yet? Your face irritates me."); case 4: - ~chatplayer(neutral, "Why'd you buy poison the other day?"); - ~chatnpc(angry, "There was a nest of spiders upstairs between the two servants' quarters. Obviously I had to kill them before our pathetic servants whined at my father some more."); - ~chatnpc(confused, "Honestly, it's like they expect to be treated like royalty! If I had my way I would fire the whole workshy lot of them!"); + ~chatplayer("Why'd you buy poison the other day?"); + ~chatnpc("There was a nest of spiders upstairs between the two servants' quarters. Obviously I had to kill them before our pathetic servants whined at my father some more."); + ~chatnpc("Honestly, it's like they expect to be treated like royalty! If I had my way I would fire the whole workshy lot of them!"); if(%murder_murderer_id = ^murderer_david & %murder_poisonproof_progress = ^poisonproof_spoken_salesman) { // TODO: figure out exactly when these would get set for each murderer %murder_poisonproof_progress = ^poisonproof_spoken_murderer; } } - case ^murder_complete: ~chatnpc(neutral, "Apparently you aren't as stupid as you look."); + case ^murder_complete: ~chatnpc("Apparently you aren't as stupid as you look."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/donovan.rs2 b/data/src/scripts/quests/quest_murder/scripts/donovan.rs2 index 1715afbb3..98b6e39d4 100644 --- a/data/src/scripts/quests/quest_murder/scripts/donovan.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/donovan.rs2 @@ -1,10 +1,10 @@ [opnpc1,donovan] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(neutral, "I have no interest in talking to gawkers."); + ~chatnpc("I have no interest in talking to gawkers."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "How can I help?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("How can I help?"); def_int $option; if(%murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you at the time of the murder?", 2, "Did you hear any suspicious noises at all?", 3, "Do you know why so much poison was bought recently?", 4); @@ -13,23 +13,23 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "Oh... I really couldn't say. I wouldn't really want to point any fingers at anybody. If I had to make a guess I'd have to say it was probably Bob though."); - ~chatnpc(neutral, "I saw him arguing with Lord Sinclair about some missing silverware from the Kitchen. It was a very heated argument."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("Oh... I really couldn't say. I wouldn't really want to point any fingers at anybody. If I had to make a guess I'd have to say it was probably Bob though."); + ~chatnpc("I saw him arguing with Lord Sinclair about some missing silverware from the Kitchen. It was a very heated argument."); case 2: - ~chatplayer(neutral, "Where were you at the time of the murder?"); - ~chatnpc(confused, "Me? I was sound asleep here in the servants Quarters. It's very hard work as a handyman around here, There's always something to do!"); + ~chatplayer("Where were you at the time of the murder?"); + ~chatnpc("Me? I was sound asleep here in the servants Quarters. It's very hard work as a handyman around here, There's always something to do!"); case 3: - ~chatplayer(neutral, "Did you hear any suspicious noises at all?"); - ~chatnpc(confused, "Hmmm..... No, I didn't, but I sleep very soundly at night."); - ~chatplayer(confused, "So you didn't hear any sounds of a struggle or any barking from the guard dog next to his study window?"); - ~chatnpc(confused, "Now you mention it, no. It is odd I didn't hear anything like that. But I do sleep very soundly as I said and wouldn't necessarily have heard it if there was any such noise."); + ~chatplayer("Did you hear any suspicious noises at all?"); + ~chatnpc("Hmmm..... No, I didn't, but I sleep very soundly at night."); + ~chatplayer("So you didn't hear any sounds of a struggle or any barking from the guard dog next to his study window?"); + ~chatnpc("Now you mention it, no. It is odd I didn't hear anything like that. But I do sleep very soundly as I said and wouldn't necessarily have heard it if there was any such noise."); case 4: - ~chatplayer(neutral, "Do you know why so much poison was bought recently?"); - ~chatnpc(neutral, "Well, I do know Frank bought some poison recently to clean the family crest that's outside."); + ~chatplayer("Do you know why so much poison was bought recently?"); + ~chatnpc("Well, I do know Frank bought some poison recently to clean the family crest that's outside."); // end space intentional - ~chatnpc(neutral, "It's very old and rusty, and I couldn't clean it myself, so he said he would buy some cleaner and clean it himself. He probably just got some from that Poison Salesman who "); - ~chatnpc(neutral, "You'd really have to ask him though."); + ~chatnpc("It's very old and rusty, and I couldn't clean it myself, so he said he would buy some cleaner and clean it himself. He probably just got some from that Poison Salesman who "); + ~chatnpc("You'd really have to ask him though."); } - case ^murder_complete: ~chatnpc(happy, "Thank you for all your help in solving the murder."); + case ^murder_complete: ~chatnpc("Thank you for all your help in solving the murder."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/elizabeth.rs2 b/data/src/scripts/quests/quest_murder/scripts/elizabeth.rs2 index ea48602f3..458d7c261 100644 --- a/data/src/scripts/quests/quest_murder/scripts/elizabeth.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/elizabeth.rs2 @@ -2,8 +2,8 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("She is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "What's so important you need to bother me with then?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("What's so important you need to bother me with then?"); def_int $option; if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you when the murder happened?", 2, "Do you recognise this thread?", 3, "Why'd you buy poison the other day?", 4); @@ -16,30 +16,30 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "Could have been anyone. The old man was an idiot. He's been asking for it for years."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("Could have been anyone. The old man was an idiot. He's been asking for it for years."); case 2: - ~chatplayer(neutral, "Where were you when the murder happened?"); - ~chatnpc(neutral, "I was out."); - ~chatplayer(neutral, "Care to be any more specific?"); - ~chatnpc(angry, "Not really. I don't have to justify myself to the likes of you, you know. I know the King personally you know. Now are we finished here?"); + ~chatplayer("Where were you when the murder happened?"); + ~chatnpc("I was out."); + ~chatplayer("Care to be any more specific?"); + ~chatnpc("Not really. I don't have to justify myself to the likes of you, you know. I know the King personally you know. Now are we finished here?"); case 3: - ~chatplayer(confused, "Do you recognise this thread?"); + ~chatplayer("Do you recognise this thread?"); ~mesbox("You show her the thread from the study window."); if(inv_total(inv, murder_blue_thread) > 0) { - ~chatnpc(neutral, "Looks like Blue thread to me. If you can't work that out for yourself I don't hold much hope of you solving this crime."); - ~chatplayer(neutral, "It looks a lot like the material your trousers are made of doesn't it?"); - ~chatnpc(angry, "I suppose it does. So what?"); + ~chatnpc("Looks like Blue thread to me. If you can't work that out for yourself I don't hold much hope of you solving this crime."); + ~chatplayer("It looks a lot like the material your trousers are made of doesn't it?"); + ~chatnpc("I suppose it does. So what?"); return; } - ~chatnpc(confused, "It's some thread. You're not very good at this whole investigation thing are you?"); + ~chatnpc("It's some thread. You're not very good at this whole investigation thing are you?"); case 4: - ~chatplayer(neutral, "Why'd you buy poison the other day?"); - ~chatnpc(confused, "I don't see what on earth it has to do with you, but the drain outside was"); - ~chatnpc(angry, "blocked, and as nobody else here has the intelligence to even unblock a simple drain I felt I had to do it myself."); + ~chatplayer("Why'd you buy poison the other day?"); + ~chatnpc("I don't see what on earth it has to do with you, but the drain outside was"); + ~chatnpc("blocked, and as nobody else here has the intelligence to even unblock a simple drain I felt I had to do it myself."); if(%murder_murderer_id = ^murderer_carol & %murder_poisonproof_progress = ^poisonproof_spoken_salesman) { // TODO: figure out exactly when these would get set for each murderer %murder_poisonproof_progress = ^poisonproof_spoken_murderer; } } - case ^murder_complete: ~chatnpc(neutral, "Apparently you aren't as stupid as you look."); + case ^murder_complete: ~chatnpc("Apparently you aren't as stupid as you look."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/frank.rs2 b/data/src/scripts/quests/quest_murder/scripts/frank.rs2 index 47b52f512..00c735cc3 100644 --- a/data/src/scripts/quests/quest_murder/scripts/frank.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/frank.rs2 @@ -2,9 +2,9 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("He is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "Good for you. Now what do you want?"); - ~chatnpc(sad, "...And can you spare me any money? I'm a little short..."); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("Good for you. Now what do you want?"); + ~chatnpc("...And can you spare me any money? I'm a little short..."); def_int $option; if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you when the murder happened?", 2, "Do you recognise this thread?", 3, "Why'd you buy poison the other day?", 4); @@ -17,28 +17,28 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "I don't know."); - ~chatnpc(neutral, "You don't know how long it takes an inheritance to come through do you? I could really use that money pretty soon..."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("I don't know."); + ~chatnpc("You don't know how long it takes an inheritance to come through do you? I could really use that money pretty soon..."); case 2: - ~chatplayer(neutral, "Where were you when the murder happened?"); - ~chatnpc(neutral, "I don't know, somewhere around here probably."); - ~chatnpc(angry, "Could you spare me a few coins? I'll be able to pay you double tomorrow it's just there's this poker night tonight in town..."); + ~chatplayer("Where were you when the murder happened?"); + ~chatnpc("I don't know, somewhere around here probably."); + ~chatnpc("Could you spare me a few coins? I'll be able to pay you double tomorrow it's just there's this poker night tonight in town..."); case 3: - ~chatplayer(confused, "Do you recognise this thread?"); + ~chatplayer("Do you recognise this thread?"); ~mesbox("Frank examines the thread from the crime scene."); if(inv_total(inv, murder_blue_thread) > 0) { - ~chatnpc(neutral, "It kind of looks like the same material as my trousers are made of... same colour anyway. Think it's worth anything? Can I have it? Or just some money?"); + ~chatnpc("It kind of looks like the same material as my trousers are made of... same colour anyway. Think it's worth anything? Can I have it? Or just some money?"); return; } - ~chatnpc(confused, "It looks like thread to me, but I'm not exactly an expert. Is it worth something? Can I have it? Actually, can you spare me a few gold?"); + ~chatnpc("It looks like thread to me, but I'm not exactly an expert. Is it worth something? Can I have it? Actually, can you spare me a few gold?"); case 4: - ~chatplayer(neutral, "Why'd you buy poison the other day?"); - ~chatnpc(neutral, "Would you like to buy some? I'm kind of strapped for cash right now, I'll sell it to you cheap, it's hardly been used at all."); - ~chatnpc(neutral, "I just used a bit to clean that family crest outside up a bit. Do you think I can get much money For the family crest, actually? It's cleaned up a bit now."); + ~chatplayer("Why'd you buy poison the other day?"); + ~chatnpc("Would you like to buy some? I'm kind of strapped for cash right now, I'll sell it to you cheap, it's hardly been used at all."); + ~chatnpc("I just used a bit to clean that family crest outside up a bit. Do you think I can get much money For the family crest, actually? It's cleaned up a bit now."); if(%murder_murderer_id = ^murderer_frank & %murder_poisonproof_progress = ^poisonproof_spoken_salesman) { // TODO: figure out exactly when these would get set for each murderer %murder_poisonproof_progress = ^poisonproof_spoken_murderer; } } - case ^murder_complete: ~chatnpc(neutral, "Apparently you aren't as stupid as you look."); + case ^murder_complete: ~chatnpc("Apparently you aren't as stupid as you look."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/gossip.rs2 b/data/src/scripts/quests/quest_murder/scripts/gossip.rs2 index c5a6d3f8c..05906ffde 100644 --- a/data/src/scripts/quests/quest_murder/scripts/gossip.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/gossip.rs2 @@ -1,97 +1,97 @@ [opnpc1,gossip] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(neutral, "There's some kind of commotion up at the Sinclair place I hear. Not surprising all things considered."); + ~chatnpc("There's some kind of commotion up at the Sinclair place I hear. Not surprising all things considered."); case ^murder_started: - ~chatplayer(neutral, "I'm investigating the murder up at the Sinclair place."); - ~chatnpc(neutral, "Murder is it? Well, I'm not really surprised..."); + ~chatplayer("I'm investigating the murder up at the Sinclair place."); + ~chatnpc("Murder is it? Well, I'm not really surprised..."); switch_int(~p_choice4("What can you tell me about the Sinclairs?", 1, "Who do you think was responsible?", 2, "I think the butler did it.", 3, "I am so confused about who did it.", 4)) { case 1: - ~chatplayer(neutral, "What can you tell me about the Sinclairs?"); - ~chatnpc(neutral, "Well, what do you want to know?"); + ~chatplayer("What can you tell me about the Sinclairs?"); + ~chatnpc("Well, what do you want to know?"); switch_int(~p_choice4("Tell me about Lord Sinclair.", 1, "Who do you think was responsible?", 2, "What can you tell me about his sons?", 3, "I am so confused about who did it.", 4)) { case 1: - ~chatplayer(neutral, "Tell me about Lord Sinclair."); - ~chatnpc(neutral, "Old Lord Sinclair was a great man with a lot of respect in these parts. More than his worthless children have anyway."); - ~chatnpc(neutral, "His children? They have something to gain by his death?"); - ~chatnpc(neutral, "Yes. You could say that. Not that I'm one to gossip."); + ~chatplayer("Tell me about Lord Sinclair."); + ~chatnpc("Old Lord Sinclair was a great man with a lot of respect in these parts. More than his worthless children have anyway."); + ~chatnpc("His children? They have something to gain by his death?"); + ~chatnpc("Yes. You could say that. Not that I'm one to gossip."); case 2: - ~chatplayer(neutral, "Why do the Sinclairs live so far from town?"); - ~chatnpc(neutral, "Well, they used to live in the big castle, but old Lord Sinclair gave it up so that those strange knights could live there instead. So the king built him a new house to the North."); - ~chatnpc(neutral, "It's more cramped than his old place, but he seemed to like it. His children were furious at him for doing it though!"); + ~chatplayer("Why do the Sinclairs live so far from town?"); + ~chatnpc("Well, they used to live in the big castle, but old Lord Sinclair gave it up so that those strange knights could live there instead. So the king built him a new house to the North."); + ~chatnpc("It's more cramped than his old place, but he seemed to like it. His children were furious at him for doing it though!"); case 3: - ~chatplayer(neutral, "What can you tell me about his sons?"); - ~chatnpc(neutral, "His sons eh? They all have their own skeletons in their cupboards. You'll have to be more specific. Who are you interested in exactly?"); + ~chatplayer("What can you tell me about his sons?"); + ~chatnpc("His sons eh? They all have their own skeletons in their cupboards. You'll have to be more specific. Who are you interested in exactly?"); switch_int(~p_choice3("Tell me about Bob.", 1, "Tell me about David.", 2, "Tell me about Frank.", 3)) { case 1: - ~chatplayer(neutral, "Tell me about Bob."); - ~chatnpc(neutral, "Bob is an odd character indeed... I'm not one to gossip, but I heard Bob is addicted to Tea. He can't make"); - ~chatnpc(neutral, "it through the day without having at least 20 cups!"); - ~chatnpc(neutral, "You might not think that's such a big thing, but he has spent thousands of gold to feed his habit!"); - ~chatnpc(neutral, "At one point he stole a lot of silverware from the kitchen and pawned it just so he could afford to buy his daily tea allowance."); - ~chatnpc(shock, "If his father ever found out, he would be in so much trouble... he might even get disowned!"); + ~chatplayer("Tell me about Bob."); + ~chatnpc("Bob is an odd character indeed... I'm not one to gossip, but I heard Bob is addicted to Tea. He can't make"); + ~chatnpc("it through the day without having at least 20 cups!"); + ~chatnpc("You might not think that's such a big thing, but he has spent thousands of gold to feed his habit!"); + ~chatnpc("At one point he stole a lot of silverware from the kitchen and pawned it just so he could afford to buy his daily tea allowance."); + ~chatnpc("If his father ever found out, he would be in so much trouble... he might even get disowned!"); case 2: - ~chatplayer(neutral, "Tell me about David."); - ~chatnpc(neutral, "David... oh David... not many people know this, but David really has an anger problem. He's always screaming and shouting"); - ~chatnpc(neutral, "at the household servants when he's angry, and they live in a state of fear, always walking on eggshells around him, but none of them have the courage"); - ~chatnpc(neutral, "to talk to his father about his behaviour. If they did, Lord Sinclair would almost certainly"); - ~chatnpc(neutral, "kick him out of the house, as some of the servants have been there longer than he has, and he definitely has no right to treat them like he does... but I'm not one to gossip about people."); + ~chatplayer("Tell me about David."); + ~chatnpc("David... oh David... not many people know this, but David really has an anger problem. He's always screaming and shouting"); + ~chatnpc("at the household servants when he's angry, and they live in a state of fear, always walking on eggshells around him, but none of them have the courage"); + ~chatnpc("to talk to his father about his behaviour. If they did, Lord Sinclair would almost certainly"); + ~chatnpc("kick him out of the house, as some of the servants have been there longer than he has, and he definitely has no right to treat them like he does... but I'm not one to gossip about people."); case 3: - ~chatplayer(neutral, "Tell me about Frank."); - ~chatnpc(neutral, "I'm not one to talk ill of people behind their back, but Frank is a real piece of work. He is an absolutely terrible gambler... he can't pass 2 dogs in the street without putting a bet on which one will bark first!"); - ~chatnpc(neutral, "He has already squandered all of his allowance, and I heard he had stolen a number of paintings of his fathers to sell to try and cover his debts, but he still owes a lot of"); - ~chatnpc(neutral, "people a lot of money. If his father ever found out, he would stop his income, and then he would be in serious trouble!"); + ~chatplayer("Tell me about Frank."); + ~chatnpc("I'm not one to talk ill of people behind their back, but Frank is a real piece of work. He is an absolutely terrible gambler... he can't pass 2 dogs in the street without putting a bet on which one will bark first!"); + ~chatnpc("He has already squandered all of his allowance, and I heard he had stolen a number of paintings of his fathers to sell to try and cover his debts, but he still owes a lot of"); + ~chatnpc("people a lot of money. If his father ever found out, he would stop his income, and then he would be in serious trouble!"); } case 4: - ~chatplayer(neutral, "What can you tell me about his daughters?"); - ~chatnpc(neutral, "His daughters eh? They're all nasty pieces of work. which of them specifically did you want to know about?"); + ~chatplayer("What can you tell me about his daughters?"); + ~chatnpc("His daughters eh? They're all nasty pieces of work. which of them specifically did you want to know about?"); switch_int(~p_choice3("Tell me about Anna.", 1, "Tell me about Carol.", 2, "Tell me about Elizabeth.", 3)) { case 1: - ~chatplayer(neutral, "Tell me about Anna."); - ~chatnpc(neutral, "Anna... ah yes... Anna has 2 great loves:"); - ~chatnpc(neutral, "Sewing and gardening. But one thing she has kept secret is that she once had an affair with Stanford the gardener, and tried to get him fired when they broke up,"); - ~chatnpc(neutral, "by killing all of the flowers in the garden. If her father ever found out she had done that he would be so furious he would probably disown her."); + ~chatplayer("Tell me about Anna."); + ~chatnpc("Anna... ah yes... Anna has 2 great loves:"); + ~chatnpc("Sewing and gardening. But one thing she has kept secret is that she once had an affair with Stanford the gardener, and tried to get him fired when they broke up,"); + ~chatnpc("by killing all of the flowers in the garden. If her father ever found out she had done that he would be so furious he would probably disown her."); case 2: - ~chatplayer(neutral, "Tell me about Carol."); - ~chatnpc(neutral, "Oh Carol... she is such a fool. You didn't hear this from me, but I heard a while ago she was conned out of a lot of money by a travelling salesman who sold her a box full"); - ~chatnpc(neutral, "of beans by telling her they were magic. But they weren't. She sold some rare books from the library to cover her debts, but"); - ~chatnpc(shock, "her father would be incredibly annoyed if he ever found out - he might even throw her out of the house!"); + ~chatplayer("Tell me about Carol."); + ~chatnpc("Oh Carol... she is such a fool. You didn't hear this from me, but I heard a while ago she was conned out of a lot of money by a travelling salesman who sold her a box full"); + ~chatnpc("of beans by telling her they were magic. But they weren't. She sold some rare books from the library to cover her debts, but"); + ~chatnpc("her father would be incredibly annoyed if he ever found out - he might even throw her out of the house!"); case 3: - ~chatplayer(neutral, "Tell me about Elizabeth."); - ~chatnpc(neutral, "Elizabeth? Elizabeth has a strange problem... She cannot help herself, but is always stealing small objects - it's pretty sad that she is rich enough to afford to buy things, but would rather steal them instead."); - ~chatnpc(neutral, "Now, I don't want to spread stories, but I heard she even stole a silver needle from her father that had great sentimental value for him."); - ~chatnpc(sad, "He was devastated when it was lost, and cried for a week thinking he had lost it!"); - ~chatnpc(shock, "If he ever found out that it was her who had stolen it he would go absolutely mental, maybe even disowning her!"); + ~chatplayer("Tell me about Elizabeth."); + ~chatnpc("Elizabeth? Elizabeth has a strange problem... She cannot help herself, but is always stealing small objects - it's pretty sad that she is rich enough to afford to buy things, but would rather steal them instead."); + ~chatnpc("Now, I don't want to spread stories, but I heard she even stole a silver needle from her father that had great sentimental value for him."); + ~chatnpc("He was devastated when it was lost, and cried for a week thinking he had lost it!"); + ~chatnpc("If he ever found out that it was her who had stolen it he would go absolutely mental, maybe even disowning her!"); } } case 2: - ~chatplayer(neutral, "Who do you think was responsible?"); - ~chatnpc(neutral, "Well, I guess it could have been an intruder, but with that big guard dog of theirs I seriously doubt it. I suspect it was someone closer to home..."); - ~chatnpc(neutral, "Especially as I heard that the poison salesman in the Seers' village made a big sale to one of the family the other day."); + ~chatplayer("Who do you think was responsible?"); + ~chatnpc("Well, I guess it could have been an intruder, but with that big guard dog of theirs I seriously doubt it. I suspect it was someone closer to home..."); + ~chatnpc("Especially as I heard that the poison salesman in the Seers' village made a big sale to one of the family the other day."); case 3: - ~chatplayer(neutral, "I think the butler did it."); - ~chatnpc(neutral, "And I think you've been reading too many cheap detective novels. Hobbes is kind of uptight, but his loyalty to old Lord Sinclair is beyond question."); + ~chatplayer("I think the butler did it."); + ~chatnpc("And I think you've been reading too many cheap detective novels. Hobbes is kind of uptight, but his loyalty to old Lord Sinclair is beyond question."); case 4: - ~chatplayer(sad, "I am so confused about who did it..."); - ~chatplayer(confused, "Think you could give me any hints?"); + ~chatplayer("I am so confused about who did it..."); + ~chatplayer("Think you could give me any hints?"); switch_int(random(5)) { case 0: - ~chatnpc(neutral, "Well, I don't know if it's related, but I heard from that Poison Salesman in town that he sold some poison to one of the Sinclair family"); - ~chatnpc(neutral, "the other day. I don't think he has any stock left now though..."); + ~chatnpc("Well, I don't know if it's related, but I heard from that Poison Salesman in town that he sold some poison to one of the Sinclair family"); + ~chatnpc("the other day. I don't think he has any stock left now though..."); case 1: - ~chatnpc(neutral, "Well, I don't know how much help this is, but I heard that their guard dog will bark loudly at anyone it doesn't recognise. Maybe you should find out if anyone heard anything suspicious?"); + ~chatnpc("Well, I don't know how much help this is, but I heard that their guard dog will bark loudly at anyone it doesn't recognise. Maybe you should find out if anyone heard anything suspicious?"); case 2: - ~chatnpc(neutral, "My father used to be in the guard. He always wrote himself notes on a piece of paper so he could keep track of information easily."); - ~chatnpc(neutral, "Maybe you should try that? Don't forget to thank me if I help you solve the case!"); + ~chatnpc("My father used to be in the guard. He always wrote himself notes on a piece of paper so he could keep track of information easily."); + ~chatnpc("Maybe you should try that? Don't forget to thank me if I help you solve the case!"); case 3: - ~chatnpc(neutral, "Well, this might be of some help to you. My father was in the guards when he was younger,"); - ~chatnpc(neutral, "and he always said that there isn't a crime that can't be solved through careful examination of the crime scene and all surrounding areas."); + ~chatnpc("Well, this might be of some help to you. My father was in the guards when he was younger,"); + ~chatnpc("and he always said that there isn't a crime that can't be solved through careful examination of the crime scene and all surrounding areas."); case 4: - ~chatnpc(neutral, "I don't know how much help this is to you but my dad was in the guard once, and he told me that the marks on your hands are totally unique. He called them 'finger prints'."); - ~chatnpc(neutral, "He said you can find them easily on any shiny metallic surface by using a fine powder to mark out where the marks are, and then using some sticky paper to lift the print from the object."); - ~chatnpc(neutral, "I bet if you could find a way to get everyone's 'finger prints' you could solve the crime pretty easily!"); + ~chatnpc("I don't know how much help this is to you but my dad was in the guard once, and he told me that the marks on your hands are totally unique. He called them 'finger prints'."); + ~chatnpc("He said you can find them easily on any shiny metallic surface by using a fine powder to mark out where the marks are, and then using some sticky paper to lift the print from the object."); + ~chatnpc("I bet if you could find a way to get everyone's 'finger prints' you could solve the crime pretty easily!"); } } // RSC, dialogue was changed w/king's ransom - case ^murder_complete: ~chatnpc(quiz, "I heard you solved the murder.|Was I of any help to you at all?"); + case ^murder_complete: ~chatnpc("I heard you solved the murder.|Was I of any help to you at all?"); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/hobbes.rs2 b/data/src/scripts/quests/quest_murder/scripts/hobbes.rs2 index 7bf0583f8..13478e828 100644 --- a/data/src/scripts/quests/quest_murder/scripts/hobbes.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/hobbes.rs2 @@ -1,10 +1,10 @@ [opnpc1,hobbes] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(angry, "This is private property! Please leave!"); + ~chatnpc("This is private property! Please leave!"); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "How can I help?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("How can I help?"); def_int $option; if(%murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you at the time of the murder?", 2, "Did you hear any suspicious noises at all?", 3, "Do you know why so much poison was bought recently?", 4); @@ -13,26 +13,26 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "Well, in my considered opinion it must be David. The man is nothing more than a bully And I happen to know that poor Lord Sinclair and David had a massive argument in the living"); - ~chatnpc(neutral, "room about the way he treats the staff, the other day. I did not intend to overhear their conversation, but they were shouting so loudly I could not help but Overhear it. David definitely used the words"); - ~chatnpc(confused, "'I am going to kill you!' as well. I think he should be the prime suspect. He has a nasty temper that one."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("Well, in my considered opinion it must be David. The man is nothing more than a bully And I happen to know that poor Lord Sinclair and David had a massive argument in the living"); + ~chatnpc("room about the way he treats the staff, the other day. I did not intend to overhear their conversation, but they were shouting so loudly I could not help but Overhear it. David definitely used the words"); + ~chatnpc("'I am going to kill you!' as well. I think he should be the prime suspect. He has a nasty temper that one."); case 2: - ~chatplayer(confused, "Where were you at the time of the murder?"); - ~chatnpc(neutral, "I was assisting the cook with the evening meal. I gave Mary His Lordships' dinner, and sent her to take it to him, then heard the scream as she found the body."); + ~chatplayer("Where were you at the time of the murder?"); + ~chatnpc("I was assisting the cook with the evening meal. I gave Mary His Lordships' dinner, and sent her to take it to him, then heard the scream as she found the body."); case 3: - ~chatplayer(neutral, "Did you hear any suspicious noises at all?"); - ~chatnpc(confused, "How do you mean 'suspicious'?"); - ~chatplayer(neutral, "Any sounds of a struggle with Lord Sinclair?"); - ~chatnpc(confused, "No, I definitely didn't hear anything like that."); - ~chatplayer(neutral, "How about the guard dog barking at all?"); - ~chatnpc(neutral, "You know, now you come to mention it I don't believe I did. I suppose that is Proof enough that it could not have been an intruder who is responsible."); + ~chatplayer("Did you hear any suspicious noises at all?"); + ~chatnpc("How do you mean 'suspicious'?"); + ~chatplayer("Any sounds of a struggle with Lord Sinclair?"); + ~chatnpc("No, I definitely didn't hear anything like that."); + ~chatplayer("How about the guard dog barking at all?"); + ~chatnpc("You know, now you come to mention it I don't believe I did. I suppose that is Proof enough that it could not have been an intruder who is responsible."); case 4: - ~chatplayer(neutral, "Do you know why so much poison was bought recently?"); - ~chatnpc(neutral, "Well, I do know that Elizabeth was extremely annoyed by the mosquito nest under the fountain in the garden, and was going to do something about it. I suspect any poison she bought would have be"); - ~chatnpc(neutral, "enough to get rid of it. A Good job too, I hate mosquitos."); - ~chatplayer(angry, "Yeah, so do I."); - ~chatnpc(neutral, "You'd really have to ask her though."); + ~chatplayer("Do you know why so much poison was bought recently?"); + ~chatnpc("Well, I do know that Elizabeth was extremely annoyed by the mosquito nest under the fountain in the garden, and was going to do something about it. I suspect any poison she bought would have be"); + ~chatnpc("enough to get rid of it. A Good job too, I hate mosquitos."); + ~chatplayer("Yeah, so do I."); + ~chatnpc("You'd really have to ask her though."); } - case ^murder_complete: ~chatnpc(happy, "Thank you for all your help in solving the murder."); + case ^murder_complete: ~chatnpc("Thank you for all your help in solving the murder."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/louisa.rs2 b/data/src/scripts/quests/quest_murder/scripts/louisa.rs2 index 4d7372ee5..69a9aa836 100644 --- a/data/src/scripts/quests/quest_murder/scripts/louisa.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/louisa.rs2 @@ -1,10 +1,10 @@ [opnpc1,louisa] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(neutral, "I'm far too upset to talk to random people right now."); + ~chatnpc("I'm far too upset to talk to random people right now."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "How can I help?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("How can I help?"); def_int $option; if(%murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you at the time of the murder?", 2, "Did you hear any suspicious noises at all?", 3, "Do you know why so much poison was bought recently?", 4); @@ -13,24 +13,24 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(neutral, "Elizabeth."); - ~chatnpc(neutral, "Her father confronted her about her constant petty thieving, and was devestated to find she had stolen a silver needle which had meant a lot to him."); - ~chatnpc(sad, "You could hear their argument from Lumbridge!"); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("Elizabeth."); + ~chatnpc("Her father confronted her about her constant petty thieving, and was devestated to find she had stolen a silver needle which had meant a lot to him."); + ~chatnpc("You could hear their argument from Lumbridge!"); case 2: - ~chatplayer(confused, "Where were you at the time of the murder?"); - ~chatnpc(confused, "I was right here with Hobbes and Mary. You can't suspect me surely!"); + ~chatplayer("Where were you at the time of the murder?"); + ~chatnpc("I was right here with Hobbes and Mary. You can't suspect me surely!"); case 3: - ~chatplayer(neutral, "Did you hear any suspicious noises at all?"); - ~chatnpc(neutral, "suspicious? what do you mean suspicious?"); // intentional no capital - ~chatplayer(neutral, "Any sounds of a struggle with an intruder for example?"); - ~chatnpc(confused, "No, I'm sure I don't recall any such thing."); - ~chatplayer(neutral, "How about the guard dog barking at an intruder?"); - ~chatnpc(neutral, "No, I didn't. If you don't have anything else to ask can You go and leave me alone now? I have a lot of cooking to do for this evening."); + ~chatplayer("Did you hear any suspicious noises at all?"); + ~chatnpc("suspicious? what do you mean suspicious?"); // intentional no capital + ~chatplayer("Any sounds of a struggle with an intruder for example?"); + ~chatnpc("No, I'm sure I don't recall any such thing."); + ~chatplayer("How about the guard dog barking at an intruder?"); + ~chatnpc("No, I didn't. If you don't have anything else to ask can You go and leave me alone now? I have a lot of cooking to do for this evening."); case 4: - ~chatplayer(neutral, "Do you know why so much poison was bought recently?"); - ~chatnpc(neutral, "I told Carol to buy some from that strange poison salesman and clean the drains before they began to smell any worse. She was the one who blocked them in the first place with a load"); - ~chatnpc(neutral, "of beans that she bought for some reason. There were far too many to eat, and they were almost rotten when she bought them anyway! You'd really have to ask her though."); + ~chatplayer("Do you know why so much poison was bought recently?"); + ~chatnpc("I told Carol to buy some from that strange poison salesman and clean the drains before they began to smell any worse. She was the one who blocked them in the first place with a load"); + ~chatnpc("of beans that she bought for some reason. There were far too many to eat, and they were almost rotten when she bought them anyway! You'd really have to ask her though."); } - case ^murder_complete: ~chatnpc(happy, "Thank you for all your help in solving the murder."); + case ^murder_complete: ~chatnpc("Thank you for all your help in solving the murder."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/mary.rs2 b/data/src/scripts/quests/quest_murder/scripts/mary.rs2 index 8c9fb6378..d47321048 100644 --- a/data/src/scripts/quests/quest_murder/scripts/mary.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/mary.rs2 @@ -2,8 +2,8 @@ switch_int(%murder_progress) { case ^murder_not_started: mes("She is ignoring you."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(confused, "How can I help?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("How can I help?"); def_int $option; if(%murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you at the time of the murder?", 2, "Did you hear any suspicious noises at all?", 3, "Do you know why so much poison was bought recently?", 4); @@ -12,24 +12,24 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(confused, "Who do you think is responsible?"); - ~chatnpc(neutral, "Oh I don't know... Frank was acting kind of funny... After that big argument him and the Lord had the other day by the beehive... so"); - ~chatnpc(confused, "I guess maybe him... but it's really scary to think someone here might have been responsible. I actually hope it was a burglar..."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("Oh I don't know... Frank was acting kind of funny... After that big argument him and the Lord had the other day by the beehive... so"); + ~chatnpc("I guess maybe him... but it's really scary to think someone here might have been responsible. I actually hope it was a burglar..."); case 2: - ~chatplayer(confused, "Where were you at the time of the murder?"); - ~chatnpc(sad, "I was with Hobbes and Louisa in the Kitchen helping to prepare Lord Sinclair's meal, and then when I took it to his study... I saw... oh, it was horrible... he was...."); + ~chatplayer("Where were you at the time of the murder?"); + ~chatnpc("I was with Hobbes and Louisa in the Kitchen helping to prepare Lord Sinclair's meal, and then when I took it to his study... I saw... oh, it was horrible... he was...."); ~mesbox("She seems to be on the verge of crying. You decide not to push her anymore for details."); case 3: - ~chatplayer(neutral, "Did you hear any suspicious noises at all?"); - ~chatnpc(neutral, "I don't really remember hearing anything out of the ordinary."); - ~chatplayer(neutral, "No sounds of a struggle then?"); - ~chatnpc(confused, "No, I don't remember hearing anything like that."); - ~chatplayer(neutral, "How about the guard dog barking?"); - ~chatnpc(neutral, "Oh that horrible dog is always barking at nothing but I don't think I did..."); + ~chatplayer("Did you hear any suspicious noises at all?"); + ~chatnpc("I don't really remember hearing anything out of the ordinary."); + ~chatplayer("No sounds of a struggle then?"); + ~chatnpc("No, I don't remember hearing anything like that."); + ~chatplayer("How about the guard dog barking?"); + ~chatnpc("Oh that horrible dog is always barking at nothing but I don't think I did..."); case 4: - ~chatplayer(neutral, "Do you know why so much poison was bought recently?"); - ~chatnpc(neutral, "I overheard Anna saying to Stanford that if he didn't do something about the state of his compost heap, she was going to."); - ~chatnpc(neutral, "She really doesn't get on well with Stanford. I really have no idea why. You'd really have to ask her though."); + ~chatplayer("Do you know why so much poison was bought recently?"); + ~chatnpc("I overheard Anna saying to Stanford that if he didn't do something about the state of his compost heap, she was going to."); + ~chatnpc("She really doesn't get on well with Stanford. I really have no idea why. You'd really have to ask her though."); } - case ^murder_complete: ~chatnpc(happy, "Thank you for all your help in solving the murder."); + case ^murder_complete: ~chatnpc("Thank you for all your help in solving the murder."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/murder_guard.rs2 b/data/src/scripts/quests/quest_murder/scripts/murder_guard.rs2 index 869308354..3f70ab825 100644 --- a/data/src/scripts/quests/quest_murder/scripts/murder_guard.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/murder_guard.rs2 @@ -1,40 +1,40 @@ [opnpc1,murder_guard] switch_int(%murder_progress) { case ^murder_not_started: - ~chatplayer(neutral, "What's going on here?"); - ~chatnpc(sad, "Oh, it's terrible! Lord Sinclair has been murdered and we don't have any clues as to who or why. We're totally baffled!"); - ~chatnpc(sad, "If you can help us we will be very grateful."); + ~chatplayer("What's going on here?"); + ~chatnpc("Oh, it's terrible! Lord Sinclair has been murdered and we don't have any clues as to who or why. We're totally baffled!"); + ~chatnpc("If you can help us we will be very grateful."); // https://youtu.be/5CH-NF3kY-c?si=Vd4EiX8q6OsKOyZB&t=38 switch_int(~p_choice2("Sure, I'll help.", 1, "You should do your own dirty work.", 2)) { case 1: - ~chatplayer(happy, "Sure, I'll help!"); + ~chatplayer("Sure, I'll help!"); %murder_progress = ^murder_started; %murder_murderer_id = ~random_range(1,6); ~send_quest_progress(questlist:murder, %murder_progress, ^murder_complete); - ~chatnpc(happy, "Thanks a lot!"); + ~chatnpc("Thanks a lot!"); @murder_guard_help; case 2: - ~chatplayer(neutral, "You should do your own dirty work."); - ~chatnpc(neutral, "Get lost then, this is private property! ...Unless you'd like to be taken in for questioning yourself?"); + ~chatplayer("You should do your own dirty work."); + ~chatnpc("Get lost then, this is private property! ...Unless you'd like to be taken in for questioning yourself?"); } case ^murder_started: @multi3("What should I be doing to help again?", murder_guard_help, "How did Lord Sinclair die?", murder_guard_how, "I know who did it!", murder_guard_who); case ^murder_complete: - ~chatnpc(happy, "Excellent work on solving the murder! All of the guards I know are very impressed, and don't worry, we have the murderer under guard until they can be taken to trial."); - ~chatplayer(confused, "Is there anything else I can do?"); - ~chatnpc(happy, "No, your work here is done."); + ~chatnpc("Excellent work on solving the murder! All of the guards I know are very impressed, and don't worry, we have the murderer under guard until they can be taken to trial."); + ~chatplayer("Is there anything else I can do?"); + ~chatnpc("No, your work here is done."); } [label,murder_guard_help] -~chatplayer(neutral, "What should I be doing to help?"); -~chatnpc(neutral, "Look around and investigate who might be responsible. The Sarge said every murder leaves clues to who done it, but frankly we're out of our depth here."); +~chatplayer("What should I be doing to help?"); +~chatnpc("Look around and investigate who might be responsible. The Sarge said every murder leaves clues to who done it, but frankly we're out of our depth here."); [label,murder_guard_how] -~chatplayer(neutral, "How did Lord Sinclair die?"); -~chatnpc(confused, "Well, it's all very mysterious. Mary, the maid, found the body in the study next to his bedroom on the east wing of the ground floor."); -~chatnpc(neutral, "The door was found locked from the inside, and he seemed to have been stabbed, but there was an odd smell in the room. Frankly, I'm stumped."); +~chatplayer("How did Lord Sinclair die?"); +~chatnpc("Well, it's all very mysterious. Mary, the maid, found the body in the study next to his bedroom on the east wing of the ground floor."); +~chatnpc("The door was found locked from the inside, and he seemed to have been stabbed, but there was an odd smell in the room. Frankly, I'm stumped."); [label,murder_guard_who] -~chatplayer(happy, "I know who did it!"); +~chatplayer("I know who did it!"); if(%murder_poisonproof_progress = ^poisonproof_searched_loc & testbit(%murder_evidence, ^murder_found_thread) = true & testbit(%murder_evidence, ^murder_found_fingerprints) = true) { @murder_guard_conclusive_proof; } else if(testbit(%murder_evidence, ^murder_found_thread) = true & %murder_poisonproof_progress = ^poisonproof_searched_loc) { @@ -53,101 +53,101 @@ if(%murder_poisonproof_progress = ^poisonproof_searched_loc & testbit(%murder_ev @murder_guard_quick; [label,murder_guard_quick] -~chatnpc(happy, "Really? That was quick work! Who?"); +~chatnpc("Really? That was quick work! Who?"); switch_int(~p_choice4("It was an intruder!", 1, "The butler did it!", 2, "It was one of the servants!", 3, "It was one of his family!", 4)) { case 1: - ~chatplayer(neutral, "It was an intruder!"); - ~chatnpc(neutral, "That's what we were thinking too. That someone broke in to steal something, was discovered by Lord Sinclair, stabbed him and ran."); - ~chatnpc(confused, "It's odd that apparently nothing was stolen though... Find out something has been stolen,"); - ~chatnpc(neutral, "and the case is closed, but the murdered man was a friend of the King, and it's more than my job's worth not to investigate fully."); + ~chatplayer("It was an intruder!"); + ~chatnpc("That's what we were thinking too. That someone broke in to steal something, was discovered by Lord Sinclair, stabbed him and ran."); + ~chatnpc("It's odd that apparently nothing was stolen though... Find out something has been stolen,"); + ~chatnpc("and the case is closed, but the murdered man was a friend of the King, and it's more than my job's worth not to investigate fully."); case 2: @murder_guard_butler; case 3: - ~chatplayer(neutral, "It was one of the servants!"); - ~chatnpc(neutral, "Oh really? Which one?"); + ~chatplayer("It was one of the servants!"); + ~chatnpc("Oh really? Which one?"); switch_int(~p_choice2("It was one of the women...", 1, "It was one of the men...", 2)) { case 1: - ~chatplayer(neutral, "It was one of the women"); // intentional missing punc - ~chatnpc(confused, "Oh really? Which one?"); + ~chatplayer("It was one of the women"); // intentional missing punc + ~chatnpc("Oh really? Which one?"); ~p_choice2("It was SO obviously Louisa the cook.", 1, "It MUST have been Mary the maid.", 2); @murder_guard_accuse_suspect; case 2: - ~chatplayer(neutral, "It was one of the men..."); - ~chatnpc(confused, "Oh really? Which one?"); + ~chatplayer("It was one of the men..."); + ~chatnpc("Oh really? Which one?"); @multi4("It can ONLY Be Donovan the handyman.", murder_guard_accuse_suspect, "Pierre the dog handler. No question.", murder_guard_accuse_suspect, "Hobbes the butler. The butler ALWAYS did it.", murder_guard_butler, "You MUST know it was Stanford the gardener...", murder_guard_accuse_suspect); } case 4: - ~chatplayer(neutral, "It was one of his family!"); - ~chatnpc(neutral, "Oh really? Which one?"); + ~chatplayer("It was one of his family!"); + ~chatnpc("Oh really? Which one?"); switch_int(~p_choice2("It was one of the women...", 1, "It was one of the men...", 2)) { case 1: - ~chatplayer(neutral, "It was one of the women..."); - ~chatnpc(confused, "Oh really? Which one?"); + ~chatplayer("It was one of the women..."); + ~chatnpc("Oh really? Which one?"); ~p_choice3("I KNOW it was Anna.", 1, "I am SO sure it was Carol.", 2, "I'll bet you ANYTHING it was Elizabeth.", 3); @murder_guard_accuse_suspect; case 2: - ~chatplayer(neutral, "It was one of the men..."); - ~chatnpc(confused, "Oh really? Which one?"); + ~chatplayer("It was one of the men..."); + ~chatnpc("Oh really? Which one?"); ~p_choice3("I'm certain it was Bob.", 1, "It was David. No doubt about it.", 2, "If it wasn't Frank I'll eat my shoes!", 3); @murder_guard_accuse_suspect; } } [label,murder_guard_butler] -~chatplayer(happy, "The butler did it!"); -~chatnpc(confused, "I hope you have proof to that effect. We have to arrest someone for this and it seems to me that only the actual murderer would gain by falsely accusing someone."); +~chatplayer("The butler did it!"); +~chatnpc("I hope you have proof to that effect. We have to arrest someone for this and it seems to me that only the actual murderer would gain by falsely accusing someone."); if_close; p_delay(3); -~chatnpc(neutral, "Although having said that the butler is kind of shifty looking..."); +~chatnpc("Although having said that the butler is kind of shifty looking..."); [label,murder_guard_accuse_suspect] ~mesbox("You tell the guard who you suspect of the crime."); -~chatnpc(happy, "Great work. Show me the evidence, and we'll take them to the dungeons."); -~chatnpc(confused, "You DO have evidence of their crime, right?"); -~chatplayer(confused, "Uh...."); -~chatnpc(neutral, "Tch. You wouldn't last a day in the guards with sloppy thinking like that. Come see me when you have some proof of your accusations."); +~chatnpc("Great work. Show me the evidence, and we'll take them to the dungeons."); +~chatnpc("You DO have evidence of their crime, right?"); +~chatplayer("Uh...."); +~chatnpc("Tch. You wouldn't last a day in the guards with sloppy thinking like that. Come see me when you have some proof of your accusations."); [label,murder_guard_threadproof] -~chatplayer(happy, "I have proof that it wasn't any of the servants!"); +~chatplayer("I have proof that it wasn't any of the servants!"); ~mesbox("You show the guard the thread you found on the window."); -~chatplayer(neutral, "All the servants dress in black so it couldn't have been one of them."); -~chatnpc(neutral, "That's some good work there. I guess it wasn't a servant. You still haven't proved who did do it though."); +~chatplayer("All the servants dress in black so it couldn't have been one of them."); +~chatnpc("That's some good work there. I guess it wasn't a servant. You still haven't proved who did do it though."); [label,murder_guard_printproof] -~chatplayer(happy, "I have the finger prints of the culprit!"); -~chatplayer(neutral, "I have <~murder_get_murderer_name>'s finger prints here. You can see for yourself they match the finger prints on the murder weapon exactly."); +~chatplayer("I have the finger prints of the culprit!"); +~chatplayer("I have <~murder_get_murderer_name>'s finger prints here. You can see for yourself they match the finger prints on the murder weapon exactly."); ~mesbox("You show the guard the finger prints evidence."); -~chatnpc(neutral, "... I'm impressed. How on earth did you think of something like that? I've never heard of such a technique for finding criminals before!"); -~chatnpc(neutral, "This will come in very handy in the future but we can't arrest someone on just this. I'm afraid you'll still need to find more evidence before we can close this case completely."); +~chatnpc("... I'm impressed. How on earth did you think of something like that? I've never heard of such a technique for finding criminals before!"); +~chatnpc("This will come in very handy in the future but we can't arrest someone on just this. I'm afraid you'll still need to find more evidence before we can close this case completely."); [label,murder_guard_poisonproof] -~chatplayer(confused, "I have proof that <~murder_get_murderer_name> is lying about the poison."); -~chatnpc(neutral, "Oh really? How did you get that?"); +~chatplayer("I have proof that <~murder_get_murderer_name> is lying about the poison."); +~chatnpc("Oh really? How did you get that?"); switch_int(%murder_murderer_id) { case 5: ~mesbox("You tell the guard about the mosquitos at the <~murder_get_poisoned_loc_name>."); // RSC case 6: ~mesbox("You tell the guard about the tarnished <~murder_get_poisoned_loc_name>."); // RSC again case default: ~mesbox("You tell the guard about the <~murder_get_poisoned_loc_name>."); } -~chatnpc(neutral, "Hmm. That's some good detective work there. We need more evidence before we can close the case though. Keep up the good work!"); +~chatnpc("Hmm. That's some good detective work there. We need more evidence before we can close the case though. Keep up the good work!"); [label,murder_guard_conclusive_proof] -~chatplayer(happy, "I have conclusive proof who the killer was."); -~chatnpc(happy, "You do? That's excellent work. Let's hear it then."); -~chatplayer(neutral, "I don't think it was an intruder, and I don't think Lord Sinclair was killed by being stabbed."); -~chatnpc(neutral, "Hmmm? Really? Why not?"); -~chatplayer(happy, "Nobody heard the guard dog barking, which it would have if it had been an intruder who was responsible."); -~chatplayer(neutral, "Nobody heard any signs of a struggle either. I think the knife was there to throw suspicion away from the real culprit."); -~chatnpc(neutral, "Yes, that makes sense. But who did do it then?"); +~chatplayer("I have conclusive proof who the killer was."); +~chatnpc("You do? That's excellent work. Let's hear it then."); +~chatplayer("I don't think it was an intruder, and I don't think Lord Sinclair was killed by being stabbed."); +~chatnpc("Hmmm? Really? Why not?"); +~chatplayer("Nobody heard the guard dog barking, which it would have if it had been an intruder who was responsible."); +~chatplayer("Nobody heard any signs of a struggle either. I think the knife was there to throw suspicion away from the real culprit."); +~chatnpc("Yes, that makes sense. But who did do it then?"); ~mesbox("You prove to the guard the thread matches <~murder_get_murderer_name>'s clothes."); -~chatnpc(neutral, "Yes, I'd have to agree with that... but we need more evidence!"); +~chatnpc("Yes, I'd have to agree with that... but we need more evidence!"); ~mesbox("You prove to the guard <~murder_get_murderer_name> did not use poison on the <~murder_get_poisoned_loc_name>."); -~chatnpc(neutral, "Excellent work - have you considered a career as a detective? But I'm afraid it's still not quite enough..."); +~chatnpc("Excellent work - have you considered a career as a detective? But I'm afraid it's still not quite enough..."); ~mesbox("You match <~murder_get_murderer_name>'s finger prints with those on the dagger found in the body of Lord Sinclair."); -~chatnpc(happy, "Yes. There's no doubt about it. It must have been <~murder_get_murderer_name> who killed <~murder_get_murderer_pronoun> father. All of the guards must congratulate you on your excellent work in helping us to solve this case."); -~chatnpc(neutral, "We don't have many murders here in RuneScape and I'm afraid we wouldn't have been able to solve it by ourselves. We will hold him here under house arrest until such time as we bring him to trial."); -~chatnpc(neutral, "You have our gratitude, and I'm sure the rest of the family's as well, in helping to apprehend the murderer. I'll just take the evidence from you now."); +~chatnpc("Yes. There's no doubt about it. It must have been <~murder_get_murderer_name> who killed <~murder_get_murderer_pronoun> father. All of the guards must congratulate you on your excellent work in helping us to solve this case."); +~chatnpc("We don't have many murders here in RuneScape and I'm afraid we wouldn't have been able to solve it by ourselves. We will hold him here under house arrest until such time as we bring him to trial."); +~chatnpc("You have our gratitude, and I'm sure the rest of the family's as well, in helping to apprehend the murderer. I'll just take the evidence from you now."); ~mesbox("You hand over all the evidence."); ~murder_clear_evidence; -~chatnpc(happy, "Please accept this reward from the family!"); +~chatnpc("Please accept this reward from the family!"); // this is correct, doesnt queue reward until here, quest isnt marked as complete when clearing evidence (not like it matters since theres no obj checks) queue(murder_quest_complete, 0); diff --git a/data/src/scripts/quests/quest_murder/scripts/pierre.rs2 b/data/src/scripts/quests/quest_murder/scripts/pierre.rs2 index 02f2ca734..327e2238a 100644 --- a/data/src/scripts/quests/quest_murder/scripts/pierre.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/pierre.rs2 @@ -1,10 +1,10 @@ [opnpc1,pierre] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(neutral, "The guards told me not to talk to anyone."); + ~chatnpc("The guards told me not to talk to anyone."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "How can I help?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("How can I help?"); def_int $option; if(%murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you at the time of the murder?", 2, "Did you hear any suspicious noises at all?", 3, "Do you know why so much poison was bought recently?", 4); @@ -13,23 +13,23 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(confused, "Honestly? I think it was Carol."); - ~chatnpc(neutral, "I saw her in a huge argument with Lord Sinclair in the library the other day. It was something to do with stolen books. She definitely seemed upset enough to have done it afterwards."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("Honestly? I think it was Carol."); + ~chatnpc("I saw her in a huge argument with Lord Sinclair in the library the other day. It was something to do with stolen books. She definitely seemed upset enough to have done it afterwards."); case 2: - ~chatplayer(confused, "Where were you at the time of the murder?"); - ~chatnpc(neutral, "I was in town at the Inn. When I got back the house was swarming with guards who told me what had happened. Sorry."); + ~chatplayer("Where were you at the time of the murder?"); + ~chatnpc("I was in town at the Inn. When I got back the house was swarming with guards who told me what had happened. Sorry."); case 3: - ~chatplayer(confused, "Did you hear any suspicious noises at all?"); - ~chatnpc(confused, "Well, like what?"); - ~chatplayer(neutral, "Any sounds of a struggle with Lord Sinclair?"); - ~chatnpc(confused, "No, I don't remember hearing anything like that."); - ~chatplayer(neutral, "How about the guard dog barking at all?"); - ~chatnpc(neutral, "I hear him bark all the time. It's one of his favorite things to do. I can't say I did the night of the murder though as I wasn't close enough to hear either way."); + ~chatplayer("Did you hear any suspicious noises at all?"); + ~chatnpc("Well, like what?"); + ~chatplayer("Any sounds of a struggle with Lord Sinclair?"); + ~chatnpc("No, I don't remember hearing anything like that."); + ~chatplayer("How about the guard dog barking at all?"); + ~chatnpc("I hear him bark all the time. It's one of his favorite things to do. I can't say I did the night of the murder though as I wasn't close enough to hear either way."); case 4: - ~chatplayer(neutral, "Do you know why so much poison was bought recently?"); - ~chatnpc(neutral, "Well, I know David said that he was going to do something about the spiders' nest that's between the two servants' quarters upstairs."); - ~chatnpc(neutral, "He made a big deal about it to Mary the Maid, calling her useless and incompetent. I felt quite sorry for her actually. You'd really have to ask him though."); + ~chatplayer("Do you know why so much poison was bought recently?"); + ~chatnpc("Well, I know David said that he was going to do something about the spiders' nest that's between the two servants' quarters upstairs."); + ~chatnpc("He made a big deal about it to Mary the Maid, calling her useless and incompetent. I felt quite sorry for her actually. You'd really have to ask him though."); } - case ^murder_complete: ~chatnpc(happy, "Thank you for all your help in solving the murder."); + case ^murder_complete: ~chatnpc("Thank you for all your help in solving the murder."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_murder/scripts/quest_murder.rs2 b/data/src/scripts/quests/quest_murder/scripts/quest_murder.rs2 index fd252c316..e1a6e2fcf 100644 --- a/data/src/scripts/quests/quest_murder/scripts/quest_murder.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/quest_murder.rs2 @@ -75,7 +75,7 @@ if(%murder_poisonproof_progress >= ^poisonproof_spoken_murderer) { if(%murder_murderer_id = ^murderer_elizabeth) { // https://youtu.be/P1IDGCA2f9o?si=6aKZAUVbGoVmUF8t&t=327 ~mesbox("The fountain is swarming with mosquitos.|There's a nest of them underneath the fountain."); - ~chatplayer(angry, "I hate mosquitos, they're so annoying!"); + ~chatplayer("I hate mosquitos, they're so annoying!"); // not 100% sure if the varp is set at this point, the other locs should all be correct %murder_poisonproof_progress = ^poisonproof_searched_loc; ~mesbox("It's certainly clear nobody's used poison here."); diff --git a/data/src/scripts/quests/quest_murder/scripts/stanford.rs2 b/data/src/scripts/quests/quest_murder/scripts/stanford.rs2 index f3a8d2e18..7d8a03908 100644 --- a/data/src/scripts/quests/quest_murder/scripts/stanford.rs2 +++ b/data/src/scripts/quests/quest_murder/scripts/stanford.rs2 @@ -1,10 +1,10 @@ [opnpc1,stanford] switch_int(%murder_progress) { case ^murder_not_started: - ~chatnpc(angry, "Have you no shame? We are all grieving at the moment."); + ~chatnpc("Have you no shame? We are all grieving at the moment."); case ^murder_started: - ~chatplayer(neutral, "I'm here to help the guards with their investigation."); - ~chatnpc(neutral, "How can I help?"); + ~chatplayer("I'm here to help the guards with their investigation."); + ~chatnpc("How can I help?"); def_int $option; if(%murder_poisonproof_progress >= ^poisonproof_spoken_salesman) { $option = ~p_choice4("Who do you think is responsible?", 1, "Where were you at the time of the murder?", 2, "Did you hear any suspicious noises at all?", 3, "Do you know why so much poison was bought recently?", 4); @@ -13,23 +13,23 @@ switch_int(%murder_progress) { } switch_int($option) { case 1: - ~chatplayer(neutral, "Who do you think is responsible?"); - ~chatnpc(angry, "It was Anna. She is seriously unbalanced. She trashed the garden once then tried to blame it on me! I bet it was her. It's just the kind of thing she'd do!"); - ~chatnpc(neutral, "She really hates me and was arguing with Lord Sinclair about trashing the garden a few days ago."); + ~chatplayer("Who do you think is responsible?"); + ~chatnpc("It was Anna. She is seriously unbalanced. She trashed the garden once then tried to blame it on me! I bet it was her. It's just the kind of thing she'd do!"); + ~chatnpc("She really hates me and was arguing with Lord Sinclair about trashing the garden a few days ago."); case 2: - ~chatplayer(confused, "Where were you at the time of the murder?"); - ~chatnpc(neutral, "Right here, by my little shed. It's very cosy to sit and think in."); + ~chatplayer("Where were you at the time of the murder?"); + ~chatnpc("Right here, by my little shed. It's very cosy to sit and think in."); case 3: - ~chatplayer(confused, "Did you hear any suspicious noises at all?"); - ~chatnpc(confused, "Not that I remember."); - ~chatplayer(confused, "So no sounds of a struggle between Lord Sinclair and an intruder?"); - ~chatnpc(neutral, "Not to the best of my recollection."); - ~chatplayer(neutral, "How about the guard dog barking?"); - ~chatnpc(neutral, "Not that I can recall."); + ~chatplayer("Did you hear any suspicious noises at all?"); + ~chatnpc("Not that I remember."); + ~chatplayer("So no sounds of a struggle between Lord Sinclair and an intruder?"); + ~chatnpc("Not to the best of my recollection."); + ~chatplayer("How about the guard dog barking?"); + ~chatnpc("Not that I can recall."); case 4: - ~chatplayer(neutral, "Do you know why so much poison was bought recently?"); - ~chatnpc(neutral, "Well, Bob mentioned to me the other day he wanted to get rid of the bees in that hive over there. I think I saw him buying poison"); - ~chatnpc(neutral, "from that poison salesman the other day. I assume it was to sort out those bees. You'd really have to ask him though."); + ~chatplayer("Do you know why so much poison was bought recently?"); + ~chatnpc("Well, Bob mentioned to me the other day he wanted to get rid of the bees in that hive over there. I think I saw him buying poison"); + ~chatnpc("from that poison salesman the other day. I assume it was to sort out those bees. You'd really have to ask him though."); } - case ^murder_complete: ~chatnpc(happy, "Thank you for all your help in solving the murder."); + case ^murder_complete: ~chatnpc("Thank you for all your help in solving the murder."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_priest/scripts/restless_ghost.rs2 b/data/src/scripts/quests/quest_priest/scripts/restless_ghost.rs2 index 0057919ad..ae12dcae9 100644 --- a/data/src/scripts/quests/quest_priest/scripts/restless_ghost.rs2 +++ b/data/src/scripts/quests/quest_priest/scripts/restless_ghost.rs2 @@ -6,58 +6,58 @@ if(%priest_progress = ^priest_complete) { // if (%priest_progress = 0) { // // OSRS: -// ~chatnpc(neutral, "Wooooo! Ooooooh!"); -// ~chatplayer(neutral, "I can't understand a word you are saying. Maybe Father Aereck will be able to help."); +// ~chatnpc("Wooooo! Ooooooh!"); +// ~chatplayer("I can't understand a word you are saying. Maybe Father Aereck will be able to help."); // return; // } -~chatplayer(neutral, "Hello ghost, how are you?"); +~chatplayer("Hello ghost, how are you?"); if (inv_total(worn, amulet_of_ghostspeak) = 0) @priest_ghost_no_amulet; switch_int (%priest_progress) { case ^priest_spoken_urhney: - ~chatnpc(neutral, "Not very good actually."); - ~chatplayer(quiz, "What's the problem then?"); - ~chatnpc(neutral, "Did you just understand what I said???"); + ~chatnpc("Not very good actually."); + ~chatplayer("What's the problem then?"); + ~chatnpc("Did you just understand what I said???"); def_int $option = ~p_choice3("Yep, now tell me what the problem is.", 1, "No, you sound like you're speaking nonsense to me.", 2, "Wow, this amulet works!", 3); switch_int ($option) { case 1: - ~chatplayer(neutral, "Yep, now tell me what the problem is."); - ~chatnpc(neutral, "WOW! This is INCREDIBLE! I didn't expect anyone to ever understand me again!"); - ~chatplayer(angry, "Ok, Ok, I can understand you!"); - ~chatplayer(quiz, "But have you any idea WHY you're doomed to be a ghost?"); - ~chatnpc(neutral, "Well, to be honest... I'm not sure."); + ~chatplayer("Yep, now tell me what the problem is."); + ~chatnpc("WOW! This is INCREDIBLE! I didn't expect anyone to ever understand me again!"); + ~chatplayer("Ok, Ok, I can understand you!"); + ~chatplayer("But have you any idea WHY you're doomed to be a ghost?"); + ~chatnpc("Well, to be honest... I'm not sure."); @priest_ghost_certain_task; case 2: - ~chatplayer(happy, "No, you sound like you're speaking nonsense to me."); - ~chatnpc(neutral, "Oh that's a pity. You got my hopes up there."); - ~chatplayer(neutral, "Yeah, it is a pity. Sorry about that."); - ~chatnpc(neutral, "Hang on a second... you CAN understand me!"); + ~chatplayer("No, you sound like you're speaking nonsense to me."); + ~chatnpc("Oh that's a pity. You got my hopes up there."); + ~chatplayer("Yeah, it is a pity. Sorry about that."); + ~chatnpc("Hang on a second... you CAN understand me!"); $option = ~p_choice2("No I can't.", 1, "Yep, clever aren't I?", 2); switch_int ($option) { case 1: - ~chatplayer(neutral, "No I can't."); - ~chatnpc(neutral, "Great."); - ~chatnpc(neutral, "The first person I can speak to in ages..."); - ~chatnpc(neutral, "..and they're a moron."); + ~chatplayer("No I can't."); + ~chatnpc("Great."); + ~chatnpc("The first person I can speak to in ages..."); + ~chatnpc("..and they're a moron."); case 2: - ~chatplayer(happy, "Yep, clever aren't I?"); - ~chatnpc(neutral, "I'm impressed. You must be very powerful. I don't suppose you can stop me being a ghost?"); + ~chatplayer("Yep, clever aren't I?"); + ~chatnpc("I'm impressed. You must be very powerful. I don't suppose you can stop me being a ghost?"); @multi2("Yes, ok. Do you know WHY you're a ghost?", priest_ghost_why, "No, you're scary!", priest_ghost_scary); } case 3: - ~chatplayer(happy, "Wow, this amulet works!"); - ~chatnpc(neutral, "Oh! It's your amulet that's doing it!|I did wonder. I don't suppose you can help me?|I don't like being a ghost."); + ~chatplayer("Wow, this amulet works!"); + ~chatnpc("Oh! It's your amulet that's doing it!|I did wonder. I don't suppose you can help me?|I don't like being a ghost."); @multi2("Yes, ok. Do you know why you're a ghost?", priest_ghost_why, "No, you're scary!", priest_ghost_scary); } case ^priest_spoken_ghost: - ~chatnpc(neutral, "How are you doing finding my skull?"); - ~chatplayer(sad, "Sorry, I can't find it at the moment."); - ~chatnpc(neutral, "Ah well. Keep on looking."); - ~chatnpc(neutral, "I'm pretty sure it's somewhere in the tower south west from here. There's a lot of levels to the tower, though. I suppose it might take a little while to find."); + ~chatnpc("How are you doing finding my skull?"); + ~chatplayer("Sorry, I can't find it at the moment."); + ~chatnpc("Ah well. Keep on looking."); + ~chatnpc("I'm pretty sure it's somewhere in the tower south west from here. There's a lot of levels to the tower, though. I suppose it might take a little while to find."); case ^priest_obtained_skull: - ~chatnpc(neutral, "How are you doing finding my skull?"); - ~chatplayer(happy, "I have found it!"); - ~chatnpc(neutral, "Hurrah! Now I can stop being a ghost! You just need to put it in my coffin there, and I will be free!"); + ~chatnpc("How are you doing finding my skull?"); + ~chatplayer("I have found it!"); + ~chatnpc("Hurrah! Now I can stop being a ghost! You just need to put it in my coffin there, and I will be free!"); } [opnpcu,restless_ghost] @@ -68,86 +68,86 @@ if(last_useitem = ghost_skull) { ~displaymessage(^dm_default); [label,priest_ghost_no_amulet] -~chatnpc(neutral, "Wooo wooo wooooo!"); +~chatnpc("Wooo wooo wooooo!"); def_int $option = ~p_choice3("Sorry. I don't speak ghost.", 1, "Ooh... THAT'S interesting.", 2, "Any hints where I can find some treasure?", 3); switch_int ($option) { case 1: @priest_ghost_dontunderstand; case 2: - ~chatplayer(happy, "Ooh... THAT'S interesting."); - ~chatnpc(neutral, "Woo wooo. Woooooooooooooooooo!"); + ~chatplayer("Ooh... THAT'S interesting."); + ~chatnpc("Woo wooo. Woooooooooooooooooo!"); $option = ~p_choice2("Did he really?", 1, "Yeah, that's what I thought.", 2); switch_int ($option) { case 1: - ~chatplayer(quiz, "Did he really?"); - ~chatnpc(neutral, "Woo."); + ~chatplayer("Did he really?"); + ~chatnpc("Woo."); switch_int (~p_choice2("My brother had EXACTLY the same problem.", 1, "Goodbye. Thanks for the chat.", 2)) { case 1: - ~chatplayer(neutral, "My brother had EXACTLY the same problem."); - ~chatnpc(neutral, "Woo Wooooo!"); - ~chatnpc(neutral, "Wooooo Woo woo woo!"); + ~chatplayer("My brother had EXACTLY the same problem."); + ~chatnpc("Woo Wooooo!"); + ~chatnpc("Wooooo Woo woo woo!"); switch_int (~p_choice2("Goodbye. Thanks for the chat.", 1, "ou'll have to give me the recipe some time...", 2)) { case 1: @priest_ghost_goodbye; case 2: - ~chatplayer(neutral, "You'll have to give me the recipe some time..."); - ~chatnpc(neutral, "Wooooooo woo woooooooo."); + ~chatplayer("You'll have to give me the recipe some time..."); + ~chatnpc("Wooooooo woo woooooooo."); @multi2("Goodbye. Thanks for the chat.", priest_ghost_goodbye, "Hmm... I'm not so sure about that.", priest_ghost_notsure); } case 2: @priest_ghost_goodbye; } case 2: - ~chatplayer(happy, "Yeah, that's what I thought."); - ~chatnpc(neutral, "Wooo woooooooooooooo..."); + ~chatplayer("Yeah, that's what I thought."); + ~chatnpc("Wooo woooooooooooooo..."); @multi2("Goodbye. Thanks for the chat.", priest_ghost_goodbye, "Hmm I'm not sure about that.", priest_ghost_notsure); } case 3: - ~chatplayer(quiz, "Any hints where I can find some treasure?"); - ~chatnpc(neutral, "Wooooooo woo! Wooooo woo wooooo woowoowoo woo Woo wooo. Wooooo woo woo? Woooooooooooooooooo!"); + ~chatplayer("Any hints where I can find some treasure?"); + ~chatnpc("Wooooooo woo! Wooooo woo wooooo woowoowoo woo Woo wooo. Wooooo woo woo? Woooooooooooooooooo!"); $option = ~p_choice2("Sorry I don't speak ghost.", 1, "Thank you. You've been very helpful.", 2); switch_int ($option) { case 1: @priest_ghost_dontunderstand; case 2: - ~chatplayer(happy, "Thank you. You've been very helpful."); - ~chatnpc(neutral, "Wooooooo."); + ~chatplayer("Thank you. You've been very helpful."); + ~chatnpc("Wooooooo."); } } [label,priest_ghost_why] -~chatplayer(happy, "Yes, ok. Do you know WHY you're a ghost?"); -~chatnpc(neutral, "Nope. I just know I can't do much of anything like this!"); +~chatplayer("Yes, ok. Do you know WHY you're a ghost?"); +~chatnpc("Nope. I just know I can't do much of anything like this!"); @priest_ghost_certain_task; [label,priest_ghost_scary] -~chatplayer(neutral, "No, you're scary!"); -~chatnpc(neutral, "Great."); -~chatnpc(neutral, "The first person I can speak to in ages..."); -~chatnpc(neutral, "..and they're an idiot."); +~chatplayer("No, you're scary!"); +~chatnpc("Great."); +~chatnpc("The first person I can speak to in ages..."); +~chatnpc("..and they're an idiot."); [label,priest_ghost_goodbye] -~chatplayer(neutral, "Goodbye. Thanks for the chat."); -~chatnpc(neutral, "Wooo wooo?"); +~chatplayer("Goodbye. Thanks for the chat."); +~chatnpc("Wooo wooo?"); [label,priest_ghost_certain_task] -~chatplayer(neutral, "I've been told a certain task may need to be completed so you can rest in peace."); -~chatnpc(neutral, "I should think it is probably because|a warlock has come along and stolen my skull.|If you look inside my coffin there,|you'll find my corpse without a head on it."); -~chatplayer(neutral, "Do you know where this warlock might be now?"); -~chatnpc(neutral, "I think it was one of the warlocks who lives in the big tower by the sea southwest from here."); -~chatplayer(neutral, "Ok. I will try and get the skull back for you, so you can rest in peace."); -~chatnpc(neutral, "Ooh, thank you. That would be such a great relief!"); +~chatplayer("I've been told a certain task may need to be completed so you can rest in peace."); +~chatnpc("I should think it is probably because|a warlock has come along and stolen my skull.|If you look inside my coffin there,|you'll find my corpse without a head on it."); +~chatplayer("Do you know where this warlock might be now?"); +~chatnpc("I think it was one of the warlocks who lives in the big tower by the sea southwest from here."); +~chatplayer("Ok. I will try and get the skull back for you, so you can rest in peace."); +~chatnpc("Ooh, thank you. That would be such a great relief!"); %priest_progress = ^priest_spoken_ghost; -~chatnpc(neutral, "It is so dull being a ghost..."); +~chatnpc("It is so dull being a ghost..."); [label,priest_ghost_dontunderstand] -~chatplayer(confused, "Sorry, I don't speak ghost."); -~chatnpc(neutral, "Woo woo?"); -~chatplayer(neutral, "Nope, still don't understand you."); -~chatnpc(neutral, "WOOOOOOOOO!"); -~chatplayer(neutral, "Never mind."); +~chatplayer("Sorry, I don't speak ghost."); +~chatnpc("Woo woo?"); +~chatplayer("Nope, still don't understand you."); +~chatnpc("WOOOOOOOOO!"); +~chatplayer("Never mind."); [label,priest_ghost_notsure] -~chatplayer(quiz, "Hmm... I'm not so sure about that."); -~chatnpc(neutral, "Wooo woo?"); -~chatplayer(angry, "Well, if you INSIST."); -~chatnpc(neutral, "Wooooooooo!"); -~chatplayer(neutral, "Ah well, better be off now..."); -~chatnpc(neutral, "Woo."); -~chatplayer(neutral, "Bye."); \ No newline at end of file +~chatplayer("Hmm... I'm not so sure about that."); +~chatnpc("Wooo woo?"); +~chatplayer("Well, if you INSIST."); +~chatnpc("Wooooooooo!"); +~chatplayer("Ah well, better be off now..."); +~chatnpc("Woo."); +~chatplayer("Bye."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 b/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 index 5bf052390..bdcad2fee 100644 --- a/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 +++ b/data/src/scripts/quests/quest_squire/scripts/quest_squire.rs2 @@ -1,13 +1,13 @@ [label,squire_start] -~chatnpc(neutral, "Hello. I am the squire to Sir Vyvin."); +~chatnpc("Hello. I am the squire to Sir Vyvin."); def_int $option = ~p_choice2("And how is life as a squire?", 1, "Wouldn't you prefer to be a squire for me?", 2); if($option = 1) { - ~chatplayer(neutral, "And how is life as a squire?"); - ~chatnpc(sad, "Well, Sir Vyvin is a good guy to work for, however, I'm in a spot of trouble today. I've gone and lost Sir Vyvin's sword!"); + ~chatplayer("And how is life as a squire?"); + ~chatnpc("Well, Sir Vyvin is a good guy to work for, however, I'm in a spot of trouble today. I've gone and lost Sir Vyvin's sword!"); $option = ~p_choice3("Do you know where you lost it?", 1, "I can make a new sword if you like...", 2, "Is he angry?", 3); if($option = 1) { - ~chatplayer(quiz, "Do you know where you lost it?"); - ~chatnpc(happy, "Well now, if I knew THAT it wouldn't be lost, now would it?"); + ~chatplayer("Do you know where you lost it?"); + ~chatnpc("Well now, if I knew THAT it wouldn't be lost, now would it?"); @squire_sword_options_lost; } else if($option = 2) { @squire_new_sword; @@ -15,13 +15,13 @@ if($option = 1) { @squire_angry; } } else if($option = 2) { - ~chatplayer(neutral, "Wouldn't you prefer to be a squire for me?"); - ~chatnpc(neutral, "No, sorry, I'm loyal to Sir Vyvin."); + ~chatplayer("Wouldn't you prefer to be a squire for me?"); + ~chatnpc("No, sorry, I'm loyal to Sir Vyvin."); } [label,squire_angry] -~chatplayer(quiz, "Is he angry?"); -~chatnpc(sad, "He doesn't know yet. I was hoping I could think of something to do before he does find out, But I find myself at a loss."); +~chatplayer("Is he angry?"); +~chatnpc("He doesn't know yet. I was hoping I could think of something to do before he does find out, But I find myself at a loss."); @squire_sword_options_angry; [label,squire_sword_options_lost] @@ -31,45 +31,45 @@ if($option = 1) { @multi4("Well, do you know the VAGUE AREA you lost it?", squire_vague_area, "I can make a new sword if you like...", squire_new_sword, "Well, the kingdom is fairly abundant with swords...", squire_kingdom_swords, "Well, I hope you find it soon.", squire_find_soon); [label,squire_find_soon] -~chatplayer(quiz, "Well, I hope you find it soon."); -~chatnpc(sad, "Yes, me too. I'm not looking forward to telling Vyvin I've lost it. He's going to want it for the parade next week as well."); +~chatplayer("Well, I hope you find it soon."); +~chatnpc("Yes, me too. I'm not looking forward to telling Vyvin I've lost it. He's going to want it for the parade next week as well."); [label,squire_vague_area] -~chatplayer(quiz, "Well, do you know the VAGUE AREA you lost it?"); -~chatnpc(shifty, "No. I was carrying it for him all the way from where he had it stored in Lumbridge. It must have slipped from my pack during the trip, and you know what people are like these days..."); -~chatnpc(shifty, "Someone will have just picked it up and kept it for themselves."); +~chatplayer("Well, do you know the VAGUE AREA you lost it?"); +~chatnpc("No. I was carrying it for him all the way from where he had it stored in Lumbridge. It must have slipped from my pack during the trip, and you know what people are like these days..."); +~chatnpc("Someone will have just picked it up and kept it for themselves."); @squire_sword_options_further; [label,squire_sword_options_further] @multi3("I can make a new sword if you like...", squire_new_sword, "Well, the kingdom is fairly abundant with swords...", squire_kingdom_swords, "Well, I hope you find it soon.", squire_find_soon); [label,squire_kingdom_swords] -~chatplayer(neutral, "Well, the kingdom is fairly abundant with swords..."); -~chatnpc(sad, "Yes. You can get bronze swords anywhere. But THIS isn't any old sword."); +~chatplayer("Well, the kingdom is fairly abundant with swords..."); +~chatnpc("Yes. You can get bronze swords anywhere. But THIS isn't any old sword."); @squire_thing_is; [label,squire_new_sword] -~chatplayer(neutral, "I can make a new sword if you like..."); -~chatnpc(sad, "Thanks for the offer. I'd be surprised if you could though."); +~chatplayer("I can make a new sword if you like..."); +~chatnpc("Thanks for the offer. I'd be surprised if you could though."); @squire_thing_is; [label,squire_thing_is] -~chatnpc(sad, "The thing is, this sword is a family heirloom. It has been passed down through Vyvin's family for five generations! It was originally made by the Imcando dwarves, who were"); -~chatnpc(sad, "a particularly skilled tribe of dwarven smiths. I doubt anyone could make it in the style they do."); +~chatnpc("The thing is, this sword is a family heirloom. It has been passed down through Vyvin's family for five generations! It was originally made by the Imcando dwarves, who were"); +~chatnpc("a particularly skilled tribe of dwarven smiths. I doubt anyone could make it in the style they do."); def_int $option = ~p_choice2("So would these dwarves make another one?", 1, "Well I hope you find it soon.", 2); if($option = 1) { - ~chatplayer(quiz, "So would these dwarves make another one?"); - ~chatnpc(default, "I'm not a hundred percent sure the Imcando tribe exists anymore. I should think Reldo, the palace librarian in Varrock, will know; he has done a lot of research on the races of RuneScape."); - ~chatnpc(happy, "I don't suppose you could try and track down the Imcando dwarves for me? I've got so much work to do..."); + ~chatplayer("So would these dwarves make another one?"); + ~chatnpc("I'm not a hundred percent sure the Imcando tribe exists anymore. I should think Reldo, the palace librarian in Varrock, will know; he has done a lot of research on the races of RuneScape."); + ~chatnpc("I don't suppose you could try and track down the Imcando dwarves for me? I've got so much work to do..."); $option = ~p_choice2("Ok, I'll give it a go.", 1, "No, I've got lots of mining work to do.", 2); if($option = 1) { %squire_progress = 1; ~send_quest_progress(questlist:squire, %squire_progress, ^squire_complete); - ~chatplayer(neutral, "Ok, I'll give it a go."); - ~chatnpc(neutral, "Thank you very much! As I say, the best place to start should be with Reldo..."); + ~chatplayer("Ok, I'll give it a go."); + ~chatnpc("Thank you very much! As I say, the best place to start should be with Reldo..."); } else { - ~chatplayer(neutral, "No, I've got lots of mining work to do."); - ~chatnpc(sad, "Oh man... I'm in such trouble..."); + ~chatplayer("No, I've got lots of mining work to do."); + ~chatnpc("Oh man... I'm in such trouble..."); } } else { @squire_find_soon; @@ -77,49 +77,49 @@ if($option = 1) { [label,squire_status_report] if(%squire_progress = 3) { - ~chatplayer(happy, "I have found an Imcando Dwarf named Thurgo! I have given him Redberry pie, I hope he will help me now."); + ~chatplayer("I have found an Imcando Dwarf named Thurgo! I have given him Redberry pie, I hope he will help me now."); } else if(%squire_progress = 4) { - ~chatplayer(happy, "I have found an Imcando dwarf but he needs a picture of the sword before he can make it."); - ~chatnpc(confused, "A picture eh? Hmmm.... The only one I can think of is in a small portrait of Sir Vyvin's father... Sir Vyvin keeps it in a cupboard in his room I think."); - ~chatplayer(neutral, "Ok, I'll try to get that then."); + ~chatplayer("I have found an Imcando dwarf but he needs a picture of the sword before he can make it."); + ~chatnpc("A picture eh? Hmmm.... The only one I can think of is in a small portrait of Sir Vyvin's father... Sir Vyvin keeps it in a cupboard in his room I think."); + ~chatplayer("Ok, I'll try to get that then."); %squire_progress = 5; - ~chatnpc(confused, "Please don't let him catch you! He MUSTN'T know what happened!"); + ~chatnpc("Please don't let him catch you! He MUSTN'T know what happened!"); } else if(%squire_progress = 5) { if(inv_total(inv, portrait) > 0) { - ~chatplayer(neutral, "I have the picture, I'll just take it to the dwarf now!"); + ~chatplayer("I have the picture, I'll just take it to the dwarf now!"); } else { - ~chatplayer(neutral, "I didn't get the picture yet..."); + ~chatplayer("I didn't get the picture yet..."); } - ~chatnpc(sad, "Please hurry!"); + ~chatnpc("Please hurry!"); } else if(%squire_progress = 6) { if(inv_total(inv, blurite_sword) >= 1 | inv_total(worn, blurite_sword) >= 1) { - ~chatplayer(happy, "I have retrieved your sword for you."); + ~chatplayer("I have retrieved your sword for you."); if(inv_total(inv, blurite_sword) >= 1) { - ~chatnpc(happy, "Thank you, thank you, thank you! I was seriously worried I would have to own up to Sir Vyvin!"); + ~chatnpc("Thank you, thank you, thank you! I was seriously worried I would have to own up to Sir Vyvin!"); ~mesbox("You give the sword to the squire."); inv_del(inv, blurite_sword, 1); queue(squire_complete, 0); } else { - ~chatnpc(neutral, "So can you un-equip it and hand it over to me now please?"); + ~chatnpc("So can you un-equip it and hand it over to me now please?"); } } else { - ~chatplayer(happy, "I've found a dwarf who will make the sword, I've just got to find the materials for it now!"); + ~chatplayer("I've found a dwarf who will make the sword, I've just got to find the materials for it now!"); } } else { - ~chatplayer(neutral, "I'm still looking for Imcando dwarves to help me."); - ~chatnpc(sad, "Please try and find them quickly... I am scared Sir Vyvin will find out!"); + ~chatplayer("I'm still looking for Imcando dwarves to help me."); + ~chatnpc("Please try and find them quickly... I am scared Sir Vyvin will find out!"); } [label,reldo_imcando_dwaves] -~chatplayer(quiz, "What do you know about the Imcando dwarves?"); -~chatnpc(neutral, "The Imcando dwarves, you say?"); -~chatnpc(happy, "Ah yes... for many hundreds of years they were the world's most skilled smiths. They used secret smithing knowledge passed down from generation to generation."); -~chatnpc(happy, "Unfortunately, about a century ago, the once thriving race was wiped out during the barbarian invasions of that time."); -~chatplayer(quiz, "So are there any Imcando left at all?"); -~chatnpc(happy, "I believe a few of them survived,|but with the bulk of their population destroyed|their numbers have dwindled even further."); -~chatnpc(happy, "I believe I remember a couple living in Asgarnia|near the cliffs on the Asgarnian southern peninsula,|but they DO tend to keep to themselves."); -~chatnpc(default, "They tend not to tell people that they're the descendants of the Imcando, which is why people think that the tribe has died out totally, but you may well have more luck talking to them if you bring them some"); -~chatnpc(neutral, "redberry pie. They REALLY like redberry pie."); +~chatplayer("What do you know about the Imcando dwarves?"); +~chatnpc("The Imcando dwarves, you say?"); +~chatnpc("Ah yes... for many hundreds of years they were the world's most skilled smiths. They used secret smithing knowledge passed down from generation to generation."); +~chatnpc("Unfortunately, about a century ago, the once thriving race was wiped out during the barbarian invasions of that time."); +~chatplayer("So are there any Imcando left at all?"); +~chatnpc("I believe a few of them survived,|but with the bulk of their population destroyed|their numbers have dwindled even further."); +~chatnpc("I believe I remember a couple living in Asgarnia|near the cliffs on the Asgarnian southern peninsula,|but they DO tend to keep to themselves."); +~chatnpc("They tend not to tell people that they're the descendants of the Imcando, which is why people think that the tribe has died out totally, but you may well have more luck talking to them if you bring them some"); +~chatnpc("redberry pie. They REALLY like redberry pie."); %squire_progress = 2; [label,thurgo_inquire] @@ -130,8 +130,8 @@ if(inv_total(inv, redberry_pie) >= 1) { } [label,thurgo_who_wants] -~chatplayer(quiz, "Hello. Are you an Imcando dwarf?"); -~chatnpc(happy, "Maybe. Who wants to know?"); +~chatplayer("Hello. Are you an Imcando dwarf?"); +~chatnpc("Maybe. Who wants to know?"); if(inv_total(inv, redberry_pie) >= 1) { @multi2("Would you like some redberry pie?", thurgo_redberry_pie, "Can you make me a special sword?", thurgo_special_sword_pre_pie); } else { @@ -139,76 +139,76 @@ if(inv_total(inv, redberry_pie) >= 1) { } [label,thurgo_special_sword_pre_pie] -~chatplayer(quiz, "Can you make me a special sword?"); -~chatnpc(default, "No, I don't do that anymore. I'm getting old."); +~chatplayer("Can you make me a special sword?"); +~chatnpc("No, I don't do that anymore. I'm getting old."); [label,thurgo_redberry_pie] -~chatplayer(quiz, "Would you like a redberry pie?"); +~chatplayer("Would you like a redberry pie?"); ~mesbox("You see Thurgo's eyes light up."); -~chatnpc(happy, "I'd never say no to a redberry pie! They're GREAT stuff!"); +~chatnpc("I'd never say no to a redberry pie! They're GREAT stuff!"); ~mesbox("You hand over the pie. Thurgo eats the pie. Thurgo pats his stomach."); inv_del(inv, redberry_pie, 1); %squire_progress = 3; -~chatnpc(happy, "By Guthix! THAT was good pie! Anyone who makes pie like THAT has got to be alright!"); +~chatnpc("By Guthix! THAT was good pie! Anyone who makes pie like THAT has got to be alright!"); [label,thurgo_special_sword_post_pie] -~chatplayer(quiz, "Can you make me a special sword?"); -~chatnpc(default, "Well, after bringing me my favorite food I guess I should give it a go. What sort of sword is it?"); -~chatplayer(default, "I need you to make a sword for one of Falador's knights. He had one which was passed down through five generations, but his squire has lost it. So we need an identical one to replace it."); -~chatnpc(default, "A Knight's sword eh? Well I'd need to know exactly how it looked before I could make a new one."); -~chatnpc(happy, "All the Faladian knights used to have swords with unique designs according to their position. Could you bring me a picture or something?"); +~chatplayer("Can you make me a special sword?"); +~chatnpc("Well, after bringing me my favorite food I guess I should give it a go. What sort of sword is it?"); +~chatplayer("I need you to make a sword for one of Falador's knights. He had one which was passed down through five generations, but his squire has lost it. So we need an identical one to replace it."); +~chatnpc("A Knight's sword eh? Well I'd need to know exactly how it looked before I could make a new one."); +~chatnpc("All the Faladian knights used to have swords with unique designs according to their position. Could you bring me a picture or something?"); %squire_progress = 4; -~chatplayer(neutral, "I'll go and ask his squire and see if I can find one."); +~chatplayer("I'll go and ask his squire and see if I can find one."); [label,thurgo_about_sword] -~chatplayer(neutral, "About that sword..."); +~chatplayer("About that sword..."); if(%squire_progress = 4 | %squire_progress = 5 & inv_total(inv, portrait) = 0) { - ~chatnpc(quiz, "Have you got a picture of the sword for me yet?"); - ~chatplayer(neutral, "Sorry, not yet."); - ~chatnpc(happy, "Well, come back when you do."); + ~chatnpc("Have you got a picture of the sword for me yet?"); + ~chatplayer("Sorry, not yet."); + ~chatnpc("Well, come back when you do."); } else if (%squire_progress = 5 & inv_total(inv, portrait) >= 1) { - ~chatplayer(default, "I have found a picture of the sword I would like you to make."); + ~chatplayer("I have found a picture of the sword I would like you to make."); ~mesbox("You give the portrait to Thurgo. Thurgo studies the portrait."); - ~chatnpc(default, "Ok. You'll need to get me some stuff in order for me to make this."); - ~chatnpc(default, "I'll need two iron bars to make the sword to start with. I'll also need an ore called blurite. It's useless for making actual weapons for fighting with, but I'll need some as decoration for the hilt."); - ~chatnpc(default, "It is fairly rare sort of ore... The only place I know where to get it is under this cliff here..."); - ~chatnpc(sad, "But it is guarded by a very powerful ice giant."); - ~chatnpc(happy, "Most of the rocks in that cliff are pretty useless, and don't contain much of anything, but there's DEFINITELY some blurite in there."); - ~chatnpc(default, "You'll need a little bit of mining experience to be able to find it."); + ~chatnpc("Ok. You'll need to get me some stuff in order for me to make this."); + ~chatnpc("I'll need two iron bars to make the sword to start with. I'll also need an ore called blurite. It's useless for making actual weapons for fighting with, but I'll need some as decoration for the hilt."); + ~chatnpc("It is fairly rare sort of ore... The only place I know where to get it is under this cliff here..."); + ~chatnpc("But it is guarded by a very powerful ice giant."); + ~chatnpc("Most of the rocks in that cliff are pretty useless, and don't contain much of anything, but there's DEFINITELY some blurite in there."); + ~chatnpc("You'll need a little bit of mining experience to be able to find it."); %squire_progress = 6; - ~chatplayer(neutral, "Ok. I'll go and find them then."); + ~chatplayer("Ok. I'll go and find them then."); } else if (%squire_progress = 6) { @thurgo_check_blurite; } [label,thurgo_check_blurite] if(inv_total(inv, blurite_sword) >= 1 | inv_total(bank, blurite_sword) >= 1 | inv_total(worn, blurite_sword) >= 1) { - ~chatplayer(neutral, "Thanks for all your help in getting it for me!"); - ~chatnpc(happy, "No worries mate."); + ~chatplayer("Thanks for all your help in getting it for me!"); + ~chatnpc("No worries mate."); return; } -~chatnpc(quiz, "How are you doing finding those sword materials?"); +~chatnpc("How are you doing finding those sword materials?"); if(inv_total(inv, blurite_ore) >= 1 & inv_total(inv, iron_bar) >= 2) { - ~chatplayer(neutral, "I have them right here."); + ~chatplayer("I have them right here."); ~mesbox("You give the blurite ore and two iron bars to Thurgo. Thurgo starts to make the sword. Thurgo hands you a sword."); inv_del(inv, blurite_ore, 1); inv_del(inv, iron_bar, 2); inv_add(inv, blurite_sword, 1); - ~chatplayer(happy, "Thank you very much!"); - ~chatnpc(happy, "Just remember to call in with more pie some time!"); + ~chatplayer("Thank you very much!"); + ~chatnpc("Just remember to call in with more pie some time!"); return; } else if(inv_total(inv, blurite_ore) >= 1) { - ~chatplayer(default, "I don't have enough iron bars..."); + ~chatplayer("I don't have enough iron bars..."); } else { - ~chatplayer(default, "I don't have any blurite ore yet..."); + ~chatplayer("I don't have any blurite ore yet..."); } -~chatnpc(shifty, "Better go get some then, huh?"); +~chatnpc("Better go get some then, huh?"); [proc,vyvin_distracted](boolean) // check if Vyvin is nearby, if hes standing near of the player // they wont be able to search the cupboard if (npc_find(coord, sir_vyvin, 1, 0) = true) { - ~chatnpc(angry, "HEY! Just WHAT do you THINK you are DOING??? STAY OUT of MY cupboard!"); + ~chatnpc("HEY! Just WHAT do you THINK you are DOING??? STAY OUT of MY cupboard!"); ~mesbox("Maybe you need to get Sir Vyvin further away from his cupboard..."); return(false); } diff --git a/data/src/scripts/quests/quest_totem/scripts/quest_totem.rs2 b/data/src/scripts/quests/quest_totem/scripts/quest_totem.rs2 index e0142f950..0316b4df3 100644 --- a/data/src/scripts/quests/quest_totem/scripts/quest_totem.rs2 +++ b/data/src/scripts/quests/quest_totem/scripts/quest_totem.rs2 @@ -26,7 +26,7 @@ switch_obj(last_useitem) { ~mesbox("You carefully place the delivery label over the existing label, covering it completely."); inv_del(inv, address_label, 1); %totem_progress = ^totem_crate_marked; - ~chatplayer(happy, "Now I just need someone to deliver it for me."); + ~chatplayer("Now I just need someone to deliver it for me."); return; case default: ~displaymessage(^dm_default); } diff --git a/data/src/scripts/quests/quest_tree/scripts/khazard_warlord.rs2 b/data/src/scripts/quests/quest_tree/scripts/khazard_warlord.rs2 index d591c5790..72279e6e3 100644 --- a/data/src/scripts/quests/quest_tree/scripts/khazard_warlord.rs2 +++ b/data/src/scripts/quests/quest_tree/scripts/khazard_warlord.rs2 @@ -1,23 +1,23 @@ [opnpc1,khazard_warlord] switch_int(%tree_progress) { case ^tree_retrieved_orb: - ~chatplayer(happy, "Hello there."); - ~chatnpc(angry, "You think you're so clever.|You know nothing!"); - ~chatplayer(quiz, "What?"); - ~chatnpc(angry, "I'll crush you and those pesky little green men!"); + ~chatplayer("Hello there."); + ~chatnpc("You think you're so clever.|You know nothing!"); + ~chatplayer("What?"); + ~chatnpc("I'll crush you and those pesky little green men!"); case ^tree_returned_first_orb: - ~chatplayer(angry, "You there, stop!"); - ~chatnpc(angry, "Go back to your pesky little green friends."); - ~chatplayer(angry, "I've come for the orbs."); - ~chatnpc(angry, "You're out of your depth traveller.|These orbs are part of a much larger picture."); - ~chatplayer(angry, "They're stolen goods,|now give them here!"); - ~chatnpc(angry, "Ha, you really think you stand a chance?|I'll crush you."); + ~chatplayer("You there, stop!"); + ~chatnpc("Go back to your pesky little green friends."); + ~chatplayer("I've come for the orbs."); + ~chatnpc("You're out of your depth traveller.|These orbs are part of a much larger picture."); + ~chatplayer("They're stolen goods,|now give them here!"); + ~chatnpc("Ha, you really think you stand a chance?|I'll crush you."); case ^tree_defeated_warlord, ^tree_complete: - ~chatplayer(shock, "I thought I killed you?"); - ~chatnpc(angry, "Fool, warriors blessed by Khazard don't die.|You can't kill that which is already dead.|However I can kill you!"); + ~chatplayer("I thought I killed you?"); + ~chatnpc("Fool, warriors blessed by Khazard don't die.|You can't kill that which is already dead.|However I can kill you!"); case default: - ~chatplayer(happy, "Hello, how are you?"); - ~chatnpc(angry, "Don't speak to me you insignificant wretch!|Die in the name of Khazard!"); + ~chatplayer("Hello, how are you?"); + ~chatnpc("Don't speak to me you insignificant wretch!|Die in the name of Khazard!"); } ~npc_retaliate(0); diff --git a/data/src/scripts/quests/quest_tree/scripts/tracker_gnome.rs2 b/data/src/scripts/quests/quest_tree/scripts/tracker_gnome.rs2 index 417b21423..4ba272151 100644 --- a/data/src/scripts/quests/quest_tree/scripts/tracker_gnome.rs2 +++ b/data/src/scripts/quests/quest_tree/scripts/tracker_gnome.rs2 @@ -1,29 +1,29 @@ [opnpc1,tracker_gnome_1] switch_int(%tree_progress) { case ^tree_not_started, ^tree_started, ^tree_given_logs_montai: - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "I can't talk now.|Can't you see we're trying to win a battle here?"); + ~chatplayer("Hello."); + ~chatnpc("I can't talk now.|Can't you see we're trying to win a battle here?"); case ^tree_spoken_montai: - ~chatplayer(neutral, "Hi there."); - ~chatnpc(bored, "We're trying to hold them back,|but without more wood we won't be able to last long."); - ~chatplayer(neutral, "Hang in there little man."); + ~chatplayer("Hi there."); + ~chatnpc("We're trying to hold them back,|but without more wood we won't be able to last long."); + ~chatplayer("Hang in there little man."); case ^tree_finding_trackers: - ~chatplayer(quiz, "Do you know the coordinates of the Khazard stronghold?"); - ~chatnpc(happy, "I managed to get one, although it wasn't easy."); + ~chatplayer("Do you know the coordinates of the Khazard stronghold?"); + ~chatnpc("I managed to get one, although it wasn't easy."); // (2006?) -> varbit 599, ~mesbox("The gnome tells you the @dbl@height coordinate."); - ~chatnpc(happy, "The height coordinate is 4."); - ~chatplayer(happy, "Well done."); - ~chatnpc(neutral, "The other two tracker gnomes|should have the other coordinates|if they're still alive."); - ~chatplayer(neutral, "OK, take care."); + ~chatnpc("The height coordinate is 4."); + ~chatplayer("Well done."); + ~chatnpc("The other two tracker gnomes|should have the other coordinates|if they're still alive."); + ~chatplayer("OK, take care."); case ^tree_ballista_fired: - ~chatplayer(neutral, "Hello again."); - ~chatnpc(neutral, "Well done, you've broken down their defences. This battle must be ours."); + ~chatplayer("Hello again."); + ~chatnpc("Well done, you've broken down their defences. This battle must be ours."); case ^tree_retrieved_orb: - ~chatplayer(neutral, "How are you tracker?"); - ~chatnpc(happy, "Now we have the orb I'm much better.|They won't stand a chance without it."); + ~chatplayer("How are you tracker?"); + ~chatnpc("Now we have the orb I'm much better.|They won't stand a chance without it."); case ^tree_returned_first_orb, ^tree_defeated_warlord, ^tree_complete: - ~chatplayer(neutral, "Hello."); - ~chatnpc(bored, "When will this battle end?|I feel like I've been fighting forever."); + ~chatplayer("Hello."); + ~chatnpc("When will this battle end?|I feel like I've been fighting forever."); } [apnpc1,tracker_gnome_2] @@ -33,66 +33,66 @@ if (npc_range(coord) > 2) { } switch_int(%tree_progress) { case ^tree_not_started, ^tree_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(shifty, "I can't talk now.|If the guards catch me I'll be dead gnome meat."); + ~chatplayer("Hello."); + ~chatnpc("I can't talk now.|If the guards catch me I'll be dead gnome meat."); case ^tree_spoken_montai, ^tree_given_logs_montai: - ~chatplayer(neutral, "Hi there."); - ~chatnpc(neutral, "The battle is far from over.|If you have a pure heart you will help us win."); + ~chatplayer("Hi there."); + ~chatnpc("The battle is far from over.|If you have a pure heart you will help us win."); case ^tree_finding_trackers: - ~chatplayer(quiz, "Are you OK?"); - ~chatnpc(bored, "They caught me spying on the stronghold.|They beat and tortured me."); - ~chatnpc(angry, "But I didn't crack. I told them nothing. They can't break me!"); - ~chatplayer(sad, "I'm sorry little man."); - ~chatnpc(shifty, "Don't be. I have the position of the stronghold!"); + ~chatplayer("Are you OK?"); + ~chatnpc("They caught me spying on the stronghold.|They beat and tortured me."); + ~chatnpc("But I didn't crack. I told them nothing. They can't break me!"); + ~chatplayer("I'm sorry little man."); + ~chatnpc("Don't be. I have the position of the stronghold!"); // (2006?) -> varbit 600, ~mesbox("The gnome tells you the @dbl@y coordinate."); - ~chatnpc(shifty, "The y coordinate is 5."); - ~chatplayer(happy, "Well done."); - ~chatnpc(shifty, "Now leave before they find you and all is lost."); - ~chatplayer(neutral, "Hang in there."); - ~chatnpc(angry, "Go!"); + ~chatnpc("The y coordinate is 5."); + ~chatplayer("Well done."); + ~chatnpc("Now leave before they find you and all is lost."); + ~chatplayer("Hang in there."); + ~chatnpc("Go!"); case ^tree_ballista_fired: - ~chatplayer(neutral, "Hello again."); - ~chatnpc(neutral, "Well done, you've broken down their defences.|This battle must be ours."); + ~chatplayer("Hello again."); + ~chatnpc("Well done, you've broken down their defences.|This battle must be ours."); case ^tree_retrieved_orb: - ~chatplayer(neutral, "How are you tracker?"); - ~chatnpc(happy, "Now we have the orb I'm much better. Soon my comrades will come and free me."); + ~chatplayer("How are you tracker?"); + ~chatnpc("Now we have the orb I'm much better. Soon my comrades will come and free me."); case ^tree_returned_first_orb, ^tree_defeated_warlord, ^tree_complete: - ~chatplayer(neutral, "Hello."); - ~chatnpc(bored, "When will this battle end?|I feel like I've been locked up my whole life."); + ~chatplayer("Hello."); + ~chatnpc("When will this battle end?|I feel like I've been locked up my whole life."); } [opnpc1,tracker_gnome_3] switch_int(%tree_progress) { case ^tree_not_started, ^tree_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(angry, "I can't talk now.|Can't you see we're trying to win a battle here?"); + ~chatplayer("Hello."); + ~chatnpc("I can't talk now.|Can't you see we're trying to win a battle here?"); case ^tree_spoken_montai, ^tree_given_logs_montai: - ~chatplayer(neutral, "Hi there."); - ~chatnpc(sad, "I can't stand this war.|The misery, the pain, it's driving me crazy!|When will it end?"); + ~chatplayer("Hi there."); + ~chatnpc("I can't stand this war.|The misery, the pain, it's driving me crazy!|When will it end?"); case ^tree_finding_trackers: - ~chatplayer(quiz, "Are you OK?"); - ~chatnpc(confused, "OK? Who's OK? Not me! Hee hee!"); - ~chatplayer(quiz, "What's wrong?"); - ~chatnpc(confused, "You can't see me, no one can.|Monsters, demons, they're all around me!"); - ~chatplayer(quiz, "What do you mean?"); - ~chatnpc(confused, "They're dancing, all of them, hee hee."); + ~chatplayer("Are you OK?"); + ~chatnpc("OK? Who's OK? Not me! Hee hee!"); + ~chatplayer("What's wrong?"); + ~chatnpc("You can't see me, no one can.|Monsters, demons, they're all around me!"); + ~chatplayer("What do you mean?"); + ~chatnpc("They're dancing, all of them, hee hee."); ~mesbox("He's clearly lost the plot."); - ~chatplayer(quiz, "Do you have the coordinate for the Khazard stronghold?"); - ~chatnpc(confused, "Who holds the stronghold?"); - ~chatplayer(confused, "What?"); + ~chatplayer("Do you have the coordinate for the Khazard stronghold?"); + ~chatnpc("Who holds the stronghold?"); + ~chatplayer("What?"); // random riddles/x-coord in 2005/2006? Not sure because Rune HQ mentions the random riddles by late 2005 (with a mismatched value it seems) // random values don't seem to appear in any guides until mid/late 2006 - ~chatnpc(confused, "More than me, less than our feet."); - ~chatplayer(confused, "You're mad."); - ~chatnpc(confused, "More than we, and Khazard's men are beat."); + ~chatnpc("More than me, less than our feet."); + ~chatplayer("You're mad."); + ~chatnpc("More than we, and Khazard's men are beat."); ~mesbox("The toll of war has affected his mind."); - ~chatplayer(sad, "I'll pray for you little man."); - ~chatnpc(quiz, "All day we pray in the hay, hee hee."); + ~chatplayer("I'll pray for you little man."); + ~chatnpc("All day we pray in the hay, hee hee."); case ^tree_ballista_fired, ^tree_retrieved_orb: - ~chatplayer(neutral, "Hello again."); - ~chatnpc(confused, "Don't talk to me, you can't see me.|No one can, just the demons."); + ~chatplayer("Hello again."); + ~chatnpc("Don't talk to me, you can't see me.|No one can, just the demons."); case ^tree_returned_first_orb, ^tree_defeated_warlord, ^tree_complete: - ~chatplayer(neutral, "Hello."); - ~chatnpc(confused, "I feel dizzy, where am I?|Oh dear, oh dear I need some rest."); - ~chatplayer(confused, "I think you do."); + ~chatplayer("Hello."); + ~chatnpc("I feel dizzy, where am I?|Oh dear, oh dear I need some rest."); + ~chatplayer("I think you do."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_waterfall/scripts/almera.rs2 b/data/src/scripts/quests/quest_waterfall/scripts/almera.rs2 index 146191ea9..cac6249d3 100644 --- a/data/src/scripts/quests/quest_waterfall/scripts/almera.rs2 +++ b/data/src/scripts/quests/quest_waterfall/scripts/almera.rs2 @@ -1,43 +1,43 @@ [opnpc1,almera] switch_int(%waterfall_progress) { case ^waterfall_not_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Ah, hello there.|Nice to see an outsider for a change.|Are you busy? I have a problem."); + ~chatplayer("Hello."); + ~chatnpc("Ah, hello there.|Nice to see an outsider for a change.|Are you busy? I have a problem."); switch_int(~p_choice2("I'm afraid I'm in a rush.", 1, "How can I help?", 2)) { case 1: - ~chatplayer(neutral, "I'm afraid I'm in a rush."); - ~chatnpc(confused, "Oh okay, never mind."); + ~chatplayer("I'm afraid I'm in a rush."); + ~chatnpc("Oh okay, never mind."); case 2: - ~chatplayer(neutral, "How can I help?"); - ~chatnpc(confused, "It's my son Hudon, he's always getting into trouble.|The boy's convinced there's hidden treasure in the river|and I'm a bit worried about his safety,|the poor lad can't even swim."); - ~chatplayer(confused, "I could go and take a look for you if you like?"); + ~chatplayer("How can I help?"); + ~chatnpc("It's my son Hudon, he's always getting into trouble.|The boy's convinced there's hidden treasure in the river|and I'm a bit worried about his safety,|the poor lad can't even swim."); + ~chatplayer("I could go and take a look for you if you like?"); %waterfall_progress = ^waterfall_started; ~send_quest_progress(questlist:waterfall, %waterfall_progress, ^waterfall_complete); - ~chatnpc(happy, "Would you? You are kind.|You can use the small raft out back if you wish,|do be careful, the current down stream is very strong."); + ~chatnpc("Would you? You are kind.|You can use the small raft out back if you wish,|do be careful, the current down stream is very strong."); } case ^waterfall_started: - ~chatplayer(happy, "Hello Almera."); - ~chatnpc(neutral, "Hello brave adventurer,|have you seen my boy yet?"); - ~chatplayer(confused, "I'm afraid not, but I'm sure he hasn't gone far."); - ~chatnpc(confused, "I do hope so,|you can't be too careful these days."); + ~chatplayer("Hello Almera."); + ~chatnpc("Hello brave adventurer,|have you seen my boy yet?"); + ~chatplayer("I'm afraid not, but I'm sure he hasn't gone far."); + ~chatnpc("I do hope so,|you can't be too careful these days."); case ^waterfall_spoken_to_hudon: - ~chatplayer(happy, "Hello again."); - ~chatnpc(happy, "Well hello, you're still around then."); - ~chatplayer(confused, "I saw Hudon by the river but he refused to come back with me."); - ~chatnpc(neutral, "Yes he told me, the foolish lad came in drenched to the bone, he had fallen into the waterfall, lucky he wasn't killed! Now he can spend the rest of the summer in his room."); - ~chatplayer(happy, "Any ideas on what I could do while I'm here?"); - ~chatnpc(neutral, "Why don't you visit the tourist centre south of the waterfall?"); + ~chatplayer("Hello again."); + ~chatnpc("Well hello, you're still around then."); + ~chatplayer("I saw Hudon by the river but he refused to come back with me."); + ~chatnpc("Yes he told me, the foolish lad came in drenched to the bone, he had fallen into the waterfall, lucky he wasn't killed! Now he can spend the rest of the summer in his room."); + ~chatplayer("Any ideas on what I could do while I'm here?"); + ~chatnpc("Why don't you visit the tourist centre south of the waterfall?"); case ^waterfall_opened_book_on_baxtorian: - ~chatplayer(happy, "Hello again Almera."); - ~chatnpc(happy, "Well hello again brave adventurer,|are you enjoying the tranquil scenery of these parts?"); - ~chatplayer(happy, "Yes, very relaxing."); - ~chatnpc(neutral, "Well I'm glad to hear it The authorities wanted to dig up this whole area for a mine, but the few locals who lived here wouldn't budge and they gave up."); - ~chatplayer(happy, "Good for you."); - ~chatnpc(happy, "Good for all of us!"); + ~chatplayer("Hello again Almera."); + ~chatnpc("Well hello again brave adventurer,|are you enjoying the tranquil scenery of these parts?"); + ~chatplayer("Yes, very relaxing."); + ~chatnpc("Well I'm glad to hear it The authorities wanted to dig up this whole area for a mine, but the few locals who lived here wouldn't budge and they gave up."); + ~chatplayer("Good for you."); + ~chatnpc("Good for all of us!"); case ^waterfall_entered_glarial_tomb, ^waterfall_entered_waterfall, ^waterfall_entered_puzzle_room, ^waterfall_complete: - ~chatplayer(happy, "Hello Almera."); - ~chatnpc(happy, "Hello adventurer, how's your treasure hunt going?"); - ~chatplayer(neutral, "Oh, I'm just sight seeing."); - ~chatnpc(neutral, "No adventurer stays here this long just to sight see.|But your business is yours alone,|if you need to use the raft go ahead.|But please try not crash it this time!"); - ~chatplayer(happy, "Thanks Almera."); + ~chatplayer("Hello Almera."); + ~chatnpc("Hello adventurer, how's your treasure hunt going?"); + ~chatplayer("Oh, I'm just sight seeing."); + ~chatnpc("No adventurer stays here this long just to sight see.|But your business is yours alone,|if you need to use the raft go ahead.|But please try not crash it this time!"); + ~chatplayer("Thanks Almera."); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_waterfall/scripts/gerald.rs2 b/data/src/scripts/quests/quest_waterfall/scripts/gerald.rs2 index 4cf53543d..bb5d82c19 100644 --- a/data/src/scripts/quests/quest_waterfall/scripts/gerald.rs2 +++ b/data/src/scripts/quests/quest_waterfall/scripts/gerald.rs2 @@ -1,19 +1,19 @@ [opnpc1,gerald] switch_int(%waterfall_progress) { case ^waterfall_not_started: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(happy, "Good day to your traveller,|are you here to fish or just looking around?|I've caught some beauties down here."); - ~chatplayer(neutral, "Really?"); + ~chatplayer("Hello there."); + ~chatnpc("Good day to your traveller,|are you here to fish or just looking around?|I've caught some beauties down here."); + ~chatplayer("Really?"); npc_anim(seq_802, 3); - ~chatnpc(neutral, "The last one was this big!"); + ~chatnpc("The last one was this big!"); case ^waterfall_started: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello there."); - ~chatplayer(quiz, "Have you seen a small boy?"); - ~chatnpc(neutral, "Nope, plenty of small fish though."); + ~chatplayer("Hello."); + ~chatnpc("Hello there."); + ~chatplayer("Have you seen a small boy?"); + ~chatnpc("Nope, plenty of small fish though."); case default: - ~chatplayer(neutral, "Hello."); - ~chatnpc(neutral, "Hello traveller.|Are you here to fish or to hunt for treasure?"); - ~chatplayer(quiz, "Why do you say that?"); - ~chatnpc(neutral, "Adventurers pass through here every week,|they never find anything though."); + ~chatplayer("Hello."); + ~chatnpc("Hello traveller.|Are you here to fish or to hunt for treasure?"); + ~chatplayer("Why do you say that?"); + ~chatnpc("Adventurers pass through here every week,|they never find anything though."); } diff --git a/data/src/scripts/quests/quest_waterfall/scripts/golrie.rs2 b/data/src/scripts/quests/quest_waterfall/scripts/golrie.rs2 index 07b2eaf7d..b98961c8a 100644 --- a/data/src/scripts/quests/quest_waterfall/scripts/golrie.rs2 +++ b/data/src/scripts/quests/quest_waterfall/scripts/golrie.rs2 @@ -1,17 +1,17 @@ [opnpc1,golrie] // diff dialogue, comparing with video to get mesanims (seems like the whole dialogue is neutral, almost matches with OSRS: https://www.youtube.com/watch?v=D80JSlBEC6I&t=282s) -~chatplayer(neutral, "Hello, is your name Golrie?"); -~chatnpc(neutral, "That's me. I've been stuck in here for weeks, those goblins are trying to steal my family's heirlooms. My Grandad gave me all sorts of old junk."); -~chatplayer(neutral, "Do you mind if I have a look?"); -~chatnpc(neutral, "No, of course not."); +~chatplayer("Hello, is your name Golrie?"); +~chatnpc("That's me. I've been stuck in here for weeks, those goblins are trying to steal my family's heirlooms. My Grandad gave me all sorts of old junk."); +~chatplayer("Do you mind if I have a look?"); +~chatnpc("No, of course not."); if_close; mes("You look amongst the junk on the floor."); p_delay(2); if (inv_total(inv, glarials_pebble) < 1) { // no bank check again mes("mixed with the junk on the floor you find Glarial's pebble."); p_delay(2); - ~chatplayer(neutral, "Could I take this old pebble?"); - ~chatnpc(neutral, "Oh that, yes have it, it's just some old elven junk I believe."); + ~chatplayer("Could I take this old pebble?"); + ~chatnpc("Oh that, yes have it, it's just some old elven junk I believe."); inv_add(inv, glarials_pebble, 1); %waterfall_golrie_and_puzzle = setbit(%waterfall_golrie_and_puzzle, 0); // gonna have waterfall_addl_values, bit 0 can be golrie's key, bits 1-18 will be pillars and runes if(inv_total(inv, golrie_key) > 0) { @@ -29,15 +29,15 @@ if (inv_total(inv, glarials_pebble) < 1) { // no bank check again p_delay(2); } } -~chatnpc(neutral, "Thanks a lot for the key traveller. I think I'll wait in here until those goblins get bored and leave."); -~chatplayer(neutral, "OK... Take care Golrie."); +~chatnpc("Thanks a lot for the key traveller. I think I'll wait in here until those goblins get bored and leave."); +~chatplayer("OK... Take care Golrie."); [label,waterfall_golrie_door_dialogue] switch_int(%waterfall_progress) { case ^waterfall_not_started, ^waterfall_started, ^waterfall_spoken_to_hudon: - ~chatnpc(neutral, "What are you doing down here?|Leave before you get yourself into trouble."); + ~chatnpc("What are you doing down here?|Leave before you get yourself into trouble."); case ^waterfall_opened_book_on_baxtorian: - ~chatplayer(neutral, "Hello, are you okay?"); - ~chatnpc(neutral, "Oh, don't worry, I'm totally fine. I locked myself in here for protection, but I've left the key somewhere."); - ~chatplayer(confused, "Okay... I'll have a look for a key."); + ~chatplayer("Hello, are you okay?"); + ~chatnpc("Oh, don't worry, I'm totally fine. I locked myself in here for protection, but I've left the key somewhere."); + ~chatplayer("Okay... I'll have a look for a key."); } diff --git a/data/src/scripts/quests/quest_waterfall/scripts/hadley.rs2 b/data/src/scripts/quests/quest_waterfall/scripts/hadley.rs2 index 715c75389..d9095b38b 100644 --- a/data/src/scripts/quests/quest_waterfall/scripts/hadley.rs2 +++ b/data/src/scripts/quests/quest_waterfall/scripts/hadley.rs2 @@ -1,77 +1,77 @@ [opnpc1,hadley] -~chatplayer(neutral, "Hello there."); +~chatplayer("Hello there."); // https://youtu.be/5YeeYCNzDH8?si=hloyr9VphBCV4WTe&t=153, https://youtu.be/VxPuLLiUHNk?si=nfmb-EdajnHIlGp9&t=217 if(inv_total(inv, book_on_baxtorian) > 0) { - ~chatnpc(neutral, "I hope you're enjoying your stay,|there should be lots of useful infomation in that book you've got.|Places to go, people to see."); + ~chatnpc("I hope you're enjoying your stay,|there should be lots of useful infomation in that book you've got.|Places to go, people to see."); @multi4("Can you tell me what happened to the elf king?", waterfall_hadley_elf_king, "Where else is worth visiting around here?", waterfall_hadley_worth_visiting, "Is there treasure under the waterfall?", waterfall_hadley_treasure, "Thanks then, goodbye.", waterfall_hadley_bye); } switch_int (%waterfall_progress) { case ^waterfall_not_started, ^waterfall_started: - ~chatnpc(neutral, "Well hello, come in, come in, my name's Hadley, I'm head of tourism here in Hemenster. There's some of the most unspoilt wildlife and scenery in RuneScape here."); - ~chatnpc(neutral, "People come from miles around to fish in the clear lakes or to wander the beautiful hill sides"); - ~chatplayer(neutral, "It is quite pretty."); - ~chatnpc(neutral, "Surely pretty is an understatement kind . Beautiful, amazing or possibly life-changing would be more suitable wording. Have you seen the Baxtorian Waterfall? Named after the elf king who was buried beneath."); + ~chatnpc("Well hello, come in, come in, my name's Hadley, I'm head of tourism here in Hemenster. There's some of the most unspoilt wildlife and scenery in RuneScape here."); + ~chatnpc("People come from miles around to fish in the clear lakes or to wander the beautiful hill sides"); + ~chatplayer("It is quite pretty."); + ~chatnpc("Surely pretty is an understatement kind . Beautiful, amazing or possibly life-changing would be more suitable wording. Have you seen the Baxtorian Waterfall? Named after the elf king who was buried beneath."); @multi4("What happened to the elf king?", waterfall_hadley_elf_king, "Where else is worth visiting around here?", waterfall_hadley_worth_visiting, "I don't like nature, it gives me a rash!", @waterfall_hadley_nature, "Thanks then, goodbye.", waterfall_hadley_bye); case default: - ~chatnpc(neutral, "Are you on holiday? If so you've come to the right place. I'm Hadley the tourist guide, anything you need to know just ask me. We have some of the most unspoilt wildlife and scenery in RuneScape."); - ~chatnpc(neutral, "People come from miles around to fish in the clear lakes or to wander the beautiful hill sides"); - ~chatplayer(neutral, "It is quite pretty."); - ~chatnpc(neutral, "Surely pretty is an understatement kind . Beautiful, amazing or possibly life-changing would be more suitable wording. Have you seen the Baxtorian Waterfall? Named after the elf king who was buried beneath."); + ~chatnpc("Are you on holiday? If so you've come to the right place. I'm Hadley the tourist guide, anything you need to know just ask me. We have some of the most unspoilt wildlife and scenery in RuneScape."); + ~chatnpc("People come from miles around to fish in the clear lakes or to wander the beautiful hill sides"); + ~chatplayer("It is quite pretty."); + ~chatnpc("Surely pretty is an understatement kind . Beautiful, amazing or possibly life-changing would be more suitable wording. Have you seen the Baxtorian Waterfall? Named after the elf king who was buried beneath."); @multi4("Can you tell me what happened to the elf king?", waterfall_hadley_elf_king, "Where else is worth visiting around here?", waterfall_hadley_worth_visiting, "Is there treasure under the waterfall?", waterfall_hadley_treasure, "Thanks then, goodbye.", waterfall_hadley_bye); } [label,waterfall_hadley_elf_king] switch_int (%waterfall_progress) { case ^waterfall_not_started, ^waterfall_started: - ~chatplayer(neutral, "What happened to the elf king?"); - ~chatnpc(sad, "Baxtorian, I guess he died a long long time ago, it's quite sad really. After defending his kingdom against the invading dark forces from the west, Baxtorian returned to find his beautiful wife, Glarial, had been captured by the enemy."); - ~chatnpc(sad, "This destroyed Baxtorian, after years of searching he became a recluse. In the secret home he had made for Glarial under the waterfall, he never came out and to this day no one has managed to get in."); - ~chatplayer(neutral, "What happened to him?"); - ~chatnpc(neutral, "No one knows."); + ~chatplayer("What happened to the elf king?"); + ~chatnpc("Baxtorian, I guess he died a long long time ago, it's quite sad really. After defending his kingdom against the invading dark forces from the west, Baxtorian returned to find his beautiful wife, Glarial, had been captured by the enemy."); + ~chatnpc("This destroyed Baxtorian, after years of searching he became a recluse. In the secret home he had made for Glarial under the waterfall, he never came out and to this day no one has managed to get in."); + ~chatplayer("What happened to him?"); + ~chatnpc("No one knows."); @multi3("Where else is worth visiting around here?", waterfall_hadley_worth_visiting, "I don't like nature, it gives me a rash!", waterfall_hadley_nature, "Thanks then, goodbye.", waterfall_hadley_bye); case default: - ~chatplayer(neutral, "Can you tell me what happened to the elf king?"); - ~chatnpc(neutral, "There are many myths about Baxtorian. One popular story is that after defending his kingdom against the invading dark forces from the west, Baxtorian returned to find his wife Glarial had been captured by the enemy!"); - ~chatnpc(neutral, "This destroyed Baxtorian, after years of searching he became a recluse. In the secret home he had made for Glarial under the waterfall, he never came out and it is told that only Glarial could enter."); - ~chatplayer(neutral, "What happened to him?"); - ~chatnpc(neutral, "Oh, I don't know. I believe we have some pages on him upstairs in our archives. If you wish to look at them please be careful, they're all pretty delicate."); + ~chatplayer("Can you tell me what happened to the elf king?"); + ~chatnpc("There are many myths about Baxtorian. One popular story is that after defending his kingdom against the invading dark forces from the west, Baxtorian returned to find his wife Glarial had been captured by the enemy!"); + ~chatnpc("This destroyed Baxtorian, after years of searching he became a recluse. In the secret home he had made for Glarial under the waterfall, he never came out and it is told that only Glarial could enter."); + ~chatplayer("What happened to him?"); + ~chatnpc("Oh, I don't know. I believe we have some pages on him upstairs in our archives. If you wish to look at them please be careful, they're all pretty delicate."); @multi3("Where else is worth visiting around here?", waterfall_hadley_worth_visiting, "Is there treasure under the waterfall?", waterfall_hadley_treasure, "Thanks then, goodbye.", waterfall_hadley_bye); } [label,waterfall_hadley_treasure] -~chatplayer(neutral, "Is there treasure under the waterfall?"); -~chatnpc(neutral, "Ha ha... Another treasure hunter. Well if there is no one's been able to get to it. They've been searching that river for decades, all to no avail."); +~chatplayer("Is there treasure under the waterfall?"); +~chatnpc("Ha ha... Another treasure hunter. Well if there is no one's been able to get to it. They've been searching that river for decades, all to no avail."); @multi3("Can you tell me what happened to the elf king?", waterfall_hadley_elf_king, "What else is worth visiting around here?", waterfall_hadley_worth_visiting, "Thanks then, goodbye.", waterfall_hadley_bye); [label,waterfall_hadley_worth_visiting] switch_int (%waterfall_progress) { case ^waterfall_not_started, ^waterfall_started: - ~chatplayer(neutral, "What else is worth visiting around here?"); - ~chatnpc(neutral, "Well, there's a wide variety of wildlife, although unfortunately most of it's quite dangerous.|Please don't feed the goblins."); - ~chatplayer(neutral, "OK."); - ~chatnpc(neutral, "There is a lovely spot for a picnic on the hill to the north east, there's a monument to the deceased elven queen Glarial. It really is quite pretty."); + ~chatplayer("What else is worth visiting around here?"); + ~chatnpc("Well, there's a wide variety of wildlife, although unfortunately most of it's quite dangerous.|Please don't feed the goblins."); + ~chatplayer("OK."); + ~chatnpc("There is a lovely spot for a picnic on the hill to the north east, there's a monument to the deceased elven queen Glarial. It really is quite pretty."); @multi3("What happened to the elf king?", waterfall_hadley_elf_king, "I don't like nature, it gives me a rash!", waterfall_hadley_nature, "Thanks then, goodbye.", waterfall_hadley_bye); case default: - ~chatplayer(neutral, "What else is worth visiting around here?"); - ~chatnpc(neutral, "There is a lovely spot for a picnic on the hill to the north east, there's a monument to the deceased elven queen Glarial. It really is quite pretty."); - ~chatplayer(neutral, "Who was queen Glarial?"); - ~chatnpc(neutral, "Baxtorian's wife, the only other person who could also enter the waterfall. She was queen when this land was inhabited by elven kind. Glarial was kidnapped while"); - ~chatnpc(neutral, "Baxtorian was away, but they eventually recovered her body and brought her home to rest."); - ~chatplayer(sad, "That's sad."); - ~chatnpc(neutral, "True, I believe there's some information about her upstairs, if you look at them please be careful."); + ~chatplayer("What else is worth visiting around here?"); + ~chatnpc("There is a lovely spot for a picnic on the hill to the north east, there's a monument to the deceased elven queen Glarial. It really is quite pretty."); + ~chatplayer("Who was queen Glarial?"); + ~chatnpc("Baxtorian's wife, the only other person who could also enter the waterfall. She was queen when this land was inhabited by elven kind. Glarial was kidnapped while"); + ~chatnpc("Baxtorian was away, but they eventually recovered her body and brought her home to rest."); + ~chatplayer("That's sad."); + ~chatnpc("True, I believe there's some information about her upstairs, if you look at them please be careful."); @multi3("Can you tell me what happened to the elf king?", waterfall_hadley_elf_king, "Is there treasure under the waterfall?", waterfall_hadley_treasure, "Thanks then, goodbye.", waterfall_hadley_bye); } -~chatplayer(neutral, "What else is worth visiting around here?"); -~chatnpc(neutral, "Well, there's a wide variety of wildlife, although unfortunately most of it's quite dangerous.|Please don't feed the goblins."); -~chatplayer(neutral, "OK."); -~chatnpc(neutral, "There is a lovely spot for a picnic on the hill to the north east, there's a monument to the deceased elven queen Glarial. It really is quite pretty."); +~chatplayer("What else is worth visiting around here?"); +~chatnpc("Well, there's a wide variety of wildlife, although unfortunately most of it's quite dangerous.|Please don't feed the goblins."); +~chatplayer("OK."); +~chatnpc("There is a lovely spot for a picnic on the hill to the north east, there's a monument to the deceased elven queen Glarial. It really is quite pretty."); @multi3("What happened to the elf king?", waterfall_hadley_elf_king, "I don't like nature, it gives me a rash!", waterfall_hadley_nature, "Thanks then, goodbye.", waterfall_hadley_bye); [label,waterfall_hadley_nature] -~chatplayer(neutral, "I don't like nature, it gives me a rash!"); -~chatnpc(neutral, "That's just silly talk."); +~chatplayer("I don't like nature, it gives me a rash!"); +~chatnpc("That's just silly talk."); [label,waterfall_hadley_bye] -~chatplayer(neutral, "Thanks then, goodbye."); -~chatnpc(neutral, "Enjoy your visit."); \ No newline at end of file +~chatplayer("Thanks then, goodbye."); +~chatnpc("Enjoy your visit."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_waterfall/scripts/hudon.rs2 b/data/src/scripts/quests/quest_waterfall/scripts/hudon.rs2 index e1834268d..519049ebb 100644 --- a/data/src/scripts/quests/quest_waterfall/scripts/hudon.rs2 +++ b/data/src/scripts/quests/quest_waterfall/scripts/hudon.rs2 @@ -7,45 +7,45 @@ [label,hudon_dialogue] switch_int (%waterfall_progress) { case ^waterfall_not_started: - ~chatplayer(neutral, "Hello there."); - ~chatnpc(neutral, "What do you want?"); - ~chatplayer(neutral, "Nothing, just passing by."); + ~chatplayer("Hello there."); + ~chatnpc("What do you want?"); + ~chatplayer("Nothing, just passing by."); case ^waterfall_started: - ~chatplayer(neutral, "Hello son, are you okay?"); - ~chatnpc(neutral, "Don't play nice with me,|I know you're looking for the treasure too."); - ~chatplayer(neutral, "Your mum sent me to find you."); - ~chatnpc(neutral, "I'll go home when I've found the treasure.|I'm going to be a rich man."); - ~chatplayer(neutral, "Where is this treasure you talk of?"); - ~chatnpc(neutral, "Just because I'm small doesn't mean I'm dumb! If I told you, you would take it all for yourself."); - ~chatplayer(neutral, "Maybe I could help."); + ~chatplayer("Hello son, are you okay?"); + ~chatnpc("Don't play nice with me,|I know you're looking for the treasure too."); + ~chatplayer("Your mum sent me to find you."); + ~chatnpc("I'll go home when I've found the treasure.|I'm going to be a rich man."); + ~chatplayer("Where is this treasure you talk of?"); + ~chatnpc("Just because I'm small doesn't mean I'm dumb! If I told you, you would take it all for yourself."); + ~chatplayer("Maybe I could help."); %waterfall_progress = ^waterfall_spoken_to_hudon; - ~chatnpc(neutral, "I'm fine alone."); - ~chatplayer(neutral, "Ok, I'll leave you to it."); + ~chatnpc("I'm fine alone."); + ~chatplayer("Ok, I'll leave you to it."); case ^waterfall_spoken_to_hudon: - ~chatplayer(neutral, "So you're still here."); - ~chatnpc(neutral, "I'll find that treasure soon,|just you wait and see."); + ~chatplayer("So you're still here."); + ~chatnpc("I'll find that treasure soon,|just you wait and see."); case ^waterfall_opened_book_on_baxtorian: - ~chatplayer(neutral, "Hello Hudon."); - ~chatnpc(neutral, "Oh it's you,|trying to find my treasure again are you?"); - ~chatplayer(neutral, "I didn't know it belonged to you."); - ~chatnpc(neutral, "It will do when I find it.|I just need to get into this blasted waterfall|I've been washed downstream three times already."); + ~chatplayer("Hello Hudon."); + ~chatnpc("Oh it's you,|trying to find my treasure again are you?"); + ~chatplayer("I didn't know it belonged to you."); + ~chatnpc("It will do when I find it.|I just need to get into this blasted waterfall|I've been washed downstream three times already."); case ^waterfall_entered_glarial_tomb: - ~chatplayer(neutral, "Hello again."); - ~chatnpc(neutral, "Not you still, why don't you give up?"); - ~chatplayer(neutral, "And miss all the fun!"); - ~chatnpc(neutral, "You do understand that anything you find you have to share with me."); - ~chatplayer(neutral, "Why's that?"); - ~chatnpc(neutral, "Because I told you about the treasure."); - ~chatplayer(neutral, "Well, I wouldn't count on it."); - ~chatnpc(neutral, "That's not fair."); - ~chatplayer(neutral, "Neither is life kid."); + ~chatplayer("Hello again."); + ~chatnpc("Not you still, why don't you give up?"); + ~chatplayer("And miss all the fun!"); + ~chatnpc("You do understand that anything you find you have to share with me."); + ~chatplayer("Why's that?"); + ~chatnpc("Because I told you about the treasure."); + ~chatplayer("Well, I wouldn't count on it."); + ~chatnpc("That's not fair."); + ~chatplayer("Neither is life kid."); case ^waterfall_entered_waterfall, ^waterfall_entered_puzzle_room, ^waterfall_placed_amulet: - ~chatplayer(neutral, "How are you doing, Hudon?"); - ~chatnpc(neutral, "No luck yet I'm afraid."); - ~chatplayer(neutral, "Me neither. but I don't give up easily."); + ~chatplayer("How are you doing, Hudon?"); + ~chatnpc("No luck yet I'm afraid."); + ~chatplayer("Me neither. but I don't give up easily."); case ^waterfall_complete: - ~chatplayer(neutral, "Hello again."); - ~chatnpc(neutral, "You stole my treasure. I saw you!"); - ~chatplayer(neutral, "I'll make sure it goes to a good cause."); - ~chatnpc(neutral, "Hmmmm!"); + ~chatplayer("Hello again."); + ~chatnpc("You stole my treasure. I saw you!"); + ~chatplayer("I'll make sure it goes to a good cause."); + ~chatnpc("Hmmmm!"); } \ No newline at end of file diff --git a/data/src/scripts/quests/quest_waterfall/scripts/quest_waterfall.rs2 b/data/src/scripts/quests/quest_waterfall/scripts/quest_waterfall.rs2 index 351492656..d92ac8b31 100644 --- a/data/src/scripts/quests/quest_waterfall/scripts/quest_waterfall.rs2 +++ b/data/src/scripts/quests/quest_waterfall/scripts/quest_waterfall.rs2 @@ -151,15 +151,15 @@ switch_int (%waterfall_progress) { npc_findallzone(movecoord(coord, -1, 0, 0)); while (npc_findnext = true) { if (npc_type = hudon) { - ~chatplayer(neutral, "Hello son, are you okay? You need help?"); - ~chatnpc(neutral, "It looks like you need the help."); - ~chatplayer(neutral, "Your mum sent me to find you."); - ~chatnpc(neutral, "Don't play nice with me,|I know you're looking for the treasure."); - ~chatplayer(neutral, "Where is this treasure you talk of?"); - ~chatnpc(neutral, "Just because I'm small doesn't mean I'm dumb! If I told you, you would take it all for yourself."); - ~chatplayer(neutral, "Maybe I could help."); + ~chatplayer("Hello son, are you okay? You need help?"); + ~chatnpc("It looks like you need the help."); + ~chatplayer("Your mum sent me to find you."); + ~chatnpc("Don't play nice with me,|I know you're looking for the treasure."); + ~chatplayer("Where is this treasure you talk of?"); + ~chatnpc("Just because I'm small doesn't mean I'm dumb! If I told you, you would take it all for yourself."); + ~chatplayer("Maybe I could help."); %waterfall_progress = ^waterfall_spoken_to_hudon; - ~chatnpc(neutral, "I'm fine alone."); + ~chatnpc("I'm fine alone."); mes("Hudon is refusing to leave the waterfall"); return; } diff --git a/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 b/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 index 396790df6..de26c0168 100644 --- a/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 +++ b/data/src/scripts/quests/quest_zanaris/scripts/quest_zanaris.rs2 @@ -18,7 +18,7 @@ if ($axe = null) { } def_coord $shamus_spawnpoint = 0_49_50_3_11; if (npc_find($shamus_spawnpoint, shamus, 15, 0) = true) { - ~chatnpc_specific("Shamus", shamus, angry, "Hey! Yer big elephant! Don't go choppin' down me house, now!"); + ~chatnpc_specific("Shamus", shamus, "Hey! Yer big elephant! Don't go choppin' down me house, now!"); return; } npc_add($shamus_spawnpoint, shamus, 100); diff --git a/data/src/scripts/quests/quest_zanaris/scripts/shamus.rs2 b/data/src/scripts/quests/quest_zanaris/scripts/shamus.rs2 index f2d457307..f40df239c 100644 --- a/data/src/scripts/quests/quest_zanaris/scripts/shamus.rs2 +++ b/data/src/scripts/quests/quest_zanaris/scripts/shamus.rs2 @@ -1,48 +1,48 @@ [opnpc1,shamus] -~chatnpc(angry, "Ay yer big elephant! Yer've caught me, to be sure! What would an elephant like yer be wanting wid ol' Shamus then?"); +~chatnpc("Ay yer big elephant! Yer've caught me, to be sure! What would an elephant like yer be wanting wid ol' Shamus then?"); switch_int(%zanaris_progress) { case ^zanaris_not_started: - ~chatplayer(confused, "I'm not sure."); - ~chatnpc(neutral, "Well you'll have to be catchin' me again when yer are, elephant!"); + ~chatplayer("I'm not sure."); + ~chatnpc("Well you'll have to be catchin' me again when yer are, elephant!"); @remove_shamus; return; case ^zanaris_started: - ~chatplayer(neutral, "I want to find Zanaris."); - ~chatnpc(neutral, "Zanaris is it now? Well well well... Yer'll be needing to be going to that funny little shed out there in the swamp, so you will."); - ~chatplayer(confused, "...but... I thought... Zanaris was a city...?"); - ~chatnpc(neutral, "Aye that it is!"); + ~chatplayer("I want to find Zanaris."); + ~chatnpc("Zanaris is it now? Well well well... Yer'll be needing to be going to that funny little shed out there in the swamp, so you will."); + ~chatplayer("...but... I thought... Zanaris was a city...?"); + ~chatnpc("Aye that it is!"); def_int $option = ~p_choice2("How does it fit in a shed then?", 1, "I've been in that shed, I didn't see a city.", 2); if($option = 1) { - ~chatplayer(confused, "..How does it fit in a shed then?"); - ~chatnpc(angry, "Ah yer stupid elephant! The city isn't IN the shed! The doorway to the shed is being a portal to Zanaris, so it is."); - ~chatplayer(confused, "So I just walk into the shed and end up in Zanaris then?"); + ~chatplayer("..How does it fit in a shed then?"); + ~chatnpc("Ah yer stupid elephant! The city isn't IN the shed! The doorway to the shed is being a portal to Zanaris, so it is."); + ~chatplayer("So I just walk into the shed and end up in Zanaris then?"); @shamus_dramenwood_staff; } else if($option = 2) { - ~chatplayer(angry, "I've been in that shed. I didn't see a city."); + ~chatplayer("I've been in that shed. I didn't see a city."); @shamus_dramenwood_staff; } return; case default: def_int $option = ~p_choice2("I'm not sure.", 1, "How do I get to Zanaris again?", 2); if($option = 1) { - ~chatplayer(confused, "I'm not sure."); - ~chatnpc(angry, "Ha! Look at yer! Look at the stupid elephant who tries to go catching a leprechaun when he don't even be knowing what he wants!"); + ~chatplayer("I'm not sure."); + ~chatnpc("Ha! Look at yer! Look at the stupid elephant who tries to go catching a leprechaun when he don't even be knowing what he wants!"); @remove_shamus; } else if($option = 2) { - ~chatplayer(quiz, "How do I get to Zanaris again?"); - ~chatnpc(angry, "Yer stupid elephant! I'll tell yer again! Yer need to be entering the shed in the middle of the swamp while holding a dramenwood staff! Yer can make the Dramen staff"); - ~chatnpc(angry, "from a dramen tree branch, and there's a Dramen tree on Entrana! Now leave me alone yer great elephant!"); + ~chatplayer("How do I get to Zanaris again?"); + ~chatnpc("Yer stupid elephant! I'll tell yer again! Yer need to be entering the shed in the middle of the swamp while holding a dramenwood staff! Yer can make the Dramen staff"); + ~chatnpc("from a dramen tree branch, and there's a Dramen tree on Entrana! Now leave me alone yer great elephant!"); @remove_shamus; } return; } [label,shamus_dramenwood_staff] -~chatnpc(neutral, "Oh, was I fergetting to say?|Yer need to be carrying a Dramenwood|staff to be getting there! Otherwise|Yer'll just be ending up in the shed."); -~chatplayer(quiz, "So where would I get a staff?"); -~chatnpc(neutral, "Dramenwood staffs are crafted from branches of the Dramen tree, so they are. I hear there's a Dramen tree over on the island of Entrana in a cave"); -~chatnpc(neutral, "or some such. There would probably be a good place for an elephant like yer to be starting looking I reckon."); -~chatnpc(neutral, "The monks are running a ship from Port Sarim to Entrana, I hear too. Now leave me alone yer elephant!"); +~chatnpc("Oh, was I fergetting to say?|Yer need to be carrying a Dramenwood|staff to be getting there! Otherwise|Yer'll just be ending up in the shed."); +~chatplayer("So where would I get a staff?"); +~chatnpc("Dramenwood staffs are crafted from branches of the Dramen tree, so they are. I hear there's a Dramen tree over on the island of Entrana in a cave"); +~chatnpc("or some such. There would probably be a good place for an elephant like yer to be starting looking I reckon."); +~chatnpc("The monks are running a ship from Port Sarim to Entrana, I hear too. Now leave me alone yer elephant!"); %zanaris_progress = ^zanaris_spoken_shamus; @remove_shamus; diff --git a/data/src/scripts/shop/scripts/generalshop.rs2 b/data/src/scripts/shop/scripts/generalshop.rs2 index b98502774..0e7b617fb 100644 --- a/data/src/scripts/shop/scripts/generalshop.rs2 +++ b/data/src/scripts/shop/scripts/generalshop.rs2 @@ -1,32 +1,44 @@ -[opnpc1,shop_keeper_lumbridge] @generalshop_help(happy); -[opnpc1,shop_assistant_lumbridge] @generalshop_help(happy); -[opnpc1,shop_keeper_varrock_generalshop] @generalshop_help(happy); -[opnpc1,shop_assistant_varrock_generalshop] @generalshop_help(happy); -[opnpc1,shop_keeper_falador] @generalshop_help(happy); -[opnpc1,shop_assistant_falador] @generalshop_help(happy); -[opnpc1,shop_keeper_edgeville] @generalshop_help(happy); -[opnpc1,shop_assistant_edgeville] @generalshop_help(happy); -[opnpc1,shop_keeper_alkharid] @generalshop_help(happy); -[opnpc1,shop_assistant_alkharid] @generalshop_help(happy); -[opnpc1,shop_keeper_rimmington] @generalshop_help(happy); -[opnpc1,shop_assistant_rimmington] @generalshop_help(happy); -[opnpc1,shop_keeper_karamja] @generalshop_help(happy); -[opnpc1,shop_assistant_karamja] @generalshop_help(happy); -[opnpc1,shop_keeper_khazard] @generalshop_help(neutral); -[opnpc1,dwarf_generalshop] @generalshop_help(neutral); -[opnpc1,fairy_shop_keeper] @generalshop_help(happy); -[opnpc1,fairy_shop_assistant] @generalshop_help(happy); +[opnpc1,shop_keeper_lumbridge] @generalshop_help; +[opnpc1,shop_assistant_lumbridge] @generalshop_help; +[opnpc1,shop_keeper_varrock_generalshop] @generalshop_help; +[opnpc1,shop_assistant_varrock_generalshop] @generalshop_help; +[opnpc1,shop_keeper_falador] @generalshop_help; +[opnpc1,shop_assistant_falador] @generalshop_help; +[opnpc1,shop_keeper_edgeville] @generalshop_help; +[opnpc1,shop_assistant_edgeville] @generalshop_help; +[opnpc1,shop_keeper_alkharid] @generalshop_help; +[opnpc1,shop_assistant_alkharid] @generalshop_help; +[opnpc1,shop_keeper_rimmington] @generalshop_help; +[opnpc1,shop_assistant_rimmington] @generalshop_help; +[opnpc1,shop_keeper_karamja] @generalshop_help; +[opnpc1,shop_assistant_karamja] @generalshop_help; +[opnpc1,shop_keeper_khazard] @generalshop_help_neutral; +[opnpc1,dwarf_generalshop] @generalshop_help_neutral; +[opnpc1,fairy_shop_keeper] @generalshop_help; +[opnpc1,fairy_shop_assistant] @generalshop_help; // In osrs, most generic general shops (shopkeeper w/assistant) use this dialogue, directly opening the shop on the first dialogue option. // This is probably an OSRS change as the khazard shop uses the same dialogue as classic (although the khazard shop has different mesanims) // meaning most generalshops probably call the same label whereas khazard calls a seperate one -[label,generalshop_help](mesanim $shop_chathead) -~chatnpc($shop_chathead, "Can I help you at all?"); +[label,generalshop_help] +~chatnpc(""); +~chatnpc("Can I help you at all?"); def_int $option = ~p_choice2("Yes please. What are you selling?", 1, "No thanks.", 2); if($option = 1) { - ~chatplayer(quiz, "Yes please. What are you selling?"); - ~chatnpc($shop_chathead, "Take a look."); + ~chatplayer("Yes please. What are you selling?"); + ~chatnpc("Take a look."); ~openshop_activenpc; } else if($option = 2) { - ~chatplayer(neutral, "No thanks."); -} \ No newline at end of file + ~chatplayer("No thanks."); +} + +[label,generalshop_help_neutral] +~chatnpc("Can I help you at all?"); +def_int $option = ~p_choice2("Yes please. What are you selling?", 1, "No thanks.", 2); +if($option = 1) { + ~chatplayer("Yes please. What are you selling?"); + ~chatnpc("Take a look."); + ~openshop_activenpc; +} else if($option = 2) { + ~chatplayer("No thanks."); +} diff --git a/data/src/scripts/skill_cooking/scripts/cooking_guild.rs2 b/data/src/scripts/skill_cooking/scripts/cooking_guild.rs2 index dcf42740a..41d9152b1 100644 --- a/data/src/scripts/skill_cooking/scripts/cooking_guild.rs2 +++ b/data/src/scripts/skill_cooking/scripts/cooking_guild.rs2 @@ -3,20 +3,20 @@ def_boolean $is_inside = ~check_axis(coord, loc_coord, loc_angle); if ($is_inside = false) { if (stat(cooking) < 32) { mes("You need a cooking level of 32 to enter the Chef's Guild."); - def_string $fail_message = "Sorry. Only the finest chefs are allowed in here. Get your cooking level up to 32"; + def_string $fail_message = "Sorry. Only the finest chefs are allowed in here. Get your cooking level up to 32"; if (inv_total(worn, chefshat) < 1) { $fail_message = append($fail_message, " and come back wearing a chef's hat"); } $fail_message = append($fail_message, "."); - ~chatnpc_specific("Head chef", npc_847, neutral, $fail_message); + ~chatnpc_specific("Head chef", npc_847, $fail_message); return; } if (inv_total(worn, chefshat) < 1) { - ~chatnpc_specific("Head chef", npc_847, default, "You can't come in here unless you're wearing a chef's hat, or something like that."); + ~chatnpc_specific("Head chef", npc_847, "You can't come in here unless you're wearing a chef's hat, or something like that."); return; } } ~open_and_close_door(loc_param(next_loc_stage), $is_inside, false); [opnpc1,npc_847] -~chatnpc(happy, "Hello, welcome to the Cooking Guild. Only accomplished chefs and cooks are allowed in here. Feel free to use any of our facilities."); \ No newline at end of file +~chatnpc("Hello, welcome to the Cooking Guild. Only accomplished chefs and cooks are allowed in here. Feel free to use any of our facilities."); \ No newline at end of file diff --git a/data/src/scripts/skill_crafting/scripts/crafting_guild/crafting_guild.rs2 b/data/src/scripts/skill_crafting/scripts/crafting_guild/crafting_guild.rs2 index 0418f7288..0ddf35314 100644 --- a/data/src/scripts/skill_crafting/scripts/crafting_guild/crafting_guild.rs2 +++ b/data/src/scripts/skill_crafting/scripts/crafting_guild/crafting_guild.rs2 @@ -1,27 +1,27 @@ [oploc1,crafting_guild_door] if (~check_axis(coord, loc_coord, loc_angle) = true) { if (stat(crafting) < 40) { - ~chatnpc_specific(nc_name(master_crafter), master_crafter, neutral, "Sorry only experienced craftsmen are allowed in here.|You must be level 40 or above to enter."); + ~chatnpc_specific(nc_name(master_crafter), master_crafter, "Sorry only experienced craftsmen are allowed in here.|You must be level 40 or above to enter."); return; } if (inv_total(worn, brown_apron) < 1) { - ~chatnpc_specific(nc_name(master_crafter), master_crafter, neutral, "Where's your brown apron? You can't come in here unless you're wearing one."); + ~chatnpc_specific(nc_name(master_crafter), master_crafter, "Where's your brown apron? You can't come in here unless you're wearing one."); if (inv_total(inv, brown_apron) < 1) { - ~chatplayer(default, "Err... I haven't got one."); + ~chatplayer("Err... I haven't got one."); } return; } ~open_and_close_door(loc_param(next_loc_stage), true, false); - ~chatnpc_specific(nc_name(master_crafter), master_crafter, neutral, "Welcome to the Guild of Master Craftsmen."); + ~chatnpc_specific(nc_name(master_crafter), master_crafter, "Welcome to the Guild of Master Craftsmen."); } else { ~open_and_close_door(loc_param(next_loc_stage), false, false); } [opnpc1,master_crafter] -~chatnpc(confused, "Yeah?"); // animationId = 575 -~chatplayer(happy, "Hello."); // animationId = 567 -~chatnpc(confused, "Whassup?"); // animationId = 575 -~chatplayer(quiz, "So... are you here to give crafting tips?"); // animationId = 554 -~chatnpc(confused, "Dude, do I look like I wanna talk to you?"); // animationId = 575 -~chatplayer(neutral, "I suppose not."); // animationId = 588 -~chatnpc(happy, "Right on!"); // animationId = 567 \ No newline at end of file +~chatnpc("Yeah?"); // animationId = 575 +~chatplayer("Hello."); // animationId = 567 +~chatnpc("Whassup?"); // animationId = 575 +~chatplayer("So... are you here to give crafting tips?"); // animationId = 554 +~chatnpc("Dude, do I look like I wanna talk to you?"); // animationId = 575 +~chatplayer("I suppose not."); // animationId = 588 +~chatnpc("Right on!"); // animationId = 567 \ No newline at end of file diff --git a/data/src/scripts/skill_crafting/scripts/leather/leather.rs2 b/data/src/scripts/skill_crafting/scripts/leather/leather.rs2 index 549c77286..c865a18ba 100644 --- a/data/src/scripts/skill_crafting/scripts/leather/leather.rs2 +++ b/data/src/scripts/skill_crafting/scripts/leather/leather.rs2 @@ -10,7 +10,7 @@ [opheldu,needle] switch_obj (last_useitem) { - case thread : ~chatplayer(happy,"Perhaps I should use a needle with a piece of leather instead."); + case thread : ~chatplayer("Perhaps I should use a needle with a piece of leather instead."); case leather : @craft_leather_interface; case hardleather : @craft_leather(hardleather_body); case dragon_leather, dragon_leather_blue, dragon_leather_red, dragon_leather_black : @craft_dhide_interface(last_useslot); @@ -45,7 +45,7 @@ if (last_useitem = needle) @craft_dhide_interface(last_slot); [opheldu,thread] if (last_useitem = needle) { - ~chatplayer(happy,"Perhaps I should use a needle with a piece of leather instead."); + ~chatplayer("Perhaps I should use a needle with a piece of leather instead."); return; } ~displaymessage(^dm_default); diff --git a/data/src/scripts/skill_fishing/scripts/fishing_guild.rs2 b/data/src/scripts/skill_fishing/scripts/fishing_guild.rs2 index 070fe4502..6ea83e7b3 100644 --- a/data/src/scripts/skill_fishing/scripts/fishing_guild.rs2 +++ b/data/src/scripts/skill_fishing/scripts/fishing_guild.rs2 @@ -13,38 +13,38 @@ if ($is_inside = false) { npc_findallzone(0_40_53_51_1); while (npc_findnext = true) { if (npc_type = npc_308) { - ~chatnpc(happy, "Hello, only the top fishers are allowed in here, you need a fishing level of 68 to enter."); + ~chatnpc("Hello, only the top fishers are allowed in here, you need a fishing level of 68 to enter."); return; } } npc_findallzone(0_40_52_51_63); while (npc_findnext = true) { if (npc_type = npc_308) { - ~chatnpc(happy, "Hello, only the top fishers are allowed in here, you need a fishing level of 68 to enter."); + ~chatnpc("Hello, only the top fishers are allowed in here, you need a fishing level of 68 to enter."); return; } } [opnpc1,npc_308] if (stat(fishing) < 68) { - ~chatnpc(happy, "Hello, I'm afraid only the top fishers are allowed to use our premier fishing facilities."); + ~chatnpc("Hello, I'm afraid only the top fishers are allowed to use our premier fishing facilities."); } else { - ~chatnpc(happy, "Hello, welcome to the fishing guild. Please feel free to make use of any of our facilities."); + ~chatnpc("Hello, welcome to the fishing guild. Please feel free to make use of any of our facilities."); } // TODO - facial animations. // TODO - linebreaks. [opnpc1,npc_592] -~chatnpc(neutral, "Would you like to buy some fishing equipment, or sell some fish?"); +~chatnpc("Would you like to buy some fishing equipment, or sell some fish?"); def_int $option = ~p_choice2("Yes please.", 0, "No thank you.", 1); switch_int ($option) { case 0: { - ~chatplayer(neutral, "Yes please."); + ~chatplayer("Yes please."); ~openshop_activenpc; } - case 1: ~chatplayer(neutral, "No thank you."); + case 1: ~chatplayer("No thank you."); } \ No newline at end of file diff --git a/data/src/scripts/skill_magic/scripts/spells/telegrab.rs2 b/data/src/scripts/skill_magic/scripts/spells/telegrab.rs2 index e19e4ac61..daf9b577f 100644 --- a/data/src/scripts/skill_magic/scripts/spells/telegrab.rs2 +++ b/data/src/scripts/skill_magic/scripts/spells/telegrab.rs2 @@ -14,7 +14,7 @@ if (afk_event = ^true) { } // display tea if (obj_type = obj_712) { - ~chatnpc_specific(nc_name(tea_seller), tea_seller, angry, "Hey! Put that back! Those are for display only!"); + ~chatnpc_specific(nc_name(tea_seller), tea_seller, "Hey! Put that back! Those are for display only!"); return; } // These use a different mes compared to obj's with the telegrab_disabled param (maybe make a 2nd param) diff --git a/data/src/scripts/skill_mining/scripts/dwarf_mining_guild.rs2 b/data/src/scripts/skill_mining/scripts/dwarf_mining_guild.rs2 index 668a06207..d87d63991 100644 --- a/data/src/scripts/skill_mining/scripts/dwarf_mining_guild.rs2 +++ b/data/src/scripts/skill_mining/scripts/dwarf_mining_guild.rs2 @@ -1,22 +1,22 @@ [opnpc1,npc_382] -~chatnpc(quiz, "Welcome to the Mining Guild. Can I help you with anything?"); +~chatnpc("Welcome to the Mining Guild. Can I help you with anything?"); @dwarf_at_entrance; [label,dwarf_at_entrance] switch_int(~p_choice2("What have you got in the guild?", 0, "No thanks, I'm fine.", 2)) { case 0: - ~chatplayer(quiz, "What have you to in the guild?"); - ~chatnpc(happy, "Ooh, it's WONDERFUL! There are lots of coal rocks, and even a few mithril rocks in the guild, all exclusively for people with atleast level 60 mining."); - ~chatnpc(happy, "There's no better mining site anywhere near here."); + ~chatplayer("What have you to in the guild?"); + ~chatnpc("Ooh, it's WONDERFUL! There are lots of coal rocks, and even a few mithril rocks in the guild, all exclusively for people with atleast level 60 mining."); + ~chatnpc("There's no better mining site anywhere near here."); if (stat(mining) > 60) { - ~chatplayer(happy, "It's a good thing I have level Mining."); - ~chatnpc(happy, "Yes, that's amazing! Did you want anything else?"); + ~chatplayer("It's a good thing I have level Mining."); + ~chatnpc("Yes, that's amazing! Did you want anything else?"); } else { - ~chatplayer(default, "So you won't let me go in there?"); - ~chatnpc(default, "Sorry, but rules are rules.|Go do some more training first.|Can I help you with anything else?"); + ~chatplayer("So you won't let me go in there?"); + ~chatnpc("Sorry, but rules are rules.|Go do some more training first.|Can I help you with anything else?"); } @dwarf_at_entrance; case 2: - ~chatplayer(quiz, "No thanks, I'm fine."); + ~chatplayer("No thanks, I'm fine."); } \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 b/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 index 2089b1deb..cae193936 100644 --- a/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/brother_brace.rs2 @@ -11,42 +11,42 @@ switch_int(%tutorial_progress) { } [label,brother_brace_intro] -~chatplayer(neutral, "Good day brother, my name's ."); -~chatnpc(neutral, "Hello, .|I'm Brother Brace. I'm here to |tell you all about prayer."); +~chatplayer("Good day brother, my name's ."); +~chatnpc("Hello, .|I'm Brother Brace. I'm here to |tell you all about prayer."); if (%tutorial_progress = ^tutorial_exit_financial_advisors_room) { %tutorial_progress = ^brother_brace_open_prayer_tab; ~set_tutorial_progress; } [label,brother_brace_open_indicated_menu_prayer] -~chatnpc(neutral, "You should open the indicated menu to continue."); +~chatnpc("You should open the indicated menu to continue."); [label,brother_brace_this_is_your_prayer_list] -~chatnpc(neutral, "This is your prayer list. Prayers can help a lot in combat. Click on the prayer you wish to use to activate it, and click it again to deactivate it."); -~chatnpc(neutral, "Active prayers will drain your prayer power which you can recharge by finding an altar or other holy spot, and praying there."); -~chatnpc(neutral, "As you noticed, most enemies when defeated will drop bones as they die. Burying bones, by clicking them in your inventory, will gain you experience in prayer."); -~chatnpc(neutral, "I'm also the community officer round here too. So it's my job to tell you about your friends and ignore list."); +~chatnpc("This is your prayer list. Prayers can help a lot in combat. Click on the prayer you wish to use to activate it, and click it again to deactivate it."); +~chatnpc("Active prayers will drain your prayer power which you can recharge by finding an altar or other holy spot, and praying there."); +~chatnpc("As you noticed, most enemies when defeated will drop bones as they die. Burying bones, by clicking them in your inventory, will gain you experience in prayer."); +~chatnpc("I'm also the community officer round here too. So it's my job to tell you about your friends and ignore list."); if (%tutorial_progress = ^brother_brace_opened_prayer_tab) { %tutorial_progress = ^brother_brace_after_prayer_tab; ~set_tutorial_progress; } [label,brother_brace_friends_and_ignore_tabs] -~chatnpc(neutral, "Good. Now you have both menus open I'll tell you a little about each. You can add people to either list by clicking the add button then typing in their name into the box that appears."); -~chatnpc(neutral, "You remove people from the lists in the same way. If you add someone to your ignore list they will not be able to talk to you, or send any form of message to you."); -~chatnpc(neutral, "Your friends list shows the online status of your friends. Friends in red are offline, green online and on the same server, and yellow online but on a different server."); -~chatplayer(quiz, "Are there rules on ingame behavior?"); -~chatnpc(neutral, "Yes you should read the rules of conduct on our frontpage to make sure you do nothing to get yourself banned."); -~chatnpc(neutral, "But as a general guide always try to be courteous to people in game, remember the people in the game are real people somewhere with real feelings."); -~chatnpc(neutral, "If you go round being abusive or causing trouble your character could quickly be the one in trouble."); -~chatplayer(neutral, "OK... Thanks I'll bear that in mind."); +~chatnpc("Good. Now you have both menus open I'll tell you a little about each. You can add people to either list by clicking the add button then typing in their name into the box that appears."); +~chatnpc("You remove people from the lists in the same way. If you add someone to your ignore list they will not be able to talk to you, or send any form of message to you."); +~chatnpc("Your friends list shows the online status of your friends. Friends in red are offline, green online and on the same server, and yellow online but on a different server."); +~chatplayer("Are there rules on ingame behavior?"); +~chatnpc("Yes you should read the rules of conduct on our frontpage to make sure you do nothing to get yourself banned."); +~chatnpc("But as a general guide always try to be courteous to people in game, remember the people in the game are real people somewhere with real feelings."); +~chatnpc("If you go round being abusive or causing trouble your character could quickly be the one in trouble."); +~chatplayer("OK... Thanks I'll bear that in mind."); if (%tutorial_progress = ^brother_brace_after_friends_tab) { %tutorial_progress = ^brother_brace_finish; ~set_tutorial_progress; } [label,brother_brace_recap] -~chatnpc(neutral, "Peace be with you, my child."); +~chatnpc("Peace be with you, my child."); @brother_brace_recap_questions; [label,brother_brace_recap_questions] @@ -58,20 +58,20 @@ if (%tutorial_progress = ^brother_brace_after_friends_tab) { ); [label,brother_brace_prayer_recap] -~chatnpc(neutral, "Ah, yes, your Prayer list. Prayers can help a lot in combat. Click on the prayer you wish to use to activate it, and click it again to deactivate it."); -~chatnpc(neutral, "Active prayers will drain your prayer power which you can recharge by finding an altar or other holy spot, and praying there."); -~chatnpc(neutral, "As you noticed, most enemies when defeated will drop bones as they die. Burying bones, by clicking them in your inventory, will gain you experience in prayer."); +~chatnpc("Ah, yes, your Prayer list. Prayers can help a lot in combat. Click on the prayer you wish to use to activate it, and click it again to deactivate it."); +~chatnpc("Active prayers will drain your prayer power which you can recharge by finding an altar or other holy spot, and praying there."); +~chatnpc("As you noticed, most enemies when defeated will drop bones as they die. Burying bones, by clicking them in your inventory, will gain you experience in prayer."); @brother_brace_recap_questions; [label,brother_brace_friends_recap] -~chatnpc(neutral, "Your friends and ignore lists, yes... I'll tell you a little about each. You can add people to either list by clicking the add button then typing in their name into the box that appears."); -~chatnpc(neutral, "You remove people from the lists in the same way. If you add someone to your ignore list they will not be able to talk to you, or send any form of message to you."); -~chatnpc(neutral, "Your friends list shows the online status of your friends. Friends in red are offline, green online and on the same server, and yellow online but on a different server."); +~chatnpc("Your friends and ignore lists, yes... I'll tell you a little about each. You can add people to either list by clicking the add button then typing in their name into the box that appears."); +~chatnpc("You remove people from the lists in the same way. If you add someone to your ignore list they will not be able to talk to you, or send any form of message to you."); +~chatnpc("Your friends list shows the online status of your friends. Friends in red are offline, green online and on the same server, and yellow online but on a different server."); @brother_brace_recap_questions; [label,brother_brace_no_thanks] -~chatplayer(neutral, "Nope, I'm ready to move on!"); -~chatnpc(neutral, "Ok then, ."); +~chatplayer("Nope, I'm ready to move on!"); +~chatnpc("Ok then, ."); [proc,set_hint_icon_brother_brace] if (npc_find(0_48_48_53_34, brother_brace, 10, 0) = true) { diff --git a/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 b/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 index c5413c14e..1d2ccdeb6 100644 --- a/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/combat_instructor.rs2 @@ -15,21 +15,21 @@ switch_int(%tutorial_progress) { } [label,combat_instructor_start] -~chatplayer(happy, "Hi! My name's ."); -~chatnpc(angry, "Do I look like I care? To me you're just another newcomer who thinks they're ready to fight."); -~chatnpc(neutral, "I am Vannaka, the greatest swordsman alive."); -~chatnpc(neutral, "Let's get started by teaching you to wield a weapon."); +~chatplayer("Hi! My name's ."); +~chatnpc("Do I look like I care? To me you're just another newcomer who thinks they're ready to fight."); +~chatnpc("I am Vannaka, the greatest swordsman alive."); +~chatnpc("Let's get started by teaching you to wield a weapon."); if (%tutorial_progress = ^combat_instructor_start) { %tutorial_progress = ^combat_instructor_wielding_weapons; ~set_tutorial_progress; } [label,combat_instructor_lets_teach_you_wield] -~chatnpc(neutral, "Let's get started by teaching you to wield a weapon."); +~chatnpc("Let's get started by teaching you to wield a weapon."); ~combat_instructor_replace_items; [label,combat_instructor_dagger_equipped] -~chatnpc(neutral, "Very good, but that little butter knife isn't going to protect you much. Here, take these."); +~chatnpc("Very good, but that little butter knife isn't going to protect you much. Here, take these."); if (%tutorial_progress = ^combat_instructor_dagger_equipped) { %tutorial_progress = ^combat_instructor_unequipping_items; ~set_tutorial_progress; @@ -37,27 +37,27 @@ if (%tutorial_progress = ^combat_instructor_dagger_equipped) { ~combat_instructor_replace_items; [label,combat_instructor_equipping_sword_and_shield] -~chatnpc(neutral, "Let's get you equipped."); +~chatnpc("Let's get you equipped."); ~combat_instructor_replace_items; [label,combat_instructor_check_combat_interface] -~chatnpc(neutral, "You should check out the combat interface."); +~chatnpc("You should check out the combat interface."); [label,combat_instructor_get_away_from_there] // Turn to face Vannaka -~chatnpc(neutral, "Oi! Get away from there.|Only enter the rat cage when I say so."); +~chatnpc("Oi! Get away from there.|Only enter the rat cage when I say so."); [label,combat_instructor_youre_not_ready_to_continue] -~chatnpc(neutral, "You're not ready to continue yet.|You need to know about combat before you go on."); +~chatnpc("You're not ready to continue yet.|You need to know about combat before you go on."); [label,combat_instructor_time_for_combat] -~chatnpc(neutral, "Time for some actual combat!|Head into the pen and kill one of those rats."); +~chatnpc("Time for some actual combat!|Head into the pen and kill one of those rats."); ~combat_instructor_replace_items; [label,combat_instructor_killed_giant_rat_melee] -~chatplayer(neutral, "I did it! I killed a Giant Rat!"); -~chatnpc(neutral, "I saw . You seem better at this than I at |first took you for. Well, you seem to have the hang of |basic swordplay. Let's move on."); -~chatnpc(neutral, "Let's try some ranged attacking, with this you can kill foes from a distance. Also foes unable to reach you are as good as dead. You'll be able to attack the rats without entering the pit."); +~chatplayer("I did it! I killed a Giant Rat!"); +~chatnpc("I saw . You seem better at this than I at |first took you for. Well, you seem to have the hang of |basic swordplay. Let's move on."); +~chatnpc("Let's try some ranged attacking, with this you can kill foes from a distance. Also foes unable to reach you are as good as dead. You'll be able to attack the rats without entering the pit."); if (%tutorial_progress = ^combat_instructor_after_rat_kill_melee) { %tutorial_progress = ^combat_instructor_before_attacking_ranged; ~set_tutorial_progress; @@ -65,15 +65,15 @@ if (%tutorial_progress = ^combat_instructor_after_rat_kill_melee) { ~combat_instructor_replace_items; [label,combat_instructor_during_giant_rat_ranged] -~chatnpc(neutral, "Use your bow and arrows to kill one of those rats from outside the pen."); +~chatnpc("Use your bow and arrows to kill one of those rats from outside the pen."); ~combat_instructor_replace_items; [label,combat_instructor_dont_enter_the_pit_ranged] -~chatnpc(neutral, "No, don't enter the pit.|Range the rats from outside the cage."); +~chatnpc("No, don't enter the pit.|Range the rats from outside the cage."); [label,combat_instructor_recap] ~combat_instructor_replace_items; -~chatnpc(neutral, "What now?"); +~chatnpc("What now?"); @combat_instructor_recap_questions; [label,combat_instructor_recap_questions] @@ -86,41 +86,41 @@ if (%tutorial_progress = ^combat_instructor_after_rat_kill_melee) { ); [label,combat_instructor_combat_stats_recap] -~chatplayer(quiz, "Tell me about combat stats again."); -~chatnpc(neutral, "Certainly. You have three main combat stats: Strength, Defence and Attack."); -~chatnpc(neutral, "Strength determines the maximum hit you will be able to deal with your blows, Defence determines the amount of damage you will be able to defend and Attack determines the accuracy of your blows."); -~chatnpc(neutral, "Other stats are used in combat such as Prayer, Hitpoints, Magic and Ranged. All of these stats can go towards determining your Combat level, which is shown at the bottom of your skills interface."); -~chatnpc(neutral, "You will find out on the mainland that certain items can also affect your stats. There are potions that can be drunk that can alter your stats temporarily, such as raising Strength."); -~chatnpc(neutral, "You will also raise your Defence and Attack values by using different weapons and armours."); -~chatnpc(neutral, "Before going into combat with an opponent it is wise to put the mouse over them and see what combat level they are."); -~chatnpc(neutral, "Green coloured writing usually means it will be an easy fight for you, red means you will probably lose, yellow means they are around your level and orange means they are slightly stronger."); -~chatnpc(neutral, "Sometimes things will go your way, sometimes they won't. There is no such thing as a guaranteed win, but if the odds are on your side, you stand the best chance of walking away victorious."); -~chatnpc(quiz, "Now, was there something else you wanted to hear about again."); +~chatplayer("Tell me about combat stats again."); +~chatnpc("Certainly. You have three main combat stats: Strength, Defence and Attack."); +~chatnpc("Strength determines the maximum hit you will be able to deal with your blows, Defence determines the amount of damage you will be able to defend and Attack determines the accuracy of your blows."); +~chatnpc("Other stats are used in combat such as Prayer, Hitpoints, Magic and Ranged. All of these stats can go towards determining your Combat level, which is shown at the bottom of your skills interface."); +~chatnpc("You will find out on the mainland that certain items can also affect your stats. There are potions that can be drunk that can alter your stats temporarily, such as raising Strength."); +~chatnpc("You will also raise your Defence and Attack values by using different weapons and armours."); +~chatnpc("Before going into combat with an opponent it is wise to put the mouse over them and see what combat level they are."); +~chatnpc("Green coloured writing usually means it will be an easy fight for you, red means you will probably lose, yellow means they are around your level and orange means they are slightly stronger."); +~chatnpc("Sometimes things will go your way, sometimes they won't. There is no such thing as a guaranteed win, but if the odds are on your side, you stand the best chance of walking away victorious."); +~chatnpc("Now, was there something else you wanted to hear about again."); @combat_instructor_recap_questions; [label,combat_instructor_melee_combat_recap] -~chatplayer(quiz, "Tell me about melee combat again."); -~chatnpc(neutral, "Ah, my specialty. Close combat fighting, which is also known as melee fighting, covers all combat done at close range to your opponent."); -~chatnpc(neutral, "Melee fighting depends entirely upon your three basic combat stats: Attack, Defence and Strength.");; -~chatnpc(neutral, "Also, of course, it depends on the quality of your armour and weaponry. A high-levelled fighter with good armour and weapons will be deadly up close."); -~chatnpc(neutral, "If this is the path you wish to take, remember your success depends on getting as close to your enemy as quickly as possible."); -~chatnpc(neutral, "Personally, I consider the fine art of melee combat to be the only combat method worth using."); -~chatnpc(neutral, "Now, did you want to hear anything else?"); +~chatplayer("Tell me about melee combat again."); +~chatnpc("Ah, my specialty. Close combat fighting, which is also known as melee fighting, covers all combat done at close range to your opponent."); +~chatnpc("Melee fighting depends entirely upon your three basic combat stats: Attack, Defence and Strength.");; +~chatnpc("Also, of course, it depends on the quality of your armour and weaponry. A high-levelled fighter with good armour and weapons will be deadly up close."); +~chatnpc("If this is the path you wish to take, remember your success depends on getting as close to your enemy as quickly as possible."); +~chatnpc("Personally, I consider the fine art of melee combat to be the only combat method worth using."); +~chatnpc("Now, did you want to hear anything else?"); @combat_instructor_recap_questions; [label,combat_instructor_ranged_combat_recap] -~chatplayer(quiz, "Tell me about ranged combat again."); -~chatnpc(neutral, "Thinking of being a ranger, eh? Well, okay. I don't enjoy it myself, but I can see the appeal."); -~chatnpc(neutral, "Ranging employs a lot of different weapons as a skill, not just the shortbow you have there. Spears, throwing knives, and crossbows are all used best at a distance from your enemy."); -~chatnpc(neutral, "Now, those rats were easy pickings, but on the mainland you will be very lucky if you can find a spot where you can shoot at your enemies without them being able to retaliate."); -~chatnpc(neutral, "At close range, rangers often do badly in combat. Your best tactic as a ranger is to hit and run, keeping your foe at a distance."); -~chatnpc(neutral, "Your effectiveness as a ranger is almost entirely dependent on your Ranged stat. As with all skills, the more you train it, the more powerful it will become."); -~chatnpc(quiz, "Anything else you wanted to know?"); +~chatplayer("Tell me about ranged combat again."); +~chatnpc("Thinking of being a ranger, eh? Well, okay. I don't enjoy it myself, but I can see the appeal."); +~chatnpc("Ranging employs a lot of different weapons as a skill, not just the shortbow you have there. Spears, throwing knives, and crossbows are all used best at a distance from your enemy."); +~chatnpc("Now, those rats were easy pickings, but on the mainland you will be very lucky if you can find a spot where you can shoot at your enemies without them being able to retaliate."); +~chatnpc("At close range, rangers often do badly in combat. Your best tactic as a ranger is to hit and run, keeping your foe at a distance."); +~chatnpc("Your effectiveness as a ranger is almost entirely dependent on your Ranged stat. As with all skills, the more you train it, the more powerful it will become."); +~chatnpc("Anything else you wanted to know?"); @combat_instructor_recap_questions; [label,combat_instructor_moving_on] -~chatplayer(neutral, "Nope, I'm ready to move on!"); -~chatnpc(neutral, "Ok then, ."); +~chatplayer("Nope, I'm ready to move on!"); +~chatnpc("Ok then, ."); [proc,combat_instructor_replace_items] if (%tutorial_progress > ^combat_instructor_start diff --git a/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 b/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 index f25ad5ce7..96a62a04b 100644 --- a/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/financial_advisor.rs2 @@ -6,15 +6,15 @@ if (%tutorial_progress = ^tutorial_opened_financial_advisor_door) { } [label,financial_advisor_incomplete] -~chatplayer(quiz, "Hello... Who are you?"); -~chatnpc(neutral, "I'm a financial advisor. |I'm here to tell people how to make money."); -~chatplayer(quiz, "OK... How can I make money then?"); -~chatnpc(neutral, "...how can you make money. Quite."); -~chatnpc(neutral, "Well there are three basic ways of making money here; Combat, Quests and Trading. I will talk you through each of them very quickly."); -~chatnpc(neutral, "Let's start with combat, as it is probably still fresh in your mind. Many enemies, both human and monster will drop items when they die."); -~chatnpc(neutral, "Now, the next way to earn money quickly is by quests. Many people on RuneScape have things they need doing, which they will reward you for."); -~chatnpc(neutral, "By getting a high level in skills such as cooking, mining, smithing or fishing, you can create your own items and sell them for pure profit."); -~chatnpc(neutral, "Well that's about covers it. Come back if you'd like to go over this again."); +~chatplayer("Hello... Who are you?"); +~chatnpc("I'm a financial advisor. |I'm here to tell people how to make money."); +~chatplayer("OK... How can I make money then?"); +~chatnpc("...how can you make money. Quite."); +~chatnpc("Well there are three basic ways of making money here; Combat, Quests and Trading. I will talk you through each of them very quickly."); +~chatnpc("Let's start with combat, as it is probably still fresh in your mind. Many enemies, both human and monster will drop items when they die."); +~chatnpc("Now, the next way to earn money quickly is by quests. Many people on RuneScape have things they need doing, which they will reward you for."); +~chatnpc("By getting a high level in skills such as cooking, mining, smithing or fishing, you can create your own items and sell them for pure profit."); +~chatnpc("Well that's about covers it. Come back if you'd like to go over this again."); if (%tutorial_progress = ^tutorial_opened_financial_advisor_door) { %tutorial_progress = ^financial_advisor_talked_to; ~set_tutorial_progress; @@ -29,12 +29,12 @@ if (%tutorial_progress = ^tutorial_opened_financial_advisor_door) { ); [label,financial_advisor_recap] -~chatnpc(neutral, "Okay, making money. Quite."); -~chatnpc(happy, "Well there are three basic ways of making money here; Combat, Quests and Trading. I will talk you through each of tem very quickly."); -~chatnpc(happy, "Let's start with combat, as it is probably still fresh in your mind. Many enemies, both human and monster will drop items when they die."); -~chatnpc(happy, "Now, the next way to earn money quickly is by quests. Many people on RuneScape have things they need doing, which they will reward you for."); -~chatnpc(happy, "By getting a high level in skills such as cooking, mining, smithing or fishing, you can create your own items and sell them for pure profit."); -~chatnpc(happy, "Well that's about covers it. Come back if you'd like to go over this again."); +~chatnpc("Okay, making money. Quite."); +~chatnpc("Well there are three basic ways of making money here; Combat, Quests and Trading. I will talk you through each of tem very quickly."); +~chatnpc("Let's start with combat, as it is probably still fresh in your mind. Many enemies, both human and monster will drop items when they die."); +~chatnpc("Now, the next way to earn money quickly is by quests. Many people on RuneScape have things they need doing, which they will reward you for."); +~chatnpc("By getting a high level in skills such as cooking, mining, smithing or fishing, you can create your own items and sell them for pure profit."); +~chatnpc("Well that's about covers it. Come back if you'd like to go over this again."); [label,financial_advisor_no_thanks] diff --git a/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 b/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 index 524901056..ee76cc1f8 100644 --- a/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/magic_instructor.rs2 @@ -11,22 +11,22 @@ switch_int(%tutorial_progress) { } [label,magic_instructor_start] -~chatplayer(neutral, "Hello."); -~chatnpc(neutral, "Good day newcomer.|My name is Terrova.|I'm here to tell you about magic.|Let's start by opening your spell list. "); +~chatplayer("Hello."); +~chatnpc("Good day newcomer.|My name is Terrova.|I'm here to tell you about magic.|Let's start by opening your spell list. "); if (%tutorial_progress = ^tutorial_exit_chapel) { %tutorial_progress = ^tutorial_open_magic_tab; ~set_tutorial_progress; } [label,magic_instructor_open_tab] -~chatnpc(neutral, "All you have to do is open the magic interface by clicking on the flashing icon."); +~chatnpc("All you have to do is open the magic interface by clicking on the flashing icon."); // This automagically triggers?! // https://youtu.be/Ln_NMq4eQss?t=264 // https://youtu.be/Usd2R9PH_bk?t=246 // https://youtu.be/GNRPeRShDzQ?t=660 can just keep claiming runes until you reach 25. [label,magic_instructor_opened_tab] -~chatnpc(neutral, "Good. This is a list of your spells. Currently you can only cast one offensive spell called Wind Strike. Let's try it out on one of those chickens."); +~chatnpc("Good. This is a list of your spells. Currently you can only cast one offensive spell called Wind Strike. Let's try it out on one of those chickens."); ~magic_instructor_give_runes; // This weirdly comes after giving runes... if (%tutorial_progress = ^tutorial_opened_magic_tab) { @@ -36,7 +36,7 @@ if (%tutorial_progress = ^tutorial_opened_magic_tab) { [label,magic_instructor_cast_wind_strike] if (inv_total(inv, airrune) >= 25 & inv_total(inv, mindrune) >= 25) { - ~chatnpc(neutral, "Sorry, I don't have any more runes just now. But I do see you have plenty."); + ~chatnpc("Sorry, I don't have any more runes just now. But I do see you have plenty."); return; } @@ -62,7 +62,7 @@ if (calc(25 - $total_runes) >= 5) { } [label,magic_instructor_successfully_cast_wind_strike] -~chatnpc(neutral, "Well you're all finished here now. I'll give a reasonable number of runes when you leave."); +~chatnpc("Well you're all finished here now. I'll give a reasonable number of runes when you leave."); if (%tutorial_progress = ^tutorial_successful_wind_strike) { %tutorial_progress = ^magic_instructor_finished; } diff --git a/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 b/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 index dcd2093a4..cb36d993f 100644 --- a/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/master_chef.rs2 @@ -8,16 +8,16 @@ switch_int(%tutorial_progress) { [label,master_chef_start] // https://web.archive.org/web/20051215201825im_/http://runevillage.com/images/rsTutorial13.gif older line breaks -~chatnpc(neutral, "Ah... welcome newcomer. I am Lev, the chef.| It is here I will teach you how to |cook food truly fit for a king."); -~chatplayer(neutral, "I already know how to cook.|Brynna taught me just now."); -~chatnpc(laugh, "HA HA HA HA HA HA! You call THAT cooking?|Some shrimp on an open log fire? Oh no no no... I am|going to teach you the fine art of cooking bread."); -~chatnpc(neutral, "And no fine meal is complete without good music so|we'll cover that while you're here too."); +~chatnpc("Ah... welcome newcomer. I am Lev, the chef.| It is here I will teach you how to |cook food truly fit for a king."); +~chatplayer("I already know how to cook.|Brynna taught me just now."); +~chatnpc("HA HA HA HA HA HA! You call THAT cooking?|Some shrimp on an open log fire? Oh no no no... I am|going to teach you the fine art of cooking bread."); +~chatnpc("And no fine meal is complete without good music so|we'll cover that while you're here too."); %tutorial_progress = ^chef_make_dough; ~set_tutorial_progress; ~master_chef_give_ingredients; [label,master_chef_after_start] -~chatnpc(neutral, "Time for you to learn the fine art of cooking bread."); +~chatnpc("Time for you to learn the fine art of cooking bread."); ~master_chef_give_ingredients; [proc,master_chef_give_ingredients] @@ -46,7 +46,7 @@ if (inv_total(inv, tutorial_pot_of_flour) < 1 & inv_total(inv, bucket_water) < 1 } [label,master_chef_recap] -~chatnpc(quiz, "Hello again."); +~chatnpc("Hello again."); ~master_chef_give_ingredients; ~master_chef_recap_options; @@ -60,16 +60,16 @@ if (%tutorial_progress < ^chef_opened_music_tab) { [proc,master_chef_recap_response](int $option) switch_int($option) { case 1: - ~chatplayer(neutral, "Tell me about making dough again."); - ~chatnpc(neutral, "It's quite simple: just use a pot of flour on a bucket of water, or vice versa, and you'll make dough. You can also refill your bucket at the sink."); + ~chatplayer("Tell me about making dough again."); + ~chatnpc("It's quite simple: just use a pot of flour on a bucket of water, or vice versa, and you'll make dough. You can also refill your bucket at the sink."); ~master_chef_recap_options; case 2: - ~chatplayer(neutral, "Tell me about range cooking again."); - ~chatnpc(neutral, "The range is the only place you can cook a lot of the more complex foods in Runescape. To cook on a range, right click the item you would like to cook, select 'use' then left click the range."); + ~chatplayer("Tell me about range cooking again."); + ~chatnpc("The range is the only place you can cook a lot of the more complex foods in Runescape. To cook on a range, right click the item you would like to cook, select 'use' then left click the range."); ~master_chef_recap_options; case 3: - ~chatplayer("default", "Tell me about music again."); - ~chatnpc(neutral, "Ah yes. The music was created by the great bard Ian. As you explore the world and complete quests you will unlock more of the tunes in your music player. Simply click on a tune in the music menu to listen to it."); + ~chatplayer("Tell me about music again."); + ~chatnpc("Ah yes. The music was created by the great bard Ian. As you explore the world and complete quests you will unlock more of the tunes in your music player. Simply click on a tune in the music menu to listen to it."); ~master_chef_recap_options; } diff --git a/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 b/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 index 663eea9b7..c95a3e7ea 100644 --- a/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/mining_instructor.rs2 @@ -18,9 +18,9 @@ switch_int(%tutorial_progress) { } [label,mining_instructor_start] -~chatnpc(quiz, "Hi there... You must be new around here.|So what do I call you? 'Newcomer'|seems so impersonal... and if we're going|to be working together, I'd rather call you by name."); -~chatplayer(neutral, "You can call me ."); -~chatnpc(neutral, "Ok then, . My name is Dezzick, and I'm a|miner by trade. Let's prospect some of those rocks."); +~chatnpc("Hi there... You must be new around here.|So what do I call you? 'Newcomer'|seems so impersonal... and if we're going|to be working together, I'd rather call you by name."); +~chatplayer("You can call me ."); +~chatnpc("Ok then, . My name is Dezzick, and I'm a|miner by trade. Let's prospect some of those rocks."); %tutorial_progress = ^mining_instructor_begin_prospecting; ~set_tutorial_progress; @@ -33,30 +33,30 @@ switch_int(%tutorial_progress) { ); [label,mining_instructor_during_mining] -~chatnpc(neutral, "The rocks around here contain tin and copper. You should try mining some."); +~chatnpc("The rocks around here contain tin and copper. You should try mining some."); ~mining_instructor_replace_items; [label,mining_instructor_after_prospecting] -~chatplayer(neutral, "I prospected both types of rock! One set contains tin and the other has copper ore inside."); -~chatnpc(neutral, "Absolutely right . These two ore types can be smelted together to make bronze."); -~chatnpc(neutral, "So now you know what ore is in the rocks over there, why don't you have a go at mining some tin and copper? Here, you'll need this to start with."); +~chatplayer("I prospected both types of rock! One set contains tin and the other has copper ore inside."); +~chatnpc("Absolutely right . These two ore types can be smelted together to make bronze."); +~chatnpc("So now you know what ore is in the rocks over there, why don't you have a go at mining some tin and copper? Here, you'll need this to start with."); %tutorial_progress = ^mining_instructor_mining_start; ~mining_instructor_replace_items; ~set_tutorial_progress; [label,mining_instructor_before_smelting] -~chatnpc(neutral, "Now that you have some ore, you should smelt it into a bronze bar. You can use the furnace over there to do so."); +~chatnpc("Now that you have some ore, you should smelt it into a bronze bar. You can use the furnace over there to do so."); ~mining_instructor_replace_items; [label,mining_instructor_after_smelting] -~chatplayer(quiz, "How do I make a weapon out of this?"); -~chatnpc(neutral, "Okay, I'll show you how to make a dagger out of it. You'll be needing this..."); +~chatplayer("How do I make a weapon out of this?"); +~chatnpc("Okay, I'll show you how to make a dagger out of it. You'll be needing this..."); %tutorial_progress = ^mining_instructor_smith_a_dagger; ~mining_instructor_replace_items; ~set_tutorial_progress; [label,mining_instructor_smith_a_dagger] -~chatnpc(neutral, "See if you can use the anvil here to make a bronze dagger."); +~chatnpc("See if you can use the anvil here to make a bronze dagger."); ~mining_instructor_replace_items; [label,mining_instructor_recap] @@ -71,44 +71,44 @@ switch_int(%tutorial_progress) { ); [label,mining_instructor_prospecting_recap] -~chatplayer(neutral, "Tell me about prospecting again."); -~chatnpc(neutral, "It's really very simple. Usually when you go mining you can see if there is ore in a rock or not by its color."); -~chatnpc(neutral, "If you come across a rock you've not seen before and want to know what it is, or if you can't tell if a rock contains ore just by sight,"); -~chatnpc(neutral, "then simply right click on the rock and select 'prospect' to check closely. Anything else you wanted to know?"); +~chatplayer("Tell me about prospecting again."); +~chatnpc("It's really very simple. Usually when you go mining you can see if there is ore in a rock or not by its color."); +~chatnpc("If you come across a rock you've not seen before and want to know what it is, or if you can't tell if a rock contains ore just by sight,"); +~chatnpc("then simply right click on the rock and select 'prospect' to check closely. Anything else you wanted to know?"); @mining_instructor_recap; [label,mining_instructor_mining_recap] -~chatplayer(neutral, "Tell me about mining again."); -~chatnpc(neutral, "Certainly, . To mine you need a pickaxe. Different pickaxes let you mine more efficiently."); -~chatnpc(neutral, "You have a bronze pickaxe there, which is the most inefficient pickaxe available, but is perfect for a beginner."); -~chatnpc(neutral, "To mine, simply click on a rock that contains ore while you have a pickaxe with you, and you will keep mining the rock until you manage to get some ore, or until it is empty."); -~chatnpc(neutral, "The better the pickaxe you use, the faster you will get ore from the rock you're mining."); -~chatnpc(neutral, "You will be able to buy better pickaxes from the Dwarven Mine when you reach the mainland, but they can be expensive."); -~chatnpc(neutral, "Also, the better the pickaxe the higher the Mining level required to use it will be. Was there anything else you wanted to hear?"); +~chatplayer("Tell me about mining again."); +~chatnpc("Certainly, . To mine you need a pickaxe. Different pickaxes let you mine more efficiently."); +~chatnpc("You have a bronze pickaxe there, which is the most inefficient pickaxe available, but is perfect for a beginner."); +~chatnpc("To mine, simply click on a rock that contains ore while you have a pickaxe with you, and you will keep mining the rock until you manage to get some ore, or until it is empty."); +~chatnpc("The better the pickaxe you use, the faster you will get ore from the rock you're mining."); +~chatnpc("You will be able to buy better pickaxes from the Dwarven Mine when you reach the mainland, but they can be expensive."); +~chatnpc("Also, the better the pickaxe the higher the Mining level required to use it will be. Was there anything else you wanted to hear?"); @mining_instructor_recap; [label,mining_instructor_smelting_recap] -~chatplayer(neutral, "Tell me about smelting again."); -~chatnpc(neutral, "Smelting is very easy. Simply take the ores required to make a metal to a furnace, then use the ores on the furnace to smelt them into a bar of metal."); -~chatnpc(neutral, "Furnaces are expensive to build and maintain, so there are not that many scattered around the world. I suggest when you find one you remember its location for future use."); -~chatnpc(neutral, "An alternative to using a furnace to smelt your ore is to use high-level magic to do it."); -~chatnpc(neutral, "As well as letting you smelt ore anywhere, it has a guaranteed success rate in smelting all ores."); -~chatnpc(neutral, "Some metals, such as iron, contain impurities and can be destroyed during the smelting process in a traditional furnace, but magical heat does not destroy them."); -~chatnpc(quiz, "Anything else?"); +~chatplayer("Tell me about smelting again."); +~chatnpc("Smelting is very easy. Simply take the ores required to make a metal to a furnace, then use the ores on the furnace to smelt them into a bar of metal."); +~chatnpc("Furnaces are expensive to build and maintain, so there are not that many scattered around the world. I suggest when you find one you remember its location for future use."); +~chatnpc("An alternative to using a furnace to smelt your ore is to use high-level magic to do it."); +~chatnpc("As well as letting you smelt ore anywhere, it has a guaranteed success rate in smelting all ores."); +~chatnpc("Some metals, such as iron, contain impurities and can be destroyed during the smelting process in a traditional furnace, but magical heat does not destroy them."); +~chatnpc("Anything else?"); @mining_instructor_recap; [label,mining_instructor_smithing_recap] -~chatplayer(neutral, "Tell me about Smithing again."); -~chatnpc(neutral, "Take the hammer I have given you, or buy a new one from a general store, and proceed to a nearby anvil."); +~chatplayer("Tell me about Smithing again."); +~chatnpc("Take the hammer I have given you, or buy a new one from a general store, and proceed to a nearby anvil."); // be be is an intentional typo: https://youtu.be/7zsi7hiF4SQ?t=387 -~chatnpc(neutral, "When you use a metal bar on an anvil you will be be able to choose the item you want to smith, as long as you have a high enough Smithing level and the correct number of bars."); -~chatnpc(neutral, "It's a pretty straightfoward skill as I'm sure you discovered while making me that lovely bronze dagger."); -~chatnpc(neutral, "The higher Smithing level you reach, the better quality of metal you can work with. You start off on bronze and work your way up as your Smithing skills increase."); -~chatnpc(quiz, "Anything else, ?"); +~chatnpc("When you use a metal bar on an anvil you will be be able to choose the item you want to smith, as long as you have a high enough Smithing level and the correct number of bars."); +~chatnpc("It's a pretty straightfoward skill as I'm sure you discovered while making me that lovely bronze dagger."); +~chatnpc("The higher Smithing level you reach, the better quality of metal you can work with. You start off on bronze and work your way up as your Smithing skills increase."); +~chatnpc("Anything else, ?"); [label,mining_instructor_ready_to_move_on] -~chatplayer(neutral, "Nope, I'm ready to move on!"); -~chatnpc(neutral, "Ok then, ."); +~chatplayer("Nope, I'm ready to move on!"); +~chatnpc("Ok then, ."); [proc,mining_instructor_replace_items] if (%tutorial_progress > ^mining_instructor_prospected_copper_second & ~tutorial_has_obj_on_person(bronze_pickaxe) = false) { diff --git a/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 b/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 index 264bcf176..b6f201b57 100644 --- a/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/quest_guide.rs2 @@ -7,39 +7,39 @@ switch_int(%tutorial_progress) { } [label,quest_guide_start] -~chatnpc(neutral, "Ah... welcome adventurer. I'm here to tell you all about|quests. Let's start by opening the quest side panel."); +~chatnpc("Ah... welcome adventurer. I'm here to tell you all about|quests. Let's start by opening the quest side panel."); %tutorial_progress = ^quest_guide_open_menu; ~set_tutorial_progress; [label,quest_guide_journal_info] -~chatnpc(neutral, "Now you have the journal open I'll tell you a bit about|it. As you see at the moment all the quests are shown|in red, a quest shown in red is unstarted."); +~chatnpc("Now you have the journal open I'll tell you a bit about|it. As you see at the moment all the quests are shown|in red, a quest shown in red is unstarted."); ~quest_guide_journal_info_no_intro; %tutorial_progress = ^quest_guide_finished; ~set_tutorial_progress; [proc,quest_guide_journal_info_no_intro] -~chatnpc(neutral, "When you start a quest it will change colour to yellow,|and green when you've finished. This is so you can|easily see what's complete, what's started, and what's left|to begin."); -~chatnpc(neutral, "The start of quests are easy to find. Look out for the|star icons on the minimap, like the one you should see|marking my house."); -~chatnpc(neutral, "The quests themselves can vary greatly from collecting|beads to hunting down dragons. Generally quests are|started by talking to a non player character and will|involve a series of tasks."); -~chatnpc(neutral, "There's not a lot more I can tell you about questing.|You have to experience the thrill of it yourself to fully|understand. You may find some adventure in the caves|under my house."); +~chatnpc("When you start a quest it will change colour to yellow,|and green when you've finished. This is so you can|easily see what's complete, what's started, and what's left|to begin."); +~chatnpc("The start of quests are easy to find. Look out for the|star icons on the minimap, like the one you should see|marking my house."); +~chatnpc("The quests themselves can vary greatly from collecting|beads to hunting down dragons. Generally quests are|started by talking to a non player character and will|involve a series of tasks."); +~chatnpc("There's not a lot more I can tell you about questing.|You have to experience the thrill of it yourself to fully|understand. You may find some adventure in the caves|under my house."); [label,quest_guide_menu_not_opened] -~chatnpc(quiz, "Have you not opened that menu yet?"); +~chatnpc("Have you not opened that menu yet?"); [label,quest_guide_recap] -~chatnpc(quiz, "Would you like to hear more about quests again?"); +~chatnpc("Would you like to hear more about quests again?"); def_int $choice = ~p_choice2("Yes!", 1, "Nope, I'm ready to move on!", 2); if ($choice = 1) { - ~chatplayer("default", "Yes!"); + ~chatplayer("Yes!"); ~quest_guide_journal_info_no_intro; } else { - ~chatplayer("default", "Nope, I'm ready to move on!"); - ~chatnpc("default", "Okay then."); + ~chatplayer("Nope, I'm ready to move on!"); + ~chatnpc("Okay then."); } [label,quest_guide_not_ready_to_leave_yet] -~chatnpc(quiz, "I don't think you're ready to go down there yet."); +~chatnpc("I don't think you're ready to go down there yet."); [proc,set_hint_icon_quest_guide] if (npc_find(0_48_48_12_52, quest_guide, 10, 0) = true) { diff --git a/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 b/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 index 24bf42ad8..0e8e81790 100644 --- a/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/runescape_guide.rs2 @@ -9,7 +9,7 @@ switch_int(%tutorial_progress) { [label,runescape_guide_welcome] if (map_localdev = true) { - ~chatnpc("default", "Do you want to skip the tutorial?"); + ~chatnpc("Do you want to skip the tutorial?"); def_int $choice = ~p_choice2("Yes please.", 1, "No, thank you.", 2); if ($choice = 1) { %tutorial_progress = ^tutorial_complete; @@ -17,27 +17,27 @@ if (map_localdev = true) { } } -~chatnpc(neutral, "Greetings! I see you are a new arrival to this land. My|job is to welcome all the new visitors. So welcome!"); -~chatnpc(neutral, "You have already learnt the first thing needed to|succeed in this world... Talking to other people!"); -~chatnpc(neutral, "You will find many inhabitants of this world have useful|things to say to you. By clicking on them with your|mouse you can talk to them."); -~chatnpc(neutral, "I would also suggest reading through some of the|supporting information on the website. There you can|find maps, a bestiary, and much more."); -~chatnpc(neutral, "To continue the tutorial go through that door over there, and speak to your first instructor!"); +~chatnpc("Greetings! I see you are a new arrival to this land. My|job is to welcome all the new visitors. So welcome!"); +~chatnpc("You have already learnt the first thing needed to|succeed in this world... Talking to other people!"); +~chatnpc("You will find many inhabitants of this world have useful|things to say to you. By clicking on them with your|mouse you can talk to them."); +~chatnpc("I would also suggest reading through some of the|supporting information on the website. There you can|find maps, a bestiary, and much more."); +~chatnpc("To continue the tutorial go through that door over there, and speak to your first instructor!"); %tutorial_progress = ^runescape_guide_interact_with_scenery; ~set_tutorial_progress; // The below commented out code will be relevant in October 2006, but was absent in September 2006. -//~chatnpc(neutral, "You will notice a flashing icon of a spanner.|Please click on this to continue the tutorial."); +//~chatnpc("You will notice a flashing icon of a spanner.|Please click on this to continue the tutorial."); //%tutorial_progress = 2; //~tutorial_step_player_controls_spanner; //if_settab(game_options, ^tab_game_options); //if_settabflash(^tab_game_options); //[label,runescape_guide_spanner] -//~chatnpc(neutral, "You will notice a flashing icon of a spanner.|Please click on this to continue the tutorial."); +//~chatnpc("You will notice a flashing icon of a spanner.|Please click on this to continue the tutorial."); [label,runescape_guide_return] -~chatnpc(neutral, "Welcome back. You have already learnt the first thing needed to succeed in this world: talking to other people!"); -~chatnpc(neutral, "You will find many inhabitants of this world have useful things to say to you. By clicking on them, you can talk to them."); -~chatnpc(neutral, "To continue the tutorial go through that door over there, and speak to your first instructor!"); +~chatnpc("Welcome back. You have already learnt the first thing needed to succeed in this world: talking to other people!"); +~chatnpc("You will find many inhabitants of this world have useful things to say to you. By clicking on them, you can talk to them."); +~chatnpc("To continue the tutorial go through that door over there, and speak to your first instructor!"); [proc,set_hint_runescape_guide] if (%tutorial_progress < ^runescape_guide_interact_with_scenery) { diff --git a/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 b/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 index 26b25ee11..52903c62a 100644 --- a/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 +++ b/data/src/scripts/tutorial/scripts/guides/survival_guide.rs2 @@ -12,16 +12,16 @@ switch_int(%tutorial_progress) { } [label,survival_guide_start] -~chatnpc(neutral, "Hello there newcomer. My name is Brynna. My job is|to teach you a few survival tips and tricks. First off|we're going to start with the most basic survival skill of|all; making a fire."); +~chatnpc("Hello there newcomer. My name is Brynna. My job is|to teach you a few survival tips and tricks. First off|we're going to start with the most basic survival skill of|all; making a fire."); ~doubleobjbox(tinderbox, bronze_axe, "The Survival Guide gives you a |@blu@Tinderbox@bla@ |and a |@blu@Bronze Hatchet!"); %tutorial_progress = ^survival_guide_open_inventory; ~tutorial_step_view_inventory; [label,survival_guide_look_at_menu] -~chatnpc(neutral, "Hello again. You should take a look at that menu before we continue."); +~chatnpc("Hello again. You should take a look at that menu before we continue."); [label,survival_guide_fire] -~chatnpc(neutral, "Next up you need to make a fire. First, you'll need to cut down a tree to get some logs."); +~chatnpc("Next up you need to make a fire. First, you'll need to cut down a tree to get some logs."); ~survival_guide_replace_items; // basing these obj boxes off this from 2005 @@ -61,7 +61,7 @@ if (inv_total(inv, net) < 1 & inv_freespace(inv) > 0) { } [label,survival_guide_fishing] -~chatnpc(neutral, "There's nothing like a good fire to warm the bones.|Next thing is getting food in our bellies. We'll need|something to cook. There are shrimp in the pond there.|So let's catch and cook some."); +~chatnpc("There's nothing like a good fire to warm the bones.|Next thing is getting food in our bellies. We'll need|something to cook. There are shrimp in the pond there.|So let's catch and cook some."); npc_findallzone(0_48_48_29_20); while (npc_findnext = true) { if (npc_coord = 0_48_48_29_20 & npc_type = tut_fishing_spot) { @@ -77,10 +77,10 @@ inv_add(inv, net, 1); // https://youtu.be/TSx2-jjPeIs?t=31 [label,survival_guide_fishing_after_burning] ~survival_guide_replace_items; -~chatnpc(neutral, "Hello again. Next thing is getting food in our bellies. We'll need something to cook. There are shrimp in the pond there. So let's catch and cook some."); +~chatnpc("Hello again. Next thing is getting food in our bellies. We'll need something to cook. There are shrimp in the pond there. So let's catch and cook some."); [label,survival_guide_recap] -~chatnpc(neutral, "Hello again."); +~chatnpc("Hello again."); ~survival_guide_replace_items; ~survival_guide_recap_response(~p_choice5_header("Woodcutting.", 1, "Firemaking.", 2, "Fishing.", 3, "Cooking.", 4, "My stats.", 5, "What would you like to hear more about?")); @@ -113,37 +113,37 @@ switch_int($choice) { } [proc,survival_recap_skills] -~chatplayer("default", "Tell me about my stats again."); -~chatnpc(neutral, "To look at your stats, click on the bar graph icon found near your backpack icon. You can check your skill levels here."); +~chatplayer("Tell me about my stats again."); +~chatnpc("To look at your stats, click on the bar graph icon found near your backpack icon. You can check your skill levels here."); // OSRS specific -//~chatnpc(neutral, "Every skill is listed in the skills menu. Here you can see what your current levels are and how much experience you have."); -~chatnpc(neutral, "As you move your mouse over any of the icons here, look at the bottom of the menu and you will see the exact amount of experience you have and how much is needed to get to the next level."); +//~chatnpc("Every skill is listed in the skills menu. Here you can see what your current levels are and how much experience you have."); +~chatnpc("As you move your mouse over any of the icons here, look at the bottom of the menu and you will see the exact amount of experience you have and how much is needed to get to the next level."); // Re-enable this line when we get skill menus. -//~chatnpc("default", "You can also click on a skill to open the relevant skillguide. In the skillguide, you can see all of the unlocks available in that skill. "); +//~chatnpc("You can also click on a skill to open the relevant skillguide. In the skillguide, you can see all of the unlocks available in that skill. "); [proc,survival_recap_woodcutting] -~chatplayer("default", "Tell me about Woodcutting again."); -~chatnpc(neutral, "Woodcutting, eh? Don't worry, newcomer, it's really very easy. Simply equip your axe and click on a nearby tree to chop away."); -~chatnpc(neutral, "As you explore the mainland you will discover many different kinds of trees that will require different levels of Woodcutting to chop down."); -~chatnpc(neutral, "Logs are not only useful for making fires. Many archers use the skill known as Fletching to craft their own bows and arrows from trees."); +~chatplayer("Tell me about Woodcutting again."); +~chatnpc("Woodcutting, eh? Don't worry, newcomer, it's really very easy. Simply equip your axe and click on a nearby tree to chop away."); +~chatnpc("As you explore the mainland you will discover many different kinds of trees that will require different levels of Woodcutting to chop down."); +~chatnpc("Logs are not only useful for making fires. Many archers use the skill known as Fletching to craft their own bows and arrows from trees."); [proc,survival_recap_fishing] -~chatplayer("default", "Tell me about Fishing again."); -~chatnpc(neutral, "Ah, yes. Fishing! Fishing is undoubtedly one the more popular hobbies here in Runescape!"); -~chatnpc(neutral, "Whenever you see sparkling waters, you can be sure there's probably some good fishing to be had there!"); -~chatnpc(neutral, "Not only are fish absolutely delicious when cooked, there are always fighters willing to buy a well cooked fish when they're low on health."); -~chatnpc(quiz, "I would recommend everybody has a go at Fishing at least once in their lives! Was there anything else you wished to hear again?"); +~chatplayer("Tell me about Fishing again."); +~chatnpc("Ah, yes. Fishing! Fishing is undoubtedly one the more popular hobbies here in Runescape!"); +~chatnpc("Whenever you see sparkling waters, you can be sure there's probably some good fishing to be had there!"); +~chatnpc("Not only are fish absolutely delicious when cooked, there are always fighters willing to buy a well cooked fish when they're low on health."); +~chatnpc("I would recommend everybody has a go at Fishing at least once in their lives! Was there anything else you wished to hear again?"); [proc,survival_recap_firemaking] -~chatplayer("default", "Tell me about Firemaking again."); -~chatnpc(neutral, "Certainly, newcomer. When you have logs simply use your tinderbox on then. If successful, you will start a fire."); -~chatnpc(neutral, "You can also set fire to logs you find lying on the floor already, and some other things can also be set alight..."); -~chatnpc(neutral, "A tinderbox is always a useful item to keep around!"); +~chatplayer("Tell me about Firemaking again."); +~chatnpc("Certainly, newcomer. When you have logs simply use your tinderbox on then. If successful, you will start a fire."); +~chatnpc("You can also set fire to logs you find lying on the floor already, and some other things can also be set alight..."); +~chatnpc("A tinderbox is always a useful item to keep around!"); [proc,survival_recap_cooking] -~chatplayer("default", "Tell me about Cooking again."); -~chatnpc(neutral, "Yes, the most basic of survival techniques. Most simple meals can be cooked on a fire by right clicking on the food, selecting use, then left clicking on the fire."); -~chatnpc(neutral, "Eating food will restore a little health. The harder something is to cook, the more it will heal you. Somewhere around here is a chef who will tell you more about food and cooking it."); +~chatplayer("Tell me about Cooking again."); +~chatnpc("Yes, the most basic of survival techniques. Most simple meals can be cooked on a fire by right clicking on the food, selecting use, then left clicking on the fire."); +~chatnpc("Eating food will restore a little health. The harder something is to cook, the more it will heal you. Somewhere around here is a chef who will tell you more about food and cooking it."); [proc,set_hint_icon_survival_guide] if (npc_find(0_48_48_31_23, survival_expert, 10, 0) = true) { diff --git a/data/src/scripts/tutorial/scripts/npcs/tut_banker.rs2 b/data/src/scripts/tutorial/scripts/npcs/tut_banker.rs2 index 5e6172a9c..66f3451ff 100644 --- a/data/src/scripts/tutorial/scripts/npcs/tut_banker.rs2 +++ b/data/src/scripts/tutorial/scripts/npcs/tut_banker.rs2 @@ -7,7 +7,7 @@ if (npc_range(coord) > 2) { @tut_banker; [label,tut_banker] -~chatnpc(quiz, "Good day, would you like to access your bank account?"); +~chatnpc("Good day, would you like to access your bank account?"); @multi2( "Yes.", tut_open_bank, "No thanks.", banker_no_thanks @@ -22,4 +22,4 @@ if (%tutorial_progress = ^tutorial_open_banking) { @openbank; [label,banker_no_thanks] -~chatplayer(neutral, "No thanks."); \ No newline at end of file +~chatplayer("No thanks."); \ No newline at end of file diff --git a/data/src/scripts/tutorial/scripts/tutorialstep.rs2 b/data/src/scripts/tutorial/scripts/tutorialstep.rs2 index a6acff5fe..c276ca25a 100644 --- a/data/src/scripts/tutorial/scripts/tutorialstep.rs2 +++ b/data/src/scripts/tutorial/scripts/tutorialstep.rs2 @@ -36,7 +36,7 @@ if_openchatsticky($interface); // https://youtu.be/Quwc_TfPW8Q?t=33 [proc,tutorialstep](string $title, string $string) if_settext(tutorial_text:title, $title); -split_init($string, 450, 4, q8, null); +split_init($string, 450, 4, q8); def_int $page = 0; def_int $pagetotal = split_pagecount; while ($page < $pagetotal) { diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 7e5210186..42741af25 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -535,6 +535,11 @@ const PlayerOps: CommandHandlers = { check(com, NumberNotNull); + if (seq === -1) { + // uh, client crashes! which means empty dialogue wasn't an option at the time + return; + } + state.activePlayer.writeLowPriority(ServerProt.IF_SETANIM, com, seq); }), diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index 5212e9de2..ca507435c 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -2,6 +2,7 @@ import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; import ParamType from '#lostcity/cache/ParamType.js'; import StructType from '#lostcity/cache/StructType.js'; import SpotanimType from '#lostcity/cache/SpotanimType.js'; +import MesanimType from '#lostcity/cache/MesanimType.js'; import World from '#lostcity/engine/World.js'; @@ -191,13 +192,22 @@ const ServerOps: CommandHandlers = { }, [ScriptOpcode.SPLIT_INIT]: state => { - const [maxWidth, linesPerPage, fontId, mesanimId] = state.popInts(4); - const text = state.popString(); + const [maxWidth, linesPerPage, fontId] = state.popInts(3); + let text = state.popString(); + const font = check(fontId, FontTypeValid); - const lines = font.split(text, maxWidth); + + // todo: later this needs to lookup by instead of + if (text.startsWith('') !== -1) { + const mesanim = text.substring(3, text.indexOf('>')); + state.splitMesanim = MesanimType.getId(mesanim); + text = text.substring(text.indexOf('>') + 1); + } else { + state.splitMesanim = -1; + } state.splitPages = []; - state.splitMesanim = mesanimId; + const lines = font.split(text, maxWidth); while (lines.length > 0) { state.splitPages.push(lines.splice(0, linesPerPage)); } From 0d4c2749053d79dcfca89a6c41248f705ec6c748 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Tue, 4 Jun 2024 19:35:12 -0400 Subject: [PATCH 33/50] fix(engine): Revert isLastWaypoint logic until it gets solved --- data/src/scripts/shop/scripts/generalshop.rs2 | 1 - src/lostcity/entity/Player.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/data/src/scripts/shop/scripts/generalshop.rs2 b/data/src/scripts/shop/scripts/generalshop.rs2 index 0e7b617fb..0cd6d7385 100644 --- a/data/src/scripts/shop/scripts/generalshop.rs2 +++ b/data/src/scripts/shop/scripts/generalshop.rs2 @@ -21,7 +21,6 @@ // This is probably an OSRS change as the khazard shop uses the same dialogue as classic (although the khazard shop has different mesanims) // meaning most generalshops probably call the same label whereas khazard calls a seperate one [label,generalshop_help] -~chatnpc(""); ~chatnpc("Can I help you at all?"); def_int $option = ~p_choice2("Yes please. What are you selling?", 1, "No thanks.", 2); if($option = 1) { diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index 3e1aba802..eeab2f86b 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -433,7 +433,7 @@ export default class Player extends PathingEntity { if ( repathAllowed && - this.target instanceof PathingEntity && this.isLastWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && + this.target instanceof PathingEntity && // this.isLastWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && !this.interacted && this.walktrigger === -1 ) { this.pathToTarget(); From a5251a95846549b7cc970a7c30f95835c84535c5 Mon Sep 17 00:00:00 2001 From: tannerdino <61213166+tannerdino@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:26:13 -0400 Subject: [PATCH 34/50] fix(content): kbd stat reduction (#554) Co-authored-by: tannerdino --- .../areas/area_wilderness/scripts/king_black_dragon.rs2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/src/scripts/areas/area_wilderness/scripts/king_black_dragon.rs2 b/data/src/scripts/areas/area_wilderness/scripts/king_black_dragon.rs2 index bd519d8ec..1bbd5af9b 100644 --- a/data/src/scripts/areas/area_wilderness/scripts/king_black_dragon.rs2 +++ b/data/src/scripts/areas/area_wilderness/scripts/king_black_dragon.rs2 @@ -256,9 +256,9 @@ if (randominc($attack_roll) > randominc($defence_roll)) { // mes("You're shocked and weakened!"); // https://youtu.be/R3ozXHcQkgs?list=PLn23LiLYLb1bYAFU3Vdk3N9niuHs-b-4-&t=106 mes("You're zapped by the dragon's shocking breath!"); // earlier video has this: https://youtu.be/Kc0ZMLmWrYU?list=PLn23LiLYLb1bYAFU3Vdk3N9niuHs-b-4-&t=20 // reduce every stat except hitpoints by 2 - def_int $i = 0; + def_int $i = 1; def_stat $stat; - while ($i < enum_getoutputcount(stats)) { + while ($i <= enum_getoutputcount(stats)) { $stat = enum(int, stat, stats, $i); if ($stat ! hitpoints) { stat_sub($stat, 2, 0); From 7ca1ee2542dba78ae7ae5d8088a6939519855208 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Tue, 4 Jun 2024 23:15:22 -0400 Subject: [PATCH 35/50] fix(engine): IfPlayerDesignDecoder color reading --- .../network/225/incoming/codec/IfPlayerDesignDecoder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lostcity/network/225/incoming/codec/IfPlayerDesignDecoder.ts b/src/lostcity/network/225/incoming/codec/IfPlayerDesignDecoder.ts index 5c0149933..95e998ee9 100644 --- a/src/lostcity/network/225/incoming/codec/IfPlayerDesignDecoder.ts +++ b/src/lostcity/network/225/incoming/codec/IfPlayerDesignDecoder.ts @@ -20,7 +20,7 @@ export default class IfPlayerDesignDecoder extends MessageDecoder Date: Wed, 5 Jun 2024 03:43:43 -0400 Subject: [PATCH 36/50] feat(engine): New unpacking code Capable of decoding configs from the next revision's cache format. We can produce a 225-compatible cache from other revisions. Later-properties get commented as //unsupported: Interfaces, sounds, and models/anims/midis/maps TODO. ...this doesn't mean it'll work perfectly OOTB. Not having varbits will impact the map and interfaces. --- src/jagex2/io/FileStream.ts | 2 +- src/lostcity/tools/client/media/unpack.ts | 171 --- src/lostcity/tools/client/textures/unpack.ts | 42 - src/lostcity/tools/client/title/unpack.ts | 99 -- src/lostcity/tools/client/wordenc/unpack.ts | 101 -- src/lostcity/tools/packconfig/Unpack.ts | 972 -------------- src/lostcity/tools/unpack/run.ts | 60 + src/lostcity/util/CacheUnpack.ts | 1195 ++++++++++++++++++ 8 files changed, 1256 insertions(+), 1386 deletions(-) delete mode 100644 src/lostcity/tools/client/media/unpack.ts delete mode 100644 src/lostcity/tools/client/textures/unpack.ts delete mode 100644 src/lostcity/tools/client/title/unpack.ts delete mode 100644 src/lostcity/tools/client/wordenc/unpack.ts delete mode 100644 src/lostcity/tools/packconfig/Unpack.ts create mode 100644 src/lostcity/tools/unpack/run.ts create mode 100644 src/lostcity/util/CacheUnpack.ts diff --git a/src/jagex2/io/FileStream.ts b/src/jagex2/io/FileStream.ts index 9fcc4bfc7..49082f549 100644 --- a/src/jagex2/io/FileStream.ts +++ b/src/jagex2/io/FileStream.ts @@ -64,7 +64,7 @@ export default class FileStream { } const data: Packet = new Packet(new Uint8Array(size)); - for (let part: number = 0; data.pos < data.data.length; part++) { + for (let part: number = 0; data.pos < size; part++) { if (sector === 0) { break; } diff --git a/src/lostcity/tools/client/media/unpack.ts b/src/lostcity/tools/client/media/unpack.ts deleted file mode 100644 index 7f5158d9e..000000000 --- a/src/lostcity/tools/client/media/unpack.ts +++ /dev/null @@ -1,171 +0,0 @@ -import fs from 'fs'; -import Jimp from 'jimp'; - -import Jagfile from '#jagex2/io/Jagfile.js'; -import { pixSize, countPix, unpackPix } from '#lostcity/util/PixUnpack.js'; - -fs.mkdirSync('dump/src/sprites/meta', { recursive: true }); - -const media = Jagfile.load('dump/client/media'); - -function isPrime(val: number) { - if (val === 1) { - // not prime but good enough for this function's purpose - return true; - } - - for (let i = 2; i < val; i++) { - if (val % i === 0) { - return false; - } - } - - return true; -} - -const index = media.read('index.dat'); - -if (!index) { - throw new Error('no index.dat'); -} - -for (let i = 0; i < media.fileCount; i++) { - if (media.fileName[i] === 'index.dat') { - continue; - } - - const data = media.read(media.fileName[i]); - - if (!data) { - throw new Error(`no ${media.fileName[i]}`); - } - - const size = pixSize(data, index); - const count = countPix(data, index); - console.log(media.fileName[i], count, size.width + 'x' + size.height); - - const safeName = media.fileName[i].replace('.dat', ''); - if (count === 1) { - const pix = unpackPix(data, index); - await pix.img.writeAsync(`dump/src/sprites/${safeName}.png`); - - // ---- - - const meta = `${pix.cropX},${pix.cropY},${pix.width},${pix.height},${pix.pixelOrder ? 'row' : 'column'}\n`; - fs.writeFileSync(`dump/src/sprites/meta/${safeName}.opt`, meta); - - // ---- - - const pal = new Jimp(16, 16, 0xff00ffff).colorType(2); - - for (let j = 1; j < pix.palette.length; j++) { - const x = j % 16; - const y = Math.floor(j / 16); - - const color = pix.palette[j]; - - const pos = (x + y * 16) * 4; - pal.bitmap.data[pos] = (color >> 16) & 0xff; - pal.bitmap.data[pos + 1] = (color >> 8) & 0xff; - pal.bitmap.data[pos + 2] = color & 0xff; - } - - await pal.writeAsync(`dump/src/sprites/meta/${safeName}.pal.png`); - } else { - // sprite sheet! - const sprites = []; - for (let j = 0; j < count; j++) { - sprites[j] = unpackPix(data, index, j); - } - - let width = Math.ceil(Math.sqrt(count)); - let height = Math.ceil(count / width); - - const override: Record = { - mapdots: { width: 4, height: 1 } - }; - - if (override[safeName]) { - width = override[safeName].width; - height = override[safeName].height; - } else if (isPrime(count)) { - width = count; - height = 1; - } - if (width * height != count) { - let heightTries = 0; - - // wrong aspect ratio, try subtracting from height and adding to width - while (width * height != count && heightTries < 10) { - height--; - width++; - heightTries++; - } - - if (width * height != count) { - width = Math.ceil(Math.sqrt(count)); - height = Math.ceil(count / width); - - // because we do width second, we're biased towards a wider spritesheet - let widthTries = 0; - - // wrong aspect ratio, try subtracting from width and adding to height - while (width * height != count && widthTries < 10) { - width--; - height++; - widthTries++; - } - - if (width * height != count) { - // oh well, we tried - width = count; - height = 1; - } - } - } - - if (width * height != count) { - console.log('Could not determine size of spritesheet', safeName, width, height, count); - } - - const sheet = new Jimp(width * size.width, height * size.height, 0xff00ffff).colorType(2); - - for (let j = 0; j < count; j++) { - const x = j % width; - const y = Math.floor(j / width); - - sheet.blit(sprites[j].img, x * size.width, y * size.height, 0, 0, size.width, size.height); - } - - await sheet.writeAsync(`dump/src/sprites/${safeName}.png`); - - // ---- - - let meta = `${size.width}x${size.height}\n`; - - for (let j = 0; j < count; j++) { - const sprite = sprites[j]; - meta += `${sprite.cropX},${sprite.cropY},${sprite.width},${sprite.height},${sprite.pixelOrder ? 'row' : 'column'}\n`; - } - - fs.writeFileSync(`dump/src/sprites/meta/${safeName}.opt`, meta); - - // ---- - - const pal = new Jimp(16, 16, 0xff00ffff).colorType(2); - - for (let j = 1; j < sprites[0].palette.length; j++) { - const x = j % 16; - const y = Math.floor(j / 16); - - const color = sprites[0].palette[j]; - - const pos = (x + y * 16) * 4; - pal.bitmap.data[pos] = (color >> 16) & 0xff; - pal.bitmap.data[pos + 1] = (color >> 8) & 0xff; - pal.bitmap.data[pos + 2] = color & 0xff; - } - - await pal.writeAsync(`dump/src/sprites/meta/${safeName}.pal.png`); - } -} diff --git a/src/lostcity/tools/client/textures/unpack.ts b/src/lostcity/tools/client/textures/unpack.ts deleted file mode 100644 index 7957dbe66..000000000 --- a/src/lostcity/tools/client/textures/unpack.ts +++ /dev/null @@ -1,42 +0,0 @@ -import fs from 'fs'; - -import Jagfile from '#jagex2/io/Jagfile.js'; -import { pixSize, unpackPix } from '#lostcity/util/PixUnpack.js'; -import { loadPack } from '#lostcity/util/NameMap.js'; - -const textures = Jagfile.load('data/client/textures'); -const pack = loadPack('data/src/pack/texture.pack'); - -fs.mkdirSync('data/src/textures/meta', { recursive: true }); - -const index = textures.read('index.dat'); - -if (!index) { - throw new Error('no index.dat'); -} - -for (let i = 0; i < textures.fileCount; i++) { - if (textures.fileName[i] === 'index.dat') { - continue; - } - - const dump = textures.read(textures.fileName[i]); - - if (!dump) { - throw new Error(`no ${textures.fileName[i]}`); - } - - const size = pixSize(dump, index); - console.log(textures.fileName[i], size.width + 'x' + size.height); - - const safeName = textures.fileName[i].replace('.dat', ''); - const texture = unpackPix(dump, index); - - const realName = pack[safeName as unknown as number]; - await texture.img.writeAsync(`data/src/textures/${realName}.png`); - - // ---- - - const meta = `${texture.cropX},${texture.cropY},${texture.width},${texture.height},${texture.pixelOrder ? 'row' : 'column'}\n`; - fs.writeFileSync(`data/src/textures/meta/${realName}.opt`, meta); -} diff --git a/src/lostcity/tools/client/title/unpack.ts b/src/lostcity/tools/client/title/unpack.ts deleted file mode 100644 index 82f94f65e..000000000 --- a/src/lostcity/tools/client/title/unpack.ts +++ /dev/null @@ -1,99 +0,0 @@ -import fs from 'fs'; -import Jimp from 'jimp'; - -import Jagfile from '#jagex2/io/Jagfile.js'; -import { pixSize, countPix, unpackPix } from '#lostcity/util/PixUnpack.js'; - -const title = Jagfile.load('dump/client/title'); - -fs.mkdirSync('dump/src/title/meta', { recursive: true }); -fs.mkdirSync('dump/src/fonts/meta', { recursive: true }); - -const jpg = title.read('title.dat'); - -if (!jpg) { - throw new Error('no title.dat'); -} - -jpg.p1(0xff); // restore JPEG header -jpg.save('dump/src/binary/title.jpg', jpg.data.length); - -const index = title.read('index.dat'); - -if (!index) { - throw new Error('no index.dat'); -} - -for (let i = 0; i < title.fileCount; i++) { - if (title.fileName[i] === 'index.dat' || title.fileName[i] === 'title.dat') { - continue; - } - - const dump = title.read(title.fileName[i]); - - if (!dump) { - throw new Error(`no ${title.fileName[i]}`); - } - - const size = pixSize(dump, index); - const count = countPix(dump, index); - console.log(title.fileName[i], count, size.width + 'x' + size.height); - - let dest = 'title'; - const safeName = title.fileName[i].replace('.dat', ''); - if (safeName === 'p11' || safeName === 'p12' || safeName === 'b12' || safeName === 'q8' || safeName === 'p11_full' || safeName === 'p12_full' || safeName === 'b12_full' || safeName === 'q8_full') { - dest = 'fonts'; - } - - if (count === 1) { - const pix = unpackPix(dump, index); - await pix.img.writeAsync(`dump/src/${dest}/${safeName}.png`); - - // ---- - - const meta = `${pix.cropX},${pix.cropY},${pix.width},${pix.height},${pix.pixelOrder ? 'row' : 'column'}\n`; - fs.writeFileSync(`dump/src/${dest}/meta/${safeName}.opt`, meta); - } else { - // sprite sheet! - const sprites = []; - for (let j = 0; j < count; j++) { - sprites[j] = unpackPix(dump, index, j); - } - - let width = Math.ceil(Math.sqrt(count)); - let height = Math.ceil(count / width); - - if (width * height > count) { - let widthTries = 0; - - // wrong aspect ratio, try subtracting from width and adding to height - while (width * height > count && widthTries < 10) { - width--; - height++; - widthTries++; - } - } - - const sheet = new Jimp(width * size.width, height * size.height, 0xff00ffff).colorType(2); - - for (let j = 0; j < count; j++) { - const x = j % width; - const y = Math.floor(j / width); - - sheet.blit(sprites[j].img, x * size.width, y * size.height, 0, 0, size.width, size.height); - } - - await sheet.writeAsync(`dump/src/${dest}/${safeName}.png`); - - // ---- - - let meta = `${size.width}x${size.height}\n`; - - for (let j = 0; j < count; j++) { - const sprite = sprites[j]; - meta += `${sprite.cropX},${sprite.cropY},${sprite.width},${sprite.height},${sprite.pixelOrder ? 'row' : 'column'}\n`; - } - - fs.writeFileSync(`dump/src/${dest}/meta/${safeName}.opt`, meta); - } -} diff --git a/src/lostcity/tools/client/wordenc/unpack.ts b/src/lostcity/tools/client/wordenc/unpack.ts deleted file mode 100644 index 3f07ed03d..000000000 --- a/src/lostcity/tools/client/wordenc/unpack.ts +++ /dev/null @@ -1,101 +0,0 @@ -import fs from 'fs'; -import Jagfile from '#jagex2/io/Jagfile.js'; - -const wordenc = Jagfile.load('dump/client/wordenc'); - -const badenc = wordenc.read('badenc.txt'); -const domainenc = wordenc.read('domainenc.txt'); -const fragmentsenc = wordenc.read('fragmentsenc.txt'); -const tldlist = wordenc.read('tldlist.txt'); - -if (!badenc) { - throw new Error('missing badenc.txt'); -} - -if (!domainenc) { - throw new Error('missing domainenc.txt'); -} - -if (!fragmentsenc) { - throw new Error('missing fragmentsenc.txt'); -} - -if (!tldlist) { - throw new Error('missing tldlist.txt'); -} - -fs.mkdirSync('dump/src/wordenc', { recursive: true }); - -// ---- - -{ - fs.writeFileSync('dump/src/wordenc/badenc.txt', ''); - - const total = badenc.g4(); - for (let i = 0; i < total; i++) { - let badword = ''; - const count = badenc.g1(); - for (let j = 0; j < count; j++) { - badword += String.fromCharCode(badenc.g1()); - } - fs.appendFileSync('dump/src/wordenc/badenc.txt', badword); - - const combinations = badenc.g1(); - for (let j = 0; j < combinations; j++) { - const a = badenc.g1(); - const b = badenc.g1(); - - fs.appendFileSync('dump/src/wordenc/badenc.txt', ` ${a}:${b}`); - } - - fs.appendFileSync('dump/src/wordenc/badenc.txt', '\n'); - } -} - -// ---- - -{ - fs.writeFileSync('dump/src/wordenc/domainenc.txt', ''); - - const total = domainenc.g4(); - for (let i = 0; i < total; i++) { - let domain = ''; - const count = domainenc.g1(); - for (let j = 0; j < count; j++) { - domain += String.fromCharCode(domainenc.g1()); - } - - fs.appendFileSync('dump/src/wordenc/domainenc.txt', domain + '\n'); - } -} - -// ---- - -{ - fs.writeFileSync('dump/src/wordenc/fragmentsenc.txt', ''); - - const total = fragmentsenc.g4(); - for (let i = 0; i < total; i++) { - const fragment = fragmentsenc.g2(); - fs.appendFileSync('dump/src/wordenc/fragmentsenc.txt', fragment + '\n'); - } -} - -// ---- - -{ - fs.writeFileSync('dump/src/wordenc/tldlist.txt', ''); - - const total = tldlist.g4(); - for (let i = 0; i < total; i++) { - const type = tldlist.g1(); - - let tld = ''; - const count = tldlist.g1(); - for (let j = 0; j < count; j++) { - tld += String.fromCharCode(tldlist.g1()); - } - - fs.appendFileSync('dump/src/wordenc/tldlist.txt', `${tld} ${type}\n`); - } -} diff --git a/src/lostcity/tools/packconfig/Unpack.ts b/src/lostcity/tools/packconfig/Unpack.ts deleted file mode 100644 index a6629cde3..000000000 --- a/src/lostcity/tools/packconfig/Unpack.ts +++ /dev/null @@ -1,972 +0,0 @@ -import fs from 'fs'; - -import Jagfile from '#jagex2/io/Jagfile.js'; -import { loadPack } from '#lostcity/util/NameMap.js'; - -const input = process.argv[2]; -const output = process.argv[3]; - -if (!input || !output) { - console.error('Usage: node Unpack.js '); - process.exit(1); -} - -if (!fs.existsSync(input)) { - console.error('input does not exist'); - process.exit(1); -} - -let decode194 = false; -if (process.argv.includes('--194')) { - decode194 = true; -} - -fs.mkdirSync(`${output}/scripts`, { recursive: true }); -fs.mkdirSync(`${output}/pack`, { recursive: true }); - -const config = Jagfile.load(input); - -// ---- - -const texturePack = loadPack(`${output}/pack/texture.pack`); - -const floPack = []; -const floConfig = []; - -const flo = config.read('flo.dat'); - -if (!flo) { - throw new Error('missing flo.dat'); -} - -let count = flo.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - floConfig.push(''); - } - - floPack.push(`flo_${id}`); - floConfig.push(`[flo_${id}]`); - - while (true) { - const code = flo.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - floConfig.push(`rgb=0x${flo.g3().toString(16).toUpperCase().padStart(6, '0')}`); - } else if (code === 2) { - const texture = flo.g1(); - floConfig.push(`texture=${texturePack[texture]}`); - } else if (code === 3) { - floConfig.push('overlay=yes'); - } else if (code === 5) { - floConfig.push('occlude=no'); - } else if (code === 6) { - floConfig.push(`editname=${flo.gjstr()}`); - } else { - console.error(`Unrecognized flo config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/flo.pack`, - floPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.flo`, floConfig.join('\n') + '\n'); - -// ---- - -const idkPack = []; -const idkConfig = []; - -const idk = config.read('idk.dat'); - -if (!idk) { - throw new Error('missing idk.dat'); -} - -count = idk.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - idkConfig.push(''); - } - - idkPack.push(`idk_${id}`); - idkConfig.push(`[idk_${id}]`); - - while (true) { - const code = idk.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - let type: number | string = idk.g1(); - - switch (type) { - case 0: - type = 'man_hair'; - break; - case 1: - type = 'man_jaw'; - break; - case 2: - type = 'man_torso'; - break; - case 3: - type = 'man_arms'; - break; - case 4: - type = 'man_hands'; - break; - case 5: - type = 'man_legs'; - break; - case 6: - type = 'man_feet'; - break; - case 7: - type = 'woman_hair'; - break; - case 8: - type = 'woman_jaw'; - break; - case 9: - type = 'woman_torso'; - break; - case 10: - type = 'woman_arms'; - break; - case 11: - type = 'woman_hands'; - break; - case 12: - type = 'woman_legs'; - break; - case 13: - type = 'woman_feet'; - break; - } - - idkConfig.push(`type=${type}`); - } else if (code === 2) { - const models = idk.g1(); - - for (let i = 0; i < models; i++) { - idkConfig.push(`model${i + 1}=model_${idk.g2()}`); - } - } else if (code === 3) { - idkConfig.push('disable=yes'); - } else if (code >= 40 && code < 50) { - idkConfig.push(`recol${code - 40 + 1}s=${idk.g2()}`); - } else if (code >= 50 && code < 60) { - idkConfig.push(`recol${code - 50 + 1}d=${idk.g2()}`); - } else if (code >= 60 && code < 70) { - idkConfig.push(`head${code - 60 + 1}=model_${idk.g2()}`); - } else { - console.error(`Unrecognized idk config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/idk.pack`, - idkPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.idk`, idkConfig.join('\n') + '\n'); - -// ---- - -const locPack = []; -const locConfig = []; - -const loc = config.read('loc.dat'); - -if (!loc) { - throw new Error('missing loc.dat'); -} - -count = loc.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - locConfig.push(''); - } - - locPack.push(`loc_${id}`); - locConfig.push(`[loc_${id}]`); - - let modelsRead = false; - while (true) { - const code = loc.g1(); - if (code === 0) { - break; - } - - if (code === 1 || code === 5) { - const models = loc.g1(); - - for (let i = 0; i < models; i++) { - const model = loc.g2(); - let shape: number | string = 'centrepiece_straight'; - - if (code === 1) { - shape = loc.g1(); - - // shape is part of the model filename, but we can't control that right now - switch (shape) { - case 10: - shape = 'centrepiece_straight'; - break; - case 0: - shape = 'wall_straight'; - break; - case 1: - shape = 'wall_diagonalcorner'; - break; - case 2: - shape = 'wall_l'; - break; - case 3: - shape = 'wall_squarecorner'; - break; - case 9: - shape = 'wall_diagonal'; - break; - case 4: - shape = 'walldecor_straight_nooffset'; - break; - case 5: - shape = 'walldecor_straight_offset'; - break; - case 6: - shape = 'walldecor_diagonal_nooffset'; - break; - case 7: - shape = 'walldecor_diagonal_offset'; - break; - case 8: - shape = 'walldecor_diagonal_both'; - break; - case 11: - shape = 'centrepiece_diagonal'; - break; - case 12: - shape = 'roof_straight'; - break; - case 13: - shape = 'roof_diagonal_with_roofedge'; - break; - case 14: - shape = 'roof_diagonal'; - break; - case 15: - shape = 'roof_l_concave'; - break; - case 16: - shape = 'roof_l_convex'; - break; - case 17: - shape = 'roof_flat'; - break; - case 18: - shape = 'roofedge_straight'; - break; - case 19: - shape = 'roofedge_diagonalcorner'; - break; - case 20: - shape = 'roofedge_l'; - break; - case 21: - shape = 'roofedge_squarecorner'; - break; - case 22: - shape = 'grounddecor'; - break; - } - } - - if (!modelsRead) { - locConfig.push(`model${i + 1}=model_${model},${shape}`); - } else { - locConfig.push(`ldmodel${i + 1}=model_${model},${shape}`); - } - } - - modelsRead = true; - } else if (code === 2) { - locConfig.push(`name=${loc.gjstr()}`); - } else if (code === 3) { - locConfig.push(`desc=${loc.gjstr()}`); - } else if (code === 14) { - locConfig.push(`width=${loc.g1()}`); - } else if (code === 15) { - locConfig.push(`length=${loc.g1()}`); - } else if (code === 17) { - locConfig.push('blockwalk=no'); - } else if (code === 18) { - locConfig.push('blockrange=no'); - } else if (code === 19) { - locConfig.push(`active=${loc.gbool() ? 'yes' : 'no'}`); - } else if (code === 21) { - locConfig.push('hillskew=yes'); - } else if (code === 22) { - locConfig.push('sharelight=yes'); - } else if (code === 23) { - locConfig.push('occlude=yes'); - } else if (code === 24) { - locConfig.push(`anim=seq_${loc.g2()}`); - } else if (code === 25) { - locConfig.push('hasalpha=yes'); // TODO: inherit from anim - } else if (code === 28) { - locConfig.push(`wallwidth=${loc.g1()}`); - } else if (code === 29) { - locConfig.push(`ambient=${loc.g1b()}`); - } else if (code === 39) { - locConfig.push(`contrast=${loc.g1b()}`); - } else if (code >= 30 && code < 39) { - locConfig.push(`op${code - 30 + 1}=${loc.gjstr()}`); - } else if (code === 40) { - const count = loc.g1(); - - for (let i = 0; i < count; i++) { - locConfig.push(`recol${i + 1}s=${loc.g2()}`); - locConfig.push(`recol${i + 1}d=${loc.g2()}`); - } - } else if (code === 41) { - const count = loc.g1(); - - for (let i = 0; i < count; i++) { - locConfig.push(`retex${i + 1}s=${loc.g2()}`); - locConfig.push(`retex${i + 1}d=${loc.g2()}`); - } - } else if (code === 60) { - locConfig.push(`mapfunction=${loc.g2()}`); - } else if (code === 62) { - locConfig.push('mirror=yes'); - } else if (code === 64) { - locConfig.push('shadow=no'); - } else if (code === 65) { - locConfig.push(`resizex=${loc.g2()}`); - } else if (code === 66) { - locConfig.push(`resizey=${loc.g2()}`); - } else if (code === 67) { - locConfig.push(`resizez=${loc.g2()}`); - } else if (code === 68) { - locConfig.push(`mapscene=${loc.g2()}`); - } else if (code === 69) { - // north = 1 - // east = 2 - // south = 4 - // west = 8 - const flags = loc.g1(); - if ((flags & 0x1) === 0) { - locConfig.push('forceapproach=north'); - } else if ((flags & 0x2) === 0) { - locConfig.push('forceapproach=east'); - } else if ((flags & 0x4) === 0) { - locConfig.push('forceapproach=south'); - } else if ((flags & 0x8) === 0) { - locConfig.push('forceapproach=west'); - } - } else if (code === 70) { - locConfig.push(`xoff=${loc.g2s()}`); - } else if (code === 71) { - locConfig.push(`yoff=${loc.g2s()}`); - } else if (code === 72) { - locConfig.push(`zoff=${loc.g2s()}`); - } else if (code === 73) { - locConfig.push('forcedecor=yes'); - } else if (code === 74) { - locConfig.push('breakroutefinding=yes'); - } else if (code === 75) { - locConfig.push(`raiseobject=${loc.gbool() ? 'yes' : 'no'}`); - } else if (code === 77 || code === 92) { - let multiLocVarbit = loc.g2(); - if (multiLocVarbit === 65535) { - multiLocVarbit = -1; - } - - if (multiLocVarbit !== -1) { - locConfig.push(`multivarbit=varbit_${multiLocVarbit}`); - } - - let multiLocVarp = loc.g2(); - if (multiLocVarp === 65535) { - multiLocVarp = -1; - } - - if (multiLocVarp !== -1) { - locConfig.push(`multivar=varp_${multiLocVarp}`); - } - - let defaultMultiLoc: number = -1; - if (code === 92) { - defaultMultiLoc = loc.g2(); - - if (defaultMultiLoc === 65535) { - defaultMultiLoc = -1; - } - } - - const count: number = loc.g1(); - const multiLocs = new Int32Array(count + 1); - - for (let i: number = 0; i <= count; i++) { - multiLocs[i] = loc.g2(); - - if (multiLocs[i] === 65535) { - multiLocs[i] = -1; - } - } - - multiLocs[count + 1] = defaultMultiLoc; - - if (defaultMultiLoc !== -1) { - locConfig.push(`defaultloc=loc_${defaultMultiLoc}`); - } - - for (let i: number = 0; i <= count; i++) { - if (multiLocs[i] !== -1) { - locConfig.push(`multiloc=${i},loc_${multiLocs[i]}`); - } - } - } else if (code === 78) { - locConfig.push(`bgsound=sound_${loc.g2()},${loc.g1()}`); - } else if (code === 79) { - locConfig.push(`randomsound=${loc.g2()},${loc.g2()},${loc.g1()}`); - - const count: number = loc.g1(); - const bgsounds = new Int32Array(count); - for (let i: number = 0; i < count; i++) { - bgsounds[i] = loc.g2(); - locConfig.push(`randomsound${i + 1}=sound_${bgsounds[i]}`); - } - locConfig.push(`bgsound=sound_${loc.g2()},${loc.g1()}`); - } else if (code === 81) { - locConfig.push(`treeskew=${loc.g1()}`); - } else if (code === 82) { - // osrs - locConfig.push(`mapfunction=${loc.g2()}`); - } else { - console.error(`Unrecognized loc config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/loc.pack`, - locPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.loc`, locConfig.join('\n') + '\n'); - -// ---- - -const npcPack = []; -const npcConfig = []; - -const npc = config.read('npc.dat'); - -if (!npc) { - throw new Error('missing npc.dat'); -} - -count = npc.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - npcConfig.push(''); - } - - npcPack.push(`npc_${id}`); - npcConfig.push(`[npc_${id}]`); - - while (true) { - const code = npc.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - const models = npc.g1(); - - for (let i = 0; i < models; i++) { - npcConfig.push(`model${i + 1}=model_${npc.g2()}`); - } - } else if (code === 2) { - npcConfig.push(`name=${npc.gjstr()}`); - } else if (code === 3) { - npcConfig.push(`desc=${npc.gjstr()}`); - } else if (code === 12) { - npcConfig.push(`size=${npc.g1()}`); - } else if (code === 13) { - npcConfig.push(`readyanim=seq_${npc.g2()}`); - } else if (code === 14) { - npcConfig.push(`walkanim=seq_${npc.g2()}`); - } else if (code === 16) { - npcConfig.push('hasalpha=yes'); // TODO: inherit from anim - } else if (code === 17) { - npcConfig.push(`walkanim=seq_${npc.g2()},seq_${npc.g2()},seq_${npc.g2()},seq_${npc.g2()}`); - } else if (code >= 30 && code < 40) { - npcConfig.push(`op${code - 30 + 1}=${npc.gjstr()}`); - } else if (code === 40) { - const recol = npc.g1(); - - for (let i = 0; i < recol; i++) { - npcConfig.push(`recol${i + 1}s=${npc.g2()}`); - npcConfig.push(`recol${i + 1}d=${npc.g2()}`); - } - } else if (code === 60) { - const models = npc.g1(); - - for (let i = 0; i < models; i++) { - npcConfig.push(`head${i + 1}=model_${npc.g2()}`); - } - } else if (code === 90) { - npcConfig.push(`resizex=${npc.g2()}`); - } else if (code === 91) { - npcConfig.push(`resizey=${npc.g2()}`); - } else if (code === 92) { - npcConfig.push(`resizez=${npc.g2()}`); - } else if (code === 93) { - npcConfig.push('minimap=no'); - } else if (code === 95) { - let level: number | string = npc.g2(); - if (level === 0) { - level = 'hide'; - } - - npcConfig.push(`vislevel=${level}`); - } else if (code === 97) { - npcConfig.push(`resizeh=${npc.g2()}`); - } else if (code === 98) { - npcConfig.push(`resizev=${npc.g2()}`); - } else if (code === 99) { - npcConfig.push('alwaysontop=yes'); - } else if (code === 100) { - npcConfig.push(`ambient=${npc.g1b()}`); - } else if (code === 101) { - npcConfig.push(`contrast=${npc.g1b()}`); - } else if (code === 102) { - npcConfig.push(`headicon=${npc.g2()}`); - } else if (code === 103) { - npcConfig.push(`turnspeed=${npc.g2()}`); - } else if (code === 106) { - let multiNpcVarbit = npc.g2(); - if (multiNpcVarbit === 65535) { - multiNpcVarbit = -1; - } - - if (multiNpcVarbit !== -1) { - npcConfig.push(`multivarbit=varbit_${multiNpcVarbit}`); - } - - let multiNpcVarp = npc.g2(); - if (multiNpcVarp === 65535) { - multiNpcVarp = -1; - } - - if (multiNpcVarp !== -1) { - npcConfig.push(`multivar=varp_${multiNpcVarp}`); - } - - const count: number = npc.g1(); - const multiNpcs = new Int32Array(count + 1); - - for (let i: number = 0; i <= count; i++) { - multiNpcs[i] = npc.g2(); - - if (multiNpcs[i] === 65535) { - multiNpcs[i] = -1; - } - } - - for (let i: number = 0; i <= count; i++) { - if (multiNpcs[i] !== -1) { - npcConfig.push(`multinpc=${i},npc_${multiNpcs[i]}`); - } - } - } else if (code === 107) { - npcConfig.push('active=no'); - } else { - console.error(`Unrecognized npc config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/npc.pack`, - npcPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.npc`, npcConfig.join('\n') + '\n'); - -// ---- - -const objPack = []; -const objConfig = []; - -const obj = config.read('obj.dat'); - -if (!obj) { - throw new Error('missing obj.dat'); -} - -count = obj.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - objConfig.push(''); - } - - objPack.push(`obj_${id}`); - objConfig.push(`[obj_${id}]`); - - while (true) { - const code = obj.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - objConfig.push(`model=model_${obj.g2()}`); - } else if (code === 2) { - objConfig.push(`name=${obj.gjstr()}`); - } else if (code === 3) { - objConfig.push(`desc=${obj.gjstr()}`); - } else if (code === 4) { - objConfig.push(`2dzoom=${obj.g2()}`); - } else if (code === 5) { - objConfig.push(`2dxan=${obj.g2s()}`); - } else if (code === 6) { - objConfig.push(`2dyan=${obj.g2s()}`); - } else if (code === 7) { - objConfig.push(`2dxof=${obj.g2s()}`); - } else if (code === 8) { - objConfig.push(`2dyof=${obj.g2s()}`); - } else if (code === 9) { - objConfig.push('code9=yes'); - } else if (code === 10) { - objConfig.push(`code10=seq_${obj.g2()}`); - } else if (code === 11) { - objConfig.push('stackable=yes'); - } else if (code === 12) { - objConfig.push(`cost=${obj.g4()}`); - } else if (code === 16) { - objConfig.push('members=yes'); - } else if (code === 23) { - objConfig.push(`manwear=model_${obj.g2()},${obj.g1()}`); - } else if (code === 24) { - objConfig.push(`manwear2=model_${obj.g2()}`); - } else if (code === 25) { - objConfig.push(`womanwear=model_${obj.g2()},${obj.g1()}`); - } else if (code === 26) { - objConfig.push(`womanwear2=model_${obj.g2()}`); - } else if (code >= 30 && code < 35) { - objConfig.push(`op${code - 30 + 1}=${obj.gjstr()}`); - } else if (code >= 35 && code < 40) { - objConfig.push(`iop${code - 35 + 1}=${obj.gjstr()}`); - } else if (code === 40) { - const recol = obj.g1(); - - for (let i = 0; i < recol; i++) { - objConfig.push(`recol${i + 1}s=${obj.g2()}`); - objConfig.push(`recol${i + 1}d=${obj.g2()}`); - } - } else if (code === 78) { - objConfig.push(`manwear3=model_${obj.g2()}`); - } else if (code === 79) { - objConfig.push(`womanwear3=model_${obj.g2()}`); - } else if (code === 90) { - objConfig.push(`manhead=model_${obj.g2()}`); - } else if (code === 91) { - objConfig.push(`womanhead=model_${obj.g2()}`); - } else if (code === 92) { - objConfig.push(`manhead2=model_${obj.g2()}`); - } else if (code === 93) { - objConfig.push(`womanhead2=model_${obj.g2()}`); - } else if (code === 95) { - objConfig.push(`2dzan=${obj.g2()}`); - } else if (code === 97) { - objConfig.push(`certlink=obj_${obj.g2()}`); - } else if (code === 98) { - objConfig.push(`certtemplate=obj_${obj.g2()}`); - } else if (code >= 100 && code < 110) { - objConfig.push(`count${code - 100 + 1}=obj_${obj.g2()},${obj.g2()}`); - } else if (code === 110) { - objConfig.push(`resizex=${obj.g2()}`); - } else if (code === 111) { - objConfig.push(`resizey=${obj.g2()}`); - } else if (code === 112) { - objConfig.push(`resizez=${obj.g2()}`); - } else if (code === 113) { - objConfig.push(`ambient=${obj.g1b()}`); - } else if (code === 114) { - objConfig.push(`contrast=${obj.g1b()}`); - } else if (code === 115) { - objConfig.push(`team=${obj.g1()}`); - } else { - console.error(`Unrecognized obj config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/obj.pack`, - objPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.obj`, objConfig.join('\n') + '\n'); - -// ---- - -const seqPack = []; -const seqConfig = []; - -const seq = config.read('seq.dat'); - -if (!seq) { - throw new Error('missing seq.dat'); -} - -count = seq.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - seqConfig.push(''); - } - - seqPack.push(`seq_${id}`); - seqConfig.push(`[seq_${id}]`); - - while (true) { - const code = seq.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - const frames = seq.g1(); - - const frame = []; - const iframe = []; - const delay = []; - for (let j = 0; j < frames; j++) { - frame.push(seq.g2()); - iframe.push(seq.g2()); - delay.push(seq.g2()); - } - - for (let j = 0; j < frames; j++) { - seqConfig.push(`frame${j + 1}=anim_${frame[j]}`); - - if (delay[j] !== 0) { - seqConfig.push(`delay${j + 1}=${delay[j]}`); - } - } - - for (let j = 0; j < frames; j++) { - if (iframe[j] === 65535) { - continue; - } - - seqConfig.push(`iframe${j + 1}=anim_${iframe[j]}`); - } - } else if (code === 2) { - seqConfig.push(`replayoff=${seq.g2()}`); - } else if (code === 3) { - const labels = seq.g1(); - - let str = ''; - for (let i = 0; i < labels; i++) { - if (i > 0) { - str += ','; - } - - str += `label_${seq.g1()}`; - } - - seqConfig.push(`walkmerge=${str}`); - } else if (code === 4) { - if (decode194) { - seqConfig.push(`stretches=${seq.g2() === 1 ? 'yes' : 'no'}`); - } else { - seqConfig.push('stretches=yes'); - } - } else if (code === 5) { - seqConfig.push(`priority=${seq.g1()}`); - } else if (code === 6) { - let obj: number | string = seq.g2(); - if (obj === 0) { - obj = 'hide'; - } else { - obj = `obj_${obj - 512}`; - } - - seqConfig.push(`mainhand=${obj}`); - } else if (code === 7) { - let obj: number | string = seq.g2(); - if (obj === 0) { - obj = 'hide'; - } else { - obj = `obj_${obj - 512}`; - } - - seqConfig.push(`offhand=${obj}`); - } else if (code === 8) { - seqConfig.push(`replaycount=${seq.g1()}`); - } else { - console.error(`Unrecognized seq config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/seq.pack`, - seqPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.seq`, seqConfig.join('\n') + '\n'); - -// ---- - -const spotanimPack = []; -const spotanimConfig = []; - -const spotanim = config.read('spotanim.dat'); - -if (!spotanim) { - throw new Error('missing spotanim.dat'); -} - -count = spotanim.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - spotanimConfig.push(''); - } - - spotanimPack.push(`spotanim_${id}`); - spotanimConfig.push(`[spotanim_${id}]`); - - while (true) { - const code = spotanim.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - spotanimConfig.push(`model=model_${spotanim.g2()}`); - } else if (code === 2) { - spotanimConfig.push(`anim=seq_${spotanim.g2()}`); - } else if (code === 3) { - spotanimConfig.push('hasalpha=yes'); // TODO: inherit from anim - } else if (code === 4) { - spotanimConfig.push(`resizeh=${spotanim.g2()}`); - } else if (code === 5) { - spotanimConfig.push(`resizev=${spotanim.g2()}`); - } else if (code === 6) { - spotanimConfig.push(`orientation=${spotanim.g2()}`); - } else if (code === 7) { - spotanimConfig.push(`ambient=${spotanim.g1()}`); - } else if (code === 8) { - spotanimConfig.push(`contrast=${spotanim.g1()}`); - } else if (code >= 40 && code < 50) { - spotanimConfig.push(`recol${code - 40 + 1}s=${spotanim.g2()}`); - } else if (code >= 50 && code < 60) { - spotanimConfig.push(`recol${code - 50 + 1}d=${spotanim.g2()}`); - } else { - console.error(`Unrecognized spotanim config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/spotanim.pack`, - spotanimPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.spotanim`, spotanimConfig.join('\n') + '\n'); - -// ---- - -const varpPack = []; -const varpConfig = []; - -const varp = config.read('varp.dat'); - -if (!varp) { - throw new Error('missing varp.dat'); -} - -count = varp.g2(); -for (let id = 0; id < count; id++) { - if (id > 0) { - varpConfig.push(''); - } - - varpPack.push(`varp_${id}`); - varpConfig.push(`[varp_${id}]`); - - while (true) { - const code = varp.g1(); - if (code === 0) { - break; - } - - if (code === 1) { - varpConfig.push(`code1=${varp.g1()}`); - } else if (code === 2) { - varpConfig.push(`code2=${varp.g1()}`); - } else if (code === 3) { - varpConfig.push('code3=yes'); - } else if (code === 4) { - varpConfig.push('code4=no'); - } else if (code === 5) { - varpConfig.push(`clientcode=${varp.g2()}`); - } else if (code === 6) { - varpConfig.push('code6=yes'); - } else if (code === 7) { - varpConfig.push(`code7=${varp.g4()}`); - } else if (code === 8) { - varpConfig.push('code8=yes'); - } else if (code === 10) { - varpConfig.push(`code10=${varp.gjstr()}`); - } else { - console.error(`Unrecognized varp config code: ${code}`); - process.exit(1); - } - } -} - -fs.writeFileSync( - `${output}/pack/varp.pack`, - varpPack - .map((name, id) => `${id}=${name}`) - .filter(x => x) - .join('\n') + '\n' -); -fs.writeFileSync(`${output}/scripts/all.varp`, varpConfig.join('\n') + '\n'); diff --git a/src/lostcity/tools/unpack/run.ts b/src/lostcity/tools/unpack/run.ts new file mode 100644 index 000000000..10ec37a66 --- /dev/null +++ b/src/lostcity/tools/unpack/run.ts @@ -0,0 +1,60 @@ +import fs from 'fs'; + +import FileStream from '#jagex2/io/FileStream.js'; +import Jagfile from '#jagex2/io/Jagfile.js'; + +import { + decodeFlo, decodeIdk, decodeLoc, decodeNoOp, decodeNpc, + decodeObj, decodeSeq, decodeSpotAnim, decodeVarbit, decodeVarp, + readJag, unpackConfig, unpackMedia, unpackTextures, unpackTitle, + unpackWordenc +} from '#lostcity/util/CacheUnpack.js'; + +let title: Jagfile | null = null; +let config: Jagfile | null = null; +let interfaces: Jagfile | null = null; +let media: Jagfile | null = null; +let textures: Jagfile | null = null; +let wordenc: Jagfile | null = null; +let sounds: Jagfile | null = null; + +if (fs.existsSync('dump/main_file_cache.dat')) { + const cache = new FileStream('dump'); + + title = readJag(cache, 1); + config = readJag(cache, 2); + // interfaces = readJag(cache, 3); // todo + media = readJag(cache, 4); + textures = readJag(cache, 6); + wordenc = readJag(cache, 7); + sounds = readJag(cache, 8); // todo + + // const versionlist = readJag(cache, 5); // todo +} else { + title = Jagfile.load('dump/title'); + config = Jagfile.load('dump/config'); + interfaces = Jagfile.load('dump/interface'); + media = Jagfile.load('dump/media'); + textures = Jagfile.load('dump/textures'); + wordenc = Jagfile.load('dump/wordenc'); + sounds = Jagfile.load('dump/sounds'); + + const models = Jagfile.load('dump/models'); +} + +unpackTitle(title); +unpackMedia(media); +unpackTextures(textures); +unpackWordenc(wordenc); + +unpackConfig(config, 'loc', decodeLoc); +unpackConfig(config, 'npc', decodeNpc); +unpackConfig(config, 'obj', decodeObj); +unpackConfig(config, 'seq', decodeSeq); +unpackConfig(config, 'varp', decodeVarp); +unpackConfig(config, 'spotanim', decodeSpotAnim); +unpackConfig(config, 'idk', decodeIdk); +unpackConfig(config, 'flo', decodeFlo); +unpackConfig(config, 'varbit', decodeVarbit); +unpackConfig(config, 'mesanim', decodeNoOp); +unpackConfig(config, 'mes', decodeNoOp); diff --git a/src/lostcity/util/CacheUnpack.ts b/src/lostcity/util/CacheUnpack.ts new file mode 100644 index 000000000..f18652049 --- /dev/null +++ b/src/lostcity/util/CacheUnpack.ts @@ -0,0 +1,1195 @@ +import fs from 'fs'; +import Jimp from 'jimp'; + +import FileStream from '#jagex2/io/FileStream.js'; +import Jagfile from '#jagex2/io/Jagfile.js'; +import Packet from '#jagex2/io/Packet.js'; + +import { countPix, pixSize, unpackPix } from '#lostcity/util/PixUnpack.js'; + +export function readJag(cache: FileStream, id: number): Jagfile | null { + const raw = cache.read(0, id); + if (!raw) { + return null; + } + + return new Jagfile(new Packet(raw)); +} + +function unpackImage(dat: Packet | null, idx: Packet | null, id: number = 0) { + if (!dat || !idx) { + return; + } + + return unpackPix(dat, idx, id); +} + +function saveImage(img: Jimp | undefined, file: string) { + if (!img || !file) { + return; + } + + img.write(file + '.png'); +} + +function unpackAndSaveImage(jag: Jagfile, idx: Packet | null, file: string, outDir: string) { + if (!idx) { + return; + } + + const dat = jag.read(file + '.dat'); + if (!dat) { + return; + } + + const unpacked = unpackImage(dat, idx); + if (unpacked) { + saveImage(unpacked.img, 'data/src/' + outDir + '/' + file); + + // ---- + + if (!fs.existsSync('data/src/' + outDir + '/meta')) { + fs.mkdirSync('data/src/' + outDir + '/meta', { recursive: true }); + } + + const meta = `${unpacked.cropX},${unpacked.cropY},${unpacked.width},${unpacked.height},${unpacked.pixelOrder ? 'row' : 'column'}\n`; + fs.writeFileSync('data/src/' + outDir + '/meta/' + file + '.opt', meta); + + // ---- + + const pal = new Jimp(16, 16, 0xff00ffff).colorType(2); + + for (let j = 1; j < unpacked.palette.length; j++) { + const x = j % 16; + const y = Math.floor(j / 16); + + const color = unpacked.palette[j]; + + const pos = (x + y * 16) * 4; + pal.bitmap.data[pos] = (color >> 16) & 0xff; + pal.bitmap.data[pos + 1] = (color >> 8) & 0xff; + pal.bitmap.data[pos + 2] = color & 0xff; + } + + saveImage(pal, 'data/src/' + outDir + '/meta/' + file + '.pal'); + } +} + +function unpackAndSaveSheet(jag: Jagfile, idx: Packet | null, file: string, outDir: string) { + if (!idx) { + return; + } + + const dat = jag.read(file + '.dat'); + if (!dat) { + return; + } + + const size = pixSize(dat, idx); + const count = countPix(dat, idx); + + const sprites = []; + for (let i = 0; i < count; i++) { + sprites[i] = unpackPix(dat, idx, i); + } + + let width = Math.ceil(Math.sqrt(count)); + let height = Math.ceil(count / width); + + if (width * height > count) { + let widthTries = 0; + + // wrong aspect ratio, try subtracting from width and adding to height + while (width * height > count && widthTries < 10) { + width--; + height++; + widthTries++; + } + } + + const sheet = new Jimp(width * size.width, height * size.height, 0xff00ffff).colorType(2); + + for (let j = 0; j < count; j++) { + const x = j % width; + const y = Math.floor(j / width); + + sheet.blit(sprites[j].img, x * size.width, y * size.height, 0, 0, size.width, size.height); + } + + saveImage(sheet, 'data/src/' + outDir + '/' + file); + + // ---- + + if (!fs.existsSync('data/src/' + outDir + '/meta')) { + fs.mkdirSync('data/src/' + outDir + '/meta', { recursive: true }); + } + + let meta = `${size.width}x${size.height}\n`; + + for (let j = 0; j < count; j++) { + const sprite = sprites[j]; + meta += `${sprite.cropX},${sprite.cropY},${sprite.width},${sprite.height},${sprite.pixelOrder ? 'row' : 'column'}\n`; + } + + fs.writeFileSync('data/src/' + outDir + '/meta/' + file + '.opt', meta); + + // ---- + + const pal = new Jimp(16, 16, 0xff00ffff).colorType(2); + + for (let j = 1; j < sprites[0].palette.length; j++) { + const x = j % 16; + const y = Math.floor(j / 16); + + const color = sprites[0].palette[j]; + + const pos = (x + y * 16) * 4; + pal.bitmap.data[pos] = (color >> 16) & 0xff; + pal.bitmap.data[pos + 1] = (color >> 8) & 0xff; + pal.bitmap.data[pos + 2] = color & 0xff; + } + + saveImage(pal, 'data/src/' + outDir + '/meta/' + file + '.pal'); +} + +export function unpackAndSave(jag: Jagfile, idx: Packet | null, file: string, outDir: string) { + if (!idx) { + return; + } + + const dat = jag.read(file + '.dat'); + if (!dat) { + return; + } + + const count = countPix(dat, idx); + if (count === 1) { + unpackAndSaveImage(jag, idx, file, outDir); + } else { + unpackAndSaveSheet(jag, idx, file, outDir); + } +} + +export function unpackTitle(title: Jagfile | null) { + if (!title) { + return; + } + + const titleJpg = title.read('title.dat'); + if (titleJpg) { + titleJpg.save('data/src/binary/title.jpg', titleJpg.length); + } + + const index = title.read('index.dat'); + + unpackAndSave(title, index, 'logo', 'title'); + unpackAndSave(title, index, 'titlebox', 'title'); + unpackAndSave(title, index, 'titlebutton', 'title'); + unpackAndSave(title, index, 'runes', 'title'); + unpackAndSave(title, index, 'p11_full', 'fonts'); + unpackAndSave(title, index, 'p12_full', 'fonts'); + unpackAndSave(title, index, 'b12_full', 'fonts'); + unpackAndSave(title, index, 'q8_full', 'fonts'); +} + +export function unpackMedia(media: Jagfile | null) { + if (!media) { + return; + } + + const index = media.read('index.dat'); + + unpackAndSave(media, index, 'backbase1', 'sprites'); + unpackAndSave(media, index, 'backbase2', 'sprites'); + unpackAndSave(media, index, 'backhmid1', 'sprites'); + unpackAndSave(media, index, 'backhmid2', 'sprites'); + unpackAndSave(media, index, 'backleft1', 'sprites'); + unpackAndSave(media, index, 'backleft2', 'sprites'); + unpackAndSave(media, index, 'backright1', 'sprites'); + unpackAndSave(media, index, 'backright2', 'sprites'); + unpackAndSave(media, index, 'backtop1', 'sprites'); + unpackAndSave(media, index, 'backvmid1', 'sprites'); + unpackAndSave(media, index, 'backvmid2', 'sprites'); + unpackAndSave(media, index, 'backvmid3', 'sprites'); + unpackAndSave(media, index, 'mapback', 'sprites'); + unpackAndSave(media, index, 'chatback', 'sprites'); + unpackAndSave(media, index, 'invback', 'sprites'); + unpackAndSave(media, index, 'magicon', 'sprites'); + unpackAndSave(media, index, 'magicoff', 'sprites'); + unpackAndSave(media, index, 'prayeron', 'sprites'); + unpackAndSave(media, index, 'prayeroff', 'sprites'); + unpackAndSave(media, index, 'prayerglow', 'sprites'); + unpackAndSave(media, index, 'wornicons', 'sprites'); + unpackAndSave(media, index, 'sideicons', 'sprites'); + unpackAndSave(media, index, 'compass', 'sprites'); + unpackAndSave(media, index, 'miscgraphics', 'sprites'); + unpackAndSave(media, index, 'miscgraphics2', 'sprites'); + unpackAndSave(media, index, 'miscgraphics3', 'sprites'); + unpackAndSave(media, index, 'staticons', 'sprites'); + unpackAndSave(media, index, 'staticons2', 'sprites'); + unpackAndSave(media, index, 'combaticons', 'sprites'); + unpackAndSave(media, index, 'combaticons2', 'sprites'); + unpackAndSave(media, index, 'combaticons3', 'sprites'); + unpackAndSave(media, index, 'combatboxes', 'sprites'); + unpackAndSave(media, index, 'tradebacking', 'sprites'); + unpackAndSave(media, index, 'hitmarks', 'sprites'); + unpackAndSave(media, index, 'cross', 'sprites'); + unpackAndSave(media, index, 'mapdots', 'sprites'); + unpackAndSave(media, index, 'sworddecor', 'sprites'); + unpackAndSave(media, index, 'redstone1', 'sprites'); + unpackAndSave(media, index, 'redstone2', 'sprites'); + unpackAndSave(media, index, 'redstone3', 'sprites'); + unpackAndSave(media, index, 'leftarrow', 'sprites'); + unpackAndSave(media, index, 'rightarrow', 'sprites'); + unpackAndSave(media, index, 'steelborder', 'sprites'); + unpackAndSave(media, index, 'steelborder2', 'sprites'); + unpackAndSave(media, index, 'scrollbar', 'sprites'); + unpackAndSave(media, index, 'mapscene', 'sprites'); + unpackAndSave(media, index, 'mapfunction', 'sprites'); + unpackAndSave(media, index, 'magicon2', 'sprites'); + unpackAndSave(media, index, 'magicoff2', 'sprites'); + unpackAndSave(media, index, 'gnomeball_buttons', 'sprites'); + unpackAndSave(media, index, 'mapmarker', 'sprites'); + unpackAndSave(media, index, 'mod_icons', 'sprites'); + unpackAndSave(media, index, 'mapedge', 'sprites'); + unpackAndSave(media, index, 'leftarrow_small', 'sprites'); + unpackAndSave(media, index, 'rightarrow_small', 'sprites'); + unpackAndSave(media, index, 'blackmark', 'sprites'); + unpackAndSave(media, index, 'button_brown', 'sprites'); + unpackAndSave(media, index, 'button_red', 'sprites'); + unpackAndSave(media, index, 'chest', 'sprites'); + unpackAndSave(media, index, 'coins', 'sprites'); + unpackAndSave(media, index, 'key', 'sprites'); + unpackAndSave(media, index, 'keys', 'sprites'); + unpackAndSave(media, index, 'pen', 'sprites'); + unpackAndSave(media, index, 'startgame', 'sprites'); + unpackAndSave(media, index, 'titlescroll', 'sprites'); + unpackAndSave(media, index, 'letter', 'sprites'); + unpackAndSave(media, index, 'button_brown_big', 'sprites'); + unpackAndSave(media, index, 'headicons_pk', 'sprites'); + unpackAndSave(media, index, 'headicons_prayer', 'sprites'); + unpackAndSave(media, index, 'headicons_hint', 'sprites'); + unpackAndSave(media, index, 'overlay_multiway', 'sprites'); + unpackAndSave(media, index, 'overlay_duel', 'sprites'); + unpackAndSave(media, index, 'tex_brown', 'sprites'); + unpackAndSave(media, index, 'tex_red', 'sprites'); + unpackAndSave(media, index, 'number_button', 'sprites'); +} + +export function unpackTextures(textures: Jagfile | null) { + if (!textures) { + return null; + } + + const index = textures.read('index.dat'); + + for (let i = 0; i < 50; i++) { + unpackAndSave(textures, index, i.toString(), 'textures'); + } +} + +export function unpackConfig(jag: Jagfile | null, name: string, decoder: (dat: Packet, code: number) => string | string[] | null) { + if (!jag) { + return; + } + + const dat = jag.read(name + '.dat'); + if (!dat) { + return; + } + + const packOut = 'data/src/pack/' + name + '.pack'; + fs.mkdirSync('data/src/pack', { recursive: true }); + fs.writeFileSync(packOut, ''); + + const srcOut = 'data/src/scripts/_unpack/all.' + name; + fs.mkdirSync('data/src/scripts/_unpack', { recursive: true }); + fs.writeFileSync(srcOut, ''); + + const count: number = dat.g2(); + for (let id = 0; id < count; id++) { + if (id > 0) { + fs.appendFileSync(srcOut, '\n'); + } + + fs.appendFileSync(packOut, id + '=' + name + '_' + id + '\n'); + + const src: string[] = []; + src.push('[' + name + '_' + id + ']'); + + while (true) { + const code = dat.g1(); + if (code === 0) { + break; + } + + const out = decoder(dat, code); + if (out === null) { + console.log('Unrecognized ' + name + ' config code: ' + code); + process.exit(1); + } + + if (Array.isArray(out)) { + src.push(...out); + } else if (out.length > 0) { + src.push(out); + } + } + + fs.appendFileSync(srcOut, src.join('\n') + '\n'); + } + + console.log(count, name + ' configs unpacked'); +} + + +enum LocShape { + wall_straight, + wall_diagonalcorner, + wall_l, + wall_squarecorner, + walldecor_straight_nooffset, + walldecor_straight_offset, + walldecor_diagonal_nooffset, + walldecor_diagonal_offset, + walldecor_diagonal_both, + wall_diagonal, + centrepiece_straight, + centrepiece_diagonal, + roof_straight, + roof_diagonal_with_roofedge, + roof_diagonal, + roof_l_concave, + roof_l_convex, + roof_flat, + roofedge_straight, + roofedge_diagonalcorner, + roofedge_l, + roofedge_squarecorner, + grounddecor, +} + +export function decodeLoc(dat: Packet, code: number) { + if (code === 1 || code === 5) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const id = dat.g2(); + let shape = 10; + + if (code === 1) { + shape = dat.g1(); + } + + out.push('model' + (i + 1) + '=model_' + id + ',' + LocShape[shape]); + } + + return out; + } else if (code === 2) { + const value = dat.gjstr(); + return 'name=' + value; + } else if (code === 3) { + const value = dat.gjstr(); + return 'desc=' + value; + } else if (code === 14) { + const value = dat.g1(); + return 'width=' + value; + } else if (code === 15) { + const value = dat.g1(); + return 'length=' + value; + } else if (code === 17) { + return 'blockwalk=no'; + } else if (code === 18) { + return 'blockrange=no'; + } else if (code === 19) { + const value = dat.gbool(); + return 'active=' + (value ? 'yes' : 'no'); + } else if (code === 21) { + return 'hillskew=yes'; + } else if (code === 22) { + return 'sharelight=yes'; + } else if (code === 23) { + return 'occlude=yes'; + } else if (code === 24) { + const id = dat.g2(); + return 'anim=seq_' + id; + } else if (code === 25) { + return 'hasalpha=yes'; + } else if (code === 28) { + const value = dat.g1(); + return 'wallwidth=' + value; + } else if (code === 29) { + const value = dat.g1b(); + return 'ambient=' + value; + } else if (code === 39) { + const value = dat.g1b(); + return 'contrast=' + value; + } else if (code >= 30 && code < 39) { + const value = dat.gjstr(); + + const index = code - 30; + return 'op' + (index + 1) + '=' + value; + } else if (code === 40) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const src = dat.g2(); + const dst = dat.g2(); + + out.push('recol' + (i + 1) + 's=' + src); + out.push('recol' + (i + 1) + 'd=' + dst); + } + + return out; + } else if (code === 41) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const src = dat.g2(); + const dst = dat.g2(); + + out.push('//unsupported: retex' + (i + 1) + 's=' + src); + out.push('//unsupported: retex' + (i + 1) + 'd=' + dst); + } + + return out; + } else if (code === 60 || code === 82) { + const value = dat.g2(); + return 'mapfunction=' + value; + } else if (code === 62) { + return 'mirror=yes'; + } else if (code === 64) { + return 'shadow=no'; + } else if (code === 65) { + const value = dat.g2(); + return 'resizex=' + value; + } else if (code === 66) { + const value = dat.g2(); + return 'resizey=' + value; + } else if (code === 67) { + const value = dat.g2(); + return 'resizez=' + value; + } else if (code === 68) { + const value = dat.g2(); + return 'mapscene=' + value; + } else if (code === 69) { + const flags = dat.g1(); + + if ((flags & 0x1) === 0) { + return 'forceapproach=north'; + } else if ((flags & 0x2) === 0) { + return 'forceapproach=east'; + } else if ((flags & 0x4) === 0) { + return 'forceapproach=south'; + } else if ((flags & 0x8) === 0) { + return 'forceapproach=west'; + } + } else if (code === 70) { + const value = dat.g2s(); + return 'xoff=' + value; + } else if (code === 71) { + const value = dat.g2s(); + return 'yoff=' + value; + } else if (code === 72) { + const value = dat.g2s(); + return 'zoff=' + value; + } else if (code === 73) { + return 'forcedecor=yes'; + } else if (code === 74) { + return '//unsupported: breakroutefinding=yes'; + } else if (code === 75) { + const value = dat.gbool(); + return '//unsupported: raiseobject=' + (value ? 'yes' : 'no'); + } else if (code === 77 || code === 92) { + const out: string[] = []; + + let multiLocVarbit = dat.g2(); + if (multiLocVarbit === 65535) { + multiLocVarbit = -1; + } + + if (multiLocVarbit !== -1) { + out.push('//unsupported: multivar=varbit_' + multiLocVarbit); + } + + let multiLocVarp = dat.g2(); + if (multiLocVarp === 65535) { + multiLocVarp = -1; + } + + if (multiLocVarp !== -1) { + out.push('//unsupported: multivar=varp_' + multiLocVarp); + } + + let defaultMultiLoc: number = -1; + if (code === 92) { + defaultMultiLoc = dat.g2(); + + if (defaultMultiLoc === 65535) { + defaultMultiLoc = -1; + } + } + + const count: number = dat.g1(); + const multiLocs = new Int32Array(count + 1); + + for (let i: number = 0; i <= count; i++) { + multiLocs[i] = dat.g2(); + + if (multiLocs[i] === 65535) { + multiLocs[i] = -1; + } + } + + multiLocs[count + 1] = defaultMultiLoc; + + if (defaultMultiLoc !== -1) { + out.push('//unsupported: defaultloc=loc_' + defaultMultiLoc); + } + + for (let i: number = 0; i <= count; i++) { + if (multiLocs[i] !== -1) { + out.push('//unsupported: multiloc=' + i + ',loc_' + multiLocs[i]); + } + } + + return out; + } else if (code === 78) { + const id = dat.g2(); + const value2 = dat.g1(); + return '//unsupported: bgsound=sound_' + id + ',' + value2; + } else if (code === 79) { + const out: string[] = []; + out.push('//unsupported: randomsound=' + dat.g2() + ',' + dat.g2() + ',' + dat.g1()); + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const id = dat.g2(); + out.push('//unsupported: randomsound' + (i + 1) + '=sound_' + id); + } + + out.push('//unsupported: bgsound=sound_' + dat.g2() + ',' + dat.g1()); + return out; + } else if (code === 81) { + const value = dat.g1(); + return '//unsupported: treeskew=' + value; + } + + return null; +} + +export function decodeNpc(dat: Packet, code: number) { + if (code === 1) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const id = dat.g2(); + out.push('model' + (i + 1) + '=model_' + id); + } + + return out; + } else if (code === 2) { + const value = dat.gjstr(); + return 'name=' + value; + } else if (code === 3) { + const value = dat.gjstr(); + return 'desc=' + value; + } else if (code === 12) { + const value = dat.g1(); + return 'size=' + value; + } else if (code === 13) { + const id = dat.g2(); + return 'readyanim=seq_' + id; + } else if (code === 14) { + const id = dat.g2(); + return 'walkanim=seq_' + id; + } else if (code === 16) { + return 'hasalpha=yes'; + } else if (code === 17) { + const front = dat.g2(); + const back = dat.g2(); + const right = dat.g2(); + const left = dat.g2(); + + return 'walkanim=seq_' + front + ',seq_' + back + ',seq_' + right + ',seq_' + left; + } else if (code >= 30 && code < 40) { + const value = dat.gjstr(); + + const index = code - 30; + return 'op' + (index + 1) + '=' + value; + } else if (code === 40) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const src = dat.g2(); + const dst = dat.g2(); + + out.push('recol' + (i + 1) + 's=' + src); + out.push('recol' + (i + 1) + 'd=' + dst); + } + + return out; + } else if (code === 60) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const id = dat.g2(); + out.push('head' + (i + 1) + '=model_' + id); + } + + return out; + } else if (code === 90) { + const value = dat.g2(); + return 'code90=' + value; + } else if (code === 91) { + const value = dat.g2(); + return 'code91=' + value; + } else if (code === 92) { + const value = dat.g2(); + return 'code92=' + value; + } else if (code === 93) { + return 'minimap=no'; + } else if (code === 95) { + const value = dat.g2(); + + if (value === 0) { + return 'vislevel=hide'; + } + + return 'vislevel=' + value; + } else if (code === 97) { + const value = dat.g2(); + return 'resizeh=' + value; + } else if (code === 98) { + const value = dat.g2(); + return 'resizev=' + value; + } else if (code === 99) { + return '//unsupported: alwaysontop=yes'; + } else if (code === 100) { + const value = dat.g1b(); + return '//unsupported: ambient=' + value; + } else if (code === 101) { + const value = dat.g1b(); + return '//unsupported: contrast=' + value; + } else if (code === 102) { + const value = dat.g2(); + return '//unsupported: headicon=' + value; + } else if (code === 103) { + const value = dat.g2(); + return '//unsupported: turnspeed=' + value; + } else if (code === 106) { + const out: string[] = []; + + let multiNpcVarbit = dat.g2(); + if (multiNpcVarbit === 65535) { + multiNpcVarbit = -1; + } + + if (multiNpcVarbit !== -1) { + out.push('//unsupported: multivar=varbit_' + multiNpcVarbit); + } + + let multiNpcVarp = dat.g2(); + if (multiNpcVarp === 65535) { + multiNpcVarp = -1; + } + + if (multiNpcVarp !== -1) { + out.push('//unsupported: multivar=varp_' + multiNpcVarp); + } + + const count: number = dat.g1(); + const multiNpcs = new Int32Array(count + 1); + + for (let i: number = 0; i <= count; i++) { + multiNpcs[i] = dat.g2(); + if (multiNpcs[i] === 65535) { + multiNpcs[i] = -1; + } + } + + for (let i: number = 0; i <= count; i++) { + if (multiNpcs[i] !== -1) { + out.push('//unsupported: multinpc' + (i + 1) + '=npc_' + multiNpcs[i]); + } + } + + return out; + } else if (code === 107) { + return '//unsupported: active=no'; + } + + return null; +} + +export function decodeObj(dat: Packet, code: number) { + if (code === 1) { + const id = dat.g2(); + return 'model=model_' + id; + } else if (code === 2) { + const value = dat.gjstr(); + return 'name=' + value; + } else if (code === 3) { + const value = dat.gjstr(); + return 'desc=' + value; + } else if (code === 4) { + const value = dat.g2s(); + return '2dzoom=' + value; + } else if (code === 5) { + const value = dat.g2s(); + return '2dxan=' + value; + } else if (code === 6) { + const value = dat.g2s(); + return '2dyan=' + value; + } else if (code === 7) { + const value = dat.g2s(); + return '2dxof=' + value; + } else if (code === 8) { + const value = dat.g2s(); + return '2dyof=' + value; + } else if (code === 9) { + return 'code9=yes'; + } else if (code === 10) { + const id = dat.g2(); + return 'code10=seq_' + id; + } else if (code === 11) { + return 'stackable=yes'; + } else if (code === 12) { + const value = dat.g4(); + return 'cost=' + value; + } else if (code === 16) { + return 'members=yes'; + } else if (code === 23) { + const id = dat.g2(); + const offset = dat.g1(); + return 'manwear=model_' + id + ',' + offset; + } else if (code === 24) { + const id = dat.g2(); + return 'manwear2=model_' + id; + } else if (code === 25) { + const id = dat.g2(); + const offset = dat.g1(); + return 'womanwear=model_' + id + ',' + offset; + } else if (code === 26) { + const id = dat.g2(); + return 'womanwear2=model_' + id; + } else if (code >= 30 && code < 35) { + const value = dat.gjstr(); + + const index = code - 30; + return 'op' + (index + 1) + '=' + value; + } else if (code >= 35 && code < 40) { + const value = dat.gjstr(); + + const index = code - 35; + return 'iop' + (index + 1) + '=' + value; + } else if (code === 40) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const src = dat.g2(); + const dst = dat.g2(); + + out.push('recol' + (i + 1) + 's=' + src); + out.push('recol' + (i + 1) + 'd=' + dst); + } + + return out; + } else if (code === 78) { + const id = dat.g2(); + return 'manwear3=model_' + id; + } else if (code === 79) { + const id = dat.g2(); + return 'womanwear3=model_' + id; + } else if (code === 90) { + const id = dat.g2(); + return 'manhead=model_' + id; + } else if (code === 91) { + const id = dat.g2(); + return 'womanhead=model_' + id; + } else if (code === 92) { + const id = dat.g2(); + return 'manhead2=model_' + id; + } else if (code === 93) { + const id = dat.g2(); + return 'womanhead2=model_' + id; + } else if (code === 95) { + const value = dat.g2s(); + return '2dzan=' + value; + } else if (code === 97) { + const id = dat.g2(); + return 'certlink=obj_' + id; + } else if (code === 98) { + const id = dat.g2(); + return 'certtemplate=obj_' + id; + } else if (code >= 100 && code < 110) { + const id = dat.g2(); + const count = dat.g2(); + + const index = code - 100; + return 'count' + (index + 1) + '=obj_' + id + ',' + count; + } else if (code === 110) { + const value = dat.g2(); + return '//unsupported: resizex=' + value; + } else if (code === 111) { + const value = dat.g2(); + return '//unsupported: resizey=' + value; + } else if (code === 112) { + const value = dat.g2(); + return '//unsupported: resizez=' + value; + } else if (code === 113) { + const value = dat.g1b(); + return '//unsupported: ambient=' + value; + } else if (code === 114) { + const value = dat.g1b(); + return '//unsupported: contrast=' + value; + } else if (code === 115) { + const value = dat.g1(); + return '//unsupported: team=' + value; + } + + return null; +} + +export function decodeSeq(dat: Packet, code: number) { + if (code === 1) { + const frame = []; + const iframe = []; + const delay = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + frame[i] = dat.g2(); + + iframe[i] = dat.g2(); + if (iframe[i] === 65535) { + iframe[i] = -1; + } + + delay[i] = dat.g2(); + } + + const out: string[] = []; + + for (let i = 0; i < count; i++) { + out.push('frame' + (i + 1) + '=anim_' + frame[i]); + + if (delay[i] !== 0) { + out.push('delay' + (i + 1) + '=' + delay[i]); + } + } + + for (let i = 0; i < count; i++) { + if (iframe[i] === -1) { + continue; + } + + out.push('iframe' + (i + 1) + '=anim_' + iframe[i]); + } + + return out; + } else if (code === 2) { + const value = dat.g2(); + return 'replayoff=' + value; + } else if (code === 3) { + const count = dat.g1(); + + const labels = []; + for (let i = 0; i < count; i++) { + labels[i] = dat.g1(); + } + + return 'walkmerge=' + labels.map(l => 'label_' + l).join(','); + } else if (code === 4) { + return 'stretches=yes'; + } else if (code === 5) { + const value = dat.g1(); + return 'priority=' + value; + } else if (code === 6) { + const id = dat.g2(); + + if (id === 0) { + return 'righthand=hide'; + } else { + return 'righthand=obj_' + (id - 512); + } + } else if (code === 7) { + const id = dat.g2(); + + if (id === 0) { + return 'lefthand=hide'; + } else { + return 'lefthand=obj_' + (id - 512); + } + } else if (code === 8) { + const value = dat.g1(); + return 'replaycount=' + value; + } else if (code === 9) { + const value = dat.g1(); + return '//unsupported: code9=' + value; + } else if (code === 10) { + const value = dat.g1(); + return '//unsupported: code10=' + value; + } else if (code === 11) { + const value = dat.g1(); + return '//unsupported: code11=' + value; + } else if (code === 12) { + const value = dat.g4(); + return '//unsupported: code12=' + value; + } + + return null; +} + +export function decodeVarp(dat: Packet, code: number) { + if (code === 5) { + const value = dat.g2(); + return 'clientcode=' + value; + } + + return null; +} + +export function decodeSpotAnim(dat: Packet, code: number) { + if (code === 1) { + const id = dat.g2(); + return 'model=model_' + id; + } else if (code === 2) { + const id = dat.g2(); + return 'anim=seq_' + id; + } else if (code === 3) { + return 'hasalpha=yes'; + } else if (code === 4) { + const size = dat.g2(); + return 'resizeh=' + size; + } else if (code === 5) { + const size = dat.g2(); + return 'resizev=' + size; + } else if (code === 6) { + const angle = dat.g2(); + return 'orientation=' + angle; + } else if (code === 7) { + const value = dat.g1(); + return 'ambient=' + value; + } else if (code === 8) { + const value = dat.g1(); + return 'contrast=' + value; + } else if (code >= 40 && code < 50) { + const hsl16 = dat.g2(); + + const index = code - 40; + return 'recol' + (index + 1) + 's=' + hsl16; + } else if (code >= 50 && code < 60) { + const hsl16 = dat.g2(); + + const index = code - 50; + return 'recol' + (index + 1) + 'd=' + hsl16; + } + + return null; +} + +enum IdkBodyPart { + man_hair, + man_jaw, + man_torso, + man_arms, + man_hands, + man_legs, + man_feet, + woman_hair, + woman_jaw, + woman_torso, + woman_arms, + woman_hands, + woman_legs, + woman_feet +} + +export function decodeIdk(dat: Packet, code: number) { + if (code === 1) { + const type = dat.g1(); + return 'type=' + IdkBodyPart[type]; + } else if (code === 2) { + const out: string[] = []; + + const count = dat.g1(); + for (let i = 0; i < count; i++) { + const id = dat.g2(); + out.push(`model${i + 1}=model_${id}`); + } + + return out; + } else if (code === 3) { + return 'disable=yes'; + } else if (code >= 40 && code < 50) { + const hsl16 = dat.g2(); + + const index = code - 40; + return 'recol' + (index + 1) + 's=' + hsl16; + } else if (code >= 50 && code < 60) { + const hsl16 = dat.g2(); + + const index = code - 50; + return 'recol' + (index + 1) + 'd=' + hsl16; + } else if (code >= 60 && code < 70) { + const id = dat.g2(); + + const index = code - 60; + return `head${index + 1}=model_${id}`; + } + + return null; +} + +export function decodeFlo(dat: Packet, code: number) { + if (code === 1) { + const colour = dat.g3(); + return 'rgb=0x' + colour.toString(16).toUpperCase().padStart(6, '0'); + } else if (code === 2) { + const texture = dat.g1(); + return 'texture=' + texture; + } else if (code === 3) { + return 'overlay=yes'; + } else if (code === 5) { + return 'occlude=no'; + } else if (code === 6) { + const name = dat.gjstr(); + return 'editname=' + name; + } else if (code === 7) { + const average = dat.g3(); + return '//unsupported: maprgb=0x' + average.toString(16).toUpperCase().padStart(6, '0'); + } + + return null; +} + +export function decodeVarbit(dat: Packet, code: number) { + if (code === 1) { + const basevar = dat.g2(); + const startbit = dat.g1(); + const endbit = dat.g1(); + + const out: string[] = []; + out.push('//unsupported: basevar=varp_' + basevar); + out.push('//unsupported: startbit=' + startbit); + out.push('//unsupported: endbit=' + endbit); + return out; + } + + return null; +} + +export function decodeNoOp(dat: Packet, code: number) { + return null; +} + +export function unpackWordenc(jag: Jagfile | null) { + if (!jag) { + return; + } + + const badenc = jag.read('badenc.txt'); + const domainenc = jag.read('domainenc.txt'); + const fragmentsenc = jag.read('fragmentsenc.txt'); + const tldlist = jag.read('tldlist.txt'); + + if (!badenc) { + return; + } + + if (!domainenc) { + return; + } + + if (!fragmentsenc) { + return; + } + + if (!tldlist) { + return; + } + + fs.mkdirSync('data/src/wordenc', { recursive: true }); + + // ---- + + { + fs.writeFileSync('data/src/wordenc/badenc.txt', ''); + + const total = badenc.g4(); + for (let i = 0; i < total; i++) { + let badword = ''; + const count = badenc.g1(); + for (let j = 0; j < count; j++) { + badword += String.fromCharCode(badenc.g1()); + } + fs.appendFileSync('data/src/wordenc/badenc.txt', badword); + + const combinations = badenc.g1(); + for (let j = 0; j < combinations; j++) { + const a = badenc.g1(); + const b = badenc.g1(); + + fs.appendFileSync('data/src/wordenc/badenc.txt', ` ${a}:${b}`); + } + + fs.appendFileSync('data/src/wordenc/badenc.txt', '\n'); + } + } + + // ---- + + { + fs.writeFileSync('data/src/wordenc/domainenc.txt', ''); + + const total = domainenc.g4(); + for (let i = 0; i < total; i++) { + let domain = ''; + const count = domainenc.g1(); + for (let j = 0; j < count; j++) { + domain += String.fromCharCode(domainenc.g1()); + } + + fs.appendFileSync('data/src/wordenc/domainenc.txt', domain + '\n'); + } + } + + // ---- + + { + fs.writeFileSync('data/src/wordenc/fragmentsenc.txt', ''); + + const total = fragmentsenc.g4(); + for (let i = 0; i < total; i++) { + const fragment = fragmentsenc.g2(); + fs.appendFileSync('data/src/wordenc/fragmentsenc.txt', fragment + '\n'); + } + } + + // ---- + + { + fs.writeFileSync('data/src/wordenc/tldlist.txt', ''); + + const total = tldlist.g4(); + for (let i = 0; i < total; i++) { + const type = tldlist.g1(); + + let tld = ''; + const count = tldlist.g1(); + for (let j = 0; j < count; j++) { + tld += String.fromCharCode(tldlist.g1()); + } + + fs.appendFileSync('data/src/wordenc/tldlist.txt', `${tld} ${type}\n`); + } + } +} From 5c194337d7040d4e3a2a9763ec721e7befce37a2 Mon Sep 17 00:00:00 2001 From: Indio <144697121+Indio3@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:05:43 -0400 Subject: [PATCH 37/50] fix(engine): Write cam packets after map update (#553) * fix: write cam packets after map update * fix: change field naming * refactor: rename in player.ts --------- Co-authored-by: Pazaz --- .../engine/script/handlers/PlayerOps.ts | 13 +++-------- src/lostcity/entity/CameraInfo.ts | 22 +++++++++++++++++++ src/lostcity/entity/Player.ts | 8 +++++++ src/lostcity/server/ServerProt.ts | 3 +++ 4 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 src/lostcity/entity/CameraInfo.ts diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 42741af25..327d59690 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -14,6 +14,7 @@ import { PlayerQueueType, ScriptArgument } from '#lostcity/entity/EntityQueueReq import { PlayerTimerType } from '#lostcity/entity/EntityTimer.js'; import { isNetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { Position } from '#lostcity/entity/Position.js'; +import CameraInfo from '#lostcity/entity/CameraInfo.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerProt from '#lostcity/server/ServerProt.js'; @@ -144,22 +145,14 @@ const PlayerOps: CommandHandlers = { const [coord, height, rotationSpeed, rotationMultiplier] = state.popInts(4); const pos: Position = check(coord, CoordValid); - - const localX = pos.x - Position.zoneOrigin(state.activePlayer.loadedX); - const localZ = pos.z - Position.zoneOrigin(state.activePlayer.loadedZ); - - state.activePlayer.writeLowPriority(ServerProt.CAM_LOOKAT, localX, localZ, height, rotationSpeed, rotationMultiplier); + state.activePlayer.cameraPackets.addTail(new CameraInfo(ServerProt.CAM_LOOKAT, pos.x, pos.z, height, rotationSpeed, rotationMultiplier)); }), [ScriptOpcode.CAM_MOVETO]: checkedHandler(ActivePlayer, state => { const [coord, height, rotationSpeed, rotationMultiplier] = state.popInts(4); const pos: Position = check(coord, CoordValid); - - const localX = pos.x - Position.zoneOrigin(state.activePlayer.loadedX); - const localZ = pos.z - Position.zoneOrigin(state.activePlayer.loadedZ); - - state.activePlayer.writeLowPriority(ServerProt.CAM_MOVETO, localX, localZ, height, rotationSpeed, rotationMultiplier); + state.activePlayer.cameraPackets.addTail(new CameraInfo(ServerProt.CAM_MOVETO, pos.x, pos.z, height, rotationSpeed, rotationMultiplier)); }), [ScriptOpcode.CAM_SHAKE]: checkedHandler(ActivePlayer, state => { diff --git a/src/lostcity/entity/CameraInfo.ts b/src/lostcity/entity/CameraInfo.ts new file mode 100644 index 000000000..7765c7533 --- /dev/null +++ b/src/lostcity/entity/CameraInfo.ts @@ -0,0 +1,22 @@ +import Linkable from '#jagex2/datastruct/Linkable.js'; +import { CameraProt } from '#lostcity/server/ServerProt.js'; + +export default class CameraInfo extends Linkable { + + readonly type: CameraProt; + readonly camX : number; + readonly camZ : number; + readonly height : number; + readonly rotationSpeed : number; + readonly rotationMultiplier : number; + + constructor(type: CameraProt, camX : number, camZ : number, height : number, rotationSpeed : number, rotationMultiplier : number) { + super(); + this.type = type; + this.camX = camX; + this.camZ = camZ; + this.height = height; + this.rotationSpeed = rotationSpeed; + this.rotationMultiplier = rotationMultiplier; + } +} \ No newline at end of file diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index eeab2f86b..2c40afd75 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -23,6 +23,7 @@ import MoveRestrict from '#lostcity/entity/MoveRestrict.js'; import Obj from '#lostcity/entity/Obj.js'; import PathingEntity from '#lostcity/entity/PathingEntity.js'; import { Position } from '#lostcity/entity/Position.js'; +import CameraInfo from '#lostcity/entity/CameraInfo.js'; import ServerProt, { ServerProtEncoders } from '#lostcity/server/ServerProt.js'; @@ -272,6 +273,7 @@ export default class Player extends PathingEntity { queue: LinkList = new LinkList(); weakQueue: LinkList = new LinkList(); engineQueue: LinkList = new LinkList(); + cameraPackets: LinkList = new LinkList(); timers: Map = new Map(); modalState = 0; modalTop = -1; @@ -947,6 +949,12 @@ export default class Player extends PathingEntity { this.loadedZ = this.z; this.loadedZones = {}; } + for (let info = this.cameraPackets.head(); info !== null; info = this.cameraPackets.next()) { + const localX = info.camX - Position.zoneOrigin(this.loadedX); + const localZ = info.camZ - Position.zoneOrigin(this.loadedZ); + this.writeLowPriority(info.type, localX, localZ, info.height, info.rotationSpeed, info.rotationMultiplier); + info.unlink(); + } if (this.moveSpeed === MoveSpeed.INSTANT && this.jump) { this.loadedZones = {}; diff --git a/src/lostcity/server/ServerProt.ts b/src/lostcity/server/ServerProt.ts index 02c08cc15..25cf1d0e6 100644 --- a/src/lostcity/server/ServerProt.ts +++ b/src/lostcity/server/ServerProt.ts @@ -118,6 +118,9 @@ export default class ServerProt { } } +// for type safety in CameraInfo +export type CameraProt = typeof ServerProt.CAM_MOVETO | typeof ServerProt.CAM_LOOKAT; + // TODO: come up with another solution that preserves type-safety? export const ServerProtEncoders: { [key: number]: (buf: Packet, ...args: any[]) => void; From a05b90ba2b794ae47d6e4c53430f00c1cbc1bb51 Mon Sep 17 00:00:00 2001 From: Jordan Date: Thu, 6 Jun 2024 20:06:19 -0400 Subject: [PATCH 38/50] fix(engine): inclusion of pathing to pathing entity scenarios (#555) fix(engine): includion of pathing to pathing entity scenarios --- src/lostcity/engine/script/ScriptProvider.ts | 4 +-- .../engine/script/handlers/PlayerOps.ts | 6 ----- src/lostcity/entity/Npc.ts | 4 +-- src/lostcity/entity/PathingEntity.ts | 26 ++++++++++++++++--- src/lostcity/entity/Player.ts | 11 ++------ 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/lostcity/engine/script/ScriptProvider.ts b/src/lostcity/engine/script/ScriptProvider.ts index 411269fc4..5584756a4 100644 --- a/src/lostcity/engine/script/ScriptProvider.ts +++ b/src/lostcity/engine/script/ScriptProvider.ts @@ -3,7 +3,7 @@ import Packet from '#jagex2/io/Packet.js'; import Script from '#lostcity/engine/script/Script.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; -import NpcMode from '#lostcity/entity/NpcMode.js'; +import {TargetOp} from '#lostcity/entity/PathingEntity.js'; // maintains a list of scripts (id <-> name) export default class ScriptProvider { @@ -120,7 +120,7 @@ export default class ScriptProvider { * @param type The script subject type id. * @param category The script subject category id. */ - static getByTrigger(trigger: ServerTriggerType | NpcMode, type: number = -1, category: number = -1): Script | undefined { + static getByTrigger(trigger: TargetOp, type: number = -1, category: number = -1): Script | undefined { let script = ScriptProvider.scriptLookup.get(trigger | (0x2 << 8) | (type << 10)); if (script) { return script; diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 327d59690..72c70e3a6 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -817,12 +817,6 @@ const PlayerOps: CommandHandlers = { if (type < 0 || type >= 5) { throw new Error(`Invalid opobj: ${type + 1}`); } - if (state.activePlayer.target !== null) { - return; - } - if (state.activePlayer.hasWaypoints()) { - return; - } state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, state.activeObj, ServerTriggerType.APOBJ1 + type); }), diff --git a/src/lostcity/entity/Npc.ts b/src/lostcity/entity/Npc.ts index 4b556d108..45858c115 100644 --- a/src/lostcity/entity/Npc.ts +++ b/src/lostcity/entity/Npc.ts @@ -187,7 +187,7 @@ export default class Npc extends PathingEntity { } if (repathAllowed && this.target instanceof PathingEntity && !this.interacted && this.walktrigger === -1) { - this.pathToTarget(); + this.pathToPathingTarget(); } if (this.walktrigger !== -1) { @@ -542,8 +542,6 @@ export default class Npc extends PathingEntity { return; } - this.interacted = false; - const apTrigger: boolean = (this.targetOp >= NpcMode.APNPC1 && this.targetOp <= NpcMode.APNPC5) || (this.targetOp >= NpcMode.APPLAYER1 && this.targetOp <= NpcMode.APPLAYER5) || diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index cb53b1763..0f970f5f0 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -22,7 +22,7 @@ type TargetSubject = { com: number; } -type TargetOp = ServerTriggerType | NpcMode; +export type TargetOp = ServerTriggerType | NpcMode; export default abstract class PathingEntity extends Entity { // constructor properties @@ -307,9 +307,9 @@ export default abstract class PathingEntity extends Entity { } /* - * Returns if this PathingEntity is at the last waypoint. + * Returns if this PathingEntity is at the last waypoint or has no waypoint. */ - isLastWaypoint(): boolean { + isLastOrNoWaypoint(): boolean { return this.waypointIndex <= 0; } @@ -348,6 +348,22 @@ export default abstract class PathingEntity extends Entity { return Position.distanceTo(this, target) <= range && rsmod.hasLineOfSight(this.level, this.x, this.z, target.x, target.z, this.width, this.length, target.width, target.length, CollisionFlag.PLAYER); } + pathToPathingTarget(): void { + if (!this.target) { + return; + } + + if (!this.isLastOrNoWaypoint()) { + return; + } + + if (this.targetX === this.target.x && this.targetZ === this.target.z && !Position.intersects(this.x, this.z, this.width, this.length, this.target.x, this.target.z, this.target.width, this.target.length)) { + return; + } + + this.pathToTarget(); + } + protected pathToTarget(): void { if (!this.target) { return; @@ -386,7 +402,7 @@ export default abstract class PathingEntity extends Entity { } } - setInteraction(interaction: Interaction, target: Entity, op: ServerTriggerType | NpcMode, subject?: TargetSubject): void { + setInteraction(interaction: Interaction, target: Entity, op: TargetOp, subject?: TargetSubject): void { this.target = target; this.targetOp = op; this.targetSubject = subject ?? {type: -1, com: -1}; @@ -461,6 +477,8 @@ export default abstract class PathingEntity extends Entity { this.jump = false; this.lastX = this.x; this.lastZ = this.z; + this.interacted = false; + this.apRangeCalled = false; this.mask = 0; this.exactStartX = -1; diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index 2c40afd75..532ca17d2 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -433,12 +433,8 @@ export default class Player extends PathingEntity { return false; } - if ( - repathAllowed && - this.target instanceof PathingEntity && // this.isLastWaypoint() && (this.targetX !== this.target.x || this.targetZ !== this.target.z) && - !this.interacted && this.walktrigger === -1 - ) { - this.pathToTarget(); + if (repathAllowed && this.target instanceof PathingEntity && !this.interacted && this.walktrigger === -1) { + this.pathToPathingTarget(); } if (this.hasWaypoints() && this.walktrigger !== -1 && (!this.protect && !this.delayed())) { @@ -790,9 +786,6 @@ export default class Player extends PathingEntity { return; } - this.interacted = false; - this.apRangeCalled = false; - const opTrigger = this.getOpTrigger(); const apTrigger = this.getApTrigger(); From 2c68fb70f79b04cf1fcdd545bf44f874861f78c3 Mon Sep 17 00:00:00 2001 From: Indio <144697121+Indio3@users.noreply.github.com> Date: Thu, 6 Jun 2024 20:10:40 -0400 Subject: [PATCH 39/50] feat(content): Fight arena quest (#556) * feat: base of fight arena * feat: arena quest up to scorp cutscene * feat: remainder of fight arena * fix: revert some stuff * fix: small arena fixes * fix: remove some debugprocs --- data/src/pack/npc.pack | 34 +- data/src/pack/obj.pack | 8 +- data/src/scripts/_unpack/all.npc | 529 ----------------- data/src/scripts/engine.rs2 | 10 + .../scripts/general/configs/quest.constant | 3 +- data/src/scripts/general/scripts/quests.rs2 | 5 + .../scripts/general_use/scripts/barrels.rs2 | 2 + .../scripts/ladders+stairs/scripts/stairs.rs2 | 2 + data/src/scripts/player/scripts/logout.rs2 | 1 - .../configs/general_khazard.mesanim | 6 + .../quest_arena/configs/quest_arena.constant | 14 + .../quest_arena/configs/quest_arena.npc | 533 ++++++++++++++++++ .../quest_arena/configs/quest_arena.obj | 8 +- .../quests/quest_arena/scripts/bouncer.rs2 | 24 + .../quests/quest_arena/scripts/fightslave.rs2 | 74 +++ .../quest_arena/scripts/general_khazard.rs2 | 102 ++++ .../quests/quest_arena/scripts/hengrad.rs2 | 80 +++ .../quest_arena/scripts/jeremy_servil.rs2 | 161 ++++++ .../quest_arena/scripts/justin_servil.rs2 | 31 + .../quest_arena/scripts/khazard_barman.rs2 | 39 ++ .../quest_arena/scripts/khazard_guard.rs2 | 142 +++++ .../quest_arena/scripts/khazard_ogre.rs2 | 23 + .../quest_arena/scripts/khazard_scorpion.rs2 | 23 + .../quest_arena/scripts/lady_servil.rs2 | 47 ++ .../quests/quest_arena/scripts/local.rs2 | 36 ++ .../quest_arena/scripts/quest_arena.rs2 | 271 +++++++++ .../quest_arthur/scripts/sir_mordred.rs2 | 6 + .../quests/quest_ball/configs/quest_ball.vars | 5 - .../quest_ball/configs/witches_house.npc | 1 - .../quests/quest_ball/scripts/quest_ball.rs2 | 28 +- .../scripts/black_knight_titan.rs2 | 6 + .../quest_hazeelcult/scripts/alomone.rs2 | 1 - .../skill_combat/scripts/npc/npc_combat.rs2 | 9 + src/lostcity/engine/script/handlers/LocOps.ts | 4 +- src/lostcity/engine/script/handlers/NpcOps.ts | 6 +- src/lostcity/entity/Npc.ts | 2 +- 36 files changed, 1685 insertions(+), 591 deletions(-) create mode 100644 data/src/scripts/quests/quest_arena/configs/general_khazard.mesanim create mode 100644 data/src/scripts/quests/quest_arena/configs/quest_arena.constant create mode 100644 data/src/scripts/quests/quest_arena/configs/quest_arena.npc create mode 100644 data/src/scripts/quests/quest_arena/scripts/bouncer.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/fightslave.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/general_khazard.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/hengrad.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/jeremy_servil.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/justin_servil.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/khazard_barman.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/khazard_guard.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/khazard_ogre.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/khazard_scorpion.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/lady_servil.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/local.rs2 create mode 100644 data/src/scripts/quests/quest_arena/scripts/quest_arena.rs2 delete mode 100644 data/src/scripts/quests/quest_ball/configs/quest_ball.vars diff --git a/data/src/pack/npc.pack b/data/src/pack/npc.pack index 4b62888d4..c5034e4df 100644 --- a/data/src/pack/npc.pack +++ b/data/src/pack/npc.pack @@ -251,25 +251,25 @@ 250=lady_of_the_lake 251=king_arthur 252=beggar -253=npc_253 -254=npc_254 -255=npc_255 -256=npc_256 -257=npc_257 +253=khazard_guard_cells +254=khazard_guard_drunk +255=khazard_guard_chest +256=khazard_guard_standard +257=khazard_guard_cutscene 258=general_khazard -259=npc_259 -260=npc_260 -261=npc_261 -262=npc_262 -263=npc_263 -264=npc_264 -265=npc_265 -266=npc_266 -267=npc_267 -268=npc_268 +259=khazard_barman +260=kelvin +261=joe_fightslave +262=fightslave +263=hengrad +264=lady_servil +265=jeremy_servil +266=jeremy_servil_arena +267=justin_servil +268=local 269=bouncer -270=npc_270 -271=npc_271 +270=khazard_ogre +271=khazard_scorpion 272=npc_272 273=npc_273 274=npc_274 diff --git a/data/src/pack/obj.pack b/data/src/pack/obj.pack index daa2b6bb5..6721b7a5c 100644 --- a/data/src/pack/obj.pack +++ b/data/src/pack/obj.pack @@ -72,10 +72,10 @@ 71=cert_obj_70 72=obj_72 73=cert_obj_72 -74=obj_74 -75=obj_75 -76=obj_76 -77=obj_77 +74=khazard_helmet +75=khazard_armour +76=khazard_cell_keys +77=khali_brew 78=obj_78 79=ice_arrow_4 80=ice_arrow_3 diff --git a/data/src/scripts/_unpack/all.npc b/data/src/scripts/_unpack/all.npc index 5adf7e3ef..11f18f354 100644 --- a/data/src/scripts/_unpack/all.npc +++ b/data/src/scripts/_unpack/all.npc @@ -5699,535 +5699,6 @@ param=death_sound,ghost_death param=death_drop,null param=undead,^true -[npc_253] -name=Khazard Guard -desc=It's one of General Khazard's guards. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -op2=Attack -vislevel=21 -recol1s=15855 -recol1d=5285 -recol2s=2340 -recol2d=3104 -model1=model_230_idk -model2=model_252_idk -model3=model_306_obj_wear -model4=model_152_npc -model5=model_176_idk -model6=model_254_idk -model7=model_185_obj_wear -model8=model_550_obj_wear -head1=model_63_idk_head -head2=model_84_idk_head -wanderrange=3 -attackrange=5 -respawnrate=50 -hitpoints=25 -attack=20 -strength=18 -defence=20 -param=attackbonus,10 -param=strengthbonus,14 -param=stabdefence,44 -param=slashdefence,38 -param=crushdefence,30 -param=damagetype,^slash_style -param=attack_anim,human_baxe_slash -param=defend_anim,human_baxe_defend2 -param=attack_sound,baxe_slash -// param=defend_sound,blade3_mail - -[npc_254] -name=Khazard Guard -desc=It's one of General Khazard's guards. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -op2=Attack -vislevel=21 -recol1s=15855 -recol1d=5285 -recol2s=2340 -recol2d=3104 -model1=model_230_idk -model2=model_253_idk -model3=model_306_obj_wear -model4=model_152_npc -model5=model_176_idk -model6=model_254_idk -model7=model_185_obj_wear -model8=model_550_obj_wear -head1=model_63_idk_head -head2=model_85_idk_head -wanderrange=4 -attackrange=6 -respawnrate=50 -hitpoints=25 -attack=20 -strength=18 -defence=20 -param=attackbonus,10 -param=strengthbonus,14 -param=stabdefence,44 -param=slashdefence,38 -param=crushdefence,30 -param=damagetype,^slash_style -param=attack_anim,human_baxe_slash -param=defend_anim,human_baxe_defend2 -param=attack_sound,baxe_slash -// param=defend_sound,blade3_mail - -[npc_255] -name=Khazard Guard -desc=It's one of General Khazard's guards. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -op2=Attack -vislevel=21 -recol1s=15855 -recol1d=5285 -recol2s=2340 -recol2d=3104 -model1=model_219_obj_wear -model2=model_246_idk -model3=model_306_obj_wear -model4=model_152_npc -model5=model_176_idk -model6=model_254_idk -model7=model_185_obj_wear -model8=model_550_obj_wear -head1=model_57_obj_wear -wanderrange=4 -attackrange=6 -respawnrate=50 -hitpoints=25 -attack=20 -strength=18 -defence=20 -param=attackbonus,10 -param=strengthbonus,14 -param=stabdefence,44 -param=slashdefence,38 -param=crushdefence,30 -param=damagetype,^slash_style -param=attack_anim,human_baxe_slash -param=defend_anim,human_baxe_defend2 -param=attack_sound,baxe_slash -// param=defend_sound,blade3_mail - -[npc_256] -name=Khazard Guard -desc=It's one of General Khazard's guards. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -op2=Attack -vislevel=21 -recol1s=15855 -recol1d=5285 -recol2s=2340 -recol2d=3104 -model1=model_219_obj_wear -model2=model_253_idk -model3=model_306_obj_wear -model4=model_152_npc -model5=model_176_idk -model6=model_254_idk -model7=model_185_obj_wear -model8=model_550_obj_wear -head1=model_57_obj_wear -head2=model_85_idk_head -wanderrange=4 -attackrange=6 -respawnrate=50 -hitpoints=25 -attack=20 -strength=18 -defence=20 -param=attackbonus,10 -param=strengthbonus,14 -param=stabdefence,44 -param=slashdefence,38 -param=crushdefence,30 -param=damagetype,^slash_style -param=attack_anim,human_baxe_slash -param=defend_anim,human_baxe_defend2 -param=attack_sound,baxe_slash -// param=defend_sound,blade3_mail - -[npc_257] -name=Khazard Guard -desc=It's one of General Khazard's guards. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -vislevel=25 -recol1s=15855 -recol1d=5285 -recol2s=2340 -recol2d=3104 -model1=model_230_idk -model2=model_252_idk -model3=model_306_obj_wear -model4=model_152_npc -model5=model_176_idk -model6=model_254_idk -model7=model_185_obj_wear -model8=model_550_obj_wear -head1=model_63_idk_head -head2=model_84_idk_head -respawnrate=50 -hitpoints=25 -attack=20 -strength=18 -defence=20 -param=attackbonus,10 -param=strengthbonus,14 -param=stabdefence,44 -param=slashdefence,38 -param=crushdefence,30 -param=damagetype,^slash_style -param=attack_anim,human_baxe_slash -param=defend_anim,human_baxe_defend2 -param=attack_sound,baxe_slash -// param=defend_sound,blade3_mail - -[general_khazard] -name=General Khazard -desc=He looks really nasty. Smells bad too. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -op2=Attack -vislevel=112 -recol1s=15855 -recol1d=5285 -recol2s=14798 -recol2d=5285 -model1=model_209_npc -model2=model_306_obj_wear -model3=model_164_obj_wear -model4=model_179_obj_wear -model5=model_268_obj_wear -model6=model_185_obj_wear -model7=model_546_obj_wear -model8=model_323_obj_wear -head1=model_149_npc_head -wanderrange=1 -hitpoints=170 -attack=75 -strength=78 -defence=80 -param=damagetype,^slash_style -param=attack_anim,human_2h_slash -param=defend_anim,human_2h_sword_defend -// param=attack_sound, -// param=defend_sound, -// osrs use attack seq_406 - -[npc_259] -vislevel=hide -name=Khazard barman -desc=A tough looking barman. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=2340 -recol1d=4226 -recol2s=14724 -recol2d=27481 -recol3s=14801 -recol3d=24075 -model1=model_230_idk -model2=model_247_idk -model3=model_292_idk -model4=model_151_idk -model5=model_176_idk -model6=model_254_idk -model7=model_181_idk -model8=model_326_idk -head1=model_63_idk_head -head2=model_79_idk_head -wanderrange=4 - -[npc_260] -vislevel=hide -name=Kelvin -desc=A fightslave. He looks mistreated and weak. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=7298 -recol1d=24075 -recol2s=2340 -recol2d=7362 -recol3s=14724 -recol3d=16709 -model1=model_214_idk -model2=model_246_idk -model3=model_310_idk -model4=model_151_idk -model5=model_176_idk -model6=model_275_idk -model7=model_181_idk -head1=model_52_idk_head -wanderrange=1 - -[npc_261] -vislevel=hide -name=Joe -desc=A fightslave. He looks mistreated and weak. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=7298 -recol1d=25166 -recol2s=2340 -recol2d=7362 -recol3s=6273 -recol3d=10401 -recol4s=14724 -recol4d=15686 -recol5s=24075 -recol5d=25166 -model1=model_206_idk -model2=model_246_idk -model3=model_310_idk -model4=model_151_idk -model5=model_176_idk -model6=model_275_idk -model7=model_181_idk -model8=model_326_idk -head1=model_46_idk_head -wanderrange=1 - -[npc_262] -vislevel=hide -name=Fightslave -desc=A fightslave. He looks mistreated and weak. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=7298 -recol1d=24075 -recol2s=2340 -recol2d=7298 -model1=model_214_idk -model2=model_246_idk -model3=model_310_idk -model4=model_151_idk -model5=model_176_idk -model6=model_275_idk -model7=model_181_idk -head1=model_52_idk_head -wanderrange=1 - -[npc_263] -vislevel=hide -name=Hengrad -desc=He looks mistreated and weak. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=7298 -recol1d=24075 -recol2s=2340 -recol2d=7362 -recol3s=14724 -recol3d=14730 -model1=model_230_idk -model2=model_246_idk -model3=model_310_idk -model4=model_151_idk -model5=model_176_idk -model6=model_275_idk -model7=model_181_idk -head1=model_63_idk_head -wanderrange=1 - -[npc_264] -vislevel=hide -name=Lady Servil -desc=She looks wealthy. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=2340 -recol1d=2387 -recol2s=14724 -recol2d=6649 -recol3s=14724 -recol3d=27551 -model1=model_378_idk -model2=model_456_idk -model3=model_348_idk -model4=model_353_idk -model5=model_428_idk -model6=model_358_idk -head1=model_103_idk_head -param=death_sound,female_death - -[npc_265] -vislevel=hide -name=Jeremy Servil -desc=A young squire. He looks worse for wear. -walkanim=midget_walk -readyanim=midget_ready -op1=Talk-to -recol1s=416 -recol1d=13360 -recol2s=14724 -recol2d=13360 -model1=model_2918_npc -model2=model_2910_npc -model3=model_2906_npc -head1=model_53_idk_head -wanderrange=1 -param=death_anim,midget_death - -[npc_266] -vislevel=hide -name=Jeremy Servil -desc=A young squire. He looks worse for wear. -walkanim=midget_walk -readyanim=midget_ready -op1=Talk-to -recol1s=416 -recol1d=13360 -recol2s=14724 -recol2d=13360 -model1=model_2918_npc -model2=model_2910_npc -model3=model_2906_npc -head1=model_53_idk_head -wanderrange=1 -param=death_anim,midget_death - -[npc_267] -vislevel=hide -name=Justin Servil -desc=Jeremy's father Sir Servil. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=7298 -recol1d=24075 -recol2s=2340 -recol2d=7298 -model1=model_230_idk -model2=model_250_idk -model3=model_310_idk -model4=model_151_idk -model5=model_176_idk -model6=model_275_idk -model7=model_181_idk -head1=model_63_idk_head -head2=model_82_idk_head -wanderrange=7 - -[npc_268] -vislevel=hide -name=Local -desc=A scruffy looking chap. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -op1=Talk-to -recol1s=14724 -recol1d=8192 -recol2s=2340 -recol2d=8456 -model1=model_230_idk -model2=model_249_idk -model3=model_236_obj_wear -model4=model_299_npc -model5=model_167_idk -model6=model_179_obj_wear -model7=model_275_idk -model8=model_185_obj_wear -head1=model_63_idk_head -head2=model_68_obj_wear - -[bouncer] -size=2 -walkanim=hellhound_walk -readyanim=hellhound_ready -name=Bouncer -desc=Nice doggy. -op2=Attack -vislevel=132 -model1=model_2997_npc -respawnrate=50 -hitpoints=116 -attack=120 -strength=120 -defence=120 -param=damagetype,^stab_style -param=attack_anim,hellhound_attack -param=defend_anim,hellhound_block -param=death_anim,hellhound_death -// param=attack_sound, -// param=defend_sound, -// param=death_sound, - -[npc_270] -name=Khazard Ogre -desc=Khazard's strongest ogre warrior. -size=2 -walkanim=ogre_walk -readyanim=ogre_ready -op2=Attack -vislevel=55 -model1=model_2880_npc -model2=model_2876_npc -// TODO respawnrate -hitpoints=60 -attack=54 -strength=53 -defence=53 -param=attackbonus,22 -param=strengthbonus,20 -param=attackrate,6 -param=damagetype,^crush_style -param=attack_anim,ogre_attack -param=defend_anim,ogre_block -param=death_anim,ogre_death -// param=attack_sound, -// param=defend_sound, -param=death_sound,giant_death -param=death_drop,big_bones - -[npc_271] -name=Khazard Scorpion -desc=A large angry scorpion. -size=2 -walkanim=scorpion_walk -readyanim=scorpion_ready -op2=Attack -vislevel=44 -recol1s=16677 -recol1d=10570 -recol2s=11426 -recol2d=6342 -model1=model_2967_npc -// TODO respawnrate -hitpoints=40 -attack=40 -strength=39 -defence=34 -param=stabdefence,5 -param=slashdefence,15 -param=crushdefence,15 -param=damagetype,^stab_style -param=attack_anim,scorpion_attack -param=defend_anim,scorpion_parry -param=death_anim,scorpion_death -param=attack_sound,insect_attack -param=defend_sound,insect_hit -param=death_sound,insect_death -param=death_drop,null - [npc_272] name=Lucien desc=He walks with a slight limp. diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index 0af7075cc..cddadb9b4 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -225,6 +225,7 @@ [command,npc_delay](int $delay) [command,.npc_delay](int $delay) [command,npc_facesquare](coord $coord) +[command,.npc_facesquare](coord $coord) [command,npc_find](coord $coord, npc $npc, int $distance, int $checkvis)(boolean) [command,.npc_find](coord $coord, npc $npc, int $distance, int $checkvis)(boolean) [command,npc_findallany](coord $coord, int $distance, int $checkvis)(boolean) @@ -233,6 +234,7 @@ [command,npc_findhero]()(boolean) [command,npc_param]/*(param $param)(dynamic)*/ [command,npc_queue](int $ai_queue, int $arg, int $delay) +[command,.npc_queue](int $ai_queue, int $arg, int $delay) [command,npc_range](coord $coord)(int) [command,npc_say](string $text) [command,.npc_say](string $text) @@ -253,17 +255,20 @@ [command,npc_uid]()(npc_uid) [command,.npc_uid]()(npc_uid) [command,npc_settimer](int $interval) +[command,.npc_settimer](int $interval) [command,spotanim_npc](spotanim $spotanim, int $height, int $delay) [command,npc_findallzone](coord $coord) [command,npc_findnext]()(boolean) [command,.npc_findnext]()(boolean) [command,npc_tele](coord $coord) +[command,.npc_tele](coord $coord) [command,npc_changetype](npc $type) [command,npc_getmode]()(npc_mode) [command,npc_heropoints](int $damage) [command,npc_walktrigger](int $ai_queue, int $arg) [command,.npc_walktrigger](int $ai_queue, int $arg) [command,npc_walk](coord $coord) +[command,.npc_walk](coord $coord) [command,npc_attackrange]()(int) [command,.npc_attackrange]()(int) @@ -275,14 +280,19 @@ [command,loc_category]()(category) [command,loc_change](loc $new_loc, int $duration) [command,loc_coord]()(coord) +[command,.loc_coord]()(coord) [command,loc_del](int $duration) +[command,.loc_del](int $duration) [command,loc_find](coord $coord, loc $loc)(boolean) +[command,.loc_find](coord $coord, loc $loc)(boolean) [command,loc_findallzone](coord $coord) [command,loc_findnext]()(boolean) [command,loc_param]/*(param $param)(dynamic)*/ [command,loc_type]()(loc) +[command,.loc_type]()(loc) [command,loc_name]()(string) [command,loc_shape]()(locshape) +[command,.loc_shape]()(locshape) // Obj ops (3500-4000) [command,obj_add](coord $coord, obj $obj, int $count, int $duration) diff --git a/data/src/scripts/general/configs/quest.constant b/data/src/scripts/general/configs/quest.constant index 60166fe34..c2f227ba7 100644 --- a/data/src/scripts/general/configs/quest.constant +++ b/data/src/scripts/general/configs/quest.constant @@ -71,4 +71,5 @@ ^ball_questpoints = 4 ^murder_questpoints = 3 ^hazeelcult_questpoints = 1 -^itgronigen_questpoints = 2 \ No newline at end of file +^itgronigen_questpoints = 2 +^arena_questpoints = 2 \ No newline at end of file diff --git a/data/src/scripts/general/scripts/quests.rs2 b/data/src/scripts/general/scripts/quests.rs2 index 1445fc4e1..d6a7ee708 100644 --- a/data/src/scripts/general/scripts/quests.rs2 +++ b/data/src/scripts/general/scripts/quests.rs2 @@ -176,6 +176,10 @@ if (%itgronigen_progress >= ^itgronigen_complete) { // varp is incremented for g $questpoints = add($questpoints, ^itgronigen_questpoints); } +if (%arena_progress >= ^arena_complete) { // different completion states based on if you kill general khazard or not + $questpoints = add($questpoints, ^arena_questpoints); +} + %questpoints = $questpoints; ~send_quest_progress_colour(questlist:runemysteries, %runemysteries_progress, ^runemysteries_complete); @@ -216,6 +220,7 @@ if(%phoenixgang_progress > 0 & %blackarmgang_progress ! ^blackarmgang_complete) ~send_quest_progress_colour(questlist:murder, %murder_progress, ^murder_complete); ~send_quest_progress_colour(questlist:hazeelcult, %hazeelcult_progress, ^hazeelcult_complete); ~send_quest_progress_colour(questlist:itgronigen, %itgronigen_progress, ^itgronigen_complete); +~send_quest_progress_colour(questlist:arena, %arena_progress, ^arena_complete); if_settab(questlist, ^tab_quest_journal); if (%drunkmonk_progress >= ^drunkmonk_spoken_to_omad) { diff --git a/data/src/scripts/general_use/scripts/barrels.rs2 b/data/src/scripts/general_use/scripts/barrels.rs2 index f70ca2da6..67b739d27 100644 --- a/data/src/scripts/general_use/scripts/barrels.rs2 +++ b/data/src/scripts/general_use/scripts/barrels.rs2 @@ -12,6 +12,8 @@ switch_coord(loc_coord) { case default: @fill_beer_glass; } +[oplocu,loc_885] +mes("I don't think I can get free beer here."); // any obj, think it might only be this loc specifcially (no 886 to check on osrs, other pumps dont work) [label,fill_beer_glass] anim(human_pickupfloor, 0); diff --git a/data/src/scripts/ladders+stairs/scripts/stairs.rs2 b/data/src/scripts/ladders+stairs/scripts/stairs.rs2 index 906466f5c..4727bc73d 100644 --- a/data/src/scripts/ladders+stairs/scripts/stairs.rs2 +++ b/data/src/scripts/ladders+stairs/scripts/stairs.rs2 @@ -34,6 +34,7 @@ switch_coord (loc_coord) { case 0_49_52_52_27: p_telejump(1_49_52_52_26); // champs guild https://youtu.be/es_xD6jgCbM?t=236 case 0_46_50_21_15: p_telejump(1_46_50_24_15); // Rimmington House case 1_41_73_16_10: p_telejump(2_41_73_16_13); // Grail castle - level 1 + case 0_40_49_53_3: p_telejump(1_40_49_52_3); case default: @unhandled_stairs(loc_coord); } @@ -74,6 +75,7 @@ switch_coord (loc_coord) { case 1_49_52_52_27: p_telejump(0_49_52_52_30); // champs guild case 1_46_50_22_15: p_telejump(0_46_50_20_15); // Rimmington House case 2_41_73_16_11: p_telejump(1_41_73_16_9); // Grail castle - level 2 + case 1_40_49_53_3: p_telejump(0_40_49_56_3); case default: @unhandled_stairs(loc_coord); } diff --git a/data/src/scripts/player/scripts/logout.rs2 b/data/src/scripts/player/scripts/logout.rs2 index 9bc31868f..50d655757 100644 --- a/data/src/scripts/player/scripts/logout.rs2 +++ b/data/src/scripts/player/scripts/logout.rs2 @@ -31,6 +31,5 @@ if (%tradepartner ! null) { ~set_pk_skull_logout; ~set_antifire_logout; ~set_antipoison_logout; -~clear_ball_shed_uid; return(true); diff --git a/data/src/scripts/quests/quest_arena/configs/general_khazard.mesanim b/data/src/scripts/quests/quest_arena/configs/general_khazard.mesanim new file mode 100644 index 000000000..bd84bb9e7 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/configs/general_khazard.mesanim @@ -0,0 +1,6 @@ +// TODO: find the right name +[genkhazard] +len1=seq_558 +len2=seq_559 +len3=seq_560 +len4=seq_561 \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/configs/quest_arena.constant b/data/src/scripts/quests/quest_arena/configs/quest_arena.constant new file mode 100644 index 000000000..f2a4cb55a --- /dev/null +++ b/data/src/scripts/quests/quest_arena/configs/quest_arena.constant @@ -0,0 +1,14 @@ +^arena_not_started = 0 +^arena_started = 1 +^arena_obtained_armour = 2 +^arena_spoken_drunkguard = 3 +^arena_given_khali_brew = 5 +^arena_entered_ogre_fight = 6 +^arena_defeated_ogre = 8 +^arena_sent_jail = 9 +^arena_defeated_scorpion = 10 +^arena_defeated_bouncer = 11 +^arena_freed_servils = 12 +^arena_defeated_genkhazard = 13 +^arena_complete = 14 +^arena_complete_defeated_genkhazard = 15 \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/configs/quest_arena.npc b/data/src/scripts/quests/quest_arena/configs/quest_arena.npc new file mode 100644 index 000000000..b5967193d --- /dev/null +++ b/data/src/scripts/quests/quest_arena/configs/quest_arena.npc @@ -0,0 +1,533 @@ +[khazard_guard_cells] +name=Khazard Guard +desc=It's one of General Khazard's guards. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +op2=Attack +vislevel=21 +recol1s=15855 +recol1d=5285 +recol2s=2340 +recol2d=3104 +model1=model_230_idk +model2=model_252_idk +model3=model_306_obj_wear +model4=model_152_npc +model5=model_176_idk +model6=model_254_idk +model7=model_185_obj_wear +model8=model_550_obj_wear +head1=model_63_idk_head +head2=model_84_idk_head +wanderrange=3 +attackrange=5 +respawnrate=50 +hitpoints=25 +attack=20 +strength=18 +defence=20 +param=attackbonus,10 +param=strengthbonus,14 +param=stabdefence,44 +param=slashdefence,38 +param=crushdefence,30 +param=damagetype,^slash_style +param=attack_anim,human_baxe_slash +param=defend_anim,human_baxe_defend2 +param=attack_sound,baxe_slash +// param=defend_sound,blade3_mail + +[khazard_guard_drunk] +name=Khazard Guard +desc=It's one of General Khazard's guards. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +op2=Attack +vislevel=21 +recol1s=15855 +recol1d=5285 +recol2s=2340 +recol2d=3104 +model1=model_230_idk +model2=model_253_idk +model3=model_306_obj_wear +model4=model_152_npc +model5=model_176_idk +model6=model_254_idk +model7=model_185_obj_wear +model8=model_550_obj_wear +head1=model_63_idk_head +head2=model_85_idk_head +wanderrange=4 +attackrange=6 +respawnrate=50 +hitpoints=25 +attack=20 +strength=18 +defence=20 +param=attackbonus,10 +param=strengthbonus,14 +param=stabdefence,44 +param=slashdefence,38 +param=crushdefence,30 +param=damagetype,^slash_style +param=attack_anim,human_baxe_slash +param=defend_anim,human_baxe_defend2 +param=attack_sound,baxe_slash +// param=defend_sound,blade3_mail + +[khazard_guard_chest] +name=Khazard Guard +desc=It's one of General Khazard's guards. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +op2=Attack +vislevel=21 +recol1s=15855 +recol1d=5285 +recol2s=2340 +recol2d=3104 +model1=model_219_obj_wear +model2=model_246_idk +model3=model_306_obj_wear +model4=model_152_npc +model5=model_176_idk +model6=model_254_idk +model7=model_185_obj_wear +model8=model_550_obj_wear +head1=model_57_obj_wear +wanderrange=4 +attackrange=6 +respawnrate=50 +hitpoints=25 +attack=20 +strength=18 +defence=20 +param=attackbonus,10 +param=strengthbonus,14 +param=stabdefence,44 +param=slashdefence,38 +param=crushdefence,30 +param=damagetype,^slash_style +param=attack_anim,human_baxe_slash +param=defend_anim,human_baxe_defend2 +param=attack_sound,baxe_slash +// param=defend_sound,blade3_mail + +[khazard_guard_standard] +name=Khazard Guard +desc=It's one of General Khazard's guards. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +op2=Attack +vislevel=21 +recol1s=15855 +recol1d=5285 +recol2s=2340 +recol2d=3104 +model1=model_219_obj_wear +model2=model_253_idk +model3=model_306_obj_wear +model4=model_152_npc +model5=model_176_idk +model6=model_254_idk +model7=model_185_obj_wear +model8=model_550_obj_wear +head1=model_57_obj_wear +head2=model_85_idk_head +wanderrange=4 +attackrange=6 +respawnrate=50 +hitpoints=25 +attack=20 +strength=18 +defence=20 +param=attackbonus,10 +param=strengthbonus,14 +param=stabdefence,44 +param=slashdefence,38 +param=crushdefence,30 +param=damagetype,^slash_style +param=attack_anim,human_baxe_slash +param=defend_anim,human_baxe_defend2 +param=attack_sound,baxe_slash +// param=defend_sound,blade3_mail + +[khazard_guard_cutscene] +name=Khazard Guard +desc=It's one of General Khazard's guards. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +vislevel=25 +recol1s=15855 +recol1d=5285 +recol2s=2340 +recol2d=3104 +model1=model_230_idk +model2=model_252_idk +model3=model_306_obj_wear +model4=model_152_npc +model5=model_176_idk +model6=model_254_idk +model7=model_185_obj_wear +model8=model_550_obj_wear +head1=model_63_idk_head +head2=model_84_idk_head +respawnrate=50 +wanderrange=0 +hitpoints=25 +attack=20 +strength=18 +defence=20 +param=attackbonus,10 +param=strengthbonus,14 +param=stabdefence,44 +param=slashdefence,38 +param=crushdefence,30 +param=damagetype,^slash_style +param=attack_anim,human_baxe_slash +param=defend_anim,human_baxe_defend2 +param=attack_sound,baxe_slash +// param=defend_sound,blade3_mail + +[general_khazard] +name=General Khazard +desc=He looks really nasty. Smells bad too. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +op2=Attack +vislevel=112 +recol1s=15855 +recol1d=5285 +recol2s=14798 +recol2d=5285 +model1=model_209_npc +model2=model_306_obj_wear +model3=model_164_obj_wear +model4=model_179_obj_wear +model5=model_268_obj_wear +model6=model_185_obj_wear +model7=model_546_obj_wear +model8=model_323_obj_wear +head1=model_149_npc_head +wanderrange=1 +hitpoints=170 +attack=75 +strength=78 +defence=80 +param=damagetype,^slash_style +param=attack_anim,human_2h_slash +param=defend_anim,human_2h_sword_defend +// param=attack_sound, +// param=defend_sound, +// osrs use attack seq_406 + +[khazard_barman] +vislevel=hide +name=Khazard barman +desc=A tough looking barman. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=2340 +recol1d=4226 +recol2s=14724 +recol2d=27481 +recol3s=14801 +recol3d=24075 +model1=model_230_idk +model2=model_247_idk +model3=model_292_idk +model4=model_151_idk +model5=model_176_idk +model6=model_254_idk +model7=model_181_idk +model8=model_326_idk +head1=model_63_idk_head +head2=model_79_idk_head +wanderrange=4 + +[kelvin] +vislevel=hide +name=Kelvin +desc=A fightslave. He looks mistreated and weak. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=7298 +recol1d=24075 +recol2s=2340 +recol2d=7362 +recol3s=14724 +recol3d=16709 +model1=model_214_idk +model2=model_246_idk +model3=model_310_idk +model4=model_151_idk +model5=model_176_idk +model6=model_275_idk +model7=model_181_idk +head1=model_52_idk_head +wanderrange=1 + +[joe_fightslave] +vislevel=hide +name=Joe +desc=A fightslave. He looks mistreated and weak. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=7298 +recol1d=25166 +recol2s=2340 +recol2d=7362 +recol3s=6273 +recol3d=10401 +recol4s=14724 +recol4d=15686 +recol5s=24075 +recol5d=25166 +model1=model_206_idk +model2=model_246_idk +model3=model_310_idk +model4=model_151_idk +model5=model_176_idk +model6=model_275_idk +model7=model_181_idk +model8=model_326_idk +head1=model_46_idk_head +wanderrange=1 + +[fightslave] +vislevel=hide +name=Fightslave +desc=A fightslave. He looks mistreated and weak. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=7298 +recol1d=24075 +recol2s=2340 +recol2d=7298 +model1=model_214_idk +model2=model_246_idk +model3=model_310_idk +model4=model_151_idk +model5=model_176_idk +model6=model_275_idk +model7=model_181_idk +head1=model_52_idk_head +wanderrange=1 + +[hengrad] +vislevel=hide +name=Hengrad +desc=He looks mistreated and weak. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=7298 +recol1d=24075 +recol2s=2340 +recol2d=7362 +recol3s=14724 +recol3d=14730 +model1=model_230_idk +model2=model_246_idk +model3=model_310_idk +model4=model_151_idk +model5=model_176_idk +model6=model_275_idk +model7=model_181_idk +head1=model_63_idk_head +wanderrange=1 + +[lady_servil] +vislevel=hide +name=Lady Servil +desc=She looks wealthy. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=2340 +recol1d=2387 +recol2s=14724 +recol2d=6649 +recol3s=14724 +recol3d=27551 +model1=model_378_idk +model2=model_456_idk +model3=model_348_idk +model4=model_353_idk +model5=model_428_idk +model6=model_358_idk +head1=model_103_idk_head +param=death_sound,female_death + +[jeremy_servil] +vislevel=hide +name=Jeremy Servil +desc=A young squire. He looks worse for wear. +walkanim=midget_walk +readyanim=midget_ready +op1=Talk-to +recol1s=416 +recol1d=13360 +recol2s=14724 +recol2d=13360 +model1=model_2918_npc +model2=model_2910_npc +model3=model_2906_npc +head1=model_53_idk_head +wanderrange=1 +param=death_anim,midget_death + +[jeremy_servil_arena] +vislevel=hide +name=Jeremy Servil +desc=A young squire. He looks worse for wear. +walkanim=midget_walk +readyanim=midget_ready +op1=Talk-to +recol1s=416 +recol1d=13360 +recol2s=14724 +recol2d=13360 +model1=model_2918_npc +model2=model_2910_npc +model3=model_2906_npc +head1=model_53_idk_head +wanderrange=1 +param=death_anim,midget_death + +[justin_servil] +vislevel=hide +name=Justin Servil +desc=Jeremy's father Sir Servil. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=7298 +recol1d=24075 +recol2s=2340 +recol2d=7298 +model1=model_230_idk +model2=model_250_idk +model3=model_310_idk +model4=model_151_idk +model5=model_176_idk +model6=model_275_idk +model7=model_181_idk +head1=model_63_idk_head +head2=model_82_idk_head +wanderrange=7 + +[local] +vislevel=hide +name=Local +desc=A scruffy looking chap. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +op1=Talk-to +recol1s=14724 +recol1d=8192 +recol2s=2340 +recol2d=8456 +model1=model_230_idk +model2=model_249_idk +model3=model_236_obj_wear +model4=model_299_npc +model5=model_167_idk +model6=model_179_obj_wear +model7=model_275_idk +model8=model_185_obj_wear +head1=model_63_idk_head +head2=model_68_obj_wear + +[bouncer] +size=2 +walkanim=hellhound_walk +readyanim=hellhound_ready +name=Bouncer +desc=Nice doggy. +op2=Attack +vislevel=132 +model1=model_2997_npc +respawnrate=50 +hitpoints=116 +attack=120 +strength=120 +defence=120 +param=damagetype,^stab_style +param=attack_anim,hellhound_attack +param=defend_anim,hellhound_block +param=death_anim,hellhound_death +// param=attack_sound, +// param=defend_sound, +// param=death_sound, +huntmode=aggressive_melee + +[khazard_ogre] +name=Khazard Ogre +desc=Khazard's strongest ogre warrior. +size=2 +walkanim=ogre_walk +readyanim=ogre_ready +op2=Attack +vislevel=55 +model1=model_2880_npc +model2=model_2876_npc +// TODO respawnrate might be wrong, copying bouncers +respawnrate=50 +hitpoints=60 +attack=54 +strength=53 +defence=53 +param=attackbonus,22 +param=strengthbonus,20 +param=attackrate,6 +param=damagetype,^crush_style +param=attack_anim,ogre_attack +param=defend_anim,ogre_block +param=death_anim,ogre_death +param=attack_sound,giant_attack +param=defend_sound,giant_hit +param=death_sound,giant_death +huntmode=aggressive_melee + +[khazard_scorpion] +name=Khazard Scorpion +desc=A large angry scorpion. +size=2 +walkanim=scorpion_walk +readyanim=scorpion_ready +op2=Attack +vislevel=44 +recol1s=16677 +recol1d=10570 +recol2s=11426 +recol2d=6342 +model1=model_2967_npc +// TODO respawnrate might be wrong, copying bouncers +respawnrate=50 +hitpoints=40 +attack=40 +strength=39 +defence=34 +param=stabdefence,5 +param=slashdefence,15 +param=crushdefence,15 +param=damagetype,^stab_style +param=attack_anim,scorpion_attack +param=defend_anim,scorpion_parry +param=death_anim,scorpion_death +param=attack_sound,insect_attack +param=defend_sound,insect_hit +param=death_sound,insect_death +param=death_drop,null +huntmode=aggressive_melee \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/configs/quest_arena.obj b/data/src/scripts/quests/quest_arena/configs/quest_arena.obj index 366bee941..06e0d42b5 100644 --- a/data/src/scripts/quests/quest_arena/configs/quest_arena.obj +++ b/data/src/scripts/quests/quest_arena/configs/quest_arena.obj @@ -1,4 +1,4 @@ -[obj_74] +[khazard_helmet] members=yes name=Khazard helmet desc=A helmet, as worn by the minions of General Khazard. @@ -26,7 +26,7 @@ param=stabdefence,4 param=slashdefence,5 param=crushdefence,3 -[obj_75] +[khazard_armour] members=yes name=Khazard armour desc=Armour, as worn by the minions of General Khazard. @@ -52,7 +52,7 @@ param=stabdefence,9 param=slashdefence,11 param=crushdefence,10 -[obj_76] +[khazard_cell_keys] members=yes name=Khazard cell keys desc=These keys open the cells at the Khazard fight arena. @@ -65,7 +65,7 @@ model=model_2424_obj weight=10g param=no_alchemy,1 -[obj_77] +[khali_brew] members=yes cost=5 name=Khali brew diff --git a/data/src/scripts/quests/quest_arena/scripts/bouncer.rs2 b/data/src/scripts/quests/quest_arena/scripts/bouncer.rs2 new file mode 100644 index 000000000..340b9a48f --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/bouncer.rs2 @@ -0,0 +1,24 @@ +[ai_queue3,bouncer](int $arg) +gosub(npc_death); +if(npc_findhero = true) { + if_close; + if(p_finduid(uid) = true) { // get protected access, if not then queue + @defeat_bouncer; + } + queue(queue_defeat_bouncer, 0, npc_uid); //strongqueue probably +} + +[queue,queue_defeat_bouncer](npc_uid $npc) +if (npc_finduid($npc) = true) { + @defeat_bouncer; +} + +[label,defeat_bouncer] +if(%arena_progress = ^arena_defeated_scorpion) { + %arena_progress = ^arena_defeated_bouncer; + // https://youtu.be/mz82tzr4fJw?si=zkEYpF66XpLEbUjK&t=321, npc_add's another if the general is already in combat + if (npc_find(movecoord(coord, 8, 0, 0), general_khazard, 15, 0) = false | ~npc_out_of_combat = false) { + npc_add(0_40_49_46_18, general_khazard, 500); // ticks guessed + } + @general_khazard_bouncer_killed; +} \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/fightslave.rs2 b/data/src/scripts/quests/quest_arena/scripts/fightslave.rs2 new file mode 100644 index 000000000..f2d1be406 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/fightslave.rs2 @@ -0,0 +1,74 @@ +[apnpc1,kelvin] +if (npc_range(coord) > 2) { + p_aprange(2); + return; +} +@joe_kelvin_dialogue(joe_fightslave); + +[apnpc1,joe_fightslave] +if (npc_range(coord) > 2) { + p_aprange(2); + return; +} +@joe_kelvin_dialogue(kelvin); + +[label,joe_kelvin_dialogue](npc $partner) +switch_int(%arena_progress) { + case default: + ~chatplayer("Are you ok?"); + if(~wearing_khazard_armour = true) { + if (random(1) = 0) ~chatnpc("Get away, get away. One day I'll have my revenge, and I'll have all your heads."); + else ~chatnpc("Spare me your fake pity. I spit on Khazard's grave, and all who do his bidding."); + } else { + if (random(1) = 0) ~chatnpc("You're not safe here traveller. Leave while you still can."); + else ~chatnpc("You're a brave person. If the guards get you, you'll be in here next."); + } + case ^arena_obtained_armour, ^arena_spoken_drunkguard, ^arena_given_khali_brew, ^arena_entered_ogre_fight: + if(~wearing_khazard_armour = true) { + if (.npc_find(coord, $partner, 3, 0) = true) { // uses other set if greater than 2 away in RS3 + ~chatplayer("Do either of you know a Justin or Sammy Servil?"); + ~chatnpc("If we did, why would we tell you guard?"); + ~.chatnpc("Until our last breath, our every action will be against Khazard. Never will we help you."); + ~chatnpc("I spit on Khazard's grave, and all who do his bidding."); + return; + } + ~chatplayer("Do you know a Justin or Sammy Servil?"); + ~chatnpc("If I did, why would I tell you guard?"); + } else { + if (.npc_find(coord, $partner, 3, 0) = true) { // uses other set if greater than 2 away in RS3 + ~chatplayer("Do either of you know a Justin or Jeremy Servil?"); + ~chatnpc("I have heard of those of whom you speak. But I fear it may be too late."); + ~.chatnpc("It is said that Khazard has a personal vendetta against those two, their time is therefore short."); + ~chatnpc("You're a brave . If the guards get you, you'll be in here next."); + return; + } + ~chatplayer("Do you know a Justin or Sammy Servil?"); + ~chatnpc("I have heard of those of whom you speak. But I fear it may be too late."); + } +} + +[apnpc1,fightslave] +if (npc_range(coord) > 2) { + p_aprange(2); + return; +} +switch_int(%arena_progress) { + case default: + if(~wearing_khazard_armour = true) { + ~chatnpc("Please leave me alone."); + } else { + // TODO: check mesanims, pretty sure they're all correct though + def_int $rand = random(4); + if ($rand = 0) ~chatnpc("Why am I here?"); + else if ($rand = 1) ~chatnpc("What did I do to deserve this?"); + else if ($rand = 2) ~chatnpc("Please help me."); + else if ($rand = 3) ~chatnpc("You're not safe here, leave while you can."); + } + case ^arena_obtained_armour, ^arena_spoken_drunkguard, ^arena_given_khali_brew, ^arena_entered_ogre_fight: + ~chatplayer("Do you know of a Justin or Jeremy Servil in this arena?"); + if (~wearing_khazard_armour = true) { + ~chatnpc("Please leave me alone."); + } else { + ~chatnpc("I've not met anybody in here by that name."); + } +} diff --git a/data/src/scripts/quests/quest_arena/scripts/general_khazard.rs2 b/data/src/scripts/quests/quest_arena/scripts/general_khazard.rs2 new file mode 100644 index 000000000..3cdeb0008 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/general_khazard.rs2 @@ -0,0 +1,102 @@ +[opnpc1,general_khazard] +switch_int(%arena_progress) { + case ^arena_defeated_genkhazard, ^arena_complete_defeated_genkhazard: + ~chatplayer("I thought I was rid of you!"); + // TODO: not sure if he attacks you here or not + ~chatnpc("You might not believe it young one, but you can't kill that which is already dead."); + case ^arena_freed_servils: + ~chatplayer("Hello."); + ~chatnpc("You killed my pet, and yet still you dare to speak to me?"); + if_close; + ~npc_retaliate(0); + npc_say("You shall die for your insolence."); + case ^arena_sent_jail, ^arena_defeated_scorpion: + // https://youtu.be/etS0gMlcxx8?si=xx4Hvgt28HsL6JCi&t=344 + ~chatplayer("Hello."); + ~chatnpc("How dare you speak to me, you are a slave of this arena now."); + case ^arena_defeated_ogre: + ~chatplayer("I have come to demand the release of Sir Servil and his son."); + ~chatnpc("Why would I give them up, those two men are my property now."); + @general_khazard_belong_nobody; + case default: + if(~wearing_khazard_armour = true) { + ~chatplayer("General Khazard?"); + ~chatnpc("What do you want guard? I'm a busy man."); + ~chatplayer("Of course sir."); + ~chatnpc("In the last two hundred years, I have survived all horrors imaginable. Now it is my turn to cover this land in darkness. One day you shall see, all will quake on hearing my name."); + ~chatnpc("Now leave me."); + return; + } + ~chatnpc("Who dares enter my home? You? A feeble traveller?"); + ~chatplayer("Feeble?!"); + ~chatnpc("Get out! Whoever let you in shall be severely punished for this."); +} + +[label,khazard_welldone] +if(npc_find(coord, general_khazard, 15, 0) = false) { + return; +} +~chatnpc("Haha, well done, well done that was rather entertaining. I am the great General Khazard, and the two men you just 'saved' are my property."); +@general_khazard_belong_nobody; + +[label,general_khazard_belong_nobody] +~chatplayer("They belong to nobody."); +~chatnpc("Well, I suppose we could find some arrangement for their freedom... hmmm?"); +~chatplayer("What do you mean?"); +// https://web.archive.org/web/20060910042918/http://www.runeweb.net/index.php?page=rs2-quest-fightarena +~chatnpc("I'll let them go, but you must stay and|fight for me. You'll make me double the|gold if you manage to last a few fights."); +// https://youtu.be/nptASzjG_Xk?si=e5G8rcOt_AvKLmkI&t=258 (not gendered, wiki mentions this as well but extra confirmation anyways) +~chatnpc("Guards! Take him to the cells."); +if_close; +%arena_progress = ^arena_sent_jail; +p_teleport(0_40_49_45_5); +cam_reset; +cam_moveto(0_40_49_47_3, 600, 0, 100); +cam_lookat(0_40_49_42_5, 0, 0, 100); +npc_add(0_40_49_47_5, khazard_guard_cutscene, 30); // 30t in old videos +npc_setmode(none); +npc_walk(0_40_49_41_5); +~forcemove(0_40_49_40_5); +if(loc_find(0_40_49_40_6, loc_79) = true) { + def_int $x; + def_int $z; + def_coord $loc_coord = loc_coord; + def_int $angle = loc_angle; + def_locshape $shape = loc_shape; + $x, $z = ~door_open($angle, loc_shape); + loc_change(loc_83, 2); + loc_add(movecoord($loc_coord, $x, 0, $z), loc_37, modulo(add($angle, 1), 4), $shape, 2); + sound_synth(grate_open, 0, 0); +} +~forcemove(movecoord(coord, 0, 0, 1)); +p_delay(0); +npc_anim(seq_552, 0); // looks right?: https://youtu.be/NHsQfeSPUb0?si=ppVvy7QV4CQOdeQv&t=159 +p_delay(0); +npc_walk(movecoord(npc_coord, -1, 0, 0)); +p_delay(1); +cam_reset; +~chatnpc("The General seems to have taken a liking to you. He'd normally kill imposters like you without a second thought."); + +[label,general_khazard_summon_bouncer] +~chatnpc("Not bad, not bad at all. I think you need a tougher challenge. Time for my puppy. Guards! Guards! Bring on Bouncer!"); +~mesbox("From above you hear a voice..... 'Ladies and gentlemen! Today's second round of battle is between the outsider and Bouncer.'"); +@arena_release_bouncer; + +[label,general_khazard_bouncer_killed] +~chatnpc("Nooooo! Bouncer! How dare you? You've taken the life of my only friend. Now you'll suffer traveller, prepare to meet your maker."); +~chatplayer("You agreed to let the Servils go if I stayed to fight."); +~chatnpc("Indeed. I obviously underestimated you, although you still pale in comparison to the might of General Khazard."); +~chatnpc("You shall see that I am not cowardly enough to make false promises. They may go."); +@general_khazard_attack; + +[label,general_khazard_agreement] +if (npc_find(movecoord(coord, 8, 0, 0), general_khazard, 15, 0) = false | ~npc_out_of_combat = false) { + npc_add(0_40_49_46_18, general_khazard, 500); // ticks guessed +} +~chatnpc("The agreement was that the Servils may leave if you won a few fights, and indeed they are now free to do so."); +@general_khazard_attack; + +[label,general_khazard_attack] +~chatnpc("You however have caused me much trouble today. You must remain here so that I may at least have the pleasure of killing you myself."); +%arena_progress = ^arena_freed_servils; +~npc_retaliate(0); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/hengrad.rs2 b/data/src/scripts/quests/quest_arena/scripts/hengrad.rs2 new file mode 100644 index 000000000..ece51cd28 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/hengrad.rs2 @@ -0,0 +1,80 @@ +[apnpc1,hengrad] +if (npc_range(coord) > 2) { + p_aprange(2); + return; +} +// I don't think you can be in the jail area at this quest-stage? +if(%arena_progress = 9) { + ~chatplayer("Are you ok stranger?"); + ~chatnpc("I'm fine thanks."); + ~chatnpc("So Khazard got his hands on you too?"); + ~chatplayer("I'm afraid so."); + ~chatnpc("If you're lucky you may last as long as me."); + ~chatplayer("How long have you been here?"); + ~chatnpc("I've been in Khazard's prisons ever since I can remember. I was a child when his men kidnapped me. My whole life has been spent killing and fighting, all in the hope that one day I might escape."); + ~chatplayer("Don't give up."); + ~chatnpc("Thanks friend."); + ~chatnpc("Wait.. sshh, the guard is coming. Looks like you'll be going into the arena. Good luck friend."); + if_close; + // https://youtu.be/NHsQfeSPUb0?si=c_S0jTnjDBF0xilE&t=189 + npc_add(0_40_49_26_4, khazard_guard_cutscene, 100); + npc_setmode(none); + p_delay(0); + // https://youtu.be/Y6eWjQnV4Mo?si=7aaHIhL6qoxCuntZ&t=170 the guard can get stuck at any point, doesnt interrupt anything + npc_walk(movecoord(coord, 1, 1, 0)); + npc_queue(10, 0, 1); + p_delay(7); + def_int $delay_diff = distance(coord, 0_40_49_40_6); + ~forcemove(0_40_49_40_6); + p_delay(calc(5 - $delay_diff)); + if(loc_find(0_40_49_40_6, loc_79) = true) { + def_int $x; + def_int $z; + def_coord $loc_coord = loc_coord; + def_int $angle = loc_angle; + def_locshape $shape = loc_shape; + $x, $z = ~door_open($angle, loc_shape); + loc_change(loc_83, 2); + loc_add(movecoord($loc_coord, $x, 0, $z), loc_37, modulo(add($angle, 1), 4), $shape, 2); + sound_synth(grate_open, 0, 0); + } + p_teleport(movecoord(coord, 0, 0, -1)); + p_delay(1); + ~forcemove(0_40_49_42_5); + ~forcemove(0_40_49_47_6); + ~forcemove(0_40_49_47_15); + p_delay(1); + npc_say("Get out there!"); + if(loc_find(0_40_49_46_16, loc_82) = true) { + def_int $x; + def_int $z; + def_coord $loc_coord = loc_coord; + def_int $angle = loc_angle; + def_locshape $shape = loc_shape; + $x, $z = ~door_open($angle, loc_shape); + loc_change(loc_83, 2); + loc_add(movecoord($loc_coord, $x, 0, $z), loc_1532, modulo(add($angle, 1), 4), $shape, 2); + sound_synth(door_open, 0, 0); + } + ~forcemove(movecoord(coord, -4, 0, 4)); + npc_del; + ~mesbox("From above you hear a voice..... 'Ladies and gentlemen! Let today's first fight between the outsider and everyone's favourite scorpion commence.'"); + @arena_release_scorp; +} else if(%arena_progress >= ^arena_defeated_scorpion) { // you can't access the cells between being sent there and defeating bouncer + ~chatplayer("Hello again."); + ~chatnpc("I don't know how you managed to escape the arena, but you may not be as lucky next time. Get out of here while you can."); +} else { + ~chatplayer("Do you know a Justin or Jeremy Servil?"); + if(~wearing_khazard_armour = true) { + ~chatnpc("You're not a real guard. I've been in here long enough to know that. What's your business?"); + ~chatplayer("I've been sent to rescue Sir Servil and his son."); + } + ~chatnpc("I've seen them in here, although they don't look up to much. My advice to you is to leave before you end up in a cell too."); +} + +[ai_queue10,khazard_guard_cutscene](int $arg) +npc_walk(0_40_49_39_5); +npc_queue(11, 0, 7); + +[ai_queue11,khazard_guard_cutscene](int $arg) +npc_say("Right you, move it."); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/jeremy_servil.rs2 b/data/src/scripts/quests/quest_arena/scripts/jeremy_servil.rs2 new file mode 100644 index 000000000..1bdac47a8 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/jeremy_servil.rs2 @@ -0,0 +1,161 @@ +[apnpc1,jeremy_servil] +if (npc_range(coord) > 2) { + p_aprange(2); + return; +} +switch_int(%arena_progress) { + case ^arena_freed_servils, ^arena_complete, ^arena_complete_defeated_genkhazard: mes("You've already rescued Jeremy from the fight arena."); + case ^arena_entered_ogre_fight, ^arena_defeated_ogre, ^arena_sent_jail, ^arena_defeated_scorpion, ^arena_defeated_bouncer: mes("Jeremy is in the arena with his father now."); + case ^arena_obtained_armour, ^arena_spoken_drunkguard, ^arena_given_khali_brew: + // https://youtu.be/Oltfw1gvWjQ?si=_bu-CCXvPLSecu_N&t=120 + if(inv_total(inv, khazard_cell_keys) > 0) { + @free_jeremy_servil; + } + ~chatplayer("Hello."); + ~chatnpc("Please Sir, don't hurt me."); + if(~wearing_khazard_armour = true) { + ~chatplayer("Sshh. This uniform is a disguise, I'm here to help. Where do they keep the keys?"); + } else { + ~chatplayer("Sshh. I'm here to help. Where do they keep the keys?"); + } + ~chatnpc("The guard always keeps hold of them."); + ~chatplayer("Don't lose heart, I'll be back."); +} + +[opnpc1,jeremy_servil_arena] +switch_int(%arena_progress) { + case ^arena_defeated_genkhazard: + // https://youtu.be/hh5v2nl4yT0?si=Tapg1Qypo5y0gNot&t=680 + ~chatplayer("Khazard is dead, you and your father can return to Lady Servil."); + ~chatnpc("Thank you, we are truly indebted to you."); + case ^arena_freed_servils: // guessed mesanims + ~chatplayer("You and your father should run, Khazard's interest is in me now."); + ~chatnpc("I'm sorry to have gotten you into so much trouble. You should run as well, Khazard is too dangerous."); + case ^arena_defeated_bouncer: // guessed mesanims + ~chatplayer("What does Khazard want with us now?"); + ~chatnpc("I don't know, but he won't be happy that you've killed his so called pet."); + @general_khazard_agreement; + case ^arena_sent_jail, ^arena_defeated_scorpion: + // https://youtu.be/etS0gMlcxx8?si=xx4Hvgt28HsL6JCi&t=344 + ~chatplayer("Don't worry, I'll get us out of here."); + ~chatnpc("Thanks traveller. I'm sorry that you too are now a subject of this arena."); + if (%arena_progress = ^arena_sent_jail) @arena_release_scorp; + else if (%arena_progress = ^arena_defeated_scorpion) @arena_release_bouncer; + case ^arena_defeated_ogre: + // TODO: check mesanim + ~chatplayer("Come on Jeremy, we have to get out of here."); + ~chatnpc("Thank you for saving my father."); + @khazard_welldone; + case ^arena_entered_ogre_fight: + ~chatplayer("Jeremy, where's your father?"); + ~chatnpc("Quick, help him! That beast will kill him. He's too old to fight."); + @ogre_attack_justin; + +} + +[label,free_jeremy_servil] +~chatplayer("Jeremy look, I have the keys."); +~chatnpc("Wow! Please set me free, then we can find my dad. I overheard a guard talking. I think they've taken him to the arena."); +~chatplayer("Ok, we'd better hurry."); +if_close; +def_coord $move_to = 0_40_49_56_31; +def_int $delay = distance(coord, $move_to); +if(loc_find(movecoord($move_to, 1, 0, 0), loc_80) = false) { + return; +} +p_walk(movecoord($move_to, 1, 0, 1)); +facesquare(movecoord(coord, 0, 0, -16)); +// to make sure we cant queue multiple of these when more than 1 person is doing the quest +// idk if this is how they checked it, maybe there's a bettter way +if(npc_getmode ! none & inzone(0_40_49_54_30, 0_40_49_56_34, npc_coord) = true) { + npc_setmode(none); + npc_queue(10, $delay, 0); +} +npc_setmode(null); +%arena_progress = ^arena_entered_ogre_fight; +if($delay >= 0) { + p_delay($delay); +} +def_int $x; +def_int $z; +def_coord $loc_coord = loc_coord; +def_int $angle = loc_angle; +def_locshape $shape = loc_shape; +$x, $z = ~door_open($angle, loc_shape); +loc_change(loc_83, 2); +loc_add(movecoord($loc_coord, $x, 0, $z), loc_37, modulo(add($angle, 1), 4), $shape, 2); +sound_synth(grate_open, 0, 0); +p_delay(6); +npc_del; +@arena_enter; + +[label,ogre_attack_justin] +if_close; +def_coord $ogre_to = 0_40_49_46_29; +if (npc_find(movecoord(coord, 0, 0, 8), khazard_ogre, 14, 0) = true) { + if(npc_getmode = none) { // npc in cutscene already, do nothing + return; + } else if(~npc_out_of_combat = true & inzone(0_40_49_47_29, 0_40_49_49_30, npc_coord) = false) { + // out of combat and out of cage so attack player, otherwise we'll just set ptr and start cutscene + ~npc_retaliate(0); + return; + } +} else { + npc_add($ogre_to, khazard_ogre, 500); +} +def_int $delay = distance(npc_coord, movecoord($ogre_to, 2, 0, 0)); +if (.npc_find(movecoord(coord, 0, 0, 8), justin_servil, 14, 0) = true) { + .npc_setmode(none); + .npc_walk(0_40_49_40_32); + .npc_facesquare(0_40_49_42_32); +} +cam_reset; +cam_moveto(movecoord($ogre_to, -7, 0, -4), 400, 0, 100); +cam_lookat(movecoord($ogre_to, -1, 0, 0), 200, 0, 100); +// open gate +npc_setmode(none); +npc_walk(movecoord($ogre_to, 1, 0, 0)); +p_delay($delay); +if(loc_find(0_40_49_46_29, loc_78) = true & .loc_find(0_40_49_46_30, loc_77) = true) { + loc_del(5); + loc_add(movecoord(loc_coord, 1, 0, 0), loc_type, 3, loc_shape, 5); + .loc_del(5); + .loc_add(movecoord(.loc_coord, 1, 0, 0), .loc_type, 1, .loc_shape, 5); +} +npc_tele($ogre_to); +npc_queue(10, 0, 1); +p_delay(2); +cam_reset; +cam_lookat(0_40_49_40_32, 270, 2, 1); +p_delay(6); +cam_reset; + +[ai_queue10,khazard_ogre](int $arg) +npc_walk(0_40_49_44_32); +npc_queue(11, 0, 4); + +[ai_queue11,khazard_ogre](int $arg) +npc_walk(0_40_49_41_32); +npc_queue(12, 0, 3); + +[ai_queue12,khazard_ogre](int $arg) +npc_anim(npc_param(attack_anim), 0); +npc_setmode(null); +if (.npc_find(npc_coord, justin_servil, 1, 0) = true) { + .npc_anim(human_defend_cowardly, 0); + .npc_setmode(null); +} + +[ai_queue10,jeremy_servil](int $arg) +npc_walk(0_40_49_56_31); +npc_queue(11, 0, calc($arg + 1)); + +[ai_queue11,jeremy_servil](int $arg) +npc_tele(movecoord(0_40_49_56_31, 1, 0, 0)); +npc_queue(12, 0, 2); + +[ai_queue12,jeremy_servil](int $arg) +// https://youtu.be/etS0gMlcxx8?si=xHy9CJHoitA58DUW&t=185 switches back to default mode here? +npc_say("I'll run ahead."); +npc_setmode(null); +npc_walk(movecoord(npc_coord, 0, 0, -5)); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/justin_servil.rs2 b/data/src/scripts/quests/quest_arena/scripts/justin_servil.rs2 new file mode 100644 index 000000000..673596441 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/justin_servil.rs2 @@ -0,0 +1,31 @@ +[opnpc1,justin_servil] +switch_int(%arena_progress) { + case ^arena_entered_ogre_fight: + ~chatplayer("Lady Servil sent me to rescue you and your son. Come on, we have to get out of here."); + ~chatnpc("I'm too old to fight. I'm afraid you'll have to kill that ogre by yourself."); + case ^arena_defeated_ogre: + ~chatplayer("Are you alright?"); + @justin_servil_saved; + case ^arena_sent_jail: + ~chatplayer("Don't worry, I'll get us out of here."); + ~chatnpc("You've incurred the anger of Khazard yourself now. He won't let any of us go easily."); + @arena_release_scorp; + case ^arena_defeated_scorpion: + ~chatplayer("Come on, we only have to fight a creature called bouncer now."); + ~chatnpc("You may laugh, but the name of the General's 'pet' is feared by many in this land."); + @arena_release_bouncer; + case ^arena_defeated_bouncer: // guessed mesanims + ~chatplayer("What does Khazard want with us now?"); + ~chatnpc("I don't know, but I can't imagine he'll be happy with you now."); + @general_khazard_agreement; + case ^arena_freed_servils: // guessed mesanims + ~chatplayer("You can run, Khazard's interest is in me now."); + ~chatnpc("My thanks, we'll be ok now. I suggest you run too, General Khazard is mighty and his anger fearsome."); + case ^arena_defeated_genkhazard: // guessed mesanims, dialogue from chisel + ~chatplayer("Khazard is dead, you can return to your wife."); + ~chatnpc("My thanks. But Khazard is not as easy to kill as you might think. I suggest that none of us remain here too long."); +} + +[label,justin_servil_saved] +~chatnpc("You saved my life and my son's, I am eternally in your debt brave traveller."); +@khazard_welldone; \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/khazard_barman.rs2 b/data/src/scripts/quests/quest_arena/scripts/khazard_barman.rs2 new file mode 100644 index 000000000..ac2d1c68a --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/khazard_barman.rs2 @@ -0,0 +1,39 @@ +// in osrs he has an apnpc script, this was added later: https://youtu.be/DMYjQrzmBT8?si=_caaKMIGPS5YeaRq&t=149 +[opnpc1,khazard_barman] +~chatplayer("Hello."); +~chatnpc("Hi, what can I get you? We have a range of quality brews."); +def_int $option; +if(%arena_progress >= ^arena_spoken_drunkguard) { + $option = ~p_choice3("I'll have a beer please.", 1, "I'd like a Khali brew please.", 3, "Got any news?", 2); +} else { + $option = ~p_choice2("I'll have a beer please.", 1, "Got any news?", 2); +} +switch_int($option) { + case 1: + ~chatplayer("I'll have a beer please."); + // chisel, wiki (historic) has it in the wrong order + if(inv_total(inv, coins) < 2) { + ~chatnpc("That'll be two coins please."); + ~chatplayer("Oh, I don't have enough money with me."); + return; + } + inv_del(inv, coins, 2); + inv_add(inv, beer, 1); + ~chatnpc("There you go, that's two gold coins."); + case 2: + // https://youtu.be/Oltfw1gvWjQ?si=LixZCKfHSm-zyTs7&t=238 + ~chatplayer("Got any news?"); + ~chatnpc("If you want to see the action around here you should visit the famous Khazard fight arena. I've seen some grand battles in my time. Ogres, goblins, even dragons have fought there."); + ~chatnpc("Although you have to feel sorry for some of the slaves sent in there."); + case 3: + // https://youtu.be/Oltfw1gvWjQ?si=Khm5ce54r4JF8Ynx&t=225 + ~chatplayer("I'd like a Khali brew please."); + if(inv_total(inv, coins) < 2) { + ~chatnpc("That'll be five gold coins please."); + ~chatplayer("Oh, I don't have enough money with me."); + return; + } + inv_del(inv, coins, 5); + inv_add(inv, khali_brew, 1); + ~chatnpc("There you go, that's five gold coins. I suggest lying down before you drink it. That way you have less distance to collapse."); +} diff --git a/data/src/scripts/quests/quest_arena/scripts/khazard_guard.rs2 b/data/src/scripts/quests/quest_arena/scripts/khazard_guard.rs2 new file mode 100644 index 000000000..ea5d94006 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/khazard_guard.rs2 @@ -0,0 +1,142 @@ +[opnpc1,khazard_guard_standard] +switch_int(%arena_progress) { + case ^arena_freed_servils, ^arena_complete, ^arena_complete_defeated_genkhazard: + ~chatplayer("Hello."); + @khazard_guard_killed_bouncer; + case default: + if(inv_total(worn, khazard_helmet) > 0 & inv_total(worn, khazard_armour) > 0 & %arena_progress > ^arena_obtained_armour) { + ~chatplayer("Hello."); + ~chatnpc("Can I help you stranger?"); + ~chatnpc("Oh, you're a guard as well. That's ok then. We don't like strangers around here."); + return; + } + ~chatplayer("Hello."); + ~chatnpc("I don't know you stranger. Get off our land."); +} + +[opnpc1,khazard_guard_chest] +switch_int(%arena_progress) { + case ^arena_freed_servils, ^arena_complete, ^arena_complete_defeated_genkhazard: + ~chatplayer("Hi."); + ~chatnpc("You're the fiend who killed Bouncer."); + if_close; + npc_say("En garde fiend!"); + ~npc_retaliate(0); + case default: + if(inv_total(worn, khazard_helmet) > 0 & inv_total(worn, khazard_armour) > 0 & %arena_progress > ^arena_obtained_armour) { + ~chatplayer("Hello."); + ~chatnpc("Despicable thieving scum, that was good armour. Did you see anyone around here soldier?"); + ~chatplayer("Me? No, no one!"); + ~chatnpc("Hmmmm."); + return; + } + ~chatplayer("Hi."); + ~chatnpc("Who goes there?"); + ~chatplayer("Er... I... um..."); + ~chatnpc("I don't know who you are. Get out of my house stranger."); +} + +[opnpc1,khazard_guard_cells] +switch_int(%arena_progress) { + case ^arena_freed_servils, ^arena_complete, ^arena_complete_defeated_genkhazard: + ~chatplayer("Hi."); + @khazard_guard_generals_pet; + case ^arena_entered_ogre_fight, ^arena_defeated_ogre: + if(~wearing_khazard_armour = true) { + ~chatplayer("Hello."); + ~chatnpc("I hope you're keeping busy."); + ~chatplayer("Of course."); + ~chatnpc("General Khazard doesn't tolerate the lazy. If you're not keeping busy I'll practice my combat skills on your hide."); + } + @khazard_guard_restricted; + case default: + if(inv_total(worn, khazard_helmet) > 0 & inv_total(worn, khazard_armour) > 0 & %arena_progress > ^arena_obtained_armour) { + // https://youtu.be/Oltfw1gvWjQ?si=eSP7-x6D-mQvNEZx&t=132 + ~chatplayer("Hello."); + ~chatnpc("I've never seen you around here before!"); + ~chatplayer("Long live General Khazard!"); + ~chatnpc("Erm.. yes.. soldier, I take it you're new around here?"); + ~chatplayer("You could say that."); + ~chatnpc("Khazard died two hundred years ago. However his dark spirit remains in the form of the undead maniac General Khazard. Remember he is your master, always watching."); + ~chatnpc("Got that newbie?"); + ~chatplayer("Undead, maniac, master. Got it, loud and clear."); + return; + } + @khazard_guard_restricted; +} + +// theres no opnpcu here (rs3 and osrs has one): https://youtu.be/nptASzjG_Xk?si=wfdwpDNiM98YMi5t&t=165 +[opnpc1,khazard_guard_drunk] +switch_int(%arena_progress) { + case ^arena_given_khali_brew, ^arena_entered_ogre_fight, ^arena_defeated_ogre, ^arena_sent_jail, ^arena_defeated_scorpion, + ^arena_defeated_bouncer, ^arena_freed_servils, ^arena_defeated_genkhazard: + if(~wearing_khazard_armour = false) { + ~chatplayer("Hello."); + ~chatnpc("Go away. Thish areash resh... restricted! We don't like strangersh, 'specially ones who sway. Oooh!"); + return; + } + if(inv_total(inv, khazard_cell_keys) = 0 & %arena_progress < ^arena_entered_ogre_fight) { // can't reclaim after this point on RS3, not sure if this was always the case + ~chatplayer("Hi, er.. I lost the keys."); + ~chatnpc("What?! You're foolish..."); + ~chatplayer("...and I'm drunk. Here, take my spare set."); + inv_add(inv, khazard_cell_keys, 1); + } + ~chatplayer("Hello, how's the job?"); + ~chatnpc("Please, leave me alone. I'm sure the walls never used to sway that much."); + case ^arena_spoken_drunkguard: + if(~wearing_khazard_armour = true) { + ~chatplayer("Hello again."); + ~chatnpc("Bored, bored, bored. You'd think the slaves would be more entertaining. Selfish the lot of them."); + if(inv_total(inv, khali_brew) > 0) { + @khazard_guard_drunk_interested; + } + // https://web.archive.org/web/20050305053139im_/http://runevillage.com/images/rsfight5.gif + ~chatnpc("I used to enjoy this job, but now|all I want is a decent drink."); + return; + } + @khazard_guard_restricted; // not 100% sure on this + case ^arena_obtained_armour: + if(~wearing_khazard_armour = true) { + ~chatplayer("Long live General Khazard!"); + ~chatnpc("Erm.. yes.. quite right."); + ~chatnpc("Have you come to laugh at the fight slaves? I used to really enjoy it, but after a while they become quite boring."); + ~chatnpc("Now I just want a decent drink. Mind you, too much Khali brew and I'll fall asleep."); + %arena_progress = ^arena_spoken_drunkguard; + return; + } + @khazard_guard_restricted; // not 100% sure on this +} + +[label,khazard_guard_drunk_interested] +~chatplayer("Do you still fancy a drink?"); +~chatnpc("I really shouldn't... oh... ok then just the one."); +~mesbox("You hand a bottle of Khali brew to the guard. He takes a mouthful of the drink."); +~chatnpc("Blimey this stuff is pretty good. It's not too strong is it?"); +~chatplayer("No, not at all. You'll be fine."); +~mesbox("The guard quickly finishes the rest of the bottle and begins to sway slightly."); +~chatnpc("That is some gooood stuff... yeah... wooh yeah!"); +~chatplayer("Are you alright?"); +~chatnpc("Yeesshh, hiccup! Oooh, maybe I sshould relax for a while."); +~chatplayer("Good idea. I'll look after the prisoners."); +%arena_progress = ^arena_given_khali_brew; +inv_del(inv, khali_brew, 1); +inv_add(inv, khazard_cell_keys, 1); +~chatnpc("Yeesh, yes that shounds reasonable. Here, 'hiccup', take the keysch. Any trouble, you give... you givem a good beating."); +~chatplayer("No problem, I'll keep them in line."); + +[label,khazard_guard_restricted] +~chatplayer("Hello."); +~chatnpc("This area is restricted, leave now!"); +~chatnpc("OUT! And don't come back."); + +[label,khazard_guard_killed_bouncer] +~chatnpc("You're the one who killed Bouncer."); +if_close; +npc_say("Die traitor!"); +~npc_retaliate(0); + +[label,khazard_guard_generals_pet] +~chatnpc("You're him. The one who murdered the General's pet."); +if_close; +~npc_retaliate(0); +npc_say("You'll pay for that mistake!"); diff --git a/data/src/scripts/quests/quest_arena/scripts/khazard_ogre.rs2 b/data/src/scripts/quests/quest_arena/scripts/khazard_ogre.rs2 new file mode 100644 index 000000000..c42a71f5e --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/khazard_ogre.rs2 @@ -0,0 +1,23 @@ +[ai_queue3,khazard_ogre](int $arg) +gosub(npc_death); +if(npc_findhero = true) { + if_close; + if(p_finduid(uid) = true) { // get protected access, if not then queue + @defeat_khazard_ogre; + } + queue(queue_defeat_khazard_ogre, 0, npc_uid); //strongqueue probably +} + +[queue,queue_defeat_khazard_ogre](npc_uid $npc) +if (npc_finduid($npc) = true) { + @defeat_khazard_ogre; +} + +[label,defeat_khazard_ogre] +if(%arena_progress = ^arena_entered_ogre_fight) { + %arena_progress = ^arena_defeated_ogre; + if (npc_find(movecoord(coord, 8, 0, 0), justin_servil, 15, 0) = false) { + return; + } + @justin_servil_saved; +} \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/khazard_scorpion.rs2 b/data/src/scripts/quests/quest_arena/scripts/khazard_scorpion.rs2 new file mode 100644 index 000000000..1f8104da4 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/khazard_scorpion.rs2 @@ -0,0 +1,23 @@ +[ai_queue3,khazard_scorpion](int $arg) +gosub(npc_death); +if(npc_findhero = true) { + if_close; + if(p_finduid(uid) = true) { // get protected access, if not then queue + @defeat_khazard_scorpion; + } + queue(queue_defeat_khazard_scorpion, 0, npc_uid); //strongqueue probably +} + +[queue,queue_defeat_khazard_scorpion](npc_uid $npc) +if (npc_finduid($npc) = true) { + @defeat_khazard_scorpion; +} + +[label,defeat_khazard_scorpion] +if(%arena_progress = ^arena_sent_jail) { + %arena_progress = ^arena_defeated_scorpion; + if (npc_find(movecoord(coord, 8, 0, 0), general_khazard, 15, 0) = false) { + return; + } + @general_khazard_summon_bouncer; +} \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/lady_servil.rs2 b/data/src/scripts/quests/quest_arena/scripts/lady_servil.rs2 new file mode 100644 index 000000000..c4d2cbe30 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/lady_servil.rs2 @@ -0,0 +1,47 @@ +[opnpc1,lady_servil] +switch_int(%arena_progress) { + case ^arena_complete, ^arena_complete_defeated_genkhazard: // mesanims guessed + ~chatplayer("Hello Lady Servil."); + ~chatnpc("Oh hello my dear. My husband and son are resting while I wait for the cart fixer."); + ~chatplayer("I hope he's not too long."); + ~chatnpc("Thanks again for everything."); + case ^arena_freed_servils, ^arena_defeated_genkhazard: + ~chatplayer("Lady Servil."); + ~chatnpc("You're alive, I thought Khazard's men had taken you."); + ~chatnpc("My son and husband are safe and recovering at home. Without you they would certainly be dead. I am truly grateful for your service."); + ~chatnpc("All I can offer in return is material wealth. Please take these coins as a sign of my gratitude."); + queue(arena_quest_complete, 0); + case ^arena_entered_ogre_fight, ^arena_defeated_ogre, ^arena_sent_jail, ^arena_defeated_scorpion, ^arena_defeated_bouncer: + ~chatplayer("Lady Servil. I freed your son, however he has returned to the arena to help your husband."); + ~chatnpc("Oh no, they won't stand a chance. Please go back and help."); + case ^arena_spoken_drunkguard, ^arena_given_khali_brew: + ~chatplayer("Lady Servil, I've managed to infiltrate General Khazard's arena."); + ~chatnpc("And my family?"); + ~chatplayer("I'm working on it."); + ~chatnpc("Please hurry."); + case ^arena_obtained_armour: + ~chatplayer("Hello Lady Servil."); + ~chatnpc("Have you had any luck with freeing my family?"); + ~chatplayer("I've managed to get a guard's uniform, hopefully I can infiltrate the arena."); + ~chatnpc("Please hurry."); + case ^arena_not_started: + ~chatplayer("Hi there, looks like you're in some trouble."); + ~chatnpc("Oh I wish this broken cart was my only problem. sob.. I've got to find my family.. sob."); + switch_int(~p_choice2("I hope you can, good luck.", 1, "Can I help you?", 2)) { + case 1: + ~chatplayer("I hope you can, good luck."); + case 2: + ~chatplayer("Can I help you?"); + ~chatnpc("Would you? Please?"); + ~chatnpc("I'm Lady Servil, my husband is Sir Servil. We were travelling north together with our son Jeremy when we were ambushed by General Khazard's men."); + ~chatplayer("General Khazard?"); + ~chatnpc("He's been after me ever since I declined his hand in marriage."); + ~chatnpc("Now he's kidnapped my husband and son to fight in his battle arena to the south of here. I hate to think what he'll do to them. He's a sick and twisted man."); + %arena_progress = ^arena_started; + ~chatplayer("I'll try my best to return your family."); + ~chatnpc("Please do. My family is wealthy and can reward you handsomely. I'll be waiting here for you."); + } + case default: + ~chatplayer("Hello Lady Servil."); + ~chatnpc("Brave traveller, please... bring back my family."); +} \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/local.rs2 b/data/src/scripts/quests/quest_arena/scripts/local.rs2 new file mode 100644 index 000000000..09456c4ff --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/local.rs2 @@ -0,0 +1,36 @@ +[opnpc1,local] +switch_int(%arena_progress) { + case ^arena_defeated_bouncer, ^arena_defeated_genkhazard, ^arena_complete, ^arena_complete_defeated_genkhazard: + ~chatplayer("Hello."); + ~chatnpc("You're the guy who beat Bouncer, amazing!"); + ~chatnpc("That makes you a champion to many, but you'd better get out of here while you still can. General Khazard liked that brute."); + case ^arena_defeated_ogre, ^arena_sent_jail, ^arena_defeated_scorpion: + ~chatplayer("Hello."); + ~chatnpc("Hey you're the guy from the arena! How'd you get out!"); + case ^arena_entered_ogre_fight: + ~chatplayer("Hello."); + if(inv_total(worn, khazard_helmet) > 0 & inv_total(worn, khazard_armour) > 0) { + ~chatnpc("Hello stranger. Khazard's got some great fights lined up this week. I can't wait."); + return; + } + ~chatnpc("Please, I havn't done anything"); + ~chatplayer("What?"); + ~chatnpc("I love General Khazard, please believe me."); + case ^arena_started, ^arena_obtained_armour, ^arena_spoken_drunkguard, ^arena_given_khali_brew: + // mesanims from rs3, lines up with this fortunately: https://web.archive.org/web/20051025134523im_/http://runeweb.net/rathofdoom/quests/fightarena/2.png + ~chatplayer("Hello."); + if(inv_total(worn, khazard_helmet) > 0 & inv_total(worn, khazard_armour) > 0) { + ~chatnpc("I heard the Servil family are fighting soon. Should be very entertaining."); + return; + } + ~chatnpc("Hello stranger, are you new to these parts?"); + ~chatplayer("I suppose I am."); + ~chatnpc("What's your business?"); + ~chatplayer("Just visiting friends in the cells."); + ~chatnpc("Visiting, that's funny."); + ~chatnpc("Only Khazard guards are allowed to see prisoners. Unless you know where to get some Khazard armour, you won't be visiting anyone."); + case ^arena_not_started: + ~chatplayer("Hello."); + ~chatnpc("Hello stranger, are you new to these parts?|You look lost."); + ~chatnpc("I suppose you're here for the fight arena?|There are some rich folk fighting tomorrow.|Should be entertaining."); +} \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arena/scripts/quest_arena.rs2 b/data/src/scripts/quests/quest_arena/scripts/quest_arena.rs2 new file mode 100644 index 000000000..82db31007 --- /dev/null +++ b/data/src/scripts/quests/quest_arena/scripts/quest_arena.rs2 @@ -0,0 +1,271 @@ +[oploc1,loc_75] +mes("You open the chest."); +~open_chest(loc_76); + +[oploc1,loc_76] +// doesnt check bank in RS3, assuming this will probably work the same way +def_int $armour_count = calc(inv_total(inv, khazard_armour) + inv_total(worn, khazard_armour)); +def_int $helmet_count = calc(inv_total(inv, khazard_helmet) + inv_total(worn, khazard_helmet)); +if(%arena_progress = 0 | ($armour_count > 0 & $helmet_count > 0)) { + mes("You search the chest, but find nothing."); + return; +} +if($armour_count > 0 & $helmet_count = 0) { + inv_add(inv, khazard_helmet, 1); + // assuming these 2 have linebreaks at the same point as below image + ~mesbox("You search the chest, and find the|helmet of a Khazard guard."); + return; +} +if($helmet_count > 0 & $armour_count = 0) { + inv_add(inv, khazard_armour, 1); + ~mesbox("You search the chest, and find the|armour of a Khazard guard."); + return; +} +if(%arena_progress = ^arena_started) { + %arena_progress = ^arena_obtained_armour; +} +inv_add(inv, khazard_armour, 1); +inv_add(inv, khazard_helmet, 1); +// https://web.archive.org/web/20050305053139im_/http://runevillage.com/images/rsfight2.gif +~mesbox("You search the chest, and find the|helmet and armour of a Khazard guard."); + +[oploc1,loc_81] +if(~check_axis(coord, loc_coord, loc_angle) = true) { + ~open_and_close_door(loc_1532, true, false); + return; +} +// no "locked" sound... (osrs has it): https://youtu.be/Oltfw1gvWjQ?si=pAK0N9CJmLUyWOBk&t=106 +~chatplayer("This door appears to be locked."); +if (npc_find(coord, khazard_guard_cells, 5, 0) = false) { + return; +} +switch_int(%arena_progress) { + case ^arena_freed_servils, ^arena_defeated_genkhazard, ^arena_complete, ^arena_complete_defeated_genkhazard: @khazard_guard_generals_pet; + case ^arena_sent_jail, ^arena_defeated_scorpion, ^arena_defeated_bouncer: + ~chatnpc("So you're back for more are you? General Khazard will be pleased."); + @arena_enter; + case default: + if(%arena_progress < ^arena_obtained_armour | (inv_total(worn, khazard_helmet) = 0 & inv_total(worn, khazard_armour) = 0)) { + ~chatnpc("Yeah, it's to prevent people like you bothering us. Get out of here."); + return; + } + ~chatnpc("Nice observation guard. You could have just asked to be let in like a normal person."); +} +~open_and_close_door(loc_1532, false, false); + +[proc,wearing_khazard_armour](boolean) +if(inv_total(worn, khazard_helmet) > 0 & inv_total(worn, khazard_armour) > 0) { + return (true); +} +return (false); + +[oploc1,loc_79] +// https://youtu.be/IOFokveRlxo?si=ub-OWnA_SJAqjFbp&t=458 +mes("The gate appears to be locked."); + +[oploc1,loc_80] +mes("The cell gate is securely locked."); + +[oplocu,loc_79] +// use keys +if(last_useitem = khazard_cell_keys) { + ~chatplayer("The gate is locked, but Jeremy's not in there anyway."); // chisel + return; +} +~displaymessage(^dm_default); + +[oplocu,loc_80] +// use keys +if(last_useitem = khazard_cell_keys) { + if(%arena_progress = ^arena_given_khali_brew) { + if (npc_find(coord, jeremy_servil, 4, 0) = true & npc_getmode ! null) { + @free_jeremy_servil; + } + } else if(%arena_progress < ^arena_defeated_bouncer & %arena_progress >= ^arena_entered_ogre_fight) { // rs3 cage works differently so using pre-rework messages from OSRS + mes("Jeremy is in the arena with his father now."); + } else { + mes("You've already rescued Jeremy from the fight arena."); + } +} +~displaymessage(^dm_default); + +[oploc1,loc_82] +if(coordz(coord) < 3152) { + switch_int(%arena_progress) { + case ^arena_freed_servils, ^arena_defeated_genkhazard, ^arena_complete, ^arena_complete_defeated_genkhazard: + if (npc_find(coord, khazard_guard_standard, 7, 0) = false) { + mes("This door appears to be locked."); // probably (this from RS3)? not sure + return; + } + @khazard_guard_killed_bouncer; + case ^arena_entered_ogre_fight, ^arena_defeated_ogre: @open_arena_door; + case default: + if (npc_find(coord, khazard_guard_standard, 7, 0) = false) { + mes("This door appears to be locked."); + return; + } + ~chatnpc("And where do you think you're going? Only General Khazard decides who fights in the arena. Get out of here."); + } +} else { + switch_int(%arena_progress) { + case ^arena_sent_jail, ^arena_defeated_scorpion: + ~chatnpc_specific(nc_name(khazard_guard_cells), khazard_guard_cells, "It would be impolite to leave now. The General insists you stay a little longer."); + ~forcemove(movecoord(coord, -2, 0, 2)); + if (%arena_progress = ^arena_sent_jail) @arena_release_scorp; + else if (%arena_progress = ^arena_defeated_scorpion) @arena_release_bouncer; + case ^arena_defeated_ogre: @khazard_welldone; + case ^arena_given_khali_brew, ^arena_entered_ogre_fight: + // chatnpc_specific on RS3 + ~chatnpc_specific(nc_name(jeremy_servil), jeremy_servil, "Please don't go, you must help us. We'll never survive in here alone."); + ~chatplayer("Where's your father Jeremy?"); + ~chatnpc_specific(nc_name(jeremy_servil), jeremy_servil, "Quick, help him! That beast will kill him. He's too old to fight."); + @ogre_attack_justin; + case default: + sound_synth(door_open, 0, 0); + ~forcewalk(0_40_49_45_17); + def_int $x; + def_int $z; + def_coord $loc_coord = loc_coord; + def_int $angle = loc_angle; + def_locshape $shape = loc_shape; + $x, $z = ~door_open($angle, loc_shape); + loc_change(loc_83, 2); + loc_add(movecoord($loc_coord, $x, 0, $z), loc_1532, modulo(add($angle, 1), 4), $shape, 2); + ~forcemove(movecoord(coord, 2, 0, -2)); + } +} + +[label,arena_enter] +p_teleport(0_40_49_47_16); +// these numbers are all eyeballed (cam packets) since OSRS has changed this part entirely +cam_moveto(0_40_49_45_24, 270, 0, 100); +cam_lookat(0_40_49_43_17, 200, 0, 100); +p_delay(1); +if(loc_find(0_40_49_46_16, loc_82) = true) { + def_int $x; + def_int $z; + def_coord $loc_coord = loc_coord; + def_int $angle = loc_angle; + def_locshape $shape = loc_shape; + $x, $z = ~door_open($angle, loc_shape); + loc_change(loc_83, 2); + loc_add(movecoord($loc_coord, $x, 0, $z), loc_1532, modulo(add($angle, 1), 4), $shape, 2); + sound_synth(door_open, 0, 0); +} +cam_moveto(0_40_49_43_26, 270, 1, 1); +cam_lookat(0_40_49_43_15, 270, 1, 1); +~forcemove(movecoord(coord, -2, 0, 0)); +cam_reset; +cam_moveto(0_40_49_43_26, 270, 2, 1); +cam_lookat(0_40_49_43_15, 270, 2, 1); +~forcemove(movecoord(coord, -2, 0, 2)); +~forcemove(movecoord(coord, 0, 0, 1)); +p_delay(1); +cam_reset; +if (%arena_progress = ^arena_entered_ogre_fight & npc_find(coord, jeremy_servil_arena, 8, 0) = true) { + ~chatnpc("Quick, help him! That beast will kill him. He's too old to fight."); + @ogre_attack_justin; +} else if (%arena_progress = ^arena_sent_jail) { + ~mesbox("From above you hear a voice..... 'Ladies and gentlemen! Let today's first fight between the outsider and everyone's favourite scorpion commence.'"); + @arena_release_scorp; +} + +[label,open_arena_door] +sound_synth(door_open, 0, 0); +~forcewalk(0_40_49_47_15); +def_int $x; +def_int $z; +def_coord $loc_coord = loc_coord; +def_int $angle = loc_angle; +def_locshape $shape = loc_shape; +$x, $z = ~door_open($angle, loc_shape); +loc_change(loc_83, 2); +loc_add(movecoord($loc_coord, $x, 0, $z), loc_1532, modulo(add($angle, 1), 4), $shape, 2); +~forcemove(movecoord(coord, -2, 0, 2)); +if (%arena_progress = ^arena_defeated_ogre & npc_find(coord, general_khazard, 8, 0) = true) { + @khazard_welldone; +} + +[label,arena_release_scorp] +// again, guessed numbers +if_close; +def_coord $cam_coord = 0_40_49_39_23; +if (npc_find(movecoord(coord, 0, 0, 8), khazard_scorpion, 14, 0) = true) { + if(npc_getmode = none) { // npc in cutscene already, do nothing + return; + } else if(~npc_out_of_combat = true & inzone(0_40_49_47_23, 0_40_49_49_24, npc_coord) = false) { + // out of combat and out of cage so attack player, otherwise we'll just set ptr and start cutscene + ~npc_retaliate(0); + return; + } +} else { + npc_add(0_40_49_47_23, khazard_scorpion, 500); +} +npc_setmode(none); +cam_moveto(0_40_49_35_23, 700, 0, 100); +cam_lookat(0_40_49_47_23, 100, 0, 100); +cam_moveto(0_40_49_41_23, 450, 4, 2); +npc_walk(0_40_49_47_23); +p_delay(2); +if(loc_find(0_40_49_46_23, loc_78) = true & .loc_find(0_40_49_46_24, loc_77) = true) { + loc_del(5); + loc_add(movecoord(loc_coord, 1, 0, 0), loc_type, 3, loc_shape, 5); + .loc_del(5); + .loc_add(movecoord(.loc_coord, 1, 0, 0), .loc_type, 1, .loc_shape, 5); +} +npc_tele(movecoord(npc_coord, -1, 0, 0)); +~npc_retaliate(0); +p_delay(1); +cam_reset; + +[label,arena_release_bouncer] +// again, guessed numbers +if_close; +def_coord $cam_coord = 0_40_49_39_23; +if (npc_find(movecoord(coord, 0, 0, 8), bouncer, 14, 0) = true) { + if(npc_getmode = none) { // npc in cutscene already, do nothing + return; + } else if(~npc_out_of_combat = true & inzone(0_40_49_47_26, 0_40_49_49_27, npc_coord) = false) { + // out of combat and out of cage so attack player, otherwise we'll just set ptr and start cutscene + ~npc_retaliate(0); + return; + } +} else { + npc_add(0_40_49_47_26, bouncer, 500); +} +npc_setmode(none); +cam_moveto(0_40_49_35_26, 700, 0, 100); +cam_lookat(0_40_49_47_26, 100, 0, 100); +cam_moveto(0_40_49_41_26, 450, 4, 2); +npc_walk(0_40_49_47_26); +p_delay(2); +if(loc_find(0_40_49_46_26, loc_78) = true & .loc_find(0_40_49_46_27, loc_77) = true) { + loc_del(5); + loc_add(movecoord(loc_coord, 1, 0, 0), loc_type, 3, loc_shape, 5); + .loc_del(5); + .loc_add(movecoord(.loc_coord, 1, 0, 0), .loc_type, 1, .loc_shape, 5); +} +npc_tele(movecoord(npc_coord, -1, 0, 0)); +~npc_retaliate(0); +p_delay(2); +cam_reset; + +[debugproc,c3a] +if(p_finduid(uid) = false) { + return; +} +@arena_release_scorp; + +[debugproc,c4a] +if(p_finduid(uid) = false) { + return; +} +@arena_release_bouncer; + +[queue,arena_quest_complete] +%arena_progress = calc(%arena_progress + 2); // 14 if you're on 12 or 15 on if you're on 13 +inv_add(inv, coins, 1000); +givexp(attack, 121750); +givexp(thieving, 21750); +// TODO: can't find an image of this so might need to confirm obj zoom + text breaking +~send_quest_complete(questlist:arena, coins, 250, ^arena_questpoints, "You have completed the\\nFight Arena Quest!"); \ No newline at end of file diff --git a/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 b/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 index 9cb1d6ae3..9b1cc31d1 100644 --- a/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 +++ b/data/src/scripts/quests/quest_arthur/scripts/sir_mordred.rs2 @@ -10,6 +10,12 @@ if(npc_stat(hitpoints) = 0) { } @player_combat_start; +[apnpc2,sir_mordred] +if(npc_stat(hitpoints) = 0) { + npc_statheal(hitpoints, npc_basestat(hitpoints), 0); +} +@player_combat_start_ap; + [ai_queue3,sir_mordred](int $arg) if (npc_findhero = true & %arthur_progress >= ^arthur_spoken_lancelot & %arthur_progress < ^arthur_complete) { @lefaye_spare_son; diff --git a/data/src/scripts/quests/quest_ball/configs/quest_ball.vars b/data/src/scripts/quests/quest_ball/configs/quest_ball.vars deleted file mode 100644 index a6afdf7fd..000000000 --- a/data/src/scripts/quests/quest_ball/configs/quest_ball.vars +++ /dev/null @@ -1,5 +0,0 @@ -[ball_shed_uid] -type=player_uid - -[ball_shed_entered] -type=boolean \ No newline at end of file diff --git a/data/src/scripts/quests/quest_ball/configs/witches_house.npc b/data/src/scripts/quests/quest_ball/configs/witches_house.npc index 2a708f0aa..c08a9e466 100644 --- a/data/src/scripts/quests/quest_ball/configs/witches_house.npc +++ b/data/src/scripts/quests/quest_ball/configs/witches_house.npc @@ -28,7 +28,6 @@ patrol1=0_45_54_50_7,0 patrol2=0_45_54_24_7,0 huntmode=ball_caught huntrange=3 -param=death_sound,female_death [witches_experiment_p1] name=Witches experiment diff --git a/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 b/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 index 5aeeeabe9..4c2790afe 100644 --- a/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 +++ b/data/src/scripts/quests/quest_ball/scripts/quest_ball.rs2 @@ -138,20 +138,15 @@ if(last_useitem = ball_shedkey) { // prob just something weird with the new models def_boolean $entering = ~check_axis(coord, loc_coord, loc_angle); if($entering = false) { - // TODO: change this to use huntall and inzone (i'm almost certain this is what it does on osrs) // this mechanic existed on OSRS release (2007), i'm not sure if it originally existed // but no proof otherwise - if(%ball_shed_entered = false) { - %ball_shed_entered = true; - %ball_shed_uid = null; - } - if(%ball_shed_uid ! null) { - ~chatplayer("I'd better not go in there yet... I think I can hear someone inside!"); - return; + huntall(coord, 5, 0); + while(.huntnext = true) { + if(inzone(0_45_54_54_3, 0_45_54_57_11, .coord) = true) { + ~chatplayer("I'd better not go in there yet... I think I can hear someone inside!"); + return; + } } - %ball_shed_uid = uid; - softtimer(shed_var_check, 1); - npc_huntall(coord, 7, 0); while (npc_huntnext = true) { if (npc_category = witches_experiment) { @@ -165,17 +160,6 @@ if(last_useitem = ball_shedkey) { } mes("The shed door is locked."); -[softtimer,shed_var_check] -if(inzone(0_45_54_54_3, 0_45_54_57_11, coord) = false) { - ~clear_ball_shed_uid; - clearsofttimer(shed_var_check); -} - -[proc,clear_ball_shed_uid] -if(%ball_shed_uid = uid) { - %ball_shed_uid = null; -} - [oploc2,loc_2864] if(~obj_gettotal(ball_shedkey) > 0) { // checks bank mes("There is nothing in the fountain."); diff --git a/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 b/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 index 626c14912..caf855937 100644 --- a/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 +++ b/data/src/scripts/quests/quest_grail/scripts/black_knight_titan.rs2 @@ -13,6 +13,12 @@ if(npc_stat(hitpoints) = 0) { } @player_combat_start; +[apnpc2,black_knight_titan] +if(npc_stat(hitpoints) = 0) { + npc_statheal(hitpoints, npc_basestat(hitpoints), 0); +} +@player_combat_start_ap; + [ai_queue3,black_knight_titan](int $arg) if(npc_findhero = true) { if_close; diff --git a/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 b/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 index acde69217..ce5b9e60c 100644 --- a/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 +++ b/data/src/scripts/quests/quest_hazeelcult/scripts/alomone.rs2 @@ -103,7 +103,6 @@ if(npc_findhero = true) { if_close; if(p_finduid(uid) = true) { // get protected access, if not then queue @defeat_alomone; - return; } queue(queue_defeat_alomone, 0, npc_uid); //strongqueue probably } diff --git a/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 b/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 index 4c89c29d8..d7087213d 100644 --- a/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 +++ b/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 @@ -115,6 +115,11 @@ if (npc_category = battle_mage & %magearena_progress < ^mage_arena_complete) { return(false); } +if(npc_type = general_khazard & %arena_progress < ^arena_freed_servils) { + mes("I don't have time. I'm here to rescue Sir Servil and Jeremy."); + return (false); +} + if (string_length(nc_op($npc, 2)) > 0) { return (true); } @@ -134,6 +139,10 @@ if (npc_category = battle_mage & %magearena_progress < ^mage_arena_complete) { mes("You are not ready to fight the battle mages."); return(false); } +if(npc_type = general_khazard & %arena_progress < ^arena_freed_servils) { + mes("I don't have time. I'm here to rescue Sir Servil and Jeremy."); + return (false); +} if (npc_category = kolodion & enum(int, npc, mage_arena_bosses, %magearena_progress) ! npc_type) { if (%magearena_progress > ^mage_arena_complete) { mes("You have already proven yourself against Kolodion."); diff --git a/src/lostcity/engine/script/handlers/LocOps.ts b/src/lostcity/engine/script/handlers/LocOps.ts index 643f94bd9..4f267ecd8 100644 --- a/src/lostcity/engine/script/handlers/LocOps.ts +++ b/src/lostcity/engine/script/handlers/LocOps.ts @@ -92,8 +92,8 @@ const LocOps: CommandHandlers = { return; } - state._activeLoc = loc; - state.pointerAdd(ScriptPointer.ActiveLoc); + state.activeLoc = loc; + state.pointerAdd(ActiveLoc[state.intOperand]); state.pushInt(1); }, diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index a246afb7b..5c24bd74a 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -211,15 +211,15 @@ const NpcOps: CommandHandlers = { [ScriptOpcode.NPC_SETMODE]: checkedHandler(ActiveNpc, state => { const mode = check(state.popInt(), NpcModeValid); - - state.activeNpc.targetOp = mode; state.activeNpc.clearWaypoints(); if (mode === NpcMode.NULL || mode === NpcMode.NONE || mode === NpcMode.WANDER || mode === NpcMode.PATROL) { state.activeNpc.clearInteraction(); + state.activeNpc.targetOp = mode; return; } - + + state.activeNpc.targetOp = mode; let target: Entity | null; if (mode >= NpcMode.OPNPC1) { target = state._activeNpc2; diff --git a/src/lostcity/entity/Npc.ts b/src/lostcity/entity/Npc.ts index 45858c115..9a56b6a4a 100644 --- a/src/lostcity/entity/Npc.ts +++ b/src/lostcity/entity/Npc.ts @@ -366,6 +366,7 @@ export default class Npc extends PathingEntity { const patrolDelay = type.patrolDelay[this.nextPatrolPoint]; let dest = Position.unpackCoord(patrolPoints[this.nextPatrolPoint]); + this.updateMovement(false); if (!this.hasWaypoints() && !this.target) { // requeue waypoints in cases where an npc was interacting and the interaction has been cleared this.queueWaypoint(dest.x, dest.z); } @@ -385,7 +386,6 @@ export default class Npc extends PathingEntity { this.delayedPatrol = false; dest = Position.unpackCoord(patrolPoints[this.nextPatrolPoint]); // recalc dest this.queueWaypoint(dest.x, dest.z); - this.updateMovement(false); } playerEscapeMode(): void { From 48c34f4d14ed019dc402a153b7b3ee1885c351c8 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Fri, 7 Jun 2024 01:59:49 -0400 Subject: [PATCH 40/50] feat(engine): Unpacking more files Expect some refactoring and data cleanup soon! --- src/lostcity/cache/AnimBase.ts | 124 +++++++ src/lostcity/cache/AnimFrame.ts | 338 ++++++++++++++++++++ src/lostcity/tools/client/models/pack.ts | 38 +-- src/lostcity/tools/packconfig/LocConfig.ts | 32 +- src/lostcity/tools/packconfig/ObjConfig.ts | 32 +- src/lostcity/tools/packconfig/PackShared.ts | 2 +- src/lostcity/tools/packconfig/SeqConfig.ts | 2 +- src/lostcity/tools/packconfig/VarpConfig.ts | 4 - src/lostcity/tools/packmap/PackClient.js | 4 + src/lostcity/tools/packmap/PackServer.js | 4 + src/lostcity/tools/unpack/run.ts | 89 +++++- src/lostcity/util/CacheUnpack.ts | 27 +- src/lostcity/util/PackFile.ts | 38 ++- src/lostcity/util/PixPack.ts | 2 +- 14 files changed, 649 insertions(+), 87 deletions(-) create mode 100644 src/lostcity/cache/AnimBase.ts create mode 100644 src/lostcity/cache/AnimFrame.ts diff --git a/src/lostcity/cache/AnimBase.ts b/src/lostcity/cache/AnimBase.ts new file mode 100644 index 000000000..f6115bc3c --- /dev/null +++ b/src/lostcity/cache/AnimBase.ts @@ -0,0 +1,124 @@ +import Jagfile from '#jagex2/io/Jagfile.js'; +import Packet from '#jagex2/io/Packet.js'; + +export default class AnimBase { + static instances: AnimBase[] = []; + static order: string[] = []; + + static OP_BASE = 0; + static OP_TRANSLATE = 1; + static OP_ROTATE = 2; + static OP_SCALE = 3; + static OP_ALPHA = 5; + + length: number = 0; + types: Int32Array = new Int32Array(); + labels: Int32Array[] = []; + + static unpack225(models: Jagfile) { + const head = models.read('base_head.dat'); + const type = models.read('base_type.dat'); + const label = models.read('base_label.dat'); + + if (!head || !type || !label) { + return; + } + + const count = head.g2(); + const maxId = head.g2(); + AnimBase.instances = new Array(maxId + 1); + + for (let i = 0; i < count; i++) { + const id = head.g2(); + + const length = head.g1(); + + const types = new Int32Array(length); + const labels = new Array(length); + + for (let j = 0; j < length; j++) { + types[j] = type.g1(); + } + + for (let j = 0; j < length; j++) { + const labelCount = label.g1(); + labels[j] = new Int32Array(labelCount); + + for (let k = 0; k < labelCount; k++) { + labels[j][k] = label.g1(); + } + } + + const base = new AnimBase(); + base.length = length; + base.types = types; + base.labels = labels; + AnimBase.instances[id] = base; + } + } + + static unpack377(dat: Packet): number { + const length = dat.g1(); + + const types = new Int32Array(length); + const labels = new Array(length); + + for (let i = 0; i < length; i++) { + types[i] = dat.g1(); + } + + for (let i = 0; i < length; i++) { + const labelCount = dat.g1(); + labels[i] = new Int32Array(labelCount); + + for (let j = 0; j < labelCount; j++) { + labels[i][j] = dat.g1(); + } + } + + const base = new AnimBase(); + base.length = length; + base.types = types; + base.labels = labels; + return AnimBase.instances.push(base) - 1; + } + + static pack225() { + const head = Packet.alloc(5); + const type = Packet.alloc(5); + const label = Packet.alloc(10_000_000); + + let maxId = -1; + for (let i = 0; i < AnimBase.instances.length; i++) { + if (!AnimBase.instances[i]) { + continue; + } + + maxId = Math.max(maxId, i); + } + + head.p2(AnimBase.instances.length); + head.p2(maxId); + + for (let i = 0; i < AnimBase.instances.length; i++) { + const base = AnimBase.instances[i]; + if (!base) { + continue; + } + + head.p2(i); + + head.p1(base.length); + for (let j = 0; j < base.length; j++) { + type.p1(base.types[j]); + + label.p1(base.labels.length); + for (let k = 0; k < base.labels.length; k++) { + label.p1(base.labels[j][k]); + } + } + } + + return { head, type, label }; + } +} diff --git a/src/lostcity/cache/AnimFrame.ts b/src/lostcity/cache/AnimFrame.ts new file mode 100644 index 000000000..28b74c2b1 --- /dev/null +++ b/src/lostcity/cache/AnimFrame.ts @@ -0,0 +1,338 @@ +import Jagfile from '#jagex2/io/Jagfile.js'; +import Packet from '#jagex2/io/Packet.js'; + +import AnimBase from '#lostcity/cache/AnimBase.js'; + +export default class AnimFrame { + static instances: AnimFrame[] = []; + static order: number[] = []; + + delay: number = 0; + base: number = 0; + length: number = 0; + groups: Int32Array = new Int32Array(); + x: Int32Array = new Int32Array(); + y: Int32Array = new Int32Array(); + z: Int32Array = new Int32Array(); + debug: Packet | null = null; + + static unpack225(models: Jagfile) { + const head = models.read('frame_head.dat'); + const tran1 = models.read('frame_tran1.dat'); + const tran2 = models.read('frame_tran2.dat'); + const del = models.read('frame_del.dat'); + + if (!head || !tran1 || !tran2 || !del) { + return; + } + + if (!AnimBase.instances.length) { + console.error('error: Animation bases must be loaded first'); + return; + } + + const count = head.g2(); + const maxId = head.g2(); + AnimFrame.instances = new Array(maxId + 1); + + const groups = new Int32Array(500); + const x = new Int32Array(500); + const y = new Int32Array(500); + const z = new Int32Array(500); + + for (let i = 0; i < count; i++) { + const debug = Packet.alloc(1); + const id = head.g2(); + debug.p2(id); + AnimFrame.order.push(id); + + const frame = new AnimFrame(); + frame.delay = del.g1(); + debug.p1(frame.delay); + frame.base = head.g2(); + debug.p2(frame.base); + + const groupCount = head.g1(); + debug.p1(groupCount); + let lastGroup = -1; + let length = 0; + + for (let group = 0; group < groupCount; group++) { + const flags = tran1.g1(); + debug.p1(flags); + if (flags === 0) { + continue; + } + + if (AnimBase.instances[frame.base].types[group] !== AnimBase.OP_BASE) { + for (let cur = group - 1; cur > lastGroup; cur--) { + if (AnimBase.instances[frame.base].types[cur] === AnimBase.OP_BASE) { + groups[length] = cur; + x[length] = 0; + y[length] = 0; + z[length] = 0; + length++; + break; + } + } + } + + groups[length] = group; + + let defaultValue = 0; + if (AnimBase.instances[frame.base].types[group] === AnimBase.OP_SCALE) { + defaultValue = 128; + } + + if ((flags & 0x1) != 0) { + x[length] = tran2.gsmarts(); + debug.psmarts(x[length]); + } else { + x[length] = defaultValue; + } + + if ((flags & 0x2) != 0) { + y[length] = tran2.gsmarts(); + debug.psmarts(y[length]); + } else { + y[length] = defaultValue; + } + + if ((flags & 0x4) != 0) { + z[length] = tran2.gsmarts(); + debug.psmarts(z[length]); + } else { + z[length] = defaultValue; + } + + lastGroup = group; + length++; + } + + frame.length = length; + frame.groups = new Int32Array(length); + frame.x = new Int32Array(length); + frame.y = new Int32Array(length); + frame.z = new Int32Array(length); + frame.debug = debug; + + for (let j = 0; j < length; j++) { + frame.groups[j] = groups[j]; + frame.x[j] = x[j]; + frame.y[j] = y[j]; + frame.z[j] = z[j]; + } + + AnimFrame.instances[id] = frame; + } + } + + static unpack377(src: Uint8Array) { + const meta = new Packet(src); + meta.pos = src.length - 8; + + let offset = 0; + const head = new Packet(src); + head.pos = offset; + offset += meta.g2() + 2; + + const tran1 = new Packet(src); + tran1.pos = offset; + offset += meta.g2(); + + const tran2 = new Packet(src); + tran2.pos = offset; + offset += meta.g2(); + + const del = new Packet(src); + del.pos = offset; + offset += meta.g2(); + + const baseData = new Packet(src); + baseData.pos = offset; + const baseId = AnimBase.unpack377(baseData); + + const total = head.g2(); + const bases = new Int32Array(500); + const x = new Int32Array(500); + const y = new Int32Array(500); + const z = new Int32Array(500); + + for (let i = 0; i < total; i++) { + const id = head.g2(); + AnimFrame.order.push(id); + + const frame = new AnimFrame(); + frame.delay = del.g1(); + frame.base = baseId; + + const groupCount = head.g1(); + let lastGroup = -1; + let length = 0; + + for (let group = 0; group < groupCount; group++) { + const flags = tran1.g1(); + if (flags === 0) { + continue; + } + + if (AnimBase.instances[baseId].types[group] !== AnimBase.OP_BASE) { + for (let cur = group - 1; cur > lastGroup; cur--) { + if (AnimBase.instances[baseId].types[cur] === AnimBase.OP_BASE) { + bases[length] = cur; + x[length] = 0; + y[length] = 0; + z[length] = 0; + length++; + break; + } + } + } + + bases[length] = group; + + let defaultValue = 0; + if (AnimBase.instances[baseId].types[group] === AnimBase.OP_SCALE) { + defaultValue = 128; + } + + if ((flags & 0x1) != 0) { + x[length] = tran2.gsmarts(); + } else { + x[length] = defaultValue; + } + + if ((flags & 0x2) != 0) { + y[length] = tran2.gsmarts(); + } else { + y[length] = defaultValue; + } + + if ((flags & 0x4) != 0) { + z[length] = tran2.gsmarts(); + } else { + z[length] = defaultValue; + } + + lastGroup = group; + length++; + } + + frame.length = length; + frame.groups = new Int32Array(length); + frame.x = new Int32Array(length); + frame.y = new Int32Array(length); + frame.z = new Int32Array(length); + + for (let j = 0; j < length; j++) { + frame.groups[j] = bases[j]; + frame.x[j] = x[j]; + frame.y[j] = y[j]; + frame.z[j] = z[j]; + } + + AnimFrame.instances[id] = frame; + } + } + + static pack225() { + const head = Packet.alloc(5); + const tran1 = Packet.alloc(5); + const tran2 = Packet.alloc(5); + const del = Packet.alloc(5); + + let exists = 0; + let maxId = -1; + for (let i = 0; i < AnimFrame.instances.length; i++) { + if (!AnimFrame.instances[i]) { + continue; + } + + exists++; + maxId = Math.max(maxId, i); + } + + head.p2(exists); + head.p2(maxId); + + for (let frameIndex = 0; frameIndex < AnimFrame.order.length; frameIndex++) { + const id = AnimFrame.order[frameIndex]; + const frame = AnimFrame.instances[id]; + if (!frame) { + continue; + } + + if (!frame.debug) { + frame.debug = Packet.alloc(1); + } else { + frame.debug.pos = 0; + } + + head.p2(id); + frame.debug.p2(id); + del.p1(frame.delay); + frame.debug.p1(frame.delay); + head.p2(frame.base); + frame.debug.p2(frame.base); + + const base = AnimBase.instances[frame.base]; + + const max = base.length; + // todo: max here writes extra 0s when it shouldn't, so CRC fails + + head.p1(max); + frame.debug.p1(max); + + let length = 0; + for (let i = 0; i < max; i++) { + const type = base.types[i]; + + if (length >= frame.length || frame.groups[length] != i) { + tran1.p1(0); + frame.debug.p1(0); + continue; + } + + let flags = 0; + let defaultValue = 0; + if (type === AnimBase.OP_SCALE) { + defaultValue = 128; + } + + if (frame.x[length] != defaultValue) { + flags |= 0x1; + } + + if (frame.y[length] != defaultValue) { + flags |= 0x2; + } + + if (frame.z[length] != defaultValue) { + flags |= 0x4; + } + + tran1.p1(flags); + frame.debug.p1(flags); + + if ((flags & 0x1) != 0) { + tran2.psmarts(frame.x[length]); + frame.debug.psmarts(frame.x[length]); + } + + if ((flags & 0x2) != 0) { + tran2.psmarts(frame.y[length]); + frame.debug.psmarts(frame.y[length]); + } + + if ((flags & 0x4) != 0) { + tran2.psmarts(frame.z[length]); + frame.debug.psmarts(frame.z[length]); + } + + length++; + } + } + + return { head, tran1, tran2, del }; + } +} diff --git a/src/lostcity/tools/client/models/pack.ts b/src/lostcity/tools/client/models/pack.ts index d9bb4924b..216ef957e 100644 --- a/src/lostcity/tools/client/models/pack.ts +++ b/src/lostcity/tools/client/models/pack.ts @@ -33,9 +33,9 @@ export function packClientModel() { // ---- - const base_head = Packet.alloc(1); - const base_type = Packet.alloc(1); - const base_label = Packet.alloc(2); + const base_head = Packet.alloc(5); + const base_type = Packet.alloc(5); + const base_label = Packet.alloc(5); { base_head.p2(baseOrder.length); @@ -85,10 +85,10 @@ export function packClientModel() { // ---- - const frame_head = Packet.alloc(3); - const frame_tran1 = Packet.alloc(4); - const frame_tran2 = Packet.alloc(4); - const frame_del = Packet.alloc(2); + const frame_head = Packet.alloc(5); + const frame_tran1 = Packet.alloc(5); + const frame_tran2 = Packet.alloc(5); + const frame_del = Packet.alloc(5); { frame_head.p2(animOrder.length); @@ -148,20 +148,20 @@ export function packClientModel() { // ---- - const ob_head = Packet.alloc(3); + const ob_head = Packet.alloc(5); const ob_face1 = Packet.alloc(5); - const ob_face2 = Packet.alloc(4); - const ob_face3 = Packet.alloc(4); - const ob_face4 = Packet.alloc(3); - const ob_face5 = Packet.alloc(3); - const ob_point1 = Packet.alloc(4); - const ob_point2 = Packet.alloc(4); - const ob_point3 = Packet.alloc(4); - const ob_point4 = Packet.alloc(4); - const ob_point5 = Packet.alloc(4); + const ob_face2 = Packet.alloc(5); + const ob_face3 = Packet.alloc(5); + const ob_face4 = Packet.alloc(5); + const ob_face5 = Packet.alloc(5); + const ob_point1 = Packet.alloc(5); + const ob_point2 = Packet.alloc(5); + const ob_point3 = Packet.alloc(5); + const ob_point4 = Packet.alloc(5); + const ob_point5 = Packet.alloc(5); const ob_vertex1 = Packet.alloc(5); - const ob_vertex2 = Packet.alloc(4); - const ob_axis = Packet.alloc(3); + const ob_vertex2 = Packet.alloc(5); + const ob_axis = Packet.alloc(5); { ob_head.p2(modelOrder.length); diff --git a/src/lostcity/tools/packconfig/LocConfig.ts b/src/lostcity/tools/packconfig/LocConfig.ts index 9afa98807..be978f3e0 100644 --- a/src/lostcity/tools/packconfig/LocConfig.ts +++ b/src/lostcity/tools/packconfig/LocConfig.ts @@ -87,30 +87,6 @@ export function parseLocConfig(key: string, value: string): ConfigValue | null | return null; } - if ((key === 'width' || key === 'length') && (number < 1 || number > 255)) { - return null; - } - - if (key === 'wallwidth' && (number < 0 || number > 32 || number % 8 !== 0)) { - return null; - } - - if ((key === 'ambient' || key === 'contrast') && (number < -128 || number > 127)) { - return null; - } - - if (key === 'mapfunction' && (number < 0 || number > 50)) { - return null; - } - - if ((key === 'resizex' || key === 'resizey' || key === 'resizez') && (number < 0 || number > 512)) { - return null; - } - - if (key === 'mapscene' && (number < 0 || number > 50)) { - return null; - } - return number; } else if (booleanKeys.includes(key)) { if (!isConfigBoolean(value)) { @@ -151,6 +127,10 @@ export function parseLocConfig(key: string, value: string): ConfigValue | null | } return null; + } else if (key.startsWith('model')) { + // freshly unpacked! format is model=, + const shape = parseInt(value.split(',')[1]); + return [{ model: ModelPack.getByName(value), shape: shape }]; } else if (key.startsWith('recol')) { const index = parseInt(key[5]); if (index > 9) { @@ -249,6 +229,10 @@ export function packLocConfigs(configs: Map): { client: Pa desc = value as string; } else if (key === 'model') { models = value as LocModelShape[]; + } else if (key.startsWith('model')) { + // refreshly unpacked! + const index = parseInt(key[5]) - 1; + models[index] = (value as LocModelShape[])[0]; } else if (key.startsWith('recol')) { const index = parseInt(key[5]) - 1; if (key.endsWith('s')) { diff --git a/src/lostcity/tools/packconfig/ObjConfig.ts b/src/lostcity/tools/packconfig/ObjConfig.ts index c5c0066eb..305cb02d2 100644 --- a/src/lostcity/tools/packconfig/ObjConfig.ts +++ b/src/lostcity/tools/packconfig/ObjConfig.ts @@ -53,27 +53,6 @@ export function parseObjConfig(key: string, value: string): ConfigValue | null | return null; } - // range checks - if (key === '2dzoom' && (number < 0 || number > 5000)) { - return null; - } - - if ((key === '2dxan' || key === '2dyan' || key === '2dzan') && (number < 0 || number > 5000)) { - return null; - } - - if ((key === '2dxof' || key === '2dyof') && (number < -5000 || number > 5000)) { - return null; - } - - if (key === 'cost' && (number < 0 || number > 0x7fff_ffff)) { - return null; - } - - if (key === 'respawnrate' && (number < 0 || number > 12000)) { - return null; - } - return number; } else if (booleanKeys.includes(key)) { if (!isConfigBoolean(value)) { @@ -200,6 +179,14 @@ export function parseObjConfig(key: string, value: string): ConfigValue | null | type: param.type, value: paramValue }; + } else if (key === 'certlink' || key === 'certtemplate') { + // freshly unpacked + const index = ObjPack.getByName(value); + if (index === -1) { + return null; + } + + return index; } else { return undefined; } @@ -211,12 +198,13 @@ export function packObjConfigs(configs: Map): { client: Pa const template_for_cert = ObjPack.getByName('template_for_cert'); if (template_for_cert === -1) { - throw packStepError('template_for_cert', 'Template for certificate does not exist.'); + console.log('warning: template_for_cert does not exist, cannot auto-generate certificates'); } for (let i = 0; i < ObjPack.size; i++) { const debugname = ObjPack.getById(i); let config; + if (debugname.startsWith('cert_')) { const uncert = ObjPack.getByName(debugname.substring('cert_'.length)); if (uncert === -1) { diff --git a/src/lostcity/tools/packconfig/PackShared.ts b/src/lostcity/tools/packconfig/PackShared.ts index 846e5e0d9..ab6ace1a0 100644 --- a/src/lostcity/tools/packconfig/PackShared.ts +++ b/src/lostcity/tools/packconfig/PackShared.ts @@ -368,7 +368,7 @@ export function packConfigs() { //console.log('Packing frame_del'); //console.time('Packed frame_del'); const files = listFilesExt('data/src/models', '.frame'); - const frame_del = Packet.alloc(2); + const frame_del = Packet.alloc(3); for (let i = 0; i < AnimPack.max; i++) { const name = AnimPack.getById(i); if (!name.length) { diff --git a/src/lostcity/tools/packconfig/SeqConfig.ts b/src/lostcity/tools/packconfig/SeqConfig.ts index 933daffcd..8d7f95715 100644 --- a/src/lostcity/tools/packconfig/SeqConfig.ts +++ b/src/lostcity/tools/packconfig/SeqConfig.ts @@ -49,7 +49,7 @@ export function parseSeqConfig(key: string, value: string): ConfigValue | null | return null; } - if (key === 'replaycount' && (number < 0 || number > 10)) { + if (key === 'replaycount' && (number < 0 || number > 1000)) { return null; } diff --git a/src/lostcity/tools/packconfig/VarpConfig.ts b/src/lostcity/tools/packconfig/VarpConfig.ts index 06723ca02..c415d7763 100644 --- a/src/lostcity/tools/packconfig/VarpConfig.ts +++ b/src/lostcity/tools/packconfig/VarpConfig.ts @@ -44,10 +44,6 @@ export function parseVarpConfig(key: string, value: string): ConfigValue | null return null; } - if (key === 'clientcode' && (number < 0 || number > 8)) { - return null; - } - return number; } else if (booleanKeys.includes(key)) { if (!isConfigBoolean(value)) { diff --git a/src/lostcity/tools/packmap/PackClient.js b/src/lostcity/tools/packmap/PackClient.js index 591ea0128..36c062afd 100644 --- a/src/lostcity/tools/packmap/PackClient.js +++ b/src/lostcity/tools/packmap/PackClient.js @@ -56,6 +56,10 @@ function readMap(map) { } export function packClientMap() { + if (!fs.existsSync('data/src/maps')) { + return; + } + let queue = []; fs.readdirSync('data/src/maps').filter(f => f.endsWith('.jm2')).forEach(file => { diff --git a/src/lostcity/tools/packmap/PackServer.js b/src/lostcity/tools/packmap/PackServer.js index 2aab6c225..8c5681dea 100644 --- a/src/lostcity/tools/packmap/PackServer.js +++ b/src/lostcity/tools/packmap/PackServer.js @@ -93,6 +93,10 @@ function readMap(map) { } export function packServerMap() { + if (!fs.existsSync('data/src/maps')) { + return; + } + let queue = []; fs.readdirSync('data/src/maps').filter(f => f.endsWith('.jm2')).forEach(file => { diff --git a/src/lostcity/tools/unpack/run.ts b/src/lostcity/tools/unpack/run.ts index 10ec37a66..754401769 100644 --- a/src/lostcity/tools/unpack/run.ts +++ b/src/lostcity/tools/unpack/run.ts @@ -1,18 +1,22 @@ import fs from 'fs'; +import zlib from 'zlib'; import FileStream from '#jagex2/io/FileStream.js'; import Jagfile from '#jagex2/io/Jagfile.js'; import { - decodeFlo, decodeIdk, decodeLoc, decodeNoOp, decodeNpc, + decodeFlo, decodeIdk, decodeLoc, decodeNpc, decodeObj, decodeSeq, decodeSpotAnim, decodeVarbit, decodeVarp, readJag, unpackConfig, unpackMedia, unpackTextures, unpackTitle, unpackWordenc } from '#lostcity/util/CacheUnpack.js'; +// import Packet from '#jagex2/io/Packet.js'; +import AnimFrame from '#lostcity/cache/AnimFrame.js'; +// import AnimBase from '#lostcity/cache/AnimBase.js'; let title: Jagfile | null = null; let config: Jagfile | null = null; -let interfaces: Jagfile | null = null; +// let interfaces: Jagfile | null = null; let media: Jagfile | null = null; let textures: Jagfile | null = null; let wordenc: Jagfile | null = null; @@ -30,16 +34,85 @@ if (fs.existsSync('dump/main_file_cache.dat')) { sounds = readJag(cache, 8); // todo // const versionlist = readJag(cache, 5); // todo + + if (!fs.existsSync('data/src/pack')) { + fs.mkdirSync('data/src/pack', { recursive: true }); + } + + if (!fs.existsSync('data/src/models/_unpack')) { + fs.mkdirSync('data/src/models/_unpack', { recursive: true }); + } + + fs.writeFileSync('data/src/pack/model.pack', ''); + const modelCount = 0; // cache.count(1); + for (let i = 0; i < modelCount; i++) { + fs.appendFileSync('data/src/pack/model.pack', `${i}=model_${i}\n`); + + if (fs.existsSync('data/src/models/_unpack/model_' + i + '.ob2')) { + continue; + } + + const data = cache.read(1, i); + if (!data) { + continue; + } + + const decompressed = zlib.gunzipSync(data); + fs.writeFileSync('data/src/models/_unpack/model_' + i + '.ob2', decompressed); + } + + if (!fs.existsSync('data/src/models/_unpack/base')) { + fs.mkdirSync('data/src/models/_unpack/base', { recursive: true }); + } + + if (!fs.existsSync('data/src/models/_unpack/frame')) { + fs.mkdirSync('data/src/models/_unpack/frame', { recursive: true }); + } + + const animCount = cache.count(2); + for (let i = 0; i < animCount; i++) { + const compressed = cache.read(2, i); + if (!compressed) { + continue; + } + + const src = new Uint8Array(zlib.gunzipSync(compressed)); + AnimFrame.unpack377(src); + } + + // todo: save frames/bases to files + + if (!fs.existsSync('data/src/songs')) { + fs.mkdirSync('data/src/songs', { recursive: true }); + } + + const midiCount = 0; // cache.count(3); + for (let i = 0; i < midiCount; i++) { + const data = cache.read(3, i); + if (!data) { + continue; + } + + const decompressed = zlib.gunzipSync(data); + fs.writeFileSync('data/src/songs/' + i + '.mid', decompressed); + } + + // we need versionlist working to be able to dump maps + const mapCount = cache.count(4); + for (let i = 0; i < mapCount; i++) { + // todo + } } else { title = Jagfile.load('dump/title'); config = Jagfile.load('dump/config'); - interfaces = Jagfile.load('dump/interface'); + // interfaces = Jagfile.load('dump/interface'); media = Jagfile.load('dump/media'); textures = Jagfile.load('dump/textures'); wordenc = Jagfile.load('dump/wordenc'); - sounds = Jagfile.load('dump/sounds'); + sounds = Jagfile.load('dump/sounds'); // not in 194 const models = Jagfile.load('dump/models'); + // todo: save to files } unpackTitle(title); @@ -56,5 +129,9 @@ unpackConfig(config, 'spotanim', decodeSpotAnim); unpackConfig(config, 'idk', decodeIdk); unpackConfig(config, 'flo', decodeFlo); unpackConfig(config, 'varbit', decodeVarbit); -unpackConfig(config, 'mesanim', decodeNoOp); -unpackConfig(config, 'mes', decodeNoOp); + +// server-side: +// unpackConfig(config, 'mesanim', decodeNoOp); +// unpackConfig(config, 'mes', decodeNoOp); +// unpackConfig(config, 'param', decodeNoOp); +// unpackConfig(config, 'hunt', decodeNoOp); diff --git a/src/lostcity/util/CacheUnpack.ts b/src/lostcity/util/CacheUnpack.ts index f18652049..307f034d2 100644 --- a/src/lostcity/util/CacheUnpack.ts +++ b/src/lostcity/util/CacheUnpack.ts @@ -186,6 +186,10 @@ export function unpackTitle(title: Jagfile | null) { unpackAndSave(title, index, 'titlebox', 'title'); unpackAndSave(title, index, 'titlebutton', 'title'); unpackAndSave(title, index, 'runes', 'title'); + unpackAndSave(title, index, 'p11', 'fonts'); + unpackAndSave(title, index, 'p12', 'fonts'); + unpackAndSave(title, index, 'b12', 'fonts'); + unpackAndSave(title, index, 'q8', 'fonts'); unpackAndSave(title, index, 'p11_full', 'fonts'); unpackAndSave(title, index, 'p12_full', 'fonts'); unpackAndSave(title, index, 'b12_full', 'fonts'); @@ -208,6 +212,7 @@ export function unpackMedia(media: Jagfile | null) { unpackAndSave(media, index, 'backright1', 'sprites'); unpackAndSave(media, index, 'backright2', 'sprites'); unpackAndSave(media, index, 'backtop1', 'sprites'); + unpackAndSave(media, index, 'backtop2', 'sprites'); unpackAndSave(media, index, 'backvmid1', 'sprites'); unpackAndSave(media, index, 'backvmid2', 'sprites'); unpackAndSave(media, index, 'backvmid3', 'sprites'); @@ -249,6 +254,7 @@ export function unpackMedia(media: Jagfile | null) { unpackAndSave(media, index, 'magicon2', 'sprites'); unpackAndSave(media, index, 'magicoff2', 'sprites'); unpackAndSave(media, index, 'gnomeball_buttons', 'sprites'); + unpackAndSave(media, index, 'mapflag', 'sprites'); unpackAndSave(media, index, 'mapmarker', 'sprites'); unpackAndSave(media, index, 'mod_icons', 'sprites'); unpackAndSave(media, index, 'mapedge', 'sprites'); @@ -266,6 +272,7 @@ export function unpackMedia(media: Jagfile | null) { unpackAndSave(media, index, 'titlescroll', 'sprites'); unpackAndSave(media, index, 'letter', 'sprites'); unpackAndSave(media, index, 'button_brown_big', 'sprites'); + unpackAndSave(media, index, 'headicons', 'sprites'); unpackAndSave(media, index, 'headicons_pk', 'sprites'); unpackAndSave(media, index, 'headicons_prayer', 'sprites'); unpackAndSave(media, index, 'headicons_hint', 'sprites'); @@ -281,9 +288,14 @@ export function unpackTextures(textures: Jagfile | null) { return null; } + const packOut = 'data/src/pack/texture.pack'; + fs.mkdirSync('data/src/pack', { recursive: true }); + fs.writeFileSync(packOut, ''); + const index = textures.read('index.dat'); for (let i = 0; i < 50; i++) { + fs.appendFileSync(packOut, i + '=' + i + '\n'); unpackAndSave(textures, index, i.toString(), 'textures'); } } @@ -382,7 +394,7 @@ export function decodeLoc(dat: Packet, code: number) { shape = dat.g1(); } - out.push('model' + (i + 1) + '=model_' + id + ',' + LocShape[shape]); + out.push('model' + (i + 1) + '=model_' + id + ',' + shape); // LocShape[shape]); } return out; @@ -489,13 +501,13 @@ export function decodeLoc(dat: Packet, code: number) { } } else if (code === 70) { const value = dat.g2s(); - return 'xoff=' + value; + return 'offsetx=' + value; } else if (code === 71) { const value = dat.g2s(); - return 'yoff=' + value; + return 'offsety=' + value; } else if (code === 72) { const value = dat.g2s(); - return 'zoff=' + value; + return 'offsetz=' + value; } else if (code === 73) { return 'forcedecor=yes'; } else if (code === 74) { @@ -908,6 +920,7 @@ export function decodeSeq(dat: Packet, code: number) { return 'walkmerge=' + labels.map(l => 'label_' + l).join(','); } else if (code === 4) { + // dat.g2(); // 194 return 'stretches=yes'; } else if (code === 5) { const value = dat.g1(); @@ -976,10 +989,10 @@ export function decodeSpotAnim(dat: Packet, code: number) { const angle = dat.g2(); return 'orientation=' + angle; } else if (code === 7) { - const value = dat.g1(); + const value = dat.g1b(); return 'ambient=' + value; } else if (code === 8) { - const value = dat.g1(); + const value = dat.g1b(); return 'contrast=' + value; } else if (code >= 40 && code < 50) { const hsl16 = dat.g2(); @@ -1062,7 +1075,7 @@ export function decodeFlo(dat: Packet, code: number) { return 'occlude=no'; } else if (code === 6) { const name = dat.gjstr(); - return 'editname=' + name; + return '//implicit: editname=' + name; } else if (code === 7) { const average = dat.g3(); return '//unsupported: maprgb=0x' + average.toString(16).toUpperCase().padStart(6, '0'); diff --git a/src/lostcity/util/PackFile.ts b/src/lostcity/util/PackFile.ts index f55ea17a2..f8403f0d4 100644 --- a/src/lostcity/util/PackFile.ts +++ b/src/lostcity/util/PackFile.ts @@ -118,6 +118,40 @@ function validateFilesPack(pack: PackFile, path: string, ext: string): void { pack.save(); } +function validateImagePack(pack: PackFile, path: string, ext: string): void { + pack.load(`${Environment.DATA_SRC_DIR}/pack/${pack.type}.pack`); + + const files = listFilesExt(path, ext); + + const fileNames = new Set(files.map(x => basename(x, ext))); + for (let i = 0; i < files.length; i++) { + if (basename(dirname(files[i])) === 'meta') { + continue; + } + + files[i] = files[i].substring(files[i].lastIndexOf('/') + 1); // strip file path + files[i] = files[i].substring(0, files[i].length - ext.length); // strip extension + fileNames.add(files[i]); + + const name = files[i]; + if (!pack.names.has(name)) { + console.error(`${pack.type}: ${name} is missing an ID line, you may need to edit ${Environment.DATA_SRC_DIR}/pack/${pack.type}.pack`); + process.exit(1); + } + } + + if (Environment.VALIDATE_PACK) { + for (const name of pack.names) { + if (!fileNames.has(name)) { + console.error(`${pack.type}: ${name} was not found on your disk, you may need to edit ${Environment.DATA_SRC_DIR}/pack/${pack.type}.pack`); + process.exit(1); + } + } + } + + pack.save(); +} + function validateConfigPack(pack: PackFile, ext: string, regen: boolean = false, reduce: boolean = false, reuse: boolean = false, recycle: boolean = false): void { const names = crawlConfigNames(ext); const configNames = new Set(names); @@ -252,7 +286,7 @@ export let SeqPack = new PackFile('seq', validateConfigPack, '.seq'); export let SoundPack = new PackFile('sound', validateFilesPack, `${Environment.DATA_SRC_DIR}/sounds`, '.synth'); export let SpotAnimPack = new PackFile('spotanim', validateConfigPack, '.spotanim'); export let StructPack = new PackFile('struct', validateConfigPack, '.struct', true, false, false, true); -export let TexturePack = new PackFile('texture', validateFilesPack, `${Environment.DATA_SRC_DIR}/textures`, '.png'); +export let TexturePack = new PackFile('texture', validateImagePack, `${Environment.DATA_SRC_DIR}/textures`, '.png'); export let VarpPack = new PackFile('varp', validateConfigPack, '.varp', true); export let VarnPack = new PackFile('varn', validateConfigPack, '.varn', true, false, false, true); export let VarsPack = new PackFile('vars', validateConfigPack, '.vars', true, false, false, true); @@ -280,7 +314,7 @@ export function revalidatePack() { SoundPack = new PackFile('sound', validateFilesPack, `${Environment.DATA_SRC_DIR}/sounds`, '.synth'); SpotAnimPack = new PackFile('spotanim', validateConfigPack, '.spotanim'); StructPack = new PackFile('struct', validateConfigPack, '.struct', true, false, false, true); - TexturePack = new PackFile('texture', validateFilesPack, `${Environment.DATA_SRC_DIR}/textures`, '.png'); + TexturePack = new PackFile('texture', validateImagePack, `${Environment.DATA_SRC_DIR}/textures`, '.png'); VarpPack = new PackFile('varp', validateConfigPack, '.varp', true); VarnPack = new PackFile('varn', validateConfigPack, '.varn', true, false, false, true); VarsPack = new PackFile('vars', validateConfigPack, '.vars', true, false, false, true); diff --git a/src/lostcity/util/PixPack.ts b/src/lostcity/util/PixPack.ts index df415b8dd..30255cd6d 100644 --- a/src/lostcity/util/PixPack.ts +++ b/src/lostcity/util/PixPack.ts @@ -119,7 +119,7 @@ type Sprite = { }; export async function convertImage(index: Packet, srcPath: string, safeName: string) { - const data = Packet.alloc(3); + const data = Packet.alloc(4); data.p2(index.pos); const img = await Jimp.read(`${srcPath}/${safeName}.png`); From c6938b036c97d2632ebc0f8fc251c4c06d9c9ced Mon Sep 17 00:00:00 2001 From: Pazaz Date: Fri, 7 Jun 2024 02:29:24 -0400 Subject: [PATCH 41/50] chore(engine): Reorganized pack/cache/tool files --- package.json | 7 +- src/lostcity/app.ts | 2 +- src/lostcity/cache/IdkType.test.ts.disabled | 138 ------------------ .../cache/{ => config}/CategoryType.ts | 2 +- .../cache/{ => config}/Component.test.ts | 2 +- src/lostcity/cache/{ => config}/Component.ts | 0 src/lostcity/cache/{ => config}/ConfigType.ts | 0 src/lostcity/cache/{ => config}/DbRowType.ts | 6 +- .../cache/{ => config}/DbTableType.ts | 4 +- src/lostcity/cache/{ => config}/EnumType.ts | 4 +- src/lostcity/cache/{ => config}/FloType.ts | 2 +- src/lostcity/cache/{ => config}/FontType.ts | 0 src/lostcity/cache/{ => config}/HuntType.ts | 2 +- src/lostcity/cache/{ => config}/IdkType.ts | 2 +- src/lostcity/cache/{ => config}/InvType.ts | 2 +- src/lostcity/cache/{ => config}/LocType.ts | 4 +- .../cache/{ => config}/MesanimType.test.ts | 2 +- .../cache/{ => config}/MesanimType.ts | 2 +- src/lostcity/cache/{ => config}/NpcType.ts | 4 +- src/lostcity/cache/{ => config}/ObjType.ts | 6 +- .../cache/{ => config}/ParamHelper.ts | 0 src/lostcity/cache/{ => config}/ParamType.ts | 4 +- .../cache/{ => config}/ScriptVarType.ts | 0 src/lostcity/cache/{ => config}/SeqFrame.ts | 0 src/lostcity/cache/{ => config}/SeqType.ts | 4 +- .../cache/{ => config}/SpotanimType.ts | 2 +- src/lostcity/cache/{ => config}/StructType.ts | 4 +- src/lostcity/cache/{ => config}/VarNpcType.ts | 4 +- .../cache/{ => config}/VarPlayerType.ts | 4 +- .../cache/{ => config}/VarSharedType.ts | 4 +- src/lostcity/cache/{ => graphics}/AnimBase.ts | 0 .../cache/{ => graphics}/AnimFrame.ts | 2 +- .../client/models => cache/graphics}/Model.ts | 0 src/lostcity/{tools/pack => cache}/pack.ts | 2 +- src/lostcity/{tools/pack => cache}/packall.ts | 28 ++-- .../client/wordenc => cache/packchat}/pack.ts | 0 .../packconfig/DbRowConfig.ts | 8 +- .../packconfig/DbTableConfig.ts | 6 +- .../{tools => cache}/packconfig/EnumConfig.ts | 6 +- .../{tools => cache}/packconfig/FloConfig.ts | 2 +- .../{tools => cache}/packconfig/HuntConfig.ts | 2 +- .../{tools => cache}/packconfig/IdkConfig.ts | 2 +- .../{tools => cache}/packconfig/InvConfig.ts | 4 +- .../{tools => cache}/packconfig/LocConfig.ts | 8 +- .../packconfig/MesAnimConfig.ts | 2 +- .../{tools => cache}/packconfig/NpcConfig.ts | 8 +- .../{tools => cache}/packconfig/ObjConfig.ts | 10 +- .../{tools => cache}/packconfig/PackShared.ts | 42 +++--- .../packconfig/ParamConfig.ts | 4 +- .../{tools => cache}/packconfig/SeqConfig.ts | 2 +- .../packconfig/SpotAnimConfig.ts | 2 +- .../packconfig/StructConfig.ts | 8 +- .../{tools => cache}/packconfig/VarnConfig.ts | 4 +- .../{tools => cache}/packconfig/VarpConfig.ts | 6 +- .../{tools => cache}/packconfig/VarsConfig.ts | 4 +- .../config => cache/packconfig}/recolor.ts | 2 +- .../models => cache/packgraphics}/pack.ts | 0 .../models => cache/packgraphics}/reorg.ts | 0 .../models => cache/packgraphics}/unpack.ts | 2 +- .../packinterface/PackClient.ts | 0 .../packinterface/PackServer.ts | 0 .../packinterface/PackShared.ts | 0 .../{tools => cache}/packinterface/Unpack.ts | 0 .../{tools => cache}/packmap/PackClient.js | 0 .../{tools => cache}/packmap/PackServer.js | 0 .../{tools => cache}/packmap/Unpack.ts | 0 .../{tools => cache}/packmap/Worldmap.ts | 6 +- .../client/music => cache/packmidi}/pack.ts | 0 .../client/sounds => cache/packsound}/pack.ts | 0 .../sounds => cache/packsound}/reorg.ts | 0 .../sounds => cache/packsound}/unpack.ts | 0 .../client => cache/packsprite}/media/pack.ts | 0 .../packsprite}/textures/pack.ts | 0 .../client => cache/packsprite}/title/pack.ts | 0 src/lostcity/{tools/pack => cache}/symbols.ts | 16 +- .../cache/{ => wordenc}/WordEnc.test.ts | 4 +- src/lostcity/cache/{ => wordenc}/WordEnc.ts | 8 +- .../cache/{ => wordenc}/WordEncBadWords.ts | 4 +- .../cache/{ => wordenc}/WordEncDomains.ts | 4 +- .../cache/{ => wordenc}/WordEncFragments.ts | 2 +- .../cache/{ => wordenc}/WordEncTlds.ts | 6 +- src/lostcity/engine/GameMap.ts | 4 +- src/lostcity/engine/Inventory.ts | 4 +- src/lostcity/engine/World.ts | 48 +++--- .../engine/collision/CollisionManager.ts | 2 +- src/lostcity/engine/script/ScriptIterators.ts | 2 +- src/lostcity/engine/script/ScriptState.ts | 2 +- .../engine/script/ScriptValidators.ts | 40 ++--- .../engine/script/handlers/CoreOps.ts | 8 +- src/lostcity/engine/script/handlers/DbOps.ts | 6 +- .../engine/script/handlers/EnumOps.ts | 2 +- src/lostcity/engine/script/handlers/InvOps.ts | 6 +- .../engine/script/handlers/LocConfigOps.ts | 6 +- src/lostcity/engine/script/handlers/LocOps.ts | 8 +- .../engine/script/handlers/NpcConfigOps.ts | 6 +- src/lostcity/engine/script/handlers/NpcOps.ts | 8 +- .../engine/script/handlers/ObjConfigOps.ts | 6 +- src/lostcity/engine/script/handlers/ObjOps.ts | 8 +- .../engine/script/handlers/PlayerOps.ts | 4 +- .../engine/script/handlers/ServerOps.ts | 10 +- src/lostcity/entity/Npc.ts | 8 +- src/lostcity/entity/PathingEntity.ts | 2 +- src/lostcity/entity/Player.ts | 18 +-- .../incoming/handler/ClientCheatHandler.ts | 20 +-- .../225/incoming/handler/IfButtonHandler.ts | 2 +- .../incoming/handler/IfPlayerDesignHandler.ts | 4 +- .../225/incoming/handler/InvButtonDHandler.ts | 2 +- .../225/incoming/handler/InvButtonHandler.ts | 2 +- .../incoming/handler/MessagePublicHandler.ts | 2 +- .../225/incoming/handler/MoveClickHandler.ts | 2 +- .../225/incoming/handler/OpHeldHandler.ts | 4 +- .../225/incoming/handler/OpHeldTHandler.ts | 2 +- .../225/incoming/handler/OpHeldUHandler.ts | 6 +- .../225/incoming/handler/OpLocHandler.ts | 2 +- .../225/incoming/handler/OpLocTHandler.ts | 2 +- .../225/incoming/handler/OpLocUHandler.ts | 4 +- .../225/incoming/handler/OpNpcHandler.ts | 2 +- .../225/incoming/handler/OpNpcTHandler.ts | 2 +- .../225/incoming/handler/OpNpcUHandler.ts | 4 +- .../225/incoming/handler/OpObjHandler.ts | 2 +- .../225/incoming/handler/OpObjTHandler.ts | 2 +- .../225/incoming/handler/OpObjUHandler.ts | 4 +- .../225/incoming/handler/OpPlayerTHandler.ts | 2 +- .../225/incoming/handler/OpPlayerUHandler.ts | 4 +- src/lostcity/server/ServerProt.ts | 4 +- .../tools/{common => cache}/cacheRename.ts | 0 .../{client/clean.ts => cache/cleanClient.ts} | 0 .../{server/clean.ts => cache/cleanServer.ts} | 0 .../tools/{common => cache}/jagCompare.ts | 0 .../tools/{common => cache}/jagList.ts | 0 .../tools/{common => cache}/jagUnpack.ts | 0 .../tools/{packmap => map}/ImportNpcCsv.ts | 0 .../tools/{packmap => map}/ImportObjCsv.ts | 0 .../tools/{client => }/packet/npcInfo.ts | 0 .../tools/{client => }/packet/playerInfo.ts | 0 src/lostcity/tools/server/drops.ts | 6 +- src/lostcity/tools/server/update-names.ts | 60 -------- src/lostcity/tools/unpack/run.ts | 4 +- 138 files changed, 296 insertions(+), 495 deletions(-) delete mode 100644 src/lostcity/cache/IdkType.test.ts.disabled rename src/lostcity/cache/{ => config}/CategoryType.ts (96%) rename src/lostcity/cache/{ => config}/Component.test.ts (99%) rename src/lostcity/cache/{ => config}/Component.ts (100%) rename src/lostcity/cache/{ => config}/ConfigType.ts (100%) rename src/lostcity/cache/{ => config}/DbRowType.ts (94%) rename src/lostcity/cache/{ => config}/DbTableType.ts (96%) rename src/lostcity/cache/{ => config}/EnumType.ts (94%) rename src/lostcity/cache/{ => config}/FloType.ts (97%) rename src/lostcity/cache/{ => config}/FontType.ts (100%) rename src/lostcity/cache/{ => config}/HuntType.ts (97%) rename src/lostcity/cache/{ => config}/IdkType.ts (97%) rename src/lostcity/cache/{ => config}/InvType.ts (97%) rename src/lostcity/cache/{ => config}/LocType.ts (97%) rename src/lostcity/cache/{ => config}/MesanimType.test.ts (95%) rename src/lostcity/cache/{ => config}/MesanimType.ts (96%) rename src/lostcity/cache/{ => config}/NpcType.ts (97%) rename src/lostcity/cache/{ => config}/ObjType.ts (97%) rename src/lostcity/cache/{ => config}/ParamHelper.ts (100%) rename src/lostcity/cache/{ => config}/ParamType.ts (96%) rename src/lostcity/cache/{ => config}/ScriptVarType.ts (100%) rename src/lostcity/cache/{ => config}/SeqFrame.ts (100%) rename src/lostcity/cache/{ => config}/SeqType.ts (96%) rename src/lostcity/cache/{ => config}/SpotanimType.ts (97%) rename src/lostcity/cache/{ => config}/StructType.ts (94%) rename src/lostcity/cache/{ => config}/VarNpcType.ts (92%) rename src/lostcity/cache/{ => config}/VarPlayerType.ts (95%) rename src/lostcity/cache/{ => config}/VarSharedType.ts (92%) rename src/lostcity/cache/{ => graphics}/AnimBase.ts (100%) rename src/lostcity/cache/{ => graphics}/AnimFrame.ts (99%) rename src/lostcity/{tools/client/models => cache/graphics}/Model.ts (100%) rename src/lostcity/{tools/pack => cache}/pack.ts (91%) rename src/lostcity/{tools/pack => cache}/packall.ts (60%) rename src/lostcity/{tools/client/wordenc => cache/packchat}/pack.ts (100%) rename src/lostcity/{tools => cache}/packconfig/DbRowConfig.ts (95%) rename src/lostcity/{tools => cache}/packconfig/DbTableConfig.ts (96%) rename src/lostcity/{tools => cache}/packconfig/EnumConfig.ts (95%) rename src/lostcity/{tools => cache}/packconfig/FloConfig.ts (97%) rename src/lostcity/{tools => cache}/packconfig/HuntConfig.ts (99%) rename src/lostcity/{tools => cache}/packconfig/IdkConfig.ts (98%) rename src/lostcity/{tools => cache}/packconfig/InvConfig.ts (97%) rename src/lostcity/{tools => cache}/packconfig/LocConfig.ts (97%) rename src/lostcity/{tools => cache}/packconfig/MesAnimConfig.ts (97%) rename src/lostcity/{tools => cache}/packconfig/NpcConfig.ts (98%) rename src/lostcity/{tools => cache}/packconfig/ObjConfig.ts (97%) rename src/lostcity/{tools => cache}/packconfig/PackShared.ts (95%) rename src/lostcity/{tools => cache}/packconfig/ParamConfig.ts (98%) rename src/lostcity/{tools => cache}/packconfig/SeqConfig.ts (98%) rename src/lostcity/{tools => cache}/packconfig/SpotAnimConfig.ts (98%) rename src/lostcity/{tools => cache}/packconfig/StructConfig.ts (92%) rename src/lostcity/{tools => cache}/packconfig/VarnConfig.ts (94%) rename src/lostcity/{tools => cache}/packconfig/VarpConfig.ts (93%) rename src/lostcity/{tools => cache}/packconfig/VarsConfig.ts (94%) rename src/lostcity/{tools/client/config => cache/packconfig}/recolor.ts (99%) rename src/lostcity/{tools/client/models => cache/packgraphics}/pack.ts (100%) rename src/lostcity/{tools/client/models => cache/packgraphics}/reorg.ts (100%) rename src/lostcity/{tools/client/models => cache/packgraphics}/unpack.ts (98%) rename src/lostcity/{tools => cache}/packinterface/PackClient.ts (100%) rename src/lostcity/{tools => cache}/packinterface/PackServer.ts (100%) rename src/lostcity/{tools => cache}/packinterface/PackShared.ts (100%) rename src/lostcity/{tools => cache}/packinterface/Unpack.ts (100%) rename src/lostcity/{tools => cache}/packmap/PackClient.js (100%) rename src/lostcity/{tools => cache}/packmap/PackServer.js (100%) rename src/lostcity/{tools => cache}/packmap/Unpack.ts (100%) rename src/lostcity/{tools => cache}/packmap/Worldmap.ts (99%) rename src/lostcity/{tools/client/music => cache/packmidi}/pack.ts (100%) rename src/lostcity/{tools/client/sounds => cache/packsound}/pack.ts (100%) rename src/lostcity/{tools/client/sounds => cache/packsound}/reorg.ts (100%) rename src/lostcity/{tools/client/sounds => cache/packsound}/unpack.ts (100%) rename src/lostcity/{tools/client => cache/packsprite}/media/pack.ts (100%) rename src/lostcity/{tools/client => cache/packsprite}/textures/pack.ts (100%) rename src/lostcity/{tools/client => cache/packsprite}/title/pack.ts (100%) rename src/lostcity/{tools/pack => cache}/symbols.ts (96%) rename src/lostcity/cache/{ => wordenc}/WordEnc.test.ts (98%) rename src/lostcity/cache/{ => wordenc}/WordEnc.ts (97%) rename src/lostcity/cache/{ => wordenc}/WordEncBadWords.ts (99%) rename src/lostcity/cache/{ => wordenc}/WordEncDomains.ts (96%) rename src/lostcity/cache/{ => wordenc}/WordEncFragments.ts (98%) rename src/lostcity/cache/{ => wordenc}/WordEncTlds.ts (96%) rename src/lostcity/tools/{common => cache}/cacheRename.ts (100%) rename src/lostcity/tools/{client/clean.ts => cache/cleanClient.ts} (100%) rename src/lostcity/tools/{server/clean.ts => cache/cleanServer.ts} (100%) rename src/lostcity/tools/{common => cache}/jagCompare.ts (100%) rename src/lostcity/tools/{common => cache}/jagList.ts (100%) rename src/lostcity/tools/{common => cache}/jagUnpack.ts (100%) rename src/lostcity/tools/{packmap => map}/ImportNpcCsv.ts (100%) rename src/lostcity/tools/{packmap => map}/ImportObjCsv.ts (100%) rename src/lostcity/tools/{client => }/packet/npcInfo.ts (100%) rename src/lostcity/tools/{client => }/packet/playerInfo.ts (100%) delete mode 100644 src/lostcity/tools/server/update-names.ts diff --git a/package.json b/package.json index aad0ee466..de050d7ba 100644 --- a/package.json +++ b/package.json @@ -8,22 +8,21 @@ "#lostcity/*": "./src/lostcity/*" }, "scripts": { - "build": "npm run ts-loader src/lostcity/tools/pack/pack.ts", + "build": "npm run ts-loader src/lostcity/cache/pack.ts", "clean": "npm run client:clean && npm run server:clean", "client": "java -cp 225.2004-05-18.jar client 10 0 highmem members", - "client:clean": "npm run ts-loader src/lostcity/tools/client/clean.ts", + "client:clean": "npm run ts-loader src/lostcity/tools/cache/cleanClient.ts", "db:migrate": "prisma migrate deploy", "db:reset": "prisma migrate reset --force", "db:schema": "prisma migrate dev", "dev": "nodemon src/lostcity/app.ts", - "friend": "npm run ts-loader src/lostcity/friend.ts", "lint": "eslint src --ext .ts --ext .js", "lint:staged": "eslint --ext .ts --ext .js", "login": "npm run ts-loader src/lostcity/login.ts", "maintenance": "npm run ts-loader src/lostcity/maintenance.ts", "precommit": "prettier . --write && eslint . --ext .ts --ext .js --fix", "prepare": "husky", - "server:clean": "npm run ts-loader src/lostcity/tools/server/clean.ts", + "server:clean": "npm run ts-loader src/lostcity/tools/cache/cleanServer.ts", "start": "npm i && npm run ts-loader src/lostcity/app.ts", "test": "vitest run ./src", "todo": "leasot src/ --skip-unsupported --exit-nicely", diff --git a/src/lostcity/app.ts b/src/lostcity/app.ts index 2bdaa3e94..3612ae401 100644 --- a/src/lostcity/app.ts +++ b/src/lostcity/app.ts @@ -8,7 +8,7 @@ import TcpServer from '#lostcity/server/TcpServer.js'; import WSServer from '#lostcity/server/WSServer.js'; import Environment from '#lostcity/util/Environment.js'; -import { packClient, packServer } from './tools/pack/packall.js'; +import { packClient, packServer } from './cache/packall.js'; import { updateCompiler } from '#lostcity/util/RuneScriptCompiler.js'; if (Environment.UPDATE_ON_STARTUP) { diff --git a/src/lostcity/cache/IdkType.test.ts.disabled b/src/lostcity/cache/IdkType.test.ts.disabled deleted file mode 100644 index 0d1ddef5a..000000000 --- a/src/lostcity/cache/IdkType.test.ts.disabled +++ /dev/null @@ -1,138 +0,0 @@ -import { vi, describe, it, expect } from 'vitest'; - -import fs from 'fs'; - -import Packet from '#jagex2/io/Packet.js'; - -import IdkType from '#lostcity/cache/IdkType.js'; - -// todo: test needs rewriting now that client/server data is split and loaded separately -describe('IdkType', () => { - describe('static load', () => { - it('should load data from idk.dat', () => { - const dat = new Packet(); - - fs.existsSync = vi.fn().mockReturnValue(true); - Packet.load = vi.fn().mockReturnValue(dat); - - IdkType.load('/path/to/data'); - - expect(Packet.load).toHaveBeenCalledWith('/path/to/data/server/idk.dat'); - }); - - it('should return early if idk.dat does not exist', () => { - fs.existsSync = vi.fn().mockReturnValue(false); - Packet.load = vi.fn().mockReturnValue(undefined); - - expect(Packet.load).not.toHaveBeenCalled(); - }); - - it('test get', () => { - const packet = new Packet(); - packet.p2(1); - packet.p1(250); // opcode - packet.pjstr('jordan'); //debugname - packet.p1(0); // break - packet.pos = 0; - - fs.existsSync = vi.fn().mockReturnValue(true); - Packet.load = vi.fn().mockReturnValue(packet); - - IdkType.load('/path/to/data'); - - expect(Packet.load).toHaveBeenCalledWith('/path/to/data/server/idk.dat'); - expect(IdkType.get(0).debugname).toBe('jordan'); - }); - - it('test get id', () => { - const packet = new Packet(); - packet.p2(1); - packet.p1(250); // opcode - packet.pjstr('jordan'); //debugname - packet.p1(0); // break - packet.pos = 0; - - fs.existsSync = vi.fn().mockReturnValue(true); - Packet.load = vi.fn().mockReturnValue(packet); - - IdkType.load('/path/to/data'); - - expect(Packet.load).toHaveBeenCalledWith('/path/to/data/server/idk.dat'); - expect(IdkType.getId('jordan')).toBe(0); - }); - - it('test get by name', () => { - const packet = new Packet(); - packet.p2(1); - packet.p1(250); // opcode - packet.pjstr('jordan'); //debugname - packet.p1(0); // break - packet.pos = 0; - - fs.existsSync = vi.fn().mockReturnValue(true); - Packet.load = vi.fn().mockReturnValue(packet); - - IdkType.load('/path/to/data'); - - expect(Packet.load).toHaveBeenCalledWith('/path/to/data/server/idk.dat'); - expect(IdkType.getByName('jordan')?.debugname).toBe('jordan'); - }); - - it('test get by name -1', () => { - const packet = new Packet(); - - fs.existsSync = vi.fn().mockReturnValue(true); - Packet.load = vi.fn().mockReturnValue(packet); - - IdkType.load('/path/to/data'); - - expect(Packet.load).toHaveBeenCalledWith('/path/to/data/server/idk.dat'); - expect(IdkType.getByName('jordan')).toBeNull(); - }); - }); - - describe('decode', () => { - it('decoded idk matches input packet data', () => { - const packet = new Packet(); - packet.p1(1); // opcode - packet.p1(69); // type - - packet.p1(2); // opcode - packet.p1(1); // count - packet.p2(69); // model - - packet.p1(3); // opcode - - packet.p1(40); // opcode - packet.p2(69); // recol_s - - packet.p1(50); // opcode - packet.p2(69); // recol_d - - packet.p1(60); // opcode - packet.p2(69); // heads - - packet.p1(250); // opcode - packet.pjstr('jordan'); //debugname - - packet.p1(0); // break - packet.pos = 0; - - const idk = new IdkType(69); - idk.decodeType(packet); - - expect(idk.id).toBe(69); - expect(idk.type).toBe(69); - expect(idk.models.length).toBe(1); - expect(idk.models[0]).toBe(69); - expect(idk.disable).toBe(true); - expect(idk.recol_s.length).toBe(10); - expect(idk.recol_s[0]).toBe(69); - expect(idk.recol_d.length).toBe(10); - expect(idk.recol_d[0]).toBe(69); - expect(idk.heads.length).toBe(10); - expect(idk.heads[0]).toBe(69); - expect(idk.debugname).toBe('jordan'); - }); - }); -}); diff --git a/src/lostcity/cache/CategoryType.ts b/src/lostcity/cache/config/CategoryType.ts similarity index 96% rename from src/lostcity/cache/CategoryType.ts rename to src/lostcity/cache/config/CategoryType.ts index 647d1741b..a7d6d9bf0 100644 --- a/src/lostcity/cache/CategoryType.ts +++ b/src/lostcity/cache/config/CategoryType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; // this is a virtual type (just contains debugname) so we have an easily reloadable, portable category lookup export default class CategoryType extends ConfigType { diff --git a/src/lostcity/cache/Component.test.ts b/src/lostcity/cache/config/Component.test.ts similarity index 99% rename from src/lostcity/cache/Component.test.ts rename to src/lostcity/cache/config/Component.test.ts index 049c4392a..c0ffbbbde 100644 --- a/src/lostcity/cache/Component.test.ts +++ b/src/lostcity/cache/config/Component.test.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; describe('Component', () => { describe('static load', () => { diff --git a/src/lostcity/cache/Component.ts b/src/lostcity/cache/config/Component.ts similarity index 100% rename from src/lostcity/cache/Component.ts rename to src/lostcity/cache/config/Component.ts diff --git a/src/lostcity/cache/ConfigType.ts b/src/lostcity/cache/config/ConfigType.ts similarity index 100% rename from src/lostcity/cache/ConfigType.ts rename to src/lostcity/cache/config/ConfigType.ts diff --git a/src/lostcity/cache/DbRowType.ts b/src/lostcity/cache/config/DbRowType.ts similarity index 94% rename from src/lostcity/cache/DbRowType.ts rename to src/lostcity/cache/config/DbRowType.ts index cb8ee76a2..bf98ee513 100644 --- a/src/lostcity/cache/DbRowType.ts +++ b/src/lostcity/cache/config/DbRowType.ts @@ -2,9 +2,9 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import DbTableType from '#lostcity/cache/DbTableType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; export default class DbRowType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/DbTableType.ts b/src/lostcity/cache/config/DbTableType.ts similarity index 96% rename from src/lostcity/cache/DbTableType.ts rename to src/lostcity/cache/config/DbTableType.ts index 316216b87..ff184b3dd 100644 --- a/src/lostcity/cache/DbTableType.ts +++ b/src/lostcity/cache/config/DbTableType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; export default class DbTableType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/EnumType.ts b/src/lostcity/cache/config/EnumType.ts similarity index 94% rename from src/lostcity/cache/EnumType.ts rename to src/lostcity/cache/config/EnumType.ts index 1d872585f..1b6b43ab0 100644 --- a/src/lostcity/cache/EnumType.ts +++ b/src/lostcity/cache/config/EnumType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; export default class EnumType extends ConfigType { static configNames = new Map(); diff --git a/src/lostcity/cache/FloType.ts b/src/lostcity/cache/config/FloType.ts similarity index 97% rename from src/lostcity/cache/FloType.ts rename to src/lostcity/cache/config/FloType.ts index f02355e5c..a35e18265 100644 --- a/src/lostcity/cache/FloType.ts +++ b/src/lostcity/cache/config/FloType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class FloType extends ConfigType { diff --git a/src/lostcity/cache/FontType.ts b/src/lostcity/cache/config/FontType.ts similarity index 100% rename from src/lostcity/cache/FontType.ts rename to src/lostcity/cache/config/FontType.ts diff --git a/src/lostcity/cache/HuntType.ts b/src/lostcity/cache/config/HuntType.ts similarity index 97% rename from src/lostcity/cache/HuntType.ts rename to src/lostcity/cache/config/HuntType.ts index 9740393a8..8db709da6 100644 --- a/src/lostcity/cache/HuntType.ts +++ b/src/lostcity/cache/config/HuntType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; import HuntCheckNotTooStrong from '#lostcity/entity/hunt/HuntCheckNotTooStrong.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; diff --git a/src/lostcity/cache/IdkType.ts b/src/lostcity/cache/config/IdkType.ts similarity index 97% rename from src/lostcity/cache/IdkType.ts rename to src/lostcity/cache/config/IdkType.ts index 993823236..339a7fa68 100644 --- a/src/lostcity/cache/IdkType.ts +++ b/src/lostcity/cache/config/IdkType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class IdkType extends ConfigType { diff --git a/src/lostcity/cache/InvType.ts b/src/lostcity/cache/config/InvType.ts similarity index 97% rename from src/lostcity/cache/InvType.ts rename to src/lostcity/cache/config/InvType.ts index 5be61b3db..a36259bc9 100644 --- a/src/lostcity/cache/InvType.ts +++ b/src/lostcity/cache/config/InvType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; export default class InvType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/LocType.ts b/src/lostcity/cache/config/LocType.ts similarity index 97% rename from src/lostcity/cache/LocType.ts rename to src/lostcity/cache/config/LocType.ts index 6a89e0039..7caffd7ef 100644 --- a/src/lostcity/cache/LocType.ts +++ b/src/lostcity/cache/config/LocType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import { ParamHelper, ParamMap } from '#lostcity/cache/ParamHelper.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import { ParamHelper, ParamMap } from '#lostcity/cache/config/ParamHelper.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class LocType extends ConfigType { diff --git a/src/lostcity/cache/MesanimType.test.ts b/src/lostcity/cache/config/MesanimType.test.ts similarity index 95% rename from src/lostcity/cache/MesanimType.test.ts rename to src/lostcity/cache/config/MesanimType.test.ts index 48ffe5bc5..10d685abc 100644 --- a/src/lostcity/cache/MesanimType.test.ts +++ b/src/lostcity/cache/config/MesanimType.test.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import MesanimType from '#lostcity/cache/MesanimType.js'; +import MesanimType from '#lostcity/cache/config/MesanimType.js'; describe('MesanimType', () => { describe('static load', () => { diff --git a/src/lostcity/cache/MesanimType.ts b/src/lostcity/cache/config/MesanimType.ts similarity index 96% rename from src/lostcity/cache/MesanimType.ts rename to src/lostcity/cache/config/MesanimType.ts index 11f196a3b..b8c72174d 100644 --- a/src/lostcity/cache/MesanimType.ts +++ b/src/lostcity/cache/config/MesanimType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; export default class MesanimType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/NpcType.ts b/src/lostcity/cache/config/NpcType.ts similarity index 97% rename from src/lostcity/cache/NpcType.ts rename to src/lostcity/cache/config/NpcType.ts index 5d0d46e53..ef3151a9b 100644 --- a/src/lostcity/cache/NpcType.ts +++ b/src/lostcity/cache/config/NpcType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import { ParamHelper, ParamMap } from '#lostcity/cache/ParamHelper.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import { ParamHelper, ParamMap } from '#lostcity/cache/config/ParamHelper.js'; import BlockWalk from '#lostcity/entity/BlockWalk.js'; import MoveRestrict from '#lostcity/entity/MoveRestrict.js'; diff --git a/src/lostcity/cache/ObjType.ts b/src/lostcity/cache/config/ObjType.ts similarity index 97% rename from src/lostcity/cache/ObjType.ts rename to src/lostcity/cache/config/ObjType.ts index d24eaa0ea..f6cc07cef 100644 --- a/src/lostcity/cache/ObjType.ts +++ b/src/lostcity/cache/config/ObjType.ts @@ -2,9 +2,9 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import { ParamHelper, ParamMap } from '#lostcity/cache/ParamHelper.js'; -import ParamType from '#lostcity/cache/ParamType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import { ParamHelper, ParamMap } from '#lostcity/cache/config/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class ObjType extends ConfigType { diff --git a/src/lostcity/cache/ParamHelper.ts b/src/lostcity/cache/config/ParamHelper.ts similarity index 100% rename from src/lostcity/cache/ParamHelper.ts rename to src/lostcity/cache/config/ParamHelper.ts diff --git a/src/lostcity/cache/ParamType.ts b/src/lostcity/cache/config/ParamType.ts similarity index 96% rename from src/lostcity/cache/ParamType.ts rename to src/lostcity/cache/config/ParamType.ts index 07648c182..a360b0575 100644 --- a/src/lostcity/cache/ParamType.ts +++ b/src/lostcity/cache/config/ParamType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; export default class ParamType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/ScriptVarType.ts b/src/lostcity/cache/config/ScriptVarType.ts similarity index 100% rename from src/lostcity/cache/ScriptVarType.ts rename to src/lostcity/cache/config/ScriptVarType.ts diff --git a/src/lostcity/cache/SeqFrame.ts b/src/lostcity/cache/config/SeqFrame.ts similarity index 100% rename from src/lostcity/cache/SeqFrame.ts rename to src/lostcity/cache/config/SeqFrame.ts diff --git a/src/lostcity/cache/SeqType.ts b/src/lostcity/cache/config/SeqType.ts similarity index 96% rename from src/lostcity/cache/SeqType.ts rename to src/lostcity/cache/config/SeqType.ts index becf52040..c4589c337 100644 --- a/src/lostcity/cache/SeqType.ts +++ b/src/lostcity/cache/config/SeqType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import SeqFrame from '#lostcity/cache/SeqFrame.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import SeqFrame from '#lostcity/cache/config/SeqFrame.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class SeqType extends ConfigType { diff --git a/src/lostcity/cache/SpotanimType.ts b/src/lostcity/cache/config/SpotanimType.ts similarity index 97% rename from src/lostcity/cache/SpotanimType.ts rename to src/lostcity/cache/config/SpotanimType.ts index 8f61892da..d06891d88 100644 --- a/src/lostcity/cache/SpotanimType.ts +++ b/src/lostcity/cache/config/SpotanimType.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class SpotanimType extends ConfigType { diff --git a/src/lostcity/cache/StructType.ts b/src/lostcity/cache/config/StructType.ts similarity index 94% rename from src/lostcity/cache/StructType.ts rename to src/lostcity/cache/config/StructType.ts index 327481d23..e762c8bbb 100644 --- a/src/lostcity/cache/StructType.ts +++ b/src/lostcity/cache/config/StructType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import { ParamHelper, ParamHolder, ParamMap } from '#lostcity/cache/ParamHelper.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import { ParamHelper, ParamHolder, ParamMap } from '#lostcity/cache/config/ParamHelper.js'; export default class StructType extends ConfigType implements ParamHolder { private static configNames = new Map(); diff --git a/src/lostcity/cache/VarNpcType.ts b/src/lostcity/cache/config/VarNpcType.ts similarity index 92% rename from src/lostcity/cache/VarNpcType.ts rename to src/lostcity/cache/config/VarNpcType.ts index ed06fc3fb..add0f7b5d 100644 --- a/src/lostcity/cache/VarNpcType.ts +++ b/src/lostcity/cache/config/VarNpcType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; export default class VarNpcType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/VarPlayerType.ts b/src/lostcity/cache/config/VarPlayerType.ts similarity index 95% rename from src/lostcity/cache/VarPlayerType.ts rename to src/lostcity/cache/config/VarPlayerType.ts index 610085014..80f7074a8 100644 --- a/src/lostcity/cache/VarPlayerType.ts +++ b/src/lostcity/cache/config/VarPlayerType.ts @@ -2,8 +2,8 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import Jagfile from '#jagex2/io/Jagfile.js'; export default class VarPlayerType extends ConfigType { diff --git a/src/lostcity/cache/VarSharedType.ts b/src/lostcity/cache/config/VarSharedType.ts similarity index 92% rename from src/lostcity/cache/VarSharedType.ts rename to src/lostcity/cache/config/VarSharedType.ts index 01dadc36e..1b13c7486 100644 --- a/src/lostcity/cache/VarSharedType.ts +++ b/src/lostcity/cache/config/VarSharedType.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import { ConfigType } from '#lostcity/cache/ConfigType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import { ConfigType } from '#lostcity/cache/config/ConfigType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; export default class VarSharedType extends ConfigType { private static configNames = new Map(); diff --git a/src/lostcity/cache/AnimBase.ts b/src/lostcity/cache/graphics/AnimBase.ts similarity index 100% rename from src/lostcity/cache/AnimBase.ts rename to src/lostcity/cache/graphics/AnimBase.ts diff --git a/src/lostcity/cache/AnimFrame.ts b/src/lostcity/cache/graphics/AnimFrame.ts similarity index 99% rename from src/lostcity/cache/AnimFrame.ts rename to src/lostcity/cache/graphics/AnimFrame.ts index 28b74c2b1..bf55a7229 100644 --- a/src/lostcity/cache/AnimFrame.ts +++ b/src/lostcity/cache/graphics/AnimFrame.ts @@ -1,7 +1,7 @@ import Jagfile from '#jagex2/io/Jagfile.js'; import Packet from '#jagex2/io/Packet.js'; -import AnimBase from '#lostcity/cache/AnimBase.js'; +import AnimBase from '#lostcity/cache/graphics/AnimBase.js'; export default class AnimFrame { static instances: AnimFrame[] = []; diff --git a/src/lostcity/tools/client/models/Model.ts b/src/lostcity/cache/graphics/Model.ts similarity index 100% rename from src/lostcity/tools/client/models/Model.ts rename to src/lostcity/cache/graphics/Model.ts diff --git a/src/lostcity/tools/pack/pack.ts b/src/lostcity/cache/pack.ts similarity index 91% rename from src/lostcity/tools/pack/pack.ts rename to src/lostcity/cache/pack.ts index a49200a3a..b390b5da8 100644 --- a/src/lostcity/tools/pack/pack.ts +++ b/src/lostcity/cache/pack.ts @@ -1,5 +1,5 @@ import { parentPort } from 'worker_threads'; -import { packClient, packServer } from './packall.js'; +import { packClient, packServer } from '#lostcity/cache/packall.js'; import Environment from '#lostcity/util/Environment.js'; import { updateCompiler } from '#lostcity/util/RuneScriptCompiler.js'; diff --git a/src/lostcity/tools/pack/packall.ts b/src/lostcity/cache/packall.ts similarity index 60% rename from src/lostcity/tools/pack/packall.ts rename to src/lostcity/cache/packall.ts index 73d79d37e..d5c0c36e0 100644 --- a/src/lostcity/tools/pack/packall.ts +++ b/src/lostcity/cache/packall.ts @@ -1,23 +1,23 @@ import fs from 'fs'; import child_process from 'child_process'; -import { packServerInterface } from '#lostcity/tools/packinterface/PackServer.js'; -import { packServerMap } from '#lostcity/tools/packmap/PackServer.js'; -import { generateServerSymbols } from '#lostcity/tools/pack/symbols.js'; -import { packConfigs } from '#lostcity/tools/packconfig/PackShared.js'; -import { packWorldmap } from '#lostcity/tools/packmap/Worldmap.js'; +import { packServerInterface } from '#lostcity/cache/packinterface/PackServer.js'; +import { packServerMap } from '#lostcity/cache/packmap/PackServer.js'; +import { generateServerSymbols } from '#lostcity/cache/symbols.js'; +import { packConfigs } from '#lostcity/cache/packconfig/PackShared.js'; +import { packWorldmap } from '#lostcity/cache/packmap/Worldmap.js'; import Environment from '#lostcity/util/Environment.js'; import { revalidatePack } from '#lostcity/util/PackFile.js'; -import { packClientInterface } from '#lostcity/tools/packinterface/PackClient.js'; -import { packClientMap } from '#lostcity/tools/packmap/PackClient.js'; -import { packClientModel } from '#lostcity/tools/client/models/pack.js'; -import { packClientMusic } from '#lostcity/tools/client/music/pack.js'; -import { packClientSound } from '#lostcity/tools/client/sounds/pack.js'; -import { packClientWordenc } from '#lostcity/tools/client/wordenc/pack.js'; -import { packClientTitle } from '#lostcity/tools/client/title/pack.js'; -import { packClientTexture } from '#lostcity/tools/client/textures/pack.js'; -import { packClientMedia } from '#lostcity/tools/client/media/pack.js'; +import { packClientInterface } from '#lostcity/cache/packinterface/PackClient.js'; +import { packClientMap } from '#lostcity/cache/packmap/PackClient.js'; +import { packClientModel } from '#lostcity/cache/packgraphics/pack.js'; +import { packClientMusic } from '#lostcity/cache/packmidi/pack.js'; +import { packClientSound } from '#lostcity/cache/packsound/pack.js'; +import { packClientWordenc } from '#lostcity/cache/packchat/pack.js'; +import { packClientTitle } from '#lostcity/cache/packsprite/title/pack.js'; +import { packClientTexture } from '#lostcity/cache/packsprite/textures/pack.js'; +import { packClientMedia } from '#lostcity/cache/packsprite/media/pack.js'; export async function packServer() { if (!fs.existsSync('RuneScriptCompiler.jar')) { diff --git a/src/lostcity/tools/client/wordenc/pack.ts b/src/lostcity/cache/packchat/pack.ts similarity index 100% rename from src/lostcity/tools/client/wordenc/pack.ts rename to src/lostcity/cache/packchat/pack.ts diff --git a/src/lostcity/tools/packconfig/DbRowConfig.ts b/src/lostcity/cache/packconfig/DbRowConfig.ts similarity index 95% rename from src/lostcity/tools/packconfig/DbRowConfig.ts rename to src/lostcity/cache/packconfig/DbRowConfig.ts index e4e3ccbd3..5b77c659c 100644 --- a/src/lostcity/tools/packconfig/DbRowConfig.ts +++ b/src/lostcity/cache/packconfig/DbRowConfig.ts @@ -1,8 +1,8 @@ -import DbTableType from '#lostcity/cache/DbTableType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, packStepError, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { ConfigValue, ConfigLine, packStepError, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import { DbRowPack, DbTablePack } from '#lostcity/util/PackFile.js'; function parseCsv(str: string): string[] { diff --git a/src/lostcity/tools/packconfig/DbTableConfig.ts b/src/lostcity/cache/packconfig/DbTableConfig.ts similarity index 96% rename from src/lostcity/tools/packconfig/DbTableConfig.ts rename to src/lostcity/cache/packconfig/DbTableConfig.ts index dcad06bcf..68f45bd2f 100644 --- a/src/lostcity/tools/packconfig/DbTableConfig.ts +++ b/src/lostcity/cache/packconfig/DbTableConfig.ts @@ -1,7 +1,7 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import { DbTablePack } from '#lostcity/util/PackFile.js'; function parseCsv(str: string): string[] { diff --git a/src/lostcity/tools/packconfig/EnumConfig.ts b/src/lostcity/cache/packconfig/EnumConfig.ts similarity index 95% rename from src/lostcity/tools/packconfig/EnumConfig.ts rename to src/lostcity/cache/packconfig/EnumConfig.ts index 21f162f1d..0232a81d6 100644 --- a/src/lostcity/tools/packconfig/EnumConfig.ts +++ b/src/lostcity/cache/packconfig/EnumConfig.ts @@ -1,7 +1,7 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import { EnumPack } from '#lostcity/util/PackFile.js'; export function parseEnumConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/FloConfig.ts b/src/lostcity/cache/packconfig/FloConfig.ts similarity index 97% rename from src/lostcity/tools/packconfig/FloConfig.ts rename to src/lostcity/cache/packconfig/FloConfig.ts index 8ea1b2650..695f9c7c3 100644 --- a/src/lostcity/tools/packconfig/FloConfig.ts +++ b/src/lostcity/cache/packconfig/FloConfig.ts @@ -1,4 +1,4 @@ -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { FloPack, TexturePack } from '#lostcity/util/PackFile.js'; export function parseFloConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/HuntConfig.ts b/src/lostcity/cache/packconfig/HuntConfig.ts similarity index 99% rename from src/lostcity/tools/packconfig/HuntConfig.ts rename to src/lostcity/cache/packconfig/HuntConfig.ts index 86915f117..c3cf23596 100644 --- a/src/lostcity/tools/packconfig/HuntConfig.ts +++ b/src/lostcity/cache/packconfig/HuntConfig.ts @@ -1,4 +1,4 @@ -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; import HuntCheckNotTooStrong from '#lostcity/entity/hunt/HuntCheckNotTooStrong.js'; diff --git a/src/lostcity/tools/packconfig/IdkConfig.ts b/src/lostcity/cache/packconfig/IdkConfig.ts similarity index 98% rename from src/lostcity/tools/packconfig/IdkConfig.ts rename to src/lostcity/cache/packconfig/IdkConfig.ts index 92f66f17a..7c24a51eb 100644 --- a/src/lostcity/tools/packconfig/IdkConfig.ts +++ b/src/lostcity/cache/packconfig/IdkConfig.ts @@ -1,4 +1,4 @@ -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import ColorConversion from '#lostcity/util/ColorConversion.js'; import { IdkPack, ModelPack } from '#lostcity/util/PackFile.js'; diff --git a/src/lostcity/tools/packconfig/InvConfig.ts b/src/lostcity/cache/packconfig/InvConfig.ts similarity index 97% rename from src/lostcity/tools/packconfig/InvConfig.ts rename to src/lostcity/cache/packconfig/InvConfig.ts index aee775f42..f980d6ae5 100644 --- a/src/lostcity/tools/packconfig/InvConfig.ts +++ b/src/lostcity/cache/packconfig/InvConfig.ts @@ -1,6 +1,6 @@ -import InvType from '#lostcity/cache/InvType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { InvPack, ObjPack } from '#lostcity/util/PackFile.js'; export function parseInvConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/LocConfig.ts b/src/lostcity/cache/packconfig/LocConfig.ts similarity index 97% rename from src/lostcity/tools/packconfig/LocConfig.ts rename to src/lostcity/cache/packconfig/LocConfig.ts index be978f3e0..5e71ae103 100644 --- a/src/lostcity/tools/packconfig/LocConfig.ts +++ b/src/lostcity/cache/packconfig/LocConfig.ts @@ -1,8 +1,8 @@ -import ParamType from '#lostcity/cache/ParamType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { LocModelShape, ConfigValue, ConfigLine, ParamValue, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { LocModelShape, ConfigValue, ConfigLine, ParamValue, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import ColorConversion from '#lostcity/util/ColorConversion.js'; import { CategoryPack, LocPack, ModelPack, SeqPack, TexturePack } from '#lostcity/util/PackFile.js'; diff --git a/src/lostcity/tools/packconfig/MesAnimConfig.ts b/src/lostcity/cache/packconfig/MesAnimConfig.ts similarity index 97% rename from src/lostcity/tools/packconfig/MesAnimConfig.ts rename to src/lostcity/cache/packconfig/MesAnimConfig.ts index 7328b412c..fd57c27bd 100644 --- a/src/lostcity/tools/packconfig/MesAnimConfig.ts +++ b/src/lostcity/cache/packconfig/MesAnimConfig.ts @@ -1,4 +1,4 @@ -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { MesAnimPack, SeqPack } from '#lostcity/util/PackFile.js'; export function parseMesAnimConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/NpcConfig.ts b/src/lostcity/cache/packconfig/NpcConfig.ts similarity index 98% rename from src/lostcity/tools/packconfig/NpcConfig.ts rename to src/lostcity/cache/packconfig/NpcConfig.ts index 6e5f62f23..22f063042 100644 --- a/src/lostcity/tools/packconfig/NpcConfig.ts +++ b/src/lostcity/cache/packconfig/NpcConfig.ts @@ -1,11 +1,11 @@ -import ParamType from '#lostcity/cache/ParamType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import MoveRestrict from '#lostcity/entity/MoveRestrict.js'; import NpcMode from '#lostcity/entity/NpcMode.js'; -import { ParamValue, ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { ParamValue, ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import BlockWalk from '#lostcity/entity/BlockWalk.js'; import { CategoryPack, HuntPack, ModelPack, NpcPack, SeqPack } from '#lostcity/util/PackFile.js'; import ColorConversion from '#lostcity/util/ColorConversion.js'; diff --git a/src/lostcity/tools/packconfig/ObjConfig.ts b/src/lostcity/cache/packconfig/ObjConfig.ts similarity index 97% rename from src/lostcity/tools/packconfig/ObjConfig.ts rename to src/lostcity/cache/packconfig/ObjConfig.ts index 305cb02d2..7687210e2 100644 --- a/src/lostcity/tools/packconfig/ObjConfig.ts +++ b/src/lostcity/cache/packconfig/ObjConfig.ts @@ -1,9 +1,9 @@ -import ObjType from '#lostcity/cache/ObjType.js'; -import ParamType from '#lostcity/cache/ParamType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ParamValue, ConfigValue, ConfigLine, packStepError, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { ParamValue, ConfigValue, ConfigLine, packStepError, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import ColorConversion from '#lostcity/util/ColorConversion.js'; import { CategoryPack, ModelPack, ObjPack, SeqPack } from '#lostcity/util/PackFile.js'; diff --git a/src/lostcity/tools/packconfig/PackShared.ts b/src/lostcity/cache/packconfig/PackShared.ts similarity index 95% rename from src/lostcity/tools/packconfig/PackShared.ts rename to src/lostcity/cache/packconfig/PackShared.ts index ab6ace1a0..30a4d5ca3 100644 --- a/src/lostcity/tools/packconfig/PackShared.ts +++ b/src/lostcity/cache/packconfig/PackShared.ts @@ -4,34 +4,34 @@ import Packet from '#jagex2/io/Packet.js'; import { VarnPack, VarpPack, VarsPack, shouldBuild } from '#lostcity/util/PackFile.js'; -import ParamType from '#lostcity/cache/ParamType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; -import { packParamConfigs, parseParamConfig } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { packParamConfigs, parseParamConfig } from '#lostcity/cache/packconfig/ParamConfig.js'; import { loadDir } from '#lostcity/util/NameMap.js'; -import { packFloConfigs, parseFloConfig } from '#lostcity/tools/packconfig/FloConfig.js'; -import { packIdkConfigs, parseIdkConfig } from '#lostcity/tools/packconfig/IdkConfig.js'; -import { packLocConfigs, parseLocConfig } from '#lostcity/tools/packconfig/LocConfig.js'; -import { packNpcConfigs, parseNpcConfig } from '#lostcity/tools/packconfig/NpcConfig.js'; -import { packObjConfigs, parseObjConfig } from '#lostcity/tools/packconfig/ObjConfig.js'; -import { packSeqConfigs, parseSeqConfig } from '#lostcity/tools/packconfig/SeqConfig.js'; -import { packSpotAnimConfigs, parseSpotAnimConfig } from '#lostcity/tools/packconfig/SpotAnimConfig.js'; -import { packVarpConfigs, parseVarpConfig } from '#lostcity/tools/packconfig/VarpConfig.js'; +import { packFloConfigs, parseFloConfig } from '#lostcity/cache/packconfig/FloConfig.js'; +import { packIdkConfigs, parseIdkConfig } from '#lostcity/cache/packconfig/IdkConfig.js'; +import { packLocConfigs, parseLocConfig } from '#lostcity/cache/packconfig/LocConfig.js'; +import { packNpcConfigs, parseNpcConfig } from '#lostcity/cache/packconfig/NpcConfig.js'; +import { packObjConfigs, parseObjConfig } from '#lostcity/cache/packconfig/ObjConfig.js'; +import { packSeqConfigs, parseSeqConfig } from '#lostcity/cache/packconfig/SeqConfig.js'; +import { packSpotAnimConfigs, parseSpotAnimConfig } from '#lostcity/cache/packconfig/SpotAnimConfig.js'; +import { packVarpConfigs, parseVarpConfig } from '#lostcity/cache/packconfig/VarpConfig.js'; import { AnimPack, CategoryPack, shouldBuildFile } from '#lostcity/util/PackFile.js'; import { listFilesExt } from '#lostcity/util/Parse.js'; -import DbTableType from '#lostcity/cache/DbTableType.js'; - -import { packDbRowConfigs, parseDbRowConfig } from '#lostcity/tools/packconfig/DbRowConfig.js'; -import { packDbTableConfigs, parseDbTableConfig } from '#lostcity/tools/packconfig/DbTableConfig.js'; -import { packEnumConfigs, parseEnumConfig } from '#lostcity/tools/packconfig/EnumConfig.js'; -import { packInvConfigs, parseInvConfig } from '#lostcity/tools/packconfig/InvConfig.js'; -import { packMesAnimConfigs, parseMesAnimConfig } from '#lostcity/tools/packconfig/MesAnimConfig.js'; -import { packStructConfigs, parseStructConfig } from '#lostcity/tools/packconfig/StructConfig.js'; -import { packHuntConfigs, parseHuntConfig } from '#lostcity/tools/packconfig/HuntConfig.js'; -import { packVarnConfigs, parseVarnConfig } from '#lostcity/tools/packconfig/VarnConfig.js'; -import { packVarsConfigs, parseVarsConfig } from '#lostcity/tools/packconfig/VarsConfig.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; + +import { packDbRowConfigs, parseDbRowConfig } from '#lostcity/cache/packconfig/DbRowConfig.js'; +import { packDbTableConfigs, parseDbTableConfig } from '#lostcity/cache/packconfig/DbTableConfig.js'; +import { packEnumConfigs, parseEnumConfig } from '#lostcity/cache/packconfig/EnumConfig.js'; +import { packInvConfigs, parseInvConfig } from '#lostcity/cache/packconfig/InvConfig.js'; +import { packMesAnimConfigs, parseMesAnimConfig } from '#lostcity/cache/packconfig/MesAnimConfig.js'; +import { packStructConfigs, parseStructConfig } from '#lostcity/cache/packconfig/StructConfig.js'; +import { packHuntConfigs, parseHuntConfig } from '#lostcity/cache/packconfig/HuntConfig.js'; +import { packVarnConfigs, parseVarnConfig } from '#lostcity/cache/packconfig/VarnConfig.js'; +import { packVarsConfigs, parseVarsConfig } from '#lostcity/cache/packconfig/VarsConfig.js'; import Jagfile from '#jagex2/io/Jagfile.js'; import Environment from '#lostcity/util/Environment.js'; diff --git a/src/lostcity/tools/packconfig/ParamConfig.ts b/src/lostcity/cache/packconfig/ParamConfig.ts similarity index 98% rename from src/lostcity/tools/packconfig/ParamConfig.ts rename to src/lostcity/cache/packconfig/ParamConfig.ts index 7e232c50f..5a27e8fed 100644 --- a/src/lostcity/tools/packconfig/ParamConfig.ts +++ b/src/lostcity/cache/packconfig/ParamConfig.ts @@ -1,6 +1,6 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, packStepError, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, packStepError, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { CategoryPack, EnumPack, InterfacePack, InvPack, LocPack, NpcPack, ObjPack, ParamPack, SeqPack, SoundPack, SpotAnimPack, StructPack, VarpPack } from '#lostcity/util/PackFile.js'; const stats: (string | null)[] = [ diff --git a/src/lostcity/tools/packconfig/SeqConfig.ts b/src/lostcity/cache/packconfig/SeqConfig.ts similarity index 98% rename from src/lostcity/tools/packconfig/SeqConfig.ts rename to src/lostcity/cache/packconfig/SeqConfig.ts index 8d7f95715..0c47df3f3 100644 --- a/src/lostcity/tools/packconfig/SeqConfig.ts +++ b/src/lostcity/cache/packconfig/SeqConfig.ts @@ -1,4 +1,4 @@ -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { AnimPack, ObjPack, SeqPack } from '#lostcity/util/PackFile.js'; export function parseSeqConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/SpotAnimConfig.ts b/src/lostcity/cache/packconfig/SpotAnimConfig.ts similarity index 98% rename from src/lostcity/tools/packconfig/SpotAnimConfig.ts rename to src/lostcity/cache/packconfig/SpotAnimConfig.ts index 6dc16103e..fe8a32531 100644 --- a/src/lostcity/tools/packconfig/SpotAnimConfig.ts +++ b/src/lostcity/cache/packconfig/SpotAnimConfig.ts @@ -1,4 +1,4 @@ -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import ColorConversion from '#lostcity/util/ColorConversion.js'; import { ModelPack, SeqPack, SpotAnimPack } from '#lostcity/util/PackFile.js'; diff --git a/src/lostcity/tools/packconfig/StructConfig.ts b/src/lostcity/cache/packconfig/StructConfig.ts similarity index 92% rename from src/lostcity/tools/packconfig/StructConfig.ts rename to src/lostcity/cache/packconfig/StructConfig.ts index be3e895d3..c99ce3a35 100644 --- a/src/lostcity/tools/packconfig/StructConfig.ts +++ b/src/lostcity/cache/packconfig/StructConfig.ts @@ -1,8 +1,8 @@ -import ParamType from '#lostcity/cache/ParamType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, ParamValue, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; -import { lookupParamValue } from '#lostcity/tools/packconfig/ParamConfig.js'; +import { ConfigValue, ConfigLine, ParamValue, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; +import { lookupParamValue } from '#lostcity/cache/packconfig/ParamConfig.js'; import { StructPack } from '#lostcity/util/PackFile.js'; export function parseStructConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/VarnConfig.ts b/src/lostcity/cache/packconfig/VarnConfig.ts similarity index 94% rename from src/lostcity/tools/packconfig/VarnConfig.ts rename to src/lostcity/cache/packconfig/VarnConfig.ts index 9ff6d616d..e12488057 100644 --- a/src/lostcity/tools/packconfig/VarnConfig.ts +++ b/src/lostcity/cache/packconfig/VarnConfig.ts @@ -1,6 +1,6 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { VarnPack } from '#lostcity/util/PackFile.js'; export function parseVarnConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/VarpConfig.ts b/src/lostcity/cache/packconfig/VarpConfig.ts similarity index 93% rename from src/lostcity/tools/packconfig/VarpConfig.ts rename to src/lostcity/cache/packconfig/VarpConfig.ts index c415d7763..fb20c7082 100644 --- a/src/lostcity/tools/packconfig/VarpConfig.ts +++ b/src/lostcity/cache/packconfig/VarpConfig.ts @@ -1,7 +1,7 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; -import { PackedData, ConfigValue, ConfigLine, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { PackedData, ConfigValue, ConfigLine, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { VarpPack } from '#lostcity/util/PackFile.js'; export function parseVarpConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/packconfig/VarsConfig.ts b/src/lostcity/cache/packconfig/VarsConfig.ts similarity index 94% rename from src/lostcity/tools/packconfig/VarsConfig.ts rename to src/lostcity/cache/packconfig/VarsConfig.ts index 08b3c1d06..2ff177db9 100644 --- a/src/lostcity/tools/packconfig/VarsConfig.ts +++ b/src/lostcity/cache/packconfig/VarsConfig.ts @@ -1,6 +1,6 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; -import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/tools/packconfig/PackShared.js'; +import { ConfigValue, ConfigLine, PackedData, isConfigBoolean, getConfigBoolean } from '#lostcity/cache/packconfig/PackShared.js'; import { VarsPack } from '#lostcity/util/PackFile.js'; export function parseVarsConfig(key: string, value: string): ConfigValue | null | undefined { diff --git a/src/lostcity/tools/client/config/recolor.ts b/src/lostcity/cache/packconfig/recolor.ts similarity index 99% rename from src/lostcity/tools/client/config/recolor.ts rename to src/lostcity/cache/packconfig/recolor.ts index e48e2c242..ec70b8458 100644 --- a/src/lostcity/tools/client/config/recolor.ts +++ b/src/lostcity/cache/packconfig/recolor.ts @@ -1,7 +1,7 @@ import fs from 'fs'; import ColorConversion from '#lostcity/util/ColorConversion.js'; import { loadDirExact, loadPack } from '#lostcity/util/NameMap.js'; -import Model from '../models/Model.js'; +import Model from '#lostcity/cache/graphics/Model.js'; import Jagfile from '#jagex2/io/Jagfile.js'; Model.unpack(Jagfile.load('data/pack/client/models')); diff --git a/src/lostcity/tools/client/models/pack.ts b/src/lostcity/cache/packgraphics/pack.ts similarity index 100% rename from src/lostcity/tools/client/models/pack.ts rename to src/lostcity/cache/packgraphics/pack.ts diff --git a/src/lostcity/tools/client/models/reorg.ts b/src/lostcity/cache/packgraphics/reorg.ts similarity index 100% rename from src/lostcity/tools/client/models/reorg.ts rename to src/lostcity/cache/packgraphics/reorg.ts diff --git a/src/lostcity/tools/client/models/unpack.ts b/src/lostcity/cache/packgraphics/unpack.ts similarity index 98% rename from src/lostcity/tools/client/models/unpack.ts rename to src/lostcity/cache/packgraphics/unpack.ts index 26e2dde69..207c4abfc 100644 --- a/src/lostcity/tools/client/models/unpack.ts +++ b/src/lostcity/cache/packgraphics/unpack.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Jagfile from '#jagex2/io/Jagfile.js'; import Packet from '#jagex2/io/Packet.js'; -import Model from '#lostcity/tools/client/models/Model.js'; +import Model from '#lostcity/cache/graphics/Model.js'; const models = Jagfile.load('data/client/models'); diff --git a/src/lostcity/tools/packinterface/PackClient.ts b/src/lostcity/cache/packinterface/PackClient.ts similarity index 100% rename from src/lostcity/tools/packinterface/PackClient.ts rename to src/lostcity/cache/packinterface/PackClient.ts diff --git a/src/lostcity/tools/packinterface/PackServer.ts b/src/lostcity/cache/packinterface/PackServer.ts similarity index 100% rename from src/lostcity/tools/packinterface/PackServer.ts rename to src/lostcity/cache/packinterface/PackServer.ts diff --git a/src/lostcity/tools/packinterface/PackShared.ts b/src/lostcity/cache/packinterface/PackShared.ts similarity index 100% rename from src/lostcity/tools/packinterface/PackShared.ts rename to src/lostcity/cache/packinterface/PackShared.ts diff --git a/src/lostcity/tools/packinterface/Unpack.ts b/src/lostcity/cache/packinterface/Unpack.ts similarity index 100% rename from src/lostcity/tools/packinterface/Unpack.ts rename to src/lostcity/cache/packinterface/Unpack.ts diff --git a/src/lostcity/tools/packmap/PackClient.js b/src/lostcity/cache/packmap/PackClient.js similarity index 100% rename from src/lostcity/tools/packmap/PackClient.js rename to src/lostcity/cache/packmap/PackClient.js diff --git a/src/lostcity/tools/packmap/PackServer.js b/src/lostcity/cache/packmap/PackServer.js similarity index 100% rename from src/lostcity/tools/packmap/PackServer.js rename to src/lostcity/cache/packmap/PackServer.js diff --git a/src/lostcity/tools/packmap/Unpack.ts b/src/lostcity/cache/packmap/Unpack.ts similarity index 100% rename from src/lostcity/tools/packmap/Unpack.ts rename to src/lostcity/cache/packmap/Unpack.ts diff --git a/src/lostcity/tools/packmap/Worldmap.ts b/src/lostcity/cache/packmap/Worldmap.ts similarity index 99% rename from src/lostcity/tools/packmap/Worldmap.ts rename to src/lostcity/cache/packmap/Worldmap.ts index b99f20ed3..5b26169d1 100644 --- a/src/lostcity/tools/packmap/Worldmap.ts +++ b/src/lostcity/cache/packmap/Worldmap.ts @@ -3,12 +3,12 @@ import fs from 'fs'; import Jagfile from '#jagex2/io/Jagfile.js'; import Packet from '#jagex2/io/Packet.js'; -import FloType from '#lostcity/cache/FloType.js'; -import LocType from '#lostcity/cache/LocType.js'; +import FloType from '#lostcity/cache/config/FloType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; import { convertImage } from '#lostcity/util/PixPack.js'; import { LocShape } from '@2004scape/rsmod-pathfinder'; import { shouldBuildFile, shouldBuildFileAny } from '#lostcity/util/PackFile.js'; -import NpcType from '#lostcity/cache/NpcType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; function packWater(underlay: Packet, overlay: Packet, mx: number, mz: number) { underlay.p1(mx); diff --git a/src/lostcity/tools/client/music/pack.ts b/src/lostcity/cache/packmidi/pack.ts similarity index 100% rename from src/lostcity/tools/client/music/pack.ts rename to src/lostcity/cache/packmidi/pack.ts diff --git a/src/lostcity/tools/client/sounds/pack.ts b/src/lostcity/cache/packsound/pack.ts similarity index 100% rename from src/lostcity/tools/client/sounds/pack.ts rename to src/lostcity/cache/packsound/pack.ts diff --git a/src/lostcity/tools/client/sounds/reorg.ts b/src/lostcity/cache/packsound/reorg.ts similarity index 100% rename from src/lostcity/tools/client/sounds/reorg.ts rename to src/lostcity/cache/packsound/reorg.ts diff --git a/src/lostcity/tools/client/sounds/unpack.ts b/src/lostcity/cache/packsound/unpack.ts similarity index 100% rename from src/lostcity/tools/client/sounds/unpack.ts rename to src/lostcity/cache/packsound/unpack.ts diff --git a/src/lostcity/tools/client/media/pack.ts b/src/lostcity/cache/packsprite/media/pack.ts similarity index 100% rename from src/lostcity/tools/client/media/pack.ts rename to src/lostcity/cache/packsprite/media/pack.ts diff --git a/src/lostcity/tools/client/textures/pack.ts b/src/lostcity/cache/packsprite/textures/pack.ts similarity index 100% rename from src/lostcity/tools/client/textures/pack.ts rename to src/lostcity/cache/packsprite/textures/pack.ts diff --git a/src/lostcity/tools/client/title/pack.ts b/src/lostcity/cache/packsprite/title/pack.ts similarity index 100% rename from src/lostcity/tools/client/title/pack.ts rename to src/lostcity/cache/packsprite/title/pack.ts diff --git a/src/lostcity/tools/pack/symbols.ts b/src/lostcity/cache/symbols.ts similarity index 96% rename from src/lostcity/tools/pack/symbols.ts rename to src/lostcity/cache/symbols.ts index dabcac3e6..6c1781d8c 100644 --- a/src/lostcity/tools/pack/symbols.ts +++ b/src/lostcity/cache/symbols.ts @@ -1,15 +1,15 @@ import fs from 'fs'; import { loadDir, loadPack } from '#lostcity/util/NameMap.js'; -import ParamType from '#lostcity/cache/ParamType.js'; -import DbTableType from '#lostcity/cache/DbTableType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; -import VarNpcType from '#lostcity/cache/VarNpcType.js'; -import VarSharedType from '#lostcity/cache/VarSharedType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; +import VarNpcType from '#lostcity/cache/config/VarNpcType.js'; +import VarSharedType from '#lostcity/cache/config/VarSharedType.js'; import ScriptOpcodePointers from '#lostcity/engine/script/ScriptOpcodePointers.js'; -import Component from '#lostcity/cache/Component.js'; -import InvType from '#lostcity/cache/InvType.js'; +import Component from '#lostcity/cache/config/Component.js'; +import InvType from '#lostcity/cache/config/InvType.js'; export function generateServerSymbols() { fs.mkdirSync('data/symbols', { recursive: true }); diff --git a/src/lostcity/cache/WordEnc.test.ts b/src/lostcity/cache/wordenc/WordEnc.test.ts similarity index 98% rename from src/lostcity/cache/WordEnc.test.ts rename to src/lostcity/cache/wordenc/WordEnc.test.ts index b9983d216..e92a9f50f 100644 --- a/src/lostcity/cache/WordEnc.test.ts +++ b/src/lostcity/cache/wordenc/WordEnc.test.ts @@ -2,9 +2,9 @@ import Packet from '#jagex2/io/Packet.js'; import fs from 'fs'; -import WordEnc from '#lostcity/cache/WordEnc.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; import WordPack from '#jagex2/wordenc/WordPack.js'; -import { packClientWordenc } from '#lostcity/tools/client/wordenc/pack.js'; +import { packClientWordenc } from '#lostcity/cache/packchat/pack.js'; /** * TODO: Remove race condition in how files are written to data/pack/client/wordenc diff --git a/src/lostcity/cache/WordEnc.ts b/src/lostcity/cache/wordenc/WordEnc.ts similarity index 97% rename from src/lostcity/cache/WordEnc.ts rename to src/lostcity/cache/wordenc/WordEnc.ts index d1d66af2d..498d0f357 100644 --- a/src/lostcity/cache/WordEnc.ts +++ b/src/lostcity/cache/wordenc/WordEnc.ts @@ -2,10 +2,10 @@ import fs from 'fs'; import Jagfile from '#jagex2/io/Jagfile.js'; -import WordEncFragments from '#lostcity/cache/WordEncFragments.js'; -import WordEncBadWords from '#lostcity/cache/WordEncBadWords.js'; -import WordEncDomains from '#lostcity/cache/WordEncDomains.js'; -import WordEncTlds from '#lostcity/cache/WordEncTlds.js'; +import WordEncFragments from '#lostcity/cache/wordenc/WordEncFragments.js'; +import WordEncBadWords from '#lostcity/cache/wordenc/WordEncBadWords.js'; +import WordEncDomains from '#lostcity/cache/wordenc/WordEncDomains.js'; +import WordEncTlds from '#lostcity/cache/wordenc/WordEncTlds.js'; import Packet from '#jagex2/io/Packet.js'; export default class WordEnc { diff --git a/src/lostcity/cache/WordEncBadWords.ts b/src/lostcity/cache/wordenc/WordEncBadWords.ts similarity index 99% rename from src/lostcity/cache/WordEncBadWords.ts rename to src/lostcity/cache/wordenc/WordEncBadWords.ts index 2f5341f84..4866fd494 100644 --- a/src/lostcity/cache/WordEncBadWords.ts +++ b/src/lostcity/cache/wordenc/WordEncBadWords.ts @@ -1,5 +1,5 @@ -import WordEnc from '#lostcity/cache/WordEnc.js'; -import WordEncFragments from '#lostcity/cache/WordEncFragments.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; +import WordEncFragments from '#lostcity/cache/wordenc/WordEncFragments.js'; export default class WordEncBadWords { private readonly wordEncFragments: WordEncFragments; diff --git a/src/lostcity/cache/WordEncDomains.ts b/src/lostcity/cache/wordenc/WordEncDomains.ts similarity index 96% rename from src/lostcity/cache/WordEncDomains.ts rename to src/lostcity/cache/wordenc/WordEncDomains.ts index 26c0eb30d..fc0607735 100644 --- a/src/lostcity/cache/WordEncDomains.ts +++ b/src/lostcity/cache/wordenc/WordEncDomains.ts @@ -1,5 +1,5 @@ -import WordEncBadWords from '#lostcity/cache/WordEncBadWords.js'; -import WordEnc from '#lostcity/cache/WordEnc.js'; +import WordEncBadWords from '#lostcity/cache/wordenc/WordEncBadWords.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; export default class WordEncDomains { private readonly wordEncBadWords: WordEncBadWords; diff --git a/src/lostcity/cache/WordEncFragments.ts b/src/lostcity/cache/wordenc/WordEncFragments.ts similarity index 98% rename from src/lostcity/cache/WordEncFragments.ts rename to src/lostcity/cache/wordenc/WordEncFragments.ts index 4fc6825cf..523cef7b7 100644 --- a/src/lostcity/cache/WordEncFragments.ts +++ b/src/lostcity/cache/wordenc/WordEncFragments.ts @@ -1,4 +1,4 @@ -import WordEnc from '#lostcity/cache/WordEnc.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; export default class WordEncFragments { readonly fragments: number[] = []; diff --git a/src/lostcity/cache/WordEncTlds.ts b/src/lostcity/cache/wordenc/WordEncTlds.ts similarity index 96% rename from src/lostcity/cache/WordEncTlds.ts rename to src/lostcity/cache/wordenc/WordEncTlds.ts index aefde381f..223f2715e 100644 --- a/src/lostcity/cache/WordEncTlds.ts +++ b/src/lostcity/cache/wordenc/WordEncTlds.ts @@ -1,6 +1,6 @@ -import WordEncBadWords from '#lostcity/cache/WordEncBadWords.js'; -import WordEncDomains from '#lostcity/cache/WordEncDomains.js'; -import WordEnc from '#lostcity/cache/WordEnc.js'; +import WordEncBadWords from '#lostcity/cache/wordenc/WordEncBadWords.js'; +import WordEncDomains from '#lostcity/cache/wordenc/WordEncDomains.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; export default class WordEncTlds { private readonly wordEncBadWords: WordEncBadWords; diff --git a/src/lostcity/engine/GameMap.ts b/src/lostcity/engine/GameMap.ts index b3772e076..c9480fbc3 100644 --- a/src/lostcity/engine/GameMap.ts +++ b/src/lostcity/engine/GameMap.ts @@ -2,7 +2,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; -import NpcType from '#lostcity/cache/NpcType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; import CollisionManager from '#lostcity/engine/collision/CollisionManager.js'; @@ -11,7 +11,7 @@ import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; import Npc from '#lostcity/entity/Npc.js'; import Obj from '#lostcity/entity/Obj.js'; import World from '#lostcity/engine/World.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; export default class GameMap { readonly collisionManager = new CollisionManager(); diff --git a/src/lostcity/engine/Inventory.ts b/src/lostcity/engine/Inventory.ts index 8374a0ac8..39c3c8784 100644 --- a/src/lostcity/engine/Inventory.ts +++ b/src/lostcity/engine/Inventory.ts @@ -1,5 +1,5 @@ -import InvType from '#lostcity/cache/InvType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; type Item = { id: number; count: number }; type TransactionResult = { slot: number; item: Item }; diff --git a/src/lostcity/engine/World.ts b/src/lostcity/engine/World.ts index 8a277abb3..8ec9c7bca 100644 --- a/src/lostcity/engine/World.ts +++ b/src/lostcity/engine/World.ts @@ -8,28 +8,28 @@ import Packet from '#jagex2/io/Packet.js'; import { toBase37 } from '#jagex2/jstring/JString.js'; -import CategoryType from '#lostcity/cache/CategoryType.js'; -import DbRowType from '#lostcity/cache/DbRowType.js'; -import DbTableType from '#lostcity/cache/DbTableType.js'; -import EnumType from '#lostcity/cache/EnumType.js'; -import FontType from '#lostcity/cache/FontType.js'; -import HuntType from '#lostcity/cache/HuntType.js'; -import IdkType from '#lostcity/cache/IdkType.js'; -import Component from '#lostcity/cache/Component.js'; -import InvType from '#lostcity/cache/InvType.js'; -import LocType from '#lostcity/cache/LocType.js'; -import MesanimType from '#lostcity/cache/MesanimType.js'; -import NpcType from '#lostcity/cache/NpcType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; -import ParamType from '#lostcity/cache/ParamType.js'; -import SeqFrame from '#lostcity/cache/SeqFrame.js'; -import SeqType from '#lostcity/cache/SeqType.js'; -import StructType from '#lostcity/cache/StructType.js'; -import VarNpcType from '#lostcity/cache/VarNpcType.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; -import VarSharedType from '#lostcity/cache/VarSharedType.js'; -import WordEnc from '#lostcity/cache/WordEnc.js'; -import SpotanimType from '#lostcity/cache/SpotanimType.js'; +import CategoryType from '#lostcity/cache/config/CategoryType.js'; +import DbRowType from '#lostcity/cache/config/DbRowType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; +import EnumType from '#lostcity/cache/config/EnumType.js'; +import FontType from '#lostcity/cache/config/FontType.js'; +import HuntType from '#lostcity/cache/config/HuntType.js'; +import IdkType from '#lostcity/cache/config/IdkType.js'; +import Component from '#lostcity/cache/config/Component.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; +import MesanimType from '#lostcity/cache/config/MesanimType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import SeqFrame from '#lostcity/cache/config/SeqFrame.js'; +import SeqType from '#lostcity/cache/config/SeqType.js'; +import StructType from '#lostcity/cache/config/StructType.js'; +import VarNpcType from '#lostcity/cache/config/VarNpcType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; +import VarSharedType from '#lostcity/cache/config/VarSharedType.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; +import SpotanimType from '#lostcity/cache/config/SpotanimType.js'; import GameMap from '#lostcity/engine/GameMap.js'; import { Inventory } from '#lostcity/engine/Inventory.js'; @@ -303,7 +303,7 @@ class World { } startDevWatcher() { - this.devThread = createWorker('./src/lostcity/tools/pack/pack.ts'); + this.devThread = createWorker('./src/lostcity/cache/pack.ts'); this.devThread.on('message', msg => { if (msg.type === 'done') { @@ -354,7 +354,7 @@ class World { this.broadcastMes('Rebuilding, please wait...'); if (!this.devThread) { - this.devThread = createWorker('./src/lostcity/tools/pack/pack.ts'); + this.devThread = createWorker('./src/lostcity/cache/pack.ts'); } this.devThread.postMessage({ diff --git a/src/lostcity/engine/collision/CollisionManager.ts b/src/lostcity/engine/collision/CollisionManager.ts index 3b5e1fdfd..5d28389f6 100644 --- a/src/lostcity/engine/collision/CollisionManager.ts +++ b/src/lostcity/engine/collision/CollisionManager.ts @@ -3,7 +3,7 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; -import LocType from '#lostcity/cache/LocType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; import Loc from '#lostcity/entity/Loc.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; diff --git a/src/lostcity/engine/script/ScriptIterators.ts b/src/lostcity/engine/script/ScriptIterators.ts index 08b81ed20..986865570 100644 --- a/src/lostcity/engine/script/ScriptIterators.ts +++ b/src/lostcity/engine/script/ScriptIterators.ts @@ -4,7 +4,7 @@ import Loc from '#lostcity/entity/Loc.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; import Player from '#lostcity/entity/Player.js'; import Npc from '#lostcity/entity/Npc.js'; -import NpcType from '#lostcity/cache/NpcType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; import NpcIteratorType from '#lostcity/entity/NpcIteratorType.js'; import Entity from '#lostcity/entity/Entity.js'; diff --git a/src/lostcity/engine/script/ScriptState.ts b/src/lostcity/engine/script/ScriptState.ts index f3bf4a546..8cbd44d5d 100644 --- a/src/lostcity/engine/script/ScriptState.ts +++ b/src/lostcity/engine/script/ScriptState.ts @@ -1,4 +1,4 @@ -import DbTableType from '#lostcity/cache/DbTableType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; import Script from '#lostcity/engine/script/Script.js'; import ScriptPointer from '#lostcity/engine/script/ScriptPointer.js'; diff --git a/src/lostcity/engine/script/ScriptValidators.ts b/src/lostcity/engine/script/ScriptValidators.ts index c67345515..c331af22d 100644 --- a/src/lostcity/engine/script/ScriptValidators.ts +++ b/src/lostcity/engine/script/ScriptValidators.ts @@ -1,28 +1,28 @@ -import LocType from '#lostcity/cache/LocType.js'; -import ParamType from '#lostcity/cache/ParamType.js'; -import NpcType from '#lostcity/cache/NpcType.js'; -import HuntType from '#lostcity/cache/HuntType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import HuntType from '#lostcity/cache/config/HuntType.js'; import NpcMode from '#lostcity/entity/NpcMode.js'; -import SpotanimType from '#lostcity/cache/SpotanimType.js'; -import EnumType from '#lostcity/cache/EnumType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import SpotanimType from '#lostcity/cache/config/SpotanimType.js'; +import EnumType from '#lostcity/cache/config/EnumType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import {Inventory} from '#lostcity/engine/Inventory.js'; -import InvType from '#lostcity/cache/InvType.js'; -import CategoryType from '#lostcity/cache/CategoryType.js'; -import IdkType from '#lostcity/cache/IdkType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import CategoryType from '#lostcity/cache/config/CategoryType.js'; +import IdkType from '#lostcity/cache/config/IdkType.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; import {LocAngle, LocShape} from '@2004scape/rsmod-pathfinder'; import {Position} from '#lostcity/entity/Position.js'; -import {ConfigType} from '#lostcity/cache/ConfigType.js'; -import SeqType from '#lostcity/cache/SeqType.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; -import VarNpcType from '#lostcity/cache/VarNpcType.js'; -import VarSharedType from '#lostcity/cache/VarSharedType.js'; -import FontType from '#lostcity/cache/FontType.js'; -import MesanimType from '#lostcity/cache/MesanimType.js'; -import StructType from '#lostcity/cache/StructType.js'; -import DbRowType from '#lostcity/cache/DbRowType.js'; -import DbTableType from '#lostcity/cache/DbTableType.js'; +import {ConfigType} from '#lostcity/cache/config/ConfigType.js'; +import SeqType from '#lostcity/cache/config/SeqType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; +import VarNpcType from '#lostcity/cache/config/VarNpcType.js'; +import VarSharedType from '#lostcity/cache/config/VarSharedType.js'; +import FontType from '#lostcity/cache/config/FontType.js'; +import MesanimType from '#lostcity/cache/config/MesanimType.js'; +import StructType from '#lostcity/cache/config/StructType.js'; +import DbRowType from '#lostcity/cache/config/DbRowType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; interface ScriptValidator { validate(input: T): R; diff --git a/src/lostcity/engine/script/handlers/CoreOps.ts b/src/lostcity/engine/script/handlers/CoreOps.ts index 06ef65e5f..aed091825 100644 --- a/src/lostcity/engine/script/handlers/CoreOps.ts +++ b/src/lostcity/engine/script/handlers/CoreOps.ts @@ -1,7 +1,7 @@ -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; -import VarNpcType from '#lostcity/cache/VarNpcType.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; -import VarSharedType from '#lostcity/cache/VarSharedType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; +import VarNpcType from '#lostcity/cache/config/VarNpcType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; +import VarSharedType from '#lostcity/cache/config/VarSharedType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/engine/script/handlers/DbOps.ts b/src/lostcity/engine/script/handlers/DbOps.ts index 19a55e3c0..748e977ce 100644 --- a/src/lostcity/engine/script/handlers/DbOps.ts +++ b/src/lostcity/engine/script/handlers/DbOps.ts @@ -1,6 +1,6 @@ -import DbRowType from '#lostcity/cache/DbRowType.js'; -import DbTableType from '#lostcity/cache/DbTableType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import DbRowType from '#lostcity/cache/config/DbRowType.js'; +import DbTableType from '#lostcity/cache/config/DbTableType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/engine/script/handlers/EnumOps.ts b/src/lostcity/engine/script/handlers/EnumOps.ts index ec93b6a9f..97920976d 100644 --- a/src/lostcity/engine/script/handlers/EnumOps.ts +++ b/src/lostcity/engine/script/handlers/EnumOps.ts @@ -1,4 +1,4 @@ -import EnumType from '#lostcity/cache/EnumType.js'; +import EnumType from '#lostcity/cache/config/EnumType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/engine/script/handlers/InvOps.ts b/src/lostcity/engine/script/handlers/InvOps.ts index b19c6c962..ac391982f 100644 --- a/src/lostcity/engine/script/handlers/InvOps.ts +++ b/src/lostcity/engine/script/handlers/InvOps.ts @@ -1,6 +1,6 @@ -import InvType from '#lostcity/cache/InvType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; -import CategoryType from '#lostcity/cache/CategoryType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; +import CategoryType from '#lostcity/cache/config/CategoryType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/engine/script/handlers/LocConfigOps.ts b/src/lostcity/engine/script/handlers/LocConfigOps.ts index 38e781054..c43878562 100644 --- a/src/lostcity/engine/script/handlers/LocConfigOps.ts +++ b/src/lostcity/engine/script/handlers/LocConfigOps.ts @@ -1,6 +1,6 @@ -import LocType from '#lostcity/cache/LocType.js'; -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; -import ParamType from '#lostcity/cache/ParamType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/engine/script/handlers/LocOps.ts b/src/lostcity/engine/script/handlers/LocOps.ts index 4f267ecd8..bb99d8bf7 100644 --- a/src/lostcity/engine/script/handlers/LocOps.ts +++ b/src/lostcity/engine/script/handlers/LocOps.ts @@ -1,7 +1,7 @@ -import ParamType from '#lostcity/cache/ParamType.js'; -import LocType from '#lostcity/cache/LocType.js'; -import SeqType from '#lostcity/cache/SeqType.js'; -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; +import SeqType from '#lostcity/cache/config/SeqType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/engine/script/handlers/NpcConfigOps.ts b/src/lostcity/engine/script/handlers/NpcConfigOps.ts index af4faa7ae..bb3545dc2 100644 --- a/src/lostcity/engine/script/handlers/NpcConfigOps.ts +++ b/src/lostcity/engine/script/handlers/NpcConfigOps.ts @@ -1,6 +1,6 @@ -import NpcType from '#lostcity/cache/NpcType.js'; -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; -import ParamType from '#lostcity/cache/ParamType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index 5c24bd74a..c78e4fe09 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -1,7 +1,7 @@ -import ParamType from '#lostcity/cache/ParamType.js'; -import NpcType from '#lostcity/cache/NpcType.js'; -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; -import SpotanimType from '#lostcity/cache/SpotanimType.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; +import SpotanimType from '#lostcity/cache/config/SpotanimType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/engine/script/handlers/ObjConfigOps.ts b/src/lostcity/engine/script/handlers/ObjConfigOps.ts index d58c854bb..8107b6f27 100644 --- a/src/lostcity/engine/script/handlers/ObjConfigOps.ts +++ b/src/lostcity/engine/script/handlers/ObjConfigOps.ts @@ -1,6 +1,6 @@ -import ObjType from '#lostcity/cache/ObjType.js'; -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; -import ParamType from '#lostcity/cache/ParamType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/engine/script/handlers/ObjOps.ts b/src/lostcity/engine/script/handlers/ObjOps.ts index 76ea348ec..5f981ebcc 100644 --- a/src/lostcity/engine/script/handlers/ObjOps.ts +++ b/src/lostcity/engine/script/handlers/ObjOps.ts @@ -1,7 +1,7 @@ -import InvType from '#lostcity/cache/InvType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; -import ParamType from '#lostcity/cache/ParamType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 72c70e3a6..4f28d8294 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -1,5 +1,5 @@ -import IdkType from '#lostcity/cache/IdkType.js'; -import SpotanimType from '#lostcity/cache/SpotanimType.js'; +import IdkType from '#lostcity/cache/config/IdkType.js'; +import SpotanimType from '#lostcity/cache/config/SpotanimType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index ca507435c..de979ddeb 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -1,8 +1,8 @@ -import { ParamHelper } from '#lostcity/cache/ParamHelper.js'; -import ParamType from '#lostcity/cache/ParamType.js'; -import StructType from '#lostcity/cache/StructType.js'; -import SpotanimType from '#lostcity/cache/SpotanimType.js'; -import MesanimType from '#lostcity/cache/MesanimType.js'; +import { ParamHelper } from '#lostcity/cache/config/ParamHelper.js'; +import ParamType from '#lostcity/cache/config/ParamType.js'; +import StructType from '#lostcity/cache/config/StructType.js'; +import SpotanimType from '#lostcity/cache/config/SpotanimType.js'; +import MesanimType from '#lostcity/cache/config/MesanimType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/entity/Npc.ts b/src/lostcity/entity/Npc.ts index 9a56b6a4a..e827be4b2 100644 --- a/src/lostcity/entity/Npc.ts +++ b/src/lostcity/entity/Npc.ts @@ -1,7 +1,7 @@ import Packet from '#jagex2/io/Packet.js'; -import NpcType from '#lostcity/cache/NpcType.js'; -import VarNpcType from '#lostcity/cache/VarNpcType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import VarNpcType from '#lostcity/cache/config/VarNpcType.js'; import World from '#lostcity/engine/World.js'; @@ -21,13 +21,13 @@ import Obj from '#lostcity/entity/Obj.js'; import PathingEntity from '#lostcity/entity/PathingEntity.js'; import Player from '#lostcity/entity/Player.js'; import {Direction, Position} from '#lostcity/entity/Position.js'; -import HuntType from '#lostcity/cache/HuntType.js'; +import HuntType from '#lostcity/cache/config/HuntType.js'; import HuntModeType from '#lostcity/entity/hunt/HuntModeType.js'; import HuntCheckNotTooStrong from '#lostcity/entity/hunt/HuntCheckNotTooStrong.js'; import LinkList from '#jagex2/datastruct/LinkList.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import {HuntIterator} from '#lostcity/engine/script/ScriptIterators.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import Entity from '#lostcity/entity/Entity.js'; diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 0f970f5f0..00565e070 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -11,7 +11,7 @@ import MoveRestrict from '#lostcity/entity/MoveRestrict.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import { Direction, Position } from '#lostcity/entity/Position.js'; -import LocType from '#lostcity/cache/LocType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index 532ca17d2..fecd9b156 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -3,15 +3,15 @@ import 'dotenv/config'; import Packet from '#jagex2/io/Packet.js'; import {fromBase37, toDisplayName} from '#jagex2/jstring/JString.js'; -import FontType from '#lostcity/cache/FontType.js'; -import Component from '#lostcity/cache/Component.js'; -import InvType from '#lostcity/cache/InvType.js'; -import LocType from '#lostcity/cache/LocType.js'; -import NpcType from '#lostcity/cache/NpcType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; -import SeqType from '#lostcity/cache/SeqType.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; +import FontType from '#lostcity/cache/config/FontType.js'; +import Component from '#lostcity/cache/config/Component.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; +import SeqType from '#lostcity/cache/config/SeqType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; import BlockWalk from '#lostcity/entity/BlockWalk.js'; import Entity from '#lostcity/entity/Entity.js'; diff --git a/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts b/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts index 4c983ba07..6768032fd 100644 --- a/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts +++ b/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts @@ -2,23 +2,23 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js import Player from '#lostcity/entity/Player.js'; import ClientCheat from '#lostcity/network/incoming/model/ClientCheat.js'; import Environment from '#lostcity/util/Environment.js'; -import InvType from '#lostcity/cache/InvType.js'; -import IdkType from '#lostcity/cache/IdkType.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import IdkType from '#lostcity/cache/config/IdkType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import World from '#lostcity/engine/World.js'; -import LocType from '#lostcity/cache/LocType.js'; -import NpcType from '#lostcity/cache/NpcType.js'; -import Component from '#lostcity/cache/Component.js'; -import SeqType from '#lostcity/cache/SeqType.js'; -import SpotanimType from '#lostcity/cache/SpotanimType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; +import Component from '#lostcity/cache/config/Component.js'; +import SeqType from '#lostcity/cache/config/SeqType.js'; +import SpotanimType from '#lostcity/cache/config/SpotanimType.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import { CollisionFlag, findPath, isFlagged } from '@2004scape/rsmod-pathfinder'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { toBase37 } from '#jagex2/jstring/JString.js'; import NullClientSocket from '#lostcity/server/NullClientSocket.js'; import { tryParseInt } from '#lostcity/util/TryParse.js'; -import ScriptVarType from '#lostcity/cache/ScriptVarType.js'; +import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import { Position } from '#lostcity/entity/Position.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/network/225/incoming/handler/IfButtonHandler.ts b/src/lostcity/network/225/incoming/handler/IfButtonHandler.ts index b0c01ac43..69e0973d0 100644 --- a/src/lostcity/network/225/incoming/handler/IfButtonHandler.ts +++ b/src/lostcity/network/225/incoming/handler/IfButtonHandler.ts @@ -1,7 +1,7 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import Player from '#lostcity/entity/Player.js'; import IfButton from '#lostcity/network/incoming/model/IfButton.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; import Environment from '#lostcity/util/Environment.js'; diff --git a/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts b/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts index 57edcaeb2..2d2159632 100644 --- a/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts +++ b/src/lostcity/network/225/incoming/handler/IfPlayerDesignHandler.ts @@ -1,8 +1,8 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import Player from '#lostcity/entity/Player.js'; import IfPlayerDesign from '#lostcity/network/incoming/model/IfPlayerDesign.js'; -import IdkType from '#lostcity/cache/IdkType.js'; -import InvType from '#lostcity/cache/InvType.js'; +import IdkType from '#lostcity/cache/config/IdkType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; export default class IfPlayerDesignHandler extends MessageHandler { handle(message: IfPlayerDesign, player: Player): boolean { diff --git a/src/lostcity/network/225/incoming/handler/InvButtonDHandler.ts b/src/lostcity/network/225/incoming/handler/InvButtonDHandler.ts index a6811266d..fe23698a8 100644 --- a/src/lostcity/network/225/incoming/handler/InvButtonDHandler.ts +++ b/src/lostcity/network/225/incoming/handler/InvButtonDHandler.ts @@ -1,7 +1,7 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import Player from '#lostcity/entity/Player.js'; import InvButtonD from '#lostcity/network/incoming/model/InvButtonD.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import Environment from '#lostcity/util/Environment.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; diff --git a/src/lostcity/network/225/incoming/handler/InvButtonHandler.ts b/src/lostcity/network/225/incoming/handler/InvButtonHandler.ts index 8ec0593b3..b68841871 100644 --- a/src/lostcity/network/225/incoming/handler/InvButtonHandler.ts +++ b/src/lostcity/network/225/incoming/handler/InvButtonHandler.ts @@ -1,4 +1,4 @@ -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; diff --git a/src/lostcity/network/225/incoming/handler/MessagePublicHandler.ts b/src/lostcity/network/225/incoming/handler/MessagePublicHandler.ts index 3abcbb814..a238b140b 100644 --- a/src/lostcity/network/225/incoming/handler/MessagePublicHandler.ts +++ b/src/lostcity/network/225/incoming/handler/MessagePublicHandler.ts @@ -3,7 +3,7 @@ import Player from '#lostcity/entity/Player.js'; import MessagePublic from '#lostcity/network/incoming/model/MessagePublic.js'; import Packet from '#jagex2/io/Packet.js'; import WordPack from '#jagex2/wordenc/WordPack.js'; -import WordEnc from '#lostcity/cache/WordEnc.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; export default class MessagePublicHandler extends MessageHandler { handle(message: MessagePublic, player: Player): boolean { diff --git a/src/lostcity/network/225/incoming/handler/MoveClickHandler.ts b/src/lostcity/network/225/incoming/handler/MoveClickHandler.ts index 6755e9154..c0334a67d 100644 --- a/src/lostcity/network/225/incoming/handler/MoveClickHandler.ts +++ b/src/lostcity/network/225/incoming/handler/MoveClickHandler.ts @@ -3,7 +3,7 @@ import MoveClick from '#lostcity/network/incoming/model/MoveClick.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { Position } from '#lostcity/entity/Position.js'; import Environment from '#lostcity/util/Environment.js'; -import VarPlayerType from '#lostcity/cache/VarPlayerType.js'; +import VarPlayerType from '#lostcity/cache/config/VarPlayerType.js'; export default class MoveClickHandler extends MessageHandler { handle(message: MoveClick, player: NetworkPlayer): boolean { diff --git a/src/lostcity/network/225/incoming/handler/OpHeldHandler.ts b/src/lostcity/network/225/incoming/handler/OpHeldHandler.ts index 981d85693..16c2eb7b0 100644 --- a/src/lostcity/network/225/incoming/handler/OpHeldHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpHeldHandler.ts @@ -1,11 +1,11 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import Player from '#lostcity/entity/Player.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; import Environment from '#lostcity/util/Environment.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import OpHeld from '#lostcity/network/incoming/model/OpHeld.js'; export default class OpHeldHandler extends MessageHandler { diff --git a/src/lostcity/network/225/incoming/handler/OpHeldTHandler.ts b/src/lostcity/network/225/incoming/handler/OpHeldTHandler.ts index 6f381427a..85a13df36 100644 --- a/src/lostcity/network/225/incoming/handler/OpHeldTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpHeldTHandler.ts @@ -4,7 +4,7 @@ import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; import Environment from '#lostcity/util/Environment.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import OpHeldT from '#lostcity/network/incoming/model/OpHeldT.js'; export default class OpHeldTHandler extends MessageHandler { diff --git a/src/lostcity/network/225/incoming/handler/OpHeldUHandler.ts b/src/lostcity/network/225/incoming/handler/OpHeldUHandler.ts index 840edcd6a..5dade6bf3 100644 --- a/src/lostcity/network/225/incoming/handler/OpHeldUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpHeldUHandler.ts @@ -1,12 +1,12 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import Player from '#lostcity/entity/Player.js'; import OpHeldU from '#lostcity/network/incoming/model/OpHeldU.js'; -import Component from '#lostcity/cache/Component.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import Component from '#lostcity/cache/config/Component.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import World from '#lostcity/engine/World.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; -import CategoryType from '#lostcity/cache/CategoryType.js'; +import CategoryType from '#lostcity/cache/config/CategoryType.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; import Environment from '#lostcity/util/Environment.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpLocHandler.ts b/src/lostcity/network/225/incoming/handler/OpLocHandler.ts index 6acdfda4a..6bba367e6 100644 --- a/src/lostcity/network/225/incoming/handler/OpLocHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpLocHandler.ts @@ -1,7 +1,7 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import OpLoc from '#lostcity/network/incoming/model/OpLoc.js'; import World from '#lostcity/engine/World.js'; -import LocType from '#lostcity/cache/LocType.js'; +import LocType from '#lostcity/cache/config/LocType.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import Interaction from '#lostcity/entity/Interaction.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts b/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts index cde0dc927..700c828eb 100644 --- a/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts @@ -1,6 +1,6 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import OpLocT from '#lostcity/network/incoming/model/OpLocT.js'; import World from '#lostcity/engine/World.js'; import Interaction from '#lostcity/entity/Interaction.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts b/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts index aec7975bb..b5fcd1805 100644 --- a/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts @@ -2,8 +2,8 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js import World from '#lostcity/engine/World.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import OpLocU from '#lostcity/network/incoming/model/OpLocU.js'; -import Component from '#lostcity/cache/Component.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import Component from '#lostcity/cache/config/Component.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts b/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts index 13d792478..5eb33ffac 100644 --- a/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts @@ -1,5 +1,5 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; -import NpcType from '#lostcity/cache/NpcType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import Interaction from '#lostcity/entity/Interaction.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts b/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts index d9885ae79..bb5508d64 100644 --- a/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts @@ -1,5 +1,5 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import OpNpcT from '#lostcity/network/incoming/model/OpNpcT.js'; import World from '#lostcity/engine/World.js'; import Interaction from '#lostcity/entity/Interaction.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts b/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts index 070d3a56e..d839cd047 100644 --- a/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts @@ -1,8 +1,8 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import OpNpcU from '#lostcity/network/incoming/model/OpNpcU.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import World from '#lostcity/engine/World.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpObjHandler.ts b/src/lostcity/network/225/incoming/handler/OpObjHandler.ts index b92395010..65c1f83bd 100644 --- a/src/lostcity/network/225/incoming/handler/OpObjHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpObjHandler.ts @@ -1,5 +1,5 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import World from '#lostcity/engine/World.js'; import OpObj from '#lostcity/network/incoming/model/OpObj.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts b/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts index 64743f33e..b02435636 100644 --- a/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts @@ -1,6 +1,6 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import OpObjT from '#lostcity/network/incoming/model/OpObjT.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import World from '#lostcity/engine/World.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts b/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts index d2cdce818..fdeef62a7 100644 --- a/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts @@ -1,8 +1,8 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import OpObjU from '#lostcity/network/incoming/model/OpObjU.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import World from '#lostcity/engine/World.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts b/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts index 3a0d106fc..4027c4d66 100644 --- a/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts @@ -1,6 +1,6 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import OpPlayerT from '#lostcity/network/incoming/model/OpPlayerT.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; import World from '#lostcity/engine/World.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; diff --git a/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts b/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts index 855ab6820..fa16cc5eb 100644 --- a/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts @@ -1,11 +1,11 @@ import MessageHandler from '#lostcity/network/incoming/handler/MessageHandler.js'; import World from '#lostcity/engine/World.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import Interaction from '#lostcity/entity/Interaction.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import OpPlayerU from '#lostcity/network/incoming/model/OpPlayerU.js'; -import Component from '#lostcity/cache/Component.js'; +import Component from '#lostcity/cache/config/Component.js'; export default class OpPlayerUHandler extends MessageHandler { handle(message: OpPlayerU, player: NetworkPlayer): boolean { diff --git a/src/lostcity/server/ServerProt.ts b/src/lostcity/server/ServerProt.ts index 25cf1d0e6..f99cc6343 100644 --- a/src/lostcity/server/ServerProt.ts +++ b/src/lostcity/server/ServerProt.ts @@ -2,8 +2,8 @@ import Packet from '#jagex2/io/Packet.js'; import WordPack from '#jagex2/wordenc/WordPack.js'; -import Component from '#lostcity/cache/Component.js'; -import WordEnc from '#lostcity/cache/WordEnc.js'; +import Component from '#lostcity/cache/config/Component.js'; +import WordEnc from '#lostcity/cache/wordenc/WordEnc.js'; import { Inventory } from '#lostcity/engine/Inventory.js'; diff --git a/src/lostcity/tools/common/cacheRename.ts b/src/lostcity/tools/cache/cacheRename.ts similarity index 100% rename from src/lostcity/tools/common/cacheRename.ts rename to src/lostcity/tools/cache/cacheRename.ts diff --git a/src/lostcity/tools/client/clean.ts b/src/lostcity/tools/cache/cleanClient.ts similarity index 100% rename from src/lostcity/tools/client/clean.ts rename to src/lostcity/tools/cache/cleanClient.ts diff --git a/src/lostcity/tools/server/clean.ts b/src/lostcity/tools/cache/cleanServer.ts similarity index 100% rename from src/lostcity/tools/server/clean.ts rename to src/lostcity/tools/cache/cleanServer.ts diff --git a/src/lostcity/tools/common/jagCompare.ts b/src/lostcity/tools/cache/jagCompare.ts similarity index 100% rename from src/lostcity/tools/common/jagCompare.ts rename to src/lostcity/tools/cache/jagCompare.ts diff --git a/src/lostcity/tools/common/jagList.ts b/src/lostcity/tools/cache/jagList.ts similarity index 100% rename from src/lostcity/tools/common/jagList.ts rename to src/lostcity/tools/cache/jagList.ts diff --git a/src/lostcity/tools/common/jagUnpack.ts b/src/lostcity/tools/cache/jagUnpack.ts similarity index 100% rename from src/lostcity/tools/common/jagUnpack.ts rename to src/lostcity/tools/cache/jagUnpack.ts diff --git a/src/lostcity/tools/packmap/ImportNpcCsv.ts b/src/lostcity/tools/map/ImportNpcCsv.ts similarity index 100% rename from src/lostcity/tools/packmap/ImportNpcCsv.ts rename to src/lostcity/tools/map/ImportNpcCsv.ts diff --git a/src/lostcity/tools/packmap/ImportObjCsv.ts b/src/lostcity/tools/map/ImportObjCsv.ts similarity index 100% rename from src/lostcity/tools/packmap/ImportObjCsv.ts rename to src/lostcity/tools/map/ImportObjCsv.ts diff --git a/src/lostcity/tools/client/packet/npcInfo.ts b/src/lostcity/tools/packet/npcInfo.ts similarity index 100% rename from src/lostcity/tools/client/packet/npcInfo.ts rename to src/lostcity/tools/packet/npcInfo.ts diff --git a/src/lostcity/tools/client/packet/playerInfo.ts b/src/lostcity/tools/packet/playerInfo.ts similarity index 100% rename from src/lostcity/tools/client/packet/playerInfo.ts rename to src/lostcity/tools/packet/playerInfo.ts diff --git a/src/lostcity/tools/server/drops.ts b/src/lostcity/tools/server/drops.ts index f4818d44a..4e00ab23e 100644 --- a/src/lostcity/tools/server/drops.ts +++ b/src/lostcity/tools/server/drops.ts @@ -1,14 +1,14 @@ import fs from 'fs'; -import InvType from '#lostcity/cache/InvType.js'; -import NpcType from '#lostcity/cache/NpcType.js'; +import InvType from '#lostcity/cache/config/InvType.js'; +import NpcType from '#lostcity/cache/config/NpcType.js'; import World from '#lostcity/engine/World.js'; import ScriptProvider from '#lostcity/engine/script/ScriptProvider.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import Npc from '#lostcity/entity/Npc.js'; import { PlayerLoading } from '#lostcity/entity/PlayerLoading.js'; -import ObjType from '#lostcity/cache/ObjType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import Environment from '#lostcity/util/Environment.js'; diff --git a/src/lostcity/tools/server/update-names.ts b/src/lostcity/tools/server/update-names.ts deleted file mode 100644 index 87272b8c2..000000000 --- a/src/lostcity/tools/server/update-names.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { loadDir } from '#lostcity/util/NameMap.js'; -import fs from 'fs'; - -const older: string[] = []; -fs.readFileSync('data/src/pack/obj.pack', 'ascii') - .replace(/\r/g, '') - .split('\n') - .filter(x => x) - .map(line => line.split('=')) - .forEach(([id, name]) => (older[id as unknown as number] = name)); - -const newer: string[] = []; -fs.readFileSync('item-debugnames-guesses.txt', 'ascii') - .replace(/\r/g, '') - .split('\n') - .filter(x => x) - .map(line => line.split('=')) - .forEach(([name, id]) => (newer[id as unknown as number] = name)); - -// update objs - -loadDir('data/src/scripts', '.obj', (src, file, path) => { - let joinedSrc = src.join('\n') + '\n'; - - for (let i = 0; i < newer.length; i++) { - if (typeof newer[i] === 'undefined') { - continue; - } - - if (joinedSrc.indexOf(older[i]) !== -1) { - // replace all instances of the old name with the new name (make sure to check for the whole word) - joinedSrc = joinedSrc.replace(new RegExp(`\\b${older[i]}\\b`, 'g'), newer[i]); - } - } - - // add a new line before every instance of [] - joinedSrc = joinedSrc.replace(/\[/g, '\n['); - - // remove the first line - if (joinedSrc[1] === '[') { - joinedSrc = joinedSrc.slice(1); - } - - fs.writeFileSync(`${path}/${file}`, joinedSrc); -}); - -// then update pack - -for (let i = 0; i < newer.length; i++) { - if (typeof newer[i] === 'undefined') { - continue; - } - - const certlink = older.indexOf('cert_' + older[i]); - if (certlink !== -1) { - older[certlink] = 'cert_' + newer[i]; - } - older[i] = newer[i]; -} -fs.writeFileSync('data/src/pack/obj.pack', older.map((name, id) => `${id}=${name}`).join('\n') + '\n'); diff --git a/src/lostcity/tools/unpack/run.ts b/src/lostcity/tools/unpack/run.ts index 754401769..abf6337f8 100644 --- a/src/lostcity/tools/unpack/run.ts +++ b/src/lostcity/tools/unpack/run.ts @@ -11,8 +11,8 @@ import { unpackWordenc } from '#lostcity/util/CacheUnpack.js'; // import Packet from '#jagex2/io/Packet.js'; -import AnimFrame from '#lostcity/cache/AnimFrame.js'; -// import AnimBase from '#lostcity/cache/AnimBase.js'; +import AnimFrame from '#lostcity/cache/graphics/AnimFrame.js'; +// import AnimBase from '#lostcity/cache/graphics/AnimBase.js'; let title: Jagfile | null = null; let config: Jagfile | null = null; From 69d2b44dfb406c8ab451ba5696ecf92091406820 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Fri, 7 Jun 2024 02:35:36 -0400 Subject: [PATCH 42/50] chore(engine): Split up dev thread vs build command --- package.json | 2 +- src/lostcity/cache/pack.ts | 31 -------------- src/lostcity/cache/packconfig/PackShared.ts | 42 +++++++++---------- .../cache/packinterface/PackServer.ts | 2 +- src/lostcity/cache/packmap/Worldmap.ts | 2 +- src/lostcity/engine/World.ts | 4 +- src/lostcity/server/DevThread.ts | 22 ++++++++++ src/lostcity/tools/cache/pack.ts | 11 +++++ .../tools/{unpack/run.ts => cache/unpack.ts} | 0 9 files changed, 59 insertions(+), 57 deletions(-) delete mode 100644 src/lostcity/cache/pack.ts create mode 100644 src/lostcity/server/DevThread.ts create mode 100644 src/lostcity/tools/cache/pack.ts rename src/lostcity/tools/{unpack/run.ts => cache/unpack.ts} (100%) diff --git a/package.json b/package.json index de050d7ba..e572b1b35 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "#lostcity/*": "./src/lostcity/*" }, "scripts": { - "build": "npm run ts-loader src/lostcity/cache/pack.ts", + "build": "npm run ts-loader src/lostcity/tools/cache/pack.ts", "clean": "npm run client:clean && npm run server:clean", "client": "java -cp 225.2004-05-18.jar client 10 0 highmem members", "client:clean": "npm run ts-loader src/lostcity/tools/cache/cleanClient.ts", diff --git a/src/lostcity/cache/pack.ts b/src/lostcity/cache/pack.ts deleted file mode 100644 index b390b5da8..000000000 --- a/src/lostcity/cache/pack.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { parentPort } from 'worker_threads'; -import { packClient, packServer } from '#lostcity/cache/packall.js'; -import Environment from '#lostcity/util/Environment.js'; -import { updateCompiler } from '#lostcity/util/RuneScriptCompiler.js'; - -if (!parentPort) { - if (Environment.UPDATE_ON_STARTUP) { - await updateCompiler(); - } - - await packServer(); - await packClient(); -} - -if (parentPort) { - let active: boolean = false; - - parentPort.on('message', async msg => { - if (active) { - return; - } - - if (msg.type === 'pack') { - active = true; - await packServer(); - await packClient(); - parentPort!.postMessage({ type: 'done' }); - active = false; - } - }); -} diff --git a/src/lostcity/cache/packconfig/PackShared.ts b/src/lostcity/cache/packconfig/PackShared.ts index 30a4d5ca3..61becea69 100644 --- a/src/lostcity/cache/packconfig/PackShared.ts +++ b/src/lostcity/cache/packconfig/PackShared.ts @@ -341,12 +341,12 @@ export function packConfigs() { shouldBuild('data/src/scripts', '.obj', 'data/pack/client/config') || shouldBuild('data/src/scripts', '.idk', 'data/pack/client/config') || shouldBuild('data/src/scripts', '.varp', 'data/pack/client/config') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/client/config'); + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/client/config'); // not a config but we want the server to know all the possible categories if ( shouldBuildFile('data/src/pack/category.pack', 'data/pack/server/category.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/category.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/category.dat') ) { //console.log('Packing categories'); //console.time('Packed categories'); @@ -363,7 +363,7 @@ export function packConfigs() { // want the server to access frame lengths without loading data from models if ( shouldBuild('data/src/models', '.frame', 'data/pack/server/frame_del.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/frame_del.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/frame_del.dat') ) { //console.log('Packing frame_del'); //console.time('Packed frame_del'); @@ -406,7 +406,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.dbtable', 'data/pack/server/dbtable.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/dbtable.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/dbtable.dat') ) { //console.log('Packing .dbtable'); //console.time('Packed .dbtable'); @@ -424,9 +424,9 @@ export function packConfigs() { // todo: rebuild when any data type changes if ( shouldBuild('data/src/scripts', '.dbrow', 'data/pack/server/dbrow.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/dbrow.dat') || + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/dbrow.dat') || shouldBuild('data/src/scripts', '.dbtable', 'data/pack/server/dbtable.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/dbtable.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/dbtable.dat') ) { //console.log('Packing .dbrow'); //console.time('Packed .dbrow'); @@ -441,7 +441,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.enum', 'data/pack/server/enum.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/enum.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/enum.dat') ) { //console.log('Packing .enum'); //console.time('Packed .enum'); @@ -456,7 +456,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.inv', 'data/pack/server/inv.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/inv.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/inv.dat') ) { //console.log('Packing .inv'); //console.time('Packed .inv'); @@ -471,7 +471,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.mesanim', 'data/pack/server/mesanim.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/mesanim.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/mesanim.dat') ) { //console.log('Packing .mesanim'); //console.time('Packed .mesanim'); @@ -486,7 +486,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.struct', 'data/pack/server/struct.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/struct.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/struct.dat') ) { //console.log('Packing .struct'); //console.time('Packed .struct'); @@ -503,7 +503,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.seq', 'data/pack/server/seq.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/seq.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/seq.dat') ) { //console.log('Packing .seq'); //console.time('Packed .seq'); @@ -526,7 +526,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.loc', 'data/pack/server/loc.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/loc.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/loc.dat') ) { //console.log('Packing .loc'); //console.time('Packed .loc'); @@ -549,7 +549,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.flo', 'data/pack/server/flo.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/flo.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/flo.dat') ) { //console.log('Packing .flo'); //console.time('Packed .flo'); @@ -572,7 +572,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.spotanim', 'data/pack/server/spotanim.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/spotanim.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/spotanim.dat') ) { //console.log('Packing .spotanim'); //console.time('Packed .spotanim'); @@ -595,7 +595,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.npc', 'data/pack/server/npc.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/npc.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/npc.dat') ) { //console.log('Packing .npc'); //console.time('Packed .npc'); @@ -618,7 +618,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.obj', 'data/pack/server/obj.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/obj.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/obj.dat') ) { //console.log('Packing .obj'); //console.time('Packed .obj'); @@ -641,7 +641,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.idk', 'data/pack/server/idk.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/idk.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/idk.dat') ) { //console.log('Packing .idk'); //console.time('Packed .idk'); @@ -664,7 +664,7 @@ export function packConfigs() { if (rebuildClient || shouldBuild('data/src/scripts', '.varp', 'data/pack/server/varp.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/varp.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/varp.dat') ) { //console.log('Packing .varp'); //console.time('Packed .varp'); @@ -687,7 +687,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.hunt', 'data/pack/server/hunt.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/hunt.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/hunt.dat') ) { //console.log('Packing .hunt'); //console.time('Packed .hunt'); @@ -702,7 +702,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.varn', 'data/pack/server/varn.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/varn.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/varn.dat') ) { //console.log('Packing .varn'); //console.time('Packed .varn'); @@ -717,7 +717,7 @@ export function packConfigs() { if ( shouldBuild('data/src/scripts', '.vars', 'data/pack/server/vars.dat') || - shouldBuild('src/lostcity/tools/packconfig', '.ts', 'data/pack/server/vars.dat') + shouldBuild('src/lostcity/cache/packconfig', '.ts', 'data/pack/server/vars.dat') ) { //console.log('Packing .vars'); //console.time('Packed .vars'); diff --git a/src/lostcity/cache/packinterface/PackServer.ts b/src/lostcity/cache/packinterface/PackServer.ts index 906851b17..a8e7d91db 100644 --- a/src/lostcity/cache/packinterface/PackServer.ts +++ b/src/lostcity/cache/packinterface/PackServer.ts @@ -2,7 +2,7 @@ import { shouldBuild } from '#lostcity/util/PackFile.js'; import { packInterface } from './PackShared.js'; export function packServerInterface() { - if (shouldBuild('data/src/scripts', '.if', 'data/pack/server/interface.dat') || shouldBuild('src/lostcity/tools/packinterface', '.ts', 'data/pack/server/interface.dat')) { + if (shouldBuild('data/src/scripts', '.if', 'data/pack/server/interface.dat') || shouldBuild('src/lostcity/cache/packinterface', '.ts', 'data/pack/server/interface.dat')) { //console.log('Packing interfaces'); const data = packInterface(true); diff --git a/src/lostcity/cache/packmap/Worldmap.ts b/src/lostcity/cache/packmap/Worldmap.ts index 5b26169d1..056d57af9 100644 --- a/src/lostcity/cache/packmap/Worldmap.ts +++ b/src/lostcity/cache/packmap/Worldmap.ts @@ -32,7 +32,7 @@ export async function packWorldmap() { if ( !shouldBuildFileAny('data/pack/server/maps', 'data/pack/mapview/worldmap.jag') && - !shouldBuildFile('src/lostcity/tools/packmap/Worldmap.ts', 'data/pack/mapview/worldmap.jag') + !shouldBuildFile('src/lostcity/cache/packmap/Worldmap.ts', 'data/pack/mapview/worldmap.jag') ) { return; } diff --git a/src/lostcity/engine/World.ts b/src/lostcity/engine/World.ts index 8ec9c7bca..44df8f40a 100644 --- a/src/lostcity/engine/World.ts +++ b/src/lostcity/engine/World.ts @@ -303,7 +303,7 @@ class World { } startDevWatcher() { - this.devThread = createWorker('./src/lostcity/cache/pack.ts'); + this.devThread = createWorker('./src/lostcity/server/DevThread.ts'); this.devThread.on('message', msg => { if (msg.type === 'done') { @@ -354,7 +354,7 @@ class World { this.broadcastMes('Rebuilding, please wait...'); if (!this.devThread) { - this.devThread = createWorker('./src/lostcity/cache/pack.ts'); + this.devThread = createWorker('./src/lostcity/server/DevThread.ts'); } this.devThread.postMessage({ diff --git a/src/lostcity/server/DevThread.ts b/src/lostcity/server/DevThread.ts new file mode 100644 index 000000000..2d6f282be --- /dev/null +++ b/src/lostcity/server/DevThread.ts @@ -0,0 +1,22 @@ +import { parentPort } from 'worker_threads'; +import { packClient, packServer } from '#lostcity/cache/packall.js'; + +if (!parentPort) { + process.exit(1); +} + +let active: boolean = false; + +parentPort.on('message', async msg => { + if (active) { + return; + } + + if (msg.type === 'pack') { + active = true; + await packServer(); + await packClient(); + parentPort!.postMessage({ type: 'done' }); + active = false; + } +}); diff --git a/src/lostcity/tools/cache/pack.ts b/src/lostcity/tools/cache/pack.ts new file mode 100644 index 000000000..c55fd2082 --- /dev/null +++ b/src/lostcity/tools/cache/pack.ts @@ -0,0 +1,11 @@ +import { packClient, packServer } from '#lostcity/cache/packall.js'; + +import Environment from '#lostcity/util/Environment.js'; +import { updateCompiler } from '#lostcity/util/RuneScriptCompiler.js'; + +if (Environment.UPDATE_ON_STARTUP) { + await updateCompiler(); +} + +await packServer(); +await packClient(); diff --git a/src/lostcity/tools/unpack/run.ts b/src/lostcity/tools/cache/unpack.ts similarity index 100% rename from src/lostcity/tools/unpack/run.ts rename to src/lostcity/tools/cache/unpack.ts From 252f4e93d4b362ac2b0b026ca1e37722c1043bd1 Mon Sep 17 00:00:00 2001 From: Pazaz Date: Fri, 7 Jun 2024 05:03:58 -0400 Subject: [PATCH 43/50] feat(engine): New Pix unpacker/packer This'll take over the legacy code once I figure out a better solution for metadata --- src/lostcity/cache/graphics/Pix.ts | 249 +++++++++++++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 src/lostcity/cache/graphics/Pix.ts diff --git a/src/lostcity/cache/graphics/Pix.ts b/src/lostcity/cache/graphics/Pix.ts new file mode 100644 index 000000000..18fddb5d4 --- /dev/null +++ b/src/lostcity/cache/graphics/Pix.ts @@ -0,0 +1,249 @@ +import Jimp from 'jimp'; +import kleur from 'kleur'; + +import Jagfile from '#jagex2/io/Jagfile.js'; +import Packet from '#jagex2/io/Packet.js'; + +// O(sqrt(n)) +function isPrime(num: number) { + for (let i = 2, s = Math.sqrt(num); i <= s; i++) { + if (num % i === 0) { + return false; + } + } + + return num > 1; +} + +export default class Pix { + private constructor( + public pixels: Uint8Array, public palette: Int32Array, + public width: number, public height: number, + public cropLeft: number, public cropTop: number, + public cropRight: number, public cropBottom: number, + public pixelOrder: number + ) { + } + + static unpackJag(jag: Jagfile, name: string, index: number = 0): Pix | null { + const dat = jag.read(name + '.dat'); + const idx = jag.read('index.dat'); + + if (!dat || !idx) { + return null; + } + + idx.pos = dat.g2(); + + if (idx.pos >= idx.length) { + return null; + } + + const width = idx.g2(); + const height = idx.g2(); + + const paletteCount = idx.g1(); + const palette = new Int32Array(paletteCount); + for (let i = 0; i < paletteCount - 1; i++) { + palette[i + 1] = idx.g3(); + } + + if (idx.pos >= idx.length) { + return null; + } + + for (let i = 0; i < index; i++) { + idx.pos += 2; // cropX, cropY + dat.pos += idx.g2() * idx.g2(); // width, height + idx.pos++; // pixelOrder + } + + if (idx.pos >= idx.length || dat.pos >= dat.length) { + return null; + } + + const cropLeft = idx.g1(); + const cropTop = idx.g1(); + const cropRight = idx.g2(); + const cropBottom = idx.g2(); + const pixelOrder = idx.g1(); + + if (idx.pos >= idx.length) { + return null; + } + + const len = cropRight * cropBottom; + const pixels = new Uint8Array(len); + + if (dat.pos + len > dat.length) { + return null; + } + + if (pixelOrder === 0) { + for (let i = 0; i < len; i++) { + pixels[i] = dat.g1(); + } + } else if (pixelOrder === 1) { + for (let x = 0; x < cropRight; x++) { + for (let y = 0; y < cropBottom; y++) { + pixels[(y * cropRight) + x] = dat.g1(); + } + } + } + + return new Pix(pixels, palette, width, height, cropLeft, cropTop, cropRight, cropBottom, pixelOrder); + } + + static unpackJagToPng(jag: Jagfile, name: string, sheetWidth: number = 0, sheetHeight: number = 0, preferHorizontal: boolean = true): Jimp | null { + const all = []; + + for (let i = 0; i < 1000; i++) { + const pix = Pix.unpackJag(jag, name, i); + if (!pix) { + break; + } + + all.push(pix); + } + + if (!all.length) { + return null; + } + + if (all.length === 1) { + return all[0].packPng(); + } + + const count = all.length; + + if (!sheetWidth || !sheetHeight) { + if (isPrime(count)) { + sheetWidth = count; + sheetHeight = 1; + } else { + sheetWidth = Math.ceil(Math.sqrt(count)); + sheetHeight = Math.ceil(count / sheetWidth); + } + + if (sheetWidth * sheetHeight > count) { + let widthTries = 0; + + if (preferHorizontal) { + while (sheetWidth * sheetHeight > count && widthTries < 10) { + sheetWidth++; + sheetHeight--; + widthTries++; + } + } else { + while (sheetWidth * sheetHeight > count && widthTries < 10) { + sheetWidth--; + sheetHeight++; + widthTries++; + } + } + } + } + + if (sheetWidth * sheetHeight != count) { + console.error(kleur.red('error:'), kleur.white('wrong spritesheet size! you may have to manually define its dimensions:'), kleur.red(sheetWidth + ' x ' + sheetHeight + ' != ' + count)); + return null; + } + + const cellWidth = all[0].width; + const cellHeight = all[0].height; + const sheet = new Jimp(sheetWidth * cellWidth, sheetHeight * cellHeight, 0xff00ffff).colorType(2); + + for (let index = 0; index < count; index++) { + const pix = all[index]; + const img = pix.packPng(); + + const x = index % sheetWidth; + const y = Math.floor(index / sheetWidth); + + sheet.blit(img, x * cellWidth, y * cellHeight, 0, 0, cellWidth, cellHeight); + } + + return sheet; + } + + packHeader(dat: Packet, index: Packet) { + dat.p2(index.pos); + + index.p2(this.width); + index.p2(this.height); + + index.p1(this.palette.length); + for (let i = 1; i < this.palette.length; i++) { + index.p3(this.palette[i]); + } + + // spritesheets work by packing sprites back to back after the palette + } + + pack(dat: Packet, index: Packet) { + index.p1(this.cropLeft); + index.p1(this.cropTop); + index.p2(this.cropRight); + index.p2(this.cropBottom); + index.p1(this.pixelOrder); + + if (this.pixelOrder === 0) { + for (let i = 0; i < this.pixels.length; i++) { + dat.p1(this.pixels[i]); + } + } else if (this.pixelOrder === 1) { + for (let x = 0; x < this.cropRight; x++) { + for (let y = 0; y < this.cropBottom; y++) { + dat.p1(this.pixels[(y * this.cropRight) + x]); + } + } + } + } + + packPng(): Jimp { + const img = new Jimp(this.width, this.height, 0xff00ffff).colorType(2); + + // if we could perform a memcpy this would be <0.05ms instead of 1-2ms + if (this.pixelOrder === 0) { + const len = this.cropRight * this.cropBottom; + + for (let i = 0; i < len; i++) { + const index = this.pixels[i]; + if (index === 0) { + continue; + } + + const startX = this.cropLeft + (i % this.cropRight); + const startY = this.cropTop + Math.floor(i / this.cropRight); + const pos = (startX + startY * this.width) * 4; + + const rgb = this.palette[index]; + img.bitmap.data[pos] = (rgb >> 16) & 0xff; + img.bitmap.data[pos + 1] = (rgb >> 8) & 0xff; + img.bitmap.data[pos + 2] = rgb & 0xff; + img.bitmap.data[pos + 3] = 0xff; + } + } else if (this.pixelOrder === 1) { + for (let x = 0; x < this.cropRight; x++) { + for (let y = 0; y < this.cropBottom; y++) { + const index = this.pixels[(y * this.cropRight) + x]; + if (index === 0) { + continue; + } + + const startX = this.cropLeft + x; + const startY = this.cropTop + y; + const pos = (startX + startY * this.width) * 4; + + const rgb = this.palette[index]; + img.bitmap.data[pos] = (rgb >> 16) & 0xff; + img.bitmap.data[pos + 1] = (rgb >> 8) & 0xff; + img.bitmap.data[pos + 2] = rgb & 0xff; + img.bitmap.data[pos + 3] = 0xff; + } + } + } + + return img; + } +} From 6689abe650d5cea8aecc04689b23408939fd9e1f Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 8 Jun 2024 22:01:39 -0400 Subject: [PATCH 44/50] fix(engine): unnecessary face entity mask being set & simplify op packet handlers (#558) * fix: unnecessary face entity mask being set and simplify op packets * fix(engine): opplayeru packet handler not checking for correct player pid --- src/lostcity/entity/NetworkPlayer.ts | 2 +- src/lostcity/entity/PathingEntity.ts | 2 +- src/lostcity/entity/Player.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpLocHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpLocTHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpLocUHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpNpcHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpObjHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpObjTHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpObjUHandler.ts | 3 +-- src/lostcity/network/225/incoming/handler/OpPlayerHandler.ts | 3 +-- .../network/225/incoming/handler/OpPlayerTHandler.ts | 3 +-- .../network/225/incoming/handler/OpPlayerUHandler.ts | 5 ++--- 15 files changed, 16 insertions(+), 29 deletions(-) diff --git a/src/lostcity/entity/NetworkPlayer.ts b/src/lostcity/entity/NetworkPlayer.ts index e50436f39..82559cf9e 100644 --- a/src/lostcity/entity/NetworkPlayer.ts +++ b/src/lostcity/entity/NetworkPlayer.ts @@ -75,7 +75,7 @@ export class NetworkPlayer extends Player { return; } - if (!this.target || this.target instanceof Loc || this.target instanceof Obj) { + if ((!this.target || this.target instanceof Loc || this.target instanceof Obj) && this.faceEntity !== -1) { this.faceEntity = -1; this.mask |= Player.FACE_ENTITY; } diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 00565e070..6a60a0678 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -503,7 +503,7 @@ export default abstract class PathingEntity extends Entity { this.faceX = -1; this.faceZ = -1; this.alreadyFacedCoord = false; - } else if (this.alreadyFacedEntity && !this.target) { + } else if (this.alreadyFacedEntity && !this.target && this.faceEntity !== -1) { this.mask |= this.entitymask; this.faceEntity = -1; this.alreadyFacedEntity = false; diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index fecd9b156..2b20726c4 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -686,8 +686,7 @@ export default class Player extends PathingEntity { // clear current interaction and walk queue stopAction() { - this.clearInteraction(); - this.closeModal(); + this.clearPendingAction(); this.unsetMapFlag(); } diff --git a/src/lostcity/network/225/incoming/handler/OpLocHandler.ts b/src/lostcity/network/225/incoming/handler/OpLocHandler.ts index 6bba367e6..2fec17b11 100644 --- a/src/lostcity/network/225/incoming/handler/OpLocHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpLocHandler.ts @@ -47,8 +47,7 @@ export default class OpLocHandler extends MessageHandler { mode = ServerTriggerType.APLOC5; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, loc, mode); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts b/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts index 700c828eb..2d140f8b6 100644 --- a/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpLocTHandler.ts @@ -33,8 +33,7 @@ export default class OpLocTHandler extends MessageHandler { return false; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, loc, ServerTriggerType.APLOCT, { type: loc.type, com: spellComId }); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts b/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts index b5fcd1805..572f8d848 100644 --- a/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpLocUHandler.ts @@ -52,8 +52,7 @@ export default class OpLocUHandler extends MessageHandler { player.lastUseItem = item; player.lastUseSlot = slot; - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, loc, ServerTriggerType.APLOCU); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts b/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts index 5eb33ffac..09d8ed074 100644 --- a/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpNpcHandler.ts @@ -43,8 +43,7 @@ export default class OpNpcHandler extends MessageHandler { mode = ServerTriggerType.APNPC5; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, npc, mode, { type: npc.type, com: -1 }); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts b/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts index bb5508d64..e4e96f133 100644 --- a/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpNpcTHandler.ts @@ -29,8 +29,7 @@ export default class OpNpcTHandler extends MessageHandler { return false; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, npc, ServerTriggerType.APNPCT, { type: npc.type, com: spellComId }); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts b/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts index d839cd047..e7953b7a1 100644 --- a/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpNpcUHandler.ts @@ -48,8 +48,7 @@ export default class OpNpcUHandler extends MessageHandler { player.lastUseItem = item; player.lastUseSlot = slot; - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, npc, ServerTriggerType.APNPCU, { type: npc.type, com: -1 }); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpObjHandler.ts b/src/lostcity/network/225/incoming/handler/OpObjHandler.ts index 65c1f83bd..fd37414be 100644 --- a/src/lostcity/network/225/incoming/handler/OpObjHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpObjHandler.ts @@ -48,8 +48,7 @@ export default class OpObjHandler extends MessageHandler { mode = ServerTriggerType.APOBJ5; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, obj, mode); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts b/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts index b02435636..0b73b4d8c 100644 --- a/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpObjTHandler.ts @@ -33,8 +33,7 @@ export default class OpObjTHandler extends MessageHandler { return false; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, obj, ServerTriggerType.APOBJT, { type: obj.type, com: spellComId }); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts b/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts index fdeef62a7..4c275b164 100644 --- a/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpObjUHandler.ts @@ -52,8 +52,7 @@ export default class OpObjUHandler extends MessageHandler { player.lastUseItem = item; player.lastUseSlot = slot; - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, obj, ServerTriggerType.APOBJU); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpPlayerHandler.ts b/src/lostcity/network/225/incoming/handler/OpPlayerHandler.ts index eb1c0a3c5..beaf1f3f2 100644 --- a/src/lostcity/network/225/incoming/handler/OpPlayerHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpPlayerHandler.ts @@ -34,8 +34,7 @@ export default class OpPlayerHandler extends MessageHandler { mode = ServerTriggerType.APPLAYER4; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, other, mode); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts b/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts index 4027c4d66..95cf3e8bc 100644 --- a/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpPlayerTHandler.ts @@ -29,8 +29,7 @@ export default class OpPlayerTHandler extends MessageHandler { return false; } - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, other, ServerTriggerType.APPLAYERT, { type: -1, com: spellComId }); player.opcalled = true; return true; diff --git a/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts b/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts index fa16cc5eb..64eb77188 100644 --- a/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts +++ b/src/lostcity/network/225/incoming/handler/OpPlayerUHandler.ts @@ -36,7 +36,7 @@ export default class OpPlayerUHandler extends MessageHandler { return false; } - if (!player.players.has(player.uid)) { + if (!player.players.has(other.uid)) { return false; } @@ -47,8 +47,7 @@ export default class OpPlayerUHandler extends MessageHandler { player.lastUseSlot = slot; - player.clearInteraction(); - player.closeModal(); + player.clearPendingAction(); player.setInteraction(Interaction.ENGINE, other, ServerTriggerType.APPLAYERU, { type: item, com: -1 }); player.opcalled = true; return true; From ae152293c046eed28917c55f81c7343f85817653 Mon Sep 17 00:00:00 2001 From: tannerdino <61213166+tannerdino@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:47:24 -0400 Subject: [PATCH 45/50] feat(content): pvp related fixes and additions (#557) * fix(content): use queue2 for pvp and add duel arena death * feat: pvp death * feat(content): ring of recoil * fix(content): have damage_player queue check if player has ring of recoil * feat(content): ring of life * fix(content): better guess for flower power duel * feat(content): pvp poison * fix(content): duel arena and combat changes * fix(content): use stakeinv for stakes and tempinv for collecting arrows during stakes * fix(content): add some if_closes to duel arena * refactor: combine duel arena win/loss into one queue * feat(engine): findhero and both_heropoints commands * fix(engine): properly reset hero points after stat regen * feat(content): both_heropoints applied to pvp scripts * feat(content): drop bones on death * fix(content): move ring of recoil check to opplayer2 script * fix(engine): check for activeplayer in findhero command * Revert "fix(content): move ring of recoil check to opplayer2 script" This reverts commit 6629885803ebc759ef87a613036700bee8a4ff85. * fix(content): make recoil damage its own queue to avoid loop --------- Co-authored-by: tannerdino --- data/src/pack/inv.pack | 2 +- .../_test/scripts/cheats/cheat_pvp.rs2 | 10 ++ .../_test/scripts/engine/debug_findhero.rs2 | 18 +++ data/src/scripts/_unpack/all.varp | 1 + data/src/scripts/engine.rs2 | 5 + .../general/scripts/misc/coord_procs.rs2 | 14 ++ .../scripts/interface_trade/scripts/trade.rs2 | 12 ++ .../game_duelarena/configs/duelarena.constant | 6 +- .../game_duelarena/configs/duelarena.inv | 5 +- .../game_duelarena/scripts/duel_arena.rs2 | 40 ++++- .../scripts/duel_arena_finish.rs2 | 76 ++++++--- .../scripts/duel_arena_settings.rs2 | 9 +- .../scripts/duel_arena_start.rs2 | 152 ++++++++---------- .../game_duelarena/scripts/duel_forfeit.rs2 | 42 ++--- data/src/scripts/player/scripts/damage.rs2 | 111 +++++++++++-- .../skill_combat/scripts/npc/npc_combat.rs2 | 7 + .../skill_combat/scripts/pvp/pvp_combat.rs2 | 105 ++++++------ .../skill_combat/scripts/pvp/pvp_magic.rs2 | 10 +- .../skill_combat/scripts/pvp/pvp_melee.rs2 | 12 +- .../skill_combat/scripts/pvp/pvp_ranged.rs2 | 23 +-- .../skill_magic/scripts/spells/enchant.rs2 | 19 +++ src/lostcity/engine/script/ScriptOpcode.ts | 2 + .../engine/script/ScriptOpcodePointers.ts | 9 ++ src/lostcity/engine/script/handlers/InvOps.ts | 6 +- .../engine/script/handlers/PlayerOps.ts | 31 ++++ src/lostcity/entity/Player.ts | 35 ++++ 26 files changed, 511 insertions(+), 251 deletions(-) create mode 100644 data/src/scripts/_test/scripts/engine/debug_findhero.rs2 diff --git a/data/src/pack/inv.pack b/data/src/pack/inv.pack index 4e42fa494..bccfa376a 100644 --- a/data/src/pack/inv.pack +++ b/data/src/pack/inv.pack @@ -140,7 +140,7 @@ 139=generalshop14 140=inv_140 141=reward -142=duel_arena_arrows +142=stakeinv 143=shrimp_and_parrot 144=crafting_rings 145=crafting_necklaces diff --git a/data/src/scripts/_test/scripts/cheats/cheat_pvp.rs2 b/data/src/scripts/_test/scripts/cheats/cheat_pvp.rs2 index 0d658b2a8..1062e18bc 100644 --- a/data/src/scripts/_test/scripts/cheats/cheat_pvp.rs2 +++ b/data/src/scripts/_test/scripts/cheats/cheat_pvp.rs2 @@ -24,4 +24,14 @@ if (npc_finduid(%aggressive_npc) = true) { if (.finduid(%npc_aggressive_player) = true) { mes("Aggressive NPC's target: <.displayname>"); } +} + +[debugproc,pvp] +if (p_finduid(uid) = true) { + p_telejump(0_52_60_37_37); +} + +[debugproc,duel] +if (p_finduid(uid) = true) { + p_telejump(0_52_51_42_4); } \ No newline at end of file diff --git a/data/src/scripts/_test/scripts/engine/debug_findhero.rs2 b/data/src/scripts/_test/scripts/engine/debug_findhero.rs2 new file mode 100644 index 000000000..cced8ef79 --- /dev/null +++ b/data/src/scripts/_test/scripts/engine/debug_findhero.rs2 @@ -0,0 +1,18 @@ +[debugproc,findhero] +if (findhero = true) { + mes(.displayname); + if (.findhero = true) { + mes(displayname); + } +} + + +[debugproc,both_heropoints] +huntall(coord, 5, 0); +while (.huntnext = true) { + if (uid ! .uid) { + both_heropoints(1); + mes("both_heropoints(1);"); + } +} + diff --git a/data/src/scripts/_unpack/all.varp b/data/src/scripts/_unpack/all.varp index e7a286437..ee6a5e4b5 100644 --- a/data/src/scripts/_unpack/all.varp +++ b/data/src/scripts/_unpack/all.varp @@ -429,6 +429,7 @@ scope=perm [varp_289] [ring_of_recoil] +scope=perm [ring_of_forging] scope=perm diff --git a/data/src/scripts/engine.rs2 b/data/src/scripts/engine.rs2 index cddadb9b4..89455869e 100644 --- a/data/src/scripts/engine.rs2 +++ b/data/src/scripts/engine.rs2 @@ -13,6 +13,7 @@ [command,npc_huntnext]()(boolean) [command,.npc_huntnext]()(boolean) [command,inzone](coord $from, coord $to, coord $pos)(boolean) +[command,.inzone](coord $from, coord $to, coord $pos)(boolean) [command,lineofwalk](coord $from, coord $to)(boolean) [command,stat_random](int $level, int $low, int $high)(boolean) [command,spotanim_map](spotanim $anim, coord $coord, int $height, int $delay) @@ -205,9 +206,13 @@ [command,getwalktrigger]()(walktrigger) [command,.getwalktrigger]()(walktrigger) [command,clearqueue](queue $queue) +[command,.clearqueue](queue $queue) [command,afk_event]()(int) [command,lowmemory]()(boolean) [command,setidkit](idkit $kit, int $color) +[command,findhero]()(boolean) +[command,.findhero]()(boolean) +[command,both_heropoints](int $damage) // Npc ops (2500-2999) [command,npc_finduid](npc_uid $uid)(boolean) diff --git a/data/src/scripts/general/scripts/misc/coord_procs.rs2 b/data/src/scripts/general/scripts/misc/coord_procs.rs2 index 65952e5c7..0cf656f1d 100644 --- a/data/src/scripts/general/scripts/misc/coord_procs.rs2 +++ b/data/src/scripts/general/scripts/misc/coord_procs.rs2 @@ -111,6 +111,20 @@ while($i < db_getfieldcount($data, coord_pair_table:coord_pair)) { } return (false); +[proc,.inzone_coord_pair_table](dbrow $data, coord $coord)(boolean) +def_coord $coord1; +def_coord $coord2; +def_int $i = 0; +while($i < db_getfieldcount($data, coord_pair_table:coord_pair)) { + $coord1, $coord2 = db_getfield($data, coord_pair_table:coord_pair, $i); + if(.inzone($coord1, $coord2, $coord) = true) { + return (true); + } else { + $i = add($i, 1); + } +} +return (false); + // returns ^exact_north, ^exact_east, ^exact_south, ^exact_west [proc,coord_direction](coord $coord1, coord $coord2)(int) def_int $x1 = coordx($coord1); diff --git a/data/src/scripts/interface_trade/scripts/trade.rs2 b/data/src/scripts/interface_trade/scripts/trade.rs2 index f8f090e40..b499e76cc 100644 --- a/data/src/scripts/interface_trade/scripts/trade.rs2 +++ b/data/src/scripts/interface_trade/scripts/trade.rs2 @@ -9,6 +9,18 @@ while ($i < $size) { $i = add($i, 1); } +[proc,.moveallinv](inv $src, inv $dest) +def_int $size = .inv_size($src); +def_int $i = 0; +while ($i < $size) { + def_obj $obj = .inv_getobj($src, $i); + if ($obj ! null) { + .inv_moveitem($src, $dest, $obj, .inv_total($src, $obj)); + } + $i = add($i, 1); +} + + // ---- [opplayer4,_] diff --git a/data/src/scripts/minigames/game_duelarena/configs/duelarena.constant b/data/src/scripts/minigames/game_duelarena/configs/duelarena.constant index 70a7b3df5..02800fc47 100644 --- a/data/src/scripts/minigames/game_duelarena/configs/duelarena.constant +++ b/data/src/scripts/minigames/game_duelarena/configs/duelarena.constant @@ -20,4 +20,8 @@ ^north_east_camera = 4 ^north_west_camera = 5 ^south_east_camera = 6 -^south_west_camera = 7 \ No newline at end of file +^south_west_camera = 7 + +^duelstatus_lost = 5 +^duelstatus_victory = 6 +^duelstatus_opponent_resigned = 7 \ No newline at end of file diff --git a/data/src/scripts/minigames/game_duelarena/configs/duelarena.inv b/data/src/scripts/minigames/game_duelarena/configs/duelarena.inv index cd1ff7fda..9cd584e9a 100644 --- a/data/src/scripts/minigames/game_duelarena/configs/duelarena.inv +++ b/data/src/scripts/minigames/game_duelarena/configs/duelarena.inv @@ -7,5 +7,6 @@ allstock=no stock1=rotten_tomato,2000,10 -[duel_arena_arrows] -size=29 \ No newline at end of file +[stakeinv] +size=29 +protect=no \ No newline at end of file diff --git a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena.rs2 index 4e5f03e02..9c992d179 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena.rs2 @@ -1,3 +1,33 @@ +[debugproc,tempinv] +def_int $i = 0; +def_int $null = 0; +while ($i < inv_size(tempinv)) { + if (inv_getobj(tempinv, $i) ! null) { + mes(": "); + } else { + $null = add($null, 1); + } + $i = add($i, 1); +} +if ($null = inv_size(tempinv)) { + mes("tempinv is empty"); +} + +[debugproc,stakeinv] +def_int $i = 0; +def_int $null = 0; +while ($i < inv_size(stakeinv)) { + if (inv_getobj(stakeinv, $i) ! null) { + mes(": "); + } else { + $null = add($null, 1); + } + $i = add($i, 1); +} +if ($null = inv_size(stakeinv)) { + mes("stakeinv is empty"); +} + [opplayer1,_] if (.busy = true) { mes("<.displayname> is busy at the moment."); // https://youtu.be/YkJQDvB14-U?t=26 @@ -260,9 +290,8 @@ if (.finduid(%duelpartner) = true) { if_close; .if_close; - if (p_finduid(uid) = true & .p_finduid(.uid) = true) { - @start_duel; - } + queue(duel_arena_prepare_start, 0); + queue2(duel_arena_prepare_start, 0); } else { .if_settext(duel_confirm:status, "Other player has accepted."); // https://youtu.be/HFp6hOkiCns?t=481 if_settext(duel_confirm:status, "Waiting for other player."); @@ -354,6 +383,11 @@ if (~inzone_coord_pair_table(duel_arena_fight_zones, coord) = true | ~inzone_coo } return(false); +[proc,.in_duel_arena]()(boolean) +if (~.inzone_coord_pair_table(duel_arena_fight_zones, coord) = true | ~.inzone_coord_pair_table(duel_arena_obstacle_fight_zones, coord) = true) { + return(true); +} +return(false); [proc,duel_arena_login] if (~in_duel_arena = true) { diff --git a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_finish.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_finish.rs2 index dab514c2d..eb77d4292 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_finish.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_finish.rs2 @@ -1,50 +1,74 @@ -[queue,duel_arena_finished](string $displayname, int $combat_level) -mes("Well done! You have defeated <$displayname>!"); -if_openmainmodal(duel_win); -if_settext(duel_win:displayname, $displayname); -if_settext(duel_win:combat_level, tostring($combat_level)); - -// get stuff back in ur tempinv +[queue,duel_arena_finish] +if (getqueue(duel_arena_finish) > 0) { + clearqueue(duel_arena_finish); +} +if (~in_duel_arena = false) { + %duelstatus = 0; + %duelpartner = null; + return; +} +// get arrows back def_int $i = 0; while ($i < inv_size(tempinv)) { if (inv_getobj(tempinv, $i) ! null) { - //mes(": "); inv_movefromslot(tempinv, inv, $i); } $i = calc($i + 1); } -$i = 0; -while ($i < inv_size(duel_arena_arrows)) { - if (inv_getobj(duel_arena_arrows, $i) ! null) { - //mes(": "); - inv_movefromslot(duel_arena_arrows, inv, $i); - } - $i = calc($i + 1); -} +p_telejump(~duel_arena_finish_coord(coord)); +anim(null, 0); +p_stopaction; -inv_clear(tempinv); +~stat_reset_all; +healenergy(10000); +~combat_clearqueue; +clearqueue(player_death); +~clear_poison; +~update_all(inv_getobj(worn, ^wearpos_rhand)); +hint_stop; -// take stuff from other player's tempinv -if (.finduid(%duelpartner) = true) { - .both_moveinv(tempinv, tempinv); - .%duelpartner = null; +if (.finduid(%duelpartner) = true & (%duelstatus = ^duelstatus_victory | %duelstatus = ^duelstatus_opponent_resigned)) { + if (%duelstatus = ^duelstatus_opponent_resigned) { + if_settext(duel_win:com_99, "You are victorious! Your opponent resigned!"); // 2006 + mes("Well done! <.displayname> resigned!"); // 2006 + } else { + if_settext(duel_win:com_99, "You are victorious!"); + mes("Well done! You have defeated <.displayname>!"); + } + if_openmainmodal(duel_win); + ~duel_adjust_scoreboard(displayname, ~player_combat_level, .displayname, ~.player_combat_level); + if_settext(duel_win:displayname, .displayname); + if_settext(duel_win:combat_level, tostring(~.player_combat_level)); + + $i = 0; + while ($i < inv_size(stakeinv)) { + if (inv_getobj(stakeinv, $i) ! null) { + //mes(": "); + inv_movefromslot(stakeinv, inv, $i); + } + $i = calc($i + 1); + } + inv_clear(stakeinv); + // take stuff from other player's stakeinv + .both_moveinv(stakeinv, stakeinv); + // .%duelpartner = null; // display spoils - inv_transmit(tempinv, duel_win:spoils); + inv_transmit(stakeinv, duel_win:spoils); } %duelstatus = 0; %duelpartner = null; [if_close,duel_win] -// take spoils def_int $i = 0; -while ($i < inv_size(tempinv)) { - if (inv_getobj(tempinv, $i) ! null) { - inv_movefromslot(tempinv, inv, $i); +while ($i < inv_size(stakeinv)) { + if (inv_getobj(stakeinv, $i) ! null) { + inv_movefromslot(stakeinv, inv, $i); } $i = calc($i + 1); } +inv_clear(stakeinv); inv_stoptransmit(duel_win:spoils); // https://youtu.be/QggKGBAl_X8?t=111 diff --git a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_settings.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_settings.rs2 index fb47f6169..b8d02e508 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_settings.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_settings.rs2 @@ -203,7 +203,8 @@ if (~in_duel_arena = false) { return(true); } if (testbit(%duel_settings, ^flower_power) = true) { - mes("You can only use flowers for this duel."); // guess + mes("This is a 'flower power' duel. You can only use flowers."); // guess based off of 2006 vid + // 2006: "This is a 'fun weapon' duel. You can only use flowers or a rubber|chicken." return(false); } return(true); @@ -216,7 +217,8 @@ if (~in_duel_arena = false) { return(true); } if (testbit(%duel_settings, ^flower_power) = true) { - mes("You can only use flowers for this duel."); // guess + mes("This is a 'flower power' duel. You can only use flowers."); // guess based off of 2006 vid + // 2006: "This is a 'fun weapon' duel. You can only use flowers or a rubber|chicken." return(false); } return(true); @@ -253,7 +255,8 @@ if (testbit(%duel_settings, ^no_magic) = true) { return(false); } if (testbit(%duel_settings, ^flower_power) = true) { - mes("You can only attack with flowers in this duel."); // guess + mes("This is a 'flower power' duel. You can only use flowers."); // guess based off of 2006 vid + // 2006: "This is a 'fun weapon' duel. You can only use flowers or a rubber|chicken." return(false); } return(true); \ No newline at end of file diff --git a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_start.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_start.rs2 index ec1e3062c..7570bb182 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_start.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/duel_arena_start.rs2 @@ -1,65 +1,67 @@ -[label,start_duel] -def_coord $random_coord1; -def_coord $random_coord2; -$random_coord1, $random_coord2 = ~duel_arena_coords; - -if ($random_coord1 = null | $random_coord2 = null) { - %duelstatus = 0; - .%duelstatus = 0; - %duelpartner = null; - .%duelpartner = null; - queue(duel_arena_full, 0); - ~.mesbox("All arenas of this type are full! Select another type of arena, try|again in a few minutes or try a different server."); // https://youtu.be/TcrIr9O92sw?t=89 - return; -} -p_telejump($random_coord1); -.p_telejump($random_coord2); - -p_stopaction; -.p_stopaction; -// only deactive prayers if no prayers is selected. based off: https://imgur.com/ETH1z4L -if (testbit(%duel_settings, ^no_prayer) = true) { - ~deactivate_prayers; - ~.deactivate_prayers; -} +[queue,duel_arena_prepare_start] +if (.finduid(%duelpartner) = true) { + def_coord $random_coord1 = ~duel_arena_coord; + def_coord $random_coord2 = $random_coord1; + + if ($random_coord1 = null) { + %duelstatus = 0; + %duelpartner = null; + ~mesbox("All arenas of this type are full! Select another type of arena, try|again in a few minutes or try a different server."); // https://youtu.be/TcrIr9O92sw?t=89 + return; + } + p_telejump($random_coord1); + def_int $i = 0; + if (testbit(%duel_settings, ^no_movement) = true & .p_finduid(.uid) = true) { + while (map_blocked($random_coord2) = true | $random_coord2 = $random_coord1 | lineofwalk($random_coord1, $random_coord2) = false & $i < 50){ + switch_int (random(4)) { + case 0: $random_coord2 = movecoord($random_coord1, 1, 0, 0); + case 1: $random_coord2 = movecoord($random_coord1, -1, 0, 0); + case 2: $random_coord2 = movecoord($random_coord1, 0, 0, 1); + case 3: $random_coord2 = movecoord($random_coord1, 0, 0, -1); + } + $i = calc($i + 1); + } + .p_telejump($random_coord2); + } -// Doesnt rest stats. -// - https://youtu.be/zMhQfzn4M0Y?list=PLn23LiLYLb1Zo7wVV7wY2Zj1VV4zz6LBK&t=64 -// But, reset buffs only if no potions is selected: -// - https://web.archive.org/web/20050930213502/http://runevillage.com:80/rs2specialDuelingarena.php -// - "No Potions: This means you can’t use Potions, if you used a Potion before the Duel its effects will be returned to normal." -// - In 2006, if you had the "No drinks" option selected, the 2nd menu would show "Boosted stats will be restored." https://imgur.com/ETH1z4L -if (testbit(%duel_settings, ^no_potions) = true) { - ~stat_reset_boosts; - ~.stat_reset_boosts; -} + // move tempinv to stakeinv + ~moveallinv(tempinv, stakeinv); + p_stopaction; + // only deactive prayers if no prayers is selected. based off: https://imgur.com/ETH1z4L + if (testbit(%duel_settings, ^no_prayer) = true) { + ~deactivate_prayers; + } + // Doesnt rest stats. + // - https://youtu.be/zMhQfzn4M0Y?list=PLn23LiLYLb1Zo7wVV7wY2Zj1VV4zz6LBK&t=64 + // But, reset buffs only if no potions is selected: + // - https://web.archive.org/web/20050930213502/http://runevillage.com:80/rs2specialDuelingarena.php + // - "No Potions: This means you can’t use Potions, if you used a Potion before the Duel its effects will be returned to normal." + // - In 2006, if you had the "No drinks" option selected, the 2nd menu would show "Boosted stats will be restored." https://imgur.com/ETH1z4L + if (testbit(%duel_settings, ^no_potions) = true) { + ~stat_reset_boosts; + } -if (testbit(%duel_settings, ^no_weapons) = true) { - ~unequip_duel(duel_arena_weapon_slots); - ~.unequip_duel(duel_arena_weapon_slots); -} -if (testbit(%duel_settings, ^no_armour) = true) { - ~unequip_duel(duel_arena_armour_slots); - ~.unequip_duel(duel_arena_armour_slots); -} -if (testbit(%duel_settings, ^no_jewelry) = true) { - ~unequip_duel(duel_arena_jewelry_slots); - ~.unequip_duel(duel_arena_jewelry_slots); -} + if (testbit(%duel_settings, ^no_weapons) = true) { + ~unequip_duel(duel_arena_weapon_slots); + } + if (testbit(%duel_settings, ^no_armour) = true) { + ~unequip_duel(duel_arena_armour_slots); + } + if (testbit(%duel_settings, ^no_jewelry) = true) { + ~unequip_duel(duel_arena_jewelry_slots); + } -hint_player(.uid); -.hint_player(uid); + hint_player(.uid); -if (~duel_arena_movement_check = true) { - walktrigger(duel_arena_no_move); - //.walktrigger(duel_arena_no_move); -} + if (~duel_arena_movement_check = true) { + walktrigger(duel_arena_no_move); + } -softtimer(duel_arena_start_3, 3); // todo: confirm these timings -//.softtimer(duel_arena_start_3, 2); + softtimer(duel_arena_start_3, 3); // todo: confirm these timings +} -[proc,duel_arena_coords]()(coord, coord) +[proc,duel_arena_coord]()(coord) // random coord between 2 coords, checks if map blocked and not inside dueler def_coord $coord1; def_coord $coord2; @@ -72,7 +74,7 @@ if (~duel_arena_obstacles_check = true) { if (map_playercount(db_getfield(duel_arena_obstacle_fight_zones, coord_pair_table:coord_pair, $i)) >= 24) { $random_arena = ~random_range($i, $obstacle_arenas); if ($i = calc($obstacle_arenas - 1)) { - return(null, null); // if its the last one and it fails, return null + return(null); // if its the last one and it fails, return null } } $i = calc($i + 1); @@ -85,7 +87,7 @@ if (~duel_arena_obstacles_check = true) { if (map_playercount(db_getfield(duel_arena_fight_zones, coord_pair_table:coord_pair, $i)) >= 24) { $random_arena = ~random_range($i, $normal_arenas); if ($i = calc($normal_arenas - 1)) { - return(null, null); + return(null); } } $i = calc($i + 1); @@ -97,43 +99,17 @@ def_int $x1 = coordx($coord1); def_int $x2 = coordx($coord2); def_int $z1 = coordz($coord1); def_int $z2 = coordz($coord2); -def_coord $random_coord1 = movecoord($coord1, random(sub($x2, $x1)), 0, random(sub($z2, $z1))); -def_coord $random_coord2 = $random_coord1; +def_coord $random_coord = movecoord($coord1, random(sub($x2, $x1)), 0, random(sub($z2, $z1))); $i = 0; -while (map_blocked($random_coord1) = true) { - $random_coord1 = movecoord($coord1, random(sub($x2, $x1)), 0, random(sub($z2, $z1))); +while (map_blocked($random_coord) = true) { + $random_coord = movecoord($coord1, random(sub($x2, $x1)), 0, random(sub($z2, $z1))); $i = calc($i + 1); if ($i = 50) { - return(null, null); // no way this is reached - } -} - - -$i = 0; -if (testbit(%duel_settings, ^no_movement) = true) { - while (map_blocked($random_coord2) = true | $random_coord2 = $random_coord1 | lineofwalk($random_coord1, $random_coord2) = false){ - switch_int (random(4)) { - case 0: $random_coord2 = movecoord($random_coord1, 1, 0, 0); - case 1: $random_coord2 = movecoord($random_coord1, -1, 0, 0); - case 2: $random_coord2 = movecoord($random_coord1, 0, 0, 1); - case 3: $random_coord2 = movecoord($random_coord1, 0, 0, -1); - } - $i = calc($i + 1); - if ($i = 50) { - return(null, null); // no way this is reached - } - } -} else { - while (map_blocked($random_coord2) = true | $random_coord2 = $random_coord1) { - $random_coord2 = movecoord($coord1, random(sub($x2, $x1)), 0, random(sub($z2, $z1))); - $i = calc($i + 1); - if ($i = 50) { - return(null, null); // no way this is reached - } + return(null); // no way this is reached } } -return($random_coord1, $random_coord2); +return($random_coord); [softtimer,duel_arena_start_3] diff --git a/data/src/scripts/minigames/game_duelarena/scripts/duel_forfeit.rs2 b/data/src/scripts/minigames/game_duelarena/scripts/duel_forfeit.rs2 index b0291a535..ab0bfbc2b 100644 --- a/data/src/scripts/minigames/game_duelarena/scripts/duel_forfeit.rs2 +++ b/data/src/scripts/minigames/game_duelarena/scripts/duel_forfeit.rs2 @@ -8,36 +8,18 @@ if (~duel_arena_forfeit_check = false) { return; } -p_telejump(~duel_arena_finish_coord(coord)); -if (.finduid(%duelpartner) = true) { - if (.p_finduid(%duelpartner) = true) { - .p_telejump(~duel_arena_finish_coord(.coord)); - // todo: queue win on other player - .p_stopaction; - ~.stat_reset_all; - .healenergy(10000); - ~.combat_clearqueue; - ~.clear_poison; - ~.update_all(.inv_getobj(worn, ^wearpos_rhand)); - .%duelpartner = null; - .%duelstatus = 0; - ~duel_adjust_scoreboard(.displayname, ~.player_combat_level, displayname, ~player_combat_level); - } +def_int $choice = ~p_choice2_header("Yes", 1, "No", 2, "Do you wish to forfeit?"); +if ($choice = 2) { + return; } -def_int $i = 0; -while ($i < inv_size(duel_arena_arrows)) { - if (inv_getobj(duel_arena_arrows, $i) ! null) { - //mes(": "); - inv_movefromslot(duel_arena_arrows, inv, $i); - } - $i = calc($i + 1); +if_close; +%duelstatus = ^duelstatus_lost; +if (getqueue(duel_arena_finish) < 1) { + queue(duel_arena_finish, 0); } -p_stopaction; -~stat_reset_all; -healenergy(10000); -~combat_clearqueue; -~clear_poison; -~update_all(inv_getobj(worn, ^wearpos_rhand)); -%duelpartner = null; -%duelstatus = 0; \ No newline at end of file +if (.finduid(%duelpartner) = true) { + .if_close; + .%duelstatus = ^duelstatus_opponent_resigned; + queue2(duel_arena_finish, 0); +} \ No newline at end of file diff --git a/data/src/scripts/player/scripts/damage.rs2 b/data/src/scripts/player/scripts/damage.rs2 index b5aa395c4..0526d7a60 100644 --- a/data/src/scripts/player/scripts/damage.rs2 +++ b/data/src/scripts/player/scripts/damage.rs2 @@ -4,10 +4,12 @@ [proc,combat_clearqueue] clearqueue(playerhit_n_retaliate); clearqueue(damage_player); +clearqueue(pvp_damage); [proc,.combat_clearqueue] -clearqueue(playerhit_n_retaliate); -clearqueue(damage_player); +.clearqueue(playerhit_n_retaliate); +.clearqueue(damage_player); +.clearqueue(pvp_damage); [queue,player_death] p_delay(1); @@ -16,7 +18,44 @@ if_close; midi_jingle(^death_jingle_2, ^death_jingle_2_millis); anim(human_death, 0); p_delay(3); +mes("Oh dear you are dead!"); // no comma in early rs2. https://storage.googleapis.com/tannerdino/images/6543.jpg + +// todo, check if a player has recieved kill credit for your death +// if so use inv_dropall and ~pvp_death_message +def_obj $prev_wep = inv_getobj(worn, ^wearpos_rhand); +if (~in_duel_arena = true & ~.in_duel_arena = true & .finduid(%duelpartner) = true) { + if_close; + .if_close; + %duelstatus = ^duelstatus_lost; + .%duelstatus = ^duelstatus_victory; + if (getqueue(duel_arena_finish) < 1) { + queue(duel_arena_finish, 0); + } + queue2(duel_arena_finish, 0); + // player2 can move freely whilst player 1 is in death anim: https://youtu.be/BBYbpuquiZw?t=412 (vid he equips dragon sword) + return; +} else if (findhero = true) { + ~pvp_death_lose_items; +} else { + ~player_death_lose_items; +} + +buildappearance(worn); +~deactivate_prayers; +p_telejump(~coord_lineofwalk_radius(0_50_50_21_18, 2)); +anim(null, 0); + +~stat_reset_all; +healenergy(10000); +~combat_clearqueue; +clearqueue(player_death); +~clear_pk_skull; +~clear_poison; +~update_all($prev_wep); +// todo: end poison timer ~player_end_poison + +[proc,player_death_lose_items] def_boolean $skulled = false; if (%pk_skull > 0) { $skulled = true; } def_boolean $protecting_item = false; @@ -32,10 +71,58 @@ if($protecting_item = true) { ~move_priciest_item_on_hero_to_death; } +def_int $i = 0; +def_int $size = inv_size(inv); +while ($i < $size) { + if (inv_getnum(inv, $i) > 0) { + if (oc_category(inv_getobj(inv, $i)) = armour_godcape) { + mes(oc_param(inv_getobj(inv, $i), lose_cape_message)); + inv_delslot(inv, $i); + } else { + inv_dropslot(inv, coord, $i, 200); // todo: inv_dropall (visible to all instantly) + } + } + $i = calc($i + 1); +} + +$i = 0; +$size = inv_size(worn); +while ($i < $size) { + if (inv_getnum(worn, $i) > 0) { + if (oc_category(inv_getobj(worn, $i)) = armour_godcape) { + mes(oc_param(inv_getobj(worn, $i), lose_cape_message)); + inv_delslot(worn, $i); + } else { + inv_dropslot(worn, coord, $i, 200); // todo: inv_dropall (visible to all instantly) + } + } + $i = calc($i + 1); +} + +obj_add(coord, bones, 1, 200); // todo: obj_addall +~moveallinv(death, inv); +inv_clear(death); + +[proc,pvp_death_lose_items] +~pvp_death_message(.uid); + +def_boolean $skulled = false; +if (%pk_skull > 0) { $skulled = true; } +def_boolean $protecting_item = false; +if (%prayer_protectitems = ^true) { $protecting_item = true; } +inv_clear(death); + +if($skulled = false) { + ~move_priciest_item_on_hero_to_death; + ~move_priciest_item_on_hero_to_death; + ~move_priciest_item_on_hero_to_death; +} +if($protecting_item = true) { + ~move_priciest_item_on_hero_to_death; +} def_int $i = 0; def_int $size = inv_size(inv); -def_obj $prev_wep = inv_getobj(worn, ^wearpos_rhand); while ($i < $size) { if (inv_getnum(inv, $i) > 0) { if (oc_category(inv_getobj(inv, $i)) = armour_godcape) { @@ -61,23 +148,11 @@ while ($i < $size) { } $i = calc($i + 1); } -buildappearance(worn); - +.obj_add(coord, bones, 1, 200); ~moveallinv(death, inv); -~deactivate_prayers; -p_telejump(~coord_lineofwalk_radius(0_50_50_21_18, 2)); -anim(null, 0); -mes("Oh dear you are dead!"); // no comma in early rs2. https://storage.googleapis.com/tannerdino/images/6543.jpg - -~stat_reset_all; -healenergy(10000); -~combat_clearqueue; -~clear_pk_skull; -~clear_poison; -// todo: end poison timer ~player_end_poison -~update_all($prev_wep); inv_clear(death); + [proc,move_priciest_item_on_hero_to_death] def_obj $priciest_item; def_obj $currentitem; @@ -136,7 +211,9 @@ if ($amount > 0) { if (stat(hitpoints) = 0 & getqueue(player_death) < 1){ queue(player_death, 0); + return; } +~ring_of_life_check; [proc,human_hit_sound] diff --git a/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 b/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 index d7087213d..4cda34501 100644 --- a/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 +++ b/data/src/scripts/skill_combat/scripts/npc/npc_combat.rs2 @@ -204,6 +204,13 @@ error("style of not defined in switch for npc_combat_defenceb // this should be strong queued. Some damage is queued, some isnt [queue,damage_player](int $damage) ~damage_self($damage); +if (inv_getobj(worn, ^wearpos_ring) = ring_of_recoil & npc_finduid(%aggressive_npc) = true & %npc_attacking_uid = uid & $damage > 0) { + // https://oldschool.runescape.wiki/w/Update:Clue_Scroll_Step_Counter + // - "Recoil damage will now always target the entity that caused the initial damage, rather than the most recent entity to deal damage." + def_int $recoil_damage = add(scale(10, 100, $damage), 1); + npc_queue(2, $recoil_damage, 0); + ~ring_of_recoil_lose_charge($recoil_damage); +} [proc,npc_retaliate](int $queue_delay) npc_queue(1, 0, $queue_delay); diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 index 73c4340ba..936f07118 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_combat.rs2 @@ -146,64 +146,49 @@ switch_int($damagestyle) { givexp(hitpoints, scale($multiplier, 1000, scale(133, 100, $base))); // needs to be a queue -[proc,.pvp_damage](int $damage) -~.damage_self($damage); -if (.stat(hitpoints) = 0) { - // todo: duel arena death in the death queue - if (~in_duel_arena = true) { - %duelstatus = 6; - .%duelstatus = 0; - .%duelpartner = null; - - .if_close; - .p_stopaction; - // .midi_jingle(^death_jingle_2, ^death_jingle_2_millis); - // .anim(human_death, 0); - // .p_delay(6); - .p_telejump(~duel_arena_finish_coord(.coord)); - ~.stat_reset_all; - .healenergy(10000); - ~.combat_clearqueue; - ~.clear_poison; - ~.update_all(.inv_getobj(worn, ^wearpos_rhand)); - .hint_stop; - def_int $i = 0; - while ($i < .inv_size(duel_arena_arrows)) { - if (.inv_getobj(duel_arena_arrows, $i) ! null) { - //mes(": "); - .inv_movefromslot(duel_arena_arrows, inv, $i); - } - $i = calc($i + 1); - } - - p_stopaction; - queue(duel_arena_finished, 0, .displayname, ~.player_combat_level); - ~duel_adjust_scoreboard(displayname, ~player_combat_level, .displayname, ~.player_combat_level); - p_delay(0); - if_close; - p_telejump(~duel_arena_finish_coord(coord)); - ~stat_reset_all; - healenergy(10000); - ~combat_clearqueue; - ~clear_poison; - ~update_all(inv_getobj(worn, ^wearpos_rhand)); - hint_stop; - return; - } - // these messages need to be in the death queue https://youtu.be/9Q8BbGi2VWg?t=136 - def_int $random = random(11); - switch_int($random) { - case 0 : mes("You have defeated <.displayname>."); - case 1 : mes("<.displayname> was no match for you."); - case 2 : mes("With a crushing blow you finish <.displayname>."); - case 3 : mes("Can anyone defeat you? Certainly not <.displayname>."); - case 4 : mes("<.displayname> regrets the day they met you in combat."); - case 5 : mes("It's all over for <.displayname>."); - case 6 : mes ("<.displayname> didn't stand a chance against you."); - case 7 : mes("A humiliating defeat for <.displayname>."); - case 8 : mes("<.displayname> falls before your might."); - case 9 : mes("<.displayname> has won a free ticket to Lumbridge."); - case 10 : mes("You were clearly a better fighter than <.displayname>."); - case default : mes("You have defeated <.displayname>."); - } +[queue,pvp_damage](int $damage) +if_close; +if ($damage > 0) { + damage(uid, 1, $damage); + ~human_hit_sound; +} else { + damage(uid, 0, 0); +} +if (inv_getobj(worn, ^wearpos_ring) = ring_of_recoil & .finduid(%pk_predator1) = true & $damage > 0) { + // https://oldschool.runescape.wiki/w/Update:Clue_Scroll_Step_Counter + // - "Recoil damage will now always target the entity that caused the initial damage, rather than the most recent entity to deal damage." + // Having it here instead of the opplayer2 trigger will allow this bug to occur + def_int $recoil_damage = add(scale(10, 100, $damage), 1); + queue2(recoil_damage, 0, $recoil_damage); + ~ring_of_recoil_lose_charge($recoil_damage); +} +if (stat(hitpoints) = 0 & getqueue(player_death) < 1) { + queue(player_death, 0); + return; +} + +~ring_of_life_check; + + +[queue,recoil_damage](int $damage) // seperate queue to avoid infinite recoil loop +~damage_self($damage); + +[proc,pvp_death_message](player_uid $opponent) +if (.finduid($opponent) = false) { + return; +} +def_int $random = random(11); +switch_int($random) { + case 0 : .mes("You have defeated ."); + case 1 : .mes(" was no match for you."); + case 2 : .mes("With a crushing blow you finish ."); + case 3 : .mes("Can anyone defeat you? Certainly not ."); + case 4 : .mes(" regrets the day they met you in combat."); + case 5 : .mes("It's all over for ."); + case 6 : .mes (" didn't stand a chance against you."); + case 7 : .mes("A humiliating defeat for ."); + case 8 : .mes(" falls before your might."); + case 9 : .mes(" has won a free ticket to Lumbridge."); + case 10 : .mes("You were clearly a better fighter than ."); + case default : .mes("You have defeated ."); } \ No newline at end of file diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 index 5bbd1b699..b041b3f25 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_magic.rs2 @@ -198,17 +198,17 @@ if (~.check_protect_prayer(^magic_style) = true) { def_int $damage = randominc($maxhit); // tick eating existed! https://oldschool.runescape.wiki/w/Update:The_Wintertodt $damage = min($damage, .stat(hitpoints)); if ($maxhit ! null) { - // .queue(pvp_damage, calc($duration / 30 + 1), $damage); // delayed an extra tick in osrs - if (.p_finduid(.uid) = true) { // todo: queue this - ~.pvp_damage($damage); - } + queue2(pvp_damage, calc($duration / 30 + 1), $damage); // delayed an extra tick in osrs // didnt have a flinch anim until sept 20 2006: https://oldschool.runescape.wiki/w/Update:Slug_Menace ~give_combat_experience_pvp(%damagestyle, $damage, ~pvp_xp_multiplier(~.player_combat_level)); } + +both_heropoints($damage); + // spell visual .spotanim_pl(db_getfield($spell_data, magic_spell_table:spotanim_target, 0), $duration); // auto retal -queue2(pvp_retaliate, 0, uid); +queue2(pvp_retaliate, calc($duration / 30 + 1), uid); [proc,pvp_spell_fail](dbrow $spell_data, int $duration) // splash diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 index 51447dcea..4c6a38be9 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_melee.rs2 @@ -35,19 +35,21 @@ sound_synth(%com_attacksound, 0, 0); .sound_synth(.%com_attacksound, 0, 0); queue2(pvp_retaliate, 0, uid); -if (.p_finduid(.uid) = true) { - ~.pvp_damage($damage); -} -// queue2(pvp_damage, calc($delay / 30), $damage); +queue2(pvp_damage, 0, $damage); + +both_heropoints($damage); .anim(.%com_defendanim, 20); // .sound_synth(.%com_defendsound, 0, 20); // sound_synth(.%com_defendsound, 0, 20); -// todo: heropoints def_obj $weapon = inv_getobj(worn, ^wearpos_rhand); if ($weapon = null) { %action_delay = add(map_clock, 4); } else { %action_delay = add(map_clock, oc_param($weapon, attackrate)); + def_int $poison_severity = oc_param($weapon, poison_severity); + if ($damage > 0 & $poison_severity > 0 & random(4) = 0) { // 1/4 chance to poison + queue2(poison_player, 0, $poison_severity); + } } \ No newline at end of file diff --git a/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 b/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 index 5e108039c..97e09aab6 100644 --- a/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 +++ b/data/src/scripts/skill_combat/scripts/pvp/pvp_ranged.rs2 @@ -43,32 +43,37 @@ if (~pvp_hit_roll(%damagetype) = true) { ~give_combat_experience_pvp(%damagestyle, $damage, ~pvp_xp_multiplier(~.player_combat_level)); } .if_close; -def_int $delay = add(~pvp_ranged_use_weapon($rhand, $ammo), 30); +def_int $delay = ~pvp_ranged_use_weapon($rhand, $ammo); anim(%com_attackanim, 0); sound_synth(%com_attacksound, 0, 0); .sound_synth(.%com_attacksound, 0, 0); queue2(pvp_retaliate, calc($delay / 30), uid); -if (.p_finduid(.uid) = true) { - ~.pvp_damage($damage); -} -// queue2(pvp_damage, calc($delay / 30), $damage); +queue2(pvp_damage, calc($delay / 30), $damage); + +both_heropoints($damage); -.anim(.%com_defendanim, 20); +.anim(.%com_defendanim, $delay); // .sound_synth(.%com_defendsound, 0, 20); // sound_synth(.%com_defendsound, 0, 20); -// todo: heropoints def_obj $weapon = inv_getobj(worn, ^wearpos_rhand); if ($weapon = null) { %action_delay = add(map_clock, 4); } else { %action_delay = add(map_clock, oc_param($weapon, attackrate)); + def_int $poison_severity = oc_param($weapon, poison_severity); + if ($damage > 0 & $poison_severity > 0 & random(4) = 0) { // 1/4 chance to poison + queue2(poison_player, 0, $poison_severity); + } +} +if (%damagestyle = ^style_ranged_rapid) { + %action_delay = sub(%action_delay, 1); } def_int $random = random(5); if (~in_duel_arena = true) { if ($random = 0) { - inv_del(duel_arena_arrows, $ammo, 1); + inv_del(tempinv, $ammo, 1); } } else if ($random ! 0) { world_delay(calc($delay / 30)); @@ -82,7 +87,7 @@ if (~in_duel_arena = true) { [proc,pvp_ranged_use_weapon](obj $rhand, obj $ammo)(int) spotanim_pl(oc_param($ammo, proj_launch), 96, 0); if (~in_duel_arena = true) { - inv_moveitem(worn, duel_arena_arrows, $ammo, 1); // give rangers their arrows back from duels + inv_moveitem(worn, tempinv, $ammo, 1); // give rangers their arrows back from duels } else { inv_del(worn, $ammo, 1); } diff --git a/data/src/scripts/skill_magic/scripts/spells/enchant.rs2 b/data/src/scripts/skill_magic/scripts/spells/enchant.rs2 index c73d19cd6..d96584bbc 100644 --- a/data/src/scripts/skill_magic/scripts/spells/enchant.rs2 +++ b/data/src/scripts/skill_magic/scripts/spells/enchant.rs2 @@ -118,3 +118,22 @@ if ($new_ring = null) { mes("Your ring of dueling has <~pluralise(oc_param($new_ring, charges), "use")> left."); } +[proc,ring_of_recoil_lose_charge](int $recoil_damage) +%ring_of_recoil = add(max(%ring_of_recoil, 0), $recoil_damage); +if (%ring_of_recoil >= 40) { + %ring_of_recoil = 0; + inv_delslot(worn, ^wearpos_ring); + mes("Your Ring of Recoil has shattered."); +} + +[proc,ring_of_life_check] +if (p_finduid(uid) = true) { + if (inv_getobj(worn, ^wearpos_ring) ! ring_of_life | ~wilderness_level(coord) > 30 | ~in_duel_arena = true) { + return; + } + if (stat(hitpoints) <= scale(10, 100, stat_base(hitpoints))) { + mes("Your Ring of Life saves you and is destroyed in the process."); + inv_delslot(worn, ^wearpos_ring); + ~player_teleport_normal(~coord_lineofwalk_radius(0_50_50_21_18, 2)); + } +} diff --git a/src/lostcity/engine/script/ScriptOpcode.ts b/src/lostcity/engine/script/ScriptOpcode.ts index da0ceb58f..d6ba51cef 100644 --- a/src/lostcity/engine/script/ScriptOpcode.ts +++ b/src/lostcity/engine/script/ScriptOpcode.ts @@ -186,6 +186,8 @@ enum ScriptOpcode { QUEUE2, // workaround until .queue is supported in compiler SETTIMER2, // workaround until .settimer is supported in compiler WALKTRIGGER2, // workaround until .walktrigger is supported in compiler + FINDHERO, // official + BOTH_HEROPOINTS, // official // Npc ops (2500-2999) NPC_ADD = 2500, // official diff --git a/src/lostcity/engine/script/ScriptOpcodePointers.ts b/src/lostcity/engine/script/ScriptOpcodePointers.ts index c16218d9f..a65062dcd 100644 --- a/src/lostcity/engine/script/ScriptOpcodePointers.ts +++ b/src/lostcity/engine/script/ScriptOpcodePointers.ts @@ -462,6 +462,15 @@ const ScriptOpcodePointers: { [ScriptOpcode.WEAKQUEUE]: { require: ['active_player'] }, + [ScriptOpcode.FINDHERO]: { + set: ['active_player2'], + set2: ['active_player'], + conditional: true + }, + [ScriptOpcode.BOTH_HEROPOINTS]: { + require: ['active_player', 'active_player2'], + require2: ['active_player2', 'active_player'] + }, // Npc ops [ScriptOpcode.NPC_ADD]: { diff --git a/src/lostcity/engine/script/handlers/InvOps.ts b/src/lostcity/engine/script/handlers/InvOps.ts index ac391982f..ef9c56a63 100644 --- a/src/lostcity/engine/script/handlers/InvOps.ts +++ b/src/lostcity/engine/script/handlers/InvOps.ts @@ -347,7 +347,11 @@ const InvOps: CommandHandlers = { return; } - state.activePlayer.invAdd(toInvType.id, objType.id, completed); + const overflow = count - state.activePlayer.invAdd(toInvType.id, objType.id, completed); + if (overflow > 0) { + const floorObj = new Obj(state.activePlayer.level, state.activePlayer.x, state.activePlayer.z, objType.id, overflow); + World.addObj(floorObj, state.activePlayer, 200); + } }), // inv write diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 4f28d8294..43d8ec691 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -412,6 +412,9 @@ const PlayerOps: CommandHandlers = { const current = player.levels[stat]; const added = current + (constant + (current * percent) / 100); player.levels[stat] = Math.min(added, 255); + if (stat === 3 && player.levels[3] >= player.baseLevels[3]) { + player.resetHeroPoints(); + } }), [ScriptOpcode.STAT_SUB]: checkedHandler(ActivePlayer, state => { @@ -447,6 +450,10 @@ const PlayerOps: CommandHandlers = { const current = player.levels[stat]; const healed = current + (constant + (current * percent) / 100); player.levels[stat] = Math.min(healed, base); + + if (stat === 3 && player.levels[3] >= player.baseLevels[3]) { + player.resetHeroPoints(); + } }), [ScriptOpcode.UID]: checkedHandler(ActivePlayer, state => { @@ -939,6 +946,30 @@ const PlayerOps: CommandHandlers = { state.activePlayer.stopAction(); state.activePlayer.setInteraction(Interaction.SCRIPT, target, ServerTriggerType.APPLAYERT, {type: -1, com: spellId}); }), + + [ScriptOpcode.FINDHERO]: checkedHandler(ActivePlayer, state => { + const uid = state.activePlayer.findHero(); + if (uid === -1) { + state.pushInt(0); + return; + } + + const player = World.getPlayerByUid(uid); + if (!player) { + state.pushInt(0); + return; + } + state._activePlayer2 = player; + state.pointerAdd(ScriptPointer.ActivePlayer2); + state.pushInt(1); + }), + + [ScriptOpcode.BOTH_HEROPOINTS]: checkedHandler([ScriptPointer.ActivePlayer, ScriptPointer.ActivePlayer2], state => { + if (!state._activePlayer2) { + return; + } + state.activePlayer.addHero(state._activePlayer2.uid, check(state.popInt(), NumberNotNull)); + }), }; /** diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index 2b20726c4..9ec725146 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -302,6 +302,11 @@ export default class Player extends PathingEntity { staffModLevel: number = 0; + heroPoints: { + uid: number; + points: number; + }[] = new Array(16); // be sure to reset when stats are recovered/reset + constructor(username: string, username37: bigint) { super(0, 3094, 3106, 1, 1, MoveRestrict.NORMAL, BlockWalk.NPC, Player.FACE_COORD, Player.FACE_ENTITY, true); // tutorial island. this.username = username; @@ -327,6 +332,35 @@ export default class Player extends PathingEntity { this.lastLevels.fill(-1); } + resetHeroPoints() { + this.heroPoints = new Array(16); + this.heroPoints.fill({ uid: -1, points: 0 }); + } + + addHero(uid: number, points: number) { + // check if hero already exists, then add points + const index = this.heroPoints.findIndex(hero => hero && hero.uid === uid); + if (index !== -1) { + this.heroPoints[index].points += points; + return; + } + + // otherwise, add a new uid. if all 16 spaces are taken do we replace the lowest? + const emptyIndex = this.heroPoints.findIndex(hero => hero && hero.uid === -1); + if (emptyIndex !== -1) { + this.heroPoints[emptyIndex] = { uid, points }; + return; + } + } + + findHero(): number { + // quicksort heroes by points + this.heroPoints.sort((a, b) => { + return b.points - a.points; + }); + return this.heroPoints[0]?.uid ?? -1; + } + resetEntity(respawn: boolean) { if (respawn) { // if needed for respawning @@ -350,6 +384,7 @@ export default class Player extends PathingEntity { this.writeHighPriority(ServerProt.UPDATE_UID192, this.pid); // todo: low or high priority this.unsetMapFlag(); this.writeHighPriority(ServerProt.RESET_ANIMS); // todo: low or high priority + this.resetHeroPoints(); this.writeHighPriority(ServerProt.RESET_CLIENT_VARCACHE); for (let varp = 0; varp < this.vars.length; varp++) { From 1a2a1a1b8fbe7b3dce9415f0ca08e4cb30ea6ac5 Mon Sep 17 00:00:00 2001 From: lesleyrs <19632758+lesleyrs@users.noreply.github.com> Date: Mon, 10 Jun 2024 07:15:53 +0200 Subject: [PATCH 46/50] fix: swap packet "index" (#560) --- src/lostcity/network/225/incoming/prot/ClientProt.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lostcity/network/225/incoming/prot/ClientProt.ts b/src/lostcity/network/225/incoming/prot/ClientProt.ts index 28772cc68..068b32d72 100644 --- a/src/lostcity/network/225/incoming/prot/ClientProt.ts +++ b/src/lostcity/network/225/incoming/prot/ClientProt.ts @@ -4,9 +4,9 @@ export default class ClientProt { static readonly REBUILD_GETMAPS = new ClientProt(4, 150, -1); - static readonly IDLE_TIMER = new ClientProt(6, 70, 0); + static readonly IDLE_TIMER = new ClientProt(30, 70, 0); - static readonly NO_TIMEOUT = new ClientProt(30, 108, 0); // NXT naming + static readonly NO_TIMEOUT = new ClientProt(6, 108, 0); // NXT naming static readonly EVENT_TRACKING = new ClientProt(34, 81, -2); static readonly EVENT_CAMERA_POSITION = new ClientProt(35, 189, 6); // NXT naming From dff7e53cc9ef7ca735cf793194b2d093e2dcc371 Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 10 Jun 2024 01:16:11 -0400 Subject: [PATCH 47/50] fix(engine): some zones bugs and npc bugs (#561) * fix(engine): some zones bugs and npc bugs * chore: merge from upstream --- .../scripts/_test/scripts/engine/debug.rs2 | 30 +++ src/lostcity/engine/GameMap.ts | 14 +- src/lostcity/engine/World.ts | 229 ++++++++++-------- .../engine/collision/CollisionManager.ts | 5 +- src/lostcity/engine/script/handlers/InvOps.ts | 19 +- src/lostcity/engine/script/handlers/LocOps.ts | 20 +- src/lostcity/engine/script/handlers/NpcOps.ts | 9 +- src/lostcity/engine/script/handlers/ObjOps.ts | 19 +- .../engine/script/handlers/ServerOps.ts | 2 +- src/lostcity/engine/zone/Zone.ts | 39 ++- src/lostcity/entity/Entity.ts | 40 ++- src/lostcity/entity/EntityLifeCycle.ts | 5 + src/lostcity/entity/Loc.ts | 5 +- src/lostcity/entity/Npc.ts | 8 +- src/lostcity/entity/Obj.ts | 13 +- src/lostcity/entity/PathingEntity.ts | 7 +- src/lostcity/entity/Player.ts | 7 +- src/lostcity/tools/server/drops.ts | 5 +- 18 files changed, 292 insertions(+), 184 deletions(-) create mode 100644 src/lostcity/entity/EntityLifeCycle.ts diff --git a/data/src/scripts/_test/scripts/engine/debug.rs2 b/data/src/scripts/_test/scripts/engine/debug.rs2 index 182a3206b..2252020f1 100644 --- a/data/src/scripts/_test/scripts/engine/debug.rs2 +++ b/data/src/scripts/_test/scripts/engine/debug.rs2 @@ -13,3 +13,33 @@ if (string_length($example2) > 0) { [label,please_finish] mes("Please finish what you are doing first."); + +[debugproc,test] +if (p_finduid(uid) = false) { + @please_finish; +} +obj_add(coord, coins, 1000, 30); + +obj_add(movecoord(coord, 1, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, 2, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, 3, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, 4, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, 5, 0, 0), coins, 1000, 30); + +obj_add(movecoord(coord, -1, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, -2, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, -3, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, -4, 0, 0), coins, 1000, 30); +obj_add(movecoord(coord, -5, 0, 0), coins, 1000, 30); + +obj_add(movecoord(coord, 0, 0, 1), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, 2), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, 3), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, 4), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, 5), coins, 1000, 30); + +obj_add(movecoord(coord, 0, 0, -1), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, -2), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, -3), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, -4), coins, 1000, 30); +obj_add(movecoord(coord, 0, 0, -5), coins, 1000, 30); \ No newline at end of file diff --git a/src/lostcity/engine/GameMap.ts b/src/lostcity/engine/GameMap.ts index c9480fbc3..32fedaf1c 100644 --- a/src/lostcity/engine/GameMap.ts +++ b/src/lostcity/engine/GameMap.ts @@ -3,15 +3,15 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; import NpcType from '#lostcity/cache/config/NpcType.js'; +import ObjType from '#lostcity/cache/config/ObjType.js'; import CollisionManager from '#lostcity/engine/collision/CollisionManager.js'; - import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; +import World from '#lostcity/engine/World.js'; import Npc from '#lostcity/entity/Npc.js'; import Obj from '#lostcity/entity/Obj.js'; -import World from '#lostcity/engine/World.js'; -import ObjType from '#lostcity/cache/config/ObjType.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; export default class GameMap { readonly collisionManager = new CollisionManager(); @@ -44,12 +44,12 @@ export default class GameMap { const size = npcType.size; - const npc = new Npc(level, mapsquareX + localX, mapsquareZ + localZ, size, size, World.getNextNid(), id, npcType.moverestrict, npcType.blockwalk); + const npc = new Npc(level, mapsquareX + localX, mapsquareZ + localZ, size, size, EntityLifeCycle.RESPAWN, World.getNextNid(), id, npcType.moverestrict, npcType.blockwalk); if (npcType.members && World.members) { - World.addNpc(npc); + World.addNpc(npc, -1); } else if (!npcType.members) { - World.addNpc(npc); + World.addNpc(npc, -1); } } } @@ -66,7 +66,7 @@ export default class GameMap { const objId = objMap.g2(); const objCount = objMap.g1(); - const obj = new Obj(level, mapsquareX + localX, mapsquareZ + localZ, objId, objCount); + const obj = new Obj(level, mapsquareX + localX, mapsquareZ + localZ, EntityLifeCycle.RESPAWN, objId, objCount); const objType = ObjType.get(objId); if (objType.members && World.members) { diff --git a/src/lostcity/engine/World.ts b/src/lostcity/engine/World.ts index 44df8f40a..d57cd3c14 100644 --- a/src/lostcity/engine/World.ts +++ b/src/lostcity/engine/World.ts @@ -48,24 +48,28 @@ import Loc from '#lostcity/entity/Loc.js'; import Npc from '#lostcity/entity/Npc.js'; import Obj from '#lostcity/entity/Obj.js'; import Player from '#lostcity/entity/Player.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import {NpcList, PlayerList} from '#lostcity/entity/EntityList.js'; +import { NetworkPlayer, isNetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; +import { EntityQueueState } from '#lostcity/entity/EntityQueueRequest.js'; +import { PlayerTimerType } from '#lostcity/entity/EntityTimer.js'; import ClientSocket from '#lostcity/server/ClientSocket.js'; import ServerProt from '#lostcity/server/ServerProt.js'; import Environment from '#lostcity/util/Environment.js'; -import { EntityQueueState } from '#lostcity/entity/EntityQueueRequest.js'; -import { PlayerTimerType } from '#lostcity/entity/EntityTimer.js'; import { getLatestModified, getModified, shouldBuildFileAny } from '#lostcity/util/PackFile.js'; -import { ZoneEvent } from './zone/Zone.js'; +import Zone, { ZoneEvent } from './zone/Zone.js'; import LinkList from '#jagex2/datastruct/LinkList.js'; -import { NetworkPlayer, isNetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { createWorker } from '#lostcity/util/WorkerFactory.js'; import {LoginResponse} from '#lostcity/server/LoginServer.js'; import ClientProt from '#lostcity/network/225/incoming/prot/ClientProt.js'; -import {NpcList, PlayerList} from '#lostcity/entity/EntityList.js'; import { makeCrcs } from '#lostcity/server/CrcTable.js'; import { preloadClient } from '#lostcity/server/PreloadedPacks.js'; +import * as rsmod from '@2004scape/rsmod-pathfinder'; +import * as console from 'console'; + class World { id = Environment.WORLD_ID as number; members = Environment.MEMBERS_WORLD as boolean; @@ -86,13 +90,16 @@ class World { vars: Int32Array = new Int32Array(); // var shared varsString: string[] = []; + // entities newPlayers: Player[] = []; // players joining at the end of this tick players: PlayerList = new PlayerList(2048); npcs: NpcList = new NpcList(8192); + // zones trackedZones: number[] = []; zoneBuffers: Map = new Map(); - futureUpdates: Map = new Map(); + futureUpdates: Map> = new Map(); + cleanUpdates: Map = new Map(); queue: LinkList = new LinkList(); devWatcher: Watcher | null = null; @@ -428,15 +435,18 @@ class World { } for (const npc of this.npcs) { - if (npc.respawn !== this.currentTick) { + if (!npc.updateLifeCycle(this.currentTick)) { continue; } - - this.addNpc(npc); + if (npc.lifecycle === EntityLifeCycle.RESPAWN) { + this.addNpc(npc, -1); + } else if (npc.lifecycle === EntityLifeCycle.DESPAWN) { + this.removeNpc(npc, -1); + } } for (const npc of this.npcs) { - if (npc.despawn !== -1 || npc.delayed()) { + if (!npc.checkLifeCycle(this.currentTick) || npc.delayed()) { continue; } @@ -473,7 +483,7 @@ class World { // - modes let npcProcessing = Date.now(); for (const npc of this.npcs) { - if (npc.despawn !== -1) { + if (!npc.checkLifeCycle(this.currentTick)) { continue; } @@ -490,7 +500,7 @@ class World { npc.executeScript(npc.activeScript); } - if (npc.despawn !== -1) { + if (!npc.checkLifeCycle(this.currentTick)) { // if the npc just despawned then don't do anything else. continue; } @@ -502,7 +512,7 @@ class World { npc.validateDistanceWalked(); } catch (err) { console.error(err); - this.removeNpc(npc); + this.removeNpc(npc, -1); } } npcProcessing = Date.now() - npcProcessing; @@ -657,61 +667,61 @@ class World { const future = this.futureUpdates.get(this.currentTick); if (future) { // despawn dynamic - for (let i = 0; i < future.length; i++) { - const zoneIndex = future[i]; + for (const [zoneIndex, events] of future.entries()) { const zone = this.getZoneIndex(zoneIndex); - for (let i = 0; i < zone.locs.length; i++) { const loc = zone.locs[i]; - if (!loc || loc.despawn === -1) { + if (!events || !loc || !loc.updateLifeCycle(this.currentTick)) { continue; } - if (loc.despawn === this.currentTick) { - this.removeLoc(loc, -1); - i--; + this.removeLoc(loc, -1); + i--; + const event = events.findIndex(g => g.type === ServerProt.LOC_ADD_CHANGE.id && g.subjectType === loc.type && g.x === loc.x && g.z === loc.z && g.layer === rsmod.locShapeLayer(loc.shape)); + if (event !== -1) { + this.addCleanupZoneUpdate(zone, events[event]); } } - for (let i = 0; i < zone.objs.length; i++) { const obj = zone.objs[i]; - if (!obj || obj.despawn === -1) { + if (!events || !obj || !obj.updateLifeCycle(this.currentTick)) { continue; } - - if (obj.despawn === this.currentTick) { - this.removeObj(obj, null); - i--; + this.removeObj(obj, null, -1); + i--; + const event = events.findIndex(g => g.type === ServerProt.OBJ_ADD.id && g.subjectType === obj.type && g.x === obj.x && g.z === obj.z); + if (event !== -1) { + this.addCleanupZoneUpdate(zone, events[event]); } } } // respawn static - for (let i = 0; i < future.length; i++) { - const zoneIndex = future[i]; + for (const [zoneIndex, events] of future.entries()) { const zone = this.getZoneIndex(zoneIndex); - for (let i = 0; i < zone.staticLocs.length; i++) { const loc = zone.staticLocs[i]; - if (!loc || loc.respawn === -1) { + if (!events || !loc || !loc.updateLifeCycle(this.currentTick)) { continue; } - if (loc.respawn === this.currentTick) { - loc.respawn = -1; - this.addLoc(loc, -1); + this.addLoc(loc, -1); + const event = events.findIndex(g => g.type === ServerProt.LOC_DEL.id && g.subjectType === loc.type && g.x === loc.x && g.z === loc.z && g.layer === rsmod.locShapeLayer(loc.shape)); + if (event !== -1) { + this.addCleanupZoneUpdate(zone, events[event]); } } for (let i = 0; i < zone.staticObjs.length; i++) { const obj = zone.staticObjs[i]; - if (!obj || obj.respawn === -1) { + if (!events || !obj || !obj.updateLifeCycle(this.currentTick)) { continue; } - if (obj.respawn === this.currentTick) { - obj.respawn = -1; - this.addObj(obj, null, -1); + this.addObj(obj, null, -1); + const event = events.findIndex(g => g.type === ServerProt.OBJ_DEL.id && g.subjectType === obj.type && g.x === obj.x && g.z === obj.z); + if (event !== -1) { + this.addCleanupZoneUpdate(zone, events[event]); } } } @@ -753,8 +763,22 @@ class World { } clientOutput = Date.now() - clientOutput; - // reset entity masks let cleanup = Date.now(); + // cleanup zone updates + for (const [zoneIndex, zoneEvents] of this.cleanUpdates.entries()) { + if (zoneEvents === undefined) { + continue; + } + const zone: Zone = this.getZoneIndex(zoneIndex); + for (let i: number = 0; i < zoneEvents.length; i++) { + zone.updates = zone.updates.filter(x => { + return x !== zoneEvents[i]; + }); + } + } + this.cleanUpdates.clear(); + + // reset entity masks for (const player of this.players) { player.resetEntity(false); @@ -768,7 +792,7 @@ class World { } for (const npc of this.npcs) { - if (npc.despawn !== -1) { + if (!npc.checkLifeCycle(this.currentTick)) { continue; } @@ -977,7 +1001,7 @@ class World { return this.getZone(x, z, level).npcs; } - addNpc(npc: Npc) { + addNpc(npc: Npc, duration: number) { this.npcs.set(npc.nid, npc); npc.x = npc.startX; npc.z = npc.startZ; @@ -997,9 +1021,11 @@ class World { npc.resetEntity(true); npc.playAnimation(-1, 0); + + npc.setLifeCycle(this.currentTick + duration); } - removeNpc(npc: Npc) { + removeNpc(npc: Npc, duration: number) { const zone = this.getZone(npc.x, npc.z, npc.level); console.log('Removing npc', npc.nid, 'from zone', zone.index); zone.leave(npc); @@ -1014,12 +1040,10 @@ class World { break; } - const type = NpcType.get(npc.type); - npc.despawn = this.currentTick; - npc.respawn = this.currentTick + type.respawnrate; - - if (!npc.static) { + if (npc.lifecycle === EntityLifeCycle.DESPAWN) { this.npcs.remove(npc.nid); + } else if (npc.lifecycle === EntityLifeCycle.RESPAWN) { + npc.setLifeCycle(this.currentTick + duration); } } @@ -1028,7 +1052,7 @@ class World { } getZoneLocs(x: number, z: number, level: number) { - return [...this.getZone(x, z, level).staticLocs.filter(l => l.respawn < this.currentTick), ...this.getZone(x, z, level).locs]; + return [...this.getZone(x, z, level).staticLocs.filter(l => l.checkLifeCycle(this.currentTick)), ...this.getZone(x, z, level).locs]; } getDynObj(x: number, z: number, level: number, objId: number) { @@ -1041,104 +1065,101 @@ class World { addLoc(loc: Loc, duration: number) { const zone = this.getZone(loc.x, loc.z, loc.level); - zone.addLoc(loc, duration); + const event: ZoneEvent = zone.addLoc(loc); const type = LocType.get(loc.type); if (type.blockwalk) { this.collisionManager.changeLocCollision(loc.shape, loc.angle, type.blockrange, type.length, type.width, type.active, loc.x, loc.z, loc.level, true); } - loc.despawn = this.currentTick + duration; - loc.respawn = -1; + loc.setLifeCycle(this.currentTick + duration); if (duration !== -1) { - const endTick = this.currentTick + duration; - let future = this.futureUpdates.get(endTick); - if (!future) { - future = []; - } - - if (!future.includes(zone.index)) { - future.push(zone.index); - } - - this.futureUpdates.set(endTick, future); + this.addFutureZoneUpdate(zone, event, this.currentTick + duration); + } else { + this.addCleanupZoneUpdate(zone, event); } } removeLoc(loc: Loc, duration: number) { const zone = this.getZone(loc.x, loc.z, loc.level); - zone.removeLoc(loc, duration); + const event: ZoneEvent = zone.removeLoc(loc); const type = LocType.get(loc.type); if (type.blockwalk) { this.collisionManager.changeLocCollision(loc.shape, loc.angle, type.blockrange, type.length, type.width, type.active, loc.x, loc.z, loc.level, false); } - loc.despawn = -1; - loc.respawn = this.currentTick + duration; + loc.setLifeCycle(this.currentTick + duration); if (duration !== -1) { - const endTick = this.currentTick + duration; - let future = this.futureUpdates.get(endTick); - if (!future) { - future = []; - } - - if (!future.includes(zone.index)) { - future.push(zone.index); - } + this.addFutureZoneUpdate(zone, event, this.currentTick + duration); + } else { + this.addCleanupZoneUpdate(zone, event); + } - this.futureUpdates.set(endTick, future); + const event2 = zone.updates.findIndex(g => g.type === ServerProt.LOC_ADD_CHANGE.id && g.subjectType === loc.type && g.x === loc.x && g.z === loc.z); + if (event2 !== -1) { + this.addCleanupZoneUpdate(zone, zone.updates[event2]); } } addObj(obj: Obj, receiver: Player | null, duration: number) { const zone = this.getZone(obj.x, obj.z, obj.level); - const existing = this.getDynObj(obj.x, obj.z, obj.level, obj.id); + const existing = this.getDynObj(obj.x, obj.z, obj.level, obj.type); const global: boolean = zone.staticObjs.includes(obj); - if (!global && existing && existing.id == obj.id) { + if (!global && existing && existing.type == obj.type) { const type = ObjType.get(obj.type); const nextCount = obj.count + existing.count; if (type.stackable && nextCount <= Inventory.STACK_LIMIT) { // if an obj of the same type exists and is stackable, then we merge them. obj.count = nextCount; - zone.removeObj(existing, receiver); + this.removeObj(existing, receiver, -1); } } - zone.addObj(obj, receiver, duration); + const event: ZoneEvent = zone.addObj(obj, receiver); - obj.despawn = this.currentTick + duration; - obj.respawn = -1; + obj.setLifeCycle(this.currentTick + duration); if (duration !== -1) { - const endTick = this.currentTick + duration; - let future = this.futureUpdates.get(endTick); - if (!future) { - future = []; - } - - if (!future.includes(zone.index)) { - future.push(zone.index); - } - - this.futureUpdates.set(endTick, future); + this.addFutureZoneUpdate(zone, event, this.currentTick + duration); + } else { + this.addCleanupZoneUpdate(zone, event); } } - removeObj(obj: Obj, receiver: Player | null) { + removeObj(obj: Obj, receiver: Player | null, duration: number) { // stackable objs when they overflow are created into another slot on the floor const zone = this.getZone(obj.x, obj.z, obj.level); - zone.removeObj(obj, receiver); - obj.despawn = this.currentTick; - obj.respawn = this.currentTick + ObjType.get(obj.type).respawnrate; - if (zone.staticObjs.includes(obj)) { - let future = this.futureUpdates.get(obj.respawn); - if (!future) { - future = []; - } - if (!future.includes(zone.index)) { - future.push(zone.index); - } - this.futureUpdates.set(obj.respawn, future); + const event: ZoneEvent = zone.removeObj(obj, receiver); + + obj.setLifeCycle(this.currentTick + duration); + if (duration !== -1) { + this.addFutureZoneUpdate(zone, event, this.currentTick + duration); + } else { + this.addCleanupZoneUpdate(zone, event); + } + + const event2 = zone.updates.findIndex(g => g.type === ServerProt.OBJ_ADD.id && g.subjectType === obj.type && g.x === obj.x && g.z === obj.z); + if (event2 !== -1) { + this.addCleanupZoneUpdate(zone, zone.updates[event2]); + } + } + + private addFutureZoneUpdate(zone: Zone, event: ZoneEvent, tick: number): void { + let future = this.futureUpdates.get(tick); + if (!future) { + future = new Map(); + } + if (!future.has(zone.index)) { + future.set(zone.index, []); + } + future.set(zone.index, future.get(zone.index)?.concat([event])); + this.futureUpdates.set(tick, future); + } + + private addCleanupZoneUpdate(zone: Zone, event: ZoneEvent): void { + if (!this.cleanUpdates.has(zone.index)) { + this.cleanUpdates.set(zone.index, []); } + this.cleanUpdates.set(zone.index, this.cleanUpdates.get(zone.index)?.concat([event])); } // ---- diff --git a/src/lostcity/engine/collision/CollisionManager.ts b/src/lostcity/engine/collision/CollisionManager.ts index 5d28389f6..24be733aa 100644 --- a/src/lostcity/engine/collision/CollisionManager.ts +++ b/src/lostcity/engine/collision/CollisionManager.ts @@ -3,8 +3,11 @@ import fs from 'fs'; import Packet from '#jagex2/io/Packet.js'; import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; + import LocType from '#lostcity/cache/config/LocType.js'; + import Loc from '#lostcity/entity/Loc.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; import {LocAngle, LocLayer} from '@2004scape/rsmod-pathfinder'; @@ -190,7 +193,7 @@ export default class CollisionManager { const absoluteX: number = x + mapsquareX; const absoluteZ: number = z + mapsquareZ; - zoneManager.getZone(absoluteX, absoluteZ, actualLevel).addStaticLoc(new Loc(actualLevel, absoluteX, absoluteZ, width, length, locId, shape, angle)); + zoneManager.getZone(absoluteX, absoluteZ, actualLevel).addStaticLoc(new Loc(actualLevel, absoluteX, absoluteZ, width, length, EntityLifeCycle.RESPAWN, locId, shape, angle)); if (type.blockwalk) { this.changeLocCollision(shape, angle, type.blockrange, length, width, type.active, absoluteX, absoluteZ, actualLevel, true); diff --git a/src/lostcity/engine/script/handlers/InvOps.ts b/src/lostcity/engine/script/handlers/InvOps.ts index ef9c56a63..e56d13940 100644 --- a/src/lostcity/engine/script/handlers/InvOps.ts +++ b/src/lostcity/engine/script/handlers/InvOps.ts @@ -5,15 +5,16 @@ import CategoryType from '#lostcity/cache/config/CategoryType.js'; import World from '#lostcity/engine/World.js'; import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; -import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; +import {CommandHandlers} from '#lostcity/engine/script/ScriptRunner.js'; import {ActivePlayer, checkedHandler, ProtectedActivePlayer} from '#lostcity/engine/script/ScriptPointer.js'; import Obj from '#lostcity/entity/Obj.js'; -import { Position } from '#lostcity/entity/Position.js'; +import {Position} from '#lostcity/entity/Position.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import { - check, CategoryTypeValid, + check, CoordValid, DurationValid, InvTypeValid, @@ -72,7 +73,7 @@ const InvOps: CommandHandlers = { const player = state.activePlayer; const overflow = count - player.invAdd(invType.id, objType.id, count); if (overflow > 0) { - const floorObj = new Obj(player.level, player.x, player.z, objType.id, overflow); + const floorObj = new Obj(player.level, player.x, player.z, EntityLifeCycle.DESPAWN, objType.id, overflow); World.addObj(floorObj, player, 200); } @@ -150,7 +151,7 @@ const InvOps: CommandHandlers = { player.playerLog('Dropped item from', invType.debugname as string, objType.debugname as string); - const floorObj = new Obj(position.level, position.x, position.z, objType.id, completed); + const floorObj = new Obj(position.level, position.x, position.z, EntityLifeCycle.DESPAWN, objType.id, completed); World.addObj(floorObj, player, duration); }), @@ -180,7 +181,7 @@ const InvOps: CommandHandlers = { const objType = ObjType.get(obj.id); player.playerLog('Dropped item from', invType.debugname as string, objType.debugname as string); - const floorObj = new Obj(position.level, position.x, position.z, obj.id, completed); + const floorObj = new Obj(position.level, position.x, position.z, EntityLifeCycle.DESPAWN, obj.id, completed); World.addObj(floorObj, player, duration); }), @@ -251,7 +252,7 @@ const InvOps: CommandHandlers = { const player = state.activePlayer; const { overflow, fromObj } = player.invMoveFromSlot(fromInvType.id, toInvType.id, fromSlot); if (overflow > 0) { - const floorObj = new Obj(player.level, player.x, player.z, fromObj, overflow); + const floorObj = new Obj(player.level, player.x, player.z, EntityLifeCycle.DESPAWN, fromObj, overflow); World.addObj(floorObj, player, 200); } @@ -349,7 +350,7 @@ const InvOps: CommandHandlers = { const overflow = count - state.activePlayer.invAdd(toInvType.id, objType.id, completed); if (overflow > 0) { - const floorObj = new Obj(state.activePlayer.level, state.activePlayer.x, state.activePlayer.z, objType.id, overflow); + const floorObj = new Obj(state.activePlayer.level, state.activePlayer.x, state.activePlayer.z, EntityLifeCycle.DESPAWN, objType.id, overflow); World.addObj(floorObj, state.activePlayer, 200); } }), @@ -382,7 +383,7 @@ const InvOps: CommandHandlers = { } const overflow = count - state.activePlayer.invAdd(toInvType.id, finalObj, completed); if (overflow > 0) { - const floorObj = new Obj(state.activePlayer.level, state.activePlayer.x, state.activePlayer.z, finalObj, overflow); + const floorObj = new Obj(state.activePlayer.level, state.activePlayer.x, state.activePlayer.z, EntityLifeCycle.DESPAWN, finalObj, overflow); World.addObj(floorObj, state.activePlayer, 200); } diff --git a/src/lostcity/engine/script/handlers/LocOps.ts b/src/lostcity/engine/script/handlers/LocOps.ts index bb99d8bf7..1402e3d3d 100644 --- a/src/lostcity/engine/script/handlers/LocOps.ts +++ b/src/lostcity/engine/script/handlers/LocOps.ts @@ -9,9 +9,11 @@ import ScriptOpcode from '#lostcity/engine/script/ScriptOpcode.js'; import ScriptPointer, {ActiveLoc, checkedHandler} from '#lostcity/engine/script/ScriptPointer.js'; import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import {LocIterator} from '#lostcity/engine/script/ScriptIterators.js'; +import Zone from '#lostcity/engine/zone/Zone.js'; import Loc from '#lostcity/entity/Loc.js'; import { Position } from '#lostcity/entity/Position.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import { check, @@ -36,8 +38,18 @@ const LocOps: CommandHandlers = { const locShape: LocShape = check(shape, LocShapeValid); check(duration, DurationValid); - const loc = new Loc(position.level, position.x, position.z, locType.width, locType.length, locType.id, locShape, locAngle); - World.addLoc(loc, duration); + const zone: Zone = World.getZone(position.x, position.z, position.level); + + let loc: Loc; + const staticLoc: number = zone.staticLocs.findIndex(loc => loc.type === locType.id && loc.angle === locAngle && loc.shape === locShape && loc.x === position.x && loc.z === position.z && !loc.checkLifeCycle(World.currentTick)); + if (staticLoc === -1) { + loc = new Loc(position.level, position.x, position.z, locType.width, locType.length, EntityLifeCycle.DESPAWN, locType.id, locShape, locAngle); + World.addLoc(loc, duration); + } else { + loc = zone.staticLocs[staticLoc]; + World.addLoc(loc, -1); + } + state.activeLoc = loc; state.pointerAdd(ActiveLoc[state.intOperand]); }, @@ -65,7 +77,7 @@ const LocOps: CommandHandlers = { World.removeLoc(state.activeLoc, duration); - const loc = new Loc(state.activeLoc.level, state.activeLoc.x, state.activeLoc.z, locType.width, locType.length, id, state.activeLoc.shape, state.activeLoc.angle); + const loc = new Loc(state.activeLoc.level, state.activeLoc.x, state.activeLoc.z, locType.width, locType.length, EntityLifeCycle.DESPAWN, id, state.activeLoc.shape, state.activeLoc.angle); World.addLoc(loc, duration); state.activeLoc = loc; state.pointerAdd(ActiveLoc[state.intOperand]); @@ -87,7 +99,7 @@ const LocOps: CommandHandlers = { const position: Position = check(coord, CoordValid); const loc = World.getLoc(position.x, position.z, position.level, locType.id); - if (!loc || loc.respawn !== -1) { + if (!loc) { state.pushInt(0); return; } diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index c78e4fe09..3cf79055a 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -22,6 +22,7 @@ import NpcMode from '#lostcity/entity/NpcMode.js'; import Entity from '#lostcity/entity/Entity.js'; import Interaction from '#lostcity/entity/Interaction.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import Environment from '#lostcity/util/Environment.js'; @@ -65,10 +66,8 @@ const NpcOps: CommandHandlers = { const npcType: NpcType = check(id, NpcTypeValid); check(duration, DurationValid); - const npc = new Npc(position.level, position.x, position.z, npcType.size, npcType.size, World.getNextNid(), npcType.id, npcType.moverestrict, npcType.blockwalk); - npc.static = false; - npc.despawn = World.currentTick + duration; - World.addNpc(npc); + const npc = new Npc(position.level, position.x, position.z, npcType.size, npcType.size, EntityLifeCycle.DESPAWN, World.getNextNid(), npcType.id, npcType.moverestrict, npcType.blockwalk); + World.addNpc(npc, duration); state.activeNpc = npc; state.pointerAdd(ActiveNpc[state.intOperand]); }, @@ -100,7 +99,7 @@ const NpcOps: CommandHandlers = { return; } - World.removeNpc(state.activeNpc); + World.removeNpc(state.activeNpc, check(state.activeNpc.type, NpcTypeValid).respawnrate); }), [ScriptOpcode.NPC_DELAY]: checkedHandler(ActiveNpc, state => { diff --git a/src/lostcity/engine/script/handlers/ObjOps.ts b/src/lostcity/engine/script/handlers/ObjOps.ts index 5f981ebcc..b82c00e61 100644 --- a/src/lostcity/engine/script/handlers/ObjOps.ts +++ b/src/lostcity/engine/script/handlers/ObjOps.ts @@ -11,6 +11,7 @@ import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import Obj from '#lostcity/entity/Obj.js'; import { Position } from '#lostcity/entity/Position.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import Environment from '#lostcity/util/Environment.js'; @@ -41,7 +42,7 @@ const ObjOps: CommandHandlers = { throw new Error(`attempted to add dummy item: ${objType.debugname}`); } - const obj: Obj = new Obj(position.level, position.x, position.z, objId, count); + const obj: Obj = new Obj(position.level, position.x, position.z, EntityLifeCycle.DESPAWN, objId, count); World.addObj(obj, state.activePlayer, duration); state.activeObj = obj; state.pointerAdd(ActiveObj[state.intOperand]); @@ -73,10 +74,11 @@ const ObjOps: CommandHandlers = { }, [ScriptOpcode.OBJ_DEL]: state => { + const duration: number = ObjType.get(state.activeObj.type).respawnrate; if (state.pointerGet(ActivePlayer[state.intOperand])) { - World.removeObj(state.activeObj, state.activePlayer); + World.removeObj(state.activeObj, state.activePlayer, duration); } else { - World.removeObj(state.activeObj, null); + World.removeObj(state.activeObj, null, duration); } }, @@ -92,12 +94,17 @@ const ObjOps: CommandHandlers = { const invType: InvType = check(state.popInt(), InvTypeValid); const obj = state.activeObj; - if (World.getObj(obj.x, obj.z, obj.level, obj.id)) { + if (World.getObj(obj.x, obj.z, obj.level, obj.type)) { const objType = ObjType.get(obj.type); state.activePlayer.playerLog('Picked up item', objType.debugname as string); - state.activePlayer.invAdd(invType.id, obj.id, obj.count); - World.removeObj(obj, state.activePlayer); + state.activePlayer.invAdd(invType.id, obj.type, obj.count); + + if (World.getZone(obj.x, obj.z, obj.level).staticObjs.includes(obj)) { + World.removeObj(obj, state.activePlayer, objType.respawnrate); + } else { + World.removeObj(obj, state.activePlayer, -1); + } } }, diff --git a/src/lostcity/engine/script/handlers/ServerOps.ts b/src/lostcity/engine/script/handlers/ServerOps.ts index de979ddeb..6bcbfc8ed 100644 --- a/src/lostcity/engine/script/handlers/ServerOps.ts +++ b/src/lostcity/engine/script/handlers/ServerOps.ts @@ -355,7 +355,7 @@ const ServerOps: CommandHandlers = { const layer = rsmod.locShapeLayer(loc.shape); - if (loc.respawn !== -1 && layer === LocLayer.WALL) { + if (!loc.checkLifeCycle(World.currentTick) && layer === LocLayer.WALL) { continue; } diff --git a/src/lostcity/engine/zone/Zone.ts b/src/lostcity/engine/zone/Zone.ts index 98da79904..19ce09a35 100644 --- a/src/lostcity/engine/zone/Zone.ts +++ b/src/lostcity/engine/zone/Zone.ts @@ -1,11 +1,15 @@ import Packet from '#jagex2/io/Packet.js'; + import Loc from '#lostcity/entity/Loc.js'; import Npc from '#lostcity/entity/Npc.js'; import Obj from '#lostcity/entity/Obj.js'; import Player from '#lostcity/entity/Player.js'; +import PathingEntity from '#lostcity/entity/PathingEntity.js'; + import ServerProt from '#lostcity/server/ServerProt.js'; + import World from '#lostcity/engine/World.js'; -import PathingEntity from '#lostcity/entity/PathingEntity.js'; + import * as rsmod from '@2004scape/rsmod-pathfinder'; export class ZoneEvent { @@ -13,6 +17,7 @@ export class ZoneEvent { receiverId = -1; buffer: Packet = new Packet(new Uint8Array()); tick = -1; + subjectType = -1; static = false; // temp @@ -236,7 +241,7 @@ export default class Zone { this.staticObjs.push(obj); const event = new ZoneEvent(ServerProt.OBJ_ADD.id); - event.buffer = Zone.objAdd(obj.x, obj.z, obj.id, obj.count); + event.buffer = Zone.objAdd(obj.x, obj.z, obj.type, obj.count); event.tick = World.currentTick; event.static = true; this.updates.push(event); @@ -245,9 +250,8 @@ export default class Zone { // ---- - addLoc(loc: Loc, duration: number) { + addLoc(loc: Loc): ZoneEvent { if (this.staticLocs.indexOf(loc) === -1) { - loc.despawn = World.currentTick + duration; this.locs.push(loc); } @@ -257,6 +261,7 @@ export default class Zone { event.z = loc.z; event.tick = World.currentTick; event.layer = rsmod.locShapeLayer(loc.shape); + event.subjectType = loc.type; this.updates = this.updates.filter(event => { if (event.x === loc.x && event.z === loc.z && event.layer === rsmod.locShapeLayer(loc.shape)) { @@ -268,9 +273,10 @@ export default class Zone { this.updates.push(event); this.lastEvent = World.currentTick; + return event; } - removeLoc(loc: Loc, duration: number) { + removeLoc(loc: Loc): ZoneEvent { const event = new ZoneEvent(ServerProt.LOC_DEL.id); const dynamicIndex = this.locs.indexOf(loc); @@ -278,7 +284,6 @@ export default class Zone { this.locs.splice(dynamicIndex, 1); } else { // static locs remain forever in memory, just create a zone event - loc.respawn = World.currentTick + duration; event.static = true; } @@ -287,6 +292,7 @@ export default class Zone { event.z = loc.z; event.tick = World.currentTick; event.layer = rsmod.locShapeLayer(loc.shape); + event.subjectType = loc.type; this.updates = this.updates.filter(event => { if (event.x === loc.x && event.z === loc.z && event.layer === rsmod.locShapeLayer(loc.shape)) { @@ -298,6 +304,7 @@ export default class Zone { this.updates.push(event); this.lastEvent = World.currentTick; + return event; } getLoc(x: number, z: number, type: number): Loc | null { @@ -306,7 +313,7 @@ export default class Zone { return this.locs[dynamicLoc]; } - const staticLoc = this.staticLocs.findIndex(loc => loc.x === x && loc.z === z && loc.type === type && loc.respawn < World.currentTick); + const staticLoc = this.staticLocs.findIndex(loc => loc.x === x && loc.z === z && loc.type === type && loc.checkLifeCycle(World.currentTick)); if (staticLoc !== -1) { return this.staticLocs[staticLoc]; } @@ -322,6 +329,7 @@ export default class Zone { event.z = loc.z; event.tick = World.currentTick; event.layer = rsmod.locShapeLayer(loc.shape); + event.subjectType = loc.type; this.updates.push(event); this.lastEvent = World.currentTick; @@ -335,6 +343,7 @@ export default class Zone { event.z = loc.z; event.tick = World.currentTick; event.layer = rsmod.locShapeLayer(loc.shape); + event.subjectType = loc.type; this.updates.push(event); this.lastEvent = World.currentTick; @@ -342,10 +351,9 @@ export default class Zone { // ---- - addObj(obj: Obj, receiver: Player | null, duration: number) { + addObj(obj: Obj, receiver: Player | null): ZoneEvent { const event = new ZoneEvent(ServerProt.OBJ_ADD.id); if (this.staticObjs.indexOf(obj) === -1) { - obj.despawn = World.currentTick + duration; this.objs.push(obj); } else { event.static = true; @@ -354,16 +362,18 @@ export default class Zone { if (receiver) { event.receiverId = receiver.uid; } - event.buffer = Zone.objAdd(obj.x, obj.z, obj.id, obj.count); + event.buffer = Zone.objAdd(obj.x, obj.z, obj.type, obj.count); event.x = obj.x; event.z = obj.z; event.tick = World.currentTick; + event.subjectType = obj.type; this.updates.push(event); this.lastEvent = World.currentTick; + return event; } - removeObj(obj: Obj, receiver: Player | null) { + removeObj(obj: Obj, receiver: Player | null): ZoneEvent { const event = new ZoneEvent(ServerProt.OBJ_DEL.id); const dynamicIndex = this.objs.indexOf(obj); @@ -375,14 +385,17 @@ export default class Zone { } } - event.buffer = Zone.objDel(obj.x, obj.z, obj.id, obj.count); + event.buffer = Zone.objDel(obj.x, obj.z, obj.type, obj.count); event.x = obj.x; event.z = obj.z; event.tick = World.currentTick; + event.subjectType = obj.type; this.updates.push(event); this.lastEvent = World.currentTick; + return event; } + getDynObj(x: number, z: number, type: number): Obj | null { const dynamicObj = this.objs.findIndex(obj => obj.x === x && obj.z === z && obj.type === type); if (dynamicObj !== -1) { @@ -397,7 +410,7 @@ export default class Zone { return dynamicObj; } - const staticObj = this.staticObjs.findIndex(obj => obj.x === x && obj.z === z && obj.type === type && obj.respawn < World.currentTick); + const staticObj = this.staticObjs.findIndex(obj => obj.x === x && obj.z === z && obj.type === type && obj.checkLifeCycle(World.currentTick)); if (staticObj !== -1) { return this.staticObjs[staticObj]; } diff --git a/src/lostcity/entity/Entity.ts b/src/lostcity/entity/Entity.ts index 3d930634f..0f453ed91 100644 --- a/src/lostcity/entity/Entity.ts +++ b/src/lostcity/entity/Entity.ts @@ -1,24 +1,46 @@ +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; + export default abstract class Entity { - // position + // constructor level: number; x: number; z: number; + readonly width: number; + readonly length: number; + readonly lifecycle: EntityLifeCycle; - // size - width: number = 1; - length: number = 1; - - // runtime variables - despawn: number = -1; - respawn: number = -1; + // runtime + lifecycleTick: number = 0; - protected constructor(level: number, x: number, z: number, width: number, length: number) { + protected constructor(level: number, x: number, z: number, width: number, length: number, lifecycle: EntityLifeCycle) { this.level = level; this.x = x; this.z = z; this.width = width; this.length = length; + this.lifecycle = lifecycle; } abstract resetEntity(respawn: boolean): void; + + updateLifeCycle(tick: number): boolean { + return this.lifecycleTick === tick && this.lifecycle !== EntityLifeCycle.FOREVER; + } + + checkLifeCycle(tick: number): boolean { + if (this.lifecycle === EntityLifeCycle.FOREVER) { + return true; + } + if (this.lifecycle === EntityLifeCycle.RESPAWN) { + return this.lifecycleTick < tick; + } + if (this.lifecycle === EntityLifeCycle.DESPAWN) { + return this.lifecycleTick > tick; + } + return false; + } + + setLifeCycle(tick: number): void { + this.lifecycleTick = tick; + } } diff --git a/src/lostcity/entity/EntityLifeCycle.ts b/src/lostcity/entity/EntityLifeCycle.ts new file mode 100644 index 000000000..f1b5533fa --- /dev/null +++ b/src/lostcity/entity/EntityLifeCycle.ts @@ -0,0 +1,5 @@ +export enum EntityLifeCycle { + FOREVER, // never respawns or despawns, is always in the world. + RESPAWN, // entity added from engine that respawns later. + DESPAWN // entity added from script that despawns later. +} diff --git a/src/lostcity/entity/Loc.ts b/src/lostcity/entity/Loc.ts index 147494c94..e165f7cfb 100644 --- a/src/lostcity/entity/Loc.ts +++ b/src/lostcity/entity/Loc.ts @@ -1,11 +1,12 @@ import NonPathingEntity from '#lostcity/entity/NonPathingEntity.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; export default class Loc extends NonPathingEntity { // constructor properties private readonly info: number; - constructor(level: number, x: number, z: number, width: number, length: number, type: number, shape: number, angle: number) { - super(level, x, z, width, length); + constructor(level: number, x: number, z: number, width: number, length: number, lifecycle: EntityLifeCycle, type: number, shape: number, angle: number) { + super(level, x, z, width, length, lifecycle); // 16383, 31, 3 this.info = (type & 0x3fff) | (shape & 0x1f) << 14 | (angle & 0x3) << 19; } diff --git a/src/lostcity/entity/Npc.ts b/src/lostcity/entity/Npc.ts index e827be4b2..3281f576c 100644 --- a/src/lostcity/entity/Npc.ts +++ b/src/lostcity/entity/Npc.ts @@ -32,6 +32,7 @@ import {HuntIterator} from '#lostcity/engine/script/ScriptIterators.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import Entity from '#lostcity/entity/Entity.js'; import Interaction from '#lostcity/entity/Interaction.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; import {CollisionFlag, CollisionType} from '@2004scape/rsmod-pathfinder'; @@ -63,7 +64,6 @@ export default class Npc extends PathingEntity { baseLevels: Uint8Array; // runtime variables - static: boolean = true; // static (map) or dynamic (scripted) npc vars: Int32Array; varsString: string[]; @@ -86,8 +86,8 @@ export default class Npc extends PathingEntity { points: number; }[] = new Array(16); // be sure to reset when stats are recovered/reset - constructor(level: number, x: number, z: number, width: number, length: number, nid: number, type: number, moveRestrict: MoveRestrict, blockWalk: BlockWalk) { - super(level, x, z, width, length, moveRestrict, blockWalk, Npc.FACE_COORD, Npc.FACE_ENTITY, false); + constructor(level: number, x: number, z: number, width: number, length: number, lifecycle: EntityLifeCycle, nid: number, type: number, moveRestrict: MoveRestrict, blockWalk: BlockWalk) { + super(level, x, z, width, length, lifecycle, moveRestrict, blockWalk, Npc.FACE_COORD, Npc.FACE_ENTITY, false); this.nid = nid; this.type = type; this.uid = (type << 16) | nid; @@ -165,8 +165,6 @@ export default class Npc extends PathingEntity { if (respawn) { this.type = this.origType; this.uid = (this.type << 16) | this.nid; - this.despawn = -1; - this.respawn = -1; this.orientation = Direction.SOUTH; for (let index = 0; index < this.baseLevels.length; index++) { this.levels[index] = this.baseLevels[index]; diff --git a/src/lostcity/entity/Obj.ts b/src/lostcity/entity/Obj.ts index 7f9d3f6bd..15f3c7737 100644 --- a/src/lostcity/entity/Obj.ts +++ b/src/lostcity/entity/Obj.ts @@ -1,21 +1,14 @@ import NonPathingEntity from '#lostcity/entity/NonPathingEntity.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; export default class Obj extends NonPathingEntity { // constructor properties type: number; count: number; - constructor(level: number, x: number, z: number, type: number, count: number) { - super(level, x, z, 1, 1); + constructor(level: number, x: number, z: number, lifecycle: EntityLifeCycle, type: number, count: number) { + super(level, x, z, 1, 1, lifecycle); this.type = type; this.count = count; } - - static clone(obj: Obj) { - return new Obj(obj.level, obj.x, obj.z, obj.type, obj.count); - } - - get id() { - return this.type; - } } diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 6a60a0678..4b4bd831b 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -1,4 +1,5 @@ import World from '#lostcity/engine/World.js'; +import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import BlockWalk from '#lostcity/entity/BlockWalk.js'; import Entity from '#lostcity/entity/Entity.js'; @@ -10,9 +11,9 @@ import NpcMode from '#lostcity/entity/NpcMode.js'; import MoveRestrict from '#lostcity/entity/MoveRestrict.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import { Direction, Position } from '#lostcity/entity/Position.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import LocType from '#lostcity/cache/config/LocType.js'; -import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; import {CollisionFlag, CollisionType} from '@2004scape/rsmod-pathfinder'; @@ -79,8 +80,8 @@ export default abstract class PathingEntity extends Entity { graphicHeight: number = -1; graphicDelay: number = -1; - protected constructor(level: number, x: number, z: number, width: number, length: number, moveRestrict: MoveRestrict, blockWalk: BlockWalk, coordmask: number, entitymask: number, smart: boolean) { - super(level, x, z, width, length); + protected constructor(level: number, x: number, z: number, width: number, length: number, lifecycle: EntityLifeCycle, moveRestrict: MoveRestrict, blockWalk: BlockWalk, coordmask: number, entitymask: number, smart: boolean) { + super(level, x, z, width, length, lifecycle); this.moveRestrict = moveRestrict; this.blockWalk = blockWalk; this.coordmask = coordmask; diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index 9ec725146..c9795c0b5 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -24,6 +24,8 @@ import Obj from '#lostcity/entity/Obj.js'; import PathingEntity from '#lostcity/entity/PathingEntity.js'; import { Position } from '#lostcity/entity/Position.js'; import CameraInfo from '#lostcity/entity/CameraInfo.js'; +import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import ServerProt, { ServerProtEncoders } from '#lostcity/server/ServerProt.js'; @@ -45,7 +47,6 @@ import Stack from '#jagex2/datastruct/Stack.js'; import {CollisionFlag} from '@2004scape/rsmod-pathfinder'; import { PRELOADED, PRELOADED_CRC } from '#lostcity/server/PreloadedPacks.js'; -import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; const levelExperience = new Int32Array(99); @@ -308,7 +309,7 @@ export default class Player extends PathingEntity { }[] = new Array(16); // be sure to reset when stats are recovered/reset constructor(username: string, username37: bigint) { - super(0, 3094, 3106, 1, 1, MoveRestrict.NORMAL, BlockWalk.NPC, Player.FACE_COORD, Player.FACE_ENTITY, true); // tutorial island. + super(0, 3094, 3106, 1, 1, EntityLifeCycle.FOREVER, MoveRestrict.NORMAL, BlockWalk.NPC, Player.FACE_COORD, Player.FACE_ENTITY, true); // tutorial island. this.username = username; this.username37 = username37; this.displayName = toDisplayName(username); @@ -1536,7 +1537,7 @@ export default class Player extends PathingEntity { for (const nid of npcs) { const npc = World.getNpc(nid); - if (npc === null || npc.despawn !== -1 || npc.x < absLeftX || npc.x >= absRightX || npc.z >= absTopZ || npc.z < absBottomZ) { + if (npc === null || !npc.checkLifeCycle(World.currentTick) || npc.x < absLeftX || npc.x >= absRightX || npc.z >= absTopZ || npc.z < absBottomZ) { continue; } diff --git a/src/lostcity/tools/server/drops.ts b/src/lostcity/tools/server/drops.ts index 4e00ab23e..adf659773 100644 --- a/src/lostcity/tools/server/drops.ts +++ b/src/lostcity/tools/server/drops.ts @@ -9,6 +9,7 @@ import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import Npc from '#lostcity/entity/Npc.js'; import { PlayerLoading } from '#lostcity/entity/PlayerLoading.js'; import ObjType from '#lostcity/cache/config/ObjType.js'; +import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; import Environment from '#lostcity/util/Environment.js'; @@ -45,8 +46,8 @@ if (!deathScript) { process.exit(1); } -const npc = new Npc(0, 3222, 3221, 1, 1, World.getNextNid(), npcType.id, npcType.moverestrict, npcType.blockwalk); -World.addNpc(npc); +const npc = new Npc(0, 3222, 3221, 1, 1, EntityLifeCycle.RESPAWN, World.getNextNid(), npcType.id, npcType.moverestrict, npcType.blockwalk); +World.addNpc(npc, -1); npc.addHero(player.uid, 1); for (let i = 0; i < iterations; i++) { From ac60c2ab265dfa1f47b223d01ccc110bc4bd4519 Mon Sep 17 00:00:00 2001 From: lesleyrs <19632758+lesleyrs@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:58:18 +0200 Subject: [PATCH 48/50] fix: reorder packets and fix typo (#563) --- neptune.toml | 2 +- src/lostcity/network/225/incoming/prot/ClientProt.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neptune.toml b/neptune.toml index 540de8468..a0354e63f 100644 --- a/neptune.toml +++ b/neptune.toml @@ -8,7 +8,7 @@ symbols = ["data/symbols/"] # compile time cost. check_pointers = true -# Bianry file writer configuration +# Binary file writer configuration [writer.binary] # The output path output = "data/pack/server" diff --git a/src/lostcity/network/225/incoming/prot/ClientProt.ts b/src/lostcity/network/225/incoming/prot/ClientProt.ts index 068b32d72..3aade8cab 100644 --- a/src/lostcity/network/225/incoming/prot/ClientProt.ts +++ b/src/lostcity/network/225/incoming/prot/ClientProt.ts @@ -4,10 +4,10 @@ export default class ClientProt { static readonly REBUILD_GETMAPS = new ClientProt(4, 150, -1); - static readonly IDLE_TIMER = new ClientProt(30, 70, 0); - static readonly NO_TIMEOUT = new ClientProt(6, 108, 0); // NXT naming + static readonly IDLE_TIMER = new ClientProt(30, 70, 0); + static readonly EVENT_TRACKING = new ClientProt(34, 81, -2); static readonly EVENT_CAMERA_POSITION = new ClientProt(35, 189, 6); // NXT naming From b1ca87438b0ebeeb78c1bc52e0a2aca57ef1f655 Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 10 Jun 2024 13:58:25 -0400 Subject: [PATCH 49/50] refactor(engine): additional enum types for some script validators (#562) * refactor(engine): additional enums for script validators * refactor: cleanup Npc imports * refactor: cleanup PlayerOps imports --- src/lostcity/engine/GameMap.ts | 2 +- src/lostcity/engine/World.ts | 3 +- .../engine/collision/CollisionManager.ts | 2 +- .../engine/script/ScriptValidators.ts | 10 ++- src/lostcity/engine/script/handlers/InvOps.ts | 2 +- src/lostcity/engine/script/handlers/LocOps.ts | 2 +- src/lostcity/engine/script/handlers/NpcOps.ts | 2 +- src/lostcity/engine/script/handlers/ObjOps.ts | 2 +- .../engine/script/handlers/PlayerOps.ts | 12 ++-- src/lostcity/entity/Entity.ts | 2 +- src/lostcity/entity/EntityLifeCycle.ts | 4 +- src/lostcity/entity/HitType.ts | 7 ++ src/lostcity/entity/Loc.ts | 2 +- src/lostcity/entity/Npc.ts | 41 +++++------ src/lostcity/entity/NpcStat.ts | 10 +++ src/lostcity/entity/Obj.ts | 2 +- src/lostcity/entity/PathingEntity.ts | 2 +- src/lostcity/entity/Player.ts | 70 +++++++------------ src/lostcity/entity/PlayerLoading.ts | 8 ++- src/lostcity/entity/PlayerStat.ts | 25 +++++++ .../incoming/handler/ClientCheatHandler.ts | 3 +- src/lostcity/tools/server/drops.ts | 2 +- 22 files changed, 120 insertions(+), 95 deletions(-) create mode 100644 src/lostcity/entity/HitType.ts create mode 100644 src/lostcity/entity/NpcStat.ts create mode 100644 src/lostcity/entity/PlayerStat.ts diff --git a/src/lostcity/engine/GameMap.ts b/src/lostcity/engine/GameMap.ts index 32fedaf1c..7aeea6c35 100644 --- a/src/lostcity/engine/GameMap.ts +++ b/src/lostcity/engine/GameMap.ts @@ -11,7 +11,7 @@ import World from '#lostcity/engine/World.js'; import Npc from '#lostcity/entity/Npc.js'; import Obj from '#lostcity/entity/Obj.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; export default class GameMap { readonly collisionManager = new CollisionManager(); diff --git a/src/lostcity/engine/World.ts b/src/lostcity/engine/World.ts index d57cd3c14..3d0908a49 100644 --- a/src/lostcity/engine/World.ts +++ b/src/lostcity/engine/World.ts @@ -48,7 +48,7 @@ import Loc from '#lostcity/entity/Loc.js'; import Npc from '#lostcity/entity/Npc.js'; import Obj from '#lostcity/entity/Obj.js'; import Player from '#lostcity/entity/Player.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import {NpcList, PlayerList} from '#lostcity/entity/EntityList.js'; import { NetworkPlayer, isNetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { EntityQueueState } from '#lostcity/entity/EntityQueueRequest.js'; @@ -68,7 +68,6 @@ import { makeCrcs } from '#lostcity/server/CrcTable.js'; import { preloadClient } from '#lostcity/server/PreloadedPacks.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; -import * as console from 'console'; class World { id = Environment.WORLD_ID as number; diff --git a/src/lostcity/engine/collision/CollisionManager.ts b/src/lostcity/engine/collision/CollisionManager.ts index 24be733aa..601559da5 100644 --- a/src/lostcity/engine/collision/CollisionManager.ts +++ b/src/lostcity/engine/collision/CollisionManager.ts @@ -7,7 +7,7 @@ import ZoneManager from '#lostcity/engine/zone/ZoneManager.js'; import LocType from '#lostcity/cache/config/LocType.js'; import Loc from '#lostcity/entity/Loc.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; import {LocAngle, LocLayer} from '@2004scape/rsmod-pathfinder'; diff --git a/src/lostcity/engine/script/ScriptValidators.ts b/src/lostcity/engine/script/ScriptValidators.ts index c331af22d..db926f829 100644 --- a/src/lostcity/engine/script/ScriptValidators.ts +++ b/src/lostcity/engine/script/ScriptValidators.ts @@ -23,6 +23,9 @@ import MesanimType from '#lostcity/cache/config/MesanimType.js'; import StructType from '#lostcity/cache/config/StructType.js'; import DbRowType from '#lostcity/cache/config/DbRowType.js'; import DbTableType from '#lostcity/cache/config/DbTableType.js'; +import NpcStat from '#lostcity/entity/NpcStat.js'; +import HitType from '#lostcity/entity/HitType.js'; +import PlayerStat from '#lostcity/entity/PlayerStat.js'; interface ScriptValidator { validate(input: T): R; @@ -96,11 +99,12 @@ export const DurationValid: ScriptValidator = new ScriptInputRan export const CoordValid: ScriptValidator = new ScriptInputCoordValidator(0, 2147483647, 'Coord'); export const ParamTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(ParamType.get, (input: number) => input >= 0 && input < ParamType.count, 'Param'); export const NpcTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(NpcType.get, (input: number) => input >= 0 && input < NpcType.count, 'Npc'); -export const NpcStatValid: ScriptValidator = new ScriptInputRangeValidator(0, 6, 'NpcStat'); +export const NpcStatValid: ScriptValidator = new ScriptInputRangeValidator(NpcStat.HITPOINTS, NpcStat.RANGED, 'NpcStat'); +export const PlayerStatValid: ScriptValidator = new ScriptInputRangeValidator(PlayerStat.ATTACK, PlayerStat.RUNECRAFT, 'PlayerStat'); export const QueueValid: ScriptValidator = new ScriptInputRangeValidator(0, 19, 'AIQueue'); export const HuntTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(HuntType.get, (input: number) => input >= 0 && input < HuntType.count, 'Hunt'); -export const NpcModeValid: ScriptValidator = new ScriptInputRangeValidator(NpcMode.NULL, NpcMode.APNPC5, 'NpcMode'); -export const HitTypeValid: ScriptValidator = new ScriptInputRangeValidator(0, 2, 'Hit'); +export const NpcModeValid: ScriptValidator = new ScriptInputRangeValidator(NpcMode.NULL, NpcMode.APNPC5, 'NpcMode'); +export const HitTypeValid: ScriptValidator = new ScriptInputRangeValidator(HitType.BLOCK, HitType.POISON, 'Hit'); export const SpotAnimTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(SpotanimType.get, (input: number) => input >= 0 && input < SpotanimType.count, 'Spotanim'); export const EnumTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(EnumType.get, (input: number) => input >= 0 && input < EnumType.count, 'Enum'); export const ObjTypeValid: ScriptValidator = new ScriptInputConfigTypeValidator(ObjType.get, (input: number) => input >= 0 && input < ObjType.count, 'Obj'); diff --git a/src/lostcity/engine/script/handlers/InvOps.ts b/src/lostcity/engine/script/handlers/InvOps.ts index e56d13940..a0deb3449 100644 --- a/src/lostcity/engine/script/handlers/InvOps.ts +++ b/src/lostcity/engine/script/handlers/InvOps.ts @@ -10,7 +10,7 @@ import {ActivePlayer, checkedHandler, ProtectedActivePlayer} from '#lostcity/eng import Obj from '#lostcity/entity/Obj.js'; import {Position} from '#lostcity/entity/Position.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import { CategoryTypeValid, diff --git a/src/lostcity/engine/script/handlers/LocOps.ts b/src/lostcity/engine/script/handlers/LocOps.ts index 1402e3d3d..369a59a46 100644 --- a/src/lostcity/engine/script/handlers/LocOps.ts +++ b/src/lostcity/engine/script/handlers/LocOps.ts @@ -13,7 +13,7 @@ import Zone from '#lostcity/engine/zone/Zone.js'; import Loc from '#lostcity/entity/Loc.js'; import { Position } from '#lostcity/entity/Position.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import { check, diff --git a/src/lostcity/engine/script/handlers/NpcOps.ts b/src/lostcity/engine/script/handlers/NpcOps.ts index 3cf79055a..4443cefd7 100644 --- a/src/lostcity/engine/script/handlers/NpcOps.ts +++ b/src/lostcity/engine/script/handlers/NpcOps.ts @@ -22,7 +22,7 @@ import NpcMode from '#lostcity/entity/NpcMode.js'; import Entity from '#lostcity/entity/Entity.js'; import Interaction from '#lostcity/entity/Interaction.js'; import HuntVis from '#lostcity/entity/hunt/HuntVis.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import Environment from '#lostcity/util/Environment.js'; diff --git a/src/lostcity/engine/script/handlers/ObjOps.ts b/src/lostcity/engine/script/handlers/ObjOps.ts index b82c00e61..0529dfc8e 100644 --- a/src/lostcity/engine/script/handlers/ObjOps.ts +++ b/src/lostcity/engine/script/handlers/ObjOps.ts @@ -11,7 +11,7 @@ import { CommandHandlers } from '#lostcity/engine/script/ScriptRunner.js'; import Obj from '#lostcity/entity/Obj.js'; import { Position } from '#lostcity/entity/Position.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import Environment from '#lostcity/util/Environment.js'; diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index 43d8ec691..caffa2234 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -16,6 +16,7 @@ import { isNetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import { Position } from '#lostcity/entity/Position.js'; import CameraInfo from '#lostcity/entity/CameraInfo.js'; import Interaction from '#lostcity/entity/Interaction.js'; +import PlayerStat from '#lostcity/entity/PlayerStat.js'; import ServerProt from '#lostcity/server/ServerProt.js'; @@ -33,6 +34,7 @@ import { NpcTypeValid, NumberNotNull, ObjTypeValid, + PlayerStatValid, SeqTypeValid, SpotAnimTypeValid, StringNotNull, @@ -390,13 +392,13 @@ const PlayerOps: CommandHandlers = { }), [ScriptOpcode.STAT]: checkedHandler(ActivePlayer, state => { - const stat = check(state.popInt(), NumberNotNull); + const stat: PlayerStat = check(state.popInt(), PlayerStatValid); state.pushInt(state.activePlayer.levels[stat]); }), [ScriptOpcode.STAT_BASE]: checkedHandler(ActivePlayer, state => { - const stat = check(state.popInt(), NumberNotNull); + const stat: PlayerStat = check(state.popInt(), PlayerStatValid); state.pushInt(state.activePlayer.baseLevels[stat]); }), @@ -404,7 +406,7 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.STAT_ADD]: checkedHandler(ActivePlayer, state => { const [stat, constant, percent] = state.popInts(3); - check(stat, NumberNotNull); + check(stat, PlayerStatValid); check(constant, NumberNotNull); check(percent, NumberNotNull); @@ -420,7 +422,7 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.STAT_SUB]: checkedHandler(ActivePlayer, state => { const [stat, constant, percent] = state.popInts(3); - check(stat, NumberNotNull); + check(stat, PlayerStatValid); check(constant, NumberNotNull); check(percent, NumberNotNull); @@ -441,7 +443,7 @@ const PlayerOps: CommandHandlers = { [ScriptOpcode.STAT_HEAL]: checkedHandler(ActivePlayer, state => { const [stat, constant, percent] = state.popInts(3); - check(stat, NumberNotNull); + check(stat, PlayerStatValid); check(constant, NumberNotNull); check(percent, NumberNotNull); diff --git a/src/lostcity/entity/Entity.ts b/src/lostcity/entity/Entity.ts index 0f453ed91..6a388c7ae 100644 --- a/src/lostcity/entity/Entity.ts +++ b/src/lostcity/entity/Entity.ts @@ -1,4 +1,4 @@ -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; export default abstract class Entity { // constructor diff --git a/src/lostcity/entity/EntityLifeCycle.ts b/src/lostcity/entity/EntityLifeCycle.ts index f1b5533fa..1a344e746 100644 --- a/src/lostcity/entity/EntityLifeCycle.ts +++ b/src/lostcity/entity/EntityLifeCycle.ts @@ -1,5 +1,7 @@ -export enum EntityLifeCycle { +enum EntityLifeCycle { FOREVER, // never respawns or despawns, is always in the world. RESPAWN, // entity added from engine that respawns later. DESPAWN // entity added from script that despawns later. } + +export default EntityLifeCycle; diff --git a/src/lostcity/entity/HitType.ts b/src/lostcity/entity/HitType.ts new file mode 100644 index 000000000..3bc331e9c --- /dev/null +++ b/src/lostcity/entity/HitType.ts @@ -0,0 +1,7 @@ +enum HitType { + BLOCK, + DAMAGE, + POISON +} + +export default HitType; \ No newline at end of file diff --git a/src/lostcity/entity/Loc.ts b/src/lostcity/entity/Loc.ts index e165f7cfb..31a7932c5 100644 --- a/src/lostcity/entity/Loc.ts +++ b/src/lostcity/entity/Loc.ts @@ -1,5 +1,5 @@ import NonPathingEntity from '#lostcity/entity/NonPathingEntity.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; export default class Loc extends NonPathingEntity { // constructor properties diff --git a/src/lostcity/entity/Npc.ts b/src/lostcity/entity/Npc.ts index 3281f576c..3c4a16eb5 100644 --- a/src/lostcity/entity/Npc.ts +++ b/src/lostcity/entity/Npc.ts @@ -32,26 +32,20 @@ import {HuntIterator} from '#lostcity/engine/script/ScriptIterators.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import Entity from '#lostcity/entity/Entity.js'; import Interaction from '#lostcity/entity/Interaction.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; +import NpcStat from '#lostcity/entity/NpcStat.js'; import * as rsmod from '@2004scape/rsmod-pathfinder'; import {CollisionFlag, CollisionType} from '@2004scape/rsmod-pathfinder'; export default class Npc extends PathingEntity { - static ANIM = 0x2; - static FACE_ENTITY = 0x4; - static SAY = 0x8; - static DAMAGE = 0x10; - static CHANGE_TYPE = 0x20; - static SPOTANIM = 0x40; - static FACE_COORD = 0x80; - - static HITPOINTS = 0; - static ATTACK = 1; - static STRENGTH = 2; - static DEFENCE = 3; - static MAGIC = 4; - static RANGED = 5; + static readonly ANIM = 0x2; + static readonly FACE_ENTITY = 0x4; + static readonly SAY = 0x8; + static readonly DAMAGE = 0x10; + static readonly CHANGE_TYPE = 0x20; + static readonly SPOTANIM = 0x40; + static readonly FACE_COORD = 0x80; // constructor properties nid: number; @@ -60,8 +54,8 @@ export default class Npc extends PathingEntity { origType: number; startX: number; startZ: number; - levels: Uint8Array; - baseLevels: Uint8Array; + levels: Uint8Array = new Uint8Array(6); + baseLevels: Uint8Array = new Uint8Array(6); // runtime variables vars: Int32Array; @@ -97,9 +91,6 @@ export default class Npc extends PathingEntity { const npcType = NpcType.get(type); - this.levels = new Uint8Array(6); - this.baseLevels = new Uint8Array(6); - for (let index = 0; index < npcType.stats.length; index++) { const level = npcType.stats[index]; this.levels[index] = level; @@ -812,12 +803,12 @@ export default class Npc extends PathingEntity { this.damageTaken = damage; this.damageType = type; - const current = this.levels[Npc.HITPOINTS]; + const current = this.levels[NpcStat.HITPOINTS]; if (current - damage <= 0) { - this.levels[Npc.HITPOINTS] = 0; + this.levels[NpcStat.HITPOINTS] = 0; this.damageTaken = current; } else { - this.levels[Npc.HITPOINTS] = current - damage; + this.levels[NpcStat.HITPOINTS] = current - damage; } this.mask |= Npc.DAMAGE; @@ -917,8 +908,8 @@ export default class Npc extends PathingEntity { if (mask & Npc.DAMAGE) { out.p1(this.damageTaken); out.p1(this.damageType); - out.p1(this.levels[Npc.HITPOINTS]); - out.p1(this.baseLevels[Npc.HITPOINTS]); + out.p1(this.levels[NpcStat.HITPOINTS]); + out.p1(this.baseLevels[NpcStat.HITPOINTS]); } if (mask & Npc.CHANGE_TYPE) { diff --git a/src/lostcity/entity/NpcStat.ts b/src/lostcity/entity/NpcStat.ts new file mode 100644 index 000000000..c94c0c18b --- /dev/null +++ b/src/lostcity/entity/NpcStat.ts @@ -0,0 +1,10 @@ +enum NpcStat { + HITPOINTS, + ATTACK, + STRENGTH, + DEFENCE, + MAGIC, + RANGED +} + +export default NpcStat; \ No newline at end of file diff --git a/src/lostcity/entity/Obj.ts b/src/lostcity/entity/Obj.ts index 15f3c7737..f47a67c7f 100644 --- a/src/lostcity/entity/Obj.ts +++ b/src/lostcity/entity/Obj.ts @@ -1,5 +1,5 @@ import NonPathingEntity from '#lostcity/entity/NonPathingEntity.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; export default class Obj extends NonPathingEntity { // constructor properties diff --git a/src/lostcity/entity/PathingEntity.ts b/src/lostcity/entity/PathingEntity.ts index 4b4bd831b..b926521d1 100644 --- a/src/lostcity/entity/PathingEntity.ts +++ b/src/lostcity/entity/PathingEntity.ts @@ -11,7 +11,7 @@ import NpcMode from '#lostcity/entity/NpcMode.js'; import MoveRestrict from '#lostcity/entity/MoveRestrict.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; import { Direction, Position } from '#lostcity/entity/Position.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import LocType from '#lostcity/cache/config/LocType.js'; diff --git a/src/lostcity/entity/Player.ts b/src/lostcity/entity/Player.ts index c9795c0b5..b8ecc43b4 100644 --- a/src/lostcity/entity/Player.ts +++ b/src/lostcity/entity/Player.ts @@ -25,7 +25,8 @@ import PathingEntity from '#lostcity/entity/PathingEntity.js'; import { Position } from '#lostcity/entity/Position.js'; import CameraInfo from '#lostcity/entity/CameraInfo.js'; import MoveSpeed from '#lostcity/entity/MoveSpeed.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; +import PlayerStat from '#lostcity/entity/PlayerStat.js'; import ServerProt, { ServerProtEncoders } from '#lostcity/server/ServerProt.js'; @@ -73,35 +74,16 @@ export function getExpByLevel(level: number) { } export default class Player extends PathingEntity { - static APPEARANCE = 0x1; - static ANIM = 0x2; - static FACE_ENTITY = 0x4; - static SAY = 0x8; - static DAMAGE = 0x10; - static FACE_COORD = 0x20; - static CHAT = 0x40; - static SPOTANIM = 0x100; - static EXACT_MOVE = 0x200; - - static ATTACK = 0; - static DEFENCE = 1; - static STRENGTH = 2; - static HITPOINTS = 3; - static RANGED = 4; - static PRAYER = 5; - static MAGIC = 6; - static COOKING = 7; - static WOODCUTTING = 8; - static FLETCHING = 9; - static FISHING = 10; - static FIREMAKING = 11; - static CRAFTING = 12; - static SMITHING = 13; - static MINING = 14; - static HERBLORE = 15; - static AGILITY = 16; - static THIEVING = 17; - static RUNECRAFT = 20; + static readonly APPEARANCE = 0x1; + static readonly ANIM = 0x2; + static readonly FACE_ENTITY = 0x4; + static readonly SAY = 0x8; + static readonly DAMAGE = 0x10; + static readonly FACE_COORD = 0x20; + static readonly CHAT = 0x40; + static readonly BIG_UPDATE = 0x80; + static readonly SPOTANIM = 0x100; + static readonly EXACT_MOVE = 0x200; static SKILLS = [ 'attack', @@ -524,7 +506,7 @@ export default class Player extends PathingEntity { } if (!this.delayed() && (!moved || this.moveSpeed !== MoveSpeed.RUN) && this.runenergy < 10000) { - const recovered = this.baseLevels[Player.AGILITY] / 9 + 8; + const recovered = this.baseLevels[PlayerStat.AGILITY] / 9 + 8; this.runenergy = Math.min(this.runenergy + recovered, 10000); } @@ -1256,10 +1238,10 @@ export default class Player extends PathingEntity { } getCombatLevel() { - const base = 0.25 * (this.baseLevels[Player.DEFENCE] + this.baseLevels[Player.HITPOINTS] + Math.floor(this.baseLevels[Player.PRAYER] / 2)); - const melee = 0.325 * (this.baseLevels[Player.ATTACK] + this.baseLevels[Player.STRENGTH]); - const range = 0.325 * (Math.floor(this.baseLevels[Player.RANGED] / 2) + this.baseLevels[Player.RANGED]); - const magic = 0.325 * (Math.floor(this.baseLevels[Player.MAGIC] / 2) + this.baseLevels[Player.MAGIC]); + const base = 0.25 * (this.baseLevels[PlayerStat.DEFENCE] + this.baseLevels[PlayerStat.HITPOINTS] + Math.floor(this.baseLevels[PlayerStat.PRAYER] / 2)); + const melee = 0.325 * (this.baseLevels[PlayerStat.ATTACK] + this.baseLevels[PlayerStat.STRENGTH]); + const range = 0.325 * (Math.floor(this.baseLevels[PlayerStat.RANGED] / 2) + this.baseLevels[PlayerStat.RANGED]); + const magic = 0.325 * (Math.floor(this.baseLevels[PlayerStat.MAGIC] / 2) + this.baseLevels[PlayerStat.MAGIC]); return Math.floor(base + Math.max(melee, range, magic)); } @@ -1353,7 +1335,7 @@ export default class Player extends PathingEntity { } if (mask > 0xff) { - mask |= 0x80; + mask |= Player.BIG_UPDATE; } if (self && mask & Player.CHAT) { @@ -1362,7 +1344,7 @@ export default class Player extends PathingEntity { } length += 1; - if (mask & 0x80) { + if (mask & Player.BIG_UPDATE) { length += 1; } @@ -1420,7 +1402,7 @@ export default class Player extends PathingEntity { } if (mask > 0xff) { - mask |= 0x80; + mask |= Player.BIG_UPDATE; } if (self && mask & Player.CHAT) { @@ -1429,7 +1411,7 @@ export default class Player extends PathingEntity { } out.p1(mask & 0xff); - if (mask & 0x80) { + if (mask & Player.BIG_UPDATE) { out.p1(mask >> 8); } @@ -1458,8 +1440,8 @@ export default class Player extends PathingEntity { if (mask & Player.DAMAGE) { out.p1(this.damageTaken); out.p1(this.damageType); - out.p1(this.levels[Player.HITPOINTS]); - out.p1(this.baseLevels[Player.HITPOINTS]); + out.p1(this.levels[PlayerStat.HITPOINTS]); + out.p1(this.baseLevels[PlayerStat.HITPOINTS]); } if (mask & Player.FACE_COORD) { @@ -2088,12 +2070,12 @@ export default class Player extends PathingEntity { this.damageTaken = damage; this.damageType = type; - const current = this.levels[Player.HITPOINTS]; + const current = this.levels[PlayerStat.HITPOINTS]; if (current - damage <= 0) { - this.levels[Player.HITPOINTS] = 0; + this.levels[PlayerStat.HITPOINTS] = 0; this.damageTaken = current; } else { - this.levels[Player.HITPOINTS] = current - damage; + this.levels[PlayerStat.HITPOINTS] = current - damage; } this.mask |= Player.DAMAGE; diff --git a/src/lostcity/entity/PlayerLoading.ts b/src/lostcity/entity/PlayerLoading.ts index b309ab6fc..086eb350b 100644 --- a/src/lostcity/entity/PlayerLoading.ts +++ b/src/lostcity/entity/PlayerLoading.ts @@ -10,6 +10,8 @@ import World from '#lostcity/engine/World.js'; import { NetworkPlayer } from '#lostcity/entity/NetworkPlayer.js'; import Player, { getExpByLevel, getLevelByExp } from '#lostcity/entity/Player.js'; +import PlayerStat from '#lostcity/entity/PlayerStat.js'; + import Environment from '#lostcity/util/Environment.js'; export class PlayerLoading { @@ -48,9 +50,9 @@ export class PlayerLoading { } // hitpoints starts at level 10 - player.stats[Player.HITPOINTS] = getExpByLevel(10); - player.baseLevels[Player.HITPOINTS] = 10; - player.levels[Player.HITPOINTS] = 10; + player.stats[PlayerStat.HITPOINTS] = getExpByLevel(10); + player.baseLevels[PlayerStat.HITPOINTS] = 10; + player.levels[PlayerStat.HITPOINTS] = 10; return player; } diff --git a/src/lostcity/entity/PlayerStat.ts b/src/lostcity/entity/PlayerStat.ts new file mode 100644 index 000000000..1983d9d44 --- /dev/null +++ b/src/lostcity/entity/PlayerStat.ts @@ -0,0 +1,25 @@ +enum PlayerStat { + ATTACK, + DEFENCE, + STRENGTH, + HITPOINTS, + RANGED, + PRAYER, + MAGIC, + COOKING, + WOODCUTTING, + FLETCHING, + FISHING, + FIREMAKING, + CRAFTING, + SMITHING, + MINING, + HERBLORE, + AGILITY, + THIEVING, + STAT18, + STAT19, + RUNECRAFT +} + +export default PlayerStat; \ No newline at end of file diff --git a/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts b/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts index 6768032fd..cc2c9a584 100644 --- a/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts +++ b/src/lostcity/network/225/incoming/handler/ClientCheatHandler.ts @@ -21,6 +21,7 @@ import { tryParseInt } from '#lostcity/util/TryParse.js'; import ScriptVarType from '#lostcity/cache/config/ScriptVarType.js'; import { Position } from '#lostcity/entity/Position.js'; import ScriptRunner from '#lostcity/engine/script/ScriptRunner.js'; +import PlayerStat from '#lostcity/entity/PlayerStat.js'; export default class ClientCheatHandler extends MessageHandler { handle(message: ClientCheat, player: Player): boolean { @@ -186,7 +187,7 @@ export default class ClientCheatHandler extends MessageHandler { player.stats[stat] = exp; } else if (cmd === 'minlevel') { for (let i = 0; i < Player.SKILLS.length; i++) { - if (i === Player.HITPOINTS) { + if (i === PlayerStat.HITPOINTS) { player.setLevel(i, 10); } else { player.setLevel(i, 1); diff --git a/src/lostcity/tools/server/drops.ts b/src/lostcity/tools/server/drops.ts index adf659773..28fbb55f5 100644 --- a/src/lostcity/tools/server/drops.ts +++ b/src/lostcity/tools/server/drops.ts @@ -9,7 +9,7 @@ import ServerTriggerType from '#lostcity/engine/script/ServerTriggerType.js'; import Npc from '#lostcity/entity/Npc.js'; import { PlayerLoading } from '#lostcity/entity/PlayerLoading.js'; import ObjType from '#lostcity/cache/config/ObjType.js'; -import {EntityLifeCycle} from '#lostcity/entity/EntityLifeCycle.js'; +import EntityLifeCycle from '#lostcity/entity/EntityLifeCycle.js'; import Environment from '#lostcity/util/Environment.js'; From 4280ab30450ef3313bf5b7d0338f8b6523d0079b Mon Sep 17 00:00:00 2001 From: tannerdino <61213166+tannerdino@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:59:21 -0400 Subject: [PATCH 50/50] fix(content): restore potions restoring wrong amounts and reseting boosted stats (#559) * fix(content): restore stats scaled off stat_base * fix(engine): stat_heal resetting level if past baselevel --------- Co-authored-by: tannerdino Co-authored-by: Pazaz --- .../configs/consumption/consume.dbtable | 1 + .../configs/consumption/consume_effects.dbrow | 38 +++++++++---------- .../effects/scripts/consume_effects.rs2 | 9 ++++- data/src/scripts/player/scripts/stat.rs2 | 5 +++ .../engine/script/handlers/PlayerOps.ts | 2 +- 5 files changed, 34 insertions(+), 21 deletions(-) diff --git a/data/src/scripts/player/configs/consumption/consume.dbtable b/data/src/scripts/player/configs/consumption/consume.dbtable index f76f5ac33..59da3b76a 100644 --- a/data/src/scripts/player/configs/consumption/consume.dbtable +++ b/data/src/scripts/player/configs/consumption/consume.dbtable @@ -3,6 +3,7 @@ column=consumable,obj column=consume_sound,synth column=stat_change,stat,int,int column=stat_restore,stat,int,int +column=stat_heal,stat,int,int [consume_messages_table] column=consumable,obj diff --git a/data/src/scripts/player/configs/consumption/consume_effects.dbrow b/data/src/scripts/player/configs/consumption/consume_effects.dbrow index fd71855df..e1390c14a 100644 --- a/data/src/scripts/player/configs/consumption/consume_effects.dbrow +++ b/data/src/scripts/player/configs/consumption/consume_effects.dbrow @@ -67,7 +67,7 @@ table=consume_table data=consumable,asgarnian_ale data=stat_change,attack,-2,-5 data=stat_change,strength,2,0 -data=stat_restore,hitpoints,2,0 +data=stat_heal,hitpoints,2,0 [wizards_mind_bomb_effect] table=consume_table @@ -76,7 +76,7 @@ data=stat_change,magic,2,2 data=stat_change,attack,-1,-5 data=stat_change,strength,-1,-5 data=stat_change,defence,-1,-5 -data=stat_restore,hitpoints,1,0 +data=stat_heal,hitpoints,1,0 [greenmans_ale_effect] table=consume_table @@ -85,14 +85,14 @@ data=stat_change,herblore,1,0 data=stat_change,attack,-3,0 data=stat_change,strength,-3,0 data=stat_change,defence,-3,0 -data=stat_restore,hitpoints,1,0 +data=stat_heal,hitpoints,1,0 [dragon_bitter_effect] table=consume_table data=consumable,dragon_bitter data=stat_change,strength,2,0 data=stat_change,attack,-2,-5 -data=stat_restore,hitpoints,1,0 +data=stat_heal,hitpoints,1,0 [dwarven_stout_effect] table=consume_table @@ -102,33 +102,33 @@ data=stat_change,smithing,1,0 data=stat_change,attack,-2,4 data=stat_change,strength,-2,4 data=stat_change,defence,-2,4 -data=stat_restore,hitpoints,1,0 +data=stat_heal,hitpoints,1,0 [grog_effect] table=consume_table data=consumable,grog data=stat_change,strength,1,4 data=stat_change,attack,-5,-3 -data=stat_restore,hitpoints,3,0 +data=stat_heal,hitpoints,3,0 [beer_effect] table=consume_table data=consumable,beer data=stat_change,strength,1,2 data=stat_change,attack,-1,-6 -data=stat_restore,hitpoints,1,0 +data=stat_heal,hitpoints,1,0 [wine_effect] table=consume_table data=consumable,jug_wine data=stat_change,attack,-2,0 -data=stat_restore,hitpoints,11,0 +data=stat_heal,hitpoints,11,0 [half_wine_effect] table=consume_table data=consumable,half_full_wine_jug data=stat_change,attack,-2,0 -data=stat_restore,hitpoints,7,0 +data=stat_heal,hitpoints,7,0 [bad_wine_effect] table=consume_table @@ -139,7 +139,7 @@ data=stat_change,attack,-3,0 table=consume_table data=consumable,cabbage_draynor data=stat_change,defence,1,2 -data=stat_restore,hitpoints,1,0 +data=stat_heal,hitpoints,1,0 data=consume_sound,eat [jangerberries_effect] @@ -148,8 +148,8 @@ data=consumable,jangerberries data=stat_change,attack,2,0 data=stat_change,strength,1,0 data=stat_change,defence,-1,0 -data=stat_restore,prayer,1,0 -data=stat_restore,hitpoints,2,0 +data=stat_heal,prayer,1,0 +data=stat_heal,hitpoints,2,0 data=consume_sound,eat [restore_potion_effect] @@ -192,7 +192,7 @@ data=consumable,gin data=consumable,brandy data=stat_change,strength,1,5 data=stat_change,attack,-3,-2 -data=stat_restore,hitpoints,5,0 +data=stat_heal,hitpoints,5,0 [cocktail_effect1] table=consume_table @@ -200,7 +200,7 @@ data=consumable,premade_blurberry_special data=consumable,blurberry_special data=stat_change,attack,-3,-2 data=stat_change,strength,2,5 -data=stat_restore,hitpoints,7,0 +data=stat_heal,hitpoints,7,0 [cocktail_effect2] table=consume_table @@ -210,7 +210,7 @@ data=consumable,premade_drunk_dragon data=consumable,drunk_dragon data=stat_change,attack,-3,-2 data=stat_change,strength,2,5 -data=stat_restore,hitpoints,5,0 +data=stat_heal,hitpoints,5,0 [cocktail_effect3] table=consume_table @@ -220,7 +220,7 @@ data=consumable,premade_short_green_guy data=consumable,short_green_guy data=stat_change,attack,-3,-2 data=stat_change,strength,1,6 -data=stat_restore,hitpoints,5,0 +data=stat_heal,hitpoints,5,0 [cocktail_effect4] table=consume_table @@ -228,7 +228,7 @@ data=consumable,premade_pineapple_punch data=consumable,pineapple_punch data=consumable,premade_fruit_blast data=consumable,fruit_blast -data=stat_restore,hitpoints,9,0 +data=stat_heal,hitpoints,9,0 // really unsure if unfinished cocktails belong here [odd_cocktail_effect] @@ -262,13 +262,13 @@ data=consumable,unfinished_fruit_blast1 data=consumable,unfinished_pineapple_punch1 data=consumable,unfinished_pineapple_punch2 data=consumable,unfinished_pineapple_punch3 -data=stat_restore,hitpoints,0,0 +data=stat_heal,hitpoints,0,0 [tea_effect] table=consume_table data=consumable,cup_of_tea data=stat_change,attack,2,2 -data=stat_restore,hitpoints,3,0 +data=stat_heal,hitpoints,3,0 [odd_gnomefood_effect] table=consume_table diff --git a/data/src/scripts/player/scripts/consumption/effects/scripts/consume_effects.rs2 b/data/src/scripts/player/scripts/consumption/effects/scripts/consume_effects.rs2 index 4ca3d9cec..086432799 100644 --- a/data/src/scripts/player/scripts/consumption/effects/scripts/consume_effects.rs2 +++ b/data/src/scripts/player/scripts/consumption/effects/scripts/consume_effects.rs2 @@ -67,9 +67,16 @@ while ($i < db_getfieldcount($effect_data, consume_table:stat_change)) { // stat restore $i = 0; while ($i < db_getfieldcount($effect_data, consume_table:stat_restore)) { - stat_heal(db_getfield($effect_data, consume_table:stat_restore, $i)); + ~stat_healbase(db_getfield($effect_data, consume_table:stat_restore, $i)); $i = calc($i + 1); } +// stat heal +$i = 0; +while ($i < db_getfieldcount($effect_data, consume_table:stat_heal)) { + stat_heal(db_getfield($effect_data, consume_table:stat_heal, $i)); + $i = calc($i + 1); +} + // start sound ~consume_effect_sound(db_getfield($effect_data, consume_table:consume_sound, 0)); // display messages diff --git a/data/src/scripts/player/scripts/stat.rs2 b/data/src/scripts/player/scripts/stat.rs2 index a1c65cbd9..7a5a5e9ad 100644 --- a/data/src/scripts/player/scripts/stat.rs2 +++ b/data/src/scripts/player/scripts/stat.rs2 @@ -90,6 +90,11 @@ if (calc($level - $debuff) < $min_level) { // subtract the debuff, with no percent stat_sub($stat, $debuff, 0); +// stat_heal but instead of scaling based off stat, it scales off of stat_base +[proc,stat_healbase](stat $stat, int $constant, int $percent) +def_int $heal = add(scale($percent, 100, stat_base($stat)), $constant); +stat_heal($stat, $heal, 0); + [proc,stat_reset](stat $stat) def_int $d = sub(stat($stat), stat_base($stat)); diff --git a/src/lostcity/engine/script/handlers/PlayerOps.ts b/src/lostcity/engine/script/handlers/PlayerOps.ts index caffa2234..b6905faf1 100644 --- a/src/lostcity/engine/script/handlers/PlayerOps.ts +++ b/src/lostcity/engine/script/handlers/PlayerOps.ts @@ -451,7 +451,7 @@ const PlayerOps: CommandHandlers = { const base = player.baseLevels[stat]; const current = player.levels[stat]; const healed = current + (constant + (current * percent) / 100); - player.levels[stat] = Math.min(healed, base); + player.levels[stat] = Math.max(Math.min(healed, base), current); if (stat === 3 && player.levels[3] >= player.baseLevels[3]) { player.resetHeroPoints();