Just posting a link to the greedy tsp implementation I mentioned on IRC. If you have it return visited in addition to visit, you can "unvisit" a graph node.
Hm I like the arrow colouring one, that's easily implementable. As for different types of arrows, have a look at the blp file in the graphics folder, and if you can duplicate that with a different style I'll add it in as an option.
As for waterfall/etc it's not really the static options that are a problem in displaying at the moment, but the dynamic ones. The method of using must be lightweight, easy to use and not clutter up the screen with large detailed frames. You're already running around at full speed, you don't want any big screens getting in your way.
Another possible feature would is when you type /tloc without any arguments it will either create one for your location (rather than with here) but if the map is open and the mouse is over it, then make it at the location of the mouse.
Ok am writting a Fubar plugin that pops up a edit box and accepts input for cartographers waypoint modules...... got everything working except when I enter coordinates it does nadda??!!
Can one of you guys look at my code and tell me what I am doing wrong??
(edited in fixes 2/09/07)
Code start>>>>>>>>>>>>>>>>>>>>>>>>>
Cart_TLocFu = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceDB-2.0", "FuBarPlugin-2.0", "AceEvent-2.0");
local Tablet = AceLibrary("Tablet-2.0");
function Cart_TLocFu:OnTextUpdate()
if (self:IsTextShown()) then
self:ShowText();
self:SetText("Cart: WayPoints");
else
self:HideText();
end
end
function Cart_TLocFu:OnTooltipUpdate()
Tablet:SetHint("Usage: <search text> OR <0-100>,<0-100> [title] OR 'here' (sets a waypoint arrow at your current location)");
end
function Cart_TLocFu:OnClick()
if IsShiftKeyDown() then
Cartographer_Waypoints:SetNoteAsWaypoint()
else
Cart_TLocFu_Toggle();
end
end
function Cart_TLocFu1_Submit()
msg = Cart_TLocFu1FrameEdit:GetText();
-- Cartographer_Waypoints:SetNoteAsWaypoint(TLocZone, msg, "", TLoc)
waypointCommand(msg)
if (Cart_TLocFu1Frame:IsVisible() ) then
HideUIPanel(Cart_TLocFu1Frame);
Cart_TLocFu1FrameEdit:SetText("");
end
end
function Cart_TLocFu1_Clear()
Cartographer_Waypoints:SetNoteAsWaypoint()
if (Cart_TLocFu1Frame:IsVisible() ) then
HideUIPanel(Cart_TLocFu1Frame);
Cart_TLocFu1FrameEdit:SetText("");
end
end
function Cart_TLocFu_Toggle()
if(Cart_TLocFu1Frame:IsVisible()) then
HideUIPanel(Cart_TLocFu1Frame);
else
ShowUIPanel(Cart_TLocFu1Frame);
end
end
... purple for eh ... erm ... pointing to warlocks.
I'm a warlock, and I approve!
Wobin, if I had the time (stupid classes!) I'd work up an XML for you, but I'm thinking something like the nQuestLog frame, and zone name=path name, each quest would be a node, etc. That would let you set up multiple paths to store, and select one to use, and even a starting point (for those gathering loops)
Ok found my own fix, I tried to use the command handler but to no success, until I realized that the command handler was local, had to change a line in waypoints.lua line# 248, in order to make this all work, but now is working flawlessly. Keep in mind I am still very very new to all this, if someone has a better way of doing this I am all ears. (I also edited above the changes I made to get it working.)
Who do I talk to about removing the "local" from the cammand handler in waypoints.lua line# 248 so I can release this fubarplugin for people??
Maytrix? You may want to look at the code I just put into trunk. The API is completely different, as I'm using a method that doesn't involve making notes directly to allow for waypoints, but instead creates a waypoint object that stores the required information.
The arguments can take partial matches like "mort" for "Mortaxton" or full strings using "quotation marks" (but only if they contain spaces).
If you prepend 'add' to the arguements, it'll add the waypoint to the end of the queue. Otherwise it'll insert it at the front.
You can cancel individual waypoints by rightclicking on the waypoint arrow. You can send the current waypoint to the end of the queue also in that dropdown.
I'm not actually sure if the coordinate entry works perfectly yet, but everything else pretty much does.
Guildmember waypoints will only work if the guild member has Cart_GuildPositions installed. It'll complain otherwise saying they can't be found.
hm, I think that's it so far. I'll add a corpse one next, and then figure out more on a more gui approach
Oh and Rabbit wanted a auto herbchain option, so that's coming too.
Grabbing latest version off Trunk, PartyPoint.lua is looking for Gratuity-2.0 and the library doesn't appear to be in external libs.
yep, r27792, error upon load:
[2007/02/11 17:49:34-417-x1]: ...s\Cartographer\Cartographer_Waypoints\PartyPoint.lua:5: Cannot find a library instance of Gratuity-2.0.:
FuBar-25921\libs\AceLibrary\AceLibrary.lua:422: in function `AceLibrary'
...s\Cartographer\Cartographer_Waypoints\PartyPoint.lua:5: in main chunk:
---
===============
also, trying to set mark as waypoint causes this:
[2007/02/11 17:56:29-418-x3]: Cartographer-r27792\Cartographer_Notes\Notes.lua:2133: attempt to call method 'SetNoteAsWaypoint' (a nil value)
Dewdrop-2.0-27511 (BugSack):483: in function <...face\AddOns\BugSack\Libs\Dewdrop-2.0\Dewdrop-2.0.lua:424>
---
2007/02/11 18:42:51-422-x1]: ...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:408: attempt to compare number with string:
...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:454: in function `value':
Interface\FrameXML\ChatFrame.lua:3094: in function <Interface\FrameXML\ChatFrame.lua:3043>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:2821: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2842: in function `ChatEdit_OnEnterPressed':
<string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>
---
[2007/02/11 19:23:16-238-x1]: ...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:408: attempt to compare number with string:
...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:454: in function `value':
Interface\FrameXML\ChatFrame.lua:3094: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2821: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2842: in function `ChatEdit_OnEnterPressed':
<string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>
I still getting this when i try to set a waypoint:
[2007/02/11 19:24:14-1641-x1]: Cartographer-r27809\Cartographer_Notes\Notes.lua:2133: attempt to call method 'SetNoteAsWaypoint' (a nil value)
Dewdrop-2.0-27511 (FuBar):483: in function <...erface\AddOns\FuBar\libs\Dewdrop-2.0\Dewdrop-2.0.lua:424>
[2007/02/11 19:33:46-139-x2]: Cartographer-r27809\Cartographer_Notes\Notes.lua:2133: attempt to call method 'SetNoteAsWaypoint' (a nil value)
Dewdrop-2.0-27511 (ag_UnitFrames):483: in function <...ddOns\ag_UnitFrames\libs\Dewdrop-2.0\Dewdrop-2.0.lua:424>
and this one
[2007/02/11 19:34:38-139-x8]: ...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:419: attempt to compare number with string:
...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:465: in function `value':
Interface\FrameXML\ChatFrame.lua:3094: in function <Interface\FrameXML\ChatFrame.lua:3043>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:2821: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2842: in function `ChatEdit_OnEnterPressed':
<string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>
[2007/02/11 19:33:46-139-x2]: Cartographer-r27809\Cartographer_Notes\Notes.lua:2133: attempt to call method 'SetNoteAsWaypoint' (a nil value)
Dewdrop-2.0-27511 (ag_UnitFrames):483: in function <...ddOns\ag_UnitFrames\libs\Dewdrop-2.0\Dewdrop-2.0.lua:424>
and this one
[2007/02/11 19:34:38-139-x8]: ...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:419: attempt to compare number with string:
...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:465: in function `value':
Interface\FrameXML\ChatFrame.lua:3094: in function <Interface\FrameXML\ChatFrame.lua:3043>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:2821: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2842: in function `ChatEdit_OnEnterPressed':
<string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm not sure, would it be easy to create arrow-style options?
/cheer ;)
http://ace.pastey.net/6073
If you're interested in pathfinding, I'm working on implementing A* (an informed breadth-first search) in lua.
As for waterfall/etc it's not really the static options that are a problem in displaying at the moment, but the dynamic ones. The method of using must be lightweight, easy to use and not clutter up the screen with large detailed frames. You're already running around at full speed, you don't want any big screens getting in your way.
Elyknosrac
In the original /waypoints, I added in a 'here' for a here'able waypoint (don't know if it's still there =P) but the mousepointer one is a good idea.
Maybe the ability to send waypoints to other cart users.... ie "Hey, come stand 'here'"....
Tha'd be awesome!
Can one of you guys look at my code and tell me what I am doing wrong??
(edited in fixes 2/09/07)
Code start>>>>>>>>>>>>>>>>>>>>>>>>>
Cart_TLocFu = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceDB-2.0", "FuBarPlugin-2.0", "AceEvent-2.0");
local Tablet = AceLibrary("Tablet-2.0");
Cart_TLocFu:RegisterDB("CARTTLocFuDB");
Cart_TLocFu.hasIcon = true;
Cart_TLocFu.defaultPosition = "RIGHT";
local optionsTable = {
handler = Cart_TLocFu,
type = "group",
args = {};
};
function Cart_TLocFu:OnEnable()
if not Cartographer_Waypoints or not Cartographer_Notes then
Cartographer:ToggleModuleActive(self, false)
end
end
Cart_TLocFu:RegisterChatCommand({ "/cartloc" }, optionsTable);
Cart_TLocFu.OnMenuRequest = optionsTable;
function Cart_TLocFu:OnTextUpdate()
if (self:IsTextShown()) then
self:ShowText();
self:SetText("Cart: WayPoints");
else
self:HideText();
end
end
function Cart_TLocFu:OnTooltipUpdate()
Tablet:SetHint("Usage: <search text> OR <0-100>,<0-100> [title] OR 'here' (sets a waypoint arrow at your current location)");
end
function Cart_TLocFu:OnClick()
if IsShiftKeyDown() then
Cartographer_Waypoints:SetNoteAsWaypoint()
else
Cart_TLocFu_Toggle();
end
end
function Cart_TLocFu1_Submit()
msg = Cart_TLocFu1FrameEdit:GetText();
-- Cartographer_Waypoints:SetNoteAsWaypoint(TLocZone, msg, "", TLoc)
waypointCommand(msg)
if (Cart_TLocFu1Frame:IsVisible() ) then
HideUIPanel(Cart_TLocFu1Frame);
Cart_TLocFu1FrameEdit:SetText("");
end
end
function Cart_TLocFu1_Clear()
Cartographer_Waypoints:SetNoteAsWaypoint()
if (Cart_TLocFu1Frame:IsVisible() ) then
HideUIPanel(Cart_TLocFu1Frame);
Cart_TLocFu1FrameEdit:SetText("");
end
end
function Cart_TLocFu_Toggle()
if(Cart_TLocFu1Frame:IsVisible()) then
HideUIPanel(Cart_TLocFu1Frame);
else
ShowUIPanel(Cart_TLocFu1Frame);
end
end
Code End>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I'm a warlock, and I approve!
Wobin, if I had the time (stupid classes!) I'd work up an XML for you, but I'm thinking something like the nQuestLog frame, and zone name=path name, each quest would be a node, etc. That would let you set up multiple paths to store, and select one to use, and even a starting point (for those gathering loops)
Who do I talk to about removing the "local" from the cammand handler in waypoints.lua line# 248 so I can release this fubarplugin for people??
Maytrix? You may want to look at the code I just put into trunk. The API is completely different, as I'm using a method that doesn't involve making notes directly to allow for waypoints, but instead creates a waypoint object that stores the required information.
/way help - lists the commands
/way [add] [<1-100>,<1-100> [title]] [notesearch] [p-<partymembername>] [g-<Guildmembername>]
/wayq - Lists your current queue of waypoints
/noway - Clears your waypoint queue completely.
The arguments can take partial matches like "mort" for "Mortaxton" or full strings using "quotation marks" (but only if they contain spaces).
If you prepend 'add' to the arguements, it'll add the waypoint to the end of the queue. Otherwise it'll insert it at the front.
You can cancel individual waypoints by rightclicking on the waypoint arrow. You can send the current waypoint to the end of the queue also in that dropdown.
I'm not actually sure if the coordinate entry works perfectly yet, but everything else pretty much does.
Guildmember waypoints will only work if the guild member has Cart_GuildPositions installed. It'll complain otherwise saying they can't be found.
hm, I think that's it so far. I'll add a corpse one next, and then figure out more on a more gui approach
Oh and Rabbit wanted a auto herbchain option, so that's coming too.
yep, r27792, error upon load:
===============
also, trying to set mark as waypoint causes this:
[2007/02/11 19:23:16-238-x1]: ...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:408: attempt to compare number with string:
...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:454: in function `value':
Interface\FrameXML\ChatFrame.lua:3094: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2821: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2842: in function `ChatEdit_OnEnterPressed':
<string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>
[2007/02/11 19:24:14-1641-x1]: Cartographer-r27809\Cartographer_Notes\Notes.lua:2133: attempt to call method 'SetNoteAsWaypoint' (a nil value)
Dewdrop-2.0-27511 (FuBar):483: in function <...erface\AddOns\FuBar\libs\Dewdrop-2.0\Dewdrop-2.0.lua:424>
[2007/02/11 19:33:46-139-x2]: Cartographer-r27809\Cartographer_Notes\Notes.lua:2133: attempt to call method 'SetNoteAsWaypoint' (a nil value)
Dewdrop-2.0-27511 (ag_UnitFrames):483: in function <...ddOns\ag_UnitFrames\libs\Dewdrop-2.0\Dewdrop-2.0.lua:424>
and this one
[2007/02/11 19:34:38-139-x8]: ...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:419: attempt to compare number with string:
...ns\Cartographer\Cartographer_Waypoints\Waypoints.lua:465: in function `value':
Interface\FrameXML\ChatFrame.lua:3094: in function <Interface\FrameXML\ChatFrame.lua:3043>:
<in C code>: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:2821: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2842: in function `ChatEdit_OnEnterPressed':
<string>:"ChatFrameEditBox:OnEnterPressed":2: in function <[string "ChatFrameEditBox:OnEnterPressed"]:1>