Graal Forums

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

ssnniitt5 12-25-2003 02:58 AM

Script Help..
 
can someone help me with a command? i used to be able to script really good.. but its been a while.. can someone tell me
what the shootparams command thingey is:confused:

Blue_Dragn 12-25-2003 03:03 AM

Re: Script Help..
 
Quote:

Originally posted by ssnniitt5
can someone help me with a command? i used to be able to script really good.. but its been a while.. can someone tell me
what the shootparams command thingey is:confused:

NPC Code:

setshootparams param,param;



So it could have a lot of params running off it and can be caught by the same weapon or other weapon using

If the projectile hits a player

NPC Code:

if (actionprojectile) {
}



or

if the projectile hits the wall or ground

NPC Code:

if (actionprojectile2) {
}




Hope this helps :)

ssnniitt5 12-25-2003 04:40 AM

wats a param? :confused:
code:
--------------------------------------------------------------------------------
setshootparams param,param;
--------------------------------------------------------------------------------
i dont get it :\

Blitz_Hunter 12-25-2003 05:06 AM

That must be why you just download scripts off internet sites.. :P

ssnniitt5 12-25-2003 05:12 AM

hrmmm your one of the ppl that work on babylon or griffin arent you?.. ya those npcs i was using are ones i made a while ago.. x.x i used to script.. then i went to making levels.. now i wanna start scripting again:\

cmon someone explain to me.. good how to use shootparams
:(

Dach 12-25-2003 05:56 AM

like say you have multiple types of arrows, say fire and ice, you'd do something like
setshootparams ice;
then in the actionprojectile event check you'd check the param strings (#p(index)) for what is being shot, I think the params start at 2, since 0 and 1 are the x and y, well atleast with server-side I don't remember and I don't feel like opening Graal to check

ssnniitt5 12-25-2003 06:00 AM

ok i have no clue what that means :p lol thx anyways.. ill figure it out someday.. now can someone tell me how to like repeat something? i cant figure it out :D

DarkShadows_Legend 12-25-2003 06:58 AM

newfeatures2002.txt
It is in your main graal folder. You should find what you need in that file
;)

osrs 12-25-2003 07:54 AM

Like what an old monkey said to me, learn to walk before you try to run.

screen_name 12-25-2003 11:48 AM

Are you being entirely truthful about "i used to be able to script really good.. "?

ssnniitt5 12-25-2003 05:09 PM

yes i am being truthful.. but just so much new stuff has came out.. so i cant keep up with it :\

osrs 12-25-2003 08:07 PM

Quote:

Originally posted by screen_name
Are you being entirely truthful about "i used to be able to script really good.. "?
He's probably confused with the NPC-Server stuffs.

tlf288 12-25-2003 08:35 PM

Quote:

Originally posted by ssnniitt5
yes i am being truthful.. but just so much new stuff has came out.. so i cant keep up with it :\
a parameter is basic scripting terminolgy; you were never that good if you don't know what a parameter is.


Quote:

Originally posted by osrs


He's probably confused with the NPC-Server stuffs.

knowing what a parameter is hardly has to do with knowing about the npc-server.

VeX_RaT_Boy 12-25-2003 09:02 PM

Quote:

Originally posted by ssnniitt5
yes i am being truthful.. but just so much new stuff has came out.. so i cant keep up with it :\
I doubt that you used to be good. You don't know how to loop things.....

ssnniitt5 12-26-2003 05:36 AM

:mad: it was like 3 years ago!

VeX_RaT_Boy 12-26-2003 04:15 PM

Quote:

Originally posted by ssnniitt5
:mad: it was like 3 years ago!
You could loop 3 years ago.

Milkdude99 12-26-2003 04:32 PM

I don't script on Graal never have but I know what parameters are..

Divider 12-26-2003 04:49 PM

He asked for help, not insults or useless information

ssnniitt5 12-26-2003 06:52 PM

guys please.. just tell me how to repeat commands.. and i ment it was about 3 years ago that i was a good scripter.. sure i did know how to repeat stuff then.. but then about 1000 days later.. i dont remember how..:(

tlf288 12-26-2003 07:13 PM

Quote:

Originally posted by ssnniitt5
guys please.. just tell me how to repeat commands..
look in commands.rtf in your graal folder's root directory. there is numerous ways to do this.

Python523 12-26-2003 07:57 PM

Quote:

Originally posted by ssnniitt5
guys please.. just tell me how to repeat commands.. and i ment it was about 3 years ago that i was a good scripter.. sure i did know how to repeat stuff then.. but then about 1000 days later.. i dont remember how..:(
=| if(playersays(beer) && playerrupees>=5) show; doesn't make one a good scripter

haunter 12-27-2003 12:03 AM

Quote:

Originally posted by Python523


=| if(playersays(beer) && playerrupees>=5) show; doesn't make one a good scripter

It probably did 3 years ago....

tlf288 12-27-2003 12:05 AM

Quote:

Originally posted by haunter


It probably did 3 years ago....

that never made you a good scripter...

haunter 12-27-2003 12:09 AM

Quote:

Originally posted by tlf288


that never made you a good scripter...

You respond to my post as if I have an idea as to what I am talking about... Puzzling...

tlf288 12-27-2003 12:13 AM

Quote:

Originally posted by haunter


You respond to my post as if I have an idea as to what I am talking about... Puzzling...

i know you were jokin', dude.

MrCharles 12-27-2003 02:14 AM

if you admit that you were never a good scripter ill help you.


yo wtfuxor screen name posted in this thread

Termina_Owner 12-27-2003 03:46 AM

...Poor Kid.

I would say that you should read the WHOLE documents on newfeatures, and test each feature one after the other. After you did that, repeat three times, and then you should start understanding what Parameters are. If that isn't enough, I'd say to go back to the day you were "good", which probably never happened, and learn from there by increasing the version number, and learning it's use little by little. If that isn't enough, I hope that you never take on the job of a programmer, because you woudln't be able to follow the flow of new commands/languages easily.

Dach 12-27-2003 07:20 AM

you don't need terminology to be good at scripting, although it doesn't hurt

osrs 12-27-2003 06:11 PM

Quote:

Originally posted by Termina_Owner
...Poor Kid.

I would say that you should read the WHOLE documents on newfeatures, and test each feature one after the other. After you did that, repeat three times, and then you should start understanding what Parameters are. If that isn't enough, I'd say to go back to the day you were "good", which probably never happened, and learn from there by increasing the version number, and learning it's use little by little. If that isn't enough, I hope that you never take on the job of a programmer, because you woudln't be able to follow the flow of new commands/languages easily.

Pfft, who you think you're to say that?

MysticHaste 12-28-2003 02:47 AM

Okay, A Param (Parameter) is just like a trailing piece of information on an object for the most part in graal script.

setshootparams isfire,#v(this.firepower);

Could be used to tell the client that is hit (if (actionprojectile) ...) or the Server (if (actionprojectile2) ...) The parameters above might be used like this in a weapon:
(In the -Systems npc or something that all players have)
if (actionprojectile) {
// This (#p(2) is the first thing in setshootparams, so its param2 (param0 and param1 are the X,Y positions of the impact)
if (strequals(#p(3),isfire) {
damage=strtofloat(#p(1))*2; // Times by 2 because hurt works in halfhearts.
hurt damage;
}
}

if (actionprojectile2) {
if (strequals(#p(2),isfire)) {
putnpc2 strtofloat(#p(0)),strtofloat(#p(1)),{
if (created) {
setimg fire.gif;
}
}
}
}
//This puts the npc and makes it fire.gif in the position of the impact of the projectile, this code above would be in the control-npc of your server, These are just examples of how to use Params with projectiles, any mistakes I may have made please feel free to correct me, its been 3 or 4 months since I had a server to script on.

More on Params.
Params are used with almost everything.
setplayerprop #P(20) is playerprop 20 if used in the current Gani.

Triggeractions Use Params, This is how many actions are carried player to player and player to server, npc to player, npc to server etc. with serverside Scripting.

triggeraction x,y,serverside,serverwarp,#a,newx,newy,newlevel;
(With params being serverwarp,#a,newx,newy,newlevel)
(this triggers an actionserverside)
if (actionserverside) {

}

was a commonly used server action, but is not used now, because of the ease of use for a 'hacker/trainer' user to abuse the fact that almost all servers used "serverwarp" in that format they could warp themselves using it.

I found that just messing around (Fiddling around with commands) is the best way to learn, Start from the basics though.

Blue_Dragn 12-28-2003 04:47 AM

Quote:

Originally posted by MysticHaste
...
I had noticed in actionprojectile it was possibile to use #p(1) and #p(2) and it would ignore the fact that it should be X and Y

I dunno if this is a bug or not, and i never really used actionprojectile2, but it seemed that the X and Y were irrelevant


All times are GMT +2. The time now is 09:29 AM.

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