Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-25-2005, 03:07 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Gscript2 Triggeractions

Right, I'm having a little trouble with triggeractions in Gscript2, mainly because I can't work out how to receive the action.
I thought it might be one of the following:
NPC Code:
function onActionname() {


NPC Code:
function onname() {


Neither of these appear to work, and it does not appear to be documented. Does anyone know how the action is received?

Edit It appears that with weapons, it is received using onActionserverside() if I use serverside as the actionname, but with a database NPC, it fails. I have set the shape with:
NPC Code:
function onCreated() setshape(1,32,32);


And triggeraction'd with:
NPC Code:
triggeraction(x+0.5,y+0.5,"lol","magic","please");


However, receiving using this method does not work:
NPC Code:
function onActionlol()

__________________
Skyld

Last edited by Skyld; 01-25-2005 at 03:52 PM..
Reply With Quote
  #2  
Old 01-25-2005, 04:46 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
It should
Reply With Quote
  #3  
Old 01-27-2005, 06:54 PM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
How do you use gscript 2?
Reply With Quote
  #4  
Old 01-27-2005, 07:09 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally Posted by Gman4pwnu
How do you use gscript 2?
At the moment, it needs to be enabled on your server.
__________________

Reply With Quote
  #5  
Old 01-28-2005, 06:01 PM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
Quote:
Originally Posted by CheeToS2
At the moment, it needs to be enabled on your server.
Then a more suited question is how do you have it enabled for your server
__________________

To the sun of your age, I arise
Reply With Quote
  #6  
Old 01-28-2005, 07:33 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally Posted by TB3
Then a more suited question is how do you have it enabled for your server
Only a few servers have it; Stefan has to make the necessary changes.
__________________

Reply With Quote
  #7  
Old 01-28-2005, 08:47 PM
Benm00t Benm00t is offline
I made a tree!
Benm00t's Avatar
Join Date: Jul 2003
Location: The Intarwebbernetwork!
Posts: 987
Benm00t is on a distinguished road
Are you able to use GScript2 offline?
__________________
Lag is a good thing. Only those without it complain.

~ Ben
Reply With Quote
  #8  
Old 01-28-2005, 09:37 PM
EikeSiewertsen EikeSiewertsen is offline
Fry
EikeSiewertsen's Avatar
Join Date: Apr 2001
Location: Germany
Posts: 64
EikeSiewertsen is on a distinguished road
Send a message via ICQ to EikeSiewertsen
Quote:
Originally Posted by Benm00t
Are you able to use GScript2 offline?
No.
__________________
Graal Wiki - Graal Forum
Reply With Quote
  #9  
Old 01-29-2005, 12:38 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
A snippet from a DB-NPC I made awhile ago: (uses gscript1 for clientside, 2.x compatible)

NPC Code:
function onCreated()
{
this.setshape(1, 32, 32);
}

function onActionChat(text)
{
message("You said: " @ text);
}

//#CLIENTSIDE
if (playerchats) {
triggeraction x+1,y+1,chat,#c;
}

Reply With Quote
  #10  
Old 01-29-2005, 06:51 AM
Nappa Nappa is offline
The Great Nappa
Nappa's Avatar
Join Date: Sep 2003
Location: Florida
Posts: 1,911
Nappa is on a distinguished road
Send a message via AIM to Nappa
Gscript2 looks confoosing.
__________________
Reply With Quote
  #11  
Old 01-29-2005, 12:59 PM
JudgeDurst JudgeDurst is offline
Malorian
JudgeDurst's Avatar
Join Date: Jan 2002
Posts: 145
JudgeDurst is on a distinguished road
Gscript2 looks useful
__________________
MrWorry, Lover of Maloria
Reply With Quote
  #12  
Old 01-29-2005, 04:43 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
GScript2 makes so much more sense.
Reply With Quote
  #13  
Old 01-30-2005, 03:50 AM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Malinko quit spamming
Reply With Quote
  #14  
Old 01-30-2005, 03:59 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
It looks more organized but like it wil ltake a bit longer to learn
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #15  
Old 01-30-2005, 03:26 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
It is suprisingly easy to get used to. I'll have to take a look at the DB NPC triggeractioning later again.
__________________
Skyld
Reply With Quote
Reply


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 07:57 AM.


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