FANDOM


Created by Stragothemad.

Here is a new script i wrote for terrier its a ban after life points are gone.

Function Main()
    DeathPlvl= Attribute(Actor, "LifeP")

   ; Death animation
   Output(Actor(), "You have died...")
   Death = Rand(1, 3)
   If (Death = 1)
      AnimateActor(Actor(), "Death 1", 0.2, 0)
   ElseIf (Death = 2)
      AnimateActor(Actor(), "Death 2", 0.2, 0)
   Else
      AnimateActor(Actor(), "Death 3", 0.2, 0)
   EndIf

   ; Wait
   DoEvents(1000)

   ; Remove Life points after death forgot to add respawn point for LP 1-4(or however many points you have)
   SetAttribute(Actor(), "LifeP", - 1)
   OutPut(Actor(), "You Have Lost 1 Life Point", 255, 0, 0)
   
   
   If (DeathPlvl <=  1 )
   ThreadExecute("Death_Ban", "Main", Actor, 0)
   EndIf

   ; Done
   Return
End Function

Here is the ban part.

Function Main() ;ban player (Name)
;Usage /ban "name" then enter a reason.
;Should be added to your In-game commands.rsl script.n player (Name)
;Usage /ban "name" then enter a reason.
;Should be added to your In-game commands.rsl script.

Player = Actor()
;--------------------------------
;Check if player is still alive
;-------------------------------

OutPut(PlayerToBan, "You have been banned!!.", 255, 0, 0)
OutPut(PlayerToBan, "Banned reason ", 255, 210, 220)
OutPut(PlayerToBan,  + GmInput, 255, 0, 0)
DoEvents(10000)
BanPlayer(Player) ; Ban the players account
KickPlayer(Player) ; Kick the player off the server
OutPut(Actor(), "Player [" + PlayerName$ + "] Successfully BANNED!")

SaveState()

OutPut(Actor(), "Unable to find " + PlayerName$ + " in Player Database.")

Return