Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   help please (https://forums.graalonline.com/forums/showthread.php?t=44903)

Darlene159 05-13-2003 04:54 PM

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

Soul-Blade 05-13-2003 05:33 PM

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

Dach 05-13-2003 08:48 PM

Quote:

Originally posted by Soul-Blade
not to be taken offensively
Then why say it?

Darlene159 05-13-2003 11:18 PM

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

Chicken_l33t 05-14-2003 12:10 AM

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.

Darlene159 05-14-2003 12:43 AM

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

Darlene159 05-14-2003 06:06 AM

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


All times are GMT +2. The time now is 09:22 AM.

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