|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
RunUO Forum Moderator
|
30/01/2005 updated acording to post #25
After a lot of problems I started to write a tool that can export a book from uo to a script. This will make all the rp players out there write their stories and all you admins will be able to make a script out of it in a second or less You can use it with: [csbook and clicking the book you want to turn into a script. It'll make a file called Book#.cs in your runuo root folder (where you have your crash reports). The # will increase with each book you export. Please don't remove the credits from the code, however feel free to add your name if you enhance it. I'm soooooo happy to be the first script poster for runuo 1.0.0
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
#2 (permalink) | |
|
Forum Expert
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
|
Quote:
Damn attachments! I was SOOOO gona be the first! |
|
|
|
|
|
#3 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
don't worry you'll be the second ![]() |
|
|
|
|
|
#8 (permalink) |
|
Join Date: Dec 2003
Posts: 1,069
|
Hey, daat. Dont u think this would be better if it took the title of the book for the class/constructable instead of book#? I think that with a lot of rp shards they will have so many books that it will be very hard to keep track of them by number. or maybe just have it do by book# if the title is null or is 'title'... Also, you would need to have a feature that would check to see if that book already exists and ask them if they want to write over it.
Just a thought
__________________
HI! |
|
|
|
|
#14 (permalink) |
|
Hax Your Face.
Join Date: Jun 2004
Age: 21
Posts: 820
|
First time I've been able to say this in a while, but this is just a great idea... One of those "How didn't I think of it..." things. Haha.
It'd be superb if a player could invoke the command and have it export a file to the user's computer, but to be honest I'm not sure how to go about writing a file to a non-local computer via the server. |
|
|
|
|
#16 (permalink) | |
|
Join Date: Dec 2003
Posts: 1,069
|
Quote:
Ok so what you want to do is something like this: Code:
string writetitle = "";
foreach ( char p in ((BaseBook)targ).Title ) // a string is just an array of chars.
{
if ( Char.IsDigit(p) ) // Will accept numbers in the class name.
{
if ( writetitle != "" ) // As long as the first char in the class is not a number.
{
writetitle += p; // Add this char to the title.
}
}
if ( Char.IsLetter(p) ) // Will accept letters in the class name.
{
writetitle += p; // Add this char to the title.
}
}
if ( writetitle == "" )
{
writetitle = String.Format( "Book{0}", bookamount );
}
__________________
HI! |
|
|
|
|
|
#20 (permalink) |
|
I supose just by looking at it, that this script will make what you are trying to Daat, see, its nothing but an engine that put everything together. I was thinking that was not so bad instead of removing the spaces, but make then into "_" underline, got it? that way the tittle istills understandable, if you remove the spaces, it will become like german hehehehehe.
Or, make the first Char of a word Big, like "TestBookForTheCode" got it? I think it will be better. And What you guys will do when the title is read up again to the "book" item? It will come up with that title mix up? Sorry to ask, I haven't download the code yet. ![]() |
|
|
|
|
|
#21 (permalink) |
|
OK, I was thinking and I wanna know if its possible, but I dont like the idea of restart the shard every time i make a book you know? So, I was thinking if its possible to make this system to work with a XML file, you know? Than you say "add book" and a Gump will show up and list the contects of that XML, sorting by title, I don't know, and than make the book set its properties with the contents. That way it will not be necessary to restart the how shard again and loose a lot of configurations that cant be saved and all.
Do you guys think this is possible? its sounds like easy to me, but I know its not. ![]() |
|
|
|
|
|
#22 (permalink) |
|
RunUO Forum Moderator
|
It sounds easy to me too I just have no idea how to do xml files
![]()
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
#23 (permalink) |
|
P3'c Orion Aviator
Join Date: Sep 2004
Age: 30
Posts: 1,272
|
take a look at aryas DialogNPC to see how it reads/writes from the XML files, it also has a nice way of finding all XML files in a dirrectory and showing them in game for you to select, that code should give you everything you need to know,
|
|
|
|
|
#24 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
![]()
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
|
#25 (permalink) |
|
RunUO Forum Moderator
|
Updated csbook.cs to make the file and class name like the title, it'll accept only numbers and letters tho.
P.S. I'll work on xmlbook when I get the time, this script ment to make it easier for people to release book for uo as a script in script submission or something similar, therefor xml won't fit in this 1.
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|