Facebook
From Cream Earthworm, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 259
  1. set %PotMax 1
  2. set %delay 100 ;ms
  3. set %PotionDelay 2800 ;ms
  4. set %CodeDelay 100 ;ms
  5.  
  6. loop:
  7.      onhotkey 9
  8.               gosub lancia
  9. goto loop
  10.  
  11. sub lancia
  12. _lanciaHotkeyloop:
  13.  onhotkey f
  14.           goto _lancialoop
  15. if #targcurs <> 0
  16. return
  17. finditem TUF C ;_ , #backpackid
  18. if #findcnt = 0
  19. return
  20. set #lpc 100
  21. set %Npotion 0
  22. _lanciaAddPotion:
  23. set %Npotion %Npotion + 1
  24. set %ArrayPotionID . %Npotion #findid
  25. set #findindex #findindex + 1
  26. if #findcnt > #findindex && %Npotion < %PotMax
  27.    goto _lanciaAddPotion
  28. for %i %Npotion 1
  29. {
  30. set #lobjectid %ArrayPotionID . %i
  31. event macro 17   0 ;Last Object
  32. set %ArrayPotionTime . %i #scnt2
  33. set %ThisWait %CodeDelay * %i + %delay
  34. sleep %ThisWait
  35. }
  36. set #ltargetkind 1
  37. for %i %Npotion 1
  38. {
  39. set #lobjectid %ArrayPotionID . %i
  40. event macro 17   0 ;Last Object
  41. target
  42. set %Waste %PotionDelay - ( ( #scnt2 - %ArrayPotionTime . %i ) * 100 )
  43. if %Waste < 0
  44. set %Waste 0
  45. event sysmessage Waste_ , %Waste
  46. sleep %Waste
  47. set #ltargetid #enemyid
  48. event macro 22 0 ;Last Target
  49. if %Waste < %delay
  50.    {
  51.    set %Temp %delay - %Waste
  52.    sleep %Temp
  53.    event sysmessage Temp_ , %Temp
  54.    }
  55.    set #lpc 10
  56. }