Я почистил верхний скрипт, что был в начале. Можешь скинуть возможно кому-то понадобится.
а, я понял
Ниже мой, подчищенный
set %gameClass Warrior ; Cleric or Archer
set %maxWeight 1000 ; Max ves
set %box LSNGMMD ; ID sunduka
Set %jashik HLGOLMD ; ID korobki s logami
set %foodCont OPJKKMD ; ID korobki, gde stoit zapasi moloko i bekona
set %lootbox ZRAOKMD ; ID korobki, kuda skiduvaet drop s gvarda
set %xCoord 1850 ; X koordinata okolo boxa
set %yCoord 1022 ; Y koordinata okolo boxa
set %dropMarganece #true ; #true - nomet marganizu , #false - nenomet
set %dropTin #true ; #true - skaduvatj rudu , #false - ne skiduvatj
set %dropBronze #true
set %dropLead #true
set %dropCorrundum #true
set %dropGold #true
set %dropTourmaline #true
set %dropSilver #true
set %dropMarble #false
set %dropZink #false
set %dropGypsum #false
set %dropSandstone #false
set %dropCopper #false
set %dropIron #true
set %dropTitan #false
set %dropStone #false
set %dropPlaster #false
set %skillItemChange #false ; #true - menjajet skill shmotki, #false - net
set %recall #false ; #true - letajet s runebook, #false - begut peshkom
; Do Not Set These Items If %skillItemChange #false
set %skillRobe KIOSJMD ; Skill Roba (ID)
set %skillCloak TCNSJMD ; Skill Cloack (ID)
set %skillMask YSNSJMD ; Skill Mask (ID)
set %simpleRobe UTRVLMD ; Prostaja Roba (ID)
set %simpleCloak VARVLMD ; Prostoj cloack (ID)
set %simpleMask CSH ; Helm (TYPE/ID)
; Etix mozhno ne menjatj, esli %recall #false
set %runebookID NDWXJMD ; ID runebooka
set %runeNumberToHome 7 ; Nr runi na dom
set %runeNumberToWood 10 ; Nr runi na les
set %amountRecalls 10 ; Skolko recallov vzjatj, kogda ix netu
; special variables for Archer (tolka dlja archera):
set %camp heal ; #spc - the best camp, heal - healing campifre +5
set %minKidlings 10 ; minimalnoe kolichestvo kidlov v sumke
set %amountKidlings 40 ; skolko kidlov vzjatj, kogda ix netu
set %minArrows 150 ; minimalnoe kolichestvo strel v sumke
set %amountArrows 400 ; skolko strel vzjatj, kogda ix netu
; special variables for Cleric(tolko dlja klerika):
set %Weapon BPH ;BPH - sword, JOH - war axe; oruzhie
set %Shield CIK ; shild
set %item DWJ_TVj_GWJ_EWJ_ZLK_POF_RZF_SJG_CUD_IJG_HSF_RVH_FZH_UJG_DCI_FWL_NZH_RMK
set %loot DCI_POF_RZF_SJG_CUD_IJG_HSF_RVH_FZH_NZH_UJG_FWL
if %recall
{
gosub Instalyze runeNumberToHome 1
gosub Instalyze runeNumberToWood 2
}
if %dropMarganece
set %MarganeceCol 1750
if %dropTin
set %TinCol 1325
if %dropBronze
set %BronzeCol 1160
if %dropLead
set %LeadCol 2125
if %dropCorrundum
set %CorrundumCol 1548
if %dropGold
set %GoldCol 1093
if %dropTourmaline
set %TourmalineCol 1218
if %dropSilver
set %SilverCol 1153
if %dropMarble
set %MarbleCol 1950
if %dropZink
set %ZinkCol 38
if %dropGypsum
set %GypsumCol 995
if %dropSandstone
set %SandstoneCol 144
if %dropCopper
set %CopperCol 1537
if %dropIron
set %IronCol 0
if %dropTitan
set %TitanCol 1107
if %dropStone
set %StoneCol 2313
if %dropPlaster
set %PlasterCol 151
set %skill %skillRobe , _ , %skillCloak , _ , %skillMask
set %k 0
set %lastK 0
start:
GOSUB LJING 0 0 0 0 ;koordinati
GOSUB LJING 0 0 0 0 ;koordinati
goto start
sub ljing
set %k %k + 1
gosub ghost
gosub checkHP
gosub element
gosub checkWeight
move %1 %2 1
finditem NPF_QPF C
if #findcnt = 0
{
display ok Pickaxe wasn't found!
pause
}
set #lobjectid #findid
event macro 17 0
target 7s
set #ltargetx %1
set #ltargety %2
set #ltargetkind 3
set #ltargettile %3
event macro 22 0
wait 10
set %overtime #scnt + 25
gosub scan
return
sub checkWeight
if #weight > %maxWeight
{
if ! %dropMarganece && ! %dropTin && ! %dropBronze && ! %dropLead && ! %dropCorrundum && ! %dropGold && ! %dropTourmaline && ! %dropSilver && ! %dropMarble && ! %dropZink && ! %dropGypsum && ! %dropSandstone && ! %dropCopper && ! %dropIron && ! %dropTitan && ! %dropStone && ! %dropPlaster
{
if %recall
gosub port
if ! %recall
gosub moveItems
}
if %dropMarganece || %dropTin || %dropBronze || %dropLead || %dropCorrundum || %dropGold || %dropTourmaline || %dropSilver || %dropMarble || %dropZink || %dropGypsum || %dropSandstone || %dropCopper || %dropIron || %dropTitan || %dropStone || %dropPlaster ||
{
gosub dropTrashLogs
return
}
}
if %afk <> true
gosub ghost
return
sub scan
scan:
scanjournal
gosub checkHP
if hungry in #sysmsg
{
gosub eat
return
}
if ( ( THERE_IS_NOTHING_HERE_TO_MINE in #sysmsg ) || ( You_stop_Mining in #journal ) )
return
if ( ( YOU_CAN'T_REACH_THIS in #sysmsg ) || ( You_fail_to_do_that in #sysmsg ) )
return
if ( ( Try_mining_elsewhere in #sysmsg ) || ( You_have_no_line_of_sight_to_that_location in #sysmsg )
+ || ( You_can't_use_the in #journal ) || ( You_cannot_mine_so_close_to_yourself in #journal ) )
return
gosub element
gosub checkHP
if #scnt >= %overtime
return
goto scan
return
sub arm
if %gameClass = Warrior
{
repeat
{
finditem %Weapon c_ , #BackpackId
set #lobjectID #findid
event macro 17 0
wait 12
finditem %Weapon c_ , #BackpackId
}
until #findcnt = 0
repeat
{
finditem %Shield c_ , #BackpackId
set #lobjectID #findid
event macro 17 0
wait 12
finditem %Shield c_ , #BackpackId
}
until #findcnt = 0
}
if %gameClass = Archer
{
msg $.arm bow$
wait 5
}
return
sub port
set %k %k + 1
gosub arm
gosub checkHP
gosub reaper
if G in #charstatus
event macro 6 0
event macro 6 0
set %oldPosX #charposx
set %oldPosY #charposy
gosub openRunebook
repeat
{
click %x1 %y1
wait 20
}
until #contname <> generic_gump && #contsize <> 577_426
if %gameClass = Cleric
event macro 13 21
if %gameClass = Archer
event macro 13 47
gosub changeClothesTo %simpleMask %simpleRobe %simpleCloak
while #charposx = %oldPosX && #charposy = %oldPosY
wait 10
gosub moveItems
gosub back
return
sub moveItems
ignoreitem reset 1
ignoreitem %skill 1
gosub movetoplavka
gosub Plavka
gosub runToBox
finditem %box
wait 10
if #findcnt = 0
{
event Sysmessage Box Not Found!
pause
}
repeat
{
finditem %item c_ , #backpackid
if #findcnt >= 1
{
if world_save_has_been in #sysmsg
wait 17s
exevent Drag #Findid #findstack
exevent Dropc %jashik
if You_can_not_pick_that_up in #sysmsg
{
return
}
wait 25
}
}
until #findcnt = 0
ignoreitem reset 1
gosub RunToWood
return
bank:
msg $
msg bank$
wait 14
finditem %jashik
return
sub back
gosub checkHP
set %oldPosX #charposx
set %oldPosY #charposy
for %i 1 2
{
gosub openRunebook
click 261 215 ; Recharge runebook 2x
wait 20
}
gosub openRunebook
repeat
{
click %x2 %y2
wait 20
}
until #contname <> generic_gump && #contsize <> 577_426
event macro 13 21
wait 2s
gosub changeClothesTo %skillMask %skillRobe %skillCloak
while #charposx = %oldPosX && #charposy = %oldPosY
wait 10
return
sub runToBox
repeat
{
move %xCoord %yCoord 0
wait 10
}
until #charposx = %xCoord && #charposy = %yCoord
return
sub runToWood
repeat
{
move %xCoord %yCoord 0
wait 10
}
until #charposx = %xCoord && #charposy = %yCoord
return
sub movetoplavka
repeat
{
move %xCoord %yCoord 0
wait 10
}
until #charposx = %xCoord && #charposy = %yCoord
return
sub checkHP
if #hits < #maxhits
{
if %skillItemChange
gosub changeClothesTo %simpleMask %simpleRobe %simpleCloak
gosub arm
gosub follow&kill
if %skillItemChange
gosub changeClothesTo %skillMask %skillRobe %skillCloak
}
return
sub openRunebook
finditem %runebookID C_ , #backpackid
if #findcnt = 0
{
event sysmessage Runebook not found!
pause
}
set #lobjectid #findid
event macro 17 0
while #contname <> generic_gump && #contsize <> 577_426
wait 1
return
sub ghost
if #charghost = YES
{
terminate uo
halt
}
return
sub changeClothesTo
repeat
{
finditem %1 C_ , #backpackid
set #lobjectID #findid
event macro 17 0
wait 12
finditem %1 C_ , #backpackid
}
until #findcnt = 0
repeat
{
finditem %2 C_ , #backpackid
set #lobjectID #findid
event macro 17 0
wait 12
finditem %2 C_ , #backpackid
}
until #findcnt = 0
repeat
{
finditem %3 C_ , #backpackid
set #lobjectID #findid
event macro 17 0
wait 12
finditem %3 C_ , #backpackid
}
until #findcnt = 0
return
sub follow&kill
set %charX #charposx
set %charY #charposy
set %charz #charposz
set %killTime #scnt + 60
if %gameClass = Warrior
{
repeat
{
finditem #enemyid
event pathfind #FINDX #FINDY #FINDZ 1 3s
wait 1s
msg $.usebandage$
wait 10
target 1s
event macro 23 0
wait 10
gosub ghost
}
until #findcnt = 0 || #scnt > %killTime
}
if %gameClass = Archer
{
repeat
{
msg .camp %camp $
wait 40
finditem #enemyid
}
until #findcnt = 0 || #scnt > %killTime
}
gosub loot
if #hits < #maxhits
gosub heal
set %time #scnt + 20
repeat
{
event pathfind %charX %charY %charz 1 3s
wait 1s
gosub ghost
if #scnt > %time
return
}
until #charposx = %charX && #charposy = %charY
return
sub heal
repeat
{
msg $.usebandage$
wait 10
target
event macro 23 0
wait 20
}
until #hits >= #maxhits
return
sub eat
finditem ZBM C
set #lobjectid #findid
event macro 17 0
wait 10
finditem GND C
set #lobjectid #findid
event macro 17 0
wait 10
event macro 17 0
wait 5s
return
sub Instalyze
if % . %1 <= 8
set %x . %2 260
else
set %x . %2 420
if % . %1 = 1 || % . %1 = 9
set %y . %2 260
if % . %1 = 2 || % . %1 = 10
set %y . %2 275
if % . %1 = 3 || % . %1 = 11
set %y . %2 290
if % . %1 = 4 || % . %1 = 12
set %y . %2 305
if % . %1 = 5 || % . %1 = 13
set %y . %2 320
if % . %1 = 6 || % . %1 = 14
set %y . %2 335
if % . %1 = 7 || % . %1 = 15
set %y . %2 350
if % . %1 = 8 || % . %1 = 16
set %y . %2 365
return
sub loot
set %lootTime #scnt + 20
finditem YFM G_4
if #findcnt >= 1
{
set #lobjectid #findid
set %body #findid
event macro 17 0
while #contkind <> ASEB && #contsize <> 144_212 && %lootTime > #scnt
wait 1
wait 10
repeat
{
finditem %loot C_ , %body
if #findcnt = 0 || #scnt > %lootTime
{
ignoreitem %body 2
return
}
exevent drag #findid #findstack
exevent dropc %lootbox
wait 40
}
until #false
}
return
sub dropTrashLogs
repeat
{
finditem ZLK_DWJ C_ , #backpackid
if #findcnt = 0
{
wait 20
if #weight >= %maxweight
{
if %recall
gosub port
if ! %recall
gosub moveItems
return
}
if #weight < %maxweight
return
}
if #findcol = %MarganeceCol || #findcol = %TinCol || #findcol = %BronzeCol || #findcol = %LeadCol || #findcol = %CorrundumCol || #findcol = %GoldCol || #findcol = %TourmalineCol || #findcol = %SilverCol || #findcol = %MarbleCol || #findcol = %ZinkCol || #findcol = %GypsumCol || #findcol = %SandstoneCol || #findcol = %CopperCol || #findcol = %IronCol || #findcol = %TitanCol || #findcol = %StoneCol || #findcol = %PlasterCol ||
{
exevent drag #findid #findstack
exevent dropg #charposx #charposy #charposz
wait 65
}
ignoreitem #findid 1
}
until #false
return
sub reaper
if %lastK >= %k
gosub ghost
set %lastK %k
finditem JE G
if #findcnt <> 0
{
sound
gosub arm
set %charX #charposx
set %charY #charposy
set %charz #charposz
if %skillItemChange
gosub changeClothesTo %simpleMask %simpleRobe %simpleCloak
set %killTime #scnt + 60
finditem JE G
set %reaper #findid
set #ltargetid %reaper
event macro 27 0
if %gameClass = Cleric
{
repeat
{
finditem %reaper
event pathfind #FINDX #FINDY #FINDZ 1 3s
wait 1s
msg $.usebandage$
wait 10
target 1s
event macro 23 0
wait 10
gosub ghost
}
until #findcnt = 0 || #scnt > %killTime
}
if %gameClass = Archer
{
repeat
{
msg .camp %camp $
wait 40
finditem %reaper
}
until #findcnt = 0 || #scnt > %killTime
}
gosub loot
if #hits < #maxhits
gosub heal
if %skillItemChange
gosub changeClothesTo %skillMask %skillRobe %skillCloak
set %time #scnt + 20
repeat
{
event pathfind %charX %charY %charz 1 3s
wait 1s
gosub ghost
if #scnt > %time
return
}
until #charposx = %charX && #charposy = %charY
}
return
sub rescourses
finditem RWF C_ , #backpackid
if #findstack <= %minArrows
{
set #lobjectid %box
event macro 17 0
while #contid <> %box
wait 1
finditem RWF C_ , %box
exevent drag #findid %amountArrows
exevent dropc #backpackid
wait 30
}
finditem PEF C_ , #backpackid
if #findstack <= %minKidlings
{
set #lobjectid %box
event macro 17 0
while #contid <> %box
wait 1
finditem PEF C_ , %box
exevent drag #findid %amountKidlings
exevent dropc #backpackid
wait 30
}
return
sub recalls
finditem WTL C_ , #backpackid
if #findstack <= 2 || #findcnt = 0
{
set #lobjectid %box
event macro 17 0
while #contid <> %box
wait 1
finditem WTL C_ , %box
exevent drag #findid %amountRecalls
exevent dropc #backpackid
wait 30
}
return
sub food
finditem ZBM C_ , #backpackid
if #findcnt = 0
{
set #lobjectid %foodCont
event macro 17 0
while #contid <> %foodCont
wait 1
finditem ZBM C_ , %foodCont ; 1 pitcher of milk
exevent drag #findid 1
exevent dropc #backpackid
wait 30
}
finditem GND C_ , #backpackid
if #findcnt = 0
{
finditem GND C_ , %foodCont
exevent drag #findid 4 ; 4 baocn slices
exevent dropc #backpackid
wait 30
finditem ZBM C_ , %foodCont ; 1 pitcher of milk
exevent drag #findid 1
exevent dropc #backpackid
wait 30
}
return
Sub Plavka
repeat
{
finditem DWJ_TVj_GWJ_EWJ C_ , #backpackid
if #findcnt <> 0
{
set #lobjectid #findid
event macro 17 0
wait 10
}
}
until #findcnt = 0
return
sub element
finditem ED G
if #findcnt <> 0
{
msg .arm$
set %charX #charposx
set %charY #charposy
set %charz #charposz
sound
if %skillItemChange
gosub changeClothesTo %simpleMask %simpleRobe %simpleCloak
finditem ED G
set %element #findid
msg .arm$
set #ltargetid %element
event macro 27 0
repeat
{
finditem %element
event pathfind #FINDX #FINDY #FINDZ 1 3s
wait 1s
gosub ghost
gosub place
gosub checkpvp
}
until #findcnt = 0
wait 20
gosub loot
if %skillItemChange
gosub changeClothesTo %skillMask %skillRobe %skillCloak
set %time #scnt + 20
repeat
{
event pathfind %charX %charY %charz 1 3s
wait 1s
gosub ghost
if #scnt > %time
return
}
until #charposx = %charX && #charposy = %charY
}
return