Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/login_logout/login.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ if(inzone(movecoord(^grandtree_jail_coord, 0, 0, -2), movecoord(^grandtree_jail_
~grandtree_spawn_charlie;
}

~initalltabs;
~castlewars_login;
~update_all(inv_getobj(worn, ^wearpos_rhand));
cam_reset;
if (%tutorial < ^tutorial_complete & ~in_tutorial_island(coord) = true) {
@start_tutorial;
}
~initalltabs;
queue(follower_login, 0, 0);
if (map_live = true) {
last_login_info;
Expand Down
17 changes: 17 additions & 0 deletions scripts/quests/quest_mm/configs/quest_mm.enum
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,20 @@ val=5,mm_monkey_greegree_for_normal_monkey
val=6,mm_monkey_greegree_for_small_zombie_monkey
val=7,mm_monkey_greegree_for_large_zombie_monkey
val=8,mm_monkey_greegree_for_ancient_monkey_skull

[mm_jail_patrol_route]
inputtype=int
outputtype=coord
val=0,0_43_43_16_46
val=1,0_43_43_18_46
val=2,0_43_43_20_49
val=3,0_43_43_20_44
val=4,0_43_43_19_44
val=5,0_43_43_20_44
val=6,0_43_43_20_49
val=7,0_43_43_20_44
val=8,0_43_43_19_44
val=9,0_43_43_20_44
val=10,0_43_43_20_49
val=11,0_43_43_18_46
val=12,0_43_43_16_46
58 changes: 29 additions & 29 deletions scripts/quests/quest_mm/configs/quest_mm.inv
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,44 @@ size=25

[mm_magic_shop]
size=8
stock0=firerune,1000,10
stock1=waterrune,1000,10
stock2=airrune,1000,10
stock3=earthrune,1000,10
stock4=lawrune,250,300
stock5=mm_eye_of_gnome,10,100
stock6=mm_monkey_dentures,100,100
stock7=mm_monkey_talisman,50,100
stock1=firerune,1000,10
stock2=waterrune,1000,10
stock3=airrune,1000,10
stock4=earthrune,1000,10
stock5=lawrune,250,300
stock6=mm_eye_of_gnome,10,100
stock7=mm_monkey_dentures,100,100
stock8=mm_monkey_talisman,50,100

[mm_scimitar_shop]
size=4
stock0=bronze_scimitar,10,100
stock1=iron_scimitar,10,200
stock2=steel_scimitar,8,600
stock3=mithril_scimitar,6,400
stock1=bronze_scimitar,10,100
stock2=iron_scimitar,10,200
stock3=steel_scimitar,8,600
stock4=mithril_scimitar,6,400

[mm_food_shop]
size=4
stock0=mm_monkey_nuts,200,100
stock1=banana,10,1000
stock2=mm_banana_stew,10,100
stock3=mm_monkey_bar,20,100
stock1=mm_monkey_nuts,200,100
stock2=banana,10,1000
stock3=mm_banana_stew,10,100
stock4=mm_monkey_bar,20,100

[mm_crafting_shop]
size=8
stock0=chisel,2,100
stock1=ring_mould,4,100
stock2=necklace_mould,2,100
stock3=mm_monkey_amulet_mould,2,100
stock4=needle,3,100
stock5=thread,100,5
stock6=ball_of_wool,100,5
stock1=chisel,2,100
stock2=ring_mould,4,100
stock3=necklace_mould,2,100
stock4=mm_monkey_amulet_mould,2,100
stock5=needle,3,100
stock6=thread,100,5
stock7=ball_of_wool,100,5

[mm_general_shop]
size=40
stock0=pot_empty,3,50
stock1=jug_empty,2,50
stock2=rope,8,50
stock3=bucket_empty,2,50
stock4=tinderbox,2,50
stock5=hammer,5,50
stock1=pot_empty,3,50
stock2=jug_empty,2,50
stock3=rope,8,50
stock4=bucket_empty,2,50
stock5=tinderbox,2,50
stock6=hammer,5,50
4 changes: 4 additions & 0 deletions scripts/quests/quest_mm/configs/quest_mm.loc
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,8 @@ ambient=40
op1=Chop-down
op3=hidden
mapscene=5
category=tree
param=next_loc_stage,mm_bush_kharazi_jungle_tree1_stump

[mm_bush_kharazi_jungle_tree1_stump]
name=Jungle Tree Stump
Expand All @@ -1059,6 +1061,8 @@ op3=hidden
width=2
length=2
mapscene=5
category=tree
param=next_loc_stage,mm_bush_kharazi_jungle_tree2_stump

[mm_bush_kharazi_jungle_tree2_stump]
name=Jungle Tree Stump
Expand Down
2 changes: 2 additions & 0 deletions scripts/quests/quest_mm/configs/quest_mm.npc
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,7 @@ recol1s=15648
recol1d=12037
recol2s=16801
recol2d=26149
moverestrict=outdoors
wanderrange=16
maxrange=16
attack=10
Expand Down Expand Up @@ -1601,6 +1602,7 @@ recol1s=15648
recol1d=13949
recol2s=16801
recol2d=31528
moverestrict=outdoors
wanderrange=64
maxrange=64
attack=5
Expand Down
29 changes: 27 additions & 2 deletions scripts/quests/quest_mm/scripts/aa_monkey_guard.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ obj_addall(npc_coord, npc_param(death_drop), 1, ^lootdrop_duration);
if(~mm_wearing_greegree = true | %mm_player_is_unconscious = ^true) {
npc_del;
spotanim_map(smokepuff, npc_coord, 50, 0);
sound_synth(smokepuff, 0, 0);
return;
}
// regular guards dont always knockout, named guards will always knockout
if(npc_type = mm_monkey_guard & random(10) = 0) queue(aa_knockout, 0, 0);
else gosub(npc_default_attack);
if(npc_type ! mm_monkey_guard) {
strongqueue(aa_guard_knockout, 0, 0);
} else {
if(random(10) = 0) strongqueue(aa_guard_knockout, 0, 0);
else gosub(npc_default_attack);
}

[ai_opplayer2,mm_religious_guard] @mm_religious_guard_attack;
[ai_opplayer2,mm_religious_trapdoor_guard] @mm_religious_guard_attack;
Expand All @@ -49,3 +54,23 @@ if(npc_stat(hitpoints) <= 30 & random(12) = 0) {
return;
}
gosub(npc_default_attack);

[queue,aa_guard_knockout]
p_stopaction;
%mm_player_is_unconscious = ^true;
~update_bas;
anim(human_death, 0);
p_delay(2);
~fade_out;
p_delay(2);
~fade_in;
p_teleport(movecoord(0_43_43_18_41, randominc(6), 0, randominc(1)));
walktrigger(wake_up);
~combat_clearqueue;
clearqueue(aa_archer_knockout);
clearqueue(aa_guard_knockout);
clearqueue(aa_jail_knockout);
queue(lumo_jailed_dialogue, 10, 0);
queue(fade_clear, 0, 0);
if(%mm_jail_count < 255) %mm_jail_count = add(%mm_jail_count, 1);
~objbox(steel_scimitar, "You are knocked unconscious by a blow to the head!", 250, 0, 0);
2 changes: 1 addition & 1 deletion scripts/quests/quest_mm/scripts/debug_mm.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ if(p_finduid(uid) = true) @mm_ch2_cutscene;
if(p_finduid(uid) = true) queue(mm_ch3_cutscene, 0, 0);

[debugproc,mmch4]
if(p_finduid(uid) = true) @mm_ch2_cutscene;
if(p_finduid(uid) = true) @mm_ch4_cutscene;
41 changes: 29 additions & 12 deletions scripts/quests/quest_mm/scripts/mm_archer.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@
[ai_opplayer2,mm_posted_archer] npc_setmode(applayer2);
[ai_applayer2,mm_posted_archer]
// archers can not attack you in the long grass or if in monkey form, they will still try to though
if(~mm_wearing_greegree = true | %mm_player_is_unconscious = ^true | loc_find(coord, mm_long_jungle_grass1) = true | loc_find(coord, mm_long_jungle_grass2) = true | loc_find(coord, mm_long_jungle_grass3) = true) {
if(%mm_player_is_unconscious = ^true | loc_find(coord, mm_long_jungle_grass1) = true | loc_find(coord, mm_long_jungle_grass2) = true | loc_find(coord, mm_long_jungle_grass3) = true) {
return;
}
~npc_rangeattack;
~mm_archer_attack;

[ai_queue1,mm_monkey_archer] ~npc_default_retaliate_ap;
[ai_opplayer2,mm_monkey_archer] npc_setmode(applayer2);
[ai_applayer2,mm_monkey_archer]
// archers can not attack you in the long grass or if in monkey form, they will still try to though
if(~mm_wearing_greegree = true | %mm_player_is_unconscious = ^true | loc_find(coord, mm_long_jungle_grass1) = true | loc_find(coord, mm_long_jungle_grass2) = true | loc_find(coord, mm_long_jungle_grass3) = true) {
if(%mm_player_is_unconscious = ^true | loc_find(coord, mm_long_jungle_grass1) = true | loc_find(coord, mm_long_jungle_grass2) = true | loc_find(coord, mm_long_jungle_grass3) = true) {
return;
}
~npc_rangeattack;
~mm_archer_attack;

[ai_queue1,mm_ravine_archer] ~npc_default_retaliate_ap;
[ai_opplayer2,mm_ravine_archer] npc_setmode(applayer2);
[ai_applayer2,mm_ravine_archer]
[ai_applayer2,mm_ravine_archer] ~mm_archer_attack;

[proc,mm_archer_attack]
if(~mm_wearing_greegree = true) {
return;
}
Expand All @@ -44,11 +46,12 @@ spotanim_npc(npc_param(proj_launch), npc_param(proj_height), 0);

%npc_action_delay = add(map_clock, npc_param(attackrate));
def_int $duration = 64;
$duration = ~player_projectile(npc_coord, coord, uid, npc_param(proj_travel), 40, 36, 32, 15, 0, 11, 5);
$duration = ~player_projectile(npc_coord, coord, uid, npc_param(proj_travel), 15, 36, 41, 15, 5, 11, 5);

if(random(20) = 0) { // testing with 1 archer aggroed, it seems like about 1 in every 20 attacks, and its only when the arrow lands
queue(aa_knockout, 0, calc($duration / 30));
if(npc_type = mm_ravine_archer & %mm_player_is_unconscious = ^false & random(20) = 0) { // testing with 1 archer aggroed, it seems like about 1 in every 20 attacks, and its only when the arrow lands
strongqueue(aa_archer_knockout, 0, calc($duration / 30));
}

if (randominc($attack_roll) > randominc($defence_roll)) {
~playerhit_n_ranged(true, randominc($maxhit), $duration, npc_param(attackrate));
~npc_poison_player;
Expand All @@ -60,21 +63,35 @@ if (randominc($attack_roll) > randominc($defence_roll)) {
%mm_player_is_unconscious = ^false;
anim(null, 0);

[queue,aa_knockout]
[queue,aa_archer_knockout]
p_stopaction;
%mm_player_is_unconscious = ^true;
~update_bas;
anim(human_death, 0);
p_delay(2);
~fade_out;
p_delay(3);
p_teleport(movecoord(0_43_43_18_41, randominc(6), 0, randominc(1)));
walktrigger(wake_up);
~combat_clearqueue;
clearqueue(aa_knockout);
clearqueue(aa_archer_knockout);
clearqueue(aa_guard_knockout);
clearqueue(aa_jail_knockout);
p_teleport(movecoord(0_43_43_18_41, randominc(6), 0, randominc(1)));
queue(lumo_jailed_dialogue, 10, 0);
if(%mm_jail_count < 255) %mm_jail_count = add(%mm_jail_count, 1);
~fade_in;
p_delay(4);
if(%mm_jail_count < 255) %mm_jail_count = add(%mm_jail_count, 1);
def_int $severity = ~random_range(10, 20);
if(random(10) = 0) { // seems random originally? only have one video of it: youtube.com/watch?si=-n3GpFUbwPR5L3PB&t=32&v=YGXz6CqRqig&feature=youtu.be
// assume the severity should be the same as the rest of the ape atoll stuff, maybe thats why it doesnt happen everytime?
// its not wrapped in the antipsn check, the player in the video is antipoisoned (same behaviour as osrs in this case)
if (%poison > -1) {
if (%poison > $severity) {
mes("You have been poisoned!");
~set_poison_timer;
%poison = $severity;
}
}
~objbox(iron_arrow_p, "You have been hit by poisoned arrows and knocked out!", 250, 0, 0);
}
if_openoverlay(null);
5 changes: 4 additions & 1 deletion scripts/quests/quest_mm/scripts/mm_awowogei.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ switch_int(%mm_awowogei) {
facesquare(loc_coord);
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>I must admit, I have always regarded your kind as our inferior cousins, visitor.");
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>However, I am well aware that you may have a few things to offer.");
~chatnpc("<p,neutral>Don't listen to him, Awowogei!");
~chatnpc("<p,neutral>Don't listen to him Awowogei!");
facesquare(loc_coord);
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,angry>Be silent, Uwogo.");
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>I have heard your kind are exceptionally resourceful. I wish to put this reputation to the test.");
Expand All @@ -87,6 +87,7 @@ switch_int(%mm_awowogei) {
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>There are several of your kind kept captive there. I challenge you to free one and return it to me.");
~chatplayer("<p,quiz>How am I meant to free one of them?");
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>This is for you to decide, visitor.");
// https://youtu.be/CrIK9wa_6j0?si=TP_5XVR8Ap397MAf&t=1820
~chatplayer("<p,neutral>Very well. I will be back later, with one of the captives.");
}
}
Expand All @@ -110,3 +111,5 @@ loc_anim(m_monkey_ape_ruler_nod);
~chatplayer("<p,neutral>Thank you.");
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>You are clearly well acquainted with the ways of this world. We will talk more on this later.");
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>In the meantime, feel free to remain as long as you like on my island.");
~chatplayer("<p,neutral>What about the proposed alliance, Awowogei?");
~chatnpc_specific(nc_name(mm_awowogei_cutscene), mm_awowogei_cutscene, "<p,neutral>I must think upon it some more and discuss the matter with my advisers. We will contact you when we are ready.");
2 changes: 1 addition & 1 deletion scripts/quests/quest_mm/scripts/mm_caranock.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else if(%mm_caranock = ^mm_asked_caranock) {

[label,mm_caranock_p3]
%mm_caranock = ^mm_caranock_p3;
~chatnpc("<p,shifty>I shall personally see to the decommission. You should report to the King immediately.");
~chatnpc("<p,shifty>I shall see personally to the decommission. You should report to the King immediately.");

[label,mm_shipyardworker_dialogue]
~chatplayer("<p,angry>I am on a special mission for King Narnode of the Gnomes.");
Expand Down
10 changes: 9 additions & 1 deletion scripts/quests/quest_mm/scripts/mm_daero.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ if(%mm_narnode < ^narnode_received_orders) {
~mesbox("Daero seems like he is enjoying himself too much to talk.");
return;
}
if(%mm_main = ^mm_complete_training) {
~chatplayer("<p,neutral>I need to return to Crash Island.");
~chatnpc("<p,neutral>You know the routine...");
~objbox(eye_patch, "You wear the blindfold Daero hands you.", 250, 0, 0);
~daero_move_hangar;
return;
}
if(%mm_main = ^mm_complete) {
@daero_training;
} else if(%mm_daero >= ^daero_left_grandtree) {
Expand Down Expand Up @@ -73,7 +80,8 @@ switch_int(%mm_daero) {
.npc_setmode(apnpc1);
~chatnpc_specific(nc_name(mm_daero), mm_daero, "<p,neutral>Not just any old visitor Waydar; this is the person who exposed Glough and defeated his demon.");
~chatnpc_specific(nc_name(mm_waydar), mm_waydar, "<p,neutral>I see. Well, there are no more demons left here.");
~chatnpc_specific(nc_name(mm_daero), mm_daero, "<p,neutral>Quite. He is now on a secret mission for the King.");
~chatnpc_specific(nc_name(mm_daero), mm_daero, "<p,neutral>Quite. <text_gender("He", "She")> is now on a secret mission for the King.");
~chatnpc_specific(nc_name(mm_daero), mm_daero, "<p,neutral>As you know, the 10th squad went missing during their mission to decommission the eastern shipyard of Karamja.");
~chatnpc_specific(nc_name(mm_daero), mm_daero, "<p,neutral>We still do not know what happened, but evidence suggests they were blown far off course to the south.");
~chatnpc_specific(nc_name(mm_waydar), mm_waydar, "<p,neutral>Their standard gliders must have fallen prey to the tropical weather.");
~chatnpcnoturn("<p,neutral>When reinitialisation has been completed, you are to fly to the south of Karamja with <displayname()> and accompany <text_gender("him", "her")> on the mission.");
Expand Down
7 changes: 6 additions & 1 deletion scripts/quests/quest_mm/scripts/mm_demon.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,14 @@ if(%mm_garkor < ^garkor_finished_mission) {
~chatplayer("<p,neutral>Thank you.");
}
~chatnpc("<p,neutral>You should report to King Narnode immediately. Tell him that the 10th squad still survives and has suffered no casualties.");
~chatplayer("<p,neutral>Rest assured, I will do so. How do I leave this place?");
// https://youtu.be/Qr9nNWqN6Y8?si=07TYRisnQ7ak9jmU&t=4256
~chatplayer("<p,neutral>Rest assured, I will do so.");
~chatplayer("<p,quiz>How do I leave this place?");
if(%mm_garkor < ^garkor_finished_mission) %mm_garkor = ^garkor_finished_mission;
~chatnpc("<p,neutral>Speak to Zooknock. He will arrange for you to leave.");
if(npc_find(coord, mm_zooknock_final_battle, 15, 0) = true) {
hint_npc;
}

[opnpc1,mm_zooknock_final_battle]
if(%mm_main < ^mm_defeated_demon) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/quests/quest_mm/scripts/mm_garkor.rs2
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ switch_int(%mm_garkor) {
case ^mm_not_started :
~chatplayer("<p,quiz>Hello?");
~chatnpc("<p,neutral>A fine day you have chosen to visit this hellish island, human.");
~chatplayer("<p,neutral>Good day to you too Sergeant. I've been sent by your King Narnode to -");
~chatplayer("<p,neutral>Good day to you to Sergeant. I've been sent by your King Narnode to -");
~chatnpc("<p,neutral>Investigate the circumstances surrounding the mysterious disappearance of my squad. Yes, I know.");
~chatplayer("<p,quiz>How did you know that?");
~chatnpc("<p,neutral>The King and I are still in communication, albeit sporadic. I decided I need a human of your calibre to assist me. It is pleasing to see you are still alive.");
~chatplayer("<p,quiz>Why do you need a human?");
~chatnpc("<p,quiz>There is more going on than meets your eye, human. Did you not find it strange that an entire squad be sent to decommission a shipyard?");
~chatnpc("<p,quiz>There is more going on than meets your eye, human. Did you not find it strange that an entire squad be sent to decomission a shipyard?");
~chatplayer("<p,neutral>Well -");
~chatnpc("<p,neutral>Indeed. But there are more pressing matters at hand. Three of my squad have been captured and placed in the jail. They are watched over by somewhat overpowering guards.");
~chatnpc("<p,neutral>Before we can resume our original mission we must rescue them.");
Expand Down
Loading