Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   free noob script (https://forums.graalonline.com/forums/showthread.php?t=11446)

LiquidIce00 09-08-2001 10:35 PM

free noob script
 
here is a little script .. ill comment it .. i made it in like 5 minutes cuz i was bored .. and I think it can teach something to some1 learning how to script

NPC Code:

// NPC made by LiquidIce
this.beginindex=200; //begin showimg index
//this is so it only shows local (local showimg starts at 200)

if (playerenters&&!isweapon) {
toweapons Scouter;
timeout=.05;
}

if (weaponfired) {
this.enabled=(this.enabled+1)%2;
//uses mod.. it will go back to 0 if this.enabled=>2
if (this.enabled=1) {
this.oldshow=this.beginindex;
//here we set the oldshow (which is a value that keeps track)
//of the highest showimg done .. useful when we are hiding
//all the showimgs.. we set to the beginindex so the for loop
//doesnt run .. (cuz no showimg has been done yet)
}
timeout=.05;
}

if (isweapon&&(timeout||playerenters)) {
hide(); //calls function to hide all the shown images
if (keydown(4)&&strequals(#w,Scouter)) {
//checks to see if D is being pressed and the current weapon
//is our scouter
check(); //does the check function
}
timeout=.05;
}

function hide() {
//hide function
for (this.a=this.beginindex;this.a<this.oldshow;this.a ++) {
//this forloop uses the this.oldshow to know when to stop
hideimg this.a;
//hides the img .. based on the loop
}
}

function check() {
for (this.a=1;this.a<playerscount;this.a++) {
//runs a loop starting at 1 (since 0 is you) .. and stops when
//this.a reaches playerscount
if (players[this.a].id>-1) {
//if its not a npc character..
showimg this.a+this.beginindex,@#v(players[this.a].hearts),players[this.a].x+.75,players[this.a].y-1;
//does a text showimg .. it uses the players array and this.a
// to check the players health,x, and y value..
}
}
this.oldshow=this.beginindex+playerscount;
//saves the highest value of the showimg .. for the hiding
}



there.. ^_^
yeah its from dbz o.o but so what ;D

Vinvect 09-08-2001 10:40 PM

dosent work

LiquidIce00 09-08-2001 10:56 PM

it works i tested it online ^_^

aesquivel 09-09-2001 04:25 AM

ya i cuya i couldnt get it to do any thing either what is it suposed ta do?:confused:

LiquidIce00 09-09-2001 05:15 AM

only works online of course..
but it displays the players health above his head when you hold down the d button ..
its like a DBZ scouter ;)

nyghtGT 09-09-2001 12:50 PM

DBZ ...
 
speakng of DBZ the new episodes start moday at 6:00 PM (EST)
and if you can not wait till monday Suncoast has them all the way up to about 16 episodes from where mondays will start .... if you would like to spoil your adventure about it then IM me at nyght2k1 and i'll tell yoo ..

Falcor 09-09-2001 03:57 PM

I can just see this script on Npulse now.....
the horror.

Slaktmaster 09-09-2001 04:36 PM

Are you an idiot Falados? Have we ever stolen a script?

konidias 09-09-2001 05:38 PM

Plus it had the kamehameha and all that other garbage on it.. you know the moves that newbies would use in order to run from pk battles? Yeah those stupid ones. :rolleyes:

Slaktmaster 09-09-2001 07:47 PM

well no stolen script has been put up while i have been working there...but what falados said was uncalled for.

Slaktmaster 09-09-2001 11:17 PM

I have and I am working hard there to make good stuff but this makes me angry. Shadow Dragon NPCs were allowed to use on servers before and people that could script stuff like that was rare!

Falcor 09-10-2001 02:04 AM

Heheh sorry. I still think of npulse as the place where i used hte Kamehameha attqack on people and was asked out 5 times when i named myself lily landfire. hehehehe

Slaktmaster 09-10-2001 02:51 AM

Kaimetsu: Yeah

Falados:
We still have the Kamehameha and I didn't know it were from Shadow Dragons... Or is it?

aesquivel 09-10-2001 05:36 AM

Quote:

Originally posted by Slaktmaster
Kaimetsu: Yeah

Falados:
We still have the Kamehameha and I didn't know it were from Shadow Dragons... Or is it?

ya thats where Kamehameha was from i was suposed ta werk for them cuz they liked some of my npcs but they can some n00b bastered the job instead of me:(

Slaktmaster 09-10-2001 01:38 PM

Um...English?

Did you make the Kamehameha?

wetferret1 09-10-2001 10:13 PM

Kahmehamehamea

Sep3kP2P 09-10-2001 10:58 PM

heh
 
am i the only one to bring delteria into this conversation? they stole every (almost) npc they made! yet i luv the server...

Slaktmaster 09-10-2001 11:12 PM

=/

Merlin 09-11-2001 12:03 AM

Re: DBZ ...
 
Quote:

Originally posted by nyghtGT
speakng of DBZ the new episodes start moday at 6:00 PM (EST)
and if you can not wait till monday Suncoast has them all the way up to about 16 episodes from where mondays will start .... if you would like to spoil your adventure about it then IM me at nyght2k1 and i'll tell yoo ..

woo today is monday

Slaktmaster 09-11-2001 12:06 AM

DBZ is stuipoppotifddpid :(


All times are GMT +2. The time now is 09:47 AM.

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