Yoko

All sides of Injection
It is currently 2025-12-04 10:01:45

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2006-12-25 16:28:46 
Offline

Joined: 2005-01-21 15:45:19
Posts: 31
Вот этот скрипт шёт, режет на бинты, а вот у меня на шарде такая проблемка у меня для любого изделия нужна нитки (spools of thread) Можете поправить что бы он делал ещё добор на нитки (на нужную вещь, к примеру мне надо 8 ткани и 1 тинка)
Спасибо заранее.

Code:
Var Sunduk='0x40226380' # Сундук ИД 
Var TSKit='0x0F9D' # Тип набора кройки и шитья
Var TCloth='0x175D' # Тип ткани
Var TItem='0x1F03' # Тип шмотки которую крафтаем, роба в данном случае
Var Scissors='0x402F0E8E' # Ножницы чтоб резать то что накроили из ткани

sub Tailoring()
var i=0
uo.cancelmenu()
uo.automenu('Cloth','Shirts')
uo.automenu('Shirts','robe (16 folded cloth)')
uo.useobject(Sunduk)

while (uo.skillval('Tailoring',1)<1000)
i=i+1
if i==50 then
i=0
uo.usetype('0x097B')
wait(1000)
end if

UO.FindType(TCloth,-1,'backpack')
wait(200)
If UO.GetQuantity('finditem')<16 Then
   If UO.GetQuantity('finditem')>0 Then
      UO.SetReceivingContainer(Sunduk)
      cheklag()
      UO.Grab('0','finditem')
      wait(1000)
      UO.UnSetReceivingContainer()
   end if
   UO.FindType(TCloth,-1,Sunduk)   
   wait(200)
   If UO.GetQuantity('finditem')>=16 Then
      cheklag()
      UO.Grab('300','finditem')
      Wait(1000)
   else
      uo.closeuo()
   end if
end if

cheklag()
uo.waittargettype(TCloth)
wait(50)
uo.usetype(TSKit)
uo.deletejournal()
repeat
wait(10)
until uo.InJournal('You put the') or uo.InJournal('Tailoring failed.')

UO.FindType(TItem,-1,'backpack')
if UO.GetQuantity('finditem')>0 then
uo.waittargetobject('finditem')
uo.deletejournal()
uo.useobject(Scissors)
repeat
wait(10)
until uo.InJournal('You put the')
end if

if uo.weight > 400 then
UO.SetReceivingContainer(Sunduk)
wait(200)
UO.FindType('0x0E21')
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(200)
end if
UO.UnSetReceivingContainer()
end if

wend
uo.closeuo()
end sub

sub cheklag()
uo.deletejournal()
uo.click('backpack')
repeat
wait(10)
until uo.InJournal("backpack")
end sub

sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.Exec('terminate Tailoring')
wait(1000)
UO.Exec('exec Tailoring')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub

sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub


Top
   
 Post subject:
PostPosted: 2006-12-25 18:23:17 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
####################################################################
# Берём вещь по типу,цвету, количеству, ид откуда и ид куда класть #
####################################################################
Sub GetItem(type,color, quantity, where , to)
  uo.FindType(type,color,where)
  if uo.FindCount() then
    uo.moveitem('finditem',quantity,to)
    wait(750)
  end if
end sub


For example:
Code:
   
  var IngType='' #type
  var IngColor='' #color
   GetItem(IngType,IngColor,200,'ground','backpack')


Top
   
 Post subject:
PostPosted: 2006-12-26 12:21:03 
Offline

Joined: 2005-01-21 15:45:19
Posts: 31
Спасибо, пока скрипт работает, получилось вот что

Code:

Var Sunduk='0x404A62D9' # Сундук ИД
Var TSKit='0x0F9D' # Тип набора кройки и шитья
Var TCloth='0x175D' # Тип ткани
Var TThreat='0x0FA0' # Тип ниток
Var TItem='0x1F7B' # Тип шмотки которую крафтаем, роба в данном случае
Var Scissors='0x40265DAA' # Ножницы чтоб резать то что накроили из ткани

sub Tailoring()
var i=0
uo.cancelmenu()
uo.automenu('Cloth','Shirts & Robes')
uo.automenu('Shirts','doublet')
uo.useobject(Sunduk)

while (uo.skillval('Tailoring',1)<1000)
i=i+1
if i==50 then
i=0
uo.usetype('0x097B')
wait(1000)
end if

UO.FindType(TCloth,-1,'backpack')
wait(200)
If UO.GetQuantity('finditem')<16 Then
   If UO.GetQuantity('finditem')>0 Then
      UO.SetReceivingContainer(Sunduk)
      cheklag()
      UO.Grab('0','finditem')
      wait(1000)
      UO.UnSetReceivingContainer()
   end if
   UO.FindType(TCloth,-1,Sunduk)   
   wait(200)
   If UO.GetQuantity('finditem')>=16 Then
      cheklag()
      UO.Grab('300','finditem')
      Wait(1000)
   else
      uo.closeuo()
   end if
end if

UO.FindType(TThreat,-1,'backpack')
wait(200)
If UO.GetQuantity('finditem')<16 Then
   If UO.GetQuantity('finditem')>0 Then
      UO.SetReceivingContainer(Sunduk)
      cheklag()
      UO.Grab('0','finditem')
      wait(1000)
      UO.UnSetReceivingContainer()
   end if
   UO.FindType(TThreat,-1,Sunduk)   
   wait(200)
   If UO.GetQuantity('finditem')>=16 Then
      cheklag()
      UO.Grab('300','finditem')
      Wait(1000)
   else
      uo.closeuo()
   end if
end if

cheklag()
uo.waittargettype(TCloth)
wait(50)
uo.usetype(TSKit)
uo.deletejournal()
repeat
wait(10)
until uo.InJournal('You put the') or uo.InJournal('Tailoring failed.')

UO.FindType(TItem,-1,'backpack')
if UO.GetQuantity('finditem')>0 then
uo.waittargetobject('finditem')
uo.deletejournal()
uo.useobject(Scissors)
repeat
wait(10)
until uo.InJournal('You put the')
end if

if uo.weight > 400 then
UO.SetReceivingContainer(Sunduk)
wait(200)
UO.FindType('0x0E21')
if UO.GetQuantity('finditem')>0 then
UO.Grab('0','finditem')
wait(200)
end if
UO.UnSetReceivingContainer()
end if

wend
uo.closeuo()
end sub

sub cheklag()
uo.deletejournal()
uo.click('backpack')
repeat
wait(10)
until uo.InJournal("backpack")
end sub

sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (UO.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(20000) # WorldSave Protection
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.Say('')
Wait(3000)
UO.LDblClick(357,164)
UO.LClick(616,459)
Wait(3000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
UO.Exec('terminate Tailoring')
wait(1000)
UO.Exec('exec Tailoring')
UO.TextOpen()
UO.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub

sub MakeTime()
VAR D, T, Ret, i
Ret = STR(UO.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(UO.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub


Но я сделал не так как ты сказал, а по другому не много у тебя я немного не понимаю

Вот например можно ли воспользоватся только одним

Code:
 var IngType='' #type 
  var IngColor='' #color
   GetItem(IngType,IngColor,200,'ground','backpack')


Или туту всего лишь ссылка на ту функцию которую ты мне выше описал?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited