View Single Post
  #4  
Old 12-24-2001, 01:26 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
hmm

okay, obviously, youre really new to scripting, but atleast your trying

Okay, i have some tips for you!

Instead of doing
if (weaponfired&&timeout&&playerdir=0) {
blah}
ect, you should simplify it!

make it so there is only 1 timeout and weaponfired clause, in other words, make a nested if statement.
NPC Code:

if (timeout) {
if (other clause here) {
}
if (weaponfired) {
}
}


and for the weaponfired section, instead of having all the if playerdirs, use shootfireball playerdir;
that means it shoots the fireball the direction that the player is facing, because 0=up 1=left 2=down 3=right in graal.

And one thing that probably makes your script not run, in the playerdir=up section, you didnt specify a direction for it to shoot the fireball and nuke.

As for the while (isweapon) loop, that is insane.
just put
if (playerenters) {
blah;
timeout = .1;
toweapons MegaCheating Weapon;
}
if (timeout) {
blah;
blah blah;
blah blah blah;
if (isweapon) {timeout = .1;
}
}

that would only loop the timeout if the player has the weapon!
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote