Bapeth's Basic Dungeon Chest Looter by barryroser

Description: This script will simply loot the contents of a dungeon chest once it is open.

if timerexists bchestopen removetimer bchestopen endif if findtype 3651|3649|3648|3650|3708|2475 ground -1 -1 2 as bchest dclick bchest @setvar "bchest" lastobject endif if find "bchest" ground -1 -1 2 as bchest clearsysmsg while findtype "cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|hieroglyph|figurine|statue|44987|47107|18653|45127|47105|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|2594|51321|3838|51318|5901|5905|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|17686|3985|17087|5356|29030|24434|22336|29036|3843|29025|51098|8826|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|31021|31023|31029|31043|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|31128|31188|20014|31014|31004|31142|31001|31000|31010|30998|30988|30997|31141|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|3885|3861|3821" bchest as bitem if not timerexists bchestopen createtimer bchestopen overhead "The treasure is mine!" 2091 endif hotkey 'Grab Item' target bitem while queued wait 500 endwhile if insysmsg "That container cannot hold" overhead "My cup runneth over!..." 1779 if not targetexists clearall endif if findtype "gold coin" backpack as gold lift gold 7000 drop "bchest" while queued wait 500 getlabel backpack ping endwhile endif endif if not findtype 3651|3649|3648|3650|3708|2475 ground -1 -1 2 break endif endwhile endif