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 02-04-2005, 08:39 PM
jas988 jas988 is offline
Registered User
Join Date: Feb 2005
Posts: 14
jas988 is on a distinguished road
How do I make items that heal health?

I need an item NPC that becomes an item, and when you use it, it heals 3 hearts then is destroyed, and you can only have one at a time.
Reply With Quote
  #2  
Old 02-04-2005, 08:43 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Read the rules.
__________________
Reply With Quote
  #3  
Old 02-04-2005, 08:53 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Why is the topic asking for this and then the post itself demanding for this?

Read Kai's post.
__________________
Reply With Quote
  #4  
Old 02-04-2005, 08:56 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
x-x why don't you just answer his question
Reply With Quote
  #5  
Old 02-04-2005, 09:00 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Stefan
x-x why don't you just answer his question
If people are spoon-fed this kind of thing, they never bother to learn. I think it is better in the long-term if they are encouraged to think for themselves.
__________________
Reply With Quote
  #6  
Old 02-04-2005, 09:24 PM
Darlene159 Darlene159 is offline
Administrator
Darlene159's Avatar
Join Date: Aug 2001
Location: Florida
Posts: 12,470
Darlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud of
Quote:
Originally Posted by Kaimetsu
If people are spoon-fed this kind of thing, they never bother to learn. I think it is better in the long-term if they are encouraged to think for themselves.
Then offer some advice or direction or something, instead of just saying "read the rules"
I am sure there are tutorials or something that he could be directed to.
I dont see why simple scripts cannot be given
__________________
FORUM RULES
GRAAL BIBLE (Lots of useful info)
INFO ABOUT REPUTATIONS.
INFO ABOUT INFRACTIONS.
HOW TO APPLY FOR THE NON-GRAAL RELATED FORUM (<<READ THOROUGHLY!)

SUPPORT: http://support.toonslab.com

NOTE: YOU ARE RESPONSIBLE FOR YOUR OWN POSTS.
READ>THINK>POST
Reply With Quote
  #7  
Old 02-04-2005, 09:47 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Darlene159
Then offer some advice or direction or something, instead of just saying "read the rules"
I am sure there are tutorials or something that he could be directed to
Yeah, they are contained in the 'Advice' thread, right at the top of the forum. I do not think they are difficult to find.

Quote:
I dont see why simple scripts cannot be given
Well, it is not up to me. I am not a moderator, after all. I am just informing the thread's creator that he is in violation of the rules.

However, I do agree with the rule. Giving scripts - simple or otherwise - encourages people to get lazy and stop thinking for themselves. More likely than not, they will simply copy the script into their levels without stopping to understand why it works. This is a Bad Attitude. Forcing people to solve problems by themselves leads to them learning, and being able to fend for themselves in the future. Even if it seems harsh, it is for the best in the long-term.

In any case, he didn't even give us enough information to definitively answer his question. He was ambiguous. Items on GK are different to items on 2K1 are different to items on Classic, etc. And does the relevant environment have a custom HP system? At the very least, he should learn to ask questions in a concise, unequivocal manner.
__________________
Reply With Quote
  #8  
Old 02-05-2005, 07:40 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Darlene159
Then offer some advice or direction or something, instead of just saying "read the rules"
I am sure there are tutorials or something that he could be directed to.
I dont see why simple scripts cannot be given
"Read the rules" is not advice or direction?

I should direct you to several posts where you have closed them with "Read the rules."

Last edited by Lance; 02-05-2005 at 08:02 AM..
Reply With Quote
  #9  
Old 02-07-2005, 01:35 AM
Sildae Sildae is offline
Elven sorceress!
Sildae's Avatar
Join Date: Dec 2001
Location: Lothlòrien
Posts: 159
Sildae is on a distinguished road
Quote:
Originally Posted by Darlene159
Then offer some advice or direction or something, instead of just saying "read the rules"
Search: Key Words: "Read the rules"; ; Posts Made By: Darlene159
How did you ever become moderator? Stephane needs to remove you for being a hopeless hypocrite. Your moderation style is a lot worse and more rude than Kaimetsu's (completely justified and appropriate) post, and combined with this post of yours shows that you really lack any respect you should have for Graalians.

Quote:
I am sure there are tutorials or something that he could be directed to.
You have never bothered learning scripting. You have never bothered understanding how scripting works, how to learn it and people's mentality about it. You know nothing about it.
Then you come into this forum and make it sound as if it all was about tutorials, downplaying all the effort people have put into scripting over the years.
Why do you not make an announcement, link to the tutorials you are speaking of, and close this forum once and for all to prevent people from trying to sensibly discuss scripting?

Quote:
I dont see why simple scripts cannot be given
After all the times it has been explained in this forum? Why do you not read the things people write here? I do not think that this forum is the right place for your self-righteous manner.

Quote:
__________________
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."
-- George Bernard Shaw

Last edited by Sildae; 02-07-2005 at 02:18 AM..
Reply With Quote
  #10  
Old 02-05-2005, 07:39 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Stefan
x-x why don't you just answer his question
I would say it is because this person is asking for a script fitting his description rather than asking how to script something fitting his description. We do the latter, not the former.
Reply With Quote
  #11  
Old 02-05-2005, 07:42 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Lance
I would say it is because this person is asking for a script fitting his description rather than asking how to script something fitting his description. We do the latter, not the former.
Perhaps you should read the topic of this thread?
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #12  
Old 02-05-2005, 07:44 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by ApothiX
Perhaps you should read the topic of this thread?
Now what?

Perhaps you should examine the wording of his post.
Reply With Quote
  #13  
Old 02-08-2005, 04:07 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by Stefan
x-x why don't you just answer his question
I don't recall there being a question. This is more of one of those "give me give me give me" type of threads. It would be much too simple to just give away such things, and in which case he would learn nothing, which deduces us to nothing more than his scripting *****s =/ Plus if he wants it, and he isn't willing to learn, he should hire a NAT x.x
__________________
Who has time for life these days?
Reply With Quote
  #14  
Old 02-04-2005, 09:46 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
you want to have an NPC with the event "playertouchsme"

then you probably want to add a healing weapon to the player using the "addweapon" command

this will be really hard to do if you can't understand basic scripting yet, I didn't learn from any documents besides commands.rtf so I can't say what things would be helpful to read
__________________

Reply With Quote
  #15  
Old 02-04-2005, 09:50 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Evil_Trunks
this will be really hard to do if you can't understand basic scripting yet
This IS basic scripting.

as an addition to Evil_Trunks' post, look up the 'playerhearts' variable, and remember to check if the player's AP is above 40, before healing them. (I can't remember if the check is already done for you if the heart manipulation is done clientside or not)


Quote:
Originally Posted by Kaimetsu
Read the rules.
Quote:
Originally Posted by Kaimetsu
If people are spoon-fed this kind of thing, they never bother to learn.
There are ways to get them started in the right direction, instead of just blurting out the script. The subject of his post was 'How do i..' NOT 'Script X for me'. It is not against the rules.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #16  
Old 02-04-2005, 10:11 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
You can't just assume they won't look at it and will just copy it. When I asked for help, the few times I got it :/, I looked to see what I did wrong, and then constantly made sure to do that in new scripts. that's just me, but I am sure that people are more apt to do this than you think.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #17  
Old 02-04-2005, 11:08 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by falco10291029
You can't just assume they won't look at it and will just copy it. When I asked for help, the few times I got it :/, I looked to see what I did wrong, and then constantly made sure to do that in new scripts
I would not like to assume that everybody in the world is like you.
__________________
Reply With Quote
  #18  
Old 02-04-2005, 11:40 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
I will refuse to come back to that with fierce insults because I am not like that. What would be good however is if you dont assume the worst of everyone.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
Reply With Quote
  #19  
Old 02-05-2005, 12:16 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by falco10291029
I will refuse to come back to that with fierce insults because I am not like that. What would be good however is if you dont assume the worst of everyone.
While I do not agree with Kaimetsu's mention of reading the rules in this thread, I think he made the correct assumption about posting entire scripts. Nine tenths of the newbie scripters out there, will simply copy and paste the code, even if they have the initial intent to learn it, a free piece of code is much more attractive than sitting there and trying to figure out on your own the proper procedure.

The solution to that is to give the person hints as to how he can make it, instead of giving the entire script. That way, the rules will remain enforced, and the person who is requesting help, will get what he is requesting.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #20  
Old 02-05-2005, 02:00 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
It is fairly basic scripting, and everyone must start somewhere, and not everyone is sure where to start.

What of all the scripts Stefan has posted to help people become more advanced with newer gscript additions? Should Stefan also Adhire to the rules of not posting full scripts, and leave his documents and script to himself?

Where would you be without those? Asking for help, unless you were a part of designing it, or just somehow knew all the commands before they were finished.

First he has not really said if he is using this offline or online, That would have helped a bit in giving him more help, however I assume he would like to use it online.

NPC Code:

if (actionserverside) {
playerhearts += 3;
removeweapon Healer;
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Healer;
}



You just need to add the weapon to yourself with a simple addweapon line, you can use whatever means you find neccessary to do this, however I did it like so.

NPC Code:

if (playerenters) {
addweapon Healer;
}



Simple Barebones 1 use Healing item to heal 3 hearts, you can only have one at a time, but you can always go back for more.
__________________
Reply With Quote
  #21  
Old 02-05-2005, 02:34 AM
Methril Methril is offline
Registered User
Join Date: Jan 2005
Posts: 237
Methril is on a distinguished road
Goodjob Andy, I'm glad that someone was decent enough to help the guy out with a simple question.

Kaimetsu, we know that you are a l33t7!1oneone scripter but you don't own gscript and your ideal way of teaching gscript to people is less than fantastic.
Reply With Quote
  #22  
Old 02-05-2005, 05:13 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
By the way, I learned to script from the Copy+Paste method. Although, unlike most newbie scripters today, I had an extra step called Experiment. I found whole scripts, put them in the editor, and played around with the script until I broke it or made something really cool. Most people today just use the script they find and never really try to learn something from it.

Last edited by Lance; 02-05-2005 at 07:35 AM.. Reason: flaming/spam removed
Reply With Quote
  #23  
Old 02-05-2005, 07:13 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Andy0687
It is fairly basic scripting, and everyone must start somewhere, and not everyone is sure where to start.
We gave him ideas of where to start, you should not have posted full code. Especially seeing as how that is NOT the best way to do it.

Quote:
Originally Posted by Andy0687
What of all the scripts Stefan has posted to help people become more advanced with newer gscript additions? Should Stefan also Adhire to the rules of not posting full scripts, and leave his documents and script to himself?
Stefan has posted NEW material, and also, things that are helpful to everyone, and not demanded by one person.

Quote:
Originally Posted by Andy0687
Where would you be without those? Asking for help, unless you were a part of designing it, or just somehow knew all the commands before they were finished.
Once again, if you really wanted to help him, you would not have posted entire code for him to copy+paste. We gave him the commands to use, he could have easily have put them together, and actually learned something.


Quote:
Originally Posted by Andy0687
blah blah, code here
You should have either done the heart manipulation clientside, or what my other post suggested, and did a check to see if the player's AP is below fourty.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #24  
Old 02-05-2005, 07:42 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Andy0687
What of all the scripts Stefan has posted to help people become more advanced with newer gscript additions? Should Stefan also Adhire to the rules of not posting full scripts, and leave his documents and script to himself?
You should actually read the rule you're criticizing. It says not to post full scripts to solve people's problems. Posting a full script you designed and want to show off or want to release to the public certainly does not fit the rule's description.
Reply With Quote
  #25  
Old 02-06-2005, 01:40 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Lance
You should actually read the rule you're criticizing. It says not to post full scripts to solve people's problems.
So some problems some people were having getting adjusted to the new gscript engine, was not solved by Stefan creating example code?

Say i was eager to use the RC Item he posted, had he not posted, would many people have had a way to do it alone?

I am just saying, Stefan has helped solve a lot of problems by posting his code, I am not criticizing the rule, but bringing it into a diffrent perspective.
__________________
Reply With Quote
  #26  
Old 02-06-2005, 02:59 PM
Inspiration Inspiration is offline
7 Words
Inspiration's Avatar
Join Date: Oct 2004
Location: New York
Posts: 826
Inspiration is on a distinguished road
Send a message via AIM to Inspiration
I agree with both sides of this to an extent.

I myself need help with scripting a lot, but I always TRY to do it myself, and then go for help if I am totally clueless as how to achieve the effect I want.

However, the script this person is asking for, is simple functions that I'm sure even someone who has never scripted before could figure out just by reading the commands.

Theres a huge difference between "GUYS CAN I PLZ HAVE THIS SCRIPT I DONT KNOW HOW 2 DO IT"

and

"Here's what I've tried so far, and none of this seems to be working, can someone explain to me what I need to add, or what I'm doing wrong"

You can learn a lot by cuting and pasting code, but only if you understand what the code your pasting is doing. Whenever someone helps me, I normally as them what they did to make it work if I can't figure it out myself by looking at their changes.
__________________
How to start your own project:

1. Annoy everybody on an existing project by submitting or proposing changes that they don't want
2. Formally declare all existing projects to be complete crap
3. Talk at great length about the deficiencies of other projects
4. Get drunk
5. ???
6. Profit
Reply With Quote
  #27  
Old 02-17-2005, 02:45 AM
jas988 jas988 is offline
Registered User
Join Date: Feb 2005
Posts: 14
jas988 is on a distinguished road
Sorry about the off topicness but I can't believe I started all this. anyway... I tried

sethearts full

and

sethearts 3


but I can't do it.
Reply With Quote
  #28  
Old 02-17-2005, 02:49 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
isn't it:
NPC Code:
playerhearts = value;


?
__________________
Save Classic!
Reply With Quote
  #29  
Old 02-17-2005, 02:50 AM
jas988 jas988 is offline
Registered User
Join Date: Feb 2005
Posts: 14
jas988 is on a distinguished road
I'll trx it later. but thx in advance!
Reply With Quote
  #30  
Old 02-17-2005, 03:29 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Man, somebody already gave you a full script. Doesn't your server have any scripters?
__________________
Reply With Quote
  #31  
Old 02-17-2005, 06:50 PM
jas988 jas988 is offline
Registered User
Join Date: Feb 2005
Posts: 14
jas988 is on a distinguished road
not yet. hey, I don't know how to get scripters.
Reply With Quote
  #32  
Old 02-17-2005, 06:55 PM
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
If your playerworld is currently online, post about it in the Hiring Section of the forum.
__________________
Save Classic!
Reply With Quote
  #33  
Old 02-17-2005, 07:05 PM
jas988 jas988 is offline
Registered User
Join Date: Feb 2005
Posts: 14
jas988 is on a distinguished road
How do I get it online?
Reply With Quote
  #34  
Old 02-17-2005, 07:25 PM
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
Quote:
Originally Posted by jas988
How do I get it online?
buy space for the playerworld. Not sure on the website. I think www.graal.net
__________________
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 02:48 PM.


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