Leader has the code:
CODE
var Aco = skapi.acoSelected;
Chat.Fellow("WBF: Attack Current Selected [" + Util.Hex(Aco.oid) + "] ")
Chat.Fellow("WBF: Attack Current Selected [" + Util.Hex(Aco.oid) + "] ")
example: shows up as [Fellowship] You say, "WBF: Attack Current Selected [0x34873f67]"
I then want the other fellow members extract the OID from the message and then select that OID, and attack it if it is a mob. The problem I have is I cannot find anything in the skunkworks documents that has a feature that will select a target by OID. All I could find is by ACO, which would not work when there are multiple mobs with the same name. If I can't select a OID, would the only possible way be to select every mob and compare it to the OID in fellow chat, and go to the next mob if it doesn't match, until it matches? Here's the code I have so far for selecting it(edited from code in Warbot2.15 player detection)...
CODE
if (Command == "WBF:") {
if (flagFellowAttacking && (szMsg.match(/WBF: Attack Current Selected/))) {
// Mob selected by leader. Select that mob.
var Pattern1 = new RegExp("(.*[\[]|[\]].*$)", "g"); // Extract the mob's OID
DetectedMob = szMsg.replace(Pattern1, "");
Log.OutD("Main_OnTellFellow: End, Mob [" + DetectedMob + "] selected by fellow leader [" + szSender + "]. Selecting...", true); // DetectedMob shows the OID
// I need to select the OID here somehow...
} // endif
if (flagFellowAttacking && (szMsg.match(/WBF: Attack Current Selected/))) {
// Mob selected by leader. Select that mob.
var Pattern1 = new RegExp("(.*[\[]|[\]].*$)", "g"); // Extract the mob's OID
DetectedMob = szMsg.replace(Pattern1, "");
Log.OutD("Main_OnTellFellow: End, Mob [" + DetectedMob + "] selected by fellow leader [" + szSender + "]. Selecting...", true); // DetectedMob shows the OID
// I need to select the OID here somehow...
} // endif
skapi.SelectAco(aco) doesn't seem to work if there is more than one mob with that name... Any ideas?
