showing tag in RoMBot output

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.
Post Reply
Message
Author
Celesteria
Posts: 36
Joined: Mon Jun 01, 2015 7:44 am

showing tag in RoMBot output

#1 Post by Celesteria » Tue Jun 02, 2015 9:31 am

hi rock5,

I hope this is the correct forum for this...
It would be nice to see the tag (if there is one) within the 'moving to waypoint...'-message. I changed the following line within my personal copy, but it should be a better way to use and update the language-files to fit these little changes

Code: Select all

-- bot.lua --
line: 950
from
cprintf(cli.green, language[13], wpnum, wp.X, wp.Z);	-- Moving to returnpath waypoint
to
cprintf(cli.green, language[13]..(wp.Tag~='' and ' tag: '..wp.Tag or ''), wpnum, wp.X, wp.Z);	-- Moving to returnpath waypoint

line: 954
from
cprintf(cli.green, language[6], wpnum, wp.X, wp.Z, wptag);	-- Moving to waypoint
to
cprintf(cli.green, language[6]..(wp.Tag~='' and ' tag: '..wp.Tag or ''), wpnum, wp.X, wp.Z);	-- Moving to waypoint


greetings
Celesteria
I am a botter, but no cheater. So none of my scripts ever use any of the hacks like swimhack, speedhack, wallhack...
I hope you can understand my english. Its not my native language and it has been a long time since I used it the last time :)

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

Re: showing tag in RoMBot output

#2 Post by rock5 » Thu Jun 04, 2015 3:45 am

That looks ok. I'll add it to my next commit.

I'm not sure what you meant by "but it should be a better way to use and update the language-files to fit these little changes".

Note: if you make changes to your personal copy, when you do an SVN Update usually you can do the update without affecting your changes and without causing any problems. The only time you have conflicts is when the part of the file you changed is also being changed by the update.

If you want changes added to the bot you have to let us know on the forum so a developer like me can add it. If anyone ever contributes a lot and it looks like they want to contribute for the long term and Administrator is happy with their work he might invite them to become a developer like me and Lisa.
  • 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

Celesteria
Posts: 36
Joined: Mon Jun 01, 2015 7:44 am

Re: showing tag in RoMBot output

#3 Post by Celesteria » Thu Jun 04, 2015 2:05 pm

using the language-files means that there ist a carriage return in the language[6] and language[13] and the output of my solution doesnt look nice. the correct way to implement it could be this:

Code: Select all

-- language/deutsch.lua (and in all other language-files) --
language = {
...
  [6] = "Wir gehen zum Wegpunkt #%d, (%d, %d) %s\n",
...
  [13] = "Wir gehen zum R\129ckkehrpfad-Wegpunkt #%d, (%d, %d) %s\n",
...
}
and

Code: Select all

-- bot.lua --
-- change line 947 to 955 to --
if( player.Returning ) then
  wp = __RPL:getNextWaypoint();
  wpnum = __RPL.CurrentWaypoint;
  wptag = (wp.Tag~='' and ' tag: '..wp.Tag or '')
  cprintf(cli.green, language[13], wpnum, wp.X, wp.Z, wptag);	-- Moving to returnpath waypoint
else
  wp = __WPL:getNextWaypoint();
  wpnum = __WPL.CurrentWaypoint;
  wptag = (wp.Tag~='' and ' tag: '..wp.Tag or '')
  cprintf(cli.green, language[6], wpnum, wp.X, wp.Z, wptag);	-- Moving to waypoint
end
if I use update to get a new version of your files then it merges your changes with my changes correctly? I never used SVN before together with other developers this way, so I wasn't sure :)
I am a botter, but no cheater. So none of my scripts ever use any of the hacks like swimhack, speedhack, wallhack...
I hope you can understand my english. Its not my native language and it has been a long time since I used it the last time :)

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

Re: showing tag in RoMBot output

#4 Post by rock5 » Fri Jun 05, 2015 1:11 am

I see what you mean. It just has to be added to each language file. It can't be helped. I've change it to reflect these changes.
Celesteria wrote:if I use update to get a new version of your files then it merges your changes with my changes correctly? I never used SVN before together with other developers this way, so I wasn't sure
That's the way TortoiseSVN works, it doesn't download and install the new version, it downloads the changes and merges the changes with your copy. Therefore if you have done some personal changes then they remain. If you ever want to see what changes you made in the past then you can right click the file or folder and select "TortoiseDVN/Check for modifications".
  • 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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests