Back to "ship" tags

Bapeth's Ocean Launcher by barryroser

Description: Launches and readies a ship from any nearby dockmaster.

1# Bapeths Ship Launcher
2# 
3# "**Required**"
4# Create an entry in the Razor "Friends Tab" called "IgnoreCrew"
5#
6# Script will loop into 'Master Background' if you have it in your script library
7# Run this script near any friendly boats to add any and all friendly crew to the ignore list
8#
9# This script will launch your ship, ready crew, and load cannons
10#
11# Script starts here
12clearsysmsg 
13overhead 'Launch sequence initiated...' 45
14if not findtype 5365 backpack
15    overhead 'I forgot a Spyglass...' 38
16    overhead 'Launch Aborted' 38
17    stop
18endif
19if not findtype "aspect crystal" backpack and skill "Magery" >= 50
20    overhead "I could use Aspect Crystals..." 78
21    pause 1000
22endif
23if followers = 0
24    overhead "I should get some followers..." 45
25    pause 1000
26endif
27
28if skill "Arcane" >= 80 and not gumpexists 3954121934
29    say '[abilityhotbar'
30    waitforgump 3954121934 500
31endif
32
33if findtype 3763|3762|3740|3742|10245|20008|20006|20014|20016|20012|20010 backpack as instrument
34    @ignore instrument
35endif
36if findtype 3834 backpack 0 as bbook
37    @ignore bbook
38endif
39
40for 25
41    hotkey "Next Monster Target"
42    @setvar bdockmaster lasttarget
43    if noto bdockmaster = "invulnerable"
44        getlabel bdockmaster desc
45        if "dockmaster" in desc
46            menu bdockmaster 1
47            getlabel backpack ping
48            if gumpexists 3287496917
49                overhead "Which ship shall I captain?" 88
50                while not targetexists 
51                    //donothing
52                endwhile
53                getlabel backpack ping
54                if insysmsg 'You have traveled'
55                    overhead 'Travel cooldown...' 38
56                    overhead 'Launch Aborted' 38
57                    gumpclose 3287496917
58                    stop
59                elseif insysmsg 'You have been onboard'
60                    overhead 'Onboard cooldown...' 38
61                    overhead 'Launch Aborted' 38
62                    hotkey "Cancel Current Target"
63                    gumpclose 3287496917
64                    stop
65                endif
66                wft 500
67                overhead "Select Launch Location" 88
68                while targetexists 
69                    //donothing
70                endwhile
71                getlabel backpack ping
72                gumpclose 3287496917
73                break
74            endif
75        endif
76    endif
77endfor
78
79if insysmsg 'A ship cannot be placed'
80    overhead 'Cannot place there...' 38
81    overhead 'Try again...' 38
82    gumpclose 3287496917
83    replay
84elseif insysmsg 'That location is too far away'
85    overhead 'Cannot place there...' 38
86    overhead 'Try again...' 38
87    gumpclose 3287496917
88    replay
89elseif insysmsg 'You have been onboard'
90    overhead 'Onboard cooldown...' 38
91    overhead 'Launch Aborted' 38
92    hotkey "Cancel Current Target"
93    gumpclose 3287496917
94    stop
95elseif insysmsg "while on a house"
96    overhead "I cannot place that from inside this house..." 38
97    overhead "Launch Aborted..." 38
98    gumpclose 3287496917
99    gumpclose 4216593270
100    stop
101endif
102while not dead
103    clearsysmsg 
104    say "[Embark" 45
105    getlabel backpack ping
106    say "[EmbarkFollowers" 45
107    getlabel backpack ping
108    say "[Reload" 88
109    overhead '*Reloading*' 45
110    getlabel backpack ping
111    say "[ReadyCrew" 45
112    getlabel backpack ping
113    if insysmsg "may ready the crew"
114        overhead "Crew is not ready..." 38
115        pause 600
116    endif
117    while not gumpexists 3329337894
118        say "[TargetingMode" 45
119        getlabel backpack ping
120    endwhile
121    if gumpexists 4216593270
122        gumpclose 4216593270
123    endif
124    overhead "Set my Hatch..." 77
125    setlasttarget 
126    wft 500
127    while targetexists 
128        //donothing
129    endwhile
130    @setvar "shiphold" lasttarget 
131    if not find "shiphold" ground -1 -1 22
132        overhead "Error, launch code resetting..." 38
133        replay
134    endif
135    if not gumpexists 4216593270
136        say "[ship"
137        waitforgump 4216593270 500
138    endif
139    if skill "Necromancy" >= 50 and not gumpexists 622436516
140        say [necromancyhotbar
141        pause 250
142    endif
143    for 30
144        hotkey "Next Monster Target"
145        @setvar friendcrewmember lasttarget
146        if noto friendcrewmember = "friend"
147            getlabel "friendcrewmember" desc
148            if "Crewmember" in desc
149                hotkey "Add Target To: IgnoreCrew"
150                wft 500
151                lasttarget 
152                hotkey "Cancel Current Target"
153            endif
154        endif
155    endfor
156    hotkey "Cancel Current Target"
157    overhead "Launch Sequence Complete..." 88
158    warmode off 
159    script 'Master Background'
160    stop
161endwhile