Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Pwnage NPC (https://forums.graalonline.com/forums/showthread.php?t=5868)

Slaktmaster 06-26-2001 05:16 PM

Pwnage NPC
 
This NPC pwns and was made my me alone so ph33r me! :D

// NPC made by Archaon (LAT)
// Info:
// You can reach me at [email protected]
// But don't ask for script since I suck.
// this. vars:
// this.explostype: explosion type (1 = normal, 3 = jolt bomb)
// this.radius: the explosion radius
// this.xincr: how much x space between the explosions
// set to 0 for no hortzontal movement
// this.yincr: how much y space between explosions
// set to 0 for no vertical movement
// this.explosstartx: the x where the explosion streak starts
// this.explosstarty: the y where the explosion streak starts
// this.explosx: the x where the explosion appear, dont touch
// this.explosy: the y where the explosion appear, dont touch
// this.xexplosdir: the x direction (1 = left, 3 = right)
// this.yexplosdir: the y direction (0 = up, 2 = down)
// this.exploscount: the number of explosions
// this.explodedcount: dont change this
// this.timeout: the time between each explosion streak
// this.timeout2: the time betweem each explosion
// this.again: leave this

if (playerenters) {
this.explostype = 3;
this.radius = 2;
this.xincr = 2;
this.yincr = 1;
this.explosstartx = x;
this.explosstarty = y;
this.explosx = this.explosstartx;
this.explosy = this.explosstarty;
this.xexplosdir = 3;
this.yexplosdir = 2;
this.exploscount = 20;
this.explodedcount = 0;
this.timeout = 1.1;
this.timeout2 = 0.05;
this.again = 1;
timeout = this.timeout;
}
if (timeout&&this.again==1) {
putexplosion2 this.explostype,this.radius,this.explosx,this.expl osy;
if (this.xexplosdir==3) {
this.explosx+=this.xincr;
} else if (this.xexplosdir==1) {
this.explosx-=this.xincr;
}
if (this.yexplosdir==0) {
this.explosy-=this.yincr;
} else if (this.yexplosdir==2) {
this.explosy+=this.yincr;
}
this.explodedcount+= 1;
if (this.explodedcount=>this.exploscount) {
this.explosx = this.explosstartx;
this.explosy = this.explosstarty;
this.explodedcount = 0;
this.again == 0;
timeout = this.timeout;
}
if (this.again==1) {
timeout = this.timeout2;
}
} else if (this.again==0) {timeout=this.timeout;this.again=1}

Shard_IceFire 06-26-2001 08:27 PM

does the script pwn? what?

SkooL 06-26-2001 08:41 PM

Quote:

Originally posted by Shard_IceFire
does the script pwn? what?
'pwn' is meant as a misstricken key for 'o', pwn means own.

Slaktmaster 06-26-2001 08:49 PM

Okay maybe the poll was a bit retarded but the script is quite useful if you want to make traps and dangerous rooms Ã*n quests.

kyle0654 06-26-2001 10:29 PM

*runs from putexplosion, the master of lag*

Slaktmaster 06-27-2001 05:16 AM

It shoots explosions in long lines and you can change the angel in wich they are shot

tecgoku234 06-28-2001 06:54 AM

...no commenting on the comments

one question, why didn't you just put them in with the rest of the code? instead of making it's own section to describe the variables.

plus, i just realized not a lot of scripters actually comment there code, *tsk tsk*, bad habit there, it helps you remember what in the heck the block of codes does.

espically comment in perl with a rather long script that you messed up and you can't fix, that is annoying...

Munkey 06-28-2001 03:21 PM

umm *wonders*

Slaktmaster 06-28-2001 11:10 PM

I never do it except when I send scripts to someone else.

General 06-29-2001 12:25 AM

I usually put a two line
//NPC made & copyright by Supersonic
//Date - Intention of Use - Server for use on (if any)

General 06-29-2001 12:27 AM

Oh yea also whenever i define a variable i put
this.var=1 //0-On, 1-off
this.vol=30 //Volume of the NPC

Slaktmaster 06-29-2001 01:17 AM

You should just change it to "Made by the official Graal script monkey" :D

Slaktmaster 06-29-2001 02:08 AM

Heh. But back to my script!!!@

Is it useful :) or not? :(

tecgoku234 06-29-2001 01:19 PM

help if i used it yet

well, i learned my lesson for commenting, do it.
graalscript really isn't necessary but for what i did to my perl, oiu...

*puts the script into graal*
somewhat useful, if i needed a stream of jolt bombs to come and attack me ^_^

heh, reminds me of when i made the fire blast spell that fuitad said he would put on graal, which never did... oh well..

the magic cape in onnet was much better, but was slopily scripted... dang cap and him rushing me with it

*reminisces of the olden days*
..blah blah..
*goes on for hours*

*ends this post*

Slaktmaster 06-29-2001 11:40 PM

I works fine as long as there is only one player in the level!!! x.X
:(


All times are GMT +2. The time now is 04:09 PM.

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