Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Why Dos'e't This Work? (https://forums.graalonline.com/forums/showthread.php?t=11898)

Vinvect 09-15-2001 09:19 AM

Why Dos'e't This Work?
 
Why Dose'nt This Work?
NPC Code:
if (playerenters) {this.weaponammo=100;
}
if (playertouchsme) {toweapons Atom Bomb
}
if(weapoonfired && this.weaponammo>0||timeout && this.weaponammo>0){
putexplosion random(0,101),random(0,63),random(0,63);
sleep 0.1;
this.weaponammo--;
timeout=.1;
}



:grrr:

entravial 09-16-2001 05:12 AM

~AlphaFlame~

if(weapoonfired && this.weaponammo>0||timeout && this.weaponammo>0){

Ok... first of all: Weapoonfired? I think you mean weaponfired.

Second of all, don't put your weaponfired and timeout together. That means you'd hafta keep firing it for the timeout to work pretty much.

Third... Why in the hell are you using putexplosion? :grrr: Can't you people come up with an attack weapon that doesn't use putexplosion or lay or putbomb?! ARGGGGHHHH!!! *twitches violently. Duck falls from ceiling*

Ahhh quap... *BOOM!!!*

MoonAngel 09-16-2001 06:49 AM

the "||" stands for OR so putting both of them there is ok

entravial 09-17-2001 04:29 AM

~AlphaFlame~

*didn't see the ||* :megaeek:

But still, weapoonfired is bad bad :-P

Wait... dragoon fired? :megaeek: OH NOOO!!

*duck falls down and explodes*

TrueHeaT 09-17-2001 04:31 AM

try "if (playerenters) play stef5.mid" that usually works.

Vinvect 09-18-2001 06:48 AM

now how do i make this go curved?
NPC Code:

// NPC made by Darkoshi1
if(playerenters){
dontblock;
drawoverplayer;
timeout=.5;
}
if(timeout){
if(x>playerx){x--};
if(y<playery){y++};
if(x<playerx){x++};
if(y>playery){y--};
timeout=.05;
dontblock;
drawoverplayer;
}


:grrr: :grrr: :grrr:

Brady2 09-18-2001 08:29 AM

Re: Why Dos'e't This Work?
 
Quote:

Originally posted by Vinvect
Why Dose'nt This Work?
NPC Code:
if (playerenters) {this.weaponammo=100;
}
if (playertouchsme) {toweapons Atom Bomb
}
if(weapoonfired && this.weaponammo>0||timeout && this.weaponammo>0){
putexplosion random(0,101),random(0,63),random(0,63);
sleep 0.1;
this.weaponammo--;
timeout=.1;
}



:grrr:

NPC Code:

if (playerenters) this.weaponammo=100;
if (playertouchsme) toweapons Atom Bomb;
if((weaponfired || timeout) && this.weaponammo>0){
putexplosion random(0,101),random(0,63),random(0,63);
sleep 0.1;
this.weaponammo--;
timeout=.1;
}


Faheria_Admin5 09-18-2001 08:40 AM

That would be nice if a player never logged off. I think if im not mistaken variables reset apon logg off.

Vinvect 09-18-2001 09:47 AM

Quote:

Originally posted by Vinvect
now how do i make this go curved?
NPC Code:

// NPC made by Darkoshi1
if(playerenters){
dontblock;
drawoverplayer;
timeout=.5;
}
if(timeout){
if(x>playerx){x--};
if(y<playery){y++};
if(x<playerx){x++};
if(y>playery){y--};
timeout=.05;
dontblock;
drawoverplayer;
}


:grrr: :grrr: :grrr:

DUH PLEZSE ANYONE@!!!!!!!!!!!!!!!!!!!!!@@@!!!!!!?!?!?!!?!?!?? !?!?!:grrr: :grrr: :grrr:

Lycia 09-18-2001 07:36 PM

Quote:

Originally posted by TrueHeaT
try "if (playerenters) play stef5.mid" that usually works.
Hah. :D

General 09-19-2001 04:51 AM

...wow, trueheat can script! oh wait, he stole that from the levels pack...

PS: "the invincible man sent me" - lol, you can all sorts of crap in the levels pack

Vinvect 09-19-2001 07:00 AM

Quote:

Originally posted by Vinvect
now how do i make this go curved?
NPC Code:

// NPC made by Darkoshi1
if(playerenters){
dontblock;
drawoverplayer;
timeout=.5;
}
if(timeout){
if(x>playerx){x--};
if(y<playery){y++};
if(x<playerx){x++};
if(y>playery){y--};
timeout=.05;
dontblock;
drawoverplayer;
}


:grrr: :grrr: :grrr:

PPL READ!!!!!!!!!!!!!!!!!!!:grrr: :grrr: :mad:

Faheria_Admin5 09-20-2001 08:47 AM

Quote:

Originally posted by Kaimetsu


STEP ONE: LEARN TO SCRIPT
STEP TWO: SCRIPT IT YOURSELF AND LEAVE US ALONE

Go Kai! :D

nyghtGT 09-20-2001 09:32 AM

to curve ...
 
to curve an NPC its best to use radius and if your still in 6th grade like some of the Graalians i know you mihgt as well try your best at moving it with x and y (++,--)

y=mx+B

nyghtGT 09-21-2001 08:06 AM

Re: Re: to curve ...
 
Quote:

Originally posted by Kaimetsu


Please take care when using the word "best" when simply describing something from your limited knowledge.

are you making fun of me or just talking about my horrible math skills ?


All times are GMT +2. The time now is 07:16 AM.

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