Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[EUO] Blacksmithing
#1

Instructions are in the comments. Just set a container where your ingots are that you'd like to use to train. All made daggers will go in that same container.

Code:
; OzSmithing 1.0
;
; Smiths daggers and puts them into a container
; Restocks using same container
;
; == SETUP ==
; Put a smithing hammer on your characters hand and change %IngotContainer
; to be the ID of you container where you'll put the daggers and get
; ingots from. The container needs to be open when this script is run.

set %IngotContainer UYEHKMD ; ID of the container where ingots are and daggers go to
set %IngotAmount 99 ; How many ingots at a time taken from container at a time

while #TRUE
{
  chooseSkill blac
  if #skill >= 1000
  {
    event sysmessage ++ You have GM'ed blacksmithy! Congratulations! Halting macro.
    halt
  }
  gosub Restock
  wait 1s
  gosub Smith
  wait 1s
  gosub ArrangeItems
  wait 1s
}

sub Restock
  finditem RMK_BVI_DWJ C_ , #BACKPACKID
  if ( #FINDCNT < 1 || #FINDSTACK < 3 )
  {
    finditem RMK_BVI_DWJ C_ , %IngotContainer
    if ( #FINDCNT > 0 )
    {
      if ( #FINDSTACK >= 3 )
      {
        Exevent Drag #FINDID %IngotAmount
        Exevent Dropc #BACKPACKID
      }
      else
        ignoreItem #FINDID
    }
    else
    {
      event sysmessage ++ No more ingots to restock from! Stopping macro...
      halt
    }
  }
return

sub smith
SmithMore:
  finditem RMK_BVI_DWJ C_ , #BACKPACKID
  if ( #FINDCNT > 0 )
  {
    if ( #FINDSTACK >= 3 )
    {
      set #LOBJECTID #FINDID
      event macro 17 0
      while ! ( #CONTKIND = IOIB && #CONTSIZE = 530_437 )
      {
      }
      set %clickX 285 + #CONTPOSX
      set %clickY 410 + #CONTPOSY
      click %clickX %clickY dmc
      set %wtfTimer #SYSTIME
      while ! ( #CONTKIND = IOIB && #CONTSIZE = 530_437 )
      {
        if ( #SYSTIME - %wtfTimer > 10000 )
          break
      }
    }
  }
  finditem RMK_BVI_DWJ C_ , #BACKPACKID
  if ( #FINDCNT > 0 )
  {
    if ( #FINDSTACK >= 3 )
      goto SmithMore
  }
return

sub ArrangeItems
MoveMoreDaggers:
  finditem WSF C_ , #BACKPACKID
  if ( #FINDCNT > 0 )
  {
    Exevent Drag #FINDID #FINDSTACK
    Exevent Dropc %IngotContainer
  }
  finditem WSF C_ , #BACKPACKID
  if ( #FINDCNT > 0 )
    goto MoveMoreDaggers

MoveMoreIngots:
  finditem RMK_BVI_DWJ C_ , #BACKPACKID
  if ( #FINDCNT > 0 )
  {
    Exevent Drag #FINDID #FINDSTACK
    Exevent Dropc %IngotContainer
  }
  finditem RMK_BVI_DWJ C_ , #BACKPACKID
  if ( #FINDCNT > 0 )
    goto MoveMoreIngots
return
#2

Well, I tried this script and it works pretty well.
I had to change IOIB for GJZ though.
No more problems. It works with colored ingots too Wink

EDIT: I found the same and very annoying problem that is found in every place nowadays. The freezing client thing ¬¬ (I think this is done for avoiding autolooters)

So... I had to tweak this macro a little more, adding some pauses after drags and drops.
#3

nvm Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)