set %idscript PEPITO_LUMBER set %versionscript 0.08 ;set %special_globalvar #charid ;commentare questa riga se si vuole valori globali gosub get_shard set %bodscript PEPITO_GIROBOD set %Alarmscript PEPITO_ALARM ;set * . %idscript ;decommentare per cancellare le impostazioni set #lpc 1000 gosub Initialize_Type 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 %usa_protection gosub Cast_Protection 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 restock_tool if %bank_base = #true gosub Apri_bank %chest_base gosub sposta_loot 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 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_Accettate . %cont_runa %Spot_Accettate . %cont_runa if #time >= %sospendida && #time <= %sospendia && %sospendi set #result TORNA_A_CASA if #result = TORNA_A_CASA goto MAIN_LOOP if #result = SPOT_FINITO { set %cont_runa %cont_runa + 1 goto VAI_SPOT_LOOP } display ok ERRORE $ qui non ci doveva arrivare $ FINE MAIN_LOOP halt ;################## 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.4 -> 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 set !alarm_jindex_esc #jindex 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 && : in #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 } } } } if #CHARGHOST { set %alarm_Type DEAD gosub alarm_start halt } 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.2 -> 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 %alarm_id Alarm_ignore_vendor return #false } set %alarm_Type PG return #true ;sub Alarm_start v 1.2 -> 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 } if %alarm_Type = DEAD { set !m LO , #spc , SCRIPT , #spc , VERRA , #spc , FERMATO gosub menu_modal_message R.I.P. !m MODE2 } return ;sub Antiblock v 1.7 -> p 0(1) -> d check_guards Timer_Event Save_Event Pause_Event (DEVONO_ESSERE_CUSTOM) sub Antiblock if %0 = 1 gosub Timer_event %1 else gosub Timer_Event NORMAL if #menubutton <> N/A { if #menubutton = butPAUSE { set #menubutton N/A gosub Pause_event } } set %maxpausa #scnt + 20 if %last_journal_read_save = N/A set %last_journal_read_save #jindex - 2 for !scan_index %last_journal_read_save #jindex { scanjournal !scan_index if : notin #journal { gosub check_guards if The_world_is_saving in #journal || Cleaning_resources in #journal { gosub Save_Event START aspettaskip: for !scan_index 10 1 { scanjournal !scan_index gosub check_guards 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.4 -> 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 5 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 5 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 5 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.1 -> 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 Bod_ensure_close_gump v 1.0 -> p 0 -> d Click_on_gump sub Bod_ensure_close_gump Bod_ensure_close_gump_loop: if #CONTNAME = generic_gump && #CONTSIZE = 615_454 { gosub Click_on_gump 385 430 wait 20 } if #CONTNAME = generic_gump && #CONTSIZE = 615_454 { wait 1s goto Bod_ensure_close_gump_loop } return ;sub Bodbook_get_num_bod v 1.1 -> p 0(1) -> GetProperty sub Bodbook_get_num_bod if %0 = 1 gosub GetProperty %1 set !cwic_prop #result str pos !cwic_prop book: set !v #strres + 5 str del !cwic_prop 1 !v set !cwic_prop #strres str pos !cwic_prop $ set !v #strres str del !cwic_prop !v 1000 return #strres ;sub Cast_protection v 1.0 -> p 0 -> d Set_menu_mex sub Cast_protection chooseSkill Mager if #SKILL < 50 { event exmsg #charid 3 %menu_col_ko NON HO LA MAGERY NECESSARIA PER CARTARMI PROTECTION return } gosub Set_menu_mex CAST PROTECTION loopcastprot: set !wait_try 0 if #AR = N/A gosub apri_gump_base set !actar #AR ricastprot: set !jicp #JINDEX + 1 event macro 15 14 waitcastprot: set !wait_try !wait_try + 1 wait 50 for !jscp !jicp #JINDEX { scanjournal !jscp if You_have_not_yet_recovered in #journal || the_speel_fizzles in #journal { wait 50 DELETEJOURNAL goto ricastprot } } if #ar > !actar { event exmsg #charid 3 %menu_col_i MI SA CHE ERO PRIMA IN PROTECTION... wait 10 goto loopcastprot } if #ar < !actar { return } if !wait_try < 10 { event exmsg #charid 3 %menu_col_i NON RIESCO A CAPIRE SE HO CASTATO BENE PROTECTION... goto waitcastprot } return ;sub Check_doors v 1.0 -> p 1 -> d Finditemnearest sub Check_doors set !id_checkdoor %1 ;id per costruire le var necessarie event sysMessage Find door... gosub Finditemnearest %type_doors g_10 if #findkind = -1 { set %check_doors_ . !id_checkdoor #false } else { set %check_doors_ . !id_checkdoor #true set %doorID_ . !id_checkdoor #findid set %doorType_ . !id_checkdoor #findtype set %doorX_ . !id_checkdoor #findx set %doorY_ . !id_checkdoor #findy set %doorZ_ . !id_checkdoor #findz } return ;sub Check_guards v 1.0 -> p 0 -> d 0 sub Check_guards if guards in #journal { if under_the_protection in #journal { if %under_guards <> #true { set %under_guards #true menu set txtUnder_Guards UNDER GUARDS } } if left_the_protection in #journal { if %under_guards <> #false { set %under_guards #false menu set txtUnder_Guards #spc } } } return ;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 Checkconnection v 1.7 -> 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 wait 5 set !cl_x #contposx + 120 set !cl_y #contposy + 130 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 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.2 -> p 2 -> d waitForSysVars 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 waitForSysVars CONTKIND in MCGC_UEJB 5 ;GoSub Wait_Gump normal_gump 5 if #RESULT = #false goto cpvm_pop wait 5 set !addy 2 + 18 * !v_button if !add_y < 30 { set #CONTPOSY 40 } gosub Click_On_Gump 22 !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 Crea_spot_rune v 1.0 -> p 0 -> d 0 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 Create_food v 1.2 -> 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 GROUND if %0 = 4 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 5 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 gosub antiblock wait 5 goto risolvi_crea_food } gosub sposta_item #findid !dest_skip #findstack wait 10 gosub antiblock goto risolvi_crea_food return ;sub Debug_display v 1.0 -> p 1(x) -> d Menu_Crea_Type_Box sub Debug_display set !mex %1 if %0 > 1 { for !vs_for 2 %0 set !mex !mex , #spc , % . !vs_for } set !w_menu %w_menu_tot + 150 if %debug set !w_menu !w_menu + 105 if %debug_is_visible = N/A { Menu Window size !w_menu %h_menu set !yb 0 set !xb !w_menu - 149 set !wb 148 set !hb %h_menu menu font color AQUA gosub Menu_Crea_Type_Box !xb !yb !wb !hb DEBUG DEBUG INFO set %index_debug_info 0 set %debug_is_visible #true } menu font color red menu font size 5 menu font bgcolor $290B2B set %index_debug_info %index_debug_info + 1 set !yb 15 + 10 * %index_debug_info set !xb !w_menu - 144 menu text txt !xb !yb !mex return ;sub Dress_weapon v 1.2 -> p 1 -> d AntiBlock sub Dress_weapon set !a %1 ;id weapon if %exist_ . !a = N/A { finditem !a if #findkind = -1 set %exist_ . !a #false else set %exist_ . !a #true } if ! %exist_ . !a return #false dress_weapon_loop: finditem %type_hand_object c_ , #charid if #findkind <> -1 { if #findid = !a return #true Exevent Drag #findid gosub AntiBlock NO_ALARM_EVENT Exevent Dropc #backpackid wait 10 } else { Exevent Drag !a 1 gosub AntiBlock NO_ALARM_EVENT Exevent Droppd wait 20 } goto dress_weapon_loop return #true ;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 Finditemnearest v 1.0 -> p 2 -> d 0 sub Finditemnearest set !fin_index 0 set !fin_dist 100 finditem %1 %2 for #findindex 1 #findcnt { if #finddist < !fin_dist { if #finddist = 1 return set !fin_index #findindex set !fin_dist #finddist } } if !fin_index <> 0 set #findindex !fin_index return ;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_crea_elenco_bobook v 1.3 -> p 0 -> d AntiBlock GB_VAI Open_Container Bodbook_Get_Num_Bod sub Gb_crea_elenco_bobook if %type_bod_book = N/A set %type_bod_book DYM if %color_bod_smith = N/A set %color_bod_smith 1102 set %gb_try_open_chest 0 set %gb_bb_tailor_max 0 set %gb_bb_black_max 0 set %gb_bb_tailor_act 1 set %gb_bb_black_act 1 set %gb_bb_list _ set %gb_bb_list_black _ set %gb_bb_list_tailor _ if %GIROBOD_FILLBOOK <> #true goto gb_crea_elenco_bobook_esc set %GIROBOD_FILLBOOK_tailor #true set %GIROBOD_FILLBOOK_black #true gb_crea_elenco_bobook_p1: gosub Open_Container %gb_chest 5 if #result = #false { event sysMessage Non riesco ad aprire la Chest dei Bod con id %gb_chest nella sub Gb_crea_elenco_bobook set %gb_try_open_chest %gb_try_open_chest + 1 if %gb_try_open_chest > 5 { gosub GB_VAI LOGOUT #true set %gb_try_open_chest 0 } goto gb_crea_elenco_bobook_p1 } gosub antiblock finditem %type_bod_book c_ , %gb_chest for #findindex 1 #findcnt { gosub GetProperty #findid set !p #result gosub Bodbook_Get_Num_Bod if #result < 500 { if TAILOR in !p { set %gb_bb_tailor_max %gb_bb_tailor_max + 1 set %gb_bb_tailor_ . %gb_bb_tailor_max #findid set %gb_bb_list_tailor %gb_bb_list_tailor , #findid , _ } if SMITH in !p || BLACK in !p { set %gb_bb_black_max %gb_bb_black_max + 1 set %gb_bb_black_ . %gb_bb_black_max #findid set %gb_bb_list_black %gb_bb_list_black , #findid , _ } set %gb_bb_list %gb_bb_list , #findid , _ } } for #findindex 1 #findcnt { gosub GetProperty #findid set !p #result gosub Bodbook_Get_Num_Bod if #result < 500 { if BLACK notin !p && SMITH notin !p && #findid notin %gb_bb_list_tailor { set %gb_bb_tailor_max %gb_bb_tailor_max + 1 set %gb_bb_tailor_ . %gb_bb_tailor_max #findid set %gb_bb_list %gb_bb_list , #findid , _ } if TAILOR notin !p && #findid notin %gb_bb_list_black { set %gb_bb_black_max %gb_bb_black_max + 1 set %gb_bb_black_ . %gb_bb_black_max #findid set %gb_bb_list %gb_bb_list , #findid , _ } } } event sysMessage Trovato %gb_bb_Tailor_max BodBook per Bod Tailor da riempire. event sysMessage Trovato %gb_bb_black_max BodBook per Bod Black da riempire. gb_crea_elenco_bobook_esc: if %gb_bb_tailor_max = 0 set %GIROBOD_FILLBOOK_tailor #false if %gb_bb_black_max = 0 set %GIROBOD_FILLBOOK_black #false if %gb_bb_tailor_max = 0 && %gb_bb_black_max = 0 { event sysMessage Non riempio Bodbook con i bod del Giro Bod. set %GIROBOD_FILLBOOK #False } return ;sub Gb_get_bod v 1.4 -> p 1 -> d crea_lista_vendor GB_GET_NEW_BOD_POPUP sub Gb_get_bod set !gb_vendortype %1 set !gb_avvicinati #true if %0 = 2 set !gb_avvicinati %2 set !gb_retry 0 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 guildm vlist_ if #result = 0 { if !gb_retry < 5 { wait 1s set !gb_retry !gb_retry + 1 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 !gb_avvicinati if #result break } } return ;sub Gb_get_new_bod_popup v 1.1 -> 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 set !gb_avvicinati #true if %0 = 2 set !gb_avvicinati %2 gb_gnbp_start: if !gb_avvicinati gosub avvicinati_vendor !gb_vendor_id if #result = #false return #false set !gb_gnbp_journal #jindex gosub Click_popup_vendor_menu !gb_vendor_id %gb_menu_index_getbod 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.5 -> 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 %GiroBod_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 && %GiroBod_RAIL = #false { gosub Get_Book_From_Name %RB_LOGOUT if #result = #false 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.1 -> 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 { if #CONTNAME <> paperdoll_gump goto gb_logout_init 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.3 -> p 1 -> d Gb_make_runebook Gb_make_rail sub Gb_make set !gb_pg %1 gosub GB_GetVal !gb_pg if %GiroBod_RAIL { event sysmessage Giro Bod Rail gosub Gb_make_rail !gb_pg } else { event sysmessage Giro Bod Rune Book gosub Gb_make_runebook !gb_pg } return ;sub Gb_make_rail v 1.0 -> p 1 -> d 0 sub Gb_make_rail set !gb_pg %1 if !gb_pg <> %MyCharNum { gosub GB_Logout gosub Log_In !gb_pg gosub Apri_Gump_base NOPOSITION } finditem %typebod c_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { ignoreitem #findid gb_bod } } gosub GB_GetVal !gb_pg while #weight = N/A { gosub Apri_Gump_base NOPOSITION wait 10 } if #WEIGHT < #MAXWEIGHT && ( %GB_CHOISE = BOTH || %GB_CHOISE = TAILOR ) { gosub PathFind_nearly 977 526 -30 2 gosub GB_GET_BOD TAILOR #false } if #WEIGHT < #MAXWEIGHT && ( %GB_CHOISE = BOTH || %GB_CHOISE = BLACKSMITH ) { gosub PathFind_nearly 977 513 -30 2 gosub GB_GET_BOD BLACKSMITH #false } Gb_make_rail_logout: gosub PathFind 987 520 -30 2 if #result = #false goto Gb_make_rail_logout ignoreitem reset gb_bod return ;sub Gb_make_runebook v 1.0 -> p 1 -> d GB_Logout Log_In Apri_Gump_base GB_GetVal GB_VAI GB_GET_BOD sub Gb_make_runebook 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 while #weight = N/A { gosub Apri_Gump_base NOPOSITION wait 10 } if #WEIGHT < #MAXWEIGHT && ( %GB_CHOISE = BOTH || %GB_CHOISE = TAILOR ) { gosub GB_VAI TAILOR #false gosub GB_GET_BOD TAILOR } if #WEIGHT < #MAXWEIGHT && ( %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.7 -> p 0 -> d gb_crea_elenco_bobook Bod_ensure_close_gump sposta_item Gb_sposta_bod_in_book sub Gb_sposta_bod ;var necessarie %type_bod (type dei bod) %gb_chest /chest in cui sposatrli) if %gb_sposta_bod_first_time <> #false { gosub gb_crea_elenco_bobook set %gb_sposta_bod_first_time #false } else { if %GIROBOD_FILLBOOK = #true gosub Open_Container %gb_chest 5 } gb_sposta_bod_loop: finditem %type_bod c if #findkind = -1 goto gb_sposta_bod_esc if #FINDBAGID <> #backpackid && #FINDBAGID <> %gb_chest { ignoreitem #findid gb_bod goto gb_sposta_bod_loop } ;guarda se fabbro o sarto set !bod_supertype TAILOR if #findcol = %color_bod_smith set !bod_supertype BLACK if %GIROBOD_FILLBOOK = #true && %GIROBOD_FILLBOOK_ . !bod_supertype { gosub Gb_sposta_bod_in_book #findid !bod_supertype if #result = #false { event sysMessage Non ci sono più Bod Book da riempire per il !bod_supertype set %GIROBOD_FILLBOOK_ . !bod_supertype #false if %GIROBOD_FILLBOOK_tailor = #false && %GIROBOD_FILLBOOK_black = #false { event sysMessage Non ci sono più Bod Book da riempire set %GIROBOD_FILLBOOK #false } } } else { 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 } else { if #FINDBAGID = %gb_chest ignoreitem #findid } } wait 10 goto gb_sposta_bod_loop gb_sposta_bod_esc: gosub Bod_ensure_close_gump gb_sposta_bod_movebook: finditem %gb_bb_list c_ , #backpackid if #findkind = -1 return gosub sposta_item #findid %gb_chest 1 wait 10 goto gb_sposta_bod_movebook return ;sub Gb_sposta_bod_in_book v 1.3 -> p 0 -> d Apri_gump_base GB_VAI Bod_ensure_close_gump sposta_item Open_Container Bodbook_Get_Num_Bod sub Gb_sposta_bod_in_book set !bod_to_move %1 set !bod_supertype %2 set !gsbib_try 0 Gb_sposta_bod_in_book_1: set !var1 gb_bb_ , !bod_supertype , _act set !var2 gb_bb_ , !bod_supertype , _max set !var3 gb_bb_ , !bod_supertype , _ , % . !var1 set !id % . !var3 finditem !id c if #FINDKIND = -1 { set !gsbib_try !gsbib_try + 1 event sysMessage Non trovo il Bodbook con id !id if !gsbib_try > 5 { set !gsbib_try 0 gosub Apri_gump_base gosub GB_VAI LOGOUT #true } gosub Open_Container %gb_chest 5 goto Gb_sposta_bod_in_book_1 } gosub Bodbook_Get_Num_Bod !id if #result >= 500 { set % . !var1 % . !var1 + 1 if % . !var1 > % . !var2 { event sysMessage Ho finito i BodBook dove posso mettere i Bod !bod_supertype return #false } } if #FINDBAGID <> #backpackid { gosub sposta_item !id #backpackid 1 wait 10 goto Gb_sposta_bod_in_book_1 } Gb_sposta_bod_in_book_2: gosub sposta_item !bod_to_move !id 1 wait 10 return #true return ;sub Gb_start v 1.2 -> 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 { set %gb_last_pg_used %GB_LIst . !c gosub GB_Make %GB_LIst . !c } } if %gb_last_pg_used <> %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.1 -> 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 } if %type_rune_book = N/A set %type_rune_book ZBN gbfn_loop: finditem %type_rune_book 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_id_pack_beetle v 1.0 -> p 1 -> d 0 sub Get_id_pack_beetle set !id_b %1 set !tr_ipb 0 find_gipb: finditem !id_b g_1 if #findkind = -1 { gosub find_pet !id_b goto find_gipb } open_gipb: set !tr_ipb !tr_ipb + 1 gosub Click_popup_vendor_menu !id_b 11 gosub waitForSysVars contname = container_gump conttype = ZJF CONTID <> #backpackid 5 if ! #result { if !tr_ipb < 5 goto find_gipb return #false } return #contid ;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 Get_shard v 1.0 -> p 0 -> d 0 sub Get_shard set %shard_ID UNKNOW if uodreams in #SHARD { set %shard_ID UODREAMS set %shard_globalvar N/A } if demise in #SHARD { set %shard_ID DEMISE set %shard_globalvar DEMISE } if %shard_ID = UNKNOW event sysmessage Shard non riconosciuto. Valori di Deafault. else event sysmessage Impostazioni Shard %shard_ID return ;sub Get_trash v 1.1 -> p 0 -> d Get_Trash_Nearest sub Get_trash ;return finded in %chest_trash set !NO_HALT N/A set %chest_trash N/A if %0 = 1 set !NO_HALT %1 gosub Get_trash_Nearest 2 if #result = #false { if !NO_HALT = NO_HALT return display ok NESSUN TRASH BARREL TROVATO $ SCRIPT FERMATO halt } set %chest_trash #findid return ;sub Get_trash_nearest v 1.1 -> p 1 -> d 0 sub Get_trash_nearest set !distance %1 ;range find if %type_trash = N/A set %type_trash JKF_BKF_IIF_ finditem %type_trash g_ , !distance if #findkind = -1 return #false return #findid ;sub Get_weight_in_container v 1.0 -> p 1 -> GetProperty sub Get_weight_in_container gosub GetProperty %1 set !cwic_prop #result str pos !cwic_prop weight: set !v #strres + 7 str del !cwic_prop 1 !v set !cwic_prop #strres str pos !cwic_prop stone set !v #strres str del !cwic_prop !v 1000 return #strres ;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 Globalvalues_all v 1.2 -> p 1 -> d 0 sub Globalvalues_all ;%1 nome_global_var di solito id_script if %shard_globalvar <> N/A set %1 %1 , %shard_globalvar if %special_globalvar <> N/A && %1 = %idscript set %1 %1 , %special_globalvar 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.2 -> p 2 -> d 0 sub Globalvar_del ;%1 nome_global_var di solito id_script, %2 nomevar da cancellare if %shard_globalvar <> N/A set %1 %1 , %shard_globalvar if %special_globalvar <> N/A && %1 = %idscript set %1 %1 , %special_globalvar 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.2 -> p 2 -> d 0 sub Globalvar_get ;%1 nome_global_var di solito id_script, %2 nomevar da caricare if %shard_globalvar <> N/A set %1 %1 , %shard_globalvar if %special_globalvar <> N/A && %1 = %idscript set %1 %1 , %special_globalvar 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.2 -> p 2 -> d 0 sub Globalvar_put ;%1 nome_global_var di solito id_script, %2 nomevar da salvare if %shard_globalvar <> N/A set %1 %1 , %shard_globalvar if %special_globalvar <> N/A && %1 = %idscript set %1 %1 , %special_globalvar 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.3 -> 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 in AAG_CHCD { 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 in GXJC_UYLB { 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 || #contkind = AAWB ) { 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.1 -> p 1 -> d 0 sub Menu_add_menu set !id %1 ;label menu set !label %2 ;label menu if %0 > 2 { for !vs_for 3 %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.2 -> 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 mnuRectIntestazione !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 menu font bgcolor $333333 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 mnuRectNewVersion !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 mnuRectBoxPulsanti !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 mnuRectMex1 !x_box !y_box !w_box !h_box 4 7 1 gray 7 $333333 Menu Shape mnuRectMex2 !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 font bgcolor $550000 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 font bgcolor $333333 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 menu font bgcolor $000000 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.1 -> 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 mnuRectcb1 . #random %1 %2 %3 %4 3 7 1 gray 7 $002222 Menu Shape mnuRectcb2 . #random %1 %2 %3 13 3 7 1 gray 7 $004444 set !y_mcb %2 + 1 set !x_mcb %1 + 10 menu font bgcolor $004444 menu text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_crea_box_loot_equip v 1.3 -> p 5(x) -> d Menu_Crea_Box_Multi_Value sub Menu_crea_box_loot_equip ;%1 %2 %3 set !y_mcb %2 set !x_mcb %1 set !w_mcb %3 menu font size 7 Menu Shape mnuRect1 !x_mcb !y_mcb !w_mcb 70 3 7 1 gray 7 $002222 Menu Shape mnuRect1 !x_mcb !y_mcb !w_mcb 16 3 7 1 gray 7 $004444 set !yt !y_mcb + 1 set !xt !x_mcb + 10 set !wt 15 menu font bgcolor $004444 if %Loot_equip = N/A set %Loot_equip #true Menu Check chkloot_equip !xt !yt !wt 13 %Loot_equip set !yt !y_mcb + 2 set !xt !x_mcb + 28 menu font color yellow menu text txt !xt !yt LOOT EQUIP menu font color silver set !yt !y_mcb + 3 set !xt !x_mcb + 103 menu font size 5 menu text txt !xt !yt SE IL VALORE È MAGGIORE DI menu font color yellow set !yt !y_mcb set !xt !x_mcb + 210 set !wt 30 menu edit edtasses_pass_value !xt !yt !wt %asses_pass_value menu font bgcolor $227722 menu font color white set !xt !x_mcb + 251 menu button butAsses_Check !xt !yt 35 16 CHECK menu font size 5 menu font color silver set !yt !y_mcb + 19 set !xt !x_mcb + 70 menu font bgcolor $002222 menu text txt !xt !yt MOLTIPLICATORI PROPRIETA EQUIP IN % set !xbmv !x_mcb + 10 set !ybmv !y_mcb + 29 set !wbmv !w_mcb - 20 set !hbmv 20 gosub Menu_Crea_Box_Multi_Value !xbmv !ybmv !wbmv !hbmv ASSES menu font size 5 menu font color silver set !yt !y_mcb + 50 set !xt !x_mcb + 12 menu font bgcolor $002222 menu text txt !xt !yt VALORI ALTI AUMENTANO IL PESO DELLA PROP NEL CALCOLARE IL VALORE set !yt !y_mcb + 58 set !xt !x_mcb + 13 menu text txt !xt !yt DELL' OGGETTO COMPLESSIVO. SPECIFICA I TUOI SLAYER IN SLAYERCHECK return ;sub Menu_crea_box_multi_value v 1.0 -> p 5(x) -> d Menu_display_box_multi_value sub Menu_crea_box_multi_value ;%1 %2 %3, %4, %5 id set !x_cbmv %1 set !y_cbmv %2 set !w_cbmv %3 set !h_cbmv %4 set !id_cbmv %5 ;coordinate set !lbl multivalue_ , !id_cbmv , _x set % . !lbl !x_cbmv set !lbl multivalue_ , !id_cbmv , _y set % . !lbl !y_cbmv set !lbl multivalue_ , !id_cbmv , _w set % . !lbl !w_cbmv set !lbl multivalue_ , !id_cbmv , _h set % . !lbl !h_cbmv ;garbage set !lbl_garbage multivalue_ , !id_cbmv , _garbage set % . !lbl_garbage gosub Menu_display_Box_Multi_Value !id_cbmv return ;sub Menu_crea_check_box v 1.2 -> 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 mnuRectccb1 . #random %1 %2 %3 %4 3 7 1 gray 7 $002222 Menu Shape mnuRectccb2 . #random %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 font bgcolor $004444 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.3 -> p 8(11) -> 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 set !xadd_linea 185 set !col_linea white if %0 >= 9 && %9 <> N/A set !fz %9 ;size font if %0 >= 10 && %10 <> N/A set !xadd_linea %10 ;x dei valori if %0 >= 11 && %11 <> N/A set !col_linea %11 ;colore bottoni menu font size !fz menu font color silver menu font bgcolor $002222 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 !col_linea if %CHOISE_ . !id_linea notin %CHOISES_ . !id_linea set %CHOISE_ . !id_linea !sel_linea set !x !x_linea + !xadd_linea menu text txtChoise_ . !id_linea !x !y %CHOISE_ . !id_linea menu font bgcolor $111111 set !fz !fz - 1 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_bag v 1.1 -> p 5(7) -> d 0 sub Menu_crea_linea_bag set !x_linea %1 set !y_linea %2 set !w_linea %3 set !o_linea %4 set !id_linea %5 set !fz 7 if %0 = 6 set !fz %6 ;size font if %0 = 7 set !fz %7 ;size font menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 menu font bgcolor $002222 menu text txt !x !y BAG !id_Linea if !o_linea = #true menu font color yellow set !x !x_linea + 185 menu text txtBag_ . !id_linea !x !y %Bag_ . !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 butBag_ . !id_Linea !xt !yt 22 !ht SET if !o_linea = #false { set !xt !x_linea + !w_linea - 15 menu button butResetBag_ . !id_Linea !xt !yt 13 !ht x } return ;sub Menu_crea_linea_chest v 1.3 -> 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 menu font bgcolor $002222 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 menu font bgcolor $002222 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.3 -> 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 menu font bgcolor $002222 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 set !fz !fz - 1 menu font size !fz 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.3 -> 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 menu font bgcolor $002222 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 !fz - 1 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.4 -> 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 set !mctb_h 13 menu font size 7 if %5 = DEBUG { set !mctb1_b $290B2B set !mctb1_f $86088A set !mctb2_b $5B0B54 set !mctb2_f $86088A set !mctb_t white Menu Shape mnuRectdeb1 . #random %1 %2 %3 %4 3 7 1 !mctb1_f 7 !mctb1_b Menu Shape mnuRectdeb2 . #random %1 %2 %3 !mctb_h 3 7 1 !mctb2_f 7 !mctb2_b set !y_mcb %2 + 1 set !x_mcb %1 + 10 menu font color !mctb_t menu font bgcolor !mctb2_b menu text txt !x_mcb !y_mcb !l_mcb } if %5 = RADAR { set !mctb2_b $000000 set !mctb2_f gray set !mctb_t gray Menu Shape mnuRectrad . #random %1 %2 %3 %4 3 7 1 !mctb2_f 7 !mctb2_b set !y_mcb %2 + 1 set !x_mcb %3 / 2 - 10 menu font size 6 menu font color !mctb_t menu font bgcolor !mctb2_b menu text txt !x_mcb !y_mcb !l_mcb } if %5 = SUB { set !mctb1_b $001111 set !mctb2_b $191919 set !mctb_t gray menu font size 6 set !mctb_h 12 Menu Shape mnuRectctb1 . #random %1 %2 %3 %4 3 7 1 !mctb1_f 7 !mctb1_b Menu Shape mnuRectctb2 . #random %1 %2 %3 !mctb_h 3 7 1 !mctb2_f 7 !mctb2_b set !y_mcb %2 + 1 set !x_mcb %1 + 10 menu font bgcolor !mctb2_b menu font color !mctb_t menu text txt !x_mcb !y_mcb !l_mcb } return ;sub Menu_display_box_multi_value v 1.2 -> p 5(x) -> d 0 sub Menu_display_box_multi_value set !id_le %1 set !max_le multivalue_ , !id_le , _max set !i_le multivalue_ , !id_le , _index if % . !i_le = N/A set % . !i_le 1 if %0 = 2 && %2 <> SAVE { set % . !i_le % . !i_le + %2 if % . !i_le < 1 set % . !i_le % . !max_le if % . !i_le > % . !max_le set % . !i_le 1 } set !linea_le multivalue_ , !id_le , _ , % . !i_le set !garbage_le multivalue_ , !id_le , _garbage if %0 = 2 && %2 = SAVE { gosub Split_to_Array % . !linea_le | sr if %sr3 = 1 { ;gosub GlobalVar_put %idscript %sr2 } if %sr3 = 2 { menu get edtMultivalue_ , !id_le set % . %sr2 #menures gosub GlobalVar_put %idscript %sr2 } return } ;pulisci gosub Split_to_Array % . !garbage_le | garbage set !garbage_max #result if !garbage_max > 0 { for !i 1 !garbage_max { str len %garbage . !i if #strres > 1 { menu delete %garbage . !i } } } set % . !garbage_le _ ;coordinate set !lbl_mcb multivalue_ , !id_le , _x set !x_le % . !lbl_mcb set !lbl_mcb multivalue_ , !id_le , _y set !y_le % . !lbl_mcb set !lbl_mcb multivalue_ , !id_le , _w set !w_le % . !lbl_mcb set !lbl_mcb multivalue_ , !id_le , _h set !h_le % . !lbl_mcb gosub Split_to_Array % . !linea_le | sr menu font size 5 Menu Font Style b menu font color silver set !lbl_mcb mnurectle1_ , !id_le set !wt_le !w_le / 2 Menu Shape !lbl_mcb !x_le !y_le !wt_le !h_le 3 7 1 gray 7 $222222 set % . !garbage_le | , !lbl_mcb , % . !garbage_le menu font bgcolor $222222 set !xt_le !x_le + 1 set !yt_le !y_le + 1 set !ht_le !h_le - 2 set !lbl_mcb butMultiValueMove_sx_ , !id_le Menu button !lbl_mcb !xt_le !yt_le 15 !ht_le < set % . !garbage_le | , !lbl_mcb , % . !garbage_le set !xt_le !x_le + !w_le / 2 - 12 set !lbl_mcb butMultiValueMove_dx_ , !id_le Menu button !lbl_mcb !xt_le !yt_le 15 !ht_le > set % . !garbage_le | , !lbl_mcb , % . !garbage_le menu font bgcolor $002222 set !xt_le !x_le + 18 set !yt_le !y_le + 6 menu font color white set !lbl_mcb mnutxtle1_ , !id_le Menu text !lbl_mcb !xt_le !yt_le %sr1 set % . !garbage_le | , !lbl_mcb , % . !garbage_le menu font bgcolor $000000 if %sr3 = 1 { set !lbl_mcb mnurectle2_ , !id_le set !wt_le !w_le / 2 set !xt_le !x_le + !w_le / 2 Menu Shape !lbl_mcb !xt_le !y_le !wt_le !h_le 3 7 1 gray 7 $000000 set % . !garbage_le | , !lbl_mcb , % . !garbage_le set !xt_le !x_le + !w_le / 2 + !w_le / 4 - 5 set !yt_le !y_le + 5 set !lbl_mcb txtMultivalue_ , %sr2 Menu text !lbl_mcb !xt_le !yt_le % . %sr2 set % . !garbage_le | , !lbl_mcb , % . !garbage_le menu font color white set !xt_le !x_le + !w_le - 15 set !yt_le !y_le + 1 set !ht_le !h_le / 2 set !lbl_mcb butMultiValueChangeup_ , %sr2 Menu button !lbl_mcb !xt_le !yt_le 15 !ht_le ^ set % . !garbage_le | , !lbl_mcb , % . !garbage_le set !yt_le !y_le + !h_le / 2 set !lbl_mcb butMultiValueChangedown_ , %sr2 Menu button !lbl_mcb !xt_le !yt_le 15 !ht_le - set % . !garbage_le | , !lbl_mcb , % . !garbage_le return } if %sr3 = 2 { set !lbl_mcb mnurectle2_ , !id_le set !wt_le !w_le / 2 set !xt_le !x_le + !w_le / 2 Menu Shape !lbl_mcb !xt_le !y_le !wt_le !h_le 3 7 1 gray 7 $000000 set % . !garbage_le | , !lbl_mcb , % . !garbage_le menu font bgcolor $000000 set !xt_le !x_le + !w_le / 2 + 3 set !yt_le !y_le + 1 set !wt_le !w_le / 2 - 2 set !lbl_mcb edtMultivalue_ , !id_le menu font size 6 menu edit !lbl_mcb !xt_le !yt_le !wt_le % . %sr2 set % . !garbage_le | , !lbl_mcb , % . !garbage_le return } display ok Valore Box_Multi_Value sbagliato return ;sub Menu_get_auto_book v 1.0 -> p 1 -> d Get_Book_From_Name GlobalVar_put 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_giro_bod_crea_box v 1.3 -> 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 menu font bgcolor $002222 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 if %GIROBOD_FILLBOOK = N/A set %GIROBOD_FILLBOOK #false menu font size 6 set !x !xb + 15 set !y !y + 22 Menu Check chkGIROBOD_FILLBOOK !x !y 12 12 %GIROBOD_FILLBOOK set !x !x + 14 set !y !y + 2 menu text txtFillBook !x !y RIEMPI I BOD BOOK NELLA CHEST DEI BOD CON I BOD PRESI return } menu font color Silver menu font size 5 set !x !wp - 117 set !y !yp + 2 menu font bgcolor $002222 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 font bgcolor $002222 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 menu font size 6 menu font bgcolor $002222 menu text txt !x !y DATI RUNEBOOK PUNTO LOGOUT/RESTOCK: menu font size 5 set !y !y + 15 set !x !xb + 5 set !t RAIL , #spc , DA , #spc , ESEGUIRE gosub Menu_Crea_Choise !x !y !w #false GBRAIL_ID LUNA LUNA !t 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 font bgcolor $002222 ;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 font bgcolor $002222 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 font bgcolor $002222 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 font bgcolor $002222 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 font bgcolor $002222 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 font bgcolor $002222 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 menu font bgcolor $002222 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.3 -> p 0 -> d 0 sub Menu_giro_bod_validate_box if %sel_menu_giro_bod > 7 { gosub GlobalVar_put %idBodscript Choise_GiroBod_Script menu get edtGiroBod_Script set %GiroBod_FileScript #menures gosub GlobalVar_put %idBodscript GiroBod_FileScript menu get chkGIROBOD_FILLBOOK set %GIROBOD_FILLBOOK #menures gosub GlobalVar_put %idBodscript GIROBOD_FILLBOOK } 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 %GiroBod_RAIL = #False { if %posX_RESTOCK_BOD = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } 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 #true 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.2 -> 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 font bgcolor $000055 menu text alarm_TITLE !alarm_x !alarm_y !title set %alarm_control %alarm_control , alarm_TITLE| Menu font size 8 Menu Font Color white menu font bgcolor $000033 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_bag v 1.0 -> p 1 -> d Set_Menu_Mex targetta_oggetto sub Menu_set_bag set !pID %1 set !pCont %2 set !pNameCont %3 event exmsg #charid 3 %menu_col_i Targhetta un Sacchetto per !pID if !pCont = #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 !pNameCont $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid C_ , !pCont if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! } else { return !oggid } return N/A } return N/A ;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_object v 1.1 -> p 1 -> d 0 sub Menu_set_object set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 event exmsg #charid 3 %menu_col_i Targhetta Object !pID if !pWHERE = C { if !p3 = #backpackid gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVE ESSERE NELLO ZAINO else gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVE ESSERE NEL CONTENITORE %4 } if !pWHERE = D { gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVE ESSERE NELLO ZAINO O INDOSSATO } if !pWHERE = G { gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVI ESSERE NELLA POSIZIONE %4 } if !pWHERE = A { gosub Set_Menu_Mex CLICCA SU UN OGGETTO } gosub targetta_oggetto set !oggid #result if !oggid <> N/A { if !pWHERE = A { finditem !oggid 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 = D { finditem !oggid C_ , #backpackid if #findkind = -1 { finditem !oggid C_ , #charid if #findkind = -1 event exmsg #charid 3 %menu_col_ko Deve essere o nello Zaino o indossato else return !oggid } 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_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_backpack_beetle v 1.0 -> p 2 -> d find_pet antiblock sub Open_backpack_beetle set !obb_pet %1 set !obb_cont %2 while #contid <> !obb_cont { gosub find_pet !obb_pet if #result = #false return #result gosub antiblock set #lobjectid !obb_cont event macro 17 1 wait 10 } return #true ;sub Open_container v 1.7 -> p 1(4) -> d antiblock sub Open_container set !Contenitore_oc %1 set !tentativi_max_oc #scnt + 5 set !move #false ;%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 >= 2 set !tentativi_max_oc #scnt + %2 if %0 > 3 && %3 <> N/A { set #NEXTCPOSX %3 set #NEXTCPOSY %4 set !posx %3 set !posy %4 set !move #true } set !oc_dove g_2 if %0 = 5 { if %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 gosub antiblock gosub waitForSysVars CONTID = !Contenitore_oc 5 if ! #result goto oc_open_contenitore if !move { set #contposx !posx set #contposy !posy } return #true ;sub Open_door v 1.0 -> p 1 -> d Pathfind_nearly sub Open_door set !id_door %1 ;id per costruire le var necessarie gosub Pathfind_nearly %doorX_ . !id_door %doorY_ . !id_door %doorZ_ . !id_door 1 if #result = #false return #false finditem %doorType_ . !id_door g_1 if #findkind = -1 return #true set #lobjectid %doorID_ . !id_door set !jstart #jindex event macro 17 0 for !i !jstart #jindex { scanjournal !i if YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS in #journal || THAT_IS_LOCKED in #journal return #false } wait 5 return #true ;sub Pathfind v 2.5 -> p 3(4) -> d AntiBlock sub Pathfind set !pf_vx %1 set !pf_vy %2 set !pf_vz %3 set %pathfind_error N/A if %0 = 4 set !pf_max_try %4 else set !pf_max_try 10 if %0 = 5 set !pf_we %5 else set !pf_we 1 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 { set %pathfind_error TIME return #false } event PathFind !pf_vx !pf_vy !pf_vz set !pf_error #scnt + !pf_we 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 set %pathfind_error IMPOSSIBLE 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 Pathfind_nearly v 1.1 -> p 4(6) -> d AntiBlock sub Pathfind_nearly set !pf_vx %1 set !pf_vy %2 set !pf_vz %3 set !pf_tollerance %4 if %0 = 5 set !pf_max_try %5 else set !pf_max_try 10 if %0 = 6 set !pf_we %6 else set !pf_we 1 set !pf_inizioj #JINDEX + 1 set !pf_try 0 if abs ( #CHARPOSX - !pf_vx ) <= !pf_tollerance && abs ( #CHARPOSY - !pf_vy ) <= !pf_tollerance { goto pfn_fattopathfind } pfn_riprovapathfind: if !pf_try > !pf_max_try { return #false } event PathFind !pf_vx !pf_vy !pf_vz set !pf_error #scnt + !pf_we pfn_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 abs ( #CHARPOSX - !pf_vx ) <= !pf_tollerance && abs ( #CHARPOSY - !pf_vy ) <= !pf_tollerance { goto pfn_fattopathfind } if #scnt > !pf_error { gosub AntiBlock NO_ALARM_EVENT set !pf_try !pf_try + 1 goto pfn_riprovapathfind } goto pfn_attendipathfind pfn_fattopathfind: return #true ;sub Pause_event v 1.0 -> p 0 -> d sub Pause_event set !val_pause_event Script , #spc , in , #spc , pausa. gosub menu_modal_message PAUSA !val_pause_event MODE2 set %ALARM_JINDEX #jindex + 1 set %last_journal_read_save #jindex + 1 event sysmessage Fine pausa. return ;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 Prendi_stack_oggetto v 1.4 -> p 3(6) -> d antiblock apri_bank sub Prendi_stack_oggetto set !Oggetto %1 set !Contenitore %2 set !Quantita %3 set !Colore #false set !usa_bank #false set !cont_da_aprire #true if %0 = 4 { set !Colore #true set !col_val %4 } if %0 = 5 && %5 = BANK { set !usa_bank #true set !bankid %6 } if %0 = 5 && %5 = NOFINDCONT { set !cont_da_aprire #false } set !q !quantita set #NEXTCPOSX 820 set #NEXTCPOSY 480 goto pso_get_item pso_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 pso_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 pso_apri_contenitore set !cont_da_aprire #false pso_get_item: finditem !Oggetto c_ , !Contenitore if #findkind = -1 { if !cont_da_aprire goto pso_find_contenitore else return #false } for #FINDINDEX 1 #FINDCNT { if !Colore = #false || !col_val = #findcol { set !t #findstack if !t > !q set !t !q Exevent Drag #findID !t gosub antiblock NO_ALARM_EVENT Exevent Dropc #BACKPACKID gosub antiblock wait 10 set !q !q - !t if !q <= 0 break } } if !q <= 0 return #true return #false ;sub Replace v 1.3 -> p 2(3) -> d Split_to_Array sub Replace ;return #strRes str pos %1 %2 ;1 stringa in cui fare il replace 2 string da cercare if #strres = 0 set #strres %1 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 Salva_rune_usate v 1.0 -> p 0 -> d GlobalVar_put 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 Save_event v 1.2 -> 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 Menu Shape shpSaveB 1 1 !w_menu %h_menu 3 7 2 gray 4 $555555 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 || %1 = FINE { Menu delete shpSave Menu delete txtSave menu delete shpSaveB } 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.2 -> 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 if !si_tar = GROUND Exevent Dropg #charposx #charposy #charposz else Exevent Dropc !si_tar return ;sub Targetta_oggetto v 1.3 -> p 0 -> d 0 sub Targetta_oggetto set #lTargetID N/A set #targCurs 1 set #lTargetKind 1 While #targCurs = 1 { onHotKey ESC set #targCurs 0 wait 1 } if #lTargetID = YC return N/A 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.5 -> p 1(2) -> d open_door check_doors 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 if _ , !id_position , _ notin _RESTOCK_LOGOUT_ set %check_doors_ . !id_position #false 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 if %check_doors_ . !id_position = #true { gosub open_door !id_position } tp_pathfind: gosub PathFind %posX_ . !id_position %posY_ . !id_position %posZ_ . !id_position if #result = #false { if %check_doors_ . !id_position <> #false { if %check_doors_ . !id_position = N/A gosub check_doors !id_position if %check_doors_ . !id_position = #true { gosub open_door !id_position if #result = #false { ignoreitem %doorID_ . !id_position set %check_doors_ . !id_position N/A } goto tp_pathfind } } 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.6 -> 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 set !ur_recall_again 0 ur_recallopenagain: set !ur_recall_again !ur_recall_again + 1 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 { if !ur_recall_again > 5 { display ok !ur_bookid set %id_error GENERIC return #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 : in #journal { if More_reagents in #journal || the_spell_fizzles in #journal { wait 10 DELETEJOURNAL goto ur_recallopenagain } if insufficient_mana_for in #journal { wait 90 DELETEJOURNAL goto ur_recallopenagain } } if : notin #journal { if You_have_not_yet_recovered 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.1 -> 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 !id %3 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.1 -> 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 !id %3 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 ;sub Waitforsysvars v 1.0 -> p x -> d 0 sub Waitforsysvars ;this sub is made by Boydon ;a 3 a 3 di cui 1 nome var sys 2 valutazione 3 valore , se in più ultimo valore timeout set !cnt %0 / 3 if ( %0 % 3 = 1 ) set !timeOut #scnt + % . %0 else set !timeOut #scnt + 5 for !i 1 !cnt { set !offset 3 * !i - 2 set !evaluation !offset + 1 set !value !offset + 2 if ! ( # . % . !offset % . !evaluation % . !value ) set !i 0 if #scnt > !timeout return #false } return #true ;################## GENERIC SUB FINISH ########################## ;################## CUSTOM SUB START ############################ ;sub Attendi_risposta sub Attendi_risposta set !p1 %1 set !err #scnt + 20 set %legno_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_USE in #journal { deletejournal return SBAGLIATO } if YOUR_BACKPACK_IS_FULL in #journal { deletejournal return TORNA_A_CASA } if THERE'S_NOT_ENOUGH in #journal { deletejournal return FINITO } if YOU_HACK_AT_THE_TREE in #journal || { deletejournal return RIPETI } if YOU_CHOP_SOME in #journal { gosub guarda_che_tipo #journal set %legno_estratto #result deletejournal return RIPETI } } } if #scnt < !err goto attendi_risposta_loop return SBAGLIATO ;sub Begin_spot sub Begin_spot set %char_spot_x #CHARPOSX set %char_spot_Y #CHARPOSY if %cont_runa <> %old_runa { set %tree_act 1 set %tree_old 0 ;nuovo spot gosub scan_spot_clear ;se da scoprire if %Spot_NTree . %cont_runa = 0 { gosub trova_tree %cont_runa %range_find_tree if %Spot_NTree . %cont_runa = 0 { menu set txtSpot_NTree . %cont_runa X set %Spot_Valido . %cont_runa #FALSE return SPOT_FINITO } } set !t %Spot_NTree . %cont_runa - %Spot_NERROR . %cont_runa menu set txtSpot_NTree . %cont_runa !t ;display gosub scan_spot_display %cont_runa set %old_runa %cont_runa } set !tree_da_raggiungere #True gosub set_hatchet bs_init_tree: if %tree_Act > %Spot_NTree . %cont_runa return SPOT_FINITO set !txt [ , %tree_Act , ] gosub Set_Menu_Azione CHOPPING SPOT %cont_runa TREE %tree_Act set !var Spot_tree , %cont_runa , _ , %tree_Act set !IDtree % . !var if !check %check_tree . !IDtree = ERROR { set %Tree_act %tree_act + 1 set !tree_da_raggiungere #True goto bs_init_tree } menu set txtTree_ . %tree_Act !txt gosub Split_to_Array %tree . !IDtree | chop if %tree_Act <> %tree_old { set %Tree_materiale 0 set %tree_old %tree_act } if !tree_da_raggiungere { gosub Pathfind_Nearly %chop1 %chop2 %chop3 1 if ! #result { event exmsg #charid 3 %menu_col_ko Tree n %tree_act non raggiungibile! set %Tree_act %tree_act + 1 goto bs_init_tree } event exmsg #charid 3 %menu_col_ok Tree n %tree_act raggiunto! set !tree_da_raggiungere #False } set !cont_false_target 0 bs_tree_loop: gosub check_hp if #result <> OK { if #result = FUGA { gosub fuggi return TORNA_A_CASA } if #result = CURA { gosub heal gosub set_hatchet } } gosub check_peso if #result = #false { gosub crea_board gosub check_peso 100 if #result = #false { if %usa_beetle gosub SPOSTA_SUL_BEETLE if #result = #false return TORNA_A_CASA } } if #result = #false return TORNA_A_CASA set %tree_journal #JINDEX + 1 gosub Dai_Choppata %idhatchet %chop1 %chop2 %chop3 %chop4 %chop5 ;da la choppata if #result = #false ;se false cancella la hatchet e riprova { set %idhatchet N/A goto bs_tree_loop } if #targcurs = 1 { set !cont_false_target !cont_false_target + 1 if !cont_false_target < 3 { event exmsg #charid 3 %menu_col_i riprovo a targhettarlo goto bs_tree_loop } } set !cont_false_target 0 set %Spot_Accettate . %cont_runa %Spot_Accettate . %cont_runa + 1 gosub Attendi_Risposta %tree_journal if #result = RIPETI { goto bs_tree_loop } if #result = FINITO || #result = SBAGLIATO { if %check_tree . !IDtree = N/A { if #result = SBAGLIATO { set %check_tree . !IDtree ERROR set %Spot_NERROR . %cont_runa %Spot_NERROR . %cont_runa + 1 set !t %Spot_NTree . %cont_runa - %Spot_NERROR . %cont_runa gosub debug_display Tree -> %TileID . !IDtree event sysmessage Tree Error: %TileID . !IDtree menu set txtSpot_NTree . %cont_runa !t } else set %check_tree . !IDtree OK gosub display_one_tree %tree_Act %chop1 %chop2 %check_tree . !IDtree %char_spot_x %char_spot_y } menu set txtTree_ . %tree_Act %tree_Act set %Tree_act %tree_act + 1 set !tree_da_raggiungere #True goto bs_init_tree } 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 %under_guards = #true { if #HITS < ( #MAXHITS - 10 ) && #scnt > %last_guards { msg HELP! GUARDS $ set %last_guards #scnt + 1 } } if #HITS < %FUGA_HP && %AUTO_FUGA return FUGA if #HITS < %LIMITE_HP && %AUTO_HEAL return CURA return OK ;sub Check_tree_tile sub Check_tree_tile set %coordx %1 set %coordy %2 set !result_check_tree_tile #false set !i 0 tile cnt %coordx %coordy for !i 1 #tilecnt { tile get %coordx %coordy !i set !tiletype | , #tiletype , | if !tiletype in %choppable { set %tiletype #tiletype set %index 3 set %coordz #tilez set !i #tilecnt set !result_check_tree_tile #true } } } return !result_check_tree_tile ;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_Boards ) { set %cont_b . !cos_col %cont_b . !cos_col + !cos_stack set %nome_menu txtb , !cos_col Menu set %nome_menu %cont_b . !cos_col } if ( !cos_type in %Type_Logs ) { set %cont_l . !cos_col %cont_l . !cos_col + !cos_stack set %nome_menu txtl , !cos_col Menu set %nome_menu %cont_l . !cos_col } if ( !cos_type in %Type_Resource ) { set %cont_ . !cos_type %cont_ . !cos_type + !cos_stack Menu set txt . !cos_type %cont_ . !cos_type } return ;sub Crea_board sub Crea_board gosub Set_Menu_Azione CREO BOARD gosub set_hatchet cb_findlog: finditem %type_logs c_ , #backpackid if #findkind = -1 goto cb_exit set !logid #findid set #LOBJECTID %idhatchet set #ltargetid !logid set #targCurs 1 set #lTargetKind 1 event macro 17 wait 5 gosub AntiBlock target 1s event macro 22 wait 10 goto cb_findlog cb_exit: return ;sub Crea_lista_item_e_container sub Crea_lista_item_e_container if %chest_boards = N/A set %chest_boards %chest_base if %chest_jewel = N/A set %chest_jewel %chest_base if %chest_resource = N/A set %chest_resource %chest_base if %chest_food = N/A set %chest_food %chest_base return ;sub Crea_menu_avviato sub Crea_menu_avviato set !lpc #lpc set #lpc 1000 set %h_menu 360 set %w_menu 200 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_materiali 57 set !y_jewel 57 set !Y_move %h_menu - 63 set !y_spot 57 set !y_stato %h_menu - 13 set %y_infospot 149 set %h_infospot 146 set %w_infospot %w_menu - 10 set %X_infospot 5 set %d_infospot 4 ;Intestazione set !xb 2 set !yb !y_intestazione set !wb %w_menu_tot - 4 set !hb 50 Menu Shape mnuRectintestazione !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 menu font bgcolor $333333 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 $333333 for !r 1 %spot_max { ;spot set !x2 !x - 2 set !w2 !w_spot - 3 Menu Shape mnuRectSpot . !r !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 + 10 menu font color silver menu text txtSpot_Materiale . !r !x2 !y2 TREE set !x2 !x + 36 menu font color white if %Spot_NTree . !r = N/A { set %Spot_NTree . !r 0 set %Spot_NERROR . !r 0 } menu text txtSpot_NTree . !r !x2 !y2 %Spot_NTree . !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_Accettate . !r = N/A set %Spot_Accettate . !r 0 menu text txtSpot_Accettate . !r !x2 !y2 %Spot_Accettate . !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 } } ;materiali set !yb !y_materiali set !xb 5 set !wb %w_menu - 80 menu font color white gosub Menu_Crea_Box !xb !yb !wb 90 MATERIALI menu font bgcolor $002222 menu font color gray menu font size 6 set !x !xb + 40 set !y !yb + 15 menu text txt !x !y LOGS set !x !xb + 75 menu text txt !x !y BOARDS menu font color silver set !x !xb + 5 set !y !y + 9 menu text txt !x !y NORMAL set !y !y + 9 menu text txt !x !y OAK set !y !y + 9 menu text txt !x !y ASH set !y !y + 9 menu text txt !x !y YEW set !y !y + 9 menu text txt !x !y HEART set !y !y + 9 menu text txt !x !y BLOOD set !y !y + 9 menu text txt !x !y FROST menu font color White set !x !xb + 50 set !y !yb + 24 Menu Text txtl . %normal_col !x !y %cont_l . %normal_col set !y !y + 9 Menu Text txtl . %oak_col !x !y %cont_l . %oak_col set !y !y + 9 Menu Text txtl . %ash_col !x !y %cont_l . %ash_col set !y !y + 9 Menu Text txtl . %yew_col !x !y %cont_l . %yew_col set !y !y + 9 Menu Text txtl . %heartwood_col !x !y %cont_l . %heartwood_col set !y !y + 9 Menu Text txtl . %bloodwood_col !x !y %cont_l . %bloodwood_col set !y !y + 9 Menu Text txtl . %frostwood_col !x !y %cont_l . %frostwood_col set !x !xb + 85 set !y !yb + 24 Menu Text txtb . %normal_col !x !y %cont_b . %normal_col set !y !y + 9 Menu Text txtb . %oak_col !x !y %cont_b . %oak_col set !y !y + 9 Menu Text txtb . %ash_col !x !y %cont_b . %ash_col set !y !y + 9 Menu Text txtb . %yew_col !x !y %cont_b . %yew_col set !y !y + 9 Menu Text txtb . %heartwood_col !x !y %cont_b . %heartwood_col set !y !y + 9 Menu Text txtb . %bloodwood_col !x !y %cont_b . %bloodwood_col set !y !y + 9 Menu Text txtb . %frostwood_col !x !y %cont_b . %frostwood_col ;fine materiali ;jewel set !yb !y_jewel set !xb %w_menu - 76 set !wb 71 menu font color white gosub Menu_Crea_Box !xb !yb !wb 90 ALTRO menu font color Silver menu font size 6 menu font bgcolor $002222 set !x !xb + 5 set !y !yb + 24 menu text txt !x !y FUNGI set !y !y + 9 menu text txt !x !y BARK set !y !y + 9 menu text txt !x !y SWITCH set !y !y + 9 menu text txt !x !y PARSTIC set !y !y + 9 menu text txt !x !y BRLLANT menu font size 5 menu font color Aqua set !y !y + 18 menu text txtUnder_Guards !x !y menu font color white menu font size 6 set !x !xb + 50 set !y !yb + 24 menu text txt . %Type_fungi !x !y %cont_ . %Type_fungi set !y !y + 9 menu text txt . %Type_bark !x !y %cont_ . %Type_bark set !y !y + 9 menu text txt . %Type_Switch !x !y %cont_ . %Type_Switch set !y !y + 9 menu text txt . %Type_Parasitic !x !y %cont_ . %Type_Parasitic set !y !y + 9 menu text txt . %Type_Brilliant !x !y %cont_ . %Type_Brilliant ;fine jewel ;info_spot set !yb !y_move set !xb 5 set !wb %w_menu - 10 menu font color white gosub Menu_Crea_Type_Box %X_infospot %y_infospot %w_infospot %h_infospot RADAR RADAR set !x ( %x_infospot + %w_infospot / 2 ) set !y ( %y_infospot + %h_infospot / 2 ) menu font color $222222 menu font size 4 menu text txtTree_0 !x !y x ;info_spot ;move set !yb !y_move set !xb 5 set !wb %w_menu - 10 menu font color white gosub Menu_Crea_Box !xb !yb !wb 47 INFO menu font size 6 if %usa_beetle { menu font bgcolor $004444 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_beetle } menu font color Silver menu font bgcolor $002222 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 !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 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 menu font color WHITE 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 txtConnLost !x !y %cont_connLost set !y !y + 9 menu text txtCont_Cicli !x !y %cont_cicli menu font name Tahoma ;stato Menu Font Color white Menu Font Style b Menu font size 6 menu font bgcolor $000000 set !x 25 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 60 Menu Font Color yellow menu text txtAzione !x !y CREA MENU set !x %w_menu_tot - 30 menu text txtBODTIME !x !y set !x 5 set !y !y_stato - 1 menu font bgcolor $004444 Menu Font Color white Menu Font Style b Menu font size 4 menu button butPAUSE !x !y 18 12 l l ;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_BOARD !x !y !w 17 CREA BOARD 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 CAST_PROTECTION !x !y !w 17 CAST PROTECTION 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 Dai_choppata sub Dai_choppata 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_choppata_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 { gosub Set_hatchet set #lobjectid %idhatchet goto dai_choppata_loop } wait 1 } event macro 22 return #true ;sub Display_one_tree sub Display_one_tree if %0 > 4 { set !charx %5 set !chary %6 } else { set !charx #charposx set !chary #charposy } set !x ( %2 - !charx ) * %d_infospot + ( %x_infospot + %w_infospot / 2 ) - ( %3 - !chary ) * %d_infospot set !y ( %3 - !chary ) * %d_infospot + ( %y_infospot + %h_infospot / 2 ) + ( %2 - !charx ) * %d_infospot if %1 <= %scan_tree_max menu delete txtTree_ . %1 if %4 = OK menu font color green else { if %4 = ERROR menu font color red else menu font color gray } menu font size 5 menu font bgcolor $000000 menu text txtTree_ . %1 !x !y %1 return ;sub Display_one_tree_from_string sub Display_one_tree_from_string set !i %1 set !check %check_tree . %2 gosub Split_to_Array %tree . %2 | chop gosub display_one_tree !i %chop1 %chop2 !check return ;sub Fuggi sub Fuggi if %auto_escludi set %Spot_Valido . %cont_runa #FALSE return ;sub Get_id_beetle sub Get_id_beetle ;lo cerca prima addosso set !ffgib #true rifindbm: finditem %type_beetle_mounted C_ , #CHARID if #findkind <> -1 { set #lobjectid #charid event macro 17 0 wait 20 goto rifindbm } ;in terra rifindb: finditem %type_Beetle G_1 if #findkind = -1 { ;se non lo trova a terra nell'arco di 1 lo cerca nello schermo finditem %type_Beetle G_10 if #findkind = -1 { if !ffgib { set !ffgib #false gosub Apri_gump_base goto rifindbm } ;se non lo trova a terra nell'arco di 10 interrompe display ok Nessun Beetle trovato halt } else { msg all follow me $ wait 1s goto rifindb } } return #findid ;sub Guarda_che_tipo sub Guarda_che_tipo set !pj %1 if ordinary in !pj return 1 if oak in !pj return 2 if ash in !pj return 3 if yew in !pj return 4 if heartwood in !pj return 5 if bloodwood in !pj return 6 if frostwood in !pj return 7 return 1 ;sub Initialize_type sub Initialize_type ;alarm set %Type_PG IS_HS_XU_AV_ ;fine alarm ;girobod set %Type_NPC %Type_PG set %type_bod EYM set %gb_menu_index_getbod 4 ;fine giro bod set %Type_toolkits KTL_GTL_ set %Type_toolkit KTL set %Type_lingotti ENK_ set %Type_fungi XWS set %Type_bark NWS set %Type_Brilliant FXS set %Type_Switch BWR set %Type_Parasitic YWS set %Type_Hatchet FSF set %Type_Logs ZLK_ set %Type_boards TLK_ set %Type_Resource_Jewel FXS_ set %Type_Resource_Other XWS_NWS_BWR_YWS_ set %type_Resource %Type_Resource_Jewel , %Type_Resource_Other set %type_beetle ZGB_ set %type_beetle_mounted IWX_ set %type_food_beetle VRD_YRD_FUD_HQD_AQD_ set %type_food %type_food_beetle , QQD_HND_PQD_PRD_BND_SQD_ ;colori minerali set %normal_col 0 set %oak_col 2010 set %ash_col 1191 set %yew_col 1192 set %heartwood_col 1193 set %bloodwood_col 1194 set %frostwood_col 1151 ;weapon ;WEAPON TYPES============================================================= SET %sword YPO_BNF_CPH_INF_FSF_OSF_ASF_HNF_FMH_CNF_LSF_NSF_ISF_SMH_RMH_CSF_ZRF_MPH_LPH_MSF_BSF_KPO_GUO_KTF_JTF_BPH_EPH_ZSF_ATF_JPH_SOH_POH_NMH_OMH_LPO_ZTO_XTH_YTH_HSF_KSF_NPO_XPO_FUO_JPO_QPF_NPF_KPH_FYG_RHM_SFR_ SET %fencing SRH_AQF_PPF_TSF_WSF_BUO_VPO_WPO_WRH_VRH_XRH_YRH_LTF_MTF_OPO_RRH_CUO_ SET %mace OLH_JOH_URH_EMH_WTH_DMH_QMH_CFF_BFF_PMH_GMH_ZPF_CQF_FFF_RPF_TRH_YSF_XSF_FBG_VTH_AUH_ZTH_UOH_VOH_AUO_MPO_BUH_CUH_DMH_GFF_QOH_HFF_TLH_GBG_ SET %bow WOH_TOH_QPO_SPO_WOH_TOH_JSF_USF_LMH_MMH_QPO_SPO_PPO_RPO_JSF_USF_LMH_MMH_PPO_RPO_JSF_ ;Samurai Empire Weapons--- SET %se_sword CSF_ZRF_MPH_LPH_MSF_BSF_KPO_GUO_KTF_JTF_BPH_EPH_ZSF_ATF_JPH_SOH_POH_NMH_OMH_LPO_ZTO_XTH_YTH_HSF_KSF_NPO_XPO_FUO_JPO_QPF_NPF_KPH_FYG_RHM_JDP_EDP_YCP_KDP_ SET %se_fencing LDP_HDP_ZCP_FDP_ SET %se_mace DDP_ADP_IDP_ SET %se_bow XCP_ ;Mondain's Legacy Weapons--- SET %ml_sword RFR_NFR_SFR_OFR_EFR_YFR_XFR_DFR_ SET %ml_fencing KFR_GFR_LFR_HFR_IFR_MFR_FFR_JFR_ SET %ml_mace VFR_BFR_WFR_CFR_ SET %ml_bow VER_PFR_wer_QFR_ SET %weapon %sword , %fencing , %mace , %bow , %se_sword , %se_fencing , %se_mace , %se_bow , %ml_sword , %ml_fencing , %ml_mace , %ml_bow set %Type_book YXM_MPF_QON_XXM_SPN_ set %type_hand_object %weapon , %Type_book ;doors set %type_doors ZPC_BQC_NQC_TQC_VQC_FJC_HJC_HQC_JQC_XMC_ZMC_WBD_YBD_FNC_HNC_LAM_ +NNC_CDD_SCD_BDD_RCD_LNC_SMC_PMC_PNC_HOC_KOC_JOC_EOC_UCD_TCD_KCD_ +JCD_WCD_VCD_QCD_PCD_DOC_NJC_QJC_VFD_BFD_IBD_YFD_IHD_HBD_CBD_ +FBD_IBD_TJC_OJC_NJC_QJC_TMC_WMC_BNC_ENC_HMC_KMC_IHB_HHB_QMC_VMC_ +FPC_IPC_TOC_WOC_FH_GH_UG_TG_ZZL_CAM_HAM_KAM_XOC_RJC_MBD_WED_UED_ +IH_HH_IFD_HFD_GFD_FFD_PCR_OXS_ ;tile ;set %choppable |3274|3275|3276|3277|3278|3279|3280|3281|3282|3283|3284|3285|3286| ;+3287|3288|3289|3290|3291|3292|3293|3294|3295|3296|3297|3298|3299| ;+3300|3301|3302|3304|3320|3321|3322|3323|3324|3325|3326|3327|3328| ;+3329|3330|3331|3393|3394|3395|3396|3397|3398|3399|3400|3401|3402| ;+3403|3404|3405|3406|3407|3408|3409|3410|3411|3415|3416|3417|3418| ;+3419|3420|3421|3422|3423|3424|3425|3426|3427|3428|3429|3430|3431| ;+3432|3433|3438|3439|3440|3441|3442|3443|3444|3445|3446|3447|3448| ;+3449|3450|3451|3452|3453|3454|3455|3460|3461|3462|3463|3464|3465| ;+3466|3467|3468|3469|3470|3471|3472|3477|3478|3479|3481|3482|3483| ;+3485|3486|3487|3489|3490|3491|3493|3494|3495|3497|3498|3499|4789| ;+4790|4791|4792|4793|4794|4795|4796|4797|4798|4799|4801|4802|4803| ;+4804|4805|4806|4807|8781|8778|3496|8780|8779|3230|3220|3221|3222| ;+3492|3484|3488|3480| set %choppable |3274|3275|3276|3277|3278|3280|3281|3283|3284|3286|3287|3288| +3289|3290|3291|3293|3294|3296|3297|3299|3300|3302|3417|3461| if %shard_id = DEMISE gosub Initialize_type_DEMISE return ;sub Initialize_type_demise sub Initialize_type_demise ;girobod set %gb_menu_index_getbod 2 return ;sub Inizializza_contatori sub Inizializza_contatori ;log set %cont_l . %normal_col 0 set %cont_l . %oak_col 0 set %cont_l . %ash_col 0 set %cont_l . %yew_col 0 set %cont_l . %heartwood_col 0 set %cont_l . %bloodwood_col 0 set %cont_l . %frostwood_col 0 ;boards set %cont_b . %normal_col 0 set %cont_b . %oak_col 0 set %cont_b . %ash_col 0 set %cont_b . %yew_col 0 set %cont_b . %heartwood_col 0 set %cont_b . %bloodwood_col 0 set %cont_b . %frostwood_col 0 ;resource set %cont_ . %Type_fungi 0 set %cont_ . %Type_bark 0 set %cont_ . %Type_Brilliant 0 set %cont_ . %Type_Switch 0 set %cont_ . %Type_Parasitic 0 ;varie set %cont_cicli 0 set %cont_runa 1 set %cont_Bod 0 set %cont_connLost 0 ;varie set %cont_cicli 0 set %cont_Bod 0 set %cont_connLost 0 return ;sub Inizializza_variabili sub Inizializza_variabili ;redirect from color set %col_ . %normal_col NORMAL set %col_ . %oak_col OAK set %col_ . %ash_col ASH set %col_ . %yew_col YEW set %col_ . %heartwood_col HEART set %col_ . %bloodwood_col BLOOD set %col_ . %frostwood_col FROST ;one_letter_material set %material_0 ? set %material_1 N set %material_2 O set %material_3 A set %material_4 Y set %material_5 H set %material_6 B set %material_7 F ;valori per tools set %Nome_ . %Type_toolkit TINKER_TOOL set %Voce_ . %Type_toolkit 3 set %Index_ . %Type_toolkit 4 set %Resource_ . %Type_toolkit 2 set %Type_Material . %Type_toolkit %Type_lingotti set %Nome_ . %Type_hatchet HATCHET set %Voce_ . %Type_hatchet 3 set %Index_ . %Type_hatchet 5 set %Resource_ . %Type_hatchet 4 set %Type_Material . %Type_hatchet %Type_lingotti ;varie set %scan_tree_max 0 set %last_guards #scnt ;loot set %item_to_loot %Type_boards , %Type_logs , %Type_Resource_Jewel , %Type_Resource_Other ;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 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 = TEST_ALARM { set #MENUBUTTON N/A gosub Alarm_Check gosub set_menu_azione DEBUG LOOP } if #menubutton = butPAUSE { set #menubutton N/A gosub Pause_event } 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 = 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 = VAI_SPOT { set #MENUBUTTON N/A gosub Vai_allo_spot event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #MENUBUTTON = CAST_PROTECTION { set #MENUBUTTON N/A gosub Cast_Protection 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 gosub set_menu_azione DEBUG LOOP } if #menubutton = TORNA_A_CASA { set #MENUBUTTON N/A gosub Torna_a_Casa if #result { gosub restock_tool gosub sposta_loot event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 NON RIESCO } gosub set_menu_azione DEBUG LOOP } if #menubutton = CREA_BOARD { set #MENUBUTTON N/A gosub Crea_board event ExMsg #CHARID 3 40 #result gosub set_menu_azione DEBUG LOOP } if #menubutton = CREA_FOOD { set #MENUBUTTON N/A if %magia_usata = mager { if %chest_trash = N/A gosub get_trash NO_HALT if %chest_trash <> N/A gosub create_food %type_food_beetle %type_food TRASH %chest_trash else gosub create_food %type_food_beetle %type_food EAT event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 DOVREI ESSERE MAGO } gosub set_menu_azione DEBUG LOOP } if #menubutton = SFAMA_PET { set #MENUBUTTON N/A if %usa_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 BEETLE } gosub set_menu_azione DEBUG LOOP } 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 55 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 menu font bgcolor $002222 set !y !y + 16 set !x !xb + 30 menu text txt !x !y MAGIA menu font color white set !x !xb + 105 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 BEETLE set !x !xb + 105 if %USA_BEETLE { 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 LIBRI menu font color white set !x !xb + 105 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 { 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 mnuRectasd1 !x !y !w 45 3 7 1 gray 7 $111133 Menu Shape mnuRectasd2 !x !y !w 13 4 7 1 gray 7 $000055 set !y !y + 1 set !x !xb + 90 menu font bgcolor $000055 menu text txt !x !y AVVIO NON POSSIBILE set !x !xb + 33 menu font color silver set !y !y + 16 menu font bgcolor $111133 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_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 94 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 BOARD 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 RESOURCE 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False FOOD 6 menu font size 6 set !y !y + 15 set !x !xb + 43 menu font bgcolor $002222 menu text txt !x !y UNA CHEST NON SETTATA VALE COME CHEST BASE 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 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 font bgcolor $002222 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 bgcolor $002222 menu font color Green menu text txt !x !y -> } menu font bgcolor $002222 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_LUMBER !x !y 125 15 AUTO ADD BOOK 'LUMBER' 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 font bgcolor $002222 menu text txt !xt !yt SCEGLI LE RUNE USATE NEL LIBRO set !yt !yt + 10 set !xt !x + 7 gosub getproperty %RB_Spot . %Menu_Vista_book gosub Split_to_Array #result $ bprop set !bmax #result if !bmax > 3 set !bname %bprop4 else set !bname SENZA NOME menu text txt !xt !yt !bname - ID: %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_Box !x !y !w 52 AUTODIFESA menu font size 6 set !x !xb + 15 set !y !y + 18 menu font bgcolor $002222 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 + 57 set !x !xb + 5 set !w !wb - 10 menu font color Yellow gosub Menu_Crea_Box !x !y !w 62 VARIE set !x !xb + 13 set !y !y + 19 menu font bgcolor $002222 menu font color Silver menu font size 6 if %USA_BEETLE = N/A set %USA_BEETLE #false Menu Check chkUSA_BEETLE !x !y 140 15 %USA_BEETLE USA BEETLE set !y !y + 20 menu text txt !x !y AMPIEZZA RAGGIO UTILIZZATO PER RICERCA ALBERI menu font color Yellow menu font size 7 set !x !xb + 258 set !y !y - 4 if %RANGE_FIND_TREE = N/A set %RANGE_FIND_TREE 5 menu Edit edtRANGE_FIND_TREE !x !y 20 %RANGE_FIND_TREE set !y !yb + 121 set !x !xb + 5 set !w !wb - 10 menu font color YELLOW gosub Menu_Crea_Box !x !y !w 60 CONNECTION LOST menu font color Silver menu font size 6 set !x !xb + 8 set !yt !y + 16 menu font bgcolor $002222 menu text txt !x !yt NUMERO PG NELL' ACCOUNT set !x !xb + 228 set !yt !y + 16 if %mycharnum = N/A set %mycharnum 0 menu Edit edtMyCharNum !x !yt 16 %MyCharNum set !x !xb + 8 set !yt !y + 24 menu font size 5 menu text txt !x !yt PG USATO PER RICONNETTERSI DOPO UN CONNECTION LOST set !x !xb + 10 set !y !y + 38 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 + 183 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 + 205 menu font size 6 if %sospendia = N/A set %sospendia 070500 menu Edit edtSospendia !x !y 40 %sospendia 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 LE ULTIME IMPOSTAZIONI gosub Set_Menu_Azione ATTENDO return ;sub Menu_loop sub Menu_loop set #MENUBUTTON N/A Menu_Loop_Ciclo: 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 butOBJ_ in #menubutton { gosub Split #menubutton butOBJ_ set %id_object %strright gosub Menu_Set_Object %id_object %objdest_ . %id_object %objdest2_ . %id_object BACKPACK if #result <> N/A { if %OBJFILTER_ . %id_object = N/A || #findtype in %OBJFILTER_ . %id_object { set %OBJ_ . %id_object #Result menu set txtObj_ . %id_object %obj_ . %id_object set !nomevar obj_ , %id_object gosub GlobalVar_put %idscript !nomevar } else display ok Oggetto non valido come %id_object } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetOBJ_ in #menubutton { gosub Split #menubutton butResetOBJ_ set %id_object %strright set %OBJ_ . %id_object N/A menu set txtOBJ_ . %id_object N/A set !nomevar OBJ_ , %id_object gosub Globalvar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } 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 butBag_ in #menubutton { gosub Split #menubutton butBag_ set %id_object %strright gosub Menu_Set_Bag %id_object #backpackid if #result <> N/A { set %bag_ . %id_object #Result menu set txtbag_ . %id_object %bag_ . %id_object set !nomevar bag_ , %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 butResetBag_ in #menubutton { gosub Split #menubutton butResetBag_ set %id_object %strright set %bag_ . %id_object N/A menu set txtBag_ . %id_object N/A set !nomevar Bag_ , %id_object gosub Globalvar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butNPC_ in #menubutton { gosub Split #menubutton butNPC_ set %id_object %strright gosub Menu_Set_NPC %id_object if #result <> N/A { set %NPC_ . %id_object #Result menu set txtNPC_ . %id_object %NPC_ . %id_object set !nomevar NPC_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetNPC_ in #menubutton { gosub Split #menubutton butResetNPC_ set %id_object %strright set %NPC_ . %id_object N/A menu set txtNPC_ . %id_object N/A set !nomevar NPC_ , %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 butMultiValueMove_ in #menubutton { gosub Split_to_array #menubutton _ but set %id_object %but3 gosub Menu_display_Box_Multi_Value %id_object SAVE if %but2 = sx gosub Menu_display_Box_Multi_Value %id_object -1 else gosub Menu_display_Box_Multi_Value %id_object 1 set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if butMultiValueChange in #menubutton { if butMultiValueChangeup in #menubutton { gosub Split #menubutton butMultiValueChangeup_ set %id_object %strright set !val 10 } if butMultiValueChangedown in #menubutton { gosub Split #menubutton butMultiValueChangedown_ set %id_object %strright set !val -10 } set % . %id_object % . %id_object + !val menu set txtMultivalue_ . %id_object % . %id_object gosub GlobalVar_put %idscript %id_object 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_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 } 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 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_BEETLE set %USA_BEETLE #menures gosub GlobalVar_put %idscript USA_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 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 menu getnum edtRANGE_FIND_TREE if #menures > 0 && #menures < 10 { set !val #MenuRes } else { set !val 0 set %menu_valido_VARIE #false } if !val <> %RANGE_FIND_TREE { set %RANGE_FIND_TREE !val gosub GlobalVar_put %idscript RANGE_FIND_TREE } If %RANGE_FIND_TREE < 1 || %RANGE_FIND_TREE > 9 set %menu_valido_VARIE #false set !val1 AUTO set !val2 #TRUE set !val3 #FALSE gosub GlobalVar_put %idscript menu_valido_VARIE return ;sub Restock_tool sub Restock_tool if %usa_beetle { finditem %type_food_beetle c_ , #backpackid if #findkind = -1 { if %bank_base = #true gosub Prendi_oggetto %type_food_beetle %chest_food 1 BANK %chest_base else gosub Prendi_oggetto %type_food_beetle %chest_food 1 if ! #result { if %magia_usata = MAGER { if %chest_trash = N/A gosub get_trash NO_HALT event ExMsg #CHARID 3 %menu_col_i Creo cibo per il Beetle... if %chest_trash <> N/A gosub create_food %type_food_beetle %type_food TRASH %chest_trash else gosub create_food %type_food_beetle %type_food EAT event ExMsg #CHARID 3 %menu_col_i Cibo trovato. } else event ExMsg #CHARID 3 %menu_col_ko Non trovo il cibo per il Beetle! } wait 10 } } return ;sub Scan_spot_clear sub Scan_spot_clear if %scan_tree_max > 0 { for !f 1 %scan_tree_max { menu delete txtTree_ . !f } } set %tree_act 1 set %tree_old 0 set %scan_tree_max 0 return ;sub Scan_spot_display sub Scan_spot_display set !r %1 set !tt_oldlpc #lpc set #lpc 1000 menu font size 5 if %Spot_NTree . !r > 0 { for !f 1 %Spot_NTree . !r { set !v Spot_tree , !r , _ , !f set !ID % . !v gosub display_one_tree_from_string !f !ID } } set %scan_tree_max %Spot_NTree . !r set #lpc !tt_oldlpc return ;sub Set_hatchet sub Set_hatchet set_hatchet_repeat: finditem %idhatchet c_ , #charid if #findkind <> -1 return #true finditem %idhatchet c_ , #backpackid if #findkind <> -1 { gosub dress_weapon #findid return #true } set_hatchet_loop: findItem %Type_hatchet c_ , #charid if #findkind <> -1 { set %idhatchet #findid goto set_hatchet_repeat } findItem %Type_hatchet c_ , #backpackid if #findkind <> -1 { set %idhatchet #findid goto set_hatchet_repeat } display ok NON TROVO UN ACCETTA 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 if %usa_beetle { gosub get_id_beetle set %ID_beetle #result gosub get_id_pack_beetle %ID_beetle if #result = #false { display ok NON RIESCO A PRENDERE L'ID DEL PACK DEL BEETLE } set %cont_beetle #result gosub mount %ID_beetle %type_beetle_mounted set %next_food #scnt } if %RANGE_FIND_TREE = N/A set %RANGE_FIND_TREE 5 return ;sub Sfama_pet sub Sfama_pet gosub unmount %type_beetle_mounted %id_beetle wait 10 gosub find_pet %id_beetle finditem %type_food_beetle c_ , #backpackid if #findkind = -1 return #false set !ji #jindex set #lobjectid #findid Exevent Drag #findid 1 gosub AntiBlock Exevent Dropc %id_beetle wait 10 gosub AntiBlock gosub Wait_Journal_Speech 5 !ji YOUR_PET_LOOKS gosub mount %id_beetle %type_beetle_mounted return #result return ;sub Sposta_loot sub Sposta_loot gosub Set_Menu_Azione SPOSTO LOOT gosub crea_board 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_boards || #findtype in %Type_logs set !cassa %chest_Boards if #findtype in %Type_Resource_Jewel set !cassa %chest_jewel if #findtype in %Type_Resource_Other set !cassa %chest_resource if !sl_stack > 0 { gosub sposta_item #findid !cassa !sl_stack gosub conta_oggetto_spostato !sl_type !sl_col !sl_stack } wait 15 ignoreitem #findid spostaloot goto spostaancoraloot } wait 10 if %usa_beetle gosub Sposta_loot_beetle ignoreitem reset spostaloot return ;sub Sposta_loot_beetle sub Sposta_loot_beetle gosub Set_Menu_Azione SPOSTO LOOT BEETLE gosub unmount %type_beetle_mounted %id_beetle gosub Open_backpack_beetle %id_beetle %cont_beetle spostaancoralootbeetle: finditem %item_to_loot c_ , %cont_beetle if #findkind <> -1 { set !sl_type #findtype set !sl_col #findcol set !sl_stack #findstack if #findtype in %Type_boards || #findtype in %Type_logs set !cassa %chest_Boards if #findtype in %Type_Resource_Jewel set !cassa %chest_jewel if #findtype in %Type_Resource_Other set !cassa %chest_resource if !sl_stack > 0 { gosub sposta_item #findid !cassa !sl_stack gosub conta_oggetto_spostato !sl_type !sl_col !sl_stack } wait 15 ignoreitem #findid spostaloot goto spostaancoralootbeetle } wait 10 if %usa_beetle && #scnt > %next_food { gosub sfama_pet if #result set %next_food #scnt + 3600 } wait 10 gosub mount %id_beetle %type_beetle_mounted wait 10 return ;sub Sposta_sul_beetle sub Sposta_sul_beetle gosub unmount %type_beetle_mounted %id_beetle wait 10 set !type_to_beetle %type_logs , %type_boards richeck_sposta_sul_beetle: gosub Get_Weight_in_container %id_beetle set !v 1500 - #result if !v < 10 goto esci_sposta_sul_beetle finditem !type_to_beetle c_ , #backpackid if #findkind = -1 goto esci_sposta_sul_beetle if !v > #findstack set !v #findstack gosub sposta_item #findid %id_beetle !v wait 10 goto richeck_sposta_sul_beetle ;a finire risponde #false se devo comunque tornare a casa esci_sposta_sul_beetle: gosub mount %id_beetle %type_beetle_mounted gosub check_peso 100 return #result ;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 Io_accetto_tutto Scorna %versionscript gosub Menu_Add_Menu RESTOCK RESTOCK gosub Menu_Add_Menu SPOT SPOT 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_tree sub Trova_tree set !p1 %1 set !p2 %2 set !tt_oldlpc #lpc set #lpc 1000 gosub Set_Menu_Azione CERCO ALBERI RUNA !p1 RANGE !p2 set !fminx #charposx - !p2 set !fminy #charposy - !p2 set !fmaxx #charposx + !p2 set !fmaxy #charposy + !p2 for !ffy !fminy !fmaxy { for !ffx !fminx !fmaxx { set !IDTree !ffx , _ , !ffy if %Tree . !IDTree = n/a { gosub check_Tree_tile !ffx !ffy if #result { set %Spot_NTree . !p1 %Spot_NTree . !p1 + 1 set !var Spot_Tree , !p1 , _ , %Spot_NTree . !p1 set % . !var !IDTree set %Tree . !IDTree %coordx , | , %coordy , | , %coordz , | , %tiletype , | , %index set %Story . !IDTree set %TileID . !IDtree %tiletype } } } } set #lpc !tt_oldlpc return ;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 ###########################