Rarnd Araki
05-01-2012, 08:31 PM
Hi guys,
I am new to both Ruby and Lich (and programming for that matter), and I have a question about looting. DISCLOSURE: I know there are scripts out there that do this, but I want to write my own scripts to learn Ruby.
I have some characters on the CoL path and I want to setup a skinning script that loots only the skin in the room. I've had a look at Loot3 and Lootit but I just can't make heads or tails of this part.
I know I need an array of all the skins, and I know I need to make use of checkloot / GameObj.loot. Otherwise, I'm fairly stumped.
Here's a snippet of what I'm thinking, but this is in no way functional code. Input please!
skin = ["tailspike", "tailfeather", "fur", "fin", "nail", "canine", "antlers", "bone", "beard", "carapace", "claw", "crest", "ear", "eye", "eyeball", "fang", "feather", "feathers", "firethorn", "heart", "hide", "horn", "hoof", "incisor", "jawbone", "knuckle", "spider leg", "mandible", "mane", "nose", "paw", "pelt", "pincer", "plume", "scalp", "sail", "scraping", "shroud", "skin", "skull", "snout", "stinger", "tail", "talon", "thumb", "toe", "tooth", "tongue", "tusk", "wing", "whisker", "ambergris"]
loot = checkloot
if skin.include?(loot) === true
fput "get #{loot}"
end
I am new to both Ruby and Lich (and programming for that matter), and I have a question about looting. DISCLOSURE: I know there are scripts out there that do this, but I want to write my own scripts to learn Ruby.
I have some characters on the CoL path and I want to setup a skinning script that loots only the skin in the room. I've had a look at Loot3 and Lootit but I just can't make heads or tails of this part.
I know I need an array of all the skins, and I know I need to make use of checkloot / GameObj.loot. Otherwise, I'm fairly stumped.
Here's a snippet of what I'm thinking, but this is in no way functional code. Input please!
skin = ["tailspike", "tailfeather", "fur", "fin", "nail", "canine", "antlers", "bone", "beard", "carapace", "claw", "crest", "ear", "eye", "eyeball", "fang", "feather", "feathers", "firethorn", "heart", "hide", "horn", "hoof", "incisor", "jawbone", "knuckle", "spider leg", "mandible", "mane", "nose", "paw", "pelt", "pincer", "plume", "scalp", "sail", "scraping", "shroud", "skin", "skull", "snout", "stinger", "tail", "talon", "thumb", "toe", "tooth", "tongue", "tusk", "wing", "whisker", "ambergris"]
loot = checkloot
if skin.include?(loot) === true
fput "get #{loot}"
end