Yoko

All sides of Injection
It is currently 2026-01-18 08:45:02

All times are UTC+02:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2004-11-06 22:13:41 
Offline

Joined: 2004-11-06 22:07:09
Posts: 3
Вот такая проблема у меня наловил 5к татред мепов и теперь думаю как их разшифровать не вручьную помогите со скриптом плиз!!!
Суть такая скрпт должен брать из мешка карту и разшифровывать а потом кидать в другой мешек или каждый левел в разные мешки помогите плиззззз!!!
Я думаю всем понятно из моего ника под какой шард скрипт но навякий случай напишу "Драгон Ворлд" или как говорят в простонародье "ДРВ" :)
Заранее огромнейшее СПАСИБО!!!


Top
   
 Post subject:
PostPosted: 2004-11-07 16:39:16 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Code:
#################################################################################################
#   "Расшифровка карт"                                                                            #
#################################################################################################
#                 http://www.drw.ru                                                             #
#################################################################################################
#               Последнее изменение 14.03.2004                                                  #
#################################################################################################
#                 (c) AGRS, 2004                                                                #
#################################################################################################

#################################################################################################
#   >>> Константы                                                                                 #
#################################################################################################

Var SrcCont      = 0x40072864      # SERIAL Контейнер-источник
Var DstCont      = 0x401C96C9      # SERIAL Контейнер-приемник
Var PackCont      = 0x400B9D61      # SERIAL Пак
Var MapType      = 0x14EB      # TYPE Карта
Var MapColor      = 0x0000      # COLOR Карта
Var HideSkill      = "Stealth"      
Var Lagaet      = "Ohuenno"      # STR Если = "Ohuenno", то дополнительная проверка на лаги

#################################################################################################
#   >>> Запуск                                                                                    #
#################################################################################################

Sub Main()
   While true
      LoadItems(1, MapType, MapColor, SrcCont, PackCont)
      CheckLag()
      UO.FindType(STR(MapType), STR(MapColor), STR(PackCont))
      If UO.FindCount()>0 Then
         UO.UseType(STR(MapType))
         Wait(300)
      EndIf
      MoveAllItems(MapType, MapColor, PackCont, DstCont)
   Wend
End Sub

Sub Main2()
var L1 = 0
var L2 = 0
var L3 = 0
var L4 = 0
var L5 = 0
var TOUT
  Repeat
    UO.FindType(STR(MapType), STR(MapColor), STR(SrcCont))
    If UO.FindCount()>0 Then
      UO.SetReceivingContainer("backpack")
      UO.Grab("1", "finditem")
      CheckLag()
      UO.UseObject("finditem")
      TOUT=0
      Repeat
        Wait(250)
        TOUT=TOUT+250
      Until UO.InJournal("map is level") or TOUT>500
      Wait(800)
      UO.Click("finditem")
      Wait(800)
      If UO.InJournal("1 level") Then
        UO.MoveItem("finditem", "1", STR(DstCont), "20", "30", "0")
        L1=L1+1
      EndIf
      If UO.InJournal("2 level") Then
        UO.MoveItem("finditem", "1", STR(DstCont), "40", "45", "0")
        L2=L2+1
      EndIf
      If UO.InJournal("3 level") Then
        UO.MoveItem("finditem", "1", STR(DstCont), "60", "60", "0")
        L3=L3+1
      EndIf
      If UO.InJournal("4 level") Then
        UO.MoveItem("finditem", "1", STR(DstCont), "80", "75", "0")
        L4=L4+1
      EndIf
      If UO.InJournal("5 level") Then
        UO.MoveItem("finditem", "1", STR(DstCont), "100", "90", "0")
        L5=L5+1
      EndIf
      CheckLag()
      UO.FindType(STR(MapType), STR(MapColor), STR(SrcCont))
    EndIf
    UO.TextClear()
    UO.TextPrint("Level1="+STR(L1))
    UO.TextPrint("Level2="+STR(L2))
    UO.TextPrint("Level3="+STR(L3))
    UO.TextPrint("Level4="+STR(L4))
    UO.TextPrint("Level5="+STR(L5))
  Until UO.FindCount()<1
End Sub

#################################################################################################
#   >>> Сервисные функции                                                                           #
#################################################################################################

#=>
Sub LoadItems(fmiItemCount, fmiItemType, fmiItemColor, fmiSrcContainerSerial, fmiDstContainerSerial)
Var fmiToGrab
   If CountOf(fmiItemType, fmiItemColor, fmiDstContainerSerial)<fmiItemCount Then
      UO.SetReceivingContainer(STR(fmiDstContainerSerial))
      Repeat
         CheckLag()
         fmiToGrab=fmiItemCount-CountOf(fmiItemType, fmiItemColor, fmiDstContainerSerial)
         UO.FindType(STR(fmiItemType), STR(fmiItemColor), STR(fmiSrcContainerSerial))
         If UO.FindCount()>0 Then
            UO.Grab(STR(fmiToGrab), 'finditem')
            Wait(300)
         EndIf
      If Lagaet=="Ohuenno" Then
         CheckLag()
      EndIf
      Until CountOf(fmiItemType, fmiItemColor, fmiSrcContainerSerial)==0 or CountOf(fmiItemType, fmiItemColor, fmiDstContainerSerial)>=fmiItemCount
      UO.UnsetReceivingContainer()
   End If
Return CountOf(fmiItemType, fmiItemColor, fmiDstContainerSerial)
End Sub

Sub MoveAllItems(fmiItemType, fmiItemColor, fmiSrcContainerSerial, fmiDstContainerSerial)
      UO.SetReceivingContainer(STR(fmiDstContainerSerial))
      Repeat
         CheckLag()
         UO.FindType(STR(fmiItemType), STR(fmiItemColor), STR(fmiSrcContainerSerial))
         If UO.FindCount()>0 Then
            UO.Grab(0, 'finditem')
            Wait(300)
         EndIf
      If Lagaet=="Ohuenno" Then
         CheckLag()
      EndIf
      Until UO.FindCount()<1
      UO.UnsetReceivingContainer()
End Sub

Sub CountOf(fcoItemType, fcoItemColor, fcoContainerSerial)
Var fcoFindCount = 0
Var fcoResult = 0
   UO.FindType(STR(fcoItemType), STR(fcoItemColor), STR(fcoContainerSerial))
   fcoFindCount=UO.FindCount()
   If fcoFindCount==1 Then
      fcoResult=UO.GetQuantity('finditem')
   EndIf
   If fcoFindCount>1 Then
      While fcoFindCount>0
         UO.FindType(STR(fcoItemType), STR(fcoItemColor), STR(fcoContainerSerial))
         fcoResult=fcoResult+UO.GetQuantity('finditem')
         UO.Ignore('finditem', 'on')
         fcoFindCount=fcoFindCount-1
      Wend
      UO.IgnoreReset()
   EndIf
   Return fcoResult
End Sub

Sub Hide()
   While Not UO.Hidden()
      UO.DeleteJournal()
      UO.UseSkill(HideSkill)
      Repeat
         Wait(100)
      Until UO.InJournal('You have hidden') OR UO.InJournal('seem to hide')
   Wend
End Sub

Sub CheckLag()
   UO.DeleteJournal()
   UO.Click('backpack')
   Repeat
      Wait(100)
   Until UO.InJournal('backpack')
   CheckSave()
End Sub

Sub CheckSave()
   UO.DeleteJournal()
   If UO.InJournal('save has been') then
      Wait(10000)
   EndIf
   UO.DeleteJournal()
End Sub
#=>


Top
   
 Post subject:
PostPosted: 2004-11-07 16:40:31 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Берет карты из одного контейнера, расшифровывает и раскладывает в другом контейнере по уровням.

Домашнее задание: переделай так как тебе хочется. Один уровень - один мешок.


Top
   
 Post subject:
PostPosted: 2004-11-07 17:14:31 
Offline

Joined: 2004-09-12 10:48:45
Posts: 6
СПАСИБО огромнейшее!!!!!


Top
   
 Post subject:
PostPosted: 2004-11-07 19:37:28 
Offline
User avatar

Joined: 2004-06-23 08:55:32
Posts: 128
Спасибо за скрипт )))
Надо будет ловить карты :).
Спасибо АГРЗ.

_________________
©Blodmoon :)


Top
   
 Post subject:
PostPosted: 2005-01-26 20:06:10 
Offline

Joined: 2004-10-18 20:25:48
Posts: 11
А скрипта на раскладку карт по координатам не выложите???? :)


Top
   
 Post subject:
PostPosted: 2005-01-26 22:28:53 
Offline
Expert!

Joined: 2004-04-03 17:36:29
Posts: 2544
Location: Saint-Petersburg
Когда АГРСу надоест линеар2 и он вернется в УО, может и выложит. Если захочет ;)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 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