Godly.mac
Posted: Fri Jan 01, 2016 7:32 pm
A quick dev script for to avoid cramp.
- give your godly items, move to Lord Drizku and run /mac godly.mac
- give your godly items, move to Lord Drizku and run /mac godly.mac
Code: Select all
Sub Main
/declare strGodlyPoint string local Symbol of the Gods
/declare i int local 0
:GodlyTurn
/if (${i} <= 0 || ${i} >= 4) {
/if (${Window[GiveWnd].Open}) {
/nomodkey /notify GiveWnd GVW_Give_Button leftmouseup
/delay 1s (!${Window[GiveWnd].Open})
/delay 5
}
/varset i 0
}
/call openBags
/call ClearCursor
/if (!${Spawn[NPC =Lord Drizku].ID} && ${Spawn[NPC =Lord Drizku].Distance}>0 && ${Spawn[NPC =Lord Drizku].Distance}<15) {
/echo Godly: exit, Lord Drizku not in range
/return
}
/if (${FindItem[${strGodlyPoint}].InvSlot}) {
/if (${Target.ID}!=${Spawn[NPC =Lord Drizku].ID}) /target id ${Spawn[NPC =Lord Drizku].ID}
/delay 1s (${Target.ID}==${Spawn[NPC =Lord Drizku].ID})
/ctrl /itemnotify ${InvSlot[${FindItem[${strGodlyPoint}].InvSlot}]} leftmouseup
/if (${Target.ID}==${Spawn[NPC =Lord Drizku].ID}) {
/nomodkey /click left target
/delay 1s (!${Cursor.ID})
/if (!${Cursor.ID}) {
/varcalc i ${i} + 1
/goto :GodlyTurn
}
}
/echo Godly: >>>> Lag PROBLEM <<<<, use /endmac to exit
} else {
/echo Godly: exit, no more item to turn
/return
}
/goto :GodlyTurn
/return
||||||||| FUNCTIONS
Sub openBags
/declare i int local
/declare retryTimer timer local
/declare miscTimer timer local
/for i 1 to 8
/varset miscTimer 30
/if (${Me.Inventory[pack${i}].Container}) {
:openBag
/if (!${Window[pack${i}].Open}) {
/itemnotify pack${i} rightmouseup
/delay 5 ${Window[pack${i}].Open} || ${Window[TradeSkillWnd].Open}
/if (!${Window[pack${i}].Open} && !${Window[TradeSkillWnd].Open} && ${miscTimer}) /goto :openBag
/if (${Window[TradeSkillWnd].Open}) {
:openExperimentWnd
/notify TradeSkillWnd ExperimentButton leftmouseup
/delay 5 !${Window[TradeSkillWnd].Open}
/if (${Window[TradeSkillWnd].Open} && ${miscTimer}) /goto :openExperimentWnd
}
}
}
/next i
/return
Sub ClearCursor
:ClearCursor
/if (${Cursor.ID}) {
/autoinventory
/delay 5 (!${Cursor.ID})
/goto :ClearCursor
}
/return