Не может быть чтобы серчь в этом вопросе не помог....
Code: sub Alchemy(reagent, min_reg, choice) while UO.Count('0x0F0E','0x0000')>0 AND UO.Count(reagent)>=min_reg UO.DeleteJournal() UO.Exec("waitmenu 'What sort of potion do you want to' "+choice) UO.UseType(reagent) while NOT UO.InJournal("You put") AND NOT UO.InJournal("You toss the failed") wait(800) wend wend gong(2) end sub
#============================================================== # greater agility potion #-------------------------------------------------------------- sub LavaBomb() alchemy('0x0F8F', 6, "'Lava Bomb'") end sub
#============================================================== # deadly poison potion #-------------------------------------------------------------- sub Poison() alchemy('0x0F88', 4, "'Poison'") end sub
#============================================================== # poison potion #-------------------------------------------------------------- sub Greater_Poison() alchemy('0x0F88', 4, "'Greater Poison'") end sub
#============================================================== # invisibility potion #-------------------------------------------------------------- sub Invisibility() alchemy('0x0F91', 4, "'Invisibility'") end sub #============================================================== # total mana potion #-------------------------------------------------------------- sub Total_Mana() alchemy('0x0F87', 6, "'Total Mana'") end sub
#============================================================== # Heal potion #-------------------------------------------------------------- sub Shrink() alchemy('0x0F78', 10, "'Shrink'") end sub
#============================================================== # Greater Heal potion #-------------------------------------------------------------- sub Greater_Heal() alchemy('0x0F85', 7, "'Greater Heal'") end sub
#============================================================== # Greater Cure potion #-------------------------------------------------------------- sub Greater_Cure() alchemy('0x0F84', 6, "'Greater Cure'") end sub
#============================================================== # Stoneskin potion #-------------------------------------------------------------- sub Stoneskin() alchemy('0x0F85', 1, "'Stoneskin'") end sub
#============================================================== # Night Sight potion #-------------------------------------------------------------- sub Nightsight() alchemy('0x0F8D', 2, "'Nightsight'") end sub #============================================================== # Total refresh potion #-------------------------------------------------------------- sub Total_Refresh() alchemy('0x0F7A', 6, "'Total Refresh'") end sub
#============================================================== # Greater Strength potion #-------------------------------------------------------------- sub Greater_Strength() alchemy('0x0F86', 5, "'Greater Strength'") end sub
#============================================================== # Lesser Explosion potion #-------------------------------------------------------------- sub Lesser_Explosion() alchemy('0x0F8C', 10, "'Lesser Explosion'") end sub
#============================================================== # Greater Explosion potion #-------------------------------------------------------------- sub Greater_Explosion() alchemy('0x0F8C', 10, "'Greater Explosion'") end sub
|