if (Link->Dir==0) //Link facing up { whip->X = Link->X; whip->Y = Link->Y-16; whip->OriginalTile = tilenum + 2; int secondtileargs[4] = {whip->X, whip->Y-16, whip->CSet, tilenum+3}; RunFFCScript(FFCSlot2, secondtileargs); for(int i=0; i<=Screen->NumNPCs(); i++) { npc enem = Screen->LoadNPC(i); if(enem->X >= whip->X-8 && enem->X <= whip->X+8 && enem->Y >= whip->Y-32 && enem->Y <= whip->Y+8) { int args[1] = {i}; RunFFCScript(eFlashFFC, args); enem->HP-=hurt; enem->Stun=stunduration; } } for(int j=0; j<=Screen->NumItems(); j++) { item itemtograb=Screen->LoadItem(j); if (itemtograb->X >= whip->X-8 && itemtograb->X <= whip->X+8 && itemtograb->Y >= whip->Y-32 && itemtograb->Y <= whip->Y+8) { itemtograb->X=Link->X; itemtograb->Y=Link->Y; } } } ffc script WhipSecondTile { void run(int whipx, int whipy, int whipcset, int tile_cset) { int tilenum = GetHighArgument(tile_cset); lweapon whip = Screen->CreateLWeapon(LW_SCRIPT1); whip->CSet = whipcset; whip->NumFrames=1; whip->TileWidth=1; whip->TileHeight=1; whip->DeadState=30; whip->X=whipx; whip->Y=whipy; whip->OriginalTile=tilenum; while(whip->DeadState>0){Link->Action=LA_ATTACKING; WaitNoAction();} } }