Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Bleh I can't script (https://forums.graalonline.com/forums/showthread.php?t=6328)

Slaktmaster 07-02-2001 04:09 PM

Bleh I can't script
 
Can someone check why this script doesn't make the player run fasten when he presses A rapidly?

if (playerenters) {
timeout=.05;
this.allowed=1;
}
if (timeout) {
if (playersprite in |1,8|&&this.allowed==1&&keydown(5)) {
this.allowed=0;
if (playerdir==0&&!onwall(x,y)) {playery--;}
if (playerdir==2&&!onwall(x,y+2.5)) {playery++;}
if (playerdir==1&&!onwall(x,y)) {playerx--;}
if (playerdir==3&&!onwall(x+2.5,y)) {playerx++;}
}
if (timeout&&!keydown(5)) {
this.allowed=1;
}
timeout=.05;
}

Pleeeeeaaaaassssssseee! :D

grim_squeaker_x 07-02-2001 04:18 PM

Because A is 6 and not 5

Slaktmaster 07-02-2001 04:26 PM

That may make some sense.
Thanks! :D

Slaktmaster 07-02-2001 04:28 PM

Sorry for the spam, but it didn't work and A is 5.
I still need help! :D

Slaktmaster 07-02-2001 08:57 PM

:( I was hoping for you :)

Bleh guess I will have to go and connect to Delteria or do some other suicidial act...

Poogle 07-02-2001 09:55 PM

Error
 
Shadow Dragons has something like that but theres makes you walk EVERYWHERE

Poogle 07-02-2001 10:03 PM

Ummm
 
They can script but they wasnt tring to make you just walk fast! It is a STAFF WEAPON

Slaktmaster 07-02-2001 10:58 PM

Thanks for the tips kai, I suppose I will have to do it myself and fight real hard for it to work. (Since the NAT i speak with doesnt understand what it should do, he has made LAT Boots with onwall detection three times now =/)

Marco2002 07-02-2001 11:01 PM

I made that press-as-fast-as-you-can-to-gain-heart NPC some time ago,but it works
it may help you (the variables have german names)
NPC Code:

if (keydown(5)&&!this.irgendwas2=1&&playerx<64&&playe rx>58&&playery<38&&playery>33) {
if (this.irgendwas>-1&&this.irgendwas<30) {this.irgendwas+=7;}
if (this.irgendwas>30&&this.irgendwas<60) {this.irgendwas+=6;}
if (this.irgendwas>60&&this.irgendwas<90) {this.irgendwas+=5;}
if (this.irgendwas>90&&this.irgendwas<120) {this.irgendwas+=4;}
if (this.irgendwas>120&&this.irgendwas<150) {this.irgendwas+=3;}
this.irgendwas2=1;}
if (playerenters) {timeout=0.05;}
if (timeout) {if (!keydown(5)) {this.irgendwas2=0;}
if (!this.irgendwas<1) {this.irgendwas--;}
timeout=0.05;
y=34-(this.irgendwas/10);
message #v(this.irgendwas)
}
if (this.irgendwas>150) {set gewonnen;}


Slaktmaster 07-03-2001 12:40 AM

Join the revolution to get rid of German vars
 
Wtf uh okay german vars, really scary.
Btw Kai, I got a slight bit of the script working!@

T-Squad 07-03-2001 12:44 AM

Quote:

Originally posted by Kaimetsu
And I assume that they could do good collision detection if they wanted to. Yes, I'm sure of it. Yes.
LOL YAY KAIMETSU DOESNT LIKE SDRAGON n00b SCRIPTERS EITHER....*better be quiet, kaimetsu doesnt like soul blade either*

CyanideSR71 07-03-2001 01:50 AM

Your right stupid people do take stuff from the Sdragons and use it on thier server. But that's not why they were there.
They made NPC's that other people could learn from. But if they don't want to learn they just won't learn....


hmm...

Signed,
Rogue Shadow -TT-*C* (TCN)


Slaktmaster 07-03-2001 03:20 AM

Most of my scripting knowledge comes from reading commands.rtf!
Not much comes from other people.

mastervampire 07-04-2001 05:58 PM

Someone lock me in a room =P padded hopefully, because scripting drives me nuts.

toad1413 07-04-2001 06:49 PM

Most of my scripting comes from looking at other scripts and learning of them (NOT copying off them. *Looks at Kai*), learning from other people and trying out stuff. I might be able to make that script, but I don't have time now, the onwall wouldn't be that good and it might be a pretty long script. Not that long Kai.


All times are GMT +2. The time now is 04:24 AM.

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