Not sure if this is the right place to ask for help but here goes...
I want to check if my character is locked to Magisters Terrace for farming the White Hawkstrider mount. Heres the code I'm using:
<If Condition="(Lua.GetReturnValues("for i=1,GetNumSavedInstances() do local n,_,_,_,l = GetSavedInstanceInfo(i) if (n == 'Magisters Terrace' and l == true) then return 1 end end return 0"
.First() == "1"
" >
<CustomBehavior File="Message" Text="Locked to Magisters Terrace" LogColor="Orange" />
</If>
But it doesn't work because the name should be "Magister's Terrace", but the profile can't compile when there's an apostrophe in the name. So, I tried using getmapnamebyid:
<If Condition="(Lua.GetReturnValues("for i=1,GetNumSavedInstances() do local n,_,_,_,l = GetSavedInstanceInfo(i) if (n == GetMapNameByID(798) and l == true) then return 1 end end return 0"
.First() == "1"
" >
<CustomBehavior File="Message" Text="Locked to Magisters Terrace" LogColor="Orange" />
</If>
But this doesn't work also... I think becuase the map name is called Magisters' Terrace but the lock ID is called Magister's Terrace
Is there anyway to fix it?
I want to check if my character is locked to Magisters Terrace for farming the White Hawkstrider mount. Heres the code I'm using:
<If Condition="(Lua.GetReturnValues("for i=1,GetNumSavedInstances() do local n,_,_,_,l = GetSavedInstanceInfo(i) if (n == 'Magisters Terrace' and l == true) then return 1 end end return 0"


<CustomBehavior File="Message" Text="Locked to Magisters Terrace" LogColor="Orange" />
</If>
But it doesn't work because the name should be "Magister's Terrace", but the profile can't compile when there's an apostrophe in the name. So, I tried using getmapnamebyid:
<If Condition="(Lua.GetReturnValues("for i=1,GetNumSavedInstances() do local n,_,_,_,l = GetSavedInstanceInfo(i) if (n == GetMapNameByID(798) and l == true) then return 1 end end return 0"


<CustomBehavior File="Message" Text="Locked to Magisters Terrace" LogColor="Orange" />
</If>
But this doesn't work also... I think becuase the map name is called Magisters' Terrace but the lock ID is called Magister's Terrace
Is there anyway to fix it?