CLEO Help Cleo help

CLEO related
Status
Not open for further replies.

Robbert

Member
Joined
Apr 24, 2018
Messages
18
Reaction score
0
Hello!
I need a script that shows the distance between me and the players in a server chat dialog that look like this:
In the photo is the chat dialog and the [/find] used on a player.
I hope someone can help me or give me some ideas.
It does not need to choose someone in the dialog to find distance, after it shows me the distance between all of there i should choose the lowest distance maybe.
 

Robbert

Member
Joined
Apr 24, 2018
Messages
18
Reaction score
0
I didn`t mean that, i need that after the dialog opens (when i type [/gethit]) to show me the distance in that dialog to every player, i hope that is possible.
 

Zin

Expert
Joined
Aug 1, 2013
Messages
1,690
Reaction score
103
I made this snippet for reading between text breaks. If you use 0BD7 and input it into this you can use a FOR loop or something to get all the different lines. I don't know how to edit list dialogs (probably requires some offset that Parazitas will know) but you could create your own list dialog based on the extracted values that would replace the server list dialog. I imagine it doesn't matter if it's client sided as it looks like it's purely for informative purposes and selecting one of those players won't do anything right?
C++:
// 0AB1: call_scm_func @GetListText 2 DialogText_ 0@ ListItem_ 1 _ListText_ 0@
:GetListText
0C17: 2@ = strlen 0@
FOR 3@ = 1 TO 2@ STEP 1
    0C0C: 4@ = struct 0@ offset 3@ size 1 // ASCII value of each character
    IF
        4@ == 10 // Line break in ASCII
    THEN
        5@ += 1 // Go next line.
        IF
            003B:   5@ == 1@ // Is the correct line being read?
        THEN
            005A: 0@ += 3@ // Erases previous line.
        END
    END
    IF
        001D:   5@ > 1@  // Number of lines specified
    THEN
        0C0D: struct 0@ offset 3@ size 1 = 0 // Erases character.
    END
END
0AB2: ret 1 0@
 
Status
Not open for further replies.
Top