Graal Forums

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

Bl0nkt 08-04-2005 02:17 AM

Question
 
I was trying to make a staff block script where the block shows at your mouse. I was trying to figure out how to get the block to warp to the mousex and mousey only when it goes over another tile (this way you could lay the blocks evenly instead of having them clustered everwhere).

If you know what I'm talking about, then please explain.

calani 08-17-2005 01:20 AM

It would be much easier to use a showimg and just clamp the x and y you display it at to 8 pixel increments (half tile) then when placed, actually use the putnpc2 to lay it.
NPC Code:

mx=mouse.x; // get mouse x coordinate
my=mouse.y; // get mouse y coordinate
mx-=mx%8; // clamp mx into 8 pixel increments by subtracting the remainder of a division by 8 (mx modulus 8)
my-=my%8; // clamp my into 8 pixel increments by subtracting the remainder of a division by 8 (my modulus 8)

// showimg goes here using mx and my for coordinates



but wait, triggers are bad! =( sorry lance.

Lance 08-17-2005 03:06 AM

Quote:

Originally Posted by calani
but wait, triggers are bad! =( sorry lance.

Don't be stupid. Triggeractions are an important part of scripting (so long as they are not insecurely used to circumvent basic protections against cheating).

If you continue to carry this into other threads, such posts will unceremoniously be deleted. There is no tolerance for this in the scripting forum.

protagonist 08-17-2005 03:57 AM

Quote:

Originally Posted by Lance
Don't be stupid. Triggeractions are an important part of scripting (so long as they are not insecurely used to circumvent basic protections against cheating).

If you continue to carry this into other threads, such posts will unceremoniously be deleted. There is no tolerance for this in the scripting forum.

Hah. :rolleyes:

Zero Hour 08-17-2005 04:19 AM

Quote:

Originally Posted by Lance
If you continue to carry this into other threads, such posts will unceremoniously be deleted. There is no tolerance for this in the scripting forum.

Woah, harsh.

protagonist 08-17-2005 04:49 AM

Quote:

Originally Posted by Zero Hour
Woah, harsh.

But also ironic. Do as I say, not as I do.

calani 08-22-2005 08:40 AM

Quote:

Originally Posted by protagonist
But also ironic. Do as I say, not as I do.

hahahahahahahahaha
so true


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

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