What is Userfunction any guides to making them?

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
User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

What is Userfunction any guides to making them?

#1 Post by beanybabe » Fri Jan 22, 2016 1:34 am

I have used them and got kind of idea of what they are for but I do not see any info on making them in the wiki.
Another question is how can we avoid using function names that are used in others user-functions.

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: What is Userfunction any guides to making them?

#2 Post by noobbotter » Fri Jan 22, 2016 8:09 am

Userfunction are common functions that you would want available in multiple scripts. Kind of like the travelTo userfunction. It's nice to be able to use it in multiple different waypoint scripts instead of having to type all of that function inside each waypoint script.

One way to avoid using common function names is to use a naming scheme. For instance suppose you're making a Wailing Fjord TP Farming script. You could name all your functions starting with WFTPF_<name>(). doing something like this won't guarantee that it won't conflict with a userfunction function name, but it drastically reduces the chances of a conflict. That's even something I don't always do but probably should.

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: What is Userfunction any guides to making them?

#3 Post by beanybabe » Fri Jan 22, 2016 3:53 pm

Thanks, I asked because of one old function was causing mm pop up a message about running code to early.

I find reusing same bits of code in my daily's and vendor interactions is leading to some problems as updates are included in some, but missed in others. User-function is an easy solution it seems.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests