Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-23-2002, 10:00 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Jagen.

He wasn't asking for an NPC... he was asking if anybody had a predefined "watershore" thing like the path generator. I don't think he can find konidias's and neither can I.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #2  
Old 06-23-2002, 10:03 AM
Shiftk03- Shiftk03- is offline
I am the trap
Shiftk03-'s Avatar
Join Date: Nov 2001
Location: Dirty South
Posts: 1,688
Shiftk03- will become famous soon enough
Re: Jagen.

Quote:
Originally posted by Torankusu
He wasn't asking for an NPC... he was asking if anybody had a predefined "watershore" thing like the path generator. I don't think he can find konidias's and neither can I.
Don't just blame Jagen, I seconded that motion to close it...The way he put it seemed like he was asking for something else.
__________________
Reply With Quote
  #3  
Old 06-23-2002, 10:04 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Re: Re: Jagen.

Quote:
Originally posted by Shiftk03-


Don't just blame Jagen, I seconded that motion to close it...The way he put it seemed like he was asking for something else.
He called it an NPC because it goes into your "Predefined NPCs" folder.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #4  
Old 06-23-2002, 10:06 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
err, the path makers are scripts =/
Reply With Quote
  #5  
Old 06-23-2002, 10:13 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally posted by Python523
err, the path makers are scripts =/
Uh, I don't see why they can't be posted...

They're not "graal scripts."
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #6  
Old 06-23-2002, 10:29 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
open the text file up, it's a script
Reply With Quote
  #7  
Old 06-23-2002, 10:40 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
if (playerenters) {
this.lastpx = -1000;
}
if (playerenters || timeout) {
if (mousebuttons%2>=1) {
if (this.lastpx>-1000) {
dx = (mousex-this.lastpx);
dy = (mousey-this.lastpy);
dist = (abs(dx)>abs(dy)? abs(dx) : abs(dy));
for (di=0; di<dist; di++) {
px = this.lastpx + (dx*di/dist);
py = this.lastpy + (dy*di/dist);
laypath();
}
}
px = mousex;
py = mousey;
laypath();
this.lastpx = px;
this.lastpy = py;
} else
this.lastpx = -1000;
timeout = 0.05;
}
function laypath() {
sandtiles = {0xaa,0xab,0x12d,0x8,0xf};
grasstiles = {0x0,0x1,0x10,0x1ff,0x3ff,0x7ff,0x835,0x836,0x837} ;
sandspot = {
0x176,0x166,0x177,
0x1a7, 0xaa,0x197,
0x188,0x178,0x169
};
grassspot = {
0x168,0x178,0x189,
0x197,0x7ff,0x1a7,
0x187,0x166,0x186
};
sandcornernwse = 0xfe9;
sandcornernesw = 0xff9;
allcornertiles = {0x176,0x166,0x167,0x177,0x1a7,0xaa,0x197,0x188,0x 178,0x179,0x169,
0x168,0x189,0x187,0x186,0xfe9,0xff9};

// Check if can lay a sand path here
if (tiles[px,py] in sandtiles) return;
for (tx=px-1; tx<=px+1; tx++) for (ty=py-1; ty<=py+1; ty++) {
if (tiles[tx,ty] in sandtiles) continue;
checkgrassorborder();
if (isok==false) return;
}

// Put sand on the mouse position
tiles[px,py] = sandtiles[int(random(0,5))];

// Calculate the tiles around the mouse position
for (tx=px-1; tx<=px+1; tx++) for (ty=py-1; ty<=py+1; ty++) {
if ((tx==px && ty==py) || tiles[tx,ty] in sandtiles) continue;

// Check which tiles around this tile are sand tiles
sandn = (tiles[tx ,ty-1] in sandtiles);
sandnw = (tiles[tx-1,ty-1] in sandtiles);
sandw = (tiles[tx-1,ty ] in sandtiles);
sandsw = (tiles[tx-1,ty+1] in sandtiles);
sands = (tiles[tx ,ty+1] in sandtiles);
sandse = (tiles[tx+1,ty+1] in sandtiles);
sande = (tiles[tx+1,ty ] in sandtiles);
sandne = (tiles[tx+1,ty-1] in sandtiles);
if (sandnw+sandne==2) sandn = true;
if (sandnw+sandsw==2) sandw = true;
if (sandsw+sandse==2) sands = true;
if (sandse+sandne==2) sande = true;

// Get the right sand corner tile depending on
// in which directions sand was found
if (sandn+sands==2 || sandw+sande==2 ||
sandn+sandw+sandse==3 || sandw+sands+sandne==3 || sands+sande+sandnw==3 || sande+sandn+sandsw==3)
newtile = sandtiles[0];
else if (sandn+sandw+sands+sande==2) {
if (sandn+sandw==2) newtile = grassspot[0+0*3];
else if (sandw+sands==2) newtile = grassspot[0+2*3];
else if (sands+sande==2) newtile = grassspot[2+2*3];
else newtile = grassspot[2+0*3];
} else if (sandn+sandw+sands+sande==1) {
if (sandn+sandse==2 || sande+sandnw==2) newtile = grassspot[2+0*3];
else if (sandn+sandsw==2 || sandw+sandne==2) newtile = grassspot[0+0*3];
else if (sands+sandnw==2 || sandw+sandse==2) newtile = grassspot[0+2*3];
else if (sands+sandne==2 || sande+sandsw==2) newtile = grassspot[2+2*3];
else if (sandn==1) newtile = grassspot[1+0*3] + (tx%2); // 2 tiles for north
else if (sandw==1) newtile = grassspot[0+1*3];
else if (sands==1) newtile = grassspot[1+2*3] + (tx%2); // 2 tiles for south
else newtile = grassspot[2+1*3];
} else if (sandnw+sandne+sandsw+sandse==2) {
if (sandnw+sandse==2) newtile = sandcornernwse;
else if (sandne+sandsw==2) newtile = sandcornernesw;
} else if (sandnw+sandne+sandsw+sandse==1) {
if (sandnw==1) newtile = sandspot[2+2*3];
else if (sandsw==1) newtile = sandspot[2+0*3];
else if (sandse==1) newtile = sandspot[0+0*3];
else newtile = sandspot[0+2*3];
}

// Write the tile
tiles[tx,ty] = newtile;
}

// Redraw the level on the mouse position
updateboard px-1,py-1,3,3;
}
function checkgrassorborder() {
isok = ((tiles[tx,ty] in grasstiles) || (tiles[tx,ty] in allcornertiles));
}
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #8  
Old 06-23-2002, 11:06 AM
RavenTelvecho RavenTelvecho is offline
Registered User
RavenTelvecho's Avatar
Join Date: Apr 2002
Location: Toronto, Ontario, Canada
Posts: 0
RavenTelvecho is on a distinguished road
Send a message via ICQ to RavenTelvecho Send a message via AIM to RavenTelvecho Send a message via Yahoo to RavenTelvecho
har did i miss something?
__________________

^tuff newbie ;x
RavenTelvecho
!Booj
we are 'brothers'
Reply With Quote
  #9  
Old 06-23-2002, 11:54 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
There is a fine line between asking for someone to give you a script, and asking for a script that is retally available. If I asked for the graal2002 sand path Edit NPC would you close my thread?
__________________

subliminal message: 1+1=3
Reply With Quote
  #10  
Old 06-23-2002, 12:04 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Falcor
There is a fine line between asking for someone to give you a script, and asking for a script that is retally available. If I asked for the graal2002 sand path Edit NPC would you close my thread?
No, because it comes with the graal exe (I think) I don't believe the script above does
Reply With Quote
  #11  
Old 06-23-2002, 04:08 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Grrrrrr....
Personally I don't consider that script stealing and neither did Kai, so it shouldn't have heppened. *wonders why he wasn't chosen to mod the forums because he pwns*
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #12  
Old 06-23-2002, 11:03 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by Saga2001

*wonders why he wasn't chosen to mod the forums because he pwns*
Same reason I wasn't, you don't work on 2k1 or know Alkaren.
__________________

subliminal message: 1+1=3
Reply With Quote
  #13  
Old 06-24-2002, 02:12 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
this is in kaimetsu's rules and guidelines:
Don't post here just asking for scripts. The posters here aren't some universal resource for scripting shortcuts. If you can't script something then don't try to produce it. If you're trying to make it to aid your learning then set your sights lower. If you want it for a server then go get a NAT.
I considered that asking for a script and so did rabid
Reply With Quote
  #14  
Old 06-24-2002, 02:28 AM
Cybnext Cybnext is offline
Registered User
Join Date: Jun 2002
Posts: 100
Cybnext is on a distinguished road
Quote:
Originally posted by Falcor


Same reason I wasn't, you don't work on 2k1 or know Alkaren.
I work for 2k1 as the NPC Admin, and I didn't get picked.
Reply With Quote
  #15  
Old 06-24-2002, 04:06 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
then maybe you didnt know alkaren
__________________

subliminal message: 1+1=3
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:35 PM.


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