public static List <WoWMount> GetAllMounts() { if (CachedMounts.Count > 0) { return(CachedMounts); } var ret = new List <WoWMount>(); var numMounts = WoWScript.Execute <int>("GetNumCompanions(\"MOUNT\")", 0); for (int i = 1; i <= numMounts; i++) { var mountInfo = WoWScript.Execute("GetCompanionInfo(\"MOUNT\", " + i + ")"); if (mountInfo.Count > 5) // GetCompanionInfo should return 6 items { try { ret.Add(new WoWMount(i, mountInfo[1], int.Parse(mountInfo[2]), int.Parse(mountInfo[5]))); } catch { } } } CachedMounts = ret; return(ret); }
private static void ExecuteIngameListener() { const string command = "local frame = CreateFrame('Frame', 'evcFrame'); frame:RegisterAllEvents(); frame:SetScript('OnEvent', function(self, event, ...) GetBillingTimeRested(event, ...); end);"; WoWScript.ExecuteNoResults(command); }
public void StartAttack() { WoWScript.Execute("StartAttack()"); }
public void Dismount() { WoWScript.ExecuteNoResults("Dismount()"); }
public void StrafeRight() { WoWScript.ExecuteNoResults("StrafeRightStart()"); }
public void StopMoving() { WoWScript.ExecuteNoResults("AscendStop() DescendStop() MoveBackwardStop() MoveForwardStop() StrafeLeftStop() StrafeRightStop()"); }
public void MoveForward() { WoWScript.ExecuteNoResults("MoveForwardStart()"); }
public void Descend() { WoWScript.ExecuteNoResults("SitStandOrDescendStart()"); }
public void Jump() { WoWScript.ExecuteNoResults("JumpOrAscendStart()"); }
public static void CastSpell(int spellId, WoWObject target) { target.Select(); WoWScript.ExecuteNoResults("CastSpellByID(" + spellId + ")"); }
public void Mount() { WoWScript.ExecuteNoResults("CallCompanion(\"MOUNT\", " + CompanionId + ")"); }