diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-03-21 19:06:18 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-03-21 19:06:18 -0300 |
commit | e8a3fd5199d19be8249be2cb9cb7834ec9ef19a1 (patch) | |
tree | f495e80e97b976d84c208e9a32221cc18bf6efb6 /npc/magic/dragokin.txt | |
parent | 9e3064764a78f738bbea78d3c5ff72b8e317d7e9 (diff) | |
download | serverdata-e8a3fd5199d19be8249be2cb9cb7834ec9ef19a1.tar.gz serverdata-e8a3fd5199d19be8249be2cb9cb7834ec9ef19a1.tar.bz2 serverdata-e8a3fd5199d19be8249be2cb9cb7834ec9ef19a1.tar.xz serverdata-e8a3fd5199d19be8249be2cb9cb7834ec9ef19a1.zip |
Add new skill: Dragokin - spawn a green dragon. For demure.
Diffstat (limited to 'npc/magic/dragokin.txt')
-rw-r--r-- | npc/magic/dragokin.txt | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/npc/magic/dragokin.txt b/npc/magic/dragokin.txt new file mode 100644 index 000000000..531babc4f --- /dev/null +++ b/npc/magic/dragokin.txt @@ -0,0 +1,61 @@ +// TMW2 script +// Author: Jesusalva <admin@tmw2.org> +// +// Magic Script: TMW2_DRAGOKIN +// +// Summons a Green Dragon because they are cool :3 +// +// Cooldown is cast duration + +- script sk#dragokin 32767,{ + end; + +OnCall: + // Other requeriments: 5x Dragon Scale or Demure Axe + if (!(countitem(DragonScales) >= 5 || countitem(DemureAxe))) { + dispbottom l("You need 5x @@ to cast this skill.", getitemlink(DragonScales)); + end; + } + + // Check cooldown + if (@dragokin_at > gettimetick(2)) { + dispbottom l("Skill is in cooldown for @@.", FuzzyTime(@dragokin_at)); + end; + } + + // Setup + @sk=TMW2_DRAGOKIN; + @mp=500; + @amp=40; + + // Check if you have mana to cast + // MagicCheck(SkillID, Mana{, MP per level}) + if (!MagicCheck(@sk, @mp, @amp)) + end; + + // Destroy reagents + if (!countitem(DemureAxe)) + delitem DragonScale, 5; + + // set cooldown + @dragokin_at=gettimetick(2); + @dragokin_at=@dragokin_at+16; + + // As usual, magic profeciency affects + if (rand(1,6) < abizit()+1) { + // Summon Magic + // SummonMagic(SkillID, MobID{, SkillLevelPerMob=2{, Level Override}}) + SummonMagic(@sk, GreenDragon, 5, MAGIC_LVL+getskilllv(@sk)-1); + } else { + dispbottom l("The spell fails!"); + } + + // Get five mana experience point (this is NOT used by Mana Stone) + GetManaExp(@sk, 5); + + end; + +OnInit: + bindatcmd "sk-dragokin", "sk#dragokin::OnCall", 0, 100, 0; + end; +} |