Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-06-2002, 11:56 PM
SingleChance SingleChance is offline
Kill Pirates
Join Date: Apr 2002
Location: Canada
Posts: 1,296
SingleChance is on a distinguished road
-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;
Reply With Quote
  #2  
Old 08-07-2002, 01:04 AM
Andor_RC14 Andor_RC14 is offline
Registered User
Join Date: Jan 2002
Location: U.S.A - Ohio
Posts: 101
Andor_RC14 is on a distinguished road
Send a message via ICQ to Andor_RC14 Send a message via AIM to Andor_RC14 Send a message via Yahoo to 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
__________________


Statistics show that 60% of all statistics are made-up
Manager of Norin.
EX Co-Manager of Bravo Online.
Reply With Quote
  #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
  #4  
Old 08-07-2002, 01:34 AM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
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.
Reply With Quote
  #5  
Old 08-07-2002, 03:46 AM
SingleChance SingleChance is offline
Kill Pirates
Join Date: Apr 2002
Location: Canada
Posts: 1,296
SingleChance is on a distinguished road
Talking

Thanks brent
Is it to move the message?
need anything making for bravo
Reply With Quote
  #6  
Old 08-07-2002, 06:03 AM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
could u write it so that it triggers an action rightinfront of the player?
Reply With Quote
  #7  
Old 08-07-2002, 01:44 PM
SingleChance SingleChance is offline
Kill Pirates
Join Date: Apr 2002
Location: Canada
Posts: 1,296
SingleChance is on a distinguished road
yrh

x,y=)
Reply With Quote
  #8  
Old 08-07-2002, 09:54 PM
Andor_RC14 Andor_RC14 is offline
Registered User
Join Date: Jan 2002
Location: U.S.A - Ohio
Posts: 101
Andor_RC14 is on a distinguished road
Send a message via ICQ to Andor_RC14 Send a message via AIM to Andor_RC14 Send a message via Yahoo to Andor_RC14
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
__________________


Statistics show that 60% of all statistics are made-up
Manager of Norin.
EX Co-Manager of Bravo Online.
Reply With Quote
  #9  
Old 08-08-2002, 02:47 AM
SingleChance SingleChance is offline
Kill Pirates
Join Date: Apr 2002
Location: Canada
Posts: 1,296
SingleChance is on a distinguished road
me Fired

I think lol..
Reply With Quote
  #10  
Old 08-08-2002, 05:36 AM
Shiftk03- Shiftk03- is offline
I am the trap
Shiftk03-'s Avatar
Join Date: Nov 2001
Location: Dirty South
Posts: 1,688
Shiftk03- will become famous soon enough
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.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:45 AM.


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