Adding statement to waypoint file won't work
Posted: Mon Feb 01, 2010 9:58 pm
I can't figure out what part isn't working. I know it has something to do with what parts of lua work in the xml files but I can't figure out which part isn't working. It's a standard conditional statement where it checks if you have a quest weapon. I figured it could be added for chains later so I'd work it in now.
Where I added to my personal addon:
The first code section is added to a waypoint's code and the second is to my personal addon (I know, I repeated that). Any help would be much appreciated, thanks in advance.
ADDED NOTE: Still working on methods of targeting the mailbox. What I've found is there is a function called OBB_ChangeTraget (no it's not spelt wrong). This function works off of target ID's but it looks like they removed the code that will pull the target ID's for you. Also I'm not sure if targeting by ID will help but I am sure the SpeakFrame commands work with the mailbox.
Code: Select all
local stupidweapon = string.find(sendMacro("mainweaponName();"), "Mayor", 1, true);
if ( player.Level > 4 and stupidweapon == nil ) then
printf("We shall find holy grenade!");
loadPaths("getlvl5weapon");
else
printf("With this grenade we shall blast our enemies to smitherines.")
end
Where I added to my personal addon:
Code: Select all
function mainweaponName()
local name, _1, icon, _2, rank, _3, tp_to_upgrade, energy_type, usable = GetSkillDetail(_tab,_slot);
if (name == nil) then
DEFAULT_CHAT_FRAME:AddMessage("ERROR - Mainhand weapon not found.");
else
return name;
end
end
ADDED NOTE: Still working on methods of targeting the mailbox. What I've found is there is a function called OBB_ChangeTraget (no it's not spelt wrong). This function works off of target ID's but it looks like they removed the code that will pull the target ID's for you. Also I'm not sure if targeting by ID will help but I am sure the SpeakFrame commands work with the mailbox.