скрипт на болу

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
DeDulia
Posts: 28
Joined: 2008-03-29 18:31:31

скрипт на болу

Post by DeDulia »

народ не могу понять почему не хочет содится на лошадь после того как кинул болу? помогите....играю на AoS серве

Code: Select all

Sub mbola()
var bola='0x26AC'
var Horse='0x0000D7F6' ; Сюда ID лошади
Var Fork='0x26BB' ;Тип оружия, используемый вами
Var Shield='0x1BC3' ;Тип щита, используемого вами
Var X=600 ; задержка
UO.FindType('0x26AC','0x0000', 'my') ;type and color of potion
    if UO.FindCount()>0 then
       If NOT UO.ObjAtLayer('Horse') Then
          uo.sayu( 'all follow me')
          UO.UseObject(Horse)
          wait(X)
       Else
            UO.Set('lasttarget','laststatus') # ТОЖЕ ЗАТЕСТИТЬ ЧТО ДЕЛАЕТ
          UO.UseObject('self')
          wait(X)
          uo.sayu( 'all follow me' )
          # uo.waittargetlast()
          # uo.attack ( 'lasttarget' ) ;  НАДО РАЗОБРАТЬСЯ С ТАГЕТОМ
            uo.waittargetobject ('laststatus')
            uo.attack ('laststatus')  ; НАДО ПОПРОБОВАТЬ ПО НОВОМУ
          uo.usetype(bola)
          wait (X)
       EndIf
    wait(X)
        If UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) == Shield Then
            If UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork Then
            ; уже в руках все
            return
            wait(X)
            Else
                ; надо взять в руки только оружие, щит не надо
                UO.Equipt( 'Rhand', Fork )
                    repeat
                    wait(100)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork
            Endif
        Else
            If UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork Then
                ; в руках только оружие, надо еще щит взять
                UO.Equipt( 'Lhand', Shield )
                    repeat
                    wait(100)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) == Shield
            Else
                ; в руках нет ни оружия, ни щита
                UO.Equipt( 'Rhand', Fork )
                    repeat
                    wait(X)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork
                UO.Equipt( 'Lhand', Shield )
                    repeat
                    wait(100)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) == Shield
             Endif
        Endif
    else
        uo.print("HET BOL!!!")
        wait(50)
    endif
end sub
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

Sub mbola()
var bola='0x26AC'
var Horse='0x0000D7F6' ; Сюда ID лошади
Var Fork='0x26BB' ;Тип оружия, используемый вами
Var Shield='0x1BC3' ;Тип щита, используемого вами
Var X=600 ; задержка
UO.FindType('0x26AC','0x0000', 'my') ;type and color of potion
    if UO.FindCount()>0 then
       If NOT UO.ObjAtLayer('Horse') Then
          uo.sayu( 'all follow me')
          UO.UseObject(Horse)
          wait(X)
       Else
            UO.Set('lasttarget','laststatus') # ТОЖЕ ЗАТЕСТИТЬ ЧТО ДЕЛАЕТ
          UO.UseObject('self')
          wait(X)
          uo.sayu( 'all follow me' )
          # uo.waittargetlast()
          # uo.attack ( 'lasttarget' ) ;  НАДО РАЗОБРАТЬСЯ С ТАГЕТОМ
            uo.waittargetobject ('laststatus')
            uo.attack ('laststatus')  ; НАДО ПОПРОБОВАТЬ ПО НОВОМУ
          uo.usetype(bola)
          wait (X)
       EndIf
    wait(X)
       If NOT UO.ObjAtLayer('Horse') Then
          uo.sayu( 'all follow me')
          UO.UseObject(Horse)
          wait(X)
       EndIf
        If UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) == Shield Then
            If UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork Then
            ; уже в руках все
            return
            wait(X)
            Else
                ; надо взять в руки только оружие, щит не надо
                UO.Equipt( 'Rhand', Fork )
                    repeat
                    wait(100)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork
            Endif
        Else
            If UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork Then
                ; в руках только оружие, надо еще щит взять
                UO.Equipt( 'Lhand', Shield )
                    repeat
                    wait(100)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) == Shield
            Else
                ; в руках нет ни оружия, ни щита
                UO.Equipt( 'Rhand', Fork )
                    repeat
                    wait(X)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Rhand' ) ) == Fork
                UO.Equipt( 'Lhand', Shield )
                    repeat
                    wait(100)
                    until UO.GetGraphic( UO.ObjAtLayer( 'Lhand' ) ) == Shield
             Endif
        Endif
    else
        uo.print("HET BOL!!!")
        wait(50)
    endif
end sub
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
DeDulia
Posts: 28
Joined: 2008-03-29 18:31:31

Post by DeDulia »

а неа=) извени все пашет...спосибо=) ток еще wait надо было добавить =)
Post Reply