forked from 2009Scape/Server
Teleport fishing spots properly
This commit is contained in:
parent
d0ae674155
commit
6bebd1d53a
1 changed files with 3 additions and 1 deletions
|
|
@ -36,7 +36,9 @@ class FishingNPC : NPCBehavior(*fishingSpots) {
|
|||
}
|
||||
else -> {
|
||||
val randLoc = spot.locations[RandomFunction.random(spot.locations.size)]
|
||||
if(findLocalNPCs(randLoc, 0).isEmpty()) self.location = randLoc
|
||||
if(findLocalNPCs(randLoc, 0).isEmpty()) {
|
||||
teleport(self, randLoc)
|
||||
}
|
||||
setAttribute(self, "fishing:switchdelay", getWorldTicks() + getRandomDelay())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue