Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Some go anywhere boots .... (https://forums.graalonline.com/forums/showthread.php?t=10204)

nyghtGT 08-23-2001 08:03 AM

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;
}
http://www.deceptiononline.f2s.com/nyghdoll.gif

joseyisleet 08-23-2001 09:20 PM

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.

grim_squeaker_x 08-23-2001 09:37 PM

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.

Mousevision 08-23-2001 10:19 PM

you need to tokenize it. That way you can have any speed you want! or is that a bad thing? :D


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

nyghtGT 08-24-2001 09:10 AM

mine has speed controls
 
mine has the speed controls ....
http://www.deceptiononline.f2s.com/nyghtdoll.gif

grim_squeaker_x 08-24-2001 03:34 PM

Re: mine has speed controls
 
Quote:

Originally posted by nyghtGT
mine has the speed controls ....
http://www.deceptiononline.f2s.com/nyghtdoll.gif

So has mine.

Warcaptain 08-24-2001 03:41 PM

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? :D


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

grim_squeaker_x 08-24-2001 03:54 PM

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)));

08-24-2001 04:15 PM

hehe..nobody can defeat lady midnight :D

BocoC 08-25-2001 03:12 AM

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;
}
http://www.deceptiononline.f2s.com/nyghdoll.gif

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...

toad1413 08-25-2001 07:21 AM

Quote:

Originally posted by thotijn2
hehe..nobody can defeat lady midnight :D
Only Kaimetsu really.

Warcaptain 08-25-2001 07:37 AM

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.....
:(


All times are GMT +2. The time now is 06:32 AM.

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