PDA

View Full Version : GameObj update



Tillmen
09-17-2010, 03:00 PM
The GameObj class has been updated. To play with it, update to Lich 4.1.63, and download gameobj-data.xml from the repository. And probably do ;updater add gameobj-data.xml

You can now try to find an object with:

obj = GameObj[search_string]
for example

cloak = GameObj['cloak']
echo cloak.contents

If the search string is a number (as a string), it'll try to find a matching object with that id. If it's a one word string, it'll try to find an object with a matching noun. If it's more than one word, it'll first try to find an object with an exactly matching name, and then try to find a match by screwing around with some regex. For example, if you have a "large ugly cloak", but you can't manipulate the item with using "open large ugly cloak" or "open ugly cloak", but only "open large cloak", you probably have a setting saved as "large cloak". The regex match will make the ugly part optional, and still find the cloak.

.type and .sellable methods have been added to GameObj objects. Help fill in the blanks in the GameObj database by doing something like this:

;e (GameObj.inv.to_a + GameObj.loot.to_a).each { |obj| respond "#{obj.name.ljust(40)} #{obj.type.rjust(10)} #{obj.sellable.rjust(10)}"; obj.contents.each { |o| respond "#{o.name.ljust(40)} #{o.type.rjust(10)} #{o.sellable.rjust(10)}" } }

Post any missing or wrong type/sellable info you find.

If gameobj-data.xml has already been loaded and you download an update, or edit it yourself, you can do

;e GameObj.load_data
to force it to reload.

SpiffyJr
09-17-2010, 03:26 PM
Hooray!

Tordane
09-17-2010, 03:53 PM
Nice update Tillmen.

Deathravin
09-17-2010, 03:55 PM
I came (http://www.hulu.com/watch/47604/saturday-night-live-digital-short-j-in-my-pants)

crb
09-17-2010, 03:55 PM
..I updated while logged into the game ;updater update

Now I cannot log into the game, I've got the one guy in game, but can login no others, when I try to open lich.rb it splashes an error message ultrafast in the black command screen, and closes.

shitty windows vista

Tillmen
09-17-2010, 04:33 PM
..I updated while logged into the game ;updater update

Now I cannot log into the game, I've got the one guy in game, but can login no others, when I try to open lich.rb it splashes an error message ultrafast in the black command screen, and closes.

shitty windows vista

Not sure what's going on there.. I just started up Windows and tried it, and it seems to work fine.

See if lich\temp\debug-#.txt gives any helpful error messages. If not, open up a Windows command prompt, move to the directory with lich.rb in it, and type: ruby lich.rb

crb
09-17-2010, 04:47 PM
C:\Users\Admin\Desktop\Gemstone\lich-4.0.9\lich>lich.rb
C:/Users/Admin/Desktop/Gemstone/lich-4.0.9/lich/lich.rb:3030: syntax error, unex
pected ']', expecting '='
C:/Users/Admin/Desktop/Gemstone/lich-4.0.9/lich/lich.rb:3064: syntax error, unex
pected tCVAR, expecting kEND
@@wiz @@stalkingandhiding; end
^
C:/Users/Admin/Desktop/Gemstone/lich-4.0.9/lich/lich.rb:3081: syntax error, unex
pected tCVAR, expecting ']'
@@sorcerer ||= 0
^
C:/Users/Admin/Desktop/Gemstone/lich-4.0.9/lich/lich.rb:9789: syntax error, unex
pected $end, expecting kEND

there you go

Tillmen
09-17-2010, 05:00 PM
My best guess is a corrupted download. It seems to be saying there's stuff on the lines that aren't there, but then other line numbers seem to match up.

Gibreficul
09-18-2010, 04:36 AM
Once again, once I get a working script of my own, Tillmen adds something similar to Lnet making my shit obsolete AGAIN. (yay?) Viva le gib_lib. (Kinda excited to play with it, thanks Tillmen.)