|Lazy mode engaged
|Version 1.0
|Make sure you have meshes to get to PoK
|Uses MQ2Nav, MQ2EasyFind
Sub Main
|This is where you set the amounts for the supplies below. If you change them here also change them for the same variables in the loop.
/declare emerald int local 2000
/declare cloud int local 100
/declare fish int local 1000
/declare water int local 1000
/declare malachite int local 1000
/declare pearl int local 1000
/declare peridot int local 1000
/declare tiny int local 1000
/declare axe int local 2000
/declare poison int local 100
|Don't Change variables below this line.
/declare PoKnowledge int outer 202
/declare EmeraldID int outer 10029
/declare FreshFishID int outer 13019
/declare WaterFlaskID int outer 13006
/declare CloudyPotionID int outer 14514
/declare MalachiteID int outer 10015
/declare PearlID int outer 10024
/declare PeridotID int outer 10028
/declare TinyDaggerID int outer 1308
/declare MasterworkAxeComponentsID int outer 59937
/declare BiteOfTheShissarID int outer 44542
/if (${emerald}>2000) /varset emerald 2000
/if (${cloud}>100) /varset cloud 100
/if (${fish}>1000) /varset fish 1000
/if (${water}>1000) /varset water 1000
/if (${malachite}>1000) /varset malachite 1000
/if (${pearl}>1000) /varset pearl 1000
/if (${peridot}>1000) /varset peridot 1000
/if (${tiny}>1000) /varset tiny 1000
/if (${axe}>2000) /varset axe 2000
/if (${poison}>100) /varset poison 100
|MainLoopHere
/while (1) {
/if (${Select[${Me.Class.ShortName},WAR,BER,MNK]} && ${FindItemCount[Cloudy Potion]} < 100 || ${Select[${Me.Class.ShortName},WAR,BER,MNK]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Cloudy Potion]} < ${cloud}) {
/echo \ayI only have \ar${FindItemCount[Cloudy Potion]} \ay Cloudy Potions. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Mirao Frostpouch].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Cloudy Potion,2]}
/call BuyItem "Cloudy Potion" ${cloud}
}
/if (${Select[${Me.Class.ShortName}]} && ${FindItemCount[Emerald]} < 2000 || ${Select[${Me.Class.ShortName}]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Emerald]} < ${emerald}) {
/echo \ayI only have \ar${FindItemCount[Emerald]} \ay Emeralds. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Jeweler Nonny].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Emerald,2]}
/call BuyItem "Emerald" ${emerald}
}
/if (${Select[${Me.Class.ShortName},MAG]} && ${FindItemCount[Malachite]} < 1000 || ${Select[${Me.Class.ShortName},MAG]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Malachite]} < ${malachite}) {
/echo \ayI only have \ar${FindItemCount[Malachite]} \ay Malachites. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Jeweler Nonny].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Malachite,2]}
/call BuyItem "Malachite" ${malachite}
}
/if (${Select[${Me.Class.ShortName},ROG]} && ${FindItemCount[Bite Of The Shissar XII]} < 1000 || ${Select[${Me.Class.ShortName},ROG]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Malachite]} < ${malachite}) {
/echo \ayI only have \ar${FindItemCount[Bite Of The Shissar XII]} \ay Poisons. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Giftn].ID}
/click right target
/delay 50s ${Window[MerchantWnd].Child[MW_ItemList].List[Bite Of The Shissar XII,2]}
/call BuyItem "Bite Of The Shissar XII" ${Poison}
}
/if (${Select[${Me.Class.ShortName},MAG]} && ${FindItemCount[Pearl]} < 1000 || ${Select[${Me.Class.ShortName},MAG]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Pearl]} < ${pearl}) {
/echo \ayI only have \ar${FindItemCount[Pearl]} \ay Pearls. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Jeweler Nonny].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Pearl,2]}
/call BuyItem "Pearl" ${pearl}
}
/if (${Select[${Me.Class.ShortName}]} && ${FindItemCount[Peridot]} < 1000 || ${Select[${Me.Class.ShortName}]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Peridot]} < ${peridot}) {
/echo \ayI only have \ar${FindItemCount[Peridot]} \ay Peridots. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Jeweler Nonny].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Peridot,2]}
/call BuyItem "Peridot" ${peridot}
}
/if (${Select[${Me.Class.ShortName},ENC]} && ${FindItemCount[Tiny Dagger]} < 1000 || ${Select[${Me.Class.ShortName},ENC]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Tiny Dagger]} < ${tiny}) {
/echo \ayI only have \ar${FindItemCount[Tiny Dagger]} \ay Tiny Daggers. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Darius Gandril].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[TinyDagger,2]}
/call BuyItem "Tiny Dagger" ${tiny}
}
/if (${Select[${Me.Class.ShortName},BER]} && ${FindItemCount[Masterwork Axe Components]} < 2000 || ${Select[${Me.Class.ShortName},BER]} && ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Masterwork Axe Components]} < ${axe}) {
/echo \ayI only have \ar${FindItemCount[Masterwork Axe Components]} \ay Masterwork Axe Components. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Gaddi Buruca].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Masterwork Axe Components,2]}
/call BuyItem "Masterwork Axe Components" ${axe}
}
/if (${FindItemCount[Fresh Fish]} < 1000 || ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Fresh Fish]} < ${fish}) {
/echo \ayI only have \ar${FindItemCount[Fresh Fish]} \ay Fresh Fish. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Angler Winifred].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Fresh Fish,2]}
/call BuyItem "Fresh Fish" ${fish}
}
/if (${FindItemCount[Water Flask]} < 1000 || ${Zone.ID}==${PoKnowledge} && ${FindItemCount[Water Flask]} < ${water}) {
/echo \ayI only have \ar${FindItemCount[Water Flask]} \ay Water Flask. Let's go get more.
|/call EmptyBags
/if (${Zone.ID} != ${PoKnowledge}) {
/call TravelTo "The Plane of Knowledge" ${PoKnowledge}
}
/call NavToID ${Spawn[Angler Winifred].ID}
/click right target
/delay 10s ${Window[MerchantWnd].Child[MW_ItemList].List[Water Flask,2]}
/call BuyItem "Water Flask" ${water}
}
/if (${FindItemCount[Cloudy Potion]} > 99 || ${FindItemCount[Emerald]} > 1999 || ${FindItemCount[Fresh Fish]} > 999 || ${FindItemCount[Water Flask]} > 999) {
/echo I have all my supplies.
/end
}
}
/return
Sub TypeIn(InStr)
/declare char string local
/declare i int local
/for i 1 to ${InStr.Length}
/varset char ${InStr.Mid[${i},1]}
/if (!${char.Length}) {
/nomodkey /keypress Space chat
} else {
/if (${char.Left[1].Equal[(]}) /return
/if (${char.Left[1].Equal[)]}) /return
/nomodkey /keypress ${char} chat
}
/next i
/return
Sub BuyItem(string ItemToBuy, int amount)
/if (${FindItemCount[${ItemToBuy}]}>= ${amount}) /return
/declare i int local
/declare QTY int local
/varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]}
/declare ListItem int local ${Window[MerchantWnd].Child[ItemList].List[=${ItemToBuy},2]}
/declare count int local ${FindItemCount[${ItemToBuy}]}
/if (!${ListItem}) {
/echo couldn't find ${ItemToBuy}
/return
} else {
/notify MerchantWnd ItemList listselect ${ListItem}
/delay 5
}
/echo Buying ${ItemToBuy} Till I get ${amount}
:BuyLoop
/while (${QTY}>0) {
/varset count ${FindItemCount[${ItemToBuy}]}
/if (${QTY}>999) {
/buyitem 1000
/delay 3 ${FindItemCount[${ItemToBuy}]} > ${count}
/varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]}
} else /if (${QTY}>0 && ${QTY}<1000) {
/buyitem ${QTY}
/delay 5 ${FindItemCount[${ItemToBuy}]} > ${count}
/varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]}
}
/if (${FindItemCount[${ItemToBuy}]}>${count}) /echo \ar${FindItemCount[${ItemToBuy}]}\aw/\ar${amount}\awx\ap${ItemToBuy} \at${Math.Calc[${FindItemCount[${ItemToBuy}]}/${amount}*100]}\aw% Done.
}
/while (${Window[MerchantWnd].Open}) {
/cleanup
/delay 5
}
/return
Sub NavToID(int id)
|/call EmptyBags
/if (${Spawn[id ${id}].ID}) {
/nav id ${id}
/delay 2s ${Navigation.Active}
/while (${Navigation.Active}) {
/if (${Spawn[id ${id}].Distance3D} > 15) {
/delay 5
} else {
/break
}
}
/if (${Spawn[id ${id}].Distance3D} < 15) {
/target id ${id}
/delay 2s ${Target.ID}==${id}
/face fast
}
}
/return
|Sub EmptyBags
/call CursorClear
/keypress OPEN_INV_BAGS
/delay 5
/if (${FindItemCount[Rusty]} || ${FindItemCount[=Small Lantern]} || ${FindItemCount[=Small Tattered Gloves]} || ${FindItemCount[=Torch]} || ${FindItemCount[=Small Patchwork Tunic]} || ${FindItemCount[=Small Tattered Skullcap]} || ${FindItemCount[=Small Patchwork Sleeves]} || ${FindItemCount[=Small Patchwork Pants]}) {
/declare itemList string local Rusty|Small Lantern|Small Tattered Gloves|Torch|Small Patchwork Tunic|Small Tattered Skullcap|Small Patchwork Sleeves|Small Patchwork Pants
/declare ItemArray[8] string local -1
/declare i int local 0
/for i 1 to 8
/varset ItemArray[${i}] "${itemList.Arg[${i},|]}"
/next i
/keypress OPEN_INV_BAGS
/delay 10
:CheckAgain
/for i 1 to ${ItemArray.Size}
/if (${FindItemCount[${ItemArray[${i}]}]}) {
/shift /itemnotify ${FindItem[${ItemArray[${i}]}].InvSlot} leftmouseup
/delay 5 ${Cursor.ID}
/if (${Cursor.ID}) {
/if (${Cursor.ID} != ${BoneChipID}) {
/destroy
} else {
/autoinv
}
}
}
/next i
/call CursorClear
/if (${FindItemCount[Rusty]} || ${FindItemCount[=Small Lantern]} || ${FindItemCount[=Small Tattered Gloves]} || ${FindItemCount[=Torch]} || ${FindItemCount[=Small Patchwork Tunic]} || ${FindItemCount[=Small Tattered Skullcap]} || ${FindItemCount[=Small Patchwork Sleeves]} || ${FindItemCount[=Small Patchwork Pants]}) /goto :CheckAgain
}
/return
Sub CursorClear
/while (${Cursor.ID}) {
/if (${Cursor.ID}) {
/if (${Cursor.ID} != ${BoneChipID}) {
/destroy
} else {
/autoinv
}
}
/delay 1
}
/return
Sub ClearChat(parent, child)
|ZoneGuideWnd ZGW_ZoneSelect_EditBox
/while (${Window[${parent}].Child[${child}].Text.Length}>0) {
/ctrlkey /shiftkey /keypress home chat
/delay 5
/ctrlkey /shiftkey /keypress delete chat
/delay 5
}
/return
Sub TravelTo(string destination, int destinationID)
/if (!${Window[ZoneGuideWnd].Open}) {
/windowstate ZoneGuideWnd open
/delay 5s ${Window[ZoneGuideWnd].Open}
/delay 5
}
/notify ZoneGuideWnd ZGW_ZoneSelect_EditBox leftmouseup
/call ClearChat "ZoneGuideWnd" "ZGW_ZoneSelect_EditBox"
/delay 5
/call TypeIn "${destination}"
/delay 1s ${Window[ZoneGuideWnd].Child[ZGW_SearchZones_Btn].Enabled}
/notify ZoneGuideWnd ZGW_SearchZones_Btn leftmouseup
/delay 3s ${Window[ZoneGuideWnd].Child[ZGW_Zones_ListBox].List[${destination},1]}
/declare ListItem int local ${Window[ZoneGuideWnd].Child[ZGW_Zones_ListBox].List[${destination},1]}
/if (!${ListItem}) {
/echo \arSomething is wrong. I can't seem to find the Zone on the list.
/beep
/end
}
/notify ZoneGuideWnd ZGW_Zones_ListBox listselect ${ListItem}
/delay 5
/notify ZoneGuideWnd ZGW_SetEnd_Btn leftmouseup
/delay 5s ${Window[ZoneGuideWnd].Child[ZGW_PathEndZone_EditBox].Text.Equal[${destination}]}
/while (!${Navigation.Active}) {
/if (${Window[ZoneGuideWnd].Child[ZGW_ClearPath_Btn].Enabled}) {
/notify ZoneGuideWnd ZGW_ClearPath_Btn leftmouseup
}
/notify ZoneGuideWnd ZGW_ActivatePath_Btn leftmouseup
/delay 1s ${Navigation.Active}
}
/while (${Zone.ID} != ${destinationID}) {
/delay 5
/if (${Window[LargeDialogWindow].Open}) {
/notify LargeDialogWindow LDW_YesButton leftmouseup
}
}
/delay 5s
/return