set %idscript PEPITO_MINER set %versionscript 0.24 set %bodscript PEPITO_GIROBOD set %Alarmscript PEPITO_ALARM set %idUnivoco #true set #lpc 1000 gosub Inizializza_Variabili gosub Inizializza_Contatori gosub Check_Skill_Recall set %magia_usata #result set #lpc 100 gosub check_hp gosub Start_Menu gosub Get_Position_Container gosub Crea_Lista_Item_e_Container gosub Crea_Spot_Rune gosub Set_Ultime_Variabili gosub Crea_Menu_Avviato if %debug gosub LOOP_DEBUG if %pepito_alarm gosub Alarm_init MAIN_LOOP: gosub Torna_a_Casa gosub check_hp if #result <> OK gosub heal ALL gosub smelta if %bank_base = #true gosub Apri_bank %chest_base gosub sposta_loot gosub Restock_tool if #scnt > %timer_bod && %ritiro_bod { set %cont_Bod %cont_Bod + 1 menu set txtCicliBod %cont_Bod gosub GB_Start set %timer_bod #scnt + 3600 } if #time >= %sospendida && #time <= %sospendia && %sospendi gosub Sospendi_script %sospendida %sospendia VAI_SPOT_LOOP: if #scnt > %timer_bod && %ritiro_bod goto MAIN_LOOP gosub Vai_allo_spot set %time_start_spot #scnt if %usa_fire_beetle gosub unmount %fbmtype %id_firebeetle gosub Begin_Spot set %spot_Time . %cont_runa %spot_Time . %cont_runa + ( #scnt - %time_start_spot ) menu set txtSpot_Time . %cont_runa %spot_Time . %cont_runa menu set txtSpot_Picconate . %cont_runa %Spot_Picconate . %cont_runa if %usa_fire_beetle && #scnt > %next_food { gosub sfama_pet if #result { set %next_food #scnt + 3600 set #result SPOT_FINITO } else { set #result TORNA_A_CASA } } if #time >= %sospendida && #time <= %sospendia && %sospendi set #result TORNA_A_CASA if #result = TORNA_A_CASA { if %usa_fire_beetle gosub mount %id_firebeetle %fbmtype goto MAIN_LOOP } if #result = SPOT_FINITO { if %usa_fire_beetle gosub mount %id_firebeetle %fbmtype set %cont_runa %cont_runa + 1 goto VAI_SPOT_LOOP } display ok ERRORE $ qui non ci doveva arrivare $ FINE MAIN_LOOP ;################## GENERIC SUB START ########################### ;sub Alarm_add v 1.0 -> p 1(2) -> d 0 sub Alarm_add set !addID %1 set !display %2 if !addID notin * . %idAlarmscript { set * . %idAlarmscript * . %idAlarmscript , !addID , _ return ADDED } return ALREADY ;sub Alarm_check v 1.1 -> p 0 -> d 0 sub Alarm_check set !alarm_jindex_esc #jindex finditem %Type_PG G_8 if #findkind <> -1 { gosub Alarm_PG_FINDED #findid if #result { set %alarm_Type PG gosub alarm_start goto alarm_end } } if %ALARM_JINDEX <= !alarm_jindex_esc { for !alarm_scan_journal %ALARM_JINDEX !alarm_jindex_esc { scanjournal !alarm_scan_journal if notin #journal { if ciao in #journal || hey in #journal || sei in #journal { set %alarm_journal #journal set %alarm_Type SAY gosub alarm_start set !alarm_jindex_esc #jindex break } } } } alarm_end: set %ALARM_JINDEX !alarm_jindex_esc + 1 return ;sub Alarm_init v 1.0 -> p 0 -> d 0 sub Alarm_init set %ALARM_JINDEX #JINDEX str Mid * . %idAlarmscript 1 1 if #strres <> _ set * . %idAlarmscript _ return ;sub Alarm_menu_loop v 1.0 -> p 0 -> d 0 sub Alarm_menu_loop set #MENUBUTTON N/A alarm_menu_loop_Ciclo: wait 1 if #MENUBUTTON = N/A goto alarm_menu_loop_Ciclo ;selezionato pulsante if #menubutton = CLOSED { set #MENUBUTTON N/A event ExMsg #CHARID 3 30 Script chiuso halt } if alarm_ notin #menubutton { sound wait 5 set #MENUBUTTON N/A goto alarm_menu_loop_Ciclo } if alarm_B in #menubutton { wait 5 set !v #menubutton set #MENUBUTTON N/A return % . !v } display ok #MENUBUTTON in alarm_menu_loop non trovato! pause return ;sub Alarm_pg_finded v 1.1 -> p 1 -> d getproperty sub Alarm_pg_finded set %alarm_id %1 set !alarm_t _ , %alarm_id , _ if !alarm_t in * . %idAlarmscript || %alarm_id = #CHARID { event exmsg %alarm_id 3 30 IGNORO ignoreitem %alarm_id Alarm_ignore return #false } gosub getproperty %alarm_id set %alarm_property #result if #spc , the , #spc in %alarm_property || shop , #spc , name: in %alarm_property { event exmsg #findid 3 30 IGNORO ignoreitem #findid Alarm_ignore_vendor return #false } set %alarm_Type PG return #true ;sub Alarm_start v 1.1 -> p 0 -> d 0 sub Alarm_start set !pageweb http://pepitoweb.altervista.org/pepito_easyuo/alarm.php?idscript= , %idscript execute !pageweb if %alarm_Type = PG { gosub menu_modal_message PG_NON_CONOSCIUTO %alarm_property MODE1 if IGNORA in #result { if #result = IGNORA_SEMPRE gosub Alarm_add %alarm_id ignoreitem %alarm_id Alarm_ignore } } if %alarm_Type = SAY { gosub replace %alarm_journal _ #spc gosub menu_modal_message DIALOGO_SOSPETTO #strres MODE2 } return ;sub Antiblock v 1.4 -> p 0(1) -> d Timer_Event Save_Event (DEVONO_ESSERE_CUSTOM) sub Antiblock if %0 = 1 gosub Timer_event %1 else gosub Timer_Event NORMAL set %maxpausa #scnt + 40 if %last_journal_read_save = N/A set %last_journal_read_save #jindex - 6 for !scan_index %last_journal_read_save #jindex { scanjournal !scan_index if : notin #journal && ( The_world_is_saving in #journal || Cleaning_resources in #journal );|| { gosub Save_Event START aspettaskip: for !scan_index 5 1 { scanjournal !scan_index if World_save_complete in #journal || Resources_cleaned in #journal { gosub Save_Event FINE goto fine } wait 5 } if #scnt > %maxpausa { gosub Save_Event FINE goto fine } goto aspettaskip } } fine: set %last_journal_read_save #jindex return ;sub Apri_bank v 1.0 -> p 1 -> d antiblock Wait_idgump sub Apri_bank set !id_chest %1 msg BANK BANK $ gosub antiblock gosub Wait_idgump !id_chest 5 return #result ;sub Apri_gump_base v 1.3 -> p 0(1) -> d 0 sub Apri_gump_base _OPEN_PAPERDOLL: set !err_apri_gump_base #scnt + 1 event macro 8 1 loop_apri_paperdoll: if #scnt > !err_apri_gump_base goto _OPEN_PAPERDOLL if #contname <> PAPERDOLL_GUMP goto loop_apri_paperdoll wait 10 if %1 = SAVE { set %PAPERDOLL_X #CONTPOSX set %PAPERDOLL_Y #CONTPOSY event sysMessage Save Papeprdoll position... } else { if %PAPERDOLL_X <> N/A && %1 <> NOPOSITION { set #CONTPOSX %PAPERDOLL_X set #CONTPOSY %PAPERDOLL_Y } } _OPEN_STATUS: set !err_apri_gump_base #scnt + 1 event macro 8 2 loop_apri_status: if #scnt > !err_apri_gump_base goto _OPEN_STATUS if #contname <> STATUS_GUMP goto loop_apri_status wait 10 if %1 = SAVE { set %STATUS_X #CONTPOSX set %STATUS_Y #CONTPOSY event sysMessage Save Status position... } else { if %STATUS_X <> N/A && %1 <> NOPOSITION { set #CONTPOSX %STATUS_X set #CONTPOSY %STATUS_Y } } _OPEN_BACKPACK: set !err_apri_gump_base #scnt + 1 event macro 8 7 loop_apri_backpack: if #scnt > !err_apri_gump_base goto _OPEN_BACKPACK if #contID <> #backpackid goto loop_apri_backpack wait 10 if %1 = SAVE { if #CONTPOSX <> N/A { set %BACKPACK_X #CONTPOSX set %BACKPACK_Y #CONTPOSY event sysMessage Save Backpack position... } } else { if %BACKPACK_X <> N/A && %1 <> NOPOSITION { set #CONTPOSX %BACKPACK_X set #CONTPOSY %BACKPACK_Y } } return ;sub Avvicinati_vendor v 1.0 -> p 1 -> d 0 sub Avvicinati_vendor set !v_id %1 ;vendor id finditem !v_id g_ if #findkind = -1 return #false gosub PathFind #findx #findy #findz return #result ;sub Check_object v 1.0 -> p 2(3) -> d 0 sub Check_object ;%1 id oggetto, %2 id container, %3 opt stack if %1 = N/A || %2 = N/A return #false if %0 < 3 set %3 1 finditem %1 c_ , %2 if #findkind = -1 return #false if #findstack < %3 return #false return #true ;sub Check_peso v 1.0 -> p 0(1) -> d antiblock apri_gump_base sub Check_peso if %0 = 1 set !extraspreadw %1 else set !extraspreadw 0 loop_check_peso: if #WEIGHT = N/A { gosub AntiBlock gosub apri_gump_base goto loop_check_peso } set !maxw #maxweight + %modweight - ( 30 + !extraspreadw ) if #WEIGHT > !maxw return #false return #true ;sub Check_skill_recall v 1.0 -> p 0 -> d 0 sub Check_skill_recall chooseSkill Mager set !csr_magery #SKILL chooseSkill Chiva set !csr_chiva #SKILL if !csr_magery > ( !csr_chiva - 1 ) { set !csr_skillsel !csr_magery set !csr_return mager } else { set !csr_skillsel !csr_chiva set !csr_return chiva } if !csr_skillsel < 250 { display OK Hai skill per recallarti troppo basse $ Script fermato. halt } return !csr_return ;sub Check_tool v 1.2 -> p 1(3) -> d GetToolUses sub Check_tool ;%1 type object %2 minimo di usi %3 contid se diverso da backpackid set !limit 0 if %0 = 2 set !limit %2 set !ct_contid #BACKPACKID if %0 = 3 set !ct_contid %3 set %check_tool_result_uses 0 finditem %1 c_ , !ct_contid if #findkind <> -1 { if !limit > 0 { set !it_id #findid for #findindex 1 #findcnt { gosub GetToolUses #findid set %check_tool_result_uses %check_tool_result_uses + #result if %check_tool_result_uses > !limit break } if %check_tool_result_uses > !limit return !it_id } else { return #findid } } ;var return %check_tool_result_uses return #false ;sub Checkconnection v 1.5 -> p 0 -> d Set_Menu_Azione Log_in apri_gump_base sospendi_Script sub Checkconnection ;var necessarie %cont_connlost %mycharnum if #contname <> waiting_gump || #contsize <> 203_121 return gosub Set_Menu_Azione CONNECTION_LOST set %cont_connlost %cont_connLost + 1 menu set txtconnlost %cont_connlost checkconn_quit: set !cl_x #contposx + 101 set !cl_y #contposy + 90 click !cl_x !cl_y set !cl_timeOut #scnt + 20 checkconn_waitlogout: if #scnt > !cl_timeOut goto checkconn_quit if #contname <> MainMenu_gump goto checkconn_waitlogout while #time >= %sospendida && #time < %sospendia && %sospendi ; non tentare login fra i due valori { wait 60s } gosub Set_Menu_Azione CONNECTION_LOST WAIT 20 wait 20s gosub Log_in %mycharnum gosub apri_gump_base return ;sub Choosematerial v 1.1 -> p 1 -> d wait_gump antiblock sub Choosematerial set !Material #false if %1 = iron || %1 = leather || %1 = wood || %1 = normal set !Material 1 if %1 = dull || %1 = spined || %1 = oak set !Material 2 if %1 = shadow || %1 = horned || %1 = ash set !Material 3 if %1 = copper || %1 = barbed || %1 = yew set !Material 4 if %1 = bronze || %1 = heartwood || %1 = heart set !Material 5 if %1 = gold || %1 = bloodwood || %1 = blood set !Material 6 if %1 = agapite || %1 = frostwood || %1 = frost set !Material 7 if %1 = verite set !Material 8 if %1 = valorite set !Material 9 if %1 = nocolor set !Material 11 if !Material = #False { display ok Unkwon material %1 ! $Script will be halted. halt } set !MaterialX #contposx + 30 set !MaterialY #contposy + 370 click !MaterialX !MaterialY dmc f gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false set !ColorX #contposx + 235 set !ColorY #contposy + 50 + 20 * !Material click !ColorX !ColorY dmc f gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false return #true ;sub Click_on_gump v 1.0 -> p 2 -> d 0 sub Click_on_gump set !cog_clickx #contposx + %1 ;x set !cog_clicky #contposy + %2 ;y click !cog_clickx !cog_clicky f return ;sub Click_popup_vendor_menu v 1.0 -> p 2 -> d Wait_systemvar Click_On_Gump sub Click_popup_vendor_menu set !v_id %1 ;vendor id set !v_button %2 ;index menu cpvm_pop: exevent popup !v_id GoSub Wait_systemvar CONTKIND MCGC 5 ;GoSub Wait_Gump normal_gump 5 if #RESULT = #false goto cpvm_pop wait 5 set !addy 2 + 18 * !v_button gosub Click_On_Gump 32 !addy ; <-- coordinate del pulsante da premere return ;sub Conta_stack_item v 1.0 -> p 2(3) -> d 0 sub Conta_stack_item set !id_si %1 ;type item da contare set !cont_si %2 ;id contenitore dove contarli set !colore #false if %0 = 3 { set !colore #true set !col_val %3 } set !tot 0 finditem !id_si c_ , !cont_si if #findkind = -1 return !tot for #FINDINDEX 1 #FINDCNT { if !colore = #false || !col_val = #findcol set !tot !tot + #findstack } return !tot ;sub Crea_lista_vendor v 1.0 -> p 4 -> d Split_to_Array Trim Split sub Crea_lista_vendor set !clv_npc %1 set !clv_qvl %2 set !clv_not_qvl %3 set !clv_array %4 set !clv_max 0 ;crea matrice filtri gosub Split_to_Array !clv_qvl _ clv_filtri set !clv_filtri_max #result clv_loop: finditem !clv_npc G_10 if #findkind = -1 { return !clv_max } for #FINDINDEX 1 #FINDCNT { gosub GetProperty #findid set !clv_prop #result for !clv_f 1 !clv_filtri_max { if %clv_filtri . !clv_f in !clv_prop && !clv_not_qvl notin !clv_prop { set !clv_max !clv_max + 1 set !clv_nomevar !clv_array , id , !clv_max set % . !clv_nomevar #findid gosub Trim !clv_prop gosub Split #result #spc set !clv_nomevar !clv_array , name , !clv_max set % . !clv_nomevar %strleft break } } } return !clv_max ;sub Create_food v 1.0 -> p 4 -> d antiblock Wait_Journal_Speech sposta_item sub Create_food set !food_type_use %1 set !food_type %2 set !mode_skip %3 set !dest_skip %4 set !msg_cf1 INSUFFICIENT_MANA set !msg_cf2 THE_SPELL set !msg_cf3 YOU_MAGICALLY set !msg_cf4 YOU_HAVE_NOT cast_crea_food: set !ji #jindex event macro 15 1 gosub antiblock gosub Wait_Journal_Speech 3 !ji msg_cf 4 wait 10 risolvi_crea_food: finditem !food_type c_ , #backpackid if #findkind = -1 goto cast_crea_food if #findtype in !food_type_use { return #true } if !mode_skip = EAT && #findid <> !last_eat { set #LOBJECTID #findid set !last_eat #findid event macro 17 0 wait 10 goto risolvi_crea_food } gosub sposta_item #findid !dest_skip #findstack goto risolvi_crea_food return ;sub Find_pet v 1.1 -> p 1 -> d antiblock sub Find_pet set !id_pet %1 ;id pet set !try_find 0 set !last_speach #scnt - 1 rifind_pet_loop: finditem !id_pet g if #findkind = -1 { set !try_find !try_find + 1 if !try_find < 10 { msg all follow me $ wait 1s goto rifind_pet_loop } display ok Non lo Trovo pił! return #false } if #finddist > 1 { if #scnt > !last_speach { msg all follow me $ set !last_speach #scnt + 1 } wait 10 gosub antiblock goto rifind_pet_loop } return #true ;sub Gb_click_ok_get_bod_gump v 1.0 -> p 0 -> d Click_On_Gump sub Gb_click_ok_get_bod_gump if #contsize = 460_207 gosub Click_On_Gump 110 180 if #contsize = 460_231 gosub Click_On_Gump 110 200 if #contsize = 460_279 gosub Click_On_Gump 110 250 if #contsize = 460_303 gosub Click_On_Gump 110 270 if #contsize = 460_327 gosub Click_On_Gump 110 300 if #contsize = 460_351 gosub Click_On_Gump 110 320 if #contsize = 460_375 gosub Click_On_Gump 110 350 if #contsize = 460_399 gosub Click_On_Gump 110 370 if #contsize = 467_279 || #contsize = 499_279 gosub Click_On_Gump 110 250 return ;sub Gb_get_bod v 1.2 -> p 1 -> d crea_lista_vendor GB_GET_NEW_BOD_POPUP sub Gb_get_bod set !gb_vendortype %1 set !gb_retry #true if !gb_vendortype = TAILOR set !gb_strings WEAVER_TAILOR if !gb_vendortype = BLACKSMITH set !gb_strings WEAPONSMITH_BLACKSMITH Gb_get_bod_clv_point: gosub crea_lista_vendor %type_npc !gb_strings guildmaster vlist_ if #result = 0 { if !gb_retry { wait 1s set !gb_retry #false goto Gb_get_bod_clv_point } else { event exmsg #charid 3 %menu_col_ko NON TROVO NPC !gb_vendortype return #false } } set !gb_preso #false if #result > 0 { for !i 1 #result { set !gb_vendor_id %vlist_id . !i event exmsg !gb_vendor_id 3 %menu_col_i %vlist_name . !i gosub GB_GET_NEW_BOD_POPUP !gb_vendor_id if #result break } } return ;sub Gb_get_new_bod_popup v 1.0 -> p 1 -> d GB_Click_Ok_Get_Bod_Gump GB_Wait_For_Get_New_Bod_Gump AntiBlock avvicinati_vendor Click_popup_vendor_menu sub Gb_get_new_bod_popup set !gb_vendor_id %1 gb_gnbp_start: gosub avvicinati_vendor !gb_vendor_id if #result = #false return #false set !gb_gnbp_journal #jindex gosub Click_popup_vendor_menu !gb_vendor_id 4 gosub AntiBlock wait 1s for !gb_gnbp_i !gb_gnbp_journal #jindex { scanjournal !gb_gnbp_i if an_offer_may_be_available in #journal { return #true } } gosub GB_Wait_For_Get_New_Bod_Gump if #result = #false goto gb_gnbp_start gosub AntiBlock gosub GB_Click_Ok_Get_Bod_Gump wait 1s finditem %type_bod c_ , #backpackid if #findkind = -1 goto gb_gnbp_start return #true ;sub Gb_getval v 1.1 -> p 1 -> d Split_to_array Get_Book_From_Name sub Gb_getval set %gb_pggetval %1 set !nv GiroBod_VAL_ , %gb_pggetval gosub GlobalVar_get %idBodscript !nv gosub Split_to_array % . !nv _ array set %gb_is_default_value #false if %array13 { gosub GlobalVar_get %idBodscript GiroBod_VAL_0 gosub Split_to_array %GiroBod_VAL_0 _ array set %gb_is_default_value #true } set %GB_RAIL %array1 set %GB_X_RESTOCK %array2 set %GB_Y_RESTOCK %array3 set %GB_Z_RESTOCK %array4 set %GB_Chest %array5 set %GB_CHOISE %array6 set %RB_BLACKSMITH %array7 set %firstrune_BLACKSMITH %array8 set %lastrune_BLACKSMITH %array9 set %RB_TAILOR %array10 set %firstrune_TAILOR %array11 set %lastrune_TAILOR %array12 set %RB_LOGOUT %array14 set %firstrune_LOGOUT %array15 set %lastrune_LOGOUT %array16 set %posX_LOGOUT %GB_X_RESTOCK set %posY_LOGOUT %GB_Y_RESTOCK set %posZ_LOGOUT %GB_Z_RESTOCK if %gb_is_default_value { gosub Get_Book_From_Name %RB_LOGOUT if #result = #false { display ok NESSUN RUNEBOOK CON %RB_LOGOUT NEL NOME TROVATO } else { set %RB_LOGOUT #result } } return ;sub Gb_logout v 1.0 -> p 0 -> AntiBlock sub Gb_logout gosub Set_menu_mex LOG OUT wait 1s gb_logout_init: gosub AntiBlock event macro 8 1 gosub Wait_gump paperdoll_gump 5 if #result = #false goto gb_logout_init wait 10 gb_logout_waitConfirm: gosub AntiBlock set !cl_x #contposx + 210 set !cl_y #contposy + 110 click !cl_x !cl_y gosub Wait_gump YesNo_gump 5 if #result = #false goto gb_logout_waitConfirm wait 10 gb_logout_quit: set !cl_x #contposx + 120 set !cl_y #contposy + 90 click !cl_x !cl_y gosub Wait_gump MainMenu_gump 5 if #result = #false goto gb_logout_quit wait 10 return ;sub Gb_make v 1.0 -> p 1 -> d GB_Logout Log_In Apri_Gump_base GB_GetVal GB_VAI GB_GET_BOD sub Gb_make set !gb_pg %1 if !gb_pg <> %MyCharNum { gosub GB_Logout gosub Log_In !gb_pg gosub Apri_Gump_base NOPOSITION gosub Check_Skill_Recall set %magia_usata #result } finditem %typebod c_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { ignoreitem #findid gb_bod } } gosub GB_GetVal !gb_pg gosub GB_VAI LOGOUT #true if %GB_CHOISE = BOTH || %GB_CHOISE = TAILOR { gosub GB_VAI TAILOR #false gosub GB_GET_BOD TAILOR } if %GB_CHOISE = BOTH || %GB_CHOISE = BLACKSMITH { finditem %RB_BLACKSMITH c_ , #backpackid if #findkind = -1 gosub GB_VAI LOGOUT #true gosub GB_VAI BLACKSMITH #false gosub GB_GET_BOD BLACKSMITH } gosub GB_VAI LOGOUT #true if %GB_Chest <> N/A gosub GB_Sposta_Bod ignoreitem reset gb_bod return ;sub Gb_sposta_bod v 1.2 -> p 0 -> d sposta_item sub Gb_sposta_bod ;var necessarie %type_bod (type dei bod) %gb_chest /chest in cui sposatrli) gb_sposta_bod_loop: finditem %type_bod c_ , #backpackid if #findkind = -1 return gosub sposta_item #findid %gb_chest 1 if that_container_cannot_hold in #SYSMSG { event exmsg #charid 3 %menu_col_ko CONTAINER PIENO! set %GB_Chest N/A ignoreitem #findid } wait 10 goto gb_sposta_bod_loop return ;sub Gb_start v 1.1 -> p 0 -> d Torna_a_RESTOCK GB_Make Split_to_array GB_Logout Log_In sub Gb_start if %type_bod = N/A set %type_bod EYM set %gb_magia_usata %magia_usata ignoreitem reset Alarm_ignore_vendor if %choise_GIROBOD_SCRIPT = FILE { event ExMsg #CHARID 3 40 ESEGUO %GiroBod_FileScript call %GiroBod_FileScript gosub Torna_a_RESTOCK return } set %timer_event_flag NO set !ordine for !c 1 7 { if %GiroBod_PG_ . !c { if !c = %MyCharNum set !ordine !c , _ , !ordine else set !ordine !ordine , !c , _ } } gosub Split_to_array !ordine _ GB_List set %gb_ListCount #result for !c 1 %gb_ListCount { if %GB_LIst . !c > 0 && %GB_LIst . !c < 8 { gosub GB_Make %GB_LIst . !c } } if %gb_ListCount <> %MyCharNum { gosub GB_Logout gosub Log_In %MyCharNum set %magia_usata %gb_magia_usata } set %timer_event_flag SI return ;sub Gb_vai v 1.0 -> p 2 -> d Set_Menu_Azione Torna_Posizione sub Gb_vai set %gb_vai_dest %1 set %gb_go_point %2 gosub Set_Menu_Azione TORNO %gb_vai_dest gb_vai_loop: gosub Torna_Posizione %gb_vai_dest %gb_go_point if #result = #false { if %id_error = cannot return #false goto gb_vai_loop } return ;sub Gb_wait_for_get_new_bod_gump v 1.0 -> p 0 -> d 0 sub Gb_wait_for_get_new_bod_gump set !gb_wfvg_vgcount 0 gb_wfvg_waitforvendorgump: if #contname = generic_gump && ( #contsize = 460_207 ) + || ( #contsize = 460_231 ) || ( #contsize = 460_279 ) + || ( #contsize = 460_351 ) || ( #contsize = 460_375 ) + || ( #contsize = 460_399 ) || ( #contsize = 460_303 ) + || ( #contsize = 460_327 ) || ( #contsize = 467_279 ) + || ( #contsize = 499_279 ) return #true if !gb_wfvg_vgcount >= 50 { return #false } wait 2 set !gb_wfvg_vgcount !gb_wfvg_vgcount + 1 goto gb_wfvg_waitforvendorgump return #false ;sub Get_book_from_name v 1.0 -> p 1(2) -> d 0 sub Get_book_from_name set !gbfn_string_to_find %1 ;stringa da cercare set !matrix #false if %0 = 2 { set !matrix #true set !nome_matrix %2 set !ubound_matrix !nome_matrix , 0 set % . !ubound_matrix 0 } gbfn_loop: finditem ZBN C_ , #backpackid if #findkind = -1 { if !matrix { if % . !ubound_matrix = 0 set !l #false else set !l #true ignoreitem reset gbfn_ignorelist return !l } else { ignoreitem reset gbfn_ignorelist return #false } } event property #findid if !gbfn_string_to_find in #property { if !matrix { set % . !ubound_matrix % . !ubound_matrix + 1 set !l !nome_matrix , % . !ubound_matrix set % . !l #findid ignoreitem #findid gbfn_ignorelist } else { ignoreitem reset gbfn_ignorelist return #findid } } else { ignoreitem #findid gbfn_ignorelist } goto gbfn_loop return ;sub Get_modifier_peso v 1.0 -> p 1 -> d 0 sub Get_modifier_peso ;%1 nome var da impostare finditem #charid set % . %1 0 if #findtype in HS_IS set % . %1 40 return ;sub Get_position_container v 1.0 -> p 0 -> d Apri_gump_base sub Get_position_container gosub Apri_gump_base SAVE return ;sub Getproperty v 1.0 -> p 1 -> d 0 sub Getproperty GetProperty_loop1: event property %1 ;id object set !Property1 #property event property %1 set !Property2 #property event property %1 set !Property3 #property if ! ( !Property1 = !Property2 && !Property2 = !Property3 ) goto GetProperty_loop1 return #property ;sub Gettooluses v 1.0 -> p 1 -> d GetProperty sub Gettooluses gosub GetProperty %1 ;id object str pos #result Uses Remaining set !RemUses #strres + 15 str del #result 1 !RemUses set !RemUses #strres str pos !RemUses $ str del !RemUses #strres 100 return #strres ;sub Globalvalues_all v 1.0 -> p 1 -> d 0 sub Globalvalues_all ;%1 nome_global_var di solito id_script nameSpace push nameSpace local #systime , _ , GET set !lpc #lpc set #lpc 1000 set !global * . %1 if %2 = #true display ok !global gosub split_to_array !global | matglobal set !to ( #result - 3 ) / 2 set !i 0 while !i < !to { set !i !i + 1 set !n !i * 2 + 1 set !v !n + 1 str del %matglobal . !n 1 1 set % . #strres %matglobal . !v } set #lpc !lpc nameSpace Clear nameSpace Pop return ;sub Globalvar_del v 1.0 -> p 2 -> d 0 sub Globalvar_del ;%1 nome_global_var di solito id_script, %2 nomevar da cancellare nameSpace push nameSpace local #systime , _ , %2 , DEL set !lpc #lpc set #lpc 1000 set !global * . %1 set !varName v , %2 , | str pos !global !varName if #strres = 0 { set #lpc !lpc nameSpace clear nameSpace pop return #true } set !varNamePos #strres str len !varName set !splitString !varNamePos + #strres - 1 set !splitString2 !varNamePos - 2 str left !global !splitstring2 set !globalPart1 #strres str del !global 1 !splitString set !global #strres str len !global set !globalLen #strres str pos !global | set !splitString !globalLen - #strres + 1 str right !global !splitstring set !global #strres set * . %1 !globalPart1 , !global set #lpc !lpc nameSpace clear nameSpace pop return #true ;sub Globalvar_get v 1.0 -> p 2 -> d 0 sub Globalvar_get ;%1 nome_global_var di solito id_script, %2 nomevar da caricare nameSpace push nameSpace local #systime , _ , %2 , GET set !lpc #lpc set #lpc 1000 set !global * . %1 set !varName v , %2 , | str pos !global !varName set #result #strres <> 0 if #result { set !varNamePos #strres str len !varName set !delString !varNamePos + #strres - 1 str del !global 1 !delString set !global #strres str pos !global | set !varNamePos #strres - 1 str left !global !varNamePos set % . %2 #strres } else { set % . %2 N/A } set #lpc !lpc nameSpace Clear nameSpace Pop return #result ;sub Globalvar_put v 1.0 -> p 2 -> d 0 sub Globalvar_put ;%1 nome_global_var di solito id_script, %2 nomevar da salvare nameSpace push nameSpace local #systime , _ , %2 , PUT set !lpc #lpc set #lpc 1000 set !global * . %1 set !varName v , %2 , | str pos !global !varName if #strres = 0 { if |CEO*FILESYSTEM_MODIFIED| notin !global set !global |CEO*FILESYSTEM_MODIFIED| set * . %1 !global , !varName , % . %2 , | set #lpc !lpc nameSpace clear nameSpace pop return #true } set !varNamePos #strres str len !varName set !splitString !varNamePos + #strres - 1 str left !global !splitstring set !globalPart1 #strres str del !global 1 !splitString set !global #strres str len !global set !globalLen #strres str pos !global | set !splitString !globalLen - #strres + 1 str right !global !splitstring set !global #strres set * . %1 !globalPart1 , % . %2 , !global set #lpc !lpc nameSpace clear nameSpace pop return #true ;sub Log_in v 1.1 -> p 1 -> d Set_menu_azione Wait_journal_msg sub Log_in set !li_char %1 ;pg index to log set !repeat 0 set !oldgump N/A set !journalstart #JINDEX loop_log_in: wait 3s set !repeat !repeat + 1 if #CLILOGGED = 1 { ;another pg if #contname = WAITING_GUMP && #contsize = 408_288 { gosub Set_menu_azione ANOTHER_CHAR_IS_IN_GAME if !oldgump <> ANOTHER_CHAR_IS_IN_GAME { set !repeat 0 set !oldgump ANOTHER_CHAR_IS_IN_GAME } set !x 317 set !y 353 click !x !y goto loop_log_in } gosub Wait_journal_msg 5 !journalstart WELCOME if #result = #true { gosub Set_menu_azione LOGGATO wait 5s return } } ;main_menu_gump if #contname = MAINMENU_GUMP && #contsize = 640_480 { gosub Set_menu_azione MAINMENU_GUMP if !oldgump <> MAINMENU_GUMP { set !repeat 0 set !oldgump MAINMENU_GUMP } set !x #contposX + 615 set !y #contposY + 447 click !x !y goto loop_log_in } ;shard_gump if #contname = NORMAL_GUMP && #contkind = AAG { gosub Set_menu_azione SHARD_GUMP if !oldgump <> SHARD_GUMP { set !repeat 0 set !oldgump SHARD_GUMP } set !x #contposX + 618 set !y #contposY + 447 click !x !y goto loop_log_in } ;char_select if #contname = NORMAL_GUMP && #contkind = GXJC { gosub Set_menu_azione CHAR_CHOISE_GUMP if !oldgump <> CHAR_CHOISE_GUMP { set !repeat 0 set !oldgump CHAR_CHOISE_GUMP } set !cx 0 set !cy 0 set !x !cx + 370 set !y !cy + 100 + !li_char * 40 click !x !y d wait 5 set !x !cx + 618 set !y !cy + 447 click !x !y goto loop_log_in } ;char_select if #contname = LOGIN_GUMP && #contkind = MSSC { gosub Set_menu_azione CHAR_CHOISE_GUMP if !oldgump <> CHAR_CHOISE_GUMP { set !repeat 0 set !oldgump CHAR_CHOISE_GUMP } set !cx 0 set !cy 0 set !x !cx + 370 set !y !cy + 100 + !li_char * 40 click !x !y d wait 5 set !x !cx + 618 set !y !cy + 447 click !x !y goto loop_log_in } ;verifing_account if #contname = WAITING_GUMP && #contsize = 408_288 { gosub Set_menu_azione WAITING if !oldgump <> WAITING { set !repeat 0 set !oldgump WAITING } if !repeat > 3 && !repeat % 2 = 0 { set !x 315 set !y 353 click !x !y wait 10s } else { set !x 319 set !y 353 click !x !y wait 10s } wait 1s goto loop_log_in } event sysMessage Name: #CONTNAME $ KIND: #contkind $ Size: #contsize goto loop_log_in return ;sub Menu_add_menu v 1.0 -> p 1 -> d 0 sub Menu_add_menu set !id %1 ;label menu set !label %2 ;label menu if %0 > 2 { for !vs_for 2 %0 set !label !label , #spc , % . !vs_for } set %menu_nButton %menu_nButton + 1 set %menu_label . %menu_nButton !label set %menu_valido . %menu_nButton #false set %BUT_MENU . %menu_nButton !id return ;sub Menu_alarm_crea_box v 1.1 -> p 4 -> d Menu_Crea_Box Menu_Crea_Linea_Position Menu_Crea_Linea_Rune_Book Menu_Crea_Choise Menu_Crea_Linea_Chest sub Menu_alarm_crea_box set %xboxalarm %1 set %yboxalarm %2 set %wboxalarm %3 set %hboxalarm %4 menu font color White set !xp %xboxalarm set !yp %yboxalarm set !wp %wboxalarm set !hp %hboxalarm gosub Menu_Crea_Box !xp !yp !wp !hp ALARM menu font color Silver menu font size 6 set !x !xp set !y !yp + 20 set !t AMBITO , #spc , DEI , #spc , VALORI gosub Menu_Crea_Choise !x !y !w #false ALARM_ID CONDIVISO_SINGOLARE CONDIVISO !t 6 menu font size 6 set !x !xp + 10 set !y !yp + 40 menu button butALARM_ADD !x !y 40 13 ADD set !x !x + 40 menu button butALARM_CHECK !x !y 40 13 CHECK menu font bgcolor $4444AA set !x !x + 40 menu button butALARM_LEAVE !x !y 40 13 REMOVE menu font bgcolor $444444 set !x !x + 70 menu button butALARM_DISPLAY !x !y 50 13 DISPLAY menu font bgcolor $0000FF set !x !wp - 50 menu button butALARM_CLEAR !x !y 50 13 CLEAR menu font bgcolor $002222 return ;sub Menu_alarm_loop v 1.1 -> p 0 -> d Menu_Crea Menu_Giro_Bod_Validate_Box sub Menu_alarm_loop if %CHOISE_ALARM_ID = SINGOLARE set !idAlarmscript %idscript , _ALARM else set !idAlarmscript %Alarmscript if !idAlarmscript <> %idAlarmscript set %idAlarmscript !idAlarmscript if #menubutton = butALARM_ADD { gosub Set_Menu_Mex CLICCA SU CHI VUOI AGGIUNGERE ALLA TUA LISTA IGNORE gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid G if #findkind = -1 { event exmsg #charid 3 %menu_col_i POTREBBE GIA ESSERE NELLA LISTA IGNORE } else { if #findtype notin %Type_PG event exmsg #charid 3 %menu_col_i NON CONOSCO QUESTO TYPE ( #findtype ) else { gosub Alarm_add !oggid event exmsg #charid 3 %menu_col_i #result } } } set #MENUBUTTON N/A return #true } if #menubutton = butALARM_CHECK { gosub Set_Menu_Mex CLICCA SU CHI VUOI TESTARE SE IN LISTA IGNORE O NO gosub targetta_oggetto set !oggid #result if !oggid <> N/A { if !oggID notin * . %idAlarmscript event exmsg #charid 3 %menu_col_i NOT IN LIST else event exmsg #charid 3 %menu_col_i IN LIST } set #MENUBUTTON N/A return #true } if #menubutton = butALARM_LEAVE { gosub Set_Menu_Mex CLICCA SU CHI VUOI TOGLIERE DALLA LISTA IGNORE gosub targetta_oggetto set !oggid #result if !oggid <> N/A { if !oggID notin * . %idAlarmscript event exmsg #charid 3 %menu_col_i NOT IN LIST else { Display yesno !oggid verrą tolto da %idAlarmscript $ Vuoi farlo? if #dispRes = yes { set !s _ , !oggid , _ gosub Replace * . %idAlarmscript !s _ set * . %idAlarmscript #strres } } } set #MENUBUTTON N/A return #true } if #menubutton = butALARM_DISPLAY { display ok %idAlarmscript $ * . %idAlarmscript set #MENUBUTTON N/A return #true } if #menubutton = butALARM_CLEAR { Display yesno I Valori di %idAlarmscript verranno azzerati. $ Vuoi davvero proseguire? if #dispRes = yes set * . %idAlarmscript _ set #MENUBUTTON N/A return #true } return ;sub Menu_alarm_validate v 1.0 -> p 0 -> d 0 sub Menu_alarm_validate if %CHOISE_ALARM_ID = SINGOLARE set !idAlarmscript %idscript , _ALARM else set !idAlarmscript %Alarmscript if !idAlarmscript <> %idAlarmscript set %idAlarmscript !idAlarmscript return ;sub Menu_crea v 1.1 -> p 0 -> d 0 sub Menu_crea set !mc_lpc #lpc set #lpc 1000 Menu Clear menu Window Title %Menu_Title - v %Menu_Version menu window transparent 100 Menu Window size %Menu_Width %Menu_Height Menu Window Color $000000 menu Font Transparent #true set !y_intestazione 2 set !add_y 0 if %new_version set !add_y 20 set !y_help %Menu_Height - 67 set !y_stato %Menu_Height - 13 set !y_button !y_intestazione + 54 + !add_y ;Intestazione set !x_box 2 set !y_box !y_intestazione set !w_box %Menu_Width - 4 set !h_box 50 Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 4 7 1 gray 7 $333333 Menu Font Name tahoma Menu Font Color yellow ;$F7D358 Menu font size 12 Menu Font Style b set !x !x_box + 6 set !y !y_box + 3 Menu Text Titolo !x !y %Menu_Title Menu Font Color $FFBF00 Menu font size 8 set !x !x_box + 6 set !y !y + 18 Menu Text Titolo !x !y %Menu_SubTitle Menu Font Color gray Menu font size 7 set !x !x_box + 6 set !y !y + 14 Menu Text Titolo !x !y by %Menu_Owner set !x !x_box + !w_box - 38 Menu Text Titolo !x !y v %Menu_Version Menu font size 5 set !y !y_box set !x !x_box + !w_box - 35 menu font bgcolor $555555 Menu Font Color silver if %new_version Menu Font Color $0080FF menu Button butGoSite !x !y 35 18 WWW ;Fine Intestazione if %new_version { Menu font size 6 Menu Font Color $0080FF set !x_box 4 set !y_box !y_intestazione + !h_box + 2 set !w_box %Menu_Width - 8 set !h_box 18 Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 4 7 1 $0080FF 7 $333333 set !y !y_box + 4 set !x !x_box + 45 menu text txt !x !y DISPONIBILE UNA NUOVA VERSIONE SUL SITO } ;pulsanti Menu font size 7 set !x_box 2 set !y_box !y_button set !w_box %Menu_Width - 4 set !h_box !y_help - !y_box - 4 set !h_panel !h_box - %menu_nbutton * 17 set !ymtem !ymenupulsanti Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 3 7 1 gray 7 $002222 set %menu_valido_AVVIO #true for !f 2 %menu_nbutton { set !id %BUT_MENU . !f if %menu_valido_ . !id <> #True set %menu_valido_AVVIO #false } for !f 1 %menu_nbutton { if !f = %menu_sel { menu font bgcolor $333333 Menu Font Color white set !y !y_box + ( 17 * ( !f - 1 ) ) menu Button BUT_ATTUALE !x_box !y !w_box 17 %menu_label . !f set !y_panel !y + 17 } else { Menu Font Color yellow set !id %BUT_MENU . !f if %menu_valido_ . !id menu font bgcolor $006600 else menu font bgcolor $000088 if !f > %menu_sel set !y ( ( !y_box + !h_box ) - ( %menu_nbutton * 17 ) ) + ( 17 * ( !f - 1 ) ) if !f < %menu_sel set !y !y_box + ( 17 * ( !f - 1 ) ) menu Button BUT_MENU . !f !x_box !y !w_box 17 %menu_label . !f } } ;HELP set !x_box 2 set !y_box !y_help set !w_box %Menu_Width - 4 set !h_box 50 Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 4 7 1 gray 7 $333333 Menu Shape mnuRect1 !x_box !y_box !w_box 13 4 7 1 gray 7 $550000 set !x !x_box + 6 set !y !y_box + 1 Menu Font Color aqua Menu Font Style b menu text txt !x !y MESSAGGIO set !y !y + 15 set !x !x_box + 5 Menu Font Color silver Menu Font Style b Menu font size 6 menu text txtMenuMex1 !x !y set !y !y + 10 menu text txtMenuMex2 !x !y set !y !y + 10 menu text txtMenuMex3 !x !y ;stato Menu Font Color white Menu Font Style b Menu font size 6 set !x 5 set !y !y_stato menu text txt !x !y AZIONE: set !x 40 Menu Font Color yellow menu text txtAzione !x !y CREA MENU ;area_sottomenu set !x_box 2 set !y_box !y_panel set !w_box %Menu_Width - 4 set !h_box !h_panel - 1 ;Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 3 7 1 gray 7 $666666 set !id %BUT_MENU . %menu_sel set !nomesub Menu_crea_ , !id gosub !nomesub !x_box !y_box !w_box !h_box set #lpc !mc_lpc Return ;sub Menu_crea_box v 1.0 -> p 5(x) -> d 0 sub Menu_crea_box ;%1 %2 %3 %4 x y w h, %5 label set !l_mcb %5 if %0 > 5 { for !vs_for 6 %0 set !l_mcb !l_mcb , #spc , % . !vs_for } menu font size 7 Menu Shape mnuRect1 %1 %2 %3 %4 3 7 1 gray 7 $002222 Menu Shape mnuRect1 %1 %2 %3 13 3 7 1 gray 7 $004444 set !y_mcb %2 + 1 set !x_mcb %1 + 10 menu text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_crea_check_box v 1.0 -> p 6(x) -> d 0 sub Menu_crea_check_box ;%1 %2 %3 %4 x y w h, %5 id , %6 label set !l_mcb %6 if %0 > 6 { for !vs_for 7 %0 set !l_mcb !l_mcb , #spc , % . !vs_for } menu font size 7 Menu Shape mnuRect1 %1 %2 %3 %4 3 7 1 gray 7 $002222 Menu Shape mnuRect1 %1 %2 %3 13 3 7 1 gray 7 $004444 set !y_mcb %2 + 0 set !x_mcb %1 + 10 if % . %5 = N/A set % . %5 #false Menu Check chk . %5 !x_mcb !y_mcb 13 13 % . %5 set !y_mcb %2 + 1 set !x_mcb %1 + 25 menu text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_crea_choise v 1.0 -> p 8(9) -> d 0 sub Menu_crea_choise set !x_linea %1 set !y_linea %2 set !w_linea %3 set !o_linea %4 set !id_linea %5 set %CHOISES_ . !id_linea %6 set !sel_linea %7 set !txt_linea %8 set !fz 7 if %0 = 9 set !fz %9 ;size font menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 menu text txt !x !y !txt_linea if !o_linea = #true menu font color yellow else menu font color white if %CHOISE_ . !id_linea notin %CHOISES_ . !id_linea set %CHOISE_ . !id_linea !sel_linea set !x !x_linea + 185 menu text txtChoise_ . !id_linea !x !y %CHOISE_ . !id_linea menu font bgcolor $111111 set !fz 6 menu font size !fz set !xt !x_linea + 10 set !yt !y_linea - 2 set !ht 14 menu button butChoise_ . !id_Linea !xt !yt 22 !ht SET return ;sub Menu_crea_extra v 1.0 -> p 4 -> d Menu_Giro_Bod_Crea_Box Menu_ALARM_Crea_Box Set_Menu_Mex Set_Menu_Azione Menu_validate_extra sub Menu_crea_extra set !xb %1 set !yb %2 set !wb %3 set !hb %4 ;girobod set !yp !yb + 7 set !xp !xb + 5 set !wp !wb - 10 set !hp 185 gosub Menu_Giro_Bod_Crea_Box !xp !yp !wp !hp ;fine_giro_bod ;Alarm set !yp !yb + 195 set !xp !xb + 5 set !wp !wb - 10 set !hp 60 gosub Menu_ALARM_Crea_Box !xp !yp !wp !hp ;fine_alarm gosub Set_Menu_Mex QUESTA PAGINA CONTIENE OPZIONI FACOLTATIVE $ SETTA I DATI PER IL GIRO BOD $ SETTA LE IMPOSTAZIONI DELL'ALLARME gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_linea_chest v 1.2 -> p 5(7) -> d 0 sub Menu_crea_linea_chest set !x_linea %1 set !y_linea %2 set !w_linea %3 set !o_linea %4 set !id_linea %5 set !fz 7 set !usabank #False if %0 = 6 && %6 <> BANK set !fz %6 ;size font if %0 = 7 && %7 <> BANK set !fz %7 ;size font if %0 = 6 && %6 = BANK set !usabank #true if %0 = 7 && %7 = BANK set !usabank #true menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 menu text txt !x !y CHEST !id_Linea if !o_linea = #true menu font color yellow set !x !x_linea + 185 menu text txtChest_ . !id_linea !x !y %Chest_ . !id_linea menu font bgcolor $111111 set !fz !fz - 1 menu font size !fz set !xt !x_linea + 10 set !yt !y_linea set !ht !fz + !fz + 1 menu button butChest_ . !id_Linea !xt !yt 22 !ht SET if !usabank = #true { menu font color silver set !xt !x_linea + !w_linea - 32 menu button butBankChest_ . !id_Linea !xt !yt 30 !ht BANK set !x !x_linea + 160 set !y !y_linea + 2 menu font color $00bb00 if %bank_ . !id_linea = #TRUE menu text txtBankChest_ . !id_linea !x !y BANK else menu text txtBankChest_ . !id_linea !x !y #spc } if !o_linea = #false { set !xt !x_linea + !w_linea - 15 menu button butResetChest_ . !id_Linea !xt !yt 13 !ht x } return ;sub Menu_crea_linea_position v 1.1 -> p 4(7) -> d 0 sub Menu_crea_linea_position ;%1 %2 %3 dimension, %4 id variabile, %5 text to write, %6 obbligatorio (#true) , %7 font size set !x_linea %1 set !y_linea %2 set !w_linea %3 set !id_linea %4 if %0 < 5 set !text_linea !id_linea else set !text_linea %5 if %0 < 6 set !o_linea #true else set !o_linea %6 if %0 < 7 set !fz 7 else set !fz %7 menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 menu text txt !x !y POSIZIONE !text_linea (x y z) if !o_linea menu font color yellow else menu font color white set !x !x_linea + 185 menu text txtPosition_ . !id_linea !x !y %posX_ . !id_linea %posY_ . !id_linea %posZ_ . !id_linea menu font bgcolor $111111 menu font size 6 set !xt !x_linea + 10 set !yt !y_linea menu button butPosition_ . !id_Linea !xt !yt 22 13 SET return ;sub Menu_crea_linea_rune_book v 1.1 -> p 4(7) -> d 0 sub Menu_crea_linea_rune_book set !x_linea %1 set !y_linea %2 set !w_linea %3 set !id_linea %4 if %0 < 5 set !o_linea #true else set !o_linea %5 if %0 < 6 set !fz 7 else set !fz %6 if %0 < 7 set %RBFLAG_ . !id_linea N/A else set %RBFLAG_ . !id_linea %7 menu font color silver menu font size !fz set !yt !y_linea + 1 set !xt !x_linea + 35 menu text txt !xt !yt ID set !xt !x_linea + 107 menu text txt !xt !yt DA RUNA set !xt !x_linea + 178 menu text txt !xt !yt A if !o_linea menu font color yellow else menu font color white set !xt !x_linea + 50 menu text txtRuneBook_ . !id_linea !xt !yt %RB_ . !id_linea menu font bgcolor $111111 set !fz 6 menu font size !fz set !xt !x_linea + 10 set !yt !y_linea menu button butRunebook_ . !id_Linea !xt !yt 22 13 SET set !yt !y_linea - 2 set !xt !x_linea + 158 if %firstrune_ . !id_linea = N/A set %firstrune_ . !id_linea 0 menu Edit edtfirstrune_ . !id_linea !xt !yt 16 %firstrune_ . !id_linea set !xt !x_linea + 190 if %lastrune_ . !id_linea = N/A set %lastrune_ . !id_linea 0 menu Edit edtlastrune_ . !id_linea !xt !yt 16 %lastrune_ . !id_linea return ;sub Menu_crea_type_box v 1.0 -> p 6(x) -> d 0 sub Menu_crea_type_box ;%1 %2 %3 %4 x y w h, %5 type style box, %6 label set !l_mcb %6 if %0 > 6 { for !vs_for 7 %0 set !l_mcb !l_mcb , #spc , % . !vs_for } set !mctb1_b $002222 set !mctb1_f gray set !mctb2_b $004444 set !mctb2_f gray set !mctb_t silver if %5 = DEBUG { set !mctb1_b $290B2B set !mctb1_f $86088A set !mctb2_b $5B0B54 set !mctb2_f $86088A set !mctb_t white } menu font size 7 Menu Shape mnuRect1 %1 %2 %3 %4 3 7 1 !mctb1_f 7 !mctb1_b Menu Shape mnuRect1 %1 %2 %3 13 3 7 1 !mctb2_f 7 !mctb2_b set !y_mcb %2 + 1 set !x_mcb %1 + 10 menu font color !mctb_t menu text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_giro_bod_crea_box v 1.0 -> p 4 -> d Menu_Crea_Box Menu_Crea_Linea_Position Menu_Crea_Linea_Rune_Book Menu_Crea_Choise Menu_Crea_Linea_Chest sub Menu_giro_bod_crea_box set %xboxbod %1 set %yboxbod %2 set %wboxbod %3 set %hboxbod %4 menu font color White if %CHOISE_GIROBOD_ID = SINGOLARE set !idBodscript %idscript , _BOD else set !idBodscript %bodscript if !idBodscript <> %idBodscript { set %idBodscript !idBodscript set %girobod_load_sel N/A } if %sel_menu_giro_bod = N/A set %sel_menu_giro_bod 0 if %girobod_load_sel = N/A { for %c 1 7 { set !nv GiroBod_PG_ , %c gosub GlobalVar_get %idBodscript !nv set !nv GiroBod_CORRECT_ , %c gosub GlobalVar_get %idBodscript !nv } set %girobod_load_sel FATTO } gosub Menu_Giro_Bod_Get_Val %sel_menu_giro_bod set !xp %xboxbod set !yp %yboxbod set !wp %wboxbod set !hp %hboxbod gosub Menu_Crea_Box !xp !yp !wp !hp GIRO BOD for !c 0 7 { menu font size 6 menu font color Silver set !x !wp - 102 + !c * 12 set !y !yp if %GiroBod_CORRECT_ . !c menu font bgcolor $00AA00 else menu font bgcolor $0000AA menu button butGiroBod_PG_ . !c !x !y 13 13 !c menu font bgcolor $002222 if !c > 0 { set !y !y - 5 set !x !x + 2 menu font size 13 if %GiroBod_PG_ . !c = #True menu font color $00FF00 else menu font color RED menu text txtGiroBod_PG_ . !c !x !y _ } } menu font size 6 menu font color BLACK menu font bgcolor SILVER set !x !wp - 102 + 8 * 12 set !y !yp menu button butGiroBod_PG_8 !x !y 13 13 I menu font bgcolor $002222 if %sel_menu_giro_bod > 7 { menu font color Silver menu font size 6 set !x !xp set !y !yp + 30 set !t AMBITO , #spc , DEI , #spc , VALORI gosub Menu_Crea_Choise !x !y !w #false GIROBOD_ID CONDIVISO_SINGOLARE CONDIVISO !t 6 set !x !xp set !y !yp + 60 set !t SCRIPT , #spc , DA , #spc , RICHIAMARE gosub Menu_Crea_Choise !x !y !w #false GIROBOD_SCRIPT INTERNO_FILE INTERNO !t 6 ;menu text txt !x !y SCRIPT DA RICHIAMARE menu font color Silver set !x !xp + 10 set !y !y + 20 menu text txt !x !y FILENAME set !x !xp + 60 set !y !y - 4 menu edit edtGiroBod_Script !x !y 165 %GiroBod_FileScript return } menu font color Silver menu font size 5 set !x !wp - 117 set !y !yp + 2 menu text txt !x !y PG set !y !y + 17 menu font size 6 set !x !xp + 5 menu font color Silver menu text txt !x !y PG menu font color White set !x !xp + 20 if %sel_menu_giro_bod = 0 { menu text txt !x !y DEFAULT } else { menu text txt !x !y %sel_menu_giro_bod set !x !x + 8 set !y !y - 3 menu font size 5 if %GiroBod_PG_ . %sel_menu_giro_bod = #True { menu font color $00FF00 menu button butGiroBod_SEL !x !y 20 14 ON } else { menu font color RED menu button butGiroBod_SEL !x !y 20 14 OFF } menu font color Silver if ! %giro_bod_DEFAULT { set !x !xp + !wp - 40 menu button butGiroBod_DEFAULT !x !y 40 14 DEFAULT } else { set !x !xp + !wp - 40 menu button butGiroBod_DEFAULT !x !y 40 14 EDITA } set !y !y + 3 } if %giro_bod_DEFAULT = #false || %sel_menu_giro_bod = 0 { menu font size 6 menu font color Silver set !x !xp + 60 set !y !yp + 19 menu text txt !x !y MODE set !y !y - 3 set !x !x + 27 menu font color White menu font size 5 if %GiroBod_RAIL = N/A set %GiroBod_RAIL #false if %GiroBod_RAIL = #True { set %girobod_check_get_edit_field_rune #false menu button butGiroBod_RAIL !x !y 45 14 RAIL set !y !y + 18 set !x !xp + 5 set !w !wb - 20 set !x !xb + 5 ;gosub Menu_Crea_Linea_Position !x !y !w RESTOCK_BOD LOGOUT_RESTOCK #false 6 ;set !x !xb + 5 ;set !y !y + 15 ;set !t BOD , #spc , DA , #spc , PRENDERE ;gosub Menu_Crea_Choise !x !y !w #false GET_BOD BOTH_BLACKSMITH_TAILOR BOTH !t 6 menu font size 8 set !x !xb + 75 set !y !y + 50 menu font color Red menu text txt !x !y RAIL NON IMPLEMENTATA } else { set %GiroBod_RAIL #FALSE set %girobod_check_get_edit_field_rune #true menu button butGiroBod_RAIL !x !y 45 14 RUNEBOOK if %sel_menu_giro_bod = 0 { set !y !y + 18 set !x !xp + 5 set !w !wb - 20 menu font size 6 menu text txt !x !y DATI RUNEBOOK PUNTO LOGOUT/RESTOCK: menu font size 5 set !y !y + 12 set !x !xp + 10 if %RB_LOGOUT = N/A set %RB_LOGOUT CASA if %firstrune_LOGOUT = N/A set %firstrune_LOGOUT 0 if %lastrune_LOGOUT = N/A set %lastrune_LOGOUT 0 menu edit edtRB_LOGOUT !x !y 30 %RB_LOGOUT set !x !xp + 158 menu edit edtFirstRune_LOGOUT !x !y 16 %firstrune_LOGOUT set !x !xp + 190 menu edit edtLastRune_LOGOUT !x !y 16 %lastrune_LOGOUT set !x !xp + 42 set !y !y + 2 menu font color Silver menu font size 6 menu text txt !x !y NEL NOME, USA RUNE DA set !x !xp + 178 menu text txt !x !y A } else { set !y !y + 18 set !x !xp + 5 set !w !wb - 20 menu font size 6 menu text txt !x !y DATI RUNEBOOK PUNTO LOGOUT/RESTOCK: set !y !y + 13 set !x !xp set !w !wb - 20 gosub Menu_Crea_Linea_Rune_Book !x !y !w LOGOUT #false 6 } set !y !y + 15 set !x !xp set !w !wb - 20 gosub Menu_Crea_Linea_Position !x !y !w RESTOCK_BOD LOGOUT_RSTOCK #false 6 set !x !xp set !y !y + 15 set !t BOD , #spc , DA , #spc , PRENDERE gosub Menu_Crea_Choise !x !y !w #false GET_BOD BOTH_BLACKSMITH_TAILOR BOTH !t 6 menu font color White set !x !xp + 5 set !y !y + 15 menu text txt !x !y DATI RUNEBOOK BLACKSMITH: set !x !xp set !y !y + 13 if %sel_menu_giro_bod = 0 gosub Menu_Crea_Linea_Rune_Book !x !y !w BLACKSMITH #false 6 GROUND else gosub Menu_Crea_Linea_Rune_Book !x !y !w BLACKSMITH #false 6 ANYWHERE set !x !xp + 5 set !y !y + 17 menu text txt !x !y DATI RUNEBOOK TAILOR: set !x !xp set !y !y + 13 if %sel_menu_giro_bod = 0 gosub Menu_Crea_Linea_Rune_Book !x !y !w TAILOR #false 6 GROUND else gosub Menu_Crea_Linea_Rune_Book !x !y !w TAILOR #false 6 ANYWHERE set !x !xp + 5 set !y !y + 17 menu text txt !x !y DESTINAZIONE BOD: set !y !y + 1 set !x !xp + 100 menu font color silver menu font size 5 menu text txt !x !y SE N/A I BOD SARANNO LASCIATI NEL BACKPACK set !x !xp set !y !y + 12 gosub Menu_Crea_Linea_Chest !x !y !w #False BOD 6 ;gosub Menu_Crea_Box !x !y !w 20 RUNEBOOK } } else { menu font size 6 menu font color Silver set !x !xp + 60 set !y !yp + 19 menu text txt !x !y VALORI DI DEFAULT menu font size 6 set !x !xp + 6 set !y !y + 19 menu text txt !x !y CLICCA 'EDITA' PER PERSONALIZZARE IL GIRO DI QUESTO PG set !y !y + 9 menu text txt !x !y CLICCA '0' PER EDITARE I VALORI DI DEFAULT } ;gosub Menu_Crea_Choise !x !y !w #True GiroBod_MODE RUNEBOOK_RAIL RUNEBOOK MODALITA return ;sub Menu_giro_bod_get_val v 1.0 -> p 0 -> d 0 sub Menu_giro_bod_get_val set %pgsel %1 if %pgsel > 7 { gosub GlobalVar_get %idBodscript GiroBod_FileScript return } set !nv GiroBod_VAL_ , %pgsel gosub GlobalVar_get %idBodscript !nv if % . !nv = N/A { set %giro_bod_DEFAULT #True } else { gosub Split_to_array % . !nv _ array set %GiroBod_RAIL %array1 set %posX_RESTOCK_BOD %array2 set %posY_RESTOCK_BOD %array3 set %posZ_RESTOCK_BOD %array4 set %Chest_Bod %array5 set %CHOISE_GET_BOD %array6 set %RB_BLACKSMITH %array7 set %firstrune_BLACKSMITH %array8 set %lastrune_BLACKSMITH %array9 set %RB_TAILOR %array10 set %firstrune_TAILOR %array11 set %lastrune_TAILOR %array12 set %giro_bod_DEFAULT %array13 set %RB_LOGOUT %array14 set %firstrune_LOGOUT %array15 set %lastrune_LOGOUT %array16 } if %giro_bod_DEFAULT = N/A set %giro_bod_DEFAULT #true return ;sub Menu_giro_bod_loop v 1.0 -> p 0 -> d Menu_Crea Menu_Giro_Bod_Validate_Box sub Menu_giro_bod_loop if butGiroBod_PG_ in #menubutton { gosub Split #menubutton butGiroBod_PG_ set %id_object %strright gosub Menu_Giro_Bod_Validate_Box set %sel_menu_giro_bod %id_object gosub Menu_Crea set #MENUBUTTON N/A return #true } if #menubutton = butGiroBod_SEL { if %GiroBod_PG_ . %sel_menu_giro_bod = #true set %GiroBod_PG_ . %sel_menu_giro_bod #False else set %GiroBod_PG_ . %sel_menu_giro_bod #True ;gosub Menu_Giro_Bod_Validate_Box set !nv GiroBod_PG_ , %sel_menu_giro_bod gosub GlobalVar_put %idBodscript !nv gosub Menu_Crea set #MENUBUTTON N/A return #true } if #menubutton = butGiroBod_RAIL { if %GiroBod_RAIL = #true set %GiroBod_RAIL #False else set %GiroBod_RAIL #true gosub Menu_Giro_Bod_Validate_Box gosub Menu_Crea set #MENUBUTTON N/A return #true } if #menubutton = butGiroBod_DEFAULT { if %giro_bod_DEFAULT = #true set %giro_bod_DEFAULT #False else set %giro_bod_DEFAULT #true gosub Menu_Giro_Bod_Validate_Box gosub Menu_Crea set #MENUBUTTON N/A return #true } return #false ;sub Menu_giro_bod_validate_all v 1.0 -> p 0 -> d 0 sub Menu_giro_bod_validate_all set !is_valid #true set !almeno_uno #false for !c 0 7 { if %GiroBod_PG_ . !c set !almeno_uno #True } if !almeno_uno = #false set !is_valid #false if %CHOISE_GIROBOD_SCRIPT = INTERNO { if %GiroBod_CORRECT_0 = #false set !is_valid #false for !c 0 7 { if %GiroBod_PG_ . !c && %GiroBod_CORRECT_ . !c = #false set !is_valid #false } } set %girobod_valido !is_valid gosub GlobalVar_put %idscript girobod_valido return ;sub Menu_giro_bod_validate_box v 1.0 -> p 0 -> d 0 sub Menu_giro_bod_validate_box if %sel_menu_giro_bod > 7 { menu get edtGiroBod_Script set %GiroBod_FileScript #menures gosub GlobalVar_put %idBodscript GiroBod_FileScript } set !v %GiroBod_RAIL , _ set !v !v , %posX_RESTOCK_BOD , _ set !v !v , %posY_RESTOCK_BOD , _ set !v !v , %posZ_RESTOCK_BOD , _ set !v !v , %Chest_Bod , _ set !v !v , %CHOISE_GET_BOD , _ set !v !v , %RB_BLACKSMITH , _ if %girobod_check_get_edit_field_rune { menu getnum edtfirstrune_BLACKSMITH if #menures > 0 && #menures < 17 set %firstrune_BLACKSMITH #menures else set %firstrune_BLACKSMITH 0 menu getnum edtlastrune_BLACKSMITH if #menures > 0 && #menures < 17 set %lastrune_BLACKSMITH #menures else set %lastrune_BLACKSMITH 0 menu getnum edtfirstrune_TAILOR if #menures > 0 && #menures < 17 set %firstrune_TAILOR #MenuRes else set %firstrune_TAILOR 0 menu getnum edtlastrune_TAILOR if #menures > 0 && #menures < 17 set %lastrune_TAILOR #MenuRes else set %lastrune_TAILOR 0 menu getnum edtfirstrune_LOGOUT if #menures > 0 && #menures < 17 set %firstrune_LOGOUT #menures else set %firstrune_LOGOUT 0 menu getnum edtlastrune_LOGOUT if #menures > 0 && #menures < 17 set %lastrune_LOGOUT #menures else set %lastrune_LOGOUT 0 } set !v !v , %firstrune_BLACKSMITH , _ set !v !v , %lastrune_BLACKSMITH , _ set !v !v , %RB_TAILOR , _ set !v !v , %firstrune_TAILOR , _ set !v !v , %lastrune_TAILOR , _ set !v !v , %giro_bod_DEFAULT , _ if %sel_menu_giro_bod = 0 { menu get edtRB_LOGOUT gosub Replace #menures _ set !v !v , #strres , _ } else { set !v !v , %RB_LOGOUT , _ } set !v !v , %firstrune_LOGOUT , _ set !v !v , %lastrune_LOGOUT set %GiroBod_VAL_ . %sel_menu_giro_bod !v set !nv GiroBod_VAL_ , %sel_menu_giro_bod gosub GlobalVar_put %idBodscript !nv if %giro_bod_DEFAULT && %sel_menu_giro_bod <> 0 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #true goto exit_validate_giro_bod } if %posX_RESTOCK_BOD = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } if %GiroBod_RAIL = #False { if %CHOISE_GET_BOD = BOTH || %CHOISE_GET_BOD = BLACKSMITH { If %RB_BLACKSMITH = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %firstrune_BLACKSMITH < 1 || %firstrune_BLACKSMITH > 16 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %lastrune_BLACKSMITH < 1 || %lastrune_BLACKSMITH > 16 || %firstrune_BLACKSMITH > %lastrune_BLACKSMITH { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } } if %CHOISE_GET_BOD = BOTH || %CHOISE_GET_BOD = TAILOR { If %RB_TAILOR = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %firstrune_TAILOR < 1 || %firstrune_TAILOR > 16 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %lastrune_TAILOR < 1 || %lastrune_TAILOR > 16 || %firstrune_TAILOR > %lastrune_TAILOR { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %firstrune_LOGOUT < 1 || %firstrune_LOGOUT > 16 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %lastrune_LOGOUT < 1 || %lastrune_LOGOUT > 16 || %firstrune_LOGOUT > %lastrune_LOGOUT { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } } } else { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } set %GiroBod_CORRECT_ . %sel_menu_giro_bod #true exit_validate_giro_bod: set !nv GiroBod_CORRECT_ , %sel_menu_giro_bod gosub GlobalVar_put %idBodscript !nv return ;sub Menu_init v 1.0 -> p 0 -> d 0 sub Menu_init set %menu_sel 1 set %menu_lastsel 1 set %menu_nButton 0 set %menu_col_i 51 set %menu_col_ko 33 set %menu_col_ok 58 gosub Menu_Add_Menu AVVIO AVVIO return ;sub Menu_modal_message v 1.1 -> p 0 -> d 0 sub Menu_modal_message set !title %1 set !text %2 set !type %3 set !w_menu %w_menu if %w_menu_tot <> N/A && %w_menu_tot > !w_menu set !w_menu %w_menu_tot set !oldalarm_lpc #lpc set #lpc 1000 gosub replace !title _ #spc set !title #strres gosub split_to_Array !text $ mmm_text set !mmm_len #result Menu Font Name tahoma menu Font Transparent #true Menu Font Style b set !alarm_wb 190 set !alarm_hb 75 + !mmm_len * 7 set !alarm_xb ( !w_menu - !alarm_wb ) / 2 set !alarm_yb ( %h_menu - !alarm_hb ) / 2 Menu Shape alarm_R0 1 1 !w_menu %h_menu 3 7 2 gray 4 $555555 Menu Shape alarm_R1 !alarm_xb !alarm_yb !alarm_wb !alarm_hb 3 7 2 red 7 $000033 Menu Shape alarm_R2 !alarm_xb !alarm_yb !alarm_wb 25 3 7 2 red 7 $000055 set %alarm_control |alarm_R1|alarm_R2| set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_yb + 5 Menu font size 10 Menu Font Color yellow menu text alarm_TITLE !alarm_x !alarm_y !title set %alarm_control %alarm_control , alarm_TITLE| Menu font size 8 Menu Font Color white set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_yb + 30 for !i 1 !mmm_len { menu text alarm_TEXT . !i !alarm_x !alarm_y %mmm_text . !i set %alarm_control %alarm_control , alarm_TEXT , !i , | if !i = 1 { Menu font size 6 Menu Font Color silver set !alarm_y !alarm_y + 5 } set !alarm_y !alarm_y + 7 } if !type = MODE1 { Menu font size 6 Menu Font Color silver Menu Font bgcolor purple set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_y + 2 set %alarm_b1 IGNORA_ORA set %alarm_b2 IGNORA_SEMPRE set %alarm_b3 CONTINUA menu button alarm_B1 !alarm_x !alarm_y 90 15 IGNORA ORA set !alarm_x !alarm_xb + 95 menu button alarm_B2 !alarm_x !alarm_y 90 15 IGNORA SEMPRE Menu Font bgcolor black set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_y + 15 menu button alarm_B3 !alarm_x !alarm_y 180 15 CONTINUA E NON IGNORARE set %alarm_control %alarm_control , alarm_B1|alarm_B2|alarm_B3| } if !type = MODE2 { Menu font size 6 Menu Font Color silver set %alarm_b1 CONTINUA Menu Font bgcolor black set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_y + 15 menu button alarm_B1 !alarm_x !alarm_y 180 15 CONTINUA set %alarm_control %alarm_control , alarm_B1| } set %alarm_control %alarm_control , |alarm_R0 gosub alarm_menu_loop set !v_return #result gosub split_to_Array %alarm_control | object for !i 1 #result { menu delete %object . !i } set #lpc !oldalarm_lpc return !v_return ;sub Menu_set_bank_chest v 1.0 -> p 1 -> d antiblock sub Menu_set_bank_chest set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 msg BANK BANK $ gosub antiblock gosub wait_gump container_gump 5 if #CONTNAME = container_gump && #CONTTYPE = IKF { return #CONTID } return N/A ;sub Menu_set_chest v 1.1 -> p 1 -> d Set_Menu_Mex targetta_oggetto sub Menu_set_chest set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 event exmsg #charid 3 %menu_col_i Targhetta Chest !pID if !pWHERE = C { if !p3 = #backpackid gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVE ESSERE NELLO ZAINO $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE else gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVE ESSERE NEL CONTENITORE %4 $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE } if !pWHERE = G { gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVI ESSERE NELLA POSIZIONE %4 $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE } gosub targetta_oggetto set !oggid #result if !oggid <> N/A { if !pWHERE = C { finditem !oggid C_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! } else { return !oggid } return N/A } if !pWHERE = G { finditem !oggid G_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere a terra nel range di !p3 tile. } else { return !oggid } return N/A } } return N/A ;sub Menu_set_intestazione v 1.0 -> p 4 -> d Replace sub Menu_set_intestazione set %Menu_Title %1 ;Titolo script set %Menu_SubTitle %2 ;Sottotitolo set %Menu_Owner %3 ;Scripter set %Menu_Version %4 ;Versione Script gosub Replace %Menu_Title _ #spc set %Menu_Title #strRes gosub Replace %Menu_SubTitle _ #spc set %Menu_SubTitle #strRes gosub Replace %Menu_Owner _ #spc set %Menu_Owner #strRes Return ;sub Menu_set_runebook v 1.1 -> p 1 -> d 0 sub Menu_set_runebook set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 if GROUND in %RBFLAG_ . !pid { set !pWHERE G set !p3 2 } if BACKPACK in %RBFLAG_ . !pid { set !pWHERE C set !p3 #BACKPACKID } if ANYWHERE in %RBFLAG_ . !pid { set !pWHERE A } event exmsg #charid 3 %menu_col_i Targhetta Runebook !pID if !pWHERE = C { if !p3 = #backpackid gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK $ DEVE ESSERE NELLO ZAINO else gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK $ DEVE ESSERE NEL CONTENITORE %4 } if !pWHERE = G { gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK $ DEVI ESSERE NELLA POSIZIONE %4 } if !pWHERE = A { gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK } gosub targetta_oggetto set !oggid #result if !oggid <> N/A { event property !oggid if runebook notin #property { event exmsg #charid 3 %menu_col_ko Non sembra un RuneBook! return N/A } if !pWHERE = A { return !oggid } if !pWHERE = C { finditem !oggid C_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! } else { return !oggid } return N/A } if !pWHERE = G { finditem !oggid G_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere a terra nel range di !p3 tile. } else { return !oggid } return N/A } } return N/A ;sub Menu_set_size v 1.0 -> p 2 -> d 0 sub Menu_set_size set %Menu_Width %1 ;width set %Menu_Height %2 ;height Return ;sub Menu_validate_extra v 1.0 -> p 0 -> d GlobalVar_put Menu_Giro_Bod_Validate_Box Menu_Giro_Bod_Validate_ALL Menu_Alarm_Validate sub Menu_validate_extra set %menu_valido_extra #true gosub GlobalVar_put %idscript menu_valido_EXTRA gosub Menu_Giro_Bod_Validate_Box gosub Menu_Giro_Bod_Validate_ALL gosub Menu_Alarm_Validate return ;sub Mount v 1.1 -> p 2 -> d antiblock sub Mount set !mountid %1 set !mounted %2 set !last_speach #scnt - 1 set !try_mount 0 set !ffgifb #true rimountfind: finditem !mountid g if #findkind = -1 { set !try_mount !try_mount + 1 finditem !mounted C_ , #CHARID if #findkind = -1 { if !ffgifb { set !ffgifb #false gosub Apri_gump_base goto rimountfind } if !try_mount < 10 { wait 5 goto rimountfind } display ok Non lo Trovo pił! return #false } return #true } if #finddist > 1 { if #scnt > !last_speach { msg all follow me $ set !last_speach #scnt + 1 } wait 10 gosub antiblock goto rimountfind } set #lobjectid !mountid event macro 17 0 wait 20 gosub antiblock goto rimountfind return ;sub Open_container v 1.3 -> p 2(4) -> d antiblock sub Open_container set !Contenitore_oc %1 set !tentativi_max_oc #scnt + %2 ;%3 %4 contpos ;5 dove trovarlo se non c'č lo cerca in terra nel range di due tile, se #false lo cerca genericamente if %0 = 4 { set #NEXTCPOSX %3 set #NEXTCPOSY %4 } set !oc_dove g_2 if %0 = 5 && %5 = #false set !oc_dove #spc else set !oc_dove %5 if #contID = !Contenitore_oc return #true oc_find_contenitore: finditem !Contenitore_oc !oc_dove if #findkind = -1 return #false set !prove 0 oc_open_contenitore: if !prove > !tentativi_max_oc return #false set !prove !prove + 1 set #LOBJECTID !Contenitore_oc event macro 17 0 wait 30 gosub antiblock if #contID <> !Contenitore_oc goto oc_open_contenitore return #true ;sub Pathfind v 2.3 -> p 3(4) -> d AntiBlock sub Pathfind set !pf_vx %1 set !pf_vy %2 set !pf_vz %3 if %0 = 4 set !pf_max_try %4 else set !pf_max_try 10 set !pf_inizioj #JINDEX + 1 set !pf_try 0 if #CHARPOSX = !pf_vx && #CHARPOSY = !pf_vy { goto pf_fattopathfind } pf_riprovapathfind: if !pf_try > !pf_max_try { return #false } event PathFind !pf_vx !pf_vy !pf_vz set !pf_error #scnt + 1 pf_attendipathfind: for !pf_scjvai !pf_inizioj #JINDEX { scanjournal !pf_scjvai if Can't_get_there in #journal || That_location_is_blocked in #journal { DELETEJOURNAL return #false } } if #CHARPOSX = !pf_vx && #CHARPOSY = !pf_vy { goto pf_fattopathfind } if #scnt > !pf_error { gosub AntiBlock NO_ALARM_EVENT set !pf_try !pf_try + 1 goto pf_riprovapathfind } goto pf_attendipathfind pf_fattopathfind: return #true ;sub Prendi_oggetto v 1.4 -> p 3(5) -> d antiblock sub Prendi_oggetto set !Oggetto %1 set !Contenitore %2 set !Quantita %3 set !usa_bank #false set !cont_da_aprire #true if %0 >= 4 && %4 = BANK { set !usa_bank #true set !bankid %5 } set #NEXTCPOSX 820 set #NEXTCPOSY 480 goto po_get_object po_find_contenitore: if !usa_bank { gosub apri_bank !bankid if #result = #false return #false } else { finditem !Contenitore g_ , 2 if #findkind = -1 return #false } set !prove 0 po_apri_contenitore: if !prove > 5 return #false set !prove !prove + 1 set #LOBJECTID !Contenitore event macro 17 0 wait 30 gosub antiblock if #contID <> !Contenitore goto po_apri_contenitore set !cont_da_aprire #false po_get_object: finditem !Oggetto c_ , !Contenitore if #findkind = -1 { if !cont_da_aprire goto po_find_contenitore else return #false } if !Quantita > #FINDSTACK set !Quantita #FINDSTACK set !prove 0 po_prendi_oggetto: if !prove > 5 return #false Exevent Drag #findID !Quantita gosub antiblock NO_ALARM_EVENT Exevent Dropc #BACKPACKID wait 2 finditem !Oggetto c_ , #BACKPACKID if #findkind = -1 { set !prove !prove + 1 goto po_prendi_oggetto } return #true ;sub Replace v 1.2 -> p 2(3) -> d Split_to_Array sub Replace ;return #strRes set !string %1 ;stringa in cui fare il replace set !find %2 ;string da cercare if %0 = 3 set !replace %3 ;stringa con cui sostituire se assente da togliere else set !replace N/A ;stringa con cui sostituire se assente da togliere gosub Split_to_Array !string !find s set !string %s1 if #result > 1 { for !f 2 #result { if !replace <> N/A set !string !string , !replace if %s . !f <> N/A set !string !string , %s . !f } } set #strres !string return ;sub Save_event v 1.0 -> p 1 -> d 0 sub Save_event if %1 = START { set !w 220 set !h 60 set !w_menu %w_menu if %w_menu_tot <> N/A && %w_menu_tot > !w_menu set !w_menu %w_menu_tot set !x ( !w_menu - !w ) / 2 set !y ( %h_menu - !h ) / 2 Menu Shape shpSave !x !y !w !h 4 7 3 yellow 7 black Menu font size 18 Menu Font Color Red menu font bgcolor black set !x !x + 15 set !y !y + 15 Menu Text txtSave !x !y SAVE IN CORSO } if %1 = STOP { Menu delete shpSave Menu delete txtSave } return ;sub Set_menu_azione v 1.0 -> p X -> d 0 sub Set_menu_azione set %p1 %1 if %0 > 1 { for !vs_for 2 %0 set %p1 %p1 , #spc , % . !vs_for } set !sma_r !sma_old set !sma_old %p1 Menu set txtAzione %p1 return !sma_r ;sub Set_menu_mex v 1.0 -> p X -> d 0 sub Set_menu_mex set !valmessaggiomenu1 set !lineaactmenumessaggio 1 set !ripristinalpcmessmenu #false if #lpc < 1000 { set !oldlpc #lpc set #lpc 1000 set !ripristinalpcmessmenu #true } set !sm 1 if %1 = DEFAULT { set !sm 2 } if %0 > !sm { for !f !sm %0 { if % . !f <> $ { set !valmessaggiomenu . !lineaactmenumessaggio !valmessaggiomenu . !lineaactmenumessaggio , #spc , % . !f } else { set !lineaactmenumessaggio !lineaactmenumessaggio + 1 set !valmessaggiomenu . !lineaactmenumessaggio } } if %1 = DEFAULT { set %defaultmessaggiomenu1 !valmessaggiomenu1 set %defaultmessaggiomenu2 !valmessaggiomenu2 set %defaultmessaggiomenu3 !valmessaggiomenu3 set %defaultlineemessaggio !lineaactmenumessaggio } } if %1 = DEFAULT && %0 = 1 { set !valmessaggiomenu1 %defaultmessaggiomenu1 set !valmessaggiomenu2 %defaultmessaggiomenu2 set !valmessaggiomenu3 %defaultmessaggiomenu3 set !lineaactmenumessaggio %defaultlineemessaggio } for !f 1 3 { if !f > !lineaactmenumessaggio menu set txtMenuMex . !f else menu set txtMenuMex . !f !valmessaggiomenu . !f } if !ripristinalpcmessmenu set #lpc !oldlpc return ;sub Sospendi_script v 1.0 -> p 2 -> d antiblock sub Sospendi_script set !sospendi_script_da %1 set !sospendi_script_a %2 while #time >= !sospendi_script_da && #time < !sospendi_script_a ; non tentare login fra i due valori { gosub antiblock wait 60s } return ;sub Split v 1.0 -> p 2 -> d 0 sub Split ;return %strleft e %strright str pos %1 %2 ;1 stringa da splittare 2 delimitatore if #strres = 0 { set %StrLeft %1 set %StrRight N/A } else { set %Temp #strres - 1 str left %1 %Temp set %StrLeft #strres str Len %2 set %Temp %Temp + #strres str del %1 1 %Temp set %StrRight #strres str len %StrRight if #strres = 0 set %StrRight N/A } return ;sub Split_to_array v 1.1 -> p 3(4) -> d 0 sub Split_to_array ;return #result len array namespace Push namespace Local split , #systime set !lpc #lpc if #lpc < 500 set #lpc 500 set !string %1 ;string to split set !divider %2 ;delimiter set !arrayName %3 ;arrayname str Len !divider set !lenDelimter #strres if %0 > 3 set !namespace %4 else set !namespace #false set !length 0 repeat { set !length !length + 1 str Pos !string !divider 1 if #strRes = 0 { set !done #true set ! . !arrayName , !length !string } else { set !pos #strRes set !len !pos - 1 str Left !string !len set ! . !arrayName , !length #strRes set !pos !pos + ( !lenDelimter - 1 ) str Del !string 1 !pos set !string #strRes } } until ( !done = #true ) set #result !length if !namespace <> #false { namespace Copy !arrayName , * To Local !namespace } else { for !i 1 #result { set !value !arrayName , !i set % . !arrayName , !i ! . !value } } set #lpc !lpc namespace Clear namespace Pop return #result ;sub Sposta_item v 1.1 -> p 3 -> d AntiBlock sub Sposta_item set !si_ogg %1 ;item da spostare set !si_tar %2 ;contenitore destinazione set !si_tot %3 ;quanti oggetti spostare Exevent Drag !si_ogg !si_tot gosub AntiBlock NO_ALARM_EVENT Exevent Dropc !si_tar return ;sub Targetta_oggetto v 1.1 -> p 0 -> d 0 sub Targetta_oggetto set #lTargetID N/A set #targCurs 1 set #lTargetKind 1 While #targCurs = 1 wait 1 return #lTargetID ;sub Timer_event v 1.0 -> p 0 -> d Alarm_Check CheckConnection sub Timer_event ;var necessarie %pepito_alarm %ritiro_bod set !cont_tempo #scnt - %time_start_script if !cont_tempo <> !old_cont_tempo { if %timer_event_flag <> NO { set !old_cont_tempo !cont_tempo menu set txtTempo !cont_tempo if %pepito_alarm && %1 <> NO_ALARM_EVENT gosub Alarm_Check if %ritiro_bod { set !cont_tbod %timer_bod - #scnt if !cont_tbod <> !old_cont_tbod { set !old_cont_tbod !cont_tbod menu set txtBODTIME !cont_tBod } } } } gosub CheckConnection return ;sub Torna_a_restock v 1.0 -> p 0 -> d 0 sub Torna_a_restock gosub Set_Menu_Azione TORNO RESTOCK gosub Menu_info_quest_step 1 torna_a_RESTOCK_loop: gosub Torna_Posizione RESTOCK if #result = #false { if %id_error = cannot return #false goto torna_a_RESTOCK_loop } return #true ;sub Torna_posizione v 1.3 -> p 1(2) -> d Set_Menu_Azione AntiBlock Use_Runebook PathFind sub Torna_posizione ;r #true o #false (%id_error return type error) ;necessaria %magia_usata set !id_position %1 ;id per costruire le var necessarie set !go_point #true if %0 = 2 set !go_point %2 ;se #false non va al punto specifico ma si recalla e basta gosub Set_Menu_Azione TORNO !id_position ;prova_dist_e_magari_path if !go_point { if ( ABS ( #CHARPOSX - %posX_ . !id_position ) ) < 10 && ( ABS ( #CHARPOSY - %posY_ . !id_position ) ) < 10 { gosub PathFind %posX_ . !id_position %posY_ . !id_position %posZ_ . !id_position 2 if #result = #True return #true else goto tp_recall } } tp_riprova: if !go_point { if #CHARPOSX = %posX_ . !id_position && #CHARPOSY = %posY_ . !id_position goto tp_fattopath } tp_recall: gosub AntiBlock if %actRune_ . !id_position = N/A set %actRune_ . !id_position %firstRune_ . !id_position gosub Set_Menu_Azione TORNO !id_position RUNE %actRune_ . !id_position gosub Use_Runebook %RB_ . !id_position %actRune_ . !id_position %magia_usata if #result = #false { if %id_error = encumbered return #false wait 1s set %actRune_ . !id_position %actRune_ . !id_position + 1 if %actRune_ . !id_position > %lastRune_ . !id_position set %actRune_ . !id_position %firstRune_ . !id_position goto tp_riprova } if ! !go_point return #true gosub PathFind %posX_ . !id_position %posY_ . !id_position %posZ_ . !id_position if #result = #false goto tp_riprova tp_fattopath: return #true ;sub Trim v 1.1 -> p 1(2) -> d 0 sub Trim set !string %1 set !trim_mode LEFT if %0 = 2 set !trim_mode %2 if !trim_mode <> LEFT && !trim_mode <> BOTH goto loop_trim_right loop_trim: str left !string 1 if #strRes = #SPC { str del !string 1 1 set !string #strres goto loop_trim } if !trim_mode <> RIGHT && !trim_mode <> BOTH return !string loop_trim_right: str right !string 1 if #strRes = #SPC { str len !string str del !string #strres 1 set !string #strres goto loop_trim_right } return !string ;sub Unmount v 1.0 -> p 2 -> d antiblock sub Unmount set !mountid %2 set !mounted %1 set !try_unmount 0 riunmountfind: finditem !mounted C_ , #CHARID if #findkind <> -1 { set #lobjectid #charid event macro 17 0 wait 10 gosub antiblock goto riunmountfind } finditem !mountid G if #findkind = -1 { set !try_unmount !try_unmount + 1 if !try_unmount < 10 { wait 1s goto riunmountfind } display ok Non lo Trovo pił! return #false } return #true ;sub Use_runebook v 4.4 -> p 3(4) -> d AntiBlock Wait_Gump sub Use_runebook ;r #true o #false (%id_error return type error) set !ur_bookid %1 ;id runebook set !ur_runenumber %2 ;index runa ;%3 magia usata (mager = mago), %4 GATE per gate invece di recall set !ur_oldx #charposx set !ur_oldy #charposy set !ur_runex 138 set !ur_ymagie 180 set !gate #false if %3 = mager set !ur_ymagie 145 if %4 = GATE { set !ur_ymagie 165 set !gate #true } set !ur_side 0 ;pagina set !ur_page !ur_runenumber + 1 set !ur_page !ur_page / 2 ;side set !ur_num !ur_runenumber / 2 set !ur_num !ur_num * 2 if !ur_num = !ur_runenumber set !ur_side 1 if !ur_side = 1 set !ur_runex 298 set !ur_pagexmod !ur_page * 34 set !ur_pagex 104 set !ur_pagex !ur_pagex + !ur_pagexmod if !ur_page > 4 set !ur_pagex !ur_pagex + 31 ur_recallopenagain: set !jicp #JINDEX + 1 wait 5 set #LOBJECTID !ur_bookid event macro 17 0 wait 5 set !ur_error #scnt + 2 gosub AntiBlock gosub Wait_Gump generic_gump if #result = #false goto ur_recallopenagain set !ur_bookx #CONTPOSX set !ur_booky #CONTPOSY set !ur_xc !ur_bookx + !ur_pagex set !ur_yc !ur_booky + 195 click !ur_xc !ur_yc wait 5 gosub AntiBlock gosub Wait_Gump generic_gump if #result = #false goto ur_recallopenagain set !ur_bookx #CONTPOSX set !ur_booky #CONTPOSY set !ur_xc !ur_bookx + !ur_runex set !ur_yc !ur_booky + !ur_ymagie click !ur_xc !ur_yc set !ur_w4serr #scnt + 4 wait 10 ur_wait4secondrecall: for !ur_sc_recall !ur_inizioj #JINDEX { scanjournal !ur_sc_recall if : notin #journal { if You_have_not_yet_recovered in #journal || More_reagents in #journal || the_speel_fizzles in #journal { wait 50 DELETEJOURNAL goto ur_recallopenagain } if Thou_art_too_encumbered in #journal { DELETEJOURNAL set %id_error encumbered return #false } if You_cannot_teleport in #journal { DELETEJOURNAL set %id_error cannot return #false } if You_must_have in #journal { wait 1s DELETEJOURNAL goto ur_recallopenagain } } } if !gate { finditem OTF G_0 if #findkind <> -1 { set #lobjectid #findid gosub antiblock event macro 17 wait 50 } } if !ur_oldx = #charposx && !ur_oldy = #charposy && #scnt < !ur_w4serr { wait 50 goto ur_wait4secondrecall } gosub AntiBlock NO_ALARM_EVENT if !ur_oldx = #charposx && !ur_oldy = #charposy { set %id_error GENERIC return #false } set %id_error N/A return #true ;sub Wait_gump v 1.1 -> p 1(2) -> d 0 sub Wait_gump set !gumpdaattendere %1 ;name gump set !errwg #scnt + 10 if %0 = 2 set !errwg #scnt + %2 wg_subloop: wait 2 if #CONTNAME = !gumpdaattendere return #true if #scnt < !errwg goto wg_subloop return #false ;sub Wait_idgump v 1.0 -> p 1(2) -> d 0 sub Wait_idgump set !gumpdaattendere %1 ;id gump set !errwg #scnt + 10 if %0 = 2 set !errwg #scnt + %2 wg_idsubloop: wait 2 if #CONTID = !gumpdaattendere return #true if #scnt < !errwg goto wg_idsubloop return #false ;sub Wait_journal_msg v 1.0 -> p 2(4) -> d 0 sub Wait_journal_msg set !err #scnt + %1 ;err time in secondi set !start_wjm %2 ;start journal index ;%3 con 3 parametri messaggio da cercare ;%3 con 4 parametri matrice contenente messaggi da cercare ;%4 ubound matrice set !max 1 set !ok_wjm #false set !id msg if %0 = 3 set %msg1 %3 if %0 = 4 set !max %4 while #scnt < !err && ! !ok_wjm { set !finish_wjm #jindex for !scna_wjm !start_wjm !finish_wjm { scanjournal !scna_wjm if : notin #journal { for !index_wjm 1 !max { set !v_wjm !id , !index_wjm if % . !v_wjm in #journal { set !ok_wjm #true break } } } if !ok_wjm break } set !start_wjm !finish_wjm } return !ok_wjm ;sub Wait_journal_speech v 1.0 -> p 2(4) -> d 0 sub Wait_journal_speech set !err #scnt + %1 ;err time in secondi set !start_wjm %2 ;start journal index ;%3 con 3 parametri messaggio da cercare ;%3 con 4 parametri matrice contenente messaggi da cercare ;%4 ubound matrice set !max 1 set !ok_wjm #false set !id msg if %0 = 3 set %msg1 %3 if %0 = 4 set !max %4 while #scnt < !err && ! !ok_wjm { set !finish_wjm #jindex for !scna_wjm !start_wjm !finish_wjm { scanjournal !scna_wjm if : in #journal { for !index_wjm 1 !max { set !v_wjm !id , !index_wjm if % . !v_wjm in #journal { set !ok_wjm #true break } } } if !ok_wjm break } set !start_wjm !finish_wjm } return !ok_wjm ;sub Wait_systemvar v 1.1 -> p 2(3) -> d 0 sub Wait_systemvar set !svar %1 ;name system var set !sval %2 ;val system var set !errsv #scnt + 10 if %0 = 3 set !errsv #scnt + %3 wsv_subloop: wait 2 if # . !svar = !sval return #true if #scnt < !errsv goto wsv_subloop return #false ;################## GENERIC SUB FINISH ########################## ;################## CUSTOM SUB START ############################ ;sub Attendi_risposta sub Attendi_risposta set !p1 %1 set !err #scnt + 20 set %minerale_estratto 0 attendi_risposta_loop: gosub antiblock for !l !p1 #jindex { scanjournal !l if : notin !l { if you_have_worn in #journal { deletejournal set %idshovel N/A } if TARGET_CANNOT in #journal || YOU_CAN'T_MINE in #journal { deletejournal return SBAGLIATO } if YOUR_BACKPACK_IS_FULL in #journal { deletejournal return TORNA_A_CASA } if THERE_IS_NO_METAL in #journal { deletejournal return FINITO } if YOU_CAREFULLY_DIG_UP in #journal { set %minerale_estratto 10 set %contatore_sabbia %contatore_sabbia + 1 if %contatore_sabbia < %limite_sand return RIPETI else return FINITO } if YOU_LOOSEN_SOME in #journal || YOU_CAREFULLY_EXTRACT in #journal || YOU_DIG_FOR_A_WHILE in #journal { deletejournal return RIPETI } if YOU_DIG_SOME in #journal || YOU_PUT_SOME in #journal { gosub guarda_che_tipo #journal set %minerale_estratto #result deletejournal return RIPETI } } } if #scnt < !err goto attendi_risposta_loop return SBAGLIATO ;sub Begin_spot sub Begin_spot if %cont_runa <> %old_runa { set %contatore_sabbia 0 set %filone_act 1 set %filone_old 0 ;se da scoprire if %Spot_NFiloni . %cont_runa = 0 { gosub trova_filoni %cont_runa menu set txtSpot_NFiloni . %cont_runa %Spot_NFiloni . %cont_runa if %Spot_NFiloni . %cont_runa = 0 { menu set txtSpot_NFiloni . %cont_runa X set %Spot_Valido . %cont_runa #FALSE return SPOT_FINITO } } set %old_runa %cont_runa for !cx 1 3 { for !cy 1 3 { set !var txtTile , !cx , _ , !cy menu set !var + } } set !left #CHARPOSX - 2 set !top #CHARPOSY - 2 for !f 1 4 { if !f <= %Spot_NFiloni . %cont_runa { set !var Spot_Filone , %cont_runa , _ , !f set !IDFilone % . !var menu set txtFilone . !f !f %Story . !IDFilone gosub Split_to_Array %Filone . !IDFilone | dig set !cx %dig1 - !left set !cy %dig2 - !top set !var txtTile , !cx , _ , !cy menu set !var !f } else { menu set txtFilone . !f #spc } } } bs_init_filone: if %filone_Act > %Spot_NFiloni . %cont_runa return SPOT_FINITO if %filone_Act <> %filone_old { set %Filone_materiale 0 set %filone_old %filone_act set %prospector_usato #false set %picconate_esplorative 0 if %usa_prospector <> MAI set %prospector_dubbio #true else set %prospector_dubbio #false } gosub Set_Menu_Azione MINO SPOT %cont_runa FILONE %filone_Act set !var Spot_Filone , %cont_runa , _ , %filone_Act set !IDFilone % . !var gosub Split_to_Array %Filone . !IDFilone | dig bs_filone_loop: gosub check_hp if #result <> OK { if #result = FUGA { gosub fuggi return TORNA_A_CASA } if #result = CURA { gosub heal } } if %usa_fire_beetle = #true gosub check_peso_FB else gosub check_peso if #result = #false { return TORNA_A_CASA } if %prospector_dubbio gosub prospector_AI ;if %idshovel = N/A ;cerca la shovel solo se non č settata ;{ gosub set_shovel if #result = #false return TORNA_A_CASA ;} set %dig_journal #JINDEX + 1 gosub Dai_Minata %idshovel %dig1 %dig2 %dig3 %dig4 %dig5 ;da la minata if #result = #false ;se false cancella la shovel e riprova { set %idshovel N/A goto bs_filone_loop } set %Spot_Picconate . %cont_runa %Spot_Picconate . %cont_runa + 1 if %usa_fire_beetle gosub find_pet %id_firebeetle gosub Attendi_Risposta %dig_journal if %minerale_estratto > %Filone_materiale { if %minerale_estratto > 1 { set %Filone_materiale %minerale_estratto } else { set %picconate_esplorative %picconate_esplorative + 1 if %picconate_esplorative > 5 set %Filone_materiale %minerale_estratto } } if #result = RIPETI { goto bs_filone_loop } if #result = FINITO || #result = SBAGLIATO { if %prospector_usato { set %Story . !IDFilone %material_ . %Filone_materiale , # , %Story . !IDFilone } else { if %prospector_dubbio set %Story . !IDFilone %material_ . %Filone_materiale , ? , %Story . !IDFilone else set %Story . !IDFilone %material_ . %Filone_materiale , #spc , %Story . !IDFilone } menu set txtFilone . %filone_Act %filone_Act , #spc , %Story . !IDFilone set %filone_act %filone_act + 1 goto bs_init_filone } if #result = TORNA_A_CASA { return TORNA_A_CASA } display ok ERRORE $ qui non ci doveva arrivare $ sub Begin_spot return ;sub Check_hp sub Check_hp if %AUTO_FUGA = #false && %AUTO_HEAL = #false return OK rchp: if #HITS = N/A { gosub AntiBlock gosub apri_gump_base goto rchp } if #HITS < %FUGA_HP && %AUTO_FUGA return FUGA if #HITS < %LIMITE_HP && %AUTO_HEAL return CURA return OK ;sub Check_iron sub Check_iron wait 5 ciloop: finditem %Type_lingotti c_ , #BACKPACKID if #findkind = -1 { ignoreitem reset check_iron return 0 } if #findCol <> 0 { ignoreitem #findid check_iron goto ciloop } ignoreitem reset check_iron return #FINDSTACK ;sub Check_mining_tile sub Check_mining_tile set %coordx %1 set %coordy %2 tile get %coordx %coordy 1 #curskind tile cnt %coordx %coordy #curskind set %coordz #tilez set !result_check_mining_tile #false set %index 2 if | , #tiletype , | notin %digable { if sand in #tilename { if | , #tiletype , | in %sand && %mine_sand set !result_check_mining_tile #true } } if | , #tiletype , | in %digable set !result_check_mining_tile #true if #tilename = rock && #tilecnt > 1 { for %cnt 2 #tilecnt { tile get %coordx %coordy %cnt if cave in #tilename && | , #tiletype , | in %digable { set %coordz #tilez set %index 3 set !result_check_mining_tile #true } } } gosub SpecialCases return !result_check_mining_tile ;sub Check_peso_fb sub Check_peso_fb gosub check_peso if ! #result { gosub Smelta_FB gosub Conta_stack_item %type_lingotti #backpackid if #result > %LIMITE_LINGOTTI return #false gosub check_peso 80 return #result } return #true ;sub Check_prospectortool sub Check_prospectortool wait 5 finditem %Type_prospector c_ , #BACKPACKID if #findkind <> -1 return #true if %bank_base = #true gosub Prendi_Oggetto %Type_prospector %chest_prospector 1 BANK %chest_base else gosub Prendi_Oggetto %Type_prospector %chest_prospector 1 finditem %Type_prospector c_ , %chest_prospector if #findkind <> -1 { set %cont_prospector #findcnt menu set txtProspector %cont_prospector } return #result ;sub Checkforcave sub Checkforcave for %tile 1 #tilecnt { tile get %coordx %coordy %tile #curskind if cave in #tilename && | , #tiletype , | in %digable { set %coordz #tilez set !result_check_mining_tile #true set %index 3 } } Return ;sub Conta_oggetto_spostato sub Conta_oggetto_spostato set !cos_type %1 set !cos_col %2 set !cos_stack %3 if ( !cos_type in %Type_lingotti ) { set %cont_i . !cos_col %cont_i . !cos_col + !cos_stack set %nome_menu txti , !cos_col Menu set %nome_menu %cont_i . !cos_col } if ( !cos_type in %gemme ) { set %cont_j . !cos_type %cont_j . !cos_type + !cos_stack Menu set txt . !cos_type %cont_j . !cos_type } if ( !cos_type in %sabbia ) { set %cont_ssand %cont_ssand + !cos_stack Menu set txtssand %cont_ssand } if ( !cos_type in %pietre ) { set %cont_s . !cos_type %cont_s . !cos_type + !cos_stack set %nome_menu txts , !cos_col Menu set %nome_menu %cont_s . !cos_col ;Menu set %nome_menu %cont_t . !cos_col } return ;sub Crea_lista_item_e_container sub Crea_lista_item_e_container if %chest_minerali = N/A set %chest_minerali %chest_base if %chest_restock = N/A set %chest_restock %chest_base if %chest_jewel = N/A set %chest_jewel %chest_base if %chest_prospector = N/A set %chest_prospector %chest_base if %chest_sabbia = N/A set %chest_sabbia %chest_base if %chest_stone_iron = N/A set %chest_stone_iron %chest_base if %chest_stone_dull = N/A set %chest_stone_dull %chest_base if %chest_stone_shadow = N/A set %chest_stone_shadow %chest_base if %chest_stone_copper = N/A set %chest_stone_copper %chest_base if %chest_stone_bronze = N/A set %chest_stone_bronze %chest_base if %chest_stone_gold = N/A set %chest_stone_gold %chest_base if %chest_stone_agapite = N/A set %chest_stone_agapite %chest_base if %chest_stone_verite = N/A set %chest_stone_verite %chest_base if %chest_stone_valorite = N/A set %chest_stone_valorite %chest_base if %chest_trash = N/A set %chest_trash %chest_base return ;sub Crea_menu_avviato sub Crea_menu_avviato set !lpc #lpc set #lpc 1000 set %h_menu 360 set %w_menu 190 set !w_spot 60 set !max_item_spot 16 set %w_menu_tot %w_menu + !w_spot + ( ( %spot_max - 1 ) / !max_item_spot ) * !w_spot set %yfine %h_menu - 15 Menu Clear menu Window Title %Menu_Title - v %Menu_Version menu window transparent 100 Menu Window size %w_menu_tot %h_menu Menu Window Color $000000 menu Font Transparent #true set !y_intestazione 2 set !y_minerali 57 set !y_jewel 179 set !Y_move 226 set !y_spot 57 set !y_infospot 283 set !y_stato %h_menu - 13 ;Intestazione set !xb 2 set !yb !y_intestazione set !wb %w_menu_tot - 4 set !hb 50 Menu Shape mnuRect1 !xb !yb !wb !hb 4 7 1 gray 7 $333333 Menu Font Name tahoma Menu Font Color yellow ;$F7D358 Menu font size 12 Menu Font Style b set !x !xb + 6 set !y !yb + 3 Menu Text Titolo !x !y %Menu_Title Menu Font Color $FFBF00 Menu font size 8 set !x !xb + 6 set !y !y + 18 Menu Text Titolo !x !y %Menu_SubTitle Menu Font Color gray Menu font size 7 set !x !xb + 6 set !y !y + 14 Menu Text Titolo !x !y by %Menu_Owner set !x !xb + !wb - 38 Menu Text Titolo !x !y v %Menu_Version if %pepito_alarm = #true { Menu Font Color $0000CC Menu font size 5 menu font style b set !x !xb + !wb - 42 set !y !yb + 3 Menu Text Titolo !x !y ALARM ON } ;Fine Intestazione ;spot set !yb !y_spot set !xb %w_menu set !wb %w_menu_tot - !xb - 3 set !hb %h_menu - !yb - 16 menu font color white gosub Menu_Crea_Box !xb !yb !wb !hb SPOT menu font size 5 set !x !xb + 2 set !y !yb + 12 menu font bgcolor green for !r 1 %spot_max { ;spot set !x2 !x - 2 set !w2 !w_spot - 3 Menu Shape mnuRect1 !x2 !y !w2 20 3 7 1 gray 7 $333333 menu font color white set !y2 !y + 1 menu text txt !x !y2 !r set !x2 !x + 22 menu font color silver menu text txtSpot_Materiale . !r !x2 !y2 FILONI set !x2 !x + 48 menu font color white if %Spot_NFiloni . !r = N/A set %Spot_NFiloni . !r 0 menu text txtSpot_NFiloni . !r !x2 !y2 %Spot_NFiloni . !r set !x2 !x + 45 ;menu button butViewSpot_ . !r !x2 !y2 9 9 menu font size 5 Menu Font Style n set !y2 !y2 + 7 menu font color silver set !x2 !x menu text txt !x2 !y2 P: set !x2 !x + 7 menu font color white if %Spot_Picconate . !r = N/A set %Spot_Picconate . !r 0 menu text txtSpot_Picconate . !r !x2 !y2 %Spot_Picconate . !r menu font color silver set !x2 !x + 27 menu text txt !x2 !y2 T: set !x2 !x + 33 if %spot_Time . !r = N/A set %spot_Time . !r 0 menu text txtSpot_Time . !r !x2 !y2 %spot_Time . !r Menu Font Style b ;fine spot set !y !y + 17 if !r % !max_item_spot = 0 { set !x !x + !w_spot set !y !yb + 12 } } ;minerali set !yb !y_minerali set !xb 5 set !wb %w_menu - 10 menu font color white gosub Menu_Crea_Box !xb !yb !wb 120 MINERALI menu font color gray menu font size 6 set !x !xb + 50 set !y !yb + 15 menu text txt !x !y INGOT set !x !xb + 97 menu text txt !x !y STONE set !x !xb + 145 menu text txt !x !y TRASH menu font color Silver set !x !xb + 5 set !y !y + 9 menu text txt !x !y IRON set !y !y + 9 menu text txt !x !y DULL set !y !y + 9 menu text txt !x !y SHADOW set !y !y + 9 menu text txt !x !y COPPER set !y !y + 9 menu text txt !x !y BRONZE set !y !y + 9 menu text txt !x !y GOLD set !y !y + 9 menu text txt !x !y AGAPITE set !y !y + 9 menu text txt !x !y VERITE set !y !y + 9 menu text txt !x !y VALORITE set !y !y + 9 menu text txt !x !y SAND menu font color White set !x !xb + 50 set !y !yb + 24 Menu Text txti . %iron_col !x !y %cont_i . %iron_col set !y !y + 9 Menu Text txti . %dull_col !x !y %cont_i . %dull_col set !y !y + 9 Menu Text txti . %shadow_col !x !y %cont_i . %shadow_col set !y !y + 9 Menu Text txti . %copper_col !x !y %cont_i . %copper_col set !y !y + 9 Menu Text txti . %bronze_col !x !y %cont_i . %bronze_col set !y !y + 9 Menu Text txti . %gold_col !x !y %cont_i . %gold_col set !y !y + 9 Menu Text txti . %agapite_col !x !y %cont_i . %agapite_col set !y !y + 9 Menu Text txti . %verite_col !x !y %cont_i . %verite_col set !y !y + 9 Menu Text txti . %valorite_col !x !y %cont_i . %valorite_col set !x !xb + 102 set !y !yb + 24 Menu Text txts . %iron_col !x !y %cont_s . %iron_col set !y !y + 9 Menu Text txts . %dull_col !x !y %cont_s . %dull_col set !y !y + 9 Menu Text txts . %shadow_col !x !y %cont_s . %shadow_col set !y !y + 9 Menu Text txts . %copper_col !x !y %cont_s . %copper_col set !y !y + 9 Menu Text txts . %bronze_col !x !y %cont_s . %bronze_col set !y !y + 9 Menu Text txts . %gold_col !x !y %cont_s . %gold_col set !y !y + 9 Menu Text txts . %agapite_col !x !y %cont_s . %agapite_col set !y !y + 9 Menu Text txts . %verite_col !x !y %cont_s . %verite_col set !y !y + 9 Menu Text txts . %valorite_col !x !y %cont_s . %valorite_col set !y !y + 9 Menu Text txtssand !x !y %cont_ssand set !x !xb + 150 set !y !yb + 24 Menu Text txtt . %iron_col !x !y %cont_t . %iron_col set !y !y + 9 Menu Text txtt . %dull_col !x !y %cont_t . %dull_col set !y !y + 9 Menu Text txtt . %shadow_col !x !y %cont_t . %shadow_col set !y !y + 9 Menu Text txtt . %copper_col !x !y %cont_t . %copper_col set !y !y + 9 Menu Text txtt . %bronze_col !x !y %cont_t . %bronze_col set !y !y + 9 Menu Text txtt . %gold_col !x !y %cont_t . %gold_col set !y !y + 9 Menu Text txtt . %agapite_col !x !y %cont_t . %agapite_col set !y !y + 9 Menu Text txtt . %verite_col !x !y %cont_t . %verite_col set !y !y + 9 Menu Text txtt . %valorite_col !x !y %cont_t . %valorite_col set !y !y + 9 Menu Text txttsand !x !y %cont_tsand ;fine minerali ;jewel set !yb !y_jewel set !xb 5 set !wb %w_menu - 10 menu font color white gosub Menu_Crea_Box !xb !yb !wb 45 JEWEL menu font color Silver menu font size 6 set !x !xb + 5 set !y !yb + 15 menu text txt !x !y DRK SAPPHIRE set !y !y + 9 menu text txt !x !y PRFCT EMRALD set !y !y + 9 menu text txt !x !y BLUE DIAMOND set !x !xb + 105 set !y !yb + 15 menu text txt !x !y TRQUOISE set !y !y + 9 menu text txt !x !y FIRE RUBY set !y !y + 9 menu text txt !x !y ECR CTRNE menu font color white menu font size 6 set !x !xb + 73 set !y !yb + 15 menu text txt . %DARK_SAPPHIRE !x !y %cont_j . %DARK_SAPPHIRE set !y !y + 9 menu text txt . %PERFECT_EMERALD !x !y %cont_j . %PERFECT_EMERALD set !y !y + 9 menu text txt . %BLUE_DIAMOND !x !y %cont_j . %BLUE_DIAMOND set !x !xb + 155 set !y !yb + 15 menu text txt . %TORQUOISE !x !y %cont_j . %TORQUOISE set !y !y + 9 menu text txt . %FIRE_RUBY !x !y %cont_j . %FIRE_RUBY set !y !y + 9 menu text txt . %ECRU_CITRINE !x !y %cont_j . %ECRU_CITRINE ;fine jewel ;move set !yb !y_move set !xb 5 set !wb %w_menu - 10 menu font color white gosub Menu_Crea_Box !xb !yb !wb 55 INFO if %usa_fire_beetle { menu font color silver menu font size 5 set !x !xb + !wb - 51 set !y !yb + 2 menu text txt !x !y BEETLE menu font color yellow menu font size 6 set !x !xb + !wb - 24 set !y !yb + 1 menu text txt !x !y %ID_firebeetle } menu font color Silver menu font size 6 set !x !xb + 5 set !y !yb + 15 menu text txt !x !y RUNA set !y !y + 9 menu text txt !x !y LIBRO set !y !y + 9 menu text txt !x !y TEMPO set !y !y + 9 menu text txt !x !y PROSP set !x !x + 42 set !y !yb + 15 menu text txt !x !y DI set !x !xb + 90 set !y !yb + 15 menu text txt !x !y SHOVEL set !y !y + 9 menu text txt !x !y TINKTOOL set !y !y + 9 menu text txt !x !y CONN.LOST set !y !y + 9 menu text txt !x !y CICLI menu font color WHITE menu font size 6 set !x !xb + 35 set !y !yb + 15 menu text txtCont_runa !x !y %cont_runa set !y !y + 9 menu text txtSpot_Book !x !y %Spot_Book . %cont_runa set !y !y + 9 menu font color Yellow menu text txtTempo !x !y 0 set !y !y + 9 menu font color WHITE menu text txtProspector !x !y 0 set !x !x + 25 set !y !yb + 15 menu text txtSpot_Max !x !y %Spot_Max set !x !xb + 139 set !y !yb + 15 menu text txtShovel !x !y %cont_Shovel set !y !y + 9 menu text txtTinkertool !x !y %cont_TinkerTool set !y !y + 9 menu text txtConnLost !x !y %cont_connLost set !y !y + 9 menu text txtCont_Cicli !x !y %cont_cicli ;spot set !yb !y_infospot set !xb 5 set !wb %w_menu - 10 menu font color white gosub Menu_Crea_Box !xb !yb !wb 61 SPOT INFO menu font color Silver menu font name DejaVu Sans Mono menu font style n menu font size 7 set !x !xb + 5 set !y !yb + 19 menu text txtFilone1 !x !y set !y !y + 9 menu text txtFilone2 !x !y set !y !y + 9 menu text txtFilone3 !x !y set !y !y + 9 menu text txtFilone4 !x !y menu font size 7 for !cy 1 3 { for !cx 1 3 { set !x !xb + 150 + !cx * 8 - !cY * 8 set !y !yb - 3 + !cy * 8 + !cx * 8 ;Menu Shape shp !x !y 10 10 4 10 1 gray 7 black set !x !x + 3 set !y !y + 2 set !var txtTile , !cx , _ , !cy menu text !var !x !y + } } menu font name Tahoma ;stato Menu Font Color white Menu Font Style b Menu font size 6 set !x 5 set !y !y_stato menu text txt !x !y AZIONE: set !x %w_menu_tot - 62 if %ritiro_bod menu text txtCicliBod !x !y %cont_bod set !x %w_menu_tot - 52 if %ritiro_bod menu text txtBODLABEL !x !y BOD: set !x 40 Menu Font Color yellow menu text txtAzione !x !y CREA MENU set !x %w_menu_tot - 30 menu text txtBODTIME !x !y ;debug if %debug { set !w_menu %w_menu_tot + 105 Menu Window size !w_menu %h_menu set !yb 0 set !xb %w_menu_tot set !wb !w_menu - %w_menu_tot set !hb %h_menu set !hbut 18 menu font color AQUA gosub Menu_Crea_Type_Box !xb !yb !wb !hb DEBUG DEBUG Menu Font bgcolor $590B5B Menu Font Name tahoma menu Font Transparent #true Menu Font Style b Menu font size 6 menu font color silver set !y !yb + 16 set !x !xb + 4 set !w !wb - 8 Menu Button VAI_SPOT !x !y !w 17 VAI ALLO SPOT set !y !y + !hbut Menu Button NEXT_SPOT !x !y !w 17 NEXT SPOT set !y !y + !hbut Menu Button BEGIN_SPOT !x !y !w 17 BEGIN SPOT set !y !y + !hbut Menu Button CREA_FOOD !x !y !w 17 CREA FOOD set !y !y + !hbut Menu Button SFAMA_PET !x !y !w 17 SFAMA PET set !y !y + !hbut Menu Button GIRO_BOD !x !y !w 17 GIRO BOD set !y !y + !hbut Menu Button TEST_ALARM !x !y !w 17 TEST_ALARM set !y !y + !hbut Menu Button TORNA_A_CASA !x !y !w 17 TORNA A CASA set !y !yb + !hb - !hbut Menu Button VAI !x !y !w 17 START } menu show 970 0 set #lpc !lpc return ;sub Crea_oggetto_tinkertool sub Crea_oggetto_tinkertool set !id_strumento %1 csriprovatt: set #LOBJECTID !id_strumento event macro 17 0 wait 5 gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false if %iron_settato = N/A { gosub ChooseMaterial iron set %iron_settato SI } set %tinkx #contposx + 30 set %tinky #contposy + 110 click %tinkx %tinky gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false set %tinkx #contposx + 235 set %tinky #contposy + 130 click %tinkx %tinky ricliccatinktt: gosub AntiBlock gosub wait_gump generic_gump set %tinkx #contposx + 235 set %tinky #contposy + 110 click %tinkx %tinky r if #CONTNAME = generic_gump goto ricliccatinktt wait 10 finditem %type_toolkit c_ , #BACKPACKID if #findkind = -1 goto csriprovatt return #true return ;sub Crea_pickaxe sub Crea_pickaxe set !id_strumento %1 csriprova: set #LOBJECTID !id_strumento event macro 17 0 wait 5 gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false if %iron_settato = N/A { gosub ChooseMaterial iron set %iron_settato SI } set %tinkx #contposx + 30 set %tinky #contposy + 110 click %tinkx %tinky gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false set %tinkx #contposx + 380 set %tinky #contposy + 270 click %tinkx %tinky gosub AntiBlock gosub wait_gump generic_gump if #result = #false return #false set %tinkx #contposx + 235 set %tinky #contposy + 70 ; era 190 per le pick axe click %tinkx %tinky ricliccatink: gosub AntiBlock gosub wait_gump generic_gump set %tinkx #contposx + 235 set %tinky #contposy + 110 click %tinkx %tinky r if #CONTNAME = generic_gump goto ricliccatink wait 10 finditem %type_shovel c_ , #backpackid if #findkind = -1 goto csriprova return #true ;sub Crea_shovel sub Crea_shovel Crea_Shovel_loop: gosub Set_Menu_Azione CREO SHOVEL gosub Check_Tool %Type_toolkits 10 if #result = #false { gosub Crea_TinkerTool if #result = #true goto Crea_Shovel_loop return TORNA_A_CASA } set !id_tool #result gosub check_iron if #result < 4 return TORNA_A_CASA gosub crea_pickaxe !id_tool ;if %last_tinker_crafted <> %Type_Shovel ; gosub crea_First_oggetto_tinker !id_tool 3 11 %Type_Shovel #True ;else ; gosub crea_Last_oggetto_tinker !id_tool %Type_Shovel #True #TRUE if #result = #false goto Crea_Shovel_loop set %last_tinker_crafted %Type_Shovel set %cont_shovel %cont_shovel + 1 menu set txtshovel %cont_shovel return #True ;sub Crea_spot_rune sub Crea_spot_rune set %Spot_Max 0 for !l 1 %RB_SpotMAX { set !libro %RB_Spot . !l set !ru %RB_Rune . !l for !c 1 16 { str Left !ru 1 set !v #true if #strres = 0 set !v #false str del !ru 1 1 set !ru #strres if !v { set %Spot_Max %Spot_Max + 1 set %Spot_Book . %Spot_Max !libro set %Spot_Rune . %Spot_Max !c set %Spot_Valido . %Spot_Max #TRUE } } } return ;sub Crea_tinkertool sub Crea_tinkertool Crea_TinkerTool_loop: gosub Set_Menu_Azione CREO TINKER TOOL gosub Check_Tool %Type_toolkits if #result = #false return TORNA_A_CASA set !id_tool #result gosub check_iron if #result < 4 return TORNA_A_CASA gosub crea_oggetto_tinkertool !id_tool ;if %last_tinker_crafted <> %Type_toolkit ; gosub crea_First_oggetto_tinker !id_tool 3 4 %Type_toolkit #True ;else ; gosub crea_Last_oggetto_tinker !id_tool %Type_toolkit #True #TRUE if #result = #false goto Crea_TinkerTool_loop set %last_tinker_crafted %Type_toolkit set %cont_tinkertool %cont_tinkertool + 1 menu set txtTinkerTool %cont_tinkertool return #True ;sub Dai_minata sub Dai_minata set #lobjectid %1 set #ltargetkind %6 set #ltargetx %2 set #ltargety %3 set #ltargetz %4 set #ltargettile %5 set #targcurs 0 set !volte 0 dai_minata_loop: set !volte !volte + 1 set !err #scnt + 2 if !volte > 5 return #false event macro 17 while #targcurs <> 1 { gosub AntiBlock if #scnt > !err goto dai_minata_loop wait 1 } event macro 22 return #true ;sub Filoni_info_varie sub Filoni_info_varie set !o_lpc #lpc set #lpc 1000 set !fminx #charposx - 2 set !fminy #charposy - 2 set !fmaxx #charposx + 2 set !fmaxy #charposy + 2 set !left #CHARPOSX - 3 set !top #CHARPOSY - 3 set !col00 $FFaaaa set !col01 $00FF00 set !col11 $0000FF set !col10 $FFFFFF gosub Set_Menu_Azione CERCO FILONI for !ffy !fminy !fmaxy { for !ffx !fminx !fmaxx { set !cx !ffx - !left set !cy !ffy - !top set !var txtTile , !cx , _ , !cy menu delete !var } } set !nfiloni 0 for !ffy !fminy !fmaxy { for !ffx !fminx !fmaxx { gosub check_mining_tile !ffx !ffy set !cx !ffx - !left set !cy !ffy - !top set !var txtTile , !cx , _ , !cy set !filonex !ffx / 8 set !filoney !ffy / 8 set !IDFilone !filonex , _ , !filoney set !x1 149 + !cx * 7 - !cY * 7 set !y1 318 + 32 + !cy * 7 + !cx * 7 set !var txtTile , !cx , _ , !cy set !xid !filonex % 2 set !yid !filoney % 2 set !n !xid , !yid menu font color !col . !n if #result { menu font size 7 menu text !var !x1 !y1 X } else { menu font size 5 set !y1 !y1 + 3 set !x1 !x1 + 2 menu text !var !x1 !y1 ° } } } gosub Set_Menu_Azione ATTENDO set #lpc !o_lpc return ;sub Fuggi sub Fuggi if %auto_escludi set %Spot_Valido . %cont_runa #FALSE return ;sub Get_id_firebeetle sub Get_id_firebeetle ;lo cerca prima addosso set !ffgifb #true rifindfbm: finditem %FBMType C_ , #CHARID if #findkind <> -1 { set #lobjectid #charid event macro 17 0 wait 20 goto rifindfbm } ;in terra rifindfb: finditem %FBType G_1 if #findkind = -1 { ;se non lo trova a terra nell'arco di 1 lo cerca nello schermo finditem %FBType G_10 if #findkind = -1 { if !ffgifb { set !ffgifb #false gosub Apri_gump_base goto rifindfbm } ;se non lo trova a terra nell'arco di 10 interrompe display ok Nessun fire Beetle trovato halt } else { msg all follow me $ wait 1s goto rifindfb } } return #findid ;sub Guarda_che_tipo sub Guarda_che_tipo set !pj %1 if iron in !pj && shadow notin !pj return 1 if dull in !pj return 2 if shadow in !pj return 3 if copper in !pj return 4 if bronze in !pj return 5 if gold in !pj return 6 if agapite in !pj return 7 if verite in !pj return 8 if valorite in !pj return 9 if sand in !pj return 10 return 1 ;sub Heal sub Heal set !typeheal %1 ripetiheal: if #TARGCURS <> 0 key esc wait 5 if #HITS = n/a gosub apri_gump_base if #HITS < #MAXHITS { if C in #CHARSTATUS { if %magia_usata = MAGER event macro 15 24 else event macro 15 201 } else { if %magia_usata = MAGER event macro 15 3 else event macro 15 202 } target 2s event macro 23 0 if !typeheal = all { wait 20 goto ripetiheal } } return ;sub Inizializza_contatori sub Inizializza_contatori ;ingot set %cont_i . %iron_col 0 set %cont_i . %dull_col 0 set %cont_i . %shadow_col 0 set %cont_i . %copper_col 0 set %cont_i . %bronze_col 0 set %cont_i . %gold_col 0 set %cont_i . %agapite_col 0 set %cont_i . %verite_col 0 set %cont_i . %valorite_col 0 ;stone set %cont_s . %iron_col 0 set %cont_s . %dull_col 0 set %cont_s . %shadow_col 0 set %cont_s . %copper_col 0 set %cont_s . %bronze_col 0 set %cont_s . %gold_col 0 set %cont_s . %agapite_col 0 set %cont_s . %verite_col 0 set %cont_s . %valorite_col 0 ;stone trash set %cont_t . %iron_col 0 set %cont_t . %dull_col 0 set %cont_t . %shadow_col 0 set %cont_t . %copper_col 0 set %cont_t . %bronze_col 0 set %cont_t . %gold_col 0 set %cont_t . %agapite_col 0 set %cont_t . %verite_col 0 set %cont_t . %valorite_col 0 ;jewel set %cont_j . %DARK_SAPPHIRE 0 set %cont_j . %PERFECT_EMERALD 0 set %cont_j . %BLUE_DIAMOND 0 set %cont_j . %TORQUOISE 0 set %cont_j . %FIRE_RUBY 0 set %cont_j . %ECRU_CITRINE 0 ;sand set %cont_ssand 0 set %cont_tsand 0 ;varie set %cont_cicli 0 set %cont_runa 1 set %cont_Shovel 0 set %cont_Bod 0 set %cont_TinkerTool 0 set %cont_connLost 0 return ;sub Inizializza_variabili sub Inizializza_variabili ;alarm set %Type_PG IS_HS_XU_AV_ ;fine alarm set %Type_NPC %Type_PG set %type_food_fire_beetle VRD_YRD_FUD_HQD_ set %type_food %type_food_fire_beetle , QQD_HND_AQD_PQD_PRD_BND_ set %pietre BVI_ set %Type_Prospector GBG_ set %Type_small_ore TVJ_ set %Type_ore DWJ_EWJ_TVJ_GWJ_ set %Type_forgia JBG_OUJ_CUJ_KHR_WUJ_WOJ_SOJ_SUJ_KUJ_ set %Type_toolkits KTL_GTL_ set %Type_toolkit KTL set %Type_lingotti ENK_ set %Type_DigItem QPF_TWF_WWF_ set %Type_Shovel WWF set %FBType JJ_MIK_ set %FBMType IWX_ set %Gemme UWS_TWS_GXS_ZWS_AXS_VWS_ set %Type_Sand KSG_ set %DARK_SAPPHIRE AXS set %PERFECT_EMERALD UWS set %BLUE_DIAMOND GXS set %TORQUOISE ZWS set %FIRE_RUBY VWS set %ECRU_CITRINE TWS ;colori minerali set %iron_col 0 set %dull_col 2419 set %shadow_col 2406 set %copper_col 2413 set %bronze_col 2418 set %gold_col 2213 set %agapite_col 2425 set %verite_col 2207 set %valorite_col 2219 ;redirect from color set %col_ . %iron_col IRON set %col_ . %dull_col DULL set %col_ . %shadow_col SHADOW set %col_ . %copper_col COPPER set %col_ . %bronze_col BRONZE set %col_ . %gold_col GOLD set %col_ . %agapite_col AGAPITE set %col_ . %verite_col VERITE set %col_ . %valorite_col VALORITE ;one_letter_material set %material_0 ? set %material_1 I set %material_2 D set %material_3 S set %material_4 C set %material_5 B set %material_6 G set %material_7 A set %material_8 v set %material_9 V set %material_10 S ;loot set %item_to_loot %Type_lingotti , %gemme , %sabbia ;tile set %digable |220|221|222|223|224|225|226|227|228|229|230|231|236|237|238|239|240|241|242|243| +244|245|246|247|252|253|254|255|256|257|258|259|260|261|262|263|268|269|270|271| +272|273|274|275|276|277|278|279|286|287|288|289|290|291|292|293|294|296|296|297| +321|322|323|324|467|468|469|470|471|472|473|474|476|477|478|479|480|481|482|483| +484|485|486|487|492|493|494|495|543|544|545|546|547|548|549|550|551|552|553|554| +555|556|557|558|559|560|561|562|563|564|565|566|567|568|569|570|571|572|573|574| +575|576|577|578|579|581|582|583|584|585|586|587|588|589|590|591|592|593|594|595| +596|597|598|599|600|601|610|611|612|613|1010|1741|1742|1743|1744|1745|1746|1747| +1748|1749|1750|1751|1752|1753|1754|1755|1756|1757|1771|1772|1773|1774|1775|1776| +1777|1778|1779|1780|1781|1782|1783|1784|1785|1786|1787|1788|1789|1790|1801|1802| +1803|1804|1805|1806|1807|1808|1809|1811|1812|1813|1814|1815|1816|1817|1818|1819| +1820|1821|1822|1823|1824|1831|1832|1833|1834|1835|1836|1837|1838|1839|1840|1841| +1842|1843|1844|1845|1846|1847|1848|1849|1850|1851|1852|1853|1854|1861|1862|1863| +1864|1865|1866|1867|1868|1869|1870|1871|1872|1873|1874|1875|1876|1877|1878|1879| +1880|1881|1882|1883|1884|1981|1982|1983|1984|1985|1986|1987|1988|1989|1990|1991| +1992|1993|1994|1995|1996|1997|1998|1999|2000|2001|2002|2003|2004|2028|2029|2030| +2031|2032|2033|2100|2101|2102|2103|2104|2105|1339|1340|1341|1342|1343|1344|1345| +1346|1347|1348|1349|1350|1351|1352|1353|1354|1355|1356|1357|1358|1359| set %sand |22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47| +48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|68|69|70|71|72|73|74|75|286|287|288|289| +290|291|292|293|294|295|296|297|298|299|300|301|402|424|425|426|427|441|442|443|444| +445|446|447|448|449|450|451|452|453|454|455|456|457|458|459|460|461|462|463|464|465| +642|643|644|645|650|651|652|653|654|655|656|657|821|822|823|824|825|826|827|828|833| +834|835|836|845|846|847|848|849|850|851|852|857|858|859|860|951|952|953|954|955|956| +957|958|967|968|969|970|1447|1448|1449|1450|1451|1452|1453|1454|1455|1456|1457|1458| +1611|1612|1613|1614|1615|1616|1617|1618|1623|1624|1625|1626|1635|1636|1637|1638|1639| +1640|1641|1642|1647|1648|1649|1650| set %dirt |16337|1946| set %water |100|97|93|89|85|81|77|78|86|98|90|96|95|88|84|76|83| +91|87|99|79|82|94|92|80| set %forest |15855|15856|15854|15853|2506|2501|2511|2508|2500| +2510|2502|2507|15809|15844|15842|15849|15851|15852|15850| +15843|15839|15846|15836|15845|15835|2509|2504|2503|2505| +15838|15810|15848| set %void |580| set %cavesearch |2|2028|430|475| ;version set %new_version #false set #sendHeader User-Agent: , #spc , EasyUO , #spc , #cliVer , $ set !param /pepito_easyuo/check_version.php?idscript= , %idscript , &versionscript= , %versionscript send HTTPPost pepitoweb.altervista.org !param R ;send HTTPPost pepitoweb.altervista.org /prova.txt R tile init return ;sub Loop_debug sub Loop_debug gosub set_menu_azione DEBUG LOOP set #MENUBUTTON N/A while #true { wait 5 if #MENUBUTTON <> N/A { if #menubutton = VAI_SPOT { set #MENUBUTTON N/A gosub Vai_allo_spot event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = NEXT_SPOT { set #MENUBUTTON N/A set %cont_runa %cont_runa + 1 if %cont_runa > %Spot_Max { set %cont_cicli %cont_cicli + 1 set %cont_runa 1 } event ExMsg #CHARID 3 40 LIBRO %Spot_Book . %cont_runa RUNA %cont_runa gosub set_menu_azione DEBUG LOOP } if #menubutton = BEGIN_SPOT { set #MENUBUTTON N/A gosub Begin_Spot event ExMsg #CHARID 3 40 #result event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = CREA_FOOD { set #MENUBUTTON N/A gosub create_food %type_food_fire_beetle %type_food EAT %chest_trash event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = SFAMA_PET { set #MENUBUTTON N/A if %usa_fire_beetle { gosub sfama_pet if #result { event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 NON RIESCO } } else { event ExMsg #CHARID 3 40 NON HAI SELEZIONATO USA FIRE BEETLE } gosub set_menu_azione DEBUG LOOP } if #menubutton = TEST_ALARM { set #MENUBUTTON N/A gosub Alarm_Check gosub set_menu_azione DEBUG LOOP } if #menubutton = GIRO_BOD { set #MENUBUTTON N/A gosub GB_Start event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = TORNA_A_CASA { set #MENUBUTTON N/A gosub Torna_a_Casa if #result { gosub check_hp if #result <> OK gosub heal ALL gosub smelta gosub sposta_loot gosub Restock_tool event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 NON RIESCO } gosub set_menu_azione DEBUG LOOP } if #menubutton = VAI { set #MENUBUTTON N/A set %debug #false gosub Crea_Menu_Avviato return } if #menubutton = closed { set #MENUBUTTON N/A event ExMsg #CHARID 3 30 Script chiuso halt } if #MENUBUTTON <> N/A display ok Non Supportato #MENUBUTTON } } return ;sub Menu_crea_avvio sub Menu_crea_avvio set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 10 set !x !xb + 25 set !w !wb - 50 gosub Menu_Crea_Box !x !y !w 65 IMPOSTAZIONI if %pepito_alarm = N/A set %pepito_alarm #false menu font size 6 set !x !xb + !wb - 39 set !y !yb + 10 Menu Check chkpepito_alarm !x !y 12 12 %pepito_alarm set !x !xb + !wb - 70 set !y !yb + 11 Menu text txt !x !y ALARM menu font color silver menu font size 7 set !y !y + 16 set !x !xb + 30 menu text txt !x !y MAGIA menu font color white set !x !xb + 80 if %magia_usata = mager menu text txt !x !y RECALL else menu text txt !x !y SACRED JOURNEY menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y TINKER set !x !xb + 80 if %USA_TINKER { menu font color white menu text txt !x !y SI } else { menu font color silver menu text txt !x !y NO } menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y BEETLE set !x !xb + 80 set %primofindbeetle #true ricercafirebeetle: if %USA_FIRE_BEETLE { set !fb_finded #false finditem %FBMType c_ , #charid if #findkind <> -1 set !fb_finded #true finditem %FBType g_1 if #findkind <> -1 set !fb_finded #true if !fb_finded { menu font color white menu text txt !x !y SI } else { if %primofindbeetle { gosub Apri_gump_base set %primofindbeetle #false goto ricercafirebeetle } menu font color red menu text txt !x !y NOT FINDED set %menu_valido_AVVIO #FALSE } } else { menu font color silver menu text txt !x !y NO } menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y LIBRI menu font color white set !x !xb + 80 gosub check_object %RB_Restock #backpackid set !v #result for !cs 1 %RB_SpotMAX { gosub check_object %RB_Spot . !cs #backpackid if #result = #false set !v #result } if !v = #FALSE { set %menu_valido_AVVIO #FALSE menu font color RED } if !v menu text txt !x !y OK else menu text txt !x !y ERROR if %menu_valido_AVVIO menu font bgcolor $002222 else menu font bgcolor $000088 set !x !xb + 218 set !y !y - 3 menu font size 6 menu Button BUT_MENU1 !x !y 50 16 REFRESH menu font size 7 if %menu_valido_AVVIO { set !y !yb + !hb / 2 + 49 set !x !xb + !wb / 2 - 100 menu font size 6 menu font bgcolor $222222 menu font color white menu font color silver menu font style B menu button butDebug !x !y 200 15 DEBUG START set !y !yb + !hb / 2 set !x !xb + !wb / 2 - 100 menu font size 20 menu font bgcolor $003300 menu font color yellow menu font style B menu button butStart !x !y 200 50 START } else { menu font color white set !y !yb + !hb / 2 set !x !xb + 25 set !w !wb - 50 Menu Shape mnuRect1 !x !y !w 45 3 7 1 gray 7 $111133 Menu Shape mnuRect1 !x !y !w 13 4 7 1 gray 7 $000055 set !y !y + 1 set !x !xb + 90 menu text txt !x !y AVVIO NON POSSIBILE set !x !xb + 33 menu font color silver set !y !y + 16 menu text txt !x !y CLICCA SULLE VOCI EVIDENZIATE IN ROSSO set !y !y + 11 menu text txt !x !y PER SETTARE LE IMPOSTAZIONI MANCANTI } if %ritiro_bod = N/A set %ritiro_bod #false if %ritiro_subito = N/A set %ritiro_subito #false ;if %girobod_load_sel = N/A ;{ ; for %c 1 7 ; { ; set !nv GiroBod_VAL_ , %c ; gosub GlobalVar_get %idBodscript !nv ; } ; set %girobod_load_sel FATTO ;} if %girobod_valido { if %CHOISE_GIROBOD_SCRIPT = INTERNO { menu font color silver menu font bgcolor $002222 set !x !xb + 45 set !y ( !yb + !hb - 25 ) Menu font size 6 Menu Check chkRitiroBod !x !y 210 15 %ritiro_bod RICHIAMA GIRO BOD OGNI ORA set !x !x + 155 Menu Check chkRitiroSubito !x !y 60 15 %ritiro_subito SUBITO } else { menu font color silver menu font bgcolor $002222 set !x !xb + 15 set !y ( !yb + !hb - 25 ) Menu font size 6 Menu Check chkRitiroBod !x !y 230 15 %ritiro_bod RICHIAMA SCRIPT ESTERNO GIRO BOD OGNI ORA set !x !x + 220 Menu Check chkRitiroSubito !x !y 60 15 %ritiro_subito SUBITO } } else { menu font bgcolor $002222 set !x !xb + 95 set !y ( !yb + !hb - 35 ) Menu font size 6 menu font color red Menu text txt !x !y GIRO BOD NON POSSIBILE set !y ( !yb + !hb - 25 ) Menu font size 6 menu font color silver set !x !xb + 32 Menu text txt !x !y CLICCA SU 'EXTRA' PER IMPOSTARE I DATI DEL GIRO BOD } gosub Set_Menu_Mex DEFAULT PREMI 'START' PER AVVIARE CON LE ULTIME IMPOSTAZIONI $ PREMI UNA VOCE DI MENU PER SETTARE QUELLA PARTE $ NB: PULSANTI ROSSI INDICANO UNA PARTE NON SETTATA gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_ottimizza sub Menu_crea_ottimizza set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 8 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 124 OTTIMIZZA PER MATERIALI set !y !y + 6 set !i1 IRON set !i2 DULL_COPPER set !i3 SHADOW_IRON set !i4 COPPER set !i5 BRONZE set !i6 GOLD set !i7 AGAPITE set !i8 VERITE set !i9 VALORITE menu font bgcolor $002222 menu font color silver set !x !xb + 15 for !ciclo_mat 1 9 { set !y !y + 11 set !v !i . !ciclo_mat if %OTTIMIZZA_ . !ciclo_mat = N/A set %OTTIMIZZA_ . !ciclo_mat #true gosub Replace !v _ #spc Menu Check chkOTTIMIZZA_ . !ciclo_mat !x !y 210 15 %OTTIMIZZA_ . !ciclo_mat #strres } menu font size 6 set !y !y + 22 set !x !xb + 13 menu text txt !x !y LO SCRIPT PROVA AD OTTIMIZZARE LA RACCOLTA DEI MINERALI set !y !y + 11 set !x !xb + 13 menu text txt !x !y USANDO I PROSPECTOR TOOLS CHE TROVA NELLA CASSA SCELTA menu font size 7 menu font color yellow set !y ( !yb + !hb - 15 ) set !x !xb + 18 menu text txt !x !y NB: GLI ELEMENTI IN GIALLO SONO OBBLIGATORI gosub Set_Menu_Mex DEFAULT SCEGLI COME OTTIMIZZARE L'USO DEI PROSPECTOR TOOLS $ I PROSPECTOR TOOLS DEVONO ESSERE MESSI NELLA CASSA BASE gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_restock sub Menu_crea_restock set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 8 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 36 RUNE BOOK RESTOCK set !y !y + 17 gosub Menu_Crea_Linea_Rune_Book !x !y !w Restock set !y !yb + 48 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 213 POSIZIONE E CONTENITORI set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_Position !x !y !w RESTOCK set !x !xb + 5 set !y !y + 13 gosub Menu_Crea_Linea_Chest !x !y !w #True BASE BANK set !x !xb + 5 set !y !y + 13 gosub Menu_Crea_Linea_Chest !x !y !w #False MINERALI 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False RESTOCK 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False PROSPECTOR 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False JEWEL 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False SABBIA 6 menu font size 5 set !x !xb + 100 set !y !y + 1 menu text txt !x !y limite x spot set !x !xb + 147 set !y !y - 4 menu font size 6 if %limite_sand = N/A set %limite_sand 1 menu edit edtLimite_Sand !x !y 20 %limite_sand set !y !y + 3 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_IRON 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_DULL 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_SHADOW 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_COPPER 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_BRONZE 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_GOLD 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_AGAPITE 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_VERITE 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False STONE_VALORITE 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False TRASH 6 menu font size 6 set !y !y + 15 set !x !xb + 13 menu text txt !x !y UNA CHEST NON SETTATA VALE COME CHEST BASE TRANNE CHE PER set !y !y + 11 set !x !xb + 13 menu text txt !x !y LE PIETRE. PER QUEST' ULTIME N/A VALE COME 'DA BUTTARE' menu font size 7 menu font color yellow set !y ( !yb + !hb - 13 ) set !x !xb + 18 menu text txt !x !y NB: GLI ELEMENTI IN GIALLO SONO OBBLIGATORI gosub Set_Menu_Mex DEFAULT SETTA IL RUNEBOOK E LA POSIZIONE DI RESTOCK $ SETTA I CONTENITORI USATI gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_spot sub Menu_crea_spot set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 8 set !x !xb + 5 set !w ( !wb / 2 ) - 19 set !h !hb - 30 menu font color Yellow gosub Menu_Crea_Box !x !y !w !h RUNEBOOK USATI if %RB_SpotMAX = N/A set %RB_SpotMAX 0 if %Menu_Vista_book = N/A set %Menu_Vista_book 1 if %Menu_Vista_book > %RB_SpotMAX set %Menu_Vista_book %RB_SpotMAX set !y !yb + 18 for !cspot 1 10 { if !cspot = 1 menu font color Yellow else menu font color Silver set !y !y + 13 set !x !xb + 12 if %RB_SpotMAX < !cspot { menu font bgcolor $006600 menu button butAddBook_ . !cspot !x !y 13 13 + set !y !y + 2 set !x !xb + 30 menu text txtRunebook_Spot . !cspot !x !y NUOVO LIBRO break } else { menu font bgcolor $000066 menu button butRemoveBook_ . !cspot !x !y 13 13 x set !x !xb + !w - 12 if %Menu_Vista_book <> !cspot { menu button butViewBook_ . !cspot !x !y 13 13 > } else { menu font color Green menu text txt !x !y -> } set !y !y + 1 set !x !xb + 30 menu text txtRunebook_Spot . !cspot !x !y %RB_Spot . !cspot } } set !y ( !yb + !hb - 40 ) set !x !xb + 7 menu font size 6 menu button butAutoAddBook_MINER !x !y 125 15 AUTO ADD BOOK 'MINER' set !y !yb + 8 set !x !xb + 5 + ( !wb / 2 ) - 17 set !w ( !wb / 2 ) + 7 set !h !hb - 30 menu font color Yellow gosub Menu_Crea_Box !x !y !w !h SPOT USATI if %Menu_Vista_book <> 0 { menu font color Silver menu font size 6 set !yt !y + 18 set !xt !x + 7 menu text txt !xt !yt SCEGLI LE RUNE USATE NEL LIBRO set !yt !yt + 10 set !xt !x + !w / 2 - 20 menu text txt !xt !yt %RB_Spot . %Menu_Vista_book menu font bgcolor $002222 set !ru %RB_Rune . %Menu_Vista_book set !xt !x + 15 set !yt !y + 30 for !crune 1 16 { str Left !ru 1 set !v #true if #strres = 0 set !v #false str del !ru 1 1 set !ru #strres if !crune = 9 { set !xt !xt + 75 set !yt !y + 30 } set !yt !yt + 15 Menu Check chkRune . !crune !xt !yt 55 15 !v Runa !cRune } } menu font size 7 menu font color yellow set !y ( !yb + !hb - 15 ) set !x !xb + 18 menu text txt !x !y NB: GLI ELEMENTI IN GIALLO SONO OBBLIGATORI gosub Set_Menu_Mex DEFAULT SETTA I RUNEBOOK E LE RUNE USATE $ PER ANDARE A FARE LE RISORSE $ SETTA ALMENO UN LIBRO CON UNA RUNA VALIDA gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_varie sub Menu_crea_varie set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 3 set !x !xb + 5 set !w !wb - 10 menu font bgcolor $002222 menu font color silver gosub Menu_Crea_Check_Box !x !y !w 39 USA_FIRE_BEETLE USA FIRE BEETLE set !x !xb + 15 set !y !y + 18 menu text txt !x !y LIMITE LINGOTTI set !x !xb + 115 set !y !y - 3 if %LIMITE_LINGOTTI = N/A set %LIMITE_LINGOTTI 2000 menu edit edtLIMITE_LINGOTTI !x !y 40 %LIMITE_LINGOTTI set !y !yb + 43 set !x !xb + 5 set !w !wb - 10 menu font bgcolor $002222 menu font color silver gosub Menu_Crea_Box !x !y !w 52 AUTODIFESA menu font size 6 set !x !xb + 15 set !y !y + 18 if %AUTO_HEAL = N/A set %AUTO_HEAL #TRUE Menu Check chkAUTO_HEAL !x !y 100 15 %AUTO_HEAL CURATI SE HP < set !x !xb + 100 set !y !y - 2 if %LIMITE_HP = N/A set %LIMITE_HP MAX menu edit edtLIMITE_HP !x !y 40 %LIMITE_HP set !y !y + 2 set !x !xb + 155 ;set !y !y + 15 if %AUTO_FUGA = N/A set %AUTO_FUGA #TRUE Menu Check chkAUTO_FUGA !x !y 90 15 %AUTO_FUGA VAI VIA SE HP < set !x !xb + 242 set !y !y - 2 if %FUGA_HP = N/A set %FUGA_HP 50 menu edit edtFUGA_HP !x !y 40 %FUGA_HP set !y !y + 2 set !x !xb + 155 set !y !y + 15 if %AUTO_ESCLUDI = N/A set %AUTO_ESCLUDI #TRUE Menu Check chkAUTO_ESCLUDI !x !y 130 15 %AUTO_ESCLUDI ESCLUDI SPOT DOPO FUGA set !x !xb + 15 ;set !y !y + 15 if %USA_PROTECTION = N/A set %USA_PROTECTION #TRUE Menu Check chkUSA_PROTECTION !x !y 140 15 %USA_PROTECTION CAST PROTECTION SE MAGO set !y !yb + 96 set !x !xb + 5 set !w !wb - 10 menu font bgcolor $002222 menu font color silver gosub Menu_Crea_Box !x !y !w 40 TINKER set !x !xb + 15 set !y !y + 18 if %USA_TINKER = N/A set %USA_TINKER #TRUE Menu Check chkUSA_TINKER !x !y 270 15 %USA_TINKER USA TINKERING PER STRUMENTI SE POSSIBILE set !y !yb + 137 set !x !xb + 5 set !w !wb - 10 menu font color Yellow gosub Menu_Crea_Box !x !y !w 67 CONNECTION LOST set !x !xb + 13 set !y !y + 19 menu font color Silver menu font size 6 menu text txt !x !y PG USATO PER RICONNETTERSI DOPO UN CONNECTION LOST menu font color Yellow menu font size 7 set !x !xb + 263 set !y !y - 4 if %mycharnum = N/A set %mycharnum 0 menu Edit edtMyCharNum !x !y 16 %MyCharNum set !x !xb + 13 set !y !y + 19 menu font color Silver menu font size 6 if %sospendi = N/A set %sospendi #TRUE Menu Check chkSospendi !x !y 125 15 %sospendi SOSPENDI SCRIPT TRA LE set !x !xb + 180 set !y !y + 2 menu text txt !x !y E LE set !x !xb + 137 set !y !y - 3 menu font size 6 if %sospendida = N/A set %sospendida 063500 menu Edit edtSospendiDa !x !y 40 %sospendida set !x !xb + 200 menu font size 6 if %sospendia = N/A set %sospendia 070500 menu Edit edtSospendia !x !y 40 %sospendia ;spot set !y !yb + 207 set !x !xb + 5 set !w !wb - 10 menu font color white gosub Menu_Crea_Box !x !y !w 86 SPOT INFO menu font color white menu font name DejaVu Sans Mono menu font style b menu font size 9 ;for !cy 1 6 ;{ ; for !cx 1 6 ; { ; set !x1 !x + 150 + !cx * 6 - !cY * 6 + 3 ; set !y1 !y - 3 + !cy * 6 + !cx * 6 + 5 ; set !var txtTile , !cx , _ , !cy ; menu text !var !x1 !y1 . ; } ;} menu text txtPG 149 393 0 menu font name Tahoma menu font size 7 menu font color yellow set !y ( !yb + !hb - 14 ) set !x !xb + 18 menu text txt !x !y NB: GLI ELEMENTI IN GIALLO SONO OBBLIGATORI gosub Set_Menu_Mex DEFAULT SCEGLI COME OTTIMIZZARE L'USO DEI PROSPECTOR TOOLS $ I PROSPECTOR TOOLS DEVONO ESSERE MESSI NELLA CASSA BASE gosub Set_Menu_Azione ATTENDO return ;sub Menu_get_auto_book sub Menu_get_auto_book set !pfind %1 ;string da cercare ;display ok !pfind set !isadded #false loop_Menu_Get_Auto_Book: gosub Get_Book_From_Name !pfind mbook if #result <> #false { for !libri 1 %mbook0 { set !exist #false set !libro %mbook . !libri for !c 1 %RB_SpotMAX { if %RB_Spot . !c = !libro { set !exist #true break } } if !exist = #false { set %RB_SpotMax %RB_SpotMax + 1 set %RB_Spot . %RB_SpotMax !libro menu set txtRunebook_Spot . %RB_SpotMax %RB_Spot . %RB_SpotMax set !nomevar RB_Spot , %RB_SpotMax gosub GlobalVar_put %idscript !nomevar gosub GlobalVar_put %idscript RB_SpotMax set %RB_Rune . %RB_SpotMax 1111111111111111 set !nomevar RB_Rune , %RB_SpotMax gosub GlobalVar_put %idscript !nomevar set %Menu_Vista_book %RB_SpotMax set !isadded #true } } } else { display ok Nessun Runebook !pfind nello zaino! return } if !isadded gosub Menu_Crea else display ok Tutti i Runebook !pfind sono gią in lista! return ;sub Menu_loop sub Menu_loop set #MENUBUTTON N/A Menu_Loop_Ciclo: if %BUT_MENU . %menu_sel = VARIE { if #CHARPOSX <> %last_info_x || #CHARPOSY <> %last_info_y { set %time_to_info #scnt + 1 set %last_info_x #CHARPOSX set %last_info_y #CHARPOSY set %fatto_info #false } if #CHARPOSX = %last_info_x && #CHARPOSY = %last_info_y && #scnt > %time_to_info && %fatto_info = #false { gosub filoni_info_varie set %fatto_info #true } } if #MENUBUTTON = N/A goto Menu_Loop_Ciclo ;selezionato pulsante if BUT_MENU in #menubutton { set !nomesub Menu_Validate_ , %BUT_MENU . %menu_lastsel gosub !nomesub if #result <> #false { gosub Split #menubutton BUT_MENU set %menu_sel %strright gosub Menu_Crea set %menu_lastsel %menu_sel } set #MENUBUTTON N/A goto Menu_Loop_Ciclo } ;giro_bod gosub Menu_Giro_Bod_Loop if #result goto Menu_Loop_Ciclo ;alarm gosub Menu_alarm_Loop if #result goto Menu_Loop_Ciclo ;site if #menubutton = butGoSite { display yesno Informazioni sullo script disponibili sul Web $ Vuoi apripre la pagina Web ? if #dispRes = yes { set !web http://pepitoweb.altervista.org/pepito_easyuo/index.php?idscript= , %idscript , &versionscript= , %versionscript execute !web } set #MENUBUTTON N/A goto Menu_Loop_Ciclo } ;other if butChest_ in #menubutton { gosub Split #menubutton butChest_ set %id_object %strright if %bank_base = #true && %id_object <> base gosub Menu_Set_Chest %id_object C %chest_base BANK else gosub Menu_Set_Chest %id_object G 2 RESTOCK if #result <> N/A { set %bank_ . %id_object #False menu set txtBankChest_ . %id_object #spc set %chest_ . %id_object #Result menu set txtChest_ . %id_object %chest_ . %id_object set !nomevar chest_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar bank_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butBankChest_ in #menubutton { gosub Split #menubutton butBankChest_ set %id_object %strright gosub Menu_Set_Bank_Chest %id_object RESTOCK if #result <> N/A { set %chest_ . %id_object #Result set %bank_ . %id_object #True menu set txtBankChest_ . %id_object BANK menu set txtChest_ . %id_object %chest_ . %id_object set !nomevar chest_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar bank_ , %id_object gosub GlobalVar_put %idscript !nomevar } else { event exmsg #charid 3 %menu_col_ko BANK non trovata } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetChest_ in #menubutton { gosub Split #menubutton butResetChest_ set %id_object %strright set %chest_ . %id_object N/A menu set txtChest_ . %id_object N/A set !nomevar chest_ , %id_object gosub Globalvar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butCHOISE_ in #menubutton { gosub Split #menubutton butCHOISE_ set %id_object %strright gosub Split_to_array %CHOISES_ . %id_object _ temp set !lenght #result set !s 0 for !i 1 !lenght { if %temp . !i = %CHOISE_ . %id_object set !s !i } set !s !s + 1 if !s > !lenght set !s 1 set %CHOISE_ . %id_object %temp . !s menu set txtChoise_ . %id_object %CHOISE_ . %id_object set !nomevar CHOISE_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if butPosition_ in #menubutton { gosub Split #menubutton butPosition_ set %id_object %strright set %posX_ . %id_object #charposx set %posY_ . %id_object #charposy set %posZ_ . %id_object #charposz menu set txtPosition_ . %id_object %posX_ . %id_object %posY_ . %id_object %posZ_ . %id_object set !nomevar posX_ , %id_object gosub Globalvar_put %idscript !nomevar set !nomevar posY_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar posZ_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butRunebook_ in #menubutton { gosub Split #menubutton butRunebook_ set %id_object %strright gosub Menu_Set_Runebook %id_object C #backpackid RESTOCK if #result <> N/A { set %RB_ . %id_object #Result menu set txtRunebook_ . %id_object %RB_ . %id_object set !nomevar RB_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butViewBook_ in #menubutton { gosub Split #menubutton butViewBook_ set %id_object %strright gosub Salva_Rune_Usate set %Menu_Vista_book %id_object set #MENUBUTTON N/A gosub Menu_Crea goto Menu_Loop_Ciclo } if butAddBook_ in #menubutton { gosub Split #menubutton butAddBook_ set %id_object %strright gosub Menu_Set_Runebook %id_object C #backpackid SPOT if #result <> N/A { set !exist #false for !c 1 %RB_SpotMAX { if %RB_Spot . !c = #Result { event exmsg #charid 3 %menu_col_ko Libro gia in lista! set !exist #true break } } if !exist = #false { set %RB_Spot . %id_object #Result set %RB_SpotMax %RB_SpotMax + 1 menu set txtRunebook_Spot . %id_object %RB_Spot . %id_object set !nomevar RB_Spot , %id_object gosub GlobalVar_put %idscript !nomevar gosub GlobalVar_put %idscript RB_SpotMax set %Menu_Vista_book %RB_SpotMax gosub Menu_Crea } } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butRemoveBook_ in #menubutton { gosub Split #menubutton butRemoveBook_ set %id_object %strright if %RB_SpotMAX > 1 { set !i 1 for !c 1 %RB_SpotMAX { if !c <> %id_object { set %RB_Spot . !i %RB_Spot . !c set %RB_Rune . !i %RB_Rune . !c set !i !i + 1 set !nomevar RB_Spot , !i gosub GlobalVar_put %idscript !nomevar set !nomevar RB_Rune , !i gosub GlobalVar_put %idscript !nomevar } } set %RB_Spot . %RB_SpotMAX N/A set %RB_Rune . %RB_SpotMAX N/A set !nomevar RB_Spot , %RB_SpotMAX gosub Globalvar_del %idscript !nomevar set !nomevar RB_Rune , %RB_SpotMAX gosub Globalvar_del %idscript !nomevar set %RB_SpotMAX %RB_SpotMAX - 1 gosub GlobalVar_put %idscript RB_SpotMax gosub Menu_Crea } else { set %RB_Spot1 N/A set %RB_Rune1 N/A gosub Globalvar_del %idscript RB_Spot1 gosub Globalvar_del %idscript RB_Rune1 set %RB_SpotMAX %RB_SpotMAX - 1 gosub GlobalVar_put %idscript RB_SpotMax gosub Menu_Crea } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butAutoAddBook_ in #MENUBUTTON { gosub Split #menubutton butAutoAddBook_ set %id_object %strright gosub Menu_Get_Auto_Book %id_object set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if #menubutton = BUT_ATTUALE { set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if #menubutton = closed { set #MENUBUTTON N/A event ExMsg #CHARID 3 %menu_col_i Script chiuso halt } if #menubutton = BUTSTART { set %debug #false gosub Menu_Validate_Avvio set #MENUBUTTON N/A Menu Clear Menu Hide return #True } if #menubutton = BUTDEBUG { set %debug #true gosub Menu_Validate_Avvio set #MENUBUTTON N/A Menu Clear Menu Hide return #True } display ok #menubutton event exmsg #charid 3 %menu_col_ko Bottone non conosciuto! set #MENUBUTTON N/A goto loopmenuaspettaunbutton return ;sub Menu_validate_avvio sub Menu_validate_avvio menu getnum chkpepito_Alarm if #menures <> %pepito_alarm { set %pepito_alarm #menures gosub GlobalVar_put %idscript pepito_alarm } menu getnum chkRitiroBod if #menures <> %ritiro_bod { set %ritiro_bod #menures gosub GlobalVar_put %idscript ritiro_bod } menu getnum chkRitiroSubito if #menures <> %ritiro_subito { set %ritiro_subito #menures gosub GlobalVar_put %idscript ritiro_subito } return ;sub Menu_validate_ottimizza sub Menu_validate_ottimizza set %menu_valido_OTTIMIZZA #true set !i1 IRON set !i2 DULL_COPPER set !i3 SHADOW_IRON set !i4 COPPER set !i5 BRONZE set !i6 GOLD set !i7 AGAPITE set !i8 VERITE set !i9 VALORITE for !ciclo_mat 1 9 { set !v OTTIMIZZA_ , !ciclo_mat menu getnum chk . !v set % . !v #menures gosub GlobalVar_put %idscript !v } gosub GlobalVar_put %idscript menu_valido_OTTIMIZZA return ;sub Menu_validate_restock sub Menu_validate_restock set %menu_valido_Restock #true if %posX_restock = N/A set %menu_valido_Restock #false If %CHEST_BASE = N/A set %menu_valido_Restock #false If %RB_RESTOCK = N/A set %menu_valido_Restock #false menu getnum edtfirstrune_Restock if #menures > 0 && #menures < 17 set !val #MenuRes else set !val 0 if !val <> %firstrune_Restock { set %firstrune_Restock !val gosub GlobalVar_put %idscript firstrune_Restock } menu getnum edtlastrune_Restock if #menures > 0 && #menures < 17 set !val #MenuRes else set !val 0 if !val <> %lastrune_Restock { set %lastrune_Restock !val gosub GlobalVar_put %idscript lastrune_Restock } menu getnum edtLimite_Sand if #menures > 0 && #menures < 999 set !val #MenuRes else set !val 0 if !val <> %limite_sand { set %limite_sand !val gosub GlobalVar_put %idscript limite_sand } If %firstrune_RESTOCK < 1 || %firstrune_RESTOCK > 16 set %menu_valido_Restock #false If %lastrune_RESTOCK < 1 || %lastrune_RESTOCK > 16 || %firstrune_RESTOCK > %lastrune_RESTOCK set %menu_valido_Restock #false If %limite_sand < 1 || %limite_sand > 999 set %menu_valido_Restock #false gosub GlobalVar_put %idscript menu_valido_Restock return ;sub Menu_validate_spot sub Menu_validate_spot gosub Salva_Rune_Usate set %menu_valido_Spot #true if %RB_SpotMAX < 1 { set %menu_valido_Spot #False } else { for !f 1 %RB_SpotMAX { set !ru %RB_Rune . !f if 1 notin !ru { set %menu_valido_Spot #False } } } gosub GlobalVar_put %idscript menu_valido_Spot return ;sub Menu_validate_varie sub Menu_validate_varie set %menu_valido_VARIE #true menu getnum chkUSA_FIRE_BEETLE set %USA_FIRE_BEETLE #menures gosub GlobalVar_put %idscript USA_FIRE_BEETLE menu getnum chkAUTO_HEAL set %AUTO_HEAL #menures gosub GlobalVar_put %idscript AUTO_HEAL menu getnum chkAUTO_FUGA set %AUTO_FUGA #menures gosub GlobalVar_put %idscript AUTO_FUGA menu getnum chkAUTO_ESCLUDI set %AUTO_ESCLUDI #menures gosub GlobalVar_put %idscript AUTO_ESCLUDI menu getnum chkUSA_PROTECTION set %USA_PROTECTION #menures gosub GlobalVar_put %idscript USA_PROTECTION menu getnum chkUSA_TINKER set %USA_TINKER #menures gosub GlobalVar_put %idscript USA_TINKER menu getnum edtLIMITE_LINGOTTI if #menures > 0 && #menures < 7001 set !val #MenuRes else set !val 0 if !val <> %LIMITE_LINGOTTI { set %LIMITE_LINGOTTI !val gosub GlobalVar_put %idscript LIMITE_LINGOTTI } If %LIMITE_LINGOTTI < 1 || %LIMITE_LINGOTTI > 7000 set %menu_valido_VARIE #false menu getnum edtLIMITE_HP if ( #menures > 0 && #menures < 150 ) || #menures = MAX set !val #MenuRes else set !val 0 if !val <> %LIMITE_HP { set %LIMITE_HP !val gosub GlobalVar_put %idscript LIMITE_HP } If ( %LIMITE_HP < 1 || %LIMITE_HP > 150 ) && #menures <> MAX set %menu_valido_VARIE #false menu getnum edtFUGA_HP if ( #menures > 0 && #menures < 150 ) || #menures = MAX set !val #MenuRes else set !val 0 if !val <> %FUGA_HP { set %FUGA_HP !val gosub GlobalVar_put %idscript FUGA_HP } If ( %FUGA_HP < 1 || %FUGA_HP > 150 ) && #menures <> MAX set %menu_valido_VARIE #false menu getnum edtMyCharNum if #menures > 0 && #menures < 8 { set !val #MenuRes } else { set !val 0 set %menu_valido_VARIE #false } if !val <> %MyCharNum { set %MyCharNum !val gosub GlobalVar_put %idscript MyCharNum } menu getnum chkSospendi set %sospendi #menures gosub GlobalVar_put %idscript sospendi menu getnum edtsospendida set %sospendida #menures gosub GlobalVar_put %idscript sospendida menu getnum edtsospendia set %Sospendia #menures gosub GlobalVar_put %idscript Sospendia gosub GlobalVar_put %idscript menu_valido_VARIE return ;sub Prospector_ai sub Prospector_ai set !usa BOH if %usa_prospector = SEMPRE { set !usa #true } else { if %Filone_materiale > 0 && %Filone_materiale < 9 { if %OTTIMIZZA_ . %Filone_materiale { set !usa #false } else { set !vt %Filone_materiale + 1 if %OTTIMIZZA_ . !vt { set !usa #true } else { set !usa #false } } } if %Filone_materiale = 10 set !usa #false } if !usa = BOH return if !usa { gosub usa_prospector %dig1 %dig2 %dig3 %dig4 %dig5 ;usa prospector set %prospector_usato #result } set %prospector_dubbio #false return ;sub Restack_ores sub Restack_ores set !colfound _regroup: set !regrouped #true finditem %Type_small_ore C_ , #backpackid if #findcnt = 0 return for #findindex 1 #findcnt { if ( #findcol in !colfound && #findcol <> 0 ) || ( #findcol = 0 && iron in !colfound ) { exevent drag #findid #findstack wait %dragdelay exevent dropc #backpackid wait 2 set !regrouped #false break } if #findcol = 0 set !colfound !colfound , _ , iron else set !colfound !colfound , _ , #findcol set !findindex . #findcol #findid } if ! !regrouped { set !colfound goto _regroup } return ;sub Restock_tool sub Restock_tool if ! %USA_TINKER { gosub Set_Menu_Azione RESTOCK TOOL finditem %type_digitem c_ , #backpackid if #findcnt < 3 { set !tot_to_get 3 - #findcnt set !vtaked 0 for !vrt 1 !tot_to_get { if %bank_base = #true gosub Prendi_oggetto %type_digitem %chest_restock 2 BANK %chest_base else gosub Prendi_oggetto %type_digitem %chest_restock 2 if #result = #False break else set !vtaked !vtaked + 1 } if !tot_to_get = 3 && !vtaked = 0 display ok HAI FINITO I DIGITEM } } if %cont_prospector = N/A { set %cont_prospector 0 if %bank_base = #true set !dove C_ , %chest_base else set !dove G_2 gosub Open_Container %chest_prospector 5 820 480 !dove if #result { finditem %Type_prospector c_ , %chest_prospector if #findkind <> -1 { set %cont_prospector #findcnt menu set txtProspector %cont_prospector } } } if %usa_prospector <> MAI gosub Check_ProspectorTool if %usa_fire_beetle { finditem %type_food_fire_beetle c_ , #backpackid if #findkind = -1 { if %bank_base = #true gosub Prendi_oggetto %type_food_fire_beetle %chest_restock 1 BANK %chest_base else gosub Prendi_oggetto %type_food_fire_beetle %chest_restock 1 if ! #result { if %magia_usata = MAGER gosub create_food %type_food_fire_beetle %type_food EAT %chest_trash event ExMsg #CHARID 3 %menu_col_ko Non trovo pił cibo } } } return ;sub Salva_rune_usate sub Salva_rune_usate if %Menu_Vista_book = N/A set %Menu_Vista_book 1 if %Menu_Vista_book > %RB_SpotMAX set %Menu_Vista_book %RB_SpotMAX if %Menu_Vista_book <> 0 { set !v for !crune 1 16 { menu get chkRune . !crune if #menures set !v !v , 1 else set !v !v , 0 } if !v <> %RB_Rune . %Menu_Vista_book { set %RB_Rune . %Menu_Vista_book !v set !nvar RB_Rune , %Menu_Vista_book gosub GlobalVar_put %idscript !nvar } } return ;sub Set_shovel sub Set_shovel set_shovel_repeat: finditem %idshovel c_ , #backpackid if #findkind <> -1 return #true set_shovel_loop: findItem %Type_DigItem c_ , #backpackid if #findkind <> -1 { if #findcol <> 0 { event ExMsg #CHARID 3 33 Dig strano... Lo ignoro ignoreitem #findid goto set_shovel_repeat } set %idshovel #findid return #true } if %USA_TINKER { gosub Crea_Shovel if #result = #false return #false goto set_shovel_loop } return #false ;sub Set_ultime_variabili sub Set_ultime_variabili if #HITS = N/A gosub apri_gump_base gosub get_modifier_peso modweight set %time_start_script #scnt if %ritiro_subito set %timer_bod #scnt - 1 else set %timer_bod #scnt + 3600 if %FUGA_HP = MAX set %FUGA_HP #MAXHITS if %LIMITE_HP = MAX set %LIMITE_HP #MAXHITS set %usa_prospector AI set !r for !ciclo_mat 1 9 { if %OTTIMIZZA_ . !ciclo_mat set !r !r , T else set !r !r , F } if !r = TTTTTTTTT || !r = FTTTTTTTT set %usa_prospector SEMPRE if !r = FFFFFFFFF set %usa_prospector MAI if %usa_fire_beetle { gosub get_id_firebeetle set %ID_firebeetle #result gosub mount %ID_firebeetle %fbmtype set %next_food #scnt } return ;sub Sfama_pet sub Sfama_pet gosub unmount %fbmtype %id_firebeetle gosub find_pet %id_firebeetle finditem %type_food_fire_beetle c_ , #backpackid if #findkind = -1 return #false set !ji #jindex set #lobjectid #findid Exevent Drag #findid 1 gosub AntiBlock Exevent Dropc %id_firebeetle gosub AntiBlock gosub Wait_Journal_Speech 5 !ji YOUR_PET_LOOKS return #result return ;sub Smelta sub Smelta gosub Set_Menu_Azione SMELT ORE gosub restack_ores finditem %Type_forgia g_ , 2 if #findkind = -1 return #false set !id_forgia #findid smelta_ancora: gosub AntiBlock findItem %Type_ore c_ , #backpackid if #findkind = -1 { ignoreitem reset oretosmelt return #true } for #findindex 1 #findcnt { if #findtype notin %Type_small_ore || #findstack > 1 { set #lobjectid #findid event macro 17 TARGET 5s set #LTARGETID !id_forgia set #LTARGETKIND 1 event macro 22 0 wait 5 } else { ignoreitem #findid oretosmelt } } goto smelta_ancora return #true ;sub Smelta_fb sub Smelta_fb gosub Set_Menu_Azione SMELT ORE ON FIRE BEETLE set !last_message #result gosub restack_ores smelta_ancoraFB: gosub AntiBlock gosub find_pet %id_firebeetle findItem %Type_ore c_ , #backpackid if #findkind = -1 { ignoreitem reset oretosmelt gosub Set_Menu_Azione !last_message return #true } for #findindex 1 #findcnt { if #findtype notin %Type_small_ore || #findstack > 1 { set #lobjectid #findid event macro 17 TARGET 5s set #LTARGETID %ID_firebeetle set #LTARGETKIND 1 event macro 22 0 wait 5 } else { ignoreitem #findid oretosmelt } } goto smelta_ancoraFB return ;sub Specialcases sub Specialcases ;Marble Island Cave if %coordx >= 1983 && %coordx =< 1992 && %coordy >= 2059 && %coordy =< 2074 gosub CheckForCave ;Jhelom Fighting Pit if %coordx >= 1407 && %coordx =< 1421 && %coordy >= 3718 && %coordy =< 3758 gosub CheckForCave ;Buccaneer's Den set %bucsarea1 ( %coordx <= 2870 && %coordx >= 2607 && %coordy >= 2238 && %coordy <= 2295 ) && ( #charposz <= -20 ) set %bucsarea2 ( %coordx <= 2657 && %coordx >= 2591 && %coordy >= 2047 && %coordy <= 2238 ) && ( #charposz <= -20 ) set %bucsarea3 ( %coordx <= 2774 && %coordx >= 2657 && %coordy >= 2047 && %coordy <= 2102 ) && ( #charposz <= -20 ) if %bucsarea1 || %bucsarea2 || %bucsarea3 gosub CheckForCave ;non rock tiles that might have cave tiles if | , #tiletype , | in %cavesearch && #tilecnt > 1 gosub CheckForCave if %coordx >= 2569 && %coordx <= 2573 && %coordy >= 476 && %coordy <= 482 && %color <> %cave_color gosub checkForCave return ;sub Sposta_loot sub Sposta_loot gosub Set_Menu_Azione SPOSTO LOOT spostaancoraloot: finditem %item_to_loot c_ , #backpackid if #findkind <> -1 { set !sl_type #findtype set !sl_col #findcol set !sl_stack #findstack if #findtype in %Type_lingotti set !cassa %chest_minerali if #findtype in %gemme set !cassa %chest_jewel if #findtype in %Type_Sand set !cassa %chest_sabbia if #findtype in %Pietre { set !v chest_stone_ , %col_ . #findcol set !cassa % . !v } if %usa_tinker { if #findtype in %Type_lingotti && #findcol = 0 set !sl_stack !sl_stack - 40 } if !sl_stack > 0 { gosub sposta_item #findid !cassa !sl_stack gosub conta_oggetto_spostato !sl_type !sl_col !sl_stack } ignoreitem #findid spostaloot wait 15 goto spostaancoraloot } wait 10 ignoreitem reset spostaloot return ;sub Start_menu sub Start_menu gosub Menu_Init if %new_version gosub Menu_Set_Size 300 560 else gosub Menu_Set_Size 300 540 gosub Menu_Set_Intestazione %idscript Mino_ergo_sum Pepito_Settevite %versionscript gosub Menu_Add_Menu RESTOCK RESTOCK gosub Menu_Add_Menu SPOT SPOT gosub Menu_Add_Menu OTTIMIZZA OTTIMIZZA gosub Menu_Add_Menu VARIE VARIE gosub Menu_Add_Menu EXTRA EXTRA gosub GlobalValues_all %idscript #false ;giro bod if %CHOISE_GIROBOD_ID = SINGOLARE set %idBodscript %idscript , _BOD else set %idBodscript %bodscript gosub GlobalValues_all %idBodscript #false ;fine giro bod ;alarm if %CHOISE_ALARM_ID = SINGOLARE set %idAlarmscript %idscript , _ALARM else set %idAlarmscript %Alarmscript gosub GlobalValues_all %idAlarmscript #false set !v %idscript , _ALARM str Mid * . !v 1 1 if #strres <> _ set * . !v _ str Mid * . %Alarmscript 1 1 if #strres <> _ set * . %Alarmscript _ ;fine alarm gosub Menu_Crea menu show 970 0 gosub Menu_Loop return ;sub Torna_a_casa sub Torna_a_casa torna_a_casa_loop: gosub Torna_Posizione RESTOCK if #result = #false { goto torna_a_casa_loop } return #true ;sub Trova_filoni sub Trova_filoni set !p1 %1 gosub Set_Menu_Azione CERCO FILONI RUNA !p1 set !fminx #charposx - 1 set !fminy #charposy - 1 set !fmaxx #charposx + 1 set !fmaxy #charposy + 1 for !ffy !fminy !fmaxy { for !ffx !fminx !fmaxx { set !filonex !ffx / 8 set !filoney !ffy / 8 set !IDFilone !filonex , _ , !filoney if %idUnivoco = #false set !IDFilone !IDPosto , _ , !IDFilone if %Filone . !IDFilone = n/a { gosub check_mining_tile !ffx !ffy if #result { set %Spot_NFiloni . !p1 %Spot_NFiloni . !p1 + 1 set !var Spot_Filone , !p1 , _ , %Spot_NFiloni . !p1 set % . !var !IDFilone set %Filone . !IDFilone %coordx , | , %coordy , | , %coordz , | , #tiletype , | , %index set %Story . !IDFilone } } } } return ;sub Usa_prospector sub Usa_prospector set #ltargetkind %5 set #ltargetx %1 set #ltargety %2 set #ltargetz %3 set #ltargettile %4 set #targcurs 0 set !volte 0 findItem %Type_prospector c_ , #backpackid if #findkind = -1 return #false set #lobjectid #findid usa_prospector_loop: set !volte !volte + 1 set !err #scnt + 2 if !volte > 5 return #false set %dig_journal #JINDEX + 1 event macro 17 while #targcurs <> 1 { if #scnt > %error goto usa_prospector_loop wait 1 } event macro 22 set !err #scnt + 20 set %minerale_estratto 0 up_attendi_risposta_loop: gosub antiblock for !l %dig_journal #jindex { scanjournal !l if : notin !l { if TARGET_CANNOT in #journal { deletejournal return #false } if YOU_CANNOT_USE_YOUR in #journal { deletejournal return #false } if YOU_SIFT_THROUGH in #journal { gosub guarda_che_tipo #journal set %minerale_estratto #result deletejournal return #true } if THAT_ORE_LOOKS in #journal { deletejournal return #true } if YOU_CANNOT_IMPROVE in #journal { deletejournal return #false } } } if #scnt < !err goto up_attendi_risposta_loop return #false ;sub Vai_allo_spot sub Vai_allo_spot riprova_vas: gosub AntiBlock if %cont_runa > %Spot_Max { set %cont_cicli %cont_cicli + 1 Menu set txtCont_Cicli %cont_cicli set %cont_runa 1 } Menu set txtCont_Runa %cont_Runa Menu set txtSpot_Book %Spot_Book . %cont_runa gosub Set_Menu_Azione VAI LIBRO %Spot_Book . %cont_runa RUNA %cont_runa if %Spot_Valido . %cont_runa gosub Use_Runebook %Spot_Book . %cont_runa %Spot_Rune . %cont_runa %magia_usata if #result = #false { set %cont_runa %cont_runa + 1 goto riprova_vas } return ;################## CUSTOM SUB FINISH ###########################