Heya'. I'm trying to go about making my OnPlayerChat script to send a message (sString) to the DM if they have a campaign int of "enablemessages", sName set to true. I would like to do this to all DMs online. How would I go about doing that? Thanks.
'>
Current Code:
void main()
{
object oPC = GetPCChatSpeaker();
object oFamiliar = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
string sChat = GetPCChatMessage();
SetLocalString(oPC, "message", sChat);
int nLength = GetStringLength(sChat);
string sSpoke = GetLocalString(oPC, "message");
string sSend;
string sTalk = GetStringRight(sSpoke, nLength - 2);
string sRed = "<cþ >";
string sClear = "</c>";
string sBlack = "<c >";
string sEmotes = "-EmoteList";
string sDate = "-Date";
string sSave = "-Save";
string sFamiliar = "-Familiar";
if (GetIsDM(oPC))
{
sSend =sRed + sEmotes + sDate + sSave + sFamiliar;
}
else
{
sSend =sRed + sEmotes + sDate + sSave + sFamiliar;
}
if (GetStringLowerCase(sChat) == "-help")
{
SetPCChatMessage("");
SendMessageToPC(oPC, sSend);
}
if (GetStringLowerCase(sChat) == "-")
{
SetPCChatMessage("");
SendMessageToPC(oPC, sSend);
}
if (GetStringLowerCase(sChat) == "-save")
{
SetPCChatMessage("");
ExportSingleCharacter(oPC);
SendMessageToPC(oPC, sRed + "Your character has been saved.");
}
}
Modifié par The Dragonator, 24 août 2013 - 03:07 .