Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :B0?:/dice::
- Input, dicename, T V, {space}
- sendchat("/id " dicename)
- sleep 300
- Loop, read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- {
- if RegExMatch(A_LoopReadLine, "^\[\d{2}\:\d{2}\:\d{2}\] ID\: \(\d+\) (.*)", diceid)
- {
- name := diceid1
- }
- if RegExMatch(A_LoopReadLine, "^\[\d{2}\:\d{2}\:\d{2}\] ID\: \(\d+\) (.*) \{\w{6}\}<PAUSE\: \d+ sec>", diceid)
- {
- name := diceid1
- }
- }
- s := strlen(dicename) + 1
- send, {backspace %s%}
- sendinput, %name%{space}
- myname := GetUsername()
- targetpool := Object()
- mypool := Object()
- tstring :=
- ystring :=
- if (name)
- {
- loop, read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- {
- if RegExMatch(A_LoopReadLine, "^\[\d{2}:\d{2}:\d{2}\] \[DICE\] Кинули кости (.*) \[(.*)\]:\[(.*)\] (.*). Ставка: \$(.*)", dice)
- {
- if (dice1 = name)
- targetpool.Insert(dice2)
- if (dice4 = name)
- targetpool.Insert(dice3)
- if (dice1 = myname)
- mypool.Insert(dice2)
- if (dice4 = myname)
- mypool.Insert(dice3)
- }
- if RegExMatch(A_LoopReadLine, "^\[\d{2}:\d{2}:\d{2}\] \[DICE\] (.*) кинул кости, выпало (.*)", dice)
- {
- if (dice1 = name)
- targetpool.Insert(dice2)
- if (dice1 = myname)
- mypool.Insert(dice2)
- }
- }
- for i, el in targetpool
- {
- if (A_Index > targetpool.MaxIndex()-dicecount.value)
- tstring := tstring " " el
- }
- for i, el in mypool
- {
- if (A_Index > mypool.MaxIndex()-dicecount.value)
- ystring := ystring " " el
- }
- addBindMessage(COLOR_WHITE, "Последние числа игрока " name ":" COLOR_ORANGE tstring)
- addBindMessage(COLOR_WHITE, "Ваши последние числа:" COLOR_ORANGE ystring)
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement