Jump to content
  • 0

limitations


inzzzi
 Share

Question

Hello, I ran into a problem today. That when you replace the name of the skin through the script, the name is cut off and cannot be greater than the original value. I know it's possible to change it, but I don't know exactly how. please help:(

Link to comment
Share on other sites

Recommended Posts

  • 0
4 hours ago, inzzzi said:

Hello, I ran into a problem today. That when you replace the name of the skin through the script, the name is cut off and cannot be greater than the original value. I know it's possible to change it, but I don't know exactly how. please help:(

Which game? Maby this help.

Link to comment
Share on other sites

  • 0
1 hour ago, Platonic said:

Which game? Maby this help.

in the game standoff 2, when replacing the name of the skin, for example, USP"Line" with the name USP"Geometric", the name does not completely change, but only by 9 characters. Because the original number of characters was 9, and because of the change it became 14. How do I get around this?

Link to comment
Share on other sites

  • 0
5 hours ago, inzzzi said:

in the game standoff 2, when replacing the name of the skin, for example, USP"Line" with the name USP"Geometric", the name does not completely change, but only by 9 characters. Because the original number of characters was 9, and because of the change it became 14. How do I get around this?

GG will only replace the bytes that you searched. The issue with wanting to have a longer name is that at the end of the string there is usually a pointer of some other string name. If that pointer gets overwritten by your chosen name your game could crash, Or unintended names could overlap messing up your player name.

Go to the address of your string and select the same amount of bytes as the amount of characters that exist in the name you want to edit to and then edit them in utf-8 or utf-16. If you see that your also selecting bytes of a pointer but that pointer is a pointer for a other string name you must edit that pointer and the string name to zero. Like that you have no overlapping with other names.

If game crashes or some unwanted effects happen you could try allocating and copying memory and write the name you want to modify to in full. Then set all pointers that pointed to original string name to new player name.

 

Link to comment
Share on other sites

  • 0
14 minutes ago, Platonic said:

GG will only replace the bytes that you searched. The issue with wanting to have a longer name is that at the end of the string there is usually a pointer of some other string name. If that pointer gets overwritten by your chosen name your game could crash, Or unintended names could overlap messing up your player name.

Go to the address of your string and select the same amount of bytes as the amount of characters that exist in the name you want to edit to and then edit them in utf-8 or utf-16. If you see that your also selecting bytes of a pointer but that pointer is a pointer for a other string name you must edit that pointer and the string name to zero. Like that you have no overlapping with other names.

If game crashes or some unwanted effects happen you could try allocating and copying memory and write the name you want to modify to in full. Then set all pointers that pointed to original string name to new player name.

 

can you please make a script so that I can implement it in my script, I would be very grateful to you 

Link to comment
Share on other sites

  • 0
6 hours ago, inzzzi said:

can you please make a script so that I can implement it in my script, I would be very grateful to you 

Can try..do i search the text in utf16 or utf8 ?

I find one string in utf16: USP "Line"

Screenshot_2022-11-30-20-49-02-383_com.axlebolt.standoff2.jpg

Edited by Platonic
Link to comment
Share on other sites

  • 0
5 hours ago, Platonic said:

Do i need to replace the text in the marketplace? Just replaced USP "Line" with USP "Geometric"

Screenshot_2022-11-30-22-09-37-015_com.axlebolt.standoff2.jpg

Screenshot_2022-11-30-22-09-16-518_com.axlebolt.standoff2.jpgI have a small request for you. If it's not difficult for you, could you implement it in a script? And throw it here, I would be very grateful to you

 

Link to comment
Share on other sites

  • 0
47 minutes ago, Platonic said:

I first need to know what i have to do. At the moment its unclear what i should do. Your the one that knows the cheat. So if you can demonstrate it with a video i could perhaps script it.

I need that when the script is turned on, the names are replaced with the one I need and there is no restriction on characters 

Link to comment
Share on other sites

  • 0
On 12/1/2022 at 4:44 AM, inzzzi said:

I need that when the script is turned on, the names are replaced with the one I need and there is no restriction on characters 

Does this work?

function setNewName()
  local t = gg.getResults(gg.getResultsCount())
  local replaceString = {}
  local stringSize = {}
  local str = {}
  gg.clearResults()
  for i= 1, #editname[1] do
    str[i] = string.sub(editname[1], i, j)
  end
  for i, v in ipairs(t) do
    stringSize[#stringSize + 1] = {address = t[i].address - 0x4, flags = gg.TYPE_WORD, value = #editname[1]}
    for charCount = 1, #editname[1] do
      replaceString[#replaceString + 1] = {address = t[i].address, flags = gg.TYPE_WORD, value = string.byte(string.sub(str[charCount], 1, 1))}
      t[i].address = t[i].address + 2
    end
  end
  gg.setValues(replaceString)
  gg.setValues(stringSize)
end
function findName()
  gg.setRanges(gg.REGION_ANONYMOUS)
  gg.searchNumber(';'..playername[1])
  local a = gg.getResults(gg.getResultsCount())
  if #a == 0 then
    gg.toast("name not found, search again")
    prompt_search()
  else
    gg.refineNumber(a[1].value..';'..a[2].value..';'..a[3].value..'::5')
    gg.refineNumber(a[1].value)
  end
end

-- if menu is nil
function noselect()
  gg.toast('You not select anything')
end

function prompt_edit()
  editname = gg.prompt(
    {[1] = 'Input name to modify to'},
    {[1] = '0'},
    {[1] = 'text'})
  if editname == nil then noselect() else
    setNewName()
  end
end

function prompt_search()
  playername = gg.prompt(
    {[1] = 'Input desired player name.'},
    {[1] = '0'},
    {[1] = 'text'})
  if playername == nil then
    noselect()
  else
    findName()
    prompt_edit()
  end
end

prompt_search()
while (true) do
  if gg.isVisible() then
    gg.setVisible(false)
    prompt_search()
  end
  gg.sleep(100) 
end

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.