Jump to content

Photo

Dual Boomerangs


  • Please log in to reply
15 replies to this topic

#16 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 29 December 2007 - 09:08 PM

Well, here's a basic unfinished boomerang replica script:

CODE

ffc script boomerang1{
void run(){
int sx; int sy;
npc stun;npc stun2;npc stun3;
bool impact = false;int stunned=0;

while(true){
int tx = this->X; int ty = this->Y;
int lx = Link->X;int ly = Link->Y;
int e = Screen->LoadNumNPCs();
for (int s=e;s>0;s--){            
npc enemy = Screen->LoadNPC(s);
int ex = enemy->X;int ey = enemy->Y;
if (Abs(tx-ex)<15&&Abs(ty-ey)<15){
if(!(sx=enemy->X&&sy=enemy->Y;)){
stun=enemy;sx=stun->X;sy=stun->Y;impact=true;stunned=120;//120 ticks
}}}
if(impact){
if(Link->X > this_ffc->X)this_ffc->X+=2;//just copy/paste this and change Link to
if(Link->X < this_ffc->X)this_ffc->X-=2;//ffc other brang to have them switch places
if(Link->Y > this_ffc->Y)this_ffc->Y+=2;// if inputB&&ffc1&2->Data >1;
if(Link->Y < this_ffc->Y)this_ffc->Y-=2;
if(Abs(tx-lx)<3&&Abs(ty-ly)<3){
this->Data=1;impact=false;
}}
if(stunned != 0){
stunned--;
if(stun->isValid()){stun->X=sx;stun->Y=sy;}
else stunned=0;
}
if(Abs(tx-lx)>92 || Abs(ty-ly)>90)impact=true;
Waitframe();
}}}


Using this as a base someone can easily add all the other effects you wanted. I have an 8-dir item script posted somewhere at agn too, which you could use quite well for this.

I'm too busy nowadays to do script requests, but it shouldn't be too hard for someone to finish this.

Edited by Gleeok, 29 December 2007 - 09:09 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users