Documentation?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Documentation?

#1 Post by kanta »

Besides the wiki is there any in depth documentation for RoMBot functions? The wiki isn't very user friendly, I have difficulty finding information I need on it. There's so many things I just run across by reading various posts, or when I post and get help (much thanks to Rock5 and Lisa). Take for example what happened today. I was looking for some way to check for distance to targets so I could make my waypoint files a little better. I did a forum search (which I actually use Google to do my forum searches with "site:solarstrike.net +<term(s)>") and came across a post by Lisa where she mentions adding pullonly="true" to a skill in the skills.xml. Or previously I was trying to figure out how to stop my character from casting certain buffs while I was mounted and was advised to use autouse="false" in the skills.xml. I'm sure if I knew coding better I could look through the base coding and find these on my own, but I look at that coding and promptly get a headache :oops: . But for today's problem, I ran across he solution by accident. I started up getid to get a mob id for targeting with snipe and I now see that it shows distance to the mob also. So now I have an accurate way to see how far mobs are besides my old method of "put a bunch of different range skills on the bar and creep closer till I'm at the range I want to be at when the skill lights up". :roll:

Paint me as a noobie but a lot of the examples on the wiki don't really help me understand any better. Take for instance:

Code: Select all

-- Create a base class with constructor
baseclass = class(function (a,number) a.number = number printf("Num set\n"); end);
function baseclass:testing()
  printf("This is a test.\n");
end
 
-- Inherit from it
child1 = class(baseclass);
 
-- Polymorphism...
child2 = class(baseclass);
function child2:testing()
  printf("This is a test (from child2).\n");
end
 
-- Constructors + Polymorphism (remember, inheriting from baseclass)
child3 = baseclass(120);
function child3:testing()
  printf("Child 3\'s number is %d.\n", self.number);
end
Polywhatsism? Num set? I'm sure this all makes sense to those familiar with programming, but it leaves the common user in the dark. Maybe posting snippets from coding in waypoint/userfunction files by the advanced users and explaining what it does would help many of us. I started doing such a thing on the rompros site as I've been learning (kinda proud of the fact that they "stickied" it). I'm not saying to post full waypoint files to the public, but useful things that everyone could use or modify for their own scripts.

Please don't think I'm ungrateful in any way. That's far from the truth. It just that I don't want to keep bugging you guys about things that may be simple or common knowledge to you and let you keep doing what you want to accomplish instead of answering my questions.
Scout/Knight/Rogue 70/66/66
User avatar
Administrator
Site Admin
Posts: 5344
Joined: Sat Jan 05, 2008 4:21 pm

Re: Documentation?

#2 Post by Administrator »

It is a pretty huge project, and much of it is not documented. The thing is, you're kind of dealing with many different things here. There can't possibly be full documentation for RoMBot, MicroMacro, and the Lua language (or just programming in general) all in one place; it would just be way too much information and cease to be useful as you would never be able to find what you need.

If you don't know what classes and polymorphism are, you can either do a Google search for just that or avoid the topic all-together. It will just lead to a lot of confusion over a pretty simple idea, really.
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Documentation?

#3 Post by kanta »

Mainly I'm just looking for simple code that isn't put up anywhere such as the skills.xml codes I showed as an example. Or things like "local LifeLeecher = player:findNearestNameOrId("Life Leecher")" or "local cooldown, remaining = RoMScript("GetSkillCooldown(4,1);")" that I only know about because Rock5 has told me about them.
Scout/Knight/Rogue 70/66/66
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Documentation?

#4 Post by lisa »

In a way I do agree with what you say but I also agree with admin, to have everything documented would actually be larger then a 500 page book and in the end would still be difficult to find what you are looking for.

I quite often find myself trying to remember some code and usually end up just doing a search through the bot files to find it. I did actually start a txt file a little while back and adding in code I thought was useful but I could see it getting very large and difficult to go back through and find what I was actually looking for.

Just as a direction any time you see RoMScript(" that means it is using an ingame function which has it's own wiki
http://www.theromwiki.com/List_of_Functions
I have slowly been updating the functions on there but there are so many it is going to take forever lol
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
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Documentation?

#5 Post by kanta »

I can understand what the both of you are saying. I'd imagine the list of commands and functions is fairly limitless. I was just thinking of some basic stuff that would get the amateur coders such as myself going and reduce our questions and requests to you guys. There's some on the wiki, but as you all know, I'm just a vault full of questions on the coding :P

I really am trying to learn as quickly as I can, but it's difficult when I don't even know the base functionality of the bot. Like targeting.

I was using

Code: Select all

      player:findTarget("Life Leecher");
      local target = player:getTarget();
      if(target.Name == "Life Leecher") then
Then found out that's the old version of targeting and I should be using the following code instead

Code: Select all

    local LifeLeecher = player:findNearestNameOrId("Life Leecher")
    if LifeLeecher then
since player:findTarget relies on the camera facing the target while the other code can target something even if it's out of the camera view.

Also, Lisa, I tried using the pullonly="true" code I saw you mention in another post in both skills.xml and my character profile (not in both at the same time of course). Neither worked. In skills.xml it would still try to use Snipe in the middle of battle, and in the profile it just wouldn't cast Snipe at all.
Scout/Knight/Rogue 70/66/66
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Documentation?

#6 Post by lisa »

hmmm just found this for pullonly in skill.lua
use only in pull phase (only for melees with ranged pull attacks)
No sure which post I mentioned it but yeah it seems I had the proper usage incorrect.

player:findTarget uses the in game key to find target, default is tab

player:findNearestNameOrId gets the information directly from memory and I believe the range is 250 yards in any direction, might be more.
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
kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Documentation?

#7 Post by kanta »

Yup, I found that information out (other than the pullonly) only after lots of questions here on the forum.
Scout/Knight/Rogue 70/66/66
Post Reply