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: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
  #8  
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
  #9  
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
  #10  
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
  #11  
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
  #12  
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
  #13  
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
  #14  
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
  #15  
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
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:17 PM.


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