ScriptUO
Official ScriptUO EasyUO Scripts => Script Library => Misc. Scripts => Topic started by: Cerveza on March 18, 2009, 12:41:09 PM
-
;==================================================
; Script Name: GBot - Global Bot A
; Author: Cerveza
; Version: 1
; Shard OSI / FS: OSI
; Revision Date: 2007/08/08
; Purpose: Control second char using EUO interface:
; This is PRIMARY player script
; Special Thanks: TrailMyx and Endless Night
;==================================================
;=================================================
; Script Name: GBot - Global Bot B
; Author: Cerveza
; Version: 1
; Shard OSI / FS: OSI
; Revision Date: 2007/08/08
; Purpose: Control second char using EUO interface
; This is SECONDARY player
; Special Thanks: TrailMyx and Endless Night
;=================================================
Dual client helper. Run GBot A on your main char and GBot B on your support char.
Simple Global Variable watcher. I wrote this to teach myself globals. It has auto peace making with it, but I'm not sure it still works. The auto peace used a trick with party to avoid the wait timer. You can also see where I remmed out the auto invis if the support char gets targetted. You could always put that back.
Very easy to modify this and add in functions. I've run a version that had a 4x6 button menu for casting, skills, actions, etc....
I hope it's simple enough that people will modify it on their own and discover the fun that is Global Variables :D
If you come up with some killer mods, just put them in a reply here.
-
I used a modified version of this while in Doom and it worked great. It would auto-dispel revs, cut bones, heal my pet every 4 seconds, and cast Word of Death. All I had to do was keep my pet clear of poison, and help with the healing.
I also ran Dread Horn many times with this. Before I got good enough with my samp, I ran this guy as support to cure/heal me. Worked awesome.
I had been planning a PBot (party bot) that would accept party messages and perform actions based on the inputs. It's not really a "Global Variable" project though, so it's on my regular to-do list, along with many other things.
-
WHAT THIS DOES: It adds a little menu onto Cerv's menu with 5 buttons that move you north south east west with a button click. Also a center button for when you want your bot to move back to you no matter what. Great for when you just want to move your guy into a new spot when you're not in follow mode.
Makes positioning your bot a little easier in spawns and such. If you have your bot on FOLLOW, make sure to set your bot to how many spaces you want him to follow AT. I have mine set at 3 so I can move him around in 3 spaces around my normal guy without him going into follow mode and coming back to me. I've done a lot of interesting stuff with this so far. Way fun to play with. :) I have a stealth mage ninja that I use with this. He can hide/smokebomb and invis if he's in trouble. He heals from a distance with lesser/greater heal. He will arch cure. He blesses when I'm cursed. And he can heal with bandaids when within 2 spaces of me. Makes it nice because with this mod I can take him off follow and position him where I want for safety/tactics, even use him as a guardzone bot for healing/curing/blessing me if I'm doing some gate fighting! :) Love it. Nice script for learning the basics of namespaces and global vars. THANKS CERV! :) You should have seen my first attempt to move him using #findx #findy #findz... omg. Then I remembered these easier commands. haha
This goes in Gbot1a
sub north
set #menubutton n/a
set !north ! !north
return
sub south
set #menubutton n/a
set !south ! !south
return
sub east
set #menubutton n/a
set !east ! !east
return
sub west
set #menubutton n/a
set !west ! !west
return
sub center
set #menubutton n/a
set !center ! !center
return
menu Font Style
menu Button north 160 4 49 25 North
menu Button south 160 64 49 25 South
menu Button east 124 24 29 45 West
menu Button west 212 24 29 45 East
menu Button center 160 32 49 29 Center
This goes in Gbot1b
if !north
event macro 5 1
set !north #false
if !south
event macro 5 5
set !south #false
if !west
event macro 5 3
set !west #false
if !east
event macro 5 7
set !east #false
if !center
{
Finditem !charID G_15
event pathfind #findx #findy #findz
}
set !center #false
-
Twinkle McNugget, you drop these in at the bottom of the GA and GB scripts? Just wanted to make sure I put them in the right spots.
-
Twinkle McNugget, you drop these in at the bottom of the GA and GB scripts? Just wanted to make sure I put them in the right spots.
I'll just send you my version in email, you'll like mine way better. :)
-
add in some crosshealing, super following movement, reaction to the specific template of the pet player, option for stealth following, and then we can beginning destroying uo Together
-
add in some crosshealing, super following movement, reaction to the specific template of the pet player, option for stealth following, and then we can beginning destroying uo Together
All that's in brother. In the version I got here, I have set it up to be voice activated. My bot follows rails to my pvp spots. He heals on the fly, cures on the fly, blesses on the fly, and will heal with bandages if I stand by him. I'm adding archery and a targetting system I can use with voice too, so he'll stealth to my voice commanded rail NUMBER, then dismount the person I call. Say, attack 1. He'll dismount the player marked with a number 1. :) It's going to be insane. haha I have it on auto map too, so I can watch and see where the bot is. So I meet him with someone chasing, have him dismount, and bam. I'm CONSIDERING adding in an auto paralyze feature too, cause he has magery, stealth, hiding, archery. Might as well have him paralyze my target over and over too. :)
-
And thats What I meant by Destroy uo. The only Scripting in pvp i like is a Trapped Box script in the event of 3+ mages Para Spamming.
-
I fight solo 10 on 1 all the time on my shard. A little backup will make it more interesting. :) And I NEVER use scripts in pvp. This will be my first one. Cept for a pot drinker I use occasionally. :)
-
I can't even begin to imagine the possibilities.
Pre Cast the G-Heal when I'm hurt, hold it till I'm in range.
Pre Cast the Flame-Strike, hold it till I release my spell.
Limitless possibilities.
-
Something else for me to play with... :D :D
-
I can't even begin to imagine the possibilities.
Pre Cast the G-Heal when I'm hurt, hold it till I'm in range.
Pre Cast the Flame-Strike, hold it till I release my spell.
Limitless possibilities.
Honestly I hadn't thought of that! :) I drink cures so fast that waiting to NOT be poisoned isn't usually an issue. I have just been doing a health check at maxhits - 25. :) Usually that's a good range to get a heal. Honestly man, you should have seen your Gbot in action the other night. I had a nightmare, 3 or 4 pixies, a mage, and an archer on me and Gbot kept me up and kickin and I was on foot on a tamer/archer with healing/pots only. :) I lub Gbot. haha
-
Here's a picture of the new menu. I'll release this without the auto healing/curing/bless parts. That's a little much, and it's easy to add, so if people take the time to learn, they can have those parts. :) Oh yea, I took out the part that will set your weapon to shadow strike for an extra way to invis also. This was made for a stealth/mage/ninja with fencing. I'm switching him to archery tho.
(http://i41.photobucket.com/albums/e293/BalinorUO/149974353.jpg)
GbotA:
;==================================================
; Script Name: GBot - Global Bot A
; Author: Cerveza
; Menu: Twinkle McNugget
; Version: 1
; Shard OSI / FS: OSI
; Revision Date: 2007/08/08
; Purpose: Control second char using EUO interface:
; This is PRIMARY player script
; Special Thanks: TrailMyx and Endless Night
;==================================================
namespace Global NSG1
set !follow #FALSE
set !hide #FALSE
set !unhide #FALSE
set !strength #STR
set !pause #FALSE
set !charID #charID
set #menubutton n/a
gosub showEUOMenu1
set #lpc 10
repeat
if #menubutton <> n/a
gosub #menubutton
set !charGhost #charGhost
set !variableSTR #STR
set !hits #hits
set !maxhits #maxhits
set !charstatus #charStatus
until #clilogged = 0
sub hide
set #menubutton n/a
set !hide #TRUE
return
sub follow
set #menubutton n/a
set !follow ! !follow
set !Color Red
if !follow
set !Color Lime
menu font style b
menu Delete follow
menu Font BGColor !Color
menu Button follow 5 65 81 25 Follow
return
sub unhide
set #menubutton n/a
set !unhide ! !unhide
set !Color Red
if !unhide
set !Color Lime
set font style b
menu Delete unhide
menu Font BGColor !Color
menu Button unhide 5 5 81 25 Unhide
return
sub north
set #menubutton n/a
set !north ! !north
return
sub south
set #menubutton n/a
set !south ! !south
return
sub east
set #menubutton n/a
set !east ! !east
return
sub west
set #menubutton n/a
set !west ! !west
return
sub center
set #menubutton n/a
set !center ! !center
return
sub incog
set #menubutton n/a
set !incog ! !incog
return
sub res
set #menubutton n/a
set !res ! !res
return
sub protect
set #menubutton n/a
set !protect ! !protect
return
sub reveal
set #menubutton n/a
set !reveal ! !reveal
return
sub invis
set #menubutton n/a
set !invis ! !invis
return
sub arcur
set #menubutton n/a
set !arcur ! !arcur
return
sub masd
set #menubutton n/a
set !masd ! !masd
return
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title GBot
menu Window Color Teal
menu Window Size 245 94
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style b
menu Font Color WindowText
menu Font BGColor Red
menu Button unhide 5 5 81 25 Unhide
menu Font BGColor Lime
menu Button hide 5 35 81 25 Hide
menu Font BGColor Red
menu Button follow 5 65 81 25 Follow
menu Font Style
menu Font BGColor Yellow
menu Button north 124 4 41 25 North
menu Button south 124 64 41 25 South
menu Button east 88 32 33 29 West
menu Button west 168 32 33 29 East
menu Button center 124 32 41 29 Center
menu Font BGColor Aqua
menu Button incog 204 4 33 25 Incog
menu Button reveal 204 32 33 29 Rveal
menu Button invis 204 64 33 25 Invis
menu Button res 168 4 33 25 Res
menu Button arcur 168 64 33 25 ArCur
menu Button protect 88 4 33 25 Prot.
menu Button masd 88 64 33 25 MasD
menu Show
return
;--------- EasyUO Menu Designer Code End ---------
GbotB:
;=================================================
; Script Name: GBot - Global Bot B
; Author: Cerveza
; Menu: Twinkle McNugget
; Version: 1
; Shard OSI / FS: OSI
; Revision Date: 2007/08/08
; Purpose: Control second char using EUO interface
; This is SECONDARY player
; Special Thanks: TrailMyx and Endless Night
;=================================================
;gosub setpixel-secondary
namespace Global NSG1
set %timer #sCnt
set !blesstime = #time
;set %peacetime #sCnt
;set %pt 2 ; <----- Time in seconds between peacemaking
;set %inst QRF_NRF_MQF_PRF_LQF_OQF_RGP_KRF
set #lpc 10
repeat
===== Heal Aids =====
if !hits < !maxhits && !charGhost = NO && #enemyId = N/A
{
finditem ZLF C_ , #backpackid
if #findkind <> -1
{
set #lObjectID #findid
gosub doitb 17 0 !charID 5
}
}
===== Heal Ressurect =====
if !charGhost = YES && #time > %time2 && #enemyId = N/A
{
finditem ZLF C_ , #backpackid
if #findkind <> -1
{
set #lObjectID #findid
gosub doitb 17 0 !charID 9
}
}
===== Unhide =====
if !unhide = #true
{
event macro 2 0 Beep!
set !unhide = #false
}
===== Incognito =====
if !incog = #true && !charGhost = NO
{
gosub doit 15 34 none 3 !charstatus ; Incognito
set !incog #false
}
===== Ressurect =====
if !res = #true && !charGhost = YES
{
gosub doit 15 28 !charID 3s !charstatus ; mage ressurrect
set !res #false
}
===== Protection ====
if !protect = #true && !charGhost = NO
{
gosub doit 15 14 none 3s !charstatus ; mage protection
set !protect #false
}
===== Reveal ====
if !reveal = #true && !charGhost = NO
{
gosub doit 15 47 !charID 3s !charstatus ; mage reveal
set !reveal #false
}
===== Invis ====
if !invis = #true && !charGhost = NO
{
gosub doit 15 43 !charID 3s !charstatus ; mage invis
set !invis #false
}
===== Arch Cure ====
if !arcur = #true && !charGhost = NO
{
gosub doit 15 24 !charID 3s !charstatus ; mage arch cure
set !arcur #false
}
===== Mass Dispel ====
if !masd = #true && !charGhost = NO
{
gosub doit 15 53 !charID 3s !charstatus ; mage cure
set !masd #false
}
===== Hide Bot =====
if !hide = #TRUE
gosub doit 13 21 NONE 10
set !hide #FALSE
===== Follow =====
Finditem !charID G_15
if #finddist > 3 && !follow = #true
event pathfind #findx #findy #findz
==== North ====
if !north
event macro 5 1
set !north #false
if !south
event macro 5 5
set !south #false
if !west
event macro 5 3
set !west #false
if !east
event macro 5 7
set !east #false
if !center
{
Finditem !charID G_15
event pathfind #findx #findy #findz
}
set !center #false
===== Invis Bot if Targetted =====
finditem #enemyid G
if #findcnt > 0 && H notin !charstatus
{
event macro 15 43
target 5s
set #ltargetKind 1
event macro 23 0
wait 10
set #enemyID n/a
}
===== Anti Logout =====
if #sCnt > %timer + 300
{
event macro 8 1
set %timer #sCnt
}
Until #Clilogged = 0 || #CharGhost = YES
halt
===== SUBS =====
;---------Bandaids---------------------
; %1 = Event Macro Param 1
; %2 = Event Macro Param 2
; %3 = Target ID or NONE
; %4 = Spell Delay
sub doitb
if %3 = NONE
{
event macro %1 %2
wait %4
return
}
finditem %3 G_2
if #findkind = -1
return
set #ltargetID %3
set #ltargetKind 1
finditem ZLF C_ , #backpackid
if #findkind <> -1
{
set #lobjectID #findid
event macro %1 %2
target 5s
event macro 22 0
set %time2 #time + %4
}
return
;-------------------------------------
; %1 = Event Macro Param 1
; %2 = Event Macro Param 2
; %3 = Target ID or NONE
; %4 = Spell Delay
sub doit
if %3 = NONE
{
event macro %1 %2
wait %4
return
}
finditem %3 G_11
if #findkind = -1
return
set #ltargetID %3
set #ltargetKind 1
event macro %1 %2
target 5s
event macro 22 0
wait %4
return
;=================================================================
; Script Name: TrailMyx's Journal Scanning subs (#jindex based)
; Author: TrailMyx
; Version: 1.3
; Shard OSI / FS: OSI / FS?
; Revision Date: 2007/07/09
;-------------------------------------------------------------------------------
; Brings !_jindex up to the most recent #journal entry
sub TM_SyncTextScan
namespace push
namespace local text
set !_jindex #jindex + 1
namespace pop
return
;-------------------------------------------------------------------------------
; %1, %2, %3, etc strings to match
; returns #TRUE for match, #FALSE for no match
; Will not advance !_jindex pointer to allow for scanning journal history for more than one search.
; Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
sub TM_FindValidTextNoAdvance
namespace push
namespace local text
set !temp_lpc #LPC
set #LPC 1000
set !num_args %0
set !first_arg 1
if !_jindex = N/A
set !_jindex #jindex
set !index !first_arg
repeat
set !temp_jindex !_jindex
set !text % . !index
while !temp_jindex <= #jindex
{
scanjournal !temp_jindex
str pos #JOURNAL #CHARNAME 1
set !namepos #STRRES
str pos #JOURNAL :_ 1
set !smcpos #STRRES
str pos #JOURNAL !text 1
set !textpos #STRRES
if !textpos < !smcpos && !smcpos <> 0
set !pass #TRUE
else
set !pass #FALSE
if ( !text in #journal && ( :_ notin #JOURNAL || !namepos = 1 || !pass ) )
{
set !temp_jindex !temp_jindex + 1
set #LPC !temp_lpc
namespace pop
return #TRUE
}
set !temp_jindex !temp_jindex + 1
}
set !index !index + 1
until ( ( !index - !first_arg ) >= ( !num_args - 1 ) )
set #LPC !temp_lpc
namespace pop
return #FALSE
;-------------------------------------------------------------------------------
; %1, %2, %3, etc strings to match
; returns #TRUE for match, #FALSE for no match
; Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
sub TM_FindValidText
namespace push
namespace local text
set !temp_lpc #LPC
set #LPC 1000
set !num_args %0
set !first_arg 2
if !_jindex = N/A
set !_jindex #jindex
set !index !first_arg
repeat
set !text % . !index
while !_jindex <= #jindex
{
scanjournal !_jindex
if !text in #journal
{
if :_ , !text notin #journal
{
set !_jindex !_jindex + 1
set #LPC !temp_lpc
namespace pop
return #TRUE
}
}
set !_jindex !_jindex + 1
}
set !index !index + 1
until ( ( !index - !first_arg ) >= ( !num_args - 1 ) )
set #LPC !temp_lpc
namespace pop
return #FALSE
;-------------------------------------------------------------------------------
; %1, %2, %3, etc strings to match
; returns #TRUE for match, #FALSE for no match
; Will not advance %_jindex pointer to allow for scanning journal history for more than one search.
sub TM_FindTextNoAdvance
namespace push
namespace local text
set !temp_lpc #LPC
set #LPC 1000
set !num_args %0
set !first_arg 2
if !_jindex = N/A
set !_jindex #jindex
set !index !first_arg
repeat
set !temp_jindex !_jindex
set !text % . !index
while !temp_jindex <= #jindex
{
scanjournal !temp_jindex
if !text in #journal
{
set !temp_jindex !temp_jindex + 1
set #LPC !temp_lpc
namespace pop
return #TRUE
}
set !temp_jindex !temp_jindex + 1
}
set !index !index + 1
until ( ( !index - !first_arg ) >= ( !num_args - 1 ) )
set #LPC !temp_lpc
namespace pop
return #FALSE
;-------------------------------------------------------------------------------
; %1, %2, %3, etc strings to match
; returns #TRUE for match, #FALSE for no match
; Advances !_jindex so that you won't scan for past journal entries.
sub TM_FindText
namespace push
namespace local text
set !temp_lpc #LPC
set #LPC 1000
set !num_args %0
set !first_arg 2
if !_jindex = N/A
set !_jindex #jindex
set !index !first_arg
repeat
set !text % . !index
while !_jindex <= #jindex
{
scanjournal !_jindex
if !text in #journal
{
set !_jindex !_jindex + 1
set #LPC !temp_lpc
namespace pop
return #TRUE
}
set !_jindex !_jindex + 1
}
set !index !index + 1
until ( ( !index - !first_arg ) >= ( !num_args - 1 ) )
set #LPC !temp_lpc
namespace pop
return #FALSE
-
Twinkle McNugget, you need to edit that header to include "Menu by Twinkle McNugget" :)
Thanks for using this. Your doing exactly what I originally made the GBot for, so people could use it as a guide for Globals and expand to create their own dual (triple or more?) client system.
I tried to make it generic enough that people could just look at it, and understand what was going on. How different stuff was passed from one client to the other, and how the other would react. Once people get that, it's *really* simple to add stuff in.
-
Twinkle McNugget, you need to edit that header to include "Menu by Twinkle McNugget" :)
Thanks for using this. Your doing exactly what I originally made the GBot for, so people could use it as a guide for Globals and expand to create their own dual (triple or more?) client system.
I tried to make it generic enough that people could just look at it, and understand what was going on. How different stuff was passed from one client to the other, and how the other would react. Once people get that, it's *really* simple to add stuff in.
This was just a very basic first attempt. I did a lot of playing around before I got serious. That's a powerfull little toy. More people should get into playing with it. SO many possiblities... :) I hope people take a look at what I've done and get a better idea of how to incorporate stuff. Took all of 5 minutes looking at your code for me to think of 1000000 uses for it. haha My next step with what I have done is to add a web interface for guildies to control my Gbot when I'm not actively using it. Shouldn't be too hard to do that once I figure it out. Man the voice control stuff is so nice... You just key words up to key combos. It's pretty cool to be fighting and say, "FOLLOW!" and have him come running! haha Or say a number and he runs to that rail spot, and watch him on automap then just run up and he heals. :) He's died a few times tho, I need to add in some more life saving features for Gbot! :(
-
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.
-
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.
-
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
-
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
-
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.
-
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!
-
Make sure they share the same namespace, and you should have no problems.
-
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.
-
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?
-
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.
-
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 ;)
-
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 :)
-
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.
-
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!
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
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
-
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.
-
I have a new project, I'm just trying to get the movement finished up.
A Swap Bot. Using uoXL swap commands to change between chars. It'll be one script running.
I've been trying to make time to work out movement, but just haven't had the online time lately. That's why I'm training up my support char... I don't really have to be there for his training ;)
-
I have been thinking that I am going to use a swap-bot for movement on my secondary toons that is tied in with globals to the primary toon, with individual global based hunt/flee/heal scripts for each bot.
I want to base movement on position from the lead too relative to position and facing using #CHARDIR
-
Yep, that's basically what I'm working on right now, how far away from the Primary I want the Support to stop.
The issue is getting the Support to stop behind the Primary no matter what direction the Primary is going. TM has a really cool sub but it was part of a pretty super elite project and he'd prefer it not get out. I posted up my idea in another thread and I'll be trying that solution whenever I get some time to work on it.
I think you'll like the Swap Bot even better then this. EN has a couple very simple subs that makes swapping clients very easy, and it's not restricted to number of clients. You just tell it who you want to swap to and it does it.
-
I did a little checking and plotted out the attached ugly graphic for plotting follow formations.
-
Is that.... it can't be! It's the FLYING V!!!
Quaaaaack Quaaaaack GO DUCKS!
-
I'll try to help out with this when I have time, just fairly busy atm.
-
Is that.... it can't be! It's the FLYING V!!!
Quaaaaack Quaaaaack GO DUCKS!
I remember it being more epic. But I guess more things are when you're a kid lol
-
Nice script! Thanks :D I tested it on the freeshard I play on and it works. I dumped out the peacemaking bit as I don't use it and the cure function was not working correctly as it was escaping out of the cure spell due to char status, so I fixed that. I also changed it from arch cure to simple cure due to it being an AoE and making the caster a criminal (felucca ruleset, you'll get noto'd or guardwhacked), and it is more mana efficient.
Would be nice to make an option to see targets target and combo it...:D
-
Combo's would be fun, wouldn't they? ;)
-
Combo's would be fun, wouldn't they? ;)
;D
-
Hey Cerveza, this thing really needs to be over in the Combat/Healing/Looting section! I modified it to have my stealth/mage heal me when I need it - and it functions perfectly. Well done! ;)
-
I use to do most of this via party, sure love this setup, only think I hate is to have my sec account on the same PC. Going to play with that.
-
Been awhile since anyone posted on here but all of a sudden when main character is poisoned my secondary will cast cure but never actually targets main....any ideas why?? I redownloaded and ran that and still does not seem to work.
-
Been awhile since anyone posted on here but all of a sudden when main character is poisoned my secondary will cast cure but never actually targets main....any ideas why?? I redownloaded and ran that and still does not seem to work.
You might check to be sure that #LTARGETKIND is set to the correct value.
-
Thanks TM! I got it working after much trial and error then I found your post...Guess I am learning. Maybe you could assist me with something...When the second account is following me it will cast a spell from however far behind me he may be...is there a way to make the second character not cast until he is closer to me to insure it works?
-
Actually the script should be doing a finditem to locate your character. If you look at #FINDDIST, that will give you the distance the target was last found. If you just make sure you aren't casting when #FINDDIST is too large, then you should be golden! :)
But yeh, trial and error is how I get these things working too! :)
-
was wondering if anyone could help me put a greater heal button in the menu and tell me where what I need to add since the wiki easyuo is down and I don't have a lot of knowledge in this.
-
and can I change the peacemaking to discord. if so how hard would that be
-
You can MOD this build with easy, Just follow the logic of Bot 1.
To add button, you need to add them to the menu.
Yes you can add Peace, if you change the command or add it.
-
when i get home ghost i will post what i have done at work let me know if im on the right track please. i cant access this website at work stupid gov computers lol.
-
ok so this is the extra that i put in maybe someone can help me with it since i am trying to use this for shadow guard.
GBot 1 extra code
sub discord
set #menubutton n/a
set !discord ! !discord
set !Color Red
if !discord
set !Color Lime
menu delete discord
menu font BGcolor !Color
menu button discord 5 90 81 25 discord
return
and i added my button
now GBot 2
set %timer #sCnt
set !blesstime = #time
;set %discordtime #sCnt
;set %pt 8.5s ; <----- Time in seconds between discording
;set %inst QRF_NRF_MQF_PRF_LQF_OQF_RGP_KRF
set #lpc 10
===== Auto Discord =====
if #sCnt > %discordtime && !discord = #TRUE
gosub autodiscord
===== SUBS =====
sub autodiscord
event macro 3 0 ; whisper next line
msg $ ;clears hotkey so add wont mess up
gosub TM_SyncTextScan
event macro 13 15 ; discord
target
event macro 23 0
TM_FindValidText The_instrument_becomes_forever_quiet NULL
if #RESULT
{
finditem %inst C_ , %pack
if #findkind = -1
{
display ok out of instruments
return
}
set #ltargetid #findid
wait 5
event macro 22 0
wait 10
}
event macro 3 0 ; whisper next line
msg /add$
target
key esc
set %discordtime #sCnt + %pt
return
i know there are shadow guard ID's on here. i will be using for belfry and the roof but i cant get it to auto discord like i want it too
-
i know i need to add in some system messages like this
YOU_ATTEMPT_TO_DISRUPT_YOUR_TARGET,_BUT_FAIL.
YOU_PLAY_JARRING_MUSIC,_SUPPRESSING_YOUR_TARGET'S_STRENGTH.
THAT_CREATURE_IS_ALREADY_IN_DISCORD.
YOU_MUST_WAIT_A_FEW_MOMENTS_TO_USE_ANOTHER_SKILL.
but im just stumped how to get this done as well as once i click the discord button to auto discord without having to actually click on the creature. i can do some research and get all the id's that are needed if you can help me ghost or anyone else.
-
Look at my utility bar for Andros
http://www.scriptuo.com/index.php?topic=13127.0;highlight=utility
That will give an idea on how disco can work.
This is what my menu look like for this GBOT build.
-
ok will do and one more thing do you think you maybe you can help me learn to build a menu like your just not as detailed just to help me learn functions like urs. i have the menu building program and an old esasyuo but i can never make anything even though I know it is like drawn a box and go.
-
Here the menu
just load up both program to build menu. In easy 1.42( new) load this code and hit play. click in the design to see the menu
gosub showEUOMenu1
halt
===============================================================
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title Ghost Bot
menu Window Color Teal
menu Window Size 402 198
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 4 8 393 177 3 7 1 Black 7 White
menu Shape EUOShape2 16 12 249 33 4 7 2 Green 7 White
menu Font Name MS Sans Serif
menu Font Size 10
menu Font Style b
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Font BGColor HighlightText
menu Text EUOLabel1 28 20 Status:
menu Shape EUOShape3 12 84 97 65 3 7 2 Green 7 White
menu Shape EUOShape4 12 56 97 33 4 7 2 Green 7 White
menu Shape EUOShape5 242 56 143 33 4 7 2 Green 7 White
menu Shape EUOShape6 242 87 143 92 3 7 2 Green 7 White
menu Font Style bu
menu Font Align Center
menu Font BGColor BtnHighlight
menu Text maintitle 24 64 %Main
menu Font Align Left
menu Text supporttitle 272 64 %Support
menu Font Size 8
menu Font Style
menu Font BGColor Window
menu Edit EUOEdit1 80 20 121 StatusEdit
menu Font Color Window
menu Font BGColor Teal
menu Button EUOButton3 216 19 43 21 Pause
menu Font Color WindowText
menu Font BGColor Yellow
menu Button healmain 20 92 35 21 Heal
menu Font BGColor BtnFace
menu Button arcur 64 92 35 21 Cure
menu Button res 20 120 35 21 Res
menu Font BGColor Background
menu Button invis 64 120 35 21 Invis
menu Font BGColor Window
menu Combo Create castingspell 36 156 89
menu Combo Add castingspell Heal Main
menu Combo Add castingspell Heal Pet
menu Combo Add castingspell Wither
menu Combo Add castingspell Thurstorme
; menu Combo Select castingspell 1
menu Font BGColor CaptionText
menu Check LoopCasting 16 156 13 17 #false
menu Font BGColor Yellow
menu Button healpet 248 92 39 21 H.Pet
menu Button healsup 248 120 39 21 Heal
menu Font BGColor BtnFace
menu Button arcurpet 294 92 39 21 C.Pet
menu Button arcursup 294 120 39 21 Cure
menu Button respet 340 92 39 21 Vet
menu Font BGColor Lime
menu Button invissup 198 120 35 21 Invis
menu Button hide 115 120 35 21 Hide
menu Button follow 155 148 39 21 Follow
menu Font BGColor Aqua
menu Button center 155 92 39 21 Center
menu Button north 155 64 39 21 North
menu Button south 155 120 39 21 South
menu Button west 115 92 35 21 West
menu Button east 198 92 35 21 East
menu Font Style b
menu Font Color Red
menu Font BGColor Background
menu Button disco 340 19 39 21 Disco
menu Font Style
menu Font Color WindowText
menu Font BGColor BtnFace
menu Button allcome 248 148 39 21 Come
menu Button allstay 294 148 39 21 Stay
menu Button mount 340 148 39 21 Mount
menu Button party 268 19 39 21 Party
menu Button EUOButton24 340 120 39 21 N/A ; Aids
menu Show 846 612
return
;--------- EasyUO Menu Designer Code End -----
-
Wouldn't it be cool if Cerveza himself actually popped in to give his 2 cents worth regarding this? :)
-
Yes trail that would be pretty awesome his script so far is a 10 but I'm failing to get the auto discord even at looking at other scripts
-
And thank you ghost when I get home I'll put this in and see where to go from there
-
So question ghost when it says combo in the menu does that mean I can just add them in easyuo the other buttons or how does that work bc I don't see a drop down when I try and open it. Hopefully you understand
-
Cerveza will be fine, we just expend his baby, I give him wing. I don't share lots of my work, but I didn't see any harm is posting the menu. The rest is up to the member.
Cyber, the combo menu all you to add as many line under one display box. It a drop down box. the line that you select, will be the sub that will be use. TM use this in lot of his build, his FaF(fishing) have lot of them. It more clean that way. Clear as mud.
-
ok i think i understand now i have been looking at your andros script and this script i a bit confused on how to make a button in GbotA to have a sub that its suppose to go to in GbotB or am i all wrong. That is how i see you jump down to your auto discord but how do i put that in GbotB if it doesnt have any of the menu in it.
-
the Gbot2 doesn't required menu.
This is really simple to add task. just pay attention of the flow and how each button is build.
Look at the auto
set %discotime #sCnt
===== Disco ====
if !disco = #true && !charGhost = NO ; < --- if button disco is push and not a ghost to this
{
gosub disco
set !disco #false ; <---- reset the button ( let go off it :) )
}
The button are name after the sub you want to use,
-
Ahh i see i did get it to work by just putting in gosub disco but that way looks smoother
-
The B-bot only wait for instruction
repeat
add all the button you want him to do or action
Until #Clilogged = 0 || #CharGhost = YES ; <--- don't forget to hit play after you die :)
halt ;
-
Thank you ghost for helping me out when I'm done maybe I'll send you a pm and see if I did everything right
-
I have merge a few of my snippet into this build so I don't have to run 4 script. Event the Slave(B bot) have a menu now so I can keep en eye thing. I don't use this for Shadowguard. You only need one guy moving, second one just hide.
-
ahh i dont really use a tamer all that much i use a sampire on the roof but when i do i want to be able to set it up and be able to heal my pets with my mystic mage
-
been looking at a lot of auto attack scripts and but from what i know if i want it to auto attack something if needs to be guarding me so with that being said is there a way around that where i can use the event marco to attack nearest target or is it even worth doing something with this script. or should i just keep to looking how to heal the pet. and with that i need the pets id to put it in the snippet right
-
You can look at lame 3.0 as a basic sammy auto attack.
This bot was design to move your second toon around with you, that about it. I just add move stuff so my second guy can help me.
-
Ahh yes I have def used that one but I was looking more into an auto attack with a tamer and that's what I was figuring with this script
-
simgle target with a tamer, search for a sphinx helper. not sure which forum it was posted.
-
question is
i cant see the code all i see is the title
how do i get the script??
its same on most scripts..
-
Hordeboy1903 you might want to take a look at this page first. It is going to solve the mystery of why you cant see anything scripts.
http://www.scriptuo.com/index.php?topic=12571.0
-
Hordeboy1903 you might want to take a look at this page first. It is going to solve the mystery of why you cant see anything scripts.
http://www.scriptuo.com/index.php?topic=12571.0
tyvm
-
anyone enlighten me on how can i use more than 2 accounts for this. do i have to run 2 gbotB with the gbotA
-
anyone enlighten me on how can i use more than 2 accounts for this. do i have to run 2 gbotB with the gbotA
If you were to assign each slave bot its own global namespace, and then have the main player iterate and check each of those namespaces, that should work OK. Makes the main script a bit more complicated, but very little changes to the GBOTB script.
However this isn't just a quick change; there will be some coding required to allow for multiple slaves. Changing "namespace Global NSG1" is only the beginning.
-
dang thanks TM i was kind of hoping for maybe just using 2 namespace in gbotA but that seems like my thought process was wrong
-
dang thanks TM i was kind of hoping for maybe just using 2 namespace in gbotA but that seems like my thought process was wrong
Actually your thought process is pretty close to correct. The GBOTA script will need to switch through the namespaces instead of being locked into just one. If you want to add just another GBOTB(for 2 slaves) you can do something like this:
repeat
namespace push
namespace global NSG1
if #menubutton <> n/a
{
if #menubutton = hide1
gosub hide
if #menubutton = follow1
gosub follow
if #menubutton = peace1
gosub peace
}
namespace pop
wait 5
namespace push
namespace global NSG2
if #menubutton <> n/a
{
if #menubutton = hide2
gosub hide
if #menubutton = follow2
gosub follow
if #menubutton = peace2
gosub peace
}
namespace pop
wait 5
until #clilogged = 0
note that this is just an example. I'm assuming you change the button names from HIDE, FOLLOW and PEACE to HIDE1, FOLLOW1 and PEACE1 and add a second set HIDE2, FOLLOW2 and PEACE2 for the 2nd account. With a little extra code, you can transform this code into being able to control as many bots as you want.
You'll also need to change the subs hide, follow, peace because they specifically change the colors of the buttons, and since you are adding a whole other character, these subs will need to be independent.
-
thanks TM i really appreicate it :)
-
Casper, Make you you read and understand how the original Bot posted by Cerveza work. He use a difference approach that other did.
So first download the Bot A and Bot B. Play around and see how the interact, Once you understand how this work, I will be able to control 2 3, 4, 5 accounts if u want. I also recommend that you only do small modification and test them to ensure them work find. It easy to build big and have lot of error.
Good Luck.
Forget to add. If you have copy of Hitech bot, you will see another approch as well.
-
thanks TM i really appreicate it :)
Note that I had a typo in that code. "local" should have been "global' in the namespace declarations. Fixed in the code for previous post.
-
will do im going to work on getting the follow command to work first as well as the auto attack. i think once i figure those 2 parts out and have it working on 3 + accounts i should be ok from there. i might write up a list of things and send u a pm later this week and see which ones i should work on first. and thank you TM for fixing. this should be interesting.
-
On Rebirth BOT is very useful. On OSI I have a little less use.
-
What are those wait 5s for in that code? Yuck. ;) I browsed gbotB after a lot of years, the follow portion might benefit from not using finditem to find the character, and setting a characters location while in the namespace ON that character. If that doesn't make sense, I'll explain further if anyone has questions.
-
What are those wait 5s for in that code? Yuck. ;)
Cerveza wasn't the best coder in the world, but his heart was in the right place. heh
-
This little build and the mob by T... get me going. I mod it to get the Bot the heal me and disco monster. after that I have the tamer support into the second account. With the help Tyee and inspiration of other I'm now at ver 5.2
-
Cerveza wasn't the best coder in the world, but his heart was in the right place. heh
*Cries*
-
Where is Cerveza anyways? I thought that guy was a fixture here?!
-
Where is Cerveza anyways? I thought that guy was a fixture here?!
The 64 million dollar question!
-
I do know that his RL life kinda turned to poo at many levels. Even though I'm not the praying sort, I'm sure Cerveza could use some of that from those who are.