Rian_Tyler

Untitled

Jan 14th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1.  
  2. :?:/fi::
  3. :?:/afish::
  4. {
  5. number := 0
  6. release := 0
  7. cheapestFish := 0
  8. cheapestFishValue := 5000
  9.  
  10. loop 30 {
  11. SendChat("/fish")
  12. Sleep, 20
  13.  
  14. chat := readChatLine(0)
  15. if (RegExMatch(chat, "Du hast ein\/e (.+) mit (\d+) LBS gefangen.", fishMatch)) {
  16. number ++
  17. fishValue := getFishValue(fishMatch1, fishMatch2)
  18. SetChatLine(0, ADM colorSecond "(" number ") " colorWhite fishMatch1 " (" fishMatch2 " LBS) gefangen - Wert: " colorSecond FormatNumber(fishValue) "$")
  19. if (cheapestFishValue > fishValue) {
  20. cheapestFish := number
  21. cheapestFishName := fishMatch1
  22. cheapestFishValue := fishValue
  23. }
  24. }
  25. else if (RegExMatch(chat, "Du hast eine Geldtasche mit ([0-9]+)\$ gefangen\.", fishMatch)) {
  26. moneyWin += fishMatch1
  27. IniWrite, %currentFishMoney%, Stats.ini, Stats, FishMoney
  28. IniWrite, %currentFishMoney%, Stats.ini, Stats, MonthFishMoney[%A_MM%:%A_YYYY%]
  29. IniWrite, %currentFishMoney%, Stats.ini, Stats, DayFishMoney[%A_DD%:%A_MM%:%A_YYYY%]
  30. IniRead, FishMoney, Stats.ini, Stats, FishMoney
  31. SetChatLine(0, ADM "Geldtasche gefangen - Verdienst: " colorSecond FormatNumber(fishMatch1) "$" colorWhite " - Gesamt: " secondColor FormatNumber(FishMoney) "$")
  32. }
  33. else if (RegExMatch(chat, "Du kannst erst in ([0-9]+) (\S+) wieder angeln\.", fishMatch)) {
  34. CheckFishes()
  35. if (fishMatch2 == "Minuten") {
  36. SetTimer, FishTimer, 1000
  37. fishCooldown := Floor(fishMatch1/60)
  38. }
  39. break
  40. }
  41. else if (RegExMatch(chat, "Du kannst nur 5 Fische bei dir tragen.")) {
  42. if (release) {
  43. break
  44. }
  45. SendChat("/releasefish " cheapestFish)
  46. Sleep, 200
  47. SetChatLine(0, ADM colorSecond " (" cheapestFish ") " colorWhite cheapestFishName " im Wert von " colorSecond FormatNumber(cheapestFishValue) "$" colorWhite " wurde weggeschmissen!")
  48. release := 1
  49. }
  50. else if (RegExMatch(chat, "Du bist an keinem Angelplatz")) {
  51. SetChatLine(0, ADM "Du kannst hier nicht fischen, begib dich zu einem Angelsteg!")
  52. break
  53. }
  54. Sleep, 750
  55. }
  56. }
  57. return
Advertisement
Add Comment
Please, Sign In to add comment