Results 1 to 6 of 6

Thread: need help with a gem script

  1. #1

    Default need help with a gem script

    I am looking to make a script that will sell any gem I have in my gem container (knapsack) where the quantity is above 10.

    >look in my kna
    In the leather knapsack:
    Gems [495]: a fire agate (14), a violet spinel (14), a star diopside (8), a fiery jacinth (22), a banded agate (8), a piece of spiderweb obsidian (17), a mottled agate (8), a blue tourmaline (14), a tigereye agate (10), a yellow hyacinth (21), a moss agate (10), a piece of black onyx (14), a frost agate (8), a piece of banded onyx (17), a red spinel (8), a piece of jet black obsidian (12), a green tourmaline (12), a black tourmaline (10), a pink tourmaline (9), a clear tourmaline (12), an orange spessartine garnet (18), a brown zircon (7), a clear zircon (10), an olivine faenor-bloom (15), a green garnet (10), a shard of rainbow quartz (27), a yellow zircon (12), a pale yellow heliodor (17), a piece of red jasper (8), a piece of rose quartz (4), a piece of citrine quartz (14), a piece of blue quartz (12), a piece of carnelian quartz (7), a piece of cat's eye quartz (10), a piece of yellow jasper (4), a piece of black jasper (5), a pink spinel (5), a blue cordierite (3), a green zircon (10), a green chrysoprase gem (10), a golden beryl gem (10), an aquamarine gem (10), an almandine garnet (5), a blue spinel (4), a bright chrysoberyl gem (10)
    Total items: 495

    I really don't know where to begin. Anyone able to give me some advice?

  2. #2


    noun_of_container = "knapsack"
    number_of_gems_to_keep = 10
    fput "stow right" if checkright
    fput "stow left" if checkleft
    number_of_gems =
    container = GameObj.inv.find{ |item| item.noun == noun_of_container }
    if container.contents.nil?
    	fput "look in ##{}"
    		break if container.contents
    		sleep 0.2
    container.contents.each{ |item|
    	if item.type == "gem"
    		number_of_gems[] += 1
    		if number_of_gems[] > number_of_gems_to_keep
    			fput "get ##{}"
    			fput "sell ##{}"

  3. #3


    holy crap that worked good, you are a lifesafer!

    thanks a bunch

  4. #4


    You betcha.

  5. #5


    very strange, it's ignoring these two gem types...

    a piece of rosespar (11)
    a piece of blue quartz (14)

  6. #6


    Quote Originally Posted by onurb View Post
    very strange, it's ignoring these two gem types...

    a piece of rosespar (11)
    a piece of blue quartz (14)
    Those might not be in the Lich database of gems. I suppose if you only keep gems in the container, or don’t have more than 10 of anything else, you can remove the gem check part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts