Back to "b" tags

backstabberHide by tarouca

Related: Stealth backstab

1# THIS SCRIPT DEPENDS FROM:
2# SCRIPTS: backstabberSetup
3# COOLDOWNS: Tactics, Weapon Ability, Smoke Bomb, Health Potion, Hiding, Rope
4# TO SET THIS COOLDOWNS:
5# PAPERDOLL > OPTIONS > COOLDOWNS > NEW ENTRY
6# ALL COOLDOWNS SHOULD BE SET AS MENTIONED (Tactics, Weapon Ability, Smoke Bomb, Health Potion, Hiding, Rope)
7# ON EACH CHECK: HIDE WHEN INACTIVE, PAUSE DURING WORLD SAVE
8# MOUNT TOKEN
9
10# OVERHEAD MESSAGES ARE USEFUL
11# TO SETUP OVERHEAD MESSAGES:
12# RAZOR > DISPLAY/COUNTERS > OVERHEAD MESSAGES
13# CHECK: SHOW
14# ADD MESSAGE FOR: stealth steps remaining. WITH OVERHEAD OF: {3} STEPS
15# ADD MESSAGE FOR: You feel ready to continue stealthing. WITH OVERHEAD OF: RENEWED
16# ADD MESSAGE FOR: You will automatically stealth when out of steps. WITH OVERHEAD OF: RENEWED
17
18# TO SETUP ENSURE YOU EDIT THE backstabberSetup SCRIPT
19# ADJUST THE lagTimer_ TO YOUR LIKING OR LEAVE IT AS IS
20# ADJUST THE smokeBombCooldown_ TO REFLECT YOUR COOLDOWN (120000 IS THE BASE)
21# ADJUST THE useMagery_ TO 0 IF TEMPLATE HAS MAGERY < 60
22# IF MAGERY >= 60 INVISIBILITY SCROLLS ARE NEEDED
23# REGARDING SERIALS REPLACE XXXXXXXXXX BY THE SERIALS OF YOUR ITEMS:
24# IF NOT USING 2 WEAPON SKILLS, SET THE myBow_ WITH THE SAME VALUE AS myMace_
25# A MAGICAL WIZARD HAT IS NEEDED TO KEEP A DIFFERENCE IN STAMINA SO THAT ON MOVEMENT CHARACTER WONT GET OUT OF STEALTH
26# SET SERIALS FOR: myMount_, myHeadPiece_, myWizardHat_, myMace_, myBow_
27
28setvar notStealthing_ 1
29setvar checkSteps_ 1
30
31warmode "on"
32warmode "off"
33
34if hp < 90 and not cooldown "Health Potion" and findtype "Yellow Potion" backpack
35    dclicktype "Yellow Potion"
36    cooldown "Health Potion" 11000
37endif
38
39if not dead lasttarget and find lasttarget ground -1 -1 12
40    if not hidden and not cooldown "Smoke Bomb" and findtype "bombs" backpack and not cooldown "Hiding" and not cooldown "Rope"
41        say "[SmokeBomb"
42        wait lagTimer_
43        wait lagTimer_
44        if hidden
45            cooldown "Smoke Bomb" smokeBombCooldown_
46            setvar notStealthing_ 0
47            if mounted
48                dclick myMount_
49            endif
50        endif
51    endif
52    if not cooldown "Hiding"
53        useskill "Hiding"
54        wait lagTimer_
55        wait lagTimer_
56        if hidden
57            cooldown "Hiding" 10000
58        endif
59    endif
60else
61    if not cooldown "Hiding"
62        useskill "Hiding"
63        wait lagTimer_
64        wait lagTimer_
65        if hidden
66            cooldown "Hiding" 10000
67        endif
68    endif
69    if not hidden and not cooldown "Smoke Bomb" and findtype "bombs" backpack and not cooldown "Hiding" and not cooldown "Rope"
70        say "[SmokeBomb"
71        wait lagTimer_
72        wait lagTimer_
73        if hidden
74            cooldown "Smoke Bomb" smokeBombCooldown_
75            setvar notStealthing_ 0
76            if mounted
77                dclick myMount_
78            endif
79        endif
80    endif
81endif  
82    
83if useMagery_ = 1 and not hidden
84    if mana >= 20 and skill "magery" >= 60
85        if findtype "Invisibility Scrol" backpack or skill "magery" >= 80
86            overhead "CASTING INVISIBILITY" 43
87            hotkey "Invisibility"
88            waitfortarget 
89            target "self"
90            wait lagTimer_
91            wait lagTimer_
92            wait lagTimer_
93            useskill "Hiding"
94            cooldown "Hiding" 10000
95        else 
96            overhead "SCROLL/REGS" 28
97        endif
98    else 
99        overhead "MANA/SKILL" 28
100    endif
101endif
102
103if hidden and mounted
104    dclick myMount_
105endif
106
107clearsysmsg
108while hidden
109    if find myMace_ backpack
110        dclick myMace_
111    endif
112    while notStealthing_ = 1 and hidden
113        if timer "dontWalkOverheadTimer_" > dontWalkOverheadTimerTarget_
114            overhead "DONT WALK" 28
115            settimer "dontWalkOverheadTimer_" 0
116        endif
117        if insysmsg "You feel comfortable enough to begin stealthing."
118            setvar notStealthing_ 0
119            overhead "STEALTH"
120        endif
121    endwhile
122    if stam = maxstam and timer "staminaControlTimer_" > staminaControlTimerTarget_
123        dclick myWizardHat_ backpack
124        dclick myHeadPiece_ backpack
125        settimer "staminaControlTimer_" 0
126    endif
127    if checkSteps_ = 1
128        if insysmsg "You have 4 stealth steps remaining." or insysmsg "You have 3 stealth steps remaining." or insysmsg "You have 2 stealth steps remaining." 
129            overhead "WARNING" 43
130        elseif insysmsg "You have 1 stealth steps remaining." or insysmsg "You have 0 stealth steps remaining."
131            overhead "STOP" 28
132        endif
133    endif
134    if insysmsg "You have 0 stealth steps remaining." and checkSteps_ = 0
135        setvar checkSteps_ 1
136    endif
137    if insysmsg "You will automatically stealth when out of steps." and checkSteps_ = 1
138        setvar checkSteps_ 0
139    endif  
140endwhile