Based on what you're doing I would think you were trying to use the ${Spawn} TLO to search for the fellowship campfire by name, which would appear on the map using MQ2Map, so you'd possibly be able to search for it that way.
Alternately you could also use one of the below fellowship members to gather the information desired. Such as using the X Y Z location of the campfire in the manner I mentioned. I've highlighted what I think might be relevant to your situation in the code block at the bottom.
I don't see a fellowship member for the campfire that gets the spawn's info directly. There is one for Fellowship.Campfire that appears to be a bool type, so only returns true if the spawn exists. So you could use something like /if (${Fellowship.Campfire}) to determine if there is already a campfire, and if there is, use a block to determine what to do once you've verified it exists. Such as calculating distance.
I'm unsure regarding the guild banner.
/*0x2d8*/ GuildBanner Banner; There is a Banner member of the GuildBanner type in the GuildBase object. But, doing a "Find all references" results in nothing found but the initial entry. Perhaps I'm searching it wrong. That said, it's plausible there's never been a need to look for that directly. You could try searching for the guild banner with a spawn search, using Banner as the race. Then using that to get the ID, or again using the location to get the distance.
With all that said I don't speak
Lua, but I also think you're currently mixing macro code with
Lua and the two aren't interchangeable.
Fellowship Members
Code:
switch (static_cast<FellowshipTypeMembers>(pMember->ID))
{
case FellowshipTypeMembers::ID:
Dest.DWord = pFellowship->FellowshipID;
Dest.Type = pIntType;
return true;
case FellowshipTypeMembers::Leader:
strcpy_s(DataTypeTemp, pFellowship->Leader);
Dest.Ptr = &DataTypeTemp[0];
Dest.Type = pStringType;
return true;
case FellowshipTypeMembers::MotD:
strcpy_s(DataTypeTemp, pFellowship->MotD);
Dest.Ptr = &DataTypeTemp[0];
Dest.Type = pStringType;
return true;
case FellowshipTypeMembers::Members:
Dest.DWord = pFellowship->Members;
Dest.Type = pIntType;
return true;
case FellowshipTypeMembers::Member:
Dest.Type = pFellowshipMemberType;
if (Index[0])
{
if (IsNumber(Index))
{
int i = GetIntFromString(Index, 0) - 1;
if (i < 0 || i >= pFellowship->Members)
return false;
Dest.Ptr = &pFellowship->FellowshipMember[i];
return true;
}
else
{
for (int i = 0; i < pFellowship->Members; i++)
{
if (ci_equals(pFellowship->FellowshipMember[i].Name, Index))
{
Dest.Ptr = &pFellowship->FellowshipMember[i];
return true;
}
}
}
}
return false;
case FellowshipTypeMembers::CampfireDuration:
Dest.DWord = 0;
Dest.Type = pTicksType;
if (pMySpawn->CampfireTimestamp)
{
Dest.DWord = (pMySpawn->CampfireTimestamp - GetFastTime()) / 6;
return true;
}
return false;
case FellowshipTypeMembers::CampfireY:
Dest.Float = pMySpawn->CampfireY;
Dest.Type = pFloatType;
return true;
case FellowshipTypeMembers::CampfireX:
Dest.Float = pMySpawn->CampfireX;
Dest.Type = pFloatType;
return true;
case FellowshipTypeMembers::CampfireZ:
Dest.Float = pMySpawn->CampfireZ;
Dest.Type = pFloatType;
return true;
case FellowshipTypeMembers::CampfireZone:
Dest.Type = pZoneType;
if (int zoneID = (pMySpawn->CampfireZoneID & 0x7FFF))
{
if (zoneID < MAX_ZONES && pWorldData)
{
Dest.Ptr = pWorldData->ZoneArray[zoneID];
return true;
}
}
return false;
case FellowshipTypeMembers::Campfire:
Dest.Set(pMySpawn->Campfire);
Dest.Type = pBoolType;
return true;
case FellowshipTypeMembers::Sharing:
if (Index[0] && IsNumber(Index))
{
int nMember = GetIntFromString(Index, 0) - 1;
if (nMember < 0) nMember = 0;
if (nMember > pFellowship->Members)
return false;
Dest.Set(pFellowship->bExpSharingEnabled[nMember]);
Dest.Type = pBoolType;
return true;
}
return false;
default: break;
}
return false;
}