Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Nikromizera

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

10 Good

About Nikromizera

  • Rank
    Junior Member
  1. The purpose of this script is to locate a game window and click inside this specific game window as a specific location. I was having difficulties with just using the crosshairs because even though SCAR would move to the specified coordinates, it would click on the desktop window instead (as though game client is transparent) even when the game client is selected. Anyways, this is my script and I'm having an error I cant seem to fix. I get error on line 9 with Type Mismatch.
  2. Yes it would. I have an alternate script but i don't much like it because it involves imprecise mouse movements which sometimes result in the wrong option being pressed on the right-click menu. I need it to be more specific by finding those two bitmap images in a sequence of two events. Yes, it was count to whatever you set the integer to be. Hmmmm, I will check whether it does take longer than 2.5 seconds by running it at maybe 3 seconds.
  3. I checked both with the DebugBitmap command and I get the correct images. Code compiles perfectly as well. I appreciate the help. program VariableIntervalClickBitmapScript; var Pack, Cultivate : TSCARBitmap; x, y, randx, randy : Integer; Int : Integer; procedure RandomRightClick; begin Randx := randomrange(-50,50); Randy := randomrange(-50,50); MoveMouseEx(x+Randx, y+Randy, 5 + Random(5)); Wait (2000 + Random (500)); GetMousepos(x,y); ClickMouseEx(x, y, mbRight, 70 + Random(20)); Wait (2000 + Random (500)); end; procedure ClickPack; begin Pack := TSCARBitmap.Create('deNo1lHlvG1UUxfsJ+AQ0M/NmC0lU27N6S6LIc' + 'byNPfbYE4eGRhQQUZFA0ET0j6K2ICpUoKJABWr/CBK7VBBdgkJUAaIlyiI+FL8' + '3BsuKnPvuO/fcc+59yqlnTnUDfSWnRI62WrEHoZlW7PG8lZbtpGg08mqzoA2K5' + 'qhspyWrF+jdor44c7qWU7qePqxYcWD0QzMOja6vNx2Z2Xa1lqNFrqjlpjqu6AZ' + 'GRGbJ7BdN/vLt+XrHEXHRIHl98bl+0YpDcyWvruQVQMhPSnbs6wlXQpnT8UTH0' + 'zM+JgSGJWs5pwBOobYjmq5aO6MszU39k31OTk7+eLy/9fJoGJJsxIGZlKxRyaS' + 'XQWBFvtFytUZBhVjk662CxhVK0MWQHjNubcj7Ig4hYEWegAOdkgY9Kr6+Hu39+' + 'hCew7KFUGvV6SgQG4szZxemk6IFCGmIhgIoya2eb0BY6uCJJDSQpR8Yg1Bq0gu' + 'NlYwJaRCgu0HROjk+3lia3Uwbj375id9//fn7lTde6nnihbp779uvjo4O93Yfb' + 'I6akWdwa1i2t86nX3z8PjypW88rPV/UcwpmrVYt0Kj1H4eyuf3KGMy1ir2/+2D' + '7xYSjzcHiwdMntbmp73e+/Oz6O8hy8XwKPiJza1Sd2bl9Uwrlac2CujD7rOzLV' + 'fuh7J3uJrJMPo/39y5uxGnVPrvs3Lz29jd3P/9t9yHxtqcdHx1KmwpqI690ED+' + 'vEL91/crVtzYRoemoDQcHp5jAjsf8YJmOC8wJac28ivV80XNx7vT9ez9efu3cm' + '+f6a8sep/WcCji0l88omU0CNOIfXN766OolqQmYKO9itBq5GgkoT3egkcZFcpi' + 'HbiYa2m60y+OF2Tuf3MhOle927tx67xJzS2uINq7aMp5X73764atJDb/G89MY1' + '3KwWwWcWo3/DW25IiukwqHn6TR7eHDw99Mn725fkLK4Wrrk/PzD11i89+j+hVG' + 'd68SZK+y+feNan7sFgRpwi+XMs5jGalWWI8iIUmV9wUZwlhe0QTallJPT6+n1g' + 'oq/gPSyU0Dk7mRQk3i7IEWmfSL0zvaxxc/PTyPUsGSslpl80PTYN5sFZbIU9bw' + 'KFDq3MyVlIerK7WZCZEI3Q2PRxhnPLm4GlNBHZYvqiXxDTNJIYL9G/Fu1IQOrC' + 'W3ZlIQVwLL+xNGNvngH2BpWgIh8pjwhHyLfAC3JdrbliJan8SPNAOmOI1Z7XLG' + 'k3b6eda2nFQtABjgzi3dG59WKAzGQEomJeswPCvCOEfkXMUeCJQ=='); if (FindBitmapTol (x, y, Pack, 350, 100, 1700, 900, 10)) then begin Randx := randomrange(0,10); Randy := randomrange(0,3); MoveMouseEx(x + Randx, y + Randy, 5 + Random (5)); GetMousepos(x,y); Wait (1000 + Random (100)); ClickMouseEx(x, y, mbLeft, 90 + Random(20)); Pack.Free; end else begin WriteLn('Error on Pack') end; end; procedure ClickCultivate; begin Cultivate := TSCARBitmap.Create('deNqdluuPE2UUxvkX/O7uTGem04LsdttOL9Puh' + 'bXb7fY27fS2CIjc1BghRIlGo1ziBQJCTFBRP5AYL1HiJ40mKomiEuQSBQLEVdE' + 'YvxiRqFEBYTX4O+9EiRvjBwmZzE7Pe85znue855zMvOvmtXLhlmvXHKOZseqOW' + 'Y7rk0NaJRny0kYpoddTJgadnN1x7XbW6uQjxYH+qmO0slYtaUzF9UrSaKStmmN' + '5KbOSCJUTejUR8hyjljTlC35SxlRCXzTQV04YzbRZiuvEwlI8Z8N8LMV0TnmO2' + 'UiZfibcy9m1tLF4ONrNRwiN8WRc89JWJWFMJfXCoDa+sB8/HAdANWk03XA7E/b' + '44liNjOVnJQtCe07Iz1ggHF/YB8jSUKiRkp8W5+22G/YzHA9NxUMB7NKQpl4EG' + 'x4aaRPP9RSAxUMtJX9Kso5RBrlj+lkTNlpuuJEmtAUAYCwZi9aFChP/zWyYJ/9' + 'xW00YjSzAwkvH5jcyHLEggaBLRqLNtHBbE3h6IAGBaooHEgQApzAm6E3Ddjtvw' + '/xkQp9SHAKynQ2TWlUwhzkLHmgkNDjxU4xpxZhOxGbWJjQ2wCDletqcjGm1RKi' + 'XjxAInqdH7G4ugqbAwADLTi6C4oTAuDCgTSoMjYwQC37+1x1kFUsk5ifClZPqG' + 'TekMIY0yOc4qMAPY0jTVLmTBX8WBvtHF/ThHOG6rk04XBEaAMAoxPrhp5mRCqF' + '+oOLZnQ99/923l3+79NF7+5dOJMVABBK3hUF9fFCDk6tXr5Lykff3d90IgfiT4' + '0KjY9aQMiUFNhHrB7YoHteqDiVhVJzQ4QPvqGq0e7kIivdyUUoFV2VHRMc5IQh' + 'Ul3o2CE1S5YQ5B+SuzRtmTh2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wPPwUilYLjg3KypI' + 'V1RbVJvYzKdQ4EBawAOmVnsD1TRxKCmylj2h2BnqKjBJ9iInpRdhSEuU1tNn5q' + 'sJRReWOkl9T8xoHG2m5NBzK/YS8PEXgarzCNfde9mSkFVleAJjBCkBYsKbpnCR' + 'cUGdGGPk6m4xvggR9Rpqoht15oejkAg4nqqh/NxeiSqFJH1pppUz4BSCGEUZhj' + 'TchFgjHqrydyXTKsqopLYaGdF2WBDUPuAgCT3kro4auYaCrAOJ4z+ioxgkbKia' + 'OHJsGvhwbX9tBWQGbhCU/kixSBUEFHtPKHAlWprlIpQxEWmqNQGhQSy7DVlAZD' + 'tq54WUTqq4aCmmjh6S9Ye9gqrNxxVHcwKqmvpaISCpB5E7mDVTEjhwUAxrjcVG' + 'E/9CphgpKrZJ98rcSmeYOepJvQO15PNMCU9DTl8WS0smXoDGhNw2dj8dtYsS+5' + '6Q2khA9RRGan9EFd/AtPRVbU='); if (FindBitmapTol (x, y, Cultivate, 350, 100, 1700, 900, 10)) then begin Randx := randomrange(0,10); Randy := randomrange(0,3); MoveMouseEx(x + Randx, y + Randy, 5 + Random (5)); GetMousepos(x,y); Wait (1000 + Random (100)); ClickMouseEx(x, y, mbLeft, 90 + Random(20)); Cultivate.Free; end else begin WriteLn('Error on Cult') end; MoveMouseBoxEx(Box(970, 400, 1100, 500), 5 + Random (5)); end; begin Int := 0; MoveMouseBoxEx(Box(970, 400, 1100, 500), 10 + Random (5)); Wait (1000 + Random (500)); repeat GetMousepos(x,y); begin RandomRightClick; ClickPack; Wait (14000 + Random (2000)); RandomRightClick; ClickCultivate; Wait (14000 + Random (2000)); WriteLn('Command run ' + IntToStr(Int) + 'time(s)'); Inc(Int); end; until Int = 60; end.
  4. Okay after much error, here is my first attempt at the scripting for the aforementioned situation: I cannot seem to be able to work out the bitmap issue as my bitmap image is not recognized. I tried using the built in bitmap tool and pasting that into the ('') but that also yielded the same result. With the present script I'm able to move to the desired location and my mouse is able to right click but the "Pray" command cannot be selected even though I took a bitmap image of it
  5. Hi everyone, I've been trying to learn SCAR to macro in a game. The sequence of actions that I need performed is as follows: 1. Leading a mouse within the boundary of an intractable object My solution: MoveMouseBox command while specifying the box within the object 2. Right clicking in this randomized spot on the object to bring up an interaction menu (opens near where you clicked) My solution: This is where I am stuck, I don't know how to make a mouse perform a right click on a random coordinate that it moves to from 1. 3. Selecting (mousing over) an option from the interaction menu and clicking it My solution: Since the menu button I want clicked doesn't change I could use the bitmap strategy to recognize the option 4. Repeating the entire process after a certain wait time My solution: Repeat function I'm using SCAR Divi 3.41 Thanks to whoever helps me with writing this script and teaching me.
×
×
  • Create New...