<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>

--[v1.0]--

--====== User Options ======--

	getjuice = true			-- set to true to get the free drinks "Juice Barrel" Hank offers. Note the script will not check your bag space so be sure you have lots of space left if you set this true or else you will not be able to get the quest.

	nextwp = "dontbeserious"	-- sets the next waypoint file you want to load after this waypoint finishes.

--==========================--


questid = 422914
hank = 110695 -- "Juice Barrel" Hank
questdone = false
juststarted = true
portdone = false
participate = getTEXT("SC_BEER_2011_FN02")
freejuice = getTEXT("SC_BEER_2011_FN04")


function quest()
	return getQuestStatus(questid)
end

player:update()
yrest(500)


function advertise()
	local tool = inventory:findItem(209957)
	yrest(1000)
	if tool then
		tool:use()
		print("Using Publicity Tools.")
		yrest(1000)
	else
		print("Error Finding Tools. Retrying")
		__WPL:setWaypointIndex(__WPL.LastWaypoint)
	end
end


function mount()
	player:updateMounted()
	yrest(50)
	if not player.Mounted then
		repeat
			player:mount()
			yrest(500)
			player:updateMounted()
			yrest(500)
		until player.Mounted
	end
end

mount()

__WPL:setWaypointIndex(1)

</onLoad>
	<!-- #  1 --><waypoint x="-29036" z="29264" y="-141">
	if juststarted then
		player:target_NPC(hank)
		yrest(500)
		ChoiceOptionByName(participate)
		yrest(500)
		if getjuice then
			player:target_NPC(hank)
			yrest(500)
			ChoiceOptionByName(freejuice)
			yrest(500)
		end
		juststarted = false
	end
	if quest() == "not accepted" then
		if 1 > inventory:itemTotalCount(0) then
			cprintf(cli.lightred,"\nThere Is Not Enough Bag Space For The Quest Item/s.\n\n")
			error("Not enough Bag Space.")
		end
		local retries = 0
		repeat
			player:target_NPC(hank);
			yrest(500)
			AcceptQuestByName(questid)
			yrest(500)
			retries = retries + 1
		until quest() ~= "not accepted" or retries == 8
		if retries == 8 then
			print("Seems like the char has already done the quest for today.")
			loadPaths(nextwp)
		end
	elseif quest() == "complete" then
		repeat
			player:target_NPC(hank);
			yrest(500)
			CompleteQuestByName(questid)
			yrest(500)
		until quest() ~= "complete"
		questdone = true
	end
	if questdone then
		player:moveTo(CWaypoint(-29075, 29275))	
		loadPaths(nextwp)
	end
	</waypoint>
	<!-- #  2 --><waypoint x="-29483" z="29132" y="-84">	</waypoint>
	<!-- #  3 --><waypoint x="-30245" z="29158" y="-84">	</waypoint>
	<!-- #  4 --><waypoint x="-31161" z="29203" y="-86">	</waypoint>
	<!-- #  5 --><waypoint x="-32360" z="29254" y="-135">
	if quest() == "incomplete" then
		if portdone then
			__WPL:setDirection(WPT_FORWARD)
			__WPL:setWaypointIndex(__WPL:findWaypointTag("To Southern Part"))
		end
	else
		__WPL:setDirection(WPT_BACKWARD)
		__WPL:setWaypointIndex(4)
	end
	</waypoint>
	<!-- #  6 --><waypoint x="-32491" z="29667" y="-136">	</waypoint>
	<!-- #  7 --><waypoint x="-32813" z="29865" y="-135">	</waypoint>
	<!-- #  8 --><waypoint x="-33027" z="30215" y="-136" tag="Northeast">
	if not portdone then
		advertise()
		mount()
	end
	</waypoint>
	<!-- #  9 --><waypoint x="-33470" z="29860" y="-135">	</waypoint>
	<!-- # 10 --><waypoint x="-33890" z="29980" y="-134">	</waypoint>
	<!-- # 11 --><waypoint x="-34236" z="29996" y="-34">	</waypoint>
	<!-- # 12 --><waypoint x="-34240" z="30150" y="-33">	</waypoint>
	<!-- # 13 --><waypoint x="-34572" z="30152" y="99">	</waypoint>
	<!-- # 14 --><waypoint x="-34563" z="30300" y="66">	</waypoint>
	<!-- # 15 --><waypoint x="-35255" z="30267" y="98">	</waypoint>
	<!-- # 16 --><waypoint x="-35255" z="29891" y="-33">	</waypoint>
	<!-- # 17 --><waypoint x="-35529" z="29892" y="-136">	</waypoint>
	<!-- # 18 --><waypoint x="-35726" z="30123" y="-148" tag="Northwest">
	advertise()
	mount()
	</waypoint>
	<!-- # 19 --><waypoint x="-35795" z="29801" y="-134">
	if portdone then
		__WPL:setWaypointIndex(17)
	end
	</waypoint>
	<!-- # 20 --><waypoint x="-36264" z="29522" y="-135">	</waypoint>
	<!-- # 21 --><waypoint x="-36490" z="29283" y="-136">	</waypoint>
	<!-- # 22 --><waypoint x="-36539" z="29113" y="-135">	</waypoint>
	<!-- # 23 --><waypoint x="-37027" z="28560" y="-135">	</waypoint>
	<!-- # 24 --><waypoint x="-37157" z="28255" y="-131">	</waypoint>
	<!-- # 25 --><waypoint x="-37236" z="27853" y="-136">	</waypoint>
	<!-- # 26 --><waypoint x="-37690" z="27743" y="-148" tag="Port District">
	advertise()
	mount()
	portdone = true
	__WPL:setDirection(WPT_BACKWARD)
	</waypoint>
	<!-- # 27 --><waypoint x="-32418" z="29015" y="-136" tag="To Southern Part">
	</waypoint>
	<!-- # 28 --><waypoint x="-32528" z="28795" y="-136">	</waypoint>
	<!-- # 29 --><waypoint x="-32849" z="28601" y="-136">	</waypoint>
	<!-- # 30 --><waypoint x="-32717" z="28056" y="-172">	</waypoint>
	<!-- # 31 --><waypoint x="-33016" z="27838" y="-172">	</waypoint>
	<!-- # 32 --><waypoint x="-33489" z="27813" y="-101">	</waypoint>
	<!-- # 33 --><waypoint x="-34138" z="27775" y="-4" tag="Dalinhan">
	advertise()
	mount()
	</waypoint>
	<!-- # 34 --><waypoint x="-33696" z="27733" y="-64">	</waypoint>
	<!-- # 35 --><waypoint x="-32993" z="27704" y="-172">	</waypoint>
	<!-- # 36 --><waypoint x="-32690" z="27507" y="-172">	</waypoint>
	<!-- # 37 --><waypoint x="-32643" z="26988" y="-135">	</waypoint>
	<!-- # 38 --><waypoint x="-32305" z="26698" y="-136">	</waypoint>
	<!-- # 39 --><waypoint x="-32326" z="26163" y="-136">	</waypoint>
	<!-- # 40 --><waypoint x="-32402" z="25889" y="-134" tag="southeast">
	advertise()
	mount()
	</waypoint>
	<!-- # 41 --><waypoint x="-32328" z="26192" y="-136">	</waypoint>
	<!-- # 42 --><waypoint x="-32320" z="26672" y="-136">	</waypoint>
	<!-- # 43 --><waypoint x="-32687" z="27100" y="-136">	</waypoint>
	<!-- # 44 --><waypoint x="-32633" z="27545" y="-172">	</waypoint>
	<!-- # 45 --><waypoint x="-32336" z="27775" y="-147" tag="Residential">
	advertise()
	mount()
	</waypoint>
	<!-- # 46 --><waypoint x="-32481" z="27868" y="-171">	</waypoint>
	<!-- # 47 --><waypoint x="-32763" z="28179" y="-172">	</waypoint>
	<!-- # 48 --><waypoint x="-32802" z="28620" y="-136">	</waypoint>
	<!-- # 49 --><waypoint x="-32440" z="28920" y="-136">
	__WPL:setWaypointIndex(5)
	</waypoint>
</waypoints>