Исходник Исходники бота-фермера

Статус
В этой теме нельзя размещать новые ответы.

MogAika

Известный
Автор темы
Друг
237
441
Активация M+K
[HIDE=5]
Код:
{$CLEO .cs}
 
thread 'MG_A_Ferma'
 
var
0@:Float //px
1@:Float //py
2@:Float //pz
3@:Float //mx
4@:Float //my
5@:Float //mz
6@:Integer //counter
7@:Float //dist
8@:Integer //result
 
11@:Integer //tempvar
12@:Float //newdist
13@:Integer //tempvar
14@:Integer //tempvar
15@:Integer //MarkerIDPrev
16@:Integer //MarkerIDNew
 
20@:Float  //sx
21@:Float  //sy
22@:Float  //sz
end
 
10@ = 0xC7DD58
0000:NOP "MADE BY MOGAIKA (MGA)"
 
:start
wait 0
if and
    0AB0:  key_pressed 75  //если нажато K
    0AB0:  key_pressed 77  //если нажато M
jf @start
 
:start_release
wait 0
if or
    0AB0:  key_pressed 75  //если нажато K
    0AB0:  key_pressed 77  //если нажато M
jf @lb_ch
0ACD: show_text_highpriority "Bot Starting" time 1500
jump @start_release
 
 
:lb_ch
01F5: $PLAYER_ACTOR = get_player_actor $PLAYER_CHAR 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
22@ -= 1.0
//02CE: 22@ = ground_z_at 20@ 21@ 22@ 
Actor.LockInCurrentPosition($PLAYER_ACTOR, True)
 
//---------------------ГЛАВНЫЙ ЦИКЛ-----------------------
:lb_farm_mtk
wait 0
if
    gosub @chk_key
jf @lb_key_release
if
    gosub @find_mt           //Поиск метки
then
    Actor.LockInCurrentPosition($PLAYER_ACTOR, False)
    Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 5@) //Загрузка
    Actor.LockInCurrentPosition($PLAYER_ACTOR, True)
else
    Actor.LockInCurrentPosition($PLAYER_ACTOR, False)
    Actor.PutAt($PLAYER_ACTOR, 20@, 21@, 22@)   //Разгрузка
    Actor.LockInCurrentPosition($PLAYER_ACTOR, True)
end
jump @lb_farm_mtk
//-------------------------------------------------------
 
:lb_key_release
Actor.LockInCurrentPosition($PLAYER_ACTOR, False)
wait 0
if or
    0AB0:  key_pressed 75  //если нажато K
    0AB0:  key_pressed 77  //если нажато M
jf @start
0ACD: show_text_highpriority "Bot Stopping" time 1500
jump @lb_key_release
 
//------------------gosubs-------------
:find_mt
    7@ = 20.0
    8@ = -1
    6@ = 0
    while 6@<32
        14@ = 6@
        14@ *= 160
        0A8E: 13@ = 10@ + 14@
        0A8E: 11@ = 13@ + 48
        0A8D: 3@ = read_memory 11@ size 4 virtual_protect 0
        0A8E: 11@ = 13@ + 52
        0A8D: 4@ = read_memory 11@ size 4 virtual_protect 0
        if and
            3@ <> 0.0
            4@ <> 0.0        
        then
            0509: 12@ = distance_between_XY 3@ 4@ and_XY 20@ 21@ 
            if
                12@ < 7@
            then
                7@ = 12@
                8@ = 6@
            end
        end
        inc(6@)
    end
    
    if
        8@ == -1
    then
        059A: return_false
    else
        14@ = 8@
        14@ *= 160
        0A8E: 13@ = 10@ + 14@
        0A8E: 11@ = 13@ + 84
        0A8D: 16@ = read_memory 11@ size 4 virtual_protect 0 
        if
            16@ == 0
        then
            059A: return_false
        else
            0A8E: 11@ = 13@ + 48
            0A8D: 3@ = read_memory 11@ size 4 virtual_protect 0
            0A8E: 11@ = 13@ + 52
            0A8D: 4@ = read_memory 11@ size 4 virtual_protect 0
            0A8E: 11@ = 13@ + 56
            0A8D: 5@ = read_memory 11@ size 4 virtual_protect 0
            0485: return_true
        end 
    end
return
 
:chk_key
    if and
        0AB0:  key_pressed 75  //если нажато K
        0AB0:  key_pressed 77  //если нажато M
    then
        059A: return_false
    else
        0485: return_true
    end
return
[/HIDE]
 

Charlatan

Новичок
Друг
290
18
И еще использовать твой скрипт, что бы не скользил, вообше тема)
 
Статус
В этой теме нельзя размещать новые ответы.