Yoko

All sides of Injection
It is currently 2025-10-31 17:28:51

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 2005-10-11 15:39:53 
Offline

Joined: 2005-03-05 23:27:11
Posts: 7
Всем драсте!
Сразу к делу: у меня есть скрипт на ламбер,но я немогу правильно написать функцию выбрасывания логов при привышении заданного веса. Последняя моя попытка закончилась тем что я просидел
3 дня в джаиле за свой скрипт.(типа неправильные команды и сервак изза меня тормозит) Так вот собственно интересующая меня часть скрипта:
if UO.Weight > 260 then
uo.Print ('Бросаем это дело!')
UO.Findtype("0x1BDD","0x0000")
UO.Drophere("finditem")
wait(2000)
UO.Findtype("0x1BDD","0x0362")
UO.Drophere("finditem")
wait(2000)
UO.Findtype("0x1BDD","0x010D")
UO.Drophere("finditem")
wait(2000)
end if
UO.Findtype("0x1BDD","0x0094")
UO.Drophere("finditem")
wait(2000)
UO.Findtype("0x1BDD","0x01A2")
UO.Drophere("finditem")
wait(2000)
UO.Findtype("0x1BDD","0x01B0")
UO.Drophere("finditem")
wait(2000)
end if
Это моя версия(только вот неправельная) мне нужно чтоб скрипт сначала проверял есть ли данный тип логов в сумке, если да то выкидыал их на пол...
Пожалуста прошу исправте это условие.


Top
   
 Post subject:
PostPosted: 2005-10-11 16:19:13 
Offline
User avatar

Joined: 2004-10-20 22:46:03
Posts: 73
Location: Moscow
1. У тебя чар будет искать логи везде, в том числе и на земле, а это не нужно, значит добавляем в findtype - 'my'.
2. drop производится без проверки нашел ли findtype что-то или нет, а если логов такого типа в паке нет, то что он выбрасывать будет?
3. Какой-то "левый" end if в середине... он к чему?

Попробуй так:

Code:
if uo.weight > 260 then 
  uo.print('Бросаем это дело!')
  uo.findtype('0x1BDD', '0x0000', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x0362', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x010D', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x0094', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x01A2', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x01B0', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
endif

_________________
I'm Titanium [Dragon] from Nova UO Shard


Top
   
 Post subject:
PostPosted: 2005-10-11 22:04:45 
Offline

Joined: 2005-03-05 23:27:11
Posts: 7
Titanium wrote:
1. У тебя чар будет искать логи везде, в том числе и на земле, а это не нужно, значит добавляем в findtype - 'my'.
2. drop производится без проверки нашел ли findtype что-то или нет, а если логов такого типа в паке нет, то что он выбрасывать будет?
3. Какой-то "левый" end if в середине... он к чему?

Попробуй так:

Code:
if uo.weight > 260 then 
  uo.print('Бросаем это дело!')
  uo.findtype('0x1BDD', '0x0000', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x0362', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x010D', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x0094', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x01A2', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
  uo.findtype('0x1BDD', '0x01B0', 'my')
  if uo.findcount() then
    uo.drophere('finditem')
    wait(2000)
  endif
endif


спасибо большое, выручил!
У меня еще вопросик: У меня есть реконектор, что нужно куда вписать чтоб он начал работать?(вроде нужен какойто автосеф пароле. а где его ставить?)
КОД:

sub Reconnect()
var ReconnectTime,rFlag
ReconnectTime='0'
rFlag=1
repeat
while (uo.ObjAtLayer('Bpack')=='')
if rFlag then
ReconnectTime=MakeTime()
rFlag=0
end if
wait(20000)
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.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
rFlag=1
ReconnectTime='0'
end if
until false
end sub


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 6 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:  
Powered by phpBB® Forum Software © phpBB Limited