Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Tournament of Scripters (https://forums.graalonline.com/forums/showthread.php?t=11672)

AlexH 09-18-2001 03:33 AM

scripting is just like programming
if you dont have a command you script the command not ask stefan to make it
for example if you want an onsnow command script it using tile check then you can use it in other scripts

Lycia 09-18-2001 07:41 PM

Quote:

Originally posted by Kaimetsu


I don't think Stefan is entering, and even if he was then it wouldn't make it impossible for everyone else. Stefan's good but he's not a god, and there are scripters who would stand a chance against him. I'm not saying they'd be likely to beat him, but they'd have a chance.


Uh, Kaimetsu. Normally, I agree with you with regards to several opinions, however, this one I'm gonna have to disagree.

Stefan made up GScript. He knows it 100%. He understands it, so for you to say that he's not a god, is a bit premature. Gods create things. Stefan created GScript. Stefan is the God of NPC Scripting.

Krakken_2001 09-18-2001 09:14 PM

Quote:

Originally posted by Lycia



Uh, Kaimetsu. Normally, I agree with you with regards to several opinions, however, this one I'm gonna have to disagree.

Stefan made up GScript. He knows it 100%. He understands it, so for you to say that he's not a god, is a bit premature. Gods create things. Stefan created GScript. Stefan is the God of NPC Scripting.

Hey, that's a good argument. On the other hand, you could say anyone is a God. If I can create a script IN GScript, of my own, would that not make me a Script God?

Lycia 09-19-2001 02:04 AM

Quote:

Originally posted by Merlin_2001
I don't know how to script, but I'd like to find out.

I'm learning scripting via Professor Kaimetsu. It's really leet.

Here's my very first script:

NPC Code:

//-------------------------------------------
// NPC made by Lycia
//-------------------------------------------
if (playerenters) {
toweapons Landmine;
}
if (weaponfired) {
showimg 1,landminenpc.gif,playerx,playery;
changeimgvis 1,0;
this.minex=playerx;
this.miney=playery;
timeout=0.05
}
if(timeout){
timeout=0.05;
for(i=1;i!=playerscount;i++) {
this.xdistance = players[i].x - this.minex;
this.ydistance = players[i].y - this.miney;
this.totaldistance = ( this.xdistance^2 + this.ydistance^2 ) ^ 0.5;
if (this.totaldistance<3) {
hideimg 1;
timeout=0;
putexplosion 2,this.minex,this.miney;
}
}
}




w00t.

JeffTL 09-19-2001 04:27 AM

Nice landmine, Lycia, a lot like the one on Classic...better, but with some of the same problems (not putnpc, which has its advantages). but I guess I'll post mine...could be more efficient, but it blows up every time and doesn't follow the player around, unlike the current one.
NPC Code:

// NPC made by Jeff, 8.21.2001
// The code for this firemine is entirely original,
// save for a few of the blasts from the
// old Starcon/Lord Chimp version
// The reason it is now just the Fire Mine and not
// the STARCON FireMine is that the code really isn't
// any creation of STARCON's, being rewritten
// as it is. Why credit a guy who did little towards this?
// This takes up seven bombs instead of five, as it uses
// more explosions, and actually WORKS ALL THE TIME!

//new fire mine, laying section
if (playertouchsme) {
set jeffmine;
toweapons Fire Mine;
}

if(weaponfired && playerbombs >=7){
playerbombs -= 7;
putnpc starconexplo.mng,jeffmine.txt,x,y;
}
if(created){
timeout=1;
}
if(timeout){
message Fire Mine;
}



NPC Code:

// Operating part of the new fire mine system.
if (created){
// Set safe getaway time for the setter, and display it to help.
timeout=5;
timershow;
}
if (timeout){
// after the five secs are up
if ((abs(playerx-x)<=5) || (abs(x-playerx)<=5)){
// absolute value of one x and one Y difference must be less than or equal to five.
// Larger range than the old one. This is to ensure that it sets off correctly.
if ((abs(playery-y)<=5) || (abs(y-playery)<=5)){
// to establish a square, as opposed to a semisquare rectangle

// explodes, destroys itself in the process
putexplosion 5, x, y;
putexplosion 4, x+1, y;
putexplosion 4, x, y+1;
putexplosion 4, x+1, y+1;
putexplosion 4, x, y-1;
putexplosion 4, x-1, y;
putexplosion 4, x-1, y-1;
putexplosion 3, x+2, y+2;
putexplosion 3, x-2, y-2;
putexplosion 3, x+2, y-2;
putexplosion 3, x-2, y+2;
putexplosion 2, x+3, y+3;
putexplosion 2, x-3, y-3;
putexplosion 2, x+3, y-3;
putexplosion 2, x-3, y+3;
destroy;
// larger explosion than the old Fire Mine, so as to almost always damage the poor sod who steps too close.
}
}
// sets timeout to minimum amount to check for triggering
timeout=.05;
// the shown timer will disappear by itself as part of the timeout.
}


General 09-19-2001 04:47 AM

Quote:

Originally posted by Kaimetsu


Soon I'll teach you the best way to indent. It makes your code easier for you and others to read.

\

dammit kai! make her learn herself, like you and I did!

T-Squad 09-19-2001 11:04 AM

Quote:

Originally posted by Lycia



Uh, Kaimetsu. Normally, I agree with you with regards to several opinions, however, this one I'm gonna have to disagree.

Stefan made up GScript. He knows it 100%. He understands it, so for you to say that he's not a god, is a bit premature. Gods create things. Stefan created GScript. Stefan is the God of NPC Scripting.

Umm not exactly....

He is perfect. Knows everything...Stefan may have created something, yes, but does he know everything? Is he perfect in the area of graal? No.

BocoC 09-19-2001 11:20 AM

Quote:

Originally posted by Kaimetsu


Soon I'll teach you the best way to indent. It makes your code easier for you and others to read.

I have always done it like Stefan does it, I think... 2 spaces per block. The only time I don't put 2 spaces in any programming language is Visual Basic. I TAB it =P

SagaTCN 09-19-2001 12:01 PM

Is there something wrong with the Style button? haha.

Lycia 09-19-2001 05:43 PM

Quote:

Originally posted by General
\

dammit kai! make her learn herself, like you and I did!

:(

Krakken_2001 09-19-2001 06:49 PM

Quote:

Originally posted by Lycia
if (this.totaldistance <3 ) {
Awww, I think there may be an attraction between Kai and Lycia :D

Krakken_2001 09-19-2001 08:25 PM

Quote:

Originally posted by Kaimetsu


Haha, well spotted. I never noticed that; 3 was just an arbitrary value we used.

Heheheh :p

JeffTL 09-19-2001 11:35 PM

Stefan IS the best graal scripter out there...not only does he know the language in and out, but if there's a command he wants but doesn't have, he can always decide it's time for a new version of Graal and try to make the command.

Merlin 09-19-2001 11:53 PM

Quote:

Originally posted by JeffTL
Stefan IS the best graal scripter out there...not only does he know the language in and out, but if there's a command he wants but doesn't have, he can always decide it's time for a new version of Graal and try to make the command.
no that's un-true. stefan made graal but is not the best pker, stefan made graal and he is also not the best level tiler.

JeffTL 09-20-2001 12:03 AM

Somebody missed the cluebus. I said scripter. The best tiler is Tyhm or Zero 33 or someone like that, and the best PKer is probably Lord Chimp. But Stefan rules the scripting world, from what I've seen. Tell me, Merlin, ONE SCRIPTER better than Stefan. Is it Kyle? Or maybe Tyhm? Antago? Tell me.



addition:


PKing and tiling are different disciplines from scripting...PKing skill consists of bandwidth and dexterity, tiling requires skill in sticking sixteen-pixel squares together to create play areas, and scripting is a form of programming, requiring a logical mind and knowledge of the language.


All times are GMT +2. The time now is 08:17 PM.

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