91
Script Debug / Help adding in a cut sub to a gather leather script
« on: July 01, 2013, 05:08:39 PM »
I am using a leather gatherer script and it loots the leather but does not cut it. I am trying to add a cut leather sub in it but not much luck. What did I do wrong?
SET %LOOT is at the beginning of the script EEG (pile of hides) is listed in the set %LOOT table
SUB GET_LOOT is by the original author, I added in the sub CUT_LOOT
AT the beginning of the script there is a main loop and I added GOSUB CUT_LOOT right after GOSUB GET_LOOT
SET %LOOT is at the beginning of the script EEG (pile of hides) is listed in the set %LOOT table
SUB GET_LOOT is by the original author, I added in the sub CUT_LOOT
AT the beginning of the script there is a main loop and I added GOSUB CUT_LOOT right after GOSUB GET_LOOT
Code: [Select]
;================================================
SUB GET_LOOT
GOSUB CHECK_WEIGHT
FINDITEM %LOOT C_ , %CORPSE_CONTAINER
IF #FINDCNT > 0
{
FOR #FINDINDEX 1 #FINDCNT
{
EXEVENT DRAG #FINDID #FINDSTACK
WAIT 20
EXEVENT DROPC #BACKPACKID
WAIT 20
}
}
FINDITEM JJG C_ , #Backpackid
IF #FINDCNT > 0
{
FOR #FINDINDEX 1 #FINDCNT
{
Event Property #Findid
If Spined In #Property && %Bos_Option #False
{
EXEVENT DRAG #FINDID #FINDSTACK
WAIT 20
EXEVENT DROPC %Corpse_Container
WAIT 20
}
}
}
IF #CHARPOSX <> %STARTX
{
REPEAT
EVENT PATHFIND %STARTX %STARTY %STARTZ
WAIT 40
UNTIL #CHARPOSX = %STARTX %STARTY %STARTZ
}
WAIT 1
HIDEITEM %NEW_CORPSE
WAIT 1
RETURN
;================================================
SUB CUT_LOOT
finditem %LOOT C_ , #backpackid
for #findindex 1 #findcnt
{
set #lobjectid %SCISSORS
event macro 17
target
set #ltargetid #findid
set #ltargetkind 1
event macro 22
wait 8
}
RETURN