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 


Simplify script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
Lorizzuoso
Cheater
Reputation: 0

Joined: 09 Apr 2022
Posts: 27

PostPosted: Fri Apr 22, 2022 3:41 pm    Post subject: Simplify script Reply with quote

Can I simplify this?I mean I'm randomizing all of those addresses values but without certain values and for each one of them I have a different "for" for randomizing their values:
Code:

[ENABLE]
{$lua}
s={}
timerstand = createTimer(nil, false)
timerstand.Interval = 20
timerstand.Enabled = true
timerstand.OnTimer = function()

for a=1,2 do
  repeat
    s[a]=math.random(70)
    until not ((s[a]==0x09) or (s[a]==0x0c) or (s[a]==0x11) or (s[a]==0x17) or (s[a]==0x25) or (s[a]==0x26) or (s[a]==0x28) or (s[a]==0x29) or (s[a]==0x2d) or (s[a]==0x2e) or (s[a]==0x30) or (s[a]==0x31) or (s[a]==0x32) or (s[a]==0x33) or (s[a]==0x37) or (s[a]==0x39) or (s[a]==0x3c) or (s[a]==0x3e) or (s[a]==0x3f) or (s[a]==0x40) or (s[a]==0x41) or (s[a]==0x44) or (s[a]==0x45) or (s[a]==0x00) or (s[a]==0x01) or (s[a]==0x02) or (s[a]==0x03) or (s[a]==0x04) or (s[a]==0x05) or (s[a]==0x06) or (s[a]==0x07) or (s[a]==0x08) or (s[a]==0x0a) or (s[a]==0x0b) or (s[a]==0x0d) or (s[a]==0x0e) or (s[a]==0x0f) or (s[a]==0x10) or (s[a]==0x12) or (s[a]==0x13) or (s[a]==0x14) or (s[a]==0x15) or (s[a]==0x16) or (s[a]==0x18) or (s[a]==0x19) or (s[a]==0x1a) or (s[a]==0x46) or (s[a]==0x35)or (s[a]==0x38) or (s[a]==0x43) or (s[a]==0x3b))

 writeBytes(0x20310300,s)
 for b=1,2 do
  repeat
    s[b]=math.random(70)
    until not ((s[b]==0x09) or (s[b]==0x0c) or (s[b]==0x11) or (s[b]==0x17) or (s[b]==0x25) or (s[b]==0x26) or (s[b]==0x28) or (s[b]==0x29) or (s[b]==0x2d) or (s[b]==0x2e) or (s[b]==0x30) or (s[b]==0x31) or (s[b]==0x32) or (s[b]==0x33) or (s[b]==0x37) or (s[b]==0x39) or (s[b]==0x3c) or (s[b]==0x3e) or (s[b]==0x3f) or (s[b]==0x40) or (s[b]==0x41) or (s[b]==0x44) or (s[b]==0x45) or (s[b]==0x00) or (s[b]==0x01) or (s[b]==0x02) or (s[b]==0x03) or (s[b]==0x04) or (s[b]==0x05) or (s[b]==0x06) or (s[b]==0x07) or (s[b]==0x08) or (s[b]==0x0a) or (s[b]==0x0b) or (s[b]==0x0d) or (s[b]==0x0e) or (s[b]==0x0f) or (s[b]==0x10) or (s[b]==0x12) or (s[b]==0x13) or (s[b]==0x14) or (s[b]==0x15) or (s[b]==0x16) or (s[b]==0x18) or (s[b]==0x19) or (s[b]==0x1a) or (s[b]==0x46) or (s[b]==0x35)or (s[b]==0x38) or (s[a]==0x43) or (s[a]==0x3b))

 writeBytes(0x20310308,s)

 for c=1,2 do
  repeat
    s[c]=math.random(70)
    until not ((s[c]==0x09) or (s[c]==0x0c) or (s[c]==0x11) or (s[c]==0x17) or (s[c]==0x25) or (s[c]==0x26) or (s[c]==0x28) or (s[c]==0x29) or (s[c]==0x2d) or (s[c]==0x2e) or (s[c]==0x30) or (s[c]==0x31) or (s[c]==0x32) or (s[c]==0x33) or (s[c]==0x37) or (s[c]==0x39) or (s[c]==0x3c) or (s[c]==0x3e) or (s[c]==0x3f) or (s[c]==0x40) or (s[c]==0x41) or (s[c]==0x44) or (s[c]==0x45) or (s[c]==0x00) or (s[c]==0x01) or (s[c]==0x02) or (s[c]==0x03) or (s[c]==0x04) or (s[c]==0x05) or (s[c]==0x06) or (s[c]==0x07) or (s[c]==0x08) or (s[c]==0x0a) or (s[c]==0x0b) or (s[c]==0x0d) or (s[c]==0x0e) or (s[c]==0x0f) or (s[c]==0x10) or (s[c]==0x12) or (s[c]==0x13) or (s[c]==0x14) or (s[c]==0x15) or (s[c]==0x16) or (s[c]==0x18) or (s[c]==0x19) or (s[c]==0x1a) or (s[c]==0x46) or (s[c]==0x35)or (s[c]==0x38) or (s[c]==0x43) or (s[c]==0x3b))

 writeBytes(0x20310310,s)

 for d=1,2 do
  repeat
    s[d]=math.random(70)
    until not ((s[d]==0x09) or (s[d]==0x0c) or (s[d]==0x11) or (s[d]==0x17) or (s[d]==0x25) or (s[d]==0x26) or (s[d]==0x28) or (s[d]==0x29) or (s[d]==0x2d) or (s[d]==0x2e) or (s[d]==0x30) or (s[d]==0x31) or (s[d]==0x32) or (s[d]==0x33) or (s[d]==0x37) or (s[d]==0x39) or (s[d]==0x3c) or (s[d]==0x3e) or (s[d]==0x3f) or (s[d]==0x40) or (s[d]==0x41) or (s[d]==0x44) or (s[d]==0x45) or (s[d]==0x00) or (s[d]==0x01) or (s[d]==0x02) or (s[d]==0x03) or (s[d]==0x04) or (s[d]==0x05) or (s[d]==0x06) or (s[d]==0x07) or (s[d]==0x08) or (s[d]==0x0a) or (s[d]==0x0b) or (s[d]==0x0d) or (s[d]==0x0e) or (s[d]==0x0f) or (s[d]==0x10) or (s[d]==0x12) or (s[d]==0x13) or (s[d]==0x14) or (s[d]==0x15) or (s[d]==0x16) or (s[d]==0x18) or (s[d]==0x19) or (s[d]==0x1a) or (s[d]==0x46) or (s[d]==0x35)or (s[d]==0x38) or (s[d]==0x43) or (s[d]==0x3b))

 writeBytes(0x20310318,s)

 for e=1,2 do
  repeat
    s[e]=math.random(70)
    until not ((s[e]==0x09) or (s[e]==0x0c) or (s[e]==0x11) or (s[e]==0x17) or (s[e]==0x25) or (s[e]==0x26) or (s[e]==0x28) or (s[e]==0x29) or (s[e]==0x2d) or (s[e]==0x2e) or (s[e]==0x30) or (s[e]==0x31) or (s[e]==0x32) or (s[e]==0x33) or (s[e]==0x37) or (s[e]==0x39) or (s[e]==0x3c) or (s[e]==0x3e) or (s[e]==0x3f) or (s[e]==0x40) or (s[e]==0x41) or (s[e]==0x44) or (s[e]==0x45) or (s[e]==0x00) or (s[e]==0x01) or (s[e]==0x02) or (s[e]==0x03) or (s[e]==0x04) or (s[e]==0x05) or (s[e]==0x06) or (s[e]==0x07) or (s[e]==0x08) or (s[e]==0x0a) or (s[e]==0x0b) or (s[e]==0x0d) or (s[e]==0x0e) or (s[e]==0x0f) or (s[e]==0x10) or (s[e]==0x12) or (s[e]==0x13) or (s[e]==0x14) or (s[e]==0x15) or (s[e]==0x16) or (s[e]==0x18) or (s[e]==0x19) or (s[e]==0x1a) or (s[e]==0x46) or (s[e]==0x35)or (s[e]==0x38) or (s[e]==0x43) or (s[e]==0x3b))

 writeBytes(0x20310320,s)

 for f=1,2 do
  repeat
    s[f]=math.random(70)
    until not ((s[f]==0x09) or (s[f]==0x0c) or (s[f]==0x11) or (s[f]==0x17) or (s[f]==0x25) or (s[f]==0x26) or (s[f]==0x28) or (s[f]==0x29) or (s[f]==0x2d) or (s[f]==0x2e) or (s[f]==0x30) or (s[f]==0x31) or (s[f]==0x32) or (s[f]==0x33) or (s[f]==0x37) or (s[f]==0x39) or (s[f]==0x3c) or (s[f]==0x3e) or (s[f]==0x3f) or (s[f]==0x40) or (s[f]==0x41) or (s[f]==0x44) or (s[f]==0x45) or (s[f]==0x00) or (s[f]==0x01) or (s[f]==0x02) or (s[f]==0x03) or (s[f]==0x04) or (s[f]==0x05) or (s[f]==0x06) or (s[f]==0x07) or (s[f]==0x08) or (s[f]==0x0a) or (s[f]==0x0b) or (s[f]==0x0d) or (s[f]==0x0e) or (s[f]==0x0f) or (s[f]==0x10) or (s[f]==0x12) or (s[f]==0x13) or (s[f]==0x14) or (s[f]==0x15) or (s[f]==0x16) or (s[f]==0x18) or (s[f]==0x19) or (s[f]==0x1a) or (s[f]==0x46) or (s[f]==0x35)or (s[f]==0x38) or (s[f]==0x43) or (s[f]==0x3b))

 writeBytes(0x20310328,s)

  for g=1,2 do
  repeat
    s[g]=math.random(70)
    until not ((s[g]==0x09) or (s[g]==0x0c) or (s[g]==0x11) or (s[g]==0x17) or (s[g]==0x25) or (s[g]==0x26) or (s[g]==0x28) or (s[g]==0x29) or (s[g]==0x2d) or (s[g]==0x2e) or (s[g]==0x30) or (s[g]==0x31) or (s[g]==0x32) or (s[g]==0x33) or (s[g]==0x37) or (s[g]==0x39) or (s[g]==0x3c) or (s[g]==0x3e) or (s[g]==0x3f) or (s[g]==0x40) or (s[g]==0x41) or (s[g]==0x44) or (s[g]==0x45) or (s[g]==0x00) or (s[g]==0x01) or (s[g]==0x02) or (s[g]==0x03) or (s[g]==0x04) or (s[g]==0x05) or (s[g]==0x06) or (s[g]==0x07) or (s[g]==0x08) or (s[g]==0x0a) or (s[g]==0x0b) or (s[g]==0x0d) or (s[g]==0x0e) or (s[g]==0x0f) or (s[g]==0x10) or (s[g]==0x12) or (s[g]==0x13) or (s[g]==0x14) or (s[g]==0x15) or (s[g]==0x16) or (s[g]==0x18) or (s[g]==0x19) or (s[g]==0x1a) or (s[g]==0x46) or (s[g]==0x35)or (s[g]==0x38) or (s[g]==0x43) or (s[g]==0x3b))

 writeBytes(0x20310330,s)

  for h=1,2 do
  repeat
    s[h]=math.random(70)
    until not ((s[h]==0x09) or (s[h]==0x0c) or (s[h]==0x11) or (s[h]==0x17) or (s[h]==0x25) or (s[h]==0x26) or (s[h]==0x28) or (s[h]==0x29) or (s[h]==0x2d) or (s[h]==0x2e) or (s[h]==0x30) or (s[h]==0x31) or (s[h]==0x32) or (s[h]==0x33) or (s[h]==0x37) or (s[h]==0x39) or (s[h]==0x3c) or (s[h]==0x3e) or (s[h]==0x3f) or (s[h]==0x40) or (s[h]==0x41) or (s[h]==0x44) or (s[h]==0x45) or (s[h]==0x00) or (s[h]==0x01) or (s[h]==0x02) or (s[h]==0x03) or (s[h]==0x04) or (s[h]==0x05) or (s[h]==0x06) or (s[h]==0x07) or (s[h]==0x08) or (s[h]==0x0a) or (s[h]==0x0b) or (s[h]==0x0d) or (s[h]==0x0e) or (s[h]==0x0f) or (s[h]==0x10) or (s[h]==0x12) or (s[h]==0x13) or (s[h]==0x14) or (s[h]==0x15) or (s[h]==0x16) or (s[h]==0x18) or (s[h]==0x19) or (s[h]==0x1a) or (s[h]==0x46) or (s[h]==0x35)or (s[h]==0x38) or (s[h]==0x43) or (s[h]==0x3b))

 writeBytes(0x20310338,s)

  for j=1,2 do
  repeat
    s[j]=math.random(70)
    until not ((s[j]==0x09) or (s[j]==0x0c) or (s[j]==0x11) or (s[j]==0x17) or (s[j]==0x25) or (s[j]==0x26) or (s[j]==0x28) or (s[j]==0x29) or (s[j]==0x2d) or (s[j]==0x2e) or (s[j]==0x30) or (s[j]==0x31) or (s[j]==0x32) or (s[j]==0x33) or (s[j]==0x37) or (s[j]==0x39) or (s[j]==0x3c) or (s[j]==0x3e) or (s[j]==0x3f) or (s[j]==0x40) or (s[j]==0x41) or (s[j]==0x44) or (s[j]==0x45) or (s[j]==0x00) or (s[j]==0x01) or (s[j]==0x02) or (s[j]==0x03) or (s[j]==0x04) or (s[j]==0x05) or (s[j]==0x06) or (s[j]==0x07) or (s[j]==0x08) or (s[j]==0x0a) or (s[j]==0x0b) or (s[j]==0x0d) or (s[j]==0x0e) or (s[j]==0x0f) or (s[j]==0x10) or (s[j]==0x12) or (s[j]==0x13) or (s[j]==0x14) or (s[j]==0x15) or (s[j]==0x16) or (s[j]==0x18) or (s[j]==0x19) or (s[j]==0x1a) or (s[j]==0x46) or (s[j]==0x35)or (s[j]==0x38) or (s[j]==0x43) or (s[j]==0x3b))

 writeBytes(0x20310350,s)

 for k=1,2 do
  repeat
    s[k]=math.random(70)
    until not ((s[k]==0x09) or (s[k]==0x0c) or (s[k]==0x11) or (s[k]==0x17) or (s[k]==0x25) or (s[k]==0x26) or (s[k]==0x28) or (s[k]==0x29) or (s[k]==0x2d) or (s[k]==0x2e) or (s[k]==0x30) or (s[k]==0x31) or (s[k]==0x32) or (s[k]==0x33) or (s[k]==0x37) or (s[k]==0x39) or (s[k]==0x3c) or (s[k]==0x3e) or (s[k]==0x3f) or (s[k]==0x40) or (s[k]==0x41) or (s[k]==0x44) or (s[k]==0x45) or (s[k]==0x00) or (s[k]==0x01) or (s[k]==0x02) or (s[k]==0x03) or (s[k]==0x04) or (s[k]==0x05) or (s[k]==0x06) or (s[k]==0x07) or (s[k]==0x08) or (s[k]==0x0a) or (s[k]==0x0b) or (s[k]==0x0d) or (s[k]==0x0e) or (s[k]==0x0f) or (s[k]==0x10) or (s[k]==0x12) or (s[k]==0x13) or (s[k]==0x14) or (s[k]==0x15) or (s[k]==0x16) or (s[k]==0x18) or (s[k]==0x19) or (s[k]==0x1a) or (s[k]==0x46) or (s[k]==0x35)or (s[k]==0x38) or (s[k]==0x43) or (s[k]==0x3b))

 writeBytes(0x20310358,s)

  for l=1,2 do
  repeat
    s[l]=math.random(70)
    until not ((s[l]==0x09) or (s[l]==0x0c) or (s[l]==0x11) or (s[l]==0x17) or (s[l]==0x25) or (s[l]==0x26) or (s[l]==0x28) or (s[l]==0x29) or (s[l]==0x2d) or (s[l]==0x2e) or (s[l]==0x30) or (s[l]==0x31) or (s[l]==0x32) or (s[l]==0x33) or (s[l]==0x37) or (s[l]==0x39) or (s[l]==0x3c) or (s[l]==0x3e) or (s[l]==0x3f) or (s[l]==0x40) or (s[l]==0x41) or (s[l]==0x44) or (s[l]==0x45) or (s[l]==0x00) or (s[l]==0x01) or (s[l]==0x02) or (s[l]==0x03) or (s[l]==0x04) or (s[l]==0x05) or (s[l]==0x06) or (s[l]==0x07) or (s[l]==0x08) or (s[l]==0x0a) or (s[l]==0x0b) or (s[l]==0x0d) or (s[l]==0x0e) or (s[l]==0x0f) or (s[l]==0x10) or (s[l]==0x12) or (s[l]==0x13) or (s[l]==0x14) or (s[l]==0x15) or (s[l]==0x16) or (s[l]==0x18) or (s[l]==0x19) or (s[l]==0x1a) or (s[l]==0x46) or (s[l]==0x35)or (s[l]==0x38) or (s[l]==0x43) or (s[l]==0x3b))

 writeBytes(0x20310368,s)

 for m=1,2 do
  repeat
    s[m]=math.random(70)
    until not ((s[m]==0x09) or (s[m]==0x0c) or (s[m]==0x11) or (s[m]==0x17) or (s[m]==0x25) or (s[m]==0x26) or (s[m]==0x28) or (s[m]==0x29) or (s[m]==0x2d) or (s[m]==0x2e) or (s[m]==0x30) or (s[m]==0x31) or (s[m]==0x32) or (s[m]==0x33) or (s[m]==0x37) or (s[m]==0x39) or (s[m]==0x3c) or (s[m]==0x3e) or (s[m]==0x3f) or (s[m]==0x40) or (s[m]==0x41) or (s[m]==0x44) or (s[m]==0x45) or (s[m]==0x00) or (s[m]==0x01) or (s[m]==0x02) or (s[m]==0x03) or (s[m]==0x04) or (s[m]==0x05) or (s[m]==0x06) or (s[m]==0x07) or (s[m]==0x08) or (s[m]==0x0a) or (s[m]==0x0b) or (s[m]==0x0d) or (s[m]==0x0e) or (s[m]==0x0f) or (s[m]==0x10) or (s[m]==0x12) or (s[m]==0x13) or (s[m]==0x14) or (s[m]==0x15) or (s[m]==0x16) or (s[m]==0x18) or (s[m]==0x19) or (s[m]==0x1a) or (s[m]==0x46) or (s[m]==0x35)or (s[m]==0x38) or (s[m]==0x43) or (s[m]==0x3b))

 writeBytes(0x20310370,s)

  for n=1,2 do
  repeat
    s[n]=math.random(70)
    until not ((s[n]==0x09) or (s[n]==0x0c) or (s[n]==0x11) or (s[n]==0x17) or (s[n]==0x25) or (s[n]==0x26) or (s[n]==0x28) or (s[n]==0x29) or (s[n]==0x2d) or (s[n]==0x2e) or (s[n]==0x30) or (s[n]==0x31) or (s[n]==0x32) or (s[n]==0x33) or (s[n]==0x37) or (s[n]==0x39) or (s[n]==0x3c) or (s[n]==0x3e) or (s[n]==0x3f) or (s[n]==0x40) or (s[n]==0x41) or (s[n]==0x44) or (s[n]==0x45) or (s[n]==0x00) or (s[n]==0x01) or (s[n]==0x02) or (s[n]==0x03) or (s[n]==0x04) or (s[n]==0x05) or (s[n]==0x06) or (s[n]==0x07) or (s[n]==0x08) or (s[n]==0x0a) or (s[n]==0x0b) or (s[n]==0x0d) or (s[n]==0x0e) or (s[n]==0x0f) or (s[n]==0x10) or (s[n]==0x12) or (s[n]==0x13) or (s[n]==0x14) or (s[n]==0x15) or (s[n]==0x16) or (s[n]==0x18) or (s[n]==0x19) or (s[n]==0x1a) or (s[n]==0x46) or (s[n]==0x35)or (s[n]==0x38) or (s[n]==0x43) or (s[n]==0x3b))

 writeBytes(0x20310378,s)

 for o=1,2 do
  repeat
    s[o]=math.random(70)
    until not ((s[o]==0x09) or (s[o]==0x0c) or (s[o]==0x11) or (s[o]==0x17) or (s[o]==0x25) or (s[o]==0x26) or (s[o]==0x28) or (s[o]==0x29) or (s[o]==0x2d) or (s[o]==0x2e) or (s[o]==0x30) or (s[o]==0x31) or (s[o]==0x32) or (s[o]==0x33) or (s[o]==0x37) or (s[o]==0x39) or (s[o]==0x3c) or (s[o]==0x3e) or (s[o]==0x3f) or (s[o]==0x40) or (s[o]==0x41) or (s[o]==0x44) or (s[o]==0x45) or (s[o]==0x00) or (s[o]==0x01) or (s[o]==0x02) or (s[o]==0x03) or (s[o]==0x04) or (s[o]==0x05) or (s[o]==0x06) or (s[o]==0x07) or (s[o]==0x08) or (s[o]==0x0a) or (s[o]==0x0b) or (s[o]==0x0d) or (s[o]==0x0e) or (s[o]==0x0f) or (s[o]==0x10) or (s[o]==0x12) or (s[o]==0x13) or (s[o]==0x14) or (s[o]==0x15) or (s[o]==0x16) or (s[o]==0x18) or (s[o]==0x19) or (s[o]==0x1a) or (s[o]==0x46) or (s[o]==0x35)or (s[o]==0x38) or (s[o]==0x43) or (s[o]==0x3b))

 writeBytes(0x20310380,s)

 for p=1,2 do
  repeat
    s[p]=math.random(70)
    until not ((s[p]==0x09) or (s[p]==0x0c) or (s[p]==0x11) or (s[p]==0x17) or (s[p]==0x25) or (s[p]==0x26) or (s[p]==0x28) or (s[p]==0x29) or (s[p]==0x2d) or (s[p]==0x2e) or (s[p]==0x30) or (s[p]==0x31) or (s[p]==0x32) or (s[p]==0x33) or (s[p]==0x37) or (s[p]==0x39) or (s[p]==0x3c) or (s[p]==0x3e) or (s[p]==0x3f) or (s[p]==0x40) or (s[p]==0x41) or (s[p]==0x44) or (s[p]==0x45) or (s[p]==0x00) or (s[p]==0x01) or (s[p]==0x02) or (s[p]==0x03) or (s[p]==0x04) or (s[p]==0x05) or (s[p]==0x06) or (s[p]==0x07) or (s[p]==0x08) or (s[p]==0x0a) or (s[p]==0x0b) or (s[p]==0x0d) or (s[p]==0x0e) or (s[p]==0x0f) or (s[p]==0x10) or (s[p]==0x12) or (s[p]==0x13) or (s[p]==0x14) or (s[p]==0x15) or (s[p]==0x16) or (s[p]==0x18) or (s[p]==0x19) or (s[p]==0x1a) or (s[p]==0x46) or (s[p]==0x35)or (s[p]==0x38) or (s[p]==0x43) or (s[p]==0x3b))

 writeBytes(0x20310398,s)

 for q=1,2 do
  repeat
    s[q]=math.random(70)
    until not ((s[q]==0x09) or (s[q]==0x0c) or (s[q]==0x11) or (s[q]==0x17) or (s[q]==0x25) or (s[q]==0x26) or (s[q]==0x28) or (s[q]==0x29) or (s[q]==0x2d) or (s[q]==0x2e) or (s[q]==0x30) or (s[q]==0x31) or (s[q]==0x32) or (s[q]==0x33) or (s[q]==0x37) or (s[q]==0x39) or (s[q]==0x3c) or (s[q]==0x3e) or (s[q]==0x3f) or (s[q]==0x40) or (s[q]==0x41) or (s[q]==0x44) or (s[q]==0x45) or (s[q]==0x00) or (s[q]==0x01) or (s[q]==0x02) or (s[q]==0x03) or (s[q]==0x04) or (s[q]==0x05) or (s[q]==0x06) or (s[q]==0x07) or (s[q]==0x08) or (s[q]==0x0a) or (s[q]==0x0b) or (s[q]==0x0d) or (s[q]==0x0e) or (s[q]==0x0f) or (s[q]==0x10) or (s[q]==0x12) or (s[q]==0x13) or (s[q]==0x14) or (s[q]==0x15) or (s[q]==0x16) or (s[q]==0x18) or (s[q]==0x19) or (s[q]==0x1a) or (s[q]==0x46) or (s[q]==0x35)or (s[q]==0x38) or (s[q]==0x43) or (s[q]==0x3b))

 writeBytes(0x203103A0,s)
                end
               end
              end
             end
            end
           end
          end
         end
        end
       end
      end
     end
    end
   end
  end
 end
end
[DISABLE]
{$lua}
timerstand.Enabled = false
writeBytes(0x20310300,0x1B)
writeBytes(0x20310308,0x1C)
writeBytes(0x20310310,0x1E)
writeBytes(0x20310318,0x1F)
writeBytes(0x20310320,0x20)
writeBytes(0x20310328,0x2B)
writeBytes(0x20310330,0x22)
writeBytes(0x20310338,0x23)
writeBytes(0x20310350,0x27)
writeBytes(0x20310358,0x27)
writeBytes(0x20310368,0x2A)
writeBytes(0x20310370,0x2B)
writeBytes(0x20310378,0x36)
writeBytes(0x20310380,0x2C)
writeBytes(0x20310398,0x2F)
writeBytes(0x203103A0,0x2F)
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Fri Apr 22, 2022 4:35 pm    Post subject: Reply with quote

Do you even know those for loops are nested in each other?

Something like this:
Code:
local valid_bytes = {
  0x09, 0x0c, 0x11, 0x17, 0x25, 0x26, 0x28, 0x29,
  0x2d, 0x2e, 0x30, 0x31, 0x32, 0x33, 0x37, 0x39,
  0x3c, 0x3e, 0x3f, 0x40, 0x41, 0x44, 0x45, 0x00,
  0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
  0x0a, 0x0b, 0x0d, 0x0e, 0x0f, 0x10, 0x12, 0x13,
  0x14, 0x15, 0x16, 0x18, 0x19, 0x1a, 0x46, 0x35,
  0x38, 0x43, 0x3b
}

local function get_random_byte_pair()
  return valid_bytes[math.random(#valid_bytes)], valid_bytes[math.random(#valid_bytes)]
end

local addresses_to_write = {
  0x20310300, 0x20310300,
  0x20310308, 0x20310310,
  0x20310318, 0x20310320,
  0x20310328, 0x20310330,
  0x20310338, 0x20310350,
  0x20310358, 0x20310368,
  0x20310370, 0x20310378,
  0x20310380, 0x20310398,
  0x203103A0
}


if timerstand then timerstand.destroy(); timerstand = nil end
timerstand = createTimer()
timerstand.Interval = 20
timerstand.OnTimer = function()
  for _,addr in ipairs(addresses_to_write) do
    writeBytes(addr, get_random_byte_pair())
  end
end

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Lorizzuoso
Cheater
Reputation: 0

Joined: 09 Apr 2022
Posts: 27

PostPosted: Fri Apr 22, 2022 4:46 pm    Post subject: Simplify script Reply with quote

You're right my bad,thanks for the reply
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Fri Apr 22, 2022 5:19 pm    Post subject: Reply with quote

Code:

[ENABLE]
{$lua}
if syntaxcheck then return end
s={}

function checkValue(sVal)
 if ((sVal~=0x09) or (sVal~=0x0c) or (sVal~=0x11) or (sVal~=0x17) or (sVal~=0x25) or (sVal~=0x26) or (sVal~=0x28) or (sVal~=0x29) or (sVal~=0x2d) or (sVal~=0x2e) or (sVal~=0x30) or (sVal~=0x31) or (sVal~=0x32) or (sVal~=0x33) or (sVal~=0x37) or (sVal~=0x39) or (sVal~=0x3c) or (sVal~=0x3e) or (sVal~=0x3f) or (sVal~=0x40) or (sVal~=0x41) or (sVal~=0x44) or (sVal~=0x45) or (sVal~=0x00) or (sVal~=0x01) or (sVal~=0x02) or (sVal~=0x03) or (sVal~=0x04) or (sVal~=0x05) or (sVal~=0x06) or (sVal~=0x07) or (sVal~=0x08) or (sVal~=0x0a) or (sVal~=0x0b) or (sVal~=0x0d) or (sVal~=0x0e) or (sVal~=0x0f) or (sVal~=0x10) or (sVal~=0x12) or (sVal~=0x13) or (sVal~=0x14) or (sVal~=0x15) or (sVal~=0x16) or (sVal~=0x18) or (sVal~=0x19) or (sVal~=0x1a) or (sVal~=0x46) or (sVal~=0x35)or (sVal~=0x38) or (sVal~=0x43) or (sVal~=0x3b)) then
  return true
 end
  return false
end

timerstand = createTimer(nil, false)
timerstand.Interval = 20
timerstand.Enabled = true
timerstand.OnTimer = function()

    s[a]=math.random(0x46)
     if checkValue(s[a])==true then writeBytes(0x20310300,s[a]) end

    s[b]=math.random(0x46)
     if checkValue(s[b])==true then writeBytes(0x20310308,s[b]) end

    s[c]=math.random(0x46)
     if checkValue(s[c])==true then writeBytes(0x20310310,s[c]) end

    s[d]=math.random(0x46)
     if checkValue(s[d])==true then writeBytes(0x20310318,s[d]) end

    s[e]=math.random(0x46)
     if checkValue(s[e])==true then writeBytes(0x20310320,s[e]) end

    s[f]=math.random(0x46)
     if checkValue(s[f])==true then writeBytes(0x20310328,s[f]) end

    s[g]=math.random(0x46)
     if checkValue(s[g])==true then writeBytes(0x20310330,s[g]) end

    s[h]=math.random(0x46)
     if checkValue(s[h])==true then writeBytes(0x20310338,s[h]) end

    s[j]=math.random(0x46)
     if checkValue(s[j])==true then writeBytes(0x20310350,s[j]) end

    s[k]=math.random(0x46)
     if checkValue(s[k])==true then writeBytes(0x20310358,s[k]) end

    s[l]=math.random(0x46)
     if checkValue(s[l])==true then writeBytes(0x20310368,s[l]) end

    s[m]=math.random(0x46)
     if checkValue(s[m])==true then writeBytes(0x20310370,s[m]) end

    s[n]=math.random(0x46)
     if checkValue(s[n])==true then writeBytes(0x20310378,s[n]) end

    s[o]=math.random(0x46)
     if checkValue(s[o])==true then writeBytes(0x20310380,s[o]) end

    s[p]=math.random(0x46)
     if checkValue(s[p])==true then writeBytes(0x20310398,s[p]) end

    s[q]=math.random(0x46)
     if checkValue(s[q])==true then writeBytes(0x203103A0,s[q]) end
end


{$asm}

[DISABLE]
{$lua}
timerstand.Enabled = false
writeBytes(0x20310300,0x1B)
writeBytes(0x20310308,0x1C)
writeBytes(0x20310310,0x1E)
writeBytes(0x20310318,0x1F)
writeBytes(0x20310320,0x20)
writeBytes(0x20310328,0x2B)
writeBytes(0x20310330,0x22)
writeBytes(0x20310338,0x23)
writeBytes(0x20310350,0x27)
writeBytes(0x20310358,0x27)
writeBytes(0x20310368,0x2A)
writeBytes(0x20310370,0x2B)
writeBytes(0x20310378,0x36)
writeBytes(0x20310380,0x2C)
writeBytes(0x20310398,0x2F)
writeBytes(0x203103A0,0x2F)

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lorizzuoso
Cheater
Reputation: 0

Joined: 09 Apr 2022
Posts: 27

PostPosted: Fri Apr 22, 2022 7:05 pm    Post subject: Simplify script Reply with quote

What if I have to write single bytes and not multiple bytes?If I put writeByte it doesn't work
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Fri Apr 22, 2022 7:12 pm    Post subject: Reply with quote

Just pass one byte to writeBytes.
Code:
writeBytes(0x1234ABC, 0xCC)

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Fri Apr 22, 2022 7:39 pm    Post subject: Reply with quote

You write values that give a random every 20 sadises to the addresses.
And these values are already 1 byte.

But pay attention to the scan value when creating addresses.
4 bytes, double, float or 1 byte!
In whatever scan memory you created the addresses, adjust the reprint value accordingly.
"writeBytes", "writeInteger", "address.value=newValue" etc.

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lorizzuoso
Cheater
Reputation: 0

Joined: 09 Apr 2022
Posts: 27

PostPosted: Sat Apr 23, 2022 6:13 am    Post subject: Simplify script Reply with quote

The problem is that I need the script to change only the first value and not all of those


Cattura.JPG
 Description:
Address
 Filesize:  11.95 KB
 Viewed:  2503 Time(s)

Cattura.JPG


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sat Apr 23, 2022 7:11 am    Post subject: Reply with quote

It shouldn't be hard to try.


Ek1.PNG
 Description:
 Filesize:  59.29 KB
 Viewed:  2484 Time(s)

Ek1.PNG



_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lorizzuoso
Cheater
Reputation: 0

Joined: 09 Apr 2022
Posts: 27

PostPosted: Sat Apr 23, 2022 8:15 am    Post subject: Simplify script Reply with quote

This?


Cattura.JPG
 Description:
 Filesize:  59.44 KB
 Viewed:  2474 Time(s)

Cattura.JPG


Back to top
View user's profile Send private message
AylinCE
Grandmaster Cheater Supreme
Reputation: 31

Joined: 16 Feb 2017
Posts: 1234

PostPosted: Sat Apr 23, 2022 9:00 am    Post subject: Reply with quote

You don't try! You are just playing.

Code:
writeBytes(0x20305A5E) -- cahange code?
--or
writeBytes(0x20305A5E,0x3E)
--or
writeBytes(0x20305A5E,math.random(0x46))



I guess you don't have a problem!

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lorizzuoso
Cheater
Reputation: 0

Joined: 09 Apr 2022
Posts: 27

PostPosted: Sat Apr 23, 2022 9:04 am    Post subject: Simplify script Reply with quote

I'm so lost,I don't think I'm on the same page as you


Cattura.JPG
 Description:
 Filesize:  48.09 KB
 Viewed:  2456 Time(s)

Cattura.JPG


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
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