fallenSaint
06-20-2008, 06:07 PM
So, anyone that can make sense of the Ruby stuff... Im trying to find where the damn thing actually sends the request to look in game. I run around with room descriptions off which completely fails scripts like this so I need to find where I can put flag description on for it to look then flag description off when its done.
Also, before I try to do it manually as well... anyone care to give me a good setup for getting this thing to loot boxes after I open them from being picked? Was just going to try and make it also look for "You open a (boxtype)" look in it and run through all its loot checks.
Much appreciation to anyone that can lend a hand.
Shaelun
06-21-2008, 01:41 PM
I didn't write it, but in answer to your first question, I think you want to stick that in to the lootcheck method (where it says def lootcheck() toward the top there). checkloot is a built-in method that returns an array of the objects in the room, so you likely want to put the on/off before/after that line.
As for the second question, I don't see any better way of doing it than what you're talking about. You can use the split_as_list method of the String class to turn a gameline that's a list of stuff in to an array.
e.g.:
fput "look in my cloak"
cloakLine = waitfor "In the"
itemArray = cloakLine.split_as_list
That would leave an array of strings in itemArray. Here's a paste of my doing it:
;e fput "look in my cloak"; cline = waitfor "In the"; items = cline.split_as_list; echo items
--- Lich: exec1 active.
[exec1]>look in my cloak
In the spidersilk cloak you see a white crystal, an onyx-inlaid blue sapphire neckchain, a tincture of acantha, a tincture of aloeas, a tincture of cactacae, a glowing essence shard, an oaken wand, a golden scroll, a copper lockpick and a n'ayanad crystal.
[exec1: a white crystal]
[exec1: an onyx-inlaid blue sapphire neckchain]
[exec1: a tincture of acantha]
[exec1: a tincture of aloeas]
[exec1: a tincture of cactacae]
[exec1: a glowing essence shard]
[exec1: an oaken wand]
[exec1: a golden scroll]
[exec1: a copper lockpick]
[exec1: a n'ayanad crystal]
--- Lich: exec1 has finished.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.