Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.0] Book system?


Craselin
 Share

Recommended Posts

Hey everyone,
I was wondering if someone could run through for me what i would have to do to create a book system. Here is what I mean

-Player steps on book tile which is at the table or whatever(or mabye uses book item, i haven't decided)
-The window pops up with gui something along the lines of this http://img22.imageshack.us/img22/6051/emptym.jpg but depending on which book they are reading the text is called from the SERVER and onto the pages.
-The player can click on side of the book to turn to the next page and the other side to turn to the previous

Any help would be highly appreciated
Kind regards,
Craselin
Link to comment
Share on other sites

>! try using .ini's and have it set up something like
[PAGES]
1="once upon a time"
2="there was a book!"
>! and have the book script be one page auto then do
Dim pages as Int or whatever
if ReadFromIni("book1"," pages", (pages + 1)) <> ""
then have it turn the page and display the text  :)  if you can understand then i hope it helps if not pm me and  ill try to help more
Link to comment
Share on other sites

@Scythe:

> >! try using .ini's and have it set up something like
> [PAGES]
> 1="once upon a time"
> 2="there was a book!"
> >! and have the book script be one page auto then do
> Dim pages as Int or whatever
> if ReadFromIni("book1"," pages", (pages + 1)) <> ""
> then have it turn the page and display the text  :)  if you can understand then i hope it helps if not pm me and  ill try to help more

No. Do not use .ini's.

OP: set up another Rec BookRec, check how NpcRec is loaded, mimic that. In BookRec have Page1 As String * 200, Page2 As String * 200, etc. (* 200 means 200 characters long.) Look how to Save and Read from BookRec, look how a player's level is retrieved, do that, then display it in a form.
Link to comment
Share on other sites

i know how bad they are i just like using them it reminds me of my very first script… which was a bad A  CTF script using .ini's if he still remembers ask greendude i made it for him and he liked it NBD  :)
Link to comment
Share on other sites

@Scythe:

> i know how bad they are i just like using them it reminds me of my very first script… which was a bad A  CTF script using .ini's if he still remembers ask greendude i made it for him and he liked it NBD  :)

Using systems just because you used them before? You really make my head hurt.

@Helladen:

> I was like that until I learned how bad they were.

They're not _bad_. If they were bad no one would use them. They have a very important use. Although not the standard any more, XML is the exact same thing.

The way the old engines used them is bad. Constantly thrashing the harddrive _every loop_ with constant PutVar/GetVar calls… Eurgh.

Personally I still use them for several different systems. You have to make sure you simply don't constantly call them, _especially_ not in a loop like all the old scripting systems did.

Just pull the data in to a UDT, access the data from that, then save it all again to the file when you're done with it and it needs to be saved.

It's no different from the binary systems I use. It just trades in speed and size for accessibility.
Link to comment
Share on other sites

well the way i use them makes it ok they are not included in any loops and are only called when needed then there gone so it does not interferer with performance or anything like that in any horrible degree and of course i use them cuz im familiar with them it is the same logic that when im making a random program which i some times do i use vb6 instead of a newer "better" version
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...