Author Topic: Botting - Whats perfect? How to do it?  (Read 7693 times)

0 Members and 1 Guest are viewing this topic.

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Botting - Whats perfect? How to do it?
« on: April 08, 2010, 10:52:16 AM »
0
Hello!

I thought this would be fun topic to discuss. Post here your what your dream bot could do. If you already have coded some sort of bot, what can it do?
What kind of features a perfect/good bot would have?

Second thing that is in my mind currently is:
What would be considered as too powerfull for public release? Would it still be good release in restricted area?
Where and what is the line? I know its not just some single thing, but you get the idea.

Features of perfect bot
and
Whats too powerfull for public?

My still unreleased bot can do quite a lots of things currently and i have made it so, that its quite modular. So i can add new features very easily.
Attacking for example:
Just call Attack with target id and sub finds it and kills it.
It has custom rail running engine.
Its VERY easy to setup for different farming styles and spots.
( My current feature incoming party commanding and its looking very beatifull allready :) )
Bot does NOT have to be running on local computer. It can be run on otherside of the world. It can be your friends char, that is left idle with bot slave script running. Just waiting for master to pick him up.
Currently only Chivalry and melee is used, but magery, necro, ninjitsu casting is done already, i just need to figure out some combos for these templates.
Healing is done via CEOMedic ( Did not want to waste hours just to invent wheel again ) (maybe later ).
Looting is done via Claw ( again, did not want to spend all my time) ( No, im not going to write my own )

This is just something my bot can do. Almost all of those are features that i have always dreamed about. Its not even nearly done, but its in good shape already.

This is my despise farm routine. It collects leather from lizardman's.
This is NOT pseudo code. I have tryed to create easy to use "language" for bot programs. I have already looped this for full night. Theres still problems in some parts. Everyday i add more stability to it, so it wont get stuck anywhere. ( healing is handled in other script, so heals are always running ).
Code: [Select]
while #true
{
  if %Program = Despise
  {
    gosub LoadRail LizardFarm.txt Despise_Farm_Route
    gosub s7UseRunebook %RunebookFarm %RuneFarm %TravelMethod
    gosub MoveToEndOfRailAndLookForEnemy Despise_Farm_Route * 6
    gosub s7UseRunebook %RunebookBank %RuneBank %TravelMethod
    gosub EmptyLootBagToBank
    wait 30s
  }
}

My dream bot ( this bot is following my dreams ), could be commanded either locally via persistent or global variables and via party chat.
It could run by its own, but would listen players wishes or commands. Like "Follow me" ( It does already), attack, stay here and kill everything. "This is barracoon, now handle it".
It would heal me, when im in trouble, it would attack fiercely if enemy player is detected.
It could use pets and all other way of harming in UO.
running alone ( without player ) in gauntlet.
From menu, player could yell commands for him just like for pets.
My friends could leave their characters idle with bot script running. I could ( or any who has access to bot ( it checks ID's)) take those bots and go do few champs or something like that. Commanding via chatting is very important part i guess.
This would be my dream bot, whats yours?

Features of perfect bot
and
Whats too powerfull for public?

-Katu

PS: Im quite sure botting is very interesting topic here, so we can talk about techniques at here also. How to do something, whats best way and etc.

PSS: Bot main script currently has 2700 lines of code ( 1300 lines of my code ) Thou its not even v1 yet..
« Last Edit: April 08, 2010, 10:59:25 AM by Katu »

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #1 on: April 08, 2010, 11:10:45 AM »
0
Reading variables from speech messages!
Little feature i added to TM's Journal subs. I can now read variables that can be yelled via chat.
Example: player yells: "Blaa blaa blaa Attack:THISID" ( it can have other text in message and multiple variables )
You could read it like this:
gosub TM_AdvJournalScan network VARIABLE Attack:
if #result <> #false
then result has the ID that was sent ( "THISID" )

This comes right after:
Code: [Select]
     if ( !text in #journal && ( ( !namepos = 1 && !namecnt <= 1 ) || !pass ) )
      {
Code: [Select]
       ; Katu added :)
        if VARIABLE in !args
        {
          str len !text
          set !varLen #strres
          str len #journal
          set !jlen #strres
          str pos #journal !text
          set !varStart #strres + !varLen
          ; after this line, we have start of the variable. The value of it.
          str mid #journal !varStart !jlen
          set !varVar #strres
          str count !varVar _
          if #strres <> 0
          {
             str pos !varVar _
             set !varEnd #strres - 1
          }
          else
          {
             str len !varVar
             set !varEnd #strres
          }
          str mid !varVar 1 !varEnd
          set !variable #strres
          set !temp_jindex !temp_jindex + 1
          if ADVANCE in !args
            set !_jindex !temp_jindex
          set #LPC !temp_lpc
          namespace pop
          set !TM_FunctionCalled #TRUE
          return #strres
        }

This is just one of new ( never soo anything like this in any private or public sub ) features i needed to invent.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Botting - Whats perfect? How to do it?
« Reply #2 on: April 08, 2010, 01:30:49 PM »
0
Really, people can/should release whatever they feel comfortable releasing.  If you feel that's something is really powerful and you don't want to generate competition on your particular shard, those are the things you might want to limit in release.  That's why we have the Elite section here; lets members share scripts that aren't really good for public consumption, but allows you to share your work with others. 

That said, there's scripts I'll never share due to their powerful nature.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #3 on: April 08, 2010, 03:34:43 PM »
0
Yeah, i have already decided, that Party chatting/slave botting is not going to be released at public boards.

But im shocked, that none has anykind of visio, of a bot that does something neat?
If you have coded bot, maybe share features? No code needed.

What kind of stuff you guys have done with php? Im curious, cos im beginner/decent in php and mysql and im thinking some features, that could be complished with those.
Atleast log files, that shows everything that bot has done.
But maybe somekind of loot table also? You could check history of looted items and item stats from online.
Basic controlling like, change program, log in other char, stay offline for sometime.

Comeone :D
Mindstorm with me. Thats what this is all about!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #4 on: April 08, 2010, 05:33:02 PM »
0
Well, I don't condone bots that can be used on a massive level for PvP. Beyond that Really I'm all good with whatever bot you can think of.


I have a generic Script I use similar to yours that will let me run rails, kill, loot, use bush, chiv, (Designed for a chiv dexxer) Only thing that I really have to say is Have a customizable variable for how far it scans before targetting the monster. In dungeons you want that to be about 3-4 tiles so it doesn't see something in another tunnel and try to get to it when it can't. Very useful.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #5 on: April 08, 2010, 11:27:21 PM »
0
Aye, pvp is one of my main conserns also. Im currently setting up "Leech edition". Its ripped version of the bot and thats the one im releasing on public boards. It does not have follow routines nor player defending, sync targetting or anything like that. I love pvp in UO and im not going to release anything that could harm it.

In my first post, there is little code piece of my bots main loop. It has this sub
"gosub MoveToEndOfRailAndLookForEnemy Despise_Farm_Route * 6"
basically it does exactly what it says. It Runs Rail named Despise_Farm_Route Looks for "*" all enemy ( It filters enemys from items with rep and such ) and last parameter is range to check for em. Thats a good point thou.

Im going to support all the damage dealers and not just some specifig template, so that every char can be bot. Its not that hard to do, when you have the framework setup.

Mindstorm - Get your brains started :)

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Botting - Whats perfect? How to do it?
« Reply #6 on: April 09, 2010, 12:02:31 AM »
0
Well, manwinc is the bot master!  heh
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #7 on: April 09, 2010, 12:41:10 AM »
0
Yeah, i have read about this, but all the evidence is gone in the dust.

I would be very interested to hear about manwinc's bot features. I dont need code, just would like to hear what others have done.

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #8 on: April 09, 2010, 02:09:23 AM »
0
Quote
Yeah, i have read about this, but all the evidence is gone in the dust.

That makes me happy :)
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #9 on: April 09, 2010, 02:27:37 AM »
0
Anyways, this is the logic i'm using right now.

Basically for your main control structure you start off with a Loop any loop will work.

Main:
Goto Main

Then you put in your "Generic" Stuff that applies to any template.

Pots, Apples, Trapped box, Movement, what do i do when I'm dead, scanjournal, etc etc.... we'll just call all that sub generic

so

Main:
Gosub Generic
goto main

Next Phase, Making it work for any template. OBVIOUSLY You will need skill checking. and During this skill checking you are going to create An array for subs applicable to the template of the player. For instance


set %Sub_Number 4
set %Sub1 Healing
set %Sub2 Attacking
set %Sub3 Chivalry
set %Sub4 Bushido

Now, using a for make it usable.

Main:
gosub generic
For %Sub 1 %Sub_Number
{
gosub %Sub . %Sub
}
goto main

Then you just have to build your subs to be uber fast and good at what they do. Anything TIme consuming like looting I suggest running in a seperate script.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #10 on: April 09, 2010, 05:30:54 AM »
0
GBot and SwapBot have the foundation for botting...
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Scrripty

  • Guest
Re: Botting - Whats perfect? How to do it?
« Reply #11 on: April 09, 2010, 07:42:25 AM »
0
Well, I don't condone bots that can be used on a massive level for PvP. Beyond that Really I'm all good with whatever bot you can think of.

HAHHAHA.  Although... I've seen 4 accounts woop a guys butt pretty handily on accident. :)

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #12 on: April 09, 2010, 11:41:21 AM »
0
Manwinc:
Interesting way to handle the looping.

I have done it bit differently..
Becouse i have healing and looting running in separate scripts, i really dont need to get out of attack sub before the target is dead or is suddenly unreachable or lost in someother way ( Im going to add an "danger scan"-> if too many of mobs defined as hard ones gather around, get away from them ). My attack sub checks if some skill is in use ( pre-defined ) and if its useable ( no cooldowns and such ) and uses it to target. Calling attack sub with targetid, starts battle between that target and my bot, that ends only if one of em dies. While running attack sequences, it uses every part of the bot to kill that target.

I have tryed to make the top end subs to be very simple to use and to be very efficient.

Code: [Select]
while #true
{
  if %Program = Despise
  {
    gosub LoadRail LizardFarm.txt Despise_Farm_Route ; Loads CEORailfile to an array in specifig namespace
    gosub s7UseRunebook %RunebookFarm %RuneFarm %TravelMethod
    gosub MoveToEndOfRailAndLookForEnemy Despise_Farm_Route * 6
          ->SeekAndDestroy %Enemy %Range                    ; Find this/these mobs from range
                -> Attack %TargetId                         ; If found, loops this until nothing is found
                   -> CastChivalry EnemyOfOne               ; eh?
                   -> AttackMelee                           ; Stay in here until this one is dead
          -> FindCorpsesAndLootWithClaw %Range %LootBag     ; Wrapper for looting
                -> FindCorpses %Range                       ; Find coprses and set them to array
                -> LootTarget %Id                           ; Wrapper for calling the Claw
                -> If overweight -> Travel to bank, empty lootbag, recall back, run to current spot
          -> RunRail %Rail ToCurrentSpot                    ; Calls movement sub for moving to desired spot in rail
          -> RunRail %Rail Next
    gosub s7UseRunebook %RunebookBank %RuneBank %TravelMethod
    gosub EmptyLootBagToBank                                 ; Travel to bank, empty your bags to bank
    wait 30s                                                 ; hmm?
  }
}
Those 5 gosubs actually take care of all the mechanics of engine.
I call those "Top ring subs". I have few more of these done already:
gosub StandYourGroundFor 5 minutes-> Stay in this spot for 5 minutes ( kills everything it sees, with everything it can )
gosub StandYourGroundFor 100 kills-> Stay in this spot and kill 100 mobs ( kills 100 mobs, or anything that can be killed )
gosub BecomeASlave-> Bot waits for party call from player that has rights to do it. Then waits for commands ( Currently Follow this id, attack this ID and Standyourground subs are commandables )

This is how i did it anyway.

Scrripty

  • Guest
Re: Botting - Whats perfect? How to do it?
« Reply #13 on: April 09, 2010, 12:18:24 PM »
0
You and manw are thinking along entirely different lines. :) 

Offline KatuTopic starter

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 2
  • Katu has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Botting - Whats perfect? How to do it?
« Reply #14 on: April 09, 2010, 02:09:59 PM »
0
You and manw are thinking along entirely different lines. :) 
This is exactly why i wanted to discuss about bots.
To mindstorm ideas and exchange em. Botting is very interesting topic for almost every scripter.

Tags: