Rock5's GotoGuild

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
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Rock5's GotoGuild

#21 Post by rock5 » Thu Dec 26, 2013 8:31 am

The code I posted has no distance limits. It should work.
  • 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: Rock5's GotoGuild

#22 Post by kuripot » Sat Dec 28, 2013 6:47 am

rock can you included this command

Code: Select all

		player:target_Object(112898); -- Drill Ground III
		sendMacro("ChoiceOption(1);");
		waitForLoadingScreen();
in "GotoGuild("Drill Ground")" command because i think no other reason why go to "Drill Ground" rather than doing minigame in "Drill Ground"
or teach me where and what i need to edit to put that command

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

Re: Rock5's GotoGuild

#23 Post by rock5 » Sat Dec 28, 2013 8:34 am

The only purpose of gotoguild is to take you around the castle. I'm not going to add any actions at the points. It's up to the user to take what ever actions they want to take. I suggest you add the code to your drill grounds waypoint file. Because you don't know where the drill ground is, the code would have to be in the onload. Example

Code: Select all

<onload>
   if getZoneId == 401 then -- Guild Castle
      player:target_Object(112898); -- Drill Ground III
      sendMacro("ChoiceOption(1);");
      waitForLoadingScreen();   
      __WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y))
   end
</onload>
  • 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

pod
Posts: 7
Joined: Mon Dec 16, 2013 8:07 am

Re: Rock5's GotoGuild

#24 Post by pod » Sun Dec 29, 2013 8:02 pm

I can't get the GotoGuild function to work, I get this reply Failed to find destination 'Drill Ground'.

Code: Select all

<onload>      
	GotoGuild("Drill Ground") -- Any level drill ground
         player:target_Object("Drill Ground"); -- Drill Ground
         sendMacro("ChoiceOption(1);");
         waitForLoadingScreen();
</onload>
This is the list I get when running

Code: Select all

ol = CObjectList() ol:update() for k,v in pairs(ol.Objects) do printf("%s,%d,%d\n",v.Name,v.X,v.Z) end
  • Tower of Invincible Attack I,-138,-325
    Guild Quest Board I,-120,-221
    Guild Castle Transport Point,77,-564
    Tower of Perfect Defense I,-183,-436
    Academy IV,408,454
    Small Foundation VI,-184,-381
    Small Foundation VI,-408,203
    Large Foundation,-408,454
    Guild Treasury Gate,0,648
    Guild Mailbox,-44,637
    Library III,184,-381
    Stable IV,-408,-223
    Large Foundation,408,454
    Drill Ground II,408,-223
    Field IV,-362,260
    <UNKNOWN>,-6,-511
    Arsenal III,408,203
    Processing Factory III,-408,453
    Forge IV,-408,148
    Large Foundation,408,203
    Tower of Rapid Growth I,-229,-325
    Lumber Yard IV,-453,260
    Guild Treasury Switch,44,645
    Gate,652,0
    Main Building,0,264
    Gate,-652,0
    Guild Castle Transport Point,-77,-564
    Large Foundation,184,-381
    Large Foundation,408,-223
    Gate,0,-652
    Fortification,0,0
    Large Foundation,-408,-223
    ,0,0
    Guild Castle Throne,0,595

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

Re: Rock5's GotoGuild

#25 Post by rock5 » Sun Dec 29, 2013 11:19 pm

Actually that happened to me too. Could it be that you have the drill ground on the same square as me? Turns out that Square6 has a typo in it's name so it can't 'find' buildings on that square. Line 100 should be

Code: Select all

	[86]={ X=408 , Z=-335, Name="Square6", Links={[1]={Num=102},[2]={Num=87},}},
  • 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

pod
Posts: 7
Joined: Mon Dec 16, 2013 8:07 am

Re: Rock5's GotoGuild

#26 Post by pod » Mon Dec 30, 2013 5:39 am

Now it's working perfect :)

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

Re: Rock5's GotoGuild

#27 Post by rock5 » Mon Dec 30, 2013 5:53 am

Square 6 typo fixed in version 1.21.
  • 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

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: Rock5's GotoGuild

#28 Post by Desmond » Tue Nov 04, 2014 8:08 am

What function for checking if the gate is closed then open them?

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

Re: Rock5's GotoGuild

#29 Post by rock5 » Tue Nov 04, 2014 8:24 am

It should automatically open the gates when needed. There is no function available for you to use separately. The functions that open the gates are local.
  • 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

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Rock5's GotoGuild

#30 Post by noobbotter » Thu Aug 13, 2015 2:33 pm

I was having an issue getting the Drill Ground to open the dialog window after using goToGuild to get there. I use this which takes me onto the center of the drillground and then initiates the dialog command:

Code: Select all

GotoGuild("Drill Ground")
DG = player:findNearestNameOrId("Drill Ground")
player:moveTo(CWaypoint(DG.X,DG.Z), true)
player:target_Object("Drill Ground"); 
sendMacro("ChoiceOption(1);");
waitForLoadingScreen();   
Thought I'd post this... it might help someone else with the same problem.

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Rock5's GotoGuild

#31 Post by beanybabe » Thu Aug 13, 2015 7:17 pm

here is what I came up with for drill I put the 3 wp in when having trouble but I think only 1 is needed now. use the repeat yrest until for each npc in drill or you will have problem
if you call the waypoints up externally after entering drill good luck that had to many problems I merged them into the main file.

Code: Select all

	GotoGuild("Drill Ground"); -- Any level drill ground
	yrest(500)
	repeat
		yrest(500)
	until player:target_Object("Drill Ground"); -- Drill Ground
	sendMacro("ChoiceOption(1);");
	yrest(1000);
	waitForLoadingScreen();
	yrest(500);
	__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z))   need this just after entering to stop problems
</onload>
<!-- #  1 --><waypoint x="5121" z="2521" >	</waypoint>       -- I think rock got it fixed now so 3 of these wp are not needed here now.
<!-- #  1 --><waypoint x="5121" z="2521" >	</waypoint>
<!-- #  1 --><waypoint x="5120" z="2523" >
	repeat
		yrest(500)
	until player:target_NPC(112066) -- Special Training Manager
	

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Rock5's GotoGuild

#32 Post by beanybabe » Fri Sep 30, 2016 1:55 pm

Question on Stable buffs. Is there way to get the highest stable buff in code. Or has anyone wrote some code to get the buffs from castle. I wrote a bit of code but need way to know if buff tower is not there or stable is not there also.

Here is what I got so far. It fails if stable or a tower is not there. Be inside castle when running this.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>

-- get buffs in castle ver 0.1
 
for k,v in pairs(settings.profile.skills) do
	v.AutoUse = false
end
-- ---------------functions ---------------------

function kill_stupid_newbie_pet()
   local function evalfunc(address)
      local obj = CPawn.new(address)
      obj:updateIsPet()
      return obj.IsPet == player.Address
   end
   if player:findNearestNameOrId(113199,nil,evalfunc ) then  -- search vicinity for your Newbie Pet
      local newbEgg = inventory:findItem(207051); -- Newbie Pet Egg
      if newbEgg then
         newbEgg:use()
         newbEgg:delete()
      end
   end
end

--Main------------------
kill_stupid_newbie_pet()

GotoGuild("Stable");  
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Stable");  
	sendMacro("ChoiceOption(1);");               --get first stable buff
	yrest(1000);
	
GotoGuild("Tower of Increased Learning");  
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Tower of Increased Learning");  
		sendMacro("ChoiceOption(1);");
	yrest(1000);
	
GotoGuild("Tower of Mystic Fortune");  
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Tower of Mystic Fortune");  
		sendMacro("ChoiceOption(1);");
	yrest(1000);
	
GotoGuild("Tower of Rapid Growth");  
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Tower of Rapid Growth");  
		sendMacro("ChoiceOption(1);");
	yrest(1000);
	
GotoGuild("Tower of Perfect Defense");  
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Tower of Perfect Defense");  
		sendMacro("ChoiceOption(1);");
	yrest(1000);
	
GotoGuild("Tower of Invincible Attack"); 
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Tower of Invincible Attack");  
		sendMacro("ChoiceOption(1);");
	yrest(1000);
	
GotoGuild("Tower of Magic Protection");  
	yrest(500)
	repeat
 		yrest(500)
	until player:target_Object("Tower of Magic Protection");  
		sendMacro("ChoiceOption(1);");
	yrest(1000);
	
</onload>		
</waypoints>	

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests