PDA

View Full Version : Staff Boots


XilosTinsu
06-06-2001, 03:55 AM
OK I'm wanting the boots to activate when I say boots on, then it asks what speed, but it's not working here this is what I have so far...
// Boots by Secret Agent Smiley :-)
if (strequals(#c,Boots on)) {this.inuse=0}
if (this.inuse==0) {this.inuse=1;
timeout=.05;
setplayerprop #c,What speed?;
this.sleep=5;
this.bootsmode=1} else {this.inuse=0;}}
if (this.sleep=5) {this.sleep--}
if (playerchats && this.bootsmode==1 && this.sleep=0) {setstring bootspeed,#c;
this.bootsmode=0}
if (timeout) {
if (this.inuse=1) {
if (keydown(0)) {playerdir=0;
playery-=(bootspeed/4);}
if (keydown(1)) {playerdir=1;
playerx-=(bootspeed/4);}
if (keydown(2)) {playerdir=2;
playery+=(bootspeed/4);}
if (keydown(3)) {playerdir=3;
playerx+=(bootspeed/4);}}
timeout=.05;}
if (strequals(#c,boots off)) {this.inuse=0}
OR this
//Boots
if (this.sleep>0) {this.sleep--;}
timeout=.05;
if (strequals(#c,boots on) && this.bootmode==0) {setplayerprop #c,What speed?;
this.sleep=5;
this.bootmode=1;
this.inuse=1;
timeout=.25}
if (playerchats && this.bootmode==1 && this.sleep=0) {setstring bootspeed,#c;
this.wepenmode=0}
if (timeout) {if (this.inuse=1) {if (keydown(0)) {playerdir=0;
playery-=(bootspeed/4);}
if (keydown(1)) {playerdir=1;
playerx-=(bootspeed/4);}
if (keydown(2)) {playerdir=2;
playery+=(bootspeed/4);}
if (keydown(3)) {playerdir=3;
playerx+=(bootspeed/4);}}
timeout=.05;}
if (strequals(#c,boots off)) {this.inuse=0}

WingDrgn
06-06-2001, 10:36 AM
Shouldn't it be #c,(index)?

Bravo_NPC-Admin1
06-06-2001, 10:59 AM
if (playerchats && strequals(#c,Boots on)) {
timeout=.05;
}
if (playerchats && strequals(#c,boots off)) {
timeout=0;
}
if (playerchats && startswith(#c,bootspeed)) {
tokenize #c;
client.bootspeed=#t(1);
}
if (timeout) {
if (keydown(0)) {playerdir=0; playery-=(client.bootspeed/4); }
if (keydown(1)) {playerdir=1; playerx-=(client.bootspeed/4); }
if (keydown(2)) {playerdir=2; playery+=(client.bootspeed/4); }
if (keydown(3)) {playerdir=3; playerx+=(client.bootspeed/4); }
timeout=.05;
}

Now. Say Boots On for the boots to be on. Boots Off to turn them off. To set speed, say bootspeed <speed>. For example:
bootspeed 2

How about that?

grim_squeaker_x
06-06-2001, 06:05 PM
if (created) this.speed=1;
if (playertouchsme) toweapons Boots thingumajig;
if (weaponfired) this.active=(this.active+1)%2;
if (playerenters||timeout) {
if (this.active==1) {
for (this.k=0;this.k<4;this.k++) if (keydown(this.k)) {
playerx+=vecx(this.k)*this.speed;
playery+=vecy(this.k)*this.speed;
}
}
timeout=0.05;
}
if (playerchats&&startswith(setspeed,#c)) {
tokenize #c;
this.speed=strtofloat(#t(1));
}
Which is basically one of the shortest possible scripts for admin boots with settable speed.