ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Gold Farming => Topic started by: Cerveza on November 20, 2008, 07:14:04 AM

Title: Auto Honor and Attack
Post by: Cerveza on November 20, 2008, 07:14:04 AM
Code: [Select]
;=========================================;
; Script Name: Auto Honor & Attack        ;
; Author: Cerveza                         ;
; Version: 2.5                            ;
; Shard OSI/FS: OSI/FS                    ;
; Revision Date: 02/07/2010               ;
; Purpose: Honor and Attack               ;
;=========================================;
;    ____         _      _  __   _ ___    ;
;   / __/ ___ _ _(_)_ _ | |_\ \ /  /_ \   ;
;   \__ \/  _| `_| | ` \|  _/ / \ \/ \ \  ;
;   __/  \ (_| | | | |) | | \ \_/ /\_/ /  ;
;   \____/\__|_| |_|  _/\__\ \___/\___/   ;
;                  |_|                    ;
;=========================================;
; Setup:                                  ;
;  Add monster Types for auto honor       ;
;  http://www.easyuo.com/creaturetype.php ;
;=========================================;
; v1.0 - First SUO Release                ;
; v2.0 - Second SUO Release - rewrite     ;
; v2.0a - Fixed spelling error, timout lol;
; v2.5 - Added CLAW support               ;
;=========================================;

; Adjust these for your preference
set %monsters FD_HI_ ; demons and succubi
set %timeout 25 ; app. time in seconds between kills
set %mana_consecrate 15

This script has been made in a way to help negate the "creature corpse bug".

Please use it and post any feedback.

ToDo List:
- add CLAw (http://www.scriptuo.com/index.php?topic=17.0) and Healer awareness
- add hotkey honor

v2.0 - rewrite, no hotkey, no CLAw (http://www.scriptuo.com/index.php?topic=17.0) or Healer awareness

UPDATED 11/27/09

v2.0a - fixed spelling error causing kill timeout to constantly activate. timout LOL

UPDATED 02/07/10

v2.5 - added CLAw (http://www.scriptuo.com/index.php?topic=17.0) looting awareness. Will pause while looter is active
- modified Consecrate Weapon for auto recast and mana checks

Modified Version 01/DEC/11

v2.5a - Changed things around a bit. Setup will ask you to set your lightning strike icon, and then move to the position you want to farm from. Once there press ALT + F10 to begin the script.

Lightning Strike now built in, NOTHING ELSE. Chiv things would be easy to include but I have removed Chiv from my Sampire. Script will now always keep Lightning Strike active. You must keep your Lightning Strike icon uncovered, and do not move it at any time. LS uses pixel scanning to identify if the icon is "active". If the pixels are covered or moved it will see the wrong pixel color and continuously toggle LS on and off.

Also included a "It's running away - FOLLOW IT" routine. Script will wait 20 seconds for monster to approach and melee begin. Then it will constantly find the monster and check it's distance. If the monster begins to move away the script will pathfind to follow.

Once the monster is dead, the script will look for CLAw (http://www.scriptuo.com/index.php?topic=17.0) looting activity. If you are running CLAw (http://www.scriptuo.com/index.php?topic=17.0) then the script pauses to allow CLAw (http://www.scriptuo.com/index.php?topic=17.0) to evaluate and loot the corpse. After looting is complete, script will move the character back to starting position.

Version 2.5a is untested as of 1 Dec 2011.
Title: Re: Auto Honor and Attack
Post by: Cerveza on July 16, 2009, 06:14:57 AM
Updated 7/16/09

V2.0 released - complete rewrite from v1.0
Title: Re: Auto Honor and Attack
Post by: Ajax on August 30, 2009, 10:45:16 AM
Great
Title: Re: Auto Honor and Attack
Post by: Traegon on September 08, 2009, 10:13:57 PM
Out of curiosity, I noticed this script's first revision was published almost immediately after the snippet I posted on EUO.  ( http://www.easyuo.com/forum/viewtopic.php?t=38194&highlight= ) The code structure is amazingly similar and even the name is oddly familiar.  Granted, you're doing more now than mine did then, but my newest version exceeds the snippet, too.  Auto-detects how to play based on highest skill, runs rails, chases down monsters, meanders to reduce afk obviousness.  Got me over 100 tokuno arties.  :)  I never published my updates because they didn't feel that my script was worth a mention, and when I saw yours over here not soon after, I didn't want to steal your thunder.

My question is: Was this based or taken from my snippet?  It's pretty cool to see so many similarities.

Title: Re: Auto Honor and Attack
Post by: TrailMyx on September 08, 2009, 10:23:19 PM
Hmm, I guess I'm not seeing the similarities.  Even the main loop is different since Cerveza is absolutely allergic to the GOTO statement.  lol  That's got Cerveza written all over it!  heheh
Title: Re: Auto Honor and Attack
Post by: Cerveza on September 08, 2009, 11:53:56 PM
Traegon, script was first published a couple years ago, was since updated. It wasn't based on your work.

You'll find that most scripting is going to be similar. There's only so many ways to get things done.

Check if monster is in range
use honor
target monster
attack monster

Your choices for accomplishing that is pretty limited, thus similarities in scripts. No, I didn't base this on your snippet, though good, it suffers from an icky goto. :)
Title: Re: Auto Honor and Attack
Post by: Traegon on September 14, 2009, 05:33:18 PM
Whoa, time out, lol.  I think you must've interpreted my question as hostile - my bad, sorry.  I was rather hoping for a yes, because it'd have been nice to actually see SOMEBODY using something I wrote in some way.

I'd post my newer version, but I wouldn't want it to seem like a "mine's better than yours" contest or something, and I'd hate to cause you pain 'cuz I might've left in the goto.  Hey: it was late and nobody'd written anything for the Honor section.  I tried.

EPIC FAIL mind you, but I tried.

--Traegon

PS:  How do I make ScriptUO run a script??  Am I missing something?
Title: Re: Auto Honor and Attack
Post by: TrailMyx on September 14, 2009, 08:35:26 PM
PS:  How do I make ScriptUO run a script??  Am I missing something?

Grab that genie lamp and rub REALLY hard!! 
Title: Re: Auto Honor and Attack
Post by: smallrr on October 08, 2009, 07:34:17 AM
Thank u Cerveza , it's will easy and fast in swoops  ;D
Title: Re: Auto Honor and Attack
Post by: Cerveza on November 27, 2009, 05:37:00 PM
Updated, found a spelling error that caused the timeout to constantly trigger... so it would always rescan.

%timout <> %timeout
Title: Re: Auto Honor and Attack
Post by: Coragin on November 28, 2009, 01:18:24 AM
Just had to one up me huh?  lol

Not like I wrote the initial script anyways lol.  Claw support huh?  Im gonna have to check that out and how you did it.  :p
Title: Re: Auto Honor and Attack
Post by: Cerveza on February 07, 2010, 04:43:13 AM
UPDATED 02/07/10

v2.5 - added CLAW looting awareness. Will pause while looter is active
- modified Consecrate Weapon for auto recast and mana checks
Title: Re: Auto Honor and Attack
Post by: luv2luvlong on April 28, 2010, 05:48:02 AM
Okay, been playin w/ this script for a couple of days raising my weapons skill works great. Nice, short, and to the point.

I only added one thing and changed the way claw works
 I added an EOO sub to the mele section
Code: [Select]
   GOSUB ENEMYOFONE
  IF !enemyofone = #false
  {
    REPEAT
      GOSUB ENEMYOFONE
    UNTIL !enemyofone = #TRUE
  }


SUB ENEMYOFONE
  Call ScanBuffBar  ; Presumes file is in same location as euo
  {
    If _EnemyOfOne_ in %BuffBarIconNames
      set !enemyofone #true
    else
      set !enemyofone #false
  }
  IF !enemyofone = #false
    GOSUB CAST_EOO
RETURN

SUB CAST_EOO
  EVENT MACRO 15 206
  WAIT 30
RETURN


and changed the claw to where this script told it when to loot a much better way in my opinion.( but you know what they say about opinions)

Code: [Select]
sub corpse
  GOsub TM_EnableAutoloot
   repeat
    WAIT 1
    namespace copy TM_loot_in_progress from global TM_loot
  until !TM_loot_in_progress <> #TRUE
  WAIT 5
  GOsub TM_DisableAutoloot
  WAIT
 RETURN
It is definately a nce little script to learn from, and not a goto in the whole thing.

thanks again for posting it.
Title: Re: Auto Honor and Attack
Post by: Cerveza on April 28, 2010, 06:14:49 AM
Thanks for posting up your changes. I like these little scripts to be generic enough that people can add in their own tools to customize them.

I've used this base script for a core of my dual client farming tool.

Char 1 honors and attacks (melee) then puts two vollems onto the target, Char 2 discords the target then puts his two vollems on target.
Title: Re: Auto Honor and Attack
Post by: luv2luvlong on April 28, 2010, 06:29:18 AM
I probably should mention that the EOO does require Endless Night's buff bar scanner.
Was gonna post a link, but then decided people should practice using the SEARCH button.
Thanks for posting up your changes. I like these little scripts to be generic enough that people can add in their own tools to customize them.

and they make nice learning tools
Title: Re: Auto Honor and Attack
Post by: baldielocks on May 01, 2010, 08:41:50 PM
I used to use this on UOcoders, was glad to find it again. It was fantastic for my vampurai, but having trouble with my peace tamer.

I did not remember the timer variable. It is causing some issues with successful honor, looting, and healing. The guard / follow / attack will override my cursor when healing or looting. I wind up casting heal on an item, or the target (thrasher for me).
My normal attack sequence when farming him is:
Honor
all kill
all follow me (to get him within two tiles for vet healing and looting)

_ when thrasher dead
all guard me
heal (GH for less than 10% damge, vet + GH for more than 10%)
loot (using BM auto looter. Still working with claw lite, but having issues getting it to work)

Is there a way to get the all kill cursor in a separate thread?
I have been looking for a good vet heal script, (and YES I used search). Any suggestions?



Title: Re: Auto Honor and Attack
Post by: Cerveza on August 24, 2010, 10:05:45 AM
One thing to remember on this Honor and Attack script....

If you are in an area that has a high rate of spawn you may run into some trouble. The script pauses while it loots. This means that if another creature spawns while your looting this script will NOT honor and attack it until the looting function is complete.
Title: Re: Auto Honor and Attack
Post by: Endless Night on October 20, 2010, 07:34:58 AM
As requested Cerverza...

unfortunately without the 'ENs_EUOCommandLibrary.Lua' it wont function.. so i guess i better make a big push to finish that library

Code: [Select]
--=========================================;
-- Script Name: Auto Honor & Attack        ;
-- Author: Cerveza                         ;
-- Version: 2.5                            ;
-- Shard OSI/FS: OSI/FS                    ;
-- Revision Date: 02/07/2010               ;
-- Purpose: Honor and Attack               ;
--=========================================;
--    ____         _      _  __   _ ___    ;
--   / __/ ___ _ _(_)_ _ | |_\ \ /  /_ \   ;
--   \__ \/  _| `_| | ` \|  _/ / \ \/ \ \  ;
--   __/  \ (_| | | | |) | | \ \_/ /\_/ /  ;
--   \____/\__|_| |_|  _/\__\ \___/\___/   ;
--                  |_|                    ;
--=========================================;
-- Setup:                                  ;
--  Add monster Types for auto honor       ;
--  http://www.easyuo.com/creaturetype.php ;
--=========================================;
-- v1.0 - First SUO Release                ;
-- v2.0 - Second SUO Release - rewrite     ;
-- v2.0a - Fixed spelling error, timout lol;
-- v2.5 - Added CLAW support               ;
--=========================================;

------------------------------------------------------------------------------------
-- required files
------------------------------------------------------------------------------------
dofile('ENs_EUOCommandLibrary.lua')

------------------------------------------------------------------------------------
-- function definition block
------------------------------------------------------------------------------------

function tamer(...)
  UO.Macro(3,0,all,kill)
  EUO_Target()
  UO.Macro(22,0)
  g_target=UO.LTargetID
  g_timer_timeout=(EUO_GetScnt()+g_timeout)
  repeat 
    EUO_Find, EUO_FindIndex, EUO_FindCnt=EUO_FindItem(g_target)
  until EUO_FindCnt<1 or (EUO_GetScnt()>g_timer_timeout)
  UO.Macro(3,0,all,follow,me)
  Wait(5 * 50) -- Coverted to Milliseconds
  UO.Macro(3,0,all,guard,me)
  Wait(40 * 50) -- Coverted to Milliseconds -- defeats the corpse honor bug thing
return 
end

function melee(...)
  UO.Macro(27,0) -- attack last
  g_target=UO.LTargetID
  g_timer_timeout=(EUO_GetScnt()+g_timeout)
  repeat 
    EUO_Find, EUO_FindIndex, EUO_FindCnt=EUO_FindItem(g_target)
    if g_consecrate== true  and  EUO_GetScnt() > g_timer_consecrate  and  UO.Mana > g_mana_consecrate then
      EUO_Result=consecrate()
  end
  until EUO_FindCnt==0 or EUO_GetScnt()>g_timer_timeout
  Wait(40 * 50) -- Coverted to Milliseconds -- defeats the corpse honor bug thing
return 
end

function consecrate(...)
  UO.Macro(15,203) -- consecrate weapon
  g_timer_consecrate=(EUO_GetScnt()+8)
  Wait(5 * 50) -- Coverted to Milliseconds
return 
end

------------------------------------------------------------------------------------
-- end of function block
------------------------------------------------------------------------------------


-- Adjust these for your preference
g_monsters=FD_HI_ -- demons and succubi
g_timeout=25 -- app. time in seconds between kills
g_mana_consecrate=15

-- No editing required below this line
g_tamer=false
g_consecrate=false
g_timer_consecrate=EUO_GetScnt()

EUO_DispRes=EUO_Display("yesno","Are you using a Tamer and Pet?")
if EUO_DispRes== yes then
  g_tamer=true
  end
if g_tamer== false then
  EUO_DispRes=EUO_Display("yesno","Use Consecrate Weapon for each monster?")
  if EUO_DispRes== yes then
    g_consecrate=true
     end
end

repeat 
  EUO_Find, EUO_FindIndex, EUO_FindCnt=EUO_FindItem(g_monsters,'G_8') -- 8 is max range for honor, just targetting can go 15 or more
  if EUO_FindCnt> 0 then
    UO.LTargetID=EUO_Find[EUO_FindIndex].ID
    UO.LTargetKind=1
    UO.Macro(49,1) -- honor
    EUO_Target()
    UO.Macro(22,0) -- last target
    Wait(5 * 50) -- Coverted to Milliseconds
    if g_tamer== true then
      EUO_Result=tamer()
      end
    if g_tamer== false then
      EUO_Result=melee()
      end
    repeat 
      EUO_NSName , EUO_NSType = EUO_NSCopy(TM_loot_in_progress,from,globalTM_loot)
    until l_TM_loot_in_progress~=true
  end
  Wait(5 * 50) -- Coverted to Milliseconds
until false

Title: Re: Auto Honor and Attack
Post by: Cerveza on October 20, 2010, 07:47:31 AM
Nice, tks!
Title: Re: Auto Honor and Attack
Post by: Endless Night on October 20, 2010, 07:49:48 AM
Nice, tks!

Your welcome .. cerverza was an easy one didnt contain any Goto's :)
Title: Re: Auto Honor and Attack
Post by: Cerveza on October 20, 2010, 08:58:54 AM
Nice, tks!

Your welcome .. cerverza was an easy one didnt contain any Goto's :)

And never will heh.... :P
Title: Re: Auto Honor and Attack
Post by: gruntman on December 12, 2010, 06:51:33 AM
Okay, been playin w/ this script for a couple of days raising my weapons skill works great. Nice, short, and to the point.

I only added one thing and changed the way claw works
 I added an EOO sub to the mele section
Code: [Select]
   GOSUB ENEMYOFONE
  IF !enemyofone = #false
  {
    REPEAT
      GOSUB ENEMYOFONE
    UNTIL !enemyofone = #TRUE
  }


SUB ENEMYOFONE
  Call ScanBuffBar  ; Presumes file is in same location as euo
  {
    If _EnemyOfOne_ in %BuffBarIconNames
      set !enemyofone #true
    else
      set !enemyofone #false
  }
  IF !enemyofone = #false
    GOSUB CAST_EOO
RETURN

SUB CAST_EOO
  EVENT MACRO 15 206
  WAIT 30
RETURN


and changed the claw to where this script told it when to loot a much better way in my opinion.( but you know what they say about opinions)

Code: [Select]
sub corpse
  GOsub TM_EnableAutoloot
   repeat
    WAIT 1
    namespace copy TM_loot_in_progress from global TM_loot
  until !TM_loot_in_progress <> #TRUE
  WAIT 5
  GOsub TM_DisableAutoloot
  WAIT
 RETURN
It is definately a nce little script to learn from, and not a goto in the whole thing.

thanks again for posting it.

I cannot seem to place this in the right area of the script....can someone guide me please.
Title: Re: Auto Honor and Attack
Post by: luv2luvlong on December 12, 2010, 12:33:27 PM
Okay, been playin w/ this script for a couple of days raising my weapons skill works great. Nice, short, and to the point.

I only added one thing and changed the way claw works
 I added an EOO sub to the mele section
Code: [Select]
   GOSUB ENEMYOFONE
  IF !enemyofone = #false
  {
    REPEAT
      GOSUB ENEMYOFONE
    UNTIL !enemyofone = #TRUE
  }


SUB ENEMYOFONE
  Call ScanBuffBar  ; Presumes file is in same location as euo
  {
    If _EnemyOfOne_ in %BuffBarIconNames
      set !enemyofone #true
    else
      set !enemyofone #false
  }
  IF !enemyofone = #false
    GOSUB CAST_EOO
RETURN

SUB CAST_EOO
  EVENT MACRO 15 206
  WAIT 30
RETURN


and changed the claw to where this script told it when to loot a much better way in my opinion.( but you know what they say about opinions)

Code: [Select]
sub corpse
  GOsub TM_EnableAutoloot
   repeat
    WAIT 1
    namespace copy TM_loot_in_progress from global TM_loot
  until !TM_loot_in_progress <> #TRUE
  WAIT 5
  GOsub TM_DisableAutoloot
  WAIT
 RETURN
It is definately a nce little script to learn from, and not a goto in the whole thing.

thanks again for posting it.

I cannot seem to place this in the right area of the script....can someone guide me please.
What are you trying to do w/it.
And the corpse sub requires TM's Claw to be running as a looter.
Title: Re: Auto Honor and Attack
Post by: gruntman on December 12, 2010, 02:19:17 PM
Well I tried adding it in to the script as it refers to and yes I have the claw running and Yes I have the buff scanner running but it never seems to cast EOO so I am guessing that it must be inserted into the script in a specific area that I cannot seem to figure out so any help with placement of the snippet would be gratefully appreciated.   

Anyone able to assist?
Title: Re: Auto Honor and Attack
Post by: gruntman on January 02, 2011, 05:42:59 AM
I cannot seem to get the EOO part of the script in the right area or something. Can someone please assist me with placing the EOO snippet into the script properly.
Title: Re: Auto Honor and Attack
Post by: luv2luvlong on January 02, 2011, 05:53:29 AM
1. you do not need EN's buff bar scanner running, it is a called script.
2. I threw the gosub eoo in the sub melee, so it looks like this
Code: [Select]
sub melee
  event macro 27 0 ; attack last
  set %target #ltargetID
  set %timer_timeout ( #sCnt + %timeout )
 
    GOSUB ENEMYOFONE
  IF !enemyofone = #false
  {
    REPEAT
      GOSUB ENEMYOFONE
    UNTIL !enemyofone = #TRUE
  }
  REPEAT
    WAIT 10
  repeat
  {
    findItem %target
    if %consecrate = #TRUE && #sCnt > %timer_consecrate && #mana > %mana_consecrate
      gosub consecrate
     
  }
  until #findCnt = 0 || #sCnt > %timer_timeout
  wait 40 ; defeats the corpse honor bug thing
return
Title: Re: Auto Honor and Attack
Post by: gruntman on January 04, 2011, 09:44:24 AM
Works like a charm! Thanks loads for all your help
Title: Re: Auto Honor and Attack
Post by: Cerveza on January 04, 2011, 10:17:57 AM
Good to see people using this.

BTW, I added following to my version ;)
Great for catching up to those critters who run away when they get low....
Title: Re: Auto Honor and Attack
Post by: GENESISBM on January 04, 2011, 02:31:26 PM
Very good
Title: Re: Auto Honor and Attack
Post by: gruntman on January 06, 2011, 04:21:18 PM
Hmmm care to share the added follow  8) TM?
Title: Re: Auto Honor and Attack
Post by: TrailMyx on January 06, 2011, 04:26:42 PM
Oh no, that's a Cerveza Joint.  heh.
Title: Re: Auto Honor and Attack
Post by: gruntman on January 06, 2011, 04:28:42 PM
Opps my bad...I meant Cerveza!
Title: Re: Auto Honor and Attack
Post by: MeWonUo on January 06, 2011, 04:32:52 PM
I very rarely follow things for the kill strike anymore because I normally have a looter running in the background.  You can also just re-attack and they come back to you. 
Title: Re: Auto Honor and Attack
Post by: gruntman on January 08, 2011, 06:43:03 AM
I remember back in the day there was an auto attack script that would not only cast EOO and Cw but it would also use lightning strike and such. Is there anyway to add that function into the script? I have tried but failed miserably.
Title: Re: Auto Honor and Attack
Post by: Cerveza on January 08, 2011, 08:46:59 AM
My version does all that heh... I'll play around with making it fool proof and perhaps get it posted up.
Title: Re: Auto Honor and Attack
Post by: gimlet on January 08, 2011, 02:13:05 PM
If you make it fool proof - someone will create a bigger fool!
Title: Re: Auto Honor and Attack
Post by: gruntman on January 08, 2011, 09:08:16 PM
Thanks Cerveza!
Title: Re: Auto Honor and Attack
Post by: Tomb on March 11, 2011, 08:16:51 PM
Script works FANTASTIC! But i've been trying to add E.O.O into the script and i just keep messing it all together any way you think you might be able to add that in there?


-Tomb
Title: Re: Auto Honor and Attack
Post by: Cerveza on March 12, 2011, 01:49:56 AM
I've been thinking of adding it in, putting in a spell cast checker and a timer.... I'll work on this.
Title: Re: Auto Honor and Attack
Post by: SolidSnake on March 12, 2011, 07:47:53 AM
going to give this one a go Cerv..looks like fun..
Title: Re: Auto Honor and Attack
Post by: Kalaka on March 13, 2011, 12:57:49 PM
EOO would be amazing. I used this before and I believe ended up just looping a razor macro to cast enemy of one every so often, didn't seem to cause any problems.
Title: Re: Auto Honor and Attack
Post by: Cerveza on December 01, 2011, 06:00:04 AM
Modified Version 01/DEC/11

v2.5a - Changed things around a bit. Setup will ask you to set your lightning strike icon, and then move to the position you want to farm from. Once there press ALT + F10 to begin the script.

Lightning Strike now built in, NOTHING ELSE. Chiv things would be easy to include but I have removed Chiv from my Sampire. Script will now always keep Lightning Strike active. You must keep your Lightning Strike icon uncovered, and do not move it at any time. LS uses pixel scanning to identify if the icon is "active". If the pixels are covered or moved it will see the wrong pixel color and continuously toggle LS on and off.

Also included a "It's running away - FOLLOW IT" routine. Script will wait 20 seconds for monster to approach and melee begin. Then it will constantly find the monster and check it's distance. If the monster begins to move away the script will pathfind to follow.

Once the monster is dead, the script will look for CLAw (http://www.scriptuo.com/index.php?topic=17.0) looting activity. If you are running CLAw (http://www.scriptuo.com/index.php?topic=17.0) then the script pauses to allow CLAw (http://www.scriptuo.com/index.php?topic=17.0) to evaluate and loot the corpse. After looting is complete, script will move the character back to starting position.

Version 2.5a is untested as of 1 Dec 2011.
Title: Re: Auto Honor and Attack
Post by: NObama on December 01, 2011, 01:44:07 PM
Quote from: Cerveza
"It's running away - FOLLOW IT"

I laughed.

Have you been using this down in Shame?  There are a couple places that immediately leap to mind where this might be quite useful.
Title: Re: Auto Honor and Attack
Post by: Cerveza on December 01, 2011, 02:12:51 PM
I have used a version, this is the all encompassing version for Shame use.

I don't like to go after stuff in the initial attack. I like to lure it to a spot I chose to fight. But at the end of the fight I hate coming back to the keyboard and seeing something red lined with a bunch of people standing around looking at it.

This *should* wait for 20 seconds before going after stuff.
Title: Re: Auto Honor and Attack
Post by: SlackBladder on January 05, 2012, 02:34:34 AM
Modified Version 01/DEC/11



Version 2.5a is untested as of 1 Dec 2011.
Tested and runs smooth as silk....
Took me a while to work out why the script pathfinds after a kill.....
I loot manualy and the script wanted to get back to the spot i "started" the script......I blame my age..... :-\
Anyways, top marks as usual......many thanks....
Edit: Tested on a freeshard....
Title: Re: Auto Honor and Attack
Post by: Cerveza on January 05, 2012, 02:39:58 AM
Thanks for confirming that SlackBladder!
Title: Re: Auto Honor and Attack
Post by: Mixie on February 13, 2012, 11:36:17 AM
Got it to work together with the autolooter. Works great and smooth! Much spawn does make it difficult.
Now i have to find a way to get rails going for fully afk.
Title: Re: Auto Honor and Attack
Post by: Omnibare on March 09, 2012, 08:33:45 PM
I've got this setup on an OSI farming Troglodytes. For the sake of simplicity I created a separate script to maintain EOO. It kills a little slower than I would manually due to waiting for claw to loot, but otherwise it's great. I will probably add confidence to my EOO script as well because when it stop to loot a bit of bad luck could end in a death. (maybe)

Either way, thanks a lot, this is short and sweet.

Edit: Oh yeah, this script doesn't kill innocent puppies and kittens, which makes up for being slightly slower than manual control. I did edit the script to chase down enemies after 10 seconds rather than 20. That makes it stable enough that I don't need to worry about confidence.

Thanks again.
Title: Re: Auto Honor and Attack
Post by: Cerveza on March 10, 2012, 06:31:35 AM
NP, glad you find it useful.
Title: Re: Auto Honor and Attack
Post by: Omnibare on March 10, 2012, 06:53:20 AM
Last night/this morning I did my best to go through and put this script on crack. The results were quite good, but I'm hoping for some help ironing out the kinks.

The first thing I did was implement EOO, and Confidence. In order to preserve mana in combat, EOO is only applied between mobs. Health is tested in and out of the combat loop, and if below 80 health, confidence is cast. There is probably a more appropriate way of making this percentage based rather than a static health number. The code I used to add EOO and Confidence was taken directly from these boards, I take no credit for that effort.

I also applied mana checks to EOO, LS, and Confidence. EOO and LS will only be cast if I have greater than 14 mana. This ensures that I always have mana for confidence if I need it. Confidence also has a mana check of 7, but that's just to avoid spamming the skill when I don't have mana to cast it. Again the numbers assigned to the mana checks are relevant to my own gear, and would not be suitable for most people. For public use they would need to be set to the default mana cost of each spell, or consider lower mana cost on the users suit.

I reduced the wait time between honoring a target, and attacking it. When I play manually I do this with a single macro, so this change just mimics that behavior.

By far, the most significant change I made was to ensure that while looting I continue to honor and attack new targets. This allowed me to keep up with the absurd spawn rate of troglodytes. I then established a new variable to keep track of whether or not I needed to chase a fleeing mob or not. If you did not move, then there is never a need to pause killing while you loot. Both can be done at the same time. If I had chased a fleeing mob, then the script pauses attacking long enough to loot and then walk back to my starting location.  At least that's the intent. It does stop to let me loot, but I can't seem to make it return to the starting location reliably while there are more enemies around. It will instead continue to engage any new spawns from its current location, and only return when there is nothing left to kill. This of course could lead to you chasing enemies until you were no longer even near your intended stationary zone. This is a critical flaw, and I would appreciate any insight available.

Newho, I've been up for about 22 hours now, so I'm going to get some sleep. I attached my modifications of the script, but that's mostly for the sake of feedback. It does kill significantly faster than the default script, but there are risks involved, and it may not be tuned appropriately to your character.

Use at your own risk and thanks for any feedback.
Title: Re: Auto Honor and Attack
Post by: grrrls on June 22, 2012, 03:17:31 PM
Last night/this morning I did my best to go through and put this script on crack. The results were quite good, but I'm hoping for some help ironing out the kinks.

The first thing I did was implement EOO, and Confidence. In order to preserve mana in combat, EOO is only applied between mobs. Health is tested in and out of the combat loop, and if below 80 health, confidence is cast. There is probably a more appropriate way of making this percentage based rather than a static health number. The code I used to add EOO and Confidence was taken directly from these boards, I take no credit for that effort.

I also applied mana checks to EOO, LS, and Confidence. EOO and LS will only be cast if I have greater than 14 mana. This ensures that I always have mana for confidence if I need it. Confidence also has a mana check of 7, but that's just to avoid spamming the skill when I don't have mana to cast it. Again the numbers assigned to the mana checks are relevant to my own gear, and would not be suitable for most people. For public use they would need to be set to the default mana cost of each spell, or consider lower mana cost on the users suit.

I reduced the wait time between honoring a target, and attacking it. When I play manually I do this with a single macro, so this change just mimics that behavior.

By far, the most significant change I made was to ensure that while looting I continue to honor and attack new targets. This allowed me to keep up with the absurd spawn rate of troglodytes. I then established a new variable to keep track of whether or not I needed to chase a fleeing mob or not. If you did not move, then there is never a need to pause killing while you loot. Both can be done at the same time. If I had chased a fleeing mob, then the script pauses attacking long enough to loot and then walk back to my starting location.  At least that's the intent. It does stop to let me loot, but I can't seem to make it return to the starting location reliably while there are more enemies around. It will instead continue to engage any new spawns from its current location, and only return when there is nothing left to kill. This of course could lead to you chasing enemies until you were no longer even near your intended stationary zone. This is a critical flaw, and I would appreciate any insight available.

Newho, I've been up for about 22 hours now, so I'm going to get some sleep. I attached my modifications of the script, but that's mostly for the sake of feedback. It does kill significantly faster than the default script, but there are risks involved, and it may not be tuned appropriately to your character.

Use at your own risk and thanks for any feedback.


Where did you attach your updates, Omnibare?
Title: Re: Auto Honor and Attack
Post by: LordAmitlu on October 13, 2012, 11:14:43 AM
How would I change the script to attack the sphynx to train my greater dragon?

; Adjust these for your preference
set %monsters FD_HI_ ; _________
set %timeout 25 ; app. time in seconds between kills
set %mana_consecrate 15

I don't think there is an ID for the sphynx... Just checked easyuo ID page.
Title: Re: Auto Honor and Attack
Post by: MeWonUo on February 02, 2013, 03:56:31 PM
Have to say that I had completely forgotten how easy this script can make dungeon farming.  Just fired it up after quite a long while, still awesome! 

Thanks much Cerveza.
Title: Re: Auto Honor and Attack
Post by: NObama on February 03, 2013, 04:13:34 AM
How would I change the script to attack the sphynx to train my greater dragon?

; Adjust these for your preference
set %monsters FD_HI_ ; _________
set %timeout 25 ; app. time in seconds between kills
set %mana_consecrate 15

I don't think there is an ID for the sphynx... Just checked easyuo ID page.

Everything has an ID.  Use a skinning knife on the sphinx and then look at what the #ltargetid value is.  And #findtype.  Or search up any one of a dozen item ID finders.
Title: Re: Auto Honor and Attack
Post by: Chops on December 25, 2014, 03:00:23 AM
This great script used to work, now after I set it up and it says to click the button when I am ready, I click the button and nothing happens.
Any idea what could be the issue? Merry Xmas by the way!


Edit- Found out what was the problem, the newest euo client doesn't work so well with it, I went back to  247 version
Title: Re: Auto Honor and Attack
Post by: BabysittingDingo on January 20, 2015, 04:32:58 PM
was wondering if anyone could explain why it wont pathfind? or run lightning strike appropriately, do i need to set some things in the script before taking off? I start it off, locate the lightning strike icon, all that Jazz and i press the hotkey to begin the script and Boom, i'm thrown into a perpetual loop of it casting enemy of one too many times, doesn't follow the target, i've got it Honoring the target tho that seems to be the most effective thing.
 
i play on alexandria if that helps explain something

also trying to put a bag of sending loop in there for gold, any help is greatly appreciated!
Title: Re: Auto Honor and Attack
Post by: ZigZagZebra on January 20, 2015, 06:28:18 PM
was wondering if anyone could explain why it wont pathfind? or run lightning strike appropriately, do i need to set some things in the script before taking off? I start it off, locate the lightning strike icon, all that Jazz and i press the hotkey to begin the script and Boom, i'm thrown into a perpetual loop of it casting enemy of one too many times, doesn't follow the target, i've got it Honoring the target tho that seems to be the most effective thing.
 
i play on alexandria if that helps explain something

also trying to put a bag of sending loop in there for gold, any help is greatly appreciated!

I don't run on Alexandria, but the lightning strike fires by a compare pixel in this script. This is basically looking to see if the lightning strike icon has changed and will fire dependent on that. If you don't setup the lightning strike icon properly, or if the icon doesn't change to red like it does on OSI you could have issues.

Just my $0.2
Title: Re: Auto Honor and Attack
Post by: madatu on February 11, 2015, 11:36:16 AM
i am attempting to modify this a little to use armor ignore, i changed it to event macro 35. everything seems of but it targets the Armor Ignore button too much spamming i need more mana. i changed a few waits and that didnt help.

sub exec_LS
  cmppix 1 f
    {
    event macro 35
    wait 5
    }

what do you think i should modify to slow it down a little. i would appreciate any advice any one have.
Title: Re: Auto Honor and Attack
Post by: ZigZagZebra on February 11, 2015, 02:08:47 PM
i am attempting to modify this a little to use armor ignore, i changed it to event macro 35. everything seems of but it targets the Armor Ignore button too much spamming i need more mana. i changed a few waits and that didnt help.

sub exec_LS
  cmppix 1 f
    {
    event macro 35
    wait 5
    }

what do you think i should modify to slow it down a little. i would appreciate any advice any one have.

since LS is easy to chain and specials are not due to the increased mana cost, I would replace with
Code: [Select]
sub exec_LS
if #mana >= 30
{
 cmppix 1 f
    {
    event macro 35
    wait 5
    }
}
If this were a larger script, I would say for performance sake, place the if #mana >= 30 block before every gosub exec_LS call, that way the script doesn't have to iterate to the exec_LS sub everytime if it doesn't have to. The code snippet above is just for modularity's sake.

may behoove you to replace sub exec_LS with sub exec_AI and change where its called in the script. Its good form to name appropriately :)
Title: Re: Auto Honor and Attack
Post by: madatu on February 11, 2015, 04:16:27 PM
thanks you for that. i was going to change the exec when i got it correct
Title: Re: Auto Honor and Attack
Post by: madatu on February 11, 2015, 04:39:05 PM
Well labeling stuff properly made the script much more stable. is there a way to have it change to lightning strike when mana is lower than 30.
Title: Re: Auto Honor and Attack
Post by: ZigZagZebra on February 11, 2015, 06:59:59 PM
Haven't tested this yet, but If you change the setup sub to
Code: [Select]
sub setup
  event macro 35
  display Move mouse to Armor Ignore Icon$$      You have 2 seconds
  wait 2s
  savePix #CURSORX #CURSORY 1
  wait 5
  event macro 15 149
  display Move mouse to Lightning Strike Icon$$      You have 2 seconds
  wait 2s
  savePix #CURSORX #CURSORY 2
  wait 5
  display ok Setup Complete$Get into position$Script will begin when you press the hotkey.

  set %waiting_to_start #TRUE
  while %waiting_to_start = #TRUE
    {
    onhotkey %hotkey %hotkeyqual
      set %waiting_to_start #FALSE
    }
  set %playerX #charPosX
  set %playerY #charPosY
  set %playerZ #charPosZ
return

you can set two pixels to scan one for AI and one for LS
then change the exec_LS sub to:
Code: [Select]
sub exec_LS
   if mana >= 30
  {
   cmppix 1 f
    {
    event macro 35
    wait 5
    }
   }
    else
  {
   cmppix 2 f
   {
     event macro 15 149
     wait 5
     }
    }
return
Title: Re: Auto Honor and Attack
Post by: guyatlantic on March 01, 2015, 01:12:44 AM
This is a great script, been using it for a while along with Trails Looter! Great stuff guys.

If someone would be willing to answer a question for me it would much appreciated.

Lately when I run the script, it seems to run an endless loop or EOO for some odd reason. I ran it on windows 7 flawlessly, bought a new computer with 8.1, it ran fine for a couple weeks. Now it just runs an endless loop of EOO and i cant figure out why.
Thanks in advance for any input!
Title: Re: Auto Honor and Attack
Post by: anythralus on January 25, 2016, 10:24:32 PM
I don't know why but this script doesn't work for me at all, i even changed it a couple of times to make it work but it didn't. :(

Btw, i play in an freeshard (UODemise), don't know if that's the problem or whatever, i still use alot of script from here (but all of them have some problems and bugs), but this seems to be a very well made auto kill.

Great work anyway.
Title: Re: Auto Honor and Attack
Post by: hrs024 on March 06, 2016, 11:04:41 PM
great script, only need a better way to heal samp, il find some kinda healer script, but anywho, thanks alot!
Title: Re: Auto Honor and Attack
Post by: tonysonoma on May 27, 2018, 11:30:07 PM
Great script! I end up coming back to this one over and over and even often use it when training a new character. Well with a looter of course. In fact this one lead me to the uoXL swap bot which taught me ton.
Title: Re: Auto Honor and Attack
Post by: NightCop on March 14, 2019, 09:28:39 AM
can i get this script ?
Title: Re: Auto Honor and Attack
Post by: Tidus on March 14, 2019, 10:25:14 PM
You need to read the site rules and submit an introduction.
Title: Re: Auto Honor and Attack
Post by: Ledos76 on April 24, 2020, 09:05:58 AM
the script doesn't look bad, is it still working?
Title: Re: Auto Honor and Attack
Post by: Crisis on April 24, 2020, 10:27:21 AM
Make an introduction so you can become a member and find out.  8)