Jump to content
AC Tool Forums

Ignotus

Members
  • Content Count

    4
  • Joined

  • Last visited

About Ignotus

  • Rank
    Newbie
  1. Hello! I have wrote a script which can deal how much time Elapsed from a specific time: constants TempElapsed = 0 ElapsedDay = 0 ElapsedHour = 0 ElapsedMinute = 0 ElapsedSecond = 0 ElapsedTime = end call SetCurrentStartTime delay 3 sec //Methods go here call GetElapsedTime call WriteElapsedTime procedure SetCurrentStartTime Set TempElapsed = {ElapsedMSec} end procedure GetElapsedTime compute TempElapsed = ({ElapsedMSec} - $TempElapsed) / 1000 compute ElapsedDay = FLOOR( $TempElapsed / 86400 ) compute ElapsedHour = FLOOR( ($TempElapsed - ($ElapsedDay * 86400)) / 3600 ) compute ElapsedMinute = FLOOR( ($TempElapsed - ($ElapsedDay * 86400) - ($ElapsedHour * 3600)) / 60 ) compute ElapsedSecond = FLOOR( ($TempElapsed - ($ElapsedDay * 86400) - ($ElapsedHour * 3600) - ($ElapsedMinute * 60))) end When I have killed an enemy I want to write in my timestamp log how much time was that. So I have made the following "string builder": procedure WriteElapsedTime if $ElapsedDay > 0 Set ElapsedTime = $ElapsedDay DAY call AddSpace $ElapsedDay end if $ElapsedHour > 0 Set ElapsedTime = $ElapsedTime + $ElapsedHour HOUR call AddSpace $ElapsedHour end if $ElapsedMinute > 0 Set ElapsedTime = $ElapsedTime + $ElapsedMinute MIN call AddSpace $ElapsedMinute end if $ElapsedSecond > 0 Set ElapsedTime = $ElapsedTime + $ElapsedSecond SEC call AddSpace $ElapsedSecond end Set ElapsedTime = $ElapsedTime + ELAPSED. timestamp $ElapsedTime end procedure AddSpace using Number if $Number > 1 Set ElapsedTime = $ElapsedTime + S end Set ElapsedTime = $ElapsedTime + end I'm very newbie with String handling in script languages. I want to improve my knowledge of this, but I can't make it better. Any thoughts?
  2. Hello! I have rethinked my code when I read The WABBIT's comment: Â Â Now it's read the quest type (with RGB codes) when my bot is want to deal with the quest. Then it knows what coordinates have to be checked after my character is stoped. Thanks The WABBIT, DaMOB for response, I appreaciate every comment.
  3. No it isn't slow. It is too much processor usage as I think. I have 1000 milisedondcs to deal what is the type, I can check it 40 times within a second, it's a lot, it's too much. I want to reduce the usage with less moving checking times, so I want to add more delays, instead of reduce them. Â Any idea is good for this, for me. I don't think the windows 10 is slow, it's way more faster than I want, and I also don't want to burn my notebook.
  4. Ciao! I don't know which game you guys played, but it's something similar to WoW auto-moving between quests. Sorry for my English knowledge.  Imagine this: If you are using the game's auto-move, then it's can be interrupted when someone/something hits you or you stuck up in something etc... If you are at the destination point (or stucked), your character is stop, then the macro chose which quest it is, then deal with it. I think that's the safest and the most human-like playing. Don't spam on auto-moving button like in every 5-6 seconds because may in the server side they can check how many and what times I have clicked on something.  If you reached the destination point, there is only ONE SECOND LEFT to chose which quest it is with color checking, because after that, the pop-up gone. There is totally random times between each destination points because they are totally randomized, can't be counted by time. Also, if you reached it, about 30% to you won't get a pop-up, then you should click on the auto-move button again and check for the quest type again.  So I have made the following procedure to check if the character is moving (not so high-level code ofc): procedure CheckMove using xPos, yPos  LoadRGB $xPos, $yPos  Set TempR = {RGBRed}  Set TempG = {RGBGreen}  Set TempB = {RGBBlue}  delay 500  LoadRGB $xPos, $yPos  if $TempR = {RGBRed} AND $TempG = {RGBGreen} AND $TempB = {RGBBlue}   Set Character = Stoped  else   Set Character = Moving  end end The current method can deal with this checking, but it burns my notebook's processor like this: (The "CheckCharacterMovement" is more precisious, it's called the CheckMove procedure at 5 positions to make it sure, if it's moving or some monster moving around me, after that, only 1 position is enough for checking, because it's 100% moving. + Also it's check twice, to make it 1000% sure.)  Macro Time: 3 seconds 271 milliseconds for Call GOBUTTON Macro Time: 550 milliseconds for Call CHECKMOVE Macro Time: 545 milliseconds for Call CHECKMOVE Macro Time: 535 milliseconds for Call CHECKMOVE Macro Time: 546 milliseconds for Call CHECKMOVE Macro Time: 2 seconds 190 milliseconds for Call CHECKCHARACTERMOVEMENT Macro Time: 542 milliseconds for Call CHECKMOVE Macro Time: 547 milliseconds for Call CHECKMOVE Macro Time: 549 milliseconds for Call CHECKMOVE Macro Time: 549 milliseconds for Call CHECKMOVE Macro Time: 2 seconds 200 milliseconds for Call CHECKCHARACTERMOVEMENT Macro Time: 545 milliseconds for Call CHECKMOVE Macro Time: 548 milliseconds for Call CHECKMOVE Macro Time: 550 milliseconds for Call CHECKMOVE Macro Time: 546 milliseconds for Call CHECKMOVE Macro Time: 547 milliseconds for Call CHECKMOVE Macro Time: 550 milliseconds for Call CHECKMOVE Macro Time: 547 milliseconds for Call CHECKMOVE Macro Time: 549 milliseconds for Call CHECKMOVE Macro Time: 547 milliseconds for Call CHECKMOVE Macro Time: 4 seconds 945 milliseconds for While $Character = Moving Macro Time: 61 milliseconds for While $Type = null AND $TypeCount < 100 Macro Time: 9 seconds 411 milliseconds for Call GETQUESTTYPE Macro Time: 3 seconds 180 milliseconds for Call DOQUEST If you guys has some ideas about how can I reduce processor-using, please share with me!  (It's not a big problem, with 6th gen i7, but I don't think it's the best way to make a program like spam the CPU.) Â
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.