Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Proposed Q-Menu Tutorial (https://forums.graalonline.com/forums/showthread.php?t=56516)

Slash-P2P 12-20-2004 06:03 AM

Proposed Q-Menu Tutorial
 
1 Attachment(s)
I made a little tutorial on how to script a custom Q-Menu. This is my first tutorial and I doubt its the best. I tried to be as clear as I could and make it so anyone could understand it. Tell me what you think (constructive criticism please).

Lance 12-20-2004 07:12 AM

Quote:

Originally Posted by Slash-P2P
I made a little tutorial on how to script a custom Q-Menu. This is my first tutorial and I doubt its the best. I tried to be as clear as I could and make it so anyone could understand it. Tell me what you think (constructive criticism please).

Right-e-o. From skimming your document, here's what I found:

Quote:

...that you hold the Q-Menu down to view all of your items...
Holding the whole Q-Menu down sounds like a difficult task.

Quote:

don't think your going
Spelling - you're.

Quote:

and think your 'da bomb'
Spelling - you're

Quote:

Your going to
Spelling - You're

Remember:

your - possession
you're - you are

Quote:

Below are some information
To my knowledge, 'information' is collective, and thus 'is' would be appropriate.

Quote:

Showimg - Displays an image on a certain point.
A whole image, on a point? Consider rewording this. If this is truly for beginners, they will (should) want to actually understand how the command works. Consider replacing 'on' with 'with the top-left corner drawn at a certain point'

Quote:

Showtext - Displays text on a certain point.
Same comment as the last one, though since you can specify some justification settings you may wish to reword it.

Quote:

changeimgcolors - Used to change the color of things (works best with showtext)
What?

Also, if you are explaining the commands and their components, it might be wise to explain what the 'index' is.

Quote:

over 4 is for screen
You should correct this to say '4 or over'

Quote:

The 'for' function:
'for' is a control structure, not a function.

Quote:

heres how we will
Apostrophe usage - here's

Quote:

In order to keep lag down, you should have a lesser timeout for when the
Q-Menu key is not down, and a higher one for when the Q-Menu key is down
What is your basis for this statement?

After this point, I've pretty much stopped checking for spelling/grammar errors. I think you can resolve those on your own.

Quote:

Use the 'for' function
See above.

Quote:

+ If the weapon is not hidden, add the weapon image and name to the strings. I suggest using insertstring so the weapons can easily be read with #I(string,index).
Wouldn't addstring be simpler and just as effective?

Quote:

The example below shows how to use the '%' function.
It does not show you how to use the modulus operator, it provides an example of it being used.

Quote:

for (i=0;i<sarraylen(this.weapons_NAMES);i++) { // Go through the weapons list
This is inefficient. Each time it compares i, it recalculates the length of your string array. Set a variable to the length of your string array a line above your for statement, then compare it to that variable inside your for statement.

Quote:

...mousescreenx and mousescreeny. Those variables are the position

of the mouse on the screen (within the Graal window).
relative to the Graal window

Quote:

Example (in timeout): if (leftmousebutton && in the icon x,y) { // In the icon x,y isnt a real statement....
Why not use the mousedown event...? It's more efficient to act based upon an event when it happens than check a flag every timeout, yaknow.

Quote:

the 'for' function
See above.

---

I applaud you for your effort, but must ask that you thoroughly refine this document. I am going to be mean and edit the thread title, too, to add 'Proposed' in front of it.

Slash-P2P 12-20-2004 07:27 AM

I don't make tutorials. I didn't really check it over well for grammar and spelling errors.

Lance 12-20-2004 07:33 AM

Quote:

Originally Posted by Slash-P2P
I don't make tutorials.

So?

Quote:

I didn't really check it over well for grammar and spelling errors.
Well, you should have. I worry more about the other types of errors, though.

Slash-P2P 12-20-2004 07:39 AM

1 Attachment(s)
Fixed the grammar errors.

Lance 12-20-2004 07:43 AM

Quote:

Originally Posted by Slash-P2P
Fixed the grammar errors.

How about the non-grammar errors?

HoudiniMan 12-20-2004 11:36 AM

Fun fact: The "Q-Menu" is called the "Inventory"

Wow!

osrs 12-20-2004 05:01 PM

Could not you wait until I finished the others documents? I've uploaded them on Debug and will finish the last one today so Stefan can check, you should have wait then we could release everything at the same time with a good quality. Thanks for being nice and be the only one who helped, but a bit of patience would be appreciated. x-x

calum 12-20-2004 06:55 PM

Quote:

Originally Posted by HoudiniMan
Fun fact: The "Q-Menu" is called the "Inventory"

Wow!

I think there is another thing called the inventory that is not used much anymore .

Slash-P2P 12-20-2004 08:46 PM

Quote:

Originally Posted by Lance
How about the non-grammar errors?

I'll go back and revise that soon.

Quote:

Originally Posted by Houdiniman
Fun fact: The "Q-Menu" is called the "Inventory"

Fun Fact: The "Inventory" is known better as the "Q-Menu"

Wow!

Quote:

Originally Posted by osrs
Could not you wait until I finished the others documents? I've uploaded them on Debug and will finish the last one today so Stefan can check, you should have wait then we could release everything at the same time with a good quality. Thanks for being nice and be the only one who helped, but a bit of patience would be appreciated. x-x

I hadn't talked to you in a while so I thought you forgot about it or something.

GoZelda 12-20-2004 09:40 PM

Quote:

Originally Posted by osrs
Could not you wait until I finished the others documents? I've uploaded them on Debug and will finish the last one today so Stefan can check, you should have wait then we could release everything at the same time with a good quality. Thanks for being nice and be the only one who helped, but a bit of patience would be appreciated. x-x

You could've asked me for help too >_>

osrs 12-21-2004 05:58 AM

Quote:

Originally Posted by GoZelda
You could've asked me for help too >_>

I have posted a thread about it two months ago, many people offered help but nobody did, unless Slash. Now everything is finished anyway.

middo 12-23-2004 03:19 AM

Quote:

Originally Posted by HoudiniMan
Fun fact: The "Q-Menu" is called the "Inventory"

Wow!

Fun fact: I haven't willingly called it "Inventory" ever since I started playing! During the first betas!

Wow!

ApothiX 12-27-2004 10:18 PM

Quote:

Originally Posted by HoudiniMan
Fun fact: The "Q-Menu" is called the "Inventory"

Wow!

The Inventory is the area below the ASD panel ;) make an NPC with:

PHP Code:

if(created) {
  
setimg bomb.png;
  
toinventory client.suprcoolflag;



Projectshifter 12-27-2004 10:25 PM

Quote:

Originally Posted by HoudiniMan
Fun fact: The "Q-Menu" is called the "Inventory"

Wow!

Sadly you are mistaken my friend :P The inventory was an old and depracated thing. It was kind of like a temp little holder of stuff, never used it much. Q-Menu is commonly and more properly referred to as the NPC-Menu (you can also press period on the num pad).

Overall I skimmed the document. I found there to be a good deal of mistakes and misconceptions. For example that you have to make a timeout to detect when you press it on and off, that is not right, keypressed and keydown/keydown2 are wonderful events :) Also if there is really a need I will sit down and spend an hour writing one.

Osrs: I looked over and made some edits to your "library" thing on Debug (stefan asked me to). Had to redo the triggeraction for the most part, but overall it wasn't bad. Just don't think I would've called it "library" as much as a "database" he he :P

ApothiX 12-27-2004 10:31 PM

Quote:

Originally Posted by Projectshifter
Sadly you are mistaken my friend :P The inventory was an old and depracated thing. It was kind of like a temp little holder of stuff, never used it much. Q-Menu is commonly and more properly referred to as the NPC-Menu (you can also press period on the num pad).

I said it first PS, I win :)

Projectshifter 12-27-2004 10:32 PM

Quote:

Originally Posted by ApothiX
I said it first PS, I win :)

Yeah yeah, I'm posting on the forums, so be happy ;)

GoZelda 12-27-2004 11:22 PM

Quote:

Originally Posted by osrs
I have posted a thread about it two months ago, many people offered help but nobody did, unless Slash. Now everything is finished anyway.

Oh heh. Didn't notice the thread.

osrs 12-27-2004 11:29 PM

Quote:

Originally Posted by Projectshifter
Osrs: I looked over and made some edits to your "library" thing on Debug (stefan asked me to). Had to redo the triggeraction for the most part, but overall it wasn't bad. Just don't think I would've called it "library" as much as a "database" he he :P

Okay, post it in a new thread if possible. :)

Kaimetsu 12-27-2004 11:29 PM

Quote:

Originally Posted by Projectshifter
keypressed and keydown/keydown2 are wonderful events

keydown isn't an event.

Projectshifter 12-28-2004 12:11 AM

Quote:

Originally Posted by osrs
Okay, post it in a new thread if possible. :)

You mean the new document? It's in debug under the same name you used, but yours has _osrs.txt appended to it and mine is _ps.txt now. I can't get on Debug because of the new IP rule and Stefan didn't ever set an IP for me =/

Quote:

Originally Posted by Kaimetsu
keydown isn't an event.

It USED to not be, but I'm quite sure it has been updated since, I myself thought so until a little bit ago when someone was using it. Also you can do if (keypressed) and then use conditional if (keydown())/keydown2() to check other aspects such as control and alt into it.

Kaimetsu 12-28-2004 01:20 AM

Quote:

Originally Posted by Projectshifter
It USED to not be, but I'm quite sure it has been updated since

Not in my Graal version. Perhaps you would like to provide some example scripts to back it up?

Andares 12-28-2004 01:48 AM

Quote:

Originally Posted by Kaimetsu
keydown isn't an event.

Cheers to that! I was about to post it.

Projectshifter 12-28-2004 01:55 AM

Quote:

Originally Posted by Andares
Cheers to that! I was about to post it.

Except I've already responded as such.
Anyway, right now my IP is off, so I will see what goes when I get it back up. Also I'm on linux so I cannot use an offline level editor or so right now.

Python523 12-29-2004 10:25 PM

Quote:

Originally Posted by Projectshifter
Except I've already responded as such.
Anyway, right now my IP is off, so I will see what goes when I get it back up. Also I'm on linux so I cannot use an offline level editor or so right now.

It is not an event and it never has been (and, for the purpose it is used for, never will be).

Kaimetsu 12-29-2004 10:31 PM

Quote:

Originally Posted by Python523
It is not a function and it never has been

Keydown? It most certainly is a function.

Python523 12-29-2004 10:56 PM

Quote:

Originally Posted by Kaimetsu
Keydown? It most certainly is a function.

Ack, my train of thought has been off, my bad. I meant it's not an event... I really should read what I type before I post. *edits post*

Velox Cruentus 01-01-2005 02:43 PM

This is fun: Scripters bashing scripters.

Anyhow, thanks for the Tutorial -- I bet some people would still appreciate the involvement you put into it. It's saddening that the community couldn't give you a warmer greeting.

Kaimetsu 01-02-2005 05:20 AM

Quote:

Originally Posted by Velox Cruentus
Scripters bashing scripters

Where?

Velox Cruentus 01-02-2005 06:36 AM

Eh? Where what?

*hugs Kaimetsu*
It's not your fault, Kaimetsu! *tightens grasp on Kaimetsu*

Slash-P2P 01-02-2005 06:39 AM

Quote:

Originally Posted by Velox Cruentus
It's saddening that the community couldn't give you a warmer greeting.

Apparently you are new to the Graal community.

Kaimetsu 01-02-2005 06:40 AM

Quote:

Originally Posted by Velox Cruentus
Eh? Where what?

Read my post again. Read the quote. Surely I was not too cryptic.

Velox Cruentus 01-02-2005 01:03 PM

*hugs Kaimetsu again* I love you too.

Kaimetsu 01-02-2005 01:17 PM

What a novel defense mechanism.

Velox Cruentus 01-02-2005 11:12 PM

Are you going to keep saying that, hun?

Slash-P2P 01-03-2005 02:15 AM

...Thanks whoever silenced my opinion :whatever:
Isn't it awesome how you make a thread about a Q-Menu tutorial and certain people post stupid stuff, and my post ends up getting deleted?

Velox Cruentus 01-03-2005 02:52 AM

You're welcome!

CaTigus 01-03-2005 06:21 AM

Quote:

Originally Posted by Velox Cruentus
Are you going to keep saying that, hun?

I like fish. Mostly Cichlids.


All times are GMT +2. The time now is 03:31 PM.

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