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


Messages In This Thread
[EUO] Blacksmithing - by imported_Kamos - 02-18-2010, 12:58 PM
[EUO] Blacksmithing - by imported_Love - 02-20-2010, 08:32 AM
[EUO] Blacksmithing - by smoke - 02-20-2010, 08:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)