def ver="FruitsCandy:120213-0710"; import haven.Gob; import haven.Inventory; import haven.Widget; import haven.UI; import haven.Item; import haven.FlowerMenu; import haven.Coord; import Across.HML; import Across.HML.InventoryController; public void script_run(UI ui){ HML hml=new HML(ui); Inventory inv=hml.getInventory(); if(inv==null){ Across.Config.addLog("인벤토리를 먼저 열어주세요"); return; }else{ InventoryController invc=hml.getInventoryController(inv); if(hml.getDraggedItem()!=null){ Across.Config.addLog("들고있는 아이템은 일단 내려놓고 매크로를 시작하세요"); return; } Item flask=invc.item("waterflask",HML.HML_CONTAINS); if(flask==null){ flask=invc.item("waterskin",HML.HML_CONTAINS); } if(flask==null){ Across.Config.addLog("수통을 찾을 수 없습니다."); return; } Item bucket=invc.item("buckete",HML.HML_ENDSWITH); if(bucket==null){ bucket=invc.item("bucket-water",HML.HML_ENDSWITH); } if(bucket==null){ Across.Config.addLog("버켓을 찾을 수 없습니다."); return; } Gob well=hml.findGob("well", 100,HML.HML_CONTAINS); if(well==null){ Across.Config.addLog("우물을 찾을 수 없습니다."); return; } while(hml.getHungry()>53){ while(hml.getStamina()>50){ hml.sendAction("plow"); Gob pl=hml.getPlayerGob(); hml.mapClick(pl.getc(),1); Thread.sleep(2000); } hml.sendAction(); if(flask.tooltip.contains("Empty")){ bucket=invc.item("bucket-water",HML.HML_ENDSWITH); if(bucket!=null){ invc.take(bucket); Item dragged; while((dragged=hml.getDraggedItem())==null){ Thread.sleep(200); } flask.wdgmsg("itemact", 0); invc.drop(); }else{ bucket=invc.item("buckete",HML.HML_ENDSWITH); invc.take(bucket); Item dragged; while((dragged=hml.getDraggedItem())==null){ Thread.sleep(200); } hml.mapItemAct(well); while(!hml.getResname(dragged).contains("bucket-water")){ Thread.sleep(200); } flask.wdgmsg("itemact", 0); invc.drop(); } while(hml.getDraggedItem()!=null){ Thread.sleep(200); } } flask.wdgmsg("iact", Coord.z); FlowerMenu fm; while((fm=hml.getFlowerMenu())==null){ Thread.sleep(200); } fm.wdgmsg("cl",1); while(hml.getFlowerMenu()!=null){ Thread.sleep(200); } while(hml.getHourGlass()==null){ Thread.sleep(200); } while(hml.getHourGlass()!=null){ Thread.sleep(200); } } } }