-
Posted by yksrep on Tue, 12 Oct 2010 05:11:51
Hello
I have written code for a drop down menu. What I now what to do but I cant figger out how to is to send a command to TomTom when an option from the list is selected. I have tried a few ways such as sending the command to chat and printing the command, to no avail.
If anyone could help me I would very much appreciate it. Part of my code for the section I am using for the selection of the option is below.
-- Eastern Kingdoms [Zone] -- Eastern Kingdoms [Local] Alterac Mountains elseif (level == 3) and (UIDROPDOWNMENU_MENU_VALUE == "Alterac Mountains") then local info = UIDropDownMenu_CreateInfo() info.text = "Chillwind Point" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Corrahn's Dagger" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Crushridge Hold" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Dalaran Crater" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Dandred's Fold" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Gallows' Corner" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Gavin's Naze" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Growless Cave" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Lordamere Internment Camp" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Misty Shore" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Ruins of Alterac" UIDropDownMenu_AddButton(info, level) local info = UIDropDownMenu_CreateInfo() info.text = "Sofera's Naze" UIDropDownMenu_AddButton(info, level)
This code much repeats for each area that you need to explore for the explorer achievement.
-
Posted by yksrep on Tue, 12 Oct 2010 06:48:15
Ok I worked it out
-- Eastern Kingdoms [Zone] -- Eastern Kingdoms [Local] Alterac Mountains elseif (level == 3) and (UIDROPDOWNMENU_MENU_VALUE == "Alterac Mountains") then local info = UIDropDownMenu_CreateInfo() info.text = "Chillwind Point" TomTom:AddZWaypoint(0, 1, 80, 64, "Chillwind Point"); UIDropDownMenu_AddButton(info, level) --------------------------------------------------------------------- -- Works like this -- --TomTom:AddZWaypoint -- you gotta have that in to call it addon -- -- (0 -- The Continent 0 = Eastern Kingdoms -- -- 1 -- The Zone 1 = Alterac Mountains -- -- 80 -- The X co ord -- -- 64 -- The Y co ord -- -- "Chillwind Point"); -- The sting an the end -- ---------------------------------------------------------------------
if you where to type this into chat manually it would like like /way Alterac Mountains 80 64 Chillywind Point
you put in the Continent because it needs to know it -- Thats how i can best explain it.
-
Posted by jnwhiteh on Tue, 12 Oct 2010 08:24:34
Thanks for reporting back!