Jump to content
  • 0

Question

Posted

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:(

Recommended Posts

  • 0
Posted
6 hours ago, Platonic said:

If it works, adjust the script so that it is compatible with yours.

I tried it and realized that it doesn't work. Skin simply does not find:(

  • 0
Posted
4 hours ago, inzzzi said:

I tried it and realized that it doesn't work. Skin simply does not find:(

Very weird, i tried on 64 and 32 bit emulator. Should work fine.

Did you put the string properly? Show video.

 

  • 0
Posted
3 hours ago, Platonic said:

Very weird, i tried on 64 and 32 bit emulator. Should work fine.

Did you put the string properly? Show video.

 

thank you so much. You helped me out a lot. 

  • 0
Posted
18 hours ago, Platonic said:

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

 

friend please help. How to make sure that the menu does not appear and the desired skin is automatically replaced. can you please do this, I will be very grateful to you :))

  • 0
Posted
1 hour ago, inzzzi said:

friend please help. How to make sure that the menu does not appear and the desired skin is automatically replaced. can you please do this, I will be very grateful to you :))

Oh, The desired skin is always USP "Line" ?

  • 0
Posted
14 hours ago, Platonic said:

Oh, The desired skin is always USP "Line" ?

yes, that's right, and to automatically replace with USP "Geometric"

  • 0
Posted
2 hours ago, inzzzi said:

yes, that's right, and to automatically replace with USP "Geometric"

Like this?

function setNewName()
  gg.setRanges(gg.REGION_ANONYMOUS)
  gg.searchNumber(';USP \"Line\"')
  gg.refineNumber(';U')
  local t = gg.getResults(gg.getResultsCount())
  local replaceString = {}
  local stringSize = {}
  local str = {}
  gg.clearResults()
  for i= 1, 15 do
    str[i] = string.sub("USP \"Geometric\"", i, j)
  end
  for i, v in ipairs(t) do
    stringSize[#stringSize + 1] = {address = t[i].address - 0x4, flags = gg.TYPE_WORD, value = 15}
    for charCount = 1, 15 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
setNewName()

 

  • 0
Posted
1 hour ago, Platonic said:

Like this?

function setNewName()
  gg.setRanges(gg.REGION_ANONYMOUS)
  gg.searchNumber(';USP \"Line\"')
  gg.refineNumber(';U')
  local t = gg.getResults(gg.getResultsCount())
  local replaceString = {}
  local stringSize = {}
  local str = {}
  gg.clearResults()
  for i= 1, 15 do
    str[i] = string.sub("USP \"Geometric\"", i, j)
  end
  for i, v in ipairs(t) do
    stringSize[#stringSize + 1] = {address = t[i].address - 0x4, flags = gg.TYPE_WORD, value = 15}
    for charCount = 1, 15 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
setNewName()

thanks it works:))

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