Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-25-2003, 02:58 AM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
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
__________________
<(**)>
Reply With Quote
  #2  
Old 12-25-2003, 03:03 AM
Blue_Dragn Blue_Dragn is offline
Registered User
Join Date: Jul 2003
Posts: 302
Blue_Dragn is on a distinguished road
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
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
Reply With Quote
  #3  
Old 12-25-2003, 04:40 AM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
wats a param?
code:
--------------------------------------------------------------------------------
setshootparams param,param;
--------------------------------------------------------------------------------
i dont get it
__________________
<(**)>
Reply With Quote
  #4  
Old 12-25-2003, 05:06 AM
Blitz_Hunter Blitz_Hunter is offline
dot dot dot
Blitz_Hunter's Avatar
Join Date: Oct 2002
Location: Missouri
Posts: 601
Blitz_Hunter is on a distinguished road
Send a message via AIM to Blitz_Hunter
That must be why you just download scripts off internet sites.. :P
__________________
-em3ricR-
Reply With Quote
  #5  
Old 12-25-2003, 05:12 AM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
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
__________________
<(**)>

Last edited by Loriel; 12-27-2003 at 06:15 PM..
Reply With Quote
  #6  
Old 12-25-2003, 05:56 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
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
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #7  
Old 12-25-2003, 06:00 AM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
ok i have no clue what that means lol thx anyways.. ill figure it out someday.. now can someone tell me how to like repeat something? i cant figure it out
__________________
<(**)>
Reply With Quote
  #8  
Old 12-25-2003, 06:58 AM
DarkShadows_Legend DarkShadows_Legend is offline
Cult of the Winky
DarkShadows_Legend's Avatar
Join Date: Apr 2003
Location: Florida
Posts: 614
DarkShadows_Legend is on a distinguished road
Send a message via AIM to DarkShadows_Legend
newfeatures2002.txt
It is in your main graal folder. You should find what you need in that file
__________________
- Criminal X

"I rather be hated for being myself, than be liked for being what you like best. I go above the influence, not under." - Me
Reply With Quote
  #9  
Old 12-25-2003, 07:54 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Like what an old monkey said to me, learn to walk before you try to run.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #10  
Old 12-25-2003, 11:48 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Are you being entirely truthful about "i used to be able to script really good.. "?
__________________
[signature]insert here[/signature]
Reply With Quote
  #11  
Old 12-25-2003, 05:09 PM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
yes i am being truthful.. but just so much new stuff has came out.. so i cant keep up with it
__________________
<(**)>
Reply With Quote
  #12  
Old 12-25-2003, 08:07 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
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.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #13  
Old 12-25-2003, 08:35 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
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.
__________________
new account: Trevor
Reply With Quote
  #14  
Old 12-25-2003, 09:02 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
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.....
__________________
-Kjetil Valen
Reply With Quote
  #15  
Old 12-26-2003, 05:36 AM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
it was like 3 years ago!
__________________
<(**)>
Reply With Quote
  #16  
Old 12-26-2003, 04:15 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Quote:
Originally posted by ssnniitt5
it was like 3 years ago!
You could loop 3 years ago.
__________________
-Kjetil Valen
Reply With Quote
  #17  
Old 12-26-2003, 04:32 PM
Milkdude99 Milkdude99 is offline
Truckin Up
Milkdude99's Avatar
Join Date: Jun 2001
Location: Central Florida
Posts: 3,390
Milkdude99 is an unknown quantity at this point
Send a message via ICQ to Milkdude99
I don't script on Graal never have but I know what parameters are..
__________________

Moon God
Graal.net

---------- Home---------

Reply With Quote
  #18  
Old 12-26-2003, 04:49 PM
Divider Divider is offline
Banned
Join Date: Jun 2002
Location: Manchester, England.
Posts: 173
Divider is on a distinguished road
Send a message via MSN to Divider
He asked for help, not insults or useless information
Reply With Quote
  #19  
Old 12-26-2003, 06:52 PM
ssnniitt5 ssnniitt5 is offline
Registered User
Join Date: Aug 2003
Posts: 31
ssnniitt5 is on a distinguished road
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..
__________________
<(**)>
Reply With Quote
  #20  
Old 12-26-2003, 07:13 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
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.
__________________
new account: Trevor
Reply With Quote
  #21  
Old 12-26-2003, 07:57 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
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
Reply With Quote
  #22  
Old 12-27-2003, 12:03 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Quote:
Originally posted by Python523


=| if(playersays(beer) && playerrupees>=5) show; doesn't make one a good scripter
It probably did 3 years ago....
Reply With Quote
  #23  
Old 12-27-2003, 12:05 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by haunter


It probably did 3 years ago....
that never made you a good scripter...
__________________
new account: Trevor
Reply With Quote
  #24  
Old 12-27-2003, 12:09 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
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...
Reply With Quote
  #25  
Old 12-27-2003, 12:13 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
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.
__________________
new account: Trevor
Reply With Quote
  #26  
Old 12-27-2003, 02:14 AM
MrCharles MrCharles is offline
my stapler..
MrCharles's Avatar
Join Date: Mar 2002
Location: New York :O
Posts: 3,126
MrCharles will become famous soon enough
if you admit that you were never a good scripter ill help you.


yo wtfuxor screen name posted in this thread
__________________
not a lot baby girl juss' a lil bit
Reply With Quote
  #27  
Old 12-27-2003, 03:46 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
...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.
__________________
- Rance Vicious
Reply With Quote
  #28  
Old 12-27-2003, 07:20 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
you don't need terminology to be good at scripting, although it doesn't hurt
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #29  
Old 12-27-2003, 06:11 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
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?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #30  
Old 12-28-2003, 02:47 AM
MysticHaste MysticHaste is offline
Registered User
Join Date: Dec 2003
Location: Australia
Posts: 109
MysticHaste is on a distinguished road
Send a message via AIM to MysticHaste
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.
__________________
spread the herat <3

Quote:
Originally posted by unixmad
Still not sure if it was not someone smoking to mush
Reply With Quote
  #31  
Old 12-28-2003, 04:47 AM
Blue_Dragn Blue_Dragn is offline
Registered User
Join Date: Jul 2003
Posts: 302
Blue_Dragn is on a distinguished road
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
__________________
No longer a Advertisement Goat
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:08 AM.


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