Jump to content

CmP

Contributor
  • Posts

    663
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by CmP

  1. To fix what? You forgot to describe the problem. From the screenshot you attached it is in no way obvious what the problem is. If you wonder why second and third elements of "vPool" table are references to the same table, that's because your code calls "addItem" function with the same arguments twice.
  2. In case of modifying value by freezing it to a new value "addListItems" can be used, but in case of just changing value without freezing it "setValues" function is the one to use. Generally, you shouldn't use "addListItems" on values that you don't want to be added to saved list. Values that are needed to be frozen is exception, because in GG a value can't be frozen without it being added to saved list.
  3. That's because you use "setValues" function. "addListItems" is the one you need to use to freeze a value.
  4. You don't need a loop here. Extract the code from loop body and change all references to "v" to "vPool" and it might work as you expect.
  5. The answer above from @SAGEPAPI is exactly what you wanted to know. 5th and 6th parameters of "searchNumber" function are used to set lower and upper bound of range of addresses to perform search in. This is written in the documentation to the function which can be found here. Don't hesitate to check the documentation when you have GG API-related questions.
  6. CmP

    HELP ME PLEASE!!!

    Just check if table returned by "getListItems" function contains any elements. local t = gg.getListItems() if #t == 0 then print('Saved list is empty') else print('Saved list is not empty') end
  7. This way the values won't be frozen. Need to call "addListItems" function after the loop that sets "freeze" field to "true".
  8. "freezeType" parameter has default value of "gg.FREEZE_NORMAL", so it's not necessary to explicitly specify it. However, you are absolutely correct about missing call to "addListItems" function that is required to save values to saved list.
  9. CmP

    Cheat Engine server

    It is needed in all cases if you want to use Cheat Engine from PC as client to the server that is running on your android device. Here you can find the description of what the command does: https://developer.android.com/studio/command-line/adb#forwardports
  10. Then you should be grateful that someone who can see the comments pointed you to the answer to your question, shouldn't you? And the explanation may be still useful for someone else.
  11. This question is answered in the comment above yours, but it seems that you don't understand how nearby search works, so I will try to clarify. Nearby search works just like normal search, but it only searches for values at within certain distance before and/or after target value. For example, target value's address is 12345000 in hex. If you choose distance 1000 (also in hex) and select "Before" and "After", then the search will be performed only in the following range of addresses: [12345000 - 1000; 12345000 + 1000], i.e. from 12344000 to 12346000. You can achieve the same effect by inputting these numbers in "From" and "To" fields of the normal search dialog. At this point it should be obvious, how can you use this feature in script. If it's not, read the comment above yours, then try to find the answer in documentation for "searchNumber" function.
  12. I did not mean it and why do you think that he did it wrong? The only mistake in the code from the message you quoted was pointed out by Enyby several posts above. As per my suggestion, he did exactly what I described.
  13. You don't need to search for values each time, so move the code for searching values (and the call to "getResults" function) outside the function. It should be executed once before the first call to "doAction" function, so you can insert it, for example, right before the line with "while true do" code.
  14. There is an example of the code for performing an action by clicking on GG icon: Examples of Lua scripts (#d2j0lrom) It's not a complete solution for your task, but may be a good starting point.
  15. CmP

    LUA scripting

    You have quoted old message. "REGION_VIDEO" constant was not present in the API back then. As for you question. Of course there is a number associated with this constant. You can print it with the following code: print("gg.REGION_VIDEO:", gg.REGION_VIDEO)
  16. It's not the only way, but it is suitable for your case. The most efficient implementation of this way from the ones proposed in this topic can be found in this post: How to group values to edit in a search? (#2mhgpa6) It reuses the table returned by "getResults" function that leads to better performance of the code, but as it was mentioned above, it does not really matter when results count is relatively small.
  17. Oh, that's a good idea, haven't thought about it. Just like it was mentioned few posts above, another thing has been learned. It's amazing that new things can be learned even about the topics that looks easy.
  18. Yeah, absolutely, thanks for pointing that out.
  19. The group search is not ordered, so I would prefer second approach from those Enyby mentioned. For this case it would be something like the following: gg.setRanges(gg.REGION_ANONYMOUS) gg.clearResults() gg.searchNumber('1014350479;1012202996;1083179008;1050253722;1031127695;1065353216;1065353216;1067282596:61', gg.TYPE_DWORD) local results = gg.getResults(5000) local edited = {} for i, v in ipairs(results) do if v.value == 1014350479 then edited[#edited + 1] = {address = v.address, flags = v.flags, value = 1011011011} elseif v.value == 1050253722 or v.value == 1031127695 then edited[#edited + 1] = {address = v.address, flags = v.flags, value = 1} end end gg.setValues(edited)
  20. Noted, thanks for the advice. That's great.
  21. Well, maybe not by many, but at least by some for sure. In this topic I mentioned "some trigger of action when GG interface is active" and that it may be useful for helper scripts (the ones that help user in process of using GG). Yes, I have not offered any solution for such trigger, but you have found one and implemented it in the last update. I think that this new feature will be useful at least for some script developers (including me), so I wrote previous message to thank you for coming up with your solution for trigger of action for scripts.
  22. Long-awaited feature by many script developers, thank you!
  23. CmP

    LUA scripting

    @Puje you need to call "getValues" function to update the values. See this example: Examples of Lua scripts (#4rb1nadf)
  24. @ohright, this seems to be the chunk with the actual script. You can try to decompile it using any methods that you are aware of. load_0002005.lua
  25. Because it's the .lasm file (disassembly). You get the .lua file when executing it. I have explained it in this post: Why Script Ended:Script Error ? (#cor0fe4l) From what I see on the video, official version of the launcher that you downloaded from BadCase's site finishes with an error right after you execute it. That's simply because it's not compatible with newest version of GG. Second script that you use is probably from this post. Both official version and this version contain the error of using "W" as second argument to "io.open" function, that is fixed in the file from this post. It should work properly, unless there are some other errors of which I am not aware. One thing you should understand that the launcher and a script for a particular game are two different scripts. The launcher downloads a script for some game and executes it, everything else is done by the downloaded script. If there is an error in the downloaded script, it has to be fixed and updated version has to be uploaded to the server before you can use it with the launcher. So just wait until the author of the script for your game will fix it and upload to the server. This video and screenshots clearly show that modified version of the launcher works fine for you, while the error occurs in the script for the game.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.