Author Topic: GBot - Global Bot  (Read 54935 times)

0 Members and 1 Guest are viewing this topic.

Offline tandj99

  • Elite
  • *
  • *
  • Posts: 261
  • Activity:
    0.2%
  • Reputation Power: 1
  • tandj99 has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #15 on: August 28, 2009, 11:58:22 AM »
+1
I looked at this last night and with the menu part only wish it had a way to heal the main char. Going to try and figure it out have never messed with stuff like this.

Scrripty

  • Guest
Re: GBot - Global Bot
« Reply #16 on: August 28, 2009, 12:09:27 PM »
+1
I looked at this last night and with the menu part only wish it had a way to heal the main char. Going to try and figure it out have never messed with stuff like this.

It's VERY easy tandj99.  I purposefully took that stuff out as it's a little too powerfull for the average user to have.  So if you want it, learn to write it. :)  You'll be shocked at just how easy it is if you take the time to learn.  4 months ago I could only write basic little scripts or add in tiny bits to existing scripts.  Now I can write whole scripts from the ground up.  Just take the time and start from scratch.  Pick a script YOU wan to write, then just WRITE it.  It's that easy.  Learn as you go.

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: GBot - Global Bot
« Reply #17 on: August 28, 2009, 06:08:04 PM »
+1
Agreed!! I was the same way a couple years ago when I used to use a script, I was so dumb to everything any probably posted some of the comments that I hate so much now! But I remember learning how to add a little line in to check for something and that is all it took to get me started. Eventually I was chopping bits and pieces, combining them together, asking why stuff wasn't working, and listening as people told me I was an idiot cuz I used it completely wrong. But you take those lessons in stride, and eventually end up writing taming scripts, medic scripts, donators, and more and you look back at a 380 line script and go "HOLY *bleep*! I can't believe I wrote that!" It's just a matter of time and patience! Oh, and plenty of reading of this site: http://wiki.easyuo.com/index.php/Documentation
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #18 on: August 28, 2009, 07:15:19 PM »
+1
Most of my scripts average the 3000-5000 line mark these days.. but thats because i reuse loads of code over and over in every script.  But once upon a time a 20 line script was a major acheivement for me.  And some of them are still usefull even today like this one http://www.scriptuo.com/index.php?topic=1511.0

Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: GBot - Global Bot
« Reply #19 on: August 28, 2009, 07:18:32 PM »
+1
LoL yea...Some of my best scripts are only 25 lines or so! I try to write very concise code. I tend to write "universal" subs that I save in their own txt file. Then when I need them, I'll copy them in, but I'll usually edit out anything that's not needed so that way it runs even smoother with no odd side effects.
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #20 on: February 11, 2010, 02:25:53 PM »
+1
So I am working on a sparring script and trying to incorporate a global mod to communicate between the toons when one it getting close to getting smoked. 

I set it up as a variable that either toon's script will toggle: !timeout .  I have been doing some testing trying to figure out what the configuration needs to be to communicate the variable between the scripts and I seem to be missing something.  I did some tests and I have one flashing the variable through three different values, meanwhile reading it with the other toon in an event msg.  For some reason its not going through.

There must be more to it than simply having one toon's script reset the variable.  If someone can give me a little direction I would appreciate it! 
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline CervezaTopic starter

  • 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: GBot - Global Bot
« Reply #21 on: February 11, 2010, 02:26:56 PM »
+1
Make sure they share the same namespace, and you should have no problems.
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.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #22 on: February 12, 2010, 09:23:11 AM »
+1
So I am working on a sparring script and trying to incorporate a global mod to communicate between the toons when one it getting close to getting smoked. 

I set it up as a variable that either toon's script will toggle: !timeout .  I have been doing some testing trying to figure out what the configuration needs to be to communicate the variable between the scripts and I seem to be missing something.  I did some tests and I have one flashing the variable through three different values, meanwhile reading it with the other toon in an event msg.  For some reason its not going through.

There must be more to it than simply having one toon's script reset the variable.  If someone can give me a little direction I would appreciate it! 


Why not use one script that controls both toons... just use UOXL Swap .. to swap between clients...
Heres a code snippet for swapping...   http://www.scriptuo.com/index.php?topic=2454.msg18806#msg18806

I did this both on a justice rezzor script and the old make organge cloth bug... One script controled both toons.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #23 on: February 12, 2010, 09:45:28 AM »
+1
I guess I could do that EN, but I sort of want to get comfortable with the globals.

Cerv, I think you may have hit on the gap I am struggling with.  What does it mean to share namespace? Is there a tutorial somewhere I can read on it?
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Scrripty

  • Guest
Re: GBot - Global Bot
« Reply #24 on: February 12, 2010, 09:57:12 AM »
+1
I guess I could do that EN, but I sort of want to get comfortable with the globals.

Cerv, I think you may have hit on the gap I am struggling with.  What does it mean to share namespace? Is there a tutorial somewhere I can read on it?

This is the way I understand it... initializing a "namespace" makes it completely seperate from anything else you do... so you could use the exact same variables in your initialized namespace that you use in your script, and they wont overlap.  It's like another euo instance inside the same script...  sort of... :)  I'm not 100 percent sure either, I haven't got that far.

Offline CervezaTopic starter

  • 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: GBot - Global Bot
« Reply #25 on: February 12, 2010, 10:16:25 AM »
+1
If you look at GBot1A and 1B you'll see they both start with

namespace Global NSG1

That "syncs" up the "!" variables.

So if you set !variable1 in one EUO tab, it will be recognized in the other EUO tab.

BUT, if you set %variable1 it will ONLY be recognized in the one EUO tab.

This way you can pass information between clients using ! variables while still keeping separate script function by using % variables. And you don't have to do a check like

namespace copy TM_loot_in_progress from global TM_loot

That's a different way of accomplishing the same thing. You have to actually copy a ! variable from a namespace.

I hinted that I was working on a single script BOT. I have it working pretty good, but have some different script stuff I want to include. uoxlSwap works pretty darn well ;)
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.

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #26 on: February 12, 2010, 10:44:30 AM »
+1
Cerveza thanks for that last bit of info I was wondering about that and  now i can incorporate it in my next scripts.  Talking about the ! namespace info you posted incase I did not lead upto it well enough :)

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #27 on: February 12, 2010, 11:03:41 AM »
+1
I will play with it until I either figure it out or have more questions, thanks Cerv.

I like the single script bot idea. I suppose you could even refine it further and have more than one "single script" bots working different activities with a leader script(s) passing them information like targets and locations with global variables.  This would allow you to manage independant activities truly simultaneously.

I think for now I am going learn a little about globals by breaking healing into a separate script and feeding it information from my setup in the trainer.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #28 on: February 12, 2010, 12:57:43 PM »
+1
So I was trying to figure out the correct syntax. I read the tutorial over at EUO (link below).  I didn't find it as helpful as Cerv's discussion in this thread.  http://wiki.easyuo.com/index.php/NameSpace_global

I wrote these two short scripts to see if I could get the syntax right, but I don't seem to have it yet.  I set up the first to run on one toon and cycle the value for !Color between RED and BLUE.  I set up the second on a second toon to read !Color.  

*UPDATE* Figured it out when I re-read the Easy UO tutorial that mentions that the two scripts must be in the "same instance" of UO.  These two work now, so I think I am on my way to using globals!

Code: [Select]
Data Source
nameSpace Global NSG1

event exmsg #charid 3 4 Starting
Set %Number 0
Repeat
Set %Number %Number + 1
Set %Number2 ( ( %Number / 2 ) * 2 )
If %Number = %Number2
   {
   Set !Color RED
   {
Else
   {
   Set !Color BLUE
   }
event exmsg #charid 3 4 !Color
Wait 20
Until %Number = 500
Halt

Code: [Select]
nameSpace Global NSG1

event exmsg #charid 3 4 Starting

Repeat
Set %Number %Number +1
event exmsg #charid 3 4 !Color
Wait 20
Until %Number = 500
Halt

« Last Edit: February 12, 2010, 01:03:26 PM by Paulonius »
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: GBot - Global Bot
« Reply #29 on: February 18, 2010, 08:45:04 AM »
+1
I sucessfully incorporated the globals into my trainer script and it works great -- much better than journal scans.

With the trainer working I finished working up archery on all of my army toons (see attached pic) and have moved on to their other skills.  Time to start working on my bot script!

Thanks for the direction Cerv, really looking forward to getting these guys running around in a pack.

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
Army Training.png
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Tags: Cerveza