;====RoadkillsOrganizer.txt====
;purpose: organizes stuff in your packs to where you want it
; It will take stuff from all open containers or just a specific one
; and drop it where you tell it.
;==config section===
SET %delay 5
;you can reduce this greatly, but client will crash if too short and this
;simple prog has no gump waiting delays
;====main program====
initevents
_RKOrgstart:
DISPLAY yesno Would you like to organize an item?$
IF #DISPRES = no
{
IGNOREITEM RESET
HALT
}
GOSUB GetOrgItem
GOSUB GetPixelCoords
_RKorganizer:
IF %orgallpacks
FINDITEM %orgitemtype C
ELSE
FINDITEM %orgitemtype C_ , %orgitempack
IF #FINDKIND = -1
GOTO _RKOrgstart
GOSUB MoveItemToPos #FINDID %Xdrop %Ydrop 0
;ignore the item in list 9
IGNOREITEM #FINDID 9
GOTO _RKorganizer
; ================================================== ===================
; Name: MoveItemToPos by ScriptFellow
; Purpose: Moves an item to a specific screen position
; %1 = item id
; %2 = screen x coord
; %3 = screen y coord
; %4 = amount (if 0 it will move the whole stack)
sub MoveItemToPos
set %_item %1
set %_x %2
set %_y %3
set %_amount %4
finditem %_item
set %dontwait 0
if #FINDID = #LLIFTEDID
set %dontwait 1
set %oldliftedid #LLIFTEDID
event drag #FINDID
wait 5
if #LLIFTEDID = %oldliftedid
{
if #FINDSTACK > 1
{
if %dontwait = 1
goto enteramount
set %start #SCNT + 2
waitfordrag:
if #SCNT > %start
goto enteramount
if #CONTKIND <> %dragcontkind
goto waitfordrag
enteramount:
if %_amount = 0
msg $
if %_amount > 0
msg %_amount $
}
}
if #LLIFTEDID <> %oldliftedid
wait %delay
click %_x %_y
wait %delay
return
;=============
Sub GetOrgItem
;ver 1.0 26 Apr 03 by Roadkill
;purpose: get the item type, and location, of stuff in your packs
;returns: %orgitemtype and %orgitempack and
; %orgallpacks -true if you want all packs organized
Display OK please click on the thing you want to organize in your packs$
SET #TARGCURS 1
_getorgitemloop:
IF #TARGCURS = 1
GOTO _getorgitemloop
SET %orgitemID #LTARGETID
FINDITEM %orgitemID
SET %orgitemtype #FINDTYPE
SET %orgitempack #FINDBAGID
SET %orgallpacks #FALSE
DISPLAY yesno do you want to take item from just that pack, or all open packs?$
+ YES= all organize all open packs
IF #DISPRES = yes
SET %orgallpacks #TRUE
RETURN
;=========
sub getpixelcoords
;ver 1.0 26 apr 03 by Roadkill
;purpose: get the coordinates where you want to drop some item in a pack
;returns: %Xdrop and %Ydrop
Display OK put your cursor on spot you want to drop your item then hit ENTER$
+ Remember, dropping on edges of pack is 1337 $
_getpixelcoordsloop:
ONHOTKEY ENTER
GOTO _jumphere
GOTO _getpixelcoordsloop
_jumphere:
SET %Xdrop #CURSORX
SET %Ydrop #CURSORY
RETURN
A me funziona perfettamente, potete impostare il delay iniziale a vostro iacimento per ordinare il back più o meno velocemente, buon gioco
;purpose: organizes stuff in your packs to where you want it
; It will take stuff from all open containers or just a specific one
; and drop it where you tell it.
;==config section===
SET %delay 5
;you can reduce this greatly, but client will crash if too short and this
;simple prog has no gump waiting delays
;====main program====
initevents
_RKOrgstart:
DISPLAY yesno Would you like to organize an item?$
IF #DISPRES = no
{
IGNOREITEM RESET
HALT
}
GOSUB GetOrgItem
GOSUB GetPixelCoords
_RKorganizer:
IF %orgallpacks
FINDITEM %orgitemtype C
ELSE
FINDITEM %orgitemtype C_ , %orgitempack
IF #FINDKIND = -1
GOTO _RKOrgstart
GOSUB MoveItemToPos #FINDID %Xdrop %Ydrop 0
;ignore the item in list 9
IGNOREITEM #FINDID 9
GOTO _RKorganizer
; ================================================== ===================
; Name: MoveItemToPos by ScriptFellow
; Purpose: Moves an item to a specific screen position
; %1 = item id
; %2 = screen x coord
; %3 = screen y coord
; %4 = amount (if 0 it will move the whole stack)
sub MoveItemToPos
set %_item %1
set %_x %2
set %_y %3
set %_amount %4
finditem %_item
set %dontwait 0
if #FINDID = #LLIFTEDID
set %dontwait 1
set %oldliftedid #LLIFTEDID
event drag #FINDID
wait 5
if #LLIFTEDID = %oldliftedid
{
if #FINDSTACK > 1
{
if %dontwait = 1
goto enteramount
set %start #SCNT + 2
waitfordrag:
if #SCNT > %start
goto enteramount
if #CONTKIND <> %dragcontkind
goto waitfordrag
enteramount:
if %_amount = 0
msg $
if %_amount > 0
msg %_amount $
}
}
if #LLIFTEDID <> %oldliftedid
wait %delay
click %_x %_y
wait %delay
return
;=============
Sub GetOrgItem
;ver 1.0 26 Apr 03 by Roadkill
;purpose: get the item type, and location, of stuff in your packs
;returns: %orgitemtype and %orgitempack and
; %orgallpacks -true if you want all packs organized
Display OK please click on the thing you want to organize in your packs$
SET #TARGCURS 1
_getorgitemloop:
IF #TARGCURS = 1
GOTO _getorgitemloop
SET %orgitemID #LTARGETID
FINDITEM %orgitemID
SET %orgitemtype #FINDTYPE
SET %orgitempack #FINDBAGID
SET %orgallpacks #FALSE
DISPLAY yesno do you want to take item from just that pack, or all open packs?$
+ YES= all organize all open packs
IF #DISPRES = yes
SET %orgallpacks #TRUE
RETURN
;=========
sub getpixelcoords
;ver 1.0 26 apr 03 by Roadkill
;purpose: get the coordinates where you want to drop some item in a pack
;returns: %Xdrop and %Ydrop
Display OK put your cursor on spot you want to drop your item then hit ENTER$
+ Remember, dropping on edges of pack is 1337 $
_getpixelcoordsloop:
ONHOTKEY ENTER
GOTO _jumphere
GOTO _getpixelcoordsloop
_jumphere:
SET %Xdrop #CURSORX
SET %Ydrop #CURSORY
RETURN
A me funziona perfettamente, potete impostare il delay iniziale a vostro iacimento per ordinare il back più o meno velocemente, buon gioco