library Multiboard initializer ini
globals
multiboard array Multiboard
integer array Multistate
endglobals
private function update takes nothing returns nothing
local integer i = 0
local integer j
local integer idex
local integer idex2
local multiboarditem mi
local integer k
local string b
loop
exitwhen i > 9
if Multistate[i] == 0 then
set k = 0
loop
exitwhen k > 3
if k == 0 then
set b = "HP"
set idex = R2I(I2R(HP_Min[i])/I2R(HP_Max[i]) * 100.)
elseif k == 1 then
set b = "MP"
set idex = R2I(I2R(MP_Min[i])/I2R(MP_Max[i]) * 100.)
elseif k == 2 then
set b = "DG"
set idex = R2I(I2R(Defense_Gauge[i])/100. * 100.)
elseif k == 3 then
set b = "XP"
set idex = R2I(I2R(XP_Min[i])/I2R(XP_Max[i]) * 100.)
endif
set j = 0
loop
exitwhen j > 3
if idex >= 25 then
set idex = idex - 25
set idex2 = 25
else
if idex < 0 then
set idex = 0
endif
set idex2 = idex
set idex = 0
endif
if j == 0 or j == 3 then
set idex2 = R2I(I2R(idex2)/25. * 15.) + 1
else
set idex2 = R2I(I2R(idex2)/25. * 16.) + 1
endif
set mi = MultiboardGetItem(Multiboard[10*Multistate[i]+i], k, 2 + j)
if j == 0 then
call MultiboardSetItemIcon(mi, b + "Bar\\left" + I2S(idex2) + ".blp")
elseif j == 3 then
call MultiboardSetItemIcon(mi, b + "Bar\\right" + I2S(idex2) + ".blp")
else
call MultiboardSetItemIcon(mi, b + "Bar\\mid" + I2S(idex2) + ".blp")
endif
set j = j + 1
endloop
set k = k + 1
endloop
elseif Multistate[i] == 1 then
set j = 0
loop
exitwhen j > 17
set k = 0
loop
exitwhen k > 20
set mi = MultiboardGetItem(Multiboard[10*Multistate[i]+i], k, j)
if k >= 1 and k <= 9 then
if j == 2 then
if k == 1 then
call MultiboardSetItemValue(mi, ": " + Name[i])
elseif k == 2 then
call MultiboardSetItemValue(mi, ": " + Job[i])
elseif k == 3 then
call MultiboardSetItemValue(mi, ": " + Class[i])
elseif k == 4 then
call MultiboardSetItemValue(mi, ": " + I2S(Fame[i]))
elseif k == 5 then
call MultiboardSetItemValue(mi, ": " + Title[i])
elseif k == 6 then
call MultiboardSetItemValue(mi, ": " + I2S(Level[i]))
endif
elseif j == 4 then
if k == 1 then
call MultiboardSetItemValue(mi, ": " + I2S(HP_Min[i]) + "/" + I2S(HP_Max[i]))
elseif k == 2 then
call MultiboardSetItemValue(mi, ": " + I2S(MP_Min[i]) + "/" + I2S(MP_Max[i]))
elseif k == 3 then
call MultiboardSetItemValue(mi, ": " + I2S(Defense_Gauge[i]) + "/100")
elseif k == 4 then
call MultiboardSetItemValue(mi, ": " + I2S(XP_Min[i]) + "/" + I2S(XP_Max[i]))
elseif k == 5 then
call MultiboardSetItemValue(mi, ": " + I2S(Damage_Physic_Min[i]) + "-" + I2S(Damage_Physic_Max[i]))
elseif k == 6 then
call MultiboardSetItemValue(mi, ": " + I2S(Damage_Magic_Min[i]) + "-" + I2S(Damage_Magic_Max[i]))
elseif k == 7 then
call MultiboardSetItemValue(mi, ": " + I2S(R2I(Critical_Damage[i] * 100.)) + "%" )
elseif k == 8 then
call MultiboardSetItemValue(mi, ": " + I2S(Defense_Physic[i]))
elseif k == 9 then
call MultiboardSetItemValue(mi, ": " + I2S(Defense_Magic[i]))
endif
elseif j == 5 then
if k == 6 then
//Fire
call MultiboardSetItemValue(mi, I2S(Element_Fire[i]))
endif
elseif j == 6 then
if k == 1 then
call MultiboardSetItemValue(mi, ": " + R2SW(Accuracy[i], 3, 1))
elseif k == 2 then
call MultiboardSetItemValue(mi, ": " + R2SW(Critical[i], 3, 1))
elseif k == 3 then
call MultiboardSetItemValue(mi, ": " + R2SW(Disturb[i], 3, 1))
elseif k == 4 then
call MultiboardSetItemValue(mi, ": " + R2SW(Knockback[i], 3, 1))
elseif k == 6 then
// Water
call MultiboardSetItemValue(mi, I2S(Element_Water[i]))
endif
elseif j == 7 then
if k == 6 then
//Earth
call MultiboardSetItemValue(mi, I2S(Element_Earth[i]))
endif
elseif j == 8 then
if k == 1 then
call MultiboardSetItemValue(mi, ": " + R2SW(Block[i], 3, 1))
elseif k == 2 then
call MultiboardSetItemValue(mi, ": " + R2SW(Deflect[i], 3, 1))
elseif k == 3 then
call MultiboardSetItemValue(mi, ": " + R2SW(Evasion[i], 3, 1))
elseif k == 6 then
//Wind
call MultiboardSetItemValue(mi, I2S(Element_Wind[i]))
endif
elseif j == 10 then
if k == 1 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Agility[i]))
elseif k == 2 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Dexterity[i]))
elseif k == 3 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Endurance[i]))
elseif k == 4 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Intelligence[i]))
elseif k == 5 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Luck[i]))
elseif k == 6 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Magic[i]))
elseif k == 7 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Strength[i]))
elseif k == 8 then
call MultiboardSetItemValue(mi, ": " + I2S(Attribute_Vitality[i]))
endif
endif
elseif k >= 12 and k <= 19 then
if j >= 2 and j <= 6 then
// PT bar
/*if j == 6 then
call MultiboardSetItemWidth(mi, 0.02)
else
call MultiboardSetItemWidth(mi, 0.01)
endif
if j <= 17 then
call MultiboardSetItemStyle(mi, false, true)
endif*/
elseif j == 7 then
if k == 12 then
call MultiboardSetItemValue(mi, I2S(Mastery_Pt_Current_Melee[i]) + "/" + I2S(Mastery_Pt_Target_Melee[i]))
elseif k == 13 then
call MultiboardSetItemValue(mi, I2S(Mastery_Pt_Current_Range[i]) + "/" + I2S(Mastery_Pt_Target_Range[i]))
elseif k == 14 then
call MultiboardSetItemValue(mi, I2S(Mastery_Pt_Current_Magic[i]) + "/" + I2S(Mastery_Pt_Target_Magic[i]))
elseif k == 15 then
call MultiboardSetItemValue(mi, I2S(Mastery_Pt_Current_Shield[i]) + "/" + I2S(Mastery_Pt_Target_Shield[i]))
elseif k == 16 then
call MultiboardSetItemValue(mi, I2S(Mastery_Pt_Current_Crafting[i]) + "/" + I2S(Mastery_Pt_Target_Crafting[i]))
elseif k == 17 then
call MultiboardSetItemValue(mi, I2S(Mastery_Pt_Current_Minion[i]) + "/" + I2S(Mastery_Pt_Target_Minion[i]))
endif
elseif j == 8 then
if k == 12 then
call MultiboardSetItemValue(mi, "|CFFFFED00Ability 1|R")
elseif k == 13 then
call MultiboardSetItemValue(mi, "|CFFFFED00Ability 2|R")
endif
elseif j >= 9 and j <= 13 then
// Ability PT bar
/*call MultiboardSetItemWidth(mi, 0.01)
call MultiboardSetItemStyle(mi, false, true)*/
endif
endif
set k = k + 1
endloop
set j = j + 1
endloop
endif
set i = i + 1
endloop
set mi = null
endfunction
private function checkMin takes nothing returns nothing
local integer i = 0
local integer j
local integer k
local boolean b
local multiboarditem mi
// 0 normal
// 1 arcane statistic
// 2 minimized
loop
exitwhen i > 9
if IsMultiboardDisplayed(Multiboard[10*Multistate[i]+i]) then
if IsMultiboardMinimized(Multiboard[10*Multistate[i]+i]) and Multistate[i] != 2 then
call BJDebugMsg(I2S(Multistate[i]))
set Multistate[i] = Multistate[i] + 1
call BJDebugMsg(I2S(Multistate[i]))
if GetLocalPlayer() == Player(i) then
call MultiboardDisplay(Multiboard[10*(Multistate[i]-1)+i], false)
call MultiboardDisplay(Multiboard[10*Multistate[i]+i], true)
endif
if Multistate[i] != 2 then
call MultiboardSetTitleText(Multiboard[10*Multistate[i]+i], "|CFFFFBC00ARCANE STATISTIC|R")
if GetLocalPlayer() == Player(i) then
call MultiboardMinimize(Multiboard[10*Multistate[i]+i], false)
endif
else
call MultiboardSetTitleText(Multiboard[10*Multistate[i]+i], "")
endif
elseif not IsMultiboardMinimized(Multiboard[10*Multistate[i]+i]) and Multistate[i] == 2 then
set Multistate[i] = 0
if GetLocalPlayer() == Player(i) then
call MultiboardDisplay(Multiboard[10*(Multistate[i]-1)+i], false)
call MultiboardDisplay(Multiboard[10*Multistate[i]+i], true)
endif
endif
endif
set i = i + 1
endloop
endfunction
private function create takes nothing returns nothing
local integer i = 0
local integer j
local integer k
local multiboarditem mi
loop
exitwhen i > 9
set Multiboard[i] = CreateMultiboard()
set Multiboard[10 + i] = CreateMultiboard()
set Multiboard[20 + i] = Multiboard[10 + i]
call MultiboardMinimize(Multiboard[i], true)
call MultiboardMinimize(Multiboard[10+i], true)
call MultiboardSetColumnCount(Multiboard[i], 6)
call MultiboardSetRowCount(Multiboard[i], 4)
call MultiboardSetColumnCount(Multiboard[10 + i], 18)
call MultiboardSetRowCount(Multiboard[10 + i], 21)
call MultiboardSetTitleText(Multiboard[i], "|CFFFFBC00" + GetPlayerName(Player(i)) + "|R")
call MultiboardSetTitleText(Multiboard[10+i], "|CFFFFBC00ARCANE STATISTIC|R")
call MultiboardDisplay(Multiboard[i], false)
call MultiboardDisplay(Multiboard[10+i], false)
set j = 0
loop
exitwhen j > 5
set k = 0
loop
exitwhen k > 3
set mi = MultiboardGetItem(Multiboard[i], k, j)
if j == 0 then
call MultiboardSetItemStyle(mi, true, false)
call MultiboardSetItemWidth(mi, 0.015)
if k == 0 then
call MultiboardSetItemValue(mi, "|CFFFFBC00HP|R")
elseif k == 1 then
call MultiboardSetItemValue(mi, "|CFFFFBC00MP|R")
elseif k == 2 then
call MultiboardSetItemValue(mi, "|CFFFFBC00DG|R")
elseif k == 3 then
call MultiboardSetItemValue(mi, "|CFFFFBC00XP|R")
endif
elseif j == 1 then
call MultiboardSetItemStyle(mi, false, false)
call MultiboardSetItemWidth(mi, 0.01)
elseif j > 1 then
call MultiboardSetItemStyle(mi, false, true)
call MultiboardSetItemWidth(mi, 0.01)
endif
call MultiboardReleaseItem(mi)
set k = k + 1
endloop
set j = j + 1
endloop
set j = 0
loop
exitwhen j > 17
set k = 0
loop
exitwhen k > 20
set mi = MultiboardGetItem(Multiboard[10+i], k, j)
if k == 0 then
call MultiboardSetItemStyle(mi, true, false)
if j == 0 then
call MultiboardSetItemWidth(mi, 0.035)
elseif j == 1 then
call MultiboardSetItemWidth(mi, 0.21)
call MultiboardSetItemValue(mi, "|CFFFFBC00IDENTITIES|R")
elseif j == 2 then
call MultiboardSetItemWidth(mi, 0.19)
call MultiboardSetItemValue(mi, "|CFFFFBC00COMBATIVES|R")
elseif j == 3 then
call MultiboardSetItemWidth(mi, 0.04)
call MultiboardSetItemValue(mi, "|CFFFFBC00ATTRIBUTES|R")
else
call MultiboardSetItemWidth(mi, 0.)
endif
elseif k >= 1 and k <= 9 then
call MultiboardSetItemStyle(mi, true, false)
if j == 0 then
call MultiboardSetItemWidth(mi, 0.005)
elseif j == 1 then
call MultiboardSetItemWidth(mi, 0.04)
if k == 1 then
call MultiboardSetItemValue(mi, "|CFFFFED00Name|R")
elseif k == 2 then
call MultiboardSetItemValue(mi, "|CFFFFED00Job|R")
elseif k == 3 then
call MultiboardSetItemValue(mi, "|CFFFFED00Class|R")
elseif k == 4 then
call MultiboardSetItemValue(mi, "|CFFFFED00Fame|R")
elseif k == 5 then
call MultiboardSetItemValue(mi, "|CFFFFED00Title|R")
elseif k == 6 then
call MultiboardSetItemValue(mi, "|CFFFFED00Level|R")
endif
elseif j == 2 then
call MultiboardSetItemWidth(mi, 0.07)
if k == 1 then
call MultiboardSetItemValue(mi, ": Dalvengyr")
elseif k == 2 then
call MultiboardSetItemValue(mi, ": Combatant")
elseif k == 3 then
call MultiboardSetItemValue(mi, ": Warlord")
elseif k == 4 then
call MultiboardSetItemValue(mi, ": 239035")
elseif k == 5 then
call MultiboardSetItemValue(mi, ": Sergeant")
elseif k == 6 then
call MultiboardSetItemValue(mi, ": 75")
endif
elseif j == 3 then
call MultiboardSetItemWidth(mi, 0.07)
if k == 1 then
call MultiboardSetItemValue(mi, "|CFFFFED00Health Point|R")
elseif k == 2 then
call MultiboardSetItemValue(mi, "|CFFFFED00Mana Point|R")
elseif k == 3 then
call MultiboardSetItemValue(mi, "|CFFFFED00Def. Gauge|R")
elseif k == 4 then
call MultiboardSetItemValue(mi, "|CFFFFED00Experience|R")
elseif k == 5 then
call MultiboardSetItemValue(mi, "|CFFFFED00Physic Damage|R")
elseif k == 6 then
call MultiboardSetItemValue(mi, "|CFFFFED00Magic Damage|R")
elseif k == 7 then
call MultiboardSetItemValue(mi, "|CFFFFED00Crit. Damage|R")
elseif k == 8 then
call MultiboardSetItemValue(mi, "|CFFFFED00Physic Def.|R")
elseif k == 9 then
call MultiboardSetItemValue(mi, "|CFFFFED00Magic Def.|R")
endif
elseif j == 4 then
call MultiboardSetItemWidth(mi, 0.07)
if k == 1 then
call MultiboardSetItemValue(mi, ": 13400/28525")
elseif k == 2 then
call MultiboardSetItemValue(mi, ": 1400/1400")
elseif k == 3 then
call MultiboardSetItemValue(mi, ": 100/100")
elseif k == 4 then
call MultiboardSetItemValue(mi, ": 128/136288")
elseif k == 5 then
call MultiboardSetItemValue(mi, ": 1777-1933")
elseif k == 6 then
call MultiboardSetItemWidth(mi, 0.08)
call MultiboardSetItemValue(mi, ": 0-0")
elseif k == 7 then
call MultiboardSetItemValue(mi, ": 435%")
elseif k == 8 then
call MultiboardSetItemValue(mi, ": 551")
elseif k == 9 then
call MultiboardSetItemValue(mi, ": 791")
endif
elseif j == 5 then
call MultiboardSetItemWidth(mi, 0.05)
if k == 1 then
call MultiboardSetItemValue(mi, "|CFFFFED00Accuracy|R")
elseif k == 2 then
call MultiboardSetItemValue(mi, "|CFFFFED00Critical|R")
elseif k == 3 then
call MultiboardSetItemValue(mi, "|CFFFFED00Disturb|R")
elseif k == 4 then
call MultiboardSetItemValue(mi, "|CFFFFED00Knockback|R")
elseif k == 6 then
//Fire
call MultiboardSetItemWidth(mi, 0.03)
call MultiboardSetItemValue(mi, "555")
call MultiboardSetItemStyle(mi, true, true)
endif
elseif j == 6 then
call MultiboardSetItemWidth(mi, 0.03)
if k == 1 then
call MultiboardSetItemValue(mi, ": 1.0")
elseif k == 2 then
call MultiboardSetItemValue(mi, ": 1.0")
elseif k == 3 then
call MultiboardSetItemValue(mi, ": 2.0")
elseif k == 4 then
call MultiboardSetItemValue(mi, ": 0.0")
elseif k == 6 then
// Water
call MultiboardSetItemWidth(mi, 0.03)
call MultiboardSetItemValue(mi, "555")
call MultiboardSetItemStyle(mi, true, true)
endif
elseif j == 7 then
call MultiboardSetItemWidth(mi, 0.05)
if k == 1 then
call MultiboardSetItemValue(mi, "|CFFFFED00Block|R")
elseif k == 2 then
call MultiboardSetItemValue(mi, "|CFFFFED00Deflect|R")
elseif k == 3 then
call MultiboardSetItemValue(mi, "|CFFFFED00Evasion|R")
elseif k == 6 then
//Earth
call MultiboardSetItemWidth(mi, 0.03)
call MultiboardSetItemValue(mi, "555")
call MultiboardSetItemStyle(mi, true, true)
endif
elseif j == 8 then
call MultiboardSetItemWidth(mi, 0.03)
if k == 1 then
call MultiboardSetItemValue(mi, ": 0.0")
elseif k == 2 then
call MultiboardSetItemValue(mi, ": 0.0")
elseif k == 3 then
call MultiboardSetItemValue(mi, ": 4.0")
elseif k == 6 then
//Wind
call MultiboardSetItemWidth(mi, 0.06)
call MultiboardSetItemValue(mi, "555")
call MultiboardSetItemStyle(mi, true, true)
endif
elseif j == 9 then
call MultiboardSetItemWidth(mi, 0.06)
if k == 1 then
call MultiboardSetItemValue(mi, "|CFFFFED00Agility|R")
elseif k == 2 then
call MultiboardSetItemValue(mi, "|CFFFFED00Dexterity|R")
elseif k == 3 then
call MultiboardSetItemValue(mi, "|CFFFFED00Endurance|R")
elseif k == 4 then
call MultiboardSetItemValue(mi, "|CFFFFED00Intelligence|R")
elseif k == 5 then
call MultiboardSetItemValue(mi, "|CFFFFED00Luck|R")
elseif k == 6 then
call MultiboardSetItemValue(mi, "|CFFFFED00Magic|R")
elseif k == 7 then
call MultiboardSetItemValue(mi, "|CFFFFED00Strength|R")
elseif k == 8 then
call MultiboardSetItemValue(mi, "|CFFFFED00Vitality|R")
endif
elseif j == 10 then
call MultiboardSetItemWidth(mi, 0.03)
if k == 1 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 2 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 3 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 4 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 5 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 6 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 7 then
call MultiboardSetItemValue(mi, ": 99")
elseif k == 8 then
call MultiboardSetItemValue(mi, ": 99")
endif
else
call MultiboardSetItemWidth(mi, 0.0)
endif
elseif k == 10 then
call MultiboardSetItemStyle(mi, false, false)
call MultiboardSetItemWidth(mi, 0.0)
elseif k == 11 then
call MultiboardSetItemStyle(mi, true, false)
if j == 0 then
call MultiboardSetItemWidth(mi, 0.05)
elseif j == 1 then
call MultiboardSetItemWidth(mi, 0.25)
call MultiboardSetItemValue(mi, "|CFFFFBC00SKILLS MASTERY|R")
elseif j == 2 then
call MultiboardSetItemWidth(mi, 0.20)
call MultiboardSetItemValue(mi, "|CFFFFBC00ABILITIES MASTERY|R")
else
call MultiboardSetItemWidth(mi, 0.0)
endif
elseif k >= 12 and k <= 19 then
call MultiboardSetItemStyle(mi, true, false)
if j == 0 then
call MultiboardSetItemWidth(mi, 0.02)
elseif j == 1 then
call MultiboardSetItemWidth(mi, 0.04)
if k == 12 then
call MultiboardSetItemValue(mi, "|CFFFFED00Melee|R")
elseif k == 13 then
call MultiboardSetItemValue(mi, "|CFFFFED00Range|R")
elseif k == 14 then
call MultiboardSetItemValue(mi, "|CFFFFED00Magic|R")
elseif k == 15 then
call MultiboardSetItemValue(mi, "|CFFFFED00Shield|R")
elseif k == 16 then
call MultiboardSetItemValue(mi, "|CFFFFED00Crafting|R")
elseif k == 17 then
call MultiboardSetItemValue(mi, "|CFFFFED00Taming|R")
endif
elseif j >= 2 and j <= 6 then
if j == 6 then
call MultiboardSetItemWidth(mi, 0.02)
else
call MultiboardSetItemWidth(mi, 0.01)
endif
if k <= 17 then
call MultiboardSetItemStyle(mi, false, true)
endif
elseif j == 7 then
call MultiboardSetItemWidth(mi, 0.04)
if k == 12 then
call MultiboardSetItemValue(mi, "35/99")
elseif k == 13 then
call MultiboardSetItemValue(mi, "36/99")
elseif k == 14 then
call MultiboardSetItemValue(mi, "37/99")
elseif k == 15 then
call MultiboardSetItemValue(mi, "38/99")
elseif k == 16 then
call MultiboardSetItemValue(mi, "39/99")
elseif k == 17 then
call MultiboardSetItemValue(mi, "40/99")
endif
elseif j == 8 then
call MultiboardSetItemWidth(mi, 0.04)
if k == 12 then
call MultiboardSetItemValue(mi, "|CFFFFED00Ability 1|R")
elseif k == 13 then
call MultiboardSetItemValue(mi, "|CFFFFED00Ability 2|R")
endif
elseif j >= 9 and j <= 13 then
call MultiboardSetItemWidth(mi, 0.01)
call MultiboardSetItemStyle(mi, false, true)
endif
else
call MultiboardSetItemWidth(mi, 0.0)
call MultiboardSetItemStyle(mi, false, false)
endif
call MultiboardReleaseItem(mi)
set k = k + 1
endloop
set j = j + 1
endloop
set i = i + 1
endloop
endfunction
private function ini takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 9
set Multistate[i] = 0
set i = i + 1
endloop
call TimerStart(CreateTimer(), 0., false, function create)
call TimerStart(CreateTimer(), 0.1, true, function update)
call TimerStart(CreateTimer(), 0., true, function checkMin)
endfunction
endlibrary