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 05-16-2007, 02:07 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Sadly I find the wiki lacking one thing(I've yet to see skyld's though), and that is actually what goes in commands. All it tells you is if it's a floating, integer, or string. That doesn't really help much...

Anyways, for Switch:
PHP Code:
function onCreated() 
{
  
player.chat "Stuff.";

function onCreated() // This is a function. Before GS2, things like this were called in events. Basically, if it happened, execute any code in the parenthesis. In GS1, it would be if (created) {}, but all that changed in GS2. Events were translated into their own functions. So basically this means, when the NPC is created, execute everything in the parenthesis.

{...} // As explained above, parenthesis are closed around any amount of commands executed when an event is called. All commands must be executed with an event/function and closed inside parenthesis.

player.chat = "Stuff."; // player.* is associated with anything for the player. This can be player.hearts, for their hearts, player.ap, for their ap, player.x, for their x coordinate, and so on. So, taking that, and taking the knowledge that = is assign, means that you are assigning something to the player's chat, which means you'll force them to say something. "Stuff." is a string. A string is alphanumerical. That means anything not a variable, floating value, integer, has to be enclosed in quotes, or else it won't be assigned. If you want to get basic, text has to be in quotes. And lastly, the semi-colon has to be after every command. Anytime you do 'something' end it with a semi-colon before you move onto the next thing.
Reply With Quote
  #2  
Old 05-16-2007, 03:11 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
Sadly I find the wiki lacking one thing(I've yet to see skyld's though), and that is actually what goes in commands. All it tells you is if it's a floating, integer, or string. That doesn't really help much...

Anyways, for Switch:
PHP Code:
function onCreated() 
{
  
player.chat "Stuff.";

function onCreated() // This is a function. Before GS2, things like this were called in events. Basically, if it happened, execute any code in the parenthesis. In GS1, it would be if (created) {}, but all that changed in GS2. Events were translated into their own functions. So basically this means, when the NPC is created, execute everything in the parenthesis.

{...} // As explained above, parenthesis are closed around any amount of commands executed when an event is called. All commands must be executed with an event/function and closed inside parenthesis.

player.chat = "Stuff."; // player.* is associated with anything for the player. This can be player.hearts, for their hearts, player.ap, for their ap, player.x, for their x coordinate, and so on. So, taking that, and taking the knowledge that = is assign, means that you are assigning something to the player's chat, which means you'll force them to say something. "Stuff." is a string. A string is alphanumerical. That means anything not a variable, floating value, integer, has to be enclosed in quotes, or else it won't be assigned. If you want to get basic, text has to be in quotes. And lastly, the semi-colon has to be after every command. Anytime you do 'something' end it with a semi-colon before you move onto the next thing.
The world would be a better place if there were more people like you.
Reply With Quote
  #3  
Old 05-16-2007, 03:25 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by killerogue View Post
The main issue I had with that was...you claimed to be a scripter. But if you can't actually script anything, you ARE NOT a scripter.
Kind of like you when you started, eh?

Maybe you shouldnt be so quick to talk down to people when you "came up" the same way they are trying.

Quote:
Originally Posted by gambetsposts
.
you ever get tired of doing that?
__________________
Reply With Quote
  #4  
Old 05-16-2007, 03:33 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Andy0687 View Post
Kind of like you when you started, eh?

Maybe you shouldnt be so quick to talk down to people when you "came up" the same way they are trying.

Well put
Reply With Quote
  #5  
Old 05-16-2007, 04:16 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Andy0687 View Post
Kind of like you when you started, eh?

Maybe you shouldnt be so quick to talk down to people when you "came up" the same way they are trying.



you ever get tired of doing that?
I never claimed I was good scripter. >_> Nor a scripter when I couldn't script anything. IF anything I was eager to learn, lazy to do anything.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #6  
Old 05-16-2007, 04:42 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by killerogue View Post
I never claimed I was good scripter. >_> Nor a scripter when I couldn't script anything. IF anything I was eager to learn, lazy to do anything.
I was hoping you would pay more attention to the talking down to people part, or does this not seem familer?

http://forums.graalonline.com/forums...ad.php?t=67451

All im saying is, when you yourself were having trouble, you looked for help and expected it/would hide behind the whole "im new" thing. When people would flame you for how bad you were, did you not get upset? So why would you in turn do that exact same thing to a new scripter? Give them a chance to learn, its not fluid for some people, and eventually they may realise its not for them.

Encourage not Discourage
__________________
Reply With Quote
  #7  
Old 05-16-2007, 05:37 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by Andy0687 View Post
I was hoping you would pay more attention to the talking down to people part, or does this not seem familer?

http://forums.graalonline.com/forums...ad.php?t=67451

All im saying is, when you yourself were having trouble, you looked for help and expected it/would hide behind the whole "im new" thing. When people would flame you for how bad you were, did you not get upset? So why would you in turn do that exact same thing to a new scripter? Give them a chance to learn, its not fluid for some people, and eventually they may realise its not for them.

Encourage not Discourage
I've also noticed this attitude of his, I never said anything though. I kept it to myself.
Reply With Quote
  #8  
Old 05-16-2007, 09:25 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by DustyPorViva View Post
Sadly I find the wiki lacking one thing(I've yet to see skyld's though), and that is actually what goes in commands. All it tells you is if it's a floating, integer, or string. That doesn't really help much...

Anyways, for Switch:
PHP Code:
function onCreated() 
{
  
player.chat "Stuff.";

function onCreated() // This is a function. Before GS2, things like this were called in events. Basically, if it happened, execute any code in the parenthesis. In GS1, it would be if (created) {}, but all that changed in GS2. Events were translated into their own functions. So basically this means, when the NPC is created, execute everything in the parenthesis.

{...} // As explained above, parenthesis are closed around any amount of commands executed when an event is called. All commands must be executed with an event/function and closed inside parenthesis.

player.chat = "Stuff."; // player.* is associated with anything for the player. This can be player.hearts, for their hearts, player.ap, for their ap, player.x, for their x coordinate, and so on. So, taking that, and taking the knowledge that = is assign, means that you are assigning something to the player's chat, which means you'll force them to say something. "Stuff." is a string. A string is alphanumerical. That means anything not a variable, floating value, integer, has to be enclosed in quotes, or else it won't be assigned. If you want to get basic, text has to be in quotes. And lastly, the semi-colon has to be after every command. Anytime you do 'something' end it with a semi-colon before you move onto the next thing.
Except what's CREATED mean, then?

Quote:
Originally Posted by Rapidwolve View Post
The world would be a better place if there were more people like you.
Definitely
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #9  
Old 05-16-2007, 05:49 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Quote:
Originally Posted by Andy0687 View Post
Stuff
I didn't get mad or upset about that. :O Also, that would have been the first time I attempted to learn. Not the second, in which I was successful.

You'll also notice James, that I had good reasoning behind the things I said. If I have an attitude it's because of personal reasons, and that isn't anything to discuss here and you're both ( and rapidwolve ) right that I shouldn't be taking it out on people.

And, what I'm saying now is stemming from other encounters with Switch involving him acting like a brass-assed monkey.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #10  
Old 05-16-2007, 06:36 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by killerogue View Post
Not the second, in which I was successful.
According to whom?
__________________
- Zidane / Zidaya
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 03:57 AM.


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