From 8e050456d610a7adf087b8b065f3fba2f21d3c2d Mon Sep 17 00:00:00 2001 From: Apickx Date: Thu, 8 Mar 2018 20:19:27 -0500 Subject: Revamped npcs Revamed all npcs to now use the hl2 builtins Added antlion gaurd npcs, who will drop the item needed to make spells. --- gamemode/itemsystem/items/heartofbeast.lua | 31 ++++++++++++++++++++++++++++ gamemode/itemsystem/items/spell_fireball.lua | 9 -------- gamemode/itemsystem/items/spell_teleport.lua | 9 -------- 3 files changed, 31 insertions(+), 18 deletions(-) create mode 100644 gamemode/itemsystem/items/heartofbeast.lua (limited to 'gamemode/itemsystem') diff --git a/gamemode/itemsystem/items/heartofbeast.lua b/gamemode/itemsystem/items/heartofbeast.lua new file mode 100644 index 0000000..75acfdf --- /dev/null +++ b/gamemode/itemsystem/items/heartofbeast.lua @@ -0,0 +1,31 @@ +local ITEM = {} +ITEM.Name = "Heart of Beast" +ITEM.Desc = "The heart of a wild beast" +ITEM.Class = "Other" +ITEM.Model = "models/props_combine/breenlight.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_rock") +ITEM.Burnable = false +ITEM.CD = 0.3 +ITEM.Range = 120 +ITEM.HoldType = "melee" + +ITEM.Structure = {} +ITEM.Recipe = nil +ITEM.Tools = nil +ITEM.CookCD = 1 +ITEM.CookProduct = nil +ITEM.Ghost = nil + +--These are just here to tell the editors/developers what functions are available.. dont un-comment them out, as this could affect all the items. + +function ITEM:OnEnchanted(enchanttalbe, nearbyrunes) + if math.random(0,1) == 0 then + enchanttalbe:AddItem("Fireball",1) + else + enchanttalbe:AddItem("Teleport",1) + end +end + + + +RegisterItem(ITEM) diff --git a/gamemode/itemsystem/items/spell_fireball.lua b/gamemode/itemsystem/items/spell_fireball.lua index dc7d7e0..8a2b048 100644 --- a/gamemode/itemsystem/items/spell_fireball.lua +++ b/gamemode/itemsystem/items/spell_fireball.lua @@ -20,15 +20,6 @@ ITEM.Structure = { }, } -ITEM.Recipe = { - Resources = { - ["Plank"] = 2, - ["Rope"] = 1, - ["Sap"] = 1, - }, - Tools = {}, -} - ITEM.CD = 0.25 ITEM.Range = 9999 diff --git a/gamemode/itemsystem/items/spell_teleport.lua b/gamemode/itemsystem/items/spell_teleport.lua index e86f388..521dca2 100644 --- a/gamemode/itemsystem/items/spell_teleport.lua +++ b/gamemode/itemsystem/items/spell_teleport.lua @@ -20,15 +20,6 @@ ITEM.Structure = { }, } -ITEM.Recipe = { - Resources = { - ["Plank"] = 2, - ["Rope"] = 1, - ["Sap"] = 1, - }, - Tools = {}, -} - ITEM.CD = 0.25 ITEM.Range = 9999 -- cgit v1.2.3-70-g09d2