30 |
if (jailWarp == null) //abort if jailwarp was not found |
if (jailWarp == null) //abort if jailwarp was not found |
31 |
return; |
return; |
32 |
Location jail = jailWarp.Location; |
Location jail = jailWarp.Location; |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
if (HoerupUtils.calcDistance(jailWarp.Location, to) > DISTANCE) { |
if (HoerupUtils.calcDistance(jailWarp.Location, to) == (DISTANCE-5) ) { |
37 |
|
player.sendMessage("Your are near the border of containment area"); |
38 |
|
} |
39 |
|
|
40 |
|
if (HoerupUtils.calcDistance(jailWarp.Location, to) > DISTANCE) { |
41 |
player.sendMessage("You have been jailed and can not move outside containment area"); |
player.sendMessage("You have been jailed and can not move outside containment area"); |
42 |
player.teleportTo(from); |
player.teleportTo(from); |
43 |
} |
} |