Bapeth's Trapper BOOM BOOM by barryroser
Description: This script is a one button trap placer and detonator!
1# BOOM BOOM by Bapeth
2#
3# Update : Jan 14th 2025 (Bug fix + added logic)
4#
5# This is a one button Trap placer and detonator, Bind to a hotkey
6#
7# If you want to remove a trap, go into warmode near the trap and play script
8# If you are not close enough to remove the trap (within the purple square), the script will now place a new trap
9#
10# Script starts here...
11
12if not timerexists baptrapcombat
13 createtimer baptrapcombat
14elseif timerexists baptrapcombat
15 settimer baptrapcombat 0
16endif
17
18if warmode and findtype "metal trap" ground -1 -1 2 as removetrap
19 menu removetrap 0
20 warmode off
21 hotkey "Attack Last Combatant"
22elseif warmode and findtype "metal trap" ground -1 -1
23 say "[PlaceTrap"
24 warmode off
25endif
26
27if not findtype 51163 ground
28 getlabel backpack ping
29endif
30
31if not warmode and findtype "metal trap" ground -1 -1 8 and findtype "music box" backpack as boom
32 clearsysmsg
33 say "[DetonateTrap"
34 getlabel backpack ping
35 if insysmsg "You detonate a ground trap"
36 overhead "BOOM!" 88
37 elseif insysmsg "You must wait another"
38 // do nothing
39 elseif insysmsg "You are too far away"
40 overhead "Gotta get closer..." 45
41 elseif insysmsg "You do not have an active floor trap."
42 say "[PlaceTrap"
43 endif
44elseif not warmode
45 if findtype "metal trap" backpack
46 say "[PlaceTrap"
47 endif
48endif
49
50if skill "Tinkering" >= 80
51 script "Bapeths Trapper Background"
52endif