Graal Forums

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

happyme 03-05-2002 06:58 AM

:(
 
i had lordhel.'s bank menu as a tamplet... it jumps to the 3d one... some please help ma
NPC Code:

// NPC made
if (playerchats&&strequals(#c,ok)) {
this.position=0;
setani idle,;
timeout=.05;
disabledefmovement;
setplayerprop #c, ;
showimg 500,od-pickaxemenu.gif,(screenwidth/2)-(283/2),(screenheight/2)-(335/2);
changeimgvis 500,4;
}

if(timeout&&this.position=0){
showimg 501,@verdama@b@Collection,(screenwidth/2)-(255/2)-1,(screenheight/2)-(180/2)-1;
changeimgvis 501,4;
changeimgzoom 501,.8;

showimg 502,@verdama@@-->Gold,(screenwidth/2)-(255/2)-1,(screenheight/2)-(150/2)-1;
changeimgvis 502,4;
changeimgzoom 502,.8;

showimg 503,@verdama@@Ore,(screenwidth/2)-(255/2)-1,(screenheight/2)-(120/2)-1;
changeimgvis 503,4;
changeimgzoom 503,.8;

showimg 504,@verdama@@Copper,(screenwidth/2)-(255/2)-1,(screenheight/2)-(90/2)-1;
changeimgvis 504,4;
changeimgzoom 504,.8;

showimg 505,@verdama@@Ruby,(screenwidth/2)-(255/2)-1,(screenheight/2)-(60/2)-1;
changeimgvis 505,4;
changeimgzoom 505,.8;

showimg 506,@verdama@@Blue Gem,(screenwidth/2)-(255/2)-1,(screenheight/2)-(30/2)-1;
changeimgvis 506,4;
changeimgzoom 506,.8;
timeout=.05;
}

if(timeout){
if(keydown(2)&&this.position=0){
this.position=1;
showimg 501,@verdama@b@Collection,(screenwidth/2)-(255/2)-1,(screenheight/2)-(180/2)-1;
changeimgvis 501,4;
changeimgzoom 501,.8;

showimg 502,@verdama@@Gold,(screenwidth/2)-(255/2)-1,(screenheight/2)-(150/2)-1;
changeimgvis 502,4;
changeimgzoom 502,.8;

showimg 503,@verdama@@-->Ore,(screenwidth/2)-(255/2)-1,(screenheight/2)-(120/2)-1;
changeimgvis 503,4;
changeimgzoom 503,.8;

showimg 504,@verdama@@Copper,(screenwidth/2)-(255/2)-1,(screenheight/2)-(90/2)-1;
changeimgvis 504,4;
changeimgzoom 504,.8;

showimg 505,@verdama@@Ruby,(screenwidth/2)-(255/2)-1,(screenheight/2)-(60/2)-1;
changeimgvis 505,4;
changeimgzoom 505,.8;

showimg 506,@verdama@@Blue Gem,(screenwidth/2)-(255/2)-1,(screenheight/2)-(30/2)-1;
changeimgvis 506,4;
changeimgzoom 506,.8;
timeout=.05;
}
}

if(timeout){
if(keydown(2)&&this.position=1){
this.position=1;
showimg 501,@verdama@b@Collection,(screenwidth/2)-(255/2)-1,(screenheight/2)-(180/2)-1;
changeimgvis 501,4;
changeimgzoom 501,.8;

showimg 502,@verdama@@Gold,(screenwidth/2)-(255/2)-1,(screenheight/2)-(150/2)-1;
changeimgvis 502,4;
changeimgzoom 502,.8;

showimg 503,@verdama@@Ore,(screenwidth/2)-(255/2)-1,(screenheight/2)-(120/2)-1;
changeimgvis 503,4;
changeimgzoom 503,.8;

showimg 504,@verdama@@-->Copper,(screenwidth/2)-(255/2)-1,(screenheight/2)-(90/2)-1;
changeimgvis 504,4;
changeimgzoom 504,.8;

showimg 505,@verdama@@Ruby,(screenwidth/2)-(255/2)-1,(screenheight/2)-(60/2)-1;
changeimgvis 505,4;
changeimgzoom 505,.8;

showimg 506,@verdama@@Blue Gem,(screenwidth/2)-(255/2)-1,(screenheight/2)-(30/2)-1;
changeimgvis 506,4;
changeimgzoom 506,.8;
}
timeout=.05;
}


Python523 03-05-2002 08:00 AM

use a sleep after the keydown

lordhelmut 03-05-2002 08:46 AM

I redid it and now it works great

Saga2001 03-05-2002 09:27 AM

Ummmm...
Hppyyou.....read the guidelines. ;)

happyme 03-05-2002 10:07 AM

oh
 
why did i do suffin wrong x.x?
and lord helm. any way you can tell me how to do it?

Saga2001 03-05-2002 11:47 PM

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: oh
 
Quote:

Originally posted by Kaimetsu
If you have a script that doesn't work, find out WHERE it doesn't work before you post it. Cut out chunks and see if the error still occurs. Try to get it as small as possible to eliminate places where the bug could be, so we have to read less. Understand?
Yay! Tell him kai!
Also I think python was right about the keydown, next time don't post the ENTIRE script. ;)

Quote:

Originally posted by Happyme
// NPC made by Stefan Knorr is a Money Grabbing *****!!

:( Poor stefan

happyme 03-07-2002 09:59 AM

AHHHH
 
ANYONE WANNA HELP? :(

Python523 03-07-2002 10:01 AM

*sigh*
in the part where the script increases(sp?) the var do this:
if (timeout&&keydown(#))
{
sleep .1;
whatever++;
}

happyme 03-07-2002 10:33 AM

eh
 
works but it does to the 2nd one but doesnt stop it goes to the 3 x.x

Saga2001 03-08-2002 12:54 AM

Quote:

Originally posted by Kaimetsu
Look, stop this. The problem is infinitely simple, if you wanna solve it then become a scripter. Otherwise don't deal with scripts.
Man how could anyone think were their scripting ****s, I feel abused, we should go on strike and not post in scripting for a day! :p. Hahahaha no, I couldn't stay away...:(

happyme 03-08-2002 04:56 AM

...
 
i tried like 15 million times...

neomaximus2k 03-08-2002 03:12 PM

Re: Re: ...
 
Quote:

Originally posted by Kaimetsu


Proof enough that this is out of your league. Try working on some easier stuff to develop your skills first, learn to walk before you try to run.

learn to fall before you can fly

Saga2001 03-08-2002 10:24 PM

Re: Re: Re: Re: ...
 
Quote:

Originally posted by Kaimetsu


I would think that suicidal.

Sounds like it...
Yes learn to fly, my wings are pretty. *smiles*

neomaximus2k 03-08-2002 11:42 PM

Re: Re: Re: Re: ...
 
Quote:

Originally posted by Kaimetsu


I would think that suicidal.

not if you have a rubber hat you would bounce abck up and then try and fly
*i live in a strange weird world.... called graal online*

happyme 03-09-2002 11:59 AM

thxs ne way
 
okay im so happy i fixxed it muahaha PHHHH!!!!!


All times are GMT +2. The time now is 02:46 AM.

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