Ultima online renaissance Lineage 2
Главная | Регистрация | Вход Приветствую Вас Гость | RSS
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » UO Injection \ Uo pilot » UO Injection » Tailoring (Tailoring)
Tailoring
banderlogДата: Четверг, 22.10.2009, 03:17 | Сообщение # 1
Майор
Группа: Администраторы
Сообщений: 96
Награды: 1
Репутация: 32767
Статус: Offline
Code
###################################  
# Скрипт для Крафтов #  
# (В данном случае для Tailoring) #  
###################################  

;|---------------------------|  
;| Описание переменных Items |  
;|---------------------------|  

var EQ,RQ1,RQ2,QB  
var Eat='0x097B' ; Type Еда (Рыба)  
var Res1='0x175D' ; Type Ресурс 1 (Ткань)  
var Res2='0x0FA0' ; Type Ресурс 2 (Нитки)  
var Kit='0x0F9D' ; Type Инструмента крафта (Sewing Kit)  
var Items='0x1F03' ; Type Выходного материала  
EQ=50 ; Количество еды  
RQ1=150 ; Количество ресурса 1  
RQ2=20 ; Количество ресурса 2  

;|---------------------------------|  
;| Описание переменных контейнеров |  
;|---------------------------------|  

var ContainerRes='0x40445312' ; Object Контейнер с ресурсами  
var ContainerBag='0x40445312' ; Object Контейнер с сумками  
var BagCount='0x0E76' ; Type сумок в контейнере ContainerBag  

sub Main()  
uo.Set('quiet','1')  
uo.Exec('exec Craft')  
uo.IgnoreReset()  
end sub  

sub OpenBag()  
var i,BagID  
uo.UseObject(ContainerBag)  
uo.UseObject(ContainerRes)  
uo.IgnoreReset()  
repeat  
uo.DeleteJournal()  
wait(1000)  
uo.FindType(BagCount,'-1',ContainerBag)  
if uo.FindCount('finditem') > 1 then  
i=(uo.FindCount('finditem') +1)  
uo.Click('finditem')  
if uo.InJournal("a bag") Then  
BagID=uo.JournalSerial(uo.InJournal("a bag")-1)  
uo.SetJournalLine(uo.InJournal("a bag")-1,"")  
uo.FindType(Items,'-1',BagID)  
uo.UseObject(BagID)  
wait(2000)  
uo.Hide(BagID)  
uo.Ignore(BagID,'on')  
end if  
end if  
i=(i-1)  
until i==0  
uo.Hide(ContainerBag)  
uo.Hide(ContainerRes)  
uo.Resend()  
wait(3000)  
uo.IgnoreReset()  
end sub  

sub Craft()  
var Last=0,LastTimer  
OpenBag()  
While not uo.Dead()  

;|-----------------------------------|  
;| Search of resources and Take them |  
;|-----------------------------------|  

uo.FindType(Eat,'-1','me')  
if uo.GetQuantity('finditem')<1 then  
uo.FindType(Eat,'-1',ContainerRes)  
if uo.GetQuantity('finditem')>1 then  
ToTake(3)  
else  
uo.Exec('Terminate Craft')  
end if  
else  
ToEat()  
end if  
uo.FindType(Res1,'-1','me')  
if uo.GetQuantity('finditem')<16 then  
uo.FindType(Res1,'-1',ContainerRes)  
if uo.GetQuantity('finditem')>1 then  
ToTake(1)  
else  
uo.Exec('Terminate Craft')  
end if  
end if  
uo.FindType(Res2,'-1','me')  
if uo.GetQuantity('finditem')<1 then  
uo.FindType(Res2,'-1',ContainerRes)  
if uo.GetQuantity('finditem')>1 then  
ToTake(2)  
else  
uo.Exec('Terminate Craft')  
end if  
end if  

;|-------------|  
;| Craft Items |  
;|-------------|  

uo.DeleteJournal()  
uo.WaitTargetType(Res1)  
uo.UseType(Kit)  
uo.WaitMenu ('Cloth','Shirts','Shirts','robe') ; Название КрафтМеню1(Cloth),ПодМеню2(Shirts) -> КрафтМеню2(Shirts),ПодМеню2(Robe)  
LastTimer=UO.Timer()  
repeat  
wait(100)  
until uo.InJournal("You put") or uo.InJournal("Tailoring") or LastTimer+150<uo.Timer()  
UnLoadItem()  
wend  
end sub  

sub ToTake(i)  
var G,F  
if i==1 then  
G=RQ1  
F=Res1  
end if  
if i==2 then  
G=RQ2  
F=Res2  
end if  
if i==3 then  
G=EQ  
F=Eat  
end if  
uo.FindType(F,'-1',ContainerRes)  
if uo.GetQuantity('finditem')>1 then  
uo.Grab(''+str(G)+'','finditem')  
uo.DeleteJournal()  
repeat  
uo.FindType(F,'-1','me')  
wait(1500)  
until uo.InJournal("That is too") or uo.GetQuantity('finditem') > 1  
end if  
end sub  

sub ToEat()  
uo.UseType(Eat)  
end sub  

sub UnLoadItem()  
var BagID  
var i=0  
var m=0  
repeat  
uo.DeleteJournal()  
uo.FindType(BagCount,'-1',ContainerBag)  
uo.Click('finditem')  
m=0  
repeat  
wait(1000)  
until uo.InJournal("a bag")  
if uo.InJournal("a bag") Then  
BagID=uo.JournalSerial(uo.InJournal("a bag")-1)  
uo.SetJournalLine(uo.InJournal("a bag")-1,"")  
uo.FindType('-1','-1',BagID)  
if uo.FindCount('finditem')<220 then  
m=uo.FindCount('finditem')  
uo.SetReceivingContainer(BagID)  
uo.FindType(Items,'-1','me')  
uo.Grab('0','finditem')  
uo.ConColor('0x0021')  
uo.Set('quiet','0')  
uo.Print(uo.Print('In BagPack#'+Str(i+1)+' items '+Str(m)+''))  
uo.Set('quiet','1')  
uo.ConColor('0x0035')  
wait(1000)  
uo.UnSetReceivingContainer()  
else  
i=i+1  
uo.Ignore(BagID, 'on')  
end if  
end if  
if i==QB then  
uo.IgnoreReset()  
i=0  
end if  
uo.FindType(Items,'-1','me')  
until uo.FindCount('finditem') < 1  
end sub


окажите нам поддержку, отправив перевод через WebMoney :

Кошелек-1 WMZ: Z315568733306
Кошелек-2 WMR: R380806767277
 
Форум » UO Injection \ Uo pilot » UO Injection » Tailoring (Tailoring)
  • Страница 1 из 1
  • 1
Поиск:

Copyright MyCorp © 2024