Bapeth's Wizard Hat Stealth Trick by barryroser
Description: This 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.
1# Bapeths Wizard Hat Stealth Trick
2#
3# October 7th 2024
4#
5# This script is uses a "Magical Wizards Hat Hot Swap" with your normal hat in order to artificially reduce stamina when it hits max.
6# This prevents the user from stepping on a mob/player while in stealth (even if the player/mob is in stealth/hidden themselves)
7#
8# "Required"
9# A magical wizards hat (the type that changes your stats) in your backpack
10# An otherwise non-magical wizard hat (any hat you like to wear, i.e., your main drip)
11
12# "Action Delay Setting"
13# This script uses razor "Auto-Queue Object Delay" setting
14# Make sure this setting is turned ON in the razor Options tab > Targeting & Queues sub-tab
15# Set "object delay to 503" - Hat swap will be slow if you do not do this
16#
17# "Errors & Resetting hats"
18# Navigate to the Script Options Tab
19# Delete "bwiz" "bmain" and "nonaspectedwiz" from the list
20# Play the script again
21#
22# Script starts here
23
24if findtype 5912 self and not varexist "bwiz" and findlayer self head as regularhat
25 getlabel regularhat desc
26 if "magical" in desc
27 dclick regularhat
28 pause 500
29 getlabel backpack ping
30 replay
31 endif
32endif
33if not find "bwiz" self and findtype 5912 backpack as wizhat
34 getlabel wizhat desc
35 if "restyled" in desc
36 @ignore wizhat
37 replay
38 elseif "armored" in desc
39 @setvar "bwiz" wizhat
40 elseif "magical" in desc
41 @setvar "bwiz" wizhat
42 @setvar "nonaspectedwiz" wizhat
43 endif
44endif
45if varexist "bwiz" and find "bwiz" backpack
46 if not find "bmain" self and findlayer self head as hat
47 @setvar "bmain" hat
48 endif
49 if not varexist "bmain"
50 overhead "I need a primary hat or helm to wear.." 88
51 pause 2000
52 overhead "Anything will do, just not a magical wizard hat..." 88
53 stop
54 endif
55endif
56
57if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
58 if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
59 while queued
60 //donothing
61 endwhile
62 dclick "bwiz"
63 while queued
64 //donothing
65 endwhile
66 pause 30
67 dclick "bmain"
68 pause 500
69 getlabel backpack ping
70 endif
71 if not targetexists and not casting and not findlayer self head and find "bmain" self
72 while queued
73 //donothing
74 endwhile
75 dclick "bmain"
76 pause 500
77 getlabel backpack ping
78 endif
79endif
80if varexist "bwiz" and find "bmain" self
81 if not targetexists and not casting and not find "bwiz" backpack
82 while queued
83 //donothing
84 endwhile
85 dclick "bmain"
86 pause 500
87 getlabel backpack ping
88 endif
89endif
90loop