ha.sh
Active member
- Joined
- Nov 14, 2018
- Messages
- 66
- Reaction score
- 0
Can someone help me for this? I've tried to make a cleo for Anti AFK. That'll be need the 3 digits number. The problem is, the cleo can't read that 3 digits from the string after "/afk".
Code:
Code:
Code:
if
0256: player $PLAYER_CHAR defined
then
0AC8: 1@ = allocate_memory_size 260
0AB1: @getChatEntryText 1 ChatLineID 99 _Returned: text 1@ // 99 last chat line
0AC8: 2@ = allocate_memory_size 260
0AB1: @DeleteColorCodeFromText 4 text 1@ FirstCharacter 123 SecondCharacter 125 memory_to_store_characters_as_text 2@ // remove color codes and return clean string
0AC8: 3@ = allocate_memory_size 1024
0AD3: 3@ = format "You are now AFK, use `/afk"
0AC8: 5@ = allocate_memory_size 1024
0AB1: @get_digits_to_print 2 text 3@ memory_to_store_digits_as_text 5@
if
0AB1: @IfTextContains 2 String1 2@ String2 3@ _returned: text 4@ // find text and compare to make sure is that what we need
then
wait 700
0AB1: @SEND_CMD 1 text 5@
wait 1000 // Antispam
end
end