Temp Friend

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
richi
Posts: 8
Joined: Tue Jan 24, 2012 1:30 pm

Temp Friend

#1 Post by richi » Thu Feb 09, 2012 11:25 am

Can somebody tell me why

Code: Select all

<!-- # 1 --><waypoint x="-27897" z="32817" y="-279">
table.insert(settings.profile.options.friends, "namehere");
</waypoint>
don't work ?
There come : [string "..."]:2: bad argument #1 to 'insert' <table expected, got nil>

kkulesza
Posts: 150
Joined: Fri May 27, 2011 9:00 pm
Location: Poland

Re: Temp Friend

#2 Post by kkulesza » Thu Feb 09, 2012 11:51 am

should be:

Code: Select all

settings.profile.friends

richi
Posts: 8
Joined: Tue Jan 24, 2012 1:30 pm

Re: Temp Friend

#3 Post by richi » Thu Feb 09, 2012 12:26 pm

What's wrong with

Code: Select all

<!-- #  2 --><waypoint x="-26084" z="33576" y="-145">	
settings.profile.friends["namehere"] = nil;
</waypoint>
?
It should reverse the first code but it also don't work

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

Re: Temp Friend

#4 Post by rock5 » Thu Feb 09, 2012 1:19 pm

Actually no.

Code: Select all

table.insert(settings.profile.friends, "namehere");
Inserts it with a number. eg.

Code: Select all

settings.profile.friends[num] = "namehere"
You would have to first search for the value before you could delete it.

To save you the trouble, Lisa wrote a userfunction to do something like that. I think it was called changeOptionFriendMob. Do a search.
  • 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

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Temp Friend

#5 Post by kuripot » Thu Feb 09, 2012 5:42 pm

not sure but you can try

Code: Select all

settings.profile.friends = {"Name of Mobs","Name of Mobs"}
and also put in your userfunction folder
Attachments
userfunction_profilechange.lua
and also put in your userfunction folder
(1.42 KiB) Downloaded 147 times

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Temp Friend

#6 Post by lisa » Thu Feb 09, 2012 8:02 pm

richi wrote:settings.profile.friends["namehere"] = nil;
The table is a numbered system

1 = "name"
2 = "namelol"
3 = "namers"

So as rock said you would need to do

Code: Select all

settings.profile.friends[num] = "namehere"
if you want no names in the table.

Code: Select all

settings.profile.friends = {}
which creates a blank table.

This is a simple little userfunction I made a while back.
userfunction_profilechange.lua
(1.39 KiB) Downloaded 179 times
Usage is like this

Code: Select all

changeOptionFriendMob("mob", "Wolf", "Add")
changeOptionFriendMob("friend", "Hokeypokey", "Remove")
So state
friend or mob
name
add or remove

default is to add, so if 3rd arg is nil then it will add.
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

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

Re: Temp Friend

#7 Post by rock5 » Fri Feb 10, 2012 12:56 am

Lisa I noticed your function still doesn't check if the name already exists. So if continuously reloading the file, you will end up with multiple entries of the same name.
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Temp Friend

#8 Post by lisa » Fri Feb 10, 2012 2:29 am

yeah I haven't changed this since I made so very very long ago.

I don't even use it anymore anyway, I used to use it for KS when I would fly over the first boss. so add it to friends to make sure not to attack it while flying over it.
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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 0 guests