summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/onkilling.lua
diff options
context:
space:
mode:
authorbearbin <bearbin@gmail.com>2013-07-27 18:19:22 +0200
committerbearbin <bearbin@gmail.com>2013-07-27 18:19:22 +0200
commit1d0b57d8abf2297614659e1115b81d569612a402 (patch)
treedf7d0acb85b3ef5c4783f721a83908ddc5130ef7 /MCServer/Plugins/Core/onkilling.lua
parentMerge pull request #7 from tigerw/master (diff)
parentMerge pull request #8 from mc-server/master (diff)
downloadcuberite-1d0b57d8abf2297614659e1115b81d569612a402.tar
cuberite-1d0b57d8abf2297614659e1115b81d569612a402.tar.gz
cuberite-1d0b57d8abf2297614659e1115b81d569612a402.tar.bz2
cuberite-1d0b57d8abf2297614659e1115b81d569612a402.tar.lz
cuberite-1d0b57d8abf2297614659e1115b81d569612a402.tar.xz
cuberite-1d0b57d8abf2297614659e1115b81d569612a402.tar.zst
cuberite-1d0b57d8abf2297614659e1115b81d569612a402.zip
Diffstat (limited to 'MCServer/Plugins/Core/onkilling.lua')
-rw-r--r--MCServer/Plugins/Core/onkilling.lua65
1 files changed, 0 insertions, 65 deletions
diff --git a/MCServer/Plugins/Core/onkilling.lua b/MCServer/Plugins/Core/onkilling.lua
deleted file mode 100644
index e74f36065..000000000
--- a/MCServer/Plugins/Core/onkilling.lua
+++ /dev/null
@@ -1,65 +0,0 @@
-function OnKilling(Victim, Killer)
- if Victim:IsPlayer() then
- SetBackCoordinates( Victim )
- Server = cRoot:Get():GetServer()
- if Killer == nil then
- if Victim:IsOnFire() then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " burned away." )
- CheckHardcore(Victim)
- return false
- end
- if Victim:GetWorld():GetBlock(Victim:GetPosX(), Victim:GetPosY(), Victim:GetPosZ()) == 10 or Victim:GetWorld():GetBlock(Victim:GetPosX(), Victim:GetPosY(), Victim:GetPosZ()) == 11 then
- Server:SendMessage( cChatColor.Red .. Victim:GetName() .. " tried to swim in lava" )
- CheckHardcore(Victim)
- return false
- end
- else
- if Killer:IsPlayer() then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by " .. Killer:GetName() )
- CheckHardcore(Victim)
- return false
- elseif Killer:IsMob() then
- if Killer:IsA("cZombie") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is eaten by a zombie")
- elseif Killer:IsA("cSkeleton") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a skeleton" )
- elseif Killer:IsA("cCreeper") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is blown up by a creeper")
- elseif Killer:IsA("cSpider") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a spider")
- elseif Killer:IsA("cCaveSpider") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a cavespider")
- elseif Killer:IsA("cBlaze") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a blaze")
- elseif Killer:IsA("cEnderman") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is slain by a enderman")
- elseif Killer:IsA("cSilverfish") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a silverfish")
- elseif Killer:IsA("cSlime") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a slime")
- elseif Killer:IsA("cWitch") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a witch")
- elseif Killer:IsA("cZombiepigman") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is slain by a zombiepigman")
- elseif Killer:IsA("cMagmacube") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a magmacube")
- elseif Killer:IsA("cWolf") then
- Server:SendMessage( cChatColor.Red .. "Player " .. Victim:GetName() .. " is killed by a wolf")
- end
- CheckHardcore(Victim)
- return false
- end
- end
- Server:SendMessage( cChatColor.Red .. Victim:GetName() .. " Died")
- CheckHardcore(Victim)
- end
-end
-
-function CheckHardcore(Victim)
- if HardCore == "true" then
- if Victim:IsPlayer() == true then
- local KilledPlayer = tolua.cast(Victim, "cPlayer")
- BanPlayer(KilledPlayer:GetName(), "You Died")
- end
- end
-end \ No newline at end of file