Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0000:
- repeat
- wait 50
- until 0AFA: is_samp_available
- alloc 1@ 500
- 0B34: samp register_client_command "autodrugs" to_label @toggle
- 31@ = 0
- if 0AAB: file_exists "CLEO\autoDrugsSettings.ini"
- then
- 0AF0: 10@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "after_buy_cmd"
- 0AF0: 11@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "after_buy_item_min"
- 0AF0: 12@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "after_buy_item_max"
- 0AF0: 13@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "after_all_buying"
- 0AF0: 14@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "before_sending_dialog_min"
- 0AF0: 15@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "before_sending_dialog_max"
- 0AF0: 16@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "before_next_produce_heroin"
- 0AF0: 17@ = get_int_from_ini_file "CLEO\autoDrugsSettings.ini" section "Settings" key "deactivation_key"
- //alloc 30@ 200
- //format 30@ "autoDrugsSettings: %d %d %d %d %d %d %d %d" 10@ 11@ 12@ 13@ 14@ 15@ 16@ 17@
- //chatmsg 30@ -1
- //free 30@
- else
- 0AF8: samp add_message_to_chat "{F7F694}CLEO\autoDrugsSettings.ini {FF4800}not found. {F7F694}The mod won't work"
- 0A93: end_custom_thread
- end
- while true
- wait 0
- if 31@ == 1
- then
- //deactivation by key
- call @DeactivationCheck 2 key 17@ state 31@ _returnedState 31@
- say "/buy"
- wait 10@
- for 30@ = 1 to 5
- call @WaitRandomTime 2 lowerBorder 11@ higherBorder 12@
- 0B49: samp set_current_dialog_list_item 3 // 3 id could be 4th item
- wait 1000
- 0B47: samp close_current_dialog_with_button 1 //buy button
- wait 500
- end
- 0B47: samp close_current_dialog_with_button 2 //close button
- wait 13@
- for 30@ = 1 to 5
- say "/produce heroin"
- // wait for dialog
- for 29@ = 1 to 3
- while 8B4C: samp is_dialog_active -1
- wait 0
- wait 20
- call @DeactivationCheck 2 key 17@ state 31@ _returnedState 31@
- if 31@ == 0
- then
- break
- end
- end
- 0BD7: 1@ //get text
- call @GetLast11CharactersFromString 1 stringPointer 1@ _returnedPointer 2@
- call @WaitRandomTime 2 lowerBorder 14@ higherBorder 15@
- call @SendDialogResponse 1 responseStringPointer 2@
- wait 100
- //printf 2@ 1000
- call @DeactivationCheck 2 key 17@ state 31@ _returnedState 31@
- if 31@ == 0
- then
- break
- end
- end
- wait 16@
- end
- end
- end
- :toggle
- 0B12: 31@ = 31@ 1
- if 31@ == 1
- then
- printf "autoDrugs is ~G~activated" 1000
- else
- printf "autoDrugs is ~R~deactivated" 1000
- end
- samp.CmdRet()
- :GetLast11CharactersFromString
- 0C17: 31@ = strlen 0@
- 005A: 0@ += 31@ // (int)
- 0@ -= 11
- ret 1 0@
- :DeactivationCheck
- if key_down 0@
- then
- printf "autoDrugs is ~R~deactivated" 1000
- 1@ = 0
- end
- ret 1 1@
- :WaitRandomTime// 2 2873 3861
- 0209: 31@ = random_int_in_ranges 0@ 1@
- wait 31@
- ret 0
- :SendDialogResponse
- 0B4B: samp set_current_dialog_editbox_text 0@
- 0B47: samp close_current_dialog_with_button 1
- ret 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement