Page 1 of 2

goal setting

Posted: Fri Jul 10, 2009 9:27 am
by botlover
i was thinking, the max and minimum lvl sets u can imply in the coding

Code: Select all

	<option name="TARGET_LEVELDIF_BELOW" value="4" />
  	<option name="TARGET_LEVELDIF_ABOVE" value="2" />
but what if the area u run around ends up being to low, this would in theory make your char run around the path without killing anything.


now my question is, is it possible to set goals like "no combat for 300 sec = change to path="path to area2" when reached end of "path to area2" change to path="area2" and so on. - this would make it possible to get ALOT of lvl's over night. - atleast in the first 20 lvl's.

or also "no combat for 300 sec = log out" - this would make it able to set the goal to get x amount of lvl's and then log out.

Re: goal setting

Posted: Fri Jul 10, 2009 10:42 am
by Administrator
A better way to do that would be to check player level directly and have then move on.

Code: Select all

<waypoint x="1234" z="5678">
  if( player.Level > 10 ) then
    __WPL:load(getExecutionPath() .. "/waypoints/travelToNextWaypoints.xml");
  end
</waypoint>

Re: goal setting

Posted: Fri Jul 10, 2009 5:27 pm
by botlover
so it is possible ? how nice.

tbh, there should be an guide about the advanced functions.

where all "secret" coding is writen down and explained... this would be really nice !

then i wouldn't have to make this noob questions all the time xD

thanks for reply though :)

Re: goal setting

Posted: Fri Jul 10, 2009 5:35 pm
by botlover
another one, how do u make travel scripts ? i mean, how do u define, that at the end of the route he changes to new waypoint ?

Re: goal setting

Posted: Fri Jul 10, 2009 7:23 pm
by Administrator
It is all explained in the instructions. To make a travel waypoint script, just do this:

Code: Select all

<waypoints type="TRAVEL">
  <waypoint x="1" z="1"></waypoint>
  <waypoint x="2" z="2"></waypoint>
  <waypoint x="3" z="3"></waypoint>
  <waypoint x="4" z="4"></waypoint>
  <waypoint x="5" z="5">
    -- Load the next waypoint script once we read the last waypoint
    __WPL:load(getExecutionPath() .. "/waypoints/nextPath.xml");
  </waypoint>
</waypoints>

Re: goal setting

Posted: Fri Jul 10, 2009 8:00 pm
by botlover
this might be a stupid question, but how do you change BOTH the path AND the return_path ? so that when u move to another area, it changes both paths ? :)


thanks again in advance :)

Re: goal setting

Posted: Fri Jul 10, 2009 8:33 pm
by Administrator
__WPL is the waypoint object, and __RPL is the return path object. They both work the same way (just use the load function on them to change paths like I showed above).

Re: goal setting

Posted: Sat Jul 11, 2009 8:44 am
by botlover
Administrator wrote:__WPL is the waypoint object, and __RPL is the return path object. They both work the same way (just use the load function on them to change paths like I showed above).

so what u mean is

Code: Select all

<waypoints type="TRAVEL">
  <waypoint x="1" z="1"></waypoint>
  <waypoint x="2" z="2"></waypoint>
  <waypoint x="3" z="3"></waypoint>
  <waypoint x="4" z="4"></waypoint>
  <waypoint x="5" z="5">
    -- Load the next waypoint script once we read the last waypoint
    __WPL:load(getExecutionPath() .. "/waypoints/nextPath.xml");
    __RPL:load(getExecutionPath() .. "/waypoints/nextReturnPath.xml");
  </waypoint>
</waypoints>
is that correct ?

Re: goal setting

Posted: Sat Jul 11, 2009 10:55 am
by Administrator
Other than the waypoints themselves not having the correct coordinates, yes.

Re: goal setting

Posted: Sat Jul 11, 2009 1:19 pm
by aasi888
Is it possible to make my character go to differend farm position if he notices PK death? It would be IMO better than choosing the path randomly. I can't think how it could be done.

I tried to create a function that would randomly choose the path when comming back after death.

Code: Select all

function Randompath()
	local min = 1;
	local numberOfPaths = 2;
	local rand = math.random(min, numberOfPaths);
	printf("Choosing path: %s \n", rand);

if( rand == 1 ) then
    __WPL:load(getExecutionPath() .. "/waypoints/Waypoints1.xml");
    __RPL:load(getExecutionPath() .. "/waypoints/back_to_Waypoints1.xml");
elseif( rand == 2 ) then
    __WPL:load(getExecutionPath() .. "/waypoints/Waypoints2.xml");
    __RPL:load(getExecutionPath() .. "/waypoints/back_to_Waypoints2.xml");
end;

--Print the changes made
cprintf(cli.green, language[0], __WPL:getFileName());
cprintf(cli.green, language[1], __RPL:getFileName());
return rand;
end
I was thinking of placing

Code: Select all

function Randompath()
end
it in bot.lua right after this:

Code: Select all

if( player.Returning ) then
I am not sure how this would work since I'm not planning to die. How can I easily test the function? When I enable the bot it will just go with the pathpoints. I dun wanna xp debt :/.




BTW is the

Code: Select all

return rand;
necessary or should I just use

Code: Select all

return;

Re: goal setting

Posted: Sat Jul 11, 2009 1:55 pm
by botlover
nead, the only thing that needs now, is some way to implement the skills u get while lvl'ing, being able to skill those up, place them in the actionbar and implement the use of them.


then u would truly have an bot that would kick serious ass...

but is it possible to change character-script like it's possible to change the path scripts ? and if so, how ?

Re: goal setting

Posted: Sat Jul 11, 2009 2:28 pm
by Administrator
aasi888 wrote: I was thinking of placing

Code: Select all

function Randompath()
end
it in bot.lua right after this:

Code: Select all

if( player.Returning ) then
Only put

Code: Select all

Randompath();
Or you will be declaring a new function instead of calling it.
BTW is the

Code: Select all

return rand;
necessary or should I just use

Code: Select all

return;
[/quote]
No; You aren't making use of a returned value, so you do not need to use return at all.
I am not sure how this would work since I'm not planning to die. How can I easily test the function? When I enable the bot it will just go with the pathpoints. I dun wanna xp debt :/.
Make a new character to test it on. Or, just place the function call (Randompath()) in the initialization sequence rather than the death sequence.

but is it possible to change character-script like it's possible to change the path scripts ? and if so, how ?
I'm not sure what that's even supposed to mean.

Re: goal setting

Posted: Sat Jul 11, 2009 2:38 pm
by aasi888
Thx for quick reply :!:

Re: goal setting

Posted: Sun Jul 12, 2009 6:32 am
by botlover
Administrator wrote:
but is it possible to change character-script like it's possible to change the path scripts ? and if so, how ?
I'm not sure what that's even supposed to mean.
i mean the character script, the script wich is used to define wich spell to use, and wich hotkeys they'r on :)

Re: goal setting

Posted: Sun Jul 12, 2009 1:41 pm
by Administrator
botlover wrote:
Administrator wrote:
but is it possible to change character-script like it's possible to change the path scripts ? and if so, how ?
I'm not sure what that's even supposed to mean.
i mean the character script, the script wich is used to define wich spell to use, and wich hotkeys they'r on :)
That's a profile. You can edit it to fit your needs by following the profile specifics outlined in the first post. I'm not sure what you want.

Re: goal setting

Posted: Sun Jul 12, 2009 1:52 pm
by d003232
Administrator wrote:I'm not sure what you want.
Perhaps switch between the settings from the primary and secondary class without the need of editing the skills? That would be nice

Re: goal setting

Posted: Sun Jul 12, 2009 6:00 pm
by botlover
Administrator wrote:
That's a profile. You can edit it to fit your needs by following the profile specifics outlined in the first post. I'm not sure what you want.
sorry if i was unclear, i mean to change the profile with an command ? that might not be possible ?

Re: goal setting

Posted: Sun Jul 12, 2009 6:02 pm
by Administrator
Yes. Try: rom/bot.lua profile:someProfile

Re: goal setting

Posted: Sun Jul 12, 2009 6:14 pm
by botlover
that does work, but how do u define that that profile should be loaded in the waypoints ?


tryed this, wich ofcourse dosen't work

Code: Select all

	<!-- #62 --><waypoint x="463" z="-7195">
rom/bot.lua profile:someProfile </waypoint>

Re: goal setting

Posted: Sun Jul 12, 2009 6:46 pm
by Administrator
Oh, you want to load a profile from within a waypoint script? Not sure why you would want to do that, but it can be done.

Code: Select all

<!-- #62 --><waypoint x="463" z="-7195">
  settings.loadProfile("playerName");
</waypoint>
Where 'playerName' is, obviously, the name of the profile to load. Do not include path and do not include the .xml extension.