Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Include samp.ahk
- #SingleInstance force
- ComObjError(False)
- hObject := ComObjCreate("WinHttp.WinHttpRequest.5.1")
- F10::
- Loop, 10
- {
- GetChatLine(A_index-1, c%A_Index%)
- If c%A_Index% contains getip
- {
- lastchatlog := c%A_index%
- break
- }
- }
- If (RegExMatch(lastchatlog, "\] \[(?<name>[A-z_]+)\] IP\: (?<fIP>[0-9.]+) \| REG IP\: (?<sIP>[0-9.]+)", Out_))
- {
- hObject.Open("GET", "http://ip-api.com/json/" Out_fIP "?lang=ru")
- hObject.Send
- firstInfo := hObject.ResponseText
- hObject.Open("Get", "http://ip-api.com/json/" Out_sIP "?lang=ru")
- hObject.Send
- secondInfo := hObject.ResponseText
- }
- htmldoc := ComObjCreate("htmlfile")
- Script := htmldoc.Script
- Script.execScript(" ", "JScript")
- firstInfo := Script.eval("(" . firstInfo . ")")
- secondInfo := Script.eval("(" . secondInfo . ")")
- AddChatMessage("Страна регистрации: " firstInfo.country )
- AddChatMessage("Город регистрации: " firstInfo.city )
- AddChatMessage("Провайдер на момент регистрации: " firstInfo.isp )
- AddChatMessage("Текущая страна: " secondInfo.country )
- AddChatMessage("Текущий город: " secondInfo.city )
- AddChatMessage("Текущий провайдер: " secondInfo.isp )
- return
- unBlockInput() {
- if(!checkHandles())
- return false
- VarSetCapacity(nop, 2, 0)
- dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
- NumPut(0xA164,nop,0,"Short")
- writeRaw(hGTA, dwFunc, &nop, 2)
- dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
- writeRaw(hGTA, dwFunc, &nop, 2)
- return true
- }
- blockInput() {
- if(!checkHandles())
- return false
- VarSetCapacity(nop, 2, 0)
- dwFunc := dwSAMP + FUNC_SAMP_SENDSAY
- NumPut(0x04C2,nop,0,"Short")
- writeRaw(hGTA, dwFunc, &nop, 2)
- dwFunc := dwSAMP + FUNC_SAMP_SENDCMD
- writeRaw(hGTA, dwFunc, &nop, 2)
- return true
- }
- ReadChatInput() {
- If (!checkHandles())
- return false
- blockInput()
- Sleep, 170
- dwAddress := dwSAMP + 0x12D8F8
- chatInput := readString(hGTA, dwAddress, 256)
- Sleep, 30
- unBlockInput()
- return chatInput
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement