Thread: Staff Boots
View Single Post
  #4  
Old 06-06-2001, 05:05 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Hmm.

NPC Code:
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.
__________________

Reply With Quote