Page 2 of 2
Re: changing profile option, friend and mob
Posted: Wed Sep 18, 2013 3:33 am
by rock5
I can't stand to see repetition and there is a lot of it in this file. So I decided to trim it down a bit. Of course I can't but help do a few other tweaks as well.
The changes I included:
- - Reducing repetition
- Fixed the 'reset' option. You have to use table.copy() otherwise changes to one table affect the other.
- The old mob and friend list are only valid if a new profile isn't loaded. It now resets the old lists if it detects if a new profile has been loaded.
- Allow 'list' to be used as the 'second' argument. Actually both 'list' and 'reset' can be used as either the 2nd or 3rd argument.
- Using Id numbers as either strings or numbers, eg. "123456" and 123456, are seen as the same thing.
- Changed the order of some of the checks.
I don't know why I updated this. I never use this function myself.
Anyway, see what you think.
Re: changing profile option, friend and mob
Posted: Wed Sep 18, 2013 11:57 am
by wps
rock5 wrote:
I don't know why I updated this. I never use this function myself.
The programmer's enthusiasm !
The desire to make the world better!
TY, Rock.
I didn't use this, either.
I don't change profile in waypoint frequently.
Re: changing profile option, friend and mob
Posted: Wed Sep 18, 2013 1:52 pm
by rock5
Well I never changed the friends list from a waypoint file. I'd just add names in the profile.
I sometimes used the mobs list but I would just create the table per waypoint as needed. Eg.
Code: Select all
settings.profile.mobs={"Boar","Bear"}
Re: changing profile option, friend and mob
Posted: Wed Sep 18, 2013 2:48 pm
by Bill D Cat
I've just completed a set of three waypoint files that do an entire run-through of the Elven Island quests. The first file does all quests inside the Valley of Preparation, the second goes outside and does everything up to the first bridge past the Spore Grove, and the last completes the zone with the Sabinean Cave quests and transports the player to Varanas at the end.
Having this userfunction allowed me to change my targets at multiple points during the waypoint file without having to create a separate file each time I needed a new target group. I will release them here once I'm satisfied that all quests are being completed successfully each time the files are used. I just have to fine tune a couple of quests in the Sabinean Cave area and it should be done.
Re: changing profile option, friend and mob
Posted: Wed Jun 03, 2015 3:33 am
by Celesteria
hello there,
i wrote two wrapper functions to make it easier handling a list of mobs and friends. code based on code version 1.31 from rock5 (or Bill D Cat?) and is used unchanged.
Code: Select all
-- new in version 1.32:
--
-- examples changeOptionFriends ('add', 'player1')
-- -> same as:
-- changeOptionFriendMob ('friend', 'player1', 'add')
--
-- examples changeOptionFriends ('add', {'player1', 'player2', mobID})
-- -> same as:
-- changeOptionFriendMob ('friend', 'player1', 'add')
-- changeOptionFriendMob ('friend', 'player2', 'add')
-- changeOptionFriendMob ('friend', mobID, 'add')
--
-- examples changeOptionMobs ('remove', {'mobname', mobID})
-- -> same as:
-- changeOptionFriendMob ('mob', 'mobname', 'remove')
-- changeOptionFriendMob ('mob', mobID, 'remove')
--
-- examples changeOptionMobs ('list')
-- examples changeOptionFriends ('reset')
--
-- second parameter can be a single name/id or a table of names/ids
hope someone need it

Celesteria