Begging with target lock by Brozan (Syal)
Description: Begging script that locks onto a single invuln NPC at a time until you are in range and it can beg. Bind to a hotkey and press again after it begs to target a new NPC. Utilizes an ignore list to avoid begging same target repeatedly
1clearsysmsg
2
3#Make sure list exists
4createlist 'IgnoreNPC'
5
6
7unsetvar 'daggerlyDagger'
8#set up dagger variable
9if findtype 3922 'backpack' as 'mydagger'
10 overhead 'Dagger Set'
11 @setvar 'daggerlyDagger' 'mydagger'
12else
13 overhead 'No dagger found in pack, need one'
14 stop
15endif
16
17while not dead
18 hotkey 'Next Humanoid Target'
19 wait 250
20 @setvar! 'lastserial' lasttarget
21 if noto 'lastserial' = innocent
22 pushlist 'IgnoreNPC' 'lastserial'
23 elseif noto 'lastserial' = invulnerable and not inlist 'IgnoreNPC' 'lastserial'
24 #found a target now dagger
25 dclick 'daggerlyDagger'
26 wft 1500
27 target 'lastserial'
28 #Pause so sysmsg can populate
29 wait 350
30 while not insysmsg 'use a bladed item on that'
31 #Lock target, wait til we're closer
32 dclick 'daggerlyDagger'
33 wft 1500
34 target 'lastserial'
35 #Pause so sysmsg can populate
36 wait 350
37 endwhile
38
39 # Close to NPC
40 hotkey 'Begging'
41 wft 1800
42 target 'lastserial'
43 wait 500
44 while insysmsg "must wait"
45 wait 350
46 hotkey 'Begging'
47 wft 1800
48 target 'lastserial'
49 wait 350
50 endwhile
51 pushlist 'IgnoreNPC' 'lastserial'
52 endif
53endwhile