set %idscript PEPITO_BOD set %versionscript 0.09 set %bodscript PEPITO_GIROBOD set %Alarmscript PEPITO_ALARM set #lpc 1000 gosub Initialize_Type gosub Inizializza_Variabili gosub Inizializza_Contatori gosub Check_Skill_Recall set %magia_usata #result set #lpc 100 ;set * . %idscript ;display ok * . %idscript gosub Start_Menu gosub Get_Position_Container gosub Crea_Lista_Item_e_Container gosub Set_Ultime_Variabili gosub Crea_Menu_Avviato if %debug gosub LOOP_DEBUG if %pepito_alarm gosub Alarm_init MAIN_LOOP: gosub Torna_a_Casa if %chest_trash = N/A gosub get_trash gosub conta_risorse if %fill_large_mode { gosub fill_some_large set %fill_large_mode #false } gosub bod_check_interrupted gosub conta_book_generico gosub svuota_container #backpackid if %svuotabod { gosub conta_book_generico gosub svuota_container %objSvuotaBod } gosub conta_book_generico 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 goto MAIN_LOOP } if #time >= %sospendida && #time <= %sospendia && %sospendi gosub Sospendi_script %sospendida %sospendia gosub sistema_premi gosub bodcraft_emptyTools gosub trash_bod_in_bag_trash gosub consegna_bod if #result goto MAIN_LOOP gosub fill_some_bods 20 if #result = EMPTY && %act_filled = 0 { if %ritiro_bod gosub wait_time_to_getbod else { display ok BOD FINITI $ SCRIPT FERMATO halt } } gosub bodcraft_emptyTools 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.3 -> 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 { 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.1 -> p 1 -> d getproperty sub Alarm_pg_finded set %alarm_id %1 set !alarm_t _ , %alarm_id , _ if !alarm_t in * . %idAlarmscript || %alarm_id = #CHARID { event exmsg %alarm_id 3 30 IGNORO ignoreitem %alarm_id Alarm_ignore return #false } gosub getproperty %alarm_id set %alarm_property #result if #spc , the , #spc in %alarm_property || shop , #spc , name: in %alarm_property { event exmsg #findid 3 30 IGNORO ignoreitem #findid Alarm_ignore_vendor return #false } set %alarm_Type PG return #true ;sub Alarm_start v 1.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.5 -> p 0(1) -> d 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 + 40 if %last_journal_read_save = N/A set %last_journal_read_save #jindex - 6 for !scan_index %last_journal_read_save #jindex { scanjournal !scan_index if : notin #journal && ( The_world_is_saving in #journal || Cleaning_resources in #journal );|| { gosub Save_Event START aspettaskip: for !scan_index 5 1 { scanjournal !scan_index if World_save_complete in #journal || Resources_cleaned in #journal { gosub Save_Event FINE goto fine } wait 5 } if #scnt > %maxpausa { gosub Save_Event FINE goto fine } goto aspettaskip } } fine: set %last_journal_read_save #jindex return ;sub Apri_bank v 1.0 -> p 1 -> d antiblock Wait_idgump sub Apri_bank set !id_chest %1 msg BANK BANK $ gosub antiblock gosub Wait_idgump !id_chest 5 return #result ;sub Apri_gump_base v 1.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_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 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_add_smalls_to_large v 1.0 -> p 2 -> d waitForSysVars GetProperty sub Bod_add_smalls_to_large set !lid %1 ;id del bod large set !sid %2 ;small bod id nel formato _id1_id2_id3_ etc etc set !large_size 510_395_510_323_510_347_ set !bodfill_result #false set #lobjectid !lid bastl_useBod: event macro 17 0 gosub waitForSysVars contsize in !large_size contname = generic_gump 5 if #contsize notin !large_size { display ok questo contsize manca in bod_add_smalls_to_large pause } if ! #result goto bastl_useBod set !FillY N/A set !FillX #contposx + 140 if #contsize = 510_395 set !FillY #contposy + 325 if #contsize = 510_323 set !FillY #contposy + 250 if #contsize = 510_347 set !FillY #contposy + 275 if !FillY = N/A { display ok di questo contsize mi manca le coordinate x e y di click pause } click !FillX !FillY f target 3s bastl_1: gosub waitForSysVars contsize in !large_size contname = generic_gump 5 set !j_bastl_start #jindex + 1 finditem !sid C_ , #backpackid if #findkind = -1 { if #targcurs <> 0 set #targcurs 0 goto bastl_esci } if #targcurs <> 1 && #findcnt >= 1 { click !FillX !FillY f target 30 } if #findkind <> -1 { set #ltargetid #findid set #ltargetkind 1 Event Macro 22 0 wait 5 target 3s goto bastl_1 } set %lpc #lpc set #lpc 500 gosub GetProperty !lid set #lpc %lpc if : , #spc , 0 in !prop goto bastl_1 bastl_esci: wait 10 gosub waitForSysVars contsize in !large_size contname = generic_gump 5 set !FillY !FillY + 25 ;exit Button bastl_2: click !FillX !FillY F gosub waitForSysVars contsize notin !large_size contname <> generic_gump 5 if ! #result goto bastl_2 return FILLED ;sub Bod_analizza v 1.0 -> p 1(2) -> d getproperty Bod_analizza_small Bod_analizza_large sub Bod_analizza set %bod_id %1 read_prop_analizza: if %0 < 2 || %2 <> #false { finditem %bod_id if #findkind = -1 || #findtype notin %type_bod return #false } set %bod_col #findcol gosub getproperty %bod_id str len #result if #strres < 30 goto read_prop_analizza set !lpc #lpc set #lpc 1000 set %bod_prop #result set %bod_Cloth 0 set %bod_Hides 0 set %bod_Bones 0 set %bod_ingots 0 ;guarda se fabbro o sarto set %bod_supertype TAILOR if %bod_col = %color_bod_smith set %bod_supertype SMITH ;large o small set %bod_size SMALL if Large , #spc , bulk in %bod_prop set %bod_size LARGE if %bod_size = LARGE gosub Bod_analizza_large else gosub Bod_analizza_small set !lpc #lpc return ;sub Bod_analizza_large v 1.0 -> p 0 -> d Bod_getDestinationFromPrize Bod_getLargePrize Bod_getQuantity Bod_GetExceptional bod_getTailorLargeSet bod_getSmithLargeSet Bod_GetMaterial sub Bod_analizza_large set !nome_sub Bod_get , %bod_supertype , Parameters if %bod_supertype = TAILOR gosub bod_getTailorLargeSet %bod_prop bod_ else gosub bod_getSmithLargeSet %bod_prop bod_ if All , #SPC , Items , #SPC , Must , #SPC , Be , #SPC , Made , #SPC , With in %bod_prop { gosub Bod_GetMaterial %bod_supertype %bod_prop bod_material for !f 1 %bod_largetype set %bod_material . !f %bod_material } else { set %bod_material %bod_material1 } gosub Bod_GetExceptional %bod_prop bod_exceptional gosub Bod_getQuantity %bod_prop bod_quantity set %bod_AlredyMadeQuantity 0 set %Bod_AlredyFilled %bod_AlredyMadeQuantity set %Bod_ToMakeQuantity %Bod_Quantity - %Bod_AlredyMadeQuantity gosub Bod_getLargePrize %bod_supertype %bod_largeset %bod_largetype %bod_Material %Bod_Quantity %Bod_Exceptional bod_largeprize gosub Bod_getDestinationFromPrize return ;sub Bod_analizza_small v 1.0 -> p 0 -> d bod_getSmithParameters bod_getTailorParameters Bod_GetMaterial Bod_GetExceptional Bod_getQuantity Bod_getAlredyMadeQuantity Bod_getLargePrize Bod_getDestinationFromPrize Bod_analizza sub Bod_analizza_small set !nome_sub Bod_get , %bod_supertype , Parameters if %bod_supertype = TAILOR gosub bod_getTailorParameters %bod_prop bod_category bod_piece bod_cloth bod_hides bod_bones bod_type bod_name bod_largeSet bod_largeType bod_recycable else gosub bod_getSmithParameters %bod_prop bod_category bod_piece bod_ingots bod_type bod_name bod_largeSet bod_largeType bod_recycable gosub Bod_GetMaterial %bod_supertype %bod_prop bod_material gosub Bod_GetExceptional %bod_prop bod_exceptional gosub Bod_getQuantity %bod_prop bod_quantity gosub Bod_getAlredyMadeQuantity %bod_prop bod_AlredyMadeQuantity set %Bod_AlredyFilled %bod_AlredyMadeQuantity set %Bod_ToMakeQuantity %Bod_Quantity - %Bod_AlredyMadeQuantity gosub Bod_getLargePrize %bod_supertype %bod_largeset %bod_largetype %bod_Material %Bod_Quantity %Bod_Exceptional bod_largeprize gosub Bod_getDestinationFromPrize return ;sub Bod_copia v 1.0 -> p 2 -> d split_to_array sub Bod_copia set !suffix_from %1 ;prefisso dell'analisi bod da copiare (es per %bod_XXX mettere bod) set !suffix_to %2 ;prefisso dell'analisi bod in cui copiare (es per %large_XXX mettere large) set !mat_varcopy SUPERTYPE|EXCEPTIONAL|QUANTITY|LARGESET|LARGETYPE|MATERIAL|ID|VERDICT|DESTINATION|PROP gosub split_to_array !mat_varcopy | varcopy for !f 1 #result { set !v1 !suffix_from , _ , %varcopy . !f set !v2 !suffix_to , _ , %varcopy . !f set % . !v2 % . !v1 } for !cntciclo 1 6 { set !v1 !suffix_from , _ITEM , !cntciclo set !v2 !suffix_to , _ITEM , !cntciclo set % . !v2 % . !v1 set !v1 !suffix_from , _MATERIAL , !cntciclo set !v2 !suffix_to , _MATERIAL , !cntciclo set % . !v2 % . !v1 } return ;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 Bod_find_a_small_in_container v 1.0 -> p 6 -> d open_container bod_analizza bod_material_to_string sub Bod_find_a_small_in_container set !container %1 set !supertype %2 set !quantity %3 set !exceptional %4 set !item_small %5 set !material_string %6 set !try_open #false set !fasic_find N/A if %type_bod = N/A set %type_bod EYM fasic_rifind: if !try_open && !container <> #backpackid { gosub open_container !container 5 805 300 wait 15 } finditem %type_bod c_ , !container if #findkind = -1 && !container <> #backpackid && !try_open = #false { set !try_open #true goto fasic_rifind } if #findkind <> -1 { for #findindex 1 #findcnt { gosub bod_analizza #findid #false if %bod_name = !item_small && %bod_quantity = !quantity && %bod_exceptional = !exceptional { gosub bod_material_to_string %bod_material if #result = !material_string { set !fasic_find %bod_id break } } } } return !fasic_find ;sub Bod_getalredymadequantity v 1.0 -> p 1(2) -> d 0 sub Bod_getalredymadequantity ;this sub is made by Boydon ;* @name GetBodAlredyMadeQuantity ;* @ver 1.1 26May06 ;* @author Boydon mod pepito ;* @purpose If a bod is partially filled this sub will let you how many ;* items have been already added inside it. ;* ;* @params %1 req #property of the bod ;* ;* @returns This sub will return the number of item alredy added to the Bod if %0 < 1 || %1 = N/A { display ok Wrong use of sub Bod_getalredymadequantity: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 <= 1 set %2 AlredyMadeQuantity nameSpace Push nameSpace Local Bod_getAlredyMadeQuantity , #time , #random , #scnt2 set !Property %1 ;Fix for UO ML if weight: in #property { str pos !Property weight: str del !Property #strres 7 set !Property #strres } str pos !Property : str del !Property #strres 1 set !MadeQuantity #strres str pos !MadeQuantity : set #strres ( #strres + 1 ) str del !MadeQuantity 1 #strres set !MadeQuantity #strres str pos !MadeQuantity $ str del !MadeQuantity #strres 1 nameSpace Clear nameSpace Pop set % . %2 #strres return ;sub Bod_getdestinationfromprize v 1.0 -> p 0 -> d Split_to_array sub Bod_getdestinationfromprize set !c0 normal set !ccloth normal set !c2419 dull set !c2406 shadow set !c2413 copper set !c2418 bronze set !c2213 gold set !c2425 agapite set !c2207 verite set !c2219 valorite set !c2220 spined set !c2117 horned set !c2129 barbed set %bod_verdict UNDEFINED set %bod_destination UNDEFINED set !destination UNDEFINED gosub Split_to_array %bod_largeprize | prize for !f 1 #result { set !v chkLPrize_ , %prize . !f if % . !v { set !v LPrize_ , %prize . !f set !destination % . !v break } set !v impLPrize_ , %prize . !f if % . !v || !size = LARGE { set !v LPrize_ , %prize . !f set !destination % . !v break } } if %bod_size = LARGE { set !is_completed #true for !ciclo_bod_in_large 1 %bod_largetype { set !s %bod_item . !ciclo_bod_in_large , : , #spc , 0 if !s in %bod_prop { set !is_completed #false break } } if !is_completed { set %bod_verdict CONSEGNARE if %bod_supertype = TAILOR set %bod_destination %obj_sarto else set %bod_destination %obj_fabbro set %bod_AlredyMadeQuantity %bod_quantity set %Bod_AlredyFilled %bod_AlredyMadeQuantity set %Bod_ToMakeQuantity %Bod_Quantity - %Bod_AlredyMadeQuantity return } } if !destination <> UNDEFINED { if !destination = N/A { if %bod_supertype = TAILOR set !destination %obj_sarto_buoni else set !destination %obj_fabbro_buoni } set %bod_verdict BUONO set %bod_destination !destination return } if %Bod_ToMakeQuantity = 0 { set %bod_verdict CONSEGNARE if %bod_supertype = TAILOR set %bod_destination %obj_sarto else set %bod_destination %obj_fabbro return } if %bod_size = LARGE { set %bod_verdict TRASH set %bod_destination TRASH return } if %bod_largeset = BONE_SET { set !v BONES , !c . %bod_material if %CHOISE_ . !v = BUTTARE { set %bod_verdict TRASH set %bod_destination TRASH return } } if %bod_largeset = PLATEMAIL_SET { set !v PLATE , !c . %bod_material if %CHOISE_ . !v = BUTTARE { set %bod_verdict TRASH set %bod_destination TRASH return } } set %bod_verdict USARE set %bod_destination %obj_generico return ;sub Bod_getexceptional v 1.0 -> p 1(2) -> d 0 sub Bod_getexceptional ;this sub is made by Boydon ;* @name BodIsEceptional ;* @ver 1.0 11May05 ;* @author Boydon mod Pepito ;* @purpose Identify Exceptional bods ;* ;* @params %1 req #property of the bod ;* ;* @returns This sub will return #true if a bod IS an exceptional bod or #false if it IS NOT an exceptional bod if %0 < 1 || %1 = N/A { display ok Wrong use of Sub Bod_IsExceptional: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 <= 1 set %2 exceptional set % . %2 exceptional in %1 return ;sub Bod_getlargeprize v 1.0 -> p 6(7) -> d 0 sub Bod_getlargeprize nameSpace Push nameSpace Local Bod_getLargePrize , #time , #random , #scnt2 set !BodType %1 ;SMITH o TAILOR o 1155 o 1102 set !LargeTitle %2 ;title large set set !LargeType %3 ;type large (n voci) set !Material %4 ;material set !Amount %5 ;amount set !Exceptional %6 ;exe set !Prize prize if %7 = N/A || %0 <= 7 set !prize %7 set !c0 base set !cLEATHER base set !cIRON base set !ccloth base set !c2419 dull set !c2406 shadow set !c2413 copper set !c2418 bronze set !c2213 gold set !c2425 agapite set !c2207 verite set !c2219 valorite set !c2220 spined set !c2117 horned set !c2129 barbed if !LargeTitle = NOTHING { set % . !Prize NOTHING goto Bod_getLargePrize_out } set % . !Prize UNDEFINIED if !BodType = tailor || !BodType = 1155 { set !label t_ , !LargeType , _ , !c . !Material , _ , !Amount , _ if !Exceptional set !label !label , X else set !label !label , N goto !label } if !BodType = smith || !BodType = 1102 { if mail notin !LargeTitle { set !label f_weapon_ , !LargeType , _ , !Amount , _ if !Exceptional set !label !label , X else set !label !label , N goto !label } set !label f_ , !LargeTitle , _ , !c . !Material , _ , !Amount , _ if !Exceptional set !label !label , X else set !label !label , N goto !label } ;se qui non l'ha trovata display ok Error in Sub GetBodLargePrize: Large not Finded! +$Script will be halted. display yesno !label $ continue? if #dispres = YES return halt f_weapon_2_10_N: f_weapon_2_15_N: f_weapon_2_20_N: f_weapon_5_10_N: f_weapon_5_15_N: f_weapon_5_20_N: f_weapon_6_10_N: f_weapon_6_15_N: f_ringmail_set_base_10_N: f_ringmail_set_base_15_N: f_ringmail_set_base_20_N: f_chainmail_set_base_10_N: f_chainmail_set_base_15_N: f_chainmail_set_base_20_N: set % . !Prize GLOVES3|GARGOYLE|PROSPECTOR goto Bod_getLargePrize_out f_weapon_6_20_N: f_weapon_2_10_X: f_weapon_2_15_X: f_ringmail_set_dull_10_N: f_ringmail_set_dull_15_N: f_ringmail_set_base_10_X: f_ringmail_set_base_15_X: f_platemail_set_base_10_N: f_platemail_set_base_15_N: set % . !Prize GARGOYLE|PROSPECTOR|POF goto Bod_getLargePrize_out f_weapon_2_20_X: f_ringmail_set_dull_20_N: f_ringmail_set_shadow_10_N: f_ringmail_set_shadow_15_N: f_ringmail_set_base_20_X: f_platemail_set_base_20_N: set % . !Prize GLOVES5|POF goto Bod_getLargePrize_out f_weapon_5_10_X: f_weapon_5_15_X: f_ringmail_set_shadow_20_N: f_ringmail_set_copper_10_N: f_ringmail_set_copper_15_N: f_chainmail_set_dull_10_N: f_chainmail_set_dull_15_N: f_chainmail_set_base_10_X: f_chainmail_set_base_15_X: set % . !Prize KITDULL goto Bod_getLargePrize_out f_weapon_5_20_X: f_weapon_6_10_X: f_weapon_6_15_X: f_ringmail_set_copper_20_N: f_ringmail_set_bronze_10_N: f_ringmail_set_bronze_15_N: f_chainmail_set_dull_20_N: f_chainmail_set_shadow_10_N: f_chainmail_set_shadow_15_N: f_chainmail_set_base_20_X: set % . !Prize KITDULL|KITSHADOW goto Bod_getLargePrize_out f_weapon_6_20_X: f_ringmail_set_bronze_20_N: f_ringmail_set_gold_10_N: f_ringmail_set_dull_10_X: f_chainmail_set_shadow_20_N: f_chainmail_set_copper_10_N: f_platemail_set_dull_10_N: f_platemail_set_base_10_X: set % . !Prize KITSHADOW goto Bod_getLargePrize_out f_ringmail_set_gold_15_N: f_ringmail_set_dull_15_X: f_chainmail_set_copper_15_N: f_platemail_set_dull_15_N: f_platemail_set_base_15_X: set % . !Prize ANVIL|FSOP5|KITSHADOW goto Bod_getLargePrize_out f_ringmail_set_gold_20_N: f_ringmail_set_agapite_10_N: f_ringmail_set_dull_20_X: f_ringmail_set_shadow_10_X: f_chainmail_set_copper_20_N: f_chainmail_set_bronze_10_N: f_platemail_set_dull_20_N: f_platemail_set_shadow_10_N: f_platemail_set_base_20_X: set % . !Prize KITCOPPER goto Bod_getLargePrize_out f_ringmail_set_agapite_15_N: f_ringmail_set_shadow_15_X: f_chainmail_set_bronze_15_N: f_platemail_set_shadow_15_N: set % . !Prize ANVIL|FSOP10|KITCOPPER goto Bod_getLargePrize_out f_ringmail_set_agapite_20_N: f_ringmail_set_verite_10_N: f_ringmail_set_verite_15_N: f_ringmail_set_shadow_20_X: f_ringmail_set_copper_10_X: f_ringmail_set_copper_15_X: f_chainmail_set_bronze_20_N: f_chainmail_set_gold_10_N: f_chainmail_set_gold_15_N: f_chainmail_set_dull_10_X: f_chainmail_set_dull_15_X: f_platemail_set_shadow_20_N: f_platemail_set_copper_10_N: f_platemail_set_copper_15_N: set % . !Prize KITBRONZE goto Bod_getLargePrize_out f_ringmail_set_verite_20_N: f_ringmail_set_valorite_10_N: f_ringmail_set_valorite_15_N: f_ringmail_set_copper_20_X: f_ringmail_set_bronze_10_X: f_ringmail_set_bronze_15_X: f_chainmail_set_gold_20_N: f_chainmail_set_agapite_10_N: f_chainmail_set_agapite_15_N: f_chainmail_set_dull_20_X: f_chainmail_set_shadow_10_X: f_chainmail_set_shadow_15_X: f_platemail_set_copper_20_N: f_platemail_set_bronze_10_N: f_platemail_set_bronze_15_N: set % . !Prize ANCIENT10 goto Bod_getLargePrize_out f_ringmail_set_valorite_20_N: f_ringmail_set_bronze_20_X: f_ringmail_set_gold_10_X: f_ringmail_set_gold_15_X: f_chainmail_set_agapite_20_N: f_chainmail_set_verite_10_N: f_chainmail_set_verite_15_N: f_chainmail_set_shadow_20_X: f_chainmail_set_copper_10_X: f_chainmail_set_copper_15_X: f_platemail_set_bronze_20_N: f_platemail_set_gold_10_N: f_platemail_set_gold_15_N: f_platemail_set_dull_10_X: f_platemail_set_dull_15_X: set % . !Prize FSOP15 goto Bod_getLargePrize_out f_ringmail_set_gold_20_X: f_ringmail_set_agapite_10_X: f_ringmail_set_agapite_15_X: f_chainmail_set_verite_20_N: f_chainmail_set_valorite_10_N: f_chainmail_set_valorite_15_N: f_chainmail_set_copper_20_X: f_chainmail_set_bronze_10_X: f_chainmail_set_bronze_15_X: f_platemail_set_gold_20_N: f_platemail_set_agapite_10_N: f_platemail_set_agapite_15_N: f_platemail_set_dull_20_X: f_platemail_set_shadow_10_X: f_platemail_set_shadow_15_X: set % . !Prize ANCIENT15 goto Bod_getLargePrize_out f_ringmail_set_agapite_20_X: f_ringmail_set_verite_10_X: f_ringmail_set_verite_15_X: f_chainmail_set_valorite_20_N: f_chainmail_set_bronze_20_X: f_chainmail_set_gold_10_X: f_chainmail_set_gold_15_X: f_platemail_set_agapite_20_N: f_platemail_set_verite_10_N: f_platemail_set_verite_15_N: f_platemail_set_shadow_20_X: f_platemail_set_copper_10_X: f_platemail_set_copper_15_X: set % . !Prize FSOP20 goto Bod_getLargePrize_out f_ringmail_set_verite_20_X: f_ringmail_set_valorite_10_X: f_ringmail_set_valorite_15_X: f_chainmail_set_gold_20_X: f_chainmail_set_agapite_10_X: f_chainmail_set_agapite_15_X: f_platemail_set_verite_20_N: f_platemail_set_valorite_10_N: f_platemail_set_valorite_15_N: f_platemail_set_copper_20_X: f_platemail_set_bronze_10_X: f_platemail_set_bronze_15_X: set % . !Prize KITGOLD goto Bod_getLargePrize_out f_ringmail_set_valorite_20_X: f_chainmail_set_agapite_20_X: f_chainmail_set_verite_10_X: f_chainmail_set_verite_15_X: f_platemail_set_valorite_20_N: f_platemail_set_bronze_20_X: f_platemail_set_gold_10_X: f_platemail_set_gold_15_X: set % . !Prize ANCIENT30 goto Bod_getLargePrize_out f_chainmail_set_verite_20_X: f_chainmail_set_valorite_10_X: f_chainmail_set_valorite_15_X: f_platemail_set_gold_20_X: f_platemail_set_agapite_10_X: f_platemail_set_agapite_15_X: set % . !Prize KITAGAPITE goto Bod_getLargePrize_out f_chainmail_set_valorite_20_X: f_platemail_set_agapite_20_X: f_platemail_set_verite_10_X: f_platemail_set_verite_15_X: set % . !Prize ANCIENT60 goto Bod_getLargePrize_out f_platemail_set_verite_20_X: f_platemail_set_valorite_10_X: f_platemail_set_valorite_15_X: set % . !Prize KITVERITE goto Bod_getLargePrize_out f_platemail_set_valorite_20_X: set % . !Prize KITVALORITE goto Bod_getLargePrize_out t_4_base_10_N: t_4_base_15_N: set % . !Prize SMALLHIDE|MEDIUMHIDE goto Bod_getLargePrize_out t_4_base_20_N: t_4_spined_10_N: t_4_spined_15_N: set % . !Prize KITSPINED goto Bod_getLargePrize_out t_4_spined_20_N: t_4_base_10_X: t_4_base_15_X: t_4_horned_10_N: t_4_horned_15_N: t_5_base_10_N: t_5_base_15_N: set % . !Prize TSOP5|DARKTAPESTRY|LIGHTTAPESTRY goto Bod_getLargePrize_out t_4_horned_20_N: t_4_barbed_10_N: t_4_barbed_15_N: t_4_base_20_X: t_4_spined_10_X: t_4_spined_15_X: t_5_base_20_N: t_5_spined_10_N: t_5_spined_15_N: set % . !Prize BROWNBEAR|POLARBEAR goto Bod_getLargePrize_out t_4_barbed_20_N: t_4_spined_20_X: t_4_horned_10_X: t_4_horned_15_X: t_5_spined_20_N: t_5_horned_10_N: t_5_horned_15_N: t_5_base_10_X: t_5_base_15_X: t_6_base_10_N: t_6_base_15_N: set % . !Prize TSOP10 goto Bod_getLargePrize_out t_4_horned_20_X: t_4_barbed_10_X: t_5_horned_20_N: t_5_barbed_10_N: t_5_base_20_X: t_5_spined_10_X: t_6_base_20_N: t_6_spined_10_N: set % . !Prize BLESSDEED goto Bod_getLargePrize_out t_4_barbed_15_X: t_5_barbed_15_N: t_5_spined_15_X: t_6_spined_15_N: set % . !Prize TSOP15 goto Bod_getLargePrize_out t_4_barbed_20_X: t_5_barbed_20_N: t_5_spined_20_X: t_5_horned_10_X: t_5_horned_15_X: t_6_spined_20_N: t_6_horned_10_N: t_6_horned_15_N: t_6_base_10_X: t_6_base_15_X: set % . !Prize KITHORNED goto Bod_getLargePrize_out t_5_horned_20_X: t_5_barbed_10_X: t_5_barbed_15_X: t_6_horned_20_N: t_6_barbed_10_N: t_6_barbed_15_N: t_6_base_20_X: t_6_spined_10_X: t_6_spined_15_X: set % . !Prize TSOP20 goto Bod_getLargePrize_out t_5_barbed_20_X: t_6_barbed_20_N: t_6_spined_20_X: t_6_horned_10_X: t_6_horned_15_X: t_6_horned_20_X: t_6_barbed_10_X: t_6_barbed_15_X: t_6_barbed_20_X: set % . !Prize KITBARBED goto Bod_getLargePrize_out Bod_getLargePrize_out: namespace Clear namespace Pop return ;sub Bod_getmaterial v 1.0 -> p 2(3) -> d 0 sub Bod_getmaterial ;this sub is made by Boydon ;* @name Bod_getmaterial ;* @ver 1.0.1 14May05 ;* @author Boydon mod Pepito ;* @purpose Once the craft menu is focused use this to click the exit button ;* ;* @params ;* ;* @returns ;this sub is made by Boydon ;* @name GetBodMaterial ;* @author Boydon ;* @purpose This sub will tell you wich material is required by the BOD ;* The material will be returned in a var defined by the user without the "%" symbol. ;* Default variable name is "material" ;* ;* @params %1 req bod type (tailor|smithy) or the #findcol of the bod (1155|1102) ;* %2 req bod #property ;* %3 opt name of the var containing the material without the "%" symbol (default is "material") ;* ;* @returns if %0 < 2 || %1 = N/A || %2 = N/A { display ok Wrong use of sub Bod_getmaterial: some required arguments are missing! +$Script will be halted. halt } if %1 <> tailor && %1 <> smith && %1 <> 1155 && %1 <> 1102 { display ok Wrong value for parameter 1 in sub Bod_getmaterial! +$Script will be halted! halt } if %3 = N/A || %0 <= 2 set %3 material nameSpace Push nameSpace Local Bod_GetMaterial , #time , #random , #scnt2 set !BodType %1 set !Property %2 set !Material %3 if !BodType = tailor || !BodType = 1155 { if leather notin !Property && studded notin !Property && bone notin !Property && boots notin !Property && shoes notin !Property && sandals notin !Property set % . !Material CLOTH if leather in !Property || studded in !Property || bone in !Property || boots in !Property || shoes in !Property || sandals in !Property set % . !Material 0 if All , #SPC , Items , #SPC , Must , #SPC , Be , #SPC , Made , #SPC , With in #property { if spined , #SPC , Leather in !Property set % . !Material 2220 if horned , #SPC , Leather in !Property set % . !Material 2117 if barbed , #SPC , Leather in !Property set % . !Material 2129 } } if !BodType = smith || !BodType = 1102 { set % . !Material 0 if All , #SPC , Items , #SPC , Must , #SPC , Be , #SPC , Made , #SPC , With in #property { if Dull , #SPC , Copper , #SPC , Ingots in #property set % . !Material 2419 if Shadow , #SPC , Iron , #SPC , Ingots in #property set % . !Material 2406 if Copper , #SPC , Ingots in #property && Dull notin #property set % . !Material 2413 if Bronze , #SPC , Ingots in #property set % . !Material 2418 if Gold , #SPC , Ingots in #property set % . !Material 2213 if Agapite , #SPC , Ingots in #property set % . !Material 2425 if Verite , #SPC , Ingots in #property set % . !Material 2207 if Valorite , #SPC , Ingots in #property set % . !Material 2219 } } namespace Clear namespace Pop return ;sub Bod_getquantity v 1.0 -> p 1(2) -> d 0 sub Bod_getquantity ;this sub is made by Boydon ;* @name GetBodQuantity ;* @ver 1.0 11May05 ;* @author Boydon mod Pepito ;* @purpose This sub will tell you how many items are totaly needed to ;* fill a bod. ;* ;* @params %1 req #property of the bod ;* ;* @returns This sub will return the number of item needed to accomplish the Bod. ;* Result can be 10|15|20. Other value will return an error. if %0 < 1 || %1 = N/A { display ok Wrong use of sub Bod_getquantity: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 <= 1 set %2 quantity nameSpace Push nameSpace Local Bod_getQuantity , #time , #random , #scnt2 set !Property %1 str pos !Property Make set !Quantity #strres + 5 str del !Property 1 !Quantity set !quantity #strres str left !Quantity 2 nameSpace Clear nameSpace Pop if #strres <> 10 && #strres <> 15 && #strres <> 20 { display ok Unexpected value returned form sub Bod_getquantity! Please check! +$Script will be halted! halt } set % . %2 #strres return ;sub Bod_getsmithlargeset v 1.0 -> p 1(2) -> d 0 sub Bod_getsmithlargeset if %0 < 1 || %1 = N/A { display ok Wrong use of sub Bod_getsmithlargeset: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 <= 1 set %2 Large_ nameSpace Push nameSpace Local bod_getSmithLargeSet , #time , #random , #scnt2 set !Property %1 set !Name %2 , name set !LargeSet %2 , largeset set !LargeType %2 , largetype set !Item1 %2 , item1 set !Material1 %2 , material1 set !Item2 %2 , item2 set !Material2 %2 , material2 set !Item3 %2 , item3 set !Material3 %2 , material3 set !Item4 %2 , item4 set !Material4 %2 , material4 set !Item5 %2 , item5 set !Material5 %2 , material5 set !Item6 %2 , item6 set !Material6 %2 , material6 set !na NA set % . !Name UNDEFINIED set % . !LargeSet UNDEFINIED set % . !LargeType 0 set % . !material1 !na set % . !material2 !na set % . !material3 !na set % . !material4 !na set % . !material5 !na set % . !material6 !na set % . !item1 !na set % . !item2 !na set % . !item3 !na set % . !item4 !na set % . !item5 !na set % . !item6 !na if battle in !Property && double in !Property { ;Axe,Battle Axe,Double Axe,Executioner's Axe,Large Battle Axe,Two Handed Axe set % . !Name AXE set % . !LargeSet AXE set % . !LargeType 6 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !material4 IRON set % . !material5 IRON set % . !material6 IRON set % . !item1 AXE set % . !item2 BATTLE , #spc , AXE set % . !item3 DOUBLE , #spc , AXE set % . !item4 EXECUTIONER'S , #spc , AXE set % . !item5 LARGE , #spc , BATTLE , #spc , AXE set % . !item6 TWO , #spc , HANDED , #spc , AXE goto bod_LgSp_out } if dagger in !Property && spear in !Property { ;Dagger,Short Spear,Spear,War Fork,Kryss set % . !Name DAGGER set % . !LargeSet DAGGER set % . !LargeType 5 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !material4 IRON set % . !material5 IRON set % . !item1 DAGGER set % . !item2 SHORT , #spc , SPEAR set % . !item3 SPEAR set % . !item4 WAR , #spc , FORK set % . !item5 KRYSS goto bod_LgSp_out } if mace in !Property && maul in !Property { ;War Axe,Hammer Pick,Mace,Maul,War Hammer,War Mace set % . !Name WAR_AXE set % . !LargeSet WAR_AXE set % . !LargeType 6 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !material4 IRON set % . !material5 IRON set % . !material6 IRON set % . !item1 WAR , #spc , AXE set % . !item2 HAMMER , #spc , PICK set % . !item3 MACE set % . !item4 MAUL set % . !item5 WAR , #spc , HAMMER set % . !item6 WAR , #spc , MACE goto bod_LgSp_out } if broadsword in !Property && cutlass in !Property { ;Broadsword,Cutlass,Katana,Longsword,Scimitar,Viking Sword set % . !Name BROADSWORD set % . !LargeSet BROADSWORD set % . !LargeType 6 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !material4 IRON set % . !material5 IRON set % . !material6 IRON set % . !item1 BROADSWORD set % . !item2 CUTLASS set % . !item3 KATANA set % . !item4 LONGSWORD set % . !item5 SCIMITAR set % . !item6 VIKING , #spc , SWORD goto bod_LgSp_out } if bardiche in !Property && halberd in !Property { ;Bardiche,Halberd set % . !Name BARDICHE set % . !LargeSet BARDICHE set % . !LargeType 2 set % . !material1 IRON set % . !material2 IRON set % . !item1 BARDICHE set % . !item2 HALBERD goto bod_LgSp_out } if ringmail in !Property && leggings in !Property { ;Ringmail Gloves,Ringmail Tunic,Ringmail Sleeves,Ringmail Leggings set % . !Name RINGMAIL_SET set % . !LargeSet RINGMAIL_SET set % . !LargeType 4 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !material4 IRON set % . !item1 RINGMAIL , #spc , GLOVES set % . !item2 RINGMAIL , #spc , TUNIC set % . !item3 RINGMAIL , #spc , SLEEVES set % . !item4 RINGMAIL , #spc , LEGGINGS goto bod_LgSp_out } if chainmail in !Property && leggings in !Property { ;Chainmail Coif,Chainmail Leggings,Chainmail Tunic set % . !Name CHAINMAIL_SET set % . !LargeSet CHAINMAIL_SET set % . !LargeType 3 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !item1 CHAINMAIL , #spc , COIF set % . !item2 CHAINMAIL , #spc , LEGGINGS set % . !item3 CHAINMAIL , #spc , TUNIC goto bod_LgSp_out } if platemail in !Property && helm in !Property { ;Platemail Arms,Platemail Legs,Plate Helm,Platemail Gorget,Platemail Gloves,Platemail Tunic set % . !Name PLATEMAIL_SET set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 set % . !material1 IRON set % . !material2 IRON set % . !material3 IRON set % . !material4 IRON set % . !material5 IRON set % . !material6 IRON set % . !item1 PLATEMAIL , #spc , ARMS set % . !item2 PLATEMAIL , #spc , LEGS set % . !item3 PLATE , #spc , HELM set % . !item4 PLATEMAIL , #spc , GORGET set % . !item5 PLATEMAIL , #spc , GLOVES set % . !item6 PLATEMAIL , #spc , TUNIC goto bod_LgSp_out } bod_LgSp_out: if % . !LargeType = 0 { display ok !Property display ok Error in bod_getSmithLargeSet $ Impossible to recognize the bod. $ script will be halted! halt } nameSpace Clear nameSpace Pop return ;sub Bod_getsmithparameters v 1.0 -> p 1(9) -> d 0 sub Bod_getsmithparameters ;this sub is made by Boydon ;* @name GetSmithyBodParameters ;* @ver 1.0 beta 07Oct05 ;* @author Boydon mod Pepito ;* @purpose Get info about the piece that is needed to fill the BOD ;* ;* @params %1 req #property of the bod ;* %2 opt name of the variable containing the category without the "%" symbol (default is "category") ;* %3 opt name of the variable containing the piece without the "%" symbol (default is "piece") ;* %4 opt name of the variable containing the required ingots without the "%" symbol (default is "ingots") ;* %5 opt name of the variable containing the item type without the "%" symbol (default is "type") ;* %6 opt name of the variable containing the name of item without the "%" symbol (default is "name") ;* %7 opt name of the variable containing the name of relative large set without the "%" symbol (default is "largeset") ;* %8 opt name of the variable containing the number item of relative large set without the "%" symbol (default is "largetype") ;* %9 opt name of the variable if item is recycable or not (default is "recycable") ;* @returns if %0 < 1 || %1 = N/A { display ok Wrong use of sub Bod_getsmithparameters: 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 ingots if %5 = N/A || %0 <= 4 set %5 Type if %6 = N/A || %0 <= 5 set %6 name if %7 = N/A || %0 <= 6 set %7 largeset if %8 = N/A || %0 <= 7 set %8 largetype if %9 = N/A || %0 <= 8 set %9 recycable nameSpace Push nameSpace Local Bod_GetSmithParameters , #time , #random , #scnt2 set !Property %1 set !Category %2 set !Piece %3 set !Ingots %4 set !Type %5 set !Name %6 set !LargeSet %7 set !LargeType %8 set !Recycable %9 set % . !Category N/A set % . !Piece N/A set % . !Ingots 0 set % . !type N/A set % . !Name UNDEFINIED set % . !LargeSet UNDEFINIED set % . !LargeType 0 set % . !Recycable #true if plate in #property { if Arms in #property { set % . !Category 1 set % . !Piece 8 set % . !Ingots 18 set % . !Type MSH set % . !Name PLATEMAIL , #spc , ARMS set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 goto bod_gsp_out } if female in #property { set % . !Category 1 set % . !Piece 13 set % . !Ingots 20 set % . !Type MSK set % . !Name FEMALE , #spc , PLATE set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if legs in #property { set % . !Category 1 set % . !Piece 11 set % . !Ingots 20 set % . !Type LSH set % . !Name PLATEMAIL , #spc , LEGS set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 goto bod_gsp_out } if gorget in #property { set % . !Category 1 set % . !Piece 10 set % . !Ingots 10 set % . !Type NSH set % . !Name PLATEMAIL , #spc , GORGET set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 goto bod_gsp_out } if tunic in #property { set % . !Category 1 set % . !Piece 12 set % . !Ingots 25 set % . !Type HSH set % . !Name PLATEMAIL , #spc , TUNIC set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 goto bod_gsp_out } if gloves in #property { set % . !Category 1 set % . !Piece 9 set % . !Ingots 12 set % . !Type ISH set % . !Name PLATEMAIL , #spc , GLOVES set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 goto bod_gsp_out } if helm in #property { set % . !Category 2 set % . !Piece 5 set % . !Ingots 15 set % . !Type OSH set % . !Name PLATE , #spc , HELM set % . !LargeSet PLATEMAIL_SET set % . !LargeType 6 goto bod_gsp_out } } if ringmail in #property { if Leggings in #property { set % . !Category 1 set % . !Piece 2 set % . !Ingots 16 set % . !Type IMH set % . !Name RINGMAIL , #spc , LEGGINGS set % . !LargeSet RINGMAIL_SET set % . !LargeType 4 goto bod_gsp_out } if Gloves in #property { set % . !Category 1 set % . !Piece 1 set % . !Ingots 10 set % . !Type BMH set % . !Name RINGMAIL , #spc , GLOVES set % . !LargeSet RINGMAIL_SET set % . !LargeType 4 goto bod_gsp_out } if Tunic in #property { set % . !Category 1 set % . !Piece 4 set % . !Ingots 18 set % . !Type WLH set % . !Name RINGMAIL , #spc , TUNIC set % . !LargeSet RINGMAIL_SET set % . !LargeType 4 goto bod_gsp_out } if Sleeves in #property { set % . !Category 1 set % . !Piece 3 set % . !Ingots 14 set % . !Type XLH set % . !Name RINGMAIL , #spc , SLEEVES set % . !LargeSet RINGMAIL_SET set % . !LargeType 4 goto bod_gsp_out } } if chainmail in #property { if Leggings in #property { set % . !Category 1 set % . !Piece 6 set % . !Ingots 18 set % . !Type APH set % . !Name CHAINMAIL , #spc , LEGGINGS set % . !LargeSet CHAINMAIL_SET set % . !LargeType 3 goto bod_gsp_out } if coif in #property { set % . !Category 1 set % . !Piece 5 set % . !Ingots 10 set % . !Type DPH set % . !Name CHAINMAIL , #spc , COIF set % . !LargeSet CHAINMAIL_SET set % . !LargeType 3 goto bod_gsp_out } if Tunic in #property { set % . !Category 1 set % . !Piece 7 set % . !Ingots 20 set % . !Type ZOH set % . !Name CHAINMAIL , #spc , TUNIC set % . !LargeSet CHAINMAIL_SET set % . !LargeType 3 goto bod_gsp_out } } if axe in #property && war notin #property { if two in #property { set % . !Category 6 set % . !Piece 6 set % . !Ingots 16 set % . !Type LPH set % . !Name TWO , #spc , HANDED , #spc , AXE set % . !LargeSet AXE set % . !LargeType 6 goto bod_gsp_out } if Executioner in #property { set % . !Category 6 set % . !Piece 4 set % . !Ingots 14 set % . !Type ZRF set % . !Name EXECUTIONER'S , #spc , AXE set % . !LargeSet AXE set % . !LargeType 6 goto bod_gsp_out } if Large in #property { set % . !Category 6 set % . !Piece 5 set % . !Ingots 12 set % . !Type RMH set % . !Name LARGE , #spc , BATTLE , #spc , AXE set % . !LargeSet AXE set % . !LargeType 6 goto bod_gsp_out } if Double in #property { set % . !Category 6 set % . !Piece 3 set % . !Ingots 12 set % . !Type NSF set % . !Name DOUBLE , #spc , AXE set % . !LargeSet AXE set % . !LargeType 6 goto bod_gsp_out } if Battle in #property { set % . !Category 6 set % . !Piece 2 set % . !Ingots 14 set % . !Type BSF set % . !Name BATTLE , #spc , AXE set % . !LargeSet AXE set % . !LargeType 6 goto bod_gsp_out } if two notin #property && Executioner notin #property && Large notin #property && Double notin #property && Battle notin #property && war notin #property { set % . !Category 6 set % . !Piece 1 set % . !Ingots 14 set % . !Type LSF set % . !Name AXE set % . !LargeSet AXE set % . !LargeType 6 goto bod_gsp_out } } if Spear in #property && short notin #property { set % . !Category 7 set % . !Piece 9 set % . !Ingots 12 set % . !Type MTF set % . !Name SPEAR set % . !LargeSet DAGGER set % . !LargeType 5 goto bod_gsp_out } if Spear in #property && short in #property { set % . !Category 7 set % . !Piece 7 set % . !Ingots 6 set % . !Type XRH set % . !Name SHORT , #spc , SPEAR set % . !LargeSet DAGGER set % . !LargeType 5 goto bod_gsp_out } if war in #property { if mace in #property { set % . !Category 8 set % . !Piece 5 set % . !Ingots 14 set % . !Type TRH set % . !Name WAR , #spc , MACE set % . !LargeSet WAR_AXE set % . !LargeType 6 goto bod_gsp_out } if axe in #property { set % . !Category 6 set % . !Piece 7 set % . !Ingots 16 set % . !Type UOH set % . !Name WAR , #spc , AXE set % . !LargeSet WAR_AXE set % . !LargeType 6 goto bod_gsp_out } if fork in #property { set % . !Category 7 set % . !Piece 10 set % . !Ingots 12 set % . !Type RRH set % . !Name WAR , #spc , FORK set % . !LargeSet DAGGER set % . !LargeType 5 goto bod_gsp_out } if Hammer in #property { set % . !Category 8 set % . !Piece 6 set % . !Ingots 16 set % . !Type ZTH set % . !Name WAR , #spc , HAMMER set % . !LargeSet WAR_AXE set % . !LargeType 6 goto bod_gsp_out } } if helmet in #property { if close in #property { set % . !Category 2 set % . !Piece 2 set % . !Ingots 15 set % . !Type ESH set % . !Name CLOSE , #spc , HELMET set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if ! ( close in #property ) { set % . !Category 2 set % . !Piece 3 set % . !Ingots 15 set % . !Type GSH set % . !Name HELMET set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } } if Shield in #property { if Bronze , #SPC , Shield in #property { set % . !Category 3 set % . !Piece 2 set % . !Ingots 12 set % . !Type GIK set % . !Name BRONZE , #spc , SHIELD set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if Tear in #property && Kite in #property { set % . !Category 3 set % . !Piece 6 set % . !Ingots 16 ;set % . !Type MIK_LIK set % . !Type MIK set % . !Name TEAR , #spc , KITE , #spc , SHIELD set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if Metal in #property && Kite in #property { set % . !Category 3 set % . !Piece 5 set % . !Ingots 16 set % . !Type AIK set % . !Name METAL , #spc , KITE , #spc , SHIELD set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if Metal in #property && Kite notin #property { set % . !Category 3 set % . !Piece 4 set % . !Ingots 14 set % . !Type NIK set % . !Name METAL , #spc , SHIELD set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if Heater in #property { set % . !Category 3 set % . !Piece 3 set % . !Ingots 18 set % . !Type CIK set % . !Name HEATER , #spc , SHIELD set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } } if Bascinet in #property { set % . !Category 2 set % . !Piece 1 set % . !Ingots 15 set % . !Type ASH set % . !Name BASCINET set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if Norse in #property { set % . !Category 2 set % . !Piece 4 set % . !Ingots 15 set % . !Type CSH set % . !Name NORSE , #spc , HELM set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if Buckler in #property { set % . !Category 3 set % . !Piece 1 set % . !Ingots 10 set % . !Type FIK set % . !Name BUCKLER set % . !LargeSet NOTHING set % . !LargeType 0 goto bod_gsp_out } if sword in #property { if Viking in #property { set % . !Category 5 set % . !Piece 10 set % . !Ingots 14 set % . !Type BPH set % . !Name VIKING , #spc , SWORD set % . !LargeSet BROADSWORD set % . !LargeType 6 goto bod_gsp_out } if Long in #property { set % . !Category 5 set % . !Piece 8 set % . !Ingots 12 set % . !Type JTF set % . !Name LONGSWORD set % . !LargeSet BROADSWORD set % . !LargeType 6 goto bod_gsp_out } if Broad in #property { set % . !Category 5 set % . !Piece 2 set % . !Ingots 10 set % . !Type ATF set % . !Name BROADWORD set % . !LargeSet BROADSWORD set % . !LargeType 6 goto bod_gsp_out } } if Scimitar in #property { set % . !Category 5 set % . !Piece 9 set % . !Ingots 10 set % . !Type SOH set % . !Name SCIMITAR set % . !LargeSet BROADSWORD set % . !LargeType 6 goto bod_gsp_out } if Katana in #property { set % . !Category 5 set % . !Piece 6 set % . !Ingots 8 set % . !Type NMH set % . !Name KATANA set % . !LargeSet BROADSWORD set % . !LargeType 6 goto bod_gsp_out } if Cutlass in #property { set % . !Category 5 set % . !Piece 4 set % . !Ingots 8 set % . !Type JPH set % . !Name CUTLASS set % . !LargeSet BROADSWORD set % . !LargeType 6 goto bod_gsp_out } if Kryss in #property { set % . !Category 5 set % . !Piece 7 set % . !Ingots 8 set % . !Type VRH set % . !Name KRYSS set % . !LargeSet DAGGER set % . !LargeType 5 goto bod_gsp_out } if Bardiche in #property { set % . !Category 7 set % . !Piece 1 set % . !Ingots 18 set % . !Type HSF set % . !Name BARDICHE set % . !LargeSet BARDICHE set % . !LargeType 2 goto bod_gsp_out } if Halberd in #property { set % . !Category 7 set % . !Piece 4 set % . !Ingots 20 set % . !Type XTH set % . !Name HALBERD set % . !LargeSet BARDICHE set % . !LargeType 2 goto bod_gsp_out } if Hammer , #SPC , Pick in #property { set % . !Category 8 set % . !Piece 1 set % . !Ingots 16 set % . !Type VTH set % . !Name HAMMER , #spc , PICK set % . !LargeSet WAR_AXE set % . !LargeType 6 goto bod_gsp_out } if Mace in #property && war notin #property { set % . !Category 8 set % . !Piece 2 set % . !Ingots 6 set % . !Type YSF set % . !Name MACE set % . !LargeSet WAR_AXE set % . !LargeType 6 goto bod_gsp_out } if Maul in #property { set % . !Category 8 set % . !Piece 3 set % . !Ingots 10 set % . !Type BUH set % . !Name MAUL set % . !LargeSet WAR_AXE set % . !LargeType 6 goto bod_gsp_out } if dagger in #property { set % . !Category 5 set % . !Piece 5 set % . !Ingots 3 set % . !Type TSF set % . !Name DAGGER set % . !LargeSet DAGGER set % . !LargeType 5 goto bod_gsp_out } bod_gsp_out: if % . !Category = N/A { display ok !Property display ok Bod_GetSmithParameters $Impossible to recognize the bod. Please report the problem to Boydon! $script will be halted! halt } nameSpace Clear nameSpace Pop return ;sub Bod_gettailorlargeset v 1.0 -> p -> d sub Bod_gettailorlargeset if %0 < 1 || %1 = N/A { display ok Wrong use of Sub GetLargeSet: some required arguments are missing! +$Script will be halted. halt } if %2 = N/A || %0 <= 1 set %2 Large_ nameSpace Push nameSpace Local bod_getTailorLargeSet , #time , #random , #scnt2 set !Property %1 set !Name %2 , name set !LargeSet %2 , largeset set !LargeType %2 , largetype set !Item1 %2 , item1 set !Material1 %2 , material1 set !Item2 %2 , item2 set !Material2 %2 , material2 set !Item3 %2 , item3 set !Material3 %2 , material3 set !Item4 %2 , item4 set !Material4 %2 , material4 set !Item5 %2 , item5 set !Material5 %2 , material5 set !Item6 %2 , item6 set !Material6 %2 , material6 set !na NA set % . !Name UNDEFINIED set % . !LargeSet UNDEFINIED set % . !LargeType 0 set % . !material1 !na set % . !material2 !na set % . !material3 !na set % . !material4 !na set % . !material5 !na set % . !material6 !na set % . !item1 !na set % . !item2 !na set % . !item3 !na set % . !item4 !na set % . !item5 !na set % . !item6 !na if skullcap in !Property { ;Skullcap,Doublet,Kilt,Shoes set % . !Name SKULLCAP set % . !LargeSet SKULLCAP set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 SKULLCAP set % . !item2 DOUBLET set % . !item3 KILT set % . !item4 SHOES goto bod_Lgtp_out } if bonnet in !Property { ;Bonnet,Half Apron,Fancy Dress,Sandals set % . !Name BONNET set % . !LargeSet BONNET set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 BONNET set % . !item2 HALF , #spc , APRON set % . !item3 FANCY , #spc , DRESS set % . !item4 SANDALS goto bod_Lgtp_out } if bandana in !Property { ;Bandana,Shirt,Skirt,Thigh Boots set % . !Name BANDANA set % . !LargeSet BANDANA set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 BANDANA set % . !item2 SHIRT set % . !item3 SKIRT set % . !item4 THIGH , #spc , BOOTS goto bod_Lgtp_out } if floppy in !Property && hat in !Property { ;Floppy Hat,Full Apron,Plain Dress,Sandals set % . !Name FLOPPY_HAT set % . !LargeSet FLOPPY_HAT set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 FLOPPY , #spc , HAT set % . !item2 FULL , #spc , APRON set % . !item3 PLAIN , #spc , DRESS set % . !item4 SANDALS goto bod_Lgtp_out } if tricorne in !Property && hat in !Property { ;Tricorne Hat,Cap,Wide-Brim Hat,Tall Straw Hat set % . !Name TRICORNE_HAT set % . !LargeSet TRICORNE_HAT set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 CLOTH set % . !item1 TRICORNE , #spc , HAT set % . !item2 CAP set % . !item3 WIDE-BRIM , #spc , HAT set % . !item4 TALL , #spc , STRAW , #spc , HAT goto bod_Lgtp_out } if straw in !Property && hat in !Property && tall notin !Property { ;Straw Hat,Tunic,Long Pants,Boots set % . !Name STRAW_HAT set % . !LargeSet STRAW_HAT set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 STRAW , #spc , HAT set % . !item2 TUNIC set % . !item3 LONG , #spc , PANTS set % . !item4 BOOTS goto bod_Lgtp_out } if wizard in !Property && hat in !Property { ;Wizard's Hat,Body Sash,Robe,Boots set % . !Name WIZARDS_HAT set % . !LargeSet WIZARDS_HAT set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 WIZARD'S , #spc , HAT set % . !item2 BODY , #spc , SASH set % . !item3 ROBE set % . !item4 BOOTS goto bod_Lgtp_out } if sandals in !Property && shoes in !Property { ;Sandals,Shoes,Boots,Thigh Boots set % . !Name SANDALS set % . !LargeSet SANDALS set % . !LargeType 4 set % . !material1 LEATHER set % . !material2 LEATHER set % . !material3 LEATHER set % . !material4 LEATHER set % . !item1 SANDALS set % . !item2 SHOES set % . !item3 BOOTS set % . !item4 THIGH , #spc , BOOTS goto bod_Lgtp_out } if feathered in !Property && hat in !Property { ;Feathered Hat,Surcoat,Fancy Shirt,Short Pants,Thigh Boots set % . !Name FEATHERED_HAT set % . !LargeSet FEATHERED_HAT set % . !LargeType 5 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 CLOTH set % . !material4 LEATHER set % . !item1 FEATHERED , #spc , HAT set % . !item2 SURCOAT set % . !item3 FANCY , #spc , SHIRT set % . !item4 SHORT , #spc , PANTS set % . !item5 THIGH , #spc , BOOTS goto bod_Lgtp_out } if jester in !Property && hat in !Property { ;Jester Hat,Jester Suit,Cloak,Shoes set % . !Name JESTER_HAT set % . !LargeSet JESTER_HAT set % . !LargeType 4 set % . !material1 CLOTH set % . !material2 CLOTH set % . !material3 CLOTH set % . !material4 LEATHER set % . !item1 JESTER , #spc , HAT set % . !item2 JESTER , #spc , SUIT set % . !item3 CLOAK set % . !item4 SHOES goto bod_Lgtp_out } if leather , #SPC , cap in !Property { ;Leather Gorget,Leather Cap,Leather Gloves,Leather Sleeves,Leather Leggings,Leather Tunic set % . !Name LEATHER_MALE_SET set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 set % . !material1 LEATHER set % . !material2 LEATHER set % . !material3 LEATHER set % . !material4 LEATHER set % . !material5 LEATHER set % . !material6 LEATHER set % . !item1 LEATHER , #spc , GORGET set % . !item2 LEATHER , #spc , CAP set % . !item3 LEATHER , #spc , GLOVES set % . !item4 LEATHER , #spc , SLEEVES set % . !item5 LEATHER , #spc , LEGGINGS set % . !item6 LEATHER , #spc , TUNIC goto bod_Lgtp_out } if leather , #SPC , skirt in !Property { ;Leather Skirt,Leather Bustier,Leather Shorts,Female Leather Armor,Studded Armor,Studded Bustier set % . !Name LEATHER_FEMALE_SET set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 set % . !material1 LEATHER set % . !material2 LEATHER set % . !material3 LEATHER set % . !material4 LEATHER set % . !material5 LEATHER set % . !material6 LEATHER set % . !item1 LEATHER , #spc , SKIRT set % . !item2 LEATHER , #spc , BUSTIER set % . !item3 LEATHER , #spc , SHORTS set % . !item4 FEMALE , #spc , LEATHER , #spc , ARMOR set % . !item5 STUDDED , #spc , ARMOR set % . !item6 STUDDED , #spc , BUSTIER goto bod_Lgtp_out } if studded , #SPC , gorget in !Property { ;Studded Gorget,Studded Gloves,Studded Sleeves,Studded Leggings,Studded Tunic set % . !Name SUDDED_SET set % . !LargeSet SUDDED_SET set % . !LargeType 5 set % . !material1 LEATHER set % . !material2 LEATHER set % . !material3 LEATHER set % . !material4 LEATHER set % . !material5 LEATHER set % . !item1 STUDDED , #spc , GORGET set % . !item2 STUDDED , #spc , GLOVES set % . !item3 STUDDED , #spc , SLEEVES set % . !item4 STUDDED , #spc , LEGGINGS set % . !item5 STUDDED , #spc , TUNIC goto bod_Lgtp_out } if bone , #SPC , helmet in !Property { ;Bone Helmet,Bone Gloves,Bone Arms,Bone Leggings,Bone Armor set % . !Name BONE_SET set % . !LargeSet BONE_SET set % . !LargeType 5 set % . !material1 LEATHER set % . !material2 LEATHER set % . !material3 LEATHER set % . !material4 LEATHER set % . !material5 LEATHER set % . !item1 BONE , #spc , HELMET set % . !item2 BONE , #spc , GLOVES set % . !item3 BONE , #spc , ARMS set % . !item4 BONE , #spc , LEGGINGS set % . !item5 BONE , #spc , ARMOR goto bod_Lgtp_out } bod_Lgtp_out: if % . !LargeType = 0 { display ok !Property display ok Error in bod_getTailorLargeSet $ Impossible to recognize the bod. $ script will be halted! halt } nameSpace Clear nameSpace Pop return ;sub Bod_gettailorparameters v 1.0 -> p 1(10) -> d 0 sub Bod_gettailorparameters ;this sub is made by Boydon ;* @name GetTailorBodParameters ;* @ver 1.0 11May05 ;* @author Boydon mod by Pepito ;* @purpose Get info about the piece that is needed to fill the BOD ;* ;* @params %1 req #property of the bod ;* %2 opt name of the variable containing the category without the "%" symbol (default is "category") ;* %3 opt name of the variable containing the piece without the "%" symbol (default is "piece") ;* %4 opt name of the variable containing the required cloth without the "%" symbol (default is "cloth") ;* %5 opt name of the variable containing the required hides without the "%" symbol (default is "hides") ;* %6 opt name of the variable containing the required bones without the "%" symbol (default is "bones") ;* %7 opt name of the variable containing the item type without the "%" symbol (default is "type") ;* %8 opt name of the variable containing the name of item without the "%" symbol (default is "name") ;* %9 opt name of the variable containing the name of relative large set without the "%" symbol (default is "largeset") ;* %10 opt name of the variable containing the number item of relative large set without the "%" symbol (default is "largetype") ;* %11 opt name of the variable explicit if the item is recycable or not (default is "recycable") ;* @returns if %0 < 1 || %1 = N/A { display ok Wrong use of Sub GetTailorBodParameters: 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 cloth if %5 = N/A || %0 <= 4 set %5 hides if %6 = N/A || %0 <= 5 set %6 bones if %7 = N/A || %0 <= 6 set %7 type if %8 = N/A || %0 <= 7 set %8 name if %9 = N/A || %0 <= 8 set %9 largeset if %11 = N/A || %0 <= 10 set %11 recycable nameSpace Push nameSpace Local GetTailorBodParameters , #time , #random , #scnt2 set !Property %1 set !Category %2 set !Piece %3 set !Cloth %4 set !Hides %5 set !Bones %6 set !Type %7 set !Name %8 set !LargeSet %9 set !LargeType %10 set !Recycable %11 set % . !Category N/A set % . !Piece N/A set % . !Cloth 0 set % . !Hides 0 set % . !Bones 0 set % . !type N/A set % . !Name UNDEFINIED set % . !LargeSet UNDEFINIED set % . !LargeType 0 set % . !Recycable #true if cap in !Property && skull in !Property && leather notin !Property { set % . !Category 2 set % . !Piece 1 set % . !Cloth 2 set % . !Type CZH set % . !Name SKULLCAP set % . !LargeSet SKULLCAP set % . !LargeType 4 goto bod_gtp_out } if cap in !Property && skull notin !Property && leather notin !Property { set % . !Category 2 set % . !Piece 4 set % . !Cloth 11 set % . !Type VVI set % . !Name CAP set % . !LargeSet TRICORNE_HAT set % . !LargeType 4 goto bod_gtp_out } if bandana in !Property { set % . !Category 2 set % . !Piece 2 set % . !Cloth 2 set % . !Type GZH set % . !Name BANDANA set % . !LargeSet BANDANA set % . !LargeType 4 goto bod_gtp_out } if hat in !Property { if floppy in !Property { set % . !Category 2 set % . !Piece 3 set % . !Cloth 11 set % . !Type BWI set % . !Name FLOPPY , #spc , HAT set % . !LargeSet FLOPPY_HAT set % . !LargeType 4 goto bod_gtp_out } if wide in !Property { set % . !Category 2 set % . !Piece 5 set % . !Cloth 12 set % . !Type WVI set % . !Name WIDE-BRIM , #spc , HAT set % . !LargeSet TRICORNE_HAT set % . !LargeType 4 goto bod_gtp_out } if straw in !Property && tall notin !Property { set % . !Category 2 set % . !Piece 6 set % . !Cloth 10 set % . !Type XVI set % . !Name STRAW , #spc , HAT set % . !LargeSet STRAW_HAT set % . !LargeType 4 goto bod_gtp_out } if straw in !Property && tall in !Property { set % . !Category 2 set % . !Piece 7 set % . !Cloth 13 set % . !Type YVI set % . !Name TALL , #spc , STRAW , #spc , HAT set % . !LargeSet TRICORNE_HAT set % . !LargeType 4 goto bod_gtp_out } if wizard in !Property { set % . !Category 2 set % . !Piece 8 set % . !Cloth 15 set % . !Type IWI set % . !Name WIZARD'S , #spc , HAT set % . !LargeSet WIZARDS_HAT set % . !LargeType 4 goto bod_gtp_out } if feathered in !Property { set % . !Category 2 set % . !Piece 10 set % . !Cloth 12 set % . !Type KWI set % . !Name FEATHERED , #spc , HAT set % . !LargeSet FEATHERED_HAT set % . !LargeType 5 goto bod_gtp_out } if tricorne in !Property { set % . !Category 2 set % . !Piece 11 set % . !Cloth 12 set % . !Type JWI set % . !Name TRICORNE , #spc , HAT set % . !LargeSet TRICORNE_HAT set % . !LargeType 4 goto bod_gtp_out } if jester in !Property { set % . !Category 2 set % . !Piece 12 set % . !Cloth 15 set % . !Type EWI set % . !Name JESTER , #spc , HAT set % . !LargeSet JESTER_HAT set % . !LargeType 4 goto bod_gtp_out } } if bonnet in !Property { set % . !Category 2 set % . !Piece 9 set % . !Cloth 11 set % . !Type HWI set % . !Name BONNET set % . !LargeSet BONNET set % . !LargeType 4 goto bod_gtp_out } if doublet in !Property { set % . !Category 3 set % . !Piece 1 set % . !Cloth 8 set % . !Type XVL set % . !Name DOUBLET set % . !LargeSet SKULLCAP set % . !LargeType 4 goto bod_gtp_out } if shirt in !Property && fancy notin !Property { set % . !Category 3 set % . !Piece 2 set % . !Cloth 8 set % . !Type FCI set % . !Name SHIRT set % . !LargeSet BANDANA set % . !LargeType 4 goto bod_gtp_out } if shirt in !Property && fancy in !Property { set % . !Category 3 set % . !Piece 3 set % . !Cloth 8 set % . !Type TQL set % . !Name FANCY , #spc , SHIRT set % . !LargeSet FEATHERED_HAT set % . !LargeType 5 goto bod_gtp_out } if tunic in !Property && leather notin !Property && studded notin !Property { set % . !Category 3 set % . !Piece 4 set % . !Cloth 12 set % . !Type HCM set % . !Name TUNIC set % . !LargeSet STRAW_HAT set % . !LargeType 4 goto bod_gtp_out } if surcoat in !Property { set % . !Category 3 set % . !Piece 5 set % . !Cloth 14 set % . !Type PAM set % . !Name SURCOAT set % . !LargeSet FEATHERED_HAT set % . !LargeType 5 goto bod_gtp_out } if dress in !Property { if plain in !Property { set % . !Category 3 set % . !Piece 6 set % . !Cloth 10 set % . !Type DWL set % . !Name PLAIN , #spc , DRESS set % . !LargeSet FLOPPY_HAT set % . !LargeType 4 goto bod_gtp_out } if fancy in !Property { set % . !Category 3 set % . !Piece 7 set % . !Cloth 12 set % . !Type VQL_EWL set % . !Name FANCY , #spc , DRESS set % . !LargeSet BANDANA set % . !LargeType 4 goto bod_gtp_out } } if cloak in !Property { set % . !Category 3 set % . !Piece 8 set % . !Cloth 14 set % . !Type DCI set % . !Name CLOAK set % . !LargeSet JESTER_HAT set % . !LargeType 4 goto bod_gtp_out } if robe in !Property { set % . !Category 3 set % . !Piece 9 set % . !Cloth 16 set % . !Type FWL set % . !Name ROBE set % . !LargeSet WIZARDS_HAT set % . !LargeType 4 goto bod_gtp_out } if suit in !Property { set % . !Category 3 set % . !Piece 10 set % . !Cloth 24 set % . !Type XBM set % . !Name JESTER , #spc , SUIT set % . !LargeSet JESTER_HAT set % . !LargeType 4 goto bod_gtp_out } if pants in !Property { if short in !Property { set % . !Category 3 set % . !Piece 25 set % . !Cloth 6 set % . !Type EDI set % . !Name SHORT , #spc , PANTS set % . !LargeSet FEATHERED_HAT set % . !LargeType 5 goto bod_gtp_out } if long in !Property { set % . !Category 3 set % . !Piece 26 set % . !Cloth 8 set % . !Type VDI set % . !Name LONG , #spc , PANTS set % . !LargeSet STRAW_HAT set % . !LargeType 4 goto bod_gtp_out } } if kilt in !Property { set % . !Category 3 set % . !Piece 27 set % . !Cloth 8 set % . !Type LDI set % . !Name KILT set % . !LargeSet SKULLCAP set % . !LargeType 4 goto bod_gtp_out } if skirt in !Property && leather notin !Property { set % . !Category 3 set % . !Piece 28 set % . !Cloth 10 set % . !Type GCI set % . !Name SKIRT set % . !LargeSet BANDANA set % . !LargeType 4 goto bod_gtp_out } if body in !Property { set % . !Category 4 set % . !Piece 1 set % . !Cloth 4 set % . !Type FZH set % . !Name BODY , #spc , SASH set % . !LargeSet WIZARDS_HAT set % . !LargeType 4 goto bod_gtp_out } if apron in !Property { if half in !Property { set % . !Category 4 set % . !Piece 2 set % . !Cloth 6 set % . !Type XDI set % . !Name HALF , #spc , APRON set % . !LargeSet BONNET set % . !LargeType 4 goto bod_gtp_out } if full in !Property { set % . !Category 4 set % . !Piece 3 set % . !Cloth 10 set % . !Type RDI set % . !Name FULL , #spc , APRON set % . !LargeSet FLOPPY_HAT set % . !LargeType 4 goto bod_gtp_out } } if leather in !Property && studded notin !Property && bone notin !Property { if gorget in !Property { set % . !Category 6 set % . !Piece 4 set % . !Hides 4 set % . !Type JKH set % . !Name LEATHER , #spc , GORGET set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 goto bod_gtp_out } if cap in !Property { set % . !Category 6 set % . !Piece 5 set % . !Hides 2 set % . !Type NJL set % . !Name LEATHER , #spc , CAP set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 goto bod_gtp_out } if gloves in !Property { set % . !Category 6 set % . !Piece 6 set % . !Hides 3 set % . !Type KKH set % . !Name LEATHER , #spc , GLOVES set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 goto bod_gtp_out } if sleeves in !Property { set % . !Category 6 set % . !Piece 7 set % . !Hides 4 set % . !Type HKH set % . !Name LEATHER , #spc , SLEEVES set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 goto bod_gtp_out } if leggings in !Property { set % . !Category 6 set % . !Piece 8 set % . !Hides 10 set % . !Type VKH set % . !Name LEATHER , #spc , LEGGINGS set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 goto bod_gtp_out } if tunic in !Property { set % . !Category 6 set % . !Piece 9 set % . !Hides 12 set % . !Type QKH set % . !Name LEATHER , #spc , TUNIC set % . !LargeSet LEATHER_MALE_SET set % . !LargeType 6 goto bod_gtp_out } if shorts in !Property { set % . !Category 9 set % . !Piece 1 set % . !Hides 8 set % . !Type QSK set % . !Name LEATHER , #spc , SHORTS set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 goto bod_gtp_out } if skirt in !Property { set % . !Category 9 set % . !Piece 2 set % . !Hides 6 set % . !Type YSK set % . !Name LEATHER , #spc , SKIRT set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 goto bod_gtp_out } if bustier in !Property { set % . !Category 9 set % . !Piece 3 set % . !Hides 6 set % . !Type ATK set % . !Name LEATHER , #spc , BUSTIER set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 goto bod_gtp_out } if female in !Property { set % . !Category 9 set % . !Piece 5 set % . !Hides 8 set % . !Type OSK set % . !Name FEMALE , #spc , LEATHER , #spc , ARMOR set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 goto bod_gtp_out } } if studded in !Property { if gorget in !Property { set % . !Category 8 set % . !Piece 1 set % . !Hides 6 set % . !Type ALH set % . !Name STUDDED , #spc , GORGET set % . !LargeSet SUDDED_SET set % . !LargeType 5 goto bod_gtp_out } if gloves in !Property { set % . !Category 8 set % . !Piece 2 set % . !Hides 8 set % . !Type XKH set % . !Name STUDDED , #spc , GLOVES set % . !LargeSet SUDDED_SET set % . !LargeType 5 goto bod_gtp_out } if sleeves in !Property { set % . !Category 8 set % . !Piece 3 set % . !Hides 10 set % . !Type YKH set % . !Name STUDDED , #spc , SLEEVES set % . !LargeSet SUDDED_SET set % . !LargeType 5 goto bod_gtp_out } if leggings in !Property { set % . !Category 8 set % . !Piece 4 set % . !Hides 12 set % . !Type MLH set % . !Name STUDDED , #spc , LEGGINGS set % . !LargeSet SUDDED_SET set % . !LargeType 5 goto bod_gtp_out } if tunic in !Property { set % . !Category 8 set % . !Piece 5 set % . !Hides 14 set % . !Type LLH set % . !Name STUDDED , #spc , TUNIC set % . !LargeSet SUDDED_SET set % . !LargeType 5 goto bod_gtp_out } if bustier in !Property { set % . !Category 9 set % . !Piece 4 set % . !Hides 8 set % . !Type USK set % . !Name STUDDED , #spc , BUSTIER set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 goto bod_gtp_out } if armor in !Property { set % . !Category 9 set % . !Piece 6 set % . !Hides 10 set % . !Type SSK set % . !Name STUDDED , #spc , ARMOR set % . !LargeSet LEATHER_FEMALE_SET set % . !LargeType 6 goto bod_gtp_out } } if bone in !Property { if helmet in !Property { set % . !Category 10 set % . !Piece 1 set % . !Hides 4 set % . !Bones 2 set % . !Type ZPH set % . !Name BONE , #spc , HELMET set % . !LargeSet BONE_SET set % . !LargeType 5 set % . !Recycable #false goto bod_gtp_out } if gloves in !Property { set % . !Category 10 set % . !Piece 2 set % . !Hides 6 set % . !Bones 2 set % . !Type VPH set % . !Name BONE , #spc , GLOVES set % . !LargeSet BONE_SET set % . !LargeType 5 set % . !Recycable #false goto bod_gtp_out } if arms in !Property { set % . !Category 10 set % . !Piece 3 set % . !Hides 8 set % . !Bones 4 set % . !Type BQH set % . !Name BONE , #spc , ARMS set % . !LargeSet BONE_SET set % . !LargeType 5 set % . !Recycable #false goto bod_gtp_out } if leggings in !Property { set % . !Category 10 set % . !Piece 4 set % . !Hides 10 set % . !Bones 6 set % . !Type CQH set % . !Name BONE , #spc , LEGGINGS set % . !LargeSet BONE_SET set % . !LargeType 5 set % . !Recycable #false goto bod_gtp_out } if armor in !Property { set % . !Category 10 set % . !Piece 5 set % . !Hides 12 set % . !Bones 10 set % . !Type PPH set % . !Name BONE , #spc , ARMOR set % . !LargeSet BONE_SET set % . !LargeType 5 set % . !Recycable #false goto bod_gtp_out } } if boots in !Property && thigh notin !Property { set % . !Category 5 set % . !Piece 7 set % . !Hides 8 set % . !Type TVI set % . !Name BOOTS set % . !LargeSet SANDALS set % . !LargeType 4 set % . !Recycable #false goto bod_gtp_out } if boots in !Property && thigh in !Property { set % . !Category 5 set % . !Piece 8 set % . !Hides 10 set % . !Type ZVI set % . !Name THIGH , #spc , BOOTS set % . !LargeSet FEATHERED_HAT set % . !LargeType 5 set % . !Recycable #false goto bod_gtp_out } if shoes in !Property { set % . !Category 5 set % . !Piece 6 set % . !Hides 6 set % . !Type PVI set % . !Name SHOES set % . !LargeSet SANDALS set % . !LargeType 4 set % . !Recycable #false goto bod_gtp_out } if sandals in !Property { set % . !Category 5 set % . !Piece 5 set % . !Hides 4 set % . !Type NVI set % . !Name SANDALS set % . !LargeSet SANDALS set % . !LargeType 4 set % . !Recycable #false goto bod_gtp_out } bod_gtp_out: if % . !Category = N/A { display ok !Property display ok GetBodParameters $Impossible to recognize the bod. Please report the problem to Boydon! $script will be halted! halt } nameSpace Clear nameSpace Pop return ;sub Bod_material_to_string v 1.0 -> p 1 -> d 0 sub Bod_material_to_string set !m %1 set !t %2 if !m in CLOTH_IRON_LEATHER_NA return !m if !m = 0 { if !t = TAILOR return LEATHER if !t = SMITH return IRON display ok Errore in bod_material_to_string !m $ script fermato halt } if !m = CLOTH return !m if %material_ . !m <> N/A return %material_ . !m display ok Errore in bod_material_to_string !m $ script fermato halt return ;sub Bod_write_log v 1.0 -> p 1 -> d bod_material_to_string sub Bod_write_log ;need %bod_xxx variables from sub Bod_analizza set !file_log %1 set !s SARTO if %bod_supertype = SMITH set !s FABBRO set !strfile !s , %file_log_divisore , %bod_size , %file_log_divisore if ( %bod_size = SMALL ) { set !s NORMAL if %bod_exceptional set !s EXCEPTIONAL set !strfile !strfile , !s , %file_log_divisore set !strfile !strfile , %bod_quantity , %file_log_divisore set !strfile !strfile , %bod_name , %file_log_divisore gosub bod_material_to_string %bod_material %bod_supertype set !strfile !strfile , #result , %file_log_divisore } if ( %bod_size = LARGE ) { set !s NORMAL if %bod_exceptional set !s EXCEPTIONAL set !strfile !strfile , !s , %file_log_divisore set !strfile !strfile , %bod_quantity , %file_log_divisore set !strfile !strfile , %bod_item1 , %file_log_divisore set !strfile !strfile , %bod_item2 , %file_log_divisore set !strfile !strfile , %bod_item3 , %file_log_divisore set !strfile !strfile , %bod_item4 , %file_log_divisore set !strfile !strfile , %bod_item5 , %file_log_divisore set !strfile !strfile , %bod_item6 , %file_log_divisore for !ciclom 1 6 { if %bod_material . !ciclom = N/A set !strfile !strfile , N/A , %file_log_divisore else { gosub bod_material_to_string %bod_material . !ciclom %bod_supertype set !strfile !strfile , #result , %file_log_divisore } } } if !file_log = DISPLAY display ok !strfile else execute cmd.exe /c echo !strfile >> !file_log return ;sub Bodbook_applyfilter v 1.0 -> p 0 -> d waitForSysVars sub Bodbook_applyfilter nameSpace Push nameSpace Local BODBook_okFilter , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_ApplyFilter: set !cX #contposx + 518 set !cY #contposy + 430 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_ApplyFilter nameSpace Clear nameSpace Pop return ;sub Bodbook_clearfilter v 1.0 -> p 0 -> d waitForSysVars sub Bodbook_clearfilter nameSpace Push nameSpace Local BODBook_ClearFilter , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_ClearFilter: set !cX #contposx + 388 set !cY #contposy + 430 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_ClearFilter nameSpace Clear nameSpace Pop return ;sub Bodbook_filterexceptional v 1.0 -> p 1 -> d waitForSysVars sub Bodbook_filterexceptional nameSpace Push nameSpace Local BODBook_filterExceptional , #time , #random , #scnt2 set !q %1 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_filterExceptional: if !q set !cX #contposx + 504 else set !cX #contposx + 410 set !cY #contposy + 105 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_filterExceptional nameSpace Clear nameSpace Pop return ;sub Bodbook_filtermaterial v 1.0 -> p 1 -> d waitForSysVars sub Bodbook_filtermaterial nameSpace Push nameSpace Local BODBook_filterMaterial , #time , #random , #scnt2 set !q %1 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_filterMaterial: if !q = IRON { set !cX #contposx + 146 set !cY #contposy + 202 } if DULL in !q { set !cX #contposx + 236 set !cY #contposy + 202 } if SHADOW in !q { set !cX #contposx + 342 set !cY #contposy + 202 } if !q = COPPER { set !cX #contposx + 428 set !cY #contposy + 202 } if !q = BRONZE { set !cX #contposx + 525 set !cY #contposy + 202 } if !q = GOLD { set !cX #contposx + 146 set !cY #contposy + 242 } if !q = AGAPITE { set !cX #contposx + 236 set !cY #contposy + 242 } if !q = VERITE { set !cX #contposx + 342 set !cY #contposy + 242 } if !q = VALORITE { set !cX #contposx + 428 set !cY #contposy + 242 } if !q = CLOTH { set !cX #contposx + 146 set !cY #contposy + 202 } if !q = LEATHER { set !cX #contposx + 236 set !cY #contposy + 282 } if !q = SPINED { set !cX #contposx + 342 set !cY #contposy + 282 } if !q = HORNED { set !cX #contposx + 428 set !cY #contposy + 282 } if !q = BARBED { set !cX #contposx + 525 set !cY #contposy + 282 } click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_filterMaterial nameSpace Clear nameSpace Pop return ;sub Bodbook_filterquantity v 1.0 -> p 1 -> d waitForSysVars sub Bodbook_filterquantity nameSpace Push nameSpace Local BODBook_filterQuantity , #time , #random , #scnt2 set !q %1 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_filterQuantity: if !q = 10 set !cX #contposx + 116 if !q = 15 set !cX #contposx + 218 if !q = 20 set !cX #contposx + 313 set !cY #contposy + 360 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_filterQuantity nameSpace Clear nameSpace Pop return ;sub Bodbook_filtersize v 1.0 -> p 1 -> d waitForSysVars sub Bodbook_filtersize nameSpace Push nameSpace Local BODBook_filterSize , #time , #random , #scnt2 set !q %1 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_filterSize: if !q = SMALL set !cX #contposx + 116 else set !cX #contposx + 120 set !cY #contposy + 105 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_filterSize nameSpace Clear nameSpace Pop return ;sub Bodbook_find_small v 1.0 -> p 5 -> d AntiBlock Bodbook_getBodfromIndex BODBook_NextPage BODBook_openbook Bodbook_Set_Filter waitForSysVars sub Bodbook_find_small set !bookid %1 set !type %2 set !quantity %3 set !exe %4 set !item_to_find %5 set !mat %6 gosub BODBook_openbook !bookid if #result = EMPTY return #false gosub Bodbook_Set_Filter !type !quantity !exe SMALL !mat gosub waitForSysVars CONTNAME = generic_gump contsize = 615_454 5 set %menuTextColor 16777215 set !founded #false set !riga 0 set !index_bod 0 while ! !founded { set !riga !riga + 1 set !index_bod !index_bod + 1 set !item N/A if !riga > 10 { gosub BODBook_NextPage gosub waitForSysVars CONTNAME = generic_gump contsize = 615_454 5 wait 10 if #result = #false break set !riga 1 } set !read_nothing 0 while !item = N/A { gosub waitForSysVars CONTNAME = generic_gump contsize = 615_454 5 gosub Bodbook_getBodfromIndex !riga #contposx #contposy set !read_nothing !read_nothing + 1 if !read_nothing > 10 break gosub AntiBlock NO_ALARM_EVENT } if !item = !item_to_find { set !founded #true break } if !read_nothing > 10 break } if !founded return !riga return #false ;sub Bodbook_get_tot_bod v 1.0 -> p 1 -> d getproperty sub Bodbook_get_tot_bod set !idbodbook %1 gosub getproperty %1 set !prop #result str pos !prop book: set !v #strres + 5 str del !prop 1 !v set !prop #strres str pos !prop $ set !v #strres str del !prop !v 1000 set !prop #strres return !prop ;sub Bodbook_getbod v 1.0 -> p 1 -> d waitForSysVars sub Bodbook_getbod set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize set %msg_gb1 the_bulk_order_deed_has_been_placed set %msg_gb2 the_book_is_empty set !j_gb #jindex BODBook_GetBod: set !cX #contposx + 43 set !cY #contposy + 72 + %1 * 32 click !cX !cY f gosub Wait_Journal_Msg 500 !j_gb msg_gb 2 if ! #result goto BODBook_GetBod return ;sub Bodbook_getbodfromindex v 1.0 -> p 1 -> d readchar sub Bodbook_getbodfromindex ;this sub is made by Kal In Ex mod By Pepito set !riga %1 set !countposX %2 set !countposY %3 set !ypos !countposY + 64 + ( 32 * !riga ) set !item N/A set !xpos !countposX + 103 gosub readchar !xpos !ypos in %menuTextColor if #result notin abcdefhjklmnprstvw return #false if #result = a set !item axe if #result = b { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aoru return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin nrst return #false if #result = n set !item bandana if #result = r set !item bardiche if #result = s set !item bascinet if #result = t set !item battle , #spc , axe set #result n/a } if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dno return #false if #result = d set !item body , #spc , sash if #result = n { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin en return #false if #result = e { set !xpos !xpos + %1 + 8 ; ' ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aghl return #false if #result = a { set !xpos !xpos + %1 + 6 + 9 ; 'rm' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin os return #false if #result = o set !item bone , #spc , armor if #result = s set !item bone , #spc , arms set #result n/a } if #result = g set !item bone , #spc , gloves if #result = h set !item bone , #spc , helmet if #result = l set !item bone , #spc , leggings set #result n/a } if #result = n set !item bonnet set #result n/a } if #result = o set !item boots set #result n/a } if #result = r { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin an return #false if #result = a set !item broadsword if #result = n set !item bronze , #spc , shield set #result n/a } if #result = u set !item buckler , #spc set #result n/a } if #result = c { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ahlu return #false if #result = a set !item cap if #result = h { set !xpos !xpos + %1 + 6 + 3 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ainmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , ltc return #false if #result = #spc || #result = c set !item chainmail , #spc , coif if #result = l set !item chainmail , #spc , leggings if #result = t set !item chainmail , #spc , tunic set #result n/a } if #result = l { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin as return #false if #result = a set !item cloak if #result = s set !item close , #spc , helmet set #result n/a } if #result = u set !item cutlass set #result n/a } if #result = d { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ao return #false if #result = a set !item dagger if #result = o { set !xpos !xpos + %1 + 6 + 6 + 3 + 6 ; 'uble' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , t return #false if #result = #spc set !item double , #spc , axe if #result = t set !item doublet set #result n/a } set #result n/a } if #result = e set !item executioner's , #spc , axe if #result = f { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aelu return #false if #result = a { set !xpos !xpos + %1 + 6 + 6 + 6 + 8 ; 'ncy ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ds return #false if #result = d set !item fancy , #spc , dress if #result = s set !item fancy , #spc , shirt set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin am return #false if #result = a set !item feathered , #spc , hat if #result = m { set !xpos !xpos + %1 + 6 + 3 + 6 + 8 ; 'ale ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin lp return #false if #result = l set !item female , #spc , leather , #spc , armor if #result = p set !item female , #spc , plate set #result n/a } set #result n/a } if #result = l set !item floppy , #spc , hat if #result = u set !item full , #spc , apron set #result n/a } if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lm return #false if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin bf return #false if #result = b set !item halberd if #result = f set !item half , #spc , apron set #result n/a } if #result = m set !item hammer , #spc , pick set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin al return #false if #result = a set !item heater , #spc , shield if #result = l set !item helmet set #result n/a } set #result n/a } if #result = j { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ester ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin hs return #false if #result = h set !item jester , #spc , hat if #result = s set !item jester , #spc , suit set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin air return #false if #result = a set !item katana if #result = i set !item kilt if #result = r set !item kryss set #result n/a } if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aeo return #false if #result = a set !item large , #spc , battle , #spc , axe if #result = e { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ather ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abcglst return #false if #result = a set !item leather , #spc , armor if #result = b set !item leather , #spc , bustier if #result = c set !item leather , #spc , cap if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item leather , #spc , gloves if #result = o set !item leather , #spc , gorget set #result n/a } if #result = l set !item leather , #spc , leggings if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin hkl return #false if #result = h set !item leather , #spc , shorts if #result = k set !item leather , #spc , skirt if #result = l set !item leather , #spc , sleeves set #result n/a } if #result = t set !item leather , #spc , tunic set #result n/a } if #result = o { set !xpos !xpos + %1 + 6 + 6 ; 'ng' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , s return #false if #result = #spc set !item long , #spc , pants if #result = s set !item longsword set #result n/a } } if #result = m { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin cu return #false if #result = c set !item mace if #result = u set !item maul set #result n/a } if #result = e { set !xpos !xpos + %1 + 6 + 6 + 3 + 8 ; 'tal ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ks return #false if #result = k set !item metal , #spc , kite , #spc , shield if #result = s set !item metal , #spc , shield set #result n/a } set #result n/a } if #result = n set !item norse , #spc , helm if #result = p { set !xpos !xpos + %1 + 3 + 6 ; 'la" is common gosub readchar !xpos !ypos in %menuTextColor if #result notin it return #false if #result = i set !item plain , #spc , dress if #result = t { set !xpos !xpos + %1 + 6 ; 'e' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , m return #false if #result = #spc set !item plate , #spc , helm if #result = m { set !xpos !xpos + %1 + 6 + 3 + 3 + 8 ; 'ail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aglt return #false if #result = a set !item platemail , #spc , arms if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item platemail , #spc , gloves if #result = o set !item platemail , #spc , gorget set #result n/a } if #result = l set !item platemail , #spc , legs if #result = t set !item platemail , #spc , tunic set #result n/a } set #result n/a } set #result n/a } if #result = r { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i { set !xpos !xpos + %1 + 6 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ngmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin glst return #false if #result = g set !item ringmail , #spc , gloves if #result = l set !item ringmail , #spc , leggings if #result = s set !item ringmail , #spc , sleeves if #result = t set !item ringmail , #spc , tunic set #result n/a } if #result = o set !item robe set #result n/a } if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin achkptu return #false if #result = a set !item sandals if #result = c set !item scimitar if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i set !item shirt if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin er return #false if #result = e set !item shoes if #result = r { set !xpos !xpos + %1 + 6 + 8 ; 't ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ps return #false if #result = p set !item short , #spc , pants if #result = s set !item short , #spc , spear set #result n/a } set #result n/a } set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin iu return #false if #result = i set !item skirt if #result = u set !item skullcap set #result n/a } if #result = p set !item spear if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ru return #false if #result = r set !item straw , #spc , hat if #result = u { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 8 ; 'dded ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abglst return #false if #result = a set !item studded , #spc , armor if #result = b set !item studded , #spc , bustier if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item studded , #spc , gloves if #result = o set !item studded , #spc , gorget set #result n/a } if #result = l set !item studded , #spc , leggings if #result = s set !item studded , #spc , sleeves if #result = t set !item studded , #spc , tunic set #result n/a } set #result n/a } if #result = u set !item surcoat set #result n/a } if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aehruw return #false if #result = a set !item tall , #spc , straw , #spc , hat if #result = e set !item tear , #spc , kite , #spc , shield if #result = h set !item thigh , #spc , boots if #result = r set !item tricorne , #spc , hat if #result = u set !item tunic if #result = w set !item two , #spc , handed , #spc , axe set #result n/a } if #result = v set !item viking , #spc , sword if #result = w { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ai return #false if #result = a { set !xpos !xpos + %1 + 6 + 8 ; 'r ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin afhm return #false if #result = a set !item war , #spc , axe if #result = f set !item war , #spc , fork if #result = h set !item war , #spc , hammer if #result = m set !item war , #spc , mace set #result n/a } if #result = i { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dz return #false if #result = d set !item wide-brim , #spc , hat if #result = z set !item wizard's , #spc , hat set #result n/a } set #result n/a } return !item ;sub Bodbook_getbodfromindex v 1.0 -> p 1 -> d readchar sub Bodbook_getbodfromindex ;this sub is made by Kal In Ex mod By Pepito set !riga %1 set !countposX %2 set !countposY %3 set !ypos !countposY + 64 + ( 32 * !riga ) set !item N/A set !xpos !countposX + 103 gosub readchar !xpos !ypos in %menuTextColor if #result notin abcdefhjklmnprstvw return #false if #result = a set !item axe if #result = b { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aoru return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin nrst return #false if #result = n set !item bandana if #result = r set !item bardiche if #result = s set !item bascinet if #result = t set !item battle , #spc , axe set #result n/a } if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dno return #false if #result = d set !item body , #spc , sash if #result = n { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin en return #false if #result = e { set !xpos !xpos + %1 + 8 ; ' ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aghl return #false if #result = a { set !xpos !xpos + %1 + 6 + 9 ; 'rm' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin os return #false if #result = o set !item bone , #spc , armor if #result = s set !item bone , #spc , arms set #result n/a } if #result = g set !item bone , #spc , gloves if #result = h set !item bone , #spc , helmet if #result = l set !item bone , #spc , leggings set #result n/a } if #result = n set !item bonnet set #result n/a } if #result = o set !item boots set #result n/a } if #result = r { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin an return #false if #result = a set !item broadsword if #result = n set !item bronze , #spc , shield set #result n/a } if #result = u set !item buckler , #spc set #result n/a } if #result = c { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ahlu return #false if #result = a set !item cap if #result = h { set !xpos !xpos + %1 + 6 + 3 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ainmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , ltc return #false if #result = #spc || #result = c set !item chainmail , #spc , coif if #result = l set !item chainmail , #spc , leggings if #result = t set !item chainmail , #spc , tunic set #result n/a } if #result = l { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin as return #false if #result = a set !item cloak if #result = s set !item close , #spc , helmet set #result n/a } if #result = u set !item cutlass set #result n/a } if #result = d { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ao return #false if #result = a set !item dagger if #result = o { set !xpos !xpos + %1 + 6 + 6 + 3 + 6 ; 'uble' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , t return #false if #result = #spc set !item double , #spc , axe if #result = t set !item doublet set #result n/a } set #result n/a } if #result = e set !item executioner's , #spc , axe if #result = f { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aelu return #false if #result = a { set !xpos !xpos + %1 + 6 + 6 + 6 + 8 ; 'ncy ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ds return #false if #result = d set !item fancy , #spc , dress if #result = s set !item fancy , #spc , shirt set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin am return #false if #result = a set !item feathered , #spc , hat if #result = m { set !xpos !xpos + %1 + 6 + 3 + 6 + 8 ; 'ale ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin lp return #false if #result = l set !item female , #spc , leather , #spc , armor if #result = p set !item female , #spc , plate set #result n/a } set #result n/a } if #result = l set !item floppy , #spc , hat if #result = u set !item full , #spc , apron set #result n/a } if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lm return #false if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin bf return #false if #result = b set !item halberd if #result = f set !item half , #spc , apron set #result n/a } if #result = m set !item hammer , #spc , pick set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin al return #false if #result = a set !item heater , #spc , shield if #result = l set !item helmet set #result n/a } set #result n/a } if #result = j { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ester ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin hs return #false if #result = h set !item jester , #spc , hat if #result = s set !item jester , #spc , suit set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin air return #false if #result = a set !item katana if #result = i set !item kilt if #result = r set !item kryss set #result n/a } if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aeo return #false if #result = a set !item large , #spc , battle , #spc , axe if #result = e { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ather ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abcglst return #false if #result = a set !item leather , #spc , armor if #result = b set !item leather , #spc , bustier if #result = c set !item leather , #spc , cap if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item leather , #spc , gloves if #result = o set !item leather , #spc , gorget set #result n/a } if #result = l set !item leather , #spc , leggings if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin hkl return #false if #result = h set !item leather , #spc , shorts if #result = k set !item leather , #spc , skirt if #result = l set !item leather , #spc , sleeves set #result n/a } if #result = t set !item leather , #spc , tunic set #result n/a } if #result = o { set !xpos !xpos + %1 + 6 + 6 ; 'ng' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , s return #false if #result = #spc set !item long , #spc , pants if #result = s set !item longsword set #result n/a } } if #result = m { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin cu return #false if #result = c set !item mace if #result = u set !item maul set #result n/a } if #result = e { set !xpos !xpos + %1 + 6 + 6 + 3 + 8 ; 'tal ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ks return #false if #result = k set !item metal , #spc , kite , #spc , shield if #result = s set !item metal , #spc , shield set #result n/a } set #result n/a } if #result = n set !item norse , #spc , helm if #result = p { set !xpos !xpos + %1 + 3 + 6 ; 'la" is common gosub readchar !xpos !ypos in %menuTextColor if #result notin it return #false if #result = i set !item plain , #spc , dress if #result = t { set !xpos !xpos + %1 + 6 ; 'e' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , m return #false if #result = #spc set !item plate , #spc , helm if #result = m { set !xpos !xpos + %1 + 6 + 3 + 3 + 8 ; 'ail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aglt return #false if #result = a set !item platemail , #spc , arms if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item platemail , #spc , gloves if #result = o set !item platemail , #spc , gorget set #result n/a } if #result = l set !item platemail , #spc , legs if #result = t set !item platemail , #spc , tunic set #result n/a } set #result n/a } set #result n/a } if #result = r { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i { set !xpos !xpos + %1 + 6 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ngmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin glst return #false if #result = g set !item ringmail , #spc , gloves if #result = l set !item ringmail , #spc , leggings if #result = s set !item ringmail , #spc , sleeves if #result = t set !item ringmail , #spc , tunic set #result n/a } if #result = o set !item robe set #result n/a } if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin achkptu return #false if #result = a set !item sandals if #result = c set !item scimitar if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i set !item shirt if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin er return #false if #result = e set !item shoes if #result = r { set !xpos !xpos + %1 + 6 + 8 ; 't ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ps return #false if #result = p set !item short , #spc , pants if #result = s set !item short , #spc , spear set #result n/a } set #result n/a } set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin iu return #false if #result = i set !item skirt if #result = u set !item skullcap set #result n/a } if #result = p set !item spear if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ru return #false if #result = r set !item straw , #spc , hat if #result = u { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 8 ; 'dded ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abglst return #false if #result = a set !item studded , #spc , armor if #result = b set !item studded , #spc , bustier if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item studded , #spc , gloves if #result = o set !item studded , #spc , gorget set #result n/a } if #result = l set !item studded , #spc , leggings if #result = s set !item studded , #spc , sleeves if #result = t set !item studded , #spc , tunic set #result n/a } set #result n/a } if #result = u set !item surcoat set #result n/a } if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aehruw return #false if #result = a set !item tall , #spc , straw , #spc , hat if #result = e set !item tear , #spc , kite , #spc , shield if #result = h set !item thigh , #spc , boots if #result = r set !item tricorne , #spc , hat if #result = u set !item tunic if #result = w set !item two , #spc , handed , #spc , axe set #result n/a } if #result = v set !item viking , #spc , sword if #result = w { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ai return #false if #result = a { set !xpos !xpos + %1 + 6 + 8 ; 'r ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin afhm return #false if #result = a set !item war , #spc , axe if #result = f set !item war , #spc , fork if #result = h set !item war , #spc , hammer if #result = m set !item war , #spc , mace set #result n/a } if #result = i { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dz return #false if #result = d set !item wide-brim , #spc , hat if #result = z set !item wizard's , #spc , hat set #result n/a } set #result n/a } return !item ;sub Bodbook_getbodfromindex v 1.0 -> p 1 -> d readchar sub Bodbook_getbodfromindex ;this sub is made by Kal In Ex mod By Pepito set !riga %1 set !countposX %2 set !countposY %3 set !ypos !countposY + 64 + ( 32 * !riga ) set !item N/A set !xpos !countposX + 103 gosub readchar !xpos !ypos in %menuTextColor if #result notin abcdefhjklmnprstvw return #false if #result = a set !item axe if #result = b { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aoru return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin nrst return #false if #result = n set !item bandana if #result = r set !item bardiche if #result = s set !item bascinet if #result = t set !item battle , #spc , axe set #result n/a } if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dno return #false if #result = d set !item body , #spc , sash if #result = n { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin en return #false if #result = e { set !xpos !xpos + %1 + 8 ; ' ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aghl return #false if #result = a { set !xpos !xpos + %1 + 6 + 9 ; 'rm' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin os return #false if #result = o set !item bone , #spc , armor if #result = s set !item bone , #spc , arms set #result n/a } if #result = g set !item bone , #spc , gloves if #result = h set !item bone , #spc , helmet if #result = l set !item bone , #spc , leggings set #result n/a } if #result = n set !item bonnet set #result n/a } if #result = o set !item boots set #result n/a } if #result = r { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin an return #false if #result = a set !item broadsword if #result = n set !item bronze , #spc , shield set #result n/a } if #result = u set !item buckler , #spc set #result n/a } if #result = c { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ahlu return #false if #result = a set !item cap if #result = h { set !xpos !xpos + %1 + 6 + 3 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ainmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , ltc return #false if #result = #spc || #result = c set !item chainmail , #spc , coif if #result = l set !item chainmail , #spc , leggings if #result = t set !item chainmail , #spc , tunic set #result n/a } if #result = l { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin as return #false if #result = a set !item cloak if #result = s set !item close , #spc , helmet set #result n/a } if #result = u set !item cutlass set #result n/a } if #result = d { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ao return #false if #result = a set !item dagger if #result = o { set !xpos !xpos + %1 + 6 + 6 + 3 + 6 ; 'uble' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , t return #false if #result = #spc set !item double , #spc , axe if #result = t set !item doublet set #result n/a } set #result n/a } if #result = e set !item executioner's , #spc , axe if #result = f { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aelu return #false if #result = a { set !xpos !xpos + %1 + 6 + 6 + 6 + 8 ; 'ncy ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ds return #false if #result = d set !item fancy , #spc , dress if #result = s set !item fancy , #spc , shirt set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin am return #false if #result = a set !item feathered , #spc , hat if #result = m { set !xpos !xpos + %1 + 6 + 3 + 6 + 8 ; 'ale ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin lp return #false if #result = l set !item female , #spc , leather , #spc , armor if #result = p set !item female , #spc , plate set #result n/a } set #result n/a } if #result = l set !item floppy , #spc , hat if #result = u set !item full , #spc , apron set #result n/a } if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lm return #false if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin bf return #false if #result = b set !item halberd if #result = f set !item half , #spc , apron set #result n/a } if #result = m set !item hammer , #spc , pick set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin al return #false if #result = a set !item heater , #spc , shield if #result = l set !item helmet set #result n/a } set #result n/a } if #result = j { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ester ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin hs return #false if #result = h set !item jester , #spc , hat if #result = s set !item jester , #spc , suit set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin air return #false if #result = a set !item katana if #result = i set !item kilt if #result = r set !item kryss set #result n/a } if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aeo return #false if #result = a set !item large , #spc , battle , #spc , axe if #result = e { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ather ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abcglst return #false if #result = a set !item leather , #spc , armor if #result = b set !item leather , #spc , bustier if #result = c set !item leather , #spc , cap if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item leather , #spc , gloves if #result = o set !item leather , #spc , gorget set #result n/a } if #result = l set !item leather , #spc , leggings if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin hkl return #false if #result = h set !item leather , #spc , shorts if #result = k set !item leather , #spc , skirt if #result = l set !item leather , #spc , sleeves set #result n/a } if #result = t set !item leather , #spc , tunic set #result n/a } if #result = o { set !xpos !xpos + %1 + 6 + 6 ; 'ng' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , s return #false if #result = #spc set !item long , #spc , pants if #result = s set !item longsword set #result n/a } } if #result = m { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin cu return #false if #result = c set !item mace if #result = u set !item maul set #result n/a } if #result = e { set !xpos !xpos + %1 + 6 + 6 + 3 + 8 ; 'tal ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ks return #false if #result = k set !item metal , #spc , kite , #spc , shield if #result = s set !item metal , #spc , shield set #result n/a } set #result n/a } if #result = n set !item norse , #spc , helm if #result = p { set !xpos !xpos + %1 + 3 + 6 ; 'la" is common gosub readchar !xpos !ypos in %menuTextColor if #result notin it return #false if #result = i set !item plain , #spc , dress if #result = t { set !xpos !xpos + %1 + 6 ; 'e' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , m return #false if #result = #spc set !item plate , #spc , helm if #result = m { set !xpos !xpos + %1 + 6 + 3 + 3 + 8 ; 'ail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aglt return #false if #result = a set !item platemail , #spc , arms if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item platemail , #spc , gloves if #result = o set !item platemail , #spc , gorget set #result n/a } if #result = l set !item platemail , #spc , legs if #result = t set !item platemail , #spc , tunic set #result n/a } set #result n/a } set #result n/a } if #result = r { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i { set !xpos !xpos + %1 + 6 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ngmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin glst return #false if #result = g set !item ringmail , #spc , gloves if #result = l set !item ringmail , #spc , leggings if #result = s set !item ringmail , #spc , sleeves if #result = t set !item ringmail , #spc , tunic set #result n/a } if #result = o set !item robe set #result n/a } if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin achkptu return #false if #result = a set !item sandals if #result = c set !item scimitar if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i set !item shirt if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin er return #false if #result = e set !item shoes if #result = r { set !xpos !xpos + %1 + 6 + 8 ; 't ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ps return #false if #result = p set !item short , #spc , pants if #result = s set !item short , #spc , spear set #result n/a } set #result n/a } set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin iu return #false if #result = i set !item skirt if #result = u set !item skullcap set #result n/a } if #result = p set !item spear if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ru return #false if #result = r set !item straw , #spc , hat if #result = u { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 8 ; 'dded ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abglst return #false if #result = a set !item studded , #spc , armor if #result = b set !item studded , #spc , bustier if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item studded , #spc , gloves if #result = o set !item studded , #spc , gorget set #result n/a } if #result = l set !item studded , #spc , leggings if #result = s set !item studded , #spc , sleeves if #result = t set !item studded , #spc , tunic set #result n/a } set #result n/a } if #result = u set !item surcoat set #result n/a } if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aehruw return #false if #result = a set !item tall , #spc , straw , #spc , hat if #result = e set !item tear , #spc , kite , #spc , shield if #result = h set !item thigh , #spc , boots if #result = r set !item tricorne , #spc , hat if #result = u set !item tunic if #result = w set !item two , #spc , handed , #spc , axe set #result n/a } if #result = v set !item viking , #spc , sword if #result = w { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ai return #false if #result = a { set !xpos !xpos + %1 + 6 + 8 ; 'r ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin afhm return #false if #result = a set !item war , #spc , axe if #result = f set !item war , #spc , fork if #result = h set !item war , #spc , hammer if #result = m set !item war , #spc , mace set #result n/a } if #result = i { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dz return #false if #result = d set !item wide-brim , #spc , hat if #result = z set !item wizard's , #spc , hat set #result n/a } set #result n/a } return !item ;sub Bodbook_getbodfromindex v 1.0 -> p 1 -> d readchar sub Bodbook_getbodfromindex ;this sub is made by Kal In Ex mod By Pepito set !riga %1 set !countposX %2 set !countposY %3 set !ypos !countposY + 64 + ( 32 * !riga ) set !item N/A set !xpos !countposX + 103 gosub readchar !xpos !ypos in %menuTextColor if #result notin abcdefhjklmnprstvw return #false if #result = a set !item axe if #result = b { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aoru return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin nrst return #false if #result = n set !item bandana if #result = r set !item bardiche if #result = s set !item bascinet if #result = t set !item battle , #spc , axe set #result n/a } if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dno return #false if #result = d set !item body , #spc , sash if #result = n { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin en return #false if #result = e { set !xpos !xpos + %1 + 8 ; ' ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aghl return #false if #result = a { set !xpos !xpos + %1 + 6 + 9 ; 'rm' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin os return #false if #result = o set !item bone , #spc , armor if #result = s set !item bone , #spc , arms set #result n/a } if #result = g set !item bone , #spc , gloves if #result = h set !item bone , #spc , helmet if #result = l set !item bone , #spc , leggings set #result n/a } if #result = n set !item bonnet set #result n/a } if #result = o set !item boots set #result n/a } if #result = r { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin an return #false if #result = a set !item broadsword if #result = n set !item bronze , #spc , shield set #result n/a } if #result = u set !item buckler , #spc set #result n/a } if #result = c { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ahlu return #false if #result = a set !item cap if #result = h { set !xpos !xpos + %1 + 6 + 3 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ainmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , ltc return #false if #result = #spc || #result = c set !item chainmail , #spc , coif if #result = l set !item chainmail , #spc , leggings if #result = t set !item chainmail , #spc , tunic set #result n/a } if #result = l { set !xpos !xpos + %1 + 6 ; 'o' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin as return #false if #result = a set !item cloak if #result = s set !item close , #spc , helmet set #result n/a } if #result = u set !item cutlass set #result n/a } if #result = d { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ao return #false if #result = a set !item dagger if #result = o { set !xpos !xpos + %1 + 6 + 6 + 3 + 6 ; 'uble' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , t return #false if #result = #spc set !item double , #spc , axe if #result = t set !item doublet set #result n/a } set #result n/a } if #result = e set !item executioner's , #spc , axe if #result = f { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aelu return #false if #result = a { set !xpos !xpos + %1 + 6 + 6 + 6 + 8 ; 'ncy ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ds return #false if #result = d set !item fancy , #spc , dress if #result = s set !item fancy , #spc , shirt set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin am return #false if #result = a set !item feathered , #spc , hat if #result = m { set !xpos !xpos + %1 + 6 + 3 + 6 + 8 ; 'ale ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin lp return #false if #result = l set !item female , #spc , leather , #spc , armor if #result = p set !item female , #spc , plate set #result n/a } set #result n/a } if #result = l set !item floppy , #spc , hat if #result = u set !item full , #spc , apron set #result n/a } if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lm return #false if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin bf return #false if #result = b set !item halberd if #result = f set !item half , #spc , apron set #result n/a } if #result = m set !item hammer , #spc , pick set #result n/a } if #result = e { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin al return #false if #result = a set !item heater , #spc , shield if #result = l set !item helmet set #result n/a } set #result n/a } if #result = j { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ester ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin hs return #false if #result = h set !item jester , #spc , hat if #result = s set !item jester , #spc , suit set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin air return #false if #result = a set !item katana if #result = i set !item kilt if #result = r set !item kryss set #result n/a } if #result = l { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aeo return #false if #result = a set !item large , #spc , battle , #spc , axe if #result = e { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ather ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abcglst return #false if #result = a set !item leather , #spc , armor if #result = b set !item leather , #spc , bustier if #result = c set !item leather , #spc , cap if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item leather , #spc , gloves if #result = o set !item leather , #spc , gorget set #result n/a } if #result = l set !item leather , #spc , leggings if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin hkl return #false if #result = h set !item leather , #spc , shorts if #result = k set !item leather , #spc , skirt if #result = l set !item leather , #spc , sleeves set #result n/a } if #result = t set !item leather , #spc , tunic set #result n/a } if #result = o { set !xpos !xpos + %1 + 6 + 6 ; 'ng' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , s return #false if #result = #spc set !item long , #spc , pants if #result = s set !item longsword set #result n/a } } if #result = m { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin cu return #false if #result = c set !item mace if #result = u set !item maul set #result n/a } if #result = e { set !xpos !xpos + %1 + 6 + 6 + 3 + 8 ; 'tal ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ks return #false if #result = k set !item metal , #spc , kite , #spc , shield if #result = s set !item metal , #spc , shield set #result n/a } set #result n/a } if #result = n set !item norse , #spc , helm if #result = p { set !xpos !xpos + %1 + 3 + 6 ; 'la" is common gosub readchar !xpos !ypos in %menuTextColor if #result notin it return #false if #result = i set !item plain , #spc , dress if #result = t { set !xpos !xpos + %1 + 6 ; 'e' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin #spc , m return #false if #result = #spc set !item plate , #spc , helm if #result = m { set !xpos !xpos + %1 + 6 + 3 + 3 + 8 ; 'ail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin aglt return #false if #result = a set !item platemail , #spc , arms if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item platemail , #spc , gloves if #result = o set !item platemail , #spc , gorget set #result n/a } if #result = l set !item platemail , #spc , legs if #result = t set !item platemail , #spc , tunic set #result n/a } set #result n/a } set #result n/a } if #result = r { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i { set !xpos !xpos + %1 + 6 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ngmail ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin glst return #false if #result = g set !item ringmail , #spc , gloves if #result = l set !item ringmail , #spc , leggings if #result = s set !item ringmail , #spc , sleeves if #result = t set !item ringmail , #spc , tunic set #result n/a } if #result = o set !item robe set #result n/a } if #result = s { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin achkptu return #false if #result = a set !item sandals if #result = c set !item scimitar if #result = h { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i set !item shirt if #result = o { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin er return #false if #result = e set !item shoes if #result = r { set !xpos !xpos + %1 + 6 + 8 ; 't ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin ps return #false if #result = p set !item short , #spc , pants if #result = s set !item short , #spc , spear set #result n/a } set #result n/a } set #result n/a } if #result = k { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin iu return #false if #result = i set !item skirt if #result = u set !item skullcap set #result n/a } if #result = p set !item spear if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ru return #false if #result = r set !item straw , #spc , hat if #result = u { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 8 ; 'dded ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin abglst return #false if #result = a set !item studded , #spc , armor if #result = b set !item studded , #spc , bustier if #result = g { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item studded , #spc , gloves if #result = o set !item studded , #spc , gorget set #result n/a } if #result = l set !item studded , #spc , leggings if #result = s set !item studded , #spc , sleeves if #result = t set !item studded , #spc , tunic set #result n/a } set #result n/a } if #result = u set !item surcoat set #result n/a } if #result = t { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin aehruw return #false if #result = a set !item tall , #spc , straw , #spc , hat if #result = e set !item tear , #spc , kite , #spc , shield if #result = h set !item thigh , #spc , boots if #result = r set !item tricorne , #spc , hat if #result = u set !item tunic if #result = w set !item two , #spc , handed , #spc , axe set #result n/a } if #result = v set !item viking , #spc , sword if #result = w { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin ai return #false if #result = a { set !xpos !xpos + %1 + 6 + 8 ; 'r ' is common gosub readchar !xpos !ypos in %menuTextColor if #result notin afhm return #false if #result = a set !item war , #spc , axe if #result = f set !item war , #spc , fork if #result = h set !item war , #spc , hammer if #result = m set !item war , #spc , mace set #result n/a } if #result = i { set !xpos !xpos + %1 gosub readchar !xpos !ypos in %menuTextColor if #result notin dz return #false if #result = d set !item wide-brim , #spc , hat if #result = z set !item wizard's , #spc , hat set #result n/a } set #result n/a } return !item ;sub Bodbook_nextpage v 1.0 -> p 1 -> d waitForSysVars sub Bodbook_nextpage nameSpace Push nameSpace Local BODBook_NextPage , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize BODBook_NextPage: set !cX #contposx + 265 set !cY #contposy + 424 savepix !cx !cy 1 if #pixcol <> %menuTextColor return #false set !cX #contposx + 238 set !cY #contposy + 425 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto BODBook_NextPage nameSpace Clear nameSpace Pop return ;sub Bodbook_openbook v 1.1 -> p 1 -> d 0 sub Bodbook_openbook set !ob_book %1 gosub Bod_ensure_close_gump BODBook_openbook_point1: set !j #jindex finditem !ob_book c_ , #backpackid set #lobjectid #findid event macro 17 gosub AntiBlock NO_ALARM_EVENT wait 10 for !i !j #jindex { scanjournal !i if the_book_is_empty. in #journal { deletejournal return EMPTY } } gosub waitForSysVars CONTNAME = generic_gump contsize = 615_454 5 for !i !j #jindex { scanjournal !i if the_book_is_empty. in #journal { return EMPTY } } if ! #result goto BODBook_openbook_point1 return OK ;sub Bodbook_openfilter v 1.0 -> p 0 -> d waitForSysVars sub Bodbook_openfilter nameSpace Push nameSpace Local BODBook_openFilter , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize click_bb_open_filter: set !cX #contposx + 45 set !cY #contposy + 43 click !cX !cY f gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize 5 if ! #result goto click_bb_open_filter nameSpace Clear nameSpace Pop return ;sub Bodbook_set_filter v 1.0 -> p 5 -> d BODBook_ApplyFilter BODBook_filterMaterial BODBook_filterSize BODBook_openFilter BODBook_filterQuantity BODBook_filterExceptional sub Bodbook_set_filter set !type %1 set !quantity %2 set !exe %3 set !size %4 set !mat %5 if !quantity = %old_filterquantity && !exe = %old_filterexe { if !size = %old_filtersize && !mat = %old_filterMaterial return } gosub BODBook_openFilter if !quantity <> %old_filterQuantity { gosub BODBook_filterQuantity !quantity set %old_filterQuantity !quantity } if !exe <> %old_filterexe { gosub BODBook_filterExceptional !exe set %old_filterexe !exe } if !size <> %old_filtersize { gosub BODBook_filterSize !size set %old_filtersize !size } if !mat <> %old_filterMaterial { gosub BODBook_filterMaterial !mat set %old_filterMaterial !mat } gosub BODBook_ApplyFilter return ;sub Bodbook_setclearfilter v 1.0 -> p 0 -> d BODBook_openFilter BODBook_ClearFilter BODBook_ApplyFilter sub Bodbook_setclearfilter gosub BODBook_openFilter gosub BODBook_ClearFilter gosub BODBook_ApplyFilter return ;sub Bodcraft_addtools v 1.1 -> p 1(2) -> d GetToolUses sub Bodcraft_addtools ;need some menu field txtTOOL_COUNT txtTOOL_TOTUSES set !bat %1 set !add_tag #FALSE if %0 = 2 set !add_tag %2 gosub GetToolUses !bat set %Tools_ToolCount %Tools_ToolCount + 1 set %Tools_TotalUses ( %Tools_TotalUses + #result ) set %ToolId_ . %Tools_ToolCount !bat set %ToolRU_ . %Tools_ToolCount #result set %ToolTAG_ . %Tools_ToolCount !add_tag menu set txtTOOL_COUNT 0 / %Tools_ToolCount menu set txtTOOL_TOTUSES %Tools_TotalUses return ;sub Bodcraft_emptymaterial v 1.0 -> p 0 -> d sposta_item AntiBlock sub Bodcraft_emptymaterial ;need %type_resource %chest_resource bodcraft_emptyMaterial_loop: finditem %type_resource c_ , #backpackid if #findkind = -1 return for #findindex 1 #findcnt { gosub sposta_item #findid %chest_resource #findstack gosub AntiBlock NO_ALARM_EVENT wait 10 } goto bodcraft_emptyMaterial_loop return ;sub Bodcraft_emptytools v 1.0 -> p 0 -> d Set_menu_azione sposta_item AntiBlock sub Bodcraft_emptytools ;need %type_toolsSmith %Type_ToolsTailor %Type_ToolTinker gosub Set_menu_azione CLEAN: TOOLS bodcraft_emptyTools_loop: finditem %type_toolsSmith c_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { gosub sposta_item #findid %chest_tool #findstack gosub AntiBlock NO_ALARM_EVENT wait 10 } } finditem %Type_ToolsTailor c_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { gosub sposta_item #findid %chest_tool #findstack gosub AntiBlock NO_ALARM_EVENT wait 10 } } finditem %Type_ToolTinker c_ , #backpackid if #findkind <> -1 && #findcnt > 2 { for #findindex 3 #findcnt { gosub sposta_item #findid %chest_tool #findstack gosub AntiBlock NO_ALARM_EVENT wait 10 } } return ;sub Bodcraft_fill_this v 1.0 -> p 1 -> d bodcraft_emptyAvanzi bodcraft_emptyMaterial Bod_getAlredyMadeQuantity GetProperty bodcraft_FillBod Bodcraft_make_item bodcraft_GetTools bod_analizza bod_refresh_menu get_scissor get_forge bodcraft_getMaterial sub Bodcraft_fill_this set !bod %1 set !bod_ok #true if %0 = 2 || %2 <> #false { gosub bod_analizza !bod if %bod_size = LARGE { display ok questo non ci doveva essere perchè è un LARGE return #false } gosub bod_refresh_menu } if %Bod_ToMakeQuantity = 0 return #true if %bod_supertype = TAILOR && %id_scissor = N/A { gosub get_scissor if %id_scissor = N/A { display ok IMPOSSIBILE FARE BOD DA SARTO SENZA FORBICI $ SCRIPT FERMATO halt } } if %bod_supertype = SMITH && %id_forge = N/A { gosub get_forge if %id_forge = N/A { display ok IMPOSSIBILE FARE BOD DA FABBRO SENZA UNA FORGIA VICINA $ SCRIPT FERMATO halt } } ;material gosub bodcraft_getMaterial if ! #result { event exmsg #charid 3 %menu_col_ko NON BASTANO LE RISORSE PER QUESTO BOD set !bod_ok #false goto bodcraft_fill_this_esc } ;tools gosub bodcraft_GetTools if ! #result { event exmsg #charid 3 %menu_col_ko NON BASTANO I TOOL PER QUESTO BOD set !bod_ok #false goto bodcraft_fill_this_esc } ;ensure close bod gump ensure_close_bod_gump: if #contsize in 510_275_524_275 && #contname = generic_gump { set !cX #contposx + 140 set !cY #contposy + 225 click !cx !cy f wait 10 goto ensure_close_bod_gump } ;craft gosub Bodcraft_make_item %bod_AlredyMadeQuantity %bod_quantity ignoreitem reset bodpieces if %one_to_add { gosub bodcraft_FillBod wait 10 } ignoreitem reset alreadycrafted set %lpc #lpc set #lpc 500 gosub GetProperty %Bod_id set %bod_prop #result gosub Bod_getAlredyMadeQuantity %bod_prop bod_AlredyMadeQuantity menu set txtMAKED %bod_AlredyMadeQuantity set %bod_AlredyMadeQuantity #result set #lpc %lpc if %bod_AlredyMadeQuantity < %bod_quantity set !bod_ok #false ;exit bodcraft_fill_this_esc: gosub bodcraft_emptyAvanzi gosub bodcraft_emptyMaterial return !bod_ok ;sub Bodcraft_fillbod v 1.1 -> p 0 -> d waitForSysVars GetProperty Bod_getAlredyMadeQuantity waitForSysVars sub Bodcraft_fillbod ;need %bod_xxx variables from sub Bod_analizza set #lobjectid %Bod_id set !bodfill_result #false fb_useBod: event macro 17 0 gosub waitForSysVars contsize in 510_275_524_275 contname = generic_gump 5 if ! #result { finditem %bod_id c_ , #backpackid if #findkind = -1 return #false goto fb_useBod } set %FillX #contposx + 140 set %FillY #contposy + 200 click %FillX %FillY f target 3s fb1: set %j_fb_start #jindex + 1 if the_item_has_been in #SYSMSG ignoreitem #findid fillbod finditem %bod_Type C_ , #backpackid if #findkind = -1 { if #targcurs <> 0 set #targcurs 0 goto esci_FillBod } if #targcurs <> 1 && #findcnt > 1 { click %FillX %FillY f target 30 } if #findkind <> -1 { set #ltargetid #findid set #ltargetkind 1 Event Macro 22 0 wait 2 if the_maximum_amount in #SYSMSG goto esci_FillBod if the_item_must_be_exceptional in #SYSMSG { ignoreitem #findid fillbod goto fb1 } if #findcnt > 1 target 3s goto fb1 } set %fb_checkjournal #false for !ji %j_fb_start #jindex { scanjournal !ji if : notin !ji { if the_maximum_amount in #journal { deletejournal set %fb_checkjournal #true } } } if %fb_checkjournal = #False { set %lpc #lpc set #lpc 500 gosub GetProperty %Bod_id set %bod_prop #result gosub Bod_getAlredyMadeQuantity %bod_prop bod_AlredyMadeQuantity set %bod_AlredyMadeQuantity #result set #lpc %lpc if %Bod_AlredyMadeQuantity < %bod_quantity goto fb1 } gosub waitForSysVars contsize in 510_275_524_275 contname = generic_gump targcurs = 0 5 if ! #result goto fb1 esci_FillBod: wait 10 gosub waitForSysVars contsize in 510_275_524_275 contname = generic_gump 5 set %FillY %FillY + 25 ;exit Button fb6: click %FillX %FillY F gosub waitForSysVars contsize notin 510_275_524_275 contname <> generic_gump 5 if ! #result { if #contname = generic_gump && #contsize = 530_457 { set !x #contposx + 30 set !y #contposy + 430 click !x !y F } goto fb6 } ignoreitem reset fillbod Event Sysmessage All right,.... return FILLED ;sub Bodcraft_getmaterial v 1.0 -> p 1 -> d Conta_stack_item Prendi_stack_oggetto sub Bodcraft_getmaterial ;need %bod_xxx variables from sub Bod_analizza ;nned some type set !num_item %Bod_ToMakeQuantity if %0 = 1 && %1 <> N/A set !num_item %1 set !result #true if %bod_Cloth > 0 { set !type_to_get %type_cloth set !color_to_get 0 set !amount_one %bod_Cloth set !txt CLOTH } if %bod_hides > 0 { set !type_to_get %type_leather set !color_to_get %bod_material set !amount_one %bod_hides set !txt %leather . !color_to_get } if %bod_ingots > 0 { set !type_to_get %type_ingot set !color_to_get %bod_material set !amount_one %bod_ingots set !txt %ingot . !color_to_get } set !tot_to_get !num_item * !amount_one gosub Conta_stack_item !type_to_get #backpackid !color_to_get set !tot_to_get !tot_to_get - #result if %flagM . !txt <> MANCA && !tot_to_get > 0 { gosub Prendi_stack_oggetto !type_to_get %chest_resource !tot_to_get !color_to_get if ! #result { set %flagM . !txt MANCA menu set txtM . !txt !txt menu set txtT . !txt set !result #false } } else { if !tot_to_get > 0 set !result #false } if %bod_Bones > 0 { set !tot_to_get !num_item * %bod_Bones gosub Conta_stack_item %type_bones #backpackid set !tot_to_get !tot_to_get - #result if %flagMOSSA <> MANCA && !tot_to_get > 0 { gosub Prendi_stack_oggetto %type_bones %chest_resource !tot_to_get if ! #result { set %flagMOssa MANCA menu set txtMOssa OSSA menu set txtTOssa set !result #false } } else { if !tot_to_get > 0 set !result #false } } return !result ;sub Bodcraft_gettools v 1.1 -> p 1 -> d check_ancient_hammer prendi_tool_uses Bodcraft_addTools MakeTools findtooluseless sub Bodcraft_gettools ;need %bod_xxx variables from sub Bod_analizza ;need some menu field txtTOOL_type txtTOOL_USES menu set txtTOOL_type %bod_supertype Bodcraft_getTools_start: set %Tools_TotalUses 0 set %Tools_ToolCount 0 set %Tools_Current 0 set %RemUses 0 menu set txtTOOL_USES 0 Bodcraft_gettools_cicla_ancient: set %Bc_gt_ca #false if %use_ancient_hammer && %Bod_superType = SMITH && PLATE in %bod_name { ;finditem %type_smith_hammer C_ , #backpackid gosub findtooluseless %type_smith_hammer c_ #backpackid if #findkind <> -1 { if #findcol <> 0 { gosub check_ancient_hammer #findid ;if #result = 10 || #result = 15 || #result = 30 if %use_ancient_ . #result gosub Bodcraft_addTools #findid ANCIENT } ignoreitem #findid Bodcraft_gettools_ancient if %Tools_TotalUses < %Bod_ToMakeQuantity set %Bc_gt_ca #true } else { set !need_uses %Bod_ToMakeQuantity - %TotalUses gosub prendi_tool_uses %type_smith_hammer %chest_tool !need_uses #backpackid #false N/A 1154 if #result > 0 set %Bc_gt_ca #true } } if %Bc_gt_ca goto Bodcraft_gettools_cicla_ancient ignoreitem reset Bodcraft_gettools_ancient if %Tools_TotalUses >= %Bod_ToMakeQuantity return #true Bodcraft_gettools_cicla_tools: gosub findtooluseless %Type_Tools . %bod_supertype c_ #backpackid if #findkind <> -1 { if #findcol = 0 gosub Bodcraft_addTools #findid ignoreitem #findid Bodcraft_gettools if %Tools_TotalUses < %Bod_ToMakeQuantity goto Bodcraft_gettools_cicla_tools } ignoreitem reset Bodcraft_gettools if %Tools_TotalUses >= %Bod_ToMakeQuantity return #true set !need_uses %Bod_ToMakeQuantity - %TotalUses gosub prendi_tool_uses %Type_Tools . %Bod_superType %chest_tool !need_uses #backpackid #false N/A 0 if #result >= !need_uses goto Bodcraft_getTools_start if %crea_tool { gosub MakeTools %Bod_superType } else { if %flagT . %Bod_superType <> MANCA { set %flagT . %Bod_superType MANCA menu set txtM . %Bod_superType TOOL %ita_ . %Bod_superType menu set txtT . %Bod_superType set !result #false } return #false } goto Bodcraft_getTools_start return #false ;sub Bodcraft_make_item v 1.1 -> p 2 -> d antiblock GetProperty Check_Weight_Bod bodcraft_getMaterial waitForSysVars Craft_bringupcraftmenu Bodcraft_getTools Craft_choosematerial Craft_craftanything Craft_ClickMakeLast sposta_item craft_ClickSmelt craft_ClickExit sub Bodcraft_make_item ;need %bod_xxx variables from sub Bod_analizza set !craft_start %1 set !craft_stop %2 set !item_to_make !craft_stop - !craft_start set !resource_check !craft_stop - !craft_start set !AlreadyCraftedFound #false set %one_to_add #false menu set txtNeed !item_to_make bd_mi_1: ;already crafted start gosub antiblock finditem %bod_type C_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { if #findcol <> %Bod_Material && %Bod_Material <> cloth { ignoreitem #findid alreadycrafted } else { if %Bod_Exceptional { Gosub GetProperty #findid set !ItemProperty #result if exceptional in !ItemProperty { set !item_to_make !item_to_make - 1 menu set txtNeed !item_to_make ignoreitem #findid bodpieces set %one_to_add #true Event Sysmessage Already Crafted Item found, need !item_to_make more set !AlreadyCraftedFound #true } else { ignoreitem #findid alreadycrafted } } else { set !item_to_make !item_to_make - 1 menu set txtNeed !item_to_make ignoreitem #findid bodpieces set %one_to_add #true Event Sysmessage Already Crafted Item found, need !item_to_make more set !AlreadyCraftedFound #true } } } } if !AlreadyCraftedFound { if !item_to_make <= 0 return #true gosub Check_Weight_Bod } ;already crafted end set !senza_esito 0 set !first_item #true bd_mi_2: while !item_to_make > 0 { if !senza_esito > 10 { Event Sysmessage Click senza esito Problems set !senza_esito 0 set %LastMaterial N/A set !first_item #true } gosub antiblock if !resource_check <= 0 { gosub bodcraft_getMaterial !item_to_make if #result = #false return #false set !resource_check !item_to_make if %RemUses > 0 { gosub waitForSysVars contname = generic_gump contsize = 530_457 5 if ! #result gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } else gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } if %RemUses < 0 Event Sysmessage Remuses Problems if %RemUses <= 0 { set %Tools_Current %Tools_Current + 1 if %Tools_Current > %Tools_ToolCount { gosub Bodcraft_getTools if #result = #false return #false set %Tools_Current 1 set %RemUses 0 } set %RemUses %ToolRU_ . %Tools_Current menu set txtTOOL_COUNT %Tools_Current / %Tools_ToolCount menu set txtTOOL_USES %RemUses if %ToolTAG_ . %Tools_Current = #FALSE menu set txtTool_Tag #spc else menu set txtTool_Tag %ToolTAG_ . %Tools_Current gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } if !first_item { if %Bod_Material <> Cloth && %Bod_Material <> %LastMaterial { set %LastMaterial %Bod_Material gosub antiblock gosub Craft_choosematerial %Bod_Material } gosub Craft_craftanything %bod_Category %bod_Piece set !first_item #false } else { if %bod_bones > 0 { finditem %Type_bone C_ , #backpackid if #findkind = -1 || #findstack < %bod_bones { gosub bodcraft_getMaterial !item_to_make if #result = #false return #false set !resource_check !item_to_make if %RemUses > 0 { gosub waitForSysVars contname = generic_gump contsize = 530_457 5 if ! #result gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } else gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } } set !senza_esito !senza_esito + 1 gosub Craft_ClickMakeLast } wait 10 set %RemUses %RemUses - 1 set %Tools_TotalUses %Tools_TotalUses - 1 menu set txtTOOL_TOTUSES %Tools_TotalUses menu set txtTOOL_USES %RemUses set !findtry 0 bd_mi_3: set %FindTry %FindTry + 1 finditem %bod_type C_ , #backpackid if #findkind = -1 && %FindTry < 15 { gosub antiblock NO_ALARM_EVENT goto bd_mi_3 } set !resource_check !resource_check - 1 if #findkind <> -1 { set !FoundItem #findid set !senza_esito 0 if %Bod_Exceptional { Gosub GetProperty !FoundItem set !itemProperty #result if exceptional in !ItemProperty { set !item_to_make !item_to_make - 1 menu set txtNeed !item_to_make ignoreitem !FoundItem bodpieces set %one_to_add #true Event Sysmessage Item maked, need !item_to_make more } else { if %bod_supertype = TAILOR { if %bod_Bones > 0 gosub sposta_item !FoundItem %chest_trash 1 else { set !contid #contid set #lobjectid %id_scissor set #ltargetid !FoundItem Event macro 17 0 gosub AntiBlock NO_ALARM_EVENT target 5s set #ltargetkind 1 Event Macro 22 0 wait 5 if %RemUses > 0 gosub waitForSysVars contname = generic_gump contsize = 530_457 5 } } else { if %RemUses = 0 { set %Tools_Current %Tools_Current + 1 if %Tools_Current > %Tools_ToolCount { gosub Bodcraft_getTools if #result = #false return #false set %Tools_Current 1 set %RemUses 0 } set %RemUses %ToolRU_ . %Tools_Current menu set txtTOOL_COUNT %Tools_Current / %Tools_ToolCount menu set txtTOOL_USES %RemUses if %ToolTAG_ . %Tools_Current = #FALSE menu set txtTool_Tag #spc else menu set txtTool_Tag %ToolTAG_ . %Tools_Current gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } gosub craft_ClickSmelt !FoundItem } } } else { set !item_to_make !item_to_make - 1 menu set txtNeed !item_to_make ignoreitem !FoundItem bodpieces set %one_to_add #true Event Sysmessage Item maked, need !item_to_make more } gosub Check_Weight_Bod } } gosub craft_ClickExit return ;sub Check_ancient_hammer v 1.0 -> p 1 -> d 0 sub Check_ancient_hammer gosub Getproperty %1 if Blacksmithing , #spc , +10 in #result return 10 if Blacksmithing , #spc , +15 in #result return 15 if Blacksmithing , #spc , +30 in #result return 30 if Blacksmithing , #spc , +60 in #result return 60 return 0 ;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_skill_recall v 1.0 -> p 0 -> d 0 sub Check_skill_recall chooseSkill Mager set !csr_magery #SKILL chooseSkill Chiva set !csr_chiva #SKILL if !csr_magery > ( !csr_chiva - 1 ) { set !csr_skillsel !csr_magery set !csr_return mager } else { set !csr_skillsel !csr_chiva set !csr_return chiva } if !csr_skillsel < 250 { display OK Hai skill per recallarti troppo basse $ Script fermato. halt } return !csr_return ;sub Checkconnection v 1.5 -> p 0 -> d Set_Menu_Azione Log_in apri_gump_base sospendi_Script sub Checkconnection ;var necessarie %cont_connlost %mycharnum if #contname <> waiting_gump || #contsize <> 203_121 return gosub Set_Menu_Azione CONNECTION_LOST set %cont_connlost %cont_connLost + 1 menu set txtconnlost %cont_connlost checkconn_quit: set !cl_x #contposx + 101 set !cl_y #contposy + 90 click !cl_x !cl_y set !cl_timeOut #scnt + 20 checkconn_waitlogout: if #scnt > !cl_timeOut goto checkconn_quit if #contname <> MainMenu_gump goto checkconn_waitlogout while #time >= %sospendida && #time < %sospendia && %sospendi ; non tentare login fra i due valori { wait 60s } gosub Set_Menu_Azione CONNECTION_LOST WAIT 20 wait 20s gosub Log_in %mycharnum gosub apri_gump_base return ;sub Click_on_gump v 1.0 -> p 2 -> d 0 sub Click_on_gump set !cog_clickx #contposx + %1 ;x set !cog_clicky #contposy + %2 ;y click !cog_clickx !cog_clicky f return ;sub Click_popup_vendor_menu v 1.0 -> p 2 -> d Wait_systemvar Click_On_Gump sub Click_popup_vendor_menu set !v_id %1 ;vendor id set !v_button %2 ;index menu cpvm_pop: exevent popup !v_id GoSub Wait_systemvar CONTKIND MCGC 5 ;GoSub Wait_Gump normal_gump 5 if #RESULT = #false goto cpvm_pop wait 5 set !addy 2 + 18 * !v_button gosub Click_On_Gump 32 !addy ; <-- coordinate del pulsante da premere return ;sub Conta_stack_item v 1.0 -> p 2(3) -> d 0 sub Conta_stack_item set !id_si %1 ;type item da contare set !cont_si %2 ;id contenitore dove contarli set !colore #false if %0 = 3 { set !colore #true set !col_val %3 } set !tot 0 finditem !id_si c_ , !cont_si if #findkind = -1 return !tot for #FINDINDEX 1 #FINDCNT { if !colore = #false || !col_val = #findcol set !tot !tot + #findstack } return !tot ;sub 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 mod Pepito ;* @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. pause return } 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 { event sysmessage No craft tools find in Craft_bringupcraftmenu return NO_TOOL } 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.1 -> 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 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 ClickExit: click !ExitX !ExitY f gosub waitForSysVars contkind <> !CraftContKind contname <> !CraftContName contsize <> !CraftContSize 5 if ! #result && #contsize = 530_457 goto ClickExit nameSpace Clear nameSpace Pop return ;sub Craft_clickmakelast v 1.1 -> 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 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_clicksmelt v 1.0 -> p 1 -> d waitForSysVars sub Craft_clicksmelt ;this sub is made by Boydon ;* @name ClickSmelt ;* @ver 1.2 20Aug05 ;* @author Boydon ;* @purpose Once the blacksmithy craft menu is focused use this to click the smelt button ;* ;* @params %1 opt The id of the item you want to smelt ;* ;* @returns nameSpace Push nameSpace Local Craft_clicksmelt , #time , #random , #scnt2 set !CraftContKind #contkind set !CraftContName #contname set !CraftContSize #contsize set !TargetItem #false if %0 = 1 { set !TargetItem #true set !Item %1 } set !SmeltX #contposx + 30 set !SmeltY #contposy + 355 click !SmeltX !SmeltY f gosub waitForSysVars contkind <> !CraftContKind contname <> !CraftContName contsize <> !CraftContSize targcurs = 1 5 if !TargetItem { set #ltargetkind 1 set #ltargetid !Item Event Macro 22 0 gosub waitForSysVars contkind = !CraftContKind contname = !CraftContName contsize = !CraftContSize targcurs = 0 5 } 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 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 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_get_bod v 1.3 -> p 1 -> d crea_lista_vendor GB_GET_NEW_BOD_POPUP sub Gb_get_bod set !gb_vendortype %1 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 guildmaster 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 if #result break } } return ;sub Gb_get_new_bod_popup v 1.0 -> p 1 -> d GB_Click_Ok_Get_Bod_Gump GB_Wait_For_Get_New_Bod_Gump AntiBlock avvicinati_vendor Click_popup_vendor_menu sub Gb_get_new_bod_popup set !gb_vendor_id %1 gb_gnbp_start: gosub avvicinati_vendor !gb_vendor_id if #result = #false return #false set !gb_gnbp_journal #jindex gosub Click_popup_vendor_menu !gb_vendor_id 4 gosub AntiBlock wait 1s for !gb_gnbp_i !gb_gnbp_journal #jindex { scanjournal !gb_gnbp_i if an_offer_may_be_available in #journal { return #true } } gosub GB_Wait_For_Get_New_Bod_Gump if #result = #false goto gb_gnbp_start gosub AntiBlock gosub GB_Click_Ok_Get_Bod_Gump wait 1s finditem %type_bod c_ , #backpackid if #findkind = -1 goto gb_gnbp_start return #true ;sub Gb_getval v 1.2 -> p 1 -> d Split_to_array Get_Book_From_Name sub Gb_getval set %gb_pggetval %1 set !nv GiroBod_VAL_ , %gb_pggetval gosub GlobalVar_get %idBodscript !nv gosub Split_to_array % . !nv _ array set %gb_is_default_value #false if %array13 { gosub GlobalVar_get %idBodscript GiroBod_VAL_0 gosub Split_to_array %GiroBod_VAL_0 _ array set %gb_is_default_value #true } set %GB_RAIL %array1 set %GB_X_RESTOCK %array2 set %GB_Y_RESTOCK %array3 set %GB_Z_RESTOCK %array4 set %GB_Chest %array5 set %GB_CHOISE %array6 set %RB_BLACKSMITH %array7 set %firstrune_BLACKSMITH %array8 set %lastrune_BLACKSMITH %array9 set %RB_TAILOR %array10 set %firstrune_TAILOR %array11 set %lastrune_TAILOR %array12 set %RB_LOGOUT %array14 set %firstrune_LOGOUT %array15 set %lastrune_LOGOUT %array16 set %posX_LOGOUT %GB_X_RESTOCK set %posY_LOGOUT %GB_Y_RESTOCK set %posZ_LOGOUT %GB_Z_RESTOCK if %gb_is_default_value { gosub Get_Book_From_Name %RB_LOGOUT if #result = #false 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.0 -> p 1 -> d GB_Logout Log_In Apri_Gump_base GB_GetVal GB_VAI GB_GET_BOD sub Gb_make set !gb_pg %1 if !gb_pg <> %MyCharNum { gosub GB_Logout gosub Log_In !gb_pg gosub Apri_Gump_base NOPOSITION gosub Check_Skill_Recall set %magia_usata #result } finditem %typebod c_ , #backpackid if #findkind <> -1 { for #findindex 1 #findcnt { ignoreitem #findid gb_bod } } gosub GB_GetVal !gb_pg gosub GB_VAI LOGOUT #true if %GB_CHOISE = BOTH || %GB_CHOISE = TAILOR { gosub GB_VAI TAILOR #false gosub GB_GET_BOD TAILOR } if %GB_CHOISE = BOTH || %GB_CHOISE = BLACKSMITH { finditem %RB_BLACKSMITH c_ , #backpackid if #findkind = -1 gosub GB_VAI LOGOUT #true gosub GB_VAI BLACKSMITH #false gosub GB_GET_BOD BLACKSMITH } gosub GB_VAI LOGOUT #true if %GB_Chest <> N/A gosub GB_Sposta_Bod ignoreitem reset gb_bod return ;sub Gb_sposta_bod v 1.2 -> p 0 -> d sposta_item sub Gb_sposta_bod ;var necessarie %type_bod (type dei bod) %gb_chest /chest in cui sposatrli) gb_sposta_bod_loop: finditem %type_bod c_ , #backpackid if #findkind = -1 return gosub sposta_item #findid %gb_chest 1 if that_container_cannot_hold in #SYSMSG { event exmsg #charid 3 %menu_col_ko CONTAINER PIENO! set %GB_Chest N/A ignoreitem #findid } wait 10 goto gb_sposta_bod_loop return ;sub Gb_start v 1.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_bod_book_from_name v 1.1 -> p 1(2) -> d 0 sub Get_bod_book_from_name set !gbodbfn_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_bod_book = N/A set %type_bod_book DYM gbodbfn_loop: finditem %type_bod_book C_ , #backpackid if #findkind = -1 { if !matrix { if % . !ubound_matrix = 0 set !l #false else set !l #true ignoreitem reset gbodbfn_ignorelist return !l } else { ignoreitem reset gbodbfn_ignorelist return #false } } event property #findid if !gbodbfn_string_to_find in #property && #findid <> %OBJ_GENERICO { if !matrix { set % . !ubound_matrix % . !ubound_matrix + 1 set !l !nome_matrix , % . !ubound_matrix set % . !l #findid ignoreitem #findid gbodbfn_ignorelist } else { ignoreitem reset gbodbfn_ignorelist return #findid } } else { ignoreitem #findid gbodbfn_ignorelist } goto gbodbfn_loop return ;sub Get_bod_from_book v 1.0 -> p 1 -> d 0 sub Get_bod_from_book set !book %1 gbfb_point1: gosub BODBook_openbook !book if #result = EMPTY return #result if %filter_cleared <> OK { set %filter_cleared OK gosub BodBook_setclearfilter } gbfb_point2: if #CONTNAME <> generic_gump || #contsize <> 615_454 goto gbfb_point1 set !r N/A set !j #jindex set !jerr #scnt + 5 gosub Click_on_gump 43 104 gbfb_point3: gosub antiblock for !i !j #jindex { scanjournal !i if the_bulk_order_deed_has_been_placed in #journal { set !r OK break } if there_is_not_enough_room in #sysmsg { set !r FULL break } if the_book_is_empty in #journal { return EMPTY } } if !r <> N/A { gosub antiblock gosub waitForSysVars CONTNAME = generic_gump contsize = 615_454 3 gosub Bod_ensure_close_gump return !r } if #scnt < !jerr goto gbfb_point3 goto gbfb_point2 return ;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_forge v 1.0 -> p 0 -> d 0 sub Get_forge if %Type_forge = N/A set %Type_forge JBG_SOJ_ROJ_AUJ_ZTJ_CUJ_BUJ_WTJ_VTJ_KUJ_JUJ_EUJ_DUJ_ +GUJ_FUJ_QUJ_PUJ_OUJ_NUJ_YUJ_XUJ_AVJ_ZUJ_UUJ_TUJ_IVJ_ +HVJ_CVJ_BVJ_EVJ_DVJ_OVJ_NVJ set %id_forge N/A finditem %Type_forge G_2 if #findkind <> -1 { set %id_forge #findid return #true } return #false ;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_object_in_container v 1.0 -> p 1 -> GetProperty sub Get_object_in_container gosub GetProperty %1 set !cwic_prop #result str pos !cwic_prop contents: set !v #strres + 9 str del !cwic_prop 1 !v set !cwic_prop #strres str pos !cwic_prop /125 set !v #strres str del !cwic_prop !v 1000 return #strres ;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_scissor v 1.0 -> p 0 -> d 0 sub Get_scissor if %type_scissors = N/A set %type_scissors KAG_ finditem %type_scissors C_ , #backpackid if #findkind = -1 set %id_scissor N/A else set %id_scissor #findid return ;sub Get_skill_val v 1.0 -> p 1 -> d 0 sub Get_skill_val set !getskillval %1 set !txtskillval %1 chooseSkill !getskillval set %skill_ . !txtskillval #SKILL return ;sub Get_trash v 1.0 -> p 0 -> d Get_Trash_Nearest sub Get_trash ;return finded in %chest_trash gosub Get_trash_Nearest 2 if #result = #false { display ok NESSUN TRASH BARREL TROVATO $ SCRIPT FERMATO halt } set %chest_trash #findid return ;sub Get_trash_nearest v 1.0 -> p 1 -> d 0 sub Get_trash_nearest set !distance %1 ;range find if %type_trash = N/A set %type_trash JKF_BKF_ finditem %type_trash g_ , !distance if #findkind = -1 return #false return #findid ;sub Getclothlevel v 1.0 -> p 1 -> d 0 sub Getclothlevel set !hue %1 set !level 0 if !hue = 0 return 0 if !hue in %type_color_cloth_level1 set !level 1 if !hue in %type_color_cloth_level2 set !level 2 if !hue in %type_color_cloth_level3 set !level 3 if !hue in %type_color_cloth_level4 set !level 4 if !hue in %type_color_cloth_level5 set !level 5 return !level ;sub Getproperty v 1.0 -> p 1 -> d 0 sub Getproperty GetProperty_loop1: event property %1 ;id object set !Property1 #property event property %1 set !Property2 #property event property %1 set !Property3 #property if ! ( !Property1 = !Property2 && !Property2 = !Property3 ) goto GetProperty_loop1 return #property ;sub Gettooluses v 1.0 -> p 1 -> d GetProperty sub Gettooluses gosub GetProperty %1 ;id object str pos #result Uses Remaining set !RemUses #strres + 15 str del #result 1 !RemUses set !RemUses #strres str pos !RemUses $ str del !RemUses #strres 100 return #strres ;sub Globalvalues_all v 1.0 -> p 1 -> d 0 sub Globalvalues_all ;%1 nome_global_var di solito id_script nameSpace push nameSpace local #systime , _ , GET set !lpc #lpc set #lpc 1000 set !global * . %1 if %2 = #true display ok !global gosub split_to_array !global | matglobal set !to ( #result - 3 ) / 2 set !i 0 while !i < !to { set !i !i + 1 set !n !i * 2 + 1 set !v !n + 1 str del %matglobal . !n 1 1 set % . #strres %matglobal . !v } set #lpc !lpc nameSpace Clear nameSpace Pop return ;sub Globalvar_del v 1.0 -> p 2 -> d 0 sub Globalvar_del ;%1 nome_global_var di solito id_script, %2 nomevar da cancellare nameSpace push nameSpace local #systime , _ , %2 , DEL set !lpc #lpc set #lpc 1000 set !global * . %1 set !varName v , %2 , | str pos !global !varName if #strres = 0 { set #lpc !lpc nameSpace clear nameSpace pop return #true } set !varNamePos #strres str len !varName set !splitString !varNamePos + #strres - 1 set !splitString2 !varNamePos - 2 str left !global !splitstring2 set !globalPart1 #strres str del !global 1 !splitString set !global #strres str len !global set !globalLen #strres str pos !global | set !splitString !globalLen - #strres + 1 str right !global !splitstring set !global #strres set * . %1 !globalPart1 , !global set #lpc !lpc nameSpace clear nameSpace pop return #true ;sub Globalvar_get v 1.0 -> p 2 -> d 0 sub Globalvar_get ;%1 nome_global_var di solito id_script, %2 nomevar da caricare nameSpace push nameSpace local #systime , _ , %2 , GET set !lpc #lpc set #lpc 1000 set !global * . %1 set !varName v , %2 , | str pos !global !varName set #result #strres <> 0 if #result { set !varNamePos #strres str len !varName set !delString !varNamePos + #strres - 1 str del !global 1 !delString set !global #strres str pos !global | set !varNamePos #strres - 1 str left !global !varNamePos set % . %2 #strres } else { set % . %2 N/A } set #lpc !lpc nameSpace Clear nameSpace Pop return #result ;sub Globalvar_put v 1.0 -> p 2 -> d 0 sub Globalvar_put ;%1 nome_global_var di solito id_script, %2 nomevar da salvare nameSpace push nameSpace local #systime , _ , %2 , PUT set !lpc #lpc set #lpc 1000 set !global * . %1 set !varName v , %2 , | str pos !global !varName if #strres = 0 { if |CEO*FILESYSTEM_MODIFIED| notin !global set !global |CEO*FILESYSTEM_MODIFIED| set * . %1 !global , !varName , % . %2 , | set #lpc !lpc nameSpace clear nameSpace pop return #true } set !varNamePos #strres str len !varName set !splitString !varNamePos + #strres - 1 str left !global !splitstring set !globalPart1 #strres str del !global 1 !splitString set !global #strres str len !global set !globalLen #strres str pos !global | set !splitString !globalLen - #strres + 1 str right !global !splitstring set !global #strres set * . %1 !globalPart1 , % . %2 , !global set #lpc !lpc nameSpace clear nameSpace pop return #true ;sub Log_in v 1.1 -> p 1 -> d Set_menu_azione Wait_journal_msg sub Log_in set !li_char %1 ;pg index to log set !repeat 0 set !oldgump N/A set !journalstart #JINDEX loop_log_in: wait 3s set !repeat !repeat + 1 if #CLILOGGED = 1 { ;another pg if #contname = WAITING_GUMP && #contsize = 408_288 { gosub Set_menu_azione ANOTHER_CHAR_IS_IN_GAME if !oldgump <> ANOTHER_CHAR_IS_IN_GAME { set !repeat 0 set !oldgump ANOTHER_CHAR_IS_IN_GAME } set !x 317 set !y 353 click !x !y goto loop_log_in } gosub Wait_journal_msg 5 !journalstart WELCOME if #result = #true { gosub Set_menu_azione LOGGATO wait 5s return } } ;main_menu_gump if #contname = MAINMENU_GUMP && #contsize = 640_480 { gosub Set_menu_azione MAINMENU_GUMP if !oldgump <> MAINMENU_GUMP { set !repeat 0 set !oldgump MAINMENU_GUMP } set !x #contposX + 615 set !y #contposY + 447 click !x !y goto loop_log_in } ;shard_gump if #contname = NORMAL_GUMP && #contkind = AAG { gosub Set_menu_azione SHARD_GUMP if !oldgump <> SHARD_GUMP { set !repeat 0 set !oldgump SHARD_GUMP } set !x #contposX + 618 set !y #contposY + 447 click !x !y goto loop_log_in } ;char_select if #contname = NORMAL_GUMP && #contkind = GXJC { gosub Set_menu_azione CHAR_CHOISE_GUMP if !oldgump <> CHAR_CHOISE_GUMP { set !repeat 0 set !oldgump CHAR_CHOISE_GUMP } set !cx 0 set !cy 0 set !x !cx + 370 set !y !cy + 100 + !li_char * 40 click !x !y d wait 5 set !x !cx + 618 set !y !cy + 447 click !x !y goto loop_log_in } ;char_select if #contname = LOGIN_GUMP && #contkind = MSSC { gosub Set_menu_azione CHAR_CHOISE_GUMP if !oldgump <> CHAR_CHOISE_GUMP { set !repeat 0 set !oldgump CHAR_CHOISE_GUMP } set !cx 0 set !cy 0 set !x !cx + 370 set !y !cy + 100 + !li_char * 40 click !x !y d wait 5 set !x !cx + 618 set !y !cy + 447 click !x !y goto loop_log_in } ;verifing_account if #contname = WAITING_GUMP && #contsize = 408_288 { gosub Set_menu_azione WAITING if !oldgump <> WAITING { set !repeat 0 set !oldgump WAITING } if !repeat > 3 && !repeat % 2 = 0 { set !x 315 set !y 353 click !x !y wait 10s } else { set !x 319 set !y 353 click !x !y wait 10s } wait 1s goto loop_log_in } event sysMessage Name: #CONTNAME $ KIND: #contkind $ Size: #contsize goto loop_log_in return ;sub Maketools v 1.0 -> p 1 -> d Antiblock prendi_tool_uses GetToolUses Conta_stack_item Prendi_stack_oggetto Craft_BringUpCraftMenu Craft_CraftAnyThing Craft_ClickExit Craft_ClickMakeLast Craft_ClickExit sub Maketools ;need some type e chest chooseskill Tink if #skill < 400 { display ok Hai finito i tool e non hai tinker skill per rifarli. halt } set !type_tool_to_make %1 MakeTools_start: gosub Antiblock finditem %Type_ToolTinker C_ , #backpackid if #findkind = -1 { gosub prendi_tool_uses %Type_ToolTinker %chest_tool 6 #backpackid if #result > 0 goto MakeTools_start display ok Hai finito i tool e non hai più tinker tool. halt } set !tool_id #findid if #findcnt = 1 { gosub GetToolUses !tool_id if #result < 10 { set !tot_to_get 2 gosub Conta_stack_item %type_ingot #backpackid 0 if #result < !tot_to_get { set !tot_to_get !tot_to_get - #result gosub Prendi_stack_oggetto %type_ingot %chest_resource !tot_to_get 0 if #result = #false { display ok Hai finito i lingotti per fare i Tinker_Tool. halt } } gosub Antiblock gosub Craft_BringUpCraftMenu !tool_id gosub Craft_CraftAnyThing 2 4 gosub Craft_ClickExit goto MakeTools_start } } finditem !tool_id C_ , #backpackid if #findkind = -1 goto MakeTools_start if !type_tool_to_make = tailor { set !tot_to_get 10 gosub Conta_stack_item %type_ingot #backpackid 0 if #result < !tot_to_get { set !tot_to_get !tot_to_get - #result gosub Prendi_stack_oggetto %type_ingot %chest_resource !tot_to_get 0 if #result = #false { display ok Hai finito i lingotti per fare i Sewing kit. halt } } gosub Antiblock gosub Craft_BringUpCraftMenu !tool_id gosub Craft_CraftAnyThing 2 7 } if !type_tool_to_make = smith { set !tot_to_get 5 gosub Conta_stack_item %type_ingot #backpackid 0 if #result < !tot_to_get { set !tot_to_get !tot_to_get - #result gosub Prendi_stack_oggetto %type_ingot %chest_resource !tot_to_get 0 if #result = #false { display ok Hai finito i lingotti per fare i Tongs. halt } } gosub Antiblock gosub Craft_BringUpCraftMenu !tool_id gosub Craft_CraftAnyThing 2 13 } gosub GetToolUses !tool_id if #result >= 5 { for !for 1 5 gosub Craft_ClickMakeLast gosub Craft_ClickExit } if #result < 5 { set !forstop #result for !for 1 !forstop gosub Craft_ClickMakeLast } return #result ;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.1 -> p 0 -> d 0 sub Menu_crea set !mc_lpc #lpc set #lpc 1000 Menu Clear menu Window Title %Menu_Title - v %Menu_Version menu window transparent 100 Menu Window size %Menu_Width %Menu_Height Menu Window Color $000000 menu Font Transparent #true set !y_intestazione 2 set !add_y 0 if %new_version set !add_y 20 set !y_help %Menu_Height - 67 set !y_stato %Menu_Height - 13 set !y_button !y_intestazione + 54 + !add_y ;Intestazione set !x_box 2 set !y_box !y_intestazione set !w_box %Menu_Width - 4 set !h_box 50 Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 4 7 1 gray 7 $333333 Menu Font Name tahoma Menu Font Color yellow ;$F7D358 Menu font size 12 Menu Font Style b set !x !x_box + 6 set !y !y_box + 3 Menu Text Titolo !x !y %Menu_Title Menu Font Color $FFBF00 Menu font size 8 set !x !x_box + 6 set !y !y + 18 Menu Text Titolo !x !y %Menu_SubTitle Menu Font Color gray Menu font size 7 set !x !x_box + 6 set !y !y + 14 Menu Text Titolo !x !y by %Menu_Owner set !x !x_box + !w_box - 38 Menu Text Titolo !x !y v %Menu_Version Menu font size 5 set !y !y_box set !x !x_box + !w_box - 35 menu font bgcolor $555555 Menu Font Color silver if %new_version Menu Font Color $0080FF menu Button butGoSite !x !y 35 18 WWW ;Fine Intestazione if %new_version { Menu font size 6 Menu Font Color $0080FF set !x_box 4 set !y_box !y_intestazione + !h_box + 2 set !w_box %Menu_Width - 8 set !h_box 18 Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 4 7 1 $0080FF 7 $333333 set !y !y_box + 4 set !x !x_box + 45 menu text txt !x !y DISPONIBILE UNA NUOVA VERSIONE SUL SITO } ;pulsanti Menu font size 7 set !x_box 2 set !y_box !y_button set !w_box %Menu_Width - 4 set !h_box !y_help - !y_box - 4 set !h_panel !h_box - %menu_nbutton * 17 set !ymtem !ymenupulsanti Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 3 7 1 gray 7 $002222 set %menu_valido_AVVIO #true for !f 2 %menu_nbutton { set !id %BUT_MENU . !f if %menu_valido_ . !id <> #True set %menu_valido_AVVIO #false } for !f 1 %menu_nbutton { if !f = %menu_sel { menu font bgcolor $333333 Menu Font Color white set !y !y_box + ( 17 * ( !f - 1 ) ) menu Button BUT_ATTUALE !x_box !y !w_box 17 %menu_label . !f set !y_panel !y + 17 } else { Menu Font Color yellow set !id %BUT_MENU . !f if %menu_valido_ . !id menu font bgcolor $006600 else menu font bgcolor $000088 if !f > %menu_sel set !y ( ( !y_box + !h_box ) - ( %menu_nbutton * 17 ) ) + ( 17 * ( !f - 1 ) ) if !f < %menu_sel set !y !y_box + ( 17 * ( !f - 1 ) ) menu Button BUT_MENU . !f !x_box !y !w_box 17 %menu_label . !f } } ;HELP set !x_box 2 set !y_box !y_help set !w_box %Menu_Width - 4 set !h_box 50 Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 4 7 1 gray 7 $333333 Menu Shape mnuRect1 !x_box !y_box !w_box 13 4 7 1 gray 7 $550000 set !x !x_box + 6 set !y !y_box + 1 Menu Font Color aqua Menu Font Style b menu text txt !x !y MESSAGGIO set !y !y + 15 set !x !x_box + 5 Menu Font Color silver Menu Font Style b Menu font size 6 menu text txtMenuMex1 !x !y set !y !y + 10 menu text txtMenuMex2 !x !y set !y !y + 10 menu text txtMenuMex3 !x !y ;stato Menu Font Color white Menu Font Style b Menu font size 6 set !x 5 set !y !y_stato menu text txt !x !y AZIONE: set !x 40 Menu Font Color yellow menu text txtAzione !x !y CREA MENU ;area_sottomenu set !x_box 2 set !y_box !y_panel set !w_box %Menu_Width - 4 set !h_box !h_panel - 1 ;Menu Shape mnuRect1 !x_box !y_box !w_box !h_box 3 7 1 gray 7 $666666 set !id %BUT_MENU . %menu_sel set !nomesub Menu_crea_ , !id gosub !nomesub !x_box !y_box !w_box !h_box set #lpc !mc_lpc Return ;sub Menu_crea_box v 1.0 -> p 5(x) -> d 0 sub Menu_crea_box ;%1 %2 %3 %4 x y w h, %5 label set !l_mcb %5 if %0 > 5 { for !vs_for 6 %0 set !l_mcb !l_mcb , #spc , % . !vs_for } menu font size 7 Menu Shape mnuRect1 %1 %2 %3 %4 3 7 1 gray 7 $002222 Menu Shape mnuRect1 %1 %2 %3 13 3 7 1 gray 7 $004444 set !y_mcb %2 + 1 set !x_mcb %1 + 10 menu text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_crea_box_loot_equip v 1.1 -> 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 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 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.0 -> p 6(x) -> d 0 sub Menu_crea_check_box ;%1 %2 %3 %4 x y w h, %5 id , %6 label set !l_mcb %6 if %0 > 6 { for !vs_for 7 %0 set !l_mcb !l_mcb , #spc , % . !vs_for } menu font size 7 Menu Shape mnuRect1 %1 %2 %3 %4 3 7 1 gray 7 $002222 Menu Shape mnuRect1 %1 %2 %3 13 3 7 1 gray 7 $004444 set !y_mcb %2 + 0 set !x_mcb %1 + 10 if % . %5 = N/A set % . %5 #false Menu Check chk . %5 !x_mcb !y_mcb 13 13 % . %5 set !y_mcb %2 + 1 set !x_mcb %1 + 25 menu text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_crea_choise v 1.2 -> 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 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.0 -> 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 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.2 -> p 5(7) -> d 0 sub Menu_crea_linea_chest set !x_linea %1 set !y_linea %2 set !w_linea %3 set !o_linea %4 set !id_linea %5 set !fz 7 set !usabank #False if %0 = 6 && %6 <> BANK set !fz %6 ;size font if %0 = 7 && %7 <> BANK set !fz %7 ;size font if %0 = 6 && %6 = BANK set !usabank #true if %0 = 7 && %7 = BANK set !usabank #true menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 menu text txt !x !y CHEST !id_Linea if !o_linea = #true menu font color yellow set !x !x_linea + 185 menu text txtChest_ . !id_linea !x !y %Chest_ . !id_linea menu font bgcolor $111111 set !fz !fz - 1 menu font size !fz set !xt !x_linea + 10 set !yt !y_linea set !ht !fz + !fz + 1 menu button butChest_ . !id_Linea !xt !yt 22 !ht SET if !usabank = #true { menu font color silver set !xt !x_linea + !w_linea - 32 menu button butBankChest_ . !id_Linea !xt !yt 30 !ht BANK set !x !x_linea + 160 set !y !y_linea + 2 menu font color $00bb00 if %bank_ . !id_linea = #TRUE menu text txtBankChest_ . !id_linea !x !y BANK else menu text txtBankChest_ . !id_linea !x !y #spc } if !o_linea = #false { set !xt !x_linea + !w_linea - 15 menu button butResetChest_ . !id_Linea !xt !yt 13 !ht x } return ;sub Menu_crea_linea_gestione_premio v 1.0 -> p 8(9) -> d 0 sub Menu_crea_linea_gestione_premio set !x_linea %1 ;coordinata x set !y_linea %2 ;coordinata y set !w_linea %3 ;widht set !id_linea %4 ;id per creare la variabile (LPrize_ . %5) set !label_linea %5 ;label text set !fz %6 set !imp_Prize #false if %0 = 7 set !imp_Prize %7 menu font bgcolor $002222 menu font size !fz menu font color silver set !ht !fz + !fz + 1 if %chkLPrize_ . !id_linea = N/A { set %chkLPrize_ . !id_linea #true set !vgvp chkLPrize_ , !id_linea gosub GlobalVar_put %idscript !vgvp } gosub Replace !label_linea _ #spc set !wcheck !w_linea - 62 menu check chkLPrize_ . !id_Linea !x_linea !y_linea !wcheck !ht %chkLPrize_ . !id_linea #strres menu font color white set !xt !x_linea + !wcheck + 1 set !yt !y_linea + 2 if %LPrize_ . !id_linea = N/A menu text txtLPrize_ . !id_linea !xt !yt DEFAULT else menu text txtLPrize_ . !id_linea !xt !yt %LPrize_ . !id_linea menu font color yellow set !yt !y_linea + 4 if %impLPrize_ . !id_linea = N/A set %impPrize_ . !id_linea !imp_Prize if %impLPrize_ . !id_linea menu text txtLPrizeUnder_ . !id_linea !xt !yt _______ else menu text txtLPrizeUnder_ . !id_linea !xt !yt set !xt !x_linea + !w_linea - 17 menu font bgcolor white menu font color black menu button butLPrizeSet_ . !id_Linea !xt !y_linea 9 !ht * set !xt !x_linea + !w_linea - 10 menu button butLPrizeMode_ . !id_Linea !xt !y_linea 10 !ht ! return ;sub Menu_crea_linea_object v 1.1 -> p 8(9) -> d 0 sub Menu_crea_linea_object set !x_linea %1 ;coordinata x set !y_linea %2 ;coordinata y set !w_linea %3 ;widht set !o_linea %4 ;obbligatorietà #true o #false set !id_linea %5 ;id per creare la variabile (OBJ_ . %5) set !label_linea %6 ;label text set !dest_linea %7 ;dove dovrebbe essere set !dest2_linea %8 ;dove dovrebbe essere set !fz 7 if %0 = 9 set !fz %9 ;size font menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 gosub Replace !label_linea _ #spc menu text txt !x !y #strres !id_Linea if !o_linea = #true menu font color yellow set !x !x_linea + 185 menu text txtOBJ_ . !id_linea !x !y %OBJ_ . !id_linea set %OBJDEST_ . !id_linea %7 set %OBJDEST2_ . !id_linea %8 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 butOBJ_ . !id_Linea !xt !yt 22 !ht SET if !o_linea = #false { set !xt !x_linea + !w_linea - 15 menu button butResetOBJ_ . !id_Linea !xt !yt 13 !ht x } return ;sub Menu_crea_linea_position v 1.2 -> p 4(7) -> d 0 sub Menu_crea_linea_position ;%1 %2 %3 dimension, %4 id variabile, %5 text to write, %6 obbligatorio (#true) , %7 font size set !x_linea %1 set !y_linea %2 set !w_linea %3 set !id_linea %4 if %0 < 5 set !text_linea !id_linea else set !text_linea %5 if %0 < 6 set !o_linea #true else set !o_linea %6 if %0 < 7 set !fz 7 else set !fz %7 menu font size !fz menu font color silver set !y !y_linea + 1 set !x !x_linea + 35 menu text txt !x !y POSIZIONE !text_linea (x y z) if !o_linea menu font color yellow else menu font color white set !x !x_linea + 185 menu text txtPosition_ . !id_linea !x !y %posX_ . !id_linea %posY_ . !id_linea %posZ_ . !id_linea menu font bgcolor $111111 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_premio v 1.0 -> p 8(9) -> d 0 sub Menu_crea_linea_premio set !x_linea %1 ;coordinata x set !y_linea %2 ;coordinata y set !w_linea %3 ;widht set !id_linea %4 ;id per creare la variabile (Prize_ . %5) set !label_linea %5 ;label text set !fz %6 set !imp_Prize #false if %0 = 7 set !imp_Prize %7 menu font bgcolor $002222 menu font size !fz menu font color silver set !ht !fz + !fz + 1 if %chkPrize_ . !id_linea = N/A { set %chkPrize_ . !id_linea #true set !vgvp chkPrize_ , !id_linea gosub GlobalVar_put %idscript !vgvp } gosub Replace !label_linea _ #spc set !wcheck !w_linea - 62 menu check chkPrize_ . !id_Linea !x_linea !y_linea !wcheck !ht %chkPrize_ . !id_linea #strres menu font color white set !xt !x_linea + !wcheck + 1 set !yt !y_linea + 2 if %Prize_ . !id_linea = N/A menu text txtPrize_ . !id_linea !xt !yt DEFAULT else menu text txtPrize_ . !id_linea !xt !yt %Prize_ . !id_linea menu font color $00FFFF set !yt !y_linea + 4 if %impPrize_ . !id_linea = N/A set %impPrize_ . !id_linea !imp_Prize if %impPrize_ . !id_linea menu text txtPrizeUnder_ . !id_linea !xt !yt _______ else menu text txtPrizeUnder_ . !id_linea !xt !yt set !xt !x_linea + !w_linea - 17 menu font bgcolor white menu font color black menu button butPrizeSet_ . !id_Linea !xt !y_linea 9 !ht * set !xt !x_linea + !w_linea - 10 menu button butPrizeMode_ . !id_Linea !xt !y_linea 10 !ht ! return ;sub Menu_crea_linea_rune_book v 1.2 -> p 4(7) -> d 0 sub Menu_crea_linea_rune_book set !x_linea %1 set !y_linea %2 set !w_linea %3 set !id_linea %4 if %0 < 5 set !o_linea #true else set !o_linea %5 if %0 < 6 set !fz 7 else set !fz %6 if %0 < 7 set %RBFLAG_ . !id_linea N/A else set %RBFLAG_ . !id_linea %7 menu font color silver menu font size !fz set !yt !y_linea + 1 set !xt !x_linea + 35 menu text txt !xt !yt ID set !xt !x_linea + 107 menu text txt !xt !yt DA RUNA set !xt !x_linea + 178 menu text txt !xt !yt A if !o_linea menu font color yellow else menu font color white set !xt !x_linea + 50 menu text txtRuneBook_ . !id_linea !xt !yt %RB_ . !id_linea menu font bgcolor $111111 set !fz !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.1 -> 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 } 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 mnuRect1 %1 %2 %3 %4 3 7 1 !mctb1_f 7 !mctb1_b Menu Shape mnuRect1 %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 text txt !x_mcb !y_mcb !l_mcb return ;sub Menu_display_box_multi_value v 1.0 -> 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 $004444 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 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.0 -> p 4 -> d Menu_Crea_Box Menu_Crea_Linea_Position Menu_Crea_Linea_Rune_Book Menu_Crea_Choise Menu_Crea_Linea_Chest sub Menu_giro_bod_crea_box set %xboxbod %1 set %yboxbod %2 set %wboxbod %3 set %hboxbod %4 menu font color White if %CHOISE_GIROBOD_ID = SINGOLARE set !idBodscript %idscript , _BOD else set !idBodscript %bodscript if !idBodscript <> %idBodscript { set %idBodscript !idBodscript set %girobod_load_sel N/A } if %sel_menu_giro_bod = N/A set %sel_menu_giro_bod 0 if %girobod_load_sel = N/A { for %c 1 7 { set !nv GiroBod_PG_ , %c gosub GlobalVar_get %idBodscript !nv set !nv GiroBod_CORRECT_ , %c gosub GlobalVar_get %idBodscript !nv } set %girobod_load_sel FATTO } gosub Menu_Giro_Bod_Get_Val %sel_menu_giro_bod set !xp %xboxbod set !yp %yboxbod set !wp %wboxbod set !hp %hboxbod gosub Menu_Crea_Box !xp !yp !wp !hp GIRO BOD for !c 0 7 { menu font size 6 menu font color Silver set !x !wp - 102 + !c * 12 set !y !yp if %GiroBod_CORRECT_ . !c menu font bgcolor $00AA00 else menu font bgcolor $0000AA menu button butGiroBod_PG_ . !c !x !y 13 13 !c menu font bgcolor $002222 if !c > 0 { set !y !y - 5 set !x !x + 2 menu font size 13 if %GiroBod_PG_ . !c = #True menu font color $00FF00 else menu font color RED menu text txtGiroBod_PG_ . !c !x !y _ } } menu font size 6 menu font color BLACK menu font bgcolor SILVER set !x !wp - 102 + 8 * 12 set !y !yp menu button butGiroBod_PG_8 !x !y 13 13 I menu font bgcolor $002222 if %sel_menu_giro_bod > 7 { menu font color Silver menu font size 6 set !x !xp set !y !yp + 30 set !t AMBITO , #spc , DEI , #spc , VALORI gosub Menu_Crea_Choise !x !y !w #false GIROBOD_ID CONDIVISO_SINGOLARE CONDIVISO !t 6 set !x !xp set !y !yp + 60 set !t SCRIPT , #spc , DA , #spc , RICHIAMARE gosub Menu_Crea_Choise !x !y !w #false GIROBOD_SCRIPT INTERNO_FILE INTERNO !t 6 ;menu text txt !x !y SCRIPT DA RICHIAMARE menu font color Silver set !x !xp + 10 set !y !y + 20 menu text txt !x !y FILENAME set !x !xp + 60 set !y !y - 4 menu edit edtGiroBod_Script !x !y 165 %GiroBod_FileScript return } menu font color Silver menu font size 5 set !x !wp - 117 set !y !yp + 2 menu text txt !x !y PG set !y !y + 17 menu font size 6 set !x !xp + 5 menu font color Silver menu text txt !x !y PG menu font color White set !x !xp + 20 if %sel_menu_giro_bod = 0 { menu text txt !x !y DEFAULT } else { menu text txt !x !y %sel_menu_giro_bod set !x !x + 8 set !y !y - 3 menu font size 5 if %GiroBod_PG_ . %sel_menu_giro_bod = #True { menu font color $00FF00 menu button butGiroBod_SEL !x !y 20 14 ON } else { menu font color RED menu button butGiroBod_SEL !x !y 20 14 OFF } menu font color Silver if ! %giro_bod_DEFAULT { set !x !xp + !wp - 40 menu button butGiroBod_DEFAULT !x !y 40 14 DEFAULT } else { set !x !xp + !wp - 40 menu button butGiroBod_DEFAULT !x !y 40 14 EDITA } set !y !y + 3 } if %giro_bod_DEFAULT = #false || %sel_menu_giro_bod = 0 { menu font size 6 menu font color Silver set !x !xp + 60 set !y !yp + 19 menu text txt !x !y MODE set !y !y - 3 set !x !x + 27 menu font color White menu font size 5 if %GiroBod_RAIL = N/A set %GiroBod_RAIL #false if %GiroBod_RAIL = #True { set %girobod_check_get_edit_field_rune #false menu button butGiroBod_RAIL !x !y 45 14 RAIL set !y !y + 18 set !x !xp + 5 set !w !wb - 20 set !x !xb + 5 ;gosub Menu_Crea_Linea_Position !x !y !w RESTOCK_BOD LOGOUT_RESTOCK #false 6 ;set !x !xb + 5 ;set !y !y + 15 ;set !t BOD , #spc , DA , #spc , PRENDERE ;gosub Menu_Crea_Choise !x !y !w #false GET_BOD BOTH_BLACKSMITH_TAILOR BOTH !t 6 menu font size 8 set !x !xb + 75 set !y !y + 50 menu font color Red menu text txt !x !y RAIL NON IMPLEMENTATA } else { set %GiroBod_RAIL #FALSE set %girobod_check_get_edit_field_rune #true menu button butGiroBod_RAIL !x !y 45 14 RUNEBOOK if %sel_menu_giro_bod = 0 { set !y !y + 18 set !x !xp + 5 set !w !wb - 20 menu font size 6 menu text txt !x !y DATI RUNEBOOK PUNTO LOGOUT/RESTOCK: menu font size 5 set !y !y + 12 set !x !xp + 10 if %RB_LOGOUT = N/A set %RB_LOGOUT CASA if %firstrune_LOGOUT = N/A set %firstrune_LOGOUT 0 if %lastrune_LOGOUT = N/A set %lastrune_LOGOUT 0 menu edit edtRB_LOGOUT !x !y 30 %RB_LOGOUT set !x !xp + 158 menu edit edtFirstRune_LOGOUT !x !y 16 %firstrune_LOGOUT set !x !xp + 190 menu edit edtLastRune_LOGOUT !x !y 16 %lastrune_LOGOUT set !x !xp + 42 set !y !y + 2 menu font color Silver menu font size 6 menu text txt !x !y NEL NOME, USA RUNE DA set !x !xp + 178 menu text txt !x !y A } else { set !y !y + 18 set !x !xp + 5 set !w !wb - 20 menu font size 6 menu text txt !x !y DATI RUNEBOOK PUNTO LOGOUT/RESTOCK: set !y !y + 13 set !x !xp set !w !wb - 20 gosub Menu_Crea_Linea_Rune_Book !x !y !w LOGOUT #false 6 } set !y !y + 15 set !x !xp set !w !wb - 20 gosub Menu_Crea_Linea_Position !x !y !w RESTOCK_BOD LOGOUT_RSTOCK #false 6 set !x !xp set !y !y + 15 set !t BOD , #spc , DA , #spc , PRENDERE gosub Menu_Crea_Choise !x !y !w #false GET_BOD BOTH_BLACKSMITH_TAILOR BOTH !t 6 menu font color White set !x !xp + 5 set !y !y + 15 menu text txt !x !y DATI RUNEBOOK BLACKSMITH: set !x !xp set !y !y + 13 if %sel_menu_giro_bod = 0 gosub Menu_Crea_Linea_Rune_Book !x !y !w BLACKSMITH #false 6 GROUND else gosub Menu_Crea_Linea_Rune_Book !x !y !w BLACKSMITH #false 6 ANYWHERE set !x !xp + 5 set !y !y + 17 menu text txt !x !y DATI RUNEBOOK TAILOR: set !x !xp set !y !y + 13 if %sel_menu_giro_bod = 0 gosub Menu_Crea_Linea_Rune_Book !x !y !w TAILOR #false 6 GROUND else gosub Menu_Crea_Linea_Rune_Book !x !y !w TAILOR #false 6 ANYWHERE set !x !xp + 5 set !y !y + 17 menu text txt !x !y DESTINAZIONE BOD: set !y !y + 1 set !x !xp + 100 menu font color silver menu font size 5 menu text txt !x !y SE N/A I BOD SARANNO LASCIATI NEL BACKPACK set !x !xp set !y !y + 12 gosub Menu_Crea_Linea_Chest !x !y !w #False BOD 6 ;gosub Menu_Crea_Box !x !y !w 20 RUNEBOOK } } else { menu font size 6 menu font color Silver set !x !xp + 60 set !y !yp + 19 menu text txt !x !y VALORI DI DEFAULT menu font size 6 set !x !xp + 6 set !y !y + 19 menu text txt !x !y CLICCA 'EDITA' PER PERSONALIZZARE IL GIRO DI QUESTO PG set !y !y + 9 menu text txt !x !y CLICCA '0' PER EDITARE I VALORI DI DEFAULT } ;gosub Menu_Crea_Choise !x !y !w #True GiroBod_MODE RUNEBOOK_RAIL RUNEBOOK MODALITA return ;sub Menu_giro_bod_get_val v 1.0 -> p 0 -> d 0 sub Menu_giro_bod_get_val set %pgsel %1 if %pgsel > 7 { gosub GlobalVar_get %idBodscript GiroBod_FileScript return } set !nv GiroBod_VAL_ , %pgsel gosub GlobalVar_get %idBodscript !nv if % . !nv = N/A { set %giro_bod_DEFAULT #True } else { gosub Split_to_array % . !nv _ array set %GiroBod_RAIL %array1 set %posX_RESTOCK_BOD %array2 set %posY_RESTOCK_BOD %array3 set %posZ_RESTOCK_BOD %array4 set %Chest_Bod %array5 set %CHOISE_GET_BOD %array6 set %RB_BLACKSMITH %array7 set %firstrune_BLACKSMITH %array8 set %lastrune_BLACKSMITH %array9 set %RB_TAILOR %array10 set %firstrune_TAILOR %array11 set %lastrune_TAILOR %array12 set %giro_bod_DEFAULT %array13 set %RB_LOGOUT %array14 set %firstrune_LOGOUT %array15 set %lastrune_LOGOUT %array16 } if %giro_bod_DEFAULT = N/A set %giro_bod_DEFAULT #true return ;sub Menu_giro_bod_loop v 1.0 -> p 0 -> d Menu_Crea Menu_Giro_Bod_Validate_Box sub Menu_giro_bod_loop if butGiroBod_PG_ in #menubutton { gosub Split #menubutton butGiroBod_PG_ set %id_object %strright gosub Menu_Giro_Bod_Validate_Box set %sel_menu_giro_bod %id_object gosub Menu_Crea set #MENUBUTTON N/A return #true } if #menubutton = butGiroBod_SEL { if %GiroBod_PG_ . %sel_menu_giro_bod = #true set %GiroBod_PG_ . %sel_menu_giro_bod #False else set %GiroBod_PG_ . %sel_menu_giro_bod #True ;gosub Menu_Giro_Bod_Validate_Box set !nv GiroBod_PG_ , %sel_menu_giro_bod gosub GlobalVar_put %idBodscript !nv gosub Menu_Crea set #MENUBUTTON N/A return #true } if #menubutton = butGiroBod_RAIL { if %GiroBod_RAIL = #true set %GiroBod_RAIL #False else set %GiroBod_RAIL #true gosub Menu_Giro_Bod_Validate_Box gosub Menu_Crea set #MENUBUTTON N/A return #true } if #menubutton = butGiroBod_DEFAULT { if %giro_bod_DEFAULT = #true set %giro_bod_DEFAULT #False else set %giro_bod_DEFAULT #true gosub Menu_Giro_Bod_Validate_Box gosub Menu_Crea set #MENUBUTTON N/A return #true } return #false ;sub Menu_giro_bod_validate_all v 1.0 -> p 0 -> d 0 sub Menu_giro_bod_validate_all set !is_valid #true set !almeno_uno #false for !c 0 7 { if %GiroBod_PG_ . !c set !almeno_uno #True } if !almeno_uno = #false set !is_valid #false if %CHOISE_GIROBOD_SCRIPT = INTERNO { if %GiroBod_CORRECT_0 = #false set !is_valid #false for !c 0 7 { if %GiroBod_PG_ . !c && %GiroBod_CORRECT_ . !c = #false set !is_valid #false } } set %girobod_valido !is_valid gosub GlobalVar_put %idscript girobod_valido return ;sub Menu_giro_bod_validate_box v 1.1 -> 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 } set !v %GiroBod_RAIL , _ set !v !v , %posX_RESTOCK_BOD , _ set !v !v , %posY_RESTOCK_BOD , _ set !v !v , %posZ_RESTOCK_BOD , _ set !v !v , %Chest_Bod , _ set !v !v , %CHOISE_GET_BOD , _ set !v !v , %RB_BLACKSMITH , _ if %girobod_check_get_edit_field_rune { menu getnum edtfirstrune_BLACKSMITH if #menures > 0 && #menures < 17 set %firstrune_BLACKSMITH #menures else set %firstrune_BLACKSMITH 0 menu getnum edtlastrune_BLACKSMITH if #menures > 0 && #menures < 17 set %lastrune_BLACKSMITH #menures else set %lastrune_BLACKSMITH 0 menu getnum edtfirstrune_TAILOR if #menures > 0 && #menures < 17 set %firstrune_TAILOR #MenuRes else set %firstrune_TAILOR 0 menu getnum edtlastrune_TAILOR if #menures > 0 && #menures < 17 set %lastrune_TAILOR #MenuRes else set %lastrune_TAILOR 0 menu getnum edtfirstrune_LOGOUT if #menures > 0 && #menures < 17 set %firstrune_LOGOUT #menures else set %firstrune_LOGOUT 0 menu getnum edtlastrune_LOGOUT if #menures > 0 && #menures < 17 set %lastrune_LOGOUT #menures else set %lastrune_LOGOUT 0 } set !v !v , %firstrune_BLACKSMITH , _ set !v !v , %lastrune_BLACKSMITH , _ set !v !v , %RB_TAILOR , _ set !v !v , %firstrune_TAILOR , _ set !v !v , %lastrune_TAILOR , _ set !v !v , %giro_bod_DEFAULT , _ if %sel_menu_giro_bod = 0 { menu get edtRB_LOGOUT gosub Replace #menures _ set !v !v , #strres , _ } else { set !v !v , %RB_LOGOUT , _ } set !v !v , %firstrune_LOGOUT , _ set !v !v , %lastrune_LOGOUT set %GiroBod_VAL_ . %sel_menu_giro_bod !v set !nv GiroBod_VAL_ , %sel_menu_giro_bod gosub GlobalVar_put %idBodscript !nv if %giro_bod_DEFAULT && %sel_menu_giro_bod <> 0 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #true goto exit_validate_giro_bod } if %posX_RESTOCK_BOD = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } if %GiroBod_RAIL = #False { if %CHOISE_GET_BOD = BOTH || %CHOISE_GET_BOD = BLACKSMITH { If %RB_BLACKSMITH = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %firstrune_BLACKSMITH < 1 || %firstrune_BLACKSMITH > 16 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %lastrune_BLACKSMITH < 1 || %lastrune_BLACKSMITH > 16 || %firstrune_BLACKSMITH > %lastrune_BLACKSMITH { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } } if %CHOISE_GET_BOD = BOTH || %CHOISE_GET_BOD = TAILOR { If %RB_TAILOR = N/A { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %firstrune_TAILOR < 1 || %firstrune_TAILOR > 16 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %lastrune_TAILOR < 1 || %lastrune_TAILOR > 16 || %firstrune_TAILOR > %lastrune_TAILOR { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %firstrune_LOGOUT < 1 || %firstrune_LOGOUT > 16 { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } If %lastrune_LOGOUT < 1 || %lastrune_LOGOUT > 16 || %firstrune_LOGOUT > %lastrune_LOGOUT { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } } } else { set %GiroBod_CORRECT_ . %sel_menu_giro_bod #false goto exit_validate_giro_bod } set %GiroBod_CORRECT_ . %sel_menu_giro_bod #true exit_validate_giro_bod: set !nv GiroBod_CORRECT_ , %sel_menu_giro_bod gosub GlobalVar_put %idBodscript !nv return ;sub Menu_init v 1.0 -> p 0 -> d 0 sub Menu_init set %menu_sel 1 set %menu_lastsel 1 set %menu_nButton 0 set %menu_col_i 51 set %menu_col_ko 33 set %menu_col_ok 58 gosub Menu_Add_Menu AVVIO AVVIO return ;sub Menu_modal_message v 1.1 -> p 0 -> d 0 sub Menu_modal_message set !title %1 set !text %2 set !type %3 set !w_menu %w_menu if %w_menu_tot <> N/A && %w_menu_tot > !w_menu set !w_menu %w_menu_tot set !oldalarm_lpc #lpc set #lpc 1000 gosub replace !title _ #spc set !title #strres gosub split_to_Array !text $ mmm_text set !mmm_len #result Menu Font Name tahoma menu Font Transparent #true Menu Font Style b set !alarm_wb 190 set !alarm_hb 75 + !mmm_len * 7 set !alarm_xb ( !w_menu - !alarm_wb ) / 2 set !alarm_yb ( %h_menu - !alarm_hb ) / 2 Menu Shape alarm_R0 1 1 !w_menu %h_menu 3 7 2 gray 4 $555555 Menu Shape alarm_R1 !alarm_xb !alarm_yb !alarm_wb !alarm_hb 3 7 2 red 7 $000033 Menu Shape alarm_R2 !alarm_xb !alarm_yb !alarm_wb 25 3 7 2 red 7 $000055 set %alarm_control |alarm_R1|alarm_R2| set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_yb + 5 Menu font size 10 Menu Font Color yellow menu text alarm_TITLE !alarm_x !alarm_y !title set %alarm_control %alarm_control , alarm_TITLE| Menu font size 8 Menu Font Color white set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_yb + 30 for !i 1 !mmm_len { menu text alarm_TEXT . !i !alarm_x !alarm_y %mmm_text . !i set %alarm_control %alarm_control , alarm_TEXT , !i , | if !i = 1 { Menu font size 6 Menu Font Color silver set !alarm_y !alarm_y + 5 } set !alarm_y !alarm_y + 7 } if !type = MODE1 { Menu font size 6 Menu Font Color silver Menu Font bgcolor purple set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_y + 2 set %alarm_b1 IGNORA_ORA set %alarm_b2 IGNORA_SEMPRE set %alarm_b3 CONTINUA menu button alarm_B1 !alarm_x !alarm_y 90 15 IGNORA ORA set !alarm_x !alarm_xb + 95 menu button alarm_B2 !alarm_x !alarm_y 90 15 IGNORA SEMPRE Menu Font bgcolor black set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_y + 15 menu button alarm_B3 !alarm_x !alarm_y 180 15 CONTINUA E NON IGNORARE set %alarm_control %alarm_control , alarm_B1|alarm_B2|alarm_B3| } if !type = MODE2 { Menu font size 6 Menu Font Color silver set %alarm_b1 CONTINUA Menu Font bgcolor black set !alarm_x !alarm_xb + 5 set !alarm_y !alarm_y + 15 menu button alarm_B1 !alarm_x !alarm_y 180 15 CONTINUA set %alarm_control %alarm_control , alarm_B1| } set %alarm_control %alarm_control , |alarm_R0 gosub alarm_menu_loop set !v_return #result gosub split_to_Array %alarm_control | object for !i 1 #result { menu delete %object . !i } set #lpc !oldalarm_lpc return !v_return ;sub Menu_set_bag v 1.0 -> p 1 -> d Set_Menu_Mex targetta_oggetto sub Menu_set_bag set !pID %1 set !pCont %2 set !pNameCont %3 event exmsg #charid 3 %menu_col_i Targhetta un Sacchetto per !pID if !pCont = #backpackid gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVE ESSERE NELLO ZAINO $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE else gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVE ESSERE NEL CONTENITORE !pNameCont $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid C_ , !pCont if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! } else { return !oggid } return N/A } return N/A ;sub Menu_set_bank_chest v 1.0 -> p 1 -> d antiblock sub Menu_set_bank_chest set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 msg BANK BANK $ gosub antiblock gosub wait_gump container_gump 5 if #CONTNAME = container_gump && #CONTTYPE = IKF { return #CONTID } return N/A ;sub Menu_set_chest v 1.1 -> p 1 -> d Set_Menu_Mex targetta_oggetto sub Menu_set_chest set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 event exmsg #charid 3 %menu_col_i Targhetta Chest !pID if !pWHERE = C { if !p3 = #backpackid gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVE ESSERE NELLO ZAINO $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE else gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVE ESSERE NEL CONTENITORE %4 $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE } if !pWHERE = G { gosub Set_Menu_Mex CLICCA SU UN CONTENITORE $ DEVI ESSERE NELLA POSIZIONE %4 $ NB: LO SCRIPT NON FA NESSUN CONTROLLO SUL CONTENITORE } gosub targetta_oggetto set !oggid #result if !oggid <> N/A { if !pWHERE = C { finditem !oggid C_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! } else { return !oggid } return N/A } if !pWHERE = G { finditem !oggid G_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere a terra nel range di !p3 tile. } else { return !oggid } return N/A } } return N/A ;sub Menu_set_intestazione v 1.0 -> p 4 -> d Replace sub Menu_set_intestazione set %Menu_Title %1 ;Titolo script set %Menu_SubTitle %2 ;Sottotitolo set %Menu_Owner %3 ;Scripter set %Menu_Version %4 ;Versione Script gosub Replace %Menu_Title _ #spc set %Menu_Title #strRes gosub Replace %Menu_SubTitle _ #spc set %Menu_SubTitle #strRes gosub Replace %Menu_Owner _ #spc set %Menu_Owner #strRes Return ;sub Menu_set_object v 1.1 -> p 1 -> d 0 sub Menu_set_object set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 event exmsg #charid 3 %menu_col_i Targhetta Object !pID if !pWHERE = C { if !p3 = #backpackid gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVE ESSERE NELLO ZAINO else gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVE ESSERE NEL CONTENITORE %4 } if !pWHERE = D { gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVE ESSERE NELLO ZAINO O INDOSSATO } if !pWHERE = G { gosub Set_Menu_Mex CLICCA SU UN OGGETTO $ DEVI ESSERE NELLA POSIZIONE %4 } if !pWHERE = A { gosub Set_Menu_Mex CLICCA SU UN OGGETTO } gosub targetta_oggetto set !oggid #result if !oggid <> N/A { if !pWHERE = A { finditem !oggid return !oggid } if !pWHERE = C { finditem !oggid C_ , !p3 if #findkind = -1 event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! else return !oggid return N/A } if !pWHERE = D { finditem !oggid C_ , #backpackid if #findkind = -1 { finditem !oggid C_ , #charid if #findkind = -1 event exmsg #charid 3 %menu_col_ko Deve essere o nello Zaino o indossato else return !oggid } else return !oggid return N/A } if !pWHERE = G { finditem !oggid G_ , !p3 if #findkind = -1 event exmsg #charid 3 %menu_col_ko Deve essere a terra nel range di !p3 tile. else return !oggid return N/A } } return N/A ;sub Menu_set_runebook v 1.1 -> p 1 -> d 0 sub Menu_set_runebook set !pID %1 set !pWHERE %2 set !p3 %3 set !p4 %4 if GROUND in %RBFLAG_ . !pid { set !pWHERE G set !p3 2 } if BACKPACK in %RBFLAG_ . !pid { set !pWHERE C set !p3 #BACKPACKID } if ANYWHERE in %RBFLAG_ . !pid { set !pWHERE A } event exmsg #charid 3 %menu_col_i Targhetta Runebook !pID if !pWHERE = C { if !p3 = #backpackid gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK $ DEVE ESSERE NELLO ZAINO else gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK $ DEVE ESSERE NEL CONTENITORE %4 } if !pWHERE = G { gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK $ DEVI ESSERE NELLA POSIZIONE %4 } if !pWHERE = A { gosub Set_Menu_Mex CLICCA SU UN RUNEBOOK } gosub targetta_oggetto set !oggid #result if !oggid <> N/A { event property !oggid if runebook notin #property { event exmsg #charid 3 %menu_col_ko Non sembra un RuneBook! return N/A } if !pWHERE = A { return !oggid } if !pWHERE = C { finditem !oggid C_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere nel Contenitore specificato! } else { return !oggid } return N/A } if !pWHERE = G { finditem !oggid G_ , !p3 if #findkind = -1 { event exmsg #charid 3 %menu_col_ko Deve essere a terra nel range di !p3 tile. } else { return !oggid } return N/A } } return N/A ;sub Menu_set_size v 1.0 -> p 2 -> d 0 sub Menu_set_size set %Menu_Width %1 ;width set %Menu_Height %2 ;height Return ;sub Menu_validate_extra v 1.0 -> p 0 -> d GlobalVar_put Menu_Giro_Bod_Validate_Box Menu_Giro_Bod_Validate_ALL Menu_Alarm_Validate sub Menu_validate_extra set %menu_valido_extra #true gosub GlobalVar_put %idscript menu_valido_EXTRA gosub Menu_Giro_Bod_Validate_Box gosub Menu_Giro_Bod_Validate_ALL gosub Menu_Alarm_Validate return ;sub Menu_validate_rune_book v 1.0 -> p 1 -> d GlobalVar_put sub Menu_validate_rune_book set !nome_rune_book %1 set !response #true If %RB_ . !nome_rune_book = N/A set !response #false menu getnum edtfirstrune_ . !nome_rune_book if #menures > 0 && #menures < 17 set !val #MenuRes else set !val 0 if !val <> %firstrune_ . !nome_rune_book { set !nome_var firstrune_ , !nome_rune_book set % . !nome_var !val gosub GlobalVar_put %idscript !nome_var } menu getnum edtlastrune_ . !nome_rune_book if #menures > 0 && #menures < 17 set !val #MenuRes else set !val 0 if !val <> %lastrune_ . !nome_rune_book { set !nome_var lastrune_ , !nome_rune_book set % . !nome_var !val gosub GlobalVar_put %idscript !nome_var } If %firstrune_ . !nome_rune_book < 1 || %firstrune_ . !nome_rune_book > 16 set !response #false If %lastrune_ . !nome_rune_book < 1 || %lastrune_ . !nome_rune_book > 16 || %firstrune_ . !nome_rune_book > %lastrune_ . !nome_rune_book set !response #false return !response ;sub Open_container v 1.4 -> 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 { set #NEXTCPOSX %3 set #NEXTCPOSY %4 set !posx %3 set !posy %4 set !move #true } set !oc_dove g_2 if %0 = 5 && %5 = #false set !oc_dove #spc else set !oc_dove %5 if #contID = !Contenitore_oc return #true oc_find_contenitore: finditem !Contenitore_oc !oc_dove if #findkind = -1 return #false set !prove 0 oc_open_contenitore: if !prove > !tentativi_max_oc return #false set !prove !prove + 1 set #LOBJECTID !Contenitore_oc event macro 17 0 wait 30 gosub antiblock if #contID <> !Contenitore_oc goto oc_open_contenitore if !move { set #contposx !posx set #contposy !posy } return #true ;sub Pathfind v 2.3 -> p 3(4) -> d AntiBlock sub Pathfind set !pf_vx %1 set !pf_vy %2 set !pf_vz %3 if %0 = 4 set !pf_max_try %4 else set !pf_max_try 10 set !pf_inizioj #JINDEX + 1 set !pf_try 0 if #CHARPOSX = !pf_vx && #CHARPOSY = !pf_vy { goto pf_fattopathfind } pf_riprovapathfind: if !pf_try > !pf_max_try { return #false } event PathFind !pf_vx !pf_vy !pf_vz set !pf_error #scnt + 1 pf_attendipathfind: for !pf_scjvai !pf_inizioj #JINDEX { scanjournal !pf_scjvai if Can't_get_there in #journal || That_location_is_blocked in #journal { DELETEJOURNAL return #false } } if #CHARPOSX = !pf_vx && #CHARPOSY = !pf_vy { goto pf_fattopathfind } if #scnt > !pf_error { gosub AntiBlock NO_ALARM_EVENT set !pf_try !pf_try + 1 goto pf_riprovapathfind } goto pf_attendipathfind pf_fattopathfind: return #true ;sub 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 Readchar v 1.0 -> p 4 -> d sub Readchar ;this sub is made by Kal In Ex mod By Pepito ;%1 position X, %2 position Y, %3 IN or NOTIN, %4 color check (es 16777215) set %4 _ , %4 , _ set %7 %2 + 5 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 256 set %7 %2 + 13 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 136 set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 98 set %7 %2 + 3 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 2 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 4 return [ set %7 %2 + 15 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 2 return | set %1 4 return ( set %6 %1 + 2 set %7 %2 + 4 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 37 set %6 %1 + 2 set %7 %2 + 8 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 14 set %6 %1 + 2 set %7 %2 + 13 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 4 set %7 %2 + 5 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return B set %1 7 return E set %1 7 return F set %6 %1 + 2 set %7 %2 + 9 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 2 set %7 %2 + 10 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return R set %1 8 return P set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return D set %1 10 return % set %6 %1 + 2 set %7 %2 + 8 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 19 set %6 %1 + 2 set %7 %2 + 6 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return N set %1 8 return X set %6 %1 + 2 set %7 %2 + 9 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return K set %1 8 return H set %7 %2 + 11 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 14 set %6 %1 + 2 set %7 %2 + 5 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 10 return M set %6 %1 + 2 set %7 %2 + 13 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 7 return L set %1 3 return I set %1 3 return ! set %6 %1 + 2 set %7 %2 + 11 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 8 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return k set %1 8 return 2 set %1 8 return > set %6 %1 + 2 set %7 %2 + 8 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 2 set %7 %2 + 13 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return b set %1 6 return h set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 3 return l set %1 3 return i set %7 %2 + 11 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 53 set %6 %1 + 3 set %7 %2 + 8 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 22 set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return 5 set %7 %2 + 8 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return G set %1 8 return S set %7 %2 + 10 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return 8 set %1 8 return 3 set %6 %1 + 4 set %7 %2 + 5 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 16 set %6 %1 + 3 set %7 %2 + 9 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 9 return Q set %6 %1 + 5 set %7 %2 + 8 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 4 set %1 8 if %0 = 5 && %5 = number return 0 return O set %1 8 return C set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return U set %1 8 return 6 set %6 %1 + 2 set %7 %2 + 9 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 28 set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 13 set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 6 set %7 %2 + 4 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return V set %1 12 return W set %1 9 return Y set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return 9 set %1 7 return ? set %1 4 return 1 set %6 %1 + 1 set %7 %2 + 6 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return 4 set %1 3 return ' set %1 9 return \ set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 1 set %7 %2 + 4 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 3 return ` set %1 4 return " set %1 8 return 7 set %7 %2 + 9 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 124 set %6 %1 + 4 set %7 %2 + 13 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 61 set %7 %2 + 8 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 28 set %7 %2 + 12 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 13 set %7 %2 + 13 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 5 set %7 %2 + 8 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 9 return m set %1 6 return n set %1 6 return y set %7 %2 + 7 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 12 return @ set %7 %2 + 10 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return w set %1 6 return x set %6 %1 + 2 set %7 %2 + 11 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 10 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return e set %1 8 return < set %6 %1 + 3 set %7 %2 + 14 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 15 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return g set %1 6 return q set %6 %1 + 3 set %7 %2 + 5 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return d set %1 6 return a set %7 %2 + 12 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 28 set %7 %2 + 13 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return A set %7 %2 + 14 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return p set %1 6 return r set %7 %2 + 8 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return u set %6 %1 + 3 set %7 %2 + 11 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return o set %1 6 return c set %7 %2 + 8 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 10 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 11 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return v set %1 10 return ^ set %1 7 return + set %7 %2 + 10 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return s set %6 %1 + 1 set %7 %2 + 4 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 5 return { set %1 6 return - set %6 %1 + 1 set %7 %2 + 13 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 55 set %7 %2 + 13 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 24 set %6 %1 + 1 set %7 %2 + 11 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 7 set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return Z set %1 6 return z set %7 %2 + 12 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 8 set %6 %1 + 1 set %7 %2 + 14 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 3 return , set %1 3 return #dot set %1 6 return j set %7 %2 + 11 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 13 set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 3 return #smc set %6 %1 + 1 set %7 %2 + 5 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 11 return & set %1 8 return J set %7 %2 + 2 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 4 return ) set %7 %2 + 3 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 5 return } set %1 6 return f set %6 %1 + 2 set %7 %2 + 9 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 28 set %6 %1 + 1 set %7 %2 + 10 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 8 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return t set %7 %2 + 10 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 12 return # set %1 9 return / set %7 %2 + 2 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 5 return ] set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 7 return T set %1 9 return $ set %6 %1 + 1 set %7 %2 + 11 savepix %6 %7 1 if _ , #pixcol , _ %3 %4 12 set %7 %2 + 4 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 10 return * set %7 %2 + 6 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 3 return : set %1 6 return = set %7 %2 + 1 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 6 return ~ set %7 %2 + 15 savepix %1 %7 1 if _ , #pixcol , _ %3 %4 2 set %1 8 return _ set %1 8 return #spc ;sub Bodbook_getBodfromIndex v 1.0 -> p 1 -> d readchar sub Bodbook_getBodfromIndex ;this sub is made by Kal In Ex mod By Pepito set !riga %1 set !countposX %2 set !countposY %3 set !ypos !countposY + 64 + ( 32 * !riga ) set !item N/A set !xpos !countposX + 103 gosub Readchar !xpos !ypos in %menuTextColor if #result notin abcdefhjklmnprstvw return #false if #result = a set !item axe if #result = b { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin aoru return #false if #result = a { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin nrst return #false if #result = n set !item bandana if #result = r set !item bardiche if #result = s set !item bascinet if #result = t set !item battle , #spc , axe set #result n/a } if #result = o { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin dno return #false if #result = d set !item body , #spc , sash if #result = n { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin en return #false if #result = e { set !xpos !xpos + %1 + 8 ; ' ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin aghl return #false if #result = a { set !xpos !xpos + %1 + 6 + 9 ; 'rm' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin os return #false if #result = o set !item bone , #spc , armor if #result = s set !item bone , #spc , arms set #result n/a } if #result = g set !item bone , #spc , gloves if #result = h set !item bone , #spc , helmet if #result = l set !item bone , #spc , leggings set #result n/a } if #result = n set !item bonnet set #result n/a } if #result = o set !item boots set #result n/a } if #result = r { set !xpos !xpos + %1 + 6 ; 'o' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin an return #false if #result = a set !item broadsword if #result = n set !item bronze , #spc , shield set #result n/a } if #result = u set !item buckler , #spc set #result n/a } if #result = c { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin ahlu return #false if #result = a set !item cap if #result = h { set !xpos !xpos + %1 + 6 + 3 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ainmail ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin #spc , ltc return #false if #result = #spc || #result = c set !item chainmail , #spc , coif if #result = l set !item chainmail , #spc , leggings if #result = t set !item chainmail , #spc , tunic set #result n/a } if #result = l { set !xpos !xpos + %1 + 6 ; 'o' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin as return #false if #result = a set !item cloak if #result = s set !item close , #spc , helmet set #result n/a } if #result = u set !item cutlass set #result n/a } if #result = d { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin ao return #false if #result = a set !item dagger if #result = o { set !xpos !xpos + %1 + 6 + 6 + 3 + 6 ; 'uble' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin #spc , t return #false if #result = #spc set !item double , #spc , axe if #result = t set !item doublet set #result n/a } set #result n/a } if #result = e set !item executioner's , #spc , axe if #result = f { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin aelu return #false if #result = a { set !xpos !xpos + %1 + 6 + 6 + 6 + 8 ; 'ncy ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin ds return #false if #result = d set !item fancy , #spc , dress if #result = s set !item fancy , #spc , shirt set #result n/a } if #result = e { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin am return #false if #result = a set !item feathered , #spc , hat if #result = m { set !xpos !xpos + %1 + 6 + 3 + 6 + 8 ; 'ale ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin lp return #false if #result = l set !item female , #spc , leather , #spc , armor if #result = p set !item female , #spc , plate set #result n/a } set #result n/a } if #result = l set !item floppy , #spc , hat if #result = u set !item full , #spc , apron set #result n/a } if #result = h { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin lm return #false if #result = l { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin bf return #false if #result = b set !item halberd if #result = f set !item half , #spc , apron set #result n/a } if #result = m set !item hammer , #spc , pick set #result n/a } if #result = e { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin al return #false if #result = a set !item heater , #spc , shield if #result = l set !item helmet set #result n/a } set #result n/a } if #result = j { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ester ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin hs return #false if #result = h set !item jester , #spc , hat if #result = s set !item jester , #spc , suit set #result n/a } if #result = k { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin air return #false if #result = a set !item katana if #result = i set !item kilt if #result = r set !item kryss set #result n/a } if #result = l { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin aeo return #false if #result = a set !item large , #spc , battle , #spc , axe if #result = e { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 6 + 8 ; 'ather ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin abcglst return #false if #result = a set !item leather , #spc , armor if #result = b set !item leather , #spc , bustier if #result = c set !item leather , #spc , cap if #result = g { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item leather , #spc , gloves if #result = o set !item leather , #spc , gorget set #result n/a } if #result = l set !item leather , #spc , leggings if #result = s { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin hkl return #false if #result = h set !item leather , #spc , shorts if #result = k set !item leather , #spc , skirt if #result = l set !item leather , #spc , sleeves set #result n/a } if #result = t set !item leather , #spc , tunic set #result n/a } if #result = o { set !xpos !xpos + %1 + 6 + 6 ; 'ng' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin #spc , s return #false if #result = #spc set !item long , #spc , pants if #result = s set !item longsword set #result n/a } } if #result = m { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin ae return #false if #result = a { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin cu return #false if #result = c set !item mace if #result = u set !item maul set #result n/a } if #result = e { set !xpos !xpos + %1 + 6 + 6 + 3 + 8 ; 'tal ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin ks return #false if #result = k set !item metal , #spc , kite , #spc , shield if #result = s set !item metal , #spc , shield set #result n/a } set #result n/a } if #result = n set !item norse , #spc , helm if #result = p { set !xpos !xpos + %1 + 3 + 6 ; 'la" is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin it return #false if #result = i set !item plain , #spc , dress if #result = t { set !xpos !xpos + %1 + 6 ; 'e' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin #spc , m return #false if #result = #spc set !item plate , #spc , helm if #result = m { set !xpos !xpos + %1 + 6 + 3 + 3 + 8 ; 'ail ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin aglt return #false if #result = a set !item platemail , #spc , arms if #result = g { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item platemail , #spc , gloves if #result = o set !item platemail , #spc , gorget set #result n/a } if #result = l set !item platemail , #spc , legs if #result = t set !item platemail , #spc , tunic set #result n/a } set #result n/a } set #result n/a } if #result = r { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i { set !xpos !xpos + %1 + 6 + 6 + 9 + 6 + 3 + 3 + 8 ; 'ngmail ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin glst return #false if #result = g set !item ringmail , #spc , gloves if #result = l set !item ringmail , #spc , leggings if #result = s set !item ringmail , #spc , sleeves if #result = t set !item ringmail , #spc , tunic set #result n/a } if #result = o set !item robe set #result n/a } if #result = s { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin achkptu return #false if #result = a set !item sandals if #result = c set !item scimitar if #result = h { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin io return #false if #result = i set !item shirt if #result = o { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin er return #false if #result = e set !item shoes if #result = r { set !xpos !xpos + %1 + 6 + 8 ; 't ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin ps return #false if #result = p set !item short , #spc , pants if #result = s set !item short , #spc , spear set #result n/a } set #result n/a } set #result n/a } if #result = k { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin iu return #false if #result = i set !item skirt if #result = u set !item skullcap set #result n/a } if #result = p set !item spear if #result = t { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin ru return #false if #result = r set !item straw , #spc , hat if #result = u { set !xpos !xpos + %1 + 6 + 6 + 6 + 6 + 8 ; 'dded ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin abglst return #false if #result = a set !item studded , #spc , armor if #result = b set !item studded , #spc , bustier if #result = g { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin lo return #false if #result = l set !item studded , #spc , gloves if #result = o set !item studded , #spc , gorget set #result n/a } if #result = l set !item studded , #spc , leggings if #result = s set !item studded , #spc , sleeves if #result = t set !item studded , #spc , tunic set #result n/a } set #result n/a } if #result = u set !item surcoat set #result n/a } if #result = t { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin aehruw return #false if #result = a set !item tall , #spc , straw , #spc , hat if #result = e set !item tear , #spc , kite , #spc , shield if #result = h set !item thigh , #spc , boots if #result = r set !item tricorne , #spc , hat if #result = u set !item tunic if #result = w set !item two , #spc , handed , #spc , axe set #result n/a } if #result = v set !item viking , #spc , sword if #result = w { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin ai return #false if #result = a { set !xpos !xpos + %1 + 6 + 8 ; 'r ' is common gosub Readchar !xpos !ypos in %menuTextColor if #result notin afhm return #false if #result = a set !item war , #spc , axe if #result = f set !item war , #spc , fork if #result = h set !item war , #spc , hammer if #result = m set !item war , #spc , mace set #result n/a } if #result = i { set !xpos !xpos + %1 gosub Readchar !xpos !ypos in %menuTextColor if #result notin dz return #false if #result = d set !item wide-brim , #spc , hat if #result = z set !item wizard's , #spc , hat set #result n/a } set #result n/a } return !item ;sub Replace v 1.2 -> p 2(3) -> d Split_to_Array sub Replace ;return #strRes set !string %1 ;stringa in cui fare il replace set !find %2 ;string da cercare if %0 = 3 set !replace %3 ;stringa con cui sostituire se assente da togliere else set !replace N/A ;stringa con cui sostituire se assente da togliere gosub Split_to_Array !string !find s set !string %s1 if #result > 1 { for !f 2 #result { if !replace <> N/A set !string !string , !replace if %s . !f <> N/A set !string !string , %s . !f } } set #strres !string return ;sub Save_event v 1.0 -> p 1 -> d 0 sub Save_event if %1 = START { set !w 220 set !h 60 set !w_menu %w_menu if %w_menu_tot <> N/A && %w_menu_tot > !w_menu set !w_menu %w_menu_tot set !x ( !w_menu - !w ) / 2 set !y ( %h_menu - !h ) / 2 Menu Shape shpSave !x !y !w !h 4 7 3 yellow 7 black Menu font size 18 Menu Font Color Red menu font bgcolor black set !x !x + 15 set !y !y + 15 Menu Text txtSave !x !y SAVE IN CORSO } if %1 = STOP { Menu delete shpSave Menu delete txtSave } return ;sub Sbianca_cloth v 1.0 -> p 1 -> d 0 sub Sbianca_cloth ;need %type_Dyetube set !targetid %1 sbianca_cloth_loop: if %id_dyetub = N/A { finditem %type_Dyetube G , _1 if #findkind = -1 { display ok Nessun Dyetube per decolorare trovato $ script fermato halt } set %id_dyetub #findid } set #lobjectid %id_dyetub wait 1 set #LTARGETID !targetid set #LTARGETKIND 1 wait 1 event macro 17 0 target event macro 22 0 wait 5 finditem !targetid if #findcol <> 0 { set %id_dyetub N/A goto sbianca_cloth_loop } return ;sub Set_menu_azione v 1.0 -> p X -> d 0 sub Set_menu_azione set %p1 %1 if %0 > 1 { for !vs_for 2 %0 set %p1 %p1 , #spc , % . !vs_for } set !sma_r !sma_old set !sma_old %p1 Menu set txtAzione %p1 return !sma_r ;sub Set_menu_mex v 1.0 -> p X -> d 0 sub Set_menu_mex set !valmessaggiomenu1 set !lineaactmenumessaggio 1 set !ripristinalpcmessmenu #false if #lpc < 1000 { set !oldlpc #lpc set #lpc 1000 set !ripristinalpcmessmenu #true } set !sm 1 if %1 = DEFAULT { set !sm 2 } if %0 > !sm { for !f !sm %0 { if % . !f <> $ { set !valmessaggiomenu . !lineaactmenumessaggio !valmessaggiomenu . !lineaactmenumessaggio , #spc , % . !f } else { set !lineaactmenumessaggio !lineaactmenumessaggio + 1 set !valmessaggiomenu . !lineaactmenumessaggio } } if %1 = DEFAULT { set %defaultmessaggiomenu1 !valmessaggiomenu1 set %defaultmessaggiomenu2 !valmessaggiomenu2 set %defaultmessaggiomenu3 !valmessaggiomenu3 set %defaultlineemessaggio !lineaactmenumessaggio } } if %1 = DEFAULT && %0 = 1 { set !valmessaggiomenu1 %defaultmessaggiomenu1 set !valmessaggiomenu2 %defaultmessaggiomenu2 set !valmessaggiomenu3 %defaultmessaggiomenu3 set !lineaactmenumessaggio %defaultlineemessaggio } for !f 1 3 { if !f > !lineaactmenumessaggio menu set txtMenuMex . !f else menu set txtMenuMex . !f !valmessaggiomenu . !f } if !ripristinalpcmessmenu set #lpc !oldlpc return ;sub Sospendi_script v 1.0 -> p 2 -> d antiblock sub Sospendi_script set !sospendi_script_da %1 set !sospendi_script_a %2 while #time >= !sospendi_script_da && #time < !sospendi_script_a ; non tentare login fra i due valori { gosub antiblock wait 60s } return ;sub Split v 1.0 -> p 2 -> d 0 sub Split ;return %strleft e %strright str pos %1 %2 ;1 stringa da splittare 2 delimitatore if #strres = 0 { set %StrLeft %1 set %StrRight N/A } else { set %Temp #strres - 1 str left %1 %Temp set %StrLeft #strres str Len %2 set %Temp %Temp + #strres str del %1 1 %Temp set %StrRight #strres str len %StrRight if #strres = 0 set %StrRight N/A } return ;sub Split_to_array v 1.1 -> p 3(4) -> d 0 sub Split_to_array ;return #result len array namespace Push namespace Local split , #systime set !lpc #lpc if #lpc < 500 set #lpc 500 set !string %1 ;string to split set !divider %2 ;delimiter set !arrayName %3 ;arrayname str Len !divider set !lenDelimter #strres if %0 > 3 set !namespace %4 else set !namespace #false set !length 0 repeat { set !length !length + 1 str Pos !string !divider 1 if #strRes = 0 { set !done #true set ! . !arrayName , !length !string } else { set !pos #strRes set !len !pos - 1 str Left !string !len set ! . !arrayName , !length #strRes set !pos !pos + ( !lenDelimter - 1 ) str Del !string 1 !pos set !string #strRes } } until ( !done = #true ) set #result !length if !namespace <> #false { namespace Copy !arrayName , * To Local !namespace } else { for !i 1 #result { set !value !arrayName , !i set % . !arrayName , !i ! . !value } } set #lpc !lpc namespace Clear namespace Pop return #result ;sub Sposta_item v 1.1 -> p 3 -> d AntiBlock sub Sposta_item set !si_ogg %1 ;item da spostare set !si_tar %2 ;contenitore destinazione set !si_tot %3 ;quanti oggetti spostare Exevent Drag !si_ogg !si_tot gosub AntiBlock NO_ALARM_EVENT Exevent Dropc !si_tar return ;sub Targetta_oggetto v 1.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.3 -> p 1(2) -> d Set_Menu_Azione AntiBlock Use_Runebook PathFind sub Torna_posizione ;r #true o #false (%id_error return type error) ;necessaria %magia_usata set !id_position %1 ;id per costruire le var necessarie set !go_point #true if %0 = 2 set !go_point %2 ;se #false non va al punto specifico ma si recalla e basta gosub Set_Menu_Azione TORNO !id_position ;prova_dist_e_magari_path if !go_point { if ( ABS ( #CHARPOSX - %posX_ . !id_position ) ) < 10 && ( ABS ( #CHARPOSY - %posY_ . !id_position ) ) < 10 { gosub PathFind %posX_ . !id_position %posY_ . !id_position %posZ_ . !id_position 2 if #result = #True return #true else goto tp_recall } } tp_riprova: if !go_point { if #CHARPOSX = %posX_ . !id_position && #CHARPOSY = %posY_ . !id_position goto tp_fattopath } tp_recall: gosub AntiBlock if %actRune_ . !id_position = N/A set %actRune_ . !id_position %firstRune_ . !id_position gosub Set_Menu_Azione TORNO !id_position RUNE %actRune_ . !id_position gosub Use_Runebook %RB_ . !id_position %actRune_ . !id_position %magia_usata if #result = #false { if %id_error = encumbered return #false wait 1s set %actRune_ . !id_position %actRune_ . !id_position + 1 if %actRune_ . !id_position > %lastRune_ . !id_position set %actRune_ . !id_position %firstRune_ . !id_position goto tp_riprova } if ! !go_point return #true gosub PathFind %posX_ . !id_position %posY_ . !id_position %posZ_ . !id_position if #result = #false goto tp_riprova tp_fattopath: return #true ;sub Trim v 1.1 -> p 1(2) -> d 0 sub Trim set !string %1 set !trim_mode LEFT if %0 = 2 set !trim_mode %2 if !trim_mode <> LEFT && !trim_mode <> BOTH goto loop_trim_right loop_trim: str left !string 1 if #strRes = #SPC { str del !string 1 1 set !string #strres goto loop_trim } if !trim_mode <> RIGHT && !trim_mode <> BOTH return !string loop_trim_right: str right !string 1 if #strRes = #SPC { str len !string str del !string #strres 1 set !string #strres goto loop_trim_right } return !string ;sub Use_runebook v 4.4 -> p 3(4) -> d AntiBlock Wait_Gump sub Use_runebook ;r #true o #false (%id_error return type error) set !ur_bookid %1 ;id runebook set !ur_runenumber %2 ;index runa ;%3 magia usata (mager = mago), %4 GATE per gate invece di recall set !ur_oldx #charposx set !ur_oldy #charposy set !ur_runex 138 set !ur_ymagie 180 set !gate #false if %3 = mager set !ur_ymagie 145 if %4 = GATE { set !ur_ymagie 165 set !gate #true } set !ur_side 0 ;pagina set !ur_page !ur_runenumber + 1 set !ur_page !ur_page / 2 ;side set !ur_num !ur_runenumber / 2 set !ur_num !ur_num * 2 if !ur_num = !ur_runenumber set !ur_side 1 if !ur_side = 1 set !ur_runex 298 set !ur_pagexmod !ur_page * 34 set !ur_pagex 104 set !ur_pagex !ur_pagex + !ur_pagexmod if !ur_page > 4 set !ur_pagex !ur_pagex + 31 ur_recallopenagain: set !jicp #JINDEX + 1 wait 5 set #LOBJECTID !ur_bookid event macro 17 0 wait 5 set !ur_error #scnt + 2 gosub AntiBlock gosub Wait_Gump generic_gump if #result = #false goto ur_recallopenagain set !ur_bookx #CONTPOSX set !ur_booky #CONTPOSY set !ur_xc !ur_bookx + !ur_pagex set !ur_yc !ur_booky + 195 click !ur_xc !ur_yc wait 5 gosub AntiBlock gosub Wait_Gump generic_gump if #result = #false goto ur_recallopenagain set !ur_bookx #CONTPOSX set !ur_booky #CONTPOSY set !ur_xc !ur_bookx + !ur_runex set !ur_yc !ur_booky + !ur_ymagie click !ur_xc !ur_yc set !ur_w4serr #scnt + 4 wait 10 ur_wait4secondrecall: for !ur_sc_recall !ur_inizioj #JINDEX { scanjournal !ur_sc_recall if : notin #journal { if You_have_not_yet_recovered in #journal || More_reagents in #journal || the_speel_fizzles in #journal { wait 50 DELETEJOURNAL goto ur_recallopenagain } if Thou_art_too_encumbered in #journal { DELETEJOURNAL set %id_error encumbered return #false } if You_cannot_teleport in #journal { DELETEJOURNAL set %id_error cannot return #false } if You_must_have in #journal { wait 1s DELETEJOURNAL goto ur_recallopenagain } } } if !gate { finditem OTF G_0 if #findkind <> -1 { set #lobjectid #findid gosub antiblock event macro 17 wait 50 } } if !ur_oldx = #charposx && !ur_oldy = #charposy && #scnt < !ur_w4serr { wait 50 goto ur_wait4secondrecall } gosub AntiBlock NO_ALARM_EVENT if !ur_oldx = #charposx && !ur_oldy = #charposy { set %id_error GENERIC return #false } set %id_error N/A return #true ;sub Wait_gump v 1.1 -> p 1(2) -> d 0 sub Wait_gump set !gumpdaattendere %1 ;name gump set !errwg #scnt + 10 if %0 = 2 set !errwg #scnt + %2 wg_subloop: wait 2 if #CONTNAME = !gumpdaattendere return #true if #scnt < !errwg goto wg_subloop return #false ;sub Wait_idgump v 1.0 -> p 1(2) -> d 0 sub Wait_idgump set !gumpdaattendere %1 ;id gump set !errwg #scnt + 10 if %0 = 2 set !errwg #scnt + %2 wg_idsubloop: wait 2 if #CONTID = !gumpdaattendere return #true if #scnt < !errwg goto wg_idsubloop return #false ;sub Wait_journal_msg v 1.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_systemvar v 1.1 -> p 2(3) -> d 0 sub Wait_systemvar set !svar %1 ;name system var set !sval %2 ;val system var set !errsv #scnt + 10 if %0 = 3 set !errsv #scnt + %3 wsv_subloop: wait 2 if # . !svar = !sval return #true if #scnt < !errsv goto wsv_subloop return #false ;sub Waitforsysvars v 1.0 -> p x -> d 0 sub Waitforsysvars ;this sub is made by Boydon ;a 3 a 3 di cui 1 nome var sys 2 valutazione 3 valore , se in più ultimo valore timeout set !cnt %0 / 3 if ( %0 % 3 = 1 ) set !timeOut #scnt + % . %0 else set !timeOut #scnt + 5 for !i 1 !cnt { set !offset 3 * !i - 2 set !evaluation !offset + 1 set !value !offset + 2 if ! ( # . % . !offset % . !evaluation % . !value ) set !i 0 if #scnt > !timeout return #false } return #true ;################## GENERIC SUB FINISH ########################## ;################## CUSTOM SUB START ############################ ;sub Bod_check_interrupted d bod_analizza bod_refresh_menu Set_menu_azione bodcraft_FillBod sub Bod_check_interrupted finditem %type_bod c_ , #backpackid if #findkind = -1 return gosub bod_analizza #findid gosub bod_refresh_menu if %bod_size = LARGE return finditem %bod_type c_ , , #backpackid if #findkind <> -1 { gosub Set_menu_azione CLEAN: BOD INTERRUPTED gosub bodcraft_FillBod } return ;sub Bod_refresh_menu sub Bod_refresh_menu ;%bod_id menu set txtTYPE %bod_supertype menu set txtSIZE %bod_size if %Bod_Exceptional menu set txtEXE EXCEPTIONAL else menu set txtEXE NORMAL menu set txtAMOUNT %bod_quantity if %bod_size = SMALL { menu set txtMAKED %bod_AlredyMadeQuantity set !v %bod_quantity - %bod_AlredyMadeQuantity menu set txtNEED !v menu set txtITEM %bod_name %bod_type menu set txtMENU %bod_category %bod_piece if %bod_Cloth > 0 menu set txtMAT1 %bod_Cloth CLOTHS if %bod_hides > 0 { if %bod_material = 0 menu set txtMAT1 %bod_hides LEATHER else menu set txtMAT1 %bod_hides %material_ . %bod_material } if %bod_ingots > 0 { if %bod_material = 0 menu set txtMAT1 %bod_ingots IRON else menu set txtMAT1 %bod_ingots %material_ . %bod_material } if %bod_bones > 0 menu set txtMAT2 %bod_bones BONES else menu set txtMAT2 %bod_bones menu set txtLRGSET %bod_largeSet menu set txtLRGTYPE %bod_largeType gosub spli_to_array %bod_largePrize | prize if %prize1 <> N/A menu set txtPRIZE1 %txt_ . %prize1 else menu set txtPRIZE1 NO LARGE PRIZE if #result >= 2 menu set txtPRIZE2 %txt_ . %prize2 else menu set txtPRIZE2 if #result >= 3 menu set txtPRIZE3 %txt_ . %prize3 else menu set txtPRIZE3 menu set txtVERDICT %bod_Verdict } else { if %Bod_ToMakeQuantity = 0 menu set txtMAKED COMPLETO else menu set txtMAKED menu set txtNEED menu set txtITEM %bod_largeSet menu set txtMENU menu set txtMAT1 menu set txtMAT2 %bod_bones menu set txtLRGSET %bod_largeSet menu set txtLRGTYPE %bod_largeType gosub spli_to_array %bod_largePrize | prize menu set txtPRIZE1 %prize1 if #result >= 2 menu set txtPRIZE2 %prize2 else menu set txtPRIZE2 if #result >= 3 menu set txtPRIZE3 %prize3 else menu set txtPRIZE3 menu set txtVERDICT %bod_Verdict } return ;sub Bodcraft_emptyavanzi sub Bodcraft_emptyavanzi emptyavanzi_loop: finditem %bod_type C_ , #backpackid if #findkind = -1 return set !FoundItem #findid if %bod_supertype = TAILOR { if %bod_Recycable = #false gosub sposta_item !FoundItem %chest_trash 1 else { set #lobjectid %id_scissor set #ltargetid !FoundItem Event macro 17 0 gosub AntiBlock NO_ALARM_EVENT target 5s set #ltargetkind 1 Event Macro 22 0 } } else { if %RemUses = 0 { set %Tools_Current %Tools_Current + 1 if %Tools_Current > %Tools_ToolCount { gosub Bodcraft_getTools if #result = #false return #false } set %RemUses %ToolRU_ . %Tools_Current menu set txtTOOL_COUNT %Tools_Current / %Tools_ToolCount menu set txtTOOL_USES %RemUses if %ToolTAG_ . %Tools_Current = #FALSE menu set txtTool_Tag #spc else menu set txtTool_Tag %ToolTAG_ . %Tools_Current gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current } if #CONTNAME <> generic_gump || #contsize <> 530_457 gosub Craft_bringupcraftmenu %ToolId_ . %Tools_Current gosub craft_ClickSmelt !FoundItem gosub craft_ClickExit } wait 10 goto emptyavanzi_loop return ;sub Check_weight_bod sub Check_weight_bod loop_Check_Weight_Bod: if #WEIGHT = N/A { gosub AntiBlock NO_ALARM_EVENT gosub apri_gump_base goto loop_Check_Weight_Bod } set !maxw #maxweight + %modweight - 30 if #WEIGHT > !maxw gosub bodcraft_FillBod return ;sub Consegna_bod d get_bod_from_book bod_refresh_menu bod_analizza GB_GET_NEW_BOD_POPUP Bod_ensure_close_gump Bodbook_get_tot_bod Torna_Posizione Set_menu_azione crea_lista_vendor sub Consegna_bod set !zone_id N/A set !vendor_id_FABBRO N/A set !vendor_id_SARTO N/A set !timer_delivery #scnt set !delay_delivery 8 set !return_value_consegna #false consegna_bod_ciclo: gosub Bodbook_get_tot_bod %obj_SARTO if #result > 0 { set !consegna_id SARTO goto consegna_bod_vai } gosub Bodbook_get_tot_bod %obj_FABBRO if #result > 0 { set !consegna_id FABBRO goto consegna_bod_vai } return !return_value_consegna consegna_bod_vai: set !return_value_consegna #true while !zone_id <> !consegna_id { gosub Torna_Posizione !consegna_id #false if #result set !zone_id !consegna_id } consegna_bod_find_vendor: if !vendor_id . !consegna_id = N/A { gosub Set_menu_azione CONSEGNA: CERCO !consegna_id if !consegna_id = SARTO gosub crea_lista_vendor %type_npc %strVendor_Tailor guildmaster vlist_ if !consegna_id = FABBRO gosub crea_lista_vendor %type_npc %strVendor_Smith guildmaster vlist_ if #result > 0 set !vendor_id_ . !consegna_id %vlist_id1 else { wait 2s goto consegna_bod_find_vendor } } consegna_bod_get_new_bod: gosub Bod_ensure_close_gump gosub Set_menu_azione CONSEGNA: GET BOD FROM !consegna_id gosub GB_GET_NEW_BOD_POPUP !vendor_id_ . !consegna_id if #result = #false { display ok Il vendor non c'è piu. ignoreitem !vendor_id_ . !consegna_id vendor set !vendor_id . !consegna_id N/A goto consegna_bod_find_vendor } consegna_bod_find_givebod: finditem %type_bod c_ , #backpackid if #findkind = -1 goto consegna_bod_get_bod_book gosub bod_analizza #findid gosub bod_refresh_menu if %bod_supertype = TAILOR && !consegna_id = FABBRO { set !consegna_id SARTO goto consegna_bod_vai } if %bod_supertype = SMITH && !consegna_id = SARTO { set !consegna_id FABBRO goto consegna_bod_vai } if %bod_verdict <> CONSEGNARE { gosub Set_menu_azione CONSEGNA: MOVE BOD if %bod_verdict = TRASH gosub sposta_bod %bod_id #backpackid %bod_supertype %bod_verdict %bod_destination else gosub sposta_bod %bod_id #backpackid %bod_supertype %bod_verdict %bod_destination gosub Bod_ensure_close_gump goto consegna_bod_find_givebod } goto consegna_bod_give_book consegna_bod_get_bod_book: finditem %type_bod c_ , #backpackid if #findkind <> -1 goto consegna_bod_find_givebod gosub Set_menu_azione CONSEGNA: GET FROM BOOK gosub get_bod_from_book %obj_ . !consegna_id #true if #result = EMPTY goto consegna_bod_ciclo if #result = FULL return goto consegna_bod_find_givebod consegna_bod_give_book: gosub Set_menu_azione CONSEGNA: CONSEGNO !consegna_id consegna_bod_give_wait: if #scnt < !timer_delivery { set !tempo_delay !timer_delivery - #scnt gosub Set_menu_azione CONSEGNA: CONSEGNO !consegna_id !tempo_delay s wait 10 goto consegna_bod_give_wait } gosub give_bod_to_vendor !vendor_id_ . !consegna_id %bod_id if #result = #false goto consegna_bod_find_vendor set !timer_delivery #scnt + !delay_delivery if !consegna_id = SARTO { set %bod_consegnati_tailor %bod_consegnati_tailor + 1 menu set txtbod_consegnati_tailor %bod_consegnati_tailor } if !consegna_id = FABBRO { set %bod_consegnati_smith %bod_consegnati_smith + 1 menu set txtbod_consegnati_smith %bod_consegnati_smith } set !read_prize_gold 0 set !str_gold NO read_prize_gold: for !i %last_read_journal #jindex { scanjournal !i if gold_has_been_deposited in #journal set !str_gold #journal } if !str_gold = NO && !read_prize_gold < 5 { set !read_prize_gold !read_prize_gold + 1 event sysmessage Non riesco a trovare il premio in gold... errore !read_prize_gold wait 10 goto read_prize_gold } if !str_gold = NO { event sysmessage Non riesco a trovare il premio in gold! pause } if !str_gold <> NO { gosub Split !str_gold _ set %contmoney %contmoney + %strleft menu set txtMoney %contmoney } goto consegna_bod_get_new_bod return ;sub Conta_book_generico sub Conta_book_generico gosub Bodbook_get_tot_bod %obj_generico set %book_with_space %obj_generico set %tot_bod_usare #result if %MOREBOOK0 > 0 { for !libro 1 %MOREBOOK0 { gosub Bodbook_get_tot_bod %MOREBOOK . !libro if #result < 500 set %book_with_space %MOREBOOK . !libro set %tot_bod_usare %tot_bod_usare + #result } } menu set txtTOTBOD %tot_bod_usare return ;sub Conta_risorse d conta_risorse_sarto conta_risorse_fabbro conta_risorse_kit conta_risorse_kit sub Conta_risorse gosub Conta_risorse_sarto gosub Conta_risorse_fabbro gosub Conta_risorse_kit return ;sub Conta_risorse_fabbro sub Conta_risorse_fabbro ;lingotti set %totiron 0 set %totdull 0 set %totshadow 0 set %totcopper 0 set %totbronze 0 set %totgold 0 set %totagapite 0 set %totverite 0 set %totvalorite 0 set !one_finded #false conta_risorse_fabbro_start: finditem %type_ingot c_ , %chest_resource if #findkind <> -1 { for #findindex 1 #findcnt { set !nv %ingot . #findcol set %tot . !nv %tot . !nv + #findstack menu set txt . !nv %tot . !nv } set !one_finded #true } if ! !one_finded { set !one_finded #true gosub open_container %chest_resource 5 805 200 wait 10 gosub antiblock goto conta_risorse_fabbro_start } return ;sub Conta_risorse_kit sub Conta_risorse_kit set %tothammer10 0 set %tothammer15 0 set %tothammer30 0 set %tottongs 0 set %totsewing 0 set !one_finded #false conta_risorse_kit_start: finditem %Type_ToolTinker c_ , %chest_tool if #findkind <> -1 set !one_finded #true set %tottinker #findcnt menu set txttinker %tottinker finditem %Type_ToolsTailor c_ , %chest_tool if #findkind <> -1 { for #findindex 1 #findcnt { if #findtype = %type_sewing_kit && #findcol <> 0 ignoreitem #findid else set %totsewing %totsewing + 1 } set !one_finded #true } menu set txtsewing %totsewing finditem %Type_ToolsSmith c_ , %chest_tool if #findkind <> -1 { for #findindex 1 #findcnt { if #findtype in %type_smith_hammer && #findcol <> 0 { gosub check_ancient_hammer #findid if #result = 10 || #result = 15 || #result = 30 { if %use_ancient_ . #result { set %tothammer . #result %tothammer . #result + 1 } else { display ok "eccoci" pause event sysmessage Ignoro Ancient Hammer #result - ID #findid ignoreitem #findid } } else { set %tottongs %tottongs + 1 } } else set %tottongs %tottongs + 1 } set !one_finded #true } menu set txttongs %tottongs if %use_ancient_10 menu set txthammer10 %tothammer10 if %use_ancient_15 menu set txthammer15 %tothammer15 if %use_ancient_30 menu set txthammer30 %tothammer30 if ! !one_finded { set !one_finded #true gosub open_container %chest_tool 5 805 400 wait 10 gosub antiblock goto conta_risorse_kit_start } return ;sub Conta_risorse_sarto sub Conta_risorse_sarto ;stoffa set %totcloth 0 set %totleather 0 set %totspined 0 set %tothorned 0 set %totbarbed 0 set %totossa 0 set !one_finded #false conta_risorse_sarto_start: finditem %type_bones c_ , %chest_resource if #findkind <> -1 { for #findindex 1 #findcnt set %totossa %totossa + #findstack set !one_finded #true } menu set txtossa %totossa finditem %type_cloth c_ , %chest_resource if #findkind <> -1 { for #findindex 1 #findcnt set %totcloth %totcloth + #findstack set !one_finded #true } menu set txtcloth %totcloth finditem %type_leather c_ , %chest_resource if #findkind <> -1 { for #findindex 1 #findcnt { set !nv %leather . #findcol set %tot . !nv %tot . !nv + #findstack menu set txt . !nv %tot . !nv } set !one_finded #true } if ! !one_finded { set !one_finded #true gosub open_container %chest_resource 5 805 200 wait 10 gosub antiblock goto conta_risorse_sarto_start } return ;sub Crea_lista_item_e_container sub Crea_lista_item_e_container ;sotto un esempio di come dovrebbe essere if %chest_resource = N/A set %chest_resource %chest_base if %chest_tool = N/A set %chest_tool %chest_base if %chest_premi = N/A set %chest_premi %chest_base if %chest_premi = N/A set %chest_filla_large %chest_base return ;sub Crea_menu_avviato sub Crea_menu_avviato set !lpc #lpc set #lpc 1000 set %h_menu 450 set %w_menu 300 set !w_spot 60 set !max_item_spot 16 set %w_menu_tot %w_menu ;+ !w_spot + ( ( %spot_max - 1 ) / !max_item_spot ) * !w_spot set %yfine %h_menu - 15 Menu Clear menu Window Title %Menu_Title - v %Menu_Version menu window transparent 100 Menu Window size %w_menu_tot %h_menu Menu Window Color $000000 menu Font Transparent #true set !y_intestazione 2 set !y_risorse 55 set !y_infobod 197 set !y_premibod 197 set !y_gestionebod 148 set !y_stato %h_menu - 13 ;Intestazione set !xb 2 set !yb !y_intestazione set !wb %w_menu_tot - 4 set !hb 50 Menu Shape mnuRect1 !xb !yb !wb !hb 4 7 1 gray 7 $333333 Menu Font Name tahoma Menu Font Color yellow ;$F7D358 Menu font size 12 Menu Font Style b set !x !xb + 6 set !y !yb + 3 Menu Text Titolo !x !y %Menu_Title Menu Font Color $FFBF00 Menu font size 8 set !x !xb + 6 set !y !y + 18 Menu Text Titolo !x !y %Menu_SubTitle Menu Font Color gray Menu font size 7 set !x !xb + 6 set !y !y + 14 Menu Text Titolo !x !y by %Menu_Owner set !x !xb + !wb - 38 Menu Text Titolo !x !y v %Menu_Version if %pepito_alarm = #true { Menu Font Color $0000CC Menu font size 5 menu font style b set !x !xb + !wb - 42 set !y !yb + 3 Menu Text Titolo !x !y ALARM ON } ;Fine Intestazione ;risorse set !yb !y_risorse set !xb 2 set !wb %w_menu_tot - 4 set !hb 91 Menu Font Color white gosub Menu_Crea_Box !xb !yb !wb !hb RISORSE menu font size 6 menu font style b menu font color silver set !x !xb + 10 set !y !yb + 15 menu text txtTcloth !x !y CLOTH set !y !y + 8 menu text txtTLeather !x !y LEATHER set !y !y + 8 menu text txtTSpined !x !y SPINED set !y !y + 8 menu text txtThorned !x !y HORNED set !y !y + 8 menu text txtTBarbed !x !y BARBED set !y !y + 8 menu text txtTossa !x !y OSSA set !x !xb + 115 set !y !yb + 15 menu text txtTIron !x !y IRON set !y !y + 8 menu text txtTDull !x !y DULL set !y !y + 8 menu text txtTShadow !x !y SHADOW set !y !y + 8 menu text txtTCopper !x !y COPPER set !y !y + 8 menu text txtTBronze !x !y BRONZE set !y !y + 8 menu text txtTGold !x !y GOLD set !y !y + 8 menu text txtTagapite !x !y AGAPITE set !y !y + 8 menu text txtTverite !x !y VERITE set !y !y + 8 menu text txtTvalorite !x !y VALORITE set !x !xb + 210 set !y !yb + 15 menu text txt !x !y TINKER TOOL set !y !y + 8 menu text txtTTAILOR !x !y TOOL SARTO set !y !y + 8 menu text txtTSMITH !x !y TOOL FABBRO set !y !y + 8 if %use_ancient_10 menu text txt !x !y HAMMER+10 set !y !y + 8 if %use_ancient_15 menu text txt !x !y HAMMER+15 set !y !y + 8 if %use_ancient_30 menu text txt !x !y HAMMER+30 set !y !y + 24 menu text txt !x !y TIME menu font color red set !x !xb + 10 set !y !yb + 15 menu text txtMcloth !x !y set !y !y + 8 menu text txtMLeather !x !y set !y !y + 8 menu text txtMSpined !x !y set !y !y + 8 menu text txtMHorned !x !y set !y !y + 8 menu text txtMBarbed !x !y set !y !y + 8 menu text txtMOssa !x !y set !x !xb + 115 set !y !yb + 15 menu text txtMIron !x !y set !y !y + 8 menu text txtMDull !x !y set !y !y + 8 menu text txtMShadow !x !y set !y !y + 8 menu text txtMCopper !x !y set !y !y + 8 menu text txtMBronze !x !y set !y !y + 8 menu text txtMGold !x !y set !y !y + 8 menu text txtMAgapite !x !y set !y !y + 8 menu text txtMVerite !x !y set !y !y + 8 menu text txtMValorite !x !y set !x !xb + 210 set !y !yb + 15 set !y !y + 8 menu text txtMTAILOR !x !y set !y !y + 8 menu text txtMSMITH !x !y menu font color white set !x !xb + 51 set !y !yb + 15 menu text txtcloth !x !y 0 set !y !y + 8 menu text txtLeather !x !y 0 set !y !y + 8 menu text txtSpined !x !y 0 set !y !y + 8 menu text txtHorned !x !y 0 set !y !y + 8 menu text txtBarbed !x !y 0 set !y !y + 8 menu text txtOssa !x !y 0 set !x !xb + 160 set !y !yb + 15 menu text txtIron !x !y 0 set !y !y + 8 menu text txtDull !x !y 0 set !y !y + 8 menu text txtShadow !x !y 0 set !y !y + 8 menu text txtCopper !x !y 0 set !y !y + 8 menu text txtBronze !x !y 0 set !y !y + 8 menu text txtGold !x !y 0 set !y !y + 8 menu text txtAgapite !x !y 0 set !y !y + 8 menu text txtVerite !x !y 0 set !y !y + 8 menu text txtValorite !x !y 0 set !x !xb + 270 set !y !yb + 15 menu text txtTinker !x !y 0 set !y !y + 8 menu text txtSewing !x !y 0 set !y !y + 8 menu text txtTongs !x !y 0 set !y !y + 8 if %use_ancient_10 menu text txtHammer10 !x !y 0 set !y !y + 8 if %use_ancient_15 menu text txtHammer15 !x !y 0 set !y !y + 8 if %use_ancient_30 menu text txtHammer30 !x !y 0 Menu Font Color Yellow set !y !y + 24 set !x !xb + 240 menu text txtTEMPO !x !y 0 ;gestione_bod set !yb !y_gestionebod set !xb 2 set !wb %w_menu_tot - 4 set !hb 47 Menu Font Color white gosub Menu_Crea_Box !xb !yb !wb !hb GESTIONE BOD menu font size 6 menu font style b menu font color silver set !x !xb + 90 set !y !yb + 1 menu text txt !x !y BOD BOOK TO FILL menu font color yellow set !x !xb + 168 menu text txtTOTBOD !x !y N/A menu font color silver set !x !xb + 205 menu text txtFILLBOD !x !y set !x !xb + 70 set !y !yb + 14 menu text txt !x !y CONSEGNATI set !x !xb + 140 menu text txt !x !y DA FILLARE set !x !xb + !wb - 90 menu text txt !x !y BUONI set !x !xb + !wb - 40 menu text txt !x !y TRASH set !x !xb + 10 set !y !yb + 24 menu text txt !x !y SARTO set !y !yb + 34 menu text txt !x !y FABBRO Menu Font Color white set !x !xb + 90 set !y !yb + 24 menu text txtbod_consegnati_tailor !x !y %bod_consegnati_tailor set !x !xb + 160 menu text txtbod_usare_tailor !x !y %bod_usare_tailor set !x !xb + !wb - 77 menu text txtbod_buono_tailor !x !y %bod_buono_tailor set !x !xb + !wb - 30 menu text txtbod_trash_tailor !x !y %bod_trash_tailor set !x !xb + 90 set !y !yb + 34 menu text txtbod_consegnati_smith !x !y %bod_consegnati_smith set !x !xb + 160 menu text txtbod_usare_smith !x !y %bod_usare_smith set !x !xb + !wb - 77 menu text txtbod_buono_smith !x !y %bod_buono_smith set !x !xb + !wb - 30 menu text txtbod_trash_smith !x !y %bod_trash_smith ;gestione_bod set !yb !y_infobod set !xb 2 set !wb %w_menu_tot / 2 - 4 set !hb !y_stato - 2 - !yb - 60 Menu Font Color silver gosub Menu_Crea_Box !xb !yb !wb !hb ANALYZED BOD menu font size 6 set !y !yb + 14 set !vocimenu TYPE|SIZE|EXE|AMOUNT|MAKED|NEED|ITEM|MENU|MAT1|MAT2|LRGSET|LRGTYPE|PRIZE1|PRIZE2|PRIZE3|VERDICT set !vocisupermenu TYPE|SIZE|EXE|AMOUNT|ITEM|LRGSET|VERDICT gosub split_to_array !vocimenu | txt for !f 1 #result { if %txt . !f in !vocisupermenu { set !x 6 Menu Font Color silver } else { set !x 8 Menu Font Color gray } menu text txt !x !y %txt . !f set !y !y + 8 } set !x 49 set !y !yb + 14 for !f 1 #result { if %txt . !f in !vocisupermenu { Menu Font Color white } else { Menu Font Color gray } set !v txt , %txt . !f menu text !v !x !y N/A set !y !y + 8 } ;gestione_tool set !yb !y_infobod + !hb + 2 set !xb 2 set !wb %w_menu_tot / 2 - 4 set !hb 58 Menu Font Color silver gosub Menu_Crea_Box !xb !yb !wb !hb USED TOOLS menu font size 6 set !x 4 set !y !yb + 14 menu text txt !x !y TYPE set !y !y + 8 menu text txt !x !y COUNT set !y !y + 8 menu text txt !x !y USES set !y !y + 8 menu text txt !x !y TOT set !x 47 set !y !yb + 14 Menu Font Color white menu text txtTOOL_type !x !y set !x 100 Menu Font Color green menu text txtTOOL_tag !x !y Menu Font Color white set !x 47 set !y !y + 8 menu text txtTOOL_COUNT !x !y set !y !y + 8 menu text txtTOOL_USES !x !y set !y !y + 8 menu text txtTOOL_TOTUSES !x !y ;premi_bod set !yb !y_premibod set !xb %w_menu_tot / 2 set !wb %w_menu_tot / 2 - 2 set !hb !y_stato - 2 - !yb set %index_voci_premi 0 set %x_voci_premi !xb + 5 set %y_voci_premi !yb + 13 Menu Font Color white gosub Menu_Crea_Box !xb !yb !wb !hb PREMI set !x !xb + 90 set !y !yb + 13 menu font size 5 Menu Font Color silver menu text txt !x !y TENUTI set !x !xb + 120 menu text txt !x !y TRASH set !y %y_voci_premi + 8 set !x %x_voci_premi set !x2 %x_voci_premi + 95 set !x3 %x_voci_premi + 122 menu font size 6 menu font style b menu font color white menu text txt !x !y GOLD menu font color yellow menu text txtMoney !x2 !y %contmoney set %y_voci_premi %y_voci_premi + 9 menu font name Tahoma ;stato Menu Font Color white Menu Font Style b Menu font size 6 set !x 25 set !y !y_stato menu text txt !x !y AZIONE: set !x %w_menu_tot - 62 if %ritiro_bod menu text txtCicliBod !x !y %cont_bod set !x %w_menu_tot - 52 if %ritiro_bod menu text txtBODLABEL !x !y BOD: set !x 60 Menu Font Color yellow menu text txtAzione !x !y CREA MENU set !x %w_menu_tot - 30 menu text txtBODTIME !x !y set !x 5 set !y !y_stato - 1 menu font bgcolor $004444 Menu Font Color white Menu Font Style b Menu font size 4 menu button butPAUSE !x !y 18 12 l l ;debug if %debug { set !w_menu %w_menu_tot + 105 Menu Window size !w_menu %h_menu set !yb 0 set !xb %w_menu_tot set !wb !w_menu - %w_menu_tot set !hb %h_menu set !hbut 18 menu font color AQUA gosub Menu_Crea_Type_Box !xb !yb !wb !hb DEBUG DEBUG Menu Font bgcolor $590B5B Menu Font Name tahoma menu Font Transparent #true Menu Font Style b Menu font size 6 menu font color silver set !y !yb + 16 set !x !xb + 4 set !w !wb - 8 Menu Button SVUOTA_CONTAINER !x !y !w 17 SVUOTA CONTAINER set !y !y + !hbut Menu Button PRENDI_BOD_BODBOOK !x !y !w 17 GET BOD BODBOOK set !y !y + !hbut Menu Button ANALIZZA_BOD !x !y !w 17 ANALIZZA BOD set !y !y + !hbut Menu Button FILLA_BOD !x !y !w 17 FILLA BOD set !y !y + !hbut Menu Button MAKE_TOOLS_SMITH !x !y !w 17 MAKE TOOL FABBRO set !y !y + !hbut Menu Button MAKE_TOOLS_TAILOR !x !y !w 17 MAKE TOOL SARTO set !y !y + !hbut Menu Button CONTA_RISORSE !x !y !w 17 CONTA RISORSE set !y !y + !hbut Menu Button SISTEMA_ZAINO !x !y !w 17 SISTEMA ZAINO set !y !y + !hbut Menu Button SISTEMA_PREMI !x !y !w 17 SISTEMA PREMI set !y !y + !hbut Menu Button SISTEMA_TOOLS !x !y !w 17 SISTEMA TOOLS set !y !y + !hbut Menu Button TORNA_A_CASA !x !y !w 17 TORNA A CASA 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 - !hbut Menu Button VAI !x !y !w 17 START } menu show 970 0 set #lpc !lpc return ;sub Debug_display 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 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 Fill_some_bods sub Fill_some_bods set %max_filled %1 set %act_filled 0 fill_some_bods_start: menu set txtFILLBOD FILLED BOD: %act_filled DI %max_filled gosub conta_risorse if %act_filled >= %max_filled { menu set txtFILLBOD return %act_filled } fill_some_bods_loop: gosub conta_book_generico if #scnt > %timer_bod && %ritiro_bod return %act_filled finditem %type_bod C_ , #backpackid if #findkind = -1 { gosub get_bod_from_book %obj_generico #true if #result = EMPTY { gosub get_bod_from_other_book if #result = EMPTY { menu set txtFILLBOD return EMPTY } } if #result = N/A display ok Questo non doveva succedere in fill_some_bods goto fill_some_bods_loop } gosub bod_analizza #findid gosub bod_refresh_menu if %bod_verdict = USARE { gosub bod_material_to_string %bod_material %bod_supertype gosub Set_menu_azione FILL %bod_name #result gosub bodcraft_fill_this %bod_id #false set %bod_fail #result } gosub bod_analizza %bod_id if %bod_verdict = CONSEGNARE set %act_filled %act_filled + 1 if %bod_verdict = USARE && %bod_fail = #False && %MOREBOOK0 > 0 set %bod_destination %book_with_space gosub sposta_bod %bod_id #backpackid %bod_supertype %bod_verdict %bod_destination goto fill_some_bods_start return ;sub Fill_some_large sub Fill_some_large set %large_cont 0 set %small_to_make 0 set %act_small 0 set !avviso_displayed #true Menu Window Color $0000FF menu font color red menu font size 12 menu text txtl1 170 245 ATTENZIONE menu font size 6 menu font color white menu text txtl2 167 265 NON COPRIRE LA FINESTRA menu text txtl3 168 274 FINO A QUANDO SCOMPARE menu text txtl4 185 283 QUESTA SCRITTA gosub Set_menu_azione FILL LARGE: ANALIZZO fill_some_large_find: finditem %type_bod C_ , #backpackid if #findkind = -1 goto fsl_exit_sub for #findindex 1 #findcnt { gosub getproperty #findid if LARGE , #spc , BULK in #result { set %large_cont %large_cont + 1 set %large_id . %large_cont #findid } } if %large_cont = 0 goto fsl_exit_sub ;ciclo bod large trovati e cerco gli small set %act_large 1 fsl_init_search_small: if %act_large > %large_cont { set %act_large 1 set %act_small 0 ignoreitem reset bod_finded goto fsl_loop_fill_small } gosub bod_analizza %large_id . %act_large gosub bod_refresh_menu if %bod_verdict = CONSEGNARE { gosub sposta_bod %bod_id #backpackid %bod_supertype %bod_verdict %bod_destination wait 50 gosub Bod_ensure_close_gump set %act_large %act_large + 1 goto fsl_init_search_small } gosub Bod_copia bod large set %large_largetype . %act_large %large_largetype set %small_to_make %small_to_make + %large_largetype menu set txtFILLBOD FINDED %act_small / %small_to_make set %index_item 1 fsl_loop_search_small: if %index_item > %large_largetype { set %act_large %act_large + 1 goto fsl_init_search_small } gosub bod_material_to_string %large_material . %index_item set %material_string #result set %item_string %large_item . %index_item event sysmessage %large_quantity %item_string %material_string gosub find_a_small %large_SUPERTYPE %large_quantity %large_exceptional %item_string %material_string %large_prop ;possibili result ADDED NOTHING FINDED FIND_TO_MOVE if #result = NOTHING { display ok NON TROVO %large_SUPERTYPE %large_quantity %large_exceptional %item_string %material_string %large_prop pause goto fsl_loop_search_small } if #result = ADDED { set !v large_bod , %index_item , _ , %act_large set % . !v OK goto fsl_loopend_search_small } if #result = FINDED || #result = FIND_TO_MOVE { set !v large_bod , %index_item , _ , %act_large set % . !v %bod_id if #result = FIND_TO_MOVE { gosub sposta_item %bod_id %chest_filla_large 1 wait 15 } ignoreitem %bod_id bod_finded goto fsl_loopend_search_small } fsl_loopend_search_small: set %act_small %act_small + 1 set %index_item %index_item + 1 menu set txtFILLBOD FINDED %act_small / %small_to_make goto fsl_loop_search_small ;da qui li fillo fsl_loop_fill_small: if !avviso_displayed { Menu Window Color $000000 menu delete txtl1 menu delete txtl2 menu delete txtl3 menu delete txtl4 set !avviso_displayed #false } if %act_large > %large_cont goto fsl_exit_sub set %index_item 1 fsl_fill_small_of_large: menu set txtFILLBOD FILLED %act_small / %small_to_make if %index_item > %large_largetype . %act_large { wait 50 set !sid _ for !f 1 %large_largetype . %act_large { set !v large_bod , !f , _ , %act_large set !sid !sid , % . !v , _ } gosub bod_add_smalls_to_large %large_id . %act_large !sid if #result = FILLED { gosub bod_analizza %large_id . %act_large !sid gosub bod_refresh_menu if %bod_verdict = CONSEGNARE { gosub sposta_bod %bod_id #backpackid %bod_supertype %bod_verdict %bod_destination wait 50 gosub Bod_ensure_close_gump set %act_large %act_large + 1 goto fsl_loop_fill_small } } wait 50 event sysmessage Non trovo riesco a fillarlo! goto fsl_fill_small_of_large } set !v large_bod , %index_item , _ , %act_large set %bod_id % . !v if %bod_id <> OK { finditem %bod_id c_ , #backpackid if #findkind = -1 { gosub Prendi_oggetto %bod_id %chest_filla_large 1 if #result = #false { event sysmessage Non trovo un bod che ci dovrebbe essere per forza! event sysmessage Ricomincio da capo e riprovo. goto fill_some_large_find } goto fsl_fill_small_of_large } } if %bod_id <> OK { gosub bodcraft_fill_this %bod_id if #result = #false { event sysmessage Non riesco a fillare un bod! event sysmessage Ci riprovo. goto fsl_fill_small_of_large } } set %index_item %index_item + 1 set %act_small %act_small + 1 goto fsl_fill_small_of_large fsl_exit_sub: menu set txtFILLBOD return ;sub Find_a_small sub Find_a_small set !supertype %1 set !quantity %2 set !exceptional %3 set !item_small %4 set !material_string %5 set !prop %6 set !s !item_small , : , #spc , !quantity if !s in !prop return ADDED set !return_id N/A gosub bod_find_a_small_in_container %chest_filla_large !supertype !quantity !exceptional !item_small !material_string if #result <> N/A { set %bod_id #result return FINDED } gosub bod_find_a_small_in_container #backpackid !supertype !quantity !exceptional !item_small !material_string if #result <> N/A { set %bod_id #result return FIND_TO_MOVE } set !book %obj_Fabbro_BUONI if !supertype = TAILOR set !book %obj_SARTO_BUONI gosub BODBook_find_small !book !SUPERTYPE !quantity !exceptional !item_small !material_string if #result <> #false { wait 10 gosub BODBook_GetBod #result wait 5 gosub bod_find_a_small_in_container #backpackid !supertype !quantity !exceptional !item_small !material_string if #result <> N/A { set %bod_id #result gosub Bod_ensure_close_gump return FIND_TO_MOVE } } gosub Bod_ensure_close_gump return NOTHING ;sub Get_bod_from_other_book d 0 sub Get_bod_from_other_book get_other_bodbook1: if %MOREBOOK0 < 1 return EMPTY gosub BODBook_openbook %MOREBOOK1 if #result = EMPTY return #result if %filter_cleared <> OK { set %filter_cleared OK gosub BodBook_setclearfilter } get_other_bodbook12: if #CONTNAME <> generic_gump || #contsize <> 615_454 goto get_other_bodbook1 set !r N/A set !j #jindex set !jerr #scnt + 5 gosub Click_on_gump 43 104 get_other_bodbook3: gosub antiblock for !i !j #jindex { scanjournal !i if the_bulk_order_deed_has_been_placed in #journal { set !r OK break } if there_is_not_enough_room in #sysmsg { set !r FULL break } if the_book_is_empty in #journal { set %MOREBOOK0 %MOREBOOK0 - 1 goto get_other_bodbook1 } } if !r <> N/A { gosub antiblock gosub waitForSysVars CONTNAME = generic_gump contsize = 615_454 3 gosub Bod_ensure_close_gump return !r } if #scnt < !jerr goto get_other_bodbook3 goto get_other_bodbook2 return ;sub Give_bod_to_vendor d Avvicinati_vendor AntiBlock sub Give_bod_to_vendor set !vid %1 set !bid %2 set !try_interested 0 givebod_find_bodguy: gosub Avvicinati_vendor !vid if #result = #false return #false givebod_dropbod: set !journal_gbtv #jindex exevent drag !bid gosub AntiBlock NO_ALARM_EVENT wait 5 exevent dropc !vid wait 5 set !r_gbtv N/A set !err_gbtv #scnt + 10 while !r_gbtv = N/A { for !i !journal_gbtv #jindex { scanjournal !i if I_am_not_interested_in_this. in #journal set !r_gbtv INTERESTED if You_have_not_completed_the_order_yet. in #journal set !r_gbtv #false if That_order_is_for_some_other_shopkeeper. in #journal set !r_gbtv #false if Thank_you_so_much in #journal { if %log_bod_consegnati gosub Bod_write_log %file_log_bod_consegnati set !r_gbtv #true set %last_read_journal !i } } gosub antiblock NO_ALARM_EVENT if #scnt > !err_gbtv break } if !r_gbtv = INTERESTED { set !try_interested !try_interested + 1 if !try_interested < 3 { wait 50 goto givebod_find_bodguy } else return #false } if !r_gbtv = N/A { finditem !bid c_ , #backpackid if #findkind = -1 return #false goto givebod_find_bodguy } return !r_gbtv ;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 ;fine giro bod ;resource set %Type_cloth CUI_BUI_ set %Type_leather EEG_JJG_MJG_ set %type_ingot ENK_ set %type_bones GUF_ set %type_resource %Type_bones , %Type_cloth , %Type_leather , %type_ingot ;tool set %Type_scissors JAG_KAG set %type_smith_hammer OLH_ set %type_sewing_kit HAG set %Type_ToolsSmith TLH_FBG_OBG_TBG_ , %type_smith_hammer set %Type_ToolsTailor %type_sewing_kit set %Type_ToolTinker JTL_GTL_KTL set %Type_dyetube DBG_ ;prizes set %type_prospector GBG_ set %type_minergloves BMH_XKH_KKH_ set %type_prizes_cloth BUI_ set %type_powder KEG_ set %type_runic_hammer TLH_ set %type_runic_sewing HAG_ set %type_scroll EWH_ set %type_scroll2 TWH_ set %type_sandals NVI_ set %type_pickaxe QPF_ set %type_shovel TWF_ set %type_prizes %type_prospector , %type_minergloves , %type_prizes_cloth , %type_powder set %type_prizes %type_prizes , %type_runic_hammer , %type_runic_sewing , %type_scroll set %type_prizes %type_prizes , %type_scroll2 , %type_sandals , %type_pickaxe , %type_shovel set %type_color_cloth_level1 1155_1164_1160_1162 set %type_color_cloth_level2 1173_1163_1158_1157 set %type_color_cloth_level3 1165_1168_1166_1169 set %type_color_cloth_level4 1167_1172_1156_1175 set %type_color_cloth_level5 1161_1151_1154_1150 ;vendor set %strVendor_Tailor WEAVER_TAILOR set %strVendor_Smith WEAPONSMITH_BLACKSMITH ;other set %Type_forge JBG_SOJ_ROJ_AUJ_ZTJ_CUJ_BUJ_WTJ_VTJ_KUJ_JUJ_EUJ_DUJ_ +GUJ_FUJ_QUJ_PUJ_OUJ_NUJ_YUJ_XUJ_AVJ_ZUJ_UUJ_TUJ_IVJ_ +HVJ_CVJ_BVJ_EVJ_DVJ_OVJ_NVJ set %type_dying_tube DBG ;bod set %color_bod_tailor 1155 set %color_bod_smith 1102 ;book set %type_rune_book ZBN_ set %type_bod_book DYM_ return ;sub Inizializza_contatori sub Inizializza_contatori ;varie set %cont_cicli 0 set %cont_Bod 0 set %cont_connLost 0 set %contMoney 0 ;bod set %bod_consegnati_tailor 0 set %bod_usare_tailor 0 set %bod_buono_tailor 0 set %bod_trash_tailor 0 set %bod_consegnati_smith 0 set %bod_usare_smith 0 set %bod_buono_smith 0 set %bod_trash_smith 0 return ;sub Inizializza_prize sub Inizializza_prize set %chkPrize_ . %1 #true set %Prize_ . %1 N/A set %impPrize_ . %1 #true set %chkLPrize_ . %1 #true if %0 > 1 set %chkLPrize_ . %1 %2 set %LPrize_ . %1 N/A set %impLPrize_ . %1 #false return ;sub Inizializza_variabili sub Inizializza_variabili ;version set %new_version #false set #sendHeader User-Agent: , #spc , EasyUO , #spc , #cliVer , $ set !param /pepito_easyuo/check_version.php?idscript= , %idscript , &versionscript= , %versionscript ;materiali set %material_0 IRON set %material_2419 DULL , #spc , COPPER set %material_2406 SHADOW , #spc , IRON set %material_2413 COPPER set %material_2418 BRONZE set %material_2213 GOLD set %material_2425 AGAPITE set %material_2207 VERITE set %material_2219 VALORITE set %material_0 LEATHER set %material_2220 SPINED set %material_2117 HORNED set %material_2129 BARBED ;ingot short set %ingot0 IRON set %ingot2419 DULL set %ingot2406 SHADOW set %ingot2413 COPPER set %ingot2418 BRONZE set %ingot2213 GOLD set %ingot2425 AGAPITE set %ingot2207 VERITE set %ingot2219 VALORITE ;leather short set %leather0 LEATHER set %leather2220 SPINED set %leather2117 HORNED set %leather2129 BARBED ;sandals set %color1161 FIRE set %color1151 ICEBLUE set %color1154 WHITE set %color1150 ICEWHITE set %color1167 ICEGREEN set %color1172 RED set %color1175 DARKBLUE set %color1156 BLUE ;premi gosub inizializza_prize STOFFA1 gosub inizializza_prize STOFFA2 gosub inizializza_prize STOFFA3 gosub inizializza_prize STOFFA4 gosub inizializza_prize STOFFA5 gosub inizializza_prize SMALLHIDE #false gosub inizializza_prize MEDIUMHIDE #false gosub inizializza_prize BROWNBEAR #false gosub inizializza_prize LIGHTTAPESTRY #false gosub inizializza_prize DARKTAPESTRY #false gosub inizializza_prize POLARBEAR #false gosub inizializza_prize TSOP5 #false gosub inizializza_prize TSOP10 #false gosub inizializza_prize TSOP15 #false gosub inizializza_prize TSOP20 gosub inizializza_prize KITSPINED #false gosub inizializza_prize KITHORNED gosub inizializza_prize KITBARBED gosub inizializza_prize BLESSDEED gosub inizializza_prize GLOVES1 #false gosub inizializza_prize GLOVES3 #false gosub inizializza_prize GLOVES5 #false gosub inizializza_prize POF #false gosub inizializza_prize PICKAXE gosub inizializza_prize SHOVEL gosub inizializza_prize GARGOYLE #false gosub inizializza_prize PROSPECTOR #false gosub inizializza_prize ANVIL #false gosub inizializza_prize ANVDULL gosub inizializza_prize ANVSHADOW gosub inizializza_prize ANVCOPPER gosub inizializza_prize ANVBRONZE gosub inizializza_prize ANVGOLD gosub inizializza_prize ANVAGAPITE gosub inizializza_prize ANVVERITE gosub inizializza_prize ANVVALORITE gosub inizializza_prize FSOP5 #false gosub inizializza_prize FSOP10 #false gosub inizializza_prize FSOP15 #false gosub inizializza_prize FSOP20 gosub inizializza_prize ANCIENT10 #false gosub inizializza_prize ANCIENT15 #false gosub inizializza_prize ANCIENT30 gosub inizializza_prize ANCIENT60 gosub inizializza_prize KITDULL #false gosub inizializza_prize KITSHADOW #false gosub inizializza_prize KITCOPPER #false gosub inizializza_prize KITBRONZE gosub inizializza_prize KITGOLD gosub inizializza_prize KITAGAPITE gosub inizializza_prize KITVERITE gosub inizializza_prize KITVALORITE gosub inizializza_prize SANDALFIRE gosub inizializza_prize SANDALICEBLUE gosub inizializza_prize SANDAL WHITE gosub inizializza_prize SANDALWHITE gosub inizializza_prize SANDALICEGREEN gosub inizializza_prize SANDALRED gosub inizializza_prize SANDALDARKBLUE gosub inizializza_prize SANDALBLUE set %txt_STOFFA1 STOFFA , #spc , LIV , #spc , 1 set %txt_STOFFA2 STOFFA , #spc , LIV , #spc , 2 set %txt_STOFFA3 STOFFA , #spc , LIV , #spc , 3 set %txt_STOFFA4 STOFFA , #spc , LIV , #spc , 4 set %txt_STOFFA5 STOFFA , #spc , LIV , #spc , 5 set %txt_SMALLHIDE SMALL , #spc , HIDE set %txt_MEDIUMHIDE MEDIUM , #spc , HIDE set %txt_BROWNBEAR BROWN , #spc , BEAR set %txt_LIGHTTAPESTRY LIGHT , #spc , TAP. set %txt_DARKTAPESTRY DARK , #spc , TAP. set %txt_POLARBEAR POLAR , #spc , BEAR set %txt_TSOP5 SOP , #spc , TAILOR , #spc , 105 set %txt_TSOP10 SOP , #spc , TAILOR , #spc , 110 set %txt_TSOP15 SOP , #spc , TAILOR , #spc , 115 set %txt_TSOP20 SOP , #spc , TAILOR , #spc , 120 set %txt_KITSPINED RUNIC , #spc , SPINED set %txt_KITHORNED RUNIC , #spc , HORNED set %txt_KITBARBED RUNIC , #spc , BARBED set %txt_BLESSDEED CLOTH , #spc , BLESS , #spc , DEED set %txt_GLOVES1 GLOVES , #spc , +1 set %txt_GLOVES3 GLOVES , #spc , +3 set %txt_GLOVES5 GLOVES , #spc , +5 set %txt_POF POWDER , #spc , OF , #spc , FORTIFYING set %txt_PICKAXE STURDY , #spc , PICKAXE set %txt_SHOVEL STURDY , #spc , SHOVEL set %txt_GARGOYLE GARGOYLE , #spc , PICKAXE set %txt_PROSPECTOR PROSPECTOR'S , #spc , TOOL set %txt_ANVDULL ANVIL , #spc , DULL set %txt_ANVSHADOW ANVIL , #spc , SHADOW set %txt_ANVCOPPER ANVIL , #spc , COPPER set %txt_ANVBRONZE ANVIL , #spc , BRONZE set %txt_ANVGOLD ANVIL , #spc , GOLD set %txt_ANVAGAPITE ANVIL , #spc , AGAPITE set %txt_ANVVERITE ANVIL , #spc , VERITE set %txt_ANVVALORITE ANVIL , #spc , VALORITE set %txt_FSOP5 SOP , #spc , BLACK , #spc , 105 set %txt_FSOP10 SOP , #spc , BLACK , #spc , 110 set %txt_FSOP15 SOP , #spc , BLACK , #spc , 115 set %txt_FSOP20 SOP , #spc , BLACK , #spc , 120 set %txt_ANCIENT10 ANCIENT , #spc , +10 set %txt_ANCIENT15 ANCIENT , #spc , +15 set %txt_ANCIENT30 ANCIENT , #spc , +30 set %txt_ANCIENT60 ANCIENT , #spc , +60 set %txt_KITDULL RUNIC , #spc , DULL set %txt_KITSHADOW RUNIC , #spc , SHADOW set %txt_KITCOPPER RUNIC , #spc , COPPER set %txt_KITBRONZE RUNIC , #spc , BRONZE set %txt_KITGOLD RUNIC , #spc , GOLD set %txt_KITAGAPITE RUNIC , #spc , AGAPITE set %txt_KITVERITE RUNIC , #spc , VERITE set %txt_KITVALORITE RUNIC , #spc , VALORITE set %txt_sandal . %color1161 FIRE set %txt_sandal . %color1151 ICE , #spc , BLUE set %txt_sandal . %color1154 WHITE set %txt_sandal . %color1150 ICE , #spc , WHITE set %txt_sandal . %color1167 ICE , #spc , GREEN set %txt_sandal . %color1172 RED set %txt_sandal . %color1175 DARK , #spc , BLUE set %txt_sandal . %color1156 BLUE set %USA_TINKER #true set %ita_SMITH FABBRO set %ita_TAILOR SARTO ;file log set %file_log_bod_trash LOG_Bod_Trashed.txt set %file_log_bod_buono LOG_Bod_Buoni.txt set %file_log_bod_consegnati LOG_Bod_Consegnati.txt set %file_log_divisore , send HTTPPost pepitoweb.altervista.org !param R ;event ExMsg #CHARID 3 40 DISABILTATO CHECK VERSION IN Inizializza_variabili return ;sub Loop_debug d set_menu_azione sub Loop_debug gosub set_menu_azione DEBUG LOOP set #MENUBUTTON N/A while #true { wait 5 if #MENUBUTTON <> N/A { if #menubutton = SISTEMA_ZAINO { set #MENUBUTTON N/A if %chest_trash = N/A gosub get_trash gosub bod_check_interrupted gosub bodcraft_emptyAvanzi gosub bodcraft_emptyMaterial gosub sistema_premi gosub bodcraft_emptyTools gosub svuota_container #backpackid event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = SISTEMA_PREMI { set #MENUBUTTON N/A if %chest_trash = N/A gosub get_trash gosub sistema_premi event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = SISTEMA_TOOLS { set #MENUBUTTON N/A gosub bodcraft_emptyTools event ExMsg #CHARID 3 40 FATTO gosub set_menu_azione DEBUG LOOP } if #menubutton = SVUOTA_CONTAINER { set #MENUBUTTON N/A event exmsg #charid 3 %menu_col_i Targhetta un oggetto che contiene BOD da Svuotare gosub Set_Menu_Mex CLICCA SU UN OGGETTO DA SVUOTARE ALL' AVVIO DELLO SCRIPT $ NESSUN CONTROLLO SULL'OGGETTO SELEZIONATO $ QUINDI OCCHIO A QUELLO CHE SELEZIONI gosub targetta_oggetto set !oggid #result if !oggid <> N/A { gosub svuota_container !oggid event ExMsg #CHARID 3 40 FATTO } gosub set_menu_azione DEBUG LOOP } if MAKE_TOOLS_ in #menubutton { set !v tailor if SMITH in #menubutton set !v smith set #MENUBUTTON N/A gosub maketools !v event ExMsg #CHARID 3 %menu_col_ok FATTO } if #menubutton = ANALIZZA_BOD { set #MENUBUTTON N/A event exmsg #charid 3 %menu_col_i Targhetta un BOD da Fillare gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid if #findkind <> -1 && #findtype = %type_bod { gosub bod_analizza !oggid gosub bod_refresh_menu gosub bod_write_log DISPLAY } else event ExMsg #CHARID 3 %menu_col_ko DEVE ESSERE UN BOD } gosub set_menu_azione DEBUG LOOP } if #menubutton = FILLA_BOD { set #MENUBUTTON N/A event exmsg #charid 3 %menu_col_i Targhetta un BOD da Fillare gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid c_ , #backpackid if #findkind <> -1 && #findtype = %type_bod { gosub bodcraft_fill_this !oggid if #result event ExMsg #CHARID 3 %menu_col_ok FATTO %bod_verdict else event ExMsg #CHARID 3 %menu_col_ko NON FILLATO %bod_verdict } else event ExMsg #CHARID 3 %menu_col_ko DEVE ESSERE UN BOD E DEVE ESSERE DENTRO LO ZAINO } gosub set_menu_azione DEBUG LOOP } if #menubutton = PRENDI_BOD_BODBOOK { set #MENUBUTTON N/A event exmsg #charid 3 %menu_col_i Targhetta un Bod Book gosub targetta_oggetto set !oggid #result if !oggid <> N/A { finditem !oggid c_ , #backpackid if #findkind <> -1 { if #findtype in %type_bod_book { gosub get_bod_from_book !oggid #true event ExMsg #CHARID 3 %menu_col_i #result gosub set_menu_azione DEBUG LOOP } else { event ExMsg #CHARID 3 %menu_col_ko NON SEMBRA UN BODBOOK gosub set_menu_azione DEBUG LOOP } } else { event ExMsg #CHARID 3 %menu_col_ko NON SEMBRA UN BODBOOK gosub set_menu_azione DEBUG LOOP } } gosub set_menu_azione DEBUG LOOP } if #menubutton = CONTA_RISORSE { set #MENUBUTTON N/A gosub Torna_a_Casa if #result { gosub conta_risorse event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 NON RIESCO A TORNARE A CASA } gosub set_menu_azione DEBUG LOOP } if #menubutton = TORNA_A_CASA { set #MENUBUTTON N/A gosub Torna_a_Casa if #result { gosub sposta_loot event ExMsg #CHARID 3 40 FATTO } else { event ExMsg #CHARID 3 40 NON RIESCO } gosub set_menu_azione DEBUG LOOP } if #menubutton = 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 } } return ;sub Menu_crea_avvio sub Menu_crea_avvio set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 10 set !x !xb + 25 set !w !wb - 50 gosub Menu_Crea_Box !x !y !w 56 IMPOSTAZIONI if %pepito_alarm = N/A set %pepito_alarm #false menu font size 6 set !x !xb + !wb - 39 set !y !yb + 10 Menu Check chkpepito_alarm !x !y 12 12 %pepito_alarm set !x !xb + !wb - 70 set !y !yb + 11 Menu text txt !x !y ALARM menu font color silver menu font size 7 set !y !y + 16 set !x !xb + 30 menu text txt !x !y MAGIA menu font color white set !x !xb + 80 if %magia_usata = mager menu text txt !x !y RECALL else menu text txt !x !y SACRED JOURNEY if %use_ancient_hammer = #true { set !x !xb + 175 menu font color $55FF55 menu font size 6 menu text txt !x !y USA ANCIENT HAMMER menu font size 7 } menu font color silver set !y !y + 11 set !x !xb + 30 menu text txt !x !y TINKER set !x !xb + 80 set %crea_tool #False if %USA_TINKER { gosub Get_skill_val tink if %skill_tink < 400 { menu font color gray menu text txt !x !y NON SUFFICIENTE } else { menu font color white menu text txt !x !y SI set %crea_tool #TRUE } } 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 set !v1 %RB_Restock set !v2 %RB_Fabbro set !v3 %RB_Sarto set !v4 %obj_generico set !v5 %obj_sarto set !v6 %obj_fabbro set !v7 %obj_sarto_buoni set !v8 %obj_fabbro_buoni set !v #True for !cs 1 8 { gosub check_object !v . !cs #backpackid if #result = #false set !v #result } if !v = #FALSE { set %menu_valido_AVVIO #FALSE menu font color RED } if !v menu text txt !x !y OK else menu text txt !x !y ERROR if %menu_valido_AVVIO menu font bgcolor $002222 else menu font bgcolor $000088 set !x !xb + 218 set !y !yb + 48 menu font size 6 menu Button BUT_MENU1 !x !y 50 16 REFRESH menu font size 7 if %menu_valido_AVVIO { set !y !yb + !hb / 2 + 19 set !x !xb + !wb / 2 - 100 menu font size 6 menu font bgcolor $222222 menu font color silver menu font style B menu button butDebug !x !y 200 15 DEBUG START set !y !yb + !hb / 2 - 45 menu button butFillLarge !x !y 200 15 PARTI FILLANDO I LARGE NEL BACKPACK set !y !yb + !hb / 2 - 30 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 menu font color silver menu font bgcolor $002222 set !x !xb + 15 set !y !yb + !hb / 2 + 59 Menu font size 6 if %svuotabod = N/A set %svuotabod #false Menu Check chkSvuotaBod !x !y 203 15 %svuotabod ALL' AVVIO SVUOTA E SISTEMA I BOD DENTRO Menu font size 5 set !x !xb + 15 + 252 menu button butSvuotaBod !x !y 18 15 SET Menu font size 6 set !x !xb + 15 + 206 set !y !y + 2 menu font color white menu text txtSvuotaBod !x !y %objSvuotaBod } 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_book d Menu_Crea_Box Menu_Crea_Linea_Rune_Book Menu_validate_book sub Menu_crea_book set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 8 set !x1 !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x1 !y !w 86 RUNE BOOK RESTOCK set !y !y + 17 set %OBJFILTER_GENERICO %type_bod_book gosub Menu_crea_linea_object !x1 !y !w #true GENERICO DA_FILLARE D N/A set !y !y + 12 set %OBJFILTER_SARTO %type_bod_book gosub Menu_crea_linea_object !x1 !y !w #true SARTO DA_CONSEGNARE D N/A set !y !y + 12 set %OBJFILTER_FABBRO %type_bod_book gosub Menu_crea_linea_object !x1 !y !w #true FABBRO DA_CONSEGNARE D N/A set !y !y + 12 set %OBJFILTER_SARTO_BUONI %type_bod_book gosub Menu_crea_linea_object !x1 !y !w #true SARTO_BUONI DA_TENERE D N/A set !y !y + 12 set %OBJFILTER_FABBRO_BUONI %type_bod_book gosub Menu_crea_linea_object !x1 !y !w #true FABBRO_BUONI DA_TENERE D N/A set !y !y + 20 menu font bgcolor $002222 menu font color white set !x1 !x1 + 25 if %chkMOREBOOK = N/A set %chkMOREBOOK #false menu check chkMOREBOOK !x1 !y 250 20 %chkMOREBOOK FILLA ANCHE I BOD NEI BODBOOK NOMINATI 'FILLARE' 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 IN GENERICO CI VANNO I BOD DA CONTROLLARE E FILLARE $ IN DA CONSEGNARE I BOD GIA FILLATI DA CONSEGNARE $ IN DA TENERE QUELLI DA CONSERVARE gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_gestione_bod d Menu_Crea_Box Menu_validate_gestione_bod sub Menu_crea_gestione_bod set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 8 set !x !xb + 5 set !w !wb - 10 if %menu_display_premi = N/A set %menu_display_premi SARTO if %menu_display_premi = FABBRO gosub Menu_Crea_Box !x !y !w 158 PREMI %menu_display_premi else gosub Menu_Crea_Box !x !y !w 110 PREMI %menu_display_premi menu font bgcolor $004444 menu font color yellow menu font size 6 set !y1 !yb + 8 set !x1 !x + !w - 70 if %menu_display_premi = FABBRO menu button butChangeDisplayGestioneBod !x1 !y1 70 13 VEDI SARTO else menu button butChangeDisplayGestioneBod !x1 !y1 70 13 VEDI FABBRO if %menu_display_premi = FABBRO goto Menu_crea_gestionepremi_point1 ;stoffe set !yv !y + 15 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_gestione_premio !xv !yv !wv SMALLHIDE SMALL_HIDE 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv MEDIUMHIDE MDIUM_HIDE 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv BROWNBEAR BROWN_BEAR 6 set !xv !w / 2 + 12 set !yv !y + 15 gosub Menu_crea_linea_gestione_premio !xv !yv !wv LIGHTTAPESTRY LIGHT_TAP. 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv DARKTAPESTRY DARK_TAP. 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv POLARBEAR POLAR_BEAR 6 ;sop set !yv !y + 55 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_gestione_premio !xv !yv !wv TSOP5 SOP_+5 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv TSOP10 SOP_+10 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv TSOP15 SOP_+15 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv TSOP20 SOP_+20 6 ;kit e bless set !xv !w / 2 + 12 set !yv !y + 55 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITSPINED KIT_SPINED 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITHORNED KIT_HORNED 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITBARBED KIT_BARBED 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv BLESSDEED BLESS_DEED 6 ;bones set !y !yb + 120 set !x !xb + 5 set !w !wb - 10 menu font color yellow gosub Menu_Crea_Box !x !y !w 67 BONES BOD menu font bgcolor $004444 menu font color white menu font size 5 set !xt !x + 75 set !yt !y + 2 menu text txt !xt !yt COSA FARE CON QUELLI SMALL DA NON CONSERVARE? menu font size 6 set !xt !xb set !yt !yb + 136 set !wt !w - 10 set !t BOD , #spc , BONES , #spc , IN , #spc , NORMAL , #spc , HIDES gosub Menu_Crea_Choise !xt !yt !wt #false BONESNORMAL USARE_BUTTARE USARE !t 6 set !xt !xb set !yt !yb + 148 set !wt !w - 10 set !t BOD , #spc , BONES , #spc , IN , #spc , SPINED , #spc , HIDES gosub Menu_Crea_Choise !xt !yt !wt #false BONESSPINED USARE_BUTTARE USARE !t 6 set !xt !xb set !yt !yb + 160 set !wt !w - 10 set !t BOD , #spc , BONES , #spc , IN , #spc , HORNED , #spc , HIDES gosub Menu_Crea_Choise !xt !yt !wt #false BONESHORNED USARE_BUTTARE USARE !t 6 set !xt !xb set !yt !yb + 172 set !wt !w - 10 set !t BOD , #spc , BONES , #spc , IN , #spc , BARBED , #spc , HIDES gosub Menu_Crea_Choise !xt !yt !wt #false BONESBARBED USARE_BUTTARE USARE !t 6 goto Menu_crea_gestionepremi_point2 Menu_crea_gestionepremi_point1: ;qui creo il menu fabbro ;minori: gloves, pof, tool set !yv !y + 15 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_gestione_premio !xv !yv !wv GLOVES3 GLOVES_+3 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv GLOVES5 GLOVES_+5 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv POF POF 6 set !xv !w / 2 + 12 set !yv !y + 15 gosub Menu_crea_linea_gestione_premio !xv !yv !wv GARGOYLE GARGOYLE 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv PROSPECTOR PROSPECTOR 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv ANVIL ANVIL 6 ;sop set !yv !y + 55 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_gestione_premio !xv !yv !wv FSOP5 SOP_+5 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv FSOP10 SOP_+10 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv FSOP15 SOP_+15 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv FSOP20 SOP_+20 6 ;ancient set !xv !w / 2 + 12 set !yv !y + 55 gosub Menu_crea_linea_gestione_premio !xv !yv !wv ANCIENT10 ANCIENT+10 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv ANCIENT15 ANCIENT+15 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv ANCIENT30 ANCIENT+30 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv ANCIENT60 ANCIENT+60 6 ;KIT set !yv !y + 107 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITDULL KIT_DULL 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITSHADOW KIT_SHADOW 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITCOPPER KIT_COPPER 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITBRONZE KIT_BRONZE 6 set !xv !w / 2 + 12 set !yv !y + 107 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITGOLD KIT_GOLD 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITAGAPITE KIT_AGAPITE 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITVERITE KIT_VERITE 6 set !yv !yv + 12 gosub Menu_crea_linea_gestione_premio !xv !yv !wv KITVALORITE KIT_VALOR. 6 ;bones set !y !yb + 168 set !x !xb + 5 set !w !wb - 10 menu font color yellow gosub Menu_Crea_Box !x !y !w 75 PLATEMAIL BOD menu font bgcolor $004444 menu font color white menu font size 5 set !xt !x + 105 set !yt !y + 2 menu text txt !xt !yt COSA FARE CON GLI SMALL DA NON CONSERVARE? menu font size 6 set !xt !xb set !yt !yb + 184 set !wt ( !w - 10 ) / 2 set !t IN , #spc , IRON gosub Menu_Crea_Choise !xt !yt !wt #false PLATENORMAL USARE_BUTTARE USARE !t 6 110 set !xt !xb + ( !w - 10 ) / 2 + 10 set !yt !yb + 184 set !wt ( !w - 10 ) / 2 set !t IN , #spc , DULL , #spc , COPPER gosub Menu_Crea_Choise !xt !yt !wt #false PLATEDULL USARE_BUTTARE USARE !t 6 110 set !xt !xb set !yt !yb + 195 set !wt ( !w - 10 ) / 2 set !t IN , #spc , SHADOW gosub Menu_Crea_Choise !xt !yt !wt #false PLATESHADOW USARE_BUTTARE USARE !t 6 110 set !xt !xb + ( !w - 10 ) / 2 + 10 set !yt !yb + 195 set !wt ( !w - 10 ) / 2 set !t IN , #spc , COPPER gosub Menu_Crea_Choise !xt !yt !wt #false PLATECOPPER USARE_BUTTARE USARE !t 6 110 set !xt !xb set !yt !yb + 206 set !wt ( !w - 10 ) / 2 set !t IN , #spc , BRONZE gosub Menu_Crea_Choise !xt !yt !wt #false PLATEBRONZE USARE_BUTTARE USARE !t 6 110 set !xt !xb + ( !w - 10 ) / 2 + 10 set !yt !yb + 206 set !wt ( !w - 10 ) / 2 set !t IN , #spc , GOLD gosub Menu_Crea_Choise !xt !yt !wt #false PLATEGOLD USARE_BUTTARE USARE !t 6 110 set !xt !xb set !yt !yb + 217 set !wt ( !w - 10 ) / 2 set !t IN , #spc , AGAPITE gosub Menu_Crea_Choise !xt !yt !wt #false PLATEAGAPITE USARE_BUTTARE USARE !t 6 110 set !xt !xb + ( !w - 10 ) / 2 + 10 set !yt !yb + 217 set !wt ( !w - 10 ) / 2 set !t IN , #spc , VERITE gosub Menu_Crea_Choise !xt !yt !wt #false PLATEVERITE USARE_BUTTARE USARE !t 6 110 set !xt !xb set !yt !yb + 228 set !wt ( !w - 10 ) / 2 set !t IN , #spc , VALORITE gosub Menu_Crea_Choise !xt !yt !wt #false PLATEVALORITE USARE_BUTTARE USARE !t 6 110 Menu_crea_gestionepremi_point2: ;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 6 menu font color yellow set !y ( !yb + !hb - 26 ) set !x !xb + 2 menu text txt !x !y SARANNO CONSERVATI I BOD CHE COMPONGONO I LARGE CHE DANNO I set !y ( !yb + !hb - 18 ) menu text txt !x !y PREMI SELEZIONATI. SOTTOLINEATO IN GIALLO IL LARGE CHE DA QUEL set !y ( !yb + !hb - 10 ) menu text txt !x !y PREMIO SARA TENUTO A PRESCINDERE SE SELEZIONATO O MENO. set !y ( !yb + !hb - 39 ) menu font color silver menu text txt !x !y DEFAULT STA PER I BOD BOOK SELEZIONATI COME 'DA TENERE' gosub Set_Menu_Mex DEFAULT SETTA I PREMI CHE VUOI TENERE SELEZIONANDOLI $ IMPOSTA CASSE SPECIFICHE CLICCANDO SULLA VOCE '*' RELATIVA $ IMPOSTA COSA FARE IN CASO DI CASSA PIENA CON IL '!' RELATIVO gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_premi d Menu_Crea_Box Menu_validate_premi Menu_crea_linea_premio sub Menu_crea_premi set !xb %1 set !yb %2 set !wb %3 set !hb %4 set !y !yb + 8 set !x !xb + 5 set !w !wb - 10 if %menu_display_premi = N/A set %menu_display_premi SARTO gosub Menu_Crea_Box !x !y !w 250 PREMI %menu_display_premi menu font bgcolor $004444 menu font color yellow menu font size 6 set !y1 !yb + 8 set !x1 !x + !w - 70 if %menu_display_premi = FABBRO menu button butChangeDisplayPremi !x1 !y1 70 13 VEDI SARTO else menu button butChangeDisplayPremi !x1 !y1 70 13 VEDI FABBRO if %menu_display_premi = FABBRO goto Menu_crea_premi_point1 ;stoffe set !yv !y + 15 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv STOFFA1 STOFFA_LIV_1 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv STOFFA2 STOFFA_LIV_2 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv STOFFA3 STOFFA_LIV_3 6 set !xv !w / 2 + 12 set !yv !y + 15 gosub Menu_crea_linea_premio !xv !yv !wv STOFFA4 STOFFA_LIV_4 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv STOFFA5 STOFFA_LIV_5 6 ;decorativi set !yv !y + 55 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv SMALLHIDE SMALL_HIDE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv MEDIUMHIDE MDIUM_HIDE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv BROWNBEAR BROWN_BEAR 6 set !xv !w / 2 + 12 set !yv !y + 55 gosub Menu_crea_linea_premio !xv !yv !wv LIGHTTAPESTRY LIGHT_TAP. 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv DARKTAPESTRY DARK_TAP. 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv POLARBEAR POLAR_BEAR 6 ;sandali set !yv !y + 95 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv SANDALFIRE S.FIRE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SANDALICEBLUE S.ICEBLUE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SANDALWHITE S.WHITE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SANDALICEWHITE S.ICEWHITE 6 set !xv !w / 2 + 12 set !yv !y + 95 gosub Menu_crea_linea_premio !xv !yv !wv SANDALICEGREEN S.ICEGREEN 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SANDALRED S.RED 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SANDALDARKBLUE S.DARKBLUE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SANDALBLUE S.BLUE 6 ;sop set !yv !y + 147 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv TSOP5 SOP_+5 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv TSOP10 SOP_+10 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv TSOP15 SOP_+15 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv TSOP20 SOP_+20 6 ;kit e bless set !xv !w / 2 + 12 set !yv !y + 147 gosub Menu_crea_linea_premio !xv !yv !wv KITSPINED KIT_SPINED 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITHORNED KIT_HORNED 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITBARBED KIT_BARBED 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv BLESSDEED BLESS_DEED 6 goto Menu_crea_premi_point2 Menu_crea_premi_point1: ;qui creo il menu fabbro ;minori: gloves, pof, tool set !yv !y + 15 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv GLOVES1 GLOVES_+1 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv GLOVES3 GLOVES_+3 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv GLOVES5 GLOVES_+5 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv POF POF 6 set !xv !w / 2 + 12 set !yv !y + 15 gosub Menu_crea_linea_premio !xv !yv !wv PICKAXE ST._PICKAXE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv SHOVEL ST._SHOVEL 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv GARGOYLE GARGOYLE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv PROSPECTOR PROSPECTOR 6 ;anvil set !yv !y + 67 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv ANVDULL ANV_DULL 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANVSHADOW ANV_SHADOW 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANVCOPPER ANV_COPPER 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANVBRONZE ANV_BRONZE 6 set !xv !w / 2 + 12 set !yv !y + 67 gosub Menu_crea_linea_premio !xv !yv !wv ANVGOLD ANV_GOLD 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANVAGAPITE ANV_AGAPITE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANVVERITE ANV_VERITE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANVVALORITE ANV_VALOR. 6 ;sop set !yv !y + 119 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv FSOP5 SOP_+5 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv FSOP10 SOP_+10 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv FSOP15 SOP_+15 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv FSOP20 SOP_+20 6 ;ancient set !xv !w / 2 + 12 set !yv !y + 119 gosub Menu_crea_linea_premio !xv !yv !wv ANCIENT10 ANCIENT+10 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANCIENT15 ANCIENT+15 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANCIENT30 ANCIENT+30 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv ANCIENT60 ANCIENT+60 6 ;KIT set !yv !y + 171 set !xv !x + 4 set !wv !w / 2 - 8 gosub Menu_crea_linea_premio !xv !yv !wv KITDULL KIT_DULL 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITSHADOW KIT_SHADOW 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITCOPPER KIT_COPPER 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITBRONZE KIT_BRONZE 6 set !xv !w / 2 + 12 set !yv !y + 171 gosub Menu_crea_linea_premio !xv !yv !wv KITGOLD KIT_GOLD 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITAGAPITE KIT_AGAPITE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITVERITE KIT_VERITE 6 set !yv !yv + 12 gosub Menu_crea_linea_premio !xv !yv !wv KITVALORITE KIT_VALOR. 6 Menu_crea_premi_point2: ;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 6 menu font color yellow set !y ( !yb + !hb - 18 ) set !x !xb + 2 menu text txt !x !y IN CASO DI CHEST PIENA I PREMI SOTTOLINEATI IN GIALLO PROVOCHE- set !y ( !yb + !hb - 10 ) menu text txt !x !y RANNO L'ARRESTO DELLO SCRIPT. ALTRIMENTI SARANNO BUTTATI VIA. set !y ( !yb + !hb - 29 ) menu font color silver menu text txt !x !y DEFAULT STA PER LA CASSA PREMI SETTATA NELL' AREA RESTOCK gosub Set_Menu_Mex DEFAULT SETTA I PREMI CHE VUOI TENERE SELEZIONANDOLI $ IMPOSTA CASSE SPECIFICHE CLICCANDO SULLA VOCE '*' RELATIVA $ IMPOSTA COSA FARE IN CASO DI CASSA PIENA CON IL '!' RELATIVO gosub Set_Menu_Azione ATTENDO return ;sub Menu_crea_restock d Menu_Crea_Box Menu_Crea_Linea_Rune_Book Menu_validate_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 SARTO set !y !y + 17 gosub Menu_Crea_Linea_Rune_Book !x !y !w Sarto set !y !yb + 88 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 36 RUNE BOOK FABBRO set !y !y + 17 gosub Menu_Crea_Linea_Rune_Book !x !y !w Fabbro set !y !yb + 128 set !x !xb + 5 set !w !wb - 10 gosub Menu_Crea_Box !x !y !w 107 POSIZIONE E CONTENITORI set !x !xb + 5 set !y !y + 17 gosub Menu_Crea_Linea_Position !x !y !w RESTOCK set !x !xb + 5 set !y !y + 13 gosub Menu_Crea_Linea_Chest !x !y !w #True BASE set !x !xb + 5 set !y !y + 13 gosub Menu_Crea_Linea_Bag !x !y !w #True TRASH_TEMPORANEO 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 PREMI 6 set !x !xb + 5 set !y !y + 10 gosub Menu_Crea_Linea_Chest !x !y !w #False FILLA_LARGE 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 I RUNEBOOK PER ANDARE DAL SARTO E DAL FABBRO $ 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 60 CONNECTION LOST menu font color Silver menu font size 6 set !x !xb + 15 set !yt !y + 16 menu text txt !x !yt NUMERO PG NELL' ACCOUNT set !x !xb + 228 set !yt !y + 16 menu font bgcolor $002222 if %mycharnum = N/A set %mycharnum 0 menu Edit edtMyCharNum !x !yt 16 %MyCharNum set !x !xb + 15 set !yt !y + 24 menu font size 5 menu text txt !x !yt PG USATO PER RICONNETTERSI DOPO UN CONNECTION LOST set !x !xb + 15 set !y !y + 39 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 + 182 set !y !y + 2 menu text txt !x !y E LE set !x !xb + 139 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 + 202 menu font size 6 if %sospendia = N/A set %sospendia 070500 menu Edit edtSospendia !x !y 40 %sospendia set !y !yb + 69 set !x !xb + 5 set !w !wb - 10 menu font color white gosub Menu_Crea_Box !x !y !w 37 TEST BOD menu font color Silver menu font size 6 set !x !xb + 15 set !yt !y + 16 menu text txt !x !yt PROVA AD ANALIZZARE UN BOD set !x !xb + 225 menu button butTestBod !x !yt 60 18 TEST BOD set !x !xb + 15 set !yt !y + 24 menu font size 5 menu text txt !x !yt ANALIZZA E MOSTRA IL RISULTATO DI UNA VALUTAZIONE set !y !yb + 108 set !x !xb + 5 set !w !wb - 10 menu font color white gosub Menu_Crea_Box !x !y !w 49 FILE LOG menu font color Silver menu font size 6 set !x !xb + 15 set !yt !y + 16 if %log_bod_consegnati = N/A set %log_bod_consegnati #false Menu Check chklog_bod_consegnati !x !yt 150 10 %log_bod_consegnati SCRIVI LOG BOD CONSEGNATI set !yt !y + 26 if %log_bod_buono = N/A set %log_bod_buono #false Menu Check chklog_bod_buono !x !yt 150 10 %log_bod_buono SCRIVI LOG BOD BUONI set !yt !y + 36 if %log_bod_trash = N/A set %log_bod_trash #false Menu Check chklog_bod_trash !x !yt 150 10 %log_bod_trash SCRIVI LOG BOD TRASH set !y !yb + 160 set !x !xb + 5 set !w !wb - 10 menu font bgcolor $002222 menu font color white gosub Menu_Crea_Box !x !y !w 40 TINKER menu font color Silver menu font size 6 set !x !xb + 15 set !y !y + 18 if %USA_TINKER = N/A set %USA_TINKER #TRUE Menu Check chkUSA_TINKER !x !y 270 15 %USA_TINKER USA TINKERING PER STRUMENTI SE POSSIBILE set !y !yb + 202 set !x !xb + 5 set !w !wb - 10 menu font bgcolor $002222 menu font color white gosub Menu_Crea_Box !x !y !w 64 ANCIENT HAMMER menu font color Silver menu font size 6 set !x !xb + 15 set !y !y + 18 if %use_ancient_hammer = N/A set %use_ancient_hammer #False if %use_ancient_10 = N/A set %use_ancient_10 #False if %use_ancient_15 = N/A set %use_ancient_15 #False if %use_ancient_30 = N/A set %use_ancient_30 #False Menu Check chkuse_ancient_10 !x !y 270 15 %use_ancient_10 USA ANCIENT +10 PER CRAFTARE PLATEMAIL set !y !y + 13 Menu Check chkuse_ancient_15 !x !y 270 15 %use_ancient_15 USA ANCIENT +15 PER CRAFTARE PLATEMAIL set !y !y + 13 Menu Check chkuse_ancient_30 !x !y 270 15 %use_ancient_30 USA ANCIENT +30 PER CRAFTARE PLATEMAIL menu font size 7 menu font color yellow set !y ( !yb + !hb - 15 ) set !x !xb + 18 menu text txt !x !y NB: GLI ELEMENTI IN GIALLO SONO OBBLIGATORI gosub Set_Menu_Mex DEFAULT SETTA LE ULTIME IMPOSTAZIONI gosub Set_Menu_Azione ATTENDO return ;sub Menu_loop sub Menu_loop set #MENUBUTTON N/A Menu_Loop_Ciclo: if #MENUBUTTON = N/A goto Menu_Loop_Ciclo ;selezionato pulsante if BUT_MENU in #menubutton { set !nomesub Menu_Validate_ , %BUT_MENU . %menu_lastsel gosub !nomesub if #result <> #false { gosub Split #menubutton BUT_MENU set %menu_sel %strright gosub Menu_Crea set %menu_lastsel %menu_sel } set #MENUBUTTON N/A goto Menu_Loop_Ciclo } ;giro_bod gosub Menu_Giro_Bod_Loop if #result goto Menu_Loop_Ciclo ;alarm gosub Menu_alarm_Loop if #result goto Menu_Loop_Ciclo ;site if #menubutton = butGoSite { display yesno Informazioni sullo script disponibili sul Web $ Vuoi apripre la pagina Web ? if #dispRes = yes { set !web http://pepitoweb.altervista.org/pepito_easyuo/index.php?idscript= , %idscript , &versionscript= , %versionscript execute !web } set #MENUBUTTON N/A goto Menu_Loop_Ciclo } ;other_ if #menubutton = butTestBod { event exmsg #charid 3 %menu_col_i Seleziona il Bod da analizzare. gosub Targetta_oggetto if #result <> N/A { gosub bod_analizza #result if #result = #false display ok Non mi sembra un BOD else { set !r %bod_id , #spc , [ID] , $ set !r !r , %bod_supertype , #spc , [SUPERTYPE] , $ set !r !r , %bod_size , #spc , [SIZE] , $ if %Bod_Exceptional set !r !r , EXCEPTIONAL , #spc , [EXCEPTIONAL] , $ else set !r !r , NORMAL , #spc , [EXCEPTIONAL] , $ set !r !r , %bod_quantity , #spc , [QUANTITY] , $ if %bod_size = SMALL { set !r !r , %bod_AlredyMadeQuantity , #spc , [ALREADYMADEQUANTITY] , $ set !r !r , %Bod_ToMakeQuantity , #spc , [TOMAKEQUANTITY] , $ set !r !r , %bod_material , #spc , [MATERIAL] , $ set !r !r , %bod_category , - , %bod_piece , #spc , [CATEGORY , - , PIECE] , $ if %bod_supertype = TAILOR { set !r !r , %bod_cloth , #spc , [CLOTH] , $ set !r !r , %bod_hides , #spc , [HIDES] , $ set !r !r , %bod_bones , #spc , [BONES] , $ } else { set !r !r , %bod_ingots , #spc , [INGOTS] , $ } set !r !r , %bod_type , #spc , [TYPE] , $ } else { for !f 1 %bod_largeType { set !r !r , %bod_item . !f , #spc , [ITEM , !f , ] , $ set !r !r , %bod_material . !f , #spc , [MATERIAL , !f , ] , $ } } set !r !r , %bod_name , #spc , [NAME] , $ set !r !r , %bod_largeSet , #spc , [LARGESET] , $ set !r !r , %bod_largeType , #spc , [LARGETYPE] , $ set !r !r , %bod_largePrize , #spc , [LARGEPRIZE] , $ set !r !r , %bod_Verdict , #spc , [VERDICT] , $ set !r !r , %bod_destination , #spc , [DESTINATION] , $ display ok !r } } set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if butPrizeSet_ in #menubutton { gosub Split #menubutton butPrizeSet_ set %id_object %strright gosub Menu_Set_Chest %id_object G 2 RESTOCK if #result = N/A && %Prize_ . %id_object <> N/A { display yesno Vuoi impostare la cassa %id_object a quella di DEFAULT? if #dispres = NO { set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } } if #result = %chest_premi set #result N/A set %Prize_ . %id_object #Result if %Prize_ . %id_object = N/A menu set txtPrize_ . %id_object DEFAULT else menu set txtPrize_ . %id_object %Prize_ . %id_object set !nomevar Prize_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butLPrizeSet_ in #menubutton { gosub Split #menubutton butLPrizeSet_ set %id_object %strright gosub Set_Menu_Mex CLICCA SU UN BOD BOOK DENTRO IL TUO ZAINO $ I BOD CHE DANNO QUESTO PREMIO SARANNO MESSI LI event exmsg #charid 3 %menu_col_i CLICCA SU UN BOD BOOK DENTRO IL TUO ZAINO gosub targetta_oggetto if #result = N/A && %LPrize_ . %id_object <> N/A { display yesno Vuoi impostare il bod book a quella di DEFAULT? if #dispres = NO { set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } } else { if #result <> N/A { finditem #result c_ , #backpackid if #findkind = -1 || #findtype notin %type_bod_book { display ok Devi targhettare un Bod Book e questo deve essere dentro lo zaino. set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } } } set %LPrize_ . %id_object #Result if %LPrize_ . %id_object = N/A menu set txtLPrize_ . %id_object DEFAULT else menu set txtLPrize_ . %id_object %LPrize_ . %id_object set !nomevar LPrize_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butPrizeMode_ in #menubutton { gosub Split #menubutton butPrizeMode_ set %id_object %strright set %impPrize_ . %id_object ! %impPrize_ . %id_object if %impPrize_ . %id_object menu set txtPrizeUnder_ . %id_object _______ else menu set txtPrizeUnder_ . %id_object set !nomevar impPrize_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butLPrizeMode_ in #menubutton { gosub Split #menubutton butLPrizeMode_ set %id_object %strright set %impLPrize_ . %id_object ! %impLPrize_ . %id_object if %impLPrize_ . %id_object menu set txtLPrizeUnder_ . %id_object _______ else menu set txtLPrizeUnder_ . %id_object set !nomevar impLPrize_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butOBJ_ in #menubutton { gosub Split #menubutton butOBJ_ set %id_object %strright gosub Menu_Set_Object %id_object %objdest_ . %id_object %objdest2_ . %id_object BACKPACK if #result <> N/A { if %OBJFILTER_ . %id_object = N/A || #findtype in %OBJFILTER_ . %id_object { set %OBJ_ . %id_object #Result menu set txtObj_ . %id_object %obj_ . %id_object set !nomevar obj_ , %id_object gosub GlobalVar_put %idscript !nomevar } else display ok Oggetto non valido come %id_object } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetOBJ_ in #menubutton { gosub Split #menubutton butResetOBJ_ set %id_object %strright set %OBJ_ . %id_object N/A menu set txtOBJ_ . %id_object N/A set !nomevar OBJ_ , %id_object gosub Globalvar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butChest_ in #menubutton { gosub Split #menubutton butChest_ set %id_object %strright if %bank_base = #true && %id_object <> base gosub Menu_Set_Chest %id_object C %chest_base BANK else gosub Menu_Set_Chest %id_object G 2 RESTOCK if #result <> N/A { set %bank_ . %id_object #False menu set txtBankChest_ . %id_object #spc set %chest_ . %id_object #Result menu set txtChest_ . %id_object %chest_ . %id_object set !nomevar chest_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar bank_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butBag_ in #menubutton { gosub Split #menubutton butBag_ set %id_object %strright gosub Menu_Set_Bag %id_object #backpackid if #result <> N/A { set %bag_ . %id_object #Result menu set txtbag_ . %id_object %bag_ . %id_object set !nomevar bag_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butBankChest_ in #menubutton { gosub Split #menubutton butBankChest_ set %id_object %strright gosub Menu_Set_Bank_Chest %id_object RESTOCK if #result <> N/A { set %chest_ . %id_object #Result set %bank_ . %id_object #True menu set txtBankChest_ . %id_object BANK menu set txtChest_ . %id_object %chest_ . %id_object set !nomevar chest_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar bank_ , %id_object gosub GlobalVar_put %idscript !nomevar } else { event exmsg #charid 3 %menu_col_ko BANK non trovata } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetChest_ in #menubutton { gosub Split #menubutton butResetChest_ set %id_object %strright set %chest_ . %id_object N/A menu set txtChest_ . %id_object N/A set !nomevar chest_ , %id_object gosub Globalvar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetBag_ in #menubutton { gosub Split #menubutton butResetBag_ set %id_object %strright set %bag_ . %id_object N/A menu set txtBag_ . %id_object N/A set !nomevar Bag_ , %id_object gosub Globalvar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butNPC_ in #menubutton { gosub Split #menubutton butNPC_ set %id_object %strright gosub Menu_Set_NPC %id_object if #result <> N/A { set %NPC_ . %id_object #Result menu set txtNPC_ . %id_object %NPC_ . %id_object set !nomevar NPC_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butResetNPC_ in #menubutton { gosub Split #menubutton butResetNPC_ set %id_object %strright set %NPC_ . %id_object N/A menu set txtNPC_ . %id_object N/A set !nomevar NPC_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butCHOISE_ in #menubutton { gosub Split #menubutton butCHOISE_ set %id_object %strright gosub Split_to_array %CHOISES_ . %id_object _ temp set !lenght #result set !s 0 for !i 1 !lenght { if %temp . !i = %CHOISE_ . %id_object set !s !i } set !s !s + 1 if !s > !lenght set !s 1 set %CHOISE_ . %id_object %temp . !s menu set txtChoise_ . %id_object %CHOISE_ . %id_object set !nomevar CHOISE_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if #menubutton = butSvuotaBod { event exmsg #charid 3 %menu_col_i Targhetta un oggetto che contiene BOD da Svuotare gosub Set_Menu_Mex CLICCA SU UN OGGETTO DA SVUOTARE ALL' AVVIO DELLO SCRIPT $ NESSUN CONTROLLO SULL'OGGETTO SELEZIONATO $ QUINDI OCCHIO A QUELLO CHE SELEZIONI gosub targetta_oggetto set !oggid #result if !oggid <> N/A { set %objSvuotaBod #result gosub GlobalVar_put %idscript objSvuotaBod menu set txtSvuotaBod %objSvuotaBod } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butPosition_ in #menubutton { gosub Split #menubutton butPosition_ set %id_object %strright set %posX_ . %id_object #charposx set %posY_ . %id_object #charposy set %posZ_ . %id_object #charposz menu set txtPosition_ . %id_object %posX_ . %id_object %posY_ . %id_object %posZ_ . %id_object set !nomevar posX_ , %id_object gosub Globalvar_put %idscript !nomevar set !nomevar posY_ , %id_object gosub GlobalVar_put %idscript !nomevar set !nomevar posZ_ , %id_object gosub GlobalVar_put %idscript !nomevar set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butRunebook_ in #menubutton { gosub Split #menubutton butRunebook_ set %id_object %strright gosub Menu_Set_Runebook %id_object C #backpackid RESTOCK if #result <> N/A { set %RB_ . %id_object #Result menu set txtRunebook_ . %id_object %RB_ . %id_object set !nomevar RB_ , %id_object gosub GlobalVar_put %idscript !nomevar } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butViewBook_ in #menubutton { gosub Split #menubutton butViewBook_ set %id_object %strright gosub Salva_Rune_Usate set %Menu_Vista_book %id_object set #MENUBUTTON N/A gosub Menu_Crea goto Menu_Loop_Ciclo } if butAddBook_ in #menubutton { gosub Split #menubutton butAddBook_ set %id_object %strright gosub Menu_Set_Runebook %id_object C #backpackid SPOT if #result <> N/A { set !exist #false for !c 1 %RB_SpotMAX { if %RB_Spot . !c = #Result { event exmsg #charid 3 %menu_col_ko Libro gia in lista! set !exist #true break } } if !exist = #false { set %RB_Spot . %id_object #Result set %RB_SpotMax %RB_SpotMax + 1 menu set txtRunebook_Spot . %id_object %RB_Spot . %id_object set !nomevar RB_Spot , %id_object gosub GlobalVar_put %idscript !nomevar gosub GlobalVar_put %idscript RB_SpotMax set %Menu_Vista_book %RB_SpotMax gosub Menu_Crea } } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butRemoveBook_ in #menubutton { gosub Split #menubutton butRemoveBook_ set %id_object %strright if %RB_SpotMAX > 1 { set !i 1 for !c 1 %RB_SpotMAX { if !c <> %id_object { set %RB_Spot . !i %RB_Spot . !c set %RB_Rune . !i %RB_Rune . !c set !i !i + 1 set !nomevar RB_Spot , !i gosub GlobalVar_put %idscript !nomevar set !nomevar RB_Rune , !i gosub GlobalVar_put %idscript !nomevar } } set %RB_Spot . %RB_SpotMAX N/A set %RB_Rune . %RB_SpotMAX N/A set !nomevar RB_Spot , %RB_SpotMAX gosub Globalvar_del %idscript !nomevar set !nomevar RB_Rune , %RB_SpotMAX gosub Globalvar_del %idscript !nomevar set %RB_SpotMAX %RB_SpotMAX - 1 gosub GlobalVar_put %idscript RB_SpotMax gosub Menu_Crea } else { set %RB_Spot1 N/A set %RB_Rune1 N/A gosub Globalvar_del %idscript RB_Spot1 gosub Globalvar_del %idscript RB_Rune1 set %RB_SpotMAX %RB_SpotMAX - 1 gosub GlobalVar_put %idscript RB_SpotMax gosub Menu_Crea } set #MENUBUTTON N/A gosub Set_Menu_Mex DEFAULT goto Menu_Loop_Ciclo } if butAutoAddBook_ in #MENUBUTTON { gosub Split #menubutton butAutoAddBook_ set %id_object %strright gosub Menu_Get_Auto_Book %id_object set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if #menubutton = BUT_ATTUALE { set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if butMultiValueMove_ in #menubutton { gosub Split_to_array #menubutton _ but set %id_object %but3 gosub Menu_display_Box_Multi_Value %id_object SAVE if %but2 = sx gosub Menu_display_Box_Multi_Value %id_object -1 else gosub Menu_display_Box_Multi_Value %id_object 1 set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if butMultiValueChange in #menubutton { if butMultiValueChangeup in #menubutton { gosub Split #menubutton butMultiValueChangeup_ set %id_object %strright set !val 10 } if butMultiValueChangedown in #menubutton { gosub Split #menubutton butMultiValueChangedown_ set %id_object %strright set !val -10 } set % . %id_object % . %id_object + !val menu set txtMultivalue_ . %id_object % . %id_object gosub GlobalVar_put %idscript %id_object set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if #menubutton = closed { set #MENUBUTTON N/A event ExMsg #CHARID 3 %menu_col_i Script chiuso halt } if #menubutton = BUTSTART { set %debug #false set %fill_large_mode #false gosub Menu_Validate_Avvio set #MENUBUTTON N/A Menu Clear Menu Hide return #True } if #menubutton = butfilllarge { set %debug #false set %fill_large_mode #true gosub Menu_Validate_Avvio set #MENUBUTTON N/A Menu Clear Menu Hide return #True } if #menubutton = BUTDEBUG { set %debug #true set %fill_large_mode #false gosub Menu_Validate_Avvio set #MENUBUTTON N/A Menu Clear Menu Hide return #True } if #menubutton = butChangeDisplayPremi { gosub Menu_validate_premi if %menu_display_premi = FABBRO set %menu_display_premi SARTO else set %menu_display_premi FABBRO gosub Menu_Crea set #MENUBUTTON N/A goto Menu_Loop_Ciclo } if #menubutton = butChangeDisplayGestioneBod { gosub Menu_validate_gestione_bod if %menu_display_premi = FABBRO set %menu_display_premi SARTO else set %menu_display_premi FABBRO gosub Menu_Crea set #MENUBUTTON N/A goto Menu_Loop_Ciclo } display ok #menubutton event exmsg #charid 3 %menu_col_ko Bottone non conosciuto! set #MENUBUTTON N/A goto loopmenuaspettaunbutton return ;sub Menu_validate_avvio sub Menu_validate_avvio menu getnum chkpepito_Alarm if #menures <> %pepito_alarm { set %pepito_alarm #menures gosub GlobalVar_put %idscript pepito_alarm } menu getnum chkRitiroBod if #menures <> %ritiro_bod { set %ritiro_bod #menures gosub GlobalVar_put %idscript ritiro_bod } menu getnum chkRitiroSubito if #menures <> %ritiro_subito { set %ritiro_subito #menures gosub GlobalVar_put %idscript ritiro_subito } menu getnum chkSvuotaBod if #menures <> %svuotabod { set %svuotabod #menures gosub GlobalVar_put %idscript svuotabod } return ;sub Menu_validate_book d GlobalVar_put sub Menu_validate_book set %menu_valido_Book #true if %OBJ_GENERICO = N/A || %OBJ_SARTO = N/A || %OBJ_FABBRO = N/A set %menu_valido_Book #false if %OBJ_SARTO_BUONI = N/A || %OBJ_FABBRO_BUONI = N/A set %menu_valido_Book #false menu get chkMOREBOOK set %chkMOREBOOK #menures gosub GlobalVar_put %idscript chkMOREBOOK gosub GlobalVar_put %idscript menu_valido_Book return ;sub Menu_validate_gestione_bod sub Menu_validate_gestione_bod set %menu_valido_gestione_bod #true if %menu_display_premi = FABBRO goto Menu_validate_gestione_bod_point1 gosub menu_validate_voice_gestione_bod SMALLHIDE gosub menu_validate_voice_gestione_bod MEDIUMHIDE gosub menu_validate_voice_gestione_bod BROWNBEAR gosub menu_validate_voice_gestione_bod LIGHTTAPESTRY gosub menu_validate_voice_gestione_bod DARKTAPESTRY gosub menu_validate_voice_gestione_bod POLARBEAR gosub menu_validate_voice_gestione_bod TSOP5 gosub menu_validate_voice_gestione_bod TSOP10 gosub menu_validate_voice_gestione_bod TSOP15 gosub menu_validate_voice_gestione_bod TSOP20 gosub menu_validate_voice_gestione_bod KITSPINED gosub menu_validate_voice_gestione_bod KITHORNED gosub menu_validate_voice_gestione_bod KITBARBED gosub menu_validate_voice_gestione_bod BLESSDEED goto Menu_validate_gestione_bod_point2 Menu_validate_gestione_bod_point1: ;qui valido il menu fabbro gosub menu_validate_voice_gestione_bod GLOVES3 gosub menu_validate_voice_gestione_bod GLOVES5 gosub menu_validate_voice_gestione_bod POF gosub menu_validate_voice_gestione_bod GARGOYLE gosub menu_validate_voice_gestione_bod PROSPECTOR gosub menu_validate_voice_gestione_bod ANVIL gosub menu_validate_voice_gestione_bod FSOP5 gosub menu_validate_voice_gestione_bod FSOP10 gosub menu_validate_voice_gestione_bod FSOP15 gosub menu_validate_voice_gestione_bod FSOP20 gosub menu_validate_voice_gestione_bod ANCIENT10 gosub menu_validate_voice_gestione_bod ANCIENT15 gosub menu_validate_voice_gestione_bod ANCIENT30 gosub menu_validate_voice_gestione_bod ANCIENT60 gosub menu_validate_voice_gestione_bod KITDULL gosub menu_validate_voice_gestione_bod KITSHADOW gosub menu_validate_voice_gestione_bod KITCOPPER gosub menu_validate_voice_gestione_bod KITBRONZE gosub menu_validate_voice_gestione_bod KITGOLD gosub menu_validate_voice_gestione_bod KITAGAPITE gosub menu_validate_voice_gestione_bod KITVERITE gosub menu_validate_voice_gestione_bod KITVALORITE Menu_validate_gestione_bod_point2: gosub GlobalVar_put %idscript menu_valido_gestione_bod return ;sub Menu_validate_premi sub Menu_validate_premi set %menu_valido_premi #true if %menu_display_premi = FABBRO goto Menu_validate_premi_point1 gosub menu_validate_voice_premio STOFFA1 gosub menu_validate_voice_premio STOFFA2 gosub menu_validate_voice_premio STOFFA3 gosub menu_validate_voice_premio STOFFA4 gosub menu_validate_voice_premio STOFFA5 gosub menu_validate_voice_premio SMALLHIDE gosub menu_validate_voice_premio MEDIUMHIDE gosub menu_validate_voice_premio BROWNBEAR gosub menu_validate_voice_premio LIGHTTAPESTRY gosub menu_validate_voice_premio DARKTAPESTRY gosub menu_validate_voice_premio POLARBEAR gosub menu_validate_voice_premio SANDALFIRE gosub menu_validate_voice_premio SANDALICEBLUE gosub menu_validate_voice_premio SANDALWHITE gosub menu_validate_voice_premio SANDALICEWHITE gosub menu_validate_voice_premio SANDALICEGREEN gosub menu_validate_voice_premio SANDALRED gosub menu_validate_voice_premio SANDALDARKBLUE gosub menu_validate_voice_premio SANDALBLUE gosub menu_validate_voice_premio TSOP5 gosub menu_validate_voice_premio TSOP10 gosub menu_validate_voice_premio TSOP15 gosub menu_validate_voice_premio TSOP20 gosub menu_validate_voice_premio KITSPINED gosub menu_validate_voice_premio KITHORNED gosub menu_validate_voice_premio KITBARBED gosub menu_validate_voice_premio BLESSDEED goto Menu_validate_premi_point2 Menu_validate_premi_point1: ;qui valido il menu fabbro gosub menu_validate_voice_premio GLOVES1 gosub menu_validate_voice_premio GLOVES3 gosub menu_validate_voice_premio GLOVES5 gosub menu_validate_voice_premio POF gosub menu_validate_voice_premio PICKAXE gosub menu_validate_voice_premio SHOVEL gosub menu_validate_voice_premio GARGOYLE gosub menu_validate_voice_premio PROSPECTOR gosub menu_validate_voice_premio ANVDULL gosub menu_validate_voice_premio ANVSHADOW gosub menu_validate_voice_premio ANVCOPPER gosub menu_validate_voice_premio ANVBRONZE gosub menu_validate_voice_premio ANVGOLD gosub menu_validate_voice_premio ANVAGAPITE gosub menu_validate_voice_premio ANVVERITE gosub menu_validate_voice_premio ANVVALORITE gosub menu_validate_voice_premio FSOP5 gosub menu_validate_voice_premio FSOP10 gosub menu_validate_voice_premio FSOP15 gosub menu_validate_voice_premio FSOP20 gosub menu_validate_voice_premio ANCIENT10 gosub menu_validate_voice_premio ANCIENT15 gosub menu_validate_voice_premio ANCIENT30 gosub menu_validate_voice_premio ANCIENT60 gosub menu_validate_voice_premio KITDULL gosub menu_validate_voice_premio KITSHADOW gosub menu_validate_voice_premio KITCOPPER gosub menu_validate_voice_premio KITBRONZE gosub menu_validate_voice_premio KITGOLD gosub menu_validate_voice_premio KITAGAPITE gosub menu_validate_voice_premio KITVERITE gosub menu_validate_voice_premio KITVALORITE Menu_validate_premi_point2: gosub GlobalVar_put %idscript menu_valido_premi return ;sub Menu_validate_restock d Menu_validate_rune_book GlobalVar_put 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 gosub Menu_validate_rune_book RESTOCK If ! #result set %menu_valido_Restock #false gosub Menu_validate_rune_book SARTO If ! #result set %menu_valido_Restock #false gosub Menu_validate_rune_book FABBRO If ! #result set %menu_valido_Restock #false 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 menu get chklog_bod_consegnati set %log_bod_consegnati #menures gosub GlobalVar_put %idscript log_bod_consegnati menu get chklog_bod_buono set %log_bod_buono #menures gosub GlobalVar_put %idscript log_bod_buono menu get chklog_bod_trash set %log_bod_trash #menures gosub GlobalVar_put %idscript log_bod_trash menu getnum chkUSA_TINKER set %USA_TINKER #menures gosub GlobalVar_put %idscript USA_TINKER menu getnum chkuse_ancient_10 set %use_ancient_10 #menures gosub GlobalVar_put %idscript use_ancient_10 menu getnum chkuse_ancient_15 set %use_ancient_15 #menures gosub GlobalVar_put %idscript use_ancient_15 menu getnum chkuse_ancient_30 set %use_ancient_30 #menures gosub GlobalVar_put %idscript use_ancient_30 if %use_ancient_10 || %use_ancient_15 || %use_ancient_30 { set %use_ancient_hammer #true } else { set %use_ancient_hammer #false } gosub GlobalVar_put %idscript use_ancient_hammer gosub GlobalVar_put %idscript menu_valido_VARIE return ;sub Menu_validate_voice_gestione_bod sub Menu_validate_voice_gestione_bod set !nomevar chkLPrize_ , %1 menu get !nomevar if #menures <> % . !nomevar { set % . !nomevar #menures gosub GlobalVar_put %idscript !nomevar } return ;sub Menu_validate_voice_premio sub Menu_validate_voice_premio set !nomevar chkPrize_ , %1 menu get !nomevar if #menures <> % . !nomevar { set % . !nomevar #menures gosub GlobalVar_put %idscript !nomevar } return ;sub Move_premi sub Move_premi set !findid %1 set !findtype %2 set !findstack %3 set !prizeid %4 set !findcol %5 if %existTXT_ . !prizeid = N/A { set %existTXT_ . !prizeid #true set %index_voci_premi %index_voci_premi + 1 set !y %y_voci_premi + ( %index_voci_premi * 8 ) set !x %x_voci_premi set !x2 %x_voci_premi + 95 set !x3 %x_voci_premi + 122 menu font size 5 menu font style b menu font color white menu text txtK_ . !prizeid !x !y %txt_ . !prizeid menu font color red menu text txtF . !prizeid !x !y menu font color yellow menu text txtG_ . !prizeid !x2 !y 0 set %contG_ . !prizeid 0 menu text txtT_ . !prizeid !x3 !y 0 set %contT_ . !prizeid 0 } if %chkPrize_ . !prizeid <> #false { if %Prize_ . !prizeid = N/A set !dest %chest_premi else set !dest %Prize_ . !prizeid gosub Get_object_in_container !dest if #result < 125 { gosub sposta_item !findid !dest !findstack set %contG_ . !prizeid %contG_ . !prizeid + !findstack menu set txtG_ . !prizeid %contG_ . !prizeid gosub antiblock wait 5 } else { if %flagPieno_ . !prizeid = N/A { menu set txtK_ . !prizeid menu set txtF . !prizeid %txt_ . !prizeid set %flagPieno_ . !prizeid #true } if %impPrize_ . !prizeid = #false set %chkPrize_ . !prizeid #false else { display ok CHEST PER %txt_ . !prizeid PIENA $ SCRIPT BLOCCATO HALT } } } if %chkPrize_ . !prizeid = #false && !findtype in %type_prizes_cloth { if !findcol <> 0 gosub sbianca_cloth !findid gosub sposta_item !findid %chest_resource !findstack set %contT_ . !prizeid %contT_ . !prizeid + !findstack menu set txtT_ . !prizeid %contT_ . !prizeid gosub antiblock wait 5 } if %chkPrize_ . !prizeid = #false && !findtype notin %type_prizes_cloth { gosub sposta_item !findid %chest_trash !findstack set %contT_ . !prizeid %contT_ . !prizeid + !findstack menu set txtT_ . !prizeid %contT_ . !prizeid gosub antiblock wait 5 } return ;sub Set_ultime_variabili sub Set_ultime_variabili if #HITS = N/A gosub apri_gump_base gosub get_modifier_peso modweight set %MOREBOOK0 0 if %chkMOREBOOK gosub Get_Bod_Book_From_Name FILLARE MOREBOOK set %time_start_script #scnt if %ritiro_subito set %timer_bod #scnt - 1 else set %timer_bod #scnt + 3600 return ;sub Sistema_bod d bod_analizza sposta_bod sub Sistema_bod set !cont_analyze %1 sistema_bod_start: finditem %type_bod c_ , !cont_analyze if #findkind = -1 return gosub bod_analizza #findid gosub bod_refresh_menu gosub sposta_bod %bod_id !cont_analyze %bod_supertype %bod_verdict %bod_destination wait 10 goto sistema_bod_start return ;sub Sistema_premi sub Sistema_premi gosub Set_menu_azione CLEAN: PRIZES sistema_premi_loop: finditem %type_prizes c_ , #BACKPACKID if #findkind = -1 { ignoreitem reset prizes return } set !id N/A gosub getproperty #findid set !p #result ;pof if #findtype in %type_powder { set !id POF goto sistema_premi_point_know } ;pickaxe sturdy o Gargoyle if #findtype in %type_pickaxe { if STURDY in #property set !id PICKAXE if GARGOYLE in #property set !id GARGOYLE if !id <> N/A goto sistema_premi_point_know } ;shovel if #findtype in %type_shovel { set !id SHOVEL goto sistema_premi_point_know } ;prospector if #findtype in %type_prospector { set !id PROSPECTOR goto sistema_premi_point_know } ;guanti_miner if #findtype in %type_minergloves { if mining , #SPC , bonus , #SPC , +1 in !p set !id GLOVES1 if mining , #SPC , bonus , #SPC , +3 in !p set !id GLOVES3 if mining , #SPC , bonus , #SPC , +5 in !p set !id GLOVES5 if !id <> N/A goto sistema_premi_point_know } ;kit runici martelli if #findtype in %type_runic_hammer && runic in !p { if %ingot . #findcol <> N/A set !id KIT , %ingot . #findcol if !id <> N/A goto sistema_premi_point_know } ;anvil if #findtype in %type_scroll && anvil in !p { if %ingot . #findcol <> N/A set !id ANV , %ingot . #findcol if !id <> N/A goto sistema_premi_point_know } ;ancient if #findtype in %type_smith_hammer { if blacksmithing , #SPC , +10 in !p set !id ANCIENT10 if blacksmithing , #SPC , +15 in !p set !id ANCIENT15 if blacksmithing , #SPC , +30 in !p set !id ANCIENT30 if blacksmithing , #SPC , +60 in !p set !id ANCIENT60 if !id <> N/A goto sistema_premi_point_know } ;sop if #findtype in %type_scroll && skill in !p { if 105 in !p set !id SOP5 if 110 in !p set !id SOP10 if 115 in !p set !id SOP15 if 125 in !p set !id SOP20 if !id <> N/A { if tailoring in !p set !id T , !id else set !id F , !id goto sistema_premi_point_know } } ;bless if #findtype in %type_scroll && CLOTHING in !p { set !id BLESSDEED goto sistema_premi_point_know } ;kit runici sarto if #findtype in %type_runic_sewing && runic in !p { if %leather . #findcol <> N/A set !id KIT , %leather . #findcol if !id <> N/A goto sistema_premi_point_know } ;stretched hide if #findtype in %type_scroll && STRETCHED in !p { if SMALL in !p set !id SMALLHIDE if MEDIUM in !p set !id MEDIUMHIDE if !id <> N/A goto sistema_premi_point_know } ;sandali if #findtype in %type_sandals { if %color . #findcol <> N/A set !id SANDAL , %color . #findcol if !id <> N/A goto sistema_premi_point_know } ;stoffa if #findtype in %type_prizes_cloth { gosub getClothLevel #findcol if #result > 0 set !id STOFFA , #result if !id <> N/A goto sistema_premi_point_know } sistema_premi_point_know: if !id = N/A { if #findtype in %type_toolstailor && #findcol = 0 { ignoreitem #findid prizes goto sistema_premi_loop } if #findtype in %type_cloth && #findcol = 0 { gosub sposta_item #findid %chest_resource #findstack wait 10 goto sistema_premi_loop } if #findtype notin %type_minergloves display ok DI QUESTO NON SO COSA FARNE ID: #findid TYPE: #findtype $ !p ignoreitem #findid prizes goto sistema_premi_loop } gosub move_premi #findid #findtype #findstack !id #findcol wait 5 goto sistema_premi_loop return ;sub Sposta_bod d AntiBlock Bod_write_log sub Sposta_bod set !bod_id %1 set !bod_cont %2 set !bod_supertype %3 set !bod_verdict %4 set !bod_target %5 if !bod_target = TRASH set !bod_target %bag_TRASH_TEMPORANEO sposta_bod_putaway: set !bod_journal #jindex exevent drag !bod_id gosub AntiBlock NO_ALARM_EVENT exevent dropc !bod_target gosub AntiBlock NO_ALARM_EVENT ;ignoreitem %bod_id bod for !i !bod_journal #jindex { scanjournal ! i if The_book_is_full_of_deeds. in #journal { display ok Bod Book Pieno $ Script Fermato. $ halt } } ;ignoreitem !bod_id wait 10 gosub AntiBlock NO_ALARM_EVENT finditem !bod_id c_ , !bod_cont if #findkind = -1 { set !v bod_ , !bod_verdict , _ , !bod_supertype set % . !v % . !v + 1 menu set txt . !v % . !v if !bod_verdict = TRASH && %log_bod_trash gosub Bod_write_log %file_log_bod_trash if !bod_verdict = BUONO && %log_bod_buono gosub Bod_write_log %file_log_bod_buono if !bod_verdict = USARE { set %tot_bod_usare %tot_bod_usare + 1 menu set txtTOTBOD %tot_bod_usare } return } goto sposta_bod_putaway 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 Li_fillo_iOoo_i_bod Pepito_Settevite %versionscript gosub Menu_Add_Menu RESTOCK RESTOCK gosub Menu_Add_Menu BOOK BOD BOOK gosub Menu_Add_Menu PREMI PREMI gosub Menu_Add_Menu GESTIONE_BOD GESTIONE BOD 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 Svuota_container d Open_container sistema_bod sub Svuota_container set !o %1 if !o = #backpackid { ;ok è lo zaino gosub Set_menu_azione CLEAN: BOD gosub sistema_bod !o gosub Bod_ensure_close_gump return } finditem %1 g_2 if #findkind <> -1 { ;ok è una cassa gosub Set_menu_azione CLEAN: CONTAINER gosub Open_container !o 5 805 600 gosub sistema_bod !o gosub Bod_ensure_close_gump return } return ;sub Torna_a_casa d Torna_Posizione sub Torna_a_casa torna_a_casa_loop: gosub Torna_Posizione RESTOCK if #result = #false { goto torna_a_casa_loop } return #true ;sub Trash_bod_in_bag_trash sub Trash_bod_in_bag_trash set !try_trash_bag 0 gosub Set_menu_azione CLEAN: TRASH BOD ignoreitem reset bod tbibt_riopen_bag: set !d c_ , #backpackid gosub open_container %bag_trash_temporaneo 5 805 0 !d if #result = #false goto tbibt_riopen_bag gosub antiblock wait 20 tbibt_bodtrash_loop: finditem %type_bod c_ , %bag_trash_temporaneo if #findkind = -1 { set !try_trash_bag !try_trash_bag + 1 if !try_trash_bag < 2 goto tbibt_riopen_bag else return } gosub bod_analizza #findid if %bod_verdict <> TRASH { display ok STAVO PER BUTTARE VIA UN BOD CHE NON DOVEVO BUTTARE $ SCRIPT FERMATO halt } gosub sposta_item %bod_id %chest_trash 1 wait 15 gosub antiblock goto tbibt_bodtrash_loop return ;sub Wait_time_to_getbod d antiblock Set_menu_azione sub Wait_time_to_getbod while #scnt <= %timer_bod { gosub antiblock set !wait_delay %timer_bod - #scnt if !wait_delay <> !old_wait { gosub Set_menu_azione BOD FINITI: WAIT GET NEW BOD !wait_delay set !old_wait !wait_delay } wait 20 } return ;################## CUSTOM SUB FINISH ###########################