Graal Forums

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

SingleChance 08-06-2002 11:56 PM

-wan:Triggeraction
 
Hello, im wondering how do u do trigger action what is the purpose can some 1 give me a short script of what it does like say2 Hi;

Andor_RC14 08-07-2002 01:04 AM

triggeractions trigger a script in the npc found on the location where the trigger points.

triggeraction x,y,action,params;

so lets say we have this:
NPC Code:
if (playerchats && strequals(#c,test)) {
message Ok!;
triggeraction 4,8,message,#a;
sleep 2;
message ;
}

// NPC at 4,8

if (actionmessage) {
message Hello to you!;
sleep 2;
message ;
}



There are different kinds of triggeractions, like those that go to the npcserver, (I forget those), those that trigger to the serverside of a weapon (very useful) and you can even trigger to the serverside of an npc itself. But what I have above is your basic triggeraction

adam 08-07-2002 01:25 AM

Quote:

Originally posted by Andor_RC14
triggeractions trigger a script in the npc found on the location where the trigger points.

triggeraction x,y,action,params;

so lets say we have this:
NPC Code:
if (playerchats && strequals(#c,test)) {
message Ok!;
triggeraction 4,8,message,#a;
sleep 2;
message ;
}

// NPC at 4,8

if (actionmessage) {
message Hello to you!;
sleep 2;
message ;
}



There are different kinds of triggeractions, like those that go to the npcserver, (I forget those), those that trigger to the serverside of a weapon (very useful) and you can even trigger to the serverside of an npc itself. But what I have above is your basic triggeraction

o.O you added thier account as a param but forgot to explain it.

NPC Code:

//triggeraction x,y,action,param's;
// i've never used more than 2 param's though...
// since in the previous script he made param0 #a it would show your account name there
// in the npc it would be #p(0) the next param you put in would be #p(1)
// sorry im not the best teacher. :( But I try

if (actionmessage){
message Hello from #p(0);
sleep 2;
message;
}



zorakid2001 08-07-2002 01:34 AM

OOOHH!!! USEFUL SCRIPT AND A VERY GOOD POINT WAS SAID!!!

This is a very valuable command! All Learning Scripters should spend some time on this script.

SingleChance 08-07-2002 03:46 AM

Thanks brent
Is it to move the message?
need anything making for bravo

zorakid2001 08-07-2002 06:03 AM

could u write it so that it triggers an action rightinfront of the player?

SingleChance 08-07-2002 01:44 PM

yrh
 
x,y=)

Andor_RC14 08-07-2002 09:54 PM

Yes I did forget params. My bad. I would give some very good detailed examples of params and stuff but the Bravo NPCServer died again.. :grrr: As soon as it does I will help

SingleChance 08-08-2002 02:47 AM

me Fired
 
I think lol..

Shiftk03- 08-08-2002 05:36 AM

Re: me Fired
 
Quote:

Originally posted by SingleChance
I think lol..
Play around with it...Its not that hard but if you have more problems just forum PM me the problem.


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

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