forked from 2004Scape/Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: doubledoors.rs2 (2004Scape#263)
- Loading branch information
1 parent
658aa30
commit e0c8ea5
Showing
1 changed file
with
20 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,55 @@ | ||
[oploc1,_door_left_closed] | ||
def_coord $opposite_north = ~movecoord_loc_return(0, 1); | ||
def_coord $opposite_west = ~movecoord_loc_return(-1, 0); | ||
|
||
def_coord $opposite = ~movecoord_loc_return(~door_close(loc_angle)); | ||
sound_synth(door_open, 0, 0); | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 3), 4), wall_straight, 500); | ||
|
||
loc_findallzone($opposite_north); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 3) % 4), wall_straight, 500); | ||
loc_findallzone($opposite); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_north & loc_category = door_right_closed) { | ||
if (loc_coord = $opposite & loc_category = door_right_closed) { | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 1), 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
loc_findallzone($opposite_west); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_west & loc_category = door_right_closed) { | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 1), 4), wall_straight, 500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 1) % 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
[oploc1,_door_right_closed] | ||
def_coord $opposite_south = ~movecoord_loc_return(0, -1); | ||
def_coord $opposite_east = ~movecoord_loc_return(1, 0); | ||
|
||
def_coord $opposite = ~movecoord_loc_return(~multiply2(~door_close(loc_angle), -1)); | ||
sound_synth(door_open, 0, 0); | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 1), 4), wall_straight, 500); | ||
|
||
loc_findallzone($opposite_south); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_south & loc_category = door_left_closed) { | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 3), 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
loc_findallzone($opposite_east); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 1) % 4), wall_straight, 500); | ||
loc_findallzone($opposite); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_east & loc_category = door_left_closed) { | ||
if (loc_coord = $opposite & loc_category = door_left_closed) { | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 3), 4), wall_straight, 500); | ||
loc_add(~movecoord_loc_return(~door_open(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 3) % 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
[oploc1,_door_left_opened] | ||
def_coord $opposite_north = ~movecoord_loc_return(0, 1); | ||
def_coord $opposite_west = ~movecoord_loc_return(-1, 0); | ||
def_coord $opposite = ~movecoord_loc_return(~multiply2(~door_close(loc_angle), -1)); | ||
|
||
def_coord $opposite = ~movecoord_loc_return(~multiply2(~door_open(loc_angle), -1)); | ||
sound_synth(door_close, 0, 0); | ||
loc_del(500); | ||
loc_add($opposite, loc_param(next_loc_stage), modulo(add(loc_angle, 1), 4), wall_straight, 500); | ||
|
||
loc_findallzone($opposite_north); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_north & loc_category = door_right_opened) { | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_close(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 3), 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
loc_findallzone($opposite_west); | ||
loc_add(~movecoord_loc_return(~multiply2(~door_close(loc_angle), -1)), loc_param(next_loc_stage), calc((loc_angle + 1) % 4), wall_straight, 500); | ||
loc_findallzone($opposite); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_west & loc_category = door_right_opened) { | ||
if (loc_coord = $opposite & loc_category = door_right_opened) { | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_close(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 3), 4), wall_straight, 500); | ||
loc_add(~movecoord_loc_return(~door_close(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 3) % 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
[oploc1,_door_right_opened] | ||
def_coord $opposite_south = ~movecoord_loc_return(0, -1); | ||
def_coord $opposite_east = ~movecoord_loc_return(1, 0); | ||
|
||
def_coord $opposite = ~movecoord_loc_return(~multiply2(~door_open(loc_angle), -1)); | ||
sound_synth(door_close, 0, 0); | ||
loc_del(500); | ||
loc_add(~movecoord_loc_return(~door_close(loc_angle)), loc_param(next_loc_stage), modulo(add(loc_angle, 3), 4), wall_straight, 500); | ||
|
||
loc_findallzone($opposite_south); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_south & loc_category = door_left_opened) { | ||
def_coord $opposite = ~movecoord_loc_return(~multiply2(~door_close(loc_angle), -1)); | ||
loc_del(500); | ||
loc_add($opposite, loc_param(next_loc_stage), modulo(add(loc_angle, 1), 4), wall_straight, 500); | ||
return; | ||
} | ||
} | ||
|
||
loc_findallzone($opposite_east); | ||
loc_add(~movecoord_loc_return(~door_close(loc_angle)), loc_param(next_loc_stage), calc((loc_angle + 3) % 4), wall_straight, 500); | ||
loc_findallzone($opposite); | ||
while (loc_findnext = true) { | ||
if (loc_coord = $opposite_east & loc_category = door_left_opened) { | ||
def_coord $opposite = ~movecoord_loc_return(~multiply2(~door_close(loc_angle), -1)); | ||
if (loc_coord = $opposite & loc_category = door_left_opened) { | ||
loc_del(500); | ||
loc_add($opposite, loc_param(next_loc_stage), modulo(add(loc_angle, 1), 4), wall_straight, 500); | ||
loc_add(~movecoord_loc_return(~multiply2(~door_close(loc_angle), -1)), loc_param(next_loc_stage), calc((loc_angle + 1) % 4), wall_straight, 500); | ||
return; | ||
} | ||
} |