ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Gold Farming => Topic started by: Coragin on June 29, 2009, 11:36:42 AM

Title: SUO Autokill/Auto Honor
Post by: Coragin on June 29, 2009, 11:36:42 AM
I did NOT write this script.  It is based off of the SUO Champ spawn helper, I just changed some lines to use honor instead of discord, and changed msg all kill to attack the creature.  Thanks to Cervaza and anyone else who worked on the SUO Champ spawn helper as this is all their code, I just did some modification to make it be able to auto honor.

Things you will need to run or do with this:
1. Good idea to run a heal script.
2. If you want to loot, run AdvCLAW Lite
3. Give credit to the original writers, you can find the post here in this section for the original code.

To use it on your favorite spot, you will need to add in the ID of what you want to kill in script.

In this line here:
Quote
set %spawn NB_XI_EF_WF_PB_ZM_UF_UGB

Code: [Select]
set %spawn NB_XI_EF_WF_PB_ZM_UF_UGB
set %timer_follow #sCnt

;display Target your Pet
;set #TARGCURS 1
;wait 5
;while #TARGCURS = 1
;  wait 0
;set %PetID #ltargetid
;wait 5

display yesno Use Honor?
if #dispRes = yes
{
  set %discord #TRUE
  set %timer_disco #sCnt
}

; ********** main loop **********

repeat
    gosub LocateCreature %spawn
    if #RESULT <> #FALSE
    {
      set %target #findID
      gosub Attack %target
    }
  finditem %PetID
  ;if #finddist >= 8 && #sCnt > %timer_follow
  ;{
  ;  msg all follow me $
  ;  set %timer_follow ( #sCnt + 8 )
  ;}
until #false

; ********** subs **********

sub LocateCreature
  namespace push
  namespace local LC
  set !spawn %1
  for !i 1 10
  {
    finditem !spawn G_ , !i
    if #FINDCNT > 0
    {
      set #FINDINDEX #RANDOM % #FINDCNT + 1
      namespace pop
      return #FINDID
    }
  }
  namespace pop
return #FALSE

sub Attack
  namespace push
  namespace local ATK
  set !target %1
  finditem !target G_10
  if #findCnt = 0 || #findz > 29
    return
  set #ltargetID !target
  set #ltargetKind 1
  if #sCnt > %timer_disco && %discord = #TRUE
  {
    event macro 49 1 ; honor
    target 3s
    event macro 22 0 ; last target
    set %timer_disco ( #sCnt + 5 )
    wait 10
  }
  event macro 27
  repeat
    finditem !target
  until #findCnt = 0
  wait 5
  namespace pop
  wait 20
return

; ****************** RESERVED FOR FUTURE USE ******************

; Set %spawn_semidar W_BE_UC_UD_YH_N_ ; Imps, Mongbats, gargoyles, harpies, burning gargs, stone gargs
; Set %spawn_mephitis UE_SD_K_J_U_HD_PD_EJ_UI_ ; Scorpions, Giant Spiders, Terathan Warriors, Terathan Drones, Dread spiders, Matriarch, Avengers, PEs
; Set %spawn_rikktor QE_AE_DE_FE_AB_QF_XE_YE_X_DF_CD_DI_ ; Lizardmen, Snakes, Lava lizards, ophidian warriors, Dragons, Ophidian Avengers
; Set %spawn_oaks WH_XI_SH_SC_ ; Pixies, Shadow Wisps, Kirins, Unicorns
; Set %spawn_baracoon XF_VE_IE_OE_HE_LD_BI_RB_UB_ ; ?, Slime, Ratman, Ratman Archer, Ratman Mage, ?, Hellhound
; Set %spawn_niera II_WI_TI_YD_WD_NI_ ; Mummies, Skeletal Knights, Wraiths, Spectres
; Set %spawn_serado IH_DE_GH_PH_HH_FH_ ; Deathwatch Beetle, Lizardmen, Kappa, Revenant Lion, Hiryu, Oni

; set %spawn_all %spawn_semidar , %spawn_mephitis , %spawn_rikktor , %spawn_oaks , %spawn_baracoon , %spawn_niera , %spawn_serado
Title: Re: SUO Autokill/Auto Honor
Post by: Rn on July 04, 2009, 12:54:14 PM
hey, i was lookin to try this out but dont know much about scripting. how do i find the ID of creatures so i can add it to the script? will be testing it on daemons
Title: Re: SUO Autokill/Auto Honor
Post by: rana70 on July 04, 2009, 03:01:08 PM
hey, i was lookin to try this out but dont know much about scripting. how do i find the ID of creatures so i can add it to the script? will be testing it on daemons

You can use this if yo like

Code: [Select]
Display Get ID$$Target your Monster
Set #targcurs 1
Target
Repeat
Until #TargCurs = 0

FindItem #LTargetID
Display TargetType: #FindType

halt
Title: Re: SUO Autokill/Auto Honor
Post by: msb9380 on November 14, 2009, 01:15:50 PM
Just wanted to say thank you, I have been looking for something like this. It sure does make playing with one working arm ALOT easier. Very nice, works well with looters, but sometimes gets hung up trying to Honor and Loot at the same time.
Title: Re: SUO Autokill/Auto Honor
Post by: Coragin on November 14, 2009, 01:31:39 PM
Welcome, I made an updated version that will cast curse weapon when you are low on hp and will cast enemy of one
Title: Re: SUO Autokill/Auto Honor
Post by: Cerveza on November 14, 2009, 04:56:41 PM
It's good that you've put this out. I've been using a version almost identical to it for a while with my archer.

I'd forgotten that the original Champ Spawn Helper was developed for a tamer...

Thanks Coragin!
Title: Re: SUO Autokill/Auto Honor
Post by: Coragin on November 14, 2009, 06:09:35 PM
Well it was made from the champ helper ;)  Which you wrote, all I did was change a few things.  And I gave credit in first line of post too :)  Had to check that its been so long since I looked at this.