Graalians

Graalians (https://www.graalians.com/forums/index.php)
-   GraalOnline Era (https://www.graalians.com/forums/forumdisplay.php?f=13)
-   -   NPC script question (commands) (https://www.graalians.com/forums/showthread.php?t=6193)

Dude1310 05-07-2012 01:00 AM

NPC script question (commands)
 
What does index and eventflag mean? callnpc index,eventflag;

What does this do and what does action and params mean? Can i use this to trigger the script of another npc? if so how? triggeraction x,y,action,params;

Emera 05-07-2012 01:55 AM

These are all GS1 events. If you are interested in working for other servers, I suggest you learn GS2 since Graal doesn't support GS1 anymore.

Triggeraction can be used in GS2, and you're correct in thinking it can be used to trigger another NPC.

For example
Lets say you had 2 NPC's in a level. One NPC is at 30, 39 and me NPC is at 40, 41. You can use Triggeraction to trigger the NPC at 40, 41 from the NPC at 30, 39 by doing something like this in the NPC script.

PHP Code:

triggeraction(4041"triggerTest"NULL); 

This will call the triggerTest action in the NPC at 40, 41. You can configure the triggerTest action in the NPC at 40, 41 by outing something along the lines of this in the code.

PHP Code:

function onActiontriggerTest() {
  
this.chat "I've been triggered!";



Dude1310 05-07-2012 02:08 AM

do these codes work in offline editor?

Emera 05-07-2012 02:09 AM

No, since the offline editor only functions with GS1. I've given a GS2 solution to your problem. Triggeraction can be used in GS1, but the syntax is different and I don't have any idea how it would be used without doing some quid research, which I'm sure you could do yourself.

Dude1310 05-07-2012 02:11 AM

ohh ok, thx for all your help anyways, is there a way I could test the script anywhere?

Emera 05-07-2012 02:15 AM

If you buy a gold subscription, you can contact a Testbed server administrator and ask for access, you can test anything you want here, including levels and coding. A gold subscription can be bought via phone every month or by card. You can find payment information at www.graalonline.com.

You can read through this thread to find out who you have to contact to get Testbed server access.

Dude1310 05-07-2012 02:35 AM

oh ok

why doesnt graal support gs1 anymore?
greeeeaaaaattt now i gotta learn gs2, do you know where i can learn gs2?

Emera 05-07-2012 01:30 PM

Here's some links.

Dude1310 05-07-2012 09:42 PM

k thx!


All times are GMT. The time now is 06:02 AM.

Powered by vBulletin/Copyright ©2000 - 2026, vBulletin Solutions Inc.