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