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 05-13-2003, 04:54 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
Question help please

I know this is probably a really easy script for you scripters...but I'm not a scripter, so I would appreciate any help

How do you script an npc to give you a prize if you touch it within a certain amount of time?

Example: lets say you have to hammer down a whole bunch of stakes in say 30 seconds, then touch the npc at the end, or even do a variety of stuff, like move rocks, bushes, hammer stakes, and so on....how do I get the npc person to give the prize if done in that 30 seconds?

Or even better....get a chest to open with the prize in it when touched within that time
__________________
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
  #2  
Old 05-13-2003, 05:33 PM
Soul-Blade Soul-Blade is offline
US Marine
Soul-Blade's Avatar
Join Date: Jul 2001
Location: Coeur d'Alene, ID
Posts: 945
Soul-Blade is an unknown quantity at this point
Send a message via AIM to Soul-Blade
That is a rather simple script...doesn't N-Pulse have any Scripters? Even the lowest of scripters could script that (not to be taken offensively).
Reply With Quote
  #3  
Old 05-13-2003, 08:48 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by Soul-Blade
not to be taken offensively
Then why say it?
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #4  
Old 05-13-2003, 11:18 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 Soul-Blade
That is a rather simple script...doesn't N-Pulse have any Scripters? Even the lowest of scripters could script that (not to be taken offensively).
If I had scripters, I wouldnt be asking this question in here...I dont like looking stupid, but when it comes to scripting, I am pretty much illiterate....I know the basics, and can fix simple scripts, but what seems simple to a scripter isnt so simple to someone who doesnt script. Actually, I fail to see the purpose of your post

Kai, I'm not looking for something that complicated...I have seen it done on classic I think years ago, where you had to remove all the signs and get to the end of the path within a certain about of time, and I doubt it was done the way you discribed.

I am looking for a simple way of doing it for someone who doesnt do alot of scripting
__________________
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
  #5  
Old 05-14-2003, 12:10 AM
Chicken_l33t Chicken_l33t is offline
Banned
Join Date: Sep 2002
Location: NewZealand
Posts: 467
Chicken_l33t is on a distinguished road
You could set a this.var to 0
then a timeout = 0.05;

then basicly if (timeout)
{
this.var++;
if (playertouchsme)
{
if (this.var <= 30){//Give prize stuff here;}
else {say2 Haha, you lucked out;}
}
timeout = 1;
}

So basicly all that would do is set a timeout to increase and the variable will increase with the timeout (timeout is gonna go up every 1 second) then if the player touchs the NPC while it's bellow 30seconds they get the prize (Obviously I didn't add the prize in becasue I dunno what it is) and if that didn't reach it in the 30seconds it says "Haha, you lucked out".

I dunno if that's posting a full script cause it probally doesnt work I just skimmed through it to show you an outline.
Reply With Quote
  #6  
Old 05-14-2003, 12:43 AM
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 Chicken_l33t
You could set a this.var to 0
then a timeout = 0.05;

then basicly if (timeout)
{
this.var++;
if (playertouchsme)
{
if (this.var <= 30){//Give prize stuff here;}
else {say2 Haha, you lucked out;}
}
timeout = 1;
}

So basicly all that would do is set a timeout to increase and the variable will increase with the timeout (timeout is gonna go up every 1 second) then if the player touchs the NPC while it's bellow 30seconds they get the prize (Obviously I didn't add the prize in becasue I dunno what it is) and if that didn't reach it in the 30seconds it says "Haha, you lucked out".

I dunno if that's posting a full script cause it probally doesnt work I just skimmed through it to show you an outline.
Well, it gives me a starting point anyway, if it isnt all there...thnaks a bunch
__________________
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 05-14-2003, 06:06 AM
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
Kai, it doesnt matter what I want...it matters what I can do, and I cant do complicated scripts ....nevermind, someone is helping me anyway
__________________
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
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 01:27 PM.


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