Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   How do I make items that heal health? (https://forums.graalonline.com/forums/showthread.php?t=57475)

jas988 02-04-2005 08:39 PM

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.

Kaimetsu 02-04-2005 08:43 PM

Read the rules.

Crono 02-04-2005 08:53 PM

Why is the topic asking for this and then the post itself demanding for this?

Read Kai's post. :p

Admins 02-04-2005 08:56 PM

x-x why don't you just answer his question

Kaimetsu 02-04-2005 09:00 PM

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.

Darlene159 02-04-2005 09:24 PM

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
:\

Evil_Trunks 02-04-2005 09:46 PM

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

Kaimetsu 02-04-2005 09:47 PM

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.

ApothiX 02-04-2005 09:50 PM

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.

falco10291029 02-04-2005 10:11 PM

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.

Kaimetsu 02-04-2005 11:08 PM

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.

falco10291029 02-04-2005 11:40 PM

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.

ApothiX 02-05-2005 12:16 AM

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.

Andy0687 02-05-2005 02:00 AM

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.

Methril 02-05-2005 02:34 AM

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.

Slash-P2P 02-05-2005 05:13 AM

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.

ApothiX 02-05-2005 07:13 AM

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.

Lance 02-05-2005 07:39 AM

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.

Lance 02-05-2005 07:40 AM

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."

ApothiX 02-05-2005 07:42 AM

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?

Lance 02-05-2005 07:42 AM

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.

Lance 02-05-2005 07:44 AM

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.

ApothiX 02-05-2005 07:47 AM

Quote:

Originally Posted by Lance
Now what?

Perhaps you should examine the wording of his post.

Perhaps he lacks skill in the English language, and 'i need ...' after his topic already states 'How do i..' is his way of asking for help?

Lance 02-05-2005 07:49 AM

Quote:

Originally Posted by ApothiX
Perhaps he lacks skill in the English language, and 'i need ...' after his topic already states 'How do i..' is his way of asking for help?

Then perhaps he should read this to avoid such ambiguity. (Credit once again goes to Loriel for the link)

ApothiX 02-05-2005 07:52 AM

Quote:

Originally Posted by Lance
Then perhaps he should read this to avoid such ambiguity. (Credit once again goes to Loriel for the link)

Then perhaps you should sticky that link, to avoid further instances like this ;)

Andy0687 02-06-2005 01:40 AM

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.

ApothiX 02-06-2005 01:45 AM

Quote:

Originally Posted by Andy0687
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?

The RC Item he posted was not example code. It was a tool that people can use on their server because it is not installed by default.


Quote:

Originally Posted by Andy0687
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.

Stefan has never posted code that was demanded from someone who did not attempt to script something theirselves. Like Lance said, read the rule before you so blatantly post about it being broken.

Inspiration 02-06-2005 02:59 PM

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.

Andy0687 02-06-2005 11:59 PM

Quote:

Originally Posted by ApothiX
The RC Item he posted was not example code.

So your saying this weaponRC which he posted, contains no example of how to use gscript2 in an item, and by looking at it, it might not give you any hint as to how to do something you want.

Quote:

Stefan has never posted code that was demanded from someone who did not attempt to script something theirselves.
How many times have you tried scripting the new RC?
On the other side of that coin, how many times have people asked "When will the scripted RC be done?"

Quote:

Like Lance said, read the rule before you so blatantly post about it being broken.
You must be slightly thick, I posted about no rule being broken, I simply asked a rhetorical question, which just so happened to concern said rule.

Hey if you cant point out to me where I said "Stefan breaks the NPC forum rules" then I will be glad to apologize, but the problem is, you wont find where I said that, because I didnt.

Evil_Trunks 02-07-2005 12:57 AM

Quote:

Originally Posted by Andy0687
Hey if you cant point out to me where I said "Stefan breaks the NPC forum rules" then I will be glad to apologize, but the problem is, you wont find where I said that, because I didnt.

Quote:

Originally Posted by Andy0687
Should Stefan also Adhire to the rules of not posting full scripts, and leave his documents and script to himself?

..

Darlene159 02-07-2005 12:59 AM

Quote:

Originally Posted by Lance
"Read the rules" is not advice or direction?

Sure, but this is a help thread isn't it? I would just think that more help might be given besides "Read the rules"

Quote:

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

One has nothing to do with the other, closing threads isn't done to help someone, this forum is

At any rate, I really dont want to argue the issue, I would just like some people to be more helpful, or just not post. Back seat moderating isn't needed.

Sildae 02-07-2005 01:35 AM

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:

:\
:frown:

Lance 02-07-2005 02:40 AM

Quote:

Originally Posted by Darlene159
Sure, but this is a help thread isn't it? I would just think that more help might be given besides "Read the rules"

I have already explained that this appears more to be a request-a-script thread (against the forum rules) than a 'help thread'. Several other competent folks who read the first post seem to agree with me, too.

Quote:

One has nothing to do with the other
The initial post in this thread was perceived as violating the rules quite similarly to the other posts you have closed and/or edited with the comment 'read the rules'. This thread would, should have been closed had not this other, valid discussion sprouted from it. Kaimetsu's post was as equally 'helpful' as your similar comments were.

Quote:

closing threads isn't done to help someone
I appreciate your attempt to convince me that something I did not say was not true. ;)

Quote:

this forum is
You're absolutely correct; this forum is for helping people. It is also for showing off NPCs you have created. It is also for general scripting discussion.

As Kaimetsu has already explained, posting full scripts to answer people's questions about scripting will not help them learn. Providing them with guidance, explanations, and examples of commands will. Spoonfeeding people a full script just doesn't help them.

Quote:

I would just like some people to be more helpful, or just not post. Back seat moderating isn't needed.
I do not consider such advice from Kaimetsu to be backseat moderating. After all, he has quite a bit of experience with these whole moderating, scripting, and moderating the scripting forum things. His counsel, known to be wise, is appreciated.

Andy0687 02-07-2005 07:25 AM

Quote:

Originally Posted by Evil_Trunks
..

I suppose you could take that as "Omg Stefan should not post his full code"
I said what my statement implyed was a rhetorical question, I will remember from now on to use my tags [rhetorical] and [/rhetorical] when no direct answer is needed.

However I still do not see how that says that I claimed Stefan broke forum rules, I think it was just taken out of context. If you wanted to pick at all my text for awhile, im sure you could come up with something like

Quote:

Originally Posted by Someone
Well, first you asked if Stefan should adhire to the rules of posting full code, but really he is just showing scripts he made, but then later you said the rc he posted was a requested code, so clearly you mean to say stefan is breaking the rules

I am not really concerned with how you try to bend it, I did not explicitly say that "Stefan broke NPC forum rules", nor should it have even been implied, thanks for trying though.

Edit:

Quote:

Originally Posted by ApothiX
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.

why? you just say your way is better and leave it at that?

Also I guess I seem to have missed your post where you said I should not have given a full script to someone who would like to learn, I ask again, why?
It seems like the most dominate way for a new person to learn, is by example, giving him a small example to work from seems like it would be ok, who are you to say he will just "copy+paste" the code and never look at it again.

Edit2:

Quote:

Originally Posted by Evil_Trunks
Since Stefan has posted these scripts/documents, according to you he is breaking the rules.

Are you aware of what a rhetorical question really is?
"according to you he is breaking the rules"
I ask again, please show me where I explicitly state this, and I will stop posting about it.

Evil_Trunks 02-07-2005 08:09 AM

Quote:

Originally Posted by Andy0687
However I still do not see how that says that I claimed Stefan broke forum rules

I'll break it down.

You said:
"Should Stefan also Adhire to the rules of not posting full scripts, and leave his documents and script to himself?"

You could rephrase your question like this:
"If Stefan followed the rules he would not post his scripts/documents."

That's the same as saying:
"If Stefan posted his scripts/documents he would be breaking the rules."

Since Stefan has posted these scripts/documents, according to you he is breaking the rules.

ApothiX 02-07-2005 10:32 PM

Quote:

Originally Posted by Andy0687
So your saying this weaponRC which he posted, contains no example of how to use gscript2 in an item, and by looking at it, it might not give you any hint as to how to do something you want.

That was not it's original intention, I'm sure. Perhaps some people utilized it in that way, but the main intention of posting it was so people wouldn't have to script their own.


Quote:

Originally Posted by Andy0687
How many times have you tried scripting the new RC?
On the other side of that coin, how many times have people asked "When will the scripted RC be done?"

Actually, the RC code is quite simple. I had a basic-functionality one scripted before Stefan posted this one. Next time you try to say it is impossible, perhaps you should look at the code first.


[EDIT] Didn't read the rest of the posts before I posted this, Evil_Trunks seems to have replied to the quote about Stefan breaking the rules already.[/EDIT]

Andy0687 02-07-2005 11:47 PM

Quote:

Originally Posted by ApothiX
That was not it's original intention, I'm sure. Perhaps some people utilized it in that way, but the main intention of posting it was so people wouldn't have to script their own.

So your saying he posted a full code, not to be a learning experince to people, but just so they would "copy+paste" the code onto their server, and forget about it? Hmm.

Quote:

Actually, the RC code is quite simple. I had a basic-functionality one scripted before Stefan posted this one.
There is a diffrence between basic-functionality and ready for use.

Quote:

Next time you try to say it is impossible, perhaps you should look at the code first.
I am almost convinced people like to make things up in order to continue an arugument longer then it should go, where did I say it was impossible to code that? I simply asked how many times you tried coding the whole thing.

Quote:

[EDIT] Didn't read the rest of the posts before I posted this, Evil_Trunks seems to have replied to the quote about Stefan breaking the rules already.[/EDIT]
Which brings me to the conclusion neither of you have any idea what a rhetorical question is, the issue didnt start as anything about stefan breaking forum rules or anything like that, but for some reason, a statement that was read much too deeply into, was pulled out.

I would like to sum it up diffrently incase you still do not get it, I was simply asking a question which didnt require any real kind of answer. The kid who started this thread needed some help, I gave him his help.

Mabye not many people start threads asking "Stefan help me plz!", but he still gives help, lets say this help were no longer given, people would be putting more effort into figuring something out that Stefan could have assisted them with. I was simply pointing out a diffrent way of looking at the situation, since in both instances, help is given via a code, be this code "Made to show off" or "Made to help" either offers assistance, and either can be copy+pasted just as quickly as the other.

I dont think copy+paste really cares about catagory.

ApothiX 02-08-2005 02:58 AM

Quote:

Originally Posted by Andy0687
So your saying he posted a full code, not to be a learning experince to people, but just so they would "copy+paste" the code onto their server, and forget about it? Hmm.

It is a required tool. Not everyone is expected to script one, and having one that Stefan scripted would prevent harmful bugs from coming alive.

Quote:

Originally Posted by Andy0687
There is a diffrence between basic-functionality and ready for use.

Not really. Something can be a basic version, and you can still use it. When I said basic version, I meant it didn't have some of the fancy features Stefan's had, like the icons for the filebrowser, etc. I still had basic features that would allow me to use the RC efficiently (NPC Editor/FileBrowser/RC Chat)


Quote:

Originally Posted by Andy0687
I am almost convinced people like to make things up in order to continue an arugument longer then it should go, where did I say it was impossible to code that? I simply asked how many times you tried coding the whole thing.

And by that, it is safe to assume that you meant that I could not do it. Therefor rendering it impossible to me.


Quote:

Originally Posted by Andy0687
Which brings me to the conclusion neither of you have any idea what a rhetorical question is, the issue didnt start as anything about stefan breaking forum rules or anything like that, but for some reason, a statement that was read much too deeply into, was pulled out.

So, you can reply to one post seriously, then when you realise you are contradicting yourself with your own words, you can call it a rhetorical question?

Quote:

Originally Posted by Andy0687
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.

I think by that phrase, you deminished any rehetoric that that question you posed had.

Projectshifter 02-08-2005 04:07 AM

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

jas988 02-17-2005 02:45 AM

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.


All times are GMT +2. The time now is 06:53 PM.

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