RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

html generation from mob *.cs scripts

x-ray

Wanderer
html generation from mob *.cs scripts

WARNING !
Starting from version 0.6 you need to download ijl15.dll (Intel jpg library). I cant include the dll here because of file size limit, but you can download it here:

http://www.dll-files.com/dllindex/dll-files.shtml?ijl15

Put this dll in the same folder with mulext.exe

Summary:
This perl script parse *.cs scripts with mob classes, extract properties of the creature and produce html pages (with pictures if you want - you need uo client installed for this feature).

One sample of this script work you can see at the
http://alterra.twigsjoint.com/
Click "Inhabitants" then click "Critters"

History:
0.7
+ Hues support (from *.cs or from body.cfg) !
* Body.cfg updated

0.6
* Output images now produced in jpg format
* Fixed template parser function (Thanks to twig !)
* Small additions to config reader

0.56
* Again fixed some bug with mulext call from the script
* Added AOS monsters picture extraction support
* Fixed small bug in mulext

0.55
* Fixed bug with the embedded spaces in the path parameters to mulext
(Thanks to zardoz !)
* Fixed error with name caching of already extracted images
* Now csmob2html correctly (i hope :) extract several pics if several mobs class
defined in source .cs script

0.5
+ Picture extraction !
* Now only *.cs files are parsed

0.3
* Now the script correctly extract several mobs from one *.cs source file
* Several small fixes
+ Now you can set base classes, so the csmob2html produce pages only for them.
baseclasses variable in configuration file

0.2
+ All output pages now can be edited via templates located in ./tpl folder
* Fixed small bugs

0.1
+ First version

Installation:
Installation notes is in the readme.txt of the archive.
 

Attachments

  • csmob2html.zip
    54.4 KB · Views: 334

Avangelon

Wanderer
Great job! I really like how I can see my own shard monster stats, because my monster stats just may not be the same as uo.stratics.com :) Keep up this great work ;)

Edit: 6/9/04 at 09:07 PM.
I just ran the script and dropped the css in the out directory and was looking at the index.html when I noticed that the last item on the list wasn't sorted properly hehe:

  • Wyvern
  • Zombie
  • vorpalbunny

Edit: 6/9/04 at 10:38 PM
I just uploaded it to my website in case you or anyone else wants to see the output. The above error is there too in case you want to see it ^_^.

Good job and Good luck,
Avangelon
 

x-ray

Wanderer
Matador Doidao said:
sounds great to use on a shard site :D
but i cant get it to work :(

can u send a link directly to the program i need?

thanks :)

you can download win32 version of perl here:

http://www.activestate.com/Products/ActivePerl/

just click on "download now" :)

after installing configure script and run it by typing:

perl csmob2html.pl

Avangelon said:
I just ran the script and dropped the css in the out directory and was looking at the index.html when I noticed that the last item on the list wasn't sorted properly hehe:

This is not a "bug" but feature :) Looks like perl separate capital letters thats why 'Z' > 'v'.

I fix it if i have a free time :(
 

x-ray

Wanderer
Avangelon said:
lol, I love those unexpected "features" don't you? :-P Don't worry about it, it's fine :)

honestly speaking this behavior of perl is 100% correct :)
I just have not much expirence with perl coding :)
 

stormwolff

Knight
hudel said:
hmm,... What does pearl do? I don't know this programm. :(

A pearl is a mooth, lustrous, variously colored deposit, chiefly calcium carbonate, formed around a grain of sand or other foreign matter in the shells of certain mollusks and valued as a gem.

Perl is a general-purpose programming language invented in 1987 by Larry Wall. With over one million users worldwide, it has become the language of choice for World Wide Web development, text processing, Internet services, mail filtering, graphical programming, systems administration, and every other task requiring portable and easily-developed solutions.
 
A pearl is a mooth, lustrous, variously colored deposit, chiefly calcium carbonate, formed around a grain of sand or other foreign matter in the shells of certain mollusks and valued as a gem.

*grins* you evil bastard :p

x-ray any chance you can bake this into a simple executable of some sort? I am too lazy to install another compiler, let alone wait for the 9mb download hehe

*edit*

and then I did anyway hehe

interesting script very useful
 

wanna

Wanderer
I know nothing about Perl language..

is there a way to add multiple root path for the monster list?

as my folders are organised like this:
Script/modified/Mobiles/Monsters
Script/Mobiles/Monsters

by the way, Tanks for this awesome script :)
 

stormwolff

Knight
wanna said:
I know nothing about Perl language..

is there a way to add multiple root path for the monster list?

as my folders are organised like this:
Script/modified/Mobiles/Monsters
Script/Mobiles/Monsters

by the way, Tanks for this awesome script :)

Not the answer your looking for, but you can copy and paste the .cs files into a new direcotry then set it to scan that directory.
 

x-ray

Wanderer
Captain The First said:
*grins* you evil bastard :p
x-ray any chance you can bake this into a simple executable of some sort? I am too lazy to install another compiler, let alone wait for the 9mb download hehe

You can serch for something sounds like perl2exe utility (www.yahoo.com :)).
As i know, this kind of proggy exist.

weaselboy246 said:
Say, could you possibly do this with accounts as well?

Not "this" - parsing static monster class and the pleyer entity will be a different things. I can do but depends what do you mean :) If you want the script that parsing the accounts.xml, sure, but what for ? I think there are not so many useful information in accounts.xml.
Or you want to see all PlayerMobile Chars stats ? If so, its better way to modify your WebStatus.cs because of:

1. Player mobile statistics changed in a short period of time. You need to renew this quickly
2. I dont know worlds file structures, so its better way to this from the core of engine.
3. I dont think the player will be happy to know what all his stats publicly accessed :)

wanna said:
is there a way to add multiple root path for the monster list?

Sure. There are two ways. One way suggested by the Stormwolff. You can simply copy all your scripts to the one location. Or you can add second path (or more) to the @dir array delimited by commas:

@dir = ("c:/path1/","c:/path2/");

I change such kind of arguments for program in the next release :)
 

Avangelon

Wanderer
weaselboy246 said:
I was acually wondering about online paperdolls like in MyUO.
Yeah, that'd be nice to not have to use aspx for MyRunUO to see character status.... I MUCH rather use the linux/apache(/php|perl) combo for anything dealing with webpage related things.
 

x-ray

Wanderer
Avangelon said:
Yeah, that'd be nice to not have to use aspx for MyRunUO to see character status.... I MUCH rather use the linux/apache(/php|perl) combo for anything dealing with webpage related things.

Actually, i dont know what is MyRunUO, is it some kind of web statistics ?
if you drop me a link to it, i can think about this :)
 
Top