What do I do now? Do I still need the first script?
Thanks!
Script:
Spoiler
import "std.zh" int EngineEvents[214747]; //Global array to hold game event datum. const int BREAK_SWORD_COUNT = 214700; //Leave alone unless you know why this exists. const int ITM_BREAK_SWORD = 1; //Breakable sword item number const int SFX_BREAK_SWORD = 34; //Sound effect const int MSG_BREAK_SWORD = 1000; //Message string. item script BreakSword{ void run(int msg){ int ff[]="BreakswordFFC"; int fs = Game->GetFFCScript(ff); bool match; lweapon sword; int q; for ( q = Screen->NumLWeapons(); q >= 0; q--){ sword = Screen->LoadLWeapon(q); if ( sword->ID == LW_SWORD ) sword->Misc[9] = 10244; } for (int q = 1; q <= 32; q++) { ffc f = Screen->LoadFFC(q); if ( f->Script == fs ) match = true; } if (!match ) RunFFCScript(fs,NULL); } } ffc script BreakswordFFC{ void run(){ lweapon sword; npc n; while(true){ for ( int q = Screen->NumLWeapons(); q >= 0; q--){ sword = Screen->LoadLWeapon(q); if ( sword->ID == LW_SWORD && sword->Misc[9] == 10244 ) { for ( int w = Screen->NumNPCs(); w >= 0; w--) { n = Screen->LoadNPC(w); if (Collision(sword,n) ){ sword->Misc[9] = 0; ++EngineEvents[BREAK_SWORD_COUNT]; if ( EngineEvents[BREAK_SWORD_COUNT] >= 100 ) { EngineEvents[BREAK_SWORD_COUNT] = 0; if ( SFX_BREAK_SWORD ) Game->PlaySound(SFX_BREAK_SWORD); Link->Item[ITM_BREAK_SWORD] = false; if ( MSG_BEAK_SWORD ) Screen->Message(MSG_BREAK_SWORD); } } } } } Waitframe(); } } }