Jump to content

MSlayer


Markoz

Recommended Posts

Since im getting a week off i decided to try and make a simple slayer script for personal use and maybe for selling if it all goes right...

I started it yesterday but i restarted it today because i was trying to make one where it would load all things needed(path, ids, etc) from a text file and it was taking too long and the future wasnt looking so bright for that method =p, so i restarted, and currently i got this going in a few hours:

 

http://www.youtube.com/watch?v=v5y7LoRpS5U&feature=youtu.be

The walking is still a bit buggy, but its because the walking method is not refined yet.

 

How the walking works:

 
I first add the waypoints and the actions i wish to perform(obstacles)
 
waypoints.add(new Waypoint(new Position(3220,3218, 0), 0));
waypoints.add(new Waypoint(new Position(3213,3211, 0), 1));
waypoints.add(new Waypoint(new Position(3206,3209, 0), 2));
actions.add(new Action(14977, "Climb-up", new Condition("playerZ", ">", 0, ch), 3));
actions.add(new Action(14978, "Climb-up", new Condition("playerZ", ">", 1, ch) ,4));
waypoints.add(new Waypoint(new Position(3208,3219, 2), 5));
 
path = new Path(new Condition("object", bank, false, ch, 5), waypoints, actions);
 
while the path condition is not met, in this case, be 5 squares away from the bank, it will walk the path.
when it hits a action, while the action's condition is not met(in this cases while the z is not bigger than 0 / 1)  it will try to perform the action
 
The good thing about this method is that i wont need to write a whole walking method for every task(because every task has different obstacles and different conditions to be met regarding it passed the obstacle or not)
I never really attempted something like this so getting this walking thing working got me really hyped to keep going =D
 
 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...