/trunk
$landFlyingMount[130092]=3;//Red Flying Cloud |
$landFlyingMount[121838]=3;//Ruby Panther |
$landFlyingMount[121836]=3;//Sapphire Panther |
$landFlyingMount[134359]=3;//Sky Golem |
foreach($URLs as $URL => $type){ |
$page = file_get_contents($URL); |
end |
function MountRandomMount:Flying(druid) |
--get breath status |
local timer, initial, maxvalue, scale = GetMirrorTimerInfo(2) |
if timer == "BREATH" and scale == -1 then |
return false |
end |
if druid then |
if GetShapeshiftFormID() == 27 then |
return true |
## Title: MountRandomMount |
## Notes: Random mount addon. |
## Author: Dardack, Tomate |
## Version: 5.4 |
## Version: 5.4b |
## SavedVariables: MountRandomMount_MountDataList, MountRandomMount_MountDataListVersion |
## SavedVariablesPerCharacter: MountRandomMount_SavedTable |
## X-Embeds: Ace3 |
local optionTable = {} |
local allmounts = {} |
local allMountsOrder = {} |
local mountcount = GetNumCompanions("MOUNT") |
local EnableMounts = {} |
local sources, mounts, k, v, j |
j = 1 |
for sources, mounts in pairs(MountRandomMount_MountDataList["ground"]) do |
local optionTableMount = {} |
table.foreach(mounts, function(k,v) |
} |
table.insert(allMountsOrder, spellName..v) |
allmounts[spellName..v] = optionTableMount[spellName..v] |
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['ground']) do |
if vSaved == v then |
EnableMounts[spellName..v] = optionTableMount[spellName..v] |
end |
end |
else |
--print('The mount '..v..' does not exist') |
end |
if i ~= 0 then |
optionTable[sources] = { |
name = L[sources], |
order = j, |
order = 2, |
type = "group", |
handler = MountRandomMount, |
childGroups = "tab", |
optionTable['All'] = { |
name = L['All'], |
order = 0, |
order = 1, |
type = "group", |
handler = MountRandomMount, |
childGroups = "tab", |
args = allmounts |
} |
optionTable['Enabled'] = { |
name = L['Enabled'], |
desc = L['This panel is only updated when you reload the UI or at loggin.'], |
order = 0, |
type = "group", |
handler = _G['MountRandomMount'], |
childGroups = "tab", |
args = EnableMounts |
} |
return { |
name = L["Ground Mount"], |
handler = MountRandomMount, |
local optionTable = {} |
local allmounts = {} |
local allMountsOrder = {} |
local sources, mounts, k, v, j |
j = 1 |
local EnableMounts = {} |
local sources, mounts, k, v, j, i |
for sources, mounts in pairs(MountRandomMount_MountDataList["flying"]) do |
local optionTableMount = {} |
table.foreach(mounts, function(k,v) |
name = spellName, |
type = "toggle", |
hidden = function() |
if playerMountArray[v] == nil then |
if _G['playerMountArray'][v] == nil then |
return true |
else |
return false |
end, |
set = function(info,val) |
local insert = true |
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['flying']) do |
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do |
if vSaved == v then |
print(spellName.." "..L['MRMFlyingRemoved']) |
table.remove(MountRandomMount_SavedTable['flying'], iSaved) |
table.remove(_G['MountRandomMount_SavedTable']['flying'], iSaved) |
insert = false |
break |
end |
end |
if insert then |
print(spellName.." "..L['MRMFlyingAdded']) |
table.insert(MountRandomMount_SavedTable['flying'], v) |
table.insert(_G['MountRandomMount_SavedTable']['flying'], v) |
end |
end, |
get = function(info) |
for iSaved, vSaved in pairs(MountRandomMount_SavedTable['flying']) do |
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do |
if vSaved == v then |
return true |
end |
} |
table.insert(allMountsOrder, spellName..v) |
allmounts[spellName..v] = optionTableMount[spellName..v] |
for iSaved, vSaved in pairs(_G['MountRandomMount_SavedTable']['flying']) do |
if vSaved == v then |
EnableMounts[spellName..v] = optionTableMount[spellName..v] |
end |
end |
else |
--print('The mount '..v..' does not exist') |
end |
if i ~= 0 then |
optionTable[sources] = { |
name = L[sources], |
order = j, |
order = 2, |
type = "group", |
handler = MountRandomMount, |
handler = _G['MountRandomMount'], |
childGroups = "tab", |
args = optionTableMount |
} |
optionTable['All'] = { |
name = L['All'], |
order = 0, |
order = 1, |
type = "group", |
handler = MountRandomMount, |
handler = _G['MountRandomMount'], |
childGroups = "tab", |
args = allmounts |
} |
optionTable['Enabled'] = { |
name = L['Enabled'], |
desc = L['This panel is only updated when you reload the UI or at loggin.'], |
order = 0, |
type = "group", |
handler = _G['MountRandomMount'], |
childGroups = "tab", |
args = EnableMounts |
} |
return { |
name = L["Flying Mount"], |
handler = MountRandomMount, |
handler = _G['MountRandomMount'], |
type = "group", |
args = optionTable |
} |
playerMountArray[creatureSpellID] = creatureName |
end |
_G['MountRandomMount_SeaTurtleHave'] = true |
if playerMountArray[98718] ~= nil then |
_G['MountRandomMount_SeaTurtleID'] = 98718 |
_G['MountRandomMount_SeaTurtleHave'] = true |
elseif playerMountArray[75207] ~= nil then |
_G['MountRandomMount_SeaTurtleID'] = 75207 |
_G['MountRandomMount_SeaTurtleHave'] = true |
elseif playerMountArray[64731] ~= nil then |
_G['MountRandomMount_SeaTurtleID'] = 64731 |
else |
_G['MountRandomMount_SeaTurtleHave'] = false |
end |
if playerMountArray[98718] ~= nil then |
if playerMountArray[75207] ~= nil then |
_G['MountRandomMount_SeaHorseID'] = 98718 |
_G['MountRandomMount_SeaHorseHave'] = true |
elseif MountRandomMount_SeaTurtleHave then |
_G['MountRandomMount_SeaHorseID'] = MountRandomMount_SeaTurtleID |
_G['MountRandomMount_SeaHorseHave'] = true |
else |
_G['MountRandomMount_SeaHorseHave'] = false |
end |
function MountRandomMount:MountDataListFill() |
if ((MountRandomMount_MountDataList == nil) or (MountRandomMount_MountDataListVersion ~= "5.4.0")) then |
MountRandomMount_MountDataListVersion = "5.4.0"; |
if ((MountRandomMount_MountDataList == nil) or (MountRandomMount_MountDataListVersion ~= "5.4.1")) then |
MountRandomMount_MountDataListVersion = "5.4.1"; |
MountRandomMount_MountDataList= { |
["flying"] = { |
["source-achv"] = { |
75596, --Frosty Flying Carpet |
120043, --Jeweled Onyx Panther |
61309, --Magnificent Flying Carpet |
134359, --Sky Golem |
60424, --Mekgineer's Chopper |
44151, --Turbo-Charged Flying Machine |
92155, --Ultramarine Qiraji Battle Tank |
L['source-tcg'] = "Trading-Card-Game" |
L['source-vendor'] = "Venders" |
L["Flying Mount"] = "Flying Mount" |
L["Ground Mount"] = "Ground Mount" |
L['source-tcg'] = "Trading-Card-Game" |
L['source-vendor'] = "Venders" |
L["Flying Mount"] = "Flying Mount" |
L["Ground Mount"] = "Ground Mount" |
L['source-tcg'] = "Trading-Card-Game" |
L['source-vendor'] = "Venders" |
L["Flying Mount"] = "Flying Mount" |
L["Ground Mount"] = "Ground Mount" |
L['source-event'] = "Ev\195\169nement" |
L['source-faction'] = "Faction" |
L['source-none'] = "Inobtenable" |
L['source-other'] = "Ature" |
L['source-other'] = "Autre" |
L['source-prof'] = "Profession" |
L['source-promo'] = "Promotionel" |
L['source-quest'] = "Qu\195\170tes" |
L['source-tcg'] = "Trading-Card-Game" |
L['source-vendor'] = "Vendeur" |
L["Flying Mount"] = "Monture volante" |
L["Ground Mount"] = "Monture terrestre" |
L['source-tcg'] = "Trading-Card-Game" |
L['source-vendor'] = "Venders" |
L["Flying Mount"] = "Flying Mount" |
L["Ground Mount"] = "Ground Mount" |