Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- screenlink = {}
- screenlink.name = "screenlink"
- screenlink.b0 = zo_strformat("|t1:1:screenlink/textures/1x1b.dds|t")
- screenlink.b1 = zo_strformat("|t1:1:screenlink/textures/1x1.dds|t")
- ZO_CreateStringId("SI_BINDING_NAME_CHOOSE_PLAYLIST_BATTLE", "Battle")
- ZO_CreateStringId("SI_BINDING_NAME_CHOOSE_PLAYLIST_EPIC", "MFK EPIC BOSS BATTLE")
- screenlink.Playlist = 0
- function intToBinString(k)
- n = k
- bin = {0,0,0,0,0,0,0,0}
- String = screenlink.b1
- for i = 0,8 do
- j = 8-i
- if n >= 2^j then
- n = n - 2^j
- bin[i] = 1
- String = String..screenlink.b1
- else
- String = String..screenlink.b0
- end
- end
- return String
- end
- function SetPixel(eventCode, zoneName, subZoneName, newSubzone)
- mapNum = GetCurrentMapZoneIndex()
- if screenlink.Playlist == 1 then mapNum = 480
- elseif screenlink.Playlist == 2 then mapNum = 481
- end
- s = intToBinString(mapNum)
- screenlinkText:SetText(s)
- end
- function screenlink.OnAddOnLoaded(event, addonName)
- mapNum = GetCurrentMapZoneIndex()
- if screenlink.Playlist == 1 then mapNum = 480
- elseif screenlink.Playlist == 2 then mapNum = 481
- end
- d("Moved to "..GetPlayerLocationName().." | mapID :"..tostring(mapNum))
- s = intToBinString(mapNum)
- screenlinkText:SetText(s)
- end
- function playlist_Battle()
- if screenlink.Playlist ~= 1 then
- screenlink.Playlist = 1
- else
- screenlink.Playlist = 0
- end
- SetPixel(0,0,0,0)
- end
- function playlist_BossBattle()
- if screenlink.Playlist ~= 2 then
- screenlink.Playlist = 2
- else
- screenlink.Playlist = 0
- end
- SetPixel(0,0,0,0)
- end
- EVENT_MANAGER:RegisterForEvent(screenlink.name,EVENT_ZONE_CHANGED,SetPixel)
- EVENT_MANAGER:RegisterForEvent(screenlink.name, EVENT_ADD_ON_LOADED, screenlink.OnAddOnLoaded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement