ResourceFinder v2.0
Описание: скрипт, который значительно упростит вам поиск ценных руд на шахте Arizona RP. Все ископаемые будут рендериться на вашем экране. Поиск происходит по 3D-тектсу, это значит, что вы увидите руду до того, как прорисуется сам объект.
Помимо рендера, скрипт будет уведомлять вас, каждый раз как будет замечать золото и будет предлагать телепортироваться к нему. Исходя из последних обновлений античита, телепорт не стабилен и попытка переместиться дальше чем на 100м. вероятнее всего закончится киком. Для удобства добавил отображение дистанции в чат при появлении золота.
Также в скрипте теперь присутствует функция антисбива анимации во время добычи (hi/kiss). Включается/отключается в ini-файле и работает только если скрипт активирован.
Активация / деактивация: /rwh
Настройки конфига:
RenderStone=1 — показывает камень.
RenderStone=0 — игнорирует камень.
AntiReset=1 — функция анти-сбива включена.
AntiReset=0 — функция анти-сбива отключена.
ResourceNotification=1 — уведомления о спавне новой руды включены.
ResourceNotification=0 — уведомления о спавне новой отключены.
Требования: CLEO 4.3 , SAMPFUNCS 5.3.3+
Автор: astap_
CLEO:
{$CLEO}
{$INCLUDE SF}
0000:
thread "@astap"
0662: 0.ResourseFinder " "
0662: 0.Made_by_astap_ " "
0662: 0.BlastHack.Net " "
if 8AAB: file_exists "CLEO\rwh.ini"
then
0AF1: write_int 1 to_ini_file "cleo\rwh.ini" section "Settings" key "RenderStone"
0AF1: write_int 1 to_ini_file "cleo\rwh.ini" section "Settings" key "AntiReset"
0AF1: write_int 1 to_ini_file "cleo\rwh.ini" section "Settings" key "ResourceNotification"
end
0AF0: 11@ = get_int_from_ini_file "cleo\rwh.ini" section "Settings" key "RenderStone"
0AF0: 21@ = get_int_from_ini_file "cleo\rwh.ini" section "Settings" key "ResourceNotification"
while not SAMP.Available()
wait 0
end
0C6A: 16@ = create_custom_thread_at_label @wanted
if 21@ == 1
then
0C6A: 10@ = create_custom_thread_at_label @3dtextHOOK
end
27@ = Render.CreateFont("Arial", 9, 5)
0B6C: render 9@ = font 27@ draw_height
0b34: cmd "rwh" to_label @rwh
while 8B61: samp is_local_player_spawned
wait 0
end
CHATMSG "{ffcc00}[Resource Finder 2.0]{FFFFFF}: успешно загружен! {ffcc00}Используйте:{FFFFFF} /rwh." -1
CHATMSG "{ffcc00}[Resource Finder 2.0]{FFFFFF}: Разработчик: {ffcc00}astap{FFFFFF}." -1
while true
wait 0
if 31@ == true
then
for 0@ = 1000 to 1200
if 0B46: samp 3d_text 0@ defined
then
0C46: samp get_3d_text_info_by_id 0@ string_ptr 1@ color 0 position 28@ 29@ 30@ view_distance 0 show_behind_walls 0 attached_to_player 0 attached_to_vehicle 0
Actor.StorePos($PLAYER_ACTOR 22@ 23@ 24@)
0B55: convert_3D_coords 22@ 23@ 24@ to_screen 20@ 21@
050A: 19@ = distance_between_XYZ 22@ 23@ 24@ and_XYZ 28@ 29@ 30@
alloc 18@ 24
format 18@ = "DIST: %2.f" 19@
alloc 2@ 256
format 2@ = "%s" 1@
if 00C2: sphere_onscreen 28@ 29@ 30@ radius 0.0
then
if 0C18: 3@ = strstr string1 2@ string2 "золота"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFFffcc00)
Render.DrawText(27@ , "[GOLD]" 25@ 26@ 0xFFffcc00)
005a: 26@ += 9@
Render.DrawText(27@ , 18@ 25@ 26@ 0xFFffcc00)
end
if 0C18: 3@ = strstr string1 2@ string2 "металла"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFF86877F)
Render.DrawText(27@ , "[METAL]" 25@ 26@ 0xFF86877F)
005a: 26@ += 9@
Render.DrawText(27@ , 18@ 25@ 26@ 0xFF86877F)
end
if 0C18: 3@ = strstr string1 2@ string2 "бронзы"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFFa54e22)
Render.DrawText(27@ , "[BRONZE]" 25@ 26@ 0xFFa54e22)
005a: 26@ += 9@
Render.DrawText(27@ , 18@ 25@ 26@ 0xFFa54e22)
end
if 0C18: 3@ = strstr string1 2@ string2 "серебра"
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFF42f4df)
Render.DrawText(27@ , "[SILVER]" 25@ 26@ 0xFF42f4df)
005a: 26@ += 9@
Render.DrawText(27@ , 18@ 25@ 26@ 0xFF42f4df)
end
if and
0C18: 3@ = strstr string1 2@ string2 "камня"
11@ == 1
then
0B55: convert_3D_coords 28@ 29@ 30@ to_screen 25@ 26@
Render.DrawLine(20@, 21@, 25@, 26@, 1, 0xFFFFFFFF)
Render.DrawText(27@ , "[STONE]" 25@ 26@ 0xFFFFFFFF)
005a: 26@ += 9@
Render.DrawText(27@ , 18@ 25@ 26@ 0xFFFFFFFF)
end
free 2@
free 18@
else
free 2@
free 18@
end
end
end
end
end
:teleport
0BE3: raknet setup_incoming_rpc_hook @sppHook
4@ = 0
while true
wait 0
for 0@ = 1000 to 1200
if 0B46: samp 3d_text 0@ defined
then
0C46: samp get_3d_text_info_by_id 0@ string_ptr 1@ color 0 position 28@ 29@ 30@ view_distance 0 show_behind_walls 0 attached_to_player 0 attached_to_vehicle 0
alloc 2@ 256
format 2@ = "%s" 1@
if
0C18: 3@ = strstr string1 2@ string2 "золота"
then
free 2@
Actor.StorePos($PLAYER_ACTOR, 11@ 12@ 13@)
050A: 8@ = distance_between_XYZ 11@ 12@ 13@ and_XYZ 28@ 29@ 30@
chatmsg "• Вижу {ffcc00}золото (ID: %i){FFFFFF}! Дистанция: {ffcc00}%2.f м.{FFFFFF} Нажмите {ffcc00}F9{FFFFFF} для телепортации." -1 0@ 8@
018C: SOUND 1139 0.0 0.0 0.0
while true
wait 1
4@ += 1
if 4@ == 1000
then
goto @teleport
end
if 0c89: 120
then
0C83: samp force_onfoot_sync
break // teleport confirmed!
end
end
9@ = TRUE // hook incoming RPC
Player.CanMove($PLAYER_ACTOR) = false
if Actor.Driving($PLAYER_ACTOR)
then
0792: disembark_instantly_actor $PLAYER_ACTOR
end
04D7: set_actor $PLAYER_ACTOR locked 1
04E4: refresh_game_renderer_at 11@ 12@
03CB: set_rendering_origin_at 11@ 12@ 13@
Actor.StorePos($PLAYER_ACTOR , 5@ 6@ 7@)
while 0031: not 7@ >= -100.0
7@ -= 0.94
call @emulFalling 3 5@ 6@ 7@
if Actor.Driving($PLAYER_ACTOR)
then
0792: disembark_instantly_actor $PLAYER_ACTOR
end
end
call @emulFalling 3 5@ 6@ -101.0
04E4: refresh_game_renderer_at 11@ 12@
03CB: set_rendering_origin_at 11@ 12@ 13@
00A1: put_actor $PLAYER_ACTOR at 11@ 12@ 13@
04BB: select_interior 0
0860: link_actor $PLAYER_ACTOR to_interior 0
0BCF: samp send_interior_change 0
Player.CanMove($PLAYER_ACTOR) = true
02EB: restore_camera_with_jumpcut
for 26@ = 1 to 3 [step 1]
0C83: samp force_onfoot_sync
end
print "~y~teleported" 1500
21@ = FALSE
Actor.PutAt($PLAYER_ACTOR 28@ 29@ 30@)
wait 15000
9@ = FALSE
else
free 2@
end
end
end
end
:sppHook
0BE5: raknet 10@ = get_hook_param PARAM_PACKETID
IF 9@ == TRUE
THEN
IF 10@ == RPC_SCRSETPLAYERPOS
THEN
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Внимание! RPC_SCRSETPLAYERPOS проигнорирован. {FFCC00}Возможен кик." 0xffcc00
0BE0: raknet hook_ret FALSE
END
END
0BE0: raknet hook_ret TRUE
:info
0@ = Render.CreateFont("Arial", 10, 5)
0B60: convert_game_screen_coords x: 497.0 y: 98.0 to_window_screen_coords 1@ 2@
0B60: convert_game_screen_coords x: 536.0 y: 106.0 to_window_screen_coords 3@ 4@
0B60: convert_game_screen_coords x: 545.0 y: 114.0 to_window_screen_coords 5@ 6@
0B60: convert_game_screen_coords x: 494.0 y: 97.0 to_window_screen_coords 13@ 14@
0B60: convert_game_screen_coords x: 120.0 y: 28.0 to_window_screen_coords 15@ 16@
while true
wait 0
call @GetLocalTime 0 7@ 8@ 9@
alloc 10@ 124
alloc 11@ 124
alloc 12@ 124
FORMAT 12@ = "{FFCC00}[{FFFFFF}%i{FFCC00}:{FFFFFF}%i{FFCC00}:{FFFFFF}%i{FFCC00}]" 7@ 8@ 9@
format 10@ = "Resource{FFFFFF}Finder{FFCC00} v2.0 {FFFFFF}| {FFcc00}Developer: {FFFFFF}astap"
format 11@ = "Blast{FFFFFF}Hack{FFcc00}.Net"
//0B6A: render draw_box_with_border_pos 13@ 14@ size 15@ 16@ color 0x50000000 border_size 1 border_color 0xffffcc00
Render.DrawText(0@ 10@ 1@ 2@ 0xFFFFCC00)
Render.DrawText(0@ 11@ 3@ 4@ 0xFFFFCC00)
Render.DrawText(0@ 12@ 5@ 6@ 0xFFFFCC00)
free 10@
free 11@
free 12@
end
:GetLocalTime
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetLocalTime" library 0@
0AC8: 2@ = alloc mem 16
0AA5: call 1@ params 1 pop 0 2@
0085: 3@ = 2@
0A8D: 4@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 5@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 6@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 7@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 8@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 9@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 10@ = read mem 3@ size 2 vp 0
3@ += 2
0A8D: 11@ = read mem 3@ size 2 vp 0
0AC9: free_allocated_memory 2@
ret 3 8@ 9@ 10@
:emulFalling
0B2B: samp 3@ = get_player_id_by_actor_handle $PLAYER_ACTOR
0AC8: 4@ = allocate_memory_size 68
0BBA: samp store_player 3@ onfoot_data 4@
0C0D: struct 4@ offset 6 size 4 = 0@
0C0D: struct 4@ offset 10 size 4 = 1@
0C0D: struct 4@ offset 14 size 4 = 2@
0C0D: struct 4@ offset 38 size 4 = 0.0
0C0D: struct 4@ offset 42 size 4 = 0.0
0C0D: struct 4@ offset 46 size 4 = -0.939
0BC0: samp send_onfoot_data 4@
0AC9: free_allocated_memory 4@
0AB2: ret 0
:wanted
while true
wait 0
if 010F: player $PLAYER_CHAR wanted_level > 0
then
010D: set_player $PLAYER_CHAR wanted_level_to 0
end
end
:rwh
0B12: 31@ = 31@ XOR 1
if 31@ == true
then
print "resourse finder ~y~acivated!" 2000
018C: SOUND 1083 0.0 0.0 0.0
0C6A: 15@ = create_custom_thread_at_label @teleport
0C6A: 12@ = create_custom_thread_at_label @info
0C6A: 13@ = create_custom_thread_at_label @antiReset
end
if 31@ == false
then
print "resourse finder ~r~deacivated!~n~~s~visit ~b~blast.hk" 2000
018C: SOUND 1085 0.0 0.0 0.0
0C6E: destroy_custom_thread 15@
0C6E: destroy_custom_thread 13@
0C6E: destroy_custom_thread 12@
end
CMDRET
:antiReset
0BE3: raknet setup_incoming_rpc_hook @ApplyAnimHook
call @prepare_animation_info 1 id 589 save_to lib 8@ name 9@
call @prepare_animation_info 1 id 39 save_to lib 10@ name 11@
call @prepare_animation_info 1 id 37 save_to lib 12@ name 13@
0AF0: 0@ = get_int_from_ini_file "cleo\rwh.ini" section "Settings" key "AntiReset"
repeat
wait 0
until false
:ApplyAnimHook
0BE5: raknet 1@ = get_hook_param PARAM_PACKETID
if and
1@ == RPC_SCRAPPLYANIMATION
0@ == 1
then
0BE5: raknet 2@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 3@ = bit_stream_read 2@ type BS_TYPE_SHORT
4@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
if 003B: 3@ == 4@
then
alloc 6@ 48
alloc 7@ 48
0BE7: raknet 5@ = bit_stream_read 2@ type BS_TYPE_BYTE // lib len
0BE8: raknet bit_stream 2@ read_array 6@ size 5@ // lib string
0C1E: array 6@ element 5@ el_size 1 = 0x0
0BE7: raknet 5@ = bit_stream_read 2@ type BS_TYPE_BYTE // anim len
0BE8: raknet bit_stream 2@ read_array 7@ size 5@ // anim string
0C1E: array 7@ element 5@ el_size 1 = 0x0
if and
0C21: stricmp string1 6@ string2 12@
0C21: stricmp string1 7@ string2 13@
then
free 6@
free 7@
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Вам попытались сбить анимацию {FFCC00}(kiss){FFFFFF}, но скрипт этому помешал." 0xffcc00
0BE0: raknet hook_ret false
end
if and
0C21: stricmp string1 6@ string2 10@
0C21: stricmp string1 7@ string2 11@
then
free 6@
free 7@
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Вам попытались сбить анимацию {FFCC00}(kiss){FFFFFF}, но скрипт этому помешал." 0xffcc00
0BE0: raknet hook_ret false
end
if and
0C21: stricmp string1 6@ string2 8@
0C21: stricmp string1 7@ string2 9@
then
free 6@
free 7@
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Вам попытались сбить анимацию {FFCC00}(hi){FFFFFF}, но скрипт этому помешал." 0xffcc00
0BE0: raknet hook_ret false
end
free 6@
free 7@
end
end
0BE0: raknet hook_ret true
:prepare_animation_info
alloc 1@ 48
alloc 2@ 48
0C11: memset 1@ value 0x0 size 48
0C11: memset 2@ value 0x0 size 48
0B58: samp get_animation_name_to 1@ file_to 2@ by_id 0@
ret 2 1@ 2@
:3dtextHOOK
0BE3: raknet setup_incoming_rpc_hook @hook
repeat
wait 100
until false
:hook
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
IF 0@ == RPC_SCRCREATE3DTEXTLABEL
THEN
0BE5: raknet 0@ = get_hook_param PARAM_BITSTREAM
0BE7: raknet 2@ = bit_stream_read 0@ type BS_TYPE_SHORT{2} // id 16
0BE7: raknet 3@ = bit_stream_read 0@ type BS_TYPE_INT{3} // color 5
0BE7: raknet 4@ = bit_stream_read 0@ type BS_TYPE_FLOAT{4} // posX 82
0BE7: raknet 5@ = bit_stream_read 0@ type BS_TYPE_FLOAT{4} // posY 114
0BE7: raknet 6@ = bit_stream_read 0@ type BS_TYPE_FLOAT{4} // posZ 146
0BE7: raknet 7@ = bit_stream_read 0@ type BS_TYPE_FLOAT{4} // dist 178
0BE7: raknet 8@ = bit_stream_read 0@ type BS_TYPE_BYTE{1} // los?
0BE7: raknet 9@ = bit_stream_read 0@ type BS_TYPE_SHORT{2} // player ID
0BE7: raknet 10@ = bit_stream_read 0@ type BS_TYPE_SHORT{2} // car id? da
alloc 11@ 1024
0C11: memset 11@ 0 1024
0BF4: raknet bit_stream 0@ decode_string 11@ size 1023
IF 0C29: 31@ = stristr string1 11@ string2 "металла"
THEN
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Появился метал (ID: {86877F}%i{FFFFFF})." 0xffcc00 2@
END
IF 0C29: 31@ = stristr string1 11@ string2 "серебра"
THEN
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Появилось серебро (ID: {42f4df}%i{FFFFFF})." 0xffcc00 2@
END
IF 0C29: 31@ = stristr string1 11@ string2 "бронзы"
THEN
chatmsg "[ResourceFinder 2.0]: {FFFFFF}Появилась бронза (ID: {a54e22}%i{FFFFFF})." 0xffcc00 2@
END
free 11@
END
0BE0: raknet hook_ret TRUE
Вложения
Последнее редактирование: