Renian
07-25-2008, 02:57 PM
Webs piss me off in OTF. So I decided that I wasn't going to stand for their bullshit anymore.
First off, the movement code that I was using to trigger it.
move $movearray[$i]
$i = $i + 1
if $i == $movearray.length
$i = 0
end
target_line = matchtimeout 2, "sticky web", "Obvious paths", "Obvious exits"
if target_line =~ /sticky web/i
web_destroy()
end
Now, the subroutine. I haven't seen it use golden wands yet, but it does vials perfectly, which may be more than enough.
def web_destroy
fput "get my golden wand"
target_line = matchtimeout 2, "You remove", "Get what?"
if target_line =~ /You remove/i
fput "Wave my wand at web"
target_line = matchtimeout 2, "Portions of the sticky web", "Portions of the burning web", "wand does not activate", "last of the webbing turns to ash", "You do not see that here."
while target_line =~ /Portions of the (sticky|burning) web|wand does not activate/i
sleep 3
fput "wave my wand at web"
target_line = matchtimeout 2, "Portions of the sticky web", "Portions of the burning web", "wand does not activate", "last of the webbing turns to ash", "You do not see that here."
end
if target_line =~ /last of the webbing turns to ash|You do not see that here./i
fput "put my wand in my cloak"
else
fput "drop wand"
web_destroy()
end
elsif target_line =~ /Get what?/i
fput "get my thick vial"
target_line = matchtimeout 2, "You remove", "Get what?"
if target_line =~ /You remove/i
fput "throw my vial at web"
target_line = matchtimeout 3, "last of the webbing turns to ash", "You do not see that here."
if target_line =~ /You do not see that here/
fput "put my vial in my cloak"
else
sleep 3
end
else
echo "There is a web in the way. Pausing the script."
pause_script
end
end
end
First off, the movement code that I was using to trigger it.
move $movearray[$i]
$i = $i + 1
if $i == $movearray.length
$i = 0
end
target_line = matchtimeout 2, "sticky web", "Obvious paths", "Obvious exits"
if target_line =~ /sticky web/i
web_destroy()
end
Now, the subroutine. I haven't seen it use golden wands yet, but it does vials perfectly, which may be more than enough.
def web_destroy
fput "get my golden wand"
target_line = matchtimeout 2, "You remove", "Get what?"
if target_line =~ /You remove/i
fput "Wave my wand at web"
target_line = matchtimeout 2, "Portions of the sticky web", "Portions of the burning web", "wand does not activate", "last of the webbing turns to ash", "You do not see that here."
while target_line =~ /Portions of the (sticky|burning) web|wand does not activate/i
sleep 3
fput "wave my wand at web"
target_line = matchtimeout 2, "Portions of the sticky web", "Portions of the burning web", "wand does not activate", "last of the webbing turns to ash", "You do not see that here."
end
if target_line =~ /last of the webbing turns to ash|You do not see that here./i
fput "put my wand in my cloak"
else
fput "drop wand"
web_destroy()
end
elsif target_line =~ /Get what?/i
fput "get my thick vial"
target_line = matchtimeout 2, "You remove", "Get what?"
if target_line =~ /You remove/i
fput "throw my vial at web"
target_line = matchtimeout 3, "last of the webbing turns to ash", "You do not see that here."
if target_line =~ /You do not see that here/
fput "put my vial in my cloak"
else
sleep 3
end
else
echo "There is a web in the way. Pausing the script."
pause_script
end
end
end