Skip to content

Commit

Permalink
Merge pull request #5 from usmarine2687/Gui-Removal
Browse files Browse the repository at this point in the history
Gui requirement removal
  • Loading branch information
usmarine2687 committed Dec 6, 2023
2 parents 2c08db8 + abb463c commit 98c9821
Showing 1 changed file with 53 additions and 5 deletions.
58 changes: 53 additions & 5 deletions Scriber/init.lua
Expand Up @@ -808,6 +808,7 @@ local function Home()
while GetMyZone() ~= "guildlobby" do
mq.delay(1000)
end
mq.delay(1000)
end
if sendmehome then
if TableCheck(GetMyZone(), bindzones) == false then
Expand Down Expand Up @@ -864,6 +865,7 @@ local function TravSafe()
while GetMyZone() ~= 'poknowledge' do
mq.delay(1500)
end
mq.delay(1000)
end
end

Expand Down Expand Up @@ -1007,6 +1009,7 @@ local function guildhall(loc)
while GetMyZone() ~= 'guildhall' do
mq.delay(5000)
end
mq.delay(1000)
end
if GetMyZone() == 'guildhall' then
Write.Info('\aoSetting portal to \ag%s', loc)
Expand Down Expand Up @@ -1040,6 +1043,7 @@ local function guildhall(loc)
while GetMyZone() ~= loc do
mq.delay(1000)
end
mq.delay(1000)
end
end
end
Expand Down Expand Up @@ -1080,6 +1084,7 @@ local function TravWW()
while GetMyZone() ~= 'westwastestwo' do
mq.delay(1000)
end
mq.delay(1000)
end
::westwastesstart::
CastITU()
Expand Down Expand Up @@ -1187,13 +1192,15 @@ local function POT()
while GetMyZone() ~= 'potranquility' do
mq.delay(1000)
end
mq.delay(1000)
Trav('potranquility')

--Going back to Guild Lobby for next Zone--
mq.cmd('/travelto guildlobby')
while GetMyZone() ~= 'guildlobby' do
mq.delay(1000)
end
mq.delay(1000)
end
end

Expand Down Expand Up @@ -1237,11 +1244,13 @@ local function Strat()
while GetMyZone() ~= 'stratos' do
mq.delay(1000)
end
mq.delay(1000)
else
mq.cmd('/travelto stratos')
while GetMyZone() ~= 'stratos' do
mq.delay(1000)
end
mq.delay(1000)
end
Trav('stratos')
CastInvis()
Expand All @@ -1256,6 +1265,7 @@ local function Strat()
while GetMyZone() ~= 'guildlobby' do
mq.delay(1000)
end
mq.delay(1000)
end
end
local function EW2()
Expand Down Expand Up @@ -1319,6 +1329,7 @@ local function CS2()
while GetMyZone() ~= 'cobaltscartwo' do
mq.delay(1000)
end
mq.delay(1000)
else
guildhall('cobaltscartwo')
end
Expand Down Expand Up @@ -1352,6 +1363,7 @@ local function ME2()
while mq.TLO.Me.Casting() and GetMyZone() ~= 'umbral' do
mq.delay(1000)
end
mq.delay(1000)
else
mq.cmd('/travelto guildhalllrg')
while TableCheck(GetMyZone(), {'guildhalllrg_int', 'guildhallsml', 'guildhall3'}) ~= true do
Expand All @@ -1372,11 +1384,13 @@ local function ME2()
while GetMyZone() ~= 'umbral' do
mq.delay(1000)
end
mq.delay(1000)
end
mq.cmd('/travelto maidentwo')
while GetMyZone() ~= 'maidentwo' do
mq.delay(1000)
end
mq.delay(1000)
else
guildhall('maidentwo')
end
Expand Down Expand Up @@ -1422,11 +1436,12 @@ local function LIN()
end
mq.cmd("/click right item")
mq.delay(5000, function() return mq.TLO.Menu.Name() == "Laurion's Door" end)
mq.cmdf([[/squelch /notify "Teleport to Larion's Inn" menuselect]])
mq.cmdf([[/squelch /notify "Teleport to Laurion Inn" menuselect]])
end
while GetMyZone() ~= 'laurioninn' do
mq.delay(1000)
end
mq.delay(1000)
end
else
guildhall('laurioninn')
Expand Down Expand Up @@ -1560,9 +1575,42 @@ local function scriber()
end
stop_scribe = true
end

local function scriberhelp()
Write.Info("Welcome to Scriber. The following functions are available to you. 'Help', 'gui', and the respective levels you want to scribe. I.E. /scriber 63 65")
end

local function bind_scriber(cmd,cmd2)
if cmd == nil or cmd == "help" then
scriberhelp()
return
end

if cmd == "gui" or cmd == "ui" or cmd == "show" then
Open = true
return
end

if tonumber(cmd) ~= nil and tonumber(cmd2) == nil then
cmd2 = cmd
MinLevel = cmd
MaxLevel = cmd2
scriber()
return
elseif tonumber(cmd) ~= nil and tonumber(cmd2) ~= nil then
MinLevel = cmd
Maxlevel = cmd2
scriber()
return
else
scriberhelp()
return
end
end

local function setup()
mq.bind('/scriber', scriber)
mq.bind('/sc', scriber)
mq.bind('/scriber', bind_scriber)
mq.bind('/sc', bind_scriber)
end
CheckPlugin('MQ2PortalSetter')
CheckPlugin('MQ2Nav')
Expand All @@ -1579,7 +1627,7 @@ local function set_location_options(locations, range)
end

local function ScriberGUI()
if Open then
if ShowUI then
ImGui.SetWindowSize(500, 500, ImGuiCond.Once)
Open, ShowUI = ImGui.Begin('Scriber - Letting us do the work for you, one spell at a time! (3.0)', Open)
if ShowUI then
Expand Down Expand Up @@ -1663,7 +1711,7 @@ local inv_scribe = coroutine.create(function()
end)
mq.imgui.init('ScriberGUI', ScriberGUI)
setup()
while Open do
while true do
pause_script()
mq.doevents()
if not stop_scribe then
Expand Down

0 comments on commit 98c9821

Please sign in to comment.