Results 1 to 8 of 8

Thread: BaYBeeZ Goblin Grinder

  1. #1
    Join Date
    Dec 2011
    Location
    USA
    Posts
    91
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default BaYBeeZ Goblin Grinder

    Hello everyone, below you will find my first ever ATTEMPT at making a script.

    THIS SCRIPT DOES NOT WORK YET

    I decided to make a goblin killer because I want to learn how to make an autofighter on my own. I really enjoyed using Naracle's fast fighter and wanted to try my hand at making a script that fights a specific monster. I chose goblins because they will be easy to test on new accounts. I would recommend starting at the campfire where all the goblins are near Lumbridge.

    I know there is still a lot to add into this script. Believe me, I know.

    All I want it to do right now is click on the goblins and fight them after finding the colors. I have selected the correct colors because the mouse will jump around from place to place and the writeln will read, "We found a goblin." which is what I want it to do. However, now I am stuck and would really appreciate some assistance and feedback on how to actually click on the monsters. I'm not sure if the fix is simple or if it will be very complicated. Either way, I'm up for the challenge.

    Thank you for taking the time to read this and help me. I will appreciate all respectful and coherent responses as well as criticisms. Please keep in mind this is my first ever attempt at making a script of any kind.
    Last edited by BaYBeeZ; 02-10-2012 at 02:52 AM.

  2. #2
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks simple and nice. Im guessing your going to add a breaking function inside of it. Just saw from breaking const.

    One good thing that could be usefull would be adding the ability for the bot to see if someone else is attacking the monster you are attacking. By adding a simple FindBlackChatMessage('omeone else is fighting') then have it move on. just a tip. Message me if you have any questions or would like an in client proggy! liek the ones in my scripts! :P

    Edit: 1st

    also if you want fighting procedures already completed inside simba you can call
    {$i SRL/SRL/skill/fighting.simba}
    at the top of your script. For is infight and suchnot
    Last edited by laakerules; 02-01-2012 at 05:12 AM.

  3. #3
    Join Date
    Dec 2011
    Location
    USA
    Posts
    91
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by laakerules View Post
    Looks simple and nice. Im guessing your going to add a breaking function inside of it. Just saw from breaking const.

    One good thing that could be usefull would be adding the ability for the bot to see if someone else is attacking the monster you are attacking. By adding a simple FindBlackChatMessage('omeone else is fighting') then have it move on. just a tip. Message me if you have any questions or would like an in client proggy! liek the ones in my scripts! :P

    Edit: 1st

    also if you want fighting procedures already completed inside simba you can call
    {$i SRL/SRL/skill/fighting.simba}
    at the top of your script. For is infight and suchnot
    Thank you, very simple for the time being indeed.

    I was planning on adding breaking, antiban, food, bury bones, looting, and banking but for the time being just being able to click and fight the darn thing would make me happy!

    I figured started out on a very small NPC and adding features one by one would help me develop the skills and techniques of actually UNDERSTANDING what I was scripting instead of just copying and pasting bits of codes and saying, "Yippee it works!" but having no idea what each part does.

    I do like the Find if someone else is fighting suggestion, I will definitely add that into the script.

    Thank you for the {$i SRL/SRL/skill/fighting.simba} at the top of my script as well. I had no idea what all to put up there so I only added the one thing and left off SMART among other things. Thanks for being the first to help me! I will take a look your scripts as well so you might have a bunch of questions coming your way.

  4. #4
    Join Date
    Dec 2011
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    to keep it simple as i see you like it like that you can do

    Simba Code:
    function FightGoblin:Boolean;
    var
      x, y: Integer;
    begin
    repeat
      if FindObjCustom(x, y, ['att', 'ack'], [3901051, 8365713, 4958626], 4) then
        Writeln('We found a goblin.');
          MMouse(x, y, 0, 0);
        ChooseOption('ttack');
     end;

    Also it doesn't need to be a function. Functions need to have results. You can just do it like this.

    Simba Code:
    procedure FightGoblin;
    var
      x, y: Integer;
    begin
    repeat
      if FindObjCustom(x, y, ['att', 'ack'], [3901051, 8365713, 4958626], 4) then
        Writeln('We found a goblin.');
          MMouse(x, y, 0, 0);   // This Moves the mouse to the goblin.
        ChooseOption('ttack');   // This right clicks the goblin and chooses attack.
           // In here i would put something to check if goblin is dead or easier just           put in a wait.
        Wait(5000); // this makes it wait for 5 seconds.
     end;

  5. #5
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    procedure FightGoblin;
    var
      x, y: Integer;
    begin
    repeat
      if FindObjCustom(x, y, ['att', 'ack'], [3901051, 8365713, 4958626], 4) then
        Writeln('We found a goblin.');
          MMouse(x, y, 0, 0);   // This Moves the mouse to the goblin.
        ChooseOption('ttack');   // This right clicks the goblin and chooses attack.
           // In here i would put something to check if goblin is dead or easier just           put in a wait.
        Wait(5000); // this makes it wait for 5 seconds.
     end;
    Simba Code:
    procedure FightGoblin;
    var
      x, y: Integer;
    begin
    repeat
      if FindObjCustom(x, y, ['att', 'ack'], [3901051, 8365713, 4958626], 4) then
        Writeln('We found a goblin.');MMouse(x, y, 10, 10);
          Wait(randomrange(100,150));
          If IsUpText('ttack') then
          begin
            ClickMouse2(False);
            WaitOption('oblin', 110);
     end;

    Thats how i would have done it so you can have the wait instead of just having it do it super fast! :P Cause then you have the wait inside waiting for the option instead of after clicking! :P

  6. #6
    Join Date
    Dec 2011
    Location
    USA
    Posts
    91
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks for the help! What is the difference between having:

    MMouse(x, y, 0, 0); and MMouse(x, y, 10, 10);

    What's the difference between:
    ChooseOption('ttack');

    and

    If IsUpText('ttack') then
    begin
    ClickMouse2(False);
    WaitOption('oblin', 110);

  7. #7
    Join Date
    Dec 2011
    Location
    Kosovo
    Posts
    831
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by BaYBeeZ View Post
    Thanks for the help! What is the difference between having:

    MMouse(x, y, 0, 0); and MMouse(x, y, 10, 10);

    What's the difference between:
    ChooseOption('ttack');

    and

    If IsUpText('ttack') then
    begin
    ClickMouse2(False);
    WaitOption('oblin', 110);
    As I know
    Simba Code:
    MMouse(x, y, 0, 0); and MMouse(x, y, 10, 10);
    needs color to find the NPC and then puts mouse over there and clicks it.

    Simba Code:
    If IsUpText('ttack') then
          begin
            ClickMouse2(False);
            WaitOption('oblin', 110);
    and this can attack goblin just via text, Example right click it and if it;s goblin this will attack, if it's something else will not attack it.

    I might not be right cause I am a beginner too.
    Goals:
    Understanding TPAs
    Making Proggy for fighting
    Getting on SRL members
    Get 500 posts

  8. #8
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ya, i jsut pmed him back since im home and explained just what you did! :P

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •