Немного необычно) Но нужно)
Moderators: Murderator+, Murderator
Немного необычно) Но нужно)
Суть такая. Я копаю на постороннем софте, у этого софта замечен баг, когда руда на кнопке "сворачивания" бакпака - он не может ее взять почему то и берет бакпак, и не разгружает!!!!!!!
Просьба такая! Помочь сделать скрипток если руда вне доступных руками границ бакпака - чтобы ее перекладывало в серединку))
Просьба такая! Помочь сделать скрипток если руда вне доступных руками границ бакпака - чтобы ее перекладывало в серединку))
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
А сам ?
uo.findtype, uo.getx(), uo.getY() - и всего делов-то..
uo.findtype, uo.getx(), uo.getY() - и всего делов-то..
Code: Select all
sub fixOre()
var i, x, y
; объявление "доступных" координат рюкзака
var min_x = 5
var min_y = 5
var max_x = 500
var max_y = 500
; объявление координат куда перекидывать
var move_x = 200
var move_y = 200
DIM ore[4]
ore[0] = "0x0000"
ore[1] = "0x0000"
ore[2] = "0x0000"
ore[3] = "0x0000"
for i = 0 to 3
uo.findtype( ore[ i ], '-1', 'backpack' )
while uo.findcount()
x = uo.getX( 'finditem' )
y = uo.getY( 'finditem' )
if x < min_x || x > max_x || y < min_y || y > max_y then
uo.moveitem( 'finditem', '0', 'backpack', str( move_x ), str( move_y ), '0' )
wait( 500 )
endif
uo.findtype( ore[ i ], "-1", "backpack" )
wend
next
uo.ignorereset()
endsub
Last edited by Destruction on 2007-12-05 14:13:19, edited 1 time in total.
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
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
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
TarantuL wrote:Спасибо за отзывчивость!
Типы вписал! Вроде больше ничего не нужно!
Но скрипт запускается и ничего не делает.
Слева пишется что нашел 1 итем и так до самого верху пишет и пишет![]()
![]()
1. Выключи Verbose Menu - нафиг не нужно.
2. Впиши координаты, я же их с потолка написал

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
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
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
TarantuL wrote:балин, а я порадовался что тебе известны координаты "доступных" мест))))))
Мне - нет. Потолку, как выяснилось - тоже нет.
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
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
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
Grin wrote:Печально.
Согласен. По обоим пунктам печально.
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
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
,info Левого верхнего предмета:
Стало быть минимальные х и у
,info Правого нижнего предмета:
Стало быть максимальные х и у
Подставил...
Получил:
Результат то бездействие, то анхандлел ерор вместе с флудом, что ему не нравится как задано FindType... вроде ..
Дестракшен, помоему ты что-то не учёл.... Если есть время посмотри пожалуйста..
Code: Select all
X=44 Y=65
Стало быть минимальные х и у
,info Правого нижнего предмета:
Code: Select all
X=142 Y=131
Стало быть максимальные х и у
Подставил...
Получил:
Code: Select all
sub fixOre()
var i, x, y
var min_x = 44
var min_y = 65
var max_x = 142
var max_y = 131
var move_x = 95
var move_y = 85
DIM ore[4]
ore[0] = "0x19B7"
ore[1] = "0x19BA"
ore[2] = "0x19B8"
ore[3] = "0x19B9"
for i = 0 to 3
uo.findtype( ore[ i ], '-1', 'backpack' )
while uo.findcount()
x = uo.getX( 'finditem' )
y = uo.getY( 'finditem' )
if x < min_x || x > max_x || y < min_y || y > max_y then
uo.moveitem( 'finditem', '0', 'backpack', str( move_x ), str( move_y ), '0' )
wait( 500 )
endif
uo.findtype( ore[ i ], "-1", "backpack" )
wend
next
uo.ignorereset()
endsub
Результат то бездействие, то анхандлел ерор вместе с флудом, что ему не нравится как задано FindType... вроде ..
Дестракшен, помоему ты что-то не учёл.... Если есть время посмотри пожалуйста..

Code: Select all
sub fixOre()
var i
var move_x = 95
var move_y = 85
DIM ore[4]
ore[0] = "0x19B7"
ore[1] = "0x19BA"
ore[2] = "0x19B8"
ore[3] = "0x19B9"
for i = 0 to 3
uo.findtype( ore[ i ], '-1', 'backpack' )
while uo.findcount()
uo.moveitem( 'finditem', '0', 'backpack', str( move_x ), str( move_y ), '0' )
wait(500)
uo.Ignore('finditem')
uo.findtype( ore[ i ], "-1", "backpack" )
wend
next
uo.ignorereset()
endsub
-
- Junior Expert
- Posts: 3221
- Joined: 2004-06-24 22:08:56
Точно.. игнор забыл.. 

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
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