I started with the XML-Tree parsing so that I / we can reuse some some code out of RomBot.
XML-tree parsing works like in the old except that the object is called 'parser' instead of 'xml' through name conflicts.
TODO: One bug I remember was that the syntax check is sometimes too sensitive I will take a look later and document the whole stuff
I took the most of waypointlist.lua and waypoint.lua and added a few things mostly tags.
-id
Code: Select all
<waypoint id="1" x="2508" z="4574" y="340" ">
</waypoint>
<waypoint id="2" x="2555" z="4580" y="340" ">
</waypoint>
- randomfollow
Code: Select all
<waypoint x="2508" z="4574" y="340" randomfollow="34,house,37">
</waypoint>
-map
Code: Select all
<waypoint x="2508" z="4574" y="340" map="128">
</waypoint>
I did a while ago in my version I added the _plain feature to CWaypointList:getNearestWaypoint(_x, _z, _y, _start, _end, _plain)
Which allow you to seek waypoint which are only on your level of hight some times the nearest waypoint is the one above or under your on a different level. I had that too often in SoK when I was bulled back .
TODO: Document it , make a decision about id , follow random graph?, check cli(not working)
What want todo next is stripping player.lua of all rom specific stuff and make it working with MM2 and than moving all magic numbers and optional setting into a player.settings.lua. Through this will be also a framework I think I will move every addresses access to a rule list in something like address.settings.lua, so that in player.lua are only function calls in it.
The hardest part is properly making the fight routine generic.