Найдите ошибку... (список не пашит) (перечисление)

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Stenley
Posts: 10
Joined: 2004-06-08 21:11:08
Contact:

Найдите ошибку... (список не пашит) (перечисление)

Post by Stenley »

Люди кто шарит, вот собрал скриптик на ремонт итемов которые в бакпаке, так все работает если найдет итем, но через список не находит. :(

Code: Select all

var gotovo = '0x5E9FAFBE' # Cymka gotovo
var gavno = '0x5587CB07'  # Cymka ybitogo

sub find() 
var l
   
DIM LootingItem[16] 
UO.Print('Go PeMoHT =>') 
 
LootingItem[1] = 0x0F62    # speer
LootingItem[2] = 0x0E87    # Vily
LootingItem[3] = 0x143E    # Alebarda
LootingItem[4] = 0x0F5E   ##  Broad Sword
LootingItem[5] = 0x1440    # cultlast
LootingItem[6] = 0x13FF    # Katana
LootingItem[7] = 0x13B6    #Scimitar
LootingItem[8] = 0x13BA    #Viking 
LootingItem[9] = 0x13B8    #Long Sword
LootingItem[10] = 0x13CD   ## - Lokti
LootingItem[11] = 0x13CE   ## - Perchatki 
LootingItem[12] = 0x1DBA   ## - Shapka
LootingItem[13] = 0x1400   ## Kryss
LootingItem[14] = 0x13D3   ## - Tunic Leathes
LootingItem[15] = 0x13C7   ## - Gorgetka
LootingItem[16] = 0x13D2   ## - Leather Nogi
UO.Print('=== End ===') 
for l=1 to 16
uo.FindType(LootingItem[l],"-1",'backpack') 
If UO.FindCount() then 

uo.waittargetobject('finditem')
uo.useobject('0x50762753')           # HakoBaLnya
Wait(900) 

If UO.InJournal('отремонтирован') then 
UO.MoveItem('finditem','-1', gotovo) 
UO.DeleteJournal() 
endif 
If UO.InJournal('REPAIR') then 
UO.MoveItem('finditem','-1', gavno) 
UO.DeleteJournal() 
endif 

next
endif
endsub
omi4
Posts: 457
Joined: 2005-07-10 21:53:05

Post by omi4 »

пробуй так..

Code: Select all

---8<---
endif 
next 
endsub
Stenley
Posts: 10
Joined: 2004-06-08 21:11:08
Contact:

Post by Stenley »

Решил сам... фухх... вот значит должно быть так :

Code: Select all

var gotovo = '0x5E9FAFBE' # Cymka gotovo
var gavno = '0x5587CB07'  # Cymka ybitogo

sub find() 
var l,itemka
itemka=uo.GetSerial('finditem') 
DIM LootingItem[16] 
UO.Print('Go Loot =>') 
 
LootingItem[1] = 0x0F62    # speer
LootingItem[2] = 0x0E87    # Vily
LootingItem[3] = 0x143E    # Alebarda
LootingItem[4] = 0x0F5E   ##  Broad Sword
LootingItem[5] = 0x1440    # cultlast
LootingItem[6] = 0x13FF    # Katana
LootingItem[7] = 0x13B6    #Scimitar
LootingItem[8] = 0x13BA    #Viking 
LootingItem[9] = 0x13B8    #Long Sword
LootingItem[10] = 0x13CD   ## - Lokti
LootingItem[11] = 0x13CE   ## - Perchatki 
LootingItem[12] = 0x1DBA   ## - Shapka
LootingItem[13] = 0x1400   ## Kryss
LootingItem[14] = 0x13D3   ## - Tunic Leathes
LootingItem[15] = 0x13C7   ## - Gorgetka
LootingItem[16] = 0x13D2   ## - Leather Nogi
UO.Print('=== End ===') 
for l=1 to 16
      UO.FindType(LootingItem[l],-1,'backpack') 
      if UO.GetQuantity('finditem') then 
         
      
uo.waittargetobject('finditem')
uo.useobject('0x50762753')           # HakoBaLnya
Wait(3300) 

If UO.InJournal('отремонтирован') then 
UO.MoveItem('finditem','-1', gotovo) 
UO.DeleteJournal() 
endif 
If UO.InJournal('не нуждается в ремонте') then 
UO.MoveItem('finditem','-1', gotovo) 
UO.DeleteJournal() 
endif 
If UO.InJournal('REPAIR') then 
UO.MoveItem('finditem','-1', gavno) 
UO.DeleteJournal() 
endif 
endif
next

endsub
omi4
Posts: 457
Joined: 2005-07-10 21:53:05

Post by omi4 »

должно быть так..
почему и зачем читай уроки

Code: Select all

sub find() 
	var l, FindCounter, 
	var gotovo = '0x5E9FAFBE' # Cymka gotovo 
	var gavno = '0x5587CB07'  # Cymka ybitogo 

	DIM LootingItem[16] 

	LootingItem[1] = 0x0F62    # speer 
	LootingItem[2] = 0x0E87    # Vily 
	LootingItem[3] = 0x143E    # Alebarda 
	LootingItem[4] = 0x0F5E   ##  Broad Sword 
	LootingItem[5] = 0x1440    # cultlast 
	LootingItem[6] = 0x13FF    # Katana 
	LootingItem[7] = 0x13B6    #Scimitar 
	LootingItem[8] = 0x13BA    #Viking 
	LootingItem[9] = 0x13B8    #Long Sword 
	LootingItem[10] = 0x13CD   ## - Lokti 
	LootingItem[11] = 0x13CE   ## - Perchatki 
	LootingItem[12] = 0x1DBA   ## - Shapka 
	LootingItem[13] = 0x1400   ## Kryss 
	LootingItem[14] = 0x13D3   ## - Tunic Leathes 
	LootingItem[15] = 0x13C7   ## - Gorgetka 
	LootingItem[16] = 0x13D2   ## - Leather Nogi 
 
	UO.Print('Go Loot =>') 
	for l=1 to 16
		repeat
			UO.FindType(LootingItem[l],-1,'backpack')
			FindCounter = UO.FindCount('finditem') ; GetQuantity - количество в стопке, зачем?
			itemka = UO.GetSerial('finditem')
			if FindCounter then
				UO.DeleteJournal()
				UO.WaitTargetObject(itemka) 
				UO.UseObject('0x50762753')           # HakoBaLnya 
				repeat
					wait(500)
				until UO.InJournal('отремонтирован') or UO.InJournal('не нуждается в ремонте') or UO.InJournal('REPAIR')

				If UO.InJournal('отремонтирован') or UO.InJournal('не нуждается в ремонте') then 
					UO.MoveItem(itemka,'-1', gotovo)  
				else
					UO.MoveItem(itemka,'-1', gavno)  
				endif 
			endif
		until not FindCounter
	next
	UO.Print('=== End ===')
endsub
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

omi4 wrote:должно быть так..
почему и зачем читай уроки

Code: Select all

	DIM LootingItem[16] 

	LootingItem[1] = 0x0F62    # speer 
	LootingItem[2] = 0x0E87    # Vily 
	LootingItem[3] = 0x143E    # Alebarda 
	LootingItem[4] = 0x0F5E   ##  Broad Sword 
	LootingItem[5] = 0x1440    # cultlast 
	LootingItem[6] = 0x13FF    # Katana 
	LootingItem[7] = 0x13B6    #Scimitar 
	LootingItem[8] = 0x13BA    #Viking 
	LootingItem[9] = 0x13B8    #Long Sword 
	LootingItem[10] = 0x13CD   ## - Lokti 
	LootingItem[11] = 0x13CE   ## - Perchatki 
	LootingItem[12] = 0x1DBA   ## - Shapka 
	LootingItem[13] = 0x1400   ## Kryss 
	LootingItem[14] = 0x13D3   ## - Tunic Leathes 
	LootingItem[15] = 0x13C7   ## - Gorgetka 
	LootingItem[16] = 0x13D2   ## - Leather Nogi 
Должно быть так:

Code: Select all

	DIM LootingItem[17] 
...
почему и зачем - читай описание языка скриптов.
Ни один скрипт не работает? Пора обновить [url=http://www.eof.nm.ru/FiLeS/uoloop.exe]Инжект[/url]...
Все работает, но хочется большего? Пора переходить на [url=http://stealth.od.ua/]стелс[/url]...
Post Reply