Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-23-2001, 08:03 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Some go anywhere boots ....

These are some kool boots i whipped up for a playerworld and i dont beleive that scripts should be secrets so feel free to use this at your own expense ...
//NPC made by Nyght (FAQ)
if (playertouchsme) {toweapons Staff Boots

}

if (weaponfired) {
if (this.activated==0) {
setplayerprop #c, NAT Shoes On;
this.activated = 1;
timeout = 0.05;
}
else {
this.activated = 0;
setplayerprop #c, NAT Shoes Off;
}
}
if (playerchats && strcontains(#c,speed)) {
if (strequals(#c,speed 0.5)) {
this.speed=0.5;
}
if (strequals(#c,speed 1)) {
this.speed=1;
}
if (strequals(#c,speed 1.5)) {
this.speed=1.5;
}
if (strequals(#c,speed 2)) {
this.speed=2;
}
}
if (timeout==0 && this.activated==1) {
if (this.speed==0) {
this.speed=1;
}
if (keydown(0)) {
playery -= this.speed;
}
if (keydown(1)) {
playerx -= this.speed;
}
if (keydown(2)) {
playery += this.speed;
}
if (keydown(3)) {
playerx += this.speed;
}
if (playerx > 61) {
playerx = 61;
}
if (playery > 61) {
playery = 61;
}
if (playerx < 0) {
playerx = 0;
}
if (playery < 0) {
playery = 0;
}
timeout = 0.05;
}
Reply With Quote
  #2  
Old 08-23-2001, 09:20 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
i like my old ones =)

// NPC made by Josey Hunt
dontblock;drawoverplayer;
if (playertouchsme && staff){
toweapons Sprinting Boots;}
timeout=.05;
if(weaponfired){if(this.k=1){this.k=0;}
elseif(this.k=0){this.k=1;}}
if(timeout && this.k=1){if (keydown(0)){playery-=2;}if(keydown(1)){playerx-=2;}if(keydown(2)){ playery+=2; }if(keydown(3)){playerx+=2;}}

alot shorter and easier to change.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #3  
Old 08-23-2001, 09:37 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
NPC Code:
if (playertouchsme) toweapons Admin Boots;
if (weaponfired) this.active=1-this.active;
if ((created||timeout)&&isweapon) {
if (this.speed==0) this.speed=1;
for (i=0;i<4;i++) if (keydown(i)) {
playerx+=vecx(i)*this.speed;
playery+=vecy(i)*this.speed;
}
timeout=0.05;
}
if (playerchats&&startswith(setspeed,#c)) this.speed=strtofloat(#T(#e(8,-1,#c)));

Simple, short and it does exactly the same.
__________________

Reply With Quote
  #4  
Old 08-23-2001, 10:19 PM
Mousevision Mousevision is offline
Registered User
Join Date: Aug 2001
Posts: 1
Mousevision is on a distinguished road
you need to tokenize it. That way you can have any speed you want! or is that a bad thing?


Soon i will have a sig, and at that day, man shall rejoyce.
Reply With Quote
  #5  
Old 08-24-2001, 09:10 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
mine has speed controls

mine has the speed controls ....
Reply With Quote
  #6  
Old 08-24-2001, 03:34 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
Re: mine has speed controls

Quote:
Originally posted by nyghtGT
mine has the speed controls ....
So has mine.
__________________

Reply With Quote
  #7  
Old 08-24-2001, 03:41 PM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally posted by Mousevision
you need to tokenize it. That way you can have any speed you want! or is that a bad thing?


Soon i will have a sig, and at that day, man shall rejoyce.
he is saying

NPC Code:

if (playerchats){
if (startswith(speed,#c)){
tokenize #c;
this.speed=strtofloat(#t(1));
}
}



simple, short
Reply With Quote
  #8  
Old 08-24-2001, 03:54 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
Quote:
Originally posted by Warcaptain


he is saying

NPC Code:

if (playerchats){
if (startswith(speed,#c)){
tokenize #c;
this.speed=strtofloat(#t(1));
}
}



simple, short
Simple and shorter:
if (playerchats&&startswith(setspeed,#c)) this.speed=strtofloat(#T(#e(8,-1,#c)));
__________________

Reply With Quote
  #9  
Old 08-24-2001, 04:15 PM
Guest
Posts: n/a
hehe..nobody can defeat lady midnight
Reply With Quote
  #10  
Old 08-25-2001, 03:12 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Re: Some go anywhere boots ....

Quote:
Originally posted by nyghtGT
These are some kool boots i whipped up for a playerworld and i dont beleive that scripts should be secrets so feel free to use this at your own expense ...
//NPC made by Nyght (FAQ)
if (playertouchsme) {toweapons Staff Boots

}

if (weaponfired) {
if (this.activated==0) {
setplayerprop #c, NAT Shoes On;
this.activated = 1;
timeout = 0.05;
}
else {
this.activated = 0;
setplayerprop #c, NAT Shoes Off;
}
}
if (playerchats && strcontains(#c,speed)) {
if (strequals(#c,speed 0.5)) {
this.speed=0.5;
}
if (strequals(#c,speed 1)) {
this.speed=1;
}
if (strequals(#c,speed 1.5)) {
this.speed=1.5;
}
if (strequals(#c,speed 2)) {
this.speed=2;
}
}
if (timeout==0 && this.activated==1) {
if (this.speed==0) {
this.speed=1;
}
if (keydown(0)) {
playery -= this.speed;
}
if (keydown(1)) {
playerx -= this.speed;
}
if (keydown(2)) {
playery += this.speed;
}
if (keydown(3)) {
playerx += this.speed;
}
if (playerx > 61) {
playerx = 61;
}
if (playery > 61) {
playery = 61;
}
if (playerx < 0) {
playerx = 0;
}
if (playery < 0) {
playery = 0;
}
timeout = 0.05;
}
Heh. I am flatered you are taking credit for my script I made for Bravo a long time ago. But, you changed the name. It SHOULD be NAT Boots. You might wanna fix that...

Also, this script was made in Graal 1.41 I think. Or maybe 2.0... But before tokenize and startswith was made. Just to let you know.

If you guys want, I can post my old Admin level I made, complete with some good scripts, but old, for you guys. I just gotta check if I still have it...
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd

Last edited by BocoC; 08-25-2001 at 03:26 AM..
Reply With Quote
  #11  
Old 08-25-2001, 07:21 AM
toad1413 toad1413 is offline
toad@graal:~$ ./Oldbie
Join Date: May 2001
Location: Aust.
Posts: 3,819
toad1413 is on a distinguished road
Send a message via ICQ to toad1413
Quote:
Originally posted by thotijn2
hehe..nobody can defeat lady midnight
Only Kaimetsu really.
__________________
Creator of the original 'spam' icon. Worst mistake I ever made on these forums.
Reply With Quote
  #12  
Old 08-25-2001, 07:37 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally posted by grim_squeaker_x
Simple and shorter:
if (playerchats&&startswith(setspeed,#c)) this.speed=strtofloat(#T(#e(8,-1,#c)));
that works too.....
Reply With Quote
Reply


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 01:54 PM.


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