Graal Forums  

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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-24-2001, 04:25 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
join command

Im a little (meaning totally) confused on how join works. Could someone give me a simple example on how to use it? I just cant seem to grasp that command, and maybe one of you guys/girls can help me out.

thanx.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
  #2  
Old 11-24-2001, 05:19 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
join blah;


it will add in the coding of what ever is in the txt file blah
__________________
Thanks,
-KJL
  #3  
Old 11-24-2001, 03:55 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
:-D

Very well put...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #4  
Old 11-24-2001, 07:10 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
thanks

thank you very much!

so, if i have a file called bomb.txt
i could put in another NPC join bomb;

Thanx!
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
  #5  
Old 11-25-2001, 02:49 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
It works on p2p only and the script needs to be in a class.. (they can be added manually in the scripts directory of your FTP) or via NPC Control.exe
__________________

subliminal message: 1+1=3
  #6  
Old 11-25-2001, 02:54 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
:)

okay, I'll look into it.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
  #7  
Old 11-25-2001, 10:41 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Here is my post:

Say you have a butterfly. You code the butterfly. Then, you save it as a class. Then, you create many butterfly npc's in NC:

if (created) {
setstring this.image,butterfly.png;
this.x=30;
this.y=30;
}
join butterfly;

What join does is pastes the script from the class file. Very helpful. This was a fragmented and hard to understand post from Boco.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #8  
Old 11-25-2001, 12:26 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
bococ I like your avatart
__________________
Thanks,
-KJL
  #9  
Old 12-09-2001, 01:22 PM
Andor_NPC-Admin1 Andor_NPC-Admin1 is offline
Registered User
Join Date: Nov 2001
Posts: 69
Andor_NPC-Admin1 is on a distinguished road
Okie, the NPC server doc says this:

"the internal representation is slightly different:
each npc has a list of scripts, the own script
is parsed and added as the first script in this list;
when you do join then another script is parsed
and added to the script list;
when the script for the requested class is already
in the memory (used by another npc) then it is not
copied, it is just added to the script list;
so when several npcs are using the same class
then it is only hold one time in the memory and
the script object is put into the script lists
of the npcs;
functions can be overwritten"


Can someone translate that to english?
  #10  
Old 12-11-2001, 05:33 AM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
I wonder...could join be used with lists of functions, like:

in every npc, if(created){join standard_funcs;}

in NPCs in area Bomboria, if(created){join bomboria_funcs;]

?
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
  #11  
Old 12-11-2001, 05:45 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
it jsut adds what is in the class file to the script so it is posible.
__________________

subliminal message: 1+1=3
  #12  
Old 12-11-2001, 05:54 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Quote:
Originally posted by jeff335
I wonder...could join be used with lists of functions, like:

in every npc, if(created){join standard_funcs;}

in NPCs in area Bomboria, if(created){join bomboria_funcs;]

?
you could do that....

You dont need to put it in any functions...

here is an example of how I use it...

NPC Code:

if (created) {
this.maxflakes = 100;
}
join snow;



I have the join outside of any if statements because when you join it its putting all the coding that you have from whats in that class file into the npc (not really putting it into it but thats how it reads the script)
__________________
Thanks,
-KJL
  #13  
Old 12-11-2001, 06:23 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Quote:
Originally posted by Andor_NPC-Admin1
Okie, the NPC server doc says this:

"the internal representation is slightly different:
each npc has a list of scripts, the own script
is parsed and added as the first script in this list;
when you do join then another script is parsed
and added to the script list;
when the script for the requested class is already
in the memory (used by another npc) then it is not
copied, it is just added to the script list;
so when several npcs are using the same class
then it is only hold one time in the memory and
the script object is put into the script lists
of the npcs;
functions can be overwritten"


Can someone translate that to english?
Yes. Join puts Class script into NPC script.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #14  
Old 12-18-2001, 02:01 AM
Andor_NPC-Admin1 Andor_NPC-Admin1 is offline
Registered User
Join Date: Nov 2001
Posts: 69
Andor_NPC-Admin1 is on a distinguished road
?
  #15  
Old 12-18-2001, 08:30 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Andor_NPC-Admin1
Okie, the NPC server doc says this:

"the internal representation is slightly different:
each npc has a list of scripts, the own script
is parsed and added as the first script in this list;
when you do join then another script is parsed
and added to the script list;
when the script for the requested class is already
in the memory (used by another npc) then it is not
copied, it is just added to the script list;
so when several npcs are using the same class
then it is only hold one time in the memory and
the script object is put into the script lists
of the npcs;
functions can be overwritten"


Can someone translate that to english?
What they're basically saying is that if you use the same section of your script over and over again, (like a string parsing function I find myself using over and over), you can say 'join stringparser.txt;', and have a text file with that function in it, then, the players only have to download that function once, even though it is in lots of different npcs
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 01:37 AM.


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