Graal Forums

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

lordhelmut 02-21-2002 03:44 AM

Bank Menu
 
I am making a small menu for the playerhouse system on my server to store money in. The way it works is each tenant has a room and there account is kept in a server string. I am making it so that if they enter there room they can use a little menu to deposit, withdrawl or view balance.

I am just gonna use a regular say or say2 to do it. Show I make something where i have 3 different menus like...


-->Deposit
Withdrawl
Balance

Deposit
-->Withdrawl
Balance

Deposit
Withdrawl
-->Balance

and it replaces as they move down?

nyghtGT 02-21-2002 04:02 AM

well, maybe you can just use say2 and then have it disabledefmovement, then use keydown to move an arrow up and down the say2 box then if a position is pressed it says2 again to open and new window and so forth ...

TDK_RC6 02-21-2002 04:14 AM

if (keydown(2)&&playerendsreading) {
say2 blah blah;
}
if (keydown(0)&&playerendsreading) {
say2 blah blah;
}

thats the basics of it, you need to add syntax to it, so it will show the right choose or whatever

lordhelmut 02-21-2002 04:18 AM

thank you guys :)

nyghtGT 02-21-2002 04:23 AM

is my sig not working ?

TDK_RC6 02-21-2002 04:45 AM

Quote:

Originally posted by nyghtGT
is my sig not working ?
not for me

btedji 02-21-2002 05:01 AM

While you COULD use say2, its not the best way to go about making menus, a better way for example would be to use showimg

lordhelmut 02-21-2002 07:03 AM

Quote:

Originally posted by btedji
While you COULD use say2, its not the best way to go about making menus, a better way for example would be to use showimg
Showimg is ok but its kinda ugly without a nice background

neomaximus2k 02-21-2002 07:47 AM

Quote:

Originally posted by lordhelmut


Showimg is ok but its kinda ugly without a nice background

Yes but it is a lot better than the SAY2 command,

Plus it will look as if the person is actually moveing the arrow rather than a text box

lordhelmut 02-21-2002 08:05 AM

// NPC made by Golem
if (playertouchsme) {
this.pos=0;
disabledefmovement;
setani idle,;
timeout=.05;
}
if(timeout&&this.pos=0){
showimg 200,@Arial@cb@->Deposit,(screenwidth/2),(screenheight/2-120);
showimg 201,@Arial@cb@Withdrawl,(screenwidth/2),(screenheight/2-100);
showimg 202,@Arial@cb@Balance,(screenwidth/2),(screenheight/2-80);
changeimgvis 200,4;
changeimgvis 201,4;
changeimgvis 202,4;
timeout=.05;
}
if(timeout){
if(keydown(2)&&this.pos=0){
this.pos=1;
showimg 200,@Arial@cb@Deposit,(screenwidth/2),(screenheight/2-120);
showimg 201,@Arial@cb@->Withdrawl,(screenwidth/2),(screenheight/2-100);
showimg 202,@Arial@cb@Balance,(screenwidth/2),(screenheight/2-80);
changeimgvis 200,4;
changeimgvis 201,4;
changeimgvis 202,4;
timeout=.05;
}
if(keydown(2)&&this.pos=1){
this.pos=2;
showimg 200,@Arial@cb@Deposit,(screenwidth/2),(screenheight/2-120);
showimg 201,@Arial@cb@Withdrawl,(screenwidth/2),(screenheight/2-100);
showimg 202,@Arial@cb@->Balance,(screenwidth/2),(screenheight/2-80);
changeimgvis 200,4;
changeimgvis 201,4;
changeimgvis 202,4;
}
if(keydown(2)&&this.pos=2){
this.pos=0;
}
timeout=.05;
}

lordhelmut 02-21-2002 08:07 AM

that no work right so far =(

Sennema 02-21-2002 08:51 AM

Quote:

Originally posted by lordhelmut


Showimg is ok but its kinda ugly without a nice background

Use showimg, but for the background use the letters.png and use changeimgpart to show the background of the letters (parchment junk), and then use showimg for a cursor as well. Or if you don't wanna do that, you might be able to use say2, disabledefmovement, then use showimg for a cursor that scrolls, tests position and checks the keydown and junk.

I'd use the first method, personally.

Python523 02-21-2002 09:02 AM

Quote:

Originally posted by lordhelmut
// NPC made by Golem
ext

= means an assignment
== means equals

Faheria_GP2 02-21-2002 09:34 AM

that isn't true in graalscript, only in c (and variations of C)

Python523 02-21-2002 09:42 AM

Quote:

Originally posted by Faheria_GP2
that isn't true in graalscript, only in c (and variations of C)
Quote:

From the commands.rcf

== equals
= assigment


Slaktmaster 02-21-2002 01:48 PM

Helmut, PM me and I'll make a showimg based menu for you.

Saga2001 02-21-2002 11:24 PM

Helmut, you confuse me. You can very easily make the hunting menu I made into a bank script... If you pm me or im me I can just give you a bank script...

Saga2001 02-22-2002 12:48 AM

Quote:

Originally posted by Kaimetsu


It doesn't make a difference in GScript, but it's still good practise to script 'correctly'. After all, it's possible that the change will be made when the new script engine is released.

Is there a date to go with the name, or an estimated date? (New scripting engine.)

Saga2001 02-22-2002 01:02 AM

Quote:

Originally posted by Kaimetsu


Probably, though not one that I know. I'd love to get one, though, cos I'm putting off working on the 3D thing until I can use function arguments and return values etc.

ouch, lets riot for a date.

Falcor 02-22-2002 01:58 AM

Expect the worst and hope for the best.

I expect sometime next year but im hopeing sometime before school lets out in june.

Faheria_GP2 02-22-2002 06:08 AM

blegh, let stefan work at his own pace...whenever he rushes things they become crap :o

Dustey 02-22-2002 07:47 AM

Quote:

Originally posted by Faheria_GP2
blegh, let stefan work at his own pace...whenever he rushes things they become crap :o
U r so right:D

lordhelmut 02-24-2002 12:45 AM

thanks guys but im making this so I can learn. Its not a real bank, its like for the playerhouses. Each person has a small chest in there room that will allow them to store money and im making a little menu for it. I just cant get the selector right :(

neomaximus2k 02-24-2002 07:42 AM

Quote:

Originally posted by lordhelmut
thanks guys but im making this so I can learn. Its not a real bank, its like for the playerhouses. Each person has a small chest in there room that will allow them to store money and im making a little menu for it. I just cant get the selector right :(
Well if you send me the lvl i can easily script you one, but where do you want the image to be displayed?


All times are GMT +2. The time now is 02:32 PM.

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