public override void OnSuccess(Sprite sprite) { if (sprite is Aisling) { var client = (sprite as Aisling).Client; var buff = new buff_clawfist(); client.TrainSkill(Skill); if (!sprite.HasBuff("Claw Fist")) { buff.OnApplied(sprite, buff); var action = new ServerFormat1A { Serial = sprite.Serial, Number = (byte)(client.Aisling.Path == Class.Priest ? 0x80 : client.Aisling.Path == Class.Wizard ? 0x88 : 0x06), Speed = 30 }; client.SendAnimation(54, client.Aisling, client.Aisling); client.SendStats(StatusFlags.All); client.Aisling.Show(Scope.NearbyAislings, action); } else { client.SendMessage(0x02, "Your hands are already empowered."); } } }
public override void OnUse(Sprite sprite) { if (sprite is Aisling) { var client = (sprite as Aisling).Client; OnSuccess(sprite); } else { var buff = new buff_clawfist(); if (!sprite.HasBuff(buff.Name)) { buff.OnApplied(sprite, buff); sprite.SendAnimation(54, sprite, sprite); } } }
public static void LoadAndCacheStorage() { Paused = true; EmptyCacheCollectors(); lock (SyncObj) { LoadMaps(); LoadSkillTemplates(); LoadSpellTemplates(); LoadItemTemplates(); LoadMonsterTemplates(); LoadMundaneTemplates(); LoadWarpTemplates(); LoadWorldMapTemplates(); CacheCommunityAssets(); BindTemplates(); LoadMetaDatabase(); LoadExtensions(); } var c = new SkillTemplate { Name = "Claw Fist", Icon = 59, Pane = Pane.Spells, NpcKey = "Kung-Fu Master", LevelRate = 0.03, Group = "Attack Bonus", MaxLevel = 100, MissAnimation = 33 }; c.Name = "Claw Fist"; c.PostQualifers = PostQualifer.BreakInvisible; c.ScriptName = "Claw Fist"; c.Sound = 21; c.TargetAnimation = 0; c.TierLevel = Tier.Tier1; c.FailMessage = "failed."; c.Description = "Doubles all unarmed assail damage for it's duration."; c.Type = SkillScope.Ability; c.Buff = new buff_clawfist(); c.Cooldown = 10; c.Prerequisites = new LearningPredicate() { Class_Required = Class.Monk, Con_Required = 30, Dex_Required = 32, Gold_Required = 50000, ExpLevel_Required = 29, Skill_Required = "Double Punch", Skill_Level_Required = 70, Items_Required = new List <ItemPredicate>() { new ItemPredicate() { AmountRequired = 1, Item = "Gargoyle Fiend's Skull" }, new ItemPredicate() { AmountRequired = 1, Item = "Frog's Leg" }, }, }; GlobalSkillTemplateCache["Claw Fist"] = c; GlobalBuffCache["Claw Fist"] = new buff_clawfist(); GlobalItemTemplateCache["Iron Gauntlet"] = new ItemTemplate() { Name = "Iron Gauntlet", AcModifer = new StatusOperator(StatusOperator.Operator.Add, 2), ManaModifer = new StatusOperator(StatusOperator.Operator.Remove, 200), LevelRequired = 33, Class = Class.Peasant, CanStack = false, MaxDurability = 10000, Value = 6000, DropRate = 0.19, ScriptName = "Gauntlet", EquipmentSlot = (ItemSlots.LArm), CarryWeight = 3, Description = "Sturdy Iron Gauntlets, However heavy, Reduces -1000 mana to the bearer.", DisplayImage = 0x80F9, Image = 0x80F9, NpcKey = "Alf Stewert" }; var monk = new MundaneTemplate() { AreaID = 1001, AttackPlayers = false, AttackTimer = null, CastRate = 5000, ChatTimer = new GameServerTimer(TimeSpan.FromSeconds(10)), Direction = 1, Description = "Monk Helper, Will provide new monks some quests to improve their gear", EnableCasting = false, EnableSpeech = true, Speech = new System.Collections.ObjectModel.Collection <string>() { "You look like you could use some help, new monk.", "Over here, Monk!", "Come see me when you have a chance.", "I'm here to help.", "You Lost?", "You must be new %" }, EnableTurning = true, EnableWalking = false, Group = "Monk Helpers", Level = 99, Name = "Erln", QuestKey = "Monk: Beginner Equipment", ScriptKey = "Erin's Script", PathQualifer = PathQualifer.Fixed, X = 88, Y = 17, Image = (16384 + 126), ViewingQualifer = ViewQualifer.Monks, }; GlobalMundaneTemplateCache.Add(monk.Name, monk); //SyncStorage(); GlobalMundaneTemplateCache["Ragnhall"] = new MundaneTemplate() { AreaID = 888, AttackPlayers = false, Description = "The Combat Tutorial Trainer.", Direction = 2, Level = 99, X = 21, Y = 40, ScriptKey = "tut/Raghnall", Image = 0x401C, Name = "Ragnhall" }; GlobalMundaneTemplateCache["Bartley"] = new MundaneTemplate() { AreaID = 888, AttackPlayers = false, Description = "Some random old man from the tutorial. He sounds like he know's a bit.", Direction = 2, Level = 99, X = 29, Y = 21, ScriptKey = "tut/OldMan", Image = 0x4021, Name = "Bartley" }; GlobalMonsterTemplateCache.Add(new MonsterTemplate() { Name = "Kardi", BaseName = "Kardi", MovementSpeed = 800, EngagedWalkingSpeed = 300, MoodType = MoodQualifer.Neutral, Level = 1, PathQualifer = PathQualifer.Wander, ElementType = ElementQualifer.None, AttackSpeed = 1500, CastSpeed = 9000, AreaID = 1, Description = "A weak but filthly creature. Attacking a gnarl should be avoided, They offer nothing rewarding.", Grow = false, UpdateMapWide = false, IgnoreCollision = false, ScriptName = "Common Monster", Image = 0x4005, ImageVarience = 0, Group = "Trash", LootType = LootQualifer.None, SpawnMax = 100, SpawnType = SpawnQualifer.Random, SpawnSize = 10, SpawnRate = 3, }); Paused = false; }