Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;===================================
- ; Script Name: Unattended Macro Alarm Alerter
- ; Author: Callum O'Lyre
- ; ICQ: 625-658-845
- ; Version: 1.0
- ; Shard: Pangaea
- ; Public Release: 22.07.2013
- ; Purpose: To alert when specific gumps appear on Pangaea.
- ; Originally Posted: http://pastebin.com/u/DavidJSGardner
- ;===============Note================
- ; If you want to test that this is working as intended,
- ; you will need to bring up the .options gump as I block
- ; the .online gump as well as a couple other gumps from
- ; sounding the alarm.
- ;===================================
- ; You will need to edit the %SoundFile Variable, DO NOT
- ; EDIT the two below it, there is a sub I left in here
- ; that uses them, It's purpose is to alert when hostiles
- ; are found within 18 tiles of you (Reds as I recall)
- ; but could easily be changed to alert when enemy guild/
- ; Religion members are around you or anyone.
- ;===================================
- Set %SoundFile MacroAlert.wav
- Set %SFHT #SCNT
- Set %STimer #SCNT
- While #True
- {
- GoSub ScanForHostiles 10
- if #contname = generic_gump && #contSize <> 420_340 && #contSize <> 310_490 && #contSize <> 220_440 && #contSize <> 178_108 && #contSize <> 382_256 && #contSize <> 382_231 && #ContSize <> 520_410 && #ContSize <> 430_560
- {
- gosub RKVisualAlert #true Gump
- }
- if #weight >= 510
- {
- gosub RKVisualAlert #true Weight
- }
- }
- ;======begin the sub of interest
- ;===========
- ;**
- ;* @name RKVisualAlert
- ;* @ver 1.0 23Oct04
- ;* @author Roadkill
- ;* @purpose
- ;* @params %1 optional, default #false. #true/#false, if #true it
- ;* makes sound alarm also
- ;* @returns
- ;* @example call rksubs.txt RKVisualAlert #true
- ;* @status tested good
- sub RKVisualAlert
- set !0 black
- set !1 red
- set !a 0
- set !b 1
- if %0 > 0 && %1 = #true
- {
- set %SoundCue #true
- }
- set *GlobalPause #True
- set *GlobalReason %2
- VAloop:
- menu Clear
- menu Window Title Roadkill's VisualAlerter
- menu Window Color ! . !a
- menu Window Size 500 300
- menu Font Name MS Sans Serif
- menu Font Size 40
- menu Font Style b
- menu Font bgcolor ! . !a
- menu Font Color ! . !b
- menu Font Transparent #false
- menu Font Align center
- menu Text fook 50 50 FOOOKKKKK!!$ DO$ SOMETHING!
- menu font color white
- menu font size 15
- menu Font Align center
- menu Show
- if %SoundCue <> #False && %STimer < #SCNT
- {
- sound %SoundFile
- set %STimer #SCNT + 4
- }
- wait 2
- set !a ( !a - 1 ) abs ; 1
- set !b ( !b - 1 ) abs ; 0
- if #contname <> generic_gump && %2 = Gump
- {
- goto stopalert
- }
- if #weight < 510 && %2 = Weight
- {
- goto stopalert
- }
- goto VAloop
- stopalert:
- set *GlobalPause #False
- set *GlobalReason #SPC
- menu clear
- menu hide
- return
- Sub ScanForHostiles
- FindItem #CharID
- if %SFHT < #SCNT
- {
- Set %SCHWT %1
- FindItem HS_IS G_18
- For #FINDINDEX 1 #FINDCNT
- {
- While #FindRep = 5
- {
- sound %SoundFile
- wait 4s
- OnHotKey ESC
- {
- wait 1s
- return
- }
- }
- }
- Set %SFHT #SCNT + %SCHWT
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement