Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int loop() {
- if (isPaused){
- return 100;
- }
- if (!walking.isRunEnabled()){
- walking.setRun(true);
- }
- commandBuffer.mark();
- if (!commandBuffer.hasRemaining()){
- return 20;
- }
- RSTile dest;
- switch(commandBuffer.get()){
- case CommandBuffer.COMMAND_FIGHT:
- if (requiredValue<=hitCount){
- if (canSafelyExit()){
- stopScript();
- }else {
- killingTime();
- return random(200,250);
- }
- return 100;
- }else{
- killingTime();
- return random(200,250);
- }
- case CommandBuffer.COMMAND_WALK:
- dest = new RSTile(commandBuffer.get(),commandBuffer.get());
- walkTo(dest);
- return 100;
- case CommandBuffer.COMMAND_PLANT:
- if (plantSeed()){
- return random(50,100);
- }
- else {
- return 10;
- }
- }
- return 10;
- }
Add Comment
Please, Sign In to add comment