Graal Forums

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

Cybnext_Design 07-17-2001 05:13 PM

Board Scripting?
 
I was wondering if anyone here with AIM or ICQ would teach me how to use the 'board' command in GScript. I have no clue how to use it. My email is [email protected] if anyone will help, or just post on here.

konidias 07-18-2001 12:25 PM

Here is a script that will dig a hole in grass (like shovel)
This uses board scripting... under the if (empty==1) part of the script, there are 4 lines for board.. each is one tile on the board.
The putx puty part of the line is where the tile will be placed, and the equation at the end is which tile should be used.. changing the equation will change the tile.. so experiment =)



NPC Code:

if (weaponfired) {
putx = playerx + 1.5;
puty = playery + 2;
if (playerdir==0) puty -= 1;
if (playerdir==1) putx -= 1;
if (playerdir==2) puty += 1;
if (playerdir==3) putx += 1;
putx = int(putx/2)*2;
puty = int(puty/2)*2;
emtpy = 1;
for (i=0; i<2; i++) for (j=0; j<2; j++) {
b = board[putx+i+64*(puty+j)];
bx = b % 16;
by = int(b / 16);
if (!(bx==15 && (by==31 || by==63 || by==127)))
emtpy = 0;
}
if (emtpy==1) {
board[putx+64*puty] = 10+114*16;
board[putx+1+64*puty] = 11+114*16;
board[putx+64*(puty+1)] = 10+115*16;
board[putx+1+64*(puty+1)] = 11+115*16;
updateboard putx,puty,2,2;
if (i == 0) {
destroy;
}
}
}


Poogle 07-19-2001 03:49 AM

lol that script when you hold down D makes it look like you have dirty feet!

Knightoffrost 07-19-2001 04:09 AM

Quote:

Originally posted by Poogle
lol that script when you hold down D makes it look like you have dirty feet!
???

ownerofbabylon 07-19-2001 11:26 PM

LOL, what is the board command or whatever used for? I read a post that said its useless so i never bothered to learn :(


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

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