Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 01-21-2005, 11:41 PM   #1 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Thumbs up Make c# out of uo books in a second (or less)

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
Attached Files
File Type: cs CSBook.cs (6.6 KB, 263 views)
__________________
I always try to help
Sometimes, I don't know how....

My Web Page
Forum Rules
-------------------------------------------------------------
Extensive OWLTR System | Token System | World Teleporters
-------------------------------------------------------------
daat99 is offline  
Old 01-21-2005, 11:44 PM   #2 (permalink)
Forum Expert
 
A_Li_N's Avatar
 
Join Date: Apr 2004
Location: Another state of mind
Age: 27
Posts: 2,875
Default

Quote:
Originally Posted by daat99
I'm soooooo happy to be the first script poster for runuo 1.0.0
*Smacks daat99 across the head*
Damn attachments! I was SOOOO gona be the first!
A_Li_N is offline  
Old 01-21-2005, 11:50 PM   #3 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

Quote:
Originally Posted by A_Li_N
Quote:
Originally Posted by daat99
I'm soooooo happy to be the first script poster for runuo 1.0.0


*Smacks daat99 across the head*
Damn attachments! I was SOOOO gona be the first!
ROFL don't worry you'll be the second
daat99 is offline  
Old 01-22-2005, 02:32 AM   #4 (permalink)
 
Join Date: Aug 2004
Age: 18
Posts: 58
Default

Nice idea, daat, this could come in handy a lot in RP shards.
Keep it up.
Himura! is offline  
Old 01-22-2005, 02:41 AM   #5 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

ThanX Himura
daat99 is offline  
Old 01-22-2005, 04:13 AM   #6 (permalink)
 
Join Date: Aug 2004
Age: 18
Posts: 58
Default

Eh, Himura... I think "Himura" was taken so I added an "!"

Anyway, like I said, nice job
Himura! is offline  
Old 01-22-2005, 04:38 AM   #7 (permalink)
 
Join Date: Jan 2005
Age: 24
Posts: 174
Send a message via MSN to aleon
Default

ühühühü i wanted to post firstt ühühühühü bay boy bad boy....
aleon is offline  
Old 01-22-2005, 02:54 PM   #8 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

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!
jjarmis is offline  
Old 01-22-2005, 03:16 PM   #9 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

Well I tried to make it take the title, but since the title had spaces in it it made the script uncompileable
daat99 is offline  
Old 01-22-2005, 03:26 PM   #10 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

well, you can just take out the spaces and other punctuation for that matter......

Just loop through all the chars in the string and if they aren't a letter dont add them to your name string.
__________________
HI!
jjarmis is offline  
Old 01-22-2005, 04:24 PM   #11 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

If I only knew how....
daat99 is offline  
Old 01-22-2005, 04:44 PM   #12 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

heh I got plans today, but if you are around this evening (US-PST) I'll be more than happy to help u with it.
__________________
HI!
jjarmis is offline  
Old 01-22-2005, 05:26 PM   #13 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

I'll take you up on that offer HeHe
Also I need your help with some other stuff I have but doesn't realy fit to post in the forums since it don't have errors and it works like it was suppose to (not sure if to be or about this part)
daat99 is offline  
Old 01-22-2005, 11:04 PM   #14 (permalink)
Hax Your Face.
 
Join Date: Jun 2004
Age: 21
Posts: 820
Default

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.
Waverian is offline  
Old 01-23-2005, 01:07 AM   #15 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

That would be much harder to do if it is even possible, because the server would have to send info to the client telling it to write the file.
__________________
HI!
jjarmis is offline  
Old 01-23-2005, 01:37 AM   #16 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

Quote:
Originally Posted by daat99
I'll take you up on that offer HeHe

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!
jjarmis is offline  
Old 01-23-2005, 02:15 AM   #17 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

I'm way too tired to understand it atm
I'll hit that when I get back from studies tonight (about 13-14 hours from now).
ThanX tho
daat99 is offline  
Old 01-23-2005, 03:58 PM   #18 (permalink)
 
Join Date: Dec 2003
Posts: 1,069
Default

heh.. well I'm home now for about 6 hours, so I'll be around if you need more help. ^_^
__________________
HI!
jjarmis is offline  
Old 01-23-2005, 08:32 PM   #19 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

ThanX a lot for your help jjarmis
Once I get the shard I'm working on ready to go public I'll work on the scripts a bit more
daat99 is offline  
Old 01-27-2005, 04:18 PM   #20 (permalink)
 
Join Date: Jan 2005
Age: 28
Posts: 24
Send a message via ICQ to frozencorpse Send a message via MSN to frozencorpse Send a message via Yahoo to frozencorpse
Default

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.
frozencorpse is offline  
Old 01-27-2005, 05:43 PM   #21 (permalink)
 
Join Date: Jan 2005
Age: 28
Posts: 24
Send a message via ICQ to frozencorpse Send a message via MSN to frozencorpse Send a message via Yahoo to frozencorpse
Default

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.
frozencorpse is offline  
Old 01-27-2005, 08:31 PM   #22 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

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
-------------------------------------------------------------
daat99 is offline  
Old 01-27-2005, 09:13 PM   #23 (permalink)
P3'c Orion Aviator
 
Join Date: Sep 2004
Age: 30
Posts: 1,272
Default

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,
sirens song is offline  
Old 01-27-2005, 09:21 PM   #24 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

Quote:
Originally Posted by sirens song
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,
Cool, thanx a lot sirens song
__________________
I always try to help
Sometimes, I don't know how....

My Web Page
Forum Rules
-------------------------------------------------------------
Extensive OWLTR System | Token System | World Teleporters
-------------------------------------------------------------
daat99 is offline  
Old 01-30-2005, 02:24 AM   #25 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

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
-------------------------------------------------------------
daat99 is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5