I'm new in here, using Injection for only 2 weeks, but still considered to put few of my scripts here.
1) Автолут.
Скрипт умеет:
+ Лутить все трупы на определенном расстоянии до персонажа
+ Лутить подсумки и их подсумки и т.д.
+ Отбор сделан не через поиск каждого вида вещи (которых может быть за 100) а через отбор существующих вещей, что ускоряет процесс лута.
+ Подбираемые вещи сделаны вида от ID до ID, тоесть если все вещи с началом 0x1FF вам нужны, то хватает указать от 0x1FF до 0x1FFF.
+ Также лутит вещи на земле. Лут на земле долго работает при большом количестве окружающих обьектов. Лут оптимизирован под трупы.
1) Autoloot
Script can:
+ Loot all corpses around
+ Loot containers
+ Searching for items is made not by searching every item, but by checking ID's of excisting items that makes it faster to loot.
+ The way of selecting needed items is made as selecting bounds FromID and ToID and every item between this ID's will be taken.
+ Script can also loot on the ground. It is little slow when there is a lot of items there, but it was optimized for corpses
Code: Select all
##################################
### AutoLoot v 3.1 by Beyonder ###
##################################
###Запускать auto_loot()
###Run the function auto_loot()
### Нужна любая функция CheckLag()
### Any CheckLag() function is needed for script
# Время достаточное для открытия контейнера
# Time enough for container to open
var OpenContWait=300
# Время между лутом вещей
# Delay after looting each item
var LootItemWait=300
### Основная функция лута # ContainerID - ID контейнера # BagID - ID мешка куда складывать вещи
### Main looting function # Container ID - ID of the container to loot # BagID - bag where to put
sub loot_container(ContainerID,BagID)
var ContCnt=2
var NeedCnt=7
dim ContFr[10]
dim ContTo[10]
dim NeedFr[20]
dim NeedTo[20]
dim NeedTypes[20]
var ItemGr
var ItemID
var FCnt
var iItem
##### Настройка вещей
##### Item config
#### Контейнеры
#### Containers
ContFr[0]='0x0E70'
ContTo[0]='0x0E80'
#
ContFr[1]='0x09B0'
ContTo[1]='0x09B0'
#### Вещи
#### Items
#### Gold
NeedFr[0]='0x0EED'
NeedTo[0]='0x0EED'
#### Gems
NeedFr[1]='0x0F00'
NeedTo[1]='0x0F30'
#### Scrolls
NeedFr[2]='0x1F10'
NeedTo[2]='0x1FFF'
#### Jewerly
NeedFr[3]='0x1F05'
NeedTo[3]='0x1F0F'
NeedFr[4]='0x1080'
NeedTo[4]='0x108F'
####
#### Bandages
NeedFr[5]='0x0E20'
NeedTo[5]='0x0E21'
#### Arrows
NeedFr[6]='0x0F3F'
NeedTo[6]='0x0F3F'
####
NeedTypes[0]=1
NeedTypes[1]=1
NeedTypes[2]=1
NeedTypes[3]=1
NeedTypes[4]=1
NeedTypes[5]=1
NeedTypes[6]=0
#####
#### Getting items up
repeat
UO.FindType(-1,-1,ContainerID)
FCnt=UO.FindCount()
if UO.FindCount()>0 then
ItemGr=UO.GetGraphic('finditem')
ItemID=UO.GetSerial('finditem')
#UO.Print('Serial is: '+ItemID)
## Scanning for bags
iItem=0
while iItem<ContCnt
if IsDip(ItemGr,ContFr[iItem],ContTo[iItem]) then
UO.UseObject(ItemID) ## Opening container
wait(OpenContWait)
loot_container(ItemID,BagID)
UO.Hide(ItemID) ## Closing opened container
iItem=ContCnt
end if
iItem=iItem+1
wend
## Scanning for items
iItem=0
while iItem<NeedCnt
if NeedTypes[iItem] AND IsDip(ItemGr,NeedFr[iItem],NeedTo[iItem]) then
UO.MoveItem(ItemID,0,BagID)
wait(LootItemWait)
iItem=NeedCnt
end if
iItem=iItem+1
wend
UO.Ignore(ItemID)
end if
until FCnt==0
end sub
### Функция возвращает следующий труп на определенном расстоянии
### Function returns next corpse on given distance
sub next_corpse(max_len)
var CorpseID
var VectorLen
repeat
UO.FindType('0x2006',-1,'ground') ### Finding corpse
CorpseID=UO.GetSerial('finditem')
VectorLen=UO.GetDistance(CorpseID)
if VectorLen>max_len then
UO.Ignore(CorpseID)
CorpseID=77 ## Too far
end if
if UO.FindCount()==0 then
CorpseID=0 ## No more corpses
end if
until CorpseID==0 or not CorpseID==77
return CorpseID
end sub
### Проверка на принадлежность значения диапазону
### Check for a value being between bounds
sub IsDip(x,f,t)
var i_x=UO.Hex2Int(x)
var i_f=UO.Hex2Int(f)
var i_t=UO.Hex2Int(t)
if i_x>=i_f AND i_x<=i_t then
return true
else
return false
end if
end sub
### Функция лутящая все трупы вокруг
### All corpse looting function
sub auto_loot()
dim Corpses[50]
var CorpseCnt=0
var CorpseNum
var CorpseID
var maxlen=2
var BagID='0x400FA5DE'
UO.IgnoreReset()
#### Закомментируйте эту функцию если не хотите лутить на земле (сначала проверьте)
#### Comment this function if you dont want to loot on ground (test it first)
loot_container('ground',BagID) #
##################################
UO.IgnoreReset()
## Searching Corpses
CorpseID=next_corpse(maxlen*maxlen)
while CorpseID
Corpses[CorpseCnt]=CorpseID
CorpseCnt=CorpseCnt+1
CorpseID=next_corpse(maxlen*maxlen)
UO.Ignore(CorpseID)
wend
## Looting corpses
if (CorpseCnt>1) then
for CorpseNum=0 to CorpseCnt-1
UO.UseObject(Corpses[CorpseNum])
wait(OpenContWait)
loot_container(Corpses[CorpseNum],BagID)
next
end if
UO.IgnoreReset()
end sub
2) Автохил
Скрипт состоит из 4-ех скриптов - autoheal, HideAndHeal, Hide, bandage_and_arm
bandage_and_arm - лечиться 1 раз восстанавливая одетое оружие
autoheal - лечиться до позеленения, также отмывает бинты
Hide - прячеться до посерения
HideAndHeal - сначала Hide потом autoheal
2) Autoheal
Script contains of 4 scripts - autoheal, HideAndHeal, Hide, bandage_and_arm
bandage_and_arm - heals 1 time and then picks up the weapon
autoheal - heal until full health, also cleans bandages
Hide - hides until hidden
HideAndHeal - Hide() and then autoheal()
Code: Select all
sub bandage_and_arm()
UO.SetArm("Start_script_arm")
UO.BandageSelf()
Wait(500)
UO.Arm("Start_script_arm")
end sub
sub autoheal()
UO.DeleteJournal()
UO.SetArm("Start_script_arm")
while not UO.InJournal('need healing')
UO.DeleteJournal()
UO.BandageSelf()
CheckLag()
UO.FindType('0x0E21')
if (UO.FindCount()==0) then
UO.WaitTagetType('0x1008')
UO.UseType('0x0E20')
wait(200)
end if
while not UO.InJournal('You apply') and not UO.InJournal('You put the') and not UO.InJournal("You don't need healing")
wait(100)
wend
wend
Wait(500)
UO.Arm("Start_script_arm")
end sub
sub HideAndHeal()
Hide()
autoheal()
end sub
sub Hide()
UO.WarMode(0)
UO.DeleteJournal()
while not UO.InJournal('You have hidden')
UO.DeleteJournal()
UO.UseSkill('Hiding')
CheckLag()
while not UO.InJournal('You have hidden') and not UO.InJournal("You can't seem to hide")
wait(100)
wend
wend
end sub
3) FastRecall
Полезен ньюбам любых видов. При запуске функции порталиться домой по рунке в рунбуке. Скрипт настроен под ДРВ но может работает и на других шардах.
3) FastRecall
Usefull for noobs of any kind. When launched - teleports home by rune in runebook.
Code: Select all
var SelfName='Beyonder' ## Your name without clan name
var rune_num=1 ## Rune number in runebook
sub recall_home()
UO.DeleteJournal()
uo.UseObject('0x401908D7')
wait(100)
while not UO.InJournal(SelfName+': Kal Ort Por')
uo.LClick(135, rune_num*15+55)
wait(200)
wend
end sub
Жду комментариев.
I'm waiting for your comments.