CLEO Help Auto command

CLEO related
Status
Not open for further replies.

Renglee

Member
Joined
Apr 3, 2020
Messages
14
Reaction score
2
Location
Romania
hello, I would like to help a little this way. After you see in the picture there is a textdraw with a gift, under that gift when "Collect your reward" https://ibb.co/tcQH2d4 will appear you will have to automatically give the command "/ getgift" and press s the textdraw with spin https://ibb.co/qsgLfMY ?. How do you think I can write the code. I'm a beginner and I would like to learn
 

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
Check for all txd id (0 to 2304). Check for the next you need. Get the coords of the txd and yourselve's. If the distance is lower than.. idk 5-10 depends on how far you can type /getgift, then type the command. After that, check the txd (0 to 2304) for the word 'SPIN' and click that txd. Search in opcodes 'click' or something related to click txd (either one of those words). And thats it. I hope everything is clear, if i made any mistakes please correct me.
 

Renglee

Member
Joined
Apr 3, 2020
Messages
14
Reaction score
2
Location
Romania
Code:
{$CLEO .cs}
0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY


WHILE TRUE
   WAIT 0
END


0B35: 0@
for 1@ = 0 to 2304
  if 0C5D: samp textdraw 1@ is_exists
  then
      alloc 2@ = 1024
      0C5A: samp textdraw 1@ get_string_to 2@
      if 0C29: 3@ = stristr string1 2@ string2 0@
      then 0AF8: "Collect your reward" -1 1@ 0@
       0af9: "/getgift"
      end
      
  end
end

I got that but its crashing and dont working
 

Renglee

Member
Joined
Apr 3, 2020
Messages
14
Reaction score
2
Location
Romania
Check for all txd id (0 to 2304). Check for the next you need. Get the coords of the txd and yourselve's. If the distance is lower than.. idk 5-10 depends on how far you can type /getgift, then type the command. After that, check the txd (0 to 2304) for the word 'SPIN' and click that txd. Search in opcodes 'click' or something related to click txd (either one of those words). And thats it. I hope everything is clear, if i made any mistakes please correct me.
Where can i get txd ids?
 

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
Code:
{$CLEO .cs}
0000:


REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY


WHILE TRUE
   WAIT 0
END


0B35: 0@
for 1@ = 0 to 2304
  if 0C5D: samp textdraw 1@ is_exists
  then
      alloc 2@ = 1024
      0C5A: samp textdraw 1@ get_string_to 2@
      if 0C29: 3@ = stristr string1 2@ string2 0@
      then 0AF8: "Collect your reward" -1 1@ 0@
       0af9: "/getgift"
      end
     
  end
end

I got that but its crashing and dont working
You want to continuously search for what you need therefore you need to put that in loop. You don't need 0c5d because you are searching through all of them anyways, that's just a useless condition. you only put alloc 2@ 1024, no equal sign (=) needed. im not sure what you did with 0c29.. use 0c18.. I'm not sure what you did here..
Code:
if 0C29: 3@ = stristr string1 2@ string2 0@

      then 0AF8: "Collect your reward" -1 1@ 0@
I'm very confused here.. next you haven't closed all your conditions. The FOR loop isn't ended. You need END for that too.
Overall: Good effort but you can improve. Do all this in a loop. Goodluck.
 

KamikazeSripterul

Well-known member
Joined
Jun 30, 2019
Messages
353
Reaction score
23
You want to continuously search for what you need therefore you need to put that in loop. You don't need 0c5d because you are searching through all of them anyways, that's just a useless condition. you only put alloc 2@ 1024, no equal sign (=) needed. im not sure what you did with 0c29.. use 0c18.. I'm not sure what you did here..
Code:
if 0C29: 3@ = stristr string1 2@ string2 0@

      then 0AF8: "Collect your reward" -1 1@ 0@
I'm very confused here.. next you haven't closed all your conditions. The FOR loop isn't ended. You need END for that too.
Overall: Good effort but you can improve. Do all this in a loop. Goodluck.
Edit: about finding the txd id, you dont.. search up txd id.. The server you play on has it's IDs. Check all of them (0 to 2304) and check for the string you need.
 
Status
Not open for further replies.
Top