Userfunction - addon_attackspeedzero
Posted: Sat Apr 27, 2013 1:19 pm
I thought I would share the compilation of user functions that I'm building. Most of these are to make coding faster and easier, and some are quite helpful for code readability. Put this file into /userfunctions/ folder.
New/modified functions in bold.
v1.1 changes:
New/modified functions in bold.
v1.1 changes:
- Rewrite function sort_daily_log(folder) to sort_log(folder,_breakafterlines)
- Add function fast_targetNPC(npcname)
- Lua file/table manipulation functions from this thread: http://www.solarstrike.net/phpBB3/viewt ... =27&t=4768
- comma_value(n)
- From a log file by lisa (sorry, forgot which thread)
- Will commify a number greater than 999
- cprintn(color,string)
- Ends a colored console print line with "\n" because I got tired of adding this to every cprintf()
- goto_wp(waypointTag)
- More "English" and readable, replaces "__WPL:setWaypointIndex(__WPL:findWaypointTag(waypointTag))"
- reload_wp_file()
- More "English" and readable, replaces "loadPaths(__WPL:getFileName())"
- kill_stupid_newbie_pet()
- From my version of ElfDaily
- Check vicinity for newbie pet, use newbie pet egg to unsummon, then delete newbie pet egg from inventory
- save_daily_log(folder)
- From my version of ElfDaily
- Save info into log file for character name and daily token count
- sort_log(folder,_breakafterlines)
- Inspired by my version of ElfDaily
- Sort the info in log file alphabetically
- _breakafterlines argument (optional) insert a blank line after this number of rows in the sorted file
- take_snoop(snoopname,destination,_colon,_next)
- If standing next to snoop or ailic's aide, will pay to travel to the destination.
- destination argument example: "Jinners Camp"
- _colon argument (optional) - set this to 1 for cases where the option text is "Transport to: " instead of "Transport to "
- _next argument (optional) - set this to 1 for cases where there's more than one page of destinations
- set_options(options,optionDescriptions)
- Idea came from DoD script by Solembum05
- Allow players to choose options during runtime instead of having to hardcode everything
- quest_check(quest,questCompleteWaypoint,_questWaypoint)
- From my version of Sea of Snow Package
- Allow for keeping waypoints in a loop until quest complete
- questCompleteWaypoint argument - choose waypoint to go to after quest is completed
- _questWaypoint argument (optional) - will recycle a section of waypoints
- quest_skip_if_complete(quest,nextWaypoint)
- From my version of Sea of Snow Package
- Skip to "nextWaypoint" if the quest is already completed
- fast_targetNPC(npcname)
- Target NPC without all the yrests found in player:target_NPC()
- Built for speed, especially with EoJ farming in mind