Page 2 of 3

Re: Rock5's version of teleport

Posted: Wed Sep 21, 2011 5:40 pm
by poioip
rock5 wrote:Ok, added the new function to version 2.1. Read about it on the first post.
nice man u rock Rock5

Re: Rock5's version of teleport

Posted: Wed Nov 02, 2011 6:37 am
by Hetrix
Hey Rock5, just found out about those wonderfull scripts.

Got a few questions about them.
Where do I need to place the teleport.lua file and how do I activate it?

I got it now, I placed it in the userfunctions folder and it seems to work great with the MRC_Optimized.xml file. Also set the speed 100. Anything more I can do to improve it? :))

/ Hx ;)

Re: Rock5's version of teleport

Posted: Wed Nov 02, 2011 7:40 am
by rock5
Speed shouldn't have much of an effect if you are teleporting everywhere. That should be as fast as it can go unless you wan to disable turning in the quest.

Re: Rock5's version of teleport

Posted: Wed Nov 02, 2011 1:59 pm
by Hetrix
Ok I'll set the speed to normal again (50), will this teleporting prevent the character to get stuck at the "hen house". Sometimes my bots get stuck there, trying to run but they manage to get on the left side of the hen house at the wall. So they try to run through it endless, hope this teleport will fix that.

*Will add a image later to show you how I exactly mean*

/ Hx

Re: Rock5's version of teleport

Posted: Wed Nov 02, 2011 10:49 pm
by rock5
If it runs too far it's probably a lag issue. Teleport should help I think. But even lowering the speed should help because it gives it time to stop before running too far.

Re: Rock5's version of teleport

Posted: Thu Nov 03, 2011 5:04 am
by Hetrix
Ok, I just tested it over the night and I got 3 clients working. Now when I woke the third client stopped botting, I couldn't press the hen och anything and in the micromacro it calulated some stuck hens etc? Can I get pass this stuck thing or?

/ Hx

Re: Rock5's version of teleport

Posted: Thu Nov 03, 2011 5:16 am
by rock5
If the hens were really stuck the only way to fix it is to restart the game or leave and reenter Miller's Ranch. That's not built into the egg script.

Re: Rock5's version of teleport

Posted: Thu Nov 03, 2011 8:54 am
by Hetrix
Ok, I didnt have this issue with the normal botting where the characters run to each waypoint. Will test the speed to 100 without teleport aswell maybe that one is better for me.
Thx for ur response and answers Rock5, really appreciate that ;-)

Re: Rock5's version of teleport

Posted: Thu Nov 17, 2011 10:54 am
by klassik1
Hello,
I am using your survivalr5.xml waypoints for the malatina's survival game. I have the Survivalr5.xml and the survivalr5onload in the waypoints folder. And i have the userfunction_teleport.lua in the userfunctions folder. When i run the bot, i get an error that says:

micromacro/scripts/rom/waypoints/survivalr5onload.lua:292: attempt to call global 'fly' <a nil value>

I tried to look in the onload file... but i am a total noob with script and i cant see what the problem would be.
I would appreciate your help, rock. Thanks

Re: Rock5's version of teleport

Posted: Thu Nov 17, 2011 11:41 am
by rock5
"fly" is the swim hack. It can be found here.
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2765

Re: Rock5's version of teleport

Posted: Thu Nov 17, 2011 11:45 am
by BillDoorNZ
you also need the userfunction_swimhack file:

http://www.solarstrike.net/phpBB3/viewt ... =27&t=2765

Re: Rock5's version of teleport

Posted: Thu Nov 17, 2011 3:31 pm
by klassik1
ah thank you very much!

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 2:42 am
by kanta
Just curious, would it be worthwhile to add teleport functionality to waypoint types? Like adding "tpnormal" "tptravel" "tprun" so it can be used like __WPL:setForcedWaypointType("TPTRAVEL")?

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 3:13 am
by rock5
Personally, I prefere to not make hacking part of the bot as I see the main purpose of the bot is to automate what you do manually. If you are going to hack I prefere to add it to the waypoint file or userfunction. I don't know how the others feel about it.

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 11:46 am
by kanta
I understand your point. Even more so since I've been working on a waypoint for Ancient Treasures. Kind of more trouble than it's worth. I've got a functional path system to navigate the area. Here's the thing: It teleports down to the elemental candle just fine but when it teleports back up I get a bunch of client data errors. It isn't trying to go through walls or the ceiling, I just don't understand why the errors are happening. It does keep going through the waypoints, just the messages are annoying and may eventually catch someone's eye in the logs. I've adjusted the step size, didn't help. I added a player:rest thinking maybe it was trying to make too many hops to quickly between waypoints. Not sure what else I can try.

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 1:14 pm
by rock5
Don't worry about it. Cot_tele also gets those errors. We haven't figured out how to stop them.

So... it sounds promising. Will you be sharing? :)

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 1:56 pm
by kanta
Of course :D

So many people have helped me out during my time here, I'm glad if I can make something to give back.

The code isn't very "pretty" or advanced, but it seems to be getting the job done. I'm playing around with different teleport methods before I release it. I wouldn't suggest running it with lower level characters with high aggro radius though. This waypoint depends on being able to avoid the mobs by flying over them. I may try to work on a low level version later once I know I can get an "easier" version to work properly. I've cannibalized some code from you and Lisa, adapted it, and plugged it into my code.

I've got a small problem with the current teleport function to go to the candles. It isn't a crippling problem, but could be an annoyance to some. Once the character is near the candle coordinates, it "hops" back and forth a couple times. I've tried adding code from my limited knowledge to stop this behavior and also trying to search for something to help but I've been unsuccessful so far. I may just polish up what I have at this point, post it, and ask for help.

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 2:03 pm
by rock5
I'm looking forward to getting back tickets. :)

By 'hops' do you mean you are getting pulled back after teleporting? That might be due to you teleporting into something. Try adjusting the teleport point.

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 2:48 pm
by kanta
It's not like the pullback that happens from teleporting too far or setting the run speed too high. It actually "hops" to a new x/z coordinate by about a value of 20 - 30 maybe 3 or 4 times in a row. Very strange behavior.

One other problem. Guess this is the first thing I should have coded. Entering AT. The NPC Ange Rasa has both quest and dialogue options. This seems to confuse the bot. The menu is like:

Available Quests
:!: [23] Gather Stone Totem Fragments (0/5)
Chat
- About the ruins...
- Exchange for prize
- I want to know...
- I'd like to challenge
- Leave conversation

No matter what I put in sendMacro("ChoiceOption(5);"); it always chooses the "About the ruins" option.

One other possible issue. Buff skills. I had to add code to disable my buffs. Since AT doesn't allow you to use normal skills once you are inside, the bot gets stuck in a loop trying to cast them. Unless people are willing to add in the code for their own skills, this may be a problem for just anyone to be able to use it.

Re: Rock5's version of teleport

Posted: Fri Dec 23, 2011 5:07 pm
by kanta
The only solution I can think of is to change the following lines in player.lua

Code: Select all

-- Check if you can use any skills, and use them
-- if they are needed.
function CPlayer:checkSkills(_only_friendly, target)
	local used = false;
	self:update();
	--=== don't cast any skills if mounted ===--
	if settings.profile.options.DISMOUNT == false and player.Mounted then return false end
	
	local target = target or self:getTarget();
with the following:

Code: Select all

-- Check if you can use any skills, and use them
-- if they are needed.
function CPlayer:checkSkills(_only_friendly, target)
	local used = false;
	local zoneid = RoMScript("GetZoneID()")
	self:update();
	--=== don't cast any skills if mounted ===--
	if settings.profile.options.DISMOUNT == false and player.Mounted then return false end
	if settings.profile.options.DISMOUNT == false and zoneid == 355 then return false end
	local target = target or self:getTarget();
**EDIT**
Figured out what the "hopping" problem is. I didn't make the teleport code reset coordinates so it's trying to go back to other waypoints.