Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-26-2002, 03:33 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Scrolling?

I am working on a bank menu and it uses showimg (Shrimp helped me make it nice). Im wondering how to use showimg so that u can hold left or right and scroll between 0 and playerrupees. So like it would show:

How much to Deposit:
>0
Done

And you hold left or right and it adds 1. Im trying to think of how to do this and then for Withdrawl


How much to Withdrawl:
>0
Done

and it scrolls between max money they have deposited and 0
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #2  
Old 02-26-2002, 03:52 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
// NPC made by Stalin
if (playerenters) {
message Deposit;
setstring playerdeposit,0;
}
if (playertouchsme) {
disabledefmovement;
setani idle,;
showimg 510,@Arial@b@ENTER THE AMOUNT TO DEPOSIT,(screenwidth/2)-80,(screenheight/2-120);
showimg 511,@Arial@>#v(#s(playerdeposit)),(screenwidth/2)-80,(screenheight/2-100);
showimg 512,@Arial@Done,(screenwidth/2)-80,(screenheight/2-80);
changeimgvis 510,4;
changeimgvis 511,4;
changeimgvis 512,4;
timeout=.05;
}
if(timeout){
if(keydown(3)&&strtofloat(#s(playerdeposit))<playe rrupees){
setstring playerdeposit,#v(strtofloat(#s(playerdeposit))+1);
showimg 511,@Arial@b@>#v(#s(playerdeposit)),(screenwidth/2)-80,(screenheight/2-100);
timeout=.05;
}
if(keydown(2)){
showimg 511,@Arial@b@#v(#s(playerdeposit)),(screenwidth/2)-80,(screenheight/2-100);
showimg 512,@Arial@b@>Done,(screenwidth/2)-80,(screenheight/2-80);
timeout=.05;
}
timeout=.05;
}

I tried but it no worked =(
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #3  
Old 02-26-2002, 08:12 AM
Lomgren Lomgren is offline
Senior Member, Anti-Spam
Join Date: Mar 2001
Location: Missouri
Posts: 196
Lomgren will become famous soon enough
Here is what I noticed,

- left is keydown(1)
- the first showimgs dont have all the bicus in them
- you only need to set the timeout once, at the end before you
end the if
- showimgs in timeout, see above
- change
NPC Code:
showimg 511,@Arial@b@>#v(#s(playerdeposit)),(screenwidth/2)-80,(screenheight/2-100); 


into
NPC Code:
showimg 511,@Arial@b@>#v(strtofloat(#s(playerdeposit))),(screenwidth/2)-80,(screenheight/2-100); 



Other than that I don't see anything wrong
__________________
Lomgren - devoted to classic, even though I may be gone for months on end
Reply With Quote
  #4  
Old 02-26-2002, 11:12 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
I know this isn't scripting related, but, Lomgren where in Missouri do you live?
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #5  
Old 03-01-2002, 03:48 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
for some reason if I hit a key it disappears
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #6  
Old 03-01-2002, 04:39 AM
Lomgren Lomgren is offline
Senior Member, Anti-Spam
Join Date: Mar 2001
Location: Missouri
Posts: 196
Lomgren will become famous soon enough
I think my graal is messed up, alot of scripts aren't working when they should... I live in Jefferson Count, hyuh
__________________
Lomgren - devoted to classic, even though I may be gone for months on end
Reply With Quote
  #7  
Old 03-01-2002, 05:45 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Lomgren
Senior Member, Anti-Spam

how did u get that?
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #8  
Old 03-01-2002, 05:47 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by Saga2001
Lomgren
Senior Member, Anti-Spam

how did u get that?
someone is making em for people cause Loriel had one a while back that said Guest ...

edit:
*i think*
Reply With Quote
  #9  
Old 03-01-2002, 08:07 AM
Phenom1K Phenom1K is offline
Registered User
Join Date: Dec 2001
Location: Somewhereoffthecoastof, Paradise
Posts: 138
Phenom1K is on a distinguished road
Send a message via AIM to Phenom1K Send a message via Yahoo to Phenom1K
Index it, then save it. Then just use the key functions to go back and forth between 1 and variablehere. When it reaches the end and the player presses the forward button again, just rewind all the way back to 1 yo.
__________________
The following is a message brought to you in part by JR

The procedding was a message brought to you in part by JR
Reply With Quote
  #10  
Old 03-01-2002, 08:41 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
he joined in March, when you could set status without having 1000 posts
Reply With Quote
  #11  
Old 03-01-2002, 09:27 AM
Lomgren Lomgren is offline
Senior Member, Anti-Spam
Join Date: Mar 2001
Location: Missouri
Posts: 196
Lomgren will become famous soon enough
*Note* read the first part of my sig, I am not really Lomgren...
__________________
Lomgren - devoted to classic, even though I may be gone for months on end
Reply With Quote
  #12  
Old 03-01-2002, 02:05 PM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
This works:

// NPC made by Stalin
if (playerenters) {
message Deposit;
}
if (playertouchsme) {
playerdeposit=0;
disabledefmovement;
showimg 510,@Arial@b@ENTER THE AMOUNT TO DEPOSIT,(screenwidth/2)-80,(screenheight/2-120);
showimg 511,@Arial@>#v(playerdeposit),(screenwidth/2)-80,(screenheight/2-100);
showimg 512,@Arial@Done,(screenwidth/2)-80,(screenheight/2-80);
this.mode=1;
this.mode4=0;
this.mode2=1;
timeout=.05;
}

if(timeout && this.mode==1 && this.mode4==0){
setani idle,;
if(this.mode2==1){
showimg 511,@Arial@>#v(playerdeposit),(screenwidth/2)-80,(screenheight/2-100);
}else{
showimg 511,@Arial@#v(playerdeposit),(screenwidth/2)-80,(screenheight/2-100);
}

if(this.mode2==2){
showimg 512,@Arial@>Done,(screenwidth/2)-80,(screenheight/2-80);
}else{
showimg 512,@Arial@Done,(screenwidth/2)-80,(screenheight/2-80);
}

changeimgvis 510,4;
changeimgvis 511,4;
changeimgvis 512,4;

if(keydown(0)){
this.mode2=1;
this.mode3=1;
timeout=.05;
}
if(keydown(2)){
this.mode2=2;
this.mode3=0;
timeout=.05;
}
if(keydown(3) && playerdeposit<playerrupees && this.mode3==1){
playerdeposit+=1;
timeout=.05;
}
if(keydown(1) && playerdeposit>0 && this.mode3==1){
playerdeposit-=1;
timeout=.05;
}
if (keydown(4) && this.mode2==2) {
enabledefmovement;
hideimg 510;
hideimg 511;
hideimg 512;
this.mode4=1;
}
timeout=.05;
}
Reply With Quote
  #13  
Old 03-02-2002, 07:09 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
I wasnt really looking to have it all made for me but thanks man. No one else would help and you did =D
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #14  
Old 03-02-2002, 07:45 AM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
No problem. I was bored cause i cant connect to graal.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:21 AM.


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