This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 8064ba84d8
commit 73479cff9e
7338 changed files with 1718883 additions and 14 deletions

View File

@@ -0,0 +1,95 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Skill Book"
ITEM.model = Model("models/props_c17/BriefCase001a.mdl")
ITEM.description = "Uhh thats the skill book thing yeah."
ITEM.functions.Read = {
name = "Read",
tip = "unequipTip",
icon = "icon16/tick.png",
OnRun = function(item)
if (item.player) then
local skill = ix.skill:Find(item.skillCat)
local character = item.player:GetCharacter()
local isAddingSkills = true
if item.player:GetCharacter():GetTotalSkillLevel() >= 121 then
item.player:NotifyLocalized("You have reached the limit of skills!")
end
if (item.vol) then
if ix.books:ValidateReading(item.skillCat, item.vol, character) then
item.player:SetNetVar("staticAction", "Is currently reading something...")
item.player:Freeze(true)
item.player.isReading = true
ix.books:ProceedReading(item.skillCat, item.vol, character, item)
end
end
if not isAddingSkills then
item.player:NotifyLocalized("It seems that the information from the book is of no use to me.")
end
return false
end
end,
OnCanRun = function(item)
local client = item.player
local skill = ix.skill:Find(item.skillCat)
if not item.skillCat or not item.vol then return item.player:NotifyLocalized("Looks like there's something wrong with the book.") end
end
}
ITEM.functions.UnRead = {
name = "Stop Reading",
tip = "unequipTip",
icon = "icon16/delete.png",
OnRun = function(item)
if (item.player) then
if (item.player.isReading) then
item.player:SetNetVar("staticAction", nil)
item.player:Freeze(false)
item.player.isReading = nil
else
return false, item.player:NotifyLocalized("I don't read anything.")
end
return false
end
end
}
function ITEM:GetExtendedInfo()
local extendedInfo = {}
if (self.vol) then
if self.vol == 1 then
extendedInfo[#extendedInfo + 1] = "\nVolume: " .. self.vol .. "st"
elseif self.vol == 2 then
extendedInfo[#extendedInfo + 1] = "\nVolume: " .. self.vol .. "nd"
elseif self.vol == 3 then
extendedInfo[#extendedInfo + 1] = "\nVolume: " .. self.vol .. "rd"
else
extendedInfo[#extendedInfo + 1] = "\nVolume: " .. self.vol .. "th"
end
extendedInfo[#extendedInfo + 1] = "\nThis book covers the following skill: " .. self.skillCat
extendedInfo[#extendedInfo + 1] = "\nAdds FIVE skill points for each volume read in chronological order."
extendedInfo[#extendedInfo + 1] = "\nPages left: " .. LocalPlayer():GetCharacter():GetReading()[self.skillCat][self.vol]["pages"]
if LocalPlayer():GetCharacter():GetReading()[self.skillCat][self.vol]["readed"] then
extendedInfo[#extendedInfo + 1] = "\nYOU HAVE YOU ALREADY READ THIS BOOK."
else
extendedInfo[#extendedInfo + 1] = "\nYOU HAVE NOT READ THIS BOOK."
end
end
return table.concat(extendedInfo, "")
end
function ITEM:GetColorAppendix()
if self.vol then
return {["green"] = self:GetExtendedInfo()}
end
end

View File

@@ -0,0 +1,19 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Culinary and Cooking - Part 1"
ITEM.description = "Surprisingly - a more than preserved reference book telling about culinary recipes."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Cooking"
ITEM.vol = 1
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,19 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Cooking and Culinary - Part 2"
ITEM.description = "Amazing! - a truly preserved book that has countless culinary recipes."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Cooking"
ITEM.vol = 2
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,19 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Cooking and Culinary - Part 3"
ITEM.description = "Amazing! - a truly preserved book that has countless culinary recipes."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Cooking"
ITEM.vol = 3
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,19 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Cooking and Culinary - Part 4"
ITEM.description = "Amazing! - a truly preserved book that has countless culinary recipes."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Cooking"
ITEM.vol = 4
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,19 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Cooking and Culinary - Part 5"
ITEM.description = "Amazing! - a truly preserved book that has countless culinary recipes."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Cooking"
ITEM.vol = 5
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Tesla Science - Part 1"
ITEM.description = "A well preserved exoteric book that is meant for the biggest science enthusists, it's filled with formulas, gadgets and contraptions of all shapes and sizes. Truly wonderous stuff!\nThis edition in specific tells you about the basics of aerodynamics and rockets. Essential to every man, clearly."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.skin = 2
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Crafting"
ITEM.vol = 1
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Tesla Science - Part 2"
ITEM.description = "A well preserved exoteric book that is meant for the biggest science enthusists, it's filled with formulas, gadgets and contraptions of all shapes and sizes. Truly wonderous stuff!\nThis edition in specific tells you about the future of warfare, that's obviously not going to happen any time soon sadly..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 3
ITEM.skillCat = "Crafting"
ITEM.vol = 2
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Tesla Science - Part 3"
ITEM.description = "A well preserved exoteric book that is meant for the biggest science enthusists, it's filled with formulas, gadgets and contraptions of all shapes and sizes. Truly wonderous stuff!\nThis edition talks about the latest military inventions used in the Old World, long and forgotten..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 4
ITEM.skillCat = "Crafting"
ITEM.vol = 3
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Tesla Science - Part 4"
ITEM.description = "A well preserved exoteric book that is meant for the biggest science enthusists, it's filled with formulas, gadgets and contraptions of all shapes and sizes. Truly wonderous stuff! \nThis edition in specific talks about the powers of ionizing Gamma radiation, obviously a waste of time..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 5
ITEM.skillCat = "Crafting"
ITEM.vol = 4
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Tesla Science - Part 5"
ITEM.description = "A well preserved exoteric book that is meant for the biggest science enthusists, it's filled with formulas, gadgets and contraptions of all shapes and sizes. Truly wonderous stuff! \nThis edition talks specifically about Plasma, but what exactly is Plasma anyway?"
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 1
ITEM.skillCat = "Crafting"
ITEM.vol = 5
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,20 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Guns & Bullets - Part 1"
ITEM.description = "A 'famous' western magazine that warms the heart of every gun-loving man. It's composed of five original editions and some spin-offs, all talking about Guns and Bullets, and how to shoot them!"
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Guns"
ITEM.skin = 3
ITEM.vol = 1
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,20 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Guns & Bullets - Part 2"
ITEM.description = "A 'famous' western magazine that warms the heart of every gun-loving man. It's composed of five original editions and some spin-offs, all talking about Guns and Bullets, and how to shoot them!"
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 2
ITEM.skillCat = "Guns"
ITEM.vol = 2
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Guns & Bullets - Part 3"
ITEM.description = "A 'famous' western magazine that warms the heart of every gun-loving man. It's composed of five original editions and some spin-offs, all talking about Guns and Bullets, and how to shoot them!"
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 1
ITEM.skillCat = "Guns"
ITEM.vol = 3
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Guns & Bullets - Part 4"
ITEM.description = "A 'famous' western magazine that warms the heart of every gun-loving man. It's composed of five original editions and some spin-offs, all talking about Guns and Bullets, and how to shoot them!"
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 4
ITEM.skillCat = "Guns"
ITEM.vol = 4
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Guns & Bullets - Part 5"
ITEM.description = "A 'famous' western magazine that warms the heart of every gun-loving man. It's composed of five original editions and some spin-offs, all talking about Guns and Bullets, and how to shoot them!"
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 6
ITEM.skillCat = "Guns"
ITEM.vol = 5
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Surgical Journey - Part 1"
ITEM.description = "A long forgotten magazine that shows the wonders of modern science - or at least what they used to be... still, it's not entirely useless, maybe you could learn a thing or two..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.skin = 1
ITEM.height = 1
ITEM.skillCat = "Medicine"
ITEM.vol = 1
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Surgical Journey - Part 2."
ITEM.description = "A long forgotten magazine that shows the wonders of modern science - or at least what they used to be... still, it's not entirely useless, maybe you could learn a thing or two..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 6
ITEM.skillCat = "Medicine"
ITEM.vol = 2
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Surgical Journey - Part 3"
ITEM.description = "A long forgotten magazine that shows the wonders of modern science - or at least what they used to be... still, it's not entirely useless, maybe you could learn a thing or two..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 5
ITEM.skillCat = "Medicine"
ITEM.vol = 3
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,21 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Surgical Journey - Part 4"
ITEM.description = "A long forgotten magazine that shows the wonders of modern science - or at least what they used to be... still, it's not entirely useless, maybe you could learn a thing or two..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skin = 7
ITEM.skillCat = "Medicine"
ITEM.vol = 4
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,20 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Surgical Journey - Part 5"
ITEM.description = "A long forgotten magazine that shows the wonders of modern science - or at least what they used to be... still, it's not entirely useless, maybe you could learn a thing or two..."
ITEM.category = "Skill Books"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.skillCat = "Medicine"
ITEM.vol = 5
ITEM.outlineColor = Color(255, 0, 0, 100)

View File

@@ -0,0 +1,107 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
PLUGIN.name = "Skill books"
PLUGIN.author = "Naast"
PLUGIN.description = "Adds the book thing into WN, yeah."
ix.books = ix.books or {}
ix.char.RegisterVar("reading", {
field = "reading",
fieldType = ix.type.text,
default = {
["Medicine"] = {
[1] = {readed = false, pages = 60},
[2] = {readed = false, pages = 50},
[3] = {readed = false, pages = 75},
[4] = {readed = false, pages = 45},
[5] = {readed = false, pages = 70}
},
["Crafting"] = {
[1] = {readed = false, pages = 45},
[2] = {readed = false, pages = 60},
[3] = {readed = false, pages = 64},
[4] = {readed = false, pages = 67},
[5] = {readed = false, pages = 150}
},
["Cooking"] = {
[1] = {readed = false, pages = 20},
[2] = {readed = false, pages = 50},
[3] = {readed = false, pages = 100},
[4] = {readed = false, pages = 80},
[5] = {readed = false, pages = 90}
},
["Contraband"] = {
[1] = {readed = false, pages = 120},
[2] = {readed = false, pages = 120},
[3] = {readed = false, pages = 120},
[4] = {readed = false, pages = 120},
[5] = {readed = false, pages = 120}
},
["Guns"] = {
[1] = {readed = false, pages = 100},
[2] = {readed = false, pages = 45},
[3] = {readed = false, pages = 60},
[4] = {readed = false, pages = 35},
[5] = {readed = false, pages = 24}
}
},
bNoDisplay = true
})
function ix.books:ValidateReading(skill, vol, character)
local readTbl = character:GetReading()
if not readTbl[skill] then return false, character:GetPlayer():NotifyLocalized("There is no skill for this guide.") end
if readTbl[skill][vol].readed then return false, character:GetPlayer():NotifyLocalized("I already read this book.") end
if not readTbl[skill][vol].readed then
local curVol = vol
local lastVol = vol - 1
if lastVol != 0 then
for k, v in ipairs(readTbl[skill]) do
if k < curVol and not v.readed then
return false, character:GetPlayer():NotifyLocalized("I don't get anything... I need to read the previous volume.")
end
if k > curVol then
break
end
end
end
end
if readTbl then
return true
end
end
function ix.books:ProceedReading(skill, vol, character, item)
local skillVar = ix.skill:Find(skill)
local readTbl = character:GetReading()
local uniqueID = "CheckIfStillReading_" .. character:GetPlayer():SteamID64()
character:GetPlayer():SetAction("You are reading a book.", readTbl[skill][vol]["pages"], function()
readTbl[skill][vol].readed = true
character:SetReading(readTbl)
character:AddSkillLevel(skillVar.uniqueID, 5)
character:GetPlayer():Freeze(false)
character:GetPlayer():SetNetVar("staticAction", nil)
character:GetPlayer().isReading = nil
timer.Remove(uniqueID)
item:Remove()
end)
timer.Create(uniqueID, 1, 0, function()
if (IsValid(character:GetPlayer()) and character:GetPlayer().isReading) then
readTbl[skill][vol]["pages"] = readTbl[skill][vol]["pages"] - 1
character:SetReading(readTbl)
else
timer.Remove(uniqueID)
character:GetPlayer():Freeze(false)
character:GetPlayer():SetAction(false)
end
end)
end