From 9b1057243fe1db65f351e213f00e41ceca67a8da Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 23 Jan 2016 00:21:58 -0500 Subject: Completed basic framework for setting up spells, and minigames for casting --- gamemode/itemsystem/items/spell_fireball.lua | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gamemode/itemsystem/items/spell_fireball.lua (limited to 'gamemode/itemsystem') diff --git a/gamemode/itemsystem/items/spell_fireball.lua b/gamemode/itemsystem/items/spell_fireball.lua new file mode 100644 index 0000000..d8bad79 --- /dev/null +++ b/gamemode/itemsystem/items/spell_fireball.lua @@ -0,0 +1,31 @@ + +ITEM.Name = "Fireball" +ITEM.Class = "weapon" +ITEM.Desc = "Warning: Warm" +ITEM.Model = "models/props_debris/wood_board02a.mdl" +ITEM.Icon = Material("wintersurvival2/hud/ws1_icons/icon_bow") +ITEM.HoldType = "magic" + +ITEM.Recipe = { + Resources = { + ["Plank"] = 2, + ["Rope"] = 1, + ["Sap"] = 1, + }, + Tools = {}, +} + +ITEM.CD = 1 + +function ITEM:DoFireball() + print("Fully successfull fireball callback") +end + +function ITEM:DoFireballFail() + +end + +function ITEM:OnPrimary(pl,tr) + if (CLIENT) then return end + pl:Cast("Fireball",self.DoFireball) +end -- cgit v1.2.3-70-g09d2