Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-28-2002, 06:32 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
Read from file....

-=Josey=-
It would be nice to have a function that would read text from a file (not like an npc). Something like:

NPC Code:

if (playertouchsme){
say2 filenamehere,toplinetostartwith,bottomlinetoendwit h;
}


It would be nice to have a function like this. Almost every programming engine has one. Like VB's:

NPC Code:

Private Sub Label_Click()
text1.text = app.Path & "/textfilhere.txt"
End Sub


This would be really handy. Just a suggestion though.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #2  
Old 02-28-2002, 08:19 PM
Cybnext_Design Cybnext_Design is offline
Registered User
Join Date: Jun 2001
Posts: 244
Cybnext_Design is on a distinguished road
Send a message via AIM to Cybnext_Design
Re: Read from file....

Quote:
Originally posted by joseyisleet
-=Josey=-
It would be nice to have a function that would read text from a file (not like an npc). Something like:

NPC Code:

if (playertouchsme){
say2 filenamehere,toplinetostartwith,bottomlinetoendwit h;
}


It would be nice to have a function like this. Almost every programming engine has one. Like VB's:

NPC Code:

Private Sub Label_Click()
text1.text = app.Path & "/textfilhere.txt"
End Sub


This would be really handy. Just a suggestion though.
I believe this is being implemented in the new version. And will be:

NPC Code:

say2 #txt(<textfilename>);

__________________
Graal2001 NPC Maker
Frolic Owner
Aim: C Y B N E X T
Reply With Quote
  #3  
Old 02-28-2002, 09:04 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Thumbs up yap

and IT would be nice if we could use "resourcestring" like the translations that Stefan made.
Reply With Quote
  #4  
Old 02-28-2002, 09:04 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Yay! I've been thinking about that for a few weeks now, finally decided to post it. It'll be great for some new NPCs.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #5  
Old 03-01-2002, 01:09 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
Quote:
Originally posted by joseyisleet
-=Josey=-
Yay! I've been thinking about that for a few weeks now, finally decided to post it. It'll be great for some new NPCs.
it would be really cool to be able to do like file read and output from there...and move the cursor in the file...but that would take a lot of coding...
__________________

!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
  #6  
Old 03-01-2002, 09:46 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Wouldn't using a txt file for a sign be as laggy as putnpc?
Reply With Quote
  #7  
Old 03-01-2002, 09:57 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
I think all signs should use pictographs, Mario Style, to instantly convey the information in all languages.

Barring that (hee hee), add a number to each sign indicating language. Default = Server language (if there is no language number), otherwise like 0=English, 1=French, 2=German, 3=Spanish, 4=Japanese (wow, that'd be hard...), etc. Then when making your levels, the Sign Editor defaults to your language, if you have someone to add the signs in other languages they can add Sign1-French: "Voulez-vous le nachos, dammit?" or whatever.
Touching a sign brings up the sign in your language. If it doesn't have an entry in your language, it brings up the sign in the server's default language. Say would act just like touching a sign, say2 would only work for the server default language, say3 language,text; would override it (if you encounter say3 and the language matches, skip the next say2 if it follows immediately/only seperated by other say3s)

Virtually useless on Classic though - I'd have to have someone redo every sign in every level...'cuz I sure ain't doin' it...maybe after I retire...could be good on multilingual servers though.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #8  
Old 03-03-2002, 07:53 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Smile

Or using like Delphi for ALL the strings,integers,flags,arrays....

if (playerenters){this.flag.LoadFromFile('\texts\a.tx t');}

or setstring flag,LoadFromFile('name.txt');

and to save:

flag.SaveToFile('name.txt');

Graal uses ShortStrings, so the txt file cant be bigger than 256bytes
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 11:29 PM.


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