Setting files
Plugins git-svn-id: http://mc-server.googlecode.com/svn/trunk@5 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
aafef187ef
commit
7e010e7f8f
21
Lua-LICENSE.txt
Normal file
21
Lua-LICENSE.txt
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
41
Plugins/ChatLog.lua
Normal file
41
Plugins/ChatLog.lua
Normal file
@ -0,0 +1,41 @@
|
||||
local ChatLogPlugin = {}
|
||||
ChatLogPlugin.__index = ChatLogPlugin
|
||||
|
||||
function ChatLogPlugin:new()
|
||||
local t = {}
|
||||
setmetatable(t, ChatLogPlugin)
|
||||
local w = Lua__cPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
function ChatLogPlugin:OnDisable()
|
||||
Log( self:GetName() .. " v." .. self:GetVersion() .. " is shutting down..." )
|
||||
end
|
||||
|
||||
function ChatLogPlugin:Initialize()
|
||||
self:SetName( "ChatLog" )
|
||||
self:SetVersion( 1 )
|
||||
|
||||
PluginManager = cRoot:Get():GetPluginManager()
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_CHAT )
|
||||
|
||||
self.Logger = cMCLogger:new_local("ChatLog"..GetTime()..".txt")
|
||||
self.Logger:LogSimple("--- ChatLog started ---", 1);
|
||||
|
||||
Log( "Initialized " .. self:GetName() .. " v." .. self:GetVersion() )
|
||||
return true
|
||||
end
|
||||
|
||||
function ChatLogPlugin:OnChat( Message, Player )
|
||||
Server = cRoot:Get():GetServer()
|
||||
|
||||
-- Lets get loggin'
|
||||
self.Logger:LogSimple(Player:GetName() .. ": " .. Message, 1);
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
Plugin = ChatLogPlugin:new()
|
||||
cRoot:Get():GetPluginManager():AddPlugin( Plugin )
|
663
Plugins/Core.lua
Normal file
663
Plugins/Core.lua
Normal file
@ -0,0 +1,663 @@
|
||||
---- Some settings -----
|
||||
SHOW_PLUGIN_NAMES = true -- If true, plugin name will be shown before commands
|
||||
-- This is overwritten in the Initialize() function
|
||||
------------------------
|
||||
|
||||
local BannedPlayersIni = {}
|
||||
local WhiteListIni = {}
|
||||
|
||||
CorePlugin = {}
|
||||
CorePlugin.__index = CorePlugin
|
||||
|
||||
function CorePlugin:new()
|
||||
local t = {}
|
||||
setmetatable(t, CorePlugin)
|
||||
local w = Lua__cPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
function CorePlugin:OnDisable()
|
||||
LOG( self:GetName() .. " v." .. self:GetVersion() .. " is shutting down..." )
|
||||
end
|
||||
|
||||
function CorePlugin:Initialize()
|
||||
self:SetName( "Core" )
|
||||
self:SetVersion( 6 )
|
||||
|
||||
PluginManager = cRoot:Get():GetPluginManager()
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_PLAYER_JOIN )
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_LOGIN )
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_BLOCK_PLACE )
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_KILLED )
|
||||
|
||||
self:AddCommand("/help", " - [Page] Show this message", "core.help")
|
||||
self:AddCommand("/pluginlist", " - Show list of plugins", "core.pluginlist")
|
||||
self:AddCommand("/tp", " - [Player] - Teleport yourself to a player", "core.teleport")
|
||||
self:AddCommand("/item", " - [ItemID/Name] <Amount> - Spawn an item for yourself", "core.item")
|
||||
self:AddCommand("/list", " - Shows list of connected players", "core.playerlist")
|
||||
self:AddCommand("/motd", " - Show message of the day", "core.motd")
|
||||
self:AddCommand("/reload", " - Reload all plugins", "core.reload")
|
||||
self:AddCommand("/time", " - [Day/Night] - Sets the time of day", "core.time")
|
||||
self:AddCommand("/spawn", " - Return to the spawn", "core.spawn")
|
||||
self:AddCommand("/kick", " - [Player] - Kick a player", "core.kick")
|
||||
self:AddCommand("/ban", " - [Player] - Ban a player", "core.ban")
|
||||
self:AddCommand("/unban", " - [Player] - Unban a player", "core.unban")
|
||||
self:AddCommand("/top", " - Teleport yourself to the top most block", "core.top")
|
||||
|
||||
self:BindCommand( "/help", "core.help", HandleHelpCommand )
|
||||
self:BindCommand( "/pluginlist","core.pluginlist", HandlePluginListCommand )
|
||||
self:BindCommand( "/tp", "core.teleport", HandleTPCommand )
|
||||
self:BindCommand( "/item", "core.item", HandleItemCommand )
|
||||
self:BindCommand( "/i", "core.item", HandleItemCommand )
|
||||
self:BindCommand( "/list", "core.playerlist", HandlePlayerListCommand )
|
||||
self:BindCommand( "/who", "core.playerlist", HandlePlayerListCommand )
|
||||
self:BindCommand( "/playerlist","core.playerlist", HandlePlayerListCommand )
|
||||
self:BindCommand( "/motd", "core.motd", HandleMOTDCommand )
|
||||
self:BindCommand( "/reload", "core.reload", HandleReloadCommand )
|
||||
self:BindCommand( "/time", "core.time", HandleTimeCommand )
|
||||
self:BindCommand( "/spawn", "core.spawn", HandleSpawnCommand )
|
||||
self:BindCommand( "/home", "core.spawn", HandleSpawnCommand )
|
||||
self:BindCommand( "/kick", "core.kick", HandleKickCommand )
|
||||
self:BindCommand( "/ban", "core.ban", HandleBanCommand )
|
||||
self:BindCommand( "/unban", "core.unban", HandleUnbanCommand )
|
||||
self:BindCommand( "/top", "core.top", HandleTopCommand )
|
||||
|
||||
local IniFile = cIniFile("settings.ini")
|
||||
if ( IniFile:ReadFile() == true ) then
|
||||
SHOW_PLUGIN_NAMES = IniFile:GetValueB("HelpPlugin", "ShowPluginNames", true )
|
||||
end
|
||||
|
||||
itemsINI = cIniFile("items.ini")
|
||||
if ( itemsINI:ReadFile() == true ) then
|
||||
LOGINFO("Core: loaded " .. itemsINI:GetNumValues('Items') .. " item names.")
|
||||
HAVE_ITEM_NAMES = true
|
||||
end
|
||||
|
||||
-- Load whitelist, and add default values and stuff
|
||||
WhiteListIni = cIniFile("whitelist.ini")
|
||||
if ( WhiteListIni:ReadFile() == true ) then
|
||||
if( WhiteListIni:GetValueB("WhiteListSettings", "WhiteListOn", false) == true ) then
|
||||
if( WhiteListIni:GetNumValues("WhiteList") > 0 ) then
|
||||
LOGINFO("Core: loaded " .. WhiteListIni:GetNumValues('WhiteList') .. " whitelisted players.")
|
||||
else
|
||||
LOGWARN("WARNING: WhiteList is on, but there are no people in the whitelist!")
|
||||
end
|
||||
end
|
||||
else
|
||||
WhiteListIni:SetValueB("WhiteListSettings", "WhiteListOn", false )
|
||||
WhiteListIni:SetValue("WhiteList", "", "") -- So it adds an empty header
|
||||
WhiteListIni:DeleteValue("WhiteList", "") -- And remove the value
|
||||
WhiteListIni:KeyComment("WhiteList", "PlayerName=1")
|
||||
if( WhiteListIni:WriteFile() == false ) then
|
||||
LOGWARN("WARNING: Could not write to whitelist.ini")
|
||||
end
|
||||
end
|
||||
|
||||
-- Load banned players, and add default values and stuff
|
||||
BannedPlayersIni = cIniFile("banned.ini")
|
||||
if ( BannedPlayersIni:ReadFile() == true ) then
|
||||
if( BannedPlayersIni:GetNumValues("Banned") > 0 ) then
|
||||
LOGINFO("Core: loaded " .. BannedPlayersIni:GetNumValues("Banned") .. " banned players.")
|
||||
end
|
||||
else
|
||||
BannedPlayersIni:SetValue("Banned", "", "") -- So it adds an empty header
|
||||
BannedPlayersIni:DeleteValue("Banned", "") -- And remove the value
|
||||
BannedPlayersIni:KeyComment("Banned", "PlayerName=1")
|
||||
if( BannedPlayersIni:WriteFile() == false ) then
|
||||
LOGWARN("WARNING: Could not write to banned.ini")
|
||||
end
|
||||
end
|
||||
|
||||
LOG( "Initialized " .. self:GetName() .. " v." .. self:GetVersion() )
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleTopCommand( Split, Player )
|
||||
local World = cRoot:Get():GetWorld()
|
||||
|
||||
local PlayerPos = Player:GetPosition()
|
||||
local Height = World:GetHeight( math.floor(PlayerPos.x), math.floor(PlayerPos.z) )
|
||||
|
||||
Player:TeleportTo( PlayerPos.x, Height+1, PlayerPos.z )
|
||||
Player:SendMessage("Teleported to the top block")
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleKickCommand( Split, Player )
|
||||
if( #Split < 2 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /kick [Player] <Reason>" )
|
||||
return true
|
||||
end
|
||||
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local OtherPlayer = World:GetPlayer( Split[2] )
|
||||
if( OtherPlayer == nil ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
|
||||
return true
|
||||
end
|
||||
|
||||
local Reason = "You have been kicked"
|
||||
if( #Split > 2 ) then
|
||||
Reason = table.concat(Split, " ", 3)
|
||||
end
|
||||
|
||||
local Server = cRoot:Get():GetServer()
|
||||
LOGINFO( Player:GetName() .. " is kicking " .. OtherPlayer:GetName() .. " ( "..Reason..") " )
|
||||
Server:SendMessage( "Kicking " .. OtherPlayer:GetName() )
|
||||
|
||||
local ClientHandle = OtherPlayer:GetClientHandle()
|
||||
ClientHandle:Kick( Reason )
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleBanCommand( Split, Player )
|
||||
if( #Split < 2 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /ban [Player] <Reason>" )
|
||||
return true
|
||||
end
|
||||
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local OtherPlayer = World:GetPlayer( Split[2] )
|
||||
if( OtherPlayer == nil ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
|
||||
return true
|
||||
end
|
||||
|
||||
local Reason = "You have been banned"
|
||||
if( #Split > 2 ) then
|
||||
Reason = table.concat(Split, " ", 3)
|
||||
end
|
||||
|
||||
local Server = cRoot:Get():GetServer()
|
||||
LOGINFO( Player:GetName() .. " is banning " .. OtherPlayer:GetName() .. " ( "..Reason..") " )
|
||||
Server:SendMessage( "Banning " .. OtherPlayer:GetName() )
|
||||
|
||||
local ClientHandle = OtherPlayer:GetClientHandle()
|
||||
ClientHandle:Kick( Reason )
|
||||
|
||||
BannedPlayersIni:SetValueB("Banned", OtherPlayer:GetName(), true)
|
||||
BannedPlayersIni:WriteFile()
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleUnbanCommand( Split, Player )
|
||||
if( #Split < 2 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /unban [Player]" )
|
||||
return true
|
||||
end
|
||||
|
||||
if( BannedPlayersIni:GetValueB("Banned", Split[2], false) == false ) then
|
||||
Player:SendMessage( cChatColor.Green .. Split[2] .. " is not banned!" )
|
||||
return true
|
||||
end
|
||||
|
||||
BannedPlayersIni:SetValueB("Banned", Split[2], false, false)
|
||||
BannedPlayersIni:WriteFile()
|
||||
|
||||
local Server = cRoot:Get():GetServer()
|
||||
LOGINFO( Player:GetName() .. " is unbanning " .. Split[2] )
|
||||
Server:SendMessage( "Unbanning " .. Split[2] )
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleMOTDCommand( Split, Player )
|
||||
ShowMOTDTo( Player )
|
||||
return true
|
||||
end
|
||||
|
||||
function ShowMOTDTo( Player )
|
||||
Player:SendMessage( cChatColor.Gold .. "Welcome to the MCServer test server!" );
|
||||
Player:SendMessage( cChatColor.Gold .. "http://mcserver.ae-c.net/" );
|
||||
Player:SendMessage( cChatColor.Gold .. "Type /help for all commands" );
|
||||
end
|
||||
|
||||
function HandleSpawnCommand( Split, Player )
|
||||
World = cRoot:Get():GetWorld()
|
||||
Player:TeleportTo( World:GetSpawnX(), World:GetSpawnY(), World:GetSpawnZ() )
|
||||
LOGINFO( Player:GetName() .. " returned to spawn." )
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleTimeCommand( Split, Player )
|
||||
if( #Split ~= 2 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /time [Day/Night]" )
|
||||
return true;
|
||||
end
|
||||
|
||||
local Server = cRoot:Get():GetServer()
|
||||
if( string.upper( Split[2] ) == "DAY") then
|
||||
cRoot:Get():GetWorld():SetWorldTime( 0 )
|
||||
Server:SendMessage( cChatColor.Green .. Player:GetName() .. " set the time to Day.")
|
||||
elseif( string.upper( Split[2] ) == "NIGHT") then
|
||||
cRoot:Get():GetWorld():SetWorldTime( 12000 + 1000 )
|
||||
Server:SendMessage( cChatColor.Green .. Player:GetName() .. " set the time to Night.")
|
||||
else
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /time [Day/Night]" )
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleReloadCommand( Split, Player )
|
||||
Server = cRoot:Get():GetServer()
|
||||
Server:SendMessage( cChatColor.Green .. "Reloading all plugins." )
|
||||
cRoot:Get():GetPluginManager():ReloadPlugins()
|
||||
return true
|
||||
end
|
||||
|
||||
function HandlePlayerListCommand( Split, Player )
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local PlayerList = World:GetAllPlayers()
|
||||
|
||||
local Message = cChatColor.Green .. "Connected players: (".. cChatColor.White.. #PlayerList .. cChatColor.Green .. ")"
|
||||
Player:SendMessage( Message )
|
||||
|
||||
local PlayerTable = {}
|
||||
for i, TempPlayer in ipairs( PlayerList ) do
|
||||
local PlayerName = TempPlayer:GetName()
|
||||
table.insert(PlayerTable, PlayerName )
|
||||
end
|
||||
|
||||
Player:SendMessage( table.concat(PlayerTable, " ") )
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleHelpCommand( Split, Player )
|
||||
local PluginManager = cRoot:Get():GetPluginManager()
|
||||
|
||||
local LinesPerPage = 9
|
||||
local CurrentPage = 1
|
||||
local CurrentLine = 0
|
||||
|
||||
if( #Split == 2 ) then
|
||||
CurrentPage = tonumber(Split[2])
|
||||
end
|
||||
|
||||
local Pages = {}
|
||||
|
||||
local PluginList = PluginManager:GetAllPlugins()
|
||||
for i, Plugin in ipairs( PluginList ) do
|
||||
local Commands = Plugin:GetCommands()
|
||||
for i, v in ipairs( Commands ) do
|
||||
if( Player:HasPermission( v.Permission ) ) then
|
||||
local PageNum = math.floor( CurrentLine/LinesPerPage )+1
|
||||
if( Pages[ PageNum ] == nil ) then Pages[ PageNum ] = {} end -- Create page
|
||||
|
||||
if( Pages[ PageNum ].ShownName ~= Plugin:GetName() and SHOW_PLUGIN_NAMES == true ) then
|
||||
if( CurrentLine == LinesPerPage * PageNum -1 ) then -- Don't add if it's the last line of the page, it looks silly
|
||||
-- Add it to the next page instead
|
||||
CurrentLine = CurrentLine+1
|
||||
PageNum = math.floor( CurrentLine/LinesPerPage )+1
|
||||
|
||||
if( Pages[ PageNum ] == nil ) then Pages[ PageNum ] = {} end -- Create page
|
||||
table.insert( Pages[ PageNum ], cChatColor.Gold .. Plugin:GetName() )
|
||||
else
|
||||
Pages[ PageNum ].ShownName = Plugin:GetName()
|
||||
table.insert( Pages[ PageNum ], cChatColor.Gold .. Plugin:GetName() )
|
||||
end
|
||||
CurrentLine = CurrentLine+1
|
||||
PageNum = math.floor( CurrentLine/LinesPerPage )+1
|
||||
if( Pages[ PageNum ] == nil ) then Pages[ PageNum ] = {} end -- Create page
|
||||
end
|
||||
local Message = cChatColor.Blue .. v.Command .. v.Description;
|
||||
table.insert( Pages[ PageNum ], Message )
|
||||
CurrentLine = CurrentLine+1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Player:SendMessage( cChatColor.Purple .. "- All commands - " .. cChatColor.Gold .. "[Page " .. (CurrentPage) .."/"..#Pages.."]" )
|
||||
|
||||
if( Pages[CurrentPage] ~= nil ) then
|
||||
for i, v in ipairs(Pages[CurrentPage]) do
|
||||
Player:SendMessage( v )
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function HandlePluginListCommand( Split, Player )
|
||||
local PluginManager = cRoot:Get():GetPluginManager()
|
||||
local PluginList = PluginManager:GetAllPlugins()
|
||||
|
||||
local PluginTable = {}
|
||||
for i, Plugin in ipairs( PluginList ) do
|
||||
table.insert(PluginTable, Plugin:GetName() )
|
||||
end
|
||||
|
||||
Player:SendMessage( cChatColor.Green .. "Loaded plugins:" )
|
||||
Player:SendMessage( cChatColor.Gold .. table.concat(PluginTable, cChatColor.Gold.." ") )
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleItemCommand( Split, Player )
|
||||
if( #Split ~= 2 and #Split ~=3 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /item [ItemID/Name] <Amount>" )
|
||||
return true
|
||||
end
|
||||
|
||||
foundItem = false
|
||||
|
||||
ItemID = tonumber( Split[2] )
|
||||
if( ItemID == nil or not isValidItem( ItemID ) ) then
|
||||
-- nothing
|
||||
else
|
||||
foundItem = true
|
||||
end
|
||||
|
||||
if not foundItem then
|
||||
if ( HAVE_ITEM_NAMES == true ) then
|
||||
itemValue = itemsINI:GetValueI('Items', ''..Split[2]..'', 0)
|
||||
if itemValue ~= 0 then
|
||||
ItemID = itemValue
|
||||
if( ItemID == nil or not isValidItem( tonumber(itemValue) ) ) then
|
||||
-- nothing
|
||||
else
|
||||
foundItem = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if not foundItem then
|
||||
Player:SendMessage( cChatColor.Green .. "Invalid Item ID / Name !" )
|
||||
return true
|
||||
end
|
||||
|
||||
local Amount = 1
|
||||
if( #Split == 3 ) then
|
||||
Amount = tonumber( Split[3] )
|
||||
if( Amount == nil or Amount < 1 or Amount > 512 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Invalid Amount !" )
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local NewItem = cItem( ItemID, Amount )
|
||||
if( Player:GetInventory():AddItem( NewItem ) == true ) then
|
||||
Player:SendMessage( cChatColor.Green .. "There you go !" )
|
||||
LOG("Gave " .. Player:GetName() .. " " .. Amount .. " times " .. ItemID )
|
||||
else
|
||||
Player:SendMessage( cChatColor.Green .. "Not enough space in inventory !" )
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function HandleTPCommand( Split, Player )
|
||||
if( #Split ~= 2 ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Usage: /tp [PlayerName]" )
|
||||
return true
|
||||
end
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local OtherPlayer = World:GetPlayer( Split[2] )
|
||||
if( OtherPlayer == nil ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Can't find player " .. Split[2] )
|
||||
elseif( OtherPlayer == Player ) then
|
||||
Player:SendMessage( cChatColor.Green .. "Already there :)" )
|
||||
else
|
||||
Player:TeleportTo( OtherPlayer )
|
||||
Player:SendMessage( cChatColor.Green .. "You teleported to "..OtherPlayer:GetName().."!" )
|
||||
OtherPlayer:SendMessage( cChatColor.Green .. Player:GetName().." teleported to you!" )
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function CorePlugin:OnPlayerJoin( Player )
|
||||
ShowMOTDTo( Player )
|
||||
return false
|
||||
end
|
||||
|
||||
function CorePlugin:OnBlockPlace( Block, Player )
|
||||
|
||||
-- dont check if the direction is in the air
|
||||
if Block.m_Direction ~= -1 then
|
||||
|
||||
local X = Block.m_PosX
|
||||
local Y = Block.m_PosY
|
||||
local Z = Block.m_PosZ
|
||||
X, Y, Z = AddDirection( X, Y, Z, Block.m_Direction )
|
||||
if( Y >= 128 or Y < 0 ) then
|
||||
return true
|
||||
end
|
||||
|
||||
local collision = false
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local PlayerList = World:GetAllPlayers()
|
||||
|
||||
-- check if a player occupies the placement location
|
||||
for i, Player in ipairs( PlayerList ) do
|
||||
|
||||
-- drop the decimals, we only care about the full block X,Y,Z
|
||||
local PlayerX = math.floor(Player:GetPosX(), 0)
|
||||
local PlayerY = math.floor(Player:GetPosY(), 0)
|
||||
local PlayerZ = math.floor(Player:GetPosZ(), 0)
|
||||
|
||||
local BlockX = Block.m_PosX
|
||||
local BlockY = Block.m_PosY
|
||||
local BlockZ = Block.m_PosZ
|
||||
|
||||
-- player height is 2 blocks, so we check the position and then offset it up one
|
||||
-- so they can't place a block on there face
|
||||
|
||||
if Block.m_Direction == 0 then if PlayerY == BlockY-2 and PlayerX == BlockX and PlayerZ == BlockZ then collision = true end end
|
||||
if Block.m_Direction == 1 then if PlayerY == BlockY+1 and PlayerX == BlockX and PlayerZ == BlockZ then collision = true end end
|
||||
|
||||
if Block.m_Direction == 2 then if PlayerY == BlockY and PlayerX == BlockX and PlayerZ == BlockZ-1 then collision = true end end
|
||||
if Block.m_Direction == 2 then if PlayerY+1 == BlockY and PlayerX == BlockX and PlayerZ == BlockZ-1 then collision = true end end
|
||||
|
||||
if Block.m_Direction == 3 then if PlayerY == BlockY and PlayerX == BlockX and PlayerZ == BlockZ+1 then collision = true end end
|
||||
if Block.m_Direction == 3 then if PlayerY+1 == BlockY and PlayerX == BlockX and PlayerZ == BlockZ+1 then collision = true end end
|
||||
|
||||
if Block.m_Direction == 4 then if PlayerY == BlockY and PlayerX == BlockX-1 and PlayerZ == BlockZ then collision = true end end
|
||||
if Block.m_Direction == 4 then if PlayerY+1 == BlockY and PlayerX == BlockX-1 and PlayerZ == BlockZ then collision = true end end
|
||||
|
||||
if Block.m_Direction == 5 then if PlayerY == BlockY and PlayerX == BlockX+1 and PlayerZ == BlockZ then collision = true end end
|
||||
if Block.m_Direction == 5 then if PlayerY+1 == BlockY and PlayerX == BlockX+1 and PlayerZ == BlockZ then collision = true end end
|
||||
|
||||
end
|
||||
|
||||
if collision then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return false
|
||||
|
||||
end
|
||||
|
||||
function CorePlugin:OnKilled( Killed, Killer )
|
||||
if( Killer == nil ) then
|
||||
local KilledPlayer = tolua.cast( Killed, "cPlayer")
|
||||
if( not KilledPlayer:IsA("cPlayer") or KilledPlayer == nil ) then
|
||||
return false
|
||||
end
|
||||
|
||||
local Server = cRoot:Get():GetServer()
|
||||
Server:SendMessage( cChatColor.Red .. KilledPlayer:GetName() .. " died" )
|
||||
else
|
||||
local KilledPlayer = tolua.cast( Killed, "cPlayer")
|
||||
if( not KilledPlayer:IsA("cPlayer") or KilledPlayer == nil ) then
|
||||
return false
|
||||
end
|
||||
local KillerPlayer = tolua.cast( Killer, "cPlayer")
|
||||
if( not KillerPlayer:IsA("cPlayer") or KillerPlayer == nil ) then
|
||||
return false
|
||||
end
|
||||
|
||||
local Server = cRoot:Get():GetServer()
|
||||
Server:SendMessage( cChatColor.Red .. KilledPlayer:GetName() .. " was killed by " .. KillerPlayer:GetName() .. "!" )
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function CorePlugin:OnLogin( PacketData )
|
||||
if( PacketData.m_Username ~= "" ) then
|
||||
if( BannedPlayersIni:GetValueB("Banned", PacketData.m_Username, false) == true ) then
|
||||
local Server = cRoot:Get():GetServer()
|
||||
Server:SendMessage( PacketData.m_Username .. " tried to join, but is banned!" )
|
||||
LOGINFO( PacketData.m_Username .. " tried to join, but is banned!")
|
||||
return true -- Player is banned, return true to deny access
|
||||
end
|
||||
if( WhiteListIni:GetValueB("WhiteListSettings", "WhiteListOn", false ) == true ) then
|
||||
if( WhiteListIni:GetValueB("WhiteList", PacketData.m_Username, false ) == false ) then -- not on whitelist
|
||||
local Server = cRoot:Get():GetServer()
|
||||
Server:SendMessage( PacketData.m_Username .. " tried to join, but is not on the whitelist." )
|
||||
LOGINFO( PacketData.m_Username .. " tried to join, but is not on the whitelist." )
|
||||
return true -- Deny access to the server
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
Plugin = CorePlugin:new()
|
||||
cRoot:Get():GetPluginManager():AddPlugin( Plugin )
|
||||
|
||||
------------------------------------------------
|
||||
-- Now some webadmin stuffs! --
|
||||
------------------------------------------------
|
||||
local PlayerListWeb = {}
|
||||
PlayerListWeb.__index = PlayerListWeb
|
||||
|
||||
function PlayerListWeb:new()
|
||||
local t = {}
|
||||
setmetatable(t, PlayerListWeb)
|
||||
local w = Lua__cWebPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
function PlayerListWeb:HandleRequest( Request )
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local Content = ""
|
||||
Content = Content .. "<br>Connected Players: <b>" .. World:GetNumPlayers() .. "</b><br>"
|
||||
Content = Content .. "<ul>"
|
||||
|
||||
local PlayerList = World:GetAllPlayers()
|
||||
for i, Player in ipairs( PlayerList ) do
|
||||
Content = Content .. "<li>" .. Player:GetName()
|
||||
end
|
||||
|
||||
Content = Content .. "</ul>"
|
||||
return Content
|
||||
end
|
||||
|
||||
WebPlugin = PlayerListWeb:new()
|
||||
WebPlugin:SetName("PlayerList")
|
||||
|
||||
------------------------------------------------
|
||||
-- Reload web plugin --
|
||||
------------------------------------------------
|
||||
local ReloadWeb = {}
|
||||
ReloadWeb.__index = ReloadWeb
|
||||
|
||||
function ReloadWeb:new()
|
||||
local t = {}
|
||||
setmetatable(t, ReloadWeb)
|
||||
local w = Lua__cWebPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
function ReloadWeb:HandleRequest( Request )
|
||||
local World = cRoot:Get():GetWorld()
|
||||
local Content = ""
|
||||
|
||||
if( Request.Params:get("reload") ~= "" ) then
|
||||
Content = Content .. "<head><meta http-equiv=\"refresh\" content=\"1;././\"></head>"
|
||||
Content = Content .. "<br>Reloading plugins...<br>"
|
||||
cRoot:Get():GetPluginManager():ReloadPlugins()
|
||||
else
|
||||
Content = Content .. "<br>Click the reload button to reload all plugins!<br>"
|
||||
Content = Content .. "<form method=GET>"
|
||||
Content = Content .. "<input type=\"submit\" name=\"reload\" value=\"Reload!\">"
|
||||
Content = Content .. "</form>"
|
||||
end
|
||||
return Content
|
||||
end
|
||||
|
||||
WebPlugin = ReloadWeb:new()
|
||||
WebPlugin:SetName("Reload")
|
||||
|
||||
------------------------------------------------
|
||||
-- Whitelist web plugin --
|
||||
------------------------------------------------
|
||||
local WhiteListWeb = {}
|
||||
WhiteListWeb.__index = WhiteListWeb
|
||||
|
||||
function WhiteListWeb:new()
|
||||
local t = {}
|
||||
setmetatable(t, WhiteListWeb)
|
||||
local w = Lua__cWebPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
local function HTMLDeleteButton( name )
|
||||
return "<form method=GET><input type=\"hidden\" name=\"whitelist-delete\" value=\"".. name .."\"><input type=\"submit\" value=\"Remove from whitelist\"></form>"
|
||||
end
|
||||
|
||||
function WhiteListWeb:HandleRequest( Request )
|
||||
local World = cRoot:Get():GetWorld()
|
||||
|
||||
local UpdateMessage = ""
|
||||
if( Request.Params:get("whitelist-add") ~= "" ) then
|
||||
local PlayerName = Request.Params:get("whitelist-add")
|
||||
|
||||
if( WhiteListIni:GetValueB("WhiteList", PlayerName, false) == true ) then
|
||||
UpdateMessage = "<b>".. PlayerName.."</b> is already on the whitelist"
|
||||
else
|
||||
WhiteListIni:SetValueB("WhiteList", PlayerName, true )
|
||||
UpdateMessage = "Added <b>" .. PlayerName .. "</b> to whitelist."
|
||||
WhiteListIni:WriteFile()
|
||||
end
|
||||
elseif( Request.Params:get("whitelist-delete") ~= "" ) then
|
||||
local PlayerName = Request.Params:get("whitelist-delete")
|
||||
WhiteListIni:DeleteValue( "WhiteList", PlayerName )
|
||||
UpdateMessage = "Removed <b>" .. PlayerName .. "</b> from whitelist."
|
||||
WhiteListIni:WriteFile()
|
||||
elseif( Request.Params:get("whitelist-reload") ~= "" ) then
|
||||
WhiteListIni:Erase() -- Empty entire loaded ini first, otherwise weird shit goes down
|
||||
WhiteListIni:ReadFile()
|
||||
UpdateMessage = "Loaded from disk"
|
||||
end
|
||||
|
||||
|
||||
local Content = ""
|
||||
Content = Content .. "<h4>Whitelisted players</h4>"
|
||||
Content = Content .. "<table>"
|
||||
local KeyNum = WhiteListIni:FindKey("WhiteList")
|
||||
local NumValues = WhiteListIni:GetNumValues(KeyNum)
|
||||
for Num = 0, NumValues-1 do
|
||||
if( WhiteListIni:GetValue(KeyNum, Num, "0") == "1" ) then
|
||||
local PlayerName = WhiteListIni:GetValueName(KeyNum, Num )
|
||||
Content = Content .. "<tr><td>" .. PlayerName .. "</td><td>" .. HTMLDeleteButton( PlayerName ) .. "</td></tr>"
|
||||
end
|
||||
end
|
||||
Content = Content .. "</table>"
|
||||
Content = Content .. "<br><h4>Add player to whitelist</h4>"
|
||||
Content = Content .. "<form method=\"GET\">"
|
||||
Content = Content .. "<input type=\"text\" name=\"whitelist-add\"><input type=\"submit\" value=\"Add player\">"
|
||||
Content = Content .. "</form>"
|
||||
Content = Content .. "<form method=\"GET\">"
|
||||
Content = Content .. "<input type=\"submit\" name=\"whitelist-reload\" value=\"Reload from disk\">"
|
||||
Content = Content .. "</form>"
|
||||
Content = Content .. "<br>"..UpdateMessage
|
||||
return Content
|
||||
end
|
||||
|
||||
WebPlugin = WhiteListWeb:new()
|
||||
WebPlugin:SetName("WhiteList")
|
149
Plugins/Fire.lua
Normal file
149
Plugins/Fire.lua
Normal file
@ -0,0 +1,149 @@
|
||||
local FirePlugin = {}
|
||||
FirePlugin.__index = FirePlugin
|
||||
|
||||
FireBlocks = {}
|
||||
|
||||
function FirePlugin:new()
|
||||
local t = {}
|
||||
setmetatable(t, FirePlugin)
|
||||
local w = Lua__cPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
function IsForeverBurnable( BlockID )
|
||||
if( BlockID == E_BLOCK_BLOODSTONE ) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function IsBurnable( BlockID )
|
||||
if( BlockID == E_BLOCK_LEAVES or BlockID == E_BLOCK_LOG ) then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function FindBurnableAround( X, Y, Z )
|
||||
World = cRoot:Get():GetWorld()
|
||||
|
||||
ListBurnables = {}
|
||||
if( IsBurnable( World:GetBlock(X-1, Y, Z) ) ) then
|
||||
table.insert( ListBurnables, { ["x"] = X-1, ["y"] = Y, ["z"] = Z } )
|
||||
end
|
||||
if( IsBurnable( World:GetBlock(X+1, Y, Z) ) ) then
|
||||
table.insert( ListBurnables, { ["x"] = X+1, ["y"] = Y, ["z"] = Z } )
|
||||
end
|
||||
if( IsBurnable( World:GetBlock(X, Y-1, Z) ) ) then
|
||||
table.insert( ListBurnables, { ["x"] = X, ["y"] = Y-1, ["z"] = Z } )
|
||||
end
|
||||
if( IsBurnable( World:GetBlock(X, Y+1, Z) ) ) then
|
||||
table.insert( ListBurnables, { ["x"] = X, ["y"] = Y+1, ["z"] = Z } )
|
||||
end
|
||||
if( IsBurnable( World:GetBlock(X, Y, Z-1) ) ) then
|
||||
table.insert( ListBurnables, { ["x"] = X, ["y"] = Y, ["z"] = Z-1 } )
|
||||
end
|
||||
if( IsBurnable( World:GetBlock(X, Y, Z+1) ) ) then
|
||||
table.insert( ListBurnables, { ["x"] = X, ["y"] = Y, ["z"] = Z+1 } )
|
||||
end
|
||||
|
||||
return ListBurnables
|
||||
end
|
||||
|
||||
function FirePlugin:OnDisable()
|
||||
Log( self:GetName() .. " v." .. self:GetVersion() .. " is shutting down..." )
|
||||
end
|
||||
|
||||
function FirePlugin:Initialize()
|
||||
self:SetName( "Fire" )
|
||||
self:SetVersion( 1 )
|
||||
|
||||
PluginManager = cRoot:Get():GetPluginManager()
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_TICK )
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_BLOCK_PLACE )
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_BLOCK_DIG )
|
||||
|
||||
Log( "Initialized " .. self:GetName() .. " v." .. self:GetVersion() )
|
||||
return true
|
||||
end
|
||||
|
||||
function FirePlugin:OnBlockPlace( PacketData, Player )
|
||||
|
||||
if( PacketData.m_ItemType == E_BLOCK_FIRE or PacketData.m_ItemType == E_ITEM_FLINT_AND_STEEL ) then
|
||||
if( PacketData.m_Direction > -1 ) then
|
||||
local X = PacketData.m_PosX
|
||||
local Y = PacketData.m_PosY
|
||||
local Z = PacketData.m_PosZ
|
||||
|
||||
X, Y, Z = AddDirection( X, Y, Z, PacketData.m_Direction )
|
||||
|
||||
--Since flint and steel doesn't do anything on the server side yet
|
||||
if( PacketData.m_ItemType == E_ITEM_FLINT_AND_STEEL ) then
|
||||
local World = cRoot:Get():GetWorld()
|
||||
World:SetBlock( X, Y, Z, E_BLOCK_FIRE, 0 )
|
||||
end
|
||||
|
||||
if( not IsForeverBurnable( World:GetBlock( X, Y-1, Z ) ) ) then
|
||||
table.insert( FireBlocks, { ["x"] = X, ["y"] = Y, ["z"] = Z } )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false -- dont forbid placing the fire
|
||||
end
|
||||
|
||||
-- To put out fires! :D
|
||||
function FirePlugin:OnBlockDig( PacketData, Player )
|
||||
if( PacketData.m_Direction < 0 ) then
|
||||
return false
|
||||
end
|
||||
|
||||
local X = PacketData.m_PosX
|
||||
local Y = PacketData.m_PosY
|
||||
local Z = PacketData.m_PosZ
|
||||
|
||||
X, Y, Z = AddDirection( X, Y, Z, PacketData.m_Direction )
|
||||
|
||||
local World = cRoot:Get():GetWorld()
|
||||
if( World:GetBlock( X, Y, Z ) == E_BLOCK_FIRE ) then
|
||||
World:SetBlock( X, Y, Z, E_BLOCK_AIR, 0 )
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
NumTicks = 0
|
||||
function FirePlugin:Tick( DeltaTime )
|
||||
if( NumTicks < 10 ) then -- Only spread every 10 ticks, to make sure it doesnt happen too fast
|
||||
NumTicks = NumTicks + 1
|
||||
return
|
||||
end
|
||||
NumTicks = 0
|
||||
|
||||
World = cRoot:Get():GetWorld()
|
||||
|
||||
NewTable = {}
|
||||
for key,val in pairs(FireBlocks) do
|
||||
X = val["x"]
|
||||
Y = val["y"]
|
||||
Z = val["z"]
|
||||
Burnables = FindBurnableAround(X, Y, Z)
|
||||
if( math.random(10) > 5 ) then
|
||||
table.insert( NewTable, val )
|
||||
elseif( #Burnables > 0 ) then
|
||||
ToBurn = Burnables[ math.random( #Burnables ) ]
|
||||
World:SetBlock( ToBurn["x"], ToBurn["y"], ToBurn["z"], E_BLOCK_FIRE, 0 )
|
||||
table.insert( NewTable, ToBurn )
|
||||
table.insert( NewTable, val )
|
||||
else
|
||||
World:SetBlock( X, Y, Z, 0, 0 )
|
||||
end
|
||||
end
|
||||
FireBlocks = NewTable
|
||||
end
|
||||
|
||||
Plugin = FirePlugin:new()
|
||||
cRoot:Get():GetPluginManager():AddPlugin( Plugin )
|
169
Plugins/MagicCarpet.lua
Normal file
169
Plugins/MagicCarpet.lua
Normal file
@ -0,0 +1,169 @@
|
||||
-- Location object
|
||||
cLocation = {}
|
||||
function cLocation:new( x, y, z )
|
||||
local object = { x = x, y = y, z = z }
|
||||
setmetatable(object, { __index = cLocation })
|
||||
return object
|
||||
end
|
||||
|
||||
-- Offsets
|
||||
cFibers = { }
|
||||
function cFibers:new()
|
||||
local object = {
|
||||
cLocation:new( 2, -1, 2 ),
|
||||
cLocation:new( 2, -1, 1 ),
|
||||
cLocation:new( 2, -1, 0 ),
|
||||
cLocation:new( 2, -1, -1 ),
|
||||
cLocation:new( 2, -1, -2 ),
|
||||
cLocation:new( 1, -1, 2 ),
|
||||
cLocation:new( 1, -1, 1 ),
|
||||
cLocation:new( 1, -1, 0 ),
|
||||
cLocation:new( 1, -1, -1 ),
|
||||
cLocation:new( 1, -1, -2 ),
|
||||
cLocation:new( 0, -1, 2 ),
|
||||
cLocation:new( 0, -1, 1 ),
|
||||
cLocation:new( 0, -1, 0 ),
|
||||
cLocation:new( 0, -1, -1 ),
|
||||
cLocation:new( 0, -1, -2 ),
|
||||
cLocation:new( -1, -1, 2 ),
|
||||
cLocation:new( -1, -1, 1 ),
|
||||
cLocation:new( -1, -1, 0 ),
|
||||
cLocation:new( -1, -1, -1 ),
|
||||
cLocation:new( -1, -1, -2 ),
|
||||
cLocation:new( -2, -1, 2 ),
|
||||
cLocation:new( -2, -1, 1 ),
|
||||
cLocation:new( -2, -1, 0 ),
|
||||
cLocation:new( -2, -1, -1 ),
|
||||
cLocation:new( -2, -1, -2 ),
|
||||
imadeit = false,
|
||||
}
|
||||
setmetatable(object, { __index = cFibers })
|
||||
return object;
|
||||
end
|
||||
|
||||
-- Carpet object
|
||||
cCarpet = {}
|
||||
function cCarpet:new()
|
||||
local object = { Location = cLocation:new(0,0,0),
|
||||
Fibers = cFibers:new(),
|
||||
}
|
||||
setmetatable(object, { __index = cCarpet })
|
||||
return object
|
||||
end
|
||||
|
||||
function cCarpet:remove()
|
||||
local World = cRoot:Get():GetWorld()
|
||||
for i, fib in ipairs( self.Fibers ) do
|
||||
local x = self.Location.x + fib.x
|
||||
local y = self.Location.y + fib.y
|
||||
local z = self.Location.z + fib.z
|
||||
local BlockID = World:GetBlock( x, y, z )
|
||||
if( fib.imadeit == true and BlockID == E_BLOCK_GLASS ) then
|
||||
World:SetBlock( x, y, z, 0, 0 )
|
||||
fib.imadeit = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function cCarpet:draw()
|
||||
local World = cRoot:Get():GetWorld()
|
||||
for i, fib in ipairs( self.Fibers ) do
|
||||
local x = self.Location.x + fib.x
|
||||
local y = self.Location.y + fib.y
|
||||
local z = self.Location.z + fib.z
|
||||
local BlockID = World:GetBlock( x, y, z )
|
||||
if( BlockID == 0 ) then
|
||||
fib.imadeit = true
|
||||
World:SetBlock( x, y, z, E_BLOCK_GLASS, 0 )
|
||||
else
|
||||
fib.imadeit = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function cCarpet:moveTo( NewPos )
|
||||
local x = math.floor( NewPos.x )
|
||||
local y = math.floor( NewPos.y )
|
||||
local z = math.floor( NewPos.z )
|
||||
if( self.Location.x ~= x or self.Location.y ~= y or self.Location.z ~= z ) then
|
||||
self:remove()
|
||||
self.Location = cLocation:new( x, y, z )
|
||||
self:draw()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
MagicCarpetPlugin = {}
|
||||
MagicCarpetPlugin.__index = MagicCarpetPlugin
|
||||
|
||||
function MagicCarpetPlugin:new()
|
||||
local t = {}
|
||||
setmetatable(t, MagicCarpetPlugin)
|
||||
local w = Lua__cPlugin:new()
|
||||
tolua.setpeer(w, t)
|
||||
w:tolua__set_instance(w)
|
||||
return w
|
||||
end
|
||||
|
||||
function MagicCarpetPlugin:Initialize()
|
||||
self:SetName( "MagicCarpet" )
|
||||
self:SetVersion( 1 )
|
||||
|
||||
PluginManager = cRoot:Get():GetPluginManager()
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_PLAYER_MOVE)
|
||||
PluginManager:AddHook( self, cPluginManager.E_PLUGIN_DISCONNECT)
|
||||
|
||||
self:AddCommand("/mc", " - Spawns a magical carpet!", "magiccarpet")
|
||||
self:BindCommand( "/mc", "magiccarpet", HandleCarpetCommand )
|
||||
|
||||
self.Carpets = {}
|
||||
|
||||
Log( "Initialized " .. self:GetName() .. " v." .. self:GetVersion() )
|
||||
return true
|
||||
end
|
||||
|
||||
function MagicCarpetPlugin:OnDisable()
|
||||
Log( self:GetName() .. " v." .. self:GetVersion() .. " is shutting down..." )
|
||||
for i, Carpet in pairs( self.Carpets ) do
|
||||
Carpet:remove()
|
||||
end
|
||||
end
|
||||
|
||||
function HandleCarpetCommand( Split, Player )
|
||||
Carpet = self.Carpets[ Player ]
|
||||
if( Carpet == nil ) then
|
||||
self.Carpets[ Player ] = cCarpet:new()
|
||||
Player:SendMessage("You're on a magic carpet!" )
|
||||
else
|
||||
Carpet:remove()
|
||||
self.Carpets[ Player ] = nil
|
||||
Player:SendMessage("The carpet vanished!" )
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function MagicCarpetPlugin:OnDisconnect( Reason, Player )
|
||||
local Carpet = self.Carpets[ Player ]
|
||||
if( Carpet ~= nil ) then
|
||||
Carpet:remove()
|
||||
end
|
||||
self.Carpets[ Player ] = nil
|
||||
end
|
||||
|
||||
function MagicCarpetPlugin:OnPlayerMove( Player )
|
||||
local Carpet = self.Carpets[ Player ]
|
||||
if( Carpet == nil ) then
|
||||
return
|
||||
end
|
||||
|
||||
if( Player:GetPitch() == 90 ) then
|
||||
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY()-1, Player:GetPosZ() ) )
|
||||
else
|
||||
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() ) )
|
||||
end
|
||||
end
|
||||
|
||||
Plugin = MagicCarpetPlugin:new()
|
||||
cRoot:Get():GetPluginManager():AddPlugin( Plugin )
|
||||
|
21
clean.bat
Normal file
21
clean.bat
Normal file
@ -0,0 +1,21 @@
|
||||
del *.ncb
|
||||
del *.ilk
|
||||
del *.lib
|
||||
del *.exp
|
||||
del *.map
|
||||
del *.pdb
|
||||
del MCServer.exe
|
||||
del MCServer_debug.exe
|
||||
del log.txt
|
||||
del *.bsc
|
||||
del applog.txt
|
||||
del *.suo /AH
|
||||
del *.user
|
||||
del debug\*.* /Q
|
||||
del release\*.* /Q
|
||||
rd release /Q
|
||||
rd debug /Q
|
||||
|
||||
cd VC2010
|
||||
call clean.bat
|
||||
cd ..
|
64
furnace.txt
Normal file
64
furnace.txt
Normal file
@ -0,0 +1,64 @@
|
||||
#**************************
|
||||
# Default Furnace Recipes #
|
||||
#*************************#
|
||||
#
|
||||
#
|
||||
#******************************************************#
|
||||
# Basic Notation Help
|
||||
#******************************************************#
|
||||
#
|
||||
# **** Item Definition ****
|
||||
# An Item is defined by an Item ID, an amount (and health)
|
||||
# The health is optional, and if not specified it's
|
||||
# assumed to be 0
|
||||
#
|
||||
# -Cactus Green:
|
||||
# 351 : 1 ( : 2 )
|
||||
# ItemID : Amount ( : Health )
|
||||
#
|
||||
#
|
||||
# **** Recipe and result ****
|
||||
#
|
||||
# 4:1@10000=1:1 -> Produces 1 smooth stone from
|
||||
# 1 cobblestone in 10 second
|
||||
#
|
||||
# 4 : 1 @ 10000 = 1 : 1
|
||||
# ItemID : Amount @ milliseconds = ItemID : Amount
|
||||
#
|
||||
# **** Burnable Materials / Fuel ****
|
||||
#
|
||||
# !17:1=15000 -> 1 Wood burns for 15000 milliseconds
|
||||
# (15 s)
|
||||
#
|
||||
# ! 17 : 1 = 15000
|
||||
# Fuel ItemID : Amount = milliseconds
|
||||
#
|
||||
#******************************************************#
|
||||
|
||||
#--------------------------
|
||||
# Let's get cookin' :D
|
||||
|
||||
4:1 @10000=1:1 #-> 1 Cobblestone -> 1 Rock
|
||||
15:1 @10000=265:1 #-> 1 Iron Ore -> 1 Iron Ingot
|
||||
14:1 @10000=266:1 #-> 1 Gold Ore -> 1 Gold Ingot
|
||||
12:1 @10000=20:1 #-> 1 Sand -> 1 Glass
|
||||
319:1@10000=320:1 #-> 1 Raw Pork -> 1 Cooked Pork
|
||||
337:1@10000=336:1 #-> 1 Clay -> 1 Clay Brick
|
||||
349:1@10000=350:1 #-> 1 Raw Fish -> 1 Cooked Fish
|
||||
17:1 @10000=263:1 #-> 1 Wood -> 1 Charcoal
|
||||
81:1 @10000=351:1:2 #-> 1 Cactus -> 1 Dye
|
||||
|
||||
#--------------------------
|
||||
# Burn baby! Buuurn!
|
||||
|
||||
!263:1 = 80000 #-> 1 Charcoal -> 80 sec
|
||||
!5:1 = 15000 #-> 1 Planks -> 15 sec
|
||||
!280:1 = 5000 #-> 1 Stick -> 5 sec
|
||||
!85:1 = 15000 #-> 1 Fence -> 15 sec
|
||||
!53:1 = 15000 #-> 1 Wooden Stairs -> 15 sec
|
||||
!58:1 = 15000 #-> 1 Crafting Table -> 15 sec
|
||||
!47:1 = 15000 #-> 1 Bookshelf -> 15 sec
|
||||
!54:1 = 15000 #-> 1 Chest -> 15 sec
|
||||
!84:1 = 15000 #-> 1 Jukebox -> 15 sec
|
||||
!327:1 = 1000000 #-> 1 Lava Bucket -> 1000 sec
|
||||
!17:1 = 15000 #-> 1 Wood -> 15 sec
|
17
groups.ini
Normal file
17
groups.ini
Normal file
@ -0,0 +1,17 @@
|
||||
[Admins]
|
||||
Permissions=*
|
||||
Color=c
|
||||
|
||||
[Mods]
|
||||
Color=5
|
||||
Inherits=Vips
|
||||
Permissions=core.time,core.item
|
||||
|
||||
[Vips]
|
||||
Permissions=core.teleport
|
||||
Color=2
|
||||
Inherits=Default
|
||||
|
||||
[Default]
|
||||
Permissions=core.help,core.playerlist,core.pluginlist,core.spawn
|
||||
Color=7
|
213
items.ini
Normal file
213
items.ini
Normal file
@ -0,0 +1,213 @@
|
||||
[Items]
|
||||
rock=1
|
||||
stone=1
|
||||
grass=2
|
||||
dirt=3
|
||||
cobblestone=4
|
||||
cobble=4
|
||||
wood=5
|
||||
sapling=6
|
||||
adminium=7
|
||||
bedrock=7
|
||||
water=8
|
||||
stillwater=9
|
||||
swater=9
|
||||
lava=10
|
||||
stilllava=11
|
||||
slava=11
|
||||
sand=12
|
||||
gravel=13
|
||||
goldore=14
|
||||
ironore=15
|
||||
coalore=16
|
||||
tree=17
|
||||
log=17
|
||||
leaves=18
|
||||
sponge=19
|
||||
glass=20
|
||||
cloth=35
|
||||
flower=37
|
||||
rose=38
|
||||
brownmushroom=39
|
||||
redmushroom=40
|
||||
gold=41
|
||||
goldblock=41
|
||||
iron=42
|
||||
ironblock=42
|
||||
doublestair=43
|
||||
stair=44
|
||||
step=44
|
||||
brickblock=45
|
||||
brickwall=45
|
||||
tnt=46
|
||||
bookshelf=47
|
||||
bookcase=47
|
||||
mossycobblestone=48
|
||||
mossy=48
|
||||
obsidian=49
|
||||
torch=50
|
||||
fire=51
|
||||
mobspawner=52
|
||||
woodstairs=53
|
||||
chest=54
|
||||
redstonedust=55
|
||||
redstonewire=55
|
||||
diamondore=56
|
||||
diamondblock=57
|
||||
workbench=58
|
||||
crop=59
|
||||
crops=59
|
||||
soil=60
|
||||
furnace=61
|
||||
litfurnace=62
|
||||
signblock=63
|
||||
wooddoorblock=64
|
||||
ladder=65
|
||||
rails=66
|
||||
rail=66
|
||||
track=66
|
||||
tracks=66
|
||||
cobblestonestairs=67
|
||||
stairs=67
|
||||
signblocktop=68
|
||||
wallsign=68
|
||||
lever=69
|
||||
rockplate=70
|
||||
stoneplate=70
|
||||
irondoorblock=71
|
||||
woodplate=72
|
||||
redstoneore=73
|
||||
redstoneorealt=74
|
||||
redstonetorchoff=75
|
||||
redstonetorchon=76
|
||||
button=77
|
||||
snow=78
|
||||
ice=79
|
||||
snowblock=80
|
||||
cactus=81
|
||||
clayblock=82
|
||||
reedblock=83
|
||||
jukebox=84
|
||||
fence=85
|
||||
pumpkin=86
|
||||
netherstone=87
|
||||
slowsand=88
|
||||
lightstone=89
|
||||
portal=90
|
||||
jackolantern=91
|
||||
jacko=91
|
||||
ironshovel=256
|
||||
ironspade=256
|
||||
ironpickaxe=257
|
||||
ironpick=257
|
||||
ironaxe=258
|
||||
flintandsteel=259
|
||||
lighter=259
|
||||
apple=260
|
||||
bow=261
|
||||
arrow=262
|
||||
coal=263
|
||||
diamond=264
|
||||
ironbar=265
|
||||
goldbar=266
|
||||
ironsword=267
|
||||
woodsword=268
|
||||
woodshovel=269
|
||||
woodspade=269
|
||||
woodpickaxe=270
|
||||
woodpick=270
|
||||
woodaxe=271
|
||||
stonesword=272
|
||||
stoneshovel=273
|
||||
stonespade=273
|
||||
stonepickaxe=274
|
||||
stonepick=274
|
||||
stoneaxe=275
|
||||
diamondsword=276
|
||||
diamondshovel=277
|
||||
diamondspade=277
|
||||
diamondpickaxe=278
|
||||
diamondpick=278
|
||||
diamondaxe=279
|
||||
stick=280
|
||||
bowl=281
|
||||
bowlwithsoup=282
|
||||
soupbowl=282
|
||||
soup=282
|
||||
goldsword=283
|
||||
goldshovel=284
|
||||
goldspade=284
|
||||
goldpickaxe=285
|
||||
goldpick=285
|
||||
goldaxe=286
|
||||
string=287
|
||||
feather=288
|
||||
gunpowder=289
|
||||
woodhoe=290
|
||||
stonehoe=291
|
||||
ironhoe=292
|
||||
diamondhoe=293
|
||||
goldhoe=294
|
||||
seeds=295
|
||||
wheat=296
|
||||
bread=297
|
||||
leatherhelmet=298
|
||||
leatherchestplate=299
|
||||
leatherpants=300
|
||||
leatherboots=301
|
||||
chainmailhelmet=302
|
||||
chainmailchestplate=303
|
||||
chainmailpants=304
|
||||
chainmailboots=305
|
||||
ironhelmet=306
|
||||
ironchestplate=307
|
||||
ironpants=308
|
||||
ironboots=309
|
||||
diamondhelmet=310
|
||||
diamondchestplate=311
|
||||
diamondpants=312
|
||||
diamondboots=313
|
||||
goldhelmet=314
|
||||
goldchestplate=315
|
||||
goldpants=316
|
||||
goldboots=317
|
||||
flint=318
|
||||
meat=319
|
||||
pork=319
|
||||
cookedmeat=320
|
||||
cookedpork=320
|
||||
painting=321
|
||||
paintings=321
|
||||
goldenapple=322
|
||||
sign=323
|
||||
wooddoor=324
|
||||
bucket=325
|
||||
waterbucket=326
|
||||
lavabucket=327
|
||||
minecart=328
|
||||
saddle=329
|
||||
irondoor=330
|
||||
redstonedust=331
|
||||
snowball=332
|
||||
boat=333
|
||||
leather=334
|
||||
milkbucket=335
|
||||
brick=336
|
||||
clay=337
|
||||
reed=338
|
||||
paper=339
|
||||
book=340
|
||||
slimeorb=341
|
||||
storageminecart=342
|
||||
poweredminecart=343
|
||||
egg=344
|
||||
compass=345
|
||||
fishingrod=346
|
||||
watch=347
|
||||
lightstonedust=348
|
||||
lightdust=348
|
||||
rawfish=349
|
||||
fish=349
|
||||
cookedfish=350
|
||||
goldrecord=2256
|
||||
greenrecord=2257
|
11
monsters.ini
Normal file
11
monsters.ini
Normal file
@ -0,0 +1,11 @@
|
||||
[Spider]
|
||||
AttackRange=5.0
|
||||
AttackRate=1
|
||||
AttackDamage=1.0
|
||||
SightDistance=25.0
|
||||
|
||||
[Chicken]
|
||||
AttackRange=5.0
|
||||
AttackRate=1
|
||||
AttackDamage=1.0
|
||||
SightDistance=25.0
|
280
recipes.txt
Normal file
280
recipes.txt
Normal file
@ -0,0 +1,280 @@
|
||||
#***************************
|
||||
# Default Crafting Recipes #
|
||||
#**************************#
|
||||
# #
|
||||
# Coded by: FakeTruth #
|
||||
# Written by: Aelux #
|
||||
# #
|
||||
#**************************#
|
||||
#
|
||||
#
|
||||
#
|
||||
#******************************************************#
|
||||
# Basic Notation Help
|
||||
#******************************************************#
|
||||
#
|
||||
# 1x1,1:1:17:1@5:4 -> Produces 4 Planks
|
||||
#
|
||||
#
|
||||
# --How does the above notation work?
|
||||
#
|
||||
# Ans- Think about the crafting table as coordiantes
|
||||
# on a graph where you have an "X" axis and a
|
||||
# "Y" axis. The "X" is the horizantle axis and
|
||||
# the "Y" is the vertical axis.
|
||||
#
|
||||
# Syntax- <width>x<height>,x:y:<ItemID>:<Amount>@<ResultingItemID>:<Amount>
|
||||
#
|
||||
#
|
||||
#
|
||||
#--------------------Basic EXAMPLE---------------------#---------------Grid Abstraction EXAMPLE------------------#
|
||||
#
|
||||
# Example- 3x3,2:3:280:8@5:2 # Example- 1x1,1:1:280:8@5:2
|
||||
#
|
||||
# Recipe- w=3,h=3,x=2,y=3,Item=Stick,Amount=8 # Recipe- w=1,h=1,x=1,y=1,Item=Stick,Amount=8
|
||||
# Result- 2 Wood Planks (2 of ItemID 5) Result- 2 Wood Planks (2 of ItemID 5)
|
||||
# #
|
||||
# Table grid is set to 3 by 3 (O = empty,+ = full) Table grid is set to 1 by 1 (O = empty,+ = full)
|
||||
# ----- # ---
|
||||
# OOO +
|
||||
# OOO #
|
||||
# O+O --How does the above example compare to the Basic
|
||||
# # example?
|
||||
# --How does the above example work?
|
||||
# # Ans- This means, you can place a stack of 8 sticks
|
||||
# Ans- This means, if you place a stack of 8 sticks ANYwhere a 1x1 grid can fit. Obviously since a 1x1
|
||||
# at that exact location on the Work Bench, # grid is a single slot, it can be abstracted to fill
|
||||
# which is a 3x3 grid, you will recieve 2 Wood any single slot on any size grid.
|
||||
# Planks PER 8 sticks. #
|
||||
# There are 9 positions for the 1x1 grid in the
|
||||
# # work bench (3x3) and 4 positions within the
|
||||
# inventory grid (2x2).
|
||||
#******************************************************#********************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# B a s i c C r a f t s
|
||||
#
|
||||
#
|
||||
1x1,1:1:17:1@5:4 #-> 4 Planks
|
||||
1x2,*:*:5:1@280:4 #-> 4 Sticks
|
||||
2x2,*:*:5:1@58:1 #-> Crafting bench
|
||||
3x3,2:2:5:-1@54:1 #-> Chest
|
||||
3x3,2:2:4:-1@61:1 #-> Furnace
|
||||
1x2,1:1:263:1,1:2:280:1@50:4 #-> Torch
|
||||
#******************************************************#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# F o o d
|
||||
#
|
||||
#
|
||||
3x1,*:3:296:1@297:1 #-> Bread
|
||||
3x2,1:2:5:1,3:2:5:1,2:3:5:1@281:4 #-> Bowl
|
||||
1x3,1:1:49:1,1:2:48:1,1:3:281:1@282:1 #-> Mushroom Stew
|
||||
3x3,2:2:41:-1,2:2:260:1@322:1 #-> Golden Apple
|
||||
#******************************************************#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# U t i l i t i e s
|
||||
#
|
||||
#
|
||||
3x2,1:2:265:1,2:3:265:1@325:1 #-> Bucket
|
||||
1x2,1:1:265:1,1:2:318:1@259:1 #-> Lighter
|
||||
3x3,1:3:280:1,2:2:280:1,3:1:280:1,3:2:287:1,3:3:287:1@346:1 #-> Fishing Rod
|
||||
3x3,1:2:265:1,2:1:265:1,2:2:331:1,3:2:265:1,2:3:265:1@345:1 #-> Compass
|
||||
3x3,1:2:266:1,2:1:266:1,2:2:331:1,3:2:266:1,2:3:266:1@345:1 #-> Watch
|
||||
3x3,1:*:287:1,2:1:280:1,3:2:280:1,2:3:280:1@261:1 #-> Bow
|
||||
1x3,1:1:318:1,1:2:280:1,1:3:288:1@262:4 #-> Arrow
|
||||
2x3,*:*:5:1@64:1 #-> Wooden Door
|
||||
3x3,*:1:280:-1@85:2 #-> Fence
|
||||
3x3,1:*:280:1,3:*:280:1,2:2:280:1@65:1 #-> Ladder
|
||||
3x2,*:*:5:1,2:3:280:1@323:1 #-> Sign
|
||||
#******************************************************#
|
||||
#
|
||||
# T r a v e l U t i l i t i e s
|
||||
#
|
||||
#
|
||||
3x3,1:*:265:1,3:*:265:1,2:2:280:1@66:16 #-> Rails
|
||||
3x2,1:2:265:1,3:2:265:1,*:3:265:1@328:1 #-> Minecart
|
||||
1x2,1:1:61:1,1:2:328:1@343:1 #-> Powered Minecart
|
||||
1x2,1:1:54:1,1:2:328:1@342:1 #-> Storage Minecart
|
||||
3x2,1:2:5:1,3:2:5:1,*:3:5:1@333:1 #-> Boat
|
||||
#******************************************************#
|
||||
#
|
||||
# C o n t r o l U t i l i t i e s
|
||||
#
|
||||
#
|
||||
1x2,1:1:331:1,1:2:280:1@76:1 #-> Redstone Torch
|
||||
1x2,1:1:280:1,1:2:4:1@69:1 #-> Lever
|
||||
2x1,*:*:5:1@72:1 #-> Wooden Preassure Plate
|
||||
2x1,*:*:4:1@70:1 #-> Stone Preassure Plate
|
||||
1x2,1:1:1:1,1:2:1:1@77:1 #-> Button
|
||||
2x3,*:*:265:1@71:1 #-> Iron Door
|
||||
#******************************************************#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# M a t e r i a l B l o c k s
|
||||
#
|
||||
#
|
||||
3x3,*:*:265:1@42:1 #-> Iron
|
||||
3x3,*:*:266:1@41:1 #-> Gold
|
||||
3x3,*:*:264:1@57:1 #-> Diamond
|
||||
2x2,*:*:287:1@35:1 #-> Cloth
|
||||
2x2,*:*:337:1@82:1 #-> Clay
|
||||
2x2,*:*:336:1@45:1 #-> Brick
|
||||
2x2,*:*:341:1@80:1 #-> Snow
|
||||
#******************************************************#
|
||||
#
|
||||
# S p e c i a l B l o c k s
|
||||
#
|
||||
#
|
||||
3x1,*:*:1:1@44:3 #-> Stone Step
|
||||
3x3,*:3:5:1,1:1:5:1,1:2:5:1,2:2:5:1@53:4 #-> Wood Stairs
|
||||
3x3,*:3:4:1,1:1:4:1,1:2:4:1,2:2:4:1@67:4 #-> Cobblestone Stairs
|
||||
3x3,1:1:289:1,3:1:289:1,2:2:289:1,1:3:289:1,3:3:289:1,2:1:12:1,1:2:12:1,3:2:12:1,2:3:12:1@46:1 #-> TNT
|
||||
3x3,2:2:5:-1,2:2:264:1@84:1 #-> Jukebox
|
||||
3x3,*:*:348:1@89:1 #-> Light Stone
|
||||
#******************************************************#
|
||||
#
|
||||
# B l o c k T o I n g o t
|
||||
#
|
||||
#
|
||||
1x1,1:1:42:1@265:9 #-> Iron
|
||||
1x1,1:1:41:1@266:9 #-> Gold
|
||||
1x1,1:1:57:1@264:9 #-> Diamond
|
||||
#******************************************************#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# S h o v e l
|
||||
#
|
||||
#
|
||||
1x3,1:1:5:1,1:2:280:1,1:3:280:1@269:1 #-> Wooden
|
||||
1x3,1:1:4:1,1:2:280:1,1:3:280:1@273:1 #-> Stone
|
||||
1x3,1:1:266:1,1:2:280:1,1:3:280:1@284:1 #-> Gold
|
||||
1x3,1:1:265:1,1:2:280:1,1:3:280:1@256:1 #-> Iron
|
||||
1x3,1:1:264:1,1:2:280:1,1:3:280:1@277:1 #-> Diamond
|
||||
#******************************************************#
|
||||
#
|
||||
# P i c k a x e
|
||||
#
|
||||
#
|
||||
3x3,*:1:5:1,2:2:280:1,2:3:280:1@270:1 #-> Wooden
|
||||
3x3,*:1:4:1,2:2:280:1,2:3:280:1@274:1 #-> Stone
|
||||
3x3,*:1:266:1,2:2:280:1,2:3:280:1@285:1 #-> Gold
|
||||
3x3,*:1:265:1,2:2:280:1,2:3:280:1@257:1 #-> Iron
|
||||
3x3,*:1:264:1,2:2:280:1,2:3:280:1@278:1 #-> Diamond
|
||||
#******************************************************#
|
||||
#
|
||||
# A x e
|
||||
#
|
||||
#
|
||||
2x2,2:2:5:-1,2:2:280:1,2:3:280:1@271:1 #-> Wooden (L)
|
||||
2x2,1:2:5:-1,1:2:280:1,1:3:280:1@271:1 #-> Wooden (R)
|
||||
2x2,2:2:4:-1,2:2:280:1,2:3:280:1@275:1 #-> Stone (L)
|
||||
2x2,1:2:4:-1,1:2:280:1,1:3:280:1@275:1 #-> Stone (R)
|
||||
2x2,2:2:256:-1,2:2:280:1,2:3:280:1@258:1#-> Iron (L)
|
||||
2x2,1:2:256:-1,1:2:280:1,1:3:280:1@258:1#-> Iron (R)
|
||||
2x2,2:2:264:-1,2:2:280:1,2:3:280:1@279:1#-> Diamond (L)
|
||||
2x2,1:2:264:-1,1:2:280:1,1:3:280:1@279:1#-> Diamond (R)
|
||||
#******************************************************#
|
||||
#
|
||||
# S w o r d
|
||||
#
|
||||
#
|
||||
1x2,*:*:5:1,1:3:280:1@268:1 #-> Wooden
|
||||
1x2,*:*:4:1,1:3:280:1@272:1 #-> Stone
|
||||
1x2,*:*:266:1,1:3:280:1@283:1 #-> Gold
|
||||
1x2,*:*:265:1,1:3:280:1@267:1 #-> Iron
|
||||
1x2,*:*:264:1,1:3:280:1@276:1 #-> Diamond
|
||||
#******************************************************#
|
||||
#
|
||||
# H o e
|
||||
#
|
||||
#
|
||||
2x1,*:*:5:1,2:2:280:1,2:3:280:1@290:1 #-> Wooden (L)
|
||||
2x1,*:*:5:1,1:2:280:1,1:3:280:1@290:1 #-> Wooden (R)
|
||||
2x1,*:*:4:1,2:2:280:1,2:3:280:1@291:1 #-> Stone (L)
|
||||
2x1,*:*:4:1,1:2:280:1,1:3:280:1@291:1 #-> Stone (R)
|
||||
2x1,*:*:266:1,2:2:280:1,2:3:280:1@294:1 #-> Gold (L)
|
||||
2x1,*:*:266:1,1:2:280:1,1:3:280:1@294:1 #-> Gold (R)
|
||||
2x1,*:*:265:1,2:2:280:1,2:3:280:1@292:1 #-> Iron (L)
|
||||
2x1,*:*:265:1,1:2:280:1,1:3:280:1@292:1 #-> Iron (R)
|
||||
2x1,*:*:264:1,2:2:280:1,2:3:280:1@293:1 #-> Diamond (L)
|
||||
2x1,*:*:264:1,1:2:280:1,1:3:280:1@293:1 #-> Diamond (R)
|
||||
#******************************************************#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# L e a t h e r A r m o r
|
||||
#
|
||||
#
|
||||
3x2,2:2:334:-1@298:1 #-> Helmet
|
||||
3x3,2:1:334:-1@299:1 #-> Chest Piece
|
||||
3x3,1:*:334:1,3:*:334:1,2:1:334:1@300:1 #-> Leggings
|
||||
3x2,2:*:334:-1@301:1 #-> Boots
|
||||
#*******************************************************#
|
||||
#
|
||||
# G o l d A r m o r
|
||||
#
|
||||
#
|
||||
3x2,2:2:266:-1@314:1 #-> Helmet
|
||||
3x3,2:1:266:-1@315:1 #-> Chest Piece
|
||||
3x3,1:*:266:1,3:*:266:1,2:1:266:1@316:1 #-> Leggings
|
||||
3x2,2:*:266:-1@317:1 #-> Boots
|
||||
#*******************************************************#
|
||||
#
|
||||
# I r o n A r m o r
|
||||
#
|
||||
#
|
||||
3x2,2:2:265:-1@306:1 #-> Helmet
|
||||
3x3,2:1:265:-1@307:1 #-> Chest Piece
|
||||
3x3,1:*:265:1,3:*:265:1,2:1:265:1@308:1 #-> Leggings
|
||||
3x2,2:*:265:-1@309:1 #-> Boots
|
||||
#*******************************************************#
|
||||
#
|
||||
# D i a m o n d A r m o r
|
||||
#
|
||||
#
|
||||
3x2,2:2:264:-1@310:1 #-> Helmet
|
||||
3x3,2:1:264:-1@311:1 #-> Chest Piece
|
||||
3x3,1:*:264:1,3:*:264:1,2:1:264:1@312:1 #-> Leggings
|
||||
3x2,2:*:264:-1@313:1 #-> Boots
|
||||
#*******************************************************#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# D e c o r a t i v e
|
||||
#
|
||||
#
|
||||
3x1,*:3:338:1@339:3 #-> Paper
|
||||
1x3,2:*:338:1@340:1 #-> Book
|
||||
3x3,*:1:5:1,*:2:349:1,*:3:5:1@47:1 #-> Book Shelf
|
||||
3x3,2:2:280:-1,2:2:35:1@321:1 #-> Painting
|
||||
1x2,1:1:86:1,1:2:50:1@91:1 #-> Jack-O-Lantern
|
||||
#*******************************************************#
|
24
settings.ini
Normal file
24
settings.ini
Normal file
@ -0,0 +1,24 @@
|
||||
[Server]
|
||||
Port=25565
|
||||
ServerID=-
|
||||
|
||||
[Plugins]
|
||||
Plugin=Core
|
||||
Plugin=Fire
|
||||
Plugin=MagicCarpet
|
||||
|
||||
[HelpPlugin]
|
||||
ShowPluginNames=1
|
||||
|
||||
[Physics]
|
||||
Water=0
|
||||
|
||||
[Monsters]
|
||||
AnimalsOn=1
|
||||
AnimalSpawnInterval=5
|
||||
Types=Chicken,Spider
|
||||
|
||||
[Authentication]
|
||||
Server=www.minecraft.net
|
||||
Address=/game/checkserver.jsp?user=%USERNAME%&serverId=%SERVERID%
|
||||
Authenticate=0
|
8
terrain.ini
Normal file
8
terrain.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[Terrain]
|
||||
HeightFreq1=0.100000
|
||||
HeightFreq2=1.000000
|
||||
HeightFreq3=2.000000
|
||||
HeightAmp1=1.000000
|
||||
HeightAmp2=0.500000
|
||||
HeightAmp3=0.500000
|
||||
|
8
users.ini
Normal file
8
users.ini
Normal file
@ -0,0 +1,8 @@
|
||||
[FakeTruth]
|
||||
Groups=Admins
|
||||
|
||||
[Duralex]
|
||||
Groups=Admins
|
||||
|
||||
[Player]
|
||||
Groups=Admins
|
6
webadmin.ini
Normal file
6
webadmin.ini
Normal file
@ -0,0 +1,6 @@
|
||||
[WebAdmin]
|
||||
Enabled=1
|
||||
Port=8080
|
||||
|
||||
[User:admin]
|
||||
Password=admin
|
Loading…
Reference in New Issue
Block a user