Post by Darth Maul on May 24, 2018 5:24:28 GMT
Auto Private Message ALL Online Players [NoxiousOT]
These scripts will:
elfbotscripts.freeforums.net/post/4787/thread
I created a small macro using autohotkey, this is a compiled version of that macro. I.e. All you have to do is download the file, and run it to generate a list of online players.
Download this file:
pull_onlinelist_noxiousot.exe (811 KB)
pull_onlinelist_noxiousot.ahk (440 B)
This is the macros code, incase you want to edit it, or make one for another server:
If you do want to make one for another server, all you need to change is this line: UrlDownloadToFile, % "http://www.noxiousot.com/index.php?subtopic=whoisonline", TempFile
Using elfbot, you can access this list and start messaging players with this script. Make sure to place the generated 'onlinelist.txt' into your elfsettings folder.
$msg is the message that gets sent to each player.
$delay is the time between sending messages, increase this if you get muted for sending messages too fast.
Incase you don't know how to make the elfbot part, you can download this file: auto pm online players - NOX.elfc (1.28 KB)
The macro could be edited to continue to run and repeat the download of the onlinelist after x time to make it more autonomous.
Edit:
Using the script below, you can take out the space in the first position of each line.
These scripts will:
- Pull a list of names from an OTs website, and save that to a text file. (using a macro)
- Use the list that's generated to private message players. (using elfbot)
elfbotscripts.freeforums.net/post/4787/thread
I created a small macro using autohotkey, this is a compiled version of that macro. I.e. All you have to do is download the file, and run it to generate a list of online players.
Download this file:
pull_onlinelist_noxiousot.exe (811 KB)
pull_onlinelist_noxiousot.ahk (440 B)
This is the macros code, incase you want to edit it, or make one for another server:
If you do want to make one for another server, all you need to change is this line: UrlDownloadToFile, % "http://www.noxiousot.com/index.php?subtopic=whoisonline", TempFile
Output := ""
UrlDownloadToFile, % "http://www.noxiousot.com/?subtopic=whoisonline", TempFile
FileRead, HTML, TempFile
FileDelete, TempFile
Needle := "<a href=""\?subtopic=characters&name=[^>]+>(?P<Name>[^<]+)"
Pos := 1
While (Pos := RegExMatch(HTML, Needle, Match, Pos + StrLen(Match)))
Output .= MatchName "`r`n"
;MsgBox, % Output
FileDelete, playerlist_noxiousot.txt
FileAppend, % Output, playerlist_noxiousot.txt
Using elfbot, you can access this list and start messaging players with this script. Make sure to place the generated 'onlinelist.txt' into your elfsettings folder.
$msg is the message that gets sent to each player.
$delay is the time between sending messages, increase this if you get muted for sending messages too fast.
set $txt 'playerlist_noxiousot.txt'
set $msg 'Testing Auto Private Message Online Players. Darth Maul is best.'
set $delay '4000'
set $line '1'
pm '$self.name' 'Starting the script. This message will be used: $msg'
pm '$self.name' 'Created by Darth Maul.'
setcaption 'Auto PM all online players! (By Darth Maul)'
auto 200 | dontlist | if [$fileline.'$txt'.$line == ''] {set $line '1'}
auto 200 | listas "Private Messaging Players.'| if [$connected == 0] {reconnect | wait $delay}
auto 100 | listas 'Player: $fileline.'$txt'.$line - Line Position: $line' | set $textin '$fileline.'$txt'.$line' | pm '$cutstr."$textin".2' '$msg' | pm '$self.name' 'Message sent to $cutstr."$textin".2 @ [$systime.]' | wait $delay | inc $line}
Incase you don't know how to make the elfbot part, you can download this file: auto pm online players - NOX.elfc (1.28 KB)
The macro could be edited to continue to run and repeat the download of the onlinelist after x time to make it more autonomous.
Edit:
Using the script below, you can take out the space in the first position of each line.
set $textin '$fileline.'$txt'.$line' | pm '$cutstr."$textin".2' '$msg'