MOAGS - Mother of All Goblin Script

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

MOAGS - Mother of All Goblin Script

#1 Post by Cindy » Wed Nov 21, 2012 3:12 am

I wanted to have my cake and eat it too, so I hacked together various script fragments to make one that uses swim/port/underneat, gets pots, and goes to the end and loads the one that does the furnaces (Credit to all the people before me who actually did the work).

I can't seem to get my floor transition segment working very well (in last room upon reentering from the sub-space) Occasionally it will get through on its own, but most of the time I have to manual assist (upward motion and wiggling) until it gets in.

Anyone willing to give it a critical eye to see what the problem is?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onLoad>

	--== User Option ==--
	RunningSpeed = 100    -- The speed the character runs when not teleporting. 50 is normal. Recommended 100.
	UseTeleporter = true  -- Use Jduratedj's teleport userfunction. Please make sure you have it installed to use this option.

	useGoodie("speed") -- Unbridled Enthusiasm
	
	-- Apply speed hack
	local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
	if playerAddress ~= 0 then
		memoryWriteFloat(getProc(), playerAddress + 0x40, RunningSpeed);
	end
	
	-- local teleport function checker
	function portTo(_x, _z, notWaypoint)
		-- Is Teleporter is enabled?
		if not UseTeleporter then
			return
		end

		-- Close enough. Don't teleport (when feeding hens)
		if notWaypoint then
			local dist = distance(player.X, player.Z, _x, _z)
			if 19 > dist then
				return
			end
		end

		teleport(_x, _z)
	end
	
	function hammerTime()
		local __, __,time = EventMonitorCheck("Hammertooth")
		if time ~= nil then
			time=math.floor(time/60)
			printf("time="..tostring(time).."\n");
			if time>16 then
				printf("There is no Hammertooth.\n")
				HammertoothIsInTheHouse=false;
			else
				printf("Hammertooth is here. Hurry up and get a reward!\n")
				HammertoothIsInTheHouse=true;
			end
		end
	end

	if fly == nil or teleport == nil then
		error("You have to install the 'swimhack' and/or 'teleport' userfunction")
	end
	
	function inventory_check()
		player:update()
		local zoneid = RoMScript("GetZoneID()")
		if zoneid == 4 then	
			if 1 > inventory:itemTotalCount(0) then
				cprintf(cli.yellow,"You should get empty inventory spaces.")
				player:sleep()
			end
			if 30 > inventory:itemTotalCount(203038) then
				print("You need to have 30 Phirius Tokens to enter Goblin Mines")
				player:sleep()
			end
		end
	end
	
	function settings.profile.events.onUnstickFailure()
		logInfo("Goblins_Stuck", "We got stuck", true, nil, add)
		RoMScript("LeaveParty()")
		waitForLoadingScreen()
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	end
	
	teleport_SetStepSize(25)
	
	local function evalClickable(address)
		local chest = memoryReadRepeat("byte", getProc(), address + 0x2F0) or 0
		if chest ~= 0 then
			return true
		else
			return false
		end
	end
	
	function chest()
		local chest
		repeat
			chest = player:findNearestNameOrId(113164,nil,evalClickable)
			if chest then
				yrest(300)
				teleport(chest.X,chest.Z,chest.Y-40)
				keyboardPress(settings.hotkeys.STRAFF_RIGHT.key)
				keyboardPress(settings.hotkeys.STRAFF_LEFT.key)
				repeat
					player:target_Object(chest.Id, nil, nil, true, evalClickable);
				until evalClickable(chest.Address) ~= true
			end
		until chest == nil
		if chest == nil then
			teleport(nil, nil, -50, false)
			yrest(300)
		end
	end	
	
	function speed_buff()
		if Speed then
			if not player:hasBuff("506684") then   
				inventory:useItem(207200);
			end
			yrest(250)
			RoMScript("SetTitleRequest(530427)")
			yrest(250)
		end
	end
	
	--This code below is copid from cot_tele waypoin
	numshells = inventory:getItemCount(240181);
	if numshells > 950 then
		-- Wait for user to use some shells.
		cprintf(cli.yellow,"Reaching the maximum number of Phirius Shells (1000). Please spend some before continuing.\n")
		player:sleep()
		numshells = inventory:getItemCount(240181);
	end


	--Some of the code here is copied from Botromka's script
	zoneid=nil;
	repeat zoneid=RoMScript("GetZoneID()"); until zoneid;
	npcname=nil;
	repeat npcname=RoMScript("TEXT('Sys112651_name')"); until npcname;

	if math.mod(zoneid,1000) == 4 then
	--	inventory_check()
	--	speed_buff()
	--	player:target_NPC(npcname); yrest(1000);
	--	RoMScript("ChoiceOption(1);"); yrest(1000);
	--	RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
	--	waitForLoadingScreen(15);
	end

	if zoneid==352 then fly(); end

	function UpThroughFloor()
		local rightheight = 18.5
		local dir = 3.14
		repeat
			if dir == 0 then dir = 3.14 else dir = 0 end -- Alternate direction
			teleport(nil,nil,rightheight) yrest(700)
			player:faceDirection(dir,-1.3) yrest(300)
			keyboardHold(settings.hotkeys.MOVE_FORWARD.key) yrest(300)
			keyboardRelease(settings.hotkeys.MOVE_FORWARD.key) yrest(1000)
			player:update()
		until player.Y > rightheight
	end	
	
	EventMonitorStop("Hammertooth");
	EventMonitorStart("Hammertooth", "TIMEKEEPER_START");
	changeProfileOption("TARGET_LEVELDIF_BELOW",50)
	changeProfileOption("LOOT_ALL",true);		
</onLoad>
	<!-- #  1 --><waypoint x="-5852" z="3326" y="572" tag="start">		
		inventory_check()
		speed_buff()
		repeat
			player:target_NPC("112651");			-- Mahler Palo
			yrest(1000)
			sendMacro("ChoiceOption(1);");
			yrest(1000)
			RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
			waitForLoadingScreen(15)
			local zoneid = RoMScript("GetZoneID()")
		until zoneid == 352
	</waypoint>

	<!-- #  1 --><waypoint x="1862" z="2222" y="309">
	fly();	
	</waypoint>
	<!-- #  2 --><waypoint x="1932" z="2231" y="308">
		fly()
		yrest(100)
		teleportToWP()
		yrest(300)
	</waypoint>	
	<!-- #  3 --><waypoint x="1960" z="2231" y="328">
		teleportToWP()
		yrest(300)	
	</waypoint>
	<!-- #  4 --><waypoint x="1996" z="2231" y="355">
		teleportToWP()
		yrest(300)	
	</waypoint>
	<!-- #  5 --><waypoint x="2015" z="2232" y="369">
		teleportToWP()
		yrest(300)	
	</waypoint>
	<!-- #  6 --><waypoint x="2036" z="2235" y="379">
		teleportToWP()
		yrest(500)	
	</waypoint>
	<!-- #  7 --><waypoint x="2062" z="2237" y="378">hammerTime()	</waypoint>
	<!-- #  8 --><waypoint x="2255" z="2247" y="334">
		repeat
			yrest(1000)
		until RoMScript("TimeKeeperFrame:IsVisible()")		
	</waypoint>
	<!-- #  9 --><waypoint x="2250" z="2385" y="469">	</waypoint>
	<!-- # 10 --><waypoint x="2389" z="2423" y="331">	</waypoint>
	<!-- # 11 --><waypoint x="2284" z="2469" y="222">	</waypoint>
	<!-- # 12 --><waypoint x="1782" z="2763" y="222">	</waypoint>
	<!-- # 13 --><waypoint x="1691" z="2804" y="253">
		chest()
		hammerTime()
	</waypoint> 
	<!-- # 14 --><waypoint x="2502" z="2997" y="222">	</waypoint>
	<!-- # 15 --><waypoint x="2606" z="2981" y="239">
		chest()
	</waypoint>
	<!-- # 16 --><waypoint x="2446" z="3289" y="41">hammerTime()	</waypoint>
	<!-- # 17 --><waypoint x="2471" z="3445" y="41">	</waypoint>
	<!-- # 18 --><waypoint x="2487" z="3502" y="43">
		chest()
	</waypoint>
	<!-- # 19 --><waypoint x="2480" z="3365" y="41">	</waypoint>
	<!-- # 20 --><waypoint x="2843" z="3419" y="41">	</waypoint>
	<!-- # 21 --><waypoint x="4282" z="4259" y="41">	</waypoint>
	<!-- # 22 --><waypoint x="4400" z="4322" y="182">
		chest()
	</waypoint>
	<!-- # 23 --><waypoint x="4389" z="4158" y="41">	</waypoint>
	<!-- # 24 --><waypoint x="4500" z="3471" y="41">	</waypoint>
	<!-- # 25 --><waypoint x="4386" z="3460" y="149">
		chest()
	</waypoint>	
	<!-- #  26 --><waypoint x="3368" z="2950" y="30">	</waypoint>
	<!-- #  27 --><waypoint x="3308" z="2940" y="85">
		UpThroughFloor()
	</waypoint>
	<!-- #  28 --><waypoint x="3335" z="2977" y="185">
		UpThroughFloor()
	</waypoint>
	<!-- #  29--><waypoint x="3362" z="2812" y="241">		
	</waypoint>
	<!-- #  30 --><waypoint x="3440" z="2879" y="339"></waypoint>	
	<!-- #  31 --><waypoint x="3352" z="2976" y="249">	</waypoint>
	<!-- #  32 --><waypoint x="3230" z="3101" y="270">	</waypoint>
	<!-- #  33 --><waypoint x="3156" z="3247" y="267">	</waypoint>
	<!-- #  34 --><waypoint x="3137" z="3278" y="248">		
	EventMonitorStop("Hammertooth");
	loadPaths("Mini_gobsEnd");
	__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	</waypoint>
</waypoints>

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#2 Post by rock5 » Wed Nov 21, 2012 3:51 am

Cindy wrote:I can't seem to get my floor transition segment working very well (in last room upon reentering from the sub-space) Occasionally it will get through on its own, but most of the time I have to manual assist (upward motion and wiggling) until it gets in.
I doubt that both games use exactly the same height for the floors. Maybe you need to adjust the 'rightheight' value.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#3 Post by Cindy » Wed Nov 21, 2012 7:38 am

About that... how do you get MM to show three coordinates in its window title? :)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#4 Post by rock5 » Wed Nov 21, 2012 8:16 am

It does show your coordinates in the mm title bar, while a script is running anyway. For a more accurate reading just use rom/getpos in mm or double click Get_Player_Position.bat to give you your position.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#5 Post by Cindy » Wed Nov 21, 2012 8:45 am

I only see two of the three xyz coordinates for some reason.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#6 Post by rock5 » Wed Nov 21, 2012 9:07 am

Cindy wrote:I only see two of the three xyz coordinates for some reason.
I misunderstood what you were after. Yes it does only show x,z but it is only meant to give you an approximation of your location. It doesn't update very often so it could give you inaccurate values. If you need accurate coordinates you are bettor off using getpos.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#7 Post by Cindy » Wed Nov 21, 2012 10:46 am

hmm... it lies. I got 71 with it, then when I ran the script that put me a lot lower than the floor.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#8 Post by rock5 » Wed Nov 21, 2012 11:31 am

Cindy wrote:hmm... it lies. I got 71 with it, then when I ran the script that put me a lot lower than the floor.
More information please. Where did you get 71? What value did you use in the script?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#9 Post by Cindy » Wed Nov 21, 2012 11:47 am

Ok, i used getpos, it returned 71 as the third coordinate when i was pushed up against the bottom of the floor. However, when I plugged in 71 in my waypoints file, and ran it, (the waypoint at which the teleport function is called) the character was way below the actual floor.

Code: Select all

	<!-- #  27 --><waypoint x="3338" z="2952" y="[b]71[/b]">
		UpThroughFloor()
	</waypoint>

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#10 Post by Cindy » Wed Nov 21, 2012 11:50 am

On further inspection, I might have misunderstood something.. I've adjusted this now :

Code: Select all

	function UpThroughFloor()
		local rightheight = [b]71[/b].5
		local dir = 3.14
		repeat
			if dir == 0 then dir = 3.14 else dir = 0 end -- Alternate direction
			teleport(nil,nil,rightheight) yrest(700)
			player:faceDirection(dir,-1.3) yrest(300)
			keyboardHold(settings.hotkeys.MOVE_FORWARD.key) yrest(300)
			keyboardRelease(settings.hotkeys.MOVE_FORWARD.key) yrest(1000)
			player:update()
		until player.Y > rightheight
	end	
Initial test was successful, will repeat it today to make sure its correct.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: MOAGS - Mother of All Goblin Script

#11 Post by grande » Sat Nov 24, 2012 12:59 am

Seems to work very well. Good job and thank you.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#12 Post by rock5 » Sat Nov 24, 2012 1:18 am

Cindy wrote:it returned 71 as the third coordinate when i was pushed up against the bottom of the floor
That is the correct way to get that value although I remember from AT that you have to be careful of it bouncing back and make sure you get the highest value you can reach.
Cindy wrote:On further inspection, I might have misunderstood something.. I've adjusted this now :
The way you adjusted it is correct. Well done for working it out yourself.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#13 Post by Cindy » Sat Nov 24, 2012 2:33 am

Thanks. Repeated days of testing are successful, I am now willing to let that part of the script run unsupervised.

Now to sort out my profiles so that my 68 rogue and 68 mage don't keep dying on the rock elementals... embarassing lol.

User avatar
nightclaw
Posts: 123
Joined: Sun Sep 02, 2012 4:39 am

Re: MOAGS - Mother of All Goblin Script

#14 Post by nightclaw » Sat Nov 24, 2012 4:58 am

may we get finsh working script please :)

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#15 Post by Cindy » Sat Nov 24, 2012 1:16 pm

nightclaw wrote:may we get finsh working script please :)
But you already have :)

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: MOAGS - Mother of All Goblin Script

#16 Post by grande » Sat Nov 24, 2012 5:45 pm

Yup, the script is complete and works very nice. Opens chests and gets to the furnace room faster. Just make sure you have the correct name in the loadpath part near the end of Cindy's contribution. I know that's what made me say, WTF?!!? the first time I played with it because I had renamed the original gobs furnaces to something else.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#17 Post by rock5 » Sun Nov 25, 2012 12:01 am

grande wrote:Yup, the script is complete and works very nice. Opens chests and gets to the furnace room faster. Just make sure you have the correct name in the loadpath part near the end of Cindy's contribution. I know that's what made me say, WTF?!!? the first time I played with it because I had renamed the original gobs furnaces to something else.
That's why, if you are going to reload the same file, you should use

Code: Select all

loadPaths(__WPL.FileName)
That way the user can name the file what ever they like and they can even put it in a sub folder and it will still work. But Probably Cindy should provide a downloadable file with a set name anyway just for consistency.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: MOAGS - Mother of All Goblin Script

#18 Post by Cindy » Wed Nov 28, 2012 9:01 pm

Ok I guess I can put it up, though i hardly did any work, others deserve all the credit, I just put two and two together. Also have some of my own stuff in there, like waypoint file names, and my own load function..


Rock, is it:

loadpaths("WPName")?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: MOAGS - Mother of All Goblin Script

#19 Post by rock5 » Thu Nov 29, 2012 1:26 am

No, it's "loadPaths".
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: MOAGS - Mother of All Goblin Script

#20 Post by kuripot » Sat Dec 08, 2012 5:53 pm

Cindy wrote:I wanted to have my cake and eat it too, so I hacked together various script fragments to make one that uses swim/port/underneat, gets pots, and goes to the end and loads the one that does the furnaces (Credit to all the people before me who actually did the work).

I can't seem to get my floor transition segment working very well (in last room upon reentering from the sub-space) Occasionally it will get through on its own, but most of the time I have to manual assist (upward motion and wiggling) until it gets in.

Anyone willing to give it a critical eye to see what the problem is?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onLoad>

	--== User Option ==--
	RunningSpeed = 100    -- The speed the character runs when not teleporting. 50 is normal. Recommended 100.
	UseTeleporter = true  -- Use Jduratedj's teleport userfunction. Please make sure you have it installed to use this option.

	useGoodie("speed") -- Unbridled Enthusiasm
	
	-- Apply speed hack
	local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
	if playerAddress ~= 0 then
		memoryWriteFloat(getProc(), playerAddress + 0x40, RunningSpeed);
	end
	
	-- local teleport function checker
	function portTo(_x, _z, notWaypoint)
		-- Is Teleporter is enabled?
		if not UseTeleporter then
			return
		end

		-- Close enough. Don't teleport (when feeding hens)
		if notWaypoint then
			local dist = distance(player.X, player.Z, _x, _z)
			if 19 > dist then
				return
			end
		end

		teleport(_x, _z)
	end
	
	function hammerTime()
		local __, __,time = EventMonitorCheck("Hammertooth")
		if time ~= nil then
			time=math.floor(time/60)
			printf("time="..tostring(time).."\n");
			if time>16 then
				printf("There is no Hammertooth.\n")
				HammertoothIsInTheHouse=false;
			else
				printf("Hammertooth is here. Hurry up and get a reward!\n")
				HammertoothIsInTheHouse=true;
			end
		end
	end

	if fly == nil or teleport == nil then
		error("You have to install the 'swimhack' and/or 'teleport' userfunction")
	end
	
	function inventory_check()
		player:update()
		local zoneid = RoMScript("GetZoneID()")
		if zoneid == 4 then	
			if 1 > inventory:itemTotalCount(0) then
				cprintf(cli.yellow,"You should get empty inventory spaces.")
				player:sleep()
			end
			if 30 > inventory:itemTotalCount(203038) then
				print("You need to have 30 Phirius Tokens to enter Goblin Mines")
				player:sleep()
			end
		end
	end
	
	function settings.profile.events.onUnstickFailure()
		logInfo("Goblins_Stuck", "We got stuck", true, nil, add)
		RoMScript("LeaveParty()")
		waitForLoadingScreen()
		__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	end
	
	teleport_SetStepSize(25)
	
	local function evalClickable(address)
		local chest = memoryReadRepeat("byte", getProc(), address + 0x2F0) or 0
		if chest ~= 0 then
			return true
		else
			return false
		end
	end
	
	function chest()
		local chest
		repeat
			chest = player:findNearestNameOrId(113164,nil,evalClickable)
			if chest then
				yrest(300)
				teleport(chest.X,chest.Z,chest.Y-40)
				keyboardPress(settings.hotkeys.STRAFF_RIGHT.key)
				keyboardPress(settings.hotkeys.STRAFF_LEFT.key)
				repeat
					player:target_Object(chest.Id, nil, nil, true, evalClickable);
				until evalClickable(chest.Address) ~= true
			end
		until chest == nil
		if chest == nil then
			teleport(nil, nil, -50, false)
			yrest(300)
		end
	end	
	
	function speed_buff()
		if Speed then
			if not player:hasBuff("506684") then   
				inventory:useItem(207200);
			end
			yrest(250)
			RoMScript("SetTitleRequest(530427)")
			yrest(250)
		end
	end
	
	--This code below is copid from cot_tele waypoin
	numshells = inventory:getItemCount(240181);
	if numshells > 950 then
		-- Wait for user to use some shells.
		cprintf(cli.yellow,"Reaching the maximum number of Phirius Shells (1000). Please spend some before continuing.\n")
		player:sleep()
		numshells = inventory:getItemCount(240181);
	end


	--Some of the code here is copied from Botromka's script
	zoneid=nil;
	repeat zoneid=RoMScript("GetZoneID()"); until zoneid;
	npcname=nil;
	repeat npcname=RoMScript("TEXT('Sys112651_name')"); until npcname;

	if math.mod(zoneid,1000) == 4 then
	--	inventory_check()
	--	speed_buff()
	--	player:target_NPC(npcname); yrest(1000);
	--	RoMScript("ChoiceOption(1);"); yrest(1000);
	--	RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
	--	waitForLoadingScreen(15);
	end

	if zoneid==352 then fly(); end

	function UpThroughFloor()
		local rightheight = 18.5
		local dir = 3.14
		repeat
			if dir == 0 then dir = 3.14 else dir = 0 end -- Alternate direction
			teleport(nil,nil,rightheight) yrest(700)
			player:faceDirection(dir,-1.3) yrest(300)
			keyboardHold(settings.hotkeys.MOVE_FORWARD.key) yrest(300)
			keyboardRelease(settings.hotkeys.MOVE_FORWARD.key) yrest(1000)
			player:update()
		until player.Y > rightheight
	end	
	
	EventMonitorStop("Hammertooth");
	EventMonitorStart("Hammertooth", "TIMEKEEPER_START");
	changeProfileOption("TARGET_LEVELDIF_BELOW",50)
	changeProfileOption("LOOT_ALL",true);		
</onLoad>
	<!-- #  1 --><waypoint x="-5852" z="3326" y="572" tag="start">		
		inventory_check()
		speed_buff()
		repeat
			player:target_NPC("112651");			-- Mahler Palo
			yrest(1000)
			sendMacro("ChoiceOption(1);");
			yrest(1000)
			RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
			waitForLoadingScreen(15)
			local zoneid = RoMScript("GetZoneID()")
		until zoneid == 352
	</waypoint>

	<!-- #  1 --><waypoint x="1862" z="2222" y="309">
	fly();	
	</waypoint>
	<!-- #  2 --><waypoint x="1932" z="2231" y="308">
		fly()
		yrest(100)
		teleportToWP()
		yrest(300)
	</waypoint>	
	<!-- #  3 --><waypoint x="1960" z="2231" y="328">
		teleportToWP()
		yrest(300)	
	</waypoint>
	<!-- #  4 --><waypoint x="1996" z="2231" y="355">
		teleportToWP()
		yrest(300)	
	</waypoint>
	<!-- #  5 --><waypoint x="2015" z="2232" y="369">
		teleportToWP()
		yrest(300)	
	</waypoint>
	<!-- #  6 --><waypoint x="2036" z="2235" y="379">
		teleportToWP()
		yrest(500)	
	</waypoint>
	<!-- #  7 --><waypoint x="2062" z="2237" y="378">hammerTime()	</waypoint>
	<!-- #  8 --><waypoint x="2255" z="2247" y="334">
		repeat
			yrest(1000)
		until RoMScript("TimeKeeperFrame:IsVisible()")		
	</waypoint>
	<!-- #  9 --><waypoint x="2250" z="2385" y="469">	</waypoint>
	<!-- # 10 --><waypoint x="2389" z="2423" y="331">	</waypoint>
	<!-- # 11 --><waypoint x="2284" z="2469" y="222">	</waypoint>
	<!-- # 12 --><waypoint x="1782" z="2763" y="222">	</waypoint>
	<!-- # 13 --><waypoint x="1691" z="2804" y="253">
		chest()
		hammerTime()
	</waypoint> 
	<!-- # 14 --><waypoint x="2502" z="2997" y="222">	</waypoint>
	<!-- # 15 --><waypoint x="2606" z="2981" y="239">
		chest()
	</waypoint>
	<!-- # 16 --><waypoint x="2446" z="3289" y="41">hammerTime()	</waypoint>
	<!-- # 17 --><waypoint x="2471" z="3445" y="41">	</waypoint>
	<!-- # 18 --><waypoint x="2487" z="3502" y="43">
		chest()
	</waypoint>
	<!-- # 19 --><waypoint x="2480" z="3365" y="41">	</waypoint>
	<!-- # 20 --><waypoint x="2843" z="3419" y="41">	</waypoint>
	<!-- # 21 --><waypoint x="4282" z="4259" y="41">	</waypoint>
	<!-- # 22 --><waypoint x="4400" z="4322" y="182">
		chest()
	</waypoint>
	<!-- # 23 --><waypoint x="4389" z="4158" y="41">	</waypoint>
	<!-- # 24 --><waypoint x="4500" z="3471" y="41">	</waypoint>
	<!-- # 25 --><waypoint x="4386" z="3460" y="149">
		chest()
	</waypoint>	
	<!-- #  26 --><waypoint x="3368" z="2950" y="30">	</waypoint>
	<!-- #  27 --><waypoint x="3308" z="2940" y="85">
		UpThroughFloor()
	</waypoint>
	<!-- #  28 --><waypoint x="3335" z="2977" y="185">
		UpThroughFloor()
	</waypoint>
	<!-- #  29--><waypoint x="3362" z="2812" y="241">		
	</waypoint>
	<!-- #  30 --><waypoint x="3440" z="2879" y="339"></waypoint>	
	<!-- #  31 --><waypoint x="3352" z="2976" y="249">	</waypoint>
	<!-- #  32 --><waypoint x="3230" z="3101" y="270">	</waypoint>
	<!-- #  33 --><waypoint x="3156" z="3247" y="267">	</waypoint>
	<!-- #  34 --><waypoint x="3137" z="3278" y="248">		
	EventMonitorStop("Hammertooth");
	loadPaths("Mini_gobsEnd");
	__WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
	</waypoint>
</waypoints>

did i miss something???
Attachments
moag.JPG

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests