ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: The Ghost on May 31, 2015, 04:41:39 AM

Title: sub wwon't work
Post by: The Ghost on May 31, 2015, 04:41:39 AM
I have this sub on my fisher,   If i use the sub ib his own, it work 100% of the time.   once it inside my Clean up the backpack, it go through the sub but do nothing.    can't figure why.   
Code: [Select]
sub dropboat
finditem %fishstakes C_ , #backpackid
 if #findkind <> 1
   {
   set %fishstakes #findid
   set %findstack #findstack
   exevent drag #findid #findstack
   set !dropmeatX #charposX + 0
   set !dropmeatY #charposY + 2
   exevent dropG !dropmeatX !dropmeatY #charposZ
   wait 30
   }
   until #findkind = -1
   return

Code: [Select]
; =======================================================================================
;                                    Clean up the backpack
; =======================================================================================
sub packcheck
   gosub findshoes  ; feed them to goat
   gosub cutfish    ; cut into steak
   gosub eatfish    ; eat special fish
   gosub dropboat
  gosub pearlcargo
return fishing
; ----------------------------------------

to fish afk I need to run this snippet on his own.
Code: [Select]
set %fishstakes IND
while #true
{
gosub dropboat
wait 1500s
}
sub dropboat
finditem %fishstakes C_ , #backpackid
 if #findkind <> 1
   {
   set %fishstakes #findid
   set %findstack #findstack
   exevent drag #findid #findstack
   set !dropmeatX #charposX + 0
   set !dropmeatY #charposY + 2
   exevent dropG !dropmeatX !dropmeatY #charposZ
   wait 30
   }
   until #findkind = -1
   return
Title: Re: sub wwon't work
Post by: gimlet on May 31, 2015, 05:36:43 AM
if #findkind <> 1
   {

Shouldn't this be

if #findkind <> -1
   {