Yoko

All sides of Injection
It is currently 2025-12-08 20:14:04

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2007-11-08 00:08:17 
Offline

Joined: 2007-11-07 23:38:21
Posts: 3
Помогите , работал у меня этот скрипт прекрасно, почти докачал я тэйлор и вдруг, он просто загнулся и стал выдавать вот такое

Quote:
Line 109: Invalid number of arguments - GetItem


Quote:
####################
# Качаем Tailoring #
####################

sub Tailoring()
var cloth=0x175D # Type of cloth
var sew=0x4022DFFF # ID of a sewing kit
var sash=0x1541 # Type of created item(i made body sashes)
var scissors=0x4022D4D3 # Type of anything to cut created items
var bandage=0x0E21 # Type of bandages
var to=0x4023B1CE # Where to put bandages and to get clothes
var type1=0x097B # Type of food1
var type2=0x0C77 # Type of food2
var k,l
l=0
while uo.SkillVal('Tailoring','1') < 1000
uo.FindType(cloth,'-1','backpack')
if uo.GetQuantity('finditem') < 20 then
GetItem(cloth,100,to,'backpack')
end if
uo.WaitMenu('Cloth','Misc','Misc','sash') # Menu
uo.WaitTargetObject('finditem')
uo.UseObject(sew)
uo.DeleteJournal()
k=0
repeat
wait(100)
k=k+1
until uo.InJournal('put') || uo.InJournal('fail') || k>100
if uo.InJournal('put') then
uo.FIndType(sash,'-1','backpack')
while uo.FIndCount()
uo.FIndType(sash,'-1','backpack')
uo.WaitTargetObject('finditem')
uo.UseObject(scissors)
wait(750)
wend
end if
CheckLag()
Move(bandage,'all','backpack',to)
l=l+1
if (l>100) then
EatFood(type1,type2)
l=0
end if
wend
end sub

##########
# Eating #
##########

sub EatFood(carrot , onion)
var i
for i=0 to 5
uo.FindType(carrot,'-1','backpack')
if uo.FindCOunt() then
uo.UseObject('finditem')
wait(750)
else
if not uo.FindCount() then
uo.FindType(onion,'-1','backpack')
if uo.FindCount() then
uo.UseObject('finditem')
wait(750)
else
uo.Print('No food...')
end if
end if
end if
wait(500)
next
end sub

###########
# GetItem #
###########

sub GetItem(type, quantity, where , to)
uo.FindType(type,'-1',where)
if uo.FindCount() then
uo.moveitem('finditem',quantity,to)
wait(750)
end if
end sub

###############
# Moving item #
###############

sub Move(type,quantity,where,to)
uo.FindType(type,'-1',where)
if uo.GetQuantity('finditem') > 100 then
uo.moveitem('finditem',quantity,to)
wait(750)
end if
end sub

############
# CheckLag #
############

sub CheckLag()
uo.DeleteJournal('backpack')
uo.Click('backpack')
repeat
wait(100)
until uo.InJournal('backpack')


Что делать ? и из за чего это может быть ?

После долгих мучений я нашол вот этот скрипт

Quote:
############################################################################################
#File info##################################################################################
############################################################################################
;Copiraten: by ICe aka ICeCREAm #
; Mail: Hoob@narod.ru писать с пометкой UO #
; Icq: 222228147 писать с пометкой UO #
; WWW: http://hoob.narod.ru > #
;[; plz not sale outside for russia,for all questions call #911 or (Hoob@narod.ru) ask me;]#
#############################################################(с) 2005 made in russia :) ####


###################################
# Скрипт для Крафтов #
# (В данном случае для Tailoring) #
###################################

;|---------------------------|
;| Описание переменных Items |
;|---------------------------|

var EQ,RQ1,RQ2,QB
var Eat='0x097B' ; Type Еда (Рыба)
var Res1='0x175D' ; Type Ресурс 1 (Ткань)
var Res2='0x0FA0' ; Type Ресурс 2 (Нитки)
var Kit='0x0F9D' ; Type Инструмента крафта (Sewing Kit)
var Items='0x1541' ; Type Выходного материала
EQ=50 ; Количество еды
RQ1=150 ; Количество ресурса 1
RQ2=20 ; Количество ресурса 2

;|---------------------------------|
;| Описание переменных контейнеров |
;|---------------------------------|

var ContainerRes='0x4023B1CE' ; Object Контейнер с ресурсами
var ContainerBag='0x4024074D' ; Object Контейнер с сумками
var BagCount='0x09B0' ; Type сумок в контейнере ContainerBag


sub Main()
uo.Set('quiet','1')
uo.Exec('exec Craft')
uo.IgnoreReset()
end sub

sub OpenBag()
var i,BagID
uo.UseObject(ContainerBag)
uo.UseObject(ContainerRes)
uo.IgnoreReset()
repeat
uo.DeleteJournal()
wait(1000)
uo.FindType(BagCount,'-1',ContainerBag)
if uo.FindCount('finditem') > 1 then
i=(uo.FindCount('finditem') +1)
uo.Click('finditem')
if uo.InJournal("a bag") Then
BagID=uo.JournalSerial(uo.InJournal("a bag")-1)
uo.SetJournalLine(uo.InJournal("a bag")-1,"")
uo.FindType(Items,'-1',BagID)
uo.UseObject(BagID)
wait(2000)
uo.Hide(BagID)
uo.Ignore(BagID,'on')
end if
end if
i=(i-1)
until i==0
uo.Hide(ContainerBag)
uo.Hide(ContainerRes)
uo.Resend()
wait(3000)
uo.IgnoreReset()
end sub


sub Craft()
var Last=0,LastTimer
OpenBag()
While not uo.Dead()

;|-----------------------------------|
;| Search of resources and Take them |
;|-----------------------------------|

uo.FindType(Eat,'-1','me')
if uo.GetQuantity('finditem')<1 then
uo.FindType(Eat,'-1',ContainerRes)
if uo.GetQuantity('finditem')>1 then
ToTake(3)
else
uo.Exec('Terminate Craft')
end if
else
ToEat()
end if
uo.FindType(Res1,'-1','me')
if uo.GetQuantity('finditem')<16 then
uo.FindType(Res1,'-1',ContainerRes)
if uo.GetQuantity('finditem')>1 then
ToTake(1)
else
uo.Exec('Terminate Craft')
end if
end if
uo.FindType(Res2,'-1','me')
if uo.GetQuantity('finditem')<1 then
uo.FindType(Res2,'-1',ContainerRes)
if uo.GetQuantity('finditem')>1 then
ToTake(2)
else
uo.Exec('Terminate Craft')
end if
end if

;|-------------|
;| Craft Items |
;|-------------|

uo.DeleteJournal()
uo.WaitTargetType(Res1)
uo.UseType(Kit)
uo.WaitMenu ('Cloth','Misc.','Misc.','sash') ; Название КрафтМеню1(Cloth),ПодМеню2(Shirts) -> КрафтМеню2(Shirts),ПодМеню2(Robe)
LastTimer=UO.Timer()
repeat
wait(100)
until uo.InJournal("You put") or uo.InJournal("Tailoring") or LastTimer+150<uo.Timer()
UnLoadItem()
wend
end sub

sub ToTake(i)
var G,F
if i==1 then
G=RQ1
F=Res1
end if
if i==2 then
G=RQ2
F=Res2
end if
if i==3 then
G=EQ
F=Eat
end if
uo.FindType(F,'-1',ContainerRes)
if uo.GetQuantity('finditem')>1 then
uo.Grab(''+str(G)+'','finditem')
uo.DeleteJournal()
repeat
uo.FindType(F,'-1','me')
wait(1500)
until uo.InJournal("That is too") or uo.GetQuantity('finditem') > 1
end if
end sub

sub ToEat()
uo.UseType(Eat)
end sub

sub UnLoadItem()
var BagID
var i=0
var m=0
repeat
uo.DeleteJournal()
uo.FindType(BagCount,'-1',ContainerBag)
uo.Click('finditem')
m=0
repeat
wait(1000)
until uo.InJournal("a bag")
if uo.InJournal("a bag") Then
BagID=uo.JournalSerial(uo.InJournal("a bag")-1)
uo.SetJournalLine(uo.InJournal("a bag")-1,"")
uo.FindType('-1','-1',BagID)
if uo.FindCount('finditem')<220 then
m=uo.FindCount('finditem')
uo.SetReceivingContainer(BagID)
uo.FindType(Items,'-1','me')
uo.Grab('0','finditem')
uo.ConColor('0x0021')
uo.Set('quiet','0')
uo.Print(uo.Print('In BagPack#'+Str(i+1)+' items '+Str(m)+''))
uo.Set('quiet','1')
uo.ConColor('0x0035')
wait(1000)
uo.UnSetReceivingContainer()
else
i=i+1
uo.Ignore(BagID, 'on')
end if
end if
if i==QB then
uo.IgnoreReset()
i=0
end if
uo.FindType(Items,'-1','me')
until uo.FindCount('finditem') < 1
end sub


и он мне выдал

Quote:
Line 201: Invalid number of arguments - ToTake


заранее спасибо всем.


Top
   
 Post subject:
PostPosted: 2007-11-08 18:57:14 
Offline
User avatar

Joined: 2007-05-26 00:00:56
Posts: 173
Location: Украина, Ode$$a:[X-TEAM Group]
В первом скрипте:
Code:
sub GetItem(type, quantity, where , to) 
uo.FindType(type,'-1',where)
if uo.FindCount() then
uo.moveitem('finditem',quantity,to)
wait(750)
end if
end sub

###############
# Moving item #
###############

sub Move(type,quantity,where,to)
uo.FindType(type,'-1',where)
if uo.GetQuantity('finditem') > 100 then
uo.moveitem('finditem',quantity,to)
wait(750)
end if
end sub

Откуда взялось where ???
Убери его нах.

_________________
Image


Top
   
 Post subject:
PostPosted: 2007-11-08 19:10:45 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
-=JoKeR=- wrote:
В первом скрипте:
Code:
sub GetItem(type, quantity, where , to) 
uo.FindType(type,'-1',where)
if uo.FindCount() then
uo.moveitem('finditem',quantity,to)
wait(750)
end if
end sub

###############
# Moving item #
###############

sub Move(type,quantity,where,to)
uo.FindType(type,'-1',where)
if uo.GetQuantity('finditem') > 100 then
uo.moveitem('finditem',quantity,to)
wait(750)
end if
end sub

Откуда взялось where ???
Убери его нах.


Скрипт мой, и работать должен без осечек. Почему у автора темы выдаётся такая ошибка, для меня вопрос.


2Функции объявлял так специально, чтобы при вызове указывать контейнер куда перекладывать, и откуда брать. where,to -обычные формальные параметры


Top
   
 Post subject:
PostPosted: 2007-11-08 20:11:44 
Offline

Joined: 2006-11-25 17:44:44
Posts: 258
В первом варианте не может быть проблема изза обьявления типов и сериалов без каывчек??


Top
   
 Post subject:
PostPosted: 2007-11-08 20:35:16 
Offline
User avatar

Joined: 2007-05-26 00:00:56
Posts: 173
Location: Украина, Ode$$a:[X-TEAM Group]
Scripts Writer wrote:
where,to -обычные формальные параметры

Буду знать =)

_________________
Image


Top
   
 Post subject:
PostPosted: 2007-11-09 23:18:18 
Offline

Joined: 2007-11-07 23:38:21
Posts: 3
А может это быть совсем не из за инжи или УО ? я когда запускаю "sub Tailoring" он просто сразу вырубаеться а когда запускаю отдельно "sub GetItem", "Move" или "EatFood" он выдаёт эту ошибку во втором скрипте таже ситуация. Просто я в скриптах нешарю но с использованием и настройкой скриптов никогда проблем небыло и даже немогу предположить что могло случиться , он ведь у меня работал прекрасно. Еще раз заранее спасибо


Top
   
 Post subject:
PostPosted: 2007-11-09 23:49:40 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Отдельно запускать эти скрипты не надо-это прототипы, на место параметров которых подставляются реальные значения из главного скрипта. Поэтому и ошибка, что параметры не определены.

А выключение главного возможно из-за того что достигнут предел скила Tailoring. Можешь попробовать изменить строку
Code:
while uo.SkillVal('Tailoring','1') < 1000
на
Code:
while 1


Top
   
 Post subject:
PostPosted: 2007-11-09 23:53:28 
Offline

Joined: 2007-11-07 23:38:21
Posts: 3
:D Спасибо , поменял
Quote:
while uo.SkillVal('Tailoring','1') < 1000

на
Quote:
while uo.SkillVal('Tailoring','1') < 1021

и всё заработало :D еще раз спасибо , запомню на будущее.
P.S. Всё гениальное - просто :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited