Skip to content

Instantly share code, notes, and snippets.

@allanon
Last active August 28, 2017 20:33
Show Gist options
  • Save allanon/76d31ec6da8388347a1cdaa69e880171 to your computer and use it in GitHub Desktop.
Save allanon/76d31ec6da8388347a1cdaa69e880171 to your computer and use it in GitHub Desktop.
part of the Assassin job quest
# Hack the field to make the pits unwalkable. Then set route_step to 2 so kore will fully avoid them.
macro job_assassin_2 {
[
# Add npcs to map as unwalkable tiles.
@poss = (62 168,62 169,63 168,63 169,64 162,64 163,64 174,64 175,65 162,65 163,65 170,65 174,65 175,66 155,66 170,66 171,67 170,67 171,68 158,68 159,69 158,69 159,72 166,72 167,72 168,72 169,72 174,72 175,73 166,73 167,73 168,73 169,73 172,73 174,73 175,76 158,78 168,78 169,79 168,79 169,80 172,80 173,81 172,81 173,82 172,82 173,83 172,83 173,84 150,84 160,84 161,85 160,85 161,86 154,86 155,86 160,86 161,86 166,86 167,87 154,87 155,87 160,87 161,87 166,87 167,88 160,88 161,88 162,88 172,88 174,88 175,89 160,89 161,89 174,89 175,90 164,90 165,91 164,91 165)
while (@poss > 0) {
$pos = &shift(@poss)
@xy = &split(' ', $pos)
$junk = &eval(substr($::field->{dstMap}, $::field->width * $xy[1] + $xy[0], 1) = chr 0)
#log $pos ord substr &eval($::field->width) * $xy[1] + $xy[0], 1
#log $pos &eval(ord substr $::field->{dstMap}, $::field->width * $xy[1] + $xy[0], 1)
}
# Set route_step to 2 to avoid making large steps. The server normally prevents us from running into walls, but not here.
do conf route_step 2
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment