summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/.gitignore8
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua54
-rw-r--r--MCServer/monsters.ini65
-rw-r--r--MCServer/webadmin/template.lua16
4 files changed, 113 insertions, 30 deletions
diff --git a/MCServer/.gitignore b/MCServer/.gitignore
index 62225e137..ca10d90e8 100644
--- a/MCServer/.gitignore
+++ b/MCServer/.gitignore
@@ -1,11 +1,8 @@
*.exe
-ChunkWorx.ini
-ChunkWorxSave.ini
+*.ini
MCServer
-banned.ini
logs
players
-whitelist.ini
world*
API.txt
*.dat
@@ -15,9 +12,6 @@ schematics
*.pdb
memdump.xml
*.grab
-ProtectionAreas.ini
ProtectionAreas.sqlite
helgrind.log
-settings.ini
-webadmin.ini
motd.txt
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index f26b9a98d..e864cfe92 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -23,17 +23,18 @@ function Initialize(Plugin)
PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHAT);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_RIGHT_CLICKING_ENTITY);
- PluginManager:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "Shows a list of all the loaded entities");
- PluginManager:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "Kills all the loaded entities");
- PluginManager:BindCommand("/wool", "debuggers", HandleWoolCmd, "Sets all your armor to blue wool");
- PluginManager:BindCommand("/testwnd", "debuggers", HandleTestWndCmd, "Opens up a window using plugin API");
- PluginManager:BindCommand("/gc", "debuggers", HandleGCCmd, "Activates the Lua garbage collector");
- PluginManager:BindCommand("/fast", "debuggers", HandleFastCmd, "Switches between fast and normal movement speed");
- PluginManager:BindCommand("/dash", "debuggers", HandleDashCmd, "Switches between fast and normal sprinting speed");
- PluginManager:BindCommand("/hunger", "debuggers", HandleHungerCmd, "Lists the current hunger-related variables");
- PluginManager:BindCommand("/poison", "debuggers", HandlePoisonCmd, "Sets food-poisoning for 15 seconds");
- PluginManager:BindCommand("/starve", "debuggers", HandleStarveCmd, "Sets the food level to zero");
- PluginManager:BindCommand("/fl", "debuggers", HandleFoodLevelCmd, "Sets the food level to the given value");
+ PluginManager:BindCommand("/le", "debuggers", HandleListEntitiesCmd, "- Shows a list of all the loaded entities");
+ PluginManager:BindCommand("/ke", "debuggers", HandleKillEntitiesCmd, "- Kills all the loaded entities");
+ PluginManager:BindCommand("/wool", "debuggers", HandleWoolCmd, "- Sets all your armor to blue wool");
+ PluginManager:BindCommand("/testwnd", "debuggers", HandleTestWndCmd, "- Opens up a window using plugin API");
+ PluginManager:BindCommand("/gc", "debuggers", HandleGCCmd, "- Activates the Lua garbage collector");
+ PluginManager:BindCommand("/fast", "debuggers", HandleFastCmd, "- Switches between fast and normal movement speed");
+ PluginManager:BindCommand("/dash", "debuggers", HandleDashCmd, "- Switches between fast and normal sprinting speed");
+ PluginManager:BindCommand("/hunger", "debuggers", HandleHungerCmd, "- Lists the current hunger-related variables");
+ PluginManager:BindCommand("/poison", "debuggers", HandlePoisonCmd, "- Sets food-poisoning for 15 seconds");
+ PluginManager:BindCommand("/starve", "debuggers", HandleStarveCmd, "- Sets the food level to zero");
+ PluginManager:BindCommand("/fl", "debuggers", HandleFoodLevelCmd, "- Sets the food level to the given value");
+ PluginManager:BindCommand("/spidey", "debuggers", HandleSpideyCmd, "- Shoots a line of web blocks until it hits non-air");
-- Enable the following line for BlockArea / Generator interface testing:
-- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED);
@@ -707,3 +708,34 @@ end
+
+function HandleSpideyCmd(a_Split, a_Player)
+ -- Place a line of cobwebs from the player's eyes until non-air block, in the line-of-sight of the player
+ local World = a_Player:GetWorld();
+
+ local Callbacks = {
+ OnNextBlock = function(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta)
+ if (a_BlockType ~= E_BLOCK_AIR) then
+ -- abort the trace
+ return true;
+ end
+ World:SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_COBWEB, 0);
+ end
+ };
+
+ local EyePos = a_Player:GetEyePosition();
+ local LookVector = a_Player:GetLookVector();
+ LookVector:Normalize();
+
+ -- Start cca 2 blocks away from the eyes
+ local Start = EyePos + LookVector + LookVector;
+ local End = EyePos + LookVector * 50;
+
+ cLineBlockTracer.Trace(World, Callbacks, Start.x, Start.y, Start.z, End.x, End.y, End.z);
+
+ return true;
+end
+
+
+
+
diff --git a/MCServer/monsters.ini b/MCServer/monsters.ini
index 80a0c7dde..8289e0a0a 100644
--- a/MCServer/monsters.ini
+++ b/MCServer/monsters.ini
@@ -1,9 +1,9 @@
[Spider]
AttackRange=5.0
AttackRate=1
-AttackDamage=1.0
+AttackDamage=2.0
SightDistance=25.0
-MaxHealth=10
+MaxHealth=16
[Chicken]
AttackRange=5.0
@@ -50,7 +50,7 @@ MaxHealth=40
[Zombiepigman]
AttackRange=5.0
AttackRate=1
-AttackDamage=5.0
+AttackDamage=7.0
SightDistance=25.0
MaxHealth=20
@@ -85,27 +85,70 @@ MaxHealth=8
[Skeleton]
AttackRange=5.0
AttackRate=1
-AttackDamage=4.0
+AttackDamage=3.0
SightDistance=25.0
MaxHealth=20
[Slime]
AttackRange=5.0
AttackRate=1
-AttackDamage=10.0
+AttackDamage=4.0
SightDistance=25.0
-MaxHealth=32
+MaxHealth=16
-[Spider]
+[Zombie]
AttackRange=5.0
AttackRate=1
-AttackDamage=2.0
+AttackDamage=4.0
SightDistance=25.0
-MaxHealth=16
+MaxHealth=20
-[Zombie]
+[Wolf]
AttackRange=5.0
AttackRate=1
AttackDamage=4.0
SightDistance=25.0
-MaxHealth=20 \ No newline at end of file
+MaxHealth=20
+
+[Blaze]
+AttackRange=5.0
+AttackRate=1
+AttackDamage=6.0
+SightDistance=25.0
+MaxHealth=20
+
+[Villager]
+AttackRange=5.0
+AttackRate=1
+AttackDamage=0.0
+SightDistance=25.0
+MaxHealth=20
+
+[Witch]
+AttackRange=5.0
+AttackRate=1
+AttackDamage=0.0
+SightDistance=25.0
+MaxHealth=26
+
+
+[Ocelot]
+AttackRange=5.0
+AttackRate=1
+AttackDamage=0.0
+SightDistance=25.0
+MaxHealth=10
+
+[Mooshroom]
+AttackRange=5.0
+AttackRate=1
+AttackDamage=0.0
+SightDistance=25.0
+MaxHealth=10
+
+[Magmacube]
+AttackRange=5.0
+AttackRate=1
+AttackDamage=6.0
+SightDistance=25.0
+MaxHealth=16
diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua
index f508ad5aa..1ab1aab88 100644
--- a/MCServer/webadmin/template.lua
+++ b/MCServer/webadmin/template.lua
@@ -4,6 +4,10 @@ function Output(String)
table.insert(SiteContent, String)
end
+
+
+
+
function GetTableSize(Table)
local Size = 0
for key,value in pairs(Table) do
@@ -12,6 +16,10 @@ function GetTableSize(Table)
return Size
end
+
+
+
+
function GetDefaultPage()
local PM = cRoot:Get():GetPluginManager()
@@ -42,11 +50,15 @@ function GetDefaultPage()
return Content, SubTitle
end
+
+
+
+
function ShowPage(WebAdmin, TemplateRequest)
SiteContent = {}
local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path)
local Title = "MCServer"
- local MemoryUsage = WebAdmin:GetMemoryUsage()
+ local MemoryUsage = cWebAdmin:GetMemoryUsage()
local NumChunks = cRoot:Get():GetTotalChunkCount()
local PluginPage = WebAdmin:GetPage(TemplateRequest.Request)
local PageContent = PluginPage.Content
@@ -408,6 +420,7 @@ function ShowPage(WebAdmin, TemplateRequest)
<div id="sidebar">
<ul class="sideNav">
]])
+
local AllPlugins = WebAdmin:GetPlugins()
for key,value in pairs(AllPlugins) do
@@ -421,6 +434,7 @@ function ShowPage(WebAdmin, TemplateRequest)
end
end
end
+
Output([[
</ul>