Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Spells (https://forums.graalonline.com/forums/showthread.php?t=53400)

falco10291029 06-26-2004 02:33 AM

Spells
 
I am wondering, I always use putnpc2; for my spells (in the serverside portion obvioulsy), but i am wondering if anyone can describe he shoot command a little better than the documents I have seen, because in some cases this would be better to use for me than putnpc2 and any other stuff (Note: If you are interested in how i do it, pm me).

xManiamaNx 06-26-2004 08:00 PM

newfeatureswhatever.txt I forget which year it is, but one of the newfeatures txt files explain the shoot command in detail.

Python523 06-26-2004 08:07 PM

Why does it need to be described more? The document is fine

Trevor 06-26-2004 11:02 PM

Can you require that people at least *try* to make their posts readable?

Xecutor 06-27-2004 03:25 AM

A mandatory spell and grammar check for anything not in code tags XD.

WanDaMan 06-27-2004 08:18 PM

It seems he comes here and makes a topic for every little bump he comes across. Atleast try.

Trevor 06-27-2004 10:29 PM

I don't are if he asks for help. In fact, I encourage it, but I want people to atleast try and use correct grammar and spelling.

GoZelda 06-28-2004 10:25 PM

Quote:

Originally Posted by xManiamaNx
newfeatureswhatever.txt I forget which year it is, but one of the newfeatures txt files explain the shoot command in detail.

Quote:

Originally Posted by falconumbers
describe he shoot command a little better than the documents I have seen

:rolleyes:

WanDaMan 06-28-2004 10:43 PM

Quote:

Originally Posted by Trevor
I don't are if he asks for help. In fact, I encourage it, but I want people to atleast try and use correct grammar and spelling.

I'm not saying to not ask for help, but it seems like he just doesn't try at all and then comes asking about it.

Lance 06-28-2004 11:10 PM

Quote:

Originally Posted by falco10291029
i am wondering if anyone can describe he shoot command a little better than the documents I have seen

As has been said, check out the newfeatures.txt files. One of them explains it in detail - they explain the syntax of the shoot command rather well.

GoZelda 06-29-2004 11:43 AM

Quote:

Originally Posted by Lance
As has been said, check out the newfeatures.txt files. One of them explains it in detail - they explain the syntax of the shoot command rather well.

As has been made clear, those documents that do not explain it well might include newfeatures.txt?

xManiamaNx 06-29-2004 04:20 PM

If the newfeatures text files do not document it enough, nothing does.

falco10291029 06-29-2004 04:37 PM

Actually I have never seen newfeatures.txt I am talking about custom health tutorials wyere it just shows the command used and says then use an action and in commands.rtf where it just shows it so can i get a link to newfeatures.txt?

GoZelda 06-29-2004 04:42 PM

Quote:

Originally Posted by falco10291029
Actually I have never seen newfeatures.txt I am talking about custom health tutorials wyere it just shows the command used and says then use an action and in commands.rtf where it just shows it so can i get a link to newfeatures.txt?

Okay so Lance and the Maniac were right ...*cough*owned*cough*. You find them in your Graal2001 folder.

falco10291029 06-30-2004 04:03 PM

Thank you I will look at that ASAP

Crono 06-30-2004 04:08 PM

You should also look into simply practicing with scripts offline. Then when you get the basic idea take it online. I'm a newbie when it comes to scripting but I've learned a lot on my own. @_@; though Malinko laughs at me.

falco10291029 06-30-2004 09:51 PM

Cool the newfeautures explained shoot well enough for me to understand, and i have made my first weapon for it already, called rock throw, also i was wondering, in almost all of my weapons, i have to do a set of commands for eac direction I.E:
NPC Code:

if (weaponfired) {
if (playerdir=0) blah0;
if (playerdir=1) blah1;
if (playerdir=2) blah2;
if (playerdir=3) blah3;

}



Is there a way to make it so i only need to do 1 direction, for like explosion weapons or shoot...

Xecutor 07-01-2004 06:08 AM

'=' is not used in the situation you have above. Also I do not understand your question, someone else might however.

WanDaMan 07-01-2004 07:35 AM

vecx(playerdir) & vecy(playerdir)

Lance 07-01-2004 08:08 AM

Quote:

Originally Posted by Xecutor
'=' is not used in the situation you have above. Also I do not understand your question, someone else might however.

It is worth noting that Xecutor is correct and expanding upon it to say:

= is your assignment operator
== is your comparison operator

GoZelda 07-01-2004 12:08 PM

Quote:

Originally Posted by Lance
It is worth noting that Xecutor is correct and expanding upon it to say:

= is your assignment operator
== is your comparison operator

Or a bit more simple, because Lance likes difficult words and terms which newbies might not understand...

= is 'becomes', so
NPC Code:

x=10


means that x becomes ten

== is 'the same' or 'equals' so
NPC Code:

if (x==10)


then x is equal to ten

Although you can use
NPC Code:

if (x=10)


because of compability with Java or something, it is strongly adviced not to.

falco10291029 07-10-2004 07:44 PM

whatever i try not to and then how do you use vecx(playerdir) & vecy(playerdir) i have seen them before but they are a little complicated

Dach 07-11-2004 12:26 AM

they are arrays that return the increment direction (-1 or 1) for that direction
NPC Code:
dir  | up   left   down  right
vecx | 0 -1 0 1
vecy | -1 0 1 0


falco10291029 07-12-2004 04:05 PM

Oh i get it so if used correctly u can sometimes replace if (playerdir==#). I will attempt to use that sometime


All times are GMT +2. The time now is 04:52 AM.

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