44 lines
1.8 KiB
Plaintext
44 lines
1.8 KiB
Plaintext
#include "inc_isdm"
|
|
|
|
string FixName(string nam)
|
|
{
|
|
string fixed = "", c;
|
|
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
|
|
int s;
|
|
for(s=0; s < GetStringLength(nam); s++) {
|
|
c = GetSubString(nam, s, 1);
|
|
//SpeakString(IntToString(FindSubString(valid, c)), TALKVOLUME_SHOUT);
|
|
if (FindSubString(valid, c) != -1) fixed += c;
|
|
}
|
|
return fixed;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
object oPlayer = GetLastUsedBy();
|
|
object oThrone = OBJECT_SELF;
|
|
string nam = FixName(GetPCPlayerName(oPlayer));
|
|
//SpeakString(nam + " - " + GetTag(oThrone));
|
|
if (GetIsObjectValid(oPlayer) == TRUE) {
|
|
if (nam != GetTag(oThrone) && isdm(oPlayer) != TRUE) {
|
|
AssignCommand(oPlayer, ClearAllActions(TRUE));
|
|
SpeakString("I think not " + GetName(oPlayer));
|
|
SetImmortal(oPlayer,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_HIT_DIVINE,FALSE), oPlayer, 0.0f);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(44,FALSE), oPlayer, 0.0f);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(81,FALSE), oPlayer, 0.0f);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(91,FALSE), oPlayer, 0.0f);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(57,FALSE), oPlayer, 0.0f);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(FALSE, FALSE), oPlayer, 0.0f);
|
|
} else {
|
|
if (GetLocalInt(oPlayer, "emotesit") != 0) {
|
|
ExecuteScript("cc_emote", oPlayer);
|
|
DelayCommand(1.0, AssignCommand (oPlayer, ActionSit(oThrone)));
|
|
} else {
|
|
AssignCommand(oPlayer, ActionSit(oThrone));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|