Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
	--=== User Options ===--
	When_Finished = "end"
		-- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist' and "waypointfilename" to load that waypointfile.
	CharList = {
	}
		-- Character list to use when using the "charlist" option above. Requires my "userfunction_LoginNextChar" userfunction.
		-- Find it here. http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350
		--		eg.
		--		CharList = {
		--			{account=4,chars={}},
		--			{account=8,chars={1}},
		--			{account=7,chars={1,2,5}},
		--		}
	--====================--
	
	local kate = GetIdName(121035)  --Kate Wesker
	local magelly = GetIdName(120687)  --Magelly Basac
	
	
	
	--== MINIGAME ==--
	repeat
		player:update()
		if getZoneId() ~= 355 then
			
			local empties = inventory:itemTotalCount(0)
			if 5 > empties then
				-- Wait for user to make some space in inventory.
				cprintf(cli.yellow,"Not much space left in inventory. Are you sure you want to continue with only %d spaces left?\n",empties)
				player:sleep()
			end
			if 30 > inventory:itemTotalCount(203038) then
				print("Not enough Phirius Token Coins.")
				logentry = "Not enough Phirius Token Coins."
			--	checkRelog()
				return
			end
			if player:target_NPC(kate) then
				sendMacro("ChoiceOption(1);");
				yrest(1000);
				waitForLoadingScreen(10)
				if getZoneId() ~= 360 then
				print("Failed to teleport into Ancient Treasure. Maybe you already done it today.")
				logentry = "Failed to teleport into Ancient Treasure. Maybe you already done it today."
				end
			--	checkRelog()
			end
			if player:target_NPC(magelly) then
				yrest(2000);
				sendMacro("ChoiceOption(2);");   --Make it 1 if you want Timed arena
				yrest(2000);
				sendMacro("ChoiceOption(1);");
				yrest(2000);
				sendMacro("ChoiceOption(1);");
				yrest(12000);
				--	checkRelog()
				--	return
			end
		end
		
		repeat
            yrest(100)
         until  player:findNearestNameOrId(106881)
         print("OK event has started")
         repeat
            tort()
            player:update()
            buffed = player:getBuff(622402)
            yrest(100)
         until buffed.Level >= 2800 or not player:hasBuff(622402)
         print("Event finished, end score was "..buffed.Level)
		 error("Ending script")
		
	 
	until false
	
	
</onLoad>
</waypoints>


