Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-06-2001, 02:55 AM
XilosTinsu XilosTinsu is offline
Registered User
Join Date: Jun 2001
Posts: 130
XilosTinsu is on a distinguished road
Send a message via AIM to XilosTinsu Send a message via Yahoo to XilosTinsu
Staff Boots

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


Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.