set %PotMax 1 set %delay 100 ;ms set %PotionDelay 2800 ;ms set %CodeDelay 100 ;ms loop: onhotkey 9 gosub lancia goto loop sub lancia _lanciaHotkeyloop: onhotkey f goto _lancialoop if #targcurs <> 0 return finditem TUF C ;_ , #backpackid if #findcnt = 0 return set #lpc 100 set %Npotion 0 _lanciaAddPotion: set %Npotion %Npotion + 1 set %ArrayPotionID . %Npotion #findid set #findindex #findindex + 1 if #findcnt > #findindex && %Npotion < %PotMax goto _lanciaAddPotion for %i %Npotion 1 { set #lobjectid %ArrayPotionID . %i event macro 17 0 ;Last Object set %ArrayPotionTime . %i #scnt2 set %ThisWait %CodeDelay * %i + %delay sleep %ThisWait } set #ltargetkind 1 for %i %Npotion 1 { set #lobjectid %ArrayPotionID . %i event macro 17 0 ;Last Object target set %Waste %PotionDelay - ( ( #scnt2 - %ArrayPotionTime . %i ) * 100 ) if %Waste < 0 set %Waste 0 event sysmessage Waste_ , %Waste sleep %Waste set #ltargetid #enemyid event macro 22 0 ;Last Target if %Waste < %delay { set %Temp %delay - %Waste sleep %Temp event sysmessage Temp_ , %Temp } set #lpc 10 }