global script hpmpcounters{ void run(){ while(true) { Game->Counter[CR_SCRIPT2] = Link->HP; Game->Counter[CR_SCRIPT3] = Link->MP; Game->Counter[CR_SCRIPT4] = Link->MaxHP; Game->Counter[CR_SCRIPT5] = Link->MaxMP; } } void hcp(){ if (Link->Item[231] == true) //If Link has the fake item designated in D0 { Link->Item[230] = false; //Removes the fake item user selects in D0 Link->Item[231] = false; //Removes the item the user selects in in D1 Link->MP += 256; //Increases MP by value of D3 Link->MaxMP += 256; //Increases Max MP by value of D2 } else (Link->Item[230] == true); //Gives Link the specified item in D4. } } void bombados(){ float angle; { if (usebombodo == 1) { slower ++; if (slower == 5) { rad++; slower = 0; } angle = (angle + ORBIT_SPEED) % 360; f1 = 100 + rad * Cos(angle); f2 = 100 + rad * Sin(angle); Screen->FastCombo(6, f1, f2, 80, 2, 128); r1 = 40+Rand(150); r2 = 40+Rand(100); slowera++; if (slowera == 20) { slowera = 0; if (bombs < 30) { bombs ++; lweapon bomb = CreateLWeaponAt(LW_BOMBBLAST, r1, r2); Game->PlaySound(SFX_BOMB); if (bombs == 30) usebombodo = 0; } } } } } void onering(){ if ( ringOn && Link->MP ){ //Decrement magic ringTimer = (ringTimer+1) % ringTimePerMP; if ( !ringTimer ) Link->MP--; if ( Link->MP <= 0 //If magic ran out || Link->Action == LA_SCROLLING //Or left screen ){ //Take off ring ringOn = false; Link->CollDetection = true; Link->Invisible = false; } } else if ( !ringOn ){ //Disable ring Link->CollDetection = true; Link->Invisible = false; } Waitframe(); }