Author Topic: Drop Chop Send V 0.0001 beta  (Read 1807 times)

0 Members and 1 Guest are viewing this topic.

Offline baldielocksTopic starter

  • Sr. Member
  • *
  • Posts: 301
  • Activity:
    0%
  • Reputation Power: 4
  • baldielocks has no influence.
  • Gender: Male
  • Respect: +11
  • Referrals: 5
    • View Profile
Drop Chop Send V 0.0001 beta
« on: June 12, 2010, 09:49:05 AM »
0
This is my first script. This takes advantage of the bug that lets you overweight your toon. Script purpose inspired by existing scripts from TM (warp speed logs to boards) and snicker 7. Snicker 7's has been broken for quite some time  :( due to an EUO targetting command change.

This is a limited purpose script, meant for gathering mass stacks of leather at thrasher, then sending to bank while afk. It does NOT cut the corpse. I assume that most people are using a looter that can cut corpse. If needed for debug, I can add that in.

This assumes you stay in one spot.
I use Bad maniac's looter, and did not have a crash.

Sure could use some experienced input on stability and debug. any takers?

I have been researching move to commands, and intend to add in the ability to move to a stack of leather on ground once the first one is set.

I intend to add some stat tracking to this. total number of hides, hides per hour, and gold per hour (using average leather price for all shards from http://searchuo.com data). I will also add in a variable for the wait times for the user to set all (done and reflects below).

Script passes syntax check in SUO. Used SUO for AutoIndent.
Code: [Select]
SUO syntax check
Method count: 56
Command count: 56
*** Pass 1 - Label accounting:
Subroutine labels = 4
Tag labels = 0
0 Code block(s).
0 Warnings(s) encountered.
*** Pass 2 - Execution [SYNTAXCHECK]
[/color]
Code: [Select]
set %max_stack_on_ground 14; change to 59950 for full production
set %lagwait 15
;mainloop
finditem EEG_ C_ ; hides in pack
if #FINDKIND = -1  ; no hides in pack
  return      ;sets monitoring
set !hides_in_pack #findid
set !stack_in_pack #findstack
;need a break here. transition from monitor to action.
finditem EEG_ G_  ;detect stack on ground
if  #FINDKIND = -1
  gosub new_stack
set !hides_on_ground #findid
set !stack_on_ground #findstack
if !stack_on_ground > %max_stack_on_ground ;keeps stack at 1 on ground
  gosub cut_hides
gosub Drop_hides_in_stack
return

;start subs
Sub Drop_hides_in_stack
ExEvent Drag !hides_in_pack !stack_in_pack
wait 10
ExEvent Dropc !Hides_on_ground !stack_on_ground
wait 10
return

;-------------------------------
Sub new_stack
Set %Xpos ( #CharposX - 1 )
Set %Ypos ( #CharPosY - 1 )
ExEvent Drag !hides_in_pack !stack_in_pack
wait %lagwait
ExEvent Dropg %Xpos %Ypos
Exevent Dropc C_ ;debug
return
;-------------------------------
Sub cut_hides
Finditem KAG_ C; scissors
if #findkind = -1
  halt;add in display to get scissors
Set %scissors #FINDID
Set #lobjectID %scissors
Finditem EEG_ G_ ;new stack find variables after last drop
set !Hides_on_ground_new #findID
set !number_on_ground_new #findstack
Set #ltargetID !Hides_on_ground_new
wait %lagwait
event macro 17 0 ;first cut attempt on ground
target 5s
wait %lagwait
event macro 22 0
wait %lagwait
exevent drag !Hides_on_ground_new !number_on_ground_new
wait %lagwait
event macro 17 0 ;second cut attempt on ground
target 5s
wait %lagwait
event macro 22 0
wait %lagwait
exevent dropc #BACKPACKID
ignoreitem !Hides_on_ground_new ;clears id. was picking up cut leather as lobject type
gosub BOS
return

;----------------
Sub BOS
Finditem JJG_ C_
set %cutleather #findid
set #ltargetid %cutleather
finditem CKF_ C_
set %bos #findid
set #lobjectid %bos
event macro 17 0
target 5s
wait %lagwait
event macro 22 0
return
« Last Edit: June 12, 2010, 10:06:37 AM by baldielocks »

Tags: