Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   I need Help (https://forums.graalonline.com/forums/showthread.php?t=11962)

Zesty_Taco 09-16-2001 01:56 AM

I need Help
 
ok, i was wondering how do u make it so a NPC only works on a certain tile? like in fishing, it HAS to be water in order for it to work! =\ (btw i'm tryingt o make my own fishing) THX

BocoC 09-16-2001 02:09 AM

Use the Board command

board[x+(y*16)]

So, if you want to check for a deep water tile:
NPC Code:

this.testx=int(playerx+1.5*2);
this.testy=int(playery+2*2);
if (board[this.testx+(this.testy*16)]==322) {
dostuff;
}


BocoC 09-16-2001 02:14 AM

Oooooo. You beat me to the answer. :(

Enigma_GP6 09-16-2001 03:34 AM

Please dont get into another argument.

-Rebel95

Zesty_Taco 09-16-2001 05:28 AM

ok so what is it for the deep deep water u cannot go in, and the deep water u can swim in.. i need both

Tyhm 09-16-2001 05:46 AM

Wouldn't the deep water you can't swim in just be considered WALL?

Enigma_GP6 09-16-2001 06:48 AM

You Stole my Post! I was about to say that, but it takes me longer to type!!!!!
:grr::grrr: :grrr: :grrr: :grrr: :grrr: :grrr: :grrr: :grrr:
:grr:

-Rebel95

Falcor 09-16-2001 11:32 AM

Spaz :eek: :rolleyes:

ownerofbabylon 09-16-2001 01:45 PM

shut up rebel, anyways, board is a very useful command but i cant figure it out. :(

Zesty_Taco 09-16-2001 07:56 PM

i still dont get how to make this fishing pole thingie.
like how would i make the first part?
if (???) {
this.testx=int(playerx+1.5*2);
this.testy=int(playery+2*2);
if (board[this.testx+(this.testy*16)]==322) {
dostuff;
}}
?? i just dont get it!! ahhhhhhhhhhh lol

Enigma_GP6 09-16-2001 11:52 PM

Quote:

Originally posted by Kaimetsu


Yeah, heaven forbid we could have a DISCUSSION on a DISCUSSION BOARD.

I said argument,:rolleyes:
not discussion, I love discussions, but argumants are not the point of this forum.

-Rebel95


All times are GMT +2. The time now is 05:13 PM.

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