I was looking for a bomb arrow script and found the one Joe123 made a while ago. I don't know if there is a more recent one but this is the only one I could find.
//Input constants const int ArrowDamage = 2; //Damage for Arrow to deal. Wooden sword deals 2 damage const int BombDamage = 8; //Damage for explosion to deal const int ArrowSpeed = 300; //Speed arrow moves at, in hundredths of pixels per frame const int T_BOMBARROW = 205; //Arrange tiles in the order 'Up,Down,Left,Right' on the tilesheet. Set up-facing bomb arrow tile here //Variables int UseBombArrow; int ArrowX; int ArrowY; //Functions //Check inherent and regular flags at the same time bool ComboFI(int loc,int combotype){ if(Screen->ComboF[loc] == combotype || Screen->ComboI[loc] == combotype) return true; } //Solidity Check, by Saffith bool isSolid(int x,int y){ if(x<0 || x>255 || y<0 || y>175) return false; int mask = 1111b; if(x%16<8) mask &= 0011b; else mask &= 1100b; if(y%16<8) mask &= 0101b; else mask &= 1010b; int ret = Screen->ComboS[ComboAt(x,y)]&mask; return ret != 0; } global script Slot_2{ void run(){ while(true){ //Call bomb arrow functions if(UseBombArrow > 0) BombArrow(); Waitframe(); } } //bomb arrow functions void BombArrow(){ if(UseBombArrow == 1){ lweapon Arrow = Screen->CreateLWeapon(LW_ARROW); int x; int y; if(Link->Dir > 1) x = (Link->Dir-2)*16-8; else y = Link->Dir*16-8; Arrow->X = Link->X+x; Arrow->Y = Link->Y+y; Arrow->Dir = Link->Dir; Arrow->Tile = T_BOMBARROW; Arrow->Tile += Link->Dir; Arrow->Damage = ArrowDamage; Arrow->Step = ArrowSpeed; Game->PlaySound(SFX_ARROW); Link->Action = LA_ATTACKING; UseBombArrow++; }else{ lweapon Arrow; bool Found; for(int i=1;i<=Screen->NumLWeapons();i++){ Arrow = Screen->LoadLWeapon(i); if(Arrow->ID != LW_ARROW) continue; Found = true; } if(Found){ ArrowX = Arrow->X; ArrowY = Arrow->Y; for(int j=-4;j<=4;j+=4){ for(int k=-4;k<=4;k+=4){ if(isSolid(Arrow->X+8+j,Arrow->Y+8+k) || ComboFI(ComboAt(Arrow->X+8+j,Arrow->Y+8+k),CF_BOMB)) Arrow->DeadState = 0; } } }else{ lweapon Exp = Screen->CreateLWeapon(LW_BOMBBLAST); Exp->Damage = BombDamage; Exp->X = ArrowX; Exp->Y = ArrowY; UseBombArrow = 0; } } } } item script BombArrows{ void run(){ if(Game->Counter[CR_BOMBS] > 0 && Game->Counter[CR_ARROWS] > 0 && UseBombArrow == 0){ UseBombArrow++; Game->Counter[CR_BOMBS]--; Game->Counter[CR_ARROWS]--; } } }
When I try to compile it in zquest it says "Syntax Error, Unexpected Semicolon [Line 1458 Column 24 '('] - Error P000: Can't Parse The Main Buffer! Aborting"
I am using Moosh's global script organizer and multiple other scripts, so in the base Bomb Arrow script line 1458 is 39, the one that says "void BombArrow(){".
I am using zquest version 2.55 alpha 92.