13 Jun 23, 07:02PM
Mouse sensitivity finder menu for AC 1.3+:
[SELECT ALL] Code:
// Sensitivity finder menu for AC 1.3+ by Bukz
// use /showmenu $BUKZ_SENS_FINDER_MENU_NAME or bind it to a key if you would like
const BUKZ_SENS_FINDER_MENU_NAME "Bukz's Sensitivity Finder"
const bukz_sens_finder_refreshMenu [ closemenu $BUKZ_SENS_FINDER_MENU_NAME; sleep 0 [ showmenu $BUKZ_SENS_FINDER_MENU_NAME ] ]
alias BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE 3.25 // should be less than 100 and greater than 0
const bukz_sens_finder_updateAliases [
tempalias bukz_sens_finder_multiplier (divf $BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE 100.0)
tempalias bukz_sens_finder_step (*f $sensitivity $bukz_sens_finder_multiplier)
]
const bukz_sens_finder_tryPercentage [
if (! (&& (>f $arg1 0) (<f $arg1 100))) [
echo "\f3CRITICAL ERROR: \f5alias \f2" (addpunct BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE 0) " \f5is not in the valid range. It should be \f3less than 100 \f5and \f0greater than 0"
echo "\f1Current value: \f5" $BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE
] [
BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE = $arg1
echo "\f1Changed \f2BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE \f1to: \f5" $BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE
]
]
const bukz_sens_finder_trySens [
if (checkrange $arg1 0.001 1000.0) [
bukz_sens_finder_testSensitivity = $arg1
sensitivity $bukz_sens_finder_testSensitivity
echo "\f1Changed sensitivity to: \f5" $sensitivity
bukz_sens_finder_updateAliases
bukz_sens_finder_refreshMenu
] [ echo "\f3Error: \f5" $arg1 " must be less than 100 and greater than 0" ]
]
bukz_sens_finder_testSensitivity = $sensitivity
bukz_sens_finder_tryPercentage $BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE
newmenu $BUKZ_SENS_FINDER_MENU_NAME
menuinit [ menuinitselection 4; bukz_sens_finder_updateAliases ]
menuitem "" -1
menuitemtextinput "\f1Change sensitivity percentage: \f5" "$BUKZ_SENS_FINDER_SENSITIVITY_PERCENTAGE" [ bukz_sens_finder_tryPercentage $arg1 ]
menuitemgreyedout 1
menuitemtextinput "\f1Your current sensitivity is: \f5" "$sensitivity"
menuitemgreyedout 0
menuitem "" -1
menuitem "This sensitivity is \f3too low \f5for me." [ bukz_sens_finder_trySens (+f $sensitivity $bukz_sens_finder_step) ]
menuitem "This sensitivity is \f0too high \f5for me." [ bukz_sens_finder_trySens (-f $sensitivity $bukz_sens_finder_step) ]
menuitem "" -1
menuitem " \f0[Save Current Sensitivity & Close]" [ alias bukz_sens_finder_idealSens $sensitivity; echo "\f1Your current sensitivity has been stored in alias \f2bukz_sens_finder_idealSens"; closemenu $BUKZ_SENS_FINDER_MENU_NAME ]
menuitem " \f1[Refresh]" [ bukz_sens_finder_refreshMenu ]
menuitem " \f3[Close]" [ closemenu $BUKZ_SENS_FINDER_MENU_NAME ]