Jump to content
  • 0

Can someone /Optimize my script/Help/ plz


XEKEX

Question

I wrote this script for Item hack and it's too bugged can someone helps me to optimize it ? (I'm lazy asf)
the main function of this bloc is to search for Item value like "0;5;123456789;123456789;123:21" and then copy the address (pointer) and then replace it in the searched item pointers (fields)


 

Quote

 

--Note--

Fn Ro (give the search refine value "0;99;123456789;123456789;123:21" <- 99 is is refine value

S<- give the search value in gg.searchNumber

ValS<- empty table to store the searched pointers

IName<- item name table

IN<- item name in the menu

IValue<- item search value

 

Quote

 

----------------------------------------------------------------------------------------------------

while First == true do

    local function Ro(rps, S, r)

        return S:sub(rps, rps+1)

        end

  Menu = gg.choice(IName, nil,"Item Hack") ---> the menu blink (>.•)

  local iname = IName[Menu]

  IN = ''

  IN = iname

  S = ''

 

  if Menu >=  1  then S = IValue[Menu]

    Scan_end = false    

    V = Ro(3, S, "")

        G = (V:gsub('%D', ''))

        Item = false

 

        if ValS[IN] ~= nil then

            Item = true

            goto Item_in_List

        end

        if (S ~= nil) then

            Scan_end = false

        repeat

        gg.toast('Item ID: '.. IN ..'')

        gg.setRanges(gg.REGION_ANONYMOUS)

        gg.searchNumber(S, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

        gg.refineNumber(G, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)

        local t = gg.getResults(1, nil, nil, nil, nil, nil, nil, nil, nil)

        gg.addListItems(t)

        local t = gg.getListItems()

            for i, v in pairs(t) do

            ValS[IN] = v.address + 0xfffffffffffffff8

            end

        gg.addListItems(t)

        t = nil

     

            until (ValS[IN] ~= nil)

            end

            if ValS[IN] ~= nil then Scan_end = true

            while Scan_end == true do    -----------> I get the bugs here

                gg.loadResults(_G.Noob)

            local   nub = gg.getListItems()

                  for i, v in pairs(nub) do

                    load_field_values[i].value = ValS[IN]

                end

            gg.toast('All Items now are '..IN)

            end

            end

        end

  ::Item_in_List::

        if Item == true then gg.toast(IN .. ' already Searched') end

 

end

end

-----------------------------------------------------------------------------------------------------

 

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Archived

This topic is now archived and is closed to further replies.

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