Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Do you want to learn how to script? (https://forums.graalonline.com/forums/showthread.php?t=55707)

amonrabr 10-16-2004 05:52 PM

Do you want to learn how to script?
 
2 Attachment(s)
Hey people!

Im working in a Script guide. Since graal people level scripting is worse we can see that walking around the playerworlds. I know there are many people that want to learn how to script, so I started this document. Its just the beta version, I hope have the final version soon.

This script guide is for who wants to start learing Graal Script. In the next versions until the final we will see more about Npc Server and we will learn how to map our scripts to Graal 3.0 script engine.

I know that probably the guide have some english mistakes, since English is my 3rd language. So if you find any english mistake, or any kind of problem, send me by mail to me fix to the next version:
[email protected]

Please use this post just to post questions or write a feedback, use the e-mail to report any errors to let this post clear.

Thank you

Amon-Ra
^_^

Ps. If you cant see the file, you can download Acrobat Reader here

xAndrewx 10-16-2004 06:10 PM

Woah, I'll be sure to read :D

Kaimetsu 10-16-2004 07:02 PM

KSI-GS, yo.

xAndrewx 10-16-2004 08:10 PM

on the devide..

you've done "variable2 = variable2/2;" and you've said the answer is "1.25"

You hadn't assigned variable2 to anything :O.. I think?
Unless it's suppose to be "variable2 = variable1/2;" because variable1 = 2.50?

:o (i don't know if this is wrong or right)

amonrabr 10-17-2004 03:01 AM

Quote:

Originally Posted by xAndrewx
on the devide..

you've done "variable2 = variable2/2;" and you've said the answer is "1.25"

You hadn't assigned variable2 to anything :O.. I think?
Unless it's suppose to be "variable2 = variable1/2;" because variable1 = 2.50?

:o (i don't know if this is wrong or right)


Yes =) You are right. I will fixed that to the next version.

The right way is:

Variable1 = (10/2)/2;
Variable2 = Variable1/2;


Variable1 is 2.5 and Variable2 is 1.25

^^

osrs 10-17-2004 03:05 AM

Nice.

Googi 10-17-2004 04:17 AM

I want to learn how to make my scripts work online :(

Slash-P2P 10-17-2004 07:17 AM

Quote:

Originally Posted by Googi
I want to learn how to make my scripts work online :(

This usually fixes most peoples problems between offline and online scripts:
PHP Code:

//#CLIENTSIDE 


xAndrewx 10-17-2004 11:06 AM

Wow, those tutorials are awesome!

I'm going to base my scripting off them :D

Nicely done :)

osrs 10-17-2004 01:03 PM

Quote:

Originally Posted by Slash-P2P
This usually fixes most peoples problems between offline and online scripts:
PHP Code:

//#CLIENTSIDE 


Not really.

amonrabr 10-17-2004 02:35 PM

Quote:

Originally Posted by Googi
I want to learn how to make my scripts work online :(

I didnt make the Npc Server part yet, Im working on it. But you will use basicly the same things you see in the done part. So try out alot offline. Well the scripts you test offline will work if you comment "#CLIENTSIDE" at the first line:
//#CLIENTSIDE

There are many details we will see later in the script guide, like make a Serversided and clientsided parts in the same script and other things. But for all that, you will need to know everything we have until now. We will see how to work with Classes, weapons, NpcServer scripts... until the new datablocks on Graal 3.0 that few people know. And other stuffs

=)

xAndrewx 10-17-2004 02:38 PM

Could you go into more detail on how to cause lagg and what not in another document?

I hope the other documents what people are producing are as good as this.

amonrabr 10-17-2004 02:43 PM

Quote:

Originally Posted by xAndrewx
Could you go into more detail on how to cause lagg and what not in another document?

I hope the other documents what people are producing are as good as this.

I thought about that when doing the scripts.
Thats Why I descrypted "Events " like I did.
In the begin of the script guide we dont use events. But for the half of it until the end we will always use events. So the script part will just work if the event calls the script. Basicallythis is take care of the lag on Graal. Let the script just make what it has to do when it really needs to do. You dont need a "loop" to show a message. You can show the message once, it will be there forever. Thats the idea. If you be reading the script guide you will be learning how to sript right, without lags. Im thinking about this while writing it.
We will see later what events call the script twice and why. And I will always put some tips how to not lag the script in some parts.

=)

xAndrewx 10-17-2004 02:56 PM

Aslong as you keep adding tips I think it'll be great :D
Thanks again! ;)

osrs 10-17-2004 03:15 PM

Quote:

Originally Posted by xAndrewx
Could you go into more detail on how to cause lagg and what not in another document?

There is a thread in this section called "Optimization Howto", posted by Stefan. This explain quite well how to reduce lag and what causes the lag, I believe that is what you are looking for.

Slash-P2P 10-17-2004 03:53 PM

Quote:

Originally Posted by osrs
There is a thread in this section called "Optimization Howto", posted by Stefan. This explain quite well how to reduce lag and what causes the lag, I believe that is what you are looking for.

http://forums.graalonline.com/forums...65&postcount=1

Dach 10-17-2004 06:23 PM

I would rather see a guide use proper techniques the whole way through. Putting commands and events outside of event blocks is just lazy and careless. I see how you're structuring it so the begining is easy to follow for everyone, but I believe some people will think that that is an acceptable format.

The overall quality of the document looks nice though. You seem to have put some real effort into it, good job. I still hate PDFs though

GoZelda 10-17-2004 06:29 PM

Quote:

Originally Posted by Dach
I would rather see a guide use proper techniques the whole way through. Putting commands and events outside of event blocks is just lazy and careless. I see how you're structuring it so the begining is easy to follow for everyone, but I believe some people will think that that is an acceptable format.

Yeah, something like 'This shouldn't be done but it doesn't matter because you're just learning for now' should be added.

Quote:

Originally Posted by Dach
I still hate PDFs though

:eek:

Kaimetsu 10-17-2004 06:47 PM

Quote:

Originally Posted by Dach
Putting commands and events outside of event blocks is just lazy and careless

Ditto for sleeps within loops.

osrs 10-17-2004 07:17 PM

Quote:

Originally Posted by Slash-P2P

I knew it?

Crono 10-17-2004 07:26 PM

VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY NICE AMON RA!

I've always been your fan man :(

amonrabr 10-18-2004 02:22 AM

Quote:

Originally Posted by Dach
I would rather see a guide use proper techniques the whole way through. Putting commands and events outside of event blocks is just lazy and careless. I see how you're structuring it so the begining is easy to follow for everyone, but I believe some people will think that that is an acceptable format.

The overall quality of the document looks nice though. You seem to have put some real effort into it, good job. I still hate PDFs though

=)
Ya, the idea is start from beginning not forgetting anything.. So how much we will learning, we learn new things to replace the old commands we used, so until the end we will be using the right way.

Thats why we start with a simple "message". Thats never good to use directly in the script like we did. But we cant start with too much information or the reader will give up to read it. I tryed to make like I like to learn, with alot of examples and many texts to explain each thing.

Kaimetsu 10-18-2004 08:21 AM

That doesn't justify a structure like this:

NPC Code:

if(timeout){
}
timeout=blah;


amonrabr 10-18-2004 01:02 PM

1 Attachment(s)
Quote:

Originally Posted by Kaimetsu
That doesn't justify a structure like this:

NPC Code:

if(timeout){
}
timeout=blah;


I made that to show who is reading that he/she needs to set the timeout value all the time again. Because when the script is called by timeout it back to 0. I could do "created||timeout" and set the timeout value at the end, or make any other way this. But I think this way is better to understand. Be sure he/she will understand and until the end will have a good knowledge.
Anyway I attached a file that explain that better to you.
;)
have a nice day

Kaimetsu 10-18-2004 06:16 PM

Quote:

Originally Posted by amonrabr
I could do "created||timeout" and set the timeout value at the end, or make any other way this. But I think this way is better to understand

I think it fosters bad habits. It essentially condones an approach that should by no means be utilised. Is that ever a good thing to do?

Quote:

Anyway I attached a file that explain that better to you.
Um, the highlighted text has absolutely no relevance to what we're discussing. Leave the sass to the experts, dawg.

Darlene159 10-18-2004 06:26 PM

I am glad you did this amonra...I'm going to see if I can learn something from it :)
Thanks

Lance 10-18-2004 07:09 PM

Amon-Ra, I see no problem with posting errors here unless you're afraid of criticism. This thread should exist to foster the growth and development of your document, not simply to praise you.

That aside, to those who gave advice to Googi: //#CLIENTSIDE should by no means be the end-all solution to make offline scripts work online. For example, if you want to change someone's level, that will not solve it. In other cases, making everything clientside can leave your scripts vulnerable to trainer usage and cheating.

Crono 10-18-2004 08:30 PM

This should be stickied, I WILL be refering back to this in the future.

amonrabr 10-18-2004 08:44 PM

Quote:

Originally Posted by Lance
Amon-Ra, I see no problem with posting errors here unless you're afraid of criticism. This thread should exist to foster the growth and development of your document, not simply to praise you.

Oookey http://www.tresd1.com.br/forum/phpfo...n_thumleft.gif

Python523 10-20-2004 06:58 AM

Quote:

Originally Posted by amonrabr

Please don't be a jerk to people who are providing contructive critisism. If you can't take it, please feel free to stop posting.

GoZelda 10-20-2004 01:53 PM

Quote:

Originally Posted by Python523
Please don't be a jerk to people who are providing contructive critisism. If you can't take it, please feel free to stop posting.

How is he being a jerk there...?

Polo 10-20-2004 03:28 PM

Quote:

Originally Posted by GoZelda
How is he being a jerk there...?

I'm assuming the 'Oookey' was read as sarcasm, rather than just agreement to the prior statements.

xAndrewx 10-20-2004 05:50 PM

contructive?

nullify 10-21-2004 08:38 AM

I haven't really looked at these, but I have lots of respect for scripters that take their personal time to write a document that will help others. Keep it up.
By the way, for a third langauge, your english is quite good. Better than some native speakers.

Nidonemo 10-21-2004 08:40 AM

Sweet! Keep up the good work! I've always wanted to learn more about scripting, I just know like a few incredibly basic things.


All times are GMT +2. The time now is 08:03 AM.

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