summaryrefslogblamecommitdiff
path: root/npc/magic/dragokin.txt
blob: 544859ccea712a021b494daa391929e047aba7ee (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                  
                                         
                                                        

                                                                                      


            

                      

           







                                                
                               




                                 


                                           
 
// TMW2 script
// Author: Jesusalva <admin@tmw2.org>
//
// Magic Script: TMW2_DRAGOKIN
//
// Summons a Green Dragon because they are cool :3
//
// Cooldown is cast duration

function	script	SK_Dragokin	{
    // Other requeriments: 5x Dragon Scale or Demure Axe
    if (!(countitem(DragonScales) >= 4 || countitem(DemureAxe))) {
        dispbottom l("You need 4x @@ to cast this skill.", getitemlink(DragonScales));
        end;
    }

    // Setup
    @sk=TMW2_DRAGOKIN;
    @mp=50;
    @amp=4;

    // 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, 4;

    // set cooldown
    @dragokin_at=gettimetick(2);
    @dragokin_at=@dragokin_at+16;

    // Summon the dragons and give Mana EXP
    SK_summon(GreenDragon, 5, 5);
    return;
}