Creating Paths

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Creating Paths

#1 Post by Uniden65 » Sun Mar 18, 2012 9:44 pm

Why is it when i create a path for a instance i can get it to auto invite, go into the instance update character but then it jumps to the last waypoint?

also the bot does not even come close to where i made the paths ....its like there off by 10 steps and every time it runs it does not follow the same path , this is becoming very complexed to keep the bot farming in small areas ....any ideas would be very help full please

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#2 Post by Uniden65 » Sun Mar 18, 2012 10:12 pm

ok this DID NOT worked after going into the instance

__WPL:setWaypointIndex(1);


it moved to a number i dont even have as a way point

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Creating Paths

#3 Post by lisa » Sun Mar 18, 2012 11:08 pm

the bot isn't very good at small places with close together waypoints, it might sound funny but if you put any code in a waypoint the bot will pause at that waypoint for a split second before continueing, I use this to get around tight small places.

The reason is because the bot is doing calculations with speed and distance travelled to target distance and so on, so if you only take a few steps between 2 waypoints it doesn't have time to actually make those calculations accurately.

As for why your WP is going to different waypoints then you want, no idea. I'd have to see the code to tell you what is wrong with it. Also a copy of the MM print would help aswell.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: Creating Paths

#4 Post by rock5 » Mon Mar 19, 2012 12:09 am

Maybe you have a value set for WAYPOINT_DEVIATION in your profile.
  • 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

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#5 Post by Uniden65 » Mon Mar 19, 2012 1:34 pm

thanks for replying is there any way to Pin Point a spot where the Bot will hit every time .....

iam asking becuase iam useing your function from one of your instance waypoints made by : Lisa, M4gm4, and all other tester, i have it run to the spot in front of the instance door then execute your function findzi... works great who ever created it but .if it does NOT hit the same spot every time it, puts the bot in repeat mode looking but throws it off later.



Code: Select all

					function findzi()						
						keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						yrest(400)						
						keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						yrest(500)
						keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
						waitForLoadingScreen(10)
						yrest(500)
						local getinlvl = sendMacro('GetInstanceLevel()')
						if getinlvl == ("easy") then
							zid = 128
						elseif getinlvl == ("normal") then
							zid = 127
						elseif getinlvl == ("hard") then
							zid = RoMScript("GetZoneID()");
							sendMacro('SetInstanceLevel("easy")');
							cprint(cli.blue, "Instance Lvl change to easy\n")
						end

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#6 Post by BillDoorNZ » Mon Mar 19, 2012 2:31 pm

just a quick side-note,

I find that its easier to just have the bot target the portal itself, rather than doing a manual move: keyboardHold( settings.hotkeys.MOVE_FORWARD.key ).

Need to test it out more, but if I simply do something like:

Code: Select all

	local portalIn = 110987;
	player:target_NPC(portalIn);
	yrest(2000);
	waitForLoadingScreen(5);
this seems to work pretty well (prolly shouldn't be using target_NPC - was just in a hurry when I wrote that code). I use that bit of code for getting into KS.

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#7 Post by Uniden65 » Mon Mar 19, 2012 2:34 pm

ok iu would like it for dod ....this 110987 is for ? any portals or just KS

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#8 Post by BillDoorNZ » Mon Mar 19, 2012 8:14 pm

I assume just KS...y'd have to check the dod one using the getId thing...I'll take a look at it when I can too tho.

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#9 Post by BillDoorNZ » Mon Mar 19, 2012 8:24 pm

to go in (from outside): 112224
leaving (from inside): 110578

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Creating Paths

#10 Post by lisa » Mon Mar 19, 2012 8:48 pm

is the name of the Id's the same ?
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#11 Post by BillDoorNZ » Mon Mar 19, 2012 9:07 pm

yes and no :)

yes, they are the same

no they don't have a name :(

I suspect that player:target_NPC(...) is not the right function to use either. Possible player:moveTo(...) or the like as I am concerned that the bot will try to interact with the portal and not hit the 'waitForLoading...' until after the teleport is complete which will screw with the bot somewhat :(

I already have issues with my own stuff interfering with timing and the player = CPlayer.new() failing (usually when loading the pet (CPawn) for some reason) and imagine that what I am suggesting will cause problems too.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Creating Paths

#12 Post by lisa » Mon Mar 19, 2012 10:20 pm

I usually just make sure the coords I use work, never had any issues of not going in portals myself.

If you go with your theory instead of using target I would just get the coords of the object and move to those coords and since the object should have the same coords every single time then I don't see why you can't just make those coords the coords of a waypoint.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#13 Post by Uniden65 » Tue Mar 20, 2012 12:10 am

Well it was alot of nice suggestions but neither of them worked ..... Still using your code Lisa

and i could not target the portal so could not get the id from it or location


correction it did work your ids are backwards
thanks alot
Last edited by Uniden65 on Tue Mar 20, 2012 12:19 am, edited 1 time in total.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Creating Paths

#14 Post by lisa » Tue Mar 20, 2012 12:16 am

CDWriter wrote:Still using your code Lisa
I don't recognise that code at all, if I did do it it must have been a year ago or more.

I use this for KS.

Code: Select all

	<!-- # 225 --><waypoint x="-18528" z="12368" tag="enter" type="TRAVEL">
	changeProfileOption("QUICK_TURN", false)
	</waypoint>	
	<!-- # 227 --><waypoint x="-18576" z="12498" type="TRAVEL">
	local ss = os.time()
	repeat
		waitForLoadingScreen(20);
		if getZoneId() == 6 then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("enter"));
		end
	until getZoneId() ~= 6
	yrest(3000)
	</waypoint>
DoD I use

Code: Select all

	<!-- #  3 --><waypoint x="1688" z="-5162" y="759">
	waitForLoadingScreen();
	</waypoint>
and

Code: Select all

	<!-- # 14 --><waypoint x="1696" z="2891" y="445">		
	waitForLoadingScreen();
	yrest(5000)
	SlashCommand("ILG destroy"); 
	yrest(2000)
	SlashCommand("ILG inv"); 
	yrest(1000)
	SlashCommand("ILG inv"); 
	</waypoint>
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#15 Post by Uniden65 » Tue Mar 20, 2012 12:53 am

well it works great and targets and pulls the character to the spot i added a


keyboardHold( settings.hotkeys.MOVE_FORWARD.key )

after the code so it walks into the portal after it stand in front ....but how do you stop the forward movement in a command ?

bot runs throu last portal and keeps walking till the code catches up to it self and sends it back to path 1

here is my modificatiuoins

Code: Select all

					function findzi()						
						-- keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						-- yrest(400)						
						-- keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						-- yrest(500)
						-- keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
                                                -- Number is portal on the outside
                                                local portalIn = 110578; 
                                                player:target_NPC(portalIn);
                                                yrest(2000);
						keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						waitForLoadingScreen(10)
						yrest(500)
						local getinlvl = sendMacro('GetInstanceLevel()')
						if getinlvl == ("easy") then
							zid = 128
						elseif getinlvl == ("normal") then
							zid = 127
						elseif getinlvl == ("hard") then
							zid = RoMScript("GetZoneID()");
							sendMacro('SetInstanceLevel("easy")');
							cprint(cli.blue, "Instance Lvl change to easy\n")
						end
					end


					function findzo()						
						-- keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						-- yrest(400)						
						-- keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						-- yrest(500)
						-- keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
                                                -- Number is portal on the inside
                                                local portalIn = 112224; 
                                                player:target_NPC(portalIn);
                                                yrest(2000);
						keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
						waitForLoadingScreen(10)
						yrest(500)
---- I need to add something here to stop it from walking forward after coming out of the portal 
						local getinlvl = sendMacro('GetInstanceLevel()')
						if getinlvl == ("easy") then
							zid = 128
						elseif getinlvl == ("normal") then
							zid = 127
						elseif getinlvl == ("hard") then
							zid = RoMScript("GetZoneID()");
							sendMacro('SetInstanceLevel("easy")');
							cprint(cli.blue, "Instance Lvl change to easy\n")
						end
					end
but after it targets the portal on the exit it keeps walking since i have the move forwward command there ...so how would i stop it on a open
<onLoad> statement

here is the orginal code, i modified it and remove all the fly commands

http://www.solarstrike.net/phpBB3/viewt ... d+instance

I fixed it ...with keyboardPress(key.VK_W) many time after the rest instead of MOVE.FORWARD thanks lisa
Last edited by Uniden65 on Tue Mar 20, 2012 10:57 am, edited 1 time in total.

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#16 Post by Uniden65 » Tue Mar 20, 2012 1:29 am

Also i would like to thank u BillDoorNZ for your help ...and how did u get the ids off the portals i cant target them to get it using object id

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#17 Post by BillDoorNZ » Tue Mar 20, 2012 4:38 am

i use:

Code: Select all

local function roundIt(_number)
	if _number > (math.floor(_number) + 0.5) then
		return math.ceil(_number);
	else
		return math.floor(_number);
	end
end

function GetObjects()
	local objectList = CObjectList();
	objectList:update();
	local objSize = objectList:size();
	

	local lncolor,obj;
	local s = "";
	
	
	for i = 0,objSize do 
		obj = objectList:getObject(i);
				
		printf("%s%d\t%d\t%d\t%s\t%s\t%s\t%s\t%x\t%d\n",s, roundIt(obj.X), roundIt(obj.Z), roundIt(obj.Y), tostring(obj.Type), obj.Name, tostring(obj.Id), tostring(obj.Attackable), obj.Address, obj.GUID);

	end
end

then i manually call it / run a waypoint that runs this...well..i lie...i have my own customised bot that i control from an external app that tells mm to run that command and captures the output. far too complex for q quick explanation tho.

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#18 Post by Uniden65 » Tue Mar 20, 2012 10:53 am

So if they change it how would i get them again ? hmmmm i need to find a solution to this because that works 100% to the teleport....

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Creating Paths

#19 Post by BillDoorNZ » Tue Mar 20, 2012 1:00 pm

As far as I know, they don't change :)

I suspect that the GUID doesnt change either - I maintain a db with all objects that I run across automatically getting added. So far there are no duplicate ID+GUID combinations (other than a couple that slipped in due to poor coding :)

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: Creating Paths

#20 Post by Uniden65 » Tue Mar 20, 2012 1:06 pm

if thats the case could i ask u for a big favor and post all the codes IN / Out of every Instance in the game for future use later ?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 29 guests