Danical
07-01-2008, 12:27 AM
I've 2 instances of Lich running. I just came back from a hunt in which I killed something.
This is one of them.
J>;e echo $slavedeath
--- Lich: exec1 active.
[exec1: true]
--- Lich: exec1 has finished.
J>;e echo $slaveskintarget
--- Lich: exec1 active.
[exec1: magus]
--- Lich: exec1 has finished.
This is the other.
>;e echo $slavedeath
--- Lich: exec1 active.
[exec1: false]
--- Lich: exec1 has finished.
What in the hellballs?
Code for first.
$slavedeath = false
while true
line = waitfor("directing the sound of his voice", "YOU HAVE BEEN IDLE TOO LONG", "player whispers(.+) mana")
if line =~ /directing the sound of his voice (.+) (triton|siren|Grimswarm)/
fput "incant 906"
line = waitfor("(rolls over|falls to the ground) and dies", "topples to the ground motionless", "a wrathful look on", "shudders violently", "shudders one last time", "going still", "death overtakes", "Your armor prevents the song from working correctly", "twitching for a moment before", "begins to dissolve from the bottom up", "gives a plaintive wail before she slumps to her side and dies", "emits a hollow scream as ribbons of essence", "Cast Roundtime", "Sing Roundtime", "You do not currently have a target", "wait (1|2|3)", "FUMBLE")
if line =~ /collapses into a heap of quivering jelly|motionless|shudders|going still|death overtakes|begins to dissolve from the bottom up|a plaintive wail before she slumps to her side and dies|emits a hollow scream as ribbons of essence|twitching for a moment before/
$slavedeath = true
elsif line =~ /(orc|troll|giant) (\w+) (rolls over|falls to the ground) and dies/
line.slice(/(orc|troll|giant) (\w+) (rolls over|falls to the ground) and dies/).join(", ")
$slavedeath = true
elsif line =~ /(\w+) gurgles|(.+) collapses/
line.slice(/The triton (.+) (gurgles|collapses)/).join(", ")
$slaveskintarget = $1
$slavedeath = true
end
sleep 3
elsif line =~ /YOU HAVE BEEN IDLE TOO LONG/
fput "exp"
elsif line =~ /player whispers(.+) mana/
put "send 100 gnimble"
else
sleep 0.25
end
end
This is the second.
while true
if $slavedeath == true
echo "THERELKEJR"
if $slaveskintarget =~ /radical|dissembler|magus/
put "skin #{target}"
if target =~ /radical/
$skin = "spine"
elsif target =~ /dissembler/
$skin = "claw"
elsif target =~ /magus/
$skin = "hide"
end
$slaveskintarget = nil
end
put "loot"
line = waitfor("You search", "only loot creatures", "not find a valid")
if line =~ /only loot creatures|not find a valid/
searched = true
$slavedeath = false
else
$slavedeath = false
searched = false
end
until searched
treasureline = waitfor("You gather the remaining", "You spy", "left (.+) behind", "(carried|had) (an?|some) .+ on", "(She|He|It) had (.+) (crystal-tipped|crystal-edged|crystal-studded) (longsword|mace|blade|fork|handaxe|broadsword)", "leaving nothing behind", "scattering and dissolving", "rapidly dissolving", "hideous scaled creature", "decays into compost", "cracks and collapses", "fissures quickly spread", "shudders and crumbles into itself", "crumbles away into dust")
if treasureline =~ /(carried|had) (an?|some) (.+) on/
treasure = $3
item = treasure.scan(/\w+/).last
elsif treasureline =~ /You gather the remaining/
$jink = true
elsif treasureline =~ /left (.+) behind/
treasure = $1
item = treasure.scan(/\w+/).last
elsif treasureline =~ /(She|He|It) had (.+) (crystal-tipped fork|crystal-edged (handaxe|broadsword|longsword|blade)|crystal-studded mace)/
treasure = $3
echo treasure
elsif treasureline =~ /You spy/
$heirloom = Array.new
obj = treasureline.split(/You spy|,/)
$heirloom = obj[1].scan(/\w+/).last
$specialobject = $heirloom
elsif treasureline =~ /crumbles away into dust|leaving nothing behind|scattering and dissolving|rapidly dissolving|hideous scaled creature|decays into compost|cracks and collapses|fissures quickly spread|shudders and crumbles into itself/
searched = true
treasure = nil
$heirloom = nil
else
treasure = nil
end
if $heirloom != nil
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{$heirloom}"
put "stow #{$heirloom}"
end
if treasure =~ /crystal-tipped|crystal-edged|crystal-studded|strongbox|box|chest|trunk|coffer/
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{treasure.scan(/\w+/).last}"
put "put #{treasure.scan(/\w+/).last} in gnimble disk"
put "stow #{treasure.scan(/\w+/).last}"
treasure = nil
$heirloom = nil
$box = true
elsif treasure =~ /(malachite|rhodochrosite|turquoise|morgandite|labr odite|banded sardonyx|adventureine) stone|green garnet|(white|a fire) opal|(golden beryl|bright chrysoberyl|aquamarine) gem|asterfire quartz|(black|grey) moonstone|blue starstone|jacinth|hyacinth|pale water sapphire|amber|spinel|carbuncle|obsidian|fire agate|tourmaline|(clear|pink|blue|smoky|golden) topaz|jasper|almandine garnet|diopside|cordierite|polished (blue|pink|red|black) coral|onyx|amethyst|bloodstone|deathstone|peridot| zircon|chalcedony|heliodor|(yellow|green|blue|blac k|pink|red) dreamstone/
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{treasure.scan(/\w+/).last}"
put "put #{treasure.scan(/\w+/).last} in my coat"
elsif treasure =~ /ayanad crystal|hair|heavy quartz orb|(scratched|dented|corroded|shiny|tarnished|ben t|rusty|polished) (ring|fork|cup|plate|medallion|bracelet|fork|earri ng|anklet|spoon)|piece of iron|acantha leaf|coin|potion|ambrominas leaf|tattered cloth|haphip root|torban leaf|woth flower|ephlox moss|lichen|basal moss|sovyn clove|calamia fruit|brick|cupcake|doughnut|table leg|muffin|horseshoe|nail|white flask|smooth stone|tree bark|doorknob|cookie|bone|tart|cupcake/
elsif treasure != nil
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{treasure.scan(/\w+/).last}"
put "stow #{treasure.scan(/\w+/).last}"
treasure = nil
$heirloom = nil
elsif $skin != nil
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{$skin}"
if $skin =~ /claw|scale|spine|hide/
put "put #{$skin} in my cloak"
end
$skin = nil
end
end
if shieldworn
if $jink
put "tap my backpack"
$jink = false
end
put "remove shield"
if !checkleft("shield")
put "put #{treasure.scan(/\w+/).last}"
put "remove shield"
end
shieldworn = false
end
else
sleep 0.1
end
end
This is one of them.
J>;e echo $slavedeath
--- Lich: exec1 active.
[exec1: true]
--- Lich: exec1 has finished.
J>;e echo $slaveskintarget
--- Lich: exec1 active.
[exec1: magus]
--- Lich: exec1 has finished.
This is the other.
>;e echo $slavedeath
--- Lich: exec1 active.
[exec1: false]
--- Lich: exec1 has finished.
What in the hellballs?
Code for first.
$slavedeath = false
while true
line = waitfor("directing the sound of his voice", "YOU HAVE BEEN IDLE TOO LONG", "player whispers(.+) mana")
if line =~ /directing the sound of his voice (.+) (triton|siren|Grimswarm)/
fput "incant 906"
line = waitfor("(rolls over|falls to the ground) and dies", "topples to the ground motionless", "a wrathful look on", "shudders violently", "shudders one last time", "going still", "death overtakes", "Your armor prevents the song from working correctly", "twitching for a moment before", "begins to dissolve from the bottom up", "gives a plaintive wail before she slumps to her side and dies", "emits a hollow scream as ribbons of essence", "Cast Roundtime", "Sing Roundtime", "You do not currently have a target", "wait (1|2|3)", "FUMBLE")
if line =~ /collapses into a heap of quivering jelly|motionless|shudders|going still|death overtakes|begins to dissolve from the bottom up|a plaintive wail before she slumps to her side and dies|emits a hollow scream as ribbons of essence|twitching for a moment before/
$slavedeath = true
elsif line =~ /(orc|troll|giant) (\w+) (rolls over|falls to the ground) and dies/
line.slice(/(orc|troll|giant) (\w+) (rolls over|falls to the ground) and dies/).join(", ")
$slavedeath = true
elsif line =~ /(\w+) gurgles|(.+) collapses/
line.slice(/The triton (.+) (gurgles|collapses)/).join(", ")
$slaveskintarget = $1
$slavedeath = true
end
sleep 3
elsif line =~ /YOU HAVE BEEN IDLE TOO LONG/
fput "exp"
elsif line =~ /player whispers(.+) mana/
put "send 100 gnimble"
else
sleep 0.25
end
end
This is the second.
while true
if $slavedeath == true
echo "THERELKEJR"
if $slaveskintarget =~ /radical|dissembler|magus/
put "skin #{target}"
if target =~ /radical/
$skin = "spine"
elsif target =~ /dissembler/
$skin = "claw"
elsif target =~ /magus/
$skin = "hide"
end
$slaveskintarget = nil
end
put "loot"
line = waitfor("You search", "only loot creatures", "not find a valid")
if line =~ /only loot creatures|not find a valid/
searched = true
$slavedeath = false
else
$slavedeath = false
searched = false
end
until searched
treasureline = waitfor("You gather the remaining", "You spy", "left (.+) behind", "(carried|had) (an?|some) .+ on", "(She|He|It) had (.+) (crystal-tipped|crystal-edged|crystal-studded) (longsword|mace|blade|fork|handaxe|broadsword)", "leaving nothing behind", "scattering and dissolving", "rapidly dissolving", "hideous scaled creature", "decays into compost", "cracks and collapses", "fissures quickly spread", "shudders and crumbles into itself", "crumbles away into dust")
if treasureline =~ /(carried|had) (an?|some) (.+) on/
treasure = $3
item = treasure.scan(/\w+/).last
elsif treasureline =~ /You gather the remaining/
$jink = true
elsif treasureline =~ /left (.+) behind/
treasure = $1
item = treasure.scan(/\w+/).last
elsif treasureline =~ /(She|He|It) had (.+) (crystal-tipped fork|crystal-edged (handaxe|broadsword|longsword|blade)|crystal-studded mace)/
treasure = $3
echo treasure
elsif treasureline =~ /You spy/
$heirloom = Array.new
obj = treasureline.split(/You spy|,/)
$heirloom = obj[1].scan(/\w+/).last
$specialobject = $heirloom
elsif treasureline =~ /crumbles away into dust|leaving nothing behind|scattering and dissolving|rapidly dissolving|hideous scaled creature|decays into compost|cracks and collapses|fissures quickly spread|shudders and crumbles into itself/
searched = true
treasure = nil
$heirloom = nil
else
treasure = nil
end
if $heirloom != nil
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{$heirloom}"
put "stow #{$heirloom}"
end
if treasure =~ /crystal-tipped|crystal-edged|crystal-studded|strongbox|box|chest|trunk|coffer/
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{treasure.scan(/\w+/).last}"
put "put #{treasure.scan(/\w+/).last} in gnimble disk"
put "stow #{treasure.scan(/\w+/).last}"
treasure = nil
$heirloom = nil
$box = true
elsif treasure =~ /(malachite|rhodochrosite|turquoise|morgandite|labr odite|banded sardonyx|adventureine) stone|green garnet|(white|a fire) opal|(golden beryl|bright chrysoberyl|aquamarine) gem|asterfire quartz|(black|grey) moonstone|blue starstone|jacinth|hyacinth|pale water sapphire|amber|spinel|carbuncle|obsidian|fire agate|tourmaline|(clear|pink|blue|smoky|golden) topaz|jasper|almandine garnet|diopside|cordierite|polished (blue|pink|red|black) coral|onyx|amethyst|bloodstone|deathstone|peridot| zircon|chalcedony|heliodor|(yellow|green|blue|blac k|pink|red) dreamstone/
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{treasure.scan(/\w+/).last}"
put "put #{treasure.scan(/\w+/).last} in my coat"
elsif treasure =~ /ayanad crystal|hair|heavy quartz orb|(scratched|dented|corroded|shiny|tarnished|ben t|rusty|polished) (ring|fork|cup|plate|medallion|bracelet|fork|earri ng|anklet|spoon)|piece of iron|acantha leaf|coin|potion|ambrominas leaf|tattered cloth|haphip root|torban leaf|woth flower|ephlox moss|lichen|basal moss|sovyn clove|calamia fruit|brick|cupcake|doughnut|table leg|muffin|horseshoe|nail|white flask|smooth stone|tree bark|doorknob|cookie|bone|tart|cupcake/
elsif treasure != nil
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{treasure.scan(/\w+/).last}"
put "stow #{treasure.scan(/\w+/).last}"
treasure = nil
$heirloom = nil
elsif $skin != nil
if !shieldworn
waitrt?
put "wear shield"
shieldworn = true
end
put "get #{$skin}"
if $skin =~ /claw|scale|spine|hide/
put "put #{$skin} in my cloak"
end
$skin = nil
end
end
if shieldworn
if $jink
put "tap my backpack"
$jink = false
end
put "remove shield"
if !checkleft("shield")
put "put #{treasure.scan(/\w+/).last}"
put "remove shield"
end
shieldworn = false
end
else
sleep 0.1
end
end