View Single Post
  #7  
Old 12-06-2001, 01:10 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Triggeraction

NPC Code:

/*
i am pretty new to triggeraction.

the syntax is:
triggeraction x,y,actionname,params;
description:
x - duh
y - duh
action - the actual name of the action to be triggered.
params - this is an open syntax i guess u could call it cause what you can do it say:
triggeraction x,y,action,#a,#c,#e(0,-1,#L);
see you can send lots of params, unless using npc server to transfer server actions than all you need to do it
triggeraction 0,0,action,;
cause all parameters are most likely accessable by the npc, however if using npc server than with the first triggeraction example:
#p(0) = #a;
#p(1) = #c;
#p(2) = #e(0,-1,#L);
which can be accessed by the database npc or the NPCW and that way you can get the data you need. we'll pretend you are not using npc server.
*/
if (playerchats&&strequals(triggeraction,#c)) {
triggeraction playerx+1.5,playery+2,Graalet,;
/*
This triggers the action Graalet at playerx+1.5 & playery+2. You add 1.5 & 2 because you are triggering an action on the npc, since this item is a weapon, then we want to trigger the action, where the npcw actually is. So just remember 1.5 & 2.
*/
}
if (actionGraalet) {
lay2 goldrupee,playerx+.75,playery+3;
/*
Notice, that Graalet has a capital G actons are CASE-SENENSITIVE! rememeber that. The action will be triggered and a gold graalet will be dropped. There you go.
*/
}
if (playertouchsme) {
toweapons Graalet Drop;
say2
Say "triggeraction" to#bdrop a gold graalet.;
}

__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it

Last edited by Saga2001; 12-07-2001 at 12:43 AM..
Reply With Quote