LAT Boots

Name: Staff Boots
Type: Staff Tool
Author: John Doe
Description: Allows the player to walk on walls.

[code]if (playertouchsme) {
toweapons Staff/Staff Boots;
}
if (weaponfired) {
if (bootson) {
unset bootson;
}
else if (! bootson) {
set bootson;
timeout=.05;
}
}
if (timeout && bootson) {
if (keydown(0)) {
playery=playery-(1);
}
if (keydown(1)) {
playerx=playerx-(1);
}
if (keydown(2)) {
playery=playery+(1);
}
if (keydown(3)) {
playerx=playerx+(1);
}
timeout=.05;
}
if (playerchats&&isweapon) {
if (strequals(#c,boots on)) {
set bootson;
timeout=.05;
}
if (strequals(#c,boots off)) {
unset bootson;
}
}

[/code]

Lol i always lose this script and can never find it when i need it thanks keep this thread up :smiley:

That script is redundant, use this instead, shorter, cleaner…

if (playertouchsme) {
 toweapons Staff/Staff Boots;
}
if (weaponfired) {
 if (bootson) {
  unset bootson;
 }
 else if (! bootson) {
  set bootson;
  timeout=.05;
 }
}
if (timeout && bootson) {
 for (i=0;i<4;i++) {
    if (keydown(i)) {
      playerx += vecx(i);
      playery += vecy(i);
    }
  }
 timeout=.05;
}
if (playerchats&&isweapon) {
 if (strequals(#c,boots on)) {
  set bootson;
  timeout=.05;
 }
 if (strequals(#c,boots off)) {
  unset bootson;
 }
}

[QUOTE=Downsider;13261]
That script is redundant, use this instead, shorter, cleaner…

if (playertouchsme) {
 toweapons Staff/Staff Boots;
}
if (weaponfired) {
 if (bootson) {
  unset bootson;
 }
 else if (! bootson) {
  set bootson;
  timeout=.05;
 }
}
if (timeout && bootson) {
 for (i=0;i<4;i++) {
    if (keydown(i)) {
      playerx += vecx(i);
      playery += vecy(i);
    }
  }
 timeout=.05;
}
if (playerchats&&isweapon) {
 if (strequals(#c,boots on)) {
  set bootson;
  timeout=.05;
 }
 if (strequals(#c,boots off)) {
  unset bootson;
 }
}

[/QUOTE]

I didn’t write the original and this still achieves the same goal. But, it’s nice to see other methods.

Even the improved one is still pretty badly coded. The original sucks balls though.

Beholder has a nice one. But I don’t know if I should spread it without his permission. :stuck_out_tongue:

[QUOTE=Cadavre;13307]Beholder has a nice one. But I don’t know if I should spread it without his permission. :P[/QUOTE]

Go for it. After a while all staff boot scripts look the same to me.

People -REALLY- should get into the habit of using client./clientr. strings even if it has no true effect.

btw i wanna help improve too!

[CODE]
if (weaponfired) {
client.bootson = !client.bootson; // (is this even do-able in gs1?)
if (client.bootson)
timeout = 0.05;
}

if (timeout && client.bootson) {
for (i=0;i<4;i++) {
if (keydown(i)) {
playerx += vecx(i);
playery += vecy(i);
}
}

timeout = 0.05;
}
if (playerchats&&isweapon) {
if (strequals(#c,boots on)) {
client.bootson = true;
timeout = 0.05;
}

if (strequals(#c,boots off)) {
client.bootson = false;
timeout = 0;
}
}[/CODE]

if those are strings, don’t you have to do a setstring client.bootson,true; And i’m not certain if you can call a string as a true/false flag(atleast in it’s name alone). Maybe if(strequals(#s(client.bootson),true)){ ?

Name: S.Boots
Type: Staff Tool
Author: Beholder
Description: Allows the player to walk on walls.

[code]//#CLIENTSIDE
if(playerenters && !isweapon) hide;
if(playerenters && lindexof(#a,server.staff) > -1 && !hasweapon(S.Boots)){
this.bootdata = {false,false};
toweapons S.Boots;
}

if(lindexof(#a,server.staff) == -1 && isweapon) destroy;

if (keypressed) {
if(keydown2(keycode(w),true) && this.bootdata[1] == false && isweapon){
this.bootdata = {true,true};
while (this.bootdata[1] == true) {
if(!keydown2(keycode(w),true)) this.bootdata[0] = false;
else if(keydown2(keycode(w),true) && this.bootdata[0] == false) this.bootdata[1] = false;
for (this.key = 0; this.key < 4; this.key++) {
if (keydown(this.key)) {
playerx += vecx(this.key) * 0.5;
playery += vecy(this.key) * 0.5;
}
}
sleep 0.05;
}
}
this.bootdata = {false,false};
}

if(weaponfired) { say2 #bPress ‘w’ to use.; }[/code]

Its Amazing! :open_mouth: …I think.

It doesn’t warp you into blackness at random if you run over blocking tiles while warping a level! :stuck_out_tongue:

[QUOTE=Nalin;13392]
client.bootson = !client.bootson; // (is this even do-able in gs1?)

No. You gotta use set/unset.
[/QUOTE]

oh… well… setstring client.bootson,(#v(client.bootson)++) % 2);

or something like that lol

[QUOTE=Joey;13403]
oh… well… setstring client.bootson,(#v(client.bootson)++) % 2);

or something like that lol
[/QUOTE]

Just use a damn variable, if the person reconnects, the boots shouldn’t be turned on anyway. lol

lol