CLEO Last Day | Бот собиратель ресурсов.

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

astap_

Известный
Автор темы
Всефорумный модератор
626
597
ColBot.cs


Описание: автоматически собирает ресурсы (дерево, камень, железо, ганджу) на проекте LastDay on SAMP . Телепортируется кордмастером, под текстурками. Нельзя деактивировать в то время, как происходит телепорт, не баг а фича)), Делал на заказ, но после выполнения работы, заказчик слился, поэтому выкидываю сюда.
Сервак вроде полудохлый, но энивей кому-нибудь пригодится.

Активация / деактивация: команда /col.
Требования: cleo 4.3, SAMPFUNCS 5.3.3.
Автор: astap_

Демонстрация:

CLEO:
{$CLEO}
0000:
thread 'astap'

while not SAMP.Available()
    wait 0
end
0B34: samp register_client_command "col" to_label @col
log "{DF0B0B}[COLLBOT.CS] --> {861623}Collector Bot for Last Day"
log "{DF0B0B}[COLLBOT.CS] --> {861623}Developer: astap_ "

while true
wait 0
    for 2@ = 0 to 1000
    0B50: samp 3@ = object_handle_by_id 2@
        if 03CA:   object 3@ exists
        then
            01BB: store_object 3@ position_to 5@ 6@ 7@
            if or
            09CC:   object 3@ model_is 830 // iron
            09CC:   object 3@ model_is 848 // wood
            09CC:   object 3@ model_is 748 // stone
            09CC:   object 3@ model_is 19473 // weeeeeeeeeeeeed
            then
                if 28@ == true
                then
                    Actor.StorePos($PLAYER_ACTOR , 10@ 11@ 12@)
                    wait 50
                    call @CoordTP 8 5@ 6@ 7@ 1.15 45 15.0 1 1.00
                    0B2B: samp 0@ = get_player_id_by_actor_handle $PLAYER_ACTOR
                    alloc 1@ 68
                    0BBA: samp store_player 0@ onfoot_data 1@
                    0C0D: struct 1@ offset 4 size 2 = 4 // Left Mouse Button
                    0BC0: samp send_onfoot_data 1@
                    free 1@ 
                    //0B56: set_game_key 17 state -128         
                    wait 6500
                    29@ += 1
                    chatmsg "{DF0B0B}[COLLBOT.CS] --> {ffffff}Статус активации: {DF0B0B}%i{ffffff}. Собрано лута: {DF0B0B}%i{ffffff}" -1 28@ 29@
                end 
            end
        end
    end
end

                                                                               
:col
if 28@ == false
then
    print "ColBot ~y~enabled!" 2000
    018C: SOUND 1083 0.0 0.0 0.0 
    28@ = 1
else
    print "ColBot ~p~disabled!" 2000
    018C: SOUND 1085 0.0 0.0 0.0
    28@ = 0
    29@ = 0
end
SAMP.CmdRet()

:CoordTP
wait 0
var                                                     
    0@: float
    1@: float
    2@: float
    3@: float
    4@: integer
    5@: float
    6@: integer
    7@: float
    8@: float
    9@: float
    10@: float
    11@: float
    12@: float
    13@: float
    14@: float
    32@: integer
end
00A0: store_actor $PLAYER_ACTOR position_to 12@ 13@ 14@
8@ = 0@ 
9@ = 1@
10@ = 2@
if 6@ == 1 
then

if 00DF: actor $PLAYER_ACTOR driving
then                                                                                                                                                                   
    03C0: 20@ = actor $PLAYER_ACTOR car 
    099A: set_car 20@ collision_detection 0
    0519: set_car 20@ locked 1
else
    0619: enable_actor $PLAYER_ACTOR collision_detection 0 
end
else
    if 00DF: actor $PLAYER_ACTOR driving 
    then
    0B2E: 20@ = read_samp_memory offset 24672 size 1 
    0B2D: write_samp_memory offset 24672 value 195 size 1 
else
    0B2E: 20@ = read_samp_memory offset 17104 size 1 
    0B2D: write_samp_memory offset 17104 value 195 size 1 
    end
end

050A: 11@ = distance_between_XYZ 12@ 13@ 14@ and_XYZ 12@ 13@ 5@ 
while 11@ > 7@ 
wait 0
32@ = 0 
   if 14@ > 5@ 
then
14@ -= 7@ 
if 6@ == 0 
    then

    else
    08C7: put_actor $PLAYER_ACTOR at 12@ 13@ 14@
end
else 
    14@ += 7@
    if 6@ == 0
    then

    else
        08C7: put_actor $PLAYER_ACTOR at 12@ 13@ 14@
    end
end
050A: 11@ = distance_between_XYZ 12@ 13@ 14@ and_XYZ 12@ 13@ 5@

repeat
   wait 1
until 32@ >= 4@ 
end

if 6@ == 0 
   then

else
08C7: put_actor $PLAYER_ACTOR at 12@ 13@ 5@
end
32@ = 0 
repeat
   wait 1
until 32@ >= 4@

0509: 11@ = distance_between_XY 12@ 13@ and_XY 0@ 1@ 
   8@ -= 12@
9@ -= 13@
0604: get_Z_angle_for_point 8@ 9@ store_to 14@ 
while 11@ > 3@ 
   wait 0
32@ = 0
02F6: 8@ = sine 14@
02F7: 9@ = cosine 14@
8@ *= 3@
9@ *= 3@
12@ -= 8@
13@ += 9@
if 6@ == 0
then

else
08C7: put_actor $PLAYER_ACTOR at 12@ 13@ 5@
end     
   0509: 11@ = distance_between_XY 12@ 13@ and_XY 0@ 1@
repeat
   wait 1
until 32@ >= 4@
end
if 6@ == 0
    then
   
    else
    08C7: put_actor $PLAYER_ACTOR at 0@ 1@ 5@
end

32@ = 0
repeat
   wait 1
until 32@ >= 4@

050A: 11@ = distance_between_XYZ 0@ 1@ 5@ and_XYZ 0@ 1@ 2@
while 11@ > 7@
wait 0
32@ = 0
if 5@ > 2@
    then
    5@ -= 7@
        if 6@ == 0
        then

        else
        08C7: put_actor $PLAYER_ACTOR at 0@ 1@ 5@
        end
    else
        5@ += 7@
        if 6@ == 0
        then

        else
            08C7: put_actor $PLAYER_ACTOR at 0@ 1@ 5@
        end
    end
   
050A: 11@ = distance_between_XYZ 0@ 1@ 5@ and_XYZ 0@ 1@ 2@

repeat
   wait 1
until 32@ >= 4@

end

08C7: put_actor $PLAYER_ACTOR at 0@ 1@ 2@

if 6@ == 1
then

    if 00DF: actor $PLAYER_ACTOR driving
        then
        099A: set_car 20@ collision_detection 1
        0519: set_car 20@ locked 0
        else
        0619: enable_actor $PLAYER_ACTOR collision_detection 1
        end
else

    if 00DF: actor $PLAYER_ACTOR driving
    then
        0B2D: write_samp_memory offset 24672 value 20@ size 1
    else
        0B2D: write_samp_memory offset 17104 value 20@ size 1
    end
end
0AB2: ret 0
 

Вложения

  • colbot.cs
    24 KB · Просмотры: 36
  • colbot.txt
    5.2 KB · Просмотры: 28
Последнее редактирование:

™ ChipFamily

По ту сторону надежды.
5,144
1,980
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Вот бы бегающего. Сделаешь?
 

yxTbl

Фуфел
339
249
Мусор сервак. Баг на кейсы нашел, баг на ресы, недавно баг на вирты фиксанули.
Чекайте аккаунт: SlivE
Password: Sosat+lejat
 

[PP] Angelo

Новичок
13
2
Мусор сервак. Баг на кейсы нашел, баг на ресы, недавно баг на вирты фиксанули.
Чекайте аккаунт: SlivE
Password: Sosat+lejat
Баг на кейсы у жек как давно...

Че за баг на кейсы?)
Короче смари получаешь например 5 кейсов подрят открываешь их,потом как перезаходишь и они снова у тебя
 

yxTbl

Фуфел
339
249
Баг на кейсы у жек как давно...


Короче смари получаешь например 5 кейсов подрят открываешь их,потом как перезаходишь и они снова у тебя
Вот это в 1-е слышу. Я ничего не делаю и кейсы появляются. Статистику профиля чекни. Я даже ресы не добываю и квесты не выполняю. Всё по 0.
 
Статус
В этой теме нельзя размещать новые ответы.

Похожие темы

  1. У
    Ответы
    12
    Просмотры
    2K
    Инфа
    Удалённый пользователь 140342
    У
  2. Ответы
    5
    Просмотры
    2K
  3. Ответы
    3
    Просмотры
    869
  4. Ответы
    4
    Просмотры
    905