Please help me b4 i poke this blunt stick in my other eye
Posted: Thu Apr 29, 2004 5:11 pm
trying to convert my fletch mac, i am either close or i have made a right pigs ear of it.
this is what i have so far, feel free to chastise me where needed.
i know im not perfect on success rate but skill up is doing my head in and i have not even started it yet.
this is what i have so far, feel free to chastise me where needed.
Code: Select all
|===========================================|
| V1.0 |
|___________________________________________|
|fletch.mac MQ2Data Compliant by Fuergrissa |
|___________________________________________|
#Event SkillUp "You have become better at"
#Event nocomp "You are missing"
#Event SkillTrivial "You can no longer advance your skill from making this item"
#Event FullInventory "There was no place to put that"
#Event SkillFailure "You lacked the skills"
#Event SkillSuccess "You have fashioned the items together to create something new"
Sub Main
/declare SkillFailCounter int global
/declare SkillSuccessCounter int global
/declare SuccessRate int global
/declare TotalAttempts int global
/declare ParseSkillLevel int global
/declare ParseSkill int global
/declare PositionStart int global
/declare PositionEnd int global
/varset SkillFailCounter 0
/varset SkillSuccessCounter 0
/varset SuccessRate 0
/varset TotalAttempts 0
:mainloop
/doevents
/call Combine
/goto :mainloop
/end
Sub Combine
/notify COMBW_CombineArea CombineButton leftmouseup
/delay 2
/if (${Cursor.ID}) /autoinv
/return
Sub DisplayStats
/echo Combine Statistics - Successes: ${SkillSuccessCounter}, Failures: ${SkillFailCounter}
/varcalc ${TotalAttempts} ${SkillFailCounter} + ${SkillSuccessCounter}
/varcalc ${SuccessRate} ${SkillSuccessCounter} / ${TotalAttempts} * 100
/echo Success Rate: ${SuccessRate} % out of ${TotalAttempts} attempts
/return
Sub Event_SkillUp(SkillUpText)
/varset PositionStart ${Math.Calc[${String[@SkillUpText].Find[! (]}+3]}
/varset PositionEnd ${String[@SkillUpText].Find[")"]}
/varset ParseSkillLevel ${String[@SkillUpText].Mid[@PositionStart,${Math.Calc[@PositionEnd-@PositionStart]}]}
/varset PositionStart ${Math.Calc[${String[@SkillUpText].Find[at]}+3]}
/varset PositionEnd ${String[@SkillUpText].Find[!]}
/varset ParseSkill ${String[@SkillUpText].Mid[@PositionStart,${Math.Calc[@PositionEnd-@PositionStart]}]}
/popup "@ParseSkill increased - @ParseSkillLevel ..."
/echo "@ParseSkill increased - @ParseSkillLevel ..."
/return
Sub Event_nocomp
/echo "You have run out of Componants. ((Ending Macro)) "
/popup You have run out of Componants. ((Ending Macro))
/if (${Cursor.ID}) /autoinv
/call DisplayStats
/end
Sub Event_SkillTrivial
/echo "You can no longer advance your skill from making this item. ((Ending Macro))"
/popup You can no longer advance your skill from making this item. ((Ending Macro))
/if (${Cursor.ID}) /autoinv
/call DisplayStats
/end
Sub Event_FullInventory
/echo "Your inventory is full, ((( Ending Macro ))) "
/popup Your inventory is full, ((( Ending Macro )))
/call DisplayStats
/end
Sub Event_SkillFailure
/varcalc SkillFailCounter ${SkillFailCounter}+1
/return
Sub Event_SkillSuccess
/varcalc SkillSuccessCounter ${SkillSuccessCounter}+1
/return
Code: Select all
Sub Event_SkillUp(SkillUpText)
/varset PositionStart ${Math.Calc[${String[@SkillUpText].Find[! (]}+3]}
/varset PositionEnd ${String[@SkillUpText].Find[")"]}
/varset ParseSkillLevel ${String[@SkillUpText].Mid[@PositionStart,${Math.Calc[@PositionEnd-@PositionStart]}]}
/varset PositionStart ${Math.Calc[${String[@SkillUpText].Find[at]}+3]}
/varset PositionEnd ${String[@SkillUpText].Find[!]}
/varset ParseSkill ${String[@SkillUpText].Mid[@PositionStart,${Math.Calc[@PositionEnd-@PositionStart]}]}
/popup "@ParseSkill increased - @ParseSkillLevel ..."
/echo "@ParseSkill increased - @ParseSkillLevel ..."
/return