2024-10-29 22:39
#0
For those that are coordinate challenged, the below will automatically add a waypoint "Manifestation" marker based on the barked town crier text. Make sure to right click and delete the waypoint when the boss has died.
Add the below to textparsing.lua, and end of function TextParsing.SpecialTexts(). Ideally, replace the TextSourceId number check with the actual objectID value of your town crier.
p.s. UO team should buff up the boss on atlantic, like 10x. It dies in 30 seconds or so.
p.p.s UO team, the cryer doesn't bark coordinates for at least Valley of Eodon maps.
local header = L"The ground ruptures and darkness spills forth... the Manifestation of Evil has begun to pierce the vale near "
local found = nil
-- replace TextSourceId with the Id number of your town cryer, to avoid spoofing.
if( SystemData.TextSourceID ~= 0 and SystemData.TextSourceID ~= -1 ) then -- originates from town cryer, not SYSTEM.
found = wstring.find(senderText, header)
end
if( found ) then -- adapted from charbydis case, note minimal error checking.
local facet_number = nil
local location = wstring.gsub( senderText, header, L"" )
local coord = location
local text2 = wstring.find(coord, L"[,]")
local first = wstring.sub(coord, 1, text2 - 1)
first = wstring.gsub(first, L"o ", L".")
first = wstring.gsub(first, L"'", L"")
local latDir = wstring.sub(first, -1)
local latVal = wstring.sub(first,1, -2)
local second = wstring.sub(coord, text2 + 2)
second = wstring.gsub(second, L"o ", L".")
second = wstring.gsub(second, L"'", L"")
if( second ) then
local facets = {}
-- truncate string around " at " to extract trailing Direction and facet string.
local sep = wstring.find(second, L" at ")
local chopped = wstring.sub(second, 1, sep-1) -- strsub (s, i, [j]) Returns another string, which is a substring of s , starting at i and runing until j .
-- extract facet from end of string.
local tail = wstring.find(second, L" in ")
local facet = wstring.sub(second, tail+4)
local del = wstring.find(facet, L"!")
facet = wstring.sub(facet, 0, del-1) -- remove trailing !
-- convert facet to number
facets = {[L"Felucca"]=0, [L"Trammel"]=1, [L"Ilshenar"]=2, [L"Malas"]=3, [L"Tokuno"]=4, [L"Ter Mur"]=5} -- only trammel, malas verified.
facet_number = facets[facet]
second = chopped -- update string for long value extraction.
end
local longDir = wstring.sub(second, -1)
local longVal = wstring.sub(second,1, -2)
if( facet_number ~= nil ) then
local x,y = MapCommon.ConvertToXYMinutes(tonumber(latVal), tonumber(longVal), latDir, longDir, 1, 1)
-- Debug.PrintToChat(towstring(x) .. L" ".. towstring(y)..L" facet=".. towstring(facet_number))
UOCreateUserWaypoint( MapCommon.WaypointCustomType, x, y, facet_number, L"Manifestation" .. L"_ICON_100010_SCALE_" .. 0.69 )
CenterScreenText.SendCenterScreenTexture("battlebegin") -- generate notification.
return
end
end
