Как добавить несколько типов?

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Как добавить несколько типов?

Post by Toolmate »

Вот есть функция:

Code: Select all

Sub tim1() 
VAR AnimalCount=0,i=0,name=0,name2=0
Var MoveDelay=1000 
Var MoveNumber=1    
Var Ep=3 
var Stoplocation
uo.set("finddistance","3")
uo.ignorereset() 
uo.exec('resend') 
wait(200) 

Uo.Exec("addtype Animals") 
while Uo.Targeting() 
wait(100) 
wend
uo.findtype("Animals","-1","ground")
name=uo.getname("finditem") 
;
dim Animals[100] 
while not uo.dead() 
AnimalCount=0 
   for i=0 to 999
      wait(10) 
      uo.findtype("0",'-1',"ground") 
      if uo.findcount()>0 then 
            if uo.getname("finditem")==name and uo.getname("finditem") <> 0 then 
                  Animals[AnimalCount]=uo.getserial("finditem") 
                  AnimalCount=AnimalCount+1 
                  uo.ignore("finditem") 
                  uo.print("OK!"+" "+Animals[AnimalCount-1]) 
               else 
                  uo.ignore("finditem") 
                  wait(10) 
            end if 
         else 
            i=999 
            uo.print("Complete at = "+str(AnimalCount)) 
      end if 
   next 
   uo.print("Search complete!! at "+str(AnimalCount)+" was found!!") 
   UO.print("Reset ignored items...") 
   uo.ignorereset() 
   wait(1000) 
;
   for i=0 to AnimalCount-1 
      uo.addobject("Animal",Animals[i])
      repeat
      uo.Useskill("Peacemaking","Animal")
      wait(11000)
      until uo.injournal('cliloc# 0x03BC')or uo.injournal('cliloc# 0x03B7')
      taming() 
      release()
   next
   wait(200) 
wend 
end sub
как добавить вот то, что я написал ниже(писал сам если, что то не так поправьте пожалуйсто):

Code: Select all

DIM Animals[5]
Animals[0]="0x000"--- тут я вставлю типы разных животных.
Animals[1]="0x000"
Animals[2]="0x000"
Animals[3]="0x000"
Animals[4]="0x000"
for i=0 to 4
и что нужно убрать из выше написанного?
заранее спасики:)
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

uo.findtype("Animals","-1","ground")
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

uo.findtype("Animals[i]","-1","ground") 
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

тобишь вот так:

Code: Select all

Sub tim1() 
VAR AnimalCount=0,i=0,name=0,name2=0 
Var MoveDelay=1000 
Var MoveNumber=1    
Var Ep=3 
var Stoplocation 
uo.set("finddistance","3") 
uo.ignorereset() 
uo.exec('resend') 
wait(200) 
;
DIM Animals[5] 
Animals[0]="0x000"
Animals[1]="0x000" 
Animals[2]="0x000" 
Animals[3]="0x000" 
Animals[4]="0x000" 
while not uo.dead() 
AnimalCount=0 
   for i=0 to 4 
      wait(10) 
      uo.findtype("Animals[i]","-1","ground") 
      name=uo.getname("finditem")
      if uo.findcount()>0 then 
            if uo.getname("finditem")==name and uo.getname("finditem") <> 0 then 
                  Animals[AnimalCount]=uo.getserial("finditem") 
                  AnimalCount=AnimalCount+1 
                  uo.ignore("finditem") 
                  uo.print("OK!"+" "+Animals[AnimalCount-1]) 
               else 
                  uo.ignore("finditem") 
                  wait(10) 
            end if 
         else 
            i=4 
            uo.print("Complete at = "+str(AnimalCount)) 
      end if 
   next 
   uo.print("Search complete!! at "+str(AnimalCount)+" was found!!") 
   UO.print("Reset ignored items...") 
   uo.ignorereset() 
   wait(1000) 
; 
   for i=0 to 4 
      uo.addobject("Animal",Animals[i]) 
      repeat 
      uo.Useskill("Peacemaking","Animal") 
      wait(11000) 
      until uo.injournal('cliloc# 0x03BC')or uo.injournal('cliloc# 0x03B7') 
      taming() 
      release() 
   next 
   wait(200) 
wend
Вот я подправил, это норм?
Last edited by Toolmate on 2006-04-17 10:56:41, edited 1 time in total.
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Чаю не нальете?;)
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

Grin:
Не понял намека:)

А вот тут

Code: Select all

else 
            i=999 <----- а тут тоже надо изменить значение на 4 типа?
            uo.print("Complete at = "+str(AnimalCount)) 
      end if 
   next
[/code]
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

намек простой ;) вы чайники%)
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

Ну Вы эксперты учите чайников:)
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

Grin wrote:намек простой ;) вы чайники%)
Все мы чайники. Каждый в своем.
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Естествено;)
Вот ТЫ Эдред в чем чайник?;)
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

Я там выше подправил немного. Нормуль?
Этот макр под ранку.
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Ну елки палки одни и теже ошибки 10 раз подряд... в уроках все описано и описано...
Почитай про смысл символа "...
и потом что значит нормально??? оно же не рабоатет... как это может быть нормально???
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

А куда эти уроки делись?
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Post by Edred »

Grin wrote:Естествено;)
Вот ТЫ Эдред в чем чайник?;)
в хтмл, джаве, перле... Хотя насчет последнего, тут полез посмотреть синтаксис, в общем, халява. Легкий язык. Нескольких часов чтения будет достаточно. Вопрос только в одном, надо ли? :shock:
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

перл не сложен в понимании просто там есть пару об стракций... там гола в другом нужна... там есть понтие как контексты...есть регулярные выражения, есть еще куча всего... жто просто интересно и это надо;)
Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

Помогите пожалуйсто, уроки не могу найти.
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
BigMouseI
Posts: 93
Joined: 2006-04-15 09:00:35

Post by BigMouseI »

Toolmate
Posts: 104
Joined: 2005-08-18 09:09:18
Location: RUSSIA

Post by Toolmate »

Спасибо! будем изучать:)
-=^NOVA RunUO 2 Server^=-
www.nova-uo.com
сферовское ПВП
IRC Server: irc.netbynet.ru; канал: #nova
Post Reply