Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void BraceletThrow(){
- int loc = ComboInFront(Link->Dir);
- if(Link->Item[I_BRACELET2]
- && (Screen->ComboT[loc]== CT_PUSHHEAVY || Screen->ComboT[loc]==CT_BUSHNEXT)
- && DestinyVars[CURRENT_OVERWORLD]==MIRROR_OVERWORLD){
- Screen->FastCombo(4,Link->X,Link->Y-16,THINK_COMBO,5,128);
- if(CountFFCsRunning(THROW_FFC_SCRIPT)==0
- && Link->PressEx1){
- Link->PressEx1 = false;
- Link->InputEx1 = false;
- int tile;
- if(Screen->ComboT[loc]==CT_PUSHHEAVY)
- tile= ROCK_TILE;
- else if(Screen->ComboT[loc]==CT_BUSHNEXT)
- tile= BUSH_TILE;
- int Args[8]= {tile};
- NewFFCScript(THROW_FFC_SCRIPT,Args);
- SetScriptAction(SA_ATTACKING);
- if(Screen->ComboT[loc]== CT_PUSHHEAVY )
- Screen->ComboD[loc]= Screen->UnderCombo;
- else
- Screen->ComboD[loc]++;
- if(ComboFI(loc,CF_ARMOSITEM) && !Screen->State[ST_SPECIALITEM]
- && Screen->RoomType==RT_SPECIALITEM){
- item theitem = Screen->CreateItem(Screen->RoomData);
- theitem->X= ComboX(loc);
- theitem->Y= ComboY(loc);
- theitem->Pickup |= IP_HOLDUP;
- int Args[8]= {theitem->ID};
- NewFFCScript(ITEM_MONITOR_SCRIPT,Args);
- }
- }
- }
- }
- const int ITEM_MONITOR_SCRIPT = 87;
- ffc script ItemMonitor{
- void run(int item_to_watch){
- int i;
- item the_item;
- for(i = Screen->NumItems();i>0;i--){
- the_item = Screen->LoadItem(i);
- if(the_item->ID==item_to_watch)
- break;
- }
- while(the_item->isValid())
- Waitframe();
- Screen->State[ST_SPECIALITEM]= true;
- }
- }
- const int THROW_FFC_SCRIPT = 78;
- const int ROCK_TILE = 13270;
- const int BUSH_TILE = 13092;
- ffc script Thrown_Object{
- void run(int tile){
- lweapon throw;
- throw= FireLWeapon(LW_SCRIPT7, Link->X+8, Link->Y, __DirtoRad(Link->Dir),
- 100, 8, SPR_NULL, SFX_THROW, 0);
- SetLWeaponMovement(throw,LWM_THROW,3,LWMF_DIE);
- if(tile==ROCK_TILE)
- SetLWeaponDeathEffect(throw,LWD_4_FIREBALLS_RANDOM,18);
- else if(tile==BUSH_TILE)
- SetLWeaponDeathEffect(throw,LWD_4_FIREBALLS_RANDOM,106);
- SetLWeaponFlag2(throw,LWF_SHADOW);
- while(throw->isValid()){
- Screen->FastTile(3,throw->X,throw->Y-throw->Z,tile,0,128);
- Waitframe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement