set %idscript PEPITO_HEARTWOOD set %versionscript 0.10 ;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 Start_Menu gosub Get_Position_Container gosub Crea_Lista_Item_e_Container gosub Set_Ultime_Variabili gosub Set_Quest_Variabili gosub Crea_Menu_Avviato if %debug gosub LOOP_DEBUG if %pepito_alarm gosub Alarm_init gosub check_heartwood if #result goto QUEST_LOOP MAIN_LOOP: gosub Torna_a_Casa if ! #result display ok NON RIESCO A TORNARE A CASA gosub Setaccia_Premi gosub sposta_premi 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 gosub Restock if %usa_beetle gosub restock_beetle gosub Vai_a_Heartwood gosub Walk_Pepito_Rail NORMAL QUEST_LOOP: set %beetle_da_usare #true POINT_AFTER_USED_BEETLE: gosub check_tool_e_risorse if ! #result { if %usa_beetle && %beetle_da_usare && NEED in %return_error { set %beetle_da_usare #false gosub get_from_beetle gosub antiblock wait 10 goto POINT_AFTER_USED_BEETLE } else { gosub Setaccia_Premi goto RIESCI_LOOP } } if %quest_must_make { gosub Make_Quest if #result <> OK goto QUEST_LOOP } GET_QUEST_POINT_LOOP: gosub Get_Quest FILLA_LOOP: if %quest_stack_item gosub Filla_Quest_Stack else gosub Filla_Quest if ! #result { if %filla_err_type = ITEM_ERR { display ok CERCO DI RISOLVERE QUEST SBAGLIATA pause set %filla_err_type gosub rescindi_quest set %cont_quest_error %cont_quest_error + 1 menu set txtQuest_error %cont_quest_error goto GET_QUEST_POINT_LOOP } goto FILLA_LOOP } gosub complete_quest wait 10 gosub troppa_roba if #result { gosub Setaccia_Premi gosub troppa_roba if #result goto RIESCI_LOOP } goto QUEST_LOOP RIESCI_LOOP: gosub Walk_Pepito_Rail INVERSE gosub esci_da_heartwood if #result = #false goto RIESCI_LOOP set %cont_cicli %cont_cicli + 1 menu set txtcont_cicli %cont_cicli goto MAIN_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 Asses_analizza_lettera_a v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_a if ARTIFACT , #spc , RARITY in !asses_linea { gosub Asses_get_property ARTIFACT , #spc , RARITY !asses_linea set !linea_type PROPERTY set !linea_subvalue #result * 50 set !linea_percent %A_B_RARITY return } return ;sub Asses_analizza_lettera_b v 1.2 -> p 3 -> d 0 sub Asses_analizza_lettera_b if !asses_linea = BLESSED { set !linea_type ININFLUENT return } if !asses_linea = BALANCED { set !linea_type PROPERTY set !linea_subvalue 50 set !linea_percent %A_B_BA return } if BATTLE , #spc , LUST in !asses_linea { set !linea_type PROPERTY set !linea_subvalue 100 set !linea_percent %A_B_BL return } if BLOOD , #spc , DRINKER in !asses_linea { set !linea_type PROPERTY set !linea_subvalue 100 set !linea_percent %A_B_BD return } return ;sub Asses_analizza_lettera_c v 1.2 -> p 3 -> d 0 sub Asses_analizza_lettera_c if CRAFTED , #spc , BY in !asses_linea { set !linea_type ININFLUENT return } if COLD , #spc , DAMAGE in !asses_linea { gosub Asses_get_property COLD , #spc , DAMAGE !asses_linea set !linea_type PROPERTY set !linea_subvalue 0 if #result >= 100 set !linea_subvalue 50 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_NEON return } if CASTING , #spc , FOCUS in !asses_linea { gosub Asses_get_property CASTING , #spc , FOCUS !asses_linea set !linea_type PROPERTY set !linea_subvalue #result * 10 set !linea_percent %A_B_CF return } if COLD , #spc , RESIST in !asses_linea { gosub Asses_get_property COLD , #spc , RESIST !asses_linea set !linea_type PROPERTY set !linea_subvalue #result set !linea_percent 0 set !asses_resists !asses_resists + #result return } if COLD , #spc , EATER in !asses_linea { gosub Asses_get_property COLD , #spc , EATER !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 5 set !linea_percent %A_B_DE return } if COLD , #spc , RESONANCE in !asses_linea { gosub Asses_get_property COLD , #spc , RESONANCE !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 10 set !linea_percent %A_B_R return } return ;sub Asses_analizza_lettera_d v 1.1 -> p 3 -> d 0 sub Asses_analizza_lettera_d if DAMAGE , #spc , INCREASE in !asses_linea { gosub Asses_get_property DAMAGE , #spc , INCREASE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 5 ) + ( #RESULT / 10 ) ) * 10 set !linea_percent %A_B_DI return } if DURABILITY in !asses_linea { set !linea_type ININFLUENT return } if DEFENSE , #spc , CHANCE , #spc , INCREASE in !asses_linea { gosub Asses_get_property DEFENSE , #spc , CHANCE , #spc , INCREASE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 set !linea_percent %A_B_DCI return } if DEXTERITY , #spc , BONUS in !asses_linea { gosub Asses_get_property DEXTERITY , #spc , BONUS !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 set !linea_percent %A_B_SB return } if DAMAGE , #spc , EATER in !asses_linea { gosub Asses_get_property DAMAGE , #spc , EATER !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 10 set !linea_percent %A_B_DE return } return ;sub Asses_analizza_lettera_e v 1.1 -> p 3 -> d 0 sub Asses_analizza_lettera_e if !asses_linea = EXCEPTIONAL { set !linea_type ININFLUENT return } if !asses_linea = ELVES , #spc , ONLY { set !linea_type ININFLUENT return } if ENERGY , #spc , DAMAGE in !asses_linea { gosub Asses_get_property ENERGY , #spc , DAMAGE !asses_linea set !linea_type PROPERTY set !linea_subvalue 0 if #result >= 100 set !linea_subvalue 50 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_NEON return } if ENERGY , #spc , EATER in !asses_linea { gosub Asses_get_property ENERGY , #spc , EATER !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 5 set !linea_percent %A_B_DE return } if ENERGY , #spc , RESONANCE in !asses_linea { gosub Asses_get_property ENERGY , #spc , RESONANCE !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 10 set !linea_percent %A_B_R return } if ENERGY , #spc , RESIST in !asses_linea { gosub Asses_get_property ENERGY , #spc , RESIST !asses_linea set !linea_type PROPERTY set !linea_subvalue #result set !linea_percent 0 set !asses_resists !asses_resists + #result return } if ENHANCE , #spc , POTIONS in !asses_linea { gosub Asses_get_property ENHANCE , #spc , POTIONS !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 6 ) * 10 set !linea_percent %A_B_EP return } return ;sub Asses_analizza_lettera_f v 1.1 -> p 3 -> d 0 sub Asses_analizza_lettera_f if FASTER , #spc , CASTING in !asses_linea { gosub Asses_get_property FASTER , #spc , CASTING !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 60 set !linea_percent %A_B_FC set !asses_fc #result return } if FASTER , #spc , CAST , #spc , RECOVERY in !asses_linea { gosub Asses_get_property FASTER , #spc , CAST , #spc , RECOVERY !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 40 set !linea_percent %A_B_FC set !asses_fcr #result return } if FIRE , #spc , DAMAGE in !asses_linea { gosub Asses_get_property FIRE , #spc , DAMAGE !asses_linea set !linea_type PROPERTY set !linea_subvalue 0 if #result >= 100 set !linea_subvalue 50 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_NEON return } if FIRE , #spc , EATER in !asses_linea { gosub Asses_get_property FIRE , #spc , EATER !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 5 set !linea_percent %A_B_DE return } if FIRE , #spc , RESONANCE in !asses_linea { gosub Asses_get_property FIRE , #spc , RESONANCE !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 10 set !linea_percent %A_B_R return } if FIRE , #spc , RESIST in !asses_linea { gosub Asses_get_property FIRE , #spc , RESIST !asses_linea set !linea_type PROPERTY set !linea_subvalue #result set !linea_percent 0 set !asses_resists !asses_resists + #result return } return ;sub Asses_analizza_lettera_h v 1.2 -> p 3 -> d 0 sub Asses_analizza_lettera_h if HIT , #spc , DISPEL in !asses_linea { gosub Asses_get_property HIT , #spc , DISPEL !asses_linea set !linea_type PROPERTY set !linea_subvalue 0 IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 20 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HD return } if HIT , #spc , MANA , #spc , LEECH in !asses_linea { gosub Asses_get_property HIT , #spc , MANA , #spc , LEECH !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 6 ) + ( #RESULT / 10 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HL return } if HIT , #spc , LIFE , #spc , LEECH in !asses_linea { gosub Asses_get_property HIT , #spc , LIFE , #spc , LEECH !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 6 ) + ( #RESULT / 10 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HL return } if HIT , #spc , STAMINA , #spc , LEECH in !asses_linea { gosub Asses_get_property HIT , #spc , STAMINA , #spc , LEECH !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 10 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HL return } if HIT , #spc , MANA , #spc , DRAIN in !asses_linea { gosub Asses_get_property HIT , #spc , MANA , #spc , DRAIN !asses_linea set !linea_type PROPERTY IF #RESULT >= 10 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 10 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HL return } if HIT , #spc , FATIGUE in !asses_linea { gosub Asses_get_property HIT , #spc , FATIGUE !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 10 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HL return } if HIT , #spc , CURSE in !asses_linea { gosub Asses_get_property HIT , #spc , CURSE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 10 ) ) * 10 set !linea_percent %A_B_HC return } if HIT , #spc , HARM in !asses_linea { gosub Asses_get_property HIT , #spc , HARM !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HS return } if HIT , #spc , MAGIC , #spc , ARROW in !asses_linea { gosub Asses_get_property HIT , #spc , MAGIC , #spc , ARROW !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HS return } if HIT , #spc , FIREBALL in !asses_linea { gosub Asses_get_property HIT , #spc , FIREBALL !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HS return } if HIT , #spc , LIGHTNING in !asses_linea { gosub Asses_get_property HIT , #spc , LIGHTNING !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 8 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HS return } if HIT , #spc , FIRE , #spc , AREA in !asses_linea { gosub Asses_get_property HIT , #spc , FIRE , #spc , AREA !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 10 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HSA return } if HIT , #spc , COLD , #spc , AREA in !asses_linea { gosub Asses_get_property HIT , #spc , COLD , #spc , AREA !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 10 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HSA return } if HIT , #spc , PHYSICAL , #spc , AREA in !asses_linea { gosub Asses_get_property HIT , #spc , PHYSICAL , #spc , AREA !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 10 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HSA return } if HIT , #spc , POISON , #spc , AREA in !asses_linea { gosub Asses_get_property HIT , #spc , POISON , #spc , AREA !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 10 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HSA return } if HIT , #spc , ENERGY , #spc , AREA in !asses_linea { gosub Asses_get_property HIT , #spc , ENERGY , #spc , AREA !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( ( #RESULT / 10 ) + ( #RESULT / 12 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HSA return } if HIT , #spc , LOWER , #spc , ATTACK in !asses_linea { gosub Asses_get_property HIT , #spc , LOWER , #spc , ATTACK !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( #RESULT / 5 ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HLOW return } if HIT , #spc , LOWER , #spc , DEFENSE in !asses_linea { gosub Asses_get_property HIT , #spc , LOWER , #spc , DEFENSE !asses_linea set !linea_type PROPERTY IF #RESULT >= 20 set !linea_subvalue ( #RESULT / 5 ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_HLOW return } if HIT , #spc , CHANCE , #spc , INCREASE in !asses_linea { gosub Asses_get_property HIT , #spc , CHANCE , #spc , INCREASE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 set !linea_percent %A_B_HCI return } if HIT , #spc , POINT , #spc , INCREASE in !asses_linea { gosub Asses_get_property HIT , #spc , POINT , #spc , INCREASE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 2 ) * 10 set !linea_percent %A_B_PI return } if HIT , #spc , POINT , #spc , REGENERATION in !asses_linea { gosub Asses_get_property HIT , #spc , POINT , #spc , REGENERATION !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT * 4 ) * 10 set !linea_percent %A_B_REG return } return ;sub Asses_analizza_lettera_i v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_i if !asses_linea = INSURED { set !linea_type ININFLUENT return } if INTELLIGENCE , #spc , BONUS in !asses_linea { gosub Asses_get_property INTELLIGENCE , #spc , BONUS !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 set !linea_percent %A_B_SB return } return ;sub Asses_analizza_lettera_k v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_k if KINETIC , #spc , EATER in !asses_linea { gosub Asses_get_property KINETIC , #spc , EATER !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 5 set !linea_percent %A_B_DE return } if KINETIC , #spc , RESONANCE in !asses_linea { gosub Asses_get_property KINETIC , #spc , RESONANCE !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 10 set !linea_percent %A_B_R return } return ;sub Asses_analizza_lettera_l v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_l if LOWER , #spc , REAGENT , #spc , COST in !asses_linea { gosub Asses_get_property LOWER , #spc , REAGENT , #spc , COST !asses_linea set !linea_type PROPERTY if #result < 12 set !linea_name !linea_name , #spc , IF #RESULT >= 12 { set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 IF !asses_medable = #false && %asses_item_type notin %Jewelery SET !linea_subvalue !linea_subvalue - ( #RESULT / 6 ) * 10 } IF #RESULT >= 20 SET !linea_subvalue !linea_subvalue + 50 set !linea_percent %A_B_LRC set !asses_lrc #result return } if LOWER , #spc , MANA , #spc , COST in !asses_linea { gosub Asses_get_property LOWER , #spc , MANA , #spc , COST !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 set !linea_percent %A_B_LMC set !asses_lmc #result return } if LOWER , #spc , REQUIREMENTS in !asses_linea { set !linea_type ININFLUENT return } if LUCK in !asses_linea { gosub Asses_get_property LUCK !asses_linea set !linea_type PROPERTY set !linea_subvalue 0 IF #RESULT >= 50 set !linea_subvalue ( ( #RESULT / 11 ) + ( #RESULT / 15 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_LUCK return } return ;sub Asses_analizza_lettera_m v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_m IF mage , #SPC , weapon IN !asses_linea { GOSUB Asses_get_property mage , #SPC , weapon !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( 400 + #result * 10 ) / 4 ) set !linea_percent %A_B_MW return } IF mana , #SPC , increase IN !asses_linea { GOSUB Asses_get_property mana , #SPC , increase !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 2 ) * 10 set !linea_percent %A_B_PI return } IF mana , #SPC , regeneration IN !asses_linea { GOSUB Asses_get_property mana , #SPC , regeneration !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT * 4 ) * 10 set !linea_percent %A_B_REG return } if MAGE , #spc , ARMOR in !asses_linea { set !linea_type PROPERTY set !linea_subvalue 0 set !linea_percent 100 return } return ;sub Asses_analizza_lettera_n v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_n IF NIGHT , #SPC , SIGHT IN !asses_linea { set !linea_type PROPERTY set !linea_subvalue 10 return } return ;sub Asses_analizza_lettera_o v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_o if ONE-HANDED , #spc , WEAPON in !asses_linea { set !linea_type ININFLUENT return } if OWNED , #spc , BY in !asses_linea { set !linea_type ININFLUENT return } return ;sub Asses_analizza_lettera_p v 1.1 -> p 3 -> d 0 sub Asses_analizza_lettera_p if PHYSICAL , #spc , DAMAGE in !asses_linea { set !linea_type ININFLUENT return } if PRICE in !asses_linea { set !linea_type ININFLUENT return } if POISON , #spc , DAMAGE in !asses_linea { gosub Asses_get_property POISON , #spc , DAMAGE !asses_linea set !linea_type PROPERTY set !linea_subvalue 0 if #result >= 100 set !linea_subvalue 50 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_NEON return } if POISON , #spc , EATER in !asses_linea { gosub Asses_get_property POISON , #spc , EATER !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 5 set !linea_percent %A_B_DE return } if POISON , #spc , RESONANCE in !asses_linea { gosub Asses_get_property POISON , #spc , RESONANCE !asses_linea set !linea_type PROPERTY set !linea_subvalue #RESULT * 10 set !linea_percent %A_B_R return } if POISON , #spc , RESIST in !asses_linea { gosub Asses_get_property POISON , #spc , RESIST !asses_linea set !linea_type PROPERTY set !linea_subvalue #result set !linea_percent 0 set !asses_resists !asses_resists + #result return } if PHYSICAL , #spc , RESIST in !asses_linea { gosub Asses_get_property PHYSICAL , #spc , RESIST !asses_linea set !linea_type PROPERTY set !linea_subvalue #result set !linea_percent 0 set !asses_resists !asses_resists + #result return } return ;sub Asses_analizza_lettera_r v 1.1 -> p 3 -> d 0 sub Asses_analizza_lettera_r if REMAIN in !asses_linea { set !linea_type ININFLUENT return } if REACTIVE , #spc , PARALYZE in !asses_linea { set !linea_type PROPERTY set !linea_subvalue 100 set !linea_percent %A_B_RP return } if REQUIREMENT in !asses_linea { set !linea_type ININFLUENT return } if RANGE in !asses_linea { set !linea_type ININFLUENT return } if reflect , #SPC , physical , #SPC , damage in !asses_linea { gosub Asses_get_property reflect , #SPC , physical , #SPC , damage !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #result / 5 ) * 10 set !linea_percent %A_B_RPD return } return ;sub Asses_analizza_lettera_s v 1.1 -> p 3 -> d 0 sub Asses_analizza_lettera_s if STRENGTH , #spc , REQUIREMENT in !asses_linea { set !linea_type ININFLUENT return } if SKILL , #spc , REQUIRED in !asses_linea { set !linea_type ININFLUENT return } IF SPELL , #SPC , CHANNELING IN !asses_linea { set !linea_type PROPERTY set !linea_subvalue 40 set !linea_percent %A_B_SC set !asses_sc #true return } if SWING , #spc , SPEED , #spc , INCREASE in !asses_linea { gosub Asses_get_property SWING , #spc , SPEED , #spc , INCREASE !asses_linea set !linea_type PROPERTY IF #RESULT >= 10 set !linea_subvalue ( ( #RESULT / 3 ) + ( #RESULT / 10 ) ) * 10 else set !linea_name !linea_name , #spc , set !linea_percent %A_B_SSI return } IF SOUL , #SPC , CHARGE IN !asses_linea { GOSUB Asses_get_property SOUL , #SPC , CHARGE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 3 ) * 10 set !linea_percent %A_B_SCH return } IF SPLINTERING , #SPC , WEAPON IN !asses_linea { GOSUB Asses_get_property SPLINTERING , #SPC , WEAPON !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 3 ) * 10 set !linea_percent %A_B_SW return } IF stamina , #SPC , increase IN !asses_linea { GOSUB Asses_get_property stamina , #SPC , increase !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 3 ) * 10 set !linea_percent %A_B_PI return } IF stamina , #SPC , regeneration IN !asses_linea { GOSUB Asses_get_property stamina , #SPC , regeneration !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT * 4 ) * 10 set !linea_percent %A_B_REG return } if SELF , #spc , REPAIR in !asses_linea { gosub Asses_get_property SELF , #spc , REPAIR !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 2 ) * 10 set !linea_percent %A_B_SR return } if STRENGTH , #spc , BONUS in !asses_linea { gosub Asses_get_property STRENGTH , #spc , BONUS !asses_linea set !linea_type PROPERTY set !linea_subvalue ( ( #RESULT / 2 ) + ( #RESULT / 3 ) ) * 10 set !linea_percent %A_B_SB return } if SPELL , #spc , DAMAGE , #spc , INCREASE in !asses_linea { gosub Asses_get_property SPELL , #spc , DAMAGE , #spc , INCREASE !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 2 ) * 10 set !linea_percent %A_B_SDI return } return ;sub Asses_analizza_lettera_t v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_t if TWO-HANDED , #spc , WEAPON in !asses_linea { set !linea_type ININFLUENT return } return ;sub Asses_analizza_lettera_u v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_u IF use , #spc , best , #SPC , weapon , #SPC , skill IN !asses_linea { set !linea_type PROPERTY set !linea_subvalue 20 set !linea_percent %A_B_BWS return } if USES , #spc , REMAINING in !asses_linea { set !linea_type ININFLUENT return } return ;sub Asses_analizza_lettera_v v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_v IF velocity IN !asses_linea { gosub Asses_get_property velocity !asses_linea set !linea_type PROPERTY set !linea_subvalue ( #RESULT / 4 ) * 10 set !linea_percent %A_B_VEL return } return ;sub Asses_analizza_lettera_w v 1.0 -> p 3 -> d 0 sub Asses_analizza_lettera_w if WEIGHT: in !asses_linea { set !linea_type ININFLUENT return } if WEAPON , #spc , DAMAGE in !asses_linea { set !linea_type ININFLUENT return } if WEAPON , #spc , SPEED in !asses_linea { set !linea_type ININFLUENT return } return ;sub Asses_analizza_linea v 1.0 -> p 2 -> d 0 sub Asses_analizza_linea set !asses_linea %1 set !asses_family %2 if %asses_index = 1 { set !linea_name !asses_linea set !linea_type NOME set !linea_subvalue 0 set !linea_percent 0 set !linea_value 0 set !linea_color Yellow set %asses_name !asses_linea return } set !linea_name !asses_linea set !linea_subvalue 0 set !linea_percent 100 set !linea_value 0 set !linea_color red set !linea_type BHO if #spc , + in !asses_linea { if : notin !asses_linea gosub Asses_Analizza_Skills } else { str LEFT !asses_linea 1 set !asses_first_letter #strres gosub Asses_Analizza_Lettera_ . !asses_first_letter } if !linea_type = ININFLUENT { set !linea_subvalue 0 set !linea_percent 100 set !linea_value 0 set !linea_color gray } if !linea_type = PROPERTY { set !linea_color white set !linea_value ( !linea_percent * !linea_subvalue ) / 100 } return ;sub Asses_analizza_skills v 1.0 -> p 0 -> d 0 sub Asses_analizza_skills gosub split !asses_linea + set !asses_skills !asses_skills + %strright set !linea_type PROPERTY set !linea_subvalue %strright set !linea_percent 0 return ;sub Asses_analizza_slayer v 1.0 -> p 2 -> d 0 sub Asses_analizza_slayer set !asses_linea %1 set !asses_family %2 set !linea_name !asses_linea set !linea_subvalue 30 set !linea_color white set !linea_type SLAYER gosub split !asses_linea #spc if %strleft in %A_B_SUPERSLAYER set !linea_subvalue 80 if %strleft in %A_B_SLAYERNAME set !linea_subvalue 150 set !linea_percent %A_B_SLAYER set !linea_value ( !linea_percent * !linea_subvalue ) / 100 return ;sub Asses_azzera v 1.0 -> p 0 -> d 0 sub Asses_azzera set !asses_fc 0 set !asses_fcr 0 set !asses_lrc 0 set !asses_lmc 0 set !asses_sc #false set %asses_linea_bonus set %asses_index 0 set %asses_value 0 set %asses_name N/A set !asses_resists 0 set !asses_skills 0 set !asses_medable #false set %asses_pass #false return ;sub Asses_display_erase v 1.0 -> p 0 -> d Split_to_Array sub Asses_display_erase gosub Split_to_Array %asses_garbage _ garbage set !garbage_max #result if !garbage_max > 0 { for !i 1 !garbage_max { menu delete %garbage . !i } } set %asses_garbage _ menu font size 5 menu font color white return ;sub Asses_display_linea v 1.0 -> p 1 -> d 0 sub Asses_display_linea set !y %asses_y + %asses_index * 8 - 8 menu font color !linea_color set !name txtAsses , %asses_index menu text !name %asses_x !y !linea_name set %asses_garbage _ , !name , %asses_garbage if !linea_type = NOME return if !linea_percent <> 100 { set !x %asses_x + %asses_w - 70 menu font color gray set !name txtAssessubValue , %asses_index menu text !name !x !y !linea_subvalue set %asses_garbage _ , !name , %asses_garbage set !x %asses_x + %asses_w - 45 set !name txtAssesMoltiplicator , %asses_index menu text !name !x !y !linea_percent set %asses_garbage _ , !name , %asses_garbage } set !x %asses_x + %asses_w - 20 menu font color !linea_color set !name txtAssesValue , %asses_index menu text !name !x !y !linea_value set %asses_garbage _ , !name , %asses_garbage return ;sub Asses_get_property v 1.1 -> p 2 -> d 0 sub Asses_get_property set !asses_p %1 set !asses_l %2 STR LEN !asses_p STR DEL !asses_l 1 #STRRES SET !asses_l #STRRES STR LEN !asses_l IF skill IN !asses_l SET #STRRES #STRRES - 6 IF % IN !asses_l SET #STRRES #STRRES - 1 SET !asses_ll 0 FOR !assses_i #STRRES 1 { SET !asses_ll !asses_ll + 1 STR MID !asses_l !assses_i 1 IF #SPC IN #STRRES { STR MID !asses_l !assses_i !asses_ll SET !assses_i 1 } } RETURN #STRRES ;sub Asses_init v 1.3 -> p 0 -> d 0 sub Asses_init set %asses_pass_value 300 set %A_B_NEON 100 ;armi neon set %A_B_HCI 100 ;hit chance increase set %A_B_DCI 100 ;defence chance increase set %A_B_SSI 100 ;swing speed increase set %A_B_DI 100 ;damage increase set %A_B_RARITY 100 ;artifact rarity set %A_B_FC 100 ;faster cast set %A_B_FCR 100 ;faster cast recovery set %A_B_BWS 100 ;best weapon skill set %A_B_SC 100 ;spell channeling set %A_B_MW 100 ;mage weapon set %A_B_HD 100 ;hit dispel set %A_B_HL 100 ;hit leech (mana, life, stamina) set %A_B_HC 100 ;hit curse set %A_B_BA 100 ;balanced set %A_B_BL 100 ;battle lust set %A_B_BD 100 ;blood drinker set %A_B_CF 100 ;casting focus set %A_B_DE 100 ;damage eater set %A_B_RP 100 ;reactive paralyze set %A_B_SCH 100 ;soul charge set %A_B_SW 100 ;splintering weapon set %A_B_HLOW 100 ;hit lower (attack e defense) set %A_B_RES 100 ;resists set %A_B_R 100 ;resonance set %A_B_HS 100 ;hit spell (harm, lighting, etc etc) set %A_B_HSA 100 ;hit spell (harm, lighting, etc etc) set %A_B_SLAYER 100 ;slayer set %A_B_LRC 100 ;lower reagent cost set %A_B_LMC 100 ;lower mana cost set %A_B_PI 100 ;Point increase (stamina, hp, mana) set %A_B_REG 100 ;regeneration power (mana, stamina, hp) set %A_B_RPD 100 ;reflect phisycal set %A_B_LUCK 100 ;luck set %A_B_STAT 100 ;statistiche set %A_B_SR 100 ;self repair set %A_B_SDI 100 ;spell damage increase set %A_B_SB 100 ;stat bonus (strength, intelligence, dexterity) set %A_B_SKILL 100 ;skill bonus set %A_B_EP 100 ;enhance potions set %A_B_VEL 100 ;velocity set %A_B_SLAYERNAME _ ;slayer scelti if %sword = N/A { ;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_ ;ARMOR TYPES================================================================ ;Medable first---- SET %leatherarmor VKH_NJL_QJL_JKH_QKH_DLH_HKH_PKH_SKH_KKH_ELH_PSF_QSK_ATK_ZSK_OSK_YSK_NSK_ SET %medhelmet NJL_QJL_NZH_TDI_VVI_KZH_PZH_DZH_ SET %medgorget JKH_RJG_SJG_FJG_MWL_ SET %medarm HKH_PKH_ SET %medtunic QKH_DLH_ SET %femalemedtunic ATK_ZSK_OSK_NSK_ SET %medglove KKH_SKH_WTO_ SET %medlegging VKH_ELH_ SET %femalemedlegging QSK_YSK_PSK_ ;Hats--- SET %hats CZH_HZH_GZH_BWI_WVI_XVI_YVI_IWI_HWI_KWI_JWI_EWI_JJN_OZH_DZH_BZH_EZH_VSH_QSH_VSH_NWL_MJN_ ;Samurai Empire Medable Armor--- SET %se_leatherarmor RWO_GCP_UBP_OWO_LCP_SWO_GWO_CCP_NCP_OCP_ SET %se_medhelmet GWO_CCP_ SET %se_medgorget SWO_ SET %se_medarm OWO_ SET %se_medtunic RWO_NCP_ SET %se_medglove OCP_ SET %se_medleggins GCP_UBP_LCP_ECP_ ;Mondain's Legacy Medable Armor--- SET %ml_medhelmet IJQ_SJQ_HJQ_UES_ SET %ml_medgorget BAS_ SET %ml_medarm MAS_ SET %ml_medtunic ZZR_ SET %ml_medglove CAS_ SET %ml_medleggings OAS_LAS_ ;Non medable--- SET %studdedarmor ALH_ULH_LLH_YKH_GLH_XKH_FLH_RLH_MLH_SSK_RSK_ SET %bonearmor ZPH_YPH_WPH_PPH_BQH_QPH_VPH_XPH_CQH_AQH_ SET %nonmedhelmet DSH_ASH_TSH_ESH_YPH_GSH_OSH_ZPH_ZRH_IWL_CSH_CSH_BSH_FSH_DPH_LKO_NWL_MKH_ SET %nonmedgorget NSH_ALH_ SET %nonmedarm BQH_JSH_XLH_GLH_MSH_YLH_QPH_YKH_DLO_ SET %nonmedtunic HSH_ULH_LLH_ZOH_IKH_VLH_KSH_WLH_WPH_PKO_PPH_RSK_ SET %femalenonmedtunic USK_SSK_MSK_TSK_LSK_USK_ SET %nonmedglove VPH_ISH_AQH_BMH_USH_XKH_FLH_KMH_RKO_ SET %nonmedlegging HMH_LSH_IMH_CQH_WSH_APH_MLH_RLH_NKH_XPH_NKO_ ;Samurai Empire Non Medable Armor--- SET %se_studdedarmor MWO_NWO_FCP_PCP_TBP_ SET %se_nonmedhelmet RBP_DCP_QWO_DWO_SBP_VBP_FWO_PWO_ SET %se_nonmedgorget PCP_ SET %se_nonmedarm NWO_WBP_ SET %se_nonmedtunic MWO_LWO SET %se_nonmedleggins FCP_TBP_ZBP_ ;Mondain's Legacy Non Medable Armor--- SET %ml_nonmedhelmet RJQ_UJQ_TJQ_ SET %ml_nonmedgorget QJQ_JJQ_ SET %ml_nonmedarm PJQ_GJQ_ SET %ml_nonmedtunic OJQ_ZIQ_ SET %ml_nonmedgloves NJQ_MJQ_ SET %ml_nonmedleggings AKQ_LJQ_ ;super slayer set %A_B_SUPERSLAYER Abyss_Arachnid_Bat_Bear_Beetle_Bird_Bovine_Elemental_Fey_Flame_Ice_Mage_Repond_Reptile_Undead_Vermin_Wolf_ ;super slayer ;INIT LISTS==================================================================== SET %shield LIK_MIK_CLK_AIK_CIK_LYD_GIK_NIK_ZHK_HLK_BLK_FIK_BIK_OIK_ SET %jewelery CWL_LWL_UJG_IJG_ } SET %se_medarmor %se_leatherarmor , %se_medhelmet , %se_medgorget , %se_medarm , %se_medtunic , %se_medglove , %se_medleggins SET %ml_medarmor %ml_medhelmet , %ml_medgorget , %ml_medarm , %ml_medtunic , %ml_medglove , %ml_medleggings SET %medarmor %leatherarmor , %medHelmet , %hats , %medGorget , %medArm , %medTunic , %femaleMedTunic , %medGlove , %medLegging , %femaleMedLegging , %se_medarmor , %ml_medarmor SET %se_nonmedarmor %se_studdedarmor , %se_nonmedhelmet , %se_nonmedgorget , %se_nonmedarm , %se_nonmedtunic , %se_nonmedleggins SET %ml_nonmedarmor %ml_nonmedhelmet , %ml_nonmedgorget , %ml_nonmedarm , %ml_nonmedtunic , %ml_nonmedgloves , %ml_nonmedleggings SET %nonmedarmor %studdedarmor , %bonearmor , %nonmedHelmet , %nonmedGorget , %nonmedArm , %nonmedTunic , %femaleNonMedTunic , %nonmedGlove , %nonmedLegging , %se_nonmedarmor , %ml_nonmedarmor SET %weapon %sword , %fencing , %mace , %bow , %se_sword , %se_fencing , %se_mace , %se_bow , %ml_sword , %ml_fencing , %ml_mace , %ml_bow SET %armor %medarmor , %nonmedarmor set %equip %weapon , %armor , %shield , %jewelery set %MULTIVALUE_ASSES_1 ARMI_NEON|A_B_NEON|1 set %MULTIVALUE_ASSES_2 ARTIFACT_RARITY|A_B_RARITY|1 set %MULTIVALUE_ASSES_3 BALANCED|A_B_BA|1 set %MULTIVALUE_ASSES_4 BEST_WEAPON_SKILL|A_B_BWS|1 set %MULTIVALUE_ASSES_5 BLOOD_DRINKER|A_B_BD|1 set %MULTIVALUE_ASSES_6 CASTING_FOCUS|A_B_CF|1 set %MULTIVALUE_ASSES_7 DAMAGE_EATER|A_B_DE|1 set %MULTIVALUE_ASSES_8 DAMAGE_INCREASE|A_B_DI|1 set %MULTIVALUE_ASSES_9 DEFENSE_CHANCE_INCREASE|A_B_DCI|1 set %MULTIVALUE_ASSES_10 ENHANCE_POTIONS|A_B_EP|1 set %MULTIVALUE_ASSES_11 FASTER_CAST|A_B_FC|1 set %MULTIVALUE_ASSES_12 FASTER_CASTING_RECOVERY|A_B_FCR|1 set %MULTIVALUE_ASSES_13 HIT_CHANCE_INCREASE|A_B_HCI|1 set %MULTIVALUE_ASSES_14 HIT_CURSE|A_B_HC|1 set %MULTIVALUE_ASSES_15 HIT_DISPEL|A_B_HD|1 set %MULTIVALUE_ASSES_16 HIT_DRAIN_LEECH|A_B_HL|1 set %MULTIVALUE_ASSES_17 HIT_LOWER|A_B_HLOW|1 set %MULTIVALUE_ASSES_18 HIT_SPEEL|A_B_HS|1 set %MULTIVALUE_ASSES_19 HIT_SPEEL_AREA|A_B_HSA|1 set %MULTIVALUE_ASSES_20 LOWER_MANA_COST|A_B_LMC|1 set %MULTIVALUE_ASSES_21 LOWER_REAGENT_COST|A_B_LRC|1 set %MULTIVALUE_ASSES_22 LUCK|A_B_LUCK|1 set %MULTIVALUE_ASSES_23 MAGE_WEAPON|A_B_MW|1 set %MULTIVALUE_ASSES_24 POINT_INCREASE|A_B_PI|1 set %MULTIVALUE_ASSES_25 REACTIVE_PARALYZE|A_B_RP|1 set %MULTIVALUE_ASSES_26 REFLECT_PHISYCAL_DAMAGE|A_B_RPD|1 set %MULTIVALUE_ASSES_27 REGENERATION|A_B_REG|1 set %MULTIVALUE_ASSES_28 RESISTS|A_B_RES|1 set %MULTIVALUE_ASSES_29 RESONANCE|A_B_R|1 set %MULTIVALUE_ASSES_30 SELF_REPAIR|A_B_SR|1 set %MULTIVALUE_ASSES_31 SLAYER_CHECK|A_B_SLAYERNAME|2 set %MULTIVALUE_ASSES_32 SKILL_BONUS|A_B_SKILL|1 set %MULTIVALUE_ASSES_33 SOUL_CHARGE|A_B_SCH|1 set %MULTIVALUE_ASSES_34 SPELL_CHANNELING|A_B_SC|1 set %MULTIVALUE_ASSES_35 SPEEL_DAMAGE_INCREASE|A_B_SDI|1 set %MULTIVALUE_ASSES_36 SPLINTERING_WEAPON|A_B_SW|1 set %MULTIVALUE_ASSES_37 SWING_SPEED_INCREASE|A_B_SSI|1 set %MULTIVALUE_ASSES_38 STAT_BONUS|A_B_STAT|1 set %MULTIVALUE_ASSES_39 VELOCITY|A_B_VEL|1 set %MULTIVALUE_ASSES_MAX 39 return ;sub Asses_item v 1.1 -> p 1(2) -> d getproperty asses_display_erase sub Asses_item set %asses_old_lpc #lpc set #lpc 1000 set %asses_display #false if %0 = 2 set %asses_display %2 set %asses_item_id %1 gosub asses_azzera IF #FINDID <> %asses_item_id { FINDITEM %asses_item_id IF #FINDCNT < 1 { set #lpc %asses_old_lpc event exmsg #charid 3 %menu_col_ko NON TROVO L'OGGETTO set %asses_pass N/A return } } set %asses_item_type #findtype if %asses_item_type notin %equip { set #lpc %asses_old_lpc event exmsg #charid 3 %menu_col_ko NON RICONOSCO L' EQUIP set %asses_name UNKNOW %asses_item_id TYPE %asses_item_type set %asses_pass N/A return } gosub getproperty %asses_item_id set %asses_property #result if ( %asses_item_type IN %medarmor ) || ( mage , #SPC , armor IN %asses_property ) SET !asses_medable #TRUE if %asses_display gosub asses_display_erase gosub Split_to_Array %asses_property $ asses_line set !asses_linemax #result if !asses_linemax > 0 { for !i 1 !asses_linemax { str len %asses_line . !i if #strres > 0 { set %asses_index %asses_index + 1 if slayer in %asses_line . !i && !i > 1 gosub Asses_Analizza_Slayer %asses_line . !i BHO else gosub Asses_Analizza_Linea %asses_line . !i BHO if %asses_display gosub Asses_Display_Linea if !linea_type = BHO { set !linea_value 1000 gosub debug_display ? -> %asses_line . !i } set %asses_value %asses_value + !linea_value } } } if !asses_resists > 0 { set %asses_index %asses_index + 1 set !linea_name Resists , #spc , Value , #spc , ( , !asses_resists , ) set !linea_type PROPERTY set !linea_subvalue 0 IF %asses_item_type IN %hats set !asses_resists ( !asses_resists - 12 ) IF %asses_item_type IN %armor && !asses_resists > 30 set !linea_subvalue ( !asses_resists / 4 ) + ( !asses_resists / 10 ) IF %asses_item_type NOTIN %armor set !linea_subvalue ( !asses_resists / 5 ) set !linea_subvalue !linea_subvalue * 10 set !linea_percent %A_B_RES set !linea_color aqua set !linea_value ( !linea_percent * !linea_subvalue ) / 100 if %asses_display gosub Asses_Display_Linea set %asses_value %asses_value + !linea_value } if !asses_skills > 0 { set %asses_index %asses_index + 1 set !linea_name Skills , #spc , Value , #spc , ( , !asses_skills , ) set !linea_type PROPERTY set !linea_subvalue 0 set !linea_subvalue ( !asses_skills / 3 ) * 10 set !linea_percent %A_B_SKILL set !linea_color aqua set !linea_value ( !linea_percent * !linea_subvalue ) / 100 if %asses_display gosub Asses_Display_Linea set %asses_value %asses_value + !linea_value } if !asses_fc > 0 && !asses_fcr > 0 set %asses_linea_bonus Bonus , #spc , Casting= , 50 , $ , %asses_linea_bonus if !asses_fc >= 0 && !asses_sc set %asses_linea_bonus Spell , #spc , Weapon= , 50 , $ , %asses_linea_bonus if !asses_lmc > 0 && !asses_lrc >= 10 set %asses_linea_bonus LRC , #spc , Special= , 50 , $ , %asses_linea_bonus if !asses_medable set %asses_linea_bonus Medable= , 20 , $ , %asses_linea_bonus gosub Split_to_Array %asses_linea_bonus $ asses_line set !asses_linemax #result if !asses_linemax > 0 { for !i 1 !asses_linemax { str len %asses_line . !i if #strres > 0 && %asses_line . !i <> N/A { set %asses_index %asses_index + 1 gosub split %asses_line . !i = set !linea_name %strleft set !linea_type BONUS set !linea_subvalue %strright set !linea_percent 100 set !linea_value %strright set !linea_color $00FF00 if %asses_display gosub Asses_Display_Linea set %asses_value %asses_value + !linea_value } } } if %asses_display { set %asses_index %asses_index + 2 set !linea_name VALORE set !linea_type TOTAL set !linea_subvalue %asses_value set !linea_percent 100 set !linea_value %asses_value set !linea_color Yellow gosub Asses_Display_Linea } if %asses_value >= %asses_pass_value set %asses_pass #true set #lpc %asses_old_lpc return %asses_value ;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 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 Check_tool v 1.2 -> p 1(3) -> d GetToolUses sub Check_tool ;%1 type object %2 minimo di usi %3 contid se diverso da backpackid set !limit 0 if %0 = 2 set !limit %2 set !ct_contid #BACKPACKID if %0 = 3 set !ct_contid %3 set %check_tool_result_uses 0 finditem %1 c_ , !ct_contid if #findkind <> -1 { if !limit > 0 { set !it_id #findid for #findindex 1 #findcnt { gosub GetToolUses #findid set %check_tool_result_uses %check_tool_result_uses + #result if %check_tool_result_uses > !limit break } if %check_tool_result_uses > !limit return !it_id } else { return #findid } } ;var return %check_tool_result_uses return #false ;sub Checkconnection v 1.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 Count_item_in_container v 1.0 -> p 1 -> GetProperty sub Count_item_in_container gosub GetProperty %1 set !ciic_prop #result str pos !ciic_prop contents: set !v #strres + 9 str del !ciic_prop 1 !v set !ciic_prop #strres str pos !ciic_prop / set !v #strres str del !ciic_prop !v 1000 return #strres ;sub Craft_bringupcraftmenu v 1.0 -> p 1(2) -> d waitForSysVars sub Craft_bringupcraftmenu ;this sub is made by Boydon ;* @name BringUpCraftMenu ;* @ver 1.1 15May05 ;* @author Boydon ;* @purpose bring up desidered craft menu ;* ;* @params %1 req The type/id of the tools you want to use. ;* If you prefer you can specify the name of the skill to use. ;* This can be tinker|tailor|smith|carpentry|bowcraft|alchemy|inscription|masonry|glassblow|cooking ;* ;* %2 opt This allow you to decide weather the script halts or not if a toolkit isn't found ;* inside your #backpack. This can have two values #true or #false. Default value ;* of this parameter is #true ;* ;* @returns This sub will return the id of the tools currently used (last #findid value): if you ;* called the sub using the skill name (look above) this is very usefull cause you can ;* know the exact id of the tool you are currently using and use it in various ways, as ;* example you can calculate how many uses it has left... If you called the sub with halt ;* option turned off returned value will be "X" (without the "" around) if a tool can't be found if %0 < 1 || %1 = N/A { display ok Wrong use of sub Craft_bringupcraftmenu: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 <= 1 set %2 #true if %2 <> #true && %2 <> #false { display ok Unexpected value for argument 2 in sub Craft_bringupcraftmenu! +$Please check!$ +$Script will be halted. halt } nameSpace Push nameSpace Local BringUpCraftMenu , #time , #random , #scnt2 set !ToolsType %1 set !Halt %2 set !must_find #true if %0 = 3 && %3 = NOFIND set !must_find #false if !ToolsType = tinker set !ToolsType JTL_GTL_KTL if !ToolsType = tailor set !ToolsType HAG if !ToolsType = smith set !ToolsType TLH_FBG_GBG_OLH_OBG_TBG if !ToolsType = carpentry set !ToolsType YFG_ZHG_CIG_BIG_AGG_EGG_AIG_WFG_IGG_KGG_ZFG if !ToolsType = bowcraft set !ToolsType UFG if !ToolsType = alchemy set !ToolsType RQF if !ToolsType = inscription set !ToolsType PBG if !ToolsType = masonry set !ToolsType ZEH if !ToolsType = glassblow set !ToolsType CQF if !ToolsType = Cooking set !ToolsType BCG_DND_OGG UseTools: set !StartContKind #contkind set !StartContName #contname set !StartContSize #contsize FindTools: if !must_find { finditem !ToolsType C_ , #backpackid if #findkind = -1 && !Halt { display ok Impossible to find any craft tool in your backpack! +$Script will be halted. halt } if #findcol <> 0 { display ok You seem to have some runik kits in your back pack! $Script will ignore them! ignoreitem #findid runikkits goto FindTools } if #findkind <> -1 set #lobjectid #findid } else { set #lobjectid !ToolsType } Event Macro 17 0 ;Last Object wait 12 gosub waitForSysVars contkind <> !StartContKind contname <> !StartContName contsize <> !StartContSize 5 if ! #result ;Craft Gump was already opened? { set !CloseGumpX #contposx + 50 set !CloseGumpY #contposy + 50 click !CloseGumpX !CloseGumpY r wait 5 goto UseTools } ignoreitem reset runikkits nameSpace Clear nameSpace Pop return #findid ;sub Craft_choosematerial v 1.0 -> p 1 -> d waitForSysVars sub Craft_choosematerial ;this sub is made by Boydon ;* @name ChooseMaterial ;* @ver 1.4 06Oct05 ;* @author Boydon ;* @purpose Choose the material you to use to craft ;* ;* @params %1 req material name: it can be: ;* iron|dull|shadow|copper|bronze|gold|agapite|verite|valorite|nocolor for Blacksmithy materials ;* leather|spined|horned|barbed|nocolor for Tailoring materials ;* ;* As of version 1.4 of the library you can use ingots #findcol as argument, so values can be: ;* 0|2419|2406|2413|2418|2213|2425|2207|2219 for Blacksmithy ;* 0|2220|2117|2129 for Tailoring ;* nocolor will be -1 ;* ;* @returns if %0 < 1 || %1 = N/A { display ok Wrong use of sub Craft_choosematerial: some required arguments are missing! +$Script will be halted. halt } nameSpace Push nameSpace Local ChooseMaterial , #time , #random , #scnt2 set !Material #false if %1 = iron || %1 = leather || %1 = 0 set !Material 1 if %1 = dull || %1 = spined || %1 = 2220 || %1 = 2419 set !Material 2 if %1 = shadow || %1 = horned || %1 = 2117 || %1 = 2406 set !Material 3 if %1 = copper || %1 = barbed || %1 = 2129 || %1 = 2413 set !Material 4 if %1 = bronze || %1 = 2418 set !Material 5 if %1 = gold || %1 = 2213 set !Material 6 if %1 = agapite || %1 = 2425 set !Material 7 if %1 = verite || %1 = 2207 set !Material 8 if %1 = valorite || %1 = 2219 set !Material 9 if %1 = nocolor || %1 = -1 set !Material 11 if ! !Material { display ok Unkwon material %1 in sub Craft_choosematerial ! $Script will be halted. halt } set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize clickMaterialCategory: set !MaterialX #contposx + 30 set !MaterialY #contposy + 370 click !MaterialX !MaterialY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto clickMaterialCategory clickMaterialColor: set !ColorX #contposx + 235 set !ColorY #contposy + ( 50 + ( 20 * !Material ) ) click !ColorX !ColorY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result clickMaterialColor nameSpace Clear nameSpace Pop return ;sub Craft_clickexit v 1.3 -> p 0 -> d waitForSysVars sub Craft_clickexit ;this sub is made by Boydon ;* @name ClickExit ;* @ver 1.0.1 14May05 ;* @author Boydon ;* @purpose Once the craft menu is focused use this to click the exit button ;* ;* @params ;* ;* @returns if %contsize_craftgump = N/A set %contsize_craftgump 530_457 nameSpace Push nameSpace Local ClickExit , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize set !ExitX #contposx + 30 set !ExitY #contposy + 430 if %shard_id = DEMISE set !ExitY #contposy + 410 ClickExit: click !ExitX !ExitY f gosub waitForSysVars contkind <> !CraftContKind contname <> !CraftContName contsize <> !CraftContSize 5 if ! #result && #contsize = %contsize_craftgump goto ClickExit nameSpace Clear nameSpace Pop return ;sub Craft_clickmakelast v 1.2 -> p 0 -> d waitForSysVars sub Craft_clickmakelast ;this sub is made by Boydon ;* @name ClickMakeLast ;* @ver 1.0 24Apr05 ;* @author Boydon ;* @purpose Once the craft menu is focused use this to click the make last button ;* ;* @params ;* ;* @returns nameSpace Push nameSpace Local ClickMakeLast , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize set !MakeLastX #contposx + 280 set !MakeLastY #contposy + 430 if %shard_id = DEMISE set !MakeLastY #contposy + 410 click !MakeLastX !MakeLastY f gosub waitForSysVars contkind <> !CraftContKind contname <> !CraftContName contsize <> !CraftContSize 5 gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 nameSpace Clear nameSpace Pop return ;sub Craft_clicknextpage v 1.0 -> p 0 -> d 0 sub Craft_clicknextpage ;this sub is made by Boydon ;* @name ClickNextPage ;* @ver 1.0 24Apr05 ;* @author Boydon ;* @purpose Once the craft menu is focused use this to click the next page button ;* ;* @params ;* ;* @returns nameSpace Push nameSpace Local ClickNextPage , #time , #random , #scnt2 set !NextPageX #contposx + 385 set !NextPageY #contposy + 270 click !NextPageX !NextPageY f wait 10 nameSpace Clear nameSpace Pop return ;sub Craft_craftanything v 1.0 -> p 2 -> d waitForSysVars craft_ClickNextPage sub Craft_craftanything ;this sub is made by Boydon ;* @name CraftAnything ;* @ver 1.1 16May05 ;* @author Boydon ;* @purpose craft the desiderd item from the menu ;* ;* @params %1 req the category number Where "LAST TEN" is category numer 0 and so on ;* I decided to give "LAST TEN" number 0 cause it is pretty useless as category ;* %2 req number of the piece to craft. This must be an absolute number. ;* Because of menues having more than one page you have to count item numer from 1, ;* so on page 1 there will be items from 1 to 10, on page 2 from 11 to 20 and so on.. ;* ;* @returns if %0 < 2 || %1 = N/A || %2 = N/A { display ok Wrong use of sub Craft_craftanything: some required arguments are missing! +$Script will be halted. halt } nameSpace Push nameSpace Local CraftAnything , #time , #random , #scnt2 set !category %1 set !piece %2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize ; category set !categoryX #contposx + 30 set !categoryY #contposy + 70 + !category * 20 click !categoryX !categoryY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 ; page set !page ( !piece - 1 ) / 10 if !page > 0 { for !i 1 !page { gosub Craft_ClickNextPage } if !piece % 10 <> 0 set !piece !piece % 10 if !piece % 10 = 0 set !piece 10 } ;piece set !pieceX #contposx + 235 set !pieceY #contposy + 50 + !piece * 20 click !pieceX !pieceY f gosub waitForSysVars contkind <> !CraftContKind contname <> !CraftContName contsize <> !CraftContSize 5 gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 nameSpace Clear nameSpace Pop return ;sub Craft_object v 1.0 -> p -> d Menu_Info_Quest_Step Antiblock GetCraftingTools Craft_BringUpCraftMenu Craft_ChooseMaterial Craft_CraftAnything Craft_ClickMakeLast Craft_ClickExit sub Craft_object set !co_tooltype %1 set !co_category %2 set !co_piece %3 set !co_objecttype %4 set !co_material %5 set !co_tot_amount %6 set !co_already %7 set !co_item 0 set !AlreadyCraftedFound #false set !co_amount !co_tot_amount set !co_first #true set !nofind N/A if !co_objecttype = !co_tooltype set !nofind NOFIND co_point1: gosub Antiblock finditem !co_objecttype C_ , #backpackid if #findkind <> -1 { if ! !co_already { ignoreitem #findid co_alreadycrafted goto co_point1 } if !co_already { if #findcol <> !co_material && !co_material <> cloth { ignoreitem #findid co_alreadycrafted goto co_point1 } set !co_item !co_item + 1 set !co_amount !co_amount - 1 ignoreitem #findid co_pieces set !AlreadyCraftedFound #true if !co_amount <= 0 { ignoreitem reset co_alreadycrafted ignoreitem reset co_pieces return OK } if !co_amount > 0 goto co_point1 } } co_point2: ;set %lpc #lpc ;set #lpc 100 set !co_dafare !co_tot_amount - !co_item for !co_i 1 !co_dafare { gosub Antiblock if %RemUses < 0 { display ok Remuses Problems pause } if %RemUses = 0 { set %CurrentTool %CurrentTool + 1 if %CurrentTool > %ToolCount { gosub GetCraftingTools ! co_tooltype if %TotalUses < { ignoreitem reset co_alreadycrafted ignoreitem reset co_pieces return NEED_TOOL } set %CurrentTool 1 } set %RemUses %ToolRU . %CurrentTool gosub Craft_BringUpCraftMenu %ToolId . %CurrentTool #true !nofind } if !co_first { set %CurrentTool 1 set %RemUses %ToolRU . %CurrentTool gosub Craft_BringUpCraftMenu %ToolId . %CurrentTool #true !nofind if !co_material <> Cloth && !co_material <> !co_LastMaterial { set !co_LastMaterial !co_material gosub Craft_ChooseMaterial !co_material } gosub Craft_CraftAnything !co_Category !co_Piece set !co_first #false } else { gosub Craft_ClickMakeLast } wait 10 set %RemUses %RemUses - 1 set !co_findtry 0 co_point3: set !co_findtry !co_findtry + 1 finditem !co_objecttype C_ , #backpackid if #findkind = -1 && !co_findtry < 15 { wait 3 goto co_point3 } if #findkind <> -1 { set !co_item !co_item + 1 set !co_amount !co_amount - 1 Event Sysmessage Fatto !co_item ne manca !co_amount ignoreitem #findid co_pieces } } ;set #lpc %lpc gosub Craft_ClickExit ignoreitem reset co_alreadycrafted ignoreitem reset co_pieces if !co_amount > 0 return ERROR return OK ;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_quest_tool v 1.2 -> p 1 -> d GetCraftingTools Craft Conta_Stack_Item Set_Menu_Azione Menu_Info_Quest_Clear sub Crea_quest_tool set !questtooltype %1 set !questtoolquantity %2 cqt_point_start: gosub Set_Menu_Azione CREA QUEST TOOL %Nome_ . !questtooltype gosub Conta_Stack_Item %Type_lingotti #backpackid 0 if #result < ( %Resource_ . !questtooltype * !questtoolquantity ) return NEED_INGOT if %Type_tools_tinker = N/A set %Type_tools_tinker JTL_GTL_KTL if %Type_toolkit = N/A set %Type_toolkit KTL gosub GetCraftingTools %Type_tools_tinker if %TotalUses < !questtoolquantity { gosub Crea_Tinker_Tool 2 if #result = OK goto cqt_point_start return #result } gosub Craft_object %Type_toolkit %Voce_ . !questtooltype %Index_ . !questtooltype !questtooltype 0 !questtoolquantity #false set !r_mq #result return !r_mq ;sub Crea_tinker_tool v 1.1 -> p 1 -> d GetCraftingTools Craft Conta_Stack_Item Set_Menu_Azione Menu_Info_Quest_Clear sub Crea_tinker_tool set !tinkertoolquantity %1 gosub Set_Menu_Azione CREA_TINKER_TOOL gosub Conta_Stack_Item %Type_lingotti #backpackid 0 if #result < ( %Resource_ . %Type_toolkit * !tinkertoolquantity ) return NEED_INGOT if %Type_tools_tinker = N/A set %Type_tools_tinker JTL_GTL_KTL if %Type_toolkit = N/A set %Type_toolkit KTL gosub GetCraftingTools %Type_tools_tinker if %TotalUses < !tinkertoolquantity return NEED_TOOL gosub Craft_object %Type_toolkit %Voce_ . %Type_toolkit %Index_ . %Type_toolkit %Type_toolkit 0 !tinkertoolquantity #false set !r_mq #result return !r_mq ;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 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 Findtooluseless v 1.0 -> p 3 -> d sub Findtooluseless finditem %1 %2 , %3 if #findkind = -1 return set !ftu_min_uses 9999 for #findindex 1 #findcnt { gosub GetToolUses #findid if #result < !ftu_min_uses { set !ftu_index #findindex set !ftu_min_uses #result } } set #findindex !ftu_index return !ftu_min_uses ;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_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 Getcraftingtools v 1.0 -> p 1 -> d GetToolUses antiblock sub Getcraftingtools set %TotalUses 0 set %ToolCount 1 set %ToolTipo %1 gsk1: gosub antiblock finditem %ToolTipo C_ , #backpackid if #findkind <> -1 { if #findcol <> 0 { Event Sysmessage This seems to be a runic kit! ignoreitem #findid tools goto gsk1 } gosub GetToolUses #findid set %TotalUses ( %totaluses + #result ) set %ToolId . %ToolCount #findid set %ToolRU . %ToolCount #result if %TotalUses < %MakeQuantity { ignoreitem %ToolId . %ToolCount tools set %ToolCount %ToolCount + 1 goto gsk1 } } ignoreitem reset tools set %CurrentTool 1 set %RemUses %ToolRU . %CurrentTool return ;sub Getproperty v 1.0 -> p 1 -> d 0 sub Getproperty GetProperty_loop1: event property %1 ;id object set !Property1 #property event property %1 set !Property2 #property event property %1 set !Property3 #property if ! ( !Property1 = !Property2 && !Property2 = !Property3 ) goto GetProperty_loop1 return #property ;sub Gettooluses v 1.0 -> p 1 -> d GetProperty sub Gettooluses gosub GetProperty %1 ;id object str pos #result Uses Remaining set !RemUses #strres + 15 str del #result 1 !RemUses set !RemUses #strres str pos !RemUses $ str del !RemUses #strres 100 return #strres ;sub Globalvalues_all v 1.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 Is_num v 1.0 -> p 1 -> d 0 sub Is_num set !is_num_val %1 * 2 if %1 = !is_num_val / 2 return #true return #false ;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_npc v 1.1 -> p 5(6) -> d 0 sub Menu_crea_linea_npc 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 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 NPC !id_Linea if !o_linea = #true menu font color yellow set !x !x_linea + 185 menu text txtNPC_ . !id_linea !x !y %NPC_ . !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 butNPC_ . !id_Linea !xt !yt 22 !ht SET if !o_linea = #false { set !xt !x_linea + !w_linea - 15 menu button butResetNPC_ . !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_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_npc v 1.0 -> p 1 -> d 0 sub Menu_set_npc set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 event exmsg #charid 3 %menu_col_i Targhetta NPC !pID gosub Set_Menu_Mex CLICCA SU UN NPC $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL NPC gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid G_20 if #findtype notin %Type_NPC { event exmsg #charid 3 %menu_col_ko NON RICONOSCO QUESTO NPC ( #findtype ) } else { return !oggid } } 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 Move_fra_chest v 1.1 -> p 3(5) -> d open_container sposta_item sub Move_fra_chest set !cont_from %1 set !object_id %2 set !beetle_id %3 set !move_stack N/A set !move_check_col #false if %0 >= 4 set !move_stack %4 if %0 >= 5 set !move_check_col #true if !move_check_col set !move_col %5 set !forse_cont_chiuso #true goto mtb_findobject mtb_opencontainer: gosub open_container !cont_from 5 if #result = #false { event exmsg #charid 3 %menu_col_ko CONTAINER NON TROVATO IN sub Move_fra_chest goto mtb_opencontainer } set !forse_cont_chiuso #false mtb_findobject: finditem !object_id c_ , !cont_from if #findkind = -1 { if !forse_cont_chiuso goto mtb_opencontainer ignoreitem reset move_fra_chest return 0 } if !move_check_col { if !move_col <> #findcol { ignoreitem #findid move_fra_chest goto mtb_findobject } } if #findstack < !move_stack || !move_stack = N/A set !move_stack #findstack gosub sposta_item #findid !beetle_id !move_stack ignoreitem reset move_fra_chest return !move_stack ;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 Prendi_tool_uses v 1.2 -> p 3(7) -> d apri_bank antiblock findtooluseless sub Prendi_tool_uses set !ptu_tooltype %1 set !ptu_chestfrom %2 set !ptu_needuses %3 set !ptu_uses 0 set !cont_da_aprire #true set !col_limit NO if %0 < 4 set !ptu_chestdest #backpackid else set !ptu_chestdest %4 if %0 >= 5 && %5 = BANK { set !usa_bank #true set !bankid %6 } if %0 >= 7 set !col_limit %7 set #NEXTCPOSX 820 set #NEXTCPOSY 480 goto ptu_get_object ptu_find_contenitore: ignoreitem reset prendi_tool_uses if !usa_bank { gosub apri_bank !bankid if #result = #false return 0 } else { finditem !ptu_chestfrom g_ , 2 if #findkind = -1 return 0 } set !prove 0 ptu_apri_contenitore: if !prove > 5 return #false set !prove !prove + 1 set #LOBJECTID !ptu_chestfrom event macro 17 0 wait 30 gosub antiblock if #contID <> !ptu_chestfrom goto ptu_apri_contenitore set !cont_da_aprire #false ptu_get_object: ;finditem !ptu_tooltype c_ , !ptu_chestfrom gosub findtooluseless !ptu_tooltype c_ !ptu_chestfrom if #findkind = -1 { if !cont_da_aprire goto ptu_find_contenitore else { ignoreitem reset prendi_tool_uses return !ptu_uses } } if !col_limit <> NO { if #findcol <> !col_limit { ignoreitem #findid prendi_tool_uses goto ptu_get_object } } ;gosub GetToolUses #findid set !ptu_uses !ptu_uses + #result Exevent Drag #findID 1 gosub antiblock NO_ALARM_EVENT Exevent Dropc !ptu_chestdest wait 10 if !ptu_uses > !ptu_needuses { ignoreitem reset prendi_tool_uses return !ptu_needuses } goto ptu_get_object return #true ;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 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_sizegump v 1.1 -> p 1(2) -> d 0 sub Wait_sizegump set !gumpsizedaattendere %1 ;size gump set !errwg #scnt + 10 if %0 = 2 set !errwg #scnt + %2 wsg_subloop: wait 2 if #CONTSIZE = !gumpsizedaattendere return #true if #scnt < !errwg goto wsg_subloop return #false ;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 ;sub Walk_pepito_rail v 1.0 -> p 0(1) -> d PathFind sub Walk_pepito_rail set !inverse NORMAL if %0 = 1 && %1 = INVERSE set !inverse INVERSE set !i_spot 1 set !add_spot 1 if !inverse = INVERSE { set !i_spot %maxspot set !add_spot -1 } Set !nsbagli 0 rivaispot_walk_rail: if !inverse = NORMAL { if !i_spot > %maxspot goto endspot_walk_rail } else { if !i_spot < 1 goto endspot_walk_rail } gosub PathFind %x . !i_spot %y . !i_spot %z . !i_spot if #result = #false { if !nsbagli > 10 return #false } set !i_spot !i_spot + !add_spot goto rivaispot_walk_rail endspot_walk_rail: return #true ;################## GENERIC SUB FINISH ########################## ;################## CUSTOM SUB START ############################ ;sub Check_heartwood sub Check_heartwood if #CHARPOSX > 6979 && #CHARPOSX < 7099 && #CHARPOSY > 334 && #CHARPOSY < 420 { if #cursKind = 1 { ignoreitem reset quest_npc finditem %quest_npc g_5 if #findkind = -1 { gosub Walk_Pepito_Rail NORMAL } return #true } } return #false ;sub Check_recipe_flag sub Check_recipe_flag set !recipe_to_esaminate %1 set !prove_check 0 ri_checkrecipeflag: set !prove_check !prove_check + 1 gosub GetProperty !recipe_to_esaminate set !prop #result set !l recipe_ , %Type_quest , _max set !l2 recipe_ , %Type_quest , _flag set !find_recipe #false for !recipe_contc 1 % . !l { set !l3 recipe_ , %Type_quest , _ , !recipe_contc set !recipe_check [ , % . !l3 , ] if !recipe_check in !prop { set !find_recipe #true str mid % . !l2 !recipe_contc 1 if #strres = 1 { gosub replace % . !l3 #spc _ gosub replace #strres ' _ gosub replace #strres ( gosub replace #strres ) set %name_recipe #strres set #result #true } else { set #result #false } break } } if !find_recipe = #false { if !prove_check < 5 goto ri_checkrecipeflag display ok NON LA TROVO $ !prop halt } return #result ;sub Check_tool_e_risorse d Conta_Stack_Item Check_Tool Crea_Tinker_Tool Crea_Quest_Tool sub Check_tool_e_risorse riprova_cter: ;bod if #scnt > %timer_bod && %ritiro_bod return BOD if %quest_must_make = #false { if %type_quest = BOWCRAFTER { gosub Conta_Stack_Item %Type_Crossbow_bolt #backpackid 0 menu set txtAmount_Material #result if #result < %quest_amount { set %return_error NEED_RESOURCE return #false } } return #true } if %usetinker { ;toolkit set !t 5 if %Type_toolkit = %quest_tool set !t !t + %quest_amount gosub Check_Tool %Type_tools_tinker !t if #result = #false { gosub Crea_Tinker_Tool 2 if #result = OK goto riprova_cter set %return_error #result return #false } } ;quest_tool if %Type_toolkit <> %quest_tool || %usetinker = #false { gosub Check_Tool %quest_tool_family %quest_amount if #result = #false { if %usetinker { gosub Crea_Quest_Tool %quest_tool 2 if #result = OK goto riprova_cter set %return_error #result } else { set %return_error NEED_TOOL } return #False } } ;iron, cloth, board if %quest_material = %Type_lingotti || %quest_material = %Type_cloth || %quest_material = %Type_boards { gosub Conta_Stack_Item %quest_material #backpackid 0 set !t %quest_amount * %Material_Cost if #result < !t { set %return_error NEED_RESOURCE return #FALSE } } return #true ;sub Click_toggle_mode sub Click_toggle_mode click_toggle_mode: set !t #scnt + 2 exevent popup #charid while #scnt < !t && #contkind <> MCGC && #contkind <> UEJB wait 1 if #contkind <> MCGC && #contkind <> UEJB goto click_toggle_mode set !jstart_fq #jindex set !err #scnt + 2 set !x #contposx + 50 set !y #contposy + 117 click !x !y gosub Antiblock NO_ALARM_EVENT set !ok #false while #scnt < !err && !ok = #false { for !i !jstart_fq #jindex { scanjournal !i if : notin #journal { if TARGET_THE_ITEM in #journal { set !ok #true break } } } } if ! !ok goto click_toggle_mode return ;sub Complete_quest sub Complete_quest gosub Set_Menu_Azione COMPLETO QUEST menu set txtQuest_Get FINITA gosub Menu_Info_Quest_Step 4 ricerca_complete_quest_npc: ignoreitem reset quest_npc finditem %quest_npc g_20 if #findkind = -1 { event exmsg #charid 3 40 Non trovo %quest_npc wait 1s goto ricerca_complete_quest_npc } if #FINDDIST > 5 { gosub PathFind #findx #findy #findz if #result = #false goto ricerca_complete_quest_npc } ignoreitem %quest_npc quest_npc loop_complete_quest: wait 10 set #lobjectid %quest_npc event macro 17 0 gosub Antiblock wait 10 if #contsize <> 507_436 goto loop_complete_quest wait 10 loop_accetta_premio: set !c_x 132 + #contposx set !c_y 402 + #contposy click !c_x !c_y f wait 10 gosub Antiblock if #contsize = 507_436 goto loop_accetta_premio event exmsg #charid 3 30 Quest completata! gosub Antiblock set %cont_quest %cont_quest + 1 menu set txtQuest_Finite %cont_quest gosub Menu_Info_Quest_Step 0 return #true ;sub Craft d Menu_Info_Quest_Step Antiblock GetCraftingTools Craft_BringUpCraftMenu Craft_ChooseMaterial Craft_CraftAnything Craft_ClickMakeLast Craft_ClickExit sub Craft set %CraftStart %1 set %CraftStop %2 set %ItemAmmount 0 gosub Menu_Info_Quest_Step 1 ci1: gosub Antiblock finditem %type C_ , #backpackid if #findkind <> -1 { if %UseAlreadyCrafted = N/A set %UseAlreadyCrafted #false if ! %UseAlreadyCrafted { ignoreitem #findid alreadycrafted goto ci1 } if %UseAlreadyCrafted { if #findcol <> %Material && %Material <> cloth { ignoreitem #findid alreadycrafted goto ci1 } set %ItemAmmount %ItemAmmount + 1 Menu set txtItem_Make %ItemAmmount set %CraftStop %CraftStop - 1 set %MakeQuantity %MakeQuantity - 1 ignoreitem #findid bodpieces if ( %AlreadyCraftedFound = N/A ) || ( ! %AlreadyCraftedFound ) set %AlreadyCraftedFound #true if %MakeQuantity <= 0 { ignoreitem reset alreadycrafted ignoreitem reset bodpieces return OK } if %MakeQuantity > 0 goto ci1 if %MakeQuantity = 0 { ignoreitem #findid alreadycrafted goto ci1 } } } c2: set %lpc #lpc set #lpc 100 for %i %CraftStart %CraftStop { gosub Antiblock if %RemUses < 0 { Event Sysmessage Remuses Problems pause } if %RemUses = 0 { set %CurrentTool %CurrentTool + 1 if %CurrentTool > %ToolCount { gosub GetCraftingTools %quest_tool_family if %TotalUses < %makequantity { ignoreitem reset alreadycrafted ignoreitem reset bodpieces return NEED_TOOL } set %CurrentTool 1 } set %RemUses %ToolRU . %CurrentTool ;menu set txttoolid %ToolId . %CurrentTool ;menu set txttoolru %RemUses ;call CraftMenuFunctions.euo BringUpCraftMenu %ToolId . %CurrentTool gosub Craft_BringUpCraftMenu %ToolId . %CurrentTool } if %i = 1 { set %CurrentTool 1 set %RemUses %ToolRU . %CurrentTool ;menu set txttoolid %ToolId . %CurrentTool ;menu set txttoolru %RemUses ;call CraftMenuFunctions.euo BringUpCraftMenu %ToolId . %CurrentTool gosub Craft_BringUpCraftMenu %ToolId . %CurrentTool if %Material <> Cloth && %Material <> %LastMaterial { set %LastMaterial %Material ;call CraftMenuFunctions.euo ChooseMaterial %Material gosub Craft_ChooseMaterial %Material } ;call CraftMenuFunctions.euo CraftAnything %Category %Piece gosub Craft_CraftAnything %Category %Piece } if %i <> 1 { ;call CraftMenuFunctions.euo ClickMakeLast gosub Craft_ClickMakeLast } wait 10 set %RemUses %RemUses - 1 ;menu set txttoolru %RemUses set %findtry 0 c3: set %FindTry %FindTry + 1 finditem %type C_ , #backpackid if #findkind = -1 && %FindTry < 15 { wait 3 goto c3 } if #findkind <> -1 { set %FoundItem #findid set %ItemAmmount %ItemAmmount + 1 Menu set txtItem_Make %ItemAmmount set %MakeQuantity %MakeQuantity - 1 Event Sysmessage Fatto %ItemAmmount ne manca %MakeQuantity ignoreitem #findid bodpieces } } set #lpc %lpc ;call CraftMenuFunctions.euo ClickExit gosub Craft_ClickExit ignoreitem reset alreadycrafted ignoreitem reset bodpieces if %MakeQuantity > 0 return ERROR return OK ;sub Crea_lista_item_e_container sub Crea_lista_item_e_container if %chest_resource = N/A set %chest_resource %chest_base if %chest_tool = N/A set %chest_tool %chest_base if %chest_recipe = N/A set %chest_recipe %chest_base if %chest_talisman = N/A set %chest_talisman %chest_base if %chest_runic = N/A set %chest_runic %chest_base if %chest_equip = N/A set %chest_equip %chest_base if %chest_other = N/A set %chest_other %chest_base set %prize_to_move %Type_recipe , %Type_Runic , %equip , %type_FireHorn , %Type_talisman return ;sub Crea_menu_avviato sub Crea_menu_avviato set !lpc #lpc set #lpc 1000 set %h_menu 350 set %w_menu 250 set %w_menu_tot %w_menu 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_stato %h_menu - 13 set %y_loot 55 set !y_info 294 set !y_quest 237 ;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 set !x !xb + 6 set !y !yb + 3 menu font bgcolor $333333 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 ;loot Menu Font Color white set !yb %y_loot set !xb 2 set !wb %w_menu - 4 set !hb 180 gosub Menu_Crea_Box !xb !yb !wb !hb LOOT PREMI menu font size 5 menu font style b menu font color silver set !y !yb + 15 menu font bgcolor $002222 menu text txt 10 !y PREMIO menu text txt 145 !y TENUTI menu text txt 205 !y TRASH ;fine loot ;quest Menu Font Color white set !yb !y_quest set !xb 2 set !wb %w_menu - 4 set !hb 55 set !yh 9 gosub Menu_Crea_Box !xb !yb !wb !hb QUEST menu font color silver menu font size 5 set !y !yb + 2 set !x !xb + 50 menu font bgcolor $004444 menu text txt !x !y MATERIALE menu font color white set !y !yb + 2 set !x !xb + 95 menu text txt !x !y %quest_material_name menu font color silver set !y !yb + 2 set !x !xb + 130 menu text txtAmount_Material !x !y 0 menu font size 6 menu font style b menu font color yellow set !y !yb + 15 set !x !xb + 5 menu text txtStep1 !x !y set !y !y + !yh menu text txtStep2 !x !y set !y !y + !yh menu text txtStep3 !x !y set !y !y + !yh menu text txtStep4 !x !y set !y !y_quest + 15 menu font color silver set !x !xb + 15 menu font bgcolor $002222 menu text txt !x !y ITEM set !y !y + !yh menu text txt !x !y QUEST set !y !y + !yh menu text txt !x !y TOGGLE set !y !y + !yh menu text txt !x !y FINITE set !y !y_quest + 15 set !x !xb + 52 menu font color white menu text txtItem_Name !x !y set !y !y + !yh menu text txtType_Quest !x !y set !y !y + !yh menu text txtItem_Toggle !x !y set !y !y + !yh menu text txtQuest_Finite !x !y menu font color red set !x !xy + 78 menu text txtQuest_error !x !y menu font color silver set !y !y_quest + 15 set !x !xb + 115 menu font color silver menu text txt !x !y FATTI set !x !xb + 113 set !y !y + !yh menu text txt !x !y STATO set !y !y + !yh set !x !xb + 65 menu text txt !x !y DI set !y !y_quest + 15 set !x !xb + 143 menu font color white menu text txtItem_Make !x !y set !y !y + !yh menu text txtQuest_Get !x !y set !y !y + !yh set !x !xb + 78 menu text txtToggle_AMount !x !y set !y !y_quest + 15 set !x !xb + 155 menu font color silver menu text txt !x !y DI set !y !y_quest + 15 set !x !xb + 168 menu font color white menu text txtItem_Amount !x !y gosub Menu_Info_Quest_Clear ;fine_quest ;info set !yb !y_info set !xb 2 set !wb %w_menu - 4 set !hb 38 menu font color white gosub Menu_Crea_Box !xb !yb !wb !hb INFO menu font color Silver menu font size 6 menu font bgcolor $002222 set !x !xb + 115 set !y !yb + 15 menu text txt !x !y CONN.LOST set !x !xb + 5 menu text txt !x !y CICLI set !y !y + 9 menu text txt !x !y TEMPO set !x !xb + 115 menu text txt !x !y BEETLE ID menu font color WHITE menu font size 6 menu font bgcolor $000000 set !x !xb + 165 set !y !yb + 15 menu text txtConnLost !x !y %cont_connLost set !x !xb + 35 menu text txtCont_Cicli !x !y %cont_cicli set !y !y + 9 menu text txtTempo !x !y 0 set !x !xb + 165 if %usa_beetle menu text txtID_BEETLE !x !y %id_beetle else menu text txtID_BEETLE !x !y NO ;fine_info ;stato menu font name Tahoma Menu Font Color white Menu Font Style b Menu font size 6 set !x 5 set !y !y_stato menu text txt !x !y AZIONE: set !x %w_menu_tot - 62 if %ritiro_bod menu text txtCicliBod !x !y %cont_bod set !x %w_menu_tot - 52 if %ritiro_bod menu text txtBODLABEL !x !y BOD: set !x 40 Menu Font Color yellow menu text txtAzione !x !y CREA MENU set !x %w_menu_tot - 30 menu text txtBODTIME !x !y ;debug if %debug { set !w_menu %w_menu_tot + 105 Menu Window size !w_menu %h_menu set !yb 0 set !xb %w_menu_tot set !wb !w_menu - %w_menu_tot set !hb %h_menu set !hbut 16 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_HEARTWOOD !x !y !w 17 VAI HEARTWOOD set !y !y + !hbut Menu Button VAI_TIPO !x !y !w 17 VAI DAL TIPO set !y !y + !hbut Menu Button GET_FROM_BEETLE !x !y !w 17 GET FROM BEETLE set !y !y + !hbut Menu Button MAKE_QUEST !x !y !w 17 MAKE QUEST set !y !y + !hbut Menu Button GET_QUEST !x !y !w 17 GET QUEST set !y !y + !hbut Menu Button FILLA_QUEST !x !y !w 17 FILLA QUEST set !y !y + !hbut Menu Button unFILLA_QUEST !x !y !w 17 unFILLA QUEST set !y !y + !hbut Menu Button COMPLETE_QUEST !x !y !w 17 COMPLETE QUEST set !y !y + !hbut Menu Button RESCINDI_QUEST !x !y !w 17 RESCINDI QUEST set !y !y + !hbut Menu Button ESCI_TIPO !x !y !w 17 ESCI DAL TIPO set !y !y + !hbut Menu Button TORNA_A_CASA !x !y !w 17 TORNA A CASA set !y !y + !hbut Menu Button RESTOCK !x !y !w 17 RESTOCK set !y !y + !hbut Menu Button SETACCIA_PREMI !x !y !w 17 SETACCIA PREMI set !y !y + !hbut Menu Button SPOSTA_PREMI !x !y !w 17 SPOSTA PREMI set !y !y + !hbut Menu Button CREA_TINKER_TOOL !x !y !w 17 CREA TINKER TOOL set !y !y + !hbut Menu Button CREA_QUEST_TOOL !x !y !w 17 CREA QUEST TOOL set !y !y + !hbut Menu Button GIRO_BOD !x !y !w 17 GIRO BOD set !y !y + !hbut Menu Button TEST_ALARM !x !y !w 17 TEST_ALARM set !y !yb + !hb - 18 Menu Button VAI !x !y !w 17 START } menu show 970 0 set #lpc !lpc return ;sub Drag_premi sub Drag_premi if !check . %nome_premio = N/A { set !check . %nome_premio #true if %nvocipremio = N/A set %nvocipremio 0 set %nvocipremio %nvocipremio + 1 set !ymvp %y_loot + 5 + ( %nvocipremio * 8 ) + 13 menu font size 6 menu font style b menu font color white menu text txt . %nome_premio 10 !ymvp %nome_premio menu font color yellow set !nv tot , %nome_premio , tnt set % . !nv 0 menu text txt . !nv 153 !ymvp 0 set !nv tot , %nome_premio , trs set % . !nv 0 menu text txt . !nv 213 !ymvp 0 } if %chest_dest = %temp_trash { set !nv tot , %nome_premio , trs ignoreitem %fid price_to_move } else { Exevent Drag %fid %fstack gosub AntiBlock NO_ALARM_EVENT Exevent Dropc %chest_dest gosub AntiBlock NO_ALARM_EVENT set !nv tot , %nome_premio , tnt wait 20 } set % . !nv % . !nv + %fstack menu set txt . !nv % . !nv return ;sub Drag_premi sub Drag_premi if !check . %nome_premio = N/A { set !check . %nome_premio #true if %nvocipremio = N/A set %nvocipremio 0 set %nvocipremio %nvocipremio + 1 set !ymvp %y_loot + 5 + ( %nvocipremio * 8 ) + 13 menu font size 6 menu font style b menu font color white menu text txt . %nome_premio 10 !ymvp %nome_premio menu font color yellow set !nv tot , %nome_premio , tnt set % . !nv 0 menu text txt . !nv 153 !ymvp 0 set !nv tot , %nome_premio , trs set % . !nv 0 menu text txt . !nv 213 !ymvp 0 } if %chest_dest = %temp_trash { set !nv tot , %nome_premio , trs ignoreitem %fid price_to_move } else { Exevent Drag %fid %fstack gosub AntiBlock NO_ALARM_EVENT Exevent Dropc %chest_dest gosub AntiBlock NO_ALARM_EVENT set !nv tot , %nome_premio , tnt wait 20 } set % . !nv % . !nv + %fstack menu set txt . !nv % . !nv return ;sub Entra_a_heartwood sub Entra_a_heartwood set !pf_inizioj #JINDEX + 1 pf_riprova_eah: event PathFind %posX_Heartwood %posY_Heartwood %posZ_Heartwood set !pf_error #scnt + 2 pf_attendipathfind_eah: 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 } } set !dist_x ABS ( %posX_inHeartwood - #charposx ) set !dist_y ABS ( %posY_inHeartwood - #charposy ) if !dist_x < 5 && !dist_y < 5 { goto pf_fattopathfind_eah } if #scnt > !pf_error { gosub antiblock goto pf_riprova_eah } goto pf_attendipathfind_eah pf_fattopathfind_eah: wait 20 return #true ;sub Esci_da_heartwood sub Esci_da_heartwood gosub Set_Menu_Azione ESCO DA HEARTWOOD set !pf_inizioj #JINDEX + 1 pf_riprova_edh: event PathFind %posX_exitHEARTWOOD %posY_exitHEARTWOOD %posZ_exitHEARTWOOD set !pf_error #scnt + 3 pf_attendipathfind_edh: 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 } } set !dist_x ABS ( %posX_outHeartwood - #charposx ) set !dist_y ABS ( %posY_outHeartwood - #charposy ) if !dist_x < 5 && !dist_y < 5 { goto pf_fattopathfind_edh } if #scnt > !pf_error { gosub antiblock goto pf_riprovapathfind_edh } goto pf_attendipathfind_edh pf_fattopathfind_edh: wait 20 return #true ;sub Eval_talisman sub Eval_talisman gosub GetProperty %1 set !property #result set !risp #false if %loot_slayer && slayer in !property return #true if %loot_summoning && summoning in !property return #true gosub split_to_array !property $ linea_talisman for !c_lineee 1 #result { if protection in %linea_talisman . !c_lineee { gosub split %linea_talisman . !c_lineee protection gosub trim %strleft BOTH if #result notin %ignored_monster { gosub Asses_get_property protection %linea_talisman . !c_lineee gosub replace #result + if ( #StrRes > %loot_protection_min ) { set !risp #true break } } } if killer in %linea_talisman . !c_lineee { gosub split %linea_talisman . !c_lineee killer gosub trim %strleft BOTH if #result notin %ignored_monster { gosub Asses_get_property killer %linea_talisman . !c_lineee gosub replace #result + if ( #StrRes > %loot_killer_min ) { set !risp #true break } } } if bonus in %linea_talisman . !c_lineee && exceptional notin %linea_talisman . !c_lineee { gosub split %linea_talisman . !c_lineee bonus gosub trim %strleft BOTH if #result notin %ignored_skill { gosub Asses_get_property bonus %linea_talisman . !c_lineee if ( #result > %loot_skill_min ) { set !risp #true break } } } if bonus in %linea_talisman . !c_lineee && exceptional in %linea_talisman . !c_lineee { gosub split %linea_talisman . !c_lineee bonus gosub trim %strleft BOTH if #result notin %ignored_skill { gosub Asses_get_property bonus %linea_talisman . !c_lineee if ( #result > %loot_skillx_min ) { set !risp #true break } } } } if !risp return #true return #false ;sub Filla_quest sub Filla_quest gosub Set_Menu_Azione TOGGLE QUEST ITEM gosub Menu_Info_Quest_Step 3 set %filla_err_type N/A set !all_already_toogled #true set !filla_ok #false re_find_quest: finditem %type C_ , #backpackid if #findkind = -1 || #findcnt < %quest_amount { if #targcurs = 1 key esc return #false } gosub click_toggle_mode set %ItemAmmount 0 set !ji #jindex for #FINDINDEX 1 #FINDCNT { wait 5 if that_item_does_not in #sysmsg { if #targcurs = 1 key esc set %filla_err_type ITEM_ERR return #false } target 1s if #targcurs = 0 gosub click_toggle_mode set %ItemAmmount %ItemAmmount + 1 menu set txtItem_Toggle %ItemAmmount if #findcol = 1258 { Event Sysmessage Gia Toggle %ItemAmmount di %quest_amount } if #findcol = 0 { set #ltargetid #findid set #ltargetkind 1 event macro 22 0 gosub Antiblock NO_ALARM_EVENT set !all_already_toogled #false } if %ItemAmmount >= %quest_amount { if !all_already_toogled { set !filla_ok #true break } gosub Wait_Journal_Msg 5 !ji YOUR_QUEST_IS_COMPLETE set !filla_ok #result break } } if ! !filla_ok goto re_find_quest wait 20 if #targcurs = 1 key esc return #true ;sub Filla_quest_stack sub Filla_quest_stack gosub Set_Menu_Azione TOGGLE QUEST ITEM gosub Menu_Info_Quest_Step 3 set !filla_ok #false set %filla_err_type N/A re_find_quest_stack: finditem %type C_ , #backpackid if #findkind = -1 || #FINDSTACK < %quest_amount { if #targcurs = 1 key esc set %filla_err_type ITEM_ERR return #false } gosub click_toggle_mode set !ji #jindex wait 5 if that_item_does_not in #sysmsg { if #targcurs = 1 key esc return #false } target 1s if #targcurs = 0 gosub click_toggle_mode menu set txtItem_Toggle %quest_amount if #findcol = 1258 { Event Sysmessage Gia Toggle %quest_amount di %quest_amount } if #findcol = 0 { set #ltargetid #findid set #ltargetkind 1 event macro 22 0 gosub Antiblock NO_ALARM_EVENT } gosub Wait_Journal_Msg 5 !ji YOUR_QUEST_IS_COMPLETE if ! #result goto re_find_quest_stack if #targcurs = 1 key esc return #true ;sub Get_from_beetle sub Get_from_beetle gosub Set_Menu_Azione GET FROM BEETLE if %type_quest = BOWCRAFTER { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo gosub unmount %type_beetle_mounted %id_beetle gosub Open_backpack_beetle %id_beetle %cont_beetle gosub Prendi_stack_oggetto %Type_Crossbow_bolt %cont_beetle !tot 0 NOFINDCONT gosub Conta_Stack_Item %Type_Crossbow_bolt #backpackid 0 set !tot_bolt #result menu set txtAmount_Material !tot_bolt gosub mount %id_beetle %type_beetle_mounted wait 10 return } if %type_quest = TINKER { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo gosub unmount %type_beetle_mounted %id_beetle gosub Open_backpack_beetle %id_beetle %cont_beetle gosub Prendi_stack_oggetto %Type_lingotti %cont_beetle !tot 0 NOFINDCONT gosub Conta_Stack_Item %Type_lingotti #backpackid 0 set !tot_iron #result menu set txtAmount_Material !tot_iron gosub mount %id_beetle %type_beetle_mounted wait 10 return } if %type_quest = BLACKSMITH { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo gosub unmount %type_beetle_mounted %id_beetle gosub Open_backpack_beetle %id_beetle %cont_beetle gosub Prendi_stack_oggetto %Type_lingotti %cont_beetle !tot 0 NOFINDCONT gosub Conta_Stack_Item %Type_lingotti #backpackid 0 set !tot_iron #result menu set txtAmount_Material !tot_iron if ! %usetinker && !tot_iron > %quest_amount * %Material_Cost { set !need_uses !tot_iron / %Material_Cost gosub check_tool %quest_tool_family !need_uses if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %cont_beetle !need_uses #backpackid } } gosub mount %id_beetle %type_beetle_mounted wait 10 return } if %type_quest = TAILOR { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo gosub unmount %type_beetle_mounted %id_beetle gosub Open_backpack_beetle %id_beetle %cont_beetle gosub Prendi_stack_oggetto %quest_material %cont_beetle !tot 0 NOFINDCONT gosub Conta_Stack_Item %quest_material #backpackid 0 set !tot_material #result menu set txtAmount_Material !tot_material if ! %usetinker && !tot_material > %quest_amount * %Material_Cost { set !need_uses !tot_material / %Material_Cost gosub check_tool %quest_tool_family !need_uses if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %cont_beetle !need_uses #backpackid } } gosub mount %id_beetle %type_beetle_mounted wait 10 return } if %type_quest = CARPENTER { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo gosub unmount %type_beetle_mounted %id_beetle gosub Open_backpack_beetle %id_beetle %cont_beetle gosub Prendi_stack_oggetto %quest_material %cont_beetle !tot 0 NOFINDCONT gosub Conta_Stack_Item %quest_material #backpackid 0 set !tot_material #result menu set txtAmount_Material !tot_material if ! %usetinker && !tot_material > %quest_amount * %Material_Cost { set !need_uses !tot_material / %Material_Cost gosub check_tool %quest_tool_family !need_uses if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %cont_beetle !need_uses #backpackid } } gosub mount %id_beetle %type_beetle_mounted wait 10 return } display ok Restock Beetle per questo non fatto $ script in pausa pause return ;sub Get_id_beetle sub Get_id_beetle ;lo cerca prima addosso set !gib_id #true rifind_gib_m: finditem %Type_beetle_mounted C_ , #CHARID if #findkind <> -1 { set #lobjectid #charid event macro 17 0 wait 20 goto rifind_gib } ;in terra rifind_gib: 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 !gib_id { set !gib_id #false gosub Apri_gump_base goto rifind_gib_m } ;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 rifind_gib } } return #findid ;sub Get_quest sub Get_quest gosub Set_Menu_Azione GET QUEST gosub Menu_Info_Quest_Step 2 ricerca_quest_npc: ignoreitem reset quest_npc finditem %quest_npc g_20 if #findkind = -1 { event exmsg #charid 3 40 Non trovo %quest_npc wait 1s goto ricerca_quest_npc } if #FINDDIST > 5 { gosub PathFind #findx #findy #findz if #result = #false goto ricerca_quest_npc } ignoreitem %quest_npc quest_npc set #NEXTCPOSX 2 set #NEXTCPOSy 660 set !ji_gq #jindex set !reject_quest 0 loop_get_quest: if !reject_quest > 10 goto ricerca_quest_npc wait 5 set #lobjectid %quest_npc event macro 17 0 menu set txtQuest_Get MUMBLE... gosub Antiblock wait 10 if #contsize <> 507_436 goto loop_get_quest set !cx #contposx set !cy #contposy set !check_pass #true for !check_pix_index 1 %quest_Point_check { set !rx %quest_pointX . !check_pix_index + !cx set !ry %quest_pointY . !check_pix_index + !cy savepix !rx !ry 1 if #pixcol <> %quest_pointCOL . !check_pix_index { set !check_pass #false break } } if !check_pass = #false { menu set txtQuest_Get REJECT set !reject_quest !reject_quest + 1 goto loop_get_quest } menu set txtQuest_Get OK loop_accetta_quest: set !c_x 134 + !cx set !c_y 400 + !cy click !c_x !c_y f wait 25 if #contsize = 507_436 loop_accetta_quest gosub Antiblock gosub Wait_Journal_Msg 5 !ji_gq YOU_HAVE_ACCEPTED if #result = #false goto loop_get_quest menu set txtQuest_Get ACCEPTED return ;sub Getitemparamaters sub Getitemparamaters if %0 < 1 || %1 = N/A { display ok Wrong use of sub Getitemparamaters: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 = 1 set %2 category if %3 = N/A || %0 <= 2 set %3 piece if %4 = N/A || %0 <= 3 set %4 Material_Cost if %5 = N/A || %0 <= 4 set %5 Type if %6 = N/A || %0 <= 5 set %6 Name set !Property %1 set !Category %2 set !Piece %3 set !Material_Cost %4 set !Type %5 set !Name %6 set !LargeSet %7 set !LargeType %8 if barrel in !property && tap in !property { set % . !Category 3 set % . !Piece 3 set % . !Material_Cost 2 set % . !Type IEG set % . !Name BARREL_TAP } if broadsword in !property { set % . !Category 5 set % . !Piece 2 set % . !Material_Cost 10 set % . !Type ATF set % . !Name BROADWORD } if kilt in !property { set % . !Category 3 set % . !Piece 27 set % . !Material_Cost 8 set % . !Type LDI set % . !Name KILT } if foot in !property && stool in !property { set % . !Category 2 set % . !Piece 1 set % . !Material_Cost 9 set % . !Type QFE set % . !Name FOOT_STOOL } if crossbow in !property && bolt in !property { set % . !Category N/A set % . !Piece N/A set % . !Material_Cost 1 set % . !Type %Type_Crossbow_bolt set % . !Name BOLT } return ;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 ;gump size set %contsize_craftgump 530_457 ;type set %Type_forgia JBG_OUJ_CUJ_KHR_WUJ_WOJ_SOJ_SUJ_KUJ_ set %Type_toolkit KTL set %type_tongs OBG set %Type_Sewing_Kit HAG set %Type_lingotti ENK set %type_saw EGG set %Type_boards TLK set %Type_Foot_Stool QFE set %Type_cloth CUI_BUI_ set %type_broadsword ATF set %Type_Crossbow_bolt LNK set %Type_tap IEG set %Type_backpack ZJF set %Type_Runic UFG_ set %Type_recipe PIP_ set %Type_talisman EWR_DWR_FWR_GWR_ set %type_FireHorn ZWF_ set %type_Beetle ZGB_ set %type_Beetle_Mounted IWX_ set %type_trash JKF_BKF_ set %Type_tools_tinker JTL_GTL_KTL set %Type_tools_tailor HAG set %Type_tools_blacksmith TLH_FBG_GBG_OLH_OBG_TBG set %Type_tools_carpenter YFG_ZHG_CIG_BIG_AGG_EGG_AIG_WFG_IGG_KGG_ZFG set %Type_tools_cooking BCG_DND_OGG ;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_ ;ARMOR TYPES================================================================ ;Medable first---- SET %leatherarmor VKH_NJL_QJL_JKH_QKH_DLH_HKH_PKH_SKH_KKH_ELH_PSF_QSK_ATK_ZSK_OSK_YSK_NSK_ SET %medhelmet NJL_QJL_NZH_TDI_VVI_KZH_PZH_DZH_ SET %medgorget JKH_RJG_SJG_FJG_MWL_ SET %medarm HKH_PKH_ SET %medtunic QKH_DLH_ SET %femalemedtunic ATK_ZSK_OSK_NSK_ SET %medglove KKH_SKH_WTO_ SET %medlegging VKH_ELH_ SET %femalemedlegging QSK_YSK_PSK_ ;Hats--- SET %hats CZH_HZH_GZH_BWI_WVI_XVI_YVI_IWI_HWI_KWI_JWI_EWI_JJN_OZH_DZH_BZH_EZH_VSH_QSH_VSH_NWL_MJN_ ;Samurai Empire Medable Armor--- SET %se_leatherarmor RWO_GCP_UBP_OWO_LCP_SWO_GWO_CCP_NCP_OCP_ SET %se_medhelmet GWO_CCP_ SET %se_medgorget SWO_ SET %se_medarm OWO_ SET %se_medtunic RWO_NCP_ SET %se_medglove OCP_ SET %se_medleggins GCP_UBP_LCP_ECP_ ;Mondain's Legacy Medable Armor--- SET %ml_medhelmet IJQ_SJQ_HJQ_UES_ SET %ml_medgorget BAS_ SET %ml_medarm MAS_ SET %ml_medtunic ZZR_ SET %ml_medglove CAS_ SET %ml_medleggings OAS_LAS_ ;Non medable--- SET %studdedarmor ALH_ULH_LLH_YKH_GLH_XKH_FLH_RLH_MLH_SSK_RSK_ SET %bonearmor ZPH_YPH_WPH_PPH_BQH_QPH_VPH_XPH_CQH_AQH_ SET %nonmedhelmet DSH_ASH_TSH_ESH_YPH_GSH_OSH_ZPH_ZRH_IWL_CSH_CSH_BSH_FSH_DPH_LKO_NWL_MKH_ SET %nonmedgorget NSH_ALH_ SET %nonmedarm BQH_JSH_XLH_GLH_MSH_YLH_QPH_YKH_DLO_ SET %nonmedtunic HSH_ULH_LLH_ZOH_IKH_VLH_KSH_WLH_WPH_PKO_PPH_RSK_ SET %femalenonmedtunic USK_SSK_MSK_TSK_LSK_USK_ SET %nonmedglove VPH_ISH_AQH_BMH_USH_XKH_FLH_KMH_RKO_ SET %nonmedlegging HMH_LSH_IMH_CQH_WSH_APH_MLH_RLH_NKH_XPH_NKO_ ;Samurai Empire Non Medable Armor--- SET %se_studdedarmor MWO_NWO_FCP_PCP_TBP_ SET %se_nonmedhelmet RBP_DCP_QWO_DWO_SBP_VBP_FWO_PWO_ SET %se_nonmedgorget PCP_ SET %se_nonmedarm NWO_WBP_ SET %se_nonmedtunic MWO_LWO SET %se_nonmedleggins FCP_TBP_ZBP_ ;Mondain's Legacy Non Medable Armor--- SET %ml_nonmedhelmet RJQ_UJQ_TJQ_ SET %ml_nonmedgorget QJQ_JJQ_ SET %ml_nonmedarm PJQ_GJQ_ SET %ml_nonmedtunic OJQ_ZIQ_ SET %ml_nonmedgloves NJQ_MJQ_ SET %ml_nonmedleggings AKQ_LJQ_ ;super slayer set %A_B_SUPERSLAYER Abyss_Arachnid_Bat_Bear_Beetle_Bird_Bovine_Elemental_Fey_Flame_Ice_Mage_Repond_Reptile_Undead_Vermin_Wolf_ ;super slayer ;INIT LISTS==================================================================== SET %shield LIK_MIK_CLK_AIK_CIK_LYD_GIK_NIK_ZHK_HLK_BLK_FIK_BIK_OIK_ SET %jewelery CWL_LWL_UJG_IJG_ ;position per heartwood set %posX_HEARTWOOD 535 set %posY_HEARTWOOD 992 set %posZ_HEARTWOOD 0 set %posX_exitHEARTWOOD 6984 set %posY_exitHEARTWOOD 338 set %posZ_exitHEARTWOOD 0 set %posX_inHeartwood 6986 set %posY_inHeartwood 339 set %posX_outHeartwood 538 set %posY_outHeartwood 992 ;colori runic set %col_oak 2010 set %col_ash 1191 set %col_yew 1192 set %runic_ . %col_oak OAK set %runic_ . %col_ash ASH set %runic_ . %col_yew YEW ;recipe blacksmith set %recipe_blacksmith_1 ADVENTURER'S , #spc , MACHETE set %recipe_blacksmith_1_rare SEMIRARE set %recipe_blacksmith_2 BUTCHER'S , #spc , WAR , #spc , CLEAVER set %recipe_blacksmith_2_rare RARE set %recipe_blacksmith_3 CHARGED , #spc , ASSASSIN , #spc , SPIKE set %recipe_blacksmith_4 COLD , #spc , FORGED , #spc , BLADE set %recipe_blacksmith_4_rare RARE set %recipe_blacksmith_5 CORRUPTED , #spc , RUNE , #spc , BLADE set %recipe_blacksmith_6 DARKGLOW , #spc , SCIMITAR set %recipe_blacksmith_7 DISEASED , #spc , MACHETE set %recipe_blacksmith_8 EMERALD , #spc , MACE set %recipe_blacksmith_9 FIERY , #spc , SPELLBLADE set %recipe_blacksmith_10 GUARDIAN , #spc , AXE set %recipe_blacksmith_11 HEAVY , #spc , ORNATE , #spc , AXE set %recipe_blacksmith_12 ICY , #spc , SCIMITAR set %recipe_blacksmith_13 ICY , #spc , SPELLBLADE set %recipe_blacksmith_14 KNIGHT'S , #spc , WAR , #spc , CLEAVER set %recipe_blacksmith_15 LEAFBLADE , #spc , OF , #spc , EASE set %recipe_blacksmith_16 LUCKBLADE set %recipe_blacksmith_16_rare RARE set %recipe_blacksmith_17 LUMINOUS , #spc , RUNE , #spc , BLADE set %recipe_blacksmith_17_rare RARE set %recipe_blacksmith_18 MACHETE , #spc , OF , #spc , DEFENSE set %recipe_blacksmith_19 MAGEKILLER , #spc , ASSASSIN , #spc , SPIKE set %recipe_blacksmith_20 MAGEKILLER , #spc , LEAFBLADE set %recipe_blacksmith_21 MAGE'S , #spc , RUNE , #spc , BLADE set %recipe_blacksmith_22 ORCISH , #spc , MACHETE set %recipe_blacksmith_23 OVERSEER , #spc , SUNDERED , #spc , BLADE set %recipe_blacksmith_23_rare RARE set %recipe_blacksmith_24 RUBY , #spc , MACE set %recipe_blacksmith_25 RUNE , #spc , BLADE , #spc , OF , #spc , KNOWLEDGE set %recipe_blacksmith_25_rare RARE set %recipe_blacksmith_26 RUNE , #spc , CARVING , #spc , KNIFE set %recipe_blacksmith_27 RUNESABRE set %recipe_blacksmith_28 SAPPHIRE , #spc , MACE set %recipe_blacksmith_29 SERRATED , #spc , WAR , #spc , CLEAVER set %recipe_blacksmith_30 SHARD , #spc , THRASHER set %recipe_blacksmith_30_rare RARE set %recipe_blacksmith_31 SILVER-ETCHED , #spc , MACE set %recipe_blacksmith_31_rare RARE set %recipe_blacksmith_32 SINGING , #spc , AXE set %recipe_blacksmith_33_rare SEMIRARE set %recipe_blacksmith_33 SPELLBLADE , #spc , OF , #spc , DEFENSE set %recipe_blacksmith_34 THUNDERING , #spc , AXE set %recipe_blacksmith_35 TRUE , #spc , ASSASSIN , #spc , SPIKE set %recipe_blacksmith_36 TRUE , #spc , LEAFBLADE set %recipe_blacksmith_37 TRUE , #spc , RADIANT , #spc , SCIMITAR set %recipe_blacksmith_38 TRUE , #spc , SPELLBLADE set %recipe_blacksmith_39 TRUE , #spc , WAR , #spc , CLEAVER set %recipe_blacksmith_40 TWINKLING , #spc , SCIMITAR set %recipe_blacksmith_41 WOUNDING , #spc , ASSASSIN , #spc , SPIKE set %recipe_blacksmith_max 41 ;recipe tinker set %recipe_tinker_1 DARKGLOW set %recipe_tinker_2 HOVERING , #spc , WISP set %recipe_tinker_3 INVISIBILITY , #spc , POTION set %recipe_tinker_4 PARASITIC set %recipe_tinker_5 SCRAPPER'S , #spc , COMPENDIUM set %recipe_tinker_5_rare RARE set %recipe_tinker_6 STONE , #spc , ANVIL , #spc , (EAST) set %recipe_tinker_6_rare RARE set %recipe_tinker_7 STONE , #spc , ANVIL , #spc , (SOUT) set %recipe_tinker_8 ESSENCE , #spc , OF , #spc , BATTLE set %recipe_tinker_8_rare RARE set %recipe_tinker_9 PENDANT , #spc , OF , #spc , THE , #spc , MAGI set %recipe_tinker_9_rare RARE set %recipe_tinker_10 RESILIENT , #spc , BRACER set %recipe_tinker_10_rare RARE set %recipe_tinker_max 10 ;recipe tailor set %recipe_tailor_1 ELVEN , #spc , QUIVER set %recipe_tailor_2 SONG , #spc , WOVEN , #spc , MANTLE set %recipe_tailor_3 SPELL , #spc , WOVEN , #spc , BRITCHES set %recipe_tailor_4 STITCHER'S , #spc , MITTENS set %recipe_tailor_5 QUIVER , #spc , OF , #spc , BLIGHT set %recipe_tailor_6 QUIVER , #spc , OF , #spc , FIRE set %recipe_tailor_7 QUIVER , #spc , OF , #spc , ICE set %recipe_tailor_8 QUIVER , #spc , OF , #spc , LIGHTNING set %recipe_tailor_2_rare RARE set %recipe_tailor_3_rare RARE set %recipe_tailor_4_rare RARE set %recipe_tailor_max 8 ;recipe carpenter set %recipe_carpenter_1 Acid , #spc , Proof , #spc , Rope set %recipe_carpenter_1_rare RARE set %recipe_carpenter_2 Ancient , #spc , Wild , #spc , Staff set %recipe_carpenter_3 Arcane , #spc , Bookshelf , #spc , (East) set %recipe_carpenter_4 Arcane , #spc , Bookshelf , #spc , (South) set %recipe_carpenter_5 Arcanist's , #spc , Wild , #spc , Staff set %recipe_carpenter_6 Bramble , #spc , Coat set %recipe_carpenter_6_rare RARE set %recipe_carpenter_7 Elven , #spc , Armoire , #spc , (Fancy) set %recipe_carpenter_8 Elven , #spc , Dresser , #spc , (East) set %recipe_carpenter_9 Elven , #spc , Dresser , #spc , (South) set %recipe_carpenter_10 Hardened , #spc , Wild , #spc , Staff set %recipe_carpenter_11 Ironwood , #spc , Crown set %recipe_carpenter_11_rare RARE set %recipe_carpenter_12 Ornate , #spc , Elven , #spc , Chair set %recipe_carpenter_13 Ornate , #spc , Elven , #spc , Chest , #spc , (East) set %recipe_carpenter_14 Ornate , #spc , Elven , #spc , Chest , #spc , (South) set %recipe_carpenter_15 Phantom , #spc , Staff set %recipe_carpenter_15_rare RARE set %recipe_carpenter_16 Squirrel , #spc , Statue , #spc , (East) set %recipe_carpenter_16_rare RARE set %recipe_carpenter_17 Squirrel , #spc , Statue , #spc , (South) set %recipe_carpenter_18 Tall , #spc , Elven , #spc , Bed , #spc , (East) set %recipe_carpenter_19 Tall , #spc , Elven , #spc , Bed , #spc , (South) set %recipe_carpenter_20 Thorned , #spc , Wild , #spc , Staff set %recipe_carpenter_21 Warrior , #spc , Statue , #spc , (East) set %recipe_carpenter_21_rare RARE set %recipe_carpenter_22 Warrior , #spc , Statue , #spc , (South) set %recipe_carpenter_max 22 ;recipe bowcrafter set %recipe_bowcrafter_1 Assassin's , #spc , Shortbow set %recipe_bowcrafter_2 Barbed , #spc , Longbow set %recipe_bowcrafter_3 Blight , #spc , Gripped , #spc , Longbow set %recipe_bowcrafter_3_rare RARE set %recipe_bowcrafter_4 Faerie , #spc , Fire set %recipe_bowcrafter_4_rare RARE set %recipe_bowcrafter_5 Frozen , #spc , Longbow set %recipe_bowcrafter_6 Lightweight , #spc , Shortbow set %recipe_bowcrafter_7 Longbow , #spc , of , #spc , Might set %recipe_bowcrafter_8 Mischief , #spc , Maker set %recipe_bowcrafter_8_rare RARE set %recipe_bowcrafter_9 Mystical , #spc , Shortbow set %recipe_bowcrafter_10 Ranger's , #spc , Shortbow set %recipe_bowcrafter_11 Silvani's , #spc , Feywood , #spc , Bow set %recipe_bowcrafter_11_rare RARE set %recipe_bowcrafter_12 Slayer , #spc , Longbow set %recipe_bowcrafter_13 The , #spc , Night , #spc , Reaper set %recipe_bowcrafter_13_rare RARE set %recipe_bowcrafter_max 13 ;valori per tools set %Nome_ . %Type_toolkit TINKER_TOOL set %Voce_ . %Type_toolkit 2 set %Index_ . %Type_toolkit 4 set %Resource_ . %Type_toolkit 2 set %Nome_ . %type_tongs TONG set %Voce_ . %type_tongs 2 set %Index_ . %type_tongs 13 set %Resource_ . %type_tongs 1 set %Nome_ . %Type_Sewing_Kit SEWING_KIT set %Voce_ . %Type_Sewing_Kit 2 set %Index_ . %Type_Sewing_Kit 7 set %Resource_ . %Type_Sewing_Kit 2 set %Nome_ . %type_saw SAW set %Voce_ . %type_saw 2 set %Index_ . %type_saw 8 set %Resource_ . %type_saw 4 if %shard_id = DEMISE gosub Initialize_type_DEMISE return ;sub Initialize_type_demise sub Initialize_type_demise ;girobod set %gb_menu_index_getbod 2 ;gump size set %contsize_craftgump 530_437 return ;sub Inizializza_contatori sub Inizializza_contatori ;varie set %cont_cicli 0 set %cont_Bod 0 set %cont_connLost 0 set %cont_quest 0 set %cont_quest_error 0 return ;sub Inizializza_variabili sub Inizializza_variabili ;asses gosub asses_init ;quest name set %quest_1 TINKER set %quest_2 BLACKSMITH set %quest_3 TAILOR set %quest_4 CARPENTER set %quest_5 BOWCRAFTER set %recipe_blacksmith_flag for !i 1 %recipe_blacksmith_max set %recipe_blacksmith_flag %recipe_blacksmith_flag , 1 set %recipe_tinker_flag for !i 1 %recipe_tinker_max set %recipe_tinker_flag %recipe_tinker_flag , 1 set %recipe_tailor_flag for !i 1 %recipe_tailor_max set %recipe_tailor_flag %recipe_tailor_flag , 1 set %recipe_carpenter_flag for !i 1 %recipe_carpenter_max set %recipe_carpenter_flag %recipe_carpenter_flag , 1 set %recipe_bowcrafter_flag for !i 1 %recipe_bowcrafter_max set %recipe_bowcrafter_flag %recipe_bowcrafter_flag , 1 ;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 ;event ExMsg #CHARID 3 40 DISABILTATO CHECK VERSION IN Inizializza_variabili return ;sub Loop_debug sub Loop_debug gosub set_menu_azione DEBUG LOOP set #MENUBUTTON N/A while #true { wait 5 if #MENUBUTTON <> N/A { if #menubutton = VAI_HEARTWOOD { set #MENUBUTTON N/A gosub Vai_a_Heartwood event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = VAI_TIPO { set #MENUBUTTON N/A gosub Walk_Pepito_Rail NORMAL event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = SETACCIA_PREMI { set #MENUBUTTON N/A gosub Setaccia_Premi event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = GET_FROM_BEETLE { set #MENUBUTTON N/A gosub GET_FROM_BEETLE event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = MAKE_QUEST { set #MENUBUTTON N/A gosub check_tool_e_risorse if ! #result { if #result = BOD event ExMsg #CHARID 3 40 DOVREI FARE GIRO BOD else event ExMsg #CHARID 3 40 NON BASTANO RISORSE } else { if %quest_must_make { gosub Make_Quest event ExMsg #CHARID 3 40 #RESULT } else { event ExMsg #CHARID 3 40 NON SERVE } } gosub set_menu_azione DEBUG LOOP } if #menubutton = GET_QUEST { set #MENUBUTTON N/A gosub Get_Quest event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = FILLA_QUEST { set #MENUBUTTON N/A if %quest_stack_item gosub Filla_Quest_Stack else gosub Filla_Quest if #result event ExMsg #CHARID 3 40 FATTO else event ExMsg #CHARID 3 40 ERRORE gosub set_menu_azione DEBUG LOOP } if #menubutton = unFILLA_QUEST { set #MENUBUTTON N/A gosub unFilla_Quest event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = COMPLETE_QUEST { set #MENUBUTTON N/A gosub complete_quest event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = ESCI_TIPO { set #MENUBUTTON N/A gosub Walk_Pepito_Rail INVERSE gosub esci_da_heartwood event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = TORNA_A_CASA { set #MENUBUTTON N/A gosub Torna_a_Casa if #result event ExMsg #CHARID 3 40 FATTO else event ExMsg #CHARID 3 40 NON RIESCO gosub set_menu_azione DEBUG LOOP } if #menubutton = RESTOCK { set #MENUBUTTON N/A gosub Torna_a_Casa if #result { gosub Restock if %usa_beetle { gosub restock_beetle } event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 NON RIESCO } gosub set_menu_azione DEBUG LOOP } if #menubutton = SPOSTA_PREMI { set #MENUBUTTON N/A gosub Sposta_Premi event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = RESCINDI_QUEST { set #MENUBUTTON N/A gosub Rescindi_Quest event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = CREA_TINKER_TOOL { set #MENUBUTTON N/A gosub Crea_Tinker_Tool 2 if #result = OK event ExMsg #CHARID 3 40 FATTO else event ExMsg #CHARID 3 40 NON RIESCO #result gosub set_menu_azione DEBUG LOOP } if #menubutton = CREA_QUEST_TOOL { set #MENUBUTTON N/A gosub Crea_Quest_Tool %quest_tool 2 if #result = OK event ExMsg #CHARID 3 40 FATTO else event ExMsg #CHARID 3 40 NON RIESCO #result gosub set_menu_azione DEBUG LOOP } if #menubutton = TEST_ALARM { set #MENUBUTTON N/A gosub Alarm_Check gosub set_menu_azione DEBUG LOOP } if #menubutton = GIRO_BOD { set #MENUBUTTON N/A gosub GB_Start event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = VAI { set #MENUBUTTON N/A set %debug #false gosub Crea_Menu_Avviato return } if #menubutton = closed { set #MENUBUTTON N/A event ExMsg #CHARID 3 30 Script chiuso halt } if #MENUBUTTON <> N/A display ok Non Supportato #MENUBUTTON set #MENUBUTTON N/A } } return ;sub Make_quest d GetCraftingTools Craft Conta_Stack_Item Set_Menu_Azione Menu_Info_Quest_Clear sub Make_quest gosub Set_Menu_Azione MAKE_QUEST gosub Menu_Info_Quest_Clear set %UseAlreadyCrafted #true set %makequantity %quest_amount set %material 0 gosub GetCraftingTools %quest_tool_family if %TotalUses < %makequantity return NEED_TOOL make_quest_point_forge: if %type_quest = BLACKSMITH { gosub Finditemnearest %type_forgia g if #findkind = -1 { display ok Non trovo una forgia. $ Script fermato. pause } if #finddist > 2 { gosub PathFind_nearly #findx #findy #findz 1 goto make_quest_point_forge } if #CHARPOSX = 7067 && #CHARPOSY = 408 && %shard_id = UODREAMS { gosub PathFind 7067 407 0 wait 10 } } gosub Craft 1 %MakeQuantity ;da controllare da "DA QUI" set !r_mq #result gosub Conta_Stack_Item %quest_material #backpackid 0 menu set txtAmount_Material #result return !r_mq ;sub Menu_crea_avvio sub Menu_crea_avvio set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 10 set !x !xb + 25 set !w !wb - 50 gosub Menu_Crea_Box !x !y !w 65 IMPOSTAZIONI if %pepito_alarm = N/A set %pepito_alarm #false menu font size 6 set !x !xb + !wb - 39 set !y !yb + 10 Menu Check chkpepito_alarm !x !y 12 12 %pepito_alarm set !x !xb + !wb - 70 set !y !yb + 11 menu font bgcolor $004444 Menu text txt !x !y ALARM menu font color silver menu font size 7 set !y !y + 16 set !x !xb + 30 menu font bgcolor $002222 menu text txt !x !y MAGIA menu font color white set !x !xb + 80 if %magia_usata = mager menu text txt !x !y RECALL else menu text txt !x !y SACRED JOURNEY menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y TINKER set !x !xb + 80 if %USA_tinker = N/A set %USA_TINKER AUTO if %USA_TINKER = AUTO || %USA_TINKER = #true { chooseskill Tink if #skill > 400 { menu font color white menu text txt !x !y SI set %usetinker #true } else { if %USA_TINKER = #true { set %menu_valido_AVVIO #FALSE menu font color RED menu text txt !x !y NO } else { menu font color silver menu text txt !x !y NO } set %usetinker #false } } else { menu font color silver menu text txt !x !y NO set %usetinker #false } menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y BEETLE set !x !xb + 80 set !primofindbeetle #true ricercafirebeetle: if %USA_BEETLE { set !b_finded #false finditem %Type_Beetle_Mounted c_ , #charid if #findkind <> -1 set !b_finded #true finditem %Type_Beetle g_1 if #findkind <> -1 set !b_finded #true if !b_finded { menu font color white menu text txt !x !y SI } else { if !primofindbeetle { gosub Apri_gump_base set !primofindbeetle #false goto ricercafirebeetle } menu font color red menu text txt !x !y NOT FINDED set %menu_valido_AVVIO #FALSE } } else { menu font color silver menu text txt !x !y NO } menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y LIBRI menu font color white set !x !xb + 80 gosub check_object %RB_Restock #backpackid set !v #result gosub check_object %RB_Heartwood #backpackid set !v ( !v && #result ) if !v = #FALSE { set %menu_valido_AVVIO #FALSE menu font color RED } if !v menu text txt !x !y OK else menu text txt !x !y ERROR if %menu_valido_AVVIO menu font bgcolor $002222 else menu font bgcolor $000088 set !x !xb + 218 set !y !yb + 55 menu font size 6 menu Button BUT_MENU1 !x !y 50 16 REFRESH if %type_quest NOTIN TINKER_BLACKSMITH_TAILOR_CARPENTER_BOWCRAFTER set %type_quest %quest_1 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 set !y !yb + !hb / 2 - 30 set !x !xb + !wb / 2 - 80 menu font size 7 menu font bgcolor black menu font color yellow menu font style B menu Combo Create cmbType_Quest !x !y 160 set !quest_not_setted #false if %npc_ . %quest_1 = N/A { menu Combo Add cmbType_Quest < %quest_1 NO ID NPC > set !quest_not_setted #true } else menu Combo Add cmbType_Quest QUEST %quest_1 if %npc_ . %quest_2 = N/A { menu Combo Add cmbType_Quest < %quest_2 NO ID NPC > set !quest_not_setted #true } else menu Combo Add cmbType_Quest QUEST %quest_2 if %npc_ . %quest_3 = N/A { menu Combo Add cmbType_Quest < %quest_3 NO ID NPC > set !quest_not_setted #true } else menu Combo Add cmbType_Quest QUEST %quest_3 if %npc_ . %quest_4 = N/A { menu Combo Add cmbType_Quest < %quest_4 NO ID NPC > set !quest_not_setted #true } else menu Combo Add cmbType_Quest QUEST %quest_4 if %npc_ . %quest_5 = N/A { menu Combo Add cmbType_Quest < %quest_5 NO ID NPC > set !quest_not_setted #true } else menu Combo Add cmbType_Quest QUEST %quest_5 if %Type_quest = %quest_1 menu Combo SELECT cmbType_Quest 1 if %Type_quest = %quest_2 menu Combo SELECT cmbType_Quest 2 if %Type_quest = %quest_3 menu Combo SELECT cmbType_Quest 3 if %Type_quest = %quest_4 menu Combo SELECT cmbType_Quest 4 if %Type_quest = %quest_5 menu Combo SELECT cmbType_Quest 5 if !quest_not_setted { set !y !y - 25 set !x 65 menu font color red menu font size 6 menu text txt !x !y IN ALCUNE QUEST MANCA L' ID DELL' NPC set !y !y + 10 set !x !x + 2 menu font color red menu font size 6 menu text txt !x !y CLICCA AREA QUEST PER SELEZIONARLO } } else { menu font color white set !y !yb + !hb / 2 set !x !xb + 25 set !w !wb - 50 Menu Shape mnuRect1 !x !y !w 45 3 7 1 gray 7 $111133 Menu Shape mnuRect1 !x !y !w 13 4 7 1 gray 7 $000055 set !y !y + 1 set !x !xb + 90 menu text txt !x !y AVVIO NON POSSIBILE set !x !xb + 33 menu font color silver set !y !y + 16 menu text txt !x !y CLICCA SULLE VOCI EVIDENZIATE IN ROSSO set !y !y + 11 menu text txt !x !y PER SETTARE LE IMPOSTAZIONI MANCANTI } if %ritiro_bod = N/A set %ritiro_bod #false if %ritiro_subito = N/A set %ritiro_subito #false ;if %girobod_load_sel = N/A ;{ ; for %c 1 7 ; { ; set !nv GiroBod_VAL_ , %c ; gosub GlobalVar_get %idBodscript !nv ; } ; set %girobod_load_sel FATTO ;} if %girobod_valido { if %CHOISE_GIROBOD_SCRIPT = INTERNO { menu font color silver menu font bgcolor $002222 set !x !xb + 45 set !y ( !yb + !hb - 25 ) Menu font size 6 Menu Check chkRitiroBod !x !y 210 15 %ritiro_bod RICHIAMA GIRO BOD OGNI ORA set !x !x + 155 Menu Check chkRitiroSubito !x !y 60 15 %ritiro_subito SUBITO } else { menu font color silver menu font bgcolor $002222 set !x !xb + 15 set !y ( !yb + !hb - 25 ) Menu font size 6 Menu Check chkRitiroBod !x !y 230 15 %ritiro_bod RICHIAMA SCRIPT ESTERNO GIRO BOD OGNI ORA set !x !x + 220 Menu Check chkRitiroSubito !x !y 60 15 %ritiro_subito SUBITO } } else { menu font bgcolor $002222 set !x !xb + 95 set !y ( !yb + !hb - 35 ) Menu font size 6 menu font color red Menu text txt !x !y GIRO BOD NON POSSIBILE set !y ( !yb + !hb - 25 ) Menu font size 6 menu font color silver set !x !xb + 32 Menu text txt !x !y CLICCA SU 'EXTRA' PER IMPOSTARE I DATI DEL GIRO BOD } gosub Set_Menu_Mex DEFAULT PREMI 'START' PER AVVIARE CON LE ULTIME IMPOSTAZIONI $ PREMI UNA VOCE DI MENU PER SETTARE QUELLA PARTE $ NB: PULSANTI ROSSI INDICANO UNA PARTE NON SETTATA gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_loot sub Menu_crea_loot set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !ylootgeneric !yb + 7 set !hgeneric 50 set !ylootequip !ylootgeneric + !hgeneric + 4 set !yloottalisman !ylootequip + 70 + 4 set !htalisman 133 set !y !ylootgeneric set !x !xb + 5 set !w !wb - 10 menu font color YELLOW gosub Menu_Crea_Box !x !y !w !hgeneric GENERICI DA CONSERVARE menu font color Silver menu font size 6 menu font bgcolor $002222 set !x !xb + 15 set !y !yb + 23 if %loot_OAK = N/A set %loot_OAK #false Menu Check chkOAK !x !y 85 15 %loot_OAK OAK KIT set !x !xb + 107 if %loot_ASH = N/A set %loot_ASH #false Menu Check chkASH !x !y 85 15 %loot_ASH ASH KIT set !x !xb + 189 if %loot_YEW = N/A set %loot_YEW #true Menu Check chkYEW !x !y 85 15 %loot_YEW YEW KIT set !x !xb + 15 set !y !yb + 38 if %loot_HEARTWOOD = N/A set %loot_HEARTWOOD #true Menu Check chkHEARTWOOD !x !y 95 15 %loot_HEARTWOOD HEARTWOOD KIT set !x !xb + 189 if %loot_firehorn = N/A set %loot_firehorn #false Menu Check chkFirehorn !x !y 85 15 %loot_firehorn FIREHORN set !y !ylootequip set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box_Loot_Equip !x !y !w menu font color Yellow set !y !yloottalisman set !x !xb + 5 set !w !wb - 10 if %LOOT_TALISMAN = N/A set %LOOT_TALISMAN #true gosub Menu_Crea_Check_Box !x !y !w !htalisman LOOT_TALISMAN LOOT TALISMAN menu font color Silver menu font bgcolor $004444 menu font size 5 set !xt !x + 119 set !yt !y + 2 menu text txt !xt !yt SE CONTIENE UNA DELLE SEGUENTI PROPRIETA menu font size 6 set !xt !x + 10 set !yt !y + 20 menu font bgcolor $002222 menu text txt !xt !yt PROTECTION >= DI set !xt !xt + 95 set !yt !yt - 3 if %loot_protection_min = N/A set %loot_protection_min 80 menu font bgcolor $000000 menu edit edtProtection_min !xt !yt 30 %loot_protection_min set !xt !x + 170 set !yt !y + 20 menu font bgcolor $002222 menu text txt !xt !yt KILLER >= DI set !xt !xt + 80 set !yt !yt - 3 if %loot_killer_min = N/A set %loot_killer_min 80 menu font bgcolor $000000 menu edit edtKiller_min !xt !yt 30 %loot_killer_min set !xt !x + 10 set !yt !y + 32 menu font size 6 if %ignored_monster = N/A set %ignored_monster menu font bgcolor $000000 menu edit edtIgnored_monster !xt !yt 270 %ignored_monster set !xt !x + 9 set !yt !y + 51 menu font size 5 menu font bgcolor $002222 menu text txt !xt !yt SCRIVI QUI SOPRA LA LISTA MOSTRI DA IGNORARE USA _ COME SEPARATORE menu font size 6 set !xt !x + 10 set !yt !y + 70 menu text txt !xt !yt CRAFT NORMAL >= DI set !xt !xt + 95 set !yt !yt - 3 if %loot_skill_min = N/A set %loot_skill_min 29 menu font bgcolor $000000 menu edit edtskill_min !xt !yt 30 %loot_skill_min set !xt !x + 170 set !yt !y + 70 menu font bgcolor $002222 menu text txt !xt !yt CRAFT EXE >= DI set !xt !xt + 80 set !yt !yt - 3 if %loot_skillx_min = N/A set %loot_skillx_min 29 menu font bgcolor $000000 menu edit edtskillx_min !xt !yt 30 %loot_skillx_min set !xt !x + 10 set !yt !y + 82 menu font size 6 if %ignored_skill = N/A set %ignored_skill menu font bgcolor $000000 menu edit edtignored_skill !xt !yt 270 %ignored_skill set !xt !x + 11 set !yt !y + 101 menu font size 5 menu font bgcolor $002222 menu text txt !xt !yt SCRIVI QUI SOPRA LA LISTA SKILL DA IGNORARE USA _ COME SEPARATORE menu font size 6 set !xt !x + 10 set !yt !y + 113 if %loot_slayer = N/A set %loot_slayer #true menu check chkSlayer !xt !yt 90 15 %loot_slayer SLAYER set !xt !x + 100 set !yt !y + 113 if %loot_summoning = N/A set %loot_summoning #false menu check chkSummoning !xt !yt 90 15 %loot_summoning SUMMONING 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 IMPOSTA GLI OGGETTI DA CONSERVARE DALLE RICOMPENSE QUEST $ LE RECIPE VANNO SELEZIONATE NELL AREA RECIPE gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_quest sub Menu_crea_quest 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 TINKER set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_NPC !x !y !w #True TINKER menu font size 5 menu font color white menu font bgcolor $004444 set !x !xb + 107 set !y !yb + 10 menu text txt !x !y L'NPC DEVE POTER DARE LA QUEST 'BEER GOGGLES' menu font color yellow set !y !yb + 8 + 38 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 36 BLACKSMITH set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_NPC !x !y !w #True BLACKSMITH menu font size 5 menu font color white set !x !xb + 97 set !y !yb + 10 + 38 menu text txt !x !y L'NPC DEVE POTER DARE LA QUEST 'CUTS BOTH WAYS' menu font color yellow set !y !yb + 8 + 38 + 38 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 36 TAILOR set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_NPC !x !y !w #True TAILOR menu font size 5 menu font color white menu font bgcolor $004444 set !x !xb + 77 set !y !yb + 10 + 38 + 38 menu text txt !x !y L'NPC DEVE POTER DARE LA QUEST 'THE KING OF CLOTHING' menu font color yellow set !y !yb + 8 + 38 + 38 + 38 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 36 CARPENTER set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_NPC !x !y !w #True CARPENTER menu font size 5 menu font color white menu font bgcolor $004444 set !x !xb + 104 set !y !yb + 10 + 38 + 38 + 38 menu text txt !x !y L'NPC DEVE POTER DARE LA QUEST 'ARCH SUPPORT' menu font color yellow set !y !yb + 8 + 38 + 38 + 38 + 38 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 36 BOWCRAFTER set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_NPC !x !y !w #True BOWCRAFTER menu font size 5 menu font color white menu font bgcolor $004444 set !x !xb + 107 set !y !yb + 10 + 38 + 38 + 38 + 38 menu text txt !x !y L'NPC DEVE POTER DARE LA QUEST 'LETHAL DARTS' set !y !yb + 8 + 38 + 38 + 38 + 38 + 43 set !x !xb + 5 set !w !wb - 10 menu font bgcolor $002222 menu font color silver menu button butSETNPCQUESTDEAFULT !x !y !w 16 SETTA ID NPC DI DEFAULT (UODREAMS) 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 GLI NPC DELLE QUEST $ SOLO LE QUEST DEGLI NPC SETTATI POTRANNO ESSERE SELEZIONATE $ QUEST CON NPC NON SETTATI GENERERANNO UN ERRORE gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_recipe sub Menu_crea_recipe set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 3 set !x !xb + 5 set !w !wb - 10 set !h !hb - 15 gosub Menu_Crea_Box !x !y !w !h RECIPE set !y !y + !hb - 15 set !x !xb + 10 menu font size 5 menu font color silver menu font bgcolor $002222 menu text txt !x !y COMUNI set !x !w / 2 - 10 menu font color white menu text txt !x !y SEMIRARE set !x !wb - 30 menu font color YELLOW menu text txt !x !y RARE set !y !yb + 19 set !x !xb + !wb / 2 - 80 menu font size 6 menu font bgcolor black menu font color silver menu font style B menu Combo Create cmbType_Quest !x !y 140 menu Combo Add cmbType_Quest QUEST %quest_1 menu Combo Add cmbType_Quest QUEST %quest_2 menu Combo Add cmbType_Quest QUEST %quest_3 menu Combo Add cmbType_Quest QUEST %quest_4 menu Combo Add cmbType_Quest QUEST %quest_5 if %Type_quest = %quest_1 menu Combo SELECT cmbType_Quest 1 if %Type_quest = %quest_2 menu Combo SELECT cmbType_Quest 2 if %Type_quest = %quest_3 menu Combo SELECT cmbType_Quest 3 if %Type_quest = %quest_4 menu Combo SELECT cmbType_Quest 4 if %Type_quest = %quest_5 menu Combo SELECT cmbType_Quest 5 set !x !x + 141 menu font bgcolor $006600 menu button butRecipeGo !x !y 18 18 > menu font bgcolor $002222 menu font size 5 set !y !yb + 31 set !x !xb + 10 set !l recipe_ , %Type_quest , _max set !l3 recipe_ , %Type_quest , _flag for !i 1 % . !l { set !y !y + 10 set !l2 recipe_ , %Type_quest , _ , !i set !vr #false str mid % . !l3 !i 1 if #strres = 1 set !vr #true set !rare !l2 , _rare if % . !rare = N/A menu font color silver if % . !rare = SEMIRARE menu font color white if % . !rare = RARE menu font color yellow Menu Check chkRecipe . !i !x !y 140 10 !vr % . !l2 if !i = 21 { set !x !x + 140 set !y !yb + 31 } ;menu text txtRecipe . !i !x !y %recipe_blacksmith_ . !i } gosub Set_Menu_Mex DEFAULT SELEZIONA LE RECIPE DA TENERE $ BIANCHE = SEMIRARE $ GIALLE = RARE 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 36 RUNE BOOK HEARTWOOD set !y !y + 17 gosub Menu_Crea_Linea_Rune_Book !x !y !w Heartwood set !y !yb + 88 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 140 POSIZIONE E CONTENITORI menu font bgcolor $004444 menu font color yellow menu font size 6 set !y !yb + 89 set !x !xb + 220 if %usa_beetle = N/A set %usa_beetle #false menu check chkUsa_Beetle !x !y 70 10 %usa_beetle USA BEETLE 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_Bag !x !y !w #True PORTA_PREMI set !x !xb + 5 set !y !y + 13 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 TOOL 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False RECIPE 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False RUNIC 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False TALISMAN 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False EQUIP 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False OTHER 6 menu font size 6 set !y !y + 18 set !x !xb + 43 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 IL RUNEBOOK PER HARTWOOD $ SETTA I CONTENITORI USATI 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 + 7 set !x !xb + 5 set !w !wb - 10 menu font color YELLOW gosub Menu_Crea_Box !x !y !w 62 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 + 13 set !y !yt + 17 menu font color Silver menu font size 6 if %sospendi = N/A set %sospendi #TRUE Menu Check chkSospendi !x !y 125 15 %sospendi SOSPENDI SCRIPT TRA LE set !x !xb + 180 set !y !y + 2 menu text txt !x !y E LE set !x !xb + 137 set !y !y - 3 menu font size 6 if %sospendida = N/A set %sospendida 063500 menu Edit edtSospendiDa !x !y 40 %sospendida set !x !xb + 200 menu font size 6 if %sospendia = N/A set %sospendia 070500 menu Edit edtSospendia !x !y 40 %sospendia set !y !yb + 70 set !x !xb + 5 set !w !wb - 10 menu font color YELLOW gosub Menu_Crea_Box !x !y !w 42 VARIE set !y !y + 20 set !x !xb + 13 menu font color Silver menu font size 6 menu font bgcolor $002222 menu text txt !x !y USA TINKER SKILL PER TOOL menu font color Yellow menu font size 7 set !x !xb + 218 set !y !y - 4 menu Combo Create cmbUSA_TINKER !x !y 60 menu Combo Add cmbUSA_TINKER AUTO menu Combo Add cmbUSA_TINKER YES menu Combo Add cmbUSA_TINKER NO if %USA_TINKER = N/A set %USA_TINKER AUTO if %USA_TINKER = AUTO menu Combo SELECT cmbUSA_TINKER 1 if %USA_TINKER = #true menu Combo SELECT cmbUSA_TINKER 2 if %USA_TINKER = #False menu Combo SELECT cmbUSA_TINKER 3 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_info_quest_clear sub Menu_info_quest_clear menu set txtItem_Name %Name menu set txtType_Quest %type_quest menu set txtItem_Toggle 0 menu set txtQuest_Finite %cont_quest menu set txtItem_Make 0 menu set txtQuest_Get TO GET menu set txtToggle_AMount %quest_amount menu set txtItem_Amount %quest_amount gosub Menu_Info_Quest_Step 0 return ;sub Menu_info_quest_step sub Menu_info_quest_step menu set txtStep1 #spc menu set txtStep2 #spc menu set txtStep3 #spc menu set txtStep4 #spc if %1 > 0 menu set txtStep . %1 > 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 } ;asses if #menubutton = butAsses_Check { event exmsg #charid 3 %menu_col_i Targhetta un Oggetto e ti dirņ il suo valore gosub targetta_oggetto set !oggid #result if !oggid <> N/A { gosub asses_item !oggid if %asses_pass event exmsg #charid 3 %menu_col_ok Vale #result else event exmsg #charid 3 %menu_col_ko Vale #result } set #MENUBUTTON N/A goto Menu_Loop_Ciclo } ;other if butChest_ in #menubutton { gosub Split #menubutton butChest_ set %id_object %strright if %bank_base = #true && %id_object <> base gosub Menu_Set_Chest %id_object C %chest_base BANK else gosub Menu_Set_Chest %id_object G 2 RESTOCK if #result <> N/A { set %bank_ . %id_object #False menu set txtBankChest_ . %id_object #spc set %chest_ . %id_object #Result menu set txtChest_ . %id_object %chest_ . %id_object set !nomevar chest_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar bank_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if 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 #menubutton = BUTRECIPEGO { gosub Menu_Validate_RECIPE menu get cmbType_Quest set %type_quest %quest_ . #menures gosub GlobalVar_put %idscript type_quest gosub Menu_Crea 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 = butSETNPCQUESTDEAFULT { display yesno Verrano impostati degli ID di deafult per ogni NPC $ Gli ID potrebbero essere sbagliati. $ Si consiglia di impostare manualmente gli ID recandosi ad Heartwood e cliccando su 'set'. $ Vuoi comunque impostare gli ID NPC di default ? if #dispRes = yes { set %NPC_TINKER IISL set %NPC_BLACKSMITH SNPB set %NPC_TAILOR DUPB set %NPC_CARPENTER KDEM set %NPC_BOWCRAFTER BJOB gosub GlobalVar_put %idscript NPC_TINKER gosub GlobalVar_put %idscript NPC_BLACKSMITH gosub GlobalVar_put %idscript NPC_TAILOR gosub GlobalVar_put %idscript NPC_CARPENTER gosub GlobalVar_put %idscript NPC_BOWCRAFTER gosub Menu_Crea } 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 if %npc_ . %type_quest <> N/A { Menu Clear Menu Hide return #True } else display ok Per questa Quest non č stato impostato l'NPC relativo. $ Vai nell'area Quest per impostare l'NPC goto Menu_Loop_Ciclo } 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 Menu_Loop_Ciclo 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 } if %menu_valido_AVVIO { menu get cmbType_Quest set %type_quest %quest_ . #menures gosub GlobalVar_put %idscript type_quest } return ;sub Menu_validate_loot sub Menu_validate_loot set %menu_valido_loot #true set !loot1 OAK set !loot2 ASH set !loot3 YEW set !loot4 HEARTWOOD set !loot5 FIREHORN set !loot6 SLAYER set !loot7 SUMMONING set !lootn 7 for !ivl 1 !lootn { set !v1 chk , !loot . !ivl set !v2 loot_ , !loot . !ivl menu get !v1 if #menures <> % . !v2 { set % . !v2 #menures gosub GlobalVar_put %idscript !v2 } } menu getnum chkLOOT_TALISMAN if #menures <> %LOOT_TALISMAN { set %LOOT_TALISMAN #menures gosub GlobalVar_put %idscript LOOT_TALISMAN } set !loot1 protection_min set !loot2 killer_min set !loot3 skill_min set !loot4 skillx_min set !lootn 4 for !ivl 1 !lootn { set !v1 edt , !loot . !ivl set !v2 loot_ , !loot . !ivl menu getnum !v1 if #menures <> % . !v2 { set % . !v2 #menures gosub GlobalVar_put %idscript !v2 gosub is_num % . !v2 if ! #result set %menu_valido_loot #false } } menu get edtIgnored_monster if #menures <> %ignored_monster { set %ignored_monster #menures gosub GlobalVar_put %idscript ignored_monster } menu get edtignored_skill if #menures <> %ignored_skill { set %ignored_skill #menures gosub GlobalVar_put %idscript ignored_skill } ;loot gosub Menu_display_Box_Multi_Value ASSES SAVE menu getnum chkloot_equip set %loot_equip #menures gosub GlobalVar_put %idscript loot_equip menu getnum edtasses_pass_value if #menures > 0 && #menures < 100000 set !val #MenuRes else set !val 0 if !val <> %asses_pass_value { set %asses_pass_value !val gosub GlobalVar_put %idscript asses_pass_value } If %asses_pass_value < 1 || %asses_pass_value > 100000 set %menu_valido_loot #false gosub GlobalVar_put %idscript menu_valido_loot return ;sub Menu_validate_quest sub Menu_validate_quest set %menu_valido_Quest #true gosub GlobalVar_put %idscript menu_valido_Quest return ;sub Menu_validate_recipe sub Menu_validate_recipe set %menu_valido_RECIPE #true set !l recipe_ , %Type_quest , _max set !l2 recipe_ , %Type_quest , _flag set ! . !l2 for !i 1 % . !l { menu get chkRecipe . !i if #menures set ! . !l2 ! . !l2 , 1 else set ! . !l2 ! . !l2 , 0 } if ! . !l2 <> % . !l2 { set % . !l2 ! . !l2 gosub GlobalVar_put %idscript !l2 } gosub GlobalVar_put %idscript menu_valido_RECIPE 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 %CHEST_TRASH = 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 If %RB_HEARTWOOD = N/A set %menu_valido_Restock #false menu getnum edtfirstrune_HEARTWOOD if #menures > 0 && #menures < 17 set !val #MenuRes else set !val 0 if !val <> %firstrune_HEARTWOOD { set %firstrune_HEARTWOOD !val gosub GlobalVar_put %idscript firstrune_HEARTWOOD } menu getnum edtlastrune_HEARTWOOD if #menures > 0 && #menures < 17 set !val #MenuRes else set !val 0 if !val <> %lastrune_HEARTWOOD { set %lastrune_HEARTWOOD !val gosub GlobalVar_put %idscript lastrune_HEARTWOOD } If %firstrune_HEARTWOOD < 1 || %firstrune_HEARTWOOD > 16 set %menu_valido_Restock #false If %lastrune_HEARTWOOD < 1 || %lastrune_HEARTWOOD > 16 || %firstrune_HEARTWOOD > %lastrune_HEARTWOOD set %menu_valido_Restock #false menu get chkusa_beetle if #menures <> %usa_beetle { set %usa_beetle #menures gosub GlobalVar_put %idscript usa_beetle } gosub GlobalVar_put %idscript menu_valido_Restock return ;sub Menu_validate_varie sub Menu_validate_varie set %menu_valido_VARIE #true 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 set !val1 AUTO set !val2 #TRUE set !val3 #FALSE menu get cmbUSA_TINKER set !val !val . #menures if !val <> %USA_TINKER { set %USA_TINKER !val gosub GlobalVar_put %idscript USA_TINKER } gosub GlobalVar_put %idscript menu_valido_VARIE return ;sub Rescindi_quest sub Rescindi_quest gosub Set_Menu_Azione RESCINDI QUEST set #NEXTCPOSX 2 set #NEXTCPOSy 660 set !ji_gq #jindex rescindi_loop: event macro 8 19 gosub Antiblock wait 20 gosub wait_sizegump 507_436 5 if ! #result goto rescindi_loop set !cx #contposx set !cy #contposy loop_premi_set_quest: set !c_x 375 + !cx set !c_y 150 + !cy click !c_x !c_y f wait 25 gosub wait_sizegump 507_436 5 if ! #result goto loop_premi_set_quest set !cx #contposx set !cy #contposy set !resign_a_vuoto 0 loop_premi_resign_quest: set !resign_a_vuoto !resign_a_vuoto + 1 set !c_x 130 + !cx set !c_y 405 + !cy click !c_x !c_y f wait 25 gosub wait_sizegump 348_262 5 if ! #result && !resign_a_vuoto < 2 goto loop_premi_resign_quest set !cx #contposx set !cy #contposy loop_conferma_resign_quest: set !c_x 303 + !cx set !c_y 230 + !cy click !c_x !c_y f wait 1s return ;sub Restock sub Restock gosub Set_Menu_Azione RESTOCK if %type_quest = BOWCRAFTER { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo if !tot > 0 gosub Prendi_Stack_Oggetto %Type_Crossbow_bolt %chest_Resource !tot 0 gosub Conta_Stack_Item %Type_Crossbow_bolt #backpackid 0 if #result < %quest_amount { display OK Non hai Crossbow Bolt a sufficienza $ Script Fermato halt } menu set txtAmount_Material #result return } if %type_quest = TINKER { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo if !tot > 0 gosub Prendi_Stack_Oggetto %Type_lingotti %chest_Resource !tot 0 gosub Conta_Stack_Item %Type_lingotti #backpackid 0 if #result < ( %quest_amount * %Material_Cost ) { display OK Non hai Ingot a sufficienza $ Script Fermato halt } set !tot_iron #result menu set txtAmount_Material !tot_iron ;almeno un tinker tool gosub Check_object %Type_tools_tinker #backpackid if #result = #false { gosub Prendi_oggetto %Type_tools_tinker %chest_tool 1 if #result = #false { display OK Non hai nemmeno un Tinker Tool $ Script Fermato halt } } return } if %type_quest = BLACKSMITH { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo if !tot > 0 gosub Prendi_Stack_Oggetto %Type_lingotti %chest_Resource !tot 0 gosub Conta_Stack_Item %Type_lingotti #backpackid 0 if #result < ( %quest_amount * %Material_Cost ) { display OK Non hai Ingot a sufficienza $ Script Fermato halt } set !tot_iron #result menu set txtAmount_Material !tot_iron if %usetinker { ;almeno un tinker tool gosub Check_object %Type_tools_tinker #backpackid if #result = #false { gosub Prendi_oggetto %Type_tools_tinker %chest_tool 1 if #result = #false { display OK Non hai nemmeno un Tinker Tool $ Script Fermato halt } } } else { set !need_uses !tot_iron / %Material_Cost gosub check_tool %quest_tool_family !need_uses if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %chest_tool !need_uses #backpackid if ( %check_tool_result_uses + #result ) < ( %quest_amount * %Material_Cost ) { display OK Non hai Tool a sufficienza $ Script Fermato halt } } } return } if %type_quest = TAILOR { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo if !tot > 0 gosub Prendi_Stack_Oggetto %quest_material %chest_Resource !tot 0 gosub Conta_Stack_Item %quest_material #backpackid 0 if #result < ( %quest_amount * %Material_Cost ) { display OK Non hai Materiale a sufficienza $ Script Fermato halt } set !tot_material #result menu set txtAmount_Material !tot_material if %usetinker { ;almeno un tinker tool gosub Check_object %Type_tools_tinker #backpackid if #result = #false { gosub Prendi_oggetto %Type_tools_tinker %chest_tool 1 if #result = #false { display OK Non hai nemmeno un Tinker Tool $ Script Fermato halt } } ;20 lingotti o 80 con beetle gosub Conta_Stack_Item %Type_lingotti #backpackid 0 set !am_ir 20 if %usa_beetle set !am_ir 100 if #result < !am_ir { set !am_ir !am_ir - #result gosub Prendi_Stack_Oggetto %Type_lingotti %chest_Resource !am_ir 0 } } else { set !need_uses !tot_material / %Material_Cost gosub check_tool %quest_tool_family !need_uses if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %chest_tool !need_uses #backpackid if ( %check_tool_result_uses + #result ) < ( %quest_amount * %Material_Cost ) { display OK Non hai Tool a sufficienza $ Script Fermato halt } } } return } if %type_quest = CARPENTER { set !v #maxweight + %modweight - #weight - 100 set !tot !v * %quest_material_moltiplicator ;%quest_amount * %quest_per_ciclo if !tot > 0 gosub Prendi_Stack_Oggetto %quest_material %chest_Resource !tot 0 gosub Conta_Stack_Item %quest_material #backpackid 0 if #result < ( %quest_amount * %Material_Cost ) { display OK Non hai Materiale a sufficienza $ Script Fermato halt } set !tot_material #result menu set txtAmount_Material !tot_material if %usetinker { ;almeno un tinker tool gosub Check_object %Type_tools_tinker #backpackid if #result = #false { gosub Prendi_oggetto %Type_tools_tinker %chest_tool 1 if #result = #false { display OK Non hai nemmeno un Tinker Tool $ Script Fermato halt } } ;40 lingotti o 150 con beetle gosub Conta_Stack_Item %Type_lingotti #backpackid 0 set !am_ir 40 if %usa_beetle set !am_ir 150 if #result < !am_ir { set !am_ir !am_ir - #result gosub Prendi_Stack_Oggetto %Type_lingotti %chest_Resource !am_ir 0 if #result = #false { display ok Non hai Lingotti $ Script fermato! halt } } } else { set !need_uses !tot_material / %Material_Cost gosub check_tool %quest_tool_family !need_uses if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %chest_tool !need_uses #backpackid if ( %check_tool_result_uses + #result ) < ( %quest_amount * %Material_Cost ) { display OK Non hai Tool a sufficienza $ Script Fermato halt } } } return } display ok ANCORA DA CORREGGERE halt set !tot_iron 20 if %quest_material = %Type_lingotti set !tot_iron !tot_iron + %quest_amount * %Material_Cost * ;%quest_per_ciclo ;iron gosub Conta_Stack_Item %Type_lingotti #backpackid 0 if #result < !tot_iron { set !t !tot_iron - #result gosub Prendi_Stack_Oggetto %Type_lingotti %chest_Resource !t 0 if #result = #false { display OK Non hai iron a sufficienza $ Script Fermato halt } } if %quest_material <> %Type_lingotti { set !tot_resource %quest_amount * %Material_Cost * ;%quest_per_ciclo gosub Conta_Stack_Item %quest_material #backpackid 0 if #result < !tot_resource { set !t !tot_resource - #result gosub Prendi_Stack_Oggetto %quest_material %chest_Resource !t 0 if #result = #false { display OK Non hai Materiale ( %quest_material ) a sufficienza $ Script Fermato halt } } } menu set txtAmount_Material !tot_resource return ;sub Restock_beetle sub Restock_beetle gosub Set_Menu_Azione RESTOCK BEETLE if %type_quest = BOWCRAFTER { gosub unmount %type_beetle_mounted %id_beetle wait 10 gosub Get_Weight_in_container %id_beetle set !v 1500 - #result - 100 set !tot_bolt !v * %quest_material_moltiplicator gosub move_fra_chest %chest_resource %Type_Crossbow_bolt %id_beetle !tot_bolt gosub mount %id_beetle %type_beetle_mounted wait 10 return } if %type_quest = TINKER { gosub unmount %type_beetle_mounted %id_beetle wait 10 gosub Get_Weight_in_container %id_beetle set !v 1500 - #result - 100 set !tot_iron !v * %quest_material_moltiplicator gosub move_fra_chest %chest_resource %Type_lingotti %id_beetle !tot_iron 0 gosub mount %id_beetle %type_beetle_mounted wait 10 return } if %type_quest = BLACKSMITH { gosub unmount %type_beetle_mounted %id_beetle wait 10 gosub Get_Weight_in_container %id_beetle set !v 1500 - #result - 100 set !tot_iron !v * %quest_material_moltiplicator gosub move_fra_chest %chest_resource %Type_lingotti %id_beetle !tot_iron 0 if ! %usetinker { gosub Open_backpack_beetle %id_beetle %cont_beetle if #result = #false return #false gosub Conta_Stack_Item %Type_lingotti %cont_beetle 0 if #result > %Material_Cost { set !need_uses #result / %Material_Cost gosub check_tool %quest_tool_family !need_uses %cont_beetle if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %chest_tool !need_uses %cont_beetle } } } gosub mount %id_beetle %type_beetle_mounted return } if %type_quest = TAILOR { gosub unmount %type_beetle_mounted %id_beetle wait 10 gosub Get_Weight_in_container %id_beetle set !v 1500 - #result - 100 set !tot_material !v * %quest_material_moltiplicator gosub move_fra_chest %chest_resource %quest_material %id_beetle !tot_material 0 if ! %usetinker { gosub Open_backpack_beetle %id_beetle %cont_beetle if #result = #false return #false gosub Conta_Stack_Item %quest_material %cont_beetle 0 if #result > %Material_Cost { set !need_uses #result / %Material_Cost gosub check_tool %quest_tool_family !need_uses %cont_beetle if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %chest_tool !need_uses %cont_beetle } } } gosub mount %id_beetle %type_beetle_mounted return } if %type_quest = CARPENTER { gosub unmount %type_beetle_mounted %id_beetle wait 10 gosub Get_Weight_in_container %id_beetle set !v 1500 - #result - 100 set !tot_material !v * %quest_material_moltiplicator gosub move_fra_chest %chest_resource %quest_material %id_beetle !tot_material 0 if ! %usetinker { gosub Open_backpack_beetle %id_beetle %cont_beetle if #result = #false return #false gosub Conta_Stack_Item %quest_material %cont_beetle 0 if #result > %Material_Cost { set !need_uses #result / %Material_Cost gosub check_tool %quest_tool_family !need_uses %cont_beetle if #result = #false { set !need_uses !need_uses - %check_tool_result_uses gosub prendi_tool_uses %quest_tool_family %chest_tool !need_uses %cont_beetle } } } gosub mount %id_beetle %type_beetle_mounted return } display ok Restock Beetle per questo non fatto $ script in pausa pause return ;sub Set_quest_variabili sub Set_quest_variabili if %type_quest = TINKER { if %usetinker = #false { display ok Non puoi fare la quest Tinker con skill Tinker minore di 40. $ Script fermato! halt } set %quest_amount 25 set %quest_material %Type_lingotti set %quest_material_name INGOT set %quest_material_moltiplicator 10 set %quest_npc %npc_tinker set %quest_tool %Type_toolkit set %quest_tool_family %Type_tools_tinker set %quest_pointX1 199 set %quest_pointY1 113 set %quest_pointCOL1 8701514 set %quest_pointX2 186 set %quest_pointY2 117 set %quest_pointCOL2 3223882 set %quest_Point_check 2 ;set %quest_per_ciclo 20 set %quest_must_make #TRUE set %quest_stack_item #FALSE gosub GetItemParamaters Barrel_Tap } if %type_quest = BLACKSMITH { chooseSkill Blac if #skill < 355 { display ok Non puoi fare la quest BLACKSMITH con skill Blacksmith minore di 35,5. $ Script fermato! halt } set !csr_magery #SKILL set %quest_amount 10 set %quest_material %Type_lingotti set %quest_material_name INGOT set %quest_material_moltiplicator 10 set %quest_npc %npc_BLACKSMITH set %quest_tool %Type_tongs set %quest_tool_family %Type_tools_blacksmith set %quest_pointX1 164 set %quest_pointY1 113 set %quest_pointCOL1 8701514 set %quest_pointX2 186 set %quest_pointY2 117 set %quest_pointCOL2 3223882 set %quest_Point_check 2 ;set %quest_per_ciclo 20 set %quest_must_make #TRUE set %quest_stack_item #FALSE gosub GetItemParamaters Broadsword } if %type_quest = TAILOR { set %quest_amount 10 set %quest_material %Type_cloth set %quest_material_name CLOTH set %quest_material_moltiplicator 10 set %quest_npc %npc_TAILOR set %quest_tool %Type_Sewing_Kit set %quest_tool_family %Type_tools_tailor set %quest_pointX1 164 set %quest_pointY1 112 set %quest_pointCOL1 8701514 set %quest_pointX2 188 set %quest_pointY2 112 set %quest_pointCOL2 8701514 set %quest_pointX3 251 set %quest_pointY3 120 set %quest_pointCOL3 3228209 set %quest_Point_check 3 ;set %quest_per_ciclo 20 set %quest_must_make #TRUE set %quest_stack_item #FALSE gosub GetItemParamaters Kilt } if %type_quest = CARPENTER { set %quest_amount 10 set %quest_material %Type_boards set %quest_material_name BOARD set %quest_material_moltiplicator 1 set %quest_npc %npc_CARPENTER set %quest_tool %Type_Saw set %quest_tool_family %Type_tools_carpenter set %quest_rail heartwood_CARPENTER.pth set %quest_pointX1 162 set %quest_pointY1 113 set %quest_pointCOL1 8701514 set %quest_pointX2 181 set %quest_pointY2 113 set %quest_pointCOL2 8701514 set %quest_pointX3 222 set %quest_pointY3 119 set %quest_pointCOL3 3223890 set %quest_pointX4 215 set %quest_pointY4 123 set %quest_pointCOL4 8701514 set %quest_pointX5 208 set %quest_pointY5 123 set %quest_pointCOL5 8701514 set %quest_Point_check 5 ;set %quest_per_ciclo 5 set %quest_must_make #TRUE set %quest_stack_item #FALSE gosub GetItemParamaters Foot_Stool } if %type_quest = BOWCRAFTER { set %quest_amount 10 set %quest_material %type_crossbow_bolt set %quest_material_name BOLT set %quest_npc %npc_BOWCRAFTER set %quest_material_moltiplicator 10 set %quest_tool N/A set %quest_tool_family N/A set %quest_rail heartwood_BOWCRAFTER.pth set %quest_pointX1 160 set %quest_pointY1 113 set %quest_pointCOL1 8701514 set %quest_pointX2 203 set %quest_pointY2 113 set %quest_pointCOL2 8701514 set %quest_pointX3 227 set %quest_pointY3 120 set %quest_pointCOL3 3223865 set %quest_pointX4 220 set %quest_pointY4 120 set %quest_pointCOL4 4340025 set %quest_pointX5 237 set %quest_pointY5 118 set %quest_pointCOL5 3754545 set %quest_Point_check 5 ;set %quest_per_ciclo 30 set %quest_must_make #FALSE set %quest_stack_item #TRUE gosub GetItemParamaters Crossbow_Bolt } set %maxspot 0 gosub Set_Rail_ . %type_quest if %maxspot = 0 { display ok Rail non trovata in 'sub Set_quest_variabili' $ Script fermato halt } ignoreitem %quest_npc quest_npc return ;sub Set_rail_blacksmith sub Set_rail_blacksmith set %maxspot 12 set %x1 6986 set %y1 339 set %z1 0 set %x2 6995 set %y2 348 set %z2 0 set %x3 7002 set %y3 357 set %z3 0 set %x4 7011 set %y4 366 set %z4 0 set %x5 7016 set %y5 375 set %z5 0 set %x6 7020 set %y6 384 set %z6 0 set %x7 7024 set %y7 393 set %z7 0 set %x8 7028 set %y8 402 set %z8 7 set %x9 7037 set %y9 409 set %z9 9 set %x10 7046 set %y10 412 set %z10 7 set %x11 7046 set %y11 421 set %z11 2 set %x12 7058 set %y12 414 set %z12 0 return ;sub Set_rail_bowcrafter sub Set_rail_bowcrafter set %maxspot 6 set %x1 6986 set %y1 339 set %z1 0 set %x2 6998 set %y2 351 set %z2 0 set %x3 7008 set %y3 363 set %z3 0 set %x4 7020 set %y4 375 set %z4 0 set %x5 7032 set %y5 378 set %z5 0 set %x6 7039 set %y6 380 set %z6 0 return ;sub Set_rail_carpenter sub Set_rail_carpenter set %maxspot 9 set %x1 6986 set %y1 339 set %z1 0 set %x2 6994 set %y2 347 set %z2 0 set %x3 7000 set %y3 355 set %z3 0 set %x4 7008 set %y4 363 set %z4 0 set %x5 7016 set %y5 371 set %z5 0 set %x6 7014 set %y6 376 set %z6 0 set %x7 7004 set %y7 377 set %z7 0 set %x8 6996 set %y8 376 set %z8 0 set %x9 6987 set %y9 380 set %z9 0 return ;sub Set_rail_tailor sub Set_rail_tailor set %maxspot 13 set %x1 6986 set %y1 339 set %z1 0 set %x2 6995 set %y2 348 set %z2 0 set %x3 7002 set %y3 357 set %z3 0 set %x4 7011 set %y4 366 set %z4 0 set %x5 7016 set %y5 375 set %z5 0 set %x6 7020 set %y6 384 set %z6 0 set %x7 7024 set %y7 393 set %z7 0 set %x8 7028 set %y8 402 set %z8 7 set %x9 7037 set %y9 409 set %z9 9 set %x10 7046 set %y10 412 set %z10 7 set %x11 7046 set %y11 421 set %z11 2 set %x12 7041 set %y12 432 set %z12 0 set %x13 7033 set %y13 440 set %z13 0 return ;sub Set_rail_tinker sub Set_rail_tinker set %maxspot 11 set %x1 6986 set %Y1 339 set %Z1 0 set %x2 6992 set %Y2 345 set %Z2 0 set %x3 6998 set %Y3 351 set %Z3 0 set %x4 7002 set %Y4 357 set %Z4 0 set %x5 7008 set %Y5 363 set %Z5 0 set %x6 7014 set %Y6 369 set %Z6 0 set %x7 7015 set %Y7 375 set %Z7 0 set %x8 7009 set %Y8 377 set %Z8 0 set %x9 7003 set %Y9 377 set %Z9 0 set %x10 6997 set %Y10 376 set %Z10 0 set %x11 6986 set %Y11 382 set %Z11 0 return ;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 %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 + 3600 } return ;sub Setaccia_premi sub Setaccia_premi gosub Set_Menu_Azione SETACCIO PREMI find_trash_setaccia_premi: finditem %type_trash g_20 if #findkind = -1 return #false if #FINDDIST > 1 { gosub PathFind #findx #findy #findz 3 if #result = #false goto find_trash_setaccia_premi } set %temp_trash #findid loop_setaccia_premi: finditem %Type_backpack c_ , #backpackid if #findkind = -1 { ignoreitem reset price_to_move return #true } set %bp_id #findid set !time_error #scnt + 5 set #lobjectid %bp_id event macro 17 0 gosub antiblock while #contid <> %bp_id { event macro 17 0 wait 1s if #scnt > !time_error break } if #contid <> %bp_id goto loop_setaccia_premi finditem * c_ , %bp_id if #FINDKIND <> -1 { for #findindex 1 #findcnt { set %chest_dest %temp_trash set %fid #findid set %ftype #findtype set %fcolor #findcol set %fstack #findstack set %va_tenuto #false set %so_cosa_farne #false if %ftype in %Type_Runic { if %fcolor = %col_oak { set %nome_premio RUNIC_OAK if %loot_OAK set %va_tenuto #true set %so_cosa_farne #true } if %fcolor = %col_Ash { set %nome_premio RUNIC_ASH if %loot_ASH set %va_tenuto #true set %so_cosa_farne #true } if %fcolor = %col_Yew { set %nome_premio RUNIC_YEW if %loot_Yew set %va_tenuto #true set %so_cosa_farne #true } if ! %so_cosa_farne { display ok Manca colore runico %fcolor pause halt } } if %ftype in %Type_talisman { set %nome_premio TALISMANO gosub eval_talisman %fid if #result = #true { set %va_tenuto #true } set %so_cosa_farne #true } if %ftype in %Type_recipe { gosub check_Recipe_Flag %fid if #result { set %chest_dest %chest_recipe set %nome_premio %name_recipe } else { set %nome_premio RECIPE } set %va_tenuto #result set %so_cosa_farne #true } if %ftype in %equip { gosub asses_item %fid #true set %va_tenuto %asses_pass set %nome_premio EQUIP set %so_cosa_farne #true } if %ftype in %type_FireHorn { set %va_tenuto %loot_firehorn set %nome_premio FIREHORN set %so_cosa_farne #true } if ! %so_cosa_farne { display ok %ftype NON SO CASA FARE pause halt } if %va_tenuto set %chest_dest %bag_porta_premi else set %chest_dest %temp_trash gosub drag_premi } } Exevent Drag %bp_id gosub AntiBlock NO_ALARM_EVENT Exevent Dropc %temp_trash gosub AntiBlock wait 10 goto loop_setaccia_premi return ;sub Sposta_premi sub Sposta_premi gosub Set_Menu_Azione SPOSTO PREMI loop_sposta_premi_apri_cont: gosub Open_Container %bag_porta_premi 5 820 480 #backpackid if ! #result goto loop_sposta_premi_apri_cont loop_sposta_premi: finditem %prize_to_move c_ , %bag_porta_premi if #FINDKIND = -1 return for #findindex 1 #findcnt { set %chest_dest N/A if #findtype in %Type_Runic { set %chest_dest %chest_runic } if #findtype in %Type_talisman { set %chest_dest %chest_talisman } if #findtype in %Type_recipe { set %chest_dest %chest_recipe } if #findtype in %equip_to_loot { set %chest_dest %chest_equip } if #findtype in %type_FireHorn { set %chest_dest %chest_other } if %chest_dest = N/A { display ok Errore in sposta_premi pause halt } Exevent Drag #findid #findstack gosub AntiBlock NO_ALARM_EVENT Exevent Dropc %chest_dest gosub AntiBlock wait 10 } goto loop_sposta_premi return ;sub Start_menu sub Start_menu gosub Menu_Init if %new_version gosub Menu_Set_Size 300 560 else gosub Menu_Set_Size 300 540 gosub Menu_Set_Intestazione %idscript Maremma_Quest Pepito_Settevite %versionscript gosub Menu_Add_Menu RESTOCK RESTOCK gosub Menu_Add_Menu QUEST QUEST gosub Menu_Add_Menu RECIPE RECIPE gosub Menu_Add_Menu LOOT LOOT 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 gosub Set_Menu_Azione TORNO A CASA torna_a_casa_loop: gosub Torna_Posizione RESTOCK if #result = #false { if %id_error = cannot return #false goto torna_a_casa_loop } return #true ;sub Troppa_roba sub Troppa_roba gosub check_peso if ! #result return #true gosub Count_item_in_container #backpackid if #result > 110 return #true return #false ;sub Vai_a_heartwood sub Vai_a_heartwood gosub Set_Menu_Azione VADO A HEARTWOOD riprova_vah: gosub antiblock if %actRune_HEARTWOOD = N/A set %actRune_HEARTWOOD %firstRune_HEARTWOOD gosub Use_Runebook %RB_HEARTWOOD %actRune_HEARTWOOD %magia_usata if #result = #false { wait 1s set %actRune_HEARTWOOD %actRune_HEARTWOOD + 1 if %actRune_HEARTWOOD > %lastRune_HEARTWOOD set %actRune_HEARTWOOD %firstRune_HEARTWOOD goto riprova_vah } gosub entra_a_heartwood if #result = #false { goto riprova_vah } return ;################## CUSTOM SUB FINISH ###########################