Author Topic: Auto Honor and Attack  (Read 67684 times)

0 Members and 1 Guest are viewing this topic.

Offline baldielocks

  • Sr. Member
  • *
  • Posts: 301
  • Activity:
    0%
  • Reputation Power: 4
  • baldielocks has no influence.
  • Gender: Male
  • Respect: +11
  • Referrals: 5
    • View Profile
Re: Auto Honor and Attack
« Reply #15 on: May 01, 2010, 08:41:50 PM »
+1
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?




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: Auto Honor and Attack
« Reply #16 on: August 24, 2010, 10:05:45 AM »
+1
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.
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: Auto Honor and Attack
« Reply #17 on: October 20, 2010, 07:34:58 AM »
+1
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

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 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: Auto Honor and Attack
« Reply #18 on: October 20, 2010, 07:47:31 AM »
+1
Nice, tks!
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: Auto Honor and Attack
« Reply #19 on: October 20, 2010, 07:49:48 AM »
+1
Nice, tks!

Your welcome .. cerverza was an easy one didnt contain any Goto's :)
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 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: Auto Honor and Attack
« Reply #20 on: October 20, 2010, 08:58:54 AM »
+1
Nice, tks!

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

And never will heh.... :P
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 gruntman

  • Full Member
  • ***
  • Posts: 168
  • Activity:
    0%
  • Reputation Power: 2
  • gruntman has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #21 on: December 12, 2010, 06:51:33 AM »
+1
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.

Offline luv2luvlong

  • Sr. Member
  • *
  • Posts: 272
  • Activity:
    0%
  • Reputation Power: 4
  • luv2luvlong has no influence.
  • Gender: Male
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #22 on: December 12, 2010, 12:33:27 PM »
+1
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.
"If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle" - Sun Tzu in reference to his five points of victory.

Offline gruntman

  • Full Member
  • ***
  • Posts: 168
  • Activity:
    0%
  • Reputation Power: 2
  • gruntman has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #23 on: December 12, 2010, 02:19:17 PM »
+1
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?
« Last Edit: January 01, 2011, 08:06:47 PM by gruntman »

Offline gruntman

  • Full Member
  • ***
  • Posts: 168
  • Activity:
    0%
  • Reputation Power: 2
  • gruntman has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #24 on: January 02, 2011, 05:42:59 AM »
+1
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.

Offline luv2luvlong

  • Sr. Member
  • *
  • Posts: 272
  • Activity:
    0%
  • Reputation Power: 4
  • luv2luvlong has no influence.
  • Gender: Male
  • Respect: +14
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #25 on: January 02, 2011, 05:53:29 AM »
+1
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
"If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle" - Sun Tzu in reference to his five points of victory.

Offline gruntman

  • Full Member
  • ***
  • Posts: 168
  • Activity:
    0%
  • Reputation Power: 2
  • gruntman has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #26 on: January 04, 2011, 09:44:24 AM »
+1
Works like a charm! Thanks loads for all your help

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: Auto Honor and Attack
« Reply #27 on: January 04, 2011, 10:17:57 AM »
+1
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....
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 GENESISBM

  • Restricted
  • *
  • Posts: 1
  • Activity:
    0%
  • Reputation Power: 1
  • GENESISBM has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #28 on: January 04, 2011, 02:31:26 PM »
+1
Very good

Offline gruntman

  • Full Member
  • ***
  • Posts: 168
  • Activity:
    0%
  • Reputation Power: 2
  • gruntman has no influence.
  • Gender: Male
  • Respect: +33
  • Referrals: 0
    • View Profile
Re: Auto Honor and Attack
« Reply #29 on: January 06, 2011, 04:21:18 PM »
+1
Hmmm care to share the added follow  8) TM?

Tags: Cerveza