Jump to content

Photo

Spells


  • Please log in to reply
1 reply to this topic

#1 asdf5000

asdf5000

    Doyen(ne)

  • Members

Posted 27 April 2009 - 09:04 PM

I'm wondering if anyone could make my a script or two, I'm looking for an item script that makes a line that damages for about 3 seconds and he can't move while doing this.

It would look like this-

+++D+
++LD+
+++D+

N = Nothing
L = Link (Facing right)
D = Damaging Space

And also a script that would target a random enemy and damage it.
Oh, and both of these would use magic and only be useball if you have enough magic. And they would both have anamations for them.

Please help if you can.

#2 Joe123

Joe123

    Retired

  • Members

Posted 01 May 2009 - 02:12 PM

CODE
item script RandomEnemy{
    void run(int magic, int damage, int sprite, int sfx){
        if(Screen->NumNPCs() == 0 || Link->MP < magic) return;
        npc e = Screen->LoadNPC(Rand(Screen->NumNPCs())+1);
        lweapon Damage = Screen->CreateLWeapon(LW_SCRIPT1);
        Damage->X = e->X; Damage->Y = e->Y;
        Damage->Damage = damage;
        lweapon Animation = Screen->CreateLWeapon(LW_SCRIPT1);
        Animation->X = e->X; Animation->Y = e->Y;
        Animation->HitXOffset = 500;
        Animation->UseSprite(sprite);
        Animation->DeadState = Animation->NumFrames*Animation->NumSpeed;
        Link->MP -= magic;
        Game->PlaySound(sfx);
    }
}


D0 is magic usage, D1 is damage to deal, D2 is the Weapon/Misc. sprite to use for the animation and D3 is the sound effect to play when using the item.

The sprite will play to the end of its animation, then be removed.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users