Yoko

All sides of Injection
It is currently 2026-01-16 11:03:16

All times are UTC+02:00




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
PostPosted: 2005-05-26 20:03:56 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Code:
sub Keg() 

VAR Sunduk = '' ; внести айди сундука с кегом
VAR Keg = '0x1940'
VAR Bottle = '0x0F0E'
VAR BottleSerial, k
 
   UO.FindType( Bottle, -1, -1 )
    If UO.FindCount() > 0 Then
      UO.FindType( Keg, -1, Sunduk )
        If UO.FindCount() == 0 Then
         UO.Print('Potion Keg not found, script terminated!')
         UO.Exec('terminate Keg')
      EndIf
      UO.Grab( '1', 'finditem' )
      CheckLag()       
      While UO.Count( Bottle ) > 0
         UO.DeleteJournal()
         BottleSerial = UO.GetSerial( Bottle )
         UO.WaitTargetObject( BottleSerial )
         UO.UseType( Keg )
         k = 0
         while NOT UO.InJournal('You put') AND NOT UO.InJournal('fail') AND NOT UO.InJournal("can't use this yet!") AND ( k < 30 )
            k = k + 1
            wait(500)
            wend 
        Wend
      UO.FindType( Keg, -1, -1 )
      UO.Move('finditem', 0, Sunduk)
   end if
end sub

Нашел скрипт автором кот является- flake
Подскажите как исправить скрипт что бы он работал слдующим образом: бетерся пустой кег и сундука№1 потом потом в том же сундуке ищет поушен по типу найдя нужный заливает его в кег пустые бытылки кидает обратно при заполнении кега кидает его в сундук№2 и так по кругу

[Тут я был I'm]


Top
   
 Post subject:
PostPosted: 2005-05-26 21:00:04 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Code:
VAR Sunduk='0x406C1757' 
VAR Sunduk2='0x40048E2F'



sub Kegi()
var i=0
uo.useobject('backpack')
uo.useobject(Sunduk)
uo.useobject(Sunduk2)
wait(1000)
while 1==1

i=i+1
if i==50 then
uo.usetype('0x097B')
wait(1000)
i=0
if uo.skillval("Spirit Speak",1)<1000 then
cheklag()
uo.print("Spirit Speak...")
LastTimer=UO.Timer()
uo.useskill ("Spirit Speak")
uo.deletejournal()
repeat
wait(10)
until UO.InJournal("You establish a connection to the netherworld.") or UO.InJournal("You fail your attempt at contacting the netherworld.") OR (UO.Timer()>LastTimer+200)
end if
end if


UO.FindType('0x0F0A','0x0000','backpack')
While UO.GetQuantity('finditem')<=0
UO.FindType('0x0F0A','0x0000',Sunduk)
wait(400)
UO.Grab('1','finditem')
wait(400)
Wend

UO.FindType('0x1940','0x0000','backpack')
While UO.GetQuantity('finditem')<=0
UO.FindType('0x1940','0x0000',Sunduk)
wait(400)
UO.Grab('1','finditem')
wait(400)
Wend






until UO.InJournal("There's no space for further potions") OR (UO.Timer()>LastTimer+200)
uo.findtype('0x1940',-1,'backpack')
uo.moveitem('finditem',0,Sunduk2)
wait(2000)


uo.findtype('0x0F0E',-1,'backpack')
uo.moveitem('finditem',0,Sunduk)
wait(2000)
uo.deletejournal()
end if
wend


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

end sub

Попробывал сам написать но не рабатет что то так как это мой первый скрипт . Знатоки помагите ошибки исправить
[И тут я был I'm]


Top
   
 Post subject:
PostPosted: 2005-05-26 21:46:39 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Code:
VAR Sunduk='0x406C1757' 
VAR Sunduk2='0x40048E2F'
VAR LastTimer

sub Alchemy()
var i=0
uo.useobject('backpack')
uo.useobject(Sunduk)
wait(400)
uo.useobject(Sunduk2)
wait(1000)
while 1==1

i=i+1
if i==50 then
uo.usetype('0x097B')
wait(1000)
i=0
if uo.skillval("Spirit Speak",1)<1000 then
cheklag()
uo.print("Spirit Speak...")
LastTimer=UO.Timer()
uo.useskill ("Spirit Speak")
uo.deletejournal()
repeat
wait(10)
until UO.InJournal("You establish a connection to the netherworld.") or UO.InJournal("You fail your attempt at contacting the netherworld.") OR (UO.Timer()>LastTimer+200)
end if
end if
UO.FindType('0x1940','0x0000','backpack')
While UO.GetQuantity('finditem')<=0
UO.FindType('0x1940','0x0000',Sunduk)
wait(1000)
UO.Grab('1','finditem')
wait(1000)
Wend

UO.FindType('0x0F0A','0x0000','backpack')
While UO.GetQuantity('finditem')<=1
UO.FindType('0x0F0A','0x0000',Sunduk)
wait(1000)
UO.Grab('1','finditem')
wait(1000)
Wend
uo.deletejournal()
LastTimer=UO.Timer()
uo.findtype('0x0F0A','0x0000','backpack')
if uo.findcount() then
uo.waittargetobject('finditem')
uo.usetype('0x1940')
wait(500)
repeat
endif
wend



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

if UO.Weight>300 then    ;òóò óêàçûâàåòå âåñ ïðè êîòîðîì íà÷íåòñÿ ïåðåêëàäûâàíèå
uo.findtype('0x0E20',-1,'backpack')
uo.moveitem('finditem',0,Sunduk)
wait(2000)
end if
wend

wend
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 Alchemy')
wait(1000)
UO.Exec('exec Alchemy')
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

предыдущий ваще не работал переделать попробывал
почему то в кег не заливает поушены подправьте где я ошибся

[Да и тут я был I'm]


Top
   
 Post subject:
PostPosted: 2005-05-26 21:51:06 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Code:
until UO.InJournal("There's no space for further potions") OR (UO.Timer()>LastTimer+200)
uo.findtype('0x1940',-1,'backpack')
uo.moveitem('finditem',0,Sunduk2)
wait(2000)

подскажите где это воткнуть что бы полный кег скидывался в сундук№2

Code:
uo.findtype('0x0F0E',-1,'backpack') 
uo.moveitem('finditem',0,Sunduk)


и куда это вставить что пустые бутылки кидал в сундук №1

[Где я тольео небыл I'm]


Top
   
 Post subject:
PostPosted: 2005-05-27 08:47:23 
Offline
Expert!
User avatar

Joined: 2004-10-15 22:38:04
Posts: 1396
Location: Moscow City.
Подсказка дня: ты знаеш что есть теги но есть спецальный для этого случая.
[code]
...text...
[/code]


Top
   
 Post subject:
PostPosted: 2005-05-27 09:48:00 
Offline
Sphere expert
User avatar

Joined: 2004-10-01 08:27:38
Posts: 1143
Location: Уфа
I'm wrote:
Подсказка дня: ты знаеш что есть теги но есть спецальный для этого случая.
Code:
...text...

Фигаро там - фигаро тут. :D

_________________
Сделал дело - флуди смело !!!


Top
   
 Post subject:
PostPosted: 2005-05-28 16:08:42 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Code:
VAR Sunduk='0x406C1757' 
VAR Sunduk2='0x40048E2F'
VAR LastTimer

sub keg()
var i=0
uo.useobject('backpack')

uo.useobject(Sunduk)
wait(1000)
uo.useobject(Sunduk2)
wait(1000)
while 1==1

i=i+1
if i==50 then
uo.usetype('0x097B')
wait(1000)
i=0
if uo.skillval("Spirit Speak",1)<1000 then
cheklag()
uo.print("Spirit Speak...")
LastTimer=UO.Timer()
uo.useskill ("Spirit Speak")
uo.deletejournal()
repeat
wait(10)
until UO.InJournal("You establish a connection to the netherworld.") or UO.InJournal("You fail your attempt at contacting the netherworld.") OR (UO.Timer()>LastTimer+200)
end if
end if

UO.FindType('0x1940','0x0000','backpack')
While UO.GetQuantity('finditem')<=0
UO.FindType('0x1940','0x0000',Sunduk)
wait(700)
UO.Grab('1','finditem')
wait(700)
Wend

UO.FindType('0x0F0A','0x0000','backpack')
While UO.GetQuantity('finditem')<1
UO.FindType('0x0F0A','0x0000',Sunduk)
wait(700)
UO.Grab('1','finditem')
wait(700)
Wend



uo.deletejournal()
LastTimer=UO.Timer()

 
uo.waittargettype('0x0F0A','0x0000')
uo.usetype('0x1940','0x0000')
repeat
wait(10)


if UO.Weight>100 then    ;òóò óêàçûâàåòå âåñ ïðè êîòîðîì íà÷íåòñÿ ïåðåêëàäûâàíèå
uo.findtype('0x0F0E',-1,'backpack')
uo.moveitem('finditem',0,Sunduk)
wait(2000)
end if
wend

wend
end sub


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



wend
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 Alchemy')
wait(1000)
UO.Exec('exec Alchemy')
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


парни момагите довести до ума скрипт или подправьте
я в инже пока ни чего не рублю

[duk есть спецальные теги code! I'm]


Top
   
 Post subject:
PostPosted: 2005-05-29 16:28:24 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
парни помаги чкрипт до ума довети, что смогя сам поправил.
я не могу понять как кег кот уже полный скидывать в сункуд№2 и брать новый кег из сундаку №1


Top
   
 Post subject:
PostPosted: 2005-05-29 16:48:57 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Держи особо не старался...
Смотри если сложится такая ситуация что бутыл ки закончились а кег не заполнился до конца то он не попадет в сундук №2 сделано из логичности хотя ты это можешь исправить
Code:
sub Keg() 
VAR Sunduk1 = ''
VAR Sunduk2 = '' 
VAR Keg = '0x1940'
VAR Bottle = '0x0F0E'
VAR BottleColor = '0'
Var Count=0
while not uo.dead()
      wait(100)
      Count= uo.count(Keg)
      if Count = 0 then
             UO.FindType( Keg, -1, Sunduk1 )
             If UO.FindCount() == 0 Then
                     UO.Print('Potion Keg not found, script terminated!')
                     UO.Exec('terminate Keg')
             else
                     UO.Grab( 1, 'finditem' )
                     while uo.count(Keg) == Count
                           wait(100)
                     wend
             EndIf
UO.DeleteJournal()
UO.FindType(Bottle, BottleColor, Sunduk1)
While UO.Findcount() and not UO.InJournal('no space')
         UO.DeleteJournal()
         UO.WaitTargetObject('finditem')
         UO.UseType(Keg)
         while not UO.InJournal('You put|fail|use this yet!|no space')
            wait(100)
         wend
         UO.FindType(Bottle, BottleColor, Sunduk1)
Wend
     Count= uo.count(Keg)
      if UO.InJournal('no space') then #вот тут караз если убрать IF то кег всегда будет кидатся в сундук
          UO.MoveItem('^'+Keg, -1, Sunduk2)
          while uo.count(Keg) == Count
               wait(100)
          wend
      endif
            Count= uo.count('0x0F0E')
      If Count>0 then
           UO.MoveItem('^0x0F0E', -1, Sunduk1)
           while uo.count('0x0F0E') == Count
              wait(100)
           wend
      endif
wend
end sub


Last edited by Grin on 2005-06-01 00:25:52, edited 3 times in total.

Top
   
 Post subject:
PostPosted: 2005-05-30 11:36:20 
Offline
Expert!
User avatar

Joined: 2004-10-15 22:38:04
Posts: 1396
Location: Moscow City.
duk сделай одолжение есть спец штука называется code она намного лучше чем сраное зеленое выделение!


Top
   
 Post subject:
PostPosted: 2005-05-30 14:18:19 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Grin блогодарю за содействие дубу пробывать


Top
   
 Post subject:
PostPosted: 2005-05-30 15:38:16 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
Grin если тебе не сложно поправь в моем скрипте кот чуть выше что бы он скидывал полный кег


Top
   
 Post subject:
PostPosted: 2005-05-30 16:08:09 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
а предложеный мной не работает?;)


Top
   
 Post subject:
PostPosted: 2005-05-30 19:58:24 
Offline

Joined: 2005-04-03 14:12:12
Posts: 31
он ошибки выдает
и надо что бы если поушенов не оказалось в сундуке№1 чар их там продолжал искать и как нашел кидал его в бекпак и в кег заливал так как другой чар будет варить пойшены и кидать в этот сундук.
так же пустые бутылки скидывать в сундук №1


Top
   
 Post subject:
PostPosted: 2005-05-30 21:26:01 
Offline
Expert!
User avatar

Joined: 2005-05-04 14:05:19
Posts: 2580
Location: Москва
Сказалбы хоть где и какие ;) куда быстрей было бы...


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 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