Signup Now
Results 1 to 9 of 9
  1. #1
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0

    Make it yourself - How to build a structured script and how to think

    Hello everyone.


    This is NOT a novice guid.

    First of all, I want to make sure that everyone understands that this is not a guide that will go into very specific issues and their solutions. It's purpose is to make you understand how to make basic scripts, albeit afk, and attempt to guide you in the thought process.

    Second, you've decided you want to make a script. Great! It might sound like alot of work, and depending on the area you wish to bot that is true. However, try to not think about that to much as it easily ends up feeling overwhelming and that the task might not be achieveable. It is, everyone can script, and the forums are a great resource.

    Third, this tutorial assumes you have a fairly good understanding about Windbot and botting in general, aswell as a understanding about how Tibia works, ofcourse. I wont go into specifics about the bot for the most part, however I will try to add a compilation of links at the end to useful hotkeys, huds, scripts and other guides/tutorials.

    This guide is not written in the classic step-by-step guide, it's a overview of the thought process behind making your own scripts and to try to break it down into pieces. It's written in diary form, as I wrote most of it as I was making a script.

    Lets get started!
    So, before we start going into the acctual bot I want you to start thinking about a few things. I've compiled a to-do-list that I use when I myself makes scripts, some points are optional and thoose that are I have marked with a orange star (*)

    Doing the research on the area/script requirement!

    1. Where do I want to bot?
    2. What components will be needed? Hunting waypoints, to and from spawn, any else? Write them all down.
    3. What security meassures will I need to take to avoid getting killed?
    4. What monsters are in the area, do your research prior to starting with waypoints. It will save you alot of frustration


    After I've filled each of these steps out, I disect each of them even further. To make this more understandable, below you will find a actual list of a script i recently made.

    Rough cut (First list, general outlines)
    1. Banuta Mainfloor - Later -1, Focus on mainfloor
    2. Depositer, Safebank, Safestamina, Lots of islocation() checker, Tasker (Add later)
    3. Safebank, Safestamina, waypoint checkers, specialareas (Both caveboth and targetting ones, primarily targetting)
    4. In spawn: Hydra, Serpent Spawn, Medusa, Giant Spider, Bonebeast
    5. On path to spawn: Bat, Rat, Snake, Poison Spider, Carniphila, Cenetepede (More?)


    That was my rough guides, it gave me a basic idea of where to start and what to do. This allowed me to setup targetting basics (that is to say, add the monsters but not add/edit any specific settings just yet), add items to lootinglist, add Specialareas hud (since I knew I would be working with thoose, I added it early on to always have it accessible so I wouldn't have to go back and delete/add lots of special areas.)

    After that I created, tested and made sure my depositer was working, this saved me alot of heartache down the line as I wouldn't have to worry about it not working as intended, ofcourse bugs can arise and in this case it did for me, more on that later. After that, I added refiller as the next natural step in my process. I decided at this point that this script would contain many waypoints, and as such I opted for using waypoint sections, see the picture below.


    Special areas "definition", why, where and how?

    In this script I decided to make waypoints for the following reasons;
    1. To not lure to much at once
    2. To avoid getting trapped and killed
    3. To avoid getting stuck in single squaremeters, or areas that looked risky. I took the approach of better safe than sorry here.

    Now I had I knew full and well, and I even had it in writing, why and where I would use my special areas.

    So, by now I had the Depositer and refiller implemented. It felt good and since I had basic targetting setup and a proper looting done too, it felt like a big part of the script was done and the feeling of the task being so big I couldn't possibly complete it had started to fade.

    I now knew that I would be carrying supplies and not overcapping with loot, I decided this was a good time to add stamina-saftey aswell as bank-safety (ergo, making sure there was enough cash in my balance to purchase the required supplies and grab a littlebit of extra cash.)

    It was time to start making a first rough setup of my targettings use of spells, in this script there wasn't much to do. I had decided it was going to use SDs to quickly kill of monsters 1by1. I added a simple, 0-100% sd rule, added keep away and adjusted my targetting prioritys to what I thought would be good, knowing I'd more than likley have to edit them I didn't put a whole lot of time into this. I then proceeded to adding potion healer, spell healer and a conditional healer to avoid being paralyzed for to long. I had done my research so I knew for a fact I would be paralyzed.

    Making the major waypoints (Hunt etc)

    Now, the basics of the script was there and the bot could be run with me running in the spawn just fine. It was time to make waypoints to and from the spawn. You might ask, why do both at once? Well it's simple, I wanted to make sure that theese parts of the script would work so I'd run less risk of dying when running the intial tests. It's not a life or death situation, but I would recommend anyone to do it that way as it too makes the task of finishing the script less daunting, because now I only had hunting waypoints and specialareas left to do inorder to start running tests of the script. It's all about managing to stay out of your head, or beat your brain so to speak. Not because it will make you script better per se, but it helps to not just give up. At this point, I had so much done I felt it would be easy to finish what was left.

    I decided to create a new list at this point, where I listed parts I had completed and add small notes with my thoughts to improve it further later on.

    1. Depositer - Working!
    2. Resupplying & Banking - Working
    3. Waypoints to and from spawn - Working
    4. Healer - Working
    5. Targetting - Working but will need adjustments.
    6. Huds - Special areas Working, General Hud, Working, Monitor my hunting - Working, Recent loot - Working.


    This felt great, I now had on "paper" what I had completed, a sense of accomplishment had arrived!

    Time to proceed to finishing the last bit of the major script components, hunting waypoints and special areas.

    Now, I personally prefer to layout all my special areas before I start making the waypoints. It gives me visual representation (remember, the hud shows where the bot can and cannot go, and same goes for where targetting can "kite" and not)
    I had my list of why and where to add special areas, and now I had to simply apply this to reality. For example, since I had done my research on the spawn, I knew it quite well and I also knew what I wanted the bot to avoid. I added avoids to not step into boss portals, run into close quarters and to seal off areas of the script into rooms.

    So now the special areas was in place, targetting running and the bot was healing me. What's left? Waypoints in the spawn, ofcourse. Again, I had done my research and i opted for going clockwise since I had noticed that most bots on my server was running counterclockwise, I did this to try not get stuck in a cluster of characters and with the hope to have to fight less for monsters with other botters.

    So, I started laying out my waypoints, adding extra, empty, actions in points that I thought I might need them, in my case a good example was a action that I later on planned to use to check if the bot should run into the center of Banuta mainfloor, or not.

    Once I was done, I added a checker at the end for supplies and to loop the script back to the first waypoint in my Hunt waypointsection. I now felt it was time to run the first test of the hunting waypoints, since I knew that the rest of the script was working well, so I enabled the bot and started running a few laps, adjusting the specialareas as I noticed issues that might arise, keep this in mind that you will have to do edits to them, and this is another good reason to have Specialareas hud since it list specialarea name and makes it easy to figure out which special area had to be adjusted, and more importantly, how.

    It ran well, I discovered a few issues and adjusted accordingly. I decided to make sure that the mainpoints of the scripts that were already made were working as intended over longer periods of time, so I ran it over night.

    Now, I will leave you with the remaining parts of the script, softboots refiller for example, because by now you should have understood the mindset of making a script that's intended to be used afk.


    Final words
    As a last note I want to add that this might not be how everyone makes scripts, and it's definatly not a must to follow my method. However, I wrote this a while the other day (before posting it that is) and gave it to a few friends. They found it useful and quickly realised where they could take shortcuts and do changes to the method. The mainpoint, really, is to break each feature up in parts and take it step by step, not thinking to far ahead and understanding that you can complete one section, test it and come back days later to finish the rest of the parts.

    I know some scripters like to add all the actions, huds and stuff like that first, and that's just fine, I don't follow this guide to the letter, but for the most part this is how my process goes.

    I hope you will find this useful, atleast some of you.

    If there's something you would like me to elaborate on, add or edit etc, let me know and use @ Hultin to tag me as I might take a while to respond/comply to your request, otherwise.

    Resources
    To be added. (See what I did there )
    Last edited by Hultin; 03-14-2014 at 01:39 PM.

  2. #2
    Free User
    Join Date
    Jan 2014
    Posts
    59
    Reputation
    10
    Rep Power
    21
    Nice guide! I might try soon.

  3. #3
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    Glad you like it, let me know how it works and please feel free to suggest any changes. Like I've stated in the main post, it's not 100% for everyone, it's really more of a diary of the development of a script with explanations.

  4. #4
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    @Lucas Terra, @BUgWT, @Raphael - Realised I placed this is the wrong section, could somebody please move it to Scripting tutorials please? =) Sorry about that :]

  5. #5
    Free User pvzin's Avatar
    Join Date
    Dec 2013
    Location
    USA
    Posts
    974
    Reputation
    48
    Rep Power
    22
    Will sure help some people around!
    Yours,
    pvzin

  6. #6
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Thread moved.
    Keep up with the good work mate, I really liked it,

  7. #7
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    Thanks Raphael for both moving and for enjoying the material posted

  8. #8
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,579
    Reputation
    149
    Rep Power
    27
    IMO every scripter that is trying to/alredy selling scripts, should think this way. Its sad, that old scripters somtimes simply doesnt care about safety, they are just making simple script without perfecting it. Thinking +/- this way is a MUST, if you are not taking care of EVERYTHING that could possibly happen during botting, you should reconsider closing your scripting thread. Good tutorial

  9. #9
    Free User
    Join Date
    Oct 2014
    Posts
    4
    Reputation
    10
    Rep Power
    0
    Very nice, that will be usefull for me

 

 

Posting Permissions

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