ScriptUO

Official ScriptUO EasyUO Scripts => Script Snippets => Topic started by: Cerveza on July 28, 2011, 05:47:11 AM

Title: Shuriken Stacker
Post by: Cerveza on July 28, 2011, 05:47:11 AM
Simply stacks shurikens by loading them into a belt, then unloading the belt.

Code: [Select]
display ok Target your secure container$with your stars in it
set #targCurs 1
while #targCurs = 1
  wait 1
set %star_container #ltargetID
event macro 17

display ok Now target your belt
set #targCurs 1
while #targCurs = 1
  wait 1
set %belt #ltargetID

set %star GDP
set %gump_size 127_60
set %loadX 30
set %loadY 20
set %unloadX 40
set %unloadY 40

repeat
for %i 1 5
{
  finditem %belt
  exevent popup #findID
  gosub GumpAndSizeWait NULL normal_gump %gump_size
  gosub offsetClick %loadX %loadY l
  target
  finditem %star C_ , %star_container
  set #ltargetID #findID
  set #ltargetKind 1
  event macro 22
  wait 10
}
finditem %belt
;if #findCnt > 0
exevent popup #findID
  gosub GumpAndSizeWait NULL normal_gump %gump_size
gosub offsetClick %unloadX %unloadY l
wait 5
until #false

;-------------------------------------------------------------------------------
; %1 = GumpAndSizeWait
; %2 = Gumpname 1
; %3 = Gumpname 2
; gosub GumpAndSizeWait NULL generic_gump %lore_gump_size
sub GumpAndSizeWait
  set %timedelay #SCNT
  wait 5
  GumpWait_loop1:
    if #CONTNAME = %2 && #CONTSIZE = %3
      return #FALSE ; no error
    if #SCNT > %timedelay + 7
      return #TRUE ; error, timeout
    goto GumpWait_loop1
return #TRUE ; should never get here.

sub OffsetClick
  set %tempx %1 + #CONTPOSX
  set %tempy %2 + #CONTPOSY
  click %tempx %tempy %3
return

Next will be poisoning them of course....
Title: Re: Shuriken Stacker
Post by: Cerveza on July 29, 2011, 03:57:19 AM
Added opening of the secure to make sure the shurikens are visible so they can be grabbed up.

I will be making a "modular" script which will use this:

1 - Make Shurikens
- drag/drop ingots
- drag/make smith tool
- make five shurikens
- add shurikens to belt
- unload belt
- move stack to secure

2 - Poison Shurikens
- drag/drop from secure to pack ; not sure if you can poison it in the secure container
- apply poison
- drag drop from pack to secure

Anything missing?
Title: Re: Shuriken Stacker
Post by: SolidSnake on July 29, 2011, 06:11:11 AM
With the new rules, this is going to be a VEY popular script Cerv..may want to insure Fukiyas are included as well.
Title: Re: Shuriken Stacker
Post by: Cerveza on July 29, 2011, 06:20:48 AM
I'll do shurikens first. They work the same way so the only change would be in the crafting.
Title: Re: Shuriken Stacker
Post by: SolidSnake on July 29, 2011, 12:40:41 PM
Can't wait to give this one a go Cerv...
Title: Re: Shuriken Stacker
Post by: gimlet on July 29, 2011, 04:20:53 PM
Trying it this weekend
Title: Re: Shuriken Stacker
Post by: NObama on July 29, 2011, 04:57:52 PM
By God, I'm actually going to try looking for a PvP fight.  First, I have to figure out how to throw these, though...
Title: Re: Shuriken Stacker
Post by: gimlet on July 29, 2011, 04:58:38 PM
Let's see - how do ya spell dead meat?
Title: Re: Shuriken Stacker
Post by: NObama on July 29, 2011, 05:00:03 PM
Nope!  I'm doing what all the real PvPers do:  Scripting everything except the running away part!  I'm real good at that already...
Title: Re: Shuriken Stacker
Post by: gimlet on July 29, 2011, 05:09:08 PM
heheheh
Title: Re: Shuriken Stacker
Post by: Canuker on July 30, 2011, 07:04:05 AM
Nope!  I'm doing what all the real PvPers do:  Scripting everything except the running away part!  I'm real good at that already...

HAHAHAHA.  This is a classic.
Title: Re: Shuriken Stacker
Post by: Outlaw Josey Wales on August 01, 2011, 08:18:38 PM
nice script comes in handy with stacking stars
Title: Re: Shuriken Stacker
Post by: Goliath on August 02, 2011, 08:29:21 AM
Nope!  I'm doing what all the real PvPers do:  Scripting everything except the running away part!  I'm real good at that already...
HA... Runaway.. Runaway... Monty Python Search for the Holy Grail.  Good Times
Title: Re: Shuriken Stacker
Post by: Cerveza on August 02, 2011, 08:43:13 AM
I have a fully functional version of this that will pull ingots and tongs from a secure and make the shurikens, then put 5 into a belt. It will unload the belt and place the stack (now 10) into a secure for storage.

I'll release it as a full headered script.
Title: Re: Shuriken Stacker
Post by: Hollywood_Shono on August 04, 2011, 06:58:36 AM
Do you know when you'll be releaseing the script I'd like to test it as well
Title: Re: Shuriken Stacker
Post by: Cerveza on August 04, 2011, 07:34:56 AM
It could be tonight :)