Alert script,self explanatory
Event +PlayerSignOn
If #GetValue($GetPlayerInfo(#Source, PSID) & "\alert") = 1
If $GetValue($GetPlayerInfo(#Source, PSID) & "\lastname") <> $Name(#Source)
/SendAll "+bot: " & $GetValue($GetPlayerInfo(#Source, PSID) & "\lastname") & ", an alerted player, is hiding under the identity of " & $Name(#Source) & "! Beware!"
/Exit
EndIf
/SendAll "+bot: " & $Name(#Source) & " is on alert! You've been warned!"
/Exit
EndIf
/SaveValue $GetPlayerInfo(#Source, PSID) & "\lastname", $Name(#Source)
EndEvent
Event -ChatMessage
///NOTE: This script is only for admins, but if you want mods to be able to use it, just change the 1s in both of the IF cases to 0s.
If $Left($Message, 7) = "!Alert " AND #Len($Message) > 7 AND #GetPlayerInfo(#Source, AUTH) > 1
/Set #Alert, #PNumber($Right($Message, #Len($Message) - 7))
If #Alert = 0
/SendPM #Source, "+bot: I can't find anybody with that name right now...Sorry..."
/StopEvent
/Exit
EndIf
If #GetPlayerInfo(#Alert, AUTH) = 2
/SendPM #Source, "+bot: Sorry, but admins cannot be put on alert."
/StopEvent
/Exit
EndIf
If #GetValue($GetPlayerInfo(#Alert, PSID) & "\alert") = 1
/SendPM #Source, "+bot: They are already on alert, " & $Name(#Source) & "."
/StopEvent
/Exit
EndIf
/SendAll "+bot: " & $Name(#Alert) & " has been put on alert! Everyone, beware!"
/StopEvent
/SaveValue $GetPlayerInfo(#Alert, PSID) & "\alert", 1
/Exit
EndIf
If $Left($Message, 9) = "!Dealert " AND #Len($Message) > 9 AND #GetPlayerInfo(#Source, AUTH) > 1
/Set #Dealert, #PNumber($Right($Message, #Len($Message) - 9))
If #Dealert = 0
/SendPM #Source, "+bot: I can't find anybody with that name right now...Sorry..."
/StopEvent
/Exit
EndIf
If #Dealert = #Source
/SendPM #Source, "+bot: Sorry, but you can't remove yourself from alert..."
/StopEvent
/Exit
EndIf
If #GetValue($GetPlayerInfo(#Dealert, PSID) & "\alert") = 0
/SendPM #Source, "+bot: That person isn't alerted."
/StopEvent
/Exit
EndIf
/SendAll "+Bot: " & $Name(#Dealert) & " has been dealerted, so they must have been forgiven for their actions."
/StopEvent
/SaveValue $GetPlayerInfo(#Dealert, PSID) & "\alert", 0
/Exit
EndIf
EndEvent
Event +TeamChange
/SaveValue $GetPlayerInfo(#Source, PSID) & "\lastname", $Name(#Source)
EndEvent
Event +PlayerSignOn
If #GetValue($GetPlayerInfo(#Source, PSID) & "\alert") = 1
If $GetValue($GetPlayerInfo(#Source, PSID) & "\lastname") <> $Name(#Source)
/SendAll "+bot: " & $GetValue($GetPlayerInfo(#Source, PSID) & "\lastname") & ", an alerted player, is hiding under the identity of " & $Name(#Source) & "! Beware!"
/Exit
EndIf
/SendAll "+bot: " & $Name(#Source) & " is on alert! You've been warned!"
/Exit
EndIf
/SaveValue $GetPlayerInfo(#Source, PSID) & "\lastname", $Name(#Source)
EndEvent
Event -ChatMessage
///NOTE: This script is only for admins, but if you want mods to be able to use it, just change the 1s in both of the IF cases to 0s.
If $Left($Message, 7) = "!Alert " AND #Len($Message) > 7 AND #GetPlayerInfo(#Source, AUTH) > 1
/Set #Alert, #PNumber($Right($Message, #Len($Message) - 7))
If #Alert = 0
/SendPM #Source, "+bot: I can't find anybody with that name right now...Sorry..."
/StopEvent
/Exit
EndIf
If #GetPlayerInfo(#Alert, AUTH) = 2
/SendPM #Source, "+bot: Sorry, but admins cannot be put on alert."
/StopEvent
/Exit
EndIf
If #GetValue($GetPlayerInfo(#Alert, PSID) & "\alert") = 1
/SendPM #Source, "+bot: They are already on alert, " & $Name(#Source) & "."
/StopEvent
/Exit
EndIf
/SendAll "+bot: " & $Name(#Alert) & " has been put on alert! Everyone, beware!"
/StopEvent
/SaveValue $GetPlayerInfo(#Alert, PSID) & "\alert", 1
/Exit
EndIf
If $Left($Message, 9) = "!Dealert " AND #Len($Message) > 9 AND #GetPlayerInfo(#Source, AUTH) > 1
/Set #Dealert, #PNumber($Right($Message, #Len($Message) - 9))
If #Dealert = 0
/SendPM #Source, "+bot: I can't find anybody with that name right now...Sorry..."
/StopEvent
/Exit
EndIf
If #Dealert = #Source
/SendPM #Source, "+bot: Sorry, but you can't remove yourself from alert..."
/StopEvent
/Exit
EndIf
If #GetValue($GetPlayerInfo(#Dealert, PSID) & "\alert") = 0
/SendPM #Source, "+bot: That person isn't alerted."
/StopEvent
/Exit
EndIf
/SendAll "+Bot: " & $Name(#Dealert) & " has been dealerted, so they must have been forgiven for their actions."
/StopEvent
/SaveValue $GetPlayerInfo(#Dealert, PSID) & "\alert", 0
/Exit
EndIf
EndEvent
Event +TeamChange
/SaveValue $GetPlayerInfo(#Source, PSID) & "\lastname", $Name(#Source)
EndEvent