0% found this document useful (0 votes)
51 views

FarmBot 0.2 by Astap

This document contains code for a FarmBot script in the SA-MP game mod. The script allows players to interact with a FarmBot character in game via the "/fbot" command. The FarmBot will greet players, follow them around for a period of time, and return to its starting position.

Uploaded by

Peter Tibbett
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

FarmBot 0.2 by Astap

This document contains code for a FarmBot script in the SA-MP game mod. The script allows players to interact with a FarmBot character in game via the "/fbot" command. The FarmBot will greet players, follow them around for a period of time, and return to its starting position.

Uploaded by

Peter Tibbett
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

{$CLEO}

0000:
THREAD "astap"
0662: printstring "FarmBot | for Arizona Role Play"
0662: printstring "Developer: astap_ | vk.com/fakeastap"
0662: printstring "Primary Source: BLASTHACK.NET | blast.hk"

:SA
WAIT 0
IF
SAMP.Available()
JF @SA
0B34: samp register_client_command "fbot" to_label @rofl1
WAIT 10000
0C45: �D-TEXT 1488 "{FF8D00}>{FFFFFF} ��������: /fbot {FF8D00}<{FFFFFF}" COLOR -1
POS -105.85 100.82 3.12 30.0 TRUE PLAYER -1 VEHICLE -1
CHATMSG "{FF8D00}[FarmBot | Arizona RP] {FFFFFF}������� ��������!" -1
CHATMSG "{FF8D00}[FarmBot | Arizona RP] {FFFFFF}�����������: {FF8D00}astap_{FFFFFF}
| ���������� ��: {FF8D00}blast.hk" -1

:fbot
WAIT 0
IF
31@ == 1
JF @fbot
CALL @FindObject 0 15@ 1@ 2@ 3@ // 15@ - model
IF
15@ == 864
JF @fbot
IF
CALL @CheckPlayer 2 1@ 2@
JF @fbot
0A8E: 16@ = 16@ + 1
CALL @CharGoto 4 1@ 2@ 3@ TRUE
CALL @SendKeySync 0
WAIT 11000
0373: set_camera_directly_behind_player
0B56: set_game_key 1 state 128
WAIT 500
CALL @CharGoto 4 -105.85 100.82 3.12 TRUE
0373: set_camera_directly_behind_player
:fbot2
WAIT 800
IF
803B: NOT 16@ == 17@ // (int)
JF @fbotPay
GOTO @fbot

:fbotPay
WAIT 1500
CALL @CharGoto 4 -102.00 73.00 3.12 TRUE
CALL @CharGoto 4 -80.57 82.70 3.12 FALSE
CALL @SendPosKeySync 0
WAIT 600
CALL @CharGoto 4 -102.00 73.00 3.12 FALSE
CALL @CharGoto 4 -117.00 89.00 3.12 TRUE
16@ = 0
GOTO @fbot
:rofl1
IF
31@ == 0
JF @rofl2
GOTO @rofl3

:rofl4
0AF8: samp add_message_to_chat "{FF8D00}[FarmBot | Arizona RP]: {FFFFFF}��������
����������! �� ������ ��������� �� {FF8D00}�����{FFFFFF}!" color 0xFFFFFF
6@ = 0
SAMP.CmdRet()

:rofl3
IF
00ED: actor $PLAYER_ACTOR sphere 0 near_point -105.85 100.82 radius 35.0 35.0
on_foot
JF @rofl4
0B35: samp 20@ = get_last_command_params
IF
0AD4: 20@ = scan_string 20@ format "%d" 17@
JF @error
31@ = 1
0AF8: samp add_message_to_chat "{FF8D00}[FarmBot | Arizona RP]: {FFFFFF}���
�����������! �� ����������� ������� ������� �� ���." color 0xFFFFFF
018C: play_sound 1150 at 0.0 0.0 0.0
6@ = 0
SAMP.CmdRet()

:rofl2
31@ = 0
018C: play_sound 1084 at 0.0 0.0 0.0
0AF8: samp add_message_to_chat "{FF8D00}[FarmBot | Arizona RP]: {FFFFFF}���
�������������! ��������� �������� �����." color 0xFFFFFF
16@ = 0
SAMP.CmdRet()

:error
CHATMSG "{FF8D00}[FarmBot | Arizona RP]: {FFFFFF}�������: /fbot {FF8D00}[���-��
������]" 0xFFFFFF
6@ = 0
SAMP.CMDRET()

:SendPosKeySync
0B2B: samp 21@ = get_player_id_by_actor_handle $PLAYER_ACTOR
ALLOC 1@ 68
0BBA: samp store_player 21@ onfoot_data 1@
0C0D: struct 1@ offset 4 size 2 = 1024
0C0D: struct 1@ offset 6 size 4 = -80.57
0C0D: struct 1@ offset 10 size 4 = 82.70
0C0D: struct 1@ offset 14 size 4 = 3.12
0BC0: samp send_onfoot_data 1@
FREE 1@
RET 0

:SendKeySync
0B2B: samp 21@ = get_player_id_by_actor_handle $PLAYER_ACTOR
ALLOC 1@ 68
0BBA: samp store_player 21@ onfoot_data 1@
0C0D: struct 1@ offset 4 size 2 = 1024
0BC0: samp send_onfoot_data 1@
FREE 1@
RET 0

:CheckPlayer
0A8E: 2@ = 2@ + 1
0039: 2@ == 997
JF @CheckPlayer1
2@ = 0
RET 0

:CheckPlayer1
0B23: samp is_player_connected 2@
JF @CheckPlayer
0B20: samp 3@ = actor_handle_by_samp_player_id 2@
056D: actor 3@ defined
JF @CheckPlayer
80ED: NOT actor 3@ 0 near_point 0@ 1@ radius 5.0 5.0 on_foot
JF @CheckPlayerFalse
GOTO @CheckPlayer

:CheckPlayerFalse
2@ = 0
RET 0

:FindObject
Actor.StorePos($PLAYER_ACTOR, 1@ 2@ 3@)
0AE3: 0@ = random_object_near_point 1@ 2@ 3@ in_radius 80.0 find_next 1
0984: 4@ = object 0@ model
01BB: store_object 0@ position_to 1@ 2@ 3@
RET 4 4@ 1@ 2@ 3@

:CharGoto
REPEAT
WAIT 0
00A0: store_actor $PLAYER_ACTOR position_to 4@ 5@ 2@
0063: 0@ -= 4@
0063: 1@ -= 5@
0604: get_Z_angle_for_point 0@ 1@ store_to 2@
005B: 0@ += 4@
005B: 1@ += 5@
2@ *= 0.01745
0A96: 4@ = actor $PLAYER_ACTOR struct
4@ += 0x558
0A8C: write_memory 4@ size 4 value 2@ virtual_protect 0
0373: set_camera_directly_behind_player
IF
3@ == FALSE
THEN
4@ = 0xB73458
4@ += 0x20
0A8C: write_memory 4@ size 1 value 0 virtual_protect 0
4@ = 0xB73458
4@ += 0x3
0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
ELSE
4@ = 0xB73458
4@ += 0x20
0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
4@ = 0xB73458
4@ += 0x3
0A8C: write_memory 4@ size 1 value 255 virtual_protect 0
END
UNTIL 00ED: actor $PLAYER_ACTOR 0 near_point 0@ 1@ radius 0.8 0.8 on_foot
0AB2: RET 0

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy