ok, mark 2:
Code:
item script flameshot{
void run(int d,int s,int t,int c,int n,int a){
int i; int b;
int fx; int fy;
if(Screen->NumNPCs() > 0){
npc e = Screen->LoadNPC(Rand(Screen->NumNPCs())+1);
go(e->X,e->Y,d,s,t,c,n,a);
}else{
for(i=0;i<176;i++){
if(Screen->ComboF[i] == 76 || Screen->ComboI[i] == 76){
b = i;
i = 176;
}
}
if(b>0){
fy = Floor(b/16);
fx = b-(fy*16);
go(fx*16,fy*16,d,s,t,c,n,a);
}else go(Rand(256)+1,Rand(168)+1,d,s,t,c,n,a);
}
}
void go(int x,int y,int d,int s,int t,int c,int n,int a){
lweapon f = Screen->CreateLWeapon(13);
f->Tile = t; f->OriginalTile = t;
f->NumFrames = n; f->ASpeed = a;
f->CSet = c;
f->Step = s;
f->Damage = d;
f->X = Link->X;
f->Y = Link->Y;
f->Z = Link->Z;
f->Angular = true;
f->Angle = ArcTan((x-Link->X),(y-Link->Y));
Game->PlaySound(32);
}
}
It now creates a Wand Magic sprite, which will first attack all enemies on the screen, then go for any Wand Magic Flags (76), then just shoot off in random directions.
Fraid it's not rapid fire just yet though =P