Invalid number of arguments
Posted: 2007-11-08 00:08:17
Помогите , работал у меня этот скрипт прекрасно, почти докачал я тэйлор и вдруг, он просто загнулся и стал выдавать вот такое
Что делать ? и из за чего это может быть ?
После долгих мучений я нашол вот этот скрипт
и он мне выдал
заранее спасибо всем.
Line 109: Invalid number of arguments - GetItem
####################
# Качаем 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')
Что делать ? и из за чего это может быть ?
После долгих мучений я нашол вот этот скрипт
############################################################################################
#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
и он мне выдал
Line 201: Invalid number of arguments - ToTake
заранее спасибо всем.