Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-07-2001, 05:07 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Question Trees.

I am a decent scripter but I have a question and I hope you guys will point me in the right direction.I made a tree script and such but I find it isn't that effiencent.I was wondering if you peoples can tell me commands (not the script!!) to make my tree script more effiencent.It would help me A LOT!
Contact me on AIM or on classic.I might be on g2k1 for a couple hours.
__________________
Save Classic!
Reply With Quote
  #2  
Old 12-07-2001, 05:25 AM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
What is your tree script supposed to do?
Reply With Quote
  #3  
Old 12-07-2001, 05:54 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
reply

I guess I should have indicated that.Well I basically want what the p2p servers have with the tree growing/ apple getting.I have/had a tree but I used putnpc.I know you can use setarray but I don't know how to use it.This is some of the things I need to know about.Saving the tree steps is another thing.And doing it with a low amount of strings would be good.(like 5-10 strings max).Please point me in the right direction.
__________________
Save Classic!
Reply With Quote
  #4  
Old 12-07-2001, 08:00 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: reply

Quote:
Originally posted by maximus_asinus
I guess I should have indicated that.Well I basically want what the p2p servers have with the tree growing/ apple getting.I have/had a tree but I used putnpc.I know you can use setarray but I don't know how to use it.This is some of the things I need to know about.Saving the tree steps is another thing.And doing it with a low amount of strings would be good.(like 5-10 strings max).Please point me in the right direction.
Let me give you a little push into the right direction about arrays:
Arrays are like having a string with more than one string in it, let's start out by setting the array:
setarray myarray,2;
it will set the array and will allow you to set three different parts (0, 1, and 2)

to read the arrays, you do this:
if (myarray[0]=0)
if (myarray[1]=0)
if (myarray[2]=0)
if (myarray[0]=1)
ext...
to set part of an array to a value, you do this:
if (created) {myarray[0]=1;}
and you can do a lot of other things with arrays, hope you understand now
Reply With Quote
  #5  
Old 12-07-2001, 08:56 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Cool thanks

Thanks for helping me with setarray.I was wondering how to use those for awhile.Now I gotta make some sorta NPC with it to fully understand it.
Thanks.
__________________
Save Classic!
Reply With Quote
  #6  
Old 12-07-2001, 10:51 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: thanks

Quote:
Originally posted by maximus_asinus
Thanks for helping me with setarray.I was wondering how to use those for awhile.Now I gotta make some sorta NPC with it to fully understand it.
Thanks.
No problem, try making something like this using arrays:
Make a 'mimic' that will look in the direction you do, it was the first thing I did using arrays
Reply With Quote
  #7  
Old 12-08-2001, 04:40 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
Unhappy ok.

I will try to make it but I proably will make a mess of it.I used:
if (playerdir=2) {
dir=4;
say whatever;
}

But that is repetitive.This way I hope is easier and less repetitive.
And if you notive my pic I included.That is from a crafting place I made and the bomy script that I also made.(it doesn't have every little thing in it from g2k1 bomy script but it has almost everything.)
Attached Images
 
__________________
Save Classic!
Reply With Quote
  #8  
Old 12-08-2001, 05:08 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: ok.

Quote:
Originally posted by maximus_asinus
I will try to make it but I proably will make a mess of it.I used:
if (playerdir=2) {
dir=4;
say whatever;
}

if (playerdir==2)
remember, = is an assignment, == means equals
Reply With Quote
  #9  
Old 12-08-2001, 05:20 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
sorry

that was just a spelling mistake.I would have picked that up if I was looking at the editor.
so let me get this straight.
If I make an NPC that you touch it will activate the setarray command?
Example:
if (playertouchsme) {
setarray testarray,2;
}

If thats proper I have a few other questions.Can you use client.variables or server.variables in the script? And where you pu the # does that set the limit of how many arrays I use?Like if I make it higher can I make more arrays?Same thing with lower?
I just like trying to figure as much as I can about these things.
__________________
Save Classic!
Reply With Quote
Reply


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 03:36 PM.


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