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

Link to comment
Share on other sites

  • 0
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 :))

Link to comment
Share on other sites

  • 0
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" ?

Link to comment
Share on other sites

  • 0
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()

 

Link to comment
Share on other sites

  • 0
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:))

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.