Zelda Boots. Almost

Tried to make some boots similar to those in Zelda. Basically, you hold down D and run around until you hit a wall or a baddie. Then you get hurt, but you also will hurt baddies.

if (playertouchsme) toweapons booooots;
if (weaponfired) {
  if (this.fired == 0) {
    this.fired = 1;
    this.go = 0;
    timeout = .05;
  }
}
if (timeout && this.fired == 1) {
  if (playersprite>0&&playersprite<8) {
    if (playermp <= 100) {
      this.speed = 0.5;
      if (this.go == 0) {
        freezeplayer 1;
        sleep 1;
        this.go = 1;
      }
      if (this.go == 1) {
        if (keydown(4)) {
          playermp -=.05;
          if (!onwall(playerx + 0.5,playery + 0.5) && !onwall(playerx + 1,playery + 0.5) && !onwall(playerx + 1.5,playery + 0.5)) {
            if (keydown(0)) {
              playery -= this.speed;
            }
          }
          else {
            hit();
            timeout=0;
          }
          if (!onwall(playerx - 0.5,playery + 1) && !onwall(playerx - 0.5,playery + 2)) {
            if (keydown(1)) {
              playerx -= this.speed;
            }
          }
          else {
            hit();
            timeout=0;
          }
          if (!onwall(playerx + 0.5,playery + 3) && !onwall(playerx + 1,playery + 3) && !onwall(playerx + 1.5,playery + 3)) {
            if (keydown(2)) {
              playery += this.speed;
            }
          }
          else {
            hit();
            timeout=0;
          }
          if (!onwall(playerx + 2.5,playery + 1) && !onwall(playerx + 2.5,playery + 2)) {
            if (keydown(3)) {
              playerx += this.speed;
            }
          }
          else {
            hit();
            timeout=0;
          }
        }
        else {
          this.fired = 0;
          timeout = 0;
        }
      }
    }
    else {
      this.fired = 0;
      timeout = 0;
    }
  }
  timeout = .05;
}
function hit() {
  hurt 1;
  hitobjects 1,playerx + 0.5,playery + 0.5;
  hitobjects 1,playerx + 1,playery + 0.5;
  hitobjects 1,playerx + 1.5,playery + 0.5;
  hitobjects 1,playerx - 0.5,playery + 1;
  hitobjects 1,playerx - 0.5,playery + 2;
  hitobjects 1,playerx + 2.5,playery + 1;
  hitobjects 1,playerx + 2.5,playery + 2;
  hitobjects 1,playerx + 0.5,playery + 3;
  hitobjects 1,playerx + 1,playery + 3;
  hitobjects 1,playerx + 1.5,playery + 3;
  this.fired = 0;
  return;
}

LAWL STUPID

holy shit spoon. i want to stab you.

they don’t seem to do anything except disable your movement . nice thought tho .

you have to hold the D button. not just press it once. that pause before you go use to have a little sound effects. lost that though. think of it as you are winding up for speed.

lol i like how u r giving out stuff that uv made for kandora when u worked there lol 3 post in a row all can be found on kandora lol if u look for it, lol

Holy shit! You talk worse than Loakey. O.o

Of course he does, an English speaking frog is a miracle in the first place. I CAUGHT POLIWRATH!!

LMAO well ud think u would be used to ti by now

On Graal I don’t care, but on the forums I might even care too much.

thanks for the script!

Zelda boots v2

Since I wanted some for my server, I made a v2 that acts more like LTTP boots… I wanted to add replacetiles for when you run through bushes and tall grass but I got lazy.
Anyways, enjoy!

if (created) toweapons Dash Boots; setimg lttp_boots.png;
if (weaponfired) {
  if (this.fired == 0) {
    this.fired = 1;
    this.go = 0;
    this.i = 0;
    timeout = .05;
  }
}
if(playerhurt){enabledefmovement;}
if (timeout && this.fired == 1&&!playerhurt) {
  this.speed = 1;
  if (this.go == 0) {
    disabledefmovement;
    setani dash,;
    this.fallback = 0;
    sleep .5;
    this.go = 1;
  }
  if (this.go == 1&&timeout&&!playerhurt) {
    if (keydown(4)) {
      if(dir==0){
        if (!onwall(playerx + 0.5,playery + 0.5) && !onwall(playerx + 1,playery + 0.5) && !onwall(playerx + 1.5,playery + 0.5)&&!this.fallback==1) {
          disabledefmovement;
          playery -= this.speed;
          setani dashsword,;
          if(swordpower!=0){
            hitobjects swordpower,playerx + 1.5,playery + 0.5;
            hitobjects swordpower,playerx + 0.5,playery + 0.5;
            hitobjects swordpower,playerx + 1,playery + 0.5;
          }
          callnpc testnpc(playerx + vecx(dir),playery + vecy(dir)),actiondashbumped,;
          timeout = .05;
        }
        else {
          disabledefmovement;
          hit();
          timeout=0.05;
        }
      }
      if (dir==1) {
        if (!onwall(playerx - 0.5,playery + 1) && !onwall(playerx - 0.5,playery + 2)&&!this.fallback==1) {
          disabledefmovement;
          playerx -= this.speed;
          setani dashsword,;
          if(swordpower!=0){
            hitobjects swordpower,playerx - 0.5,playery + 1;
            hitobjects swordpower,playerx - 0.5,playery + 2;
          }
          callnpc testnpc(playerx + vecx(dir),playery + vecy(dir)),actiondashbumped,;
          timeout = .05;
        }
        else {
          disabledefmovement;
          hit();
          timeout=0.05;
        }
      }

      if (dir==2) {
        if (!onwall(playerx + 0.5,playery + 3) && !onwall(playerx + 1,playery + 3) && !onwall(playerx + 1.5,playery + 3)&&!this.fallback==1) {
          disabledefmovement;
          playery += this.speed;
          setani dashsword,;
          if(swordpower!=0){
            hitobjects swordpower,playerx + 0.5,playery + 3;
            hitobjects swordpower,playerx + 1,playery + 3;
            hitobjects swordpower,playerx + 1.5,playery + 3;
          }
          callnpc testnpc(playerx + vecx(dir),playery + vecy(dir)),actiondashbumped,;
          timeout = .05;
        }
        else {
          disabledefmovement;
          hit();
          timeout=0.05;
        }
      }
      if (dir==3) {
        if (!onwall(playerx + 2.5,playery + 1) && !onwall(playerx + 2.5,playery + 2)&&!this.fallback==1) {
          disabledefmovement;
          playerx += this.speed;
          setani dashsword,;
          if(swordpower!=0){
            hitobjects swordpower,playerx + 2.5,playery + 2;
            hitobjects swordpower,playerx + 2.5,playery + 1;
          }
          callnpc testnpc(playerx + vecx(dir),playery + vecy(dir)),actiondashbumped,;
          timeout = .05;
        }
        else {
          disabledefmovement;
          hit();
          timeout=0.05;
        }
      }
    }
    else if(this.fallback==1){hit()}
    else {
      enabledefmovement;
      setani idle,;
      this.fired = 0;
      this.go = 0;
      return;
    }
  }
  timeout = .05;
}
if(playerdies){
  this.fired = 0;
}
function hit() {
  if (this.i<22){
    if (this.fallback==0){
      setani fallback,;}
    this.fallback = 1;
    if(!onwall(playerx-vecx(dir)/5,playery-vecy(dir)/5)){
      playerx -= vecx(dir)/5;
      playery -= vecy(dir)/5;
    }
    this.i += 1;}
  else{timeout=0; this.fired=0; enabledefmovement; return;}
}

And here’s links to the sounds I used:
http://noproblo.dayjo.org/ZeldaSounds/LTTP/LTTP_Link_Dash.wav
http://noproblo.dayjo.org/ZeldaSounds/LTTP/LTTP_Door_Close.wav

You’re still not using vecx and vecy. I’m not saying you must but I hate seeing all this repeated code. Until you refine your scripts, I suggest not posting such scripts in the code gallery so as to provide player worlds with efficient scripts otherwise there’s going to be a real lag issue when someone decides to collate all the scripts on one server.

I basically took hosler’s script and moved stuff around.
Sorry for not rewriting it :stuck_out_tongue: