Since I am the OP and I have the time to work on this again, I am going to necro this post!!
I know I am getting close and I know that I am missing something in the commands from the start button to start the fishing sub. When I press start, nothing happens. I am sure it is something small that I have overlooked.
;===================================================================
; Script Name: Crisis SOS Chest Fisher
;
; Author: Crisis
; Version: 2.0a
; Shard OSI / FS: OSI
; Release Date: 05/07/2012
; Revision Date: 06/15/2013
; Purpose:
; Completely automates the operation of fishing up treasure chests when you are in the correct area of your SOS.
; Works great with Kal In Ex's SOS Master
;
; Features:
; . Automatically fishes until you fish up a treasure chest. Cuts bones after fishing up chest.
;
; Revisions:
; . Added bone cutting sub
; . Cleaned up code
;
; Requirements:
; . You should be on a boat in the area of your SOS
; . Must have the SOS in your backpack
;
; Special Thanks:
; TrailMyx for helping me iron out the kinks and for TrailMyx's Advanced Journal Handler
; _C2_ for the Menu Tutorial http://www.scriptuo.com/index.php?topic=1535.0
; Endless Night for helping me fix the issues with the Menu
;===================================================================
;Setup
set %fishingpole XHF_KDF
set %bones BJK_EJK_DJK_YIK_XIK_AJK_ZJK_KJK_FJK_ZIK
set %scissors KAG_JAG
gosub DrawMenu
set %ENDScript NO
set %StartFishing NO
return
;===================================================================
sub CheckMenu
if #menubutton = Pause
gosub PausePressed
if #menubutton = Start
gosub StartPressed
if #menubutton = Closed
set %ENdScript YES
return
;===================================================================
sub DrawMenu
menu Clear
menu Window Title Crisis SOS Fisher 2.0
menu Window Color Black
menu Window Size 186 57
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 10
menu Font Style
menu Font Color WindowText
menu Font BGColor Lime
menu Button Start 44 12 95 33 Start Fishing
menu Show 421 270
set #menubutton N/A
return
;===================================================================
sub Pausepressed
menu delete Pause
menu Font Color WindowText
menu Font Style
menu Font Color WindowText
menu Font BGColor Lime
menu Button Start 44 12 95 33 Start Fishing
set #menubutton N/A
return
;===================================================================
sub startpressed
menu delete Start
menu Font Color WindowText
menu Font Size 10
menu Font BGColor Green
menu Button Pause 44 12 95 33 Pause ; creates new button
gosub TM_AdvJournalSync FISHING
set #menubutton N/A
return
;===================================================================
sub TM_AdvJournalSync FISHING
finditem %fishingpole _C #CHARID
if #FINDKIND = -1
{
finditem %fishingpole _C #BackpackID
if #FINDKIND = -1
display ok How can you fish without your fishing pole?
halt
if #FINDKIND = 1
SOSFishLoop
}
SOSFishLoop:
findItem %fishingpole 1
set #LObjectID #FindID
set #LTargetKind 2
set #LTargetX 0 + #CharPosX
set #LTargetY 4 + #CharPosY
event macro 17 0
target
event macro 22 0
set %fishtimeout #SCNT + 9
target 11s
gosub TM_AdvJournalScan FISHING VALID_ADVANCE chest_from_the_depths_of_the_ocean
if #RESULT = #TRUE
{
display ARRR!! Thar be me sunken booty!!
goto EndSOSFishLoop
}
goto SOSFishLoop
{
EndSOSFishLoop:
gosub CutBones
}
return
;===================================================================
sub CutBones
finditem %scissors C_ , #backpackid
if #findcnt > 0
{
set #lobjectid #findid
finditem %bones C_ , #backpackid
while #findcnt > 0
{
event macro 17
target
set #ltargetid #findid
set #ltargetkind 1
event macro 22
wait 8
finditem %bones C_ , #backpackid
if finditem = 0
halt
}
}
return
;===================================================================
sub WaitForTargetCursor
set %timeout #scnt + 4
Repeat
wait %targetcursorwait
if #scnt > %timeout
return #false
Until #TARGCURS = 1
return #true
;===================================================================
sub TM_AdvJournalGetTrigger
namespace push
namespace local TM_AdvJS_ , %1
set #RESULT !trigger
namespace pop
set !TM_FunctionCalled #TRUE
return #RESULT
;===================================================================
; %1 - Journal Name
; %2 - #LPC setting (optional)
; Brings !_jindex up to the most recent #journal entry
sub TM_AdvJournalSync
namespace push
namespace local TM_AdvJS_ , %1
set !_jindex #jindex + 1
if %0 > 1
set !lpc_set %2
namespace pop
set !TM_FunctionCalled #TRUE
return
;===================================================================
; %1 - Journal Name
; %2 - NONE, ADVANCE , ( _VALID ) - advances jindex pointer, anything else
; %3, %4, %5, etc strings to match
; returns #TRUE for match, #FALSE for no match
; Will not advance !_jindex pointer to allow for scanning journal history for more than one search.
; Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
; About %2 arguments:
; NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
; ADVANCE: no spam checking, advances #jindex copy
; VALID: invokes SPAM filtering, no advance of #jindex copy
; VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy
sub TM_AdvJournalScan
namespace push
namespace local TM_AdvJS_ , %1
set !args %2
set !temp_lpc #LPC
if !lpc_set = N/A
set #LPC 1000
else
set #LPC !lpc_set
set !num_args %0
set !first_arg 3
set !sampled_jindex #JINDEX
if !_jindex = N/A
set !_jindex !sampled_jindex
if !charname = N/A
{
set !charname #CHARNAME
AdvJournalScan_loop1:
str pos !charname #SPC
if #STRRES <> 0
{
set !val #STRRES - 1
str left !charname !val
set !left #STRRES
set !val !val + 1
str del !charname 1 !val
set !charname !left , _ , #STRRES
goto AdvJournalScan_loop1
}
}
set !index !first_arg
repeat
set !temp_jindex !_jindex
set !text % . !index
while !temp_jindex <= !sampled_jindex
{
scanjournal !temp_jindex
str pos #JOURNAL !charname 1
set !namepos #STRRES
str count #JOURNAL !charname
set !namecnt #STRRES
str pos #JOURNAL :_ 1
set !smcpos #STRRES
str pos #JOURNAL !text 1
set !textpos #STRRES
if !textpos < !smcpos && !smcpos <> 0 || !smcpos = 1 || :_ notin #JOURNAL || VALID notin !args
set !pass #TRUE
else
set !pass #FALSE
if ( !text in #journal && ( ( !namepos = 1 && !namecnt <= 1 ) || !pass ) )
{
set !temp_jindex !temp_jindex + 1
if ADVANCE in !args
set !_jindex !temp_jindex
set !trigger !text
set #LPC !temp_lpc
namespace pop
set !TM_FunctionCalled #TRUE
return #TRUE
}
set !temp_jindex !temp_jindex + 1
}
set !index !index + 1
until !index - !first_arg > !num_args - !first_arg
set %10 !sampled_jindex - !_jindex
set %10 %1 , _ , %10 ; for debugging purposes
set #LPC !temp_lpc
set TM_AdvJournalGetTrigger #FALSE
namespace pop
set !TM_FunctionCalled #TRUE
return #FALSE