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 07-02-2001, 04:09 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Question 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!
Reply With Quote
  #2  
Old 07-02-2001, 04:18 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
Because A is 6 and not 5
__________________

Reply With Quote
  #3  
Old 07-02-2001, 04:26 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
That may make some sense.
Thanks!
Reply With Quote
  #4  
Old 07-02-2001, 04:28 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Sorry for the spam, but it didn't work and A is 5.
I still need help!
Reply With Quote
  #5  
Old 07-02-2001, 08:57 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
I was hoping for you

Bleh guess I will have to go and connect to Delteria or do some other suicidial act...
Reply With Quote
  #6  
Old 07-02-2001, 09:55 PM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Error

Shadow Dragons has something like that but theres makes you walk EVERYWHERE
Reply With Quote
  #7  
Old 07-02-2001, 10:03 PM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Ummm

They can script but they wasnt tring to make you just walk fast! It is a STAFF WEAPON
Reply With Quote
  #8  
Old 07-02-2001, 10:58 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
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 =/)
Reply With Quote
  #9  
Old 07-02-2001, 11:01 PM
Marco2002 Marco2002 is offline
Registered User
Join Date: Jun 2001
Location: Germany
Posts: 77
Marco2002 is on a distinguished road
Send a message via ICQ to Marco2002
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;}

__________________
Reply With Quote
  #10  
Old 07-03-2001, 12:40 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
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!@
Reply With Quote
  #11  
Old 07-03-2001, 12:44 AM
T-Squad T-Squad is offline
Banned
T-Squad's Avatar
Join Date: Mar 2001
Location: United States of America
Posts: 1,733
T-Squad is on a distinguished road
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*
Reply With Quote
  #12  
Old 07-03-2001, 01:50 AM
CyanideSR71 CyanideSR71 is offline
Registered User
CyanideSR71's Avatar
Join Date: Jun 2001
Location: Canada
Posts: 460
CyanideSR71 is on a distinguished road
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)

__________________
Cyanide SR71
Former Shadow Dragon
Co-Owner of what was Murasamune
Reply With Quote
  #13  
Old 07-03-2001, 03:20 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Most of my scripting knowledge comes from reading commands.rtf!
Not much comes from other people.
Reply With Quote
  #14  
Old 07-04-2001, 05:58 PM
mastervampire mastervampire is offline
Banned
Join Date: Jun 2001
Location: Australia
Posts: 203
mastervampire is on a distinguished road
Send a message via AIM to mastervampire
Unhappy

Someone lock me in a room =P padded hopefully, because scripting drives me nuts.
Reply With Quote
  #15  
Old 07-04-2001, 06:49 PM
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
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.
__________________
Creator of the original 'spam' icon. Worst mistake I ever made on these forums.
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 05:52 AM.


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