summaryrefslogblamecommitdiff
path: root/npc/magic/dragokin.txt
blob: bf8344f9f1245a546f6eeb141dea3efacf4f733e (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	{
    // Blocked from summoning magic
    if (alignment() < 0)
        return;

    // 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));
        return;
    }

    // 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))
        return;

    // Destroy reagents
    if (!countitem(DemureAxe))
        delitem DragonScales, 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;
}