Bapeth's Wizard Hat Stealth Trick by barryroser
Description from the author:
# Bapeths Wizard Hat Stealth Trick
#
# October 7th 2024
#
# This script is uses a "Magical Wizards Hat Hot Swap" with your normal hat in order to artificially reduce stamina when it hits max.
# This prevents the user from stepping on a mob/player while in stealth (even if the player/mob is in stealth/hidden themselves)
#
# "Required"
# A magical wizards hat (the type that changes your stats) in your backpack
# An otherwise non-magical wizard hat (any hat you like to wear, i.e., your main drip)
# "Action Delay Setting"
# This script uses razor "Auto-Queue Object Delay" setting
# Make sure this setting is turned ON in the razor Options tab > Targeting & Queues sub-tab
# Set "object delay to 503" - Hat swap will be slow if you do not do this
#
# "Errors & Resetting hats"
# Navigate to the Script Options Tab
# Delete "bwiz" "bmain" and "nonaspectedwiz" from the list
# Play the script again
#
# Script starts here
if findtype 5912 self and not varexist "bwiz" and findlayer self head as regularhat
getlabel regularhat desc
if "magical" in desc
dclick regularhat
pause 500
getlabel backpack ping
replay
endif
endif
if not find "bwiz" self and findtype 5912 backpack as wizhat
getlabel wizhat desc
if "restyled" in desc
@ignore wizhat
replay
elseif "armored" in desc
@setvar "bwiz" wizhat
elseif "magical" in desc
@setvar "bwiz" wizhat
@setvar "nonaspectedwiz" wizhat
endif
endif
if varexist "bwiz" and find "bwiz" backpack
if not find "bmain" self and findlayer self head as hat
@setvar "bmain" hat
endif
if not varexist "bmain"
overhead "I need a primary hat or helm to wear.." 88
pause 2000
overhead "Anything will do, just not a magical wizard hat..." 88
stop
endif
endif
if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
while queued
//donothing
endwhile
dclick "bwiz"
while queued
//donothing
endwhile
pause 30
dclick "bmain"
pause 500
getlabel backpack ping
endif
if not targetexists and not casting and not findlayer self head and find "bmain" self
while queued
//donothing
endwhile
dclick "bmain"
pause 500
getlabel backpack ping
endif
endif
if varexist "bwiz" and find "bmain" self
if not targetexists and not casting and not find "bwiz" backpack
while queued
//donothing
endwhile
dclick "bmain"
pause 500
getlabel backpack ping
endif
endif
loopThis script enables a "Magical Wizard Hat Hot Swap" with your regular hat, allowing for artificial stamina reduction when it reaches the maximum level. This helps prevent the user from accidentally stepping on a mob or player while in stealth mode—even if the mob or player is also in stealth or hidden.
Requirements:
A magical wizard's hat that alters your stats (stored in your backpack).
A regular, non-magical wizard hat of your choice (your preferred hat or main style).
Errors & Resetting Hats:
If you encounter issues or need to reset the hats:
Go to the Script Options tab.
Remove "bwiz," "bmain," and "nonaspectedwiz" from the list.
Restart the script.