Craselin Posted April 29, 2011 Author Share Posted April 29, 2011 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 previousAny help would be highly appreciatedKind regards,Craselin Link to comment Share on other sites More sharing options...
Scythe Posted April 30, 2011 Share Posted April 30, 2011 >! 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 doDim pages as Int or whateverif 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 More sharing options...
Ruins of Hell Posted April 30, 2011 Share Posted April 30, 2011 @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 moreNo. 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 More sharing options...
erkro1 Posted April 30, 2011 Share Posted April 30, 2011 @Soul:> In BookRec have Page1 As String * 200, Page2 As String * 200, etc. (* 200 means 200 characters long.)No, use this :Page(1 To MAX_PAGES) As String * 300And add MAX_PAGES to modConstants. Link to comment Share on other sites More sharing options...
Scythe Posted May 1, 2011 Share Posted May 1, 2011 but i love .ini's… they are so easy and useful :sad: Link to comment Share on other sites More sharing options...
erkro1 Posted May 1, 2011 Share Posted May 1, 2011 @Scythe:> but i love .ini's… they are so easy and useful :sad:.ini's are so EE :P Link to comment Share on other sites More sharing options...
Helladen Posted May 1, 2011 Share Posted May 1, 2011 @Scythe:> but i love .ini's… they are so easy and useful :sad:Your just used to XtremeWorlds. :PI was like that until I learned how bad they were. Link to comment Share on other sites More sharing options...
Scythe Posted May 1, 2011 Share Posted May 1, 2011 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 More sharing options...
Robin Posted May 1, 2011 Share Posted May 1, 2011 @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 More sharing options...
Scythe Posted May 1, 2011 Share Posted May 1, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now