View Single Post
  #3  
Old 08-07-2002, 01:25 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
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;
}


__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote