PDA

View Full Version : Tillmen's Lich



Tillmen
02-01-2009, 07:32 PM
Anyone interested in the updates I've done to Lich can download it from:

http://fluffycow.comoj.com

It's unstable for some people, so keep your current version of Lich around in case you have problems. I could use some bug reports and feature requests.

The major changes are:

If you use the Wizard FE, Lich connects as Stormfront to get the XML stream and converts it to GSL for the Wizard. This means you get links highlighted in the room descriptions, access to checkencumbrance, etc.

RoomObj class. RoomObj.list, RoomObj.loot, and RoomObj.npcs each return an array of objects. Each object has .id, .name, .noun, and .status methods. The RoomObj class stays up to date without sending a "look".

Wound and Scar tracking is fixed in Stormfront.

checkloot no longer requires a "look".

Stripped the rest of the XML out of the feed that goes to scripts. (You can still use status_tags to get the full XML.)

goto.lic works with with "set Description off" and/or "set RoomNames off".

waitrt and waitrt? now only waits for hard roundtime (like it did for the Wizard). This should keep goto.lic from stopping for three seconds just because you cast a spell. Added waitcastrt and waitcastrt?

Added checkbounty.

Added checkencumbrance.

A bunch of stuff I did and forgot about.

Mala04
02-01-2009, 09:50 PM
A few things I noticed when you first put up the windows compile. Like say I have 2 chars, char1 is at a table, I'm on char2 going to char1's table. I get to the dining room and I type 'go char2 table', and lich crashes the game. (trying to go to a table using your own name...). I was using -fake--sf or whatever at the time.

Second thing. The command line window stays open at all times, whereas before the window is closed when you're connected. Can get quite messy when running 2 or more characters.

fallenSaint
02-01-2009, 10:46 PM
Damn I was ready to give it a go but if it's flakey for MAing guess that's a no go.

Deathravin
02-01-2009, 11:31 PM
Your website is under review, you damn hacker!

Mala04
02-01-2009, 11:36 PM
No, its not really a bug. And it has nothing to do with MAing.

I was saying .. I type 'go onarik table' and I am on onarik, it crashes.

Also note that the version I'm using is atleast a week old, maybe two. So its probably had a few updates knowing Tillmen.

Deathravin
02-01-2009, 11:59 PM
From what I saw... I dunno if he has come out with a new version since I can't get into the site...

But...
Version 2 was very good, just left the window open and Fake-SF didn't work. Also it would disconnect in random times, but since I started closing after using 'goals' that sorta stopped. I play in different locations (work and home) and when I am playing all day from work and log into home, it just disconnects me right as I log in.... only fix I've tried was to log in with old lich first then log in with new lich. Then it works. Also you have the constant CMD window, but that's ignorable.

Version 3 expanded on random errors. I can't remember why I stopped and went back to version 2. V3 was really just to use fake-SF while I scripted so my SF memory usage didn't get out of control.


Keep in mind for all lichy issues that I'm in plat.

Drew
02-02-2009, 12:03 AM
Wasn't there a GM named Tilmen? Any relation?

Tillmen
02-02-2009, 12:47 AM
The problem with the command prompt window showing was fixed a version or two ago.

I wasn't able to reproduce the problem with going to a table. I tried going to a table using my own name, the table name, and an invalid name. The problem could be with a specific set of tables, but I'm guessing it's not a problem with the current version (3.57.5). Let me know if it is.

Crashing after typing "goals" has been fixed.

I put in extra error handling so it should be harder to crash Lich, even if something goes wrong.

I never heard of a GM named Tilmen.

Is no one able to get to the website? I havn't noticed any problem with it.

Mala04
02-02-2009, 01:15 AM
You see this page, because the system administrator of 000webhost.com is currently checking this website for malicious content. This redirect will be removed once we will finish manually checking all files on this account. As far we check over 100 websites, it can take about 2-4 hours to complete. If you are the owner of this website, you will get email confirmation once it's done. If you are a visitor - please come back later.


Thats been up since my first post earlier.

Tillmen
02-02-2009, 01:34 AM
That's very strange. I've been looking at and updating the site this whole time and I've never seen that message.

Mala04
02-02-2009, 01:35 AM
Maybe you're being hacked :0

Deathravin
02-02-2009, 01:38 AM
Wow, you're like 2 versions over where I last played with it. With Lichnet being all weird, I feel so out of the loop.

Tillmen
02-02-2009, 04:25 AM
Your account fluffycow.comoj.com has been checked and approved by the system administrator. Domain is now active.
We are sorry for inconveniences it may caused and thank you for patience.

It feels great to be approved by someone that speak English good...

Mala04
02-02-2009, 04:32 AM
hahaha

fallenSaint
02-02-2009, 09:29 PM
get an error on login that advises, "Lich detected SIGSEV, aborting." then crashes me out. Ideas?

Oh and when it did work, I didnt see how to activate the "If you use the Wizard FE, Lich connects as Stormfront to get the XML stream and converts it to GSL for the Wizard. This means you get links highlighted in the room descriptions, access to checkencumbrance, etc." feature as well?

There a doc with a run down of how to utilize the added features of Tillmen Lich?

Danical
03-09-2009, 04:19 AM
What's the code for the RoomObj and corresponding methods?

Deathravin
03-09-2009, 09:05 AM
Just to get you start playing with it...

RoomObj.loot[0].ID
RoomObj.loot[0].noun
RoomObj.npc[0].status

I think those work...

Danical
03-09-2009, 11:15 AM
Just to get you start playing with it...

RoomObj.loot[0].ID
RoomObj.loot[0].noun
RoomObj.npc[0].status

I think those work...

I meant the actual XML parsing code like the following for my stow container.

before_dying{ untrace_var(:$_SERVERSTRING_) }
trace_var(:$_SERVERSTRING_, proc { |data|
if data =~ /<clearContainer id=['"]stow['"]\/>/
$container = data.scan(/<inv id=['"]stow['"]>[^<]*<a exist=['"][^'"]+['"] noun=['"][^'"]+['"]>[^<]*<\/a><\/inv>/).collect { |val| /noun=['"]([^'"]+)['"]/.match(val).captures[0].dup }
end
})

Tillmen
03-12-2009, 10:05 PM
I meant the actual XML parsing code like the following for my stow container.

before_dying{ untrace_var(:$_SERVERSTRING_) }
trace_var(:$_SERVERSTRING_, proc { |data|
if data =~ /<clearContainer id=['"]stow['"]\/>/
$container = data.scan(/<inv id=['"]stow['"]>[^<]*<a exist=['"][^'"]+['"] noun=['"][^'"]+['"]>[^<]*<\/a><\/inv>/).collect { |val| /noun=['"]([^'"]+)['"]/.match(val).captures[0].dup }
end
})


Here's the code. It's sloppy and is really just a first draft. I switched projects before refining it.

The RoomObj class gets the "room objs" line from sfparser.rb:


module SFMetadata
...
def room_objs(hash={})
...
RoomObj.setstring($_SERVERSTRING_)
end
...
end

And here's the actual class from lich-lib.rb


class RoomObj
@@room_obj_string = nil
@@room_obj_list ||= Array.new
def initialize(id, noun, name, status, bold)
@id = id
@noun = noun
@name = name
@status = status
@bold = bold
end
def RoomObj.setstring(string)
@@room_obj_list = nil
@@room_obj_string = string
end
def RoomObj.populate_list
temp_room_obj_list = @@room_obj_string.slice(/<(component|compDef) id=['"]room objs['"]>.*?<a.*?<\/\1>/).gsub(/^.*?<a/, '').split(/<a/)
@@room_obj_list = Array.new
for obj in temp_room_obj_list
if obj =~ /^\s*exist="([^"]+)" noun="([^"]+)">([^<]+)</
id = $1
noun = $2
name = $3
#fixme: not grabbing status with "set roombrief on"
if obj =~ /that (?:is|appears) (.*?)(?: and|\.|,)/
status = $1
else
status = nil
end
if obj =~ /<popBold\/>/
bold = true
else
bold = false
end
@@room_obj_list.push(RoomObj.new(id, noun, name, status, bold))
end
end
end
def id
@id
end
def noun
@noun
end
def to_s
@noun
end
def RoomObj
@noun
end
def name
@name
end
def status
@status
end
def bold
@bold
end
def RoomObj.list
populate_list unless @@room_obj_list
return nil if @@room_obj_list.empty?
return @@room_obj_list.dup
end
def RoomObj.npcs
populate_list unless @@room_obj_list
monster_list = @@room_obj_list.dup
monster_list.delete_if { |obj| not obj.bold }
return nil if monster_list.empty?
return monster_list.dup
end
def RoomObj.loot
populate_list unless @@room_obj_list
loot_list = @@room_obj_list.dup
loot_list.delete_if { |obj| obj.bold }
return nil if loot_list.empty?
return loot_list.dup
end
def RoomObj.dead
populate_list unless @@room_obj_list
dead_list = Array.new
for obj in @@room_obj_list
dead_list.push(obj) if obj.status == "dead"
end
return nil if dead_list.empty?
return dead_list.dup
end
def RoomObj.npcs_include_id?(question_id)
npcs = RoomObj.npcs
npcs.each { |npc|
return true if npc.id.to_s == question_id
}
return false
end
end

Tillmen
03-12-2009, 10:21 PM
Looking at that code kind of made me sad. Here it is edited a little. I'm not going to test it.



class RoomObj
attr_reader :id, :noun, :name, :status, :bold
def initialize(id, noun, name, status, bold)
@id, @noun, @name, @status, @bold = id, noun, name, status, bold
@@room_obj_list.push(self)
end
def RoomObj.setstring(string)
@@room_obj_list = nil
@@room_obj_string = string
end
def RoomObj.populate_list
temp_room_obj_list = @@room_obj_string.slice(/<(component|compDef) id=['"]room objs['"]>.*?<a.*?<\/\1>/).sub(/^.*?<a/, '').split(/<a/)
@@room_obj_list = Array.new
for obj in temp_room_obj_list
if obj =~ /^\s*exist="([^"]+)" noun="([^"]+)">([^<]+)</
id, noun, name = $1, $2, $3
if obj =~ /that (?:is|appears) ([\w\s]+)/) or (obj =~ / \(([^\(]+)\)/)
status = $1
else
status = nil
end
if obj =~ /<popBold\/>/
bold = true
else
bold = false
end
RoomObj.new(id, noun, name, status, bold)
end
end
end
def RoomObj.list
populate_list unless @@room_obj_list
return nil if @@room_obj_list.empty?
return @@room_obj_list.dup
end
def RoomObj.npcs
populate_list unless @@room_obj_list
monster_list = @@room_obj_list.dup
monster_list.delete_if { |obj| not obj.bold }
return nil if monster_list.empty?
return monster_list.dup
end
def RoomObj.loot
populate_list unless @@room_obj_list
loot_list = @@room_obj_list.dup
loot_list.delete_if { |obj| obj.bold }
return nil if loot_list.empty?
return loot_list.dup
end
def RoomObj.dead
populate_list unless @@room_obj_list
dead_list = Array.new
for obj in @@room_obj_list
dead_list.push(obj) if obj.status == "dead"
end
return nil if dead_list.empty?
return dead_list.dup
end
def RoomObj.include?(thing)
RoomObj.npcs.find { |npc| npc.id == thing.to_s || npc.noun == thing || npc.name == thing || npc.status == thing }
end
end

Danical
03-23-2009, 11:38 AM
w00t, with a few tweaks, I got it to work!

Thanks a million!

heathrow
03-23-2009, 12:25 PM
Will this make it impossible to get normal updates if they come out? Or is the old Lich never going to be updated again?

GSIVPlayer
03-23-2009, 12:40 PM
Just wanted to say Tillmen's the man.. i luv you brother!!

-Rathmond
-Tyebrilas
-Earandel
-Sean ;)

Jeake
05-27-2009, 08:44 AM
So I completely reformatted my computer to get try to work this clean.

Windows XP.

Computer with nothing else added other than drivers for wireless network card and printer.

Turned off microsoft firewall.

1. Ran GS through play.net website and successfully downloaded and played using stormfront in plat.

2. Downloaded and installed ruby.

3. Downloaded lich-3.65. Unzipped to C:\lichtill folder.

4. Tried to use the command prompt to execute lich.rb --install. Executed but txt file states
"Failed to read registry.
Install failed."

5. Still able to play game via stormfront and webpage but no lich.

6. Tried to execute via explorer.
"C:/documents and settings/HP_Owner/.lich.cfg does not exist.
Lich diretory set to program directory: C:/Lichtill/
Creating script directory: C:/Lichtill/scripts/
Creating data directory: C:/Lichtill/data/
ip: gs3.simutronics.net, port: 4900
C:/Lichtill/lich.rb:5308:in 'join': can't convert nil into String (Type from C:/Lichtill/lich.r:5308"


Any recommendations for 4? Thanks.

v/r

Tom

Menelous
05-28-2009, 01:50 AM
I have vista and use firefox so this is going to be different. I just installed in like a week ago so I'm no expert (disclaimer).

When you opened SF via the website, what did it want to run the .sal file with? Mine wanted ruby something or other so I can assume my ruby files got installed properly. Having no clue, that is where I'd start.

Back
05-28-2009, 02:04 AM
Will it work on a Mac using Avalon? I have heard nothing but good things about Lich.

Jeake
05-28-2009, 08:58 AM
Turns out the answer is I MUST install the SGE. I was concerned about the SGE on play.net working with lich. After installing the SGE, I still got an error when trying to install the lich (said installation failed) but when I logged in, the lich was working as expected. Thanks.

deadly
07-14-2009, 06:09 AM
i cant even get it to load

C:/Users/ryanxps/.lich.cfg does not exist.
Lich directory set to program directory: C:/lich/
ip: gs3.simutronics.net, port: 4900
Pretending to be the game host, and waiting for game client to connect to us...
Timeout, restoring backup and exiting.

i can log into gs4 fine but nothing attempts to install when i launch the game via the website or sge.

i uninstalled psinet and deleted any psinet shit from the registry and uninstalled my old lich and re-installed ruby and still nothing.

Deathravin
07-14-2009, 06:28 AM
you sure it's tillmens?

Renian
07-14-2009, 06:40 AM
i cant even get it to load

C:/Users/ryanxps/.lich.cfg does not exist.
Lich directory set to program directory: C:/lich/
ip: gs3.simutronics.net, port: 4900
Pretending to be the game host, and waiting for game client to connect to us...
Timeout, restoring backup and exiting.

i can log into gs4 fine but nothing attempts to install when i launch the game via the website or sge.

i uninstalled psinet and deleted any psinet shit from the registry and uninstalled my old lich and re-installed ruby and still nothing.

But you never actually installed the new lich. I think you're running it in test mode...it does that if you don't install it.

ruby lich.rb --install

deadly
07-14-2009, 09:03 AM
C:\lich\lich.rb is the file that im running when trying to log into the game and the command promt opens up but nothing happens.

SpiffyJr
07-14-2009, 10:23 AM
Did you: C:/ruby/bin/rubyw.exe c:/lich/lich.rb --install ?

Renian
07-14-2009, 10:25 AM
Did you: C:/ruby/bin/rubyw.exe c:/lich/lich.rb --install ?

Exactly what I said. :P

You shouldn't have to run it after it installs. It just links. Like it should.

Anebriated
07-14-2009, 10:37 AM
Im having the same problem with Lich. The only way I can get it to run is if I run it from the lich folder in my start menu "The Lich(force stormfront mode)". if I use a game entry program it just loads up basic.

deadly
07-15-2009, 05:09 AM
i hit the windowskey+R then i imput c:/lich/lich.rb in there and ran it.

when i did that i had a blank windows cmd prompt open up with no text in there. however in the folder in the debug file i have this when i open it.

C:/Users/ryanxps/.lich.cfg does not exist.
Lich directory set to program directory: C:/lich/
ip: gs3.simutronics.net, port: 4900
Lich cannot bind to the proper port, aborting execution.
Timeout, restoring backup and exiting.


gib said he had the same thing and had to delete a file that was causing his issue when he uninstalled the old lich, he was unable to remember what that file name was so im stuck until i can find out what the rogue file name is and delete it.

i cant even re-install the old lich that i had when i do get the old lich installed it wont connect to the game so im kinda bummed :{

anybody with other step by step info i can try to resolve my issue?

Anebriated
07-15-2009, 10:24 AM
C:/Documents and Settings/Administrator/.lich.cfg does not exist.
Lich directory set to program directory: c:/lich/
ip: gs3.simutronics.net, port: 4900
Pretending to be the game host, and waiting for game client to connect to us...

pabstblueribbon
07-15-2009, 02:39 PM
Make sure psinet is uninstalled. (not entirely sure if this step is necessary)
Install tillmens lich. (fire it up to make sure)
You can ;repo download installpsinet.lic
run ;installpsinet.lic
install psinet
......
.....
profit?

here's the script tillmen wrote to do so as of today - installpsinet.lic


=begin

This script screws around with the registry so you can install Psinet, in case you're into that sort of thing.

tillmen@gmx.net

=end

unless defined?(registry_get)
echo "Your version of Lich is too old for this script, which probably means it doesn't need this script anyway."
exit
end

launch_cmd = registry_get('HKEY_LOCAL_MACHINE\Software\Classes\ Simutronics.Autolaunch\Shell\Open\command\\')
launch_dir = registry_get('HKEY_LOCAL_MACHINE\Software\Simutron ics\Launcher\Directory')
cmd_ruby_part, cmd_lich_part = /^(.*?rubyw.exe"?) (.*lich\.rb.*)$/i.match(launch_cmd.to_s).captures
dir_ruby_part, dir_lich_part = /^(.*?rubyw.exe"?) (.*lich\.rb.*)$/i.match(launch_dir.to_s).captures

unless cmd_ruby_part and cmd_lich_part
echo "Unrecognized launch_cmd: #{launch_cmd}"
echo 'Nothing was changed.'
exit
end

unless dir_ruby_part and dir_lich_part
echo "Unrecognized launch_dir: #{launch_dir}"
echo 'Nothing was changed.'
exit
end

new_launch_cmd = cmd_lich_part.sub(/lich.rb/i, 'lich.bat')
new_launch_dir = dir_lich_part.sub(/lich.rb/i, 'lich.bat')

File.open($lich_dir+'lich.bat', 'w') { |f| f.puts "#{launch_cmd} %2 %3 %4 %5 %6 %7 %8 %9" }

registry_put('HKEY_LOCAL_MACHINE\Software\Classes\ Simutronics.Autolaunch\Shell\Open\command\\', new_launch_cmd)
registry_put('HKEY_LOCAL_MACHINE\Software\Simutron ics\Launcher\Directory', new_launch_dir)

echo 'Done. You may now install Psinet.'
echo 'Always select Stormfront as the frontend when using both Lich and Psinet, or Psinet will be unhappy. If you want to use the Wizard frontend, select Stormfront when logging in anyway, and put a file named "fakestormfront.txt" in your Lich directory.'

Morrff
07-15-2009, 03:39 PM
That is sexy, hope it works well for both Vista and xp users. I've heard i works fine for XP users, not sure on dah Vista

Anebriated
07-15-2009, 04:42 PM
Im having issues getting an old copy of PSInet off my computer. Its missing a file needed to uninstall. cant repair it for the same reason. Any suggestions?

pabstblueribbon
07-15-2009, 04:51 PM
Format.

Anebriated
07-15-2009, 04:52 PM
Any other options? Dont have the CD anymore.

pabstblueribbon
07-15-2009, 04:59 PM
Torrent win7.
...
...
...
Profit?

SpiffyJr
07-15-2009, 05:03 PM
Just delete the Psinet files and reinstall the Launcher. That will reset everything to normal. You could also delete the Psinet registry entry in HKLM\Software\Simutronics\Psinet (or somewhere around there).

Renian
07-15-2009, 05:14 PM
Any other options? Dont have the CD anymore.

Not a problem. Torrent XP and get a program that will discover your current XP key. I have one on my computer at home so I'll tell you what it's called when I get back.

deadly
07-15-2009, 08:32 PM
still having issues with getting tilmens lich installed.

Renian
07-16-2009, 10:54 PM
Sorry for the delay, Anebriated.

http://www.magicaljellybean.com/keyfinder/

deadly
07-16-2009, 11:35 PM
got lich installed but i get errors when trying to load narost something about the extra download that i had to install to ruby not loading up when gemstone starts.

Morrff
07-17-2009, 03:09 AM
got lich installed but i get errors when trying to load narost something about the extra download that i had to install to ruby not loading up when gemstone starts.

What's narost? And what does it have to do with GS?

Danical
07-17-2009, 11:32 AM
What's narost? And what does it have to do with GS?

Narost is Tillmen's analog to Jamus' PsiNet Atlas.

Pretty fucking awesome stuff.

SpiffyJr
07-17-2009, 11:47 AM
The original credit goes to Jamus for Atlas but I think Narost is superior.

Renian
07-17-2009, 06:06 PM
got lich installed but i get errors when trying to load narost something about the extra download that i had to install to ruby not loading up when gemstone starts.

I think you need the ruby GTK.

deadly
07-17-2009, 07:12 PM
tillmen fixed it for me. it was two .dll's in my system32 folder that were causing issues.

just had to rename them dll.bak and it fixed ti right away.

Bird Dog
10-01-2009, 01:43 AM
tillmen fixed it for me. it was two .dll's in my system32 folder that were causing issues.

just had to rename them dll.bak and it fixed ti right away.

What was the fix for this? I think I'm having the same issue.