Лутит так: если нет ласттрупа, то ищется хлам на земле. если есть то режется труп. Если тркп не порезался то лутаем из него если порезался то лутаем с земли.
В массив можно добавить элементы и вписать свои типы вещей необходимых для лута, чем выше вещь в скрипте тем быстрее ее слутает.
Если добавить в объекты LootBag и фром таргет юзануть на мешок то лутает в этот мешок. Если нет то лутает в пак.
WaitTime - задержка на лут если конект плох то больше ставьте если UNSP не стоит то 0
По умолчанию лутает ласткорпс, если еще раз там же запустить то выдает крест на новый труп. Следующий запуск лутает тот первый корпс
Пробуйте
По настоянию эда, теперь в трупе копается тоже не 1 раз.
Code: Select all
#==============================================================
# Loot() - looting corpse and from ground. Savage.
#--------------------------------------------------------------
sub Loot()
VAR WaitTime=800
VAR Exit=0, i, FromCorpse=0
DIM Loot[40]
Loot[0]=0x19B9 ; ore
Loot[1]=0x0EED ; gp
Loot[2]=0x0F7B ; BM
Loot[3]=0x0F7A ; BP
Loot[4]=0x0F84 ; GA
Loot[5]=0x0F85 ; GI
Loot[6]=0x0F86 ; MR
Loot[7]=0x0F88 ; NS
Loot[8]=0x0F8C ; SA
Loot[9]=0x0F8D ; SS
Loot[10]=0x0F90 ; Dead Woods
Loot[11]=0x0F7E ; Sceleton Bones
Loot[12]=0x0F87 ; Eyes of newt
Loot[13]=0x0E76 ; Bag
Loot[14]=0x09B0 ; Pounch
Loot[15]=0x1BDD ; Logs
Loot[16]=0x1078 ; Hides
Loot[17]=0x1BFB ; Bolts
Loot[18]=0x0E34 ; Blanc Scroll
Loot[19]=0x0F25 ; Pieces of Amber
Loot[20]=0x0F16 ; Ametist
Loot[21]=0x0F20 ; Tourmaline
Loot[22]=0x0F26 ; Diamond
Loot[23]=0x0F30 ; Diamond
Loot[24]=0x0F8E ; Serpent Scales
Loot[25]=0x14EB ; Treassure Map
Loot[26]=0x0F79 ; Blackmoor
Loot[27]=0x0F3F ; Arrow
Loot[28]=0x1BD1 ; Feathers
Loot[29]=0x1F4C ; Scroll Recall
Loot[30]=0x1F52 ; Scroll Paralyze
Loot[31]=0x1F40 ; Scroll Poison
Loot[32]=0x0F7D ; Vials of Blood
Loot[33]=0x0F2F ; Emeralds
Loot[34]=0x1F4C ; Scroll Recall
Loot[35]=0x1F4C ; Scroll Recall
Loot[36]=0x1F4C ; Scroll Recall
UO.DeleteJournal()
UO.UseObject('LootBag')
wait(100)
If UO.InJournal("You can") Then
UO.WaitTargetObject('backpack')
UO.AddObject('LootBag')
UO.Print("+++ LootBag ne nayden - lutim v pack!")
EndIf
If UO.GetSerial('lastcorpse')<>'0x00000000' Then
If UO.GetSerial('lastcorpse')==UO.GetSerial('Corpse') Then
UO.Print("Pokaji trup!")
UO.AddObject('Corpse')
While UO.Targeting()==2
wait(100)
Wend
Else
UO.WaitTargetObject('lastcorpse')
UO.AddObject('Corpse')
EndIf
UO.DeleteJournal()
UO.UseObject('Corpse')
wait(100)
If UO.InJournal("You can") Then
UO.Print("+++ Sorry ne mogu dostat!")
Else
UO.SetArm('temp')
UO.WaitTargetObject('Corpse')
UO.UseType('0x0F51') ;dagger
wait(1000)
UO.Arm('temp')
wait(1000)
If UO.GetQuantity('Corpse') Then
FromCorpse=1
Endif
Endif
Endif
For i=0 to 31
If FromCorpse Then
Exit=0
While Exit<>1
UO.FindType(Loot[i],-1,'Corpse')
If UO.FindCount() Then
UO.MoveItem('finditem','0','LootBag')
wait(WaitTime)
Else
Exit=1
Endif
Wend
Endif
Exit=0
While Exit<>1
UO.FindType(Loot[i],-1,'ground')
If UO.FindCount() Then
UO.MoveItem('finditem','0','LootBag')
wait(WaitTime)
Else
Exit=1
Endif
Wend
Next
UO.Print("!!! Polutal!")
end sub