PDA

View Full Version : script to dump all boxes on you while at a table?



deadly
06-13-2009, 07:48 PM
anybody have a script that will auto dump all boxes on you while your at a table? I hate manually looking for my boxes and dumping them.

or does anybody have a script that will work to hand my alt char a box wait for it to get picked then accept the box loot the box dump the box and hand over the next box to player xxx to get picked and wait again?

War Angel
06-13-2009, 09:47 PM
#getall.Cmd

start:
put look
match strongbox Table]




strongbox:
Put get my strongbox
pause
put drop my stro
match strongbox You drop
match box I could not find what you were referring to.
matchwait

box:
Put get my box
pause
put drop my box
match box You drop
match chest I could not find what you were referring to.

matchwait

chest:
Put get my chest
pause
put drop my chest
match chest You drop
match trunk I could not find what you were referring to.
matchwait

trunk:
Put get my trunk
pause
put drop my trunk
match coffer I could not find what you were referring to.
match trunk You drop
matchwait

coffer:
Put get my coff
put drop my coff
match coffer You drop
match exit I could not find what you were referring to.
matchwait

exit:
exit

deadly
06-14-2009, 04:05 AM
sweet thanks.

Gibreficul
06-14-2009, 08:43 AM
#Boxdrop.lic
fput "drop right" if checkright =~ /(?:strong)?box|coffer|chest|trunk/
fput "stow right" if checkright
fput "drop left" if checkleft =~ /(?:strong)?box|coffer|chest|trunk/
fput "stow left" if checkleft
box_list = ["coffer","chest","strongbox","trunk","box"]
fput "turn #{checkname} disk"
box_list.each{ |box|
empty = false
until empty
fput "get my #{box}"
x = matchwait("You already have","Get what?","You remove")
if x =~ /already have|You remove/i
fput "drop my #{box}"
elsif x =~ /Get what/i
empty = true
end
end
}



#TABLE BOX OPENER, CUSTOMER VERSION
unless (checkright and checkleft) == nil
echo "empty your hands and restart"
exit
end
if not script.vars[1]
locksmith = "Gibreficul"
else
locksmith = script.vars[1]
end
boxes = ["box","strongbox","chest","coffer","trunk"]
fput "look"
roomscan = matchwait /(?:You notice|You also see)\s(.*)\./
boxlist = roomscan.scan(/#{boxes.join("|")}/)
echo boxlist.length
boxlist.length.times{
currentbox = boxlist.shift
multifput("get #{currentbox}","give my #{currentbox} to #{locksmith}")
matchwait "#{locksmith} offers you"
multifput("accept","open my #{currentbox}","l in my #{currentbox}","get coins from my #{currentbox}")
sleep 0.5
waitrt?
#start_script("pure",["transfer","#{currentbox}","pouch"])
#wait_while{running? "pure"}
if checkname =~ /Kristianna|gibreficul|byzkit|droiyan/i
fput "empty my #{currentbox} in my cloak"
sleep 0.5
waitrt?
elsif checkname =~ /xenzar|qesto/i
fput "empty my #{currentbox} in my greatcloak"
sleep 0.5
waitrt?
else
echo "THE SCRIPT NEEDS YOU TO BE ADDED TO IT"
end
if checkright =~ /(strong)?box|coffer|chest|trunk/i
if checkroom =~ /\[Silver Avenue, Dead End\]/
multifput("s","drop right","n")
elsif checkroom == "[Gyldemar Road, Sentinels]"
fput "put my #{checkright} in basket"
elsif checkroom == "[Ghorsa Isle, Tower]"
fput "put my #{checkright} in bin"
#elsif checkroom =~ /([Kharam\-Dzu, Town Gates]|[Ta'Illistim, Hanging Gardens])/
#fput "put my #{checkright} in barrel"
elsif checkroom == "[Dragonspine and Krodera]"
fput "put my #{checkright} in tube"
sleep 1
until checkright == nil
multifput("fall","roll","put my #{checkright} in tube")
end
elsif checkroom =~ /table/i
multifput("drop #{checkright}","clean table")
end
else
respond ""
respond "there is something that isn't a box in your hand"
respond ""
end
}
fput "whisper #{locksmith} that was the last one"

deadly
06-14-2009, 11:58 PM
once again gib comes though!

rangent
11-04-2009, 05:39 PM
#Boxdrop.lic
fput "drop right" if checkright =~ /(?:strong)?box|coffer|chest|trunk/
fput "stow right" if checkright
fput "drop left" if checkleft =~ /(?:strong)?box|coffer|chest|trunk/
fput "stow left" if checkleft
box_list = ["coffer","chest","strongbox","trunk","box"]
fput "turn #{checkname} disk"
box_list.each{ |box|
empty = false
until empty
fput "get my #{box}"
x = matchwait("You already have","Get what?","You remove")
if x =~ /already have|You remove/i
fput "drop my #{box}"
elsif x =~ /Get what/i
empty = true
end
end
}



#TABLE BOX OPENER, CUSTOMER VERSION
unless (checkright and checkleft) == nil
echo "empty your hands and restart"
exit
end
if not script.vars[1]
locksmith = "Gibreficul"
else
locksmith = script.vars[1]
end
boxes = ["box","strongbox","chest","coffer","trunk"]
fput "look"
roomscan = matchwait /(?:You notice|You also see)\s(.*)\./
boxlist = roomscan.scan(/#{boxes.join("|")}/)
echo boxlist.length
boxlist.length.times{
currentbox = boxlist.shift
multifput("get #{currentbox}","give my #{currentbox} to #{locksmith}")
matchwait "#{locksmith} offers you"
multifput("accept","open my #{currentbox}","l in my #{currentbox}","get coins from my #{currentbox}")
sleep 0.5
waitrt?
#start_script("pure",["transfer","#{currentbox}","pouch"])
#wait_while{running? "pure"}
if checkname =~ /Kristianna|gibreficul|byzkit|droiyan/i
fput "empty my #{currentbox} in my cloak"
sleep 0.5
waitrt?
elsif checkname =~ /xenzar|qesto/i
fput "empty my #{currentbox} in my greatcloak"
sleep 0.5
waitrt?
else
echo "THE SCRIPT NEEDS YOU TO BE ADDED TO IT"
end
if checkright =~ /(strong)?box|coffer|chest|trunk/i
if checkroom =~ /\[Silver Avenue, Dead End\]/
multifput("s","drop right","n")
elsif checkroom == "[Gyldemar Road, Sentinels]"
fput "put my #{checkright} in basket"
elsif checkroom == "[Ghorsa Isle, Tower]"
fput "put my #{checkright} in bin"
#elsif checkroom =~ /([Kharam\-Dzu, Town Gates]|[Ta'Illistim, Hanging Gardens])/
#fput "put my #{checkright} in barrel"
elsif checkroom == "[Dragonspine and Krodera]"
fput "put my #{checkright} in tube"
sleep 1
until checkright == nil
multifput("fall","roll","put my #{checkright} in tube")
end
elsif checkroom =~ /table/i
multifput("drop #{checkright}","clean table")
end
else
respond ""
respond "there is something that isn't a box in your hand"
respond ""
end
}
fput "whisper #{locksmith} that was the last one"


This is in VB right? What application would you use this in?

pabstblueribbon
11-04-2009, 05:41 PM
That is Ruby. And you use it in Lich.

rangent
11-04-2009, 05:42 PM
Ah, thanks!

Danical
11-04-2009, 05:56 PM
anybody have a script that will auto dump all boxes on you while your at a table? I hate manually looking for my boxes and dumping them.

or does anybody have a script that will work to hand my alt char a box wait for it to get picked then accept the box loot the box dump the box and hand over the next box to player xxx to get picked and wait again?

Here's what I use. You'll want to replace the bolded with the container objects you have. $disk is a global variable I have set up within a background script that checks to see if I have a disk around.




boxes = []

GameObj.inv.find_all { |inv| inv.noun =~ /cloak|backpack|coat/ }.each { |container| container.contents.find_all { |val| val.noun =~ /box|strongbox|coffer|chest|trunk/ }.each { |box| boxes << box.id } }

if $disk
wait_until { RoomObj.loot.inspect =~ /Gnimble disk/ }
fput "look in gnimble disk"
GameObj.loot.find { |obj| obj.name == "Gnimble disk" }.contents.find_all { |val| val.noun =~ /box|strongbox|coffer|chest|trunk/ }.each { |box| boxes << box.id }
end


The above will populate the boxes array with each box type's specific ID tag. With the boxes array you can do something like this if you want to drop them all.

boxes.each { |box| fput "get ##{box}"; fput "put ##{box}" }