Skip to content

Instantly share code, notes, and snippets.

@pxpc2
Created July 30, 2012 02:02
Show Gist options
  • Save pxpc2/3203310 to your computer and use it in GitHub Desktop.
Save pxpc2/3203310 to your computer and use it in GitHub Desktop.
if ((trap != null) && (trap.isOnScreen()) && (Players.getLocal().getAnimation() == -1))
{
Tile tile = trap.getLocation();
trap.interact("Set-trap");
SFields.inactivity = new Timer(0);
while ((SceneEntities.getAt(tile.getX(),
tile.getY()).getId() == SConstants.SWAMP_LIZARD_TRAP_OPEN) &&
Players.getLocal().getAnimation() != -1)
{
Context.get().getActiveScript().log.severe("inactive");
Time.sleep(400);
if (SFields.inactivity.getElapsed() > 5000)
{
return;
}
}
if (SceneEntities.getAt(tile.getX(), tile.getY()).getId() == SConstants.SWAMP_LIZARD_TRAP_WAITING)
{
Context.get().getActiveScript().log.severe("We got in");
SFields.trapTiles.add(tile);
}
}
else if (trap != null && !trap.isOnScreen())
{
Walking.walk(trap);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment