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;
}