Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   New commands and an update request! :D (https://forums.graalonline.com/forums/showthread.php?t=45390)

Chrisz 06-09-2003 11:35 PM

New commands and an update request! :D
 
Someone should be able to get this to Stefan or get Stefan to this :P

testplayer(x,y) - aparently only detects npc showcharacters and the client, tested it and thats true :P
testplayer2(x,y,width,height) - mm.. usefull ofcourse testplayer2 would just return true or false :P

Oh and another tiny request, showani doesn't run gani scripts.. which is a problem in some cases, but I managed to work around it.. :) And I presume showani2 is the same. All this is for some new material on Era that I cant finish properly.. and I'd tell you all, but we all know what Bravo does :'(...

amonrabr 06-10-2003 02:40 AM

width = <number>;
height = <number>;
px = <number>;
py = <number>;
number_of_found_things=0;

for(i=px;i<px+width;i++)
for(j=py;j<py+height;j++)
if (testplayer(i,j)==true)number_of_found_things++;


o.o

Pokilty 06-10-2003 04:04 AM

or make it create a string variable with all the values of the testplayer =D but i think that chrisz just wants an easier way to do it, i'm pretty sure that it must get tedious writing that after a while.

CheeToS2 06-10-2003 05:19 AM

testplayer serverside will only detect players I think.. clientside checks for players & npcs

Chrisz 06-10-2003 05:54 PM

Yah yah Amonra... I already have that (I use it for clientside onwall2) but the thing is testplayer only works properly serverside.. And besides using your own function for it in a highly used npc lags... :P *isn't newbie :|*

*edits post*
Annnnd.. Pokilty.. testplayer returns -2 for nothing -1 for npc showcharacters and 0 for the client.. Amazing? No. -_- lolz. testplayer is only good serverside.. but I want it to be good clientside too.. >_< rar?
*stops editing post*

*edits post more*
While im still here.. WTF IS THAT HP/MP/EXP THING AT THE LEFT THAT SAYS STUFF >_< heh.. I have wondered even before I had gold.. :O
*stops editing post more*

Tseng 06-11-2003 12:57 AM

Quote:

Originally posted by Chrisz
testplayer is only good serverside.. but I want it to be good clientside too.. >_< rar?
What's wrong with using the serverside testplayer?

Chrisz 06-13-2003 11:54 PM

Thats.. really not what i want.. lolz.. its for realtime clientside effects :P


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

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