Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


LUA SCRIPTING - HELP ME ( FREEZE ADRESS...)
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Fri Sep 20, 2013 11:25 am    Post subject: LUA SCRIPTING - HELP ME ( FREEZE ADRESS...) Reply with quote

hi i have a problem with the code: wklej.org/id/1133749
or something is wrong with him? I need to quickly someone to do me all the Lua code changes it freezes ADDRESS AND VALUE
sorry for my English language as it is in Polish
Back to top
View user's profile Send private message
Gi@nnis
Cheater
Reputation: 1

Joined: 26 Oct 2013
Posts: 32
Location: Greece

PostPosted: Sat Oct 26, 2013 5:38 am    Post subject: Reply with quote

To freeze a memory record:

local memrec = g.addresslist_getMemoryRecordByDescription(getAddressList(),"Miny")
memrec.Active = true

Or you can write a function youself. Create a timer that will set the selected memory record value to whatever you want. That is what the default memrec freezer is doing anyway.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat Oct 26, 2013 5:51 am    Post subject: Reply with quote

Code:
function SetValue()
   while 1==1 do
       writeInteger(0x03BB5BA8, 1);
   end
end
createNativeThread(SetValue);


this will be faster than cheat engine freezing feature.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Gi@nnis
Cheater
Reputation: 1

Joined: 26 Oct 2013
Posts: 32
Location: Greece

PostPosted: Sat Oct 26, 2013 6:32 am    Post subject: Reply with quote

That will sertenly update the value faster, but as far as I know it will overuse the CPU. I think that this will be an issue if you're playing a game that demands resurces.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sat Oct 26, 2013 6:43 am    Post subject: Reply with quote

It will call that function 120K times a second.
But it's good if you want to freeze kidna permanently.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Fri Nov 22, 2013 8:31 am    Post subject: Reply with quote

Good , so, code ago thanks will be freezed) address me so? But anybody has code:local memrec = g.addresslist_getMemoryRecordByDescription(getAddressList(),"Miny")
memrec.Active = true
can how beguile it press me change button value? It beguile urgent very such code @ topic
Back to top
View user's profile Send private message
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Sat Nov 23, 2013 3:39 am    Post subject: Reply with quote

RFRSH
Back to top
View user's profile Send private message
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Sun Nov 24, 2013 2:16 am    Post subject: Reply with quote

Rfrfrf
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Nov 24, 2013 9:23 am    Post subject: Reply with quote

Wiesz co. Może napisz po polsku co tam chcesz. A te refresze lepiej usuń bo warn'a od moderatora dostaniesz.
_________________
Back to top
View user's profile Send private message MSN Messenger
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Sun Nov 24, 2013 3:00 pm    Post subject: Reply with quote

Jak pisałem ci na private mam taki kod jak w @topic mógłbyś mi go pomoc przerobić że jak klikam w button i zmienia value i jeszcze że zamraza adres
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Nov 24, 2013 3:14 pm    Post subject: Reply with quote

@dadajszen
Na priv nic nie mam od ciebie. Ale ok.
(I don't have any private messages from you. Anyway, here.)

Code:
UDF1.OnClose = function(sender) closeCE() return caFree end
mrMiny = getAddressList().getMemoryRecordByDescription('Miny')

function CEButton1Click(sender)
  mrMiny.Value  = mrMiny.Value + 10
  if not mrMiny.Active then mrMiny.Active = true end
end

form_show(UDF1)
strings_add(getAutoAttachList(), "MineSweeper")


If you don't have UDF1 form, here hotkey version (CTRL+NUM1):
Code:
mrMiny = getAddressList().getMemoryRecordByDescription('Miny')

function changeValueAndFreeze(sender)
  mrMiny.Value  = mrMiny.Value + 10
  if not mrMiny.Active then mrMiny.Active = true end
end

if hk1~=nil then hk1.destroy();hk1=nil;end
hk1=createHotkey(changeValueAndFreeze,VK_NUMPAD1,VK_CONTROL)

strings_add(getAutoAttachList(), "MineSweeper")







@DaSpamer
DaSpamer wrote:
Code:
function SetValue()
   while 1==1 do
       writeInteger(0x03BB5BA8, 1);
   end
end
createNativeThread(SetValue);


this will be faster than cheat engine freezing feature.


We can use FreezeTimer object, like this:
Code:
getFreezeTimer().Interval = 1   -- default is 100

_________________
Back to top
View user's profile Send private message MSN Messenger
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Mon Nov 25, 2013 11:38 am    Post subject: Reply with quote

Dobra czyli ten kod na samej górze dodaje 10 min i zamrażać adres? A ten na dole zmienia value? Ją bym prosił o kod ktory tylko zagrana adres nic nie dodaje i kod ktory tylko zmienia value jeŻeli coś pomyliłem to przepraszam bo ją nie mam juz siły dziś xd
@edit
Jak napisałem proszę o te dwa kody bez żadnych hotkeyow sory że tyle wymagamy :p
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Mon Nov 25, 2013 12:28 pm    Post subject: Reply with quote

mgr.inz.Player wrote:

@DaSpamer
DaSpamer wrote:
Code:
function SetValue()
   while 1==1 do
       writeInteger(0x03BB5BA8, 1);
   end
end
createNativeThread(SetValue);


this will be faster than cheat engine freezing feature.


We can use FreezeTimer object, like this:
Code:
getFreezeTimer().Interval = 1   -- default is 100

But you know.. it's still slower than the while 1==1 do Razz.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
dadajszen
Cheater
Reputation: 0

Joined: 19 Sep 2013
Posts: 27

PostPosted: Mon Nov 25, 2013 12:59 pm    Post subject: Reply with quote

Mgr.inz.Player pomozesz?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Nov 25, 2013 3:39 pm    Post subject: Reply with quote

@DaSpamer, ask DB Cool
getFreezeTimer() function gets internal timer. Setting Interval to lowest possible value (which is 1), overwriting should be much faster than Lua loop inside new native thread.


@dadajszen

mrMiny = getAddressList().getMemoryRecordByDescription('Miny')

getAddressList() - zwraca obiekt dzięki któremu możemy się dostać do każdego elementu na liście. Listę tę widzimy zaraz po uruchomieniu CE, to ta z kolumnami Active, Description, Address, i tak dalej.
Obiekt ten ma własne funkcje. Obecnie, w CE w wersji 6.3, korzystanie z funkcji (zwanych także "metodami") oraz z "właściwości" obiektów jest znacznie ułatwione, przypomina trochę programowanie w dowolnym języku obiektowym. Dokumentacja wszystkich obiektów, ich metod oraz właściwości, znajduje się w pliku main.lua, który jest wewnątrz katalogu tam gdzie zainstalowany CE. Metody i właściwości mogą zwracać inny obiekt, tablicę obiektów, tabelę, mogą zwracać wartość typu całkowitoliczbowego, typu rzeczywistego bądź wartość jako łańcuch znaków. Inne funkcje (metody) mogą służyć do zmiany zachowania się obiektu.

.getMemoryRecordByDescription('Miny')
Funkcja użyta powyżej przeszukuje listę, zwraca pierwszy lepszy memoryrecord (wpis na liście) z podanym Description. Inaczej mówiąc, zwrócona przez tę metodę wartość jest obiektem. Obiektem klasy memoryrecord. Ten obiekt także posiada metody i własności. Obiekt memoryrecord (który w powyższym przykładzie został przypisany do zmiennej mrMiny) ma między innymi takie właściwości: ID, Index, Description, Address

Czyli to
mrMiny.setDescription("nowyOpis")
jest równoważne z
mrMiny.Description = "nowyOpis"

oraz to
zmiennatrzymającaopis = mrMiny.getDescription()
jest równoważne z
zmiennatrzymającaopis = mrMiny.Description


Dobrze przejdźmy dalej:
mrMiny.Value = mrMiny.Value + 10
czytamy najpierw od prawej strony znaku "=" :
Weź wartość trzymaną w obiekcie klasy memoryrecord i dodaj do tego wartość 10. Wynik przypisujemy z powrotem do właściwości Value obiektu memoryrecord. Obiekt ten uaktualni wartość pod adresem który ustawiliśmy (wpis na liście adresów, widzimy ten adres w kolumnie address)


No i mamy właściwość "Active". Jeżeli właściwość tą ustawimy na true, to memoryrecord zadba aby wartość pod wcześniej ustawionym adresem zawsze była taka sama. Czyli "zamrażamy" adres, a w rzeczywistości instruujemy program CheatEngine aby nadpisywał ten adres cały czas tą samą wartością. Domyślnie CE robi to co 0.1 sekundy.



Oczywiście powyższe wyjaśnienia są w dużym skrócie, przykładowo, ustawiając Active na true w obiekcie memoryrecord, obiekcie który zamiast typowo ustawionego adresu oraz typu wartości będzie miał skrypt AutoAssemble, to w ten sposób aktywujemy owy skrypt. Przypisując false, dezaktywujemy skrypt. Czyli właściwość Active może służyć do załączenia/wyłączenia zamrażania, ale także do załączania i wyłączania skryptu.

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites