Ehidna wrote:
Прочитал много тем по тейлору, но к сожелению не нашёл подходящего.
Во всех скриптах что я нашёл, продукцыя либо режется на бинты, либо изготавлявается из кожи. Но я хотел бы продукцию умудриться продать, а не резать её на бинты.
Я взял некий скрипт и стал его модифицировать. Кое что мне удалось, а гдето незнаю с чего и бначать.
Моя задача состоит в том чтобы:
1) Вставать а хайд в процессе изготовления.
2) Брать из мешка ещё и нитки. (Т.к. на изготовление требуется 16 ткани и 1 нитка)
3) Заставить чара раскладывать изготавливаемую продукцию по данным мешкам (их 19), либо по данным типам мешков.
Ну дык вперед и с песней ))) Или что? нам за тебя написать? Зачем тогда написал "моя задача"??? Начинай потихоньку, а мы поможем )
Я так понимаю тебе надо шить и класть в мешок, поа влязиет, потом брать другой и класть в него и так до упора.
Вот нашел в закромах, пробуй: если не будет работать отпишись, желательно поподробнее, если парсит напиши номер строки.
Code:
##################################################################
###!!!ВИМАНИЕ!!!
###!!!Если а паке чара есть мешки!!!
###!!!Скрипт работает с ними, пока не кончатся!!!
###!!!Еще в сундуке должна быть еда, без еды работать не будет!!!
##################################################################
###############Tailor crafted by Kynep[The END]###################
##################################################################
###Шард ДРВ, на других шардах работа не гарантируется
###По вопросам работы над скриптом в аську 335-141-243
##################################################################
VAR sunduk1 = '0x4166d044' #Сундук, откуда беру ткань, нитки и мешки
VAR sunduk2 = '0x404E79E0' #Сундук куда кладем готовый товар
VAR ResCount = '500' #Количество забираемой ткани, зависит от силы игрока
VAR meshok = '0x0E76' #Тип мешка
VAR tovar = '0x1F03' #Тип готового товара
VAR TCloth='0x175D' # Тип ткани (ресурсы)
VAR Spools='0x0FA0' # Тип ниток (ресурсы)
VAR TSKit='0x0F9D' # Тип набора кройки и шитья
VAR eda = '0x097B' #Тип еды
VAR LastTimer, p, ser, a, b = 0, c = 0
sub Tailor()
uo.Exec("filterspeech clear")
uo.Exec("filterspeech on")
uo.Exec("filterspeech add 'You make the item'")
uo.Exec("filterspeech add 'The item is of'")
uo.Exec("filterspeech add 'Due to your exceptional skill, the item is of superior quality'")
uo.Exec('terminate Reconnector')
wait(1000)
uo.Exec('exec Reconnector')
wait(1000)
uo.useobject('backpack')
uo.cancelmenu()
uo.automenu('Cloth','Shirts')
uo.automenu('Shirts','robe')
wait(200)
uo.useobject(sunduk1)
wait(1000)
uo.useobject(sunduk2)
wait(1000)
LastTimer=uo.Timer()
UO.IgnoreReset()
UO.Print('Поехали помолясь...')
while not uo.dead()
ToHide()
if uo.Timer()>(LastTimer+3000) then
if uo.skillval("Spirit Speak",1)<1000 then
uo.print("Spirit Speak...")
p=0
repeat
p=p+1
uo.useskill("Spirit Speak")
uo.deletejournal()
repeat
wait(10)
until uo.InJournal("netherworld") or uo.InJournal("You must wait to perform another action") or uo.dead()
until (uo.InJournal("You establish a connection to the netherworld.")) or (p>=10) or uo.dead()
end if
Eda()
LastTimer=uo.Timer()
end if
If c == 0 then
UO.FindType(meshok, '-1', 'sunduk1')
If UO.FindCount() > 0 then
cheklag()
UO.MoveItem('finditem', '0', 'sunduk2')
ser = UO.GetSerial('finditem')
cheklag()
UO.UseObject(ser)
wait(1000)
c = 1
else
UO.Print('Нет мешков, заканчиваем')
uo.closeuo()
end if
else
wait(100)
end if
UO.FindType(TCloth, '-1', 'backpack')
if UO.GetQuantity('finditem') < 20 then
UO.FindType(TCloth, '-1', sunduk1)
cheklag()
uo.moveitem('finditem', ResCount, 'backpack')
wait(1000)
else
wait(50)
end if
UO.FindType(Spools, '-1', 'backpack')
if UO.GetQuantity('finditem') < 10 then
UO.FindType(Spools, '-1', sunduk1)
cheklag()
uo.moveitem('finditem', '100', 'backpack')
wait(1000)
else
wait(50)
end if
cheklag()
uo.waittargettype(TCloth)
wait(500)
uo.usetype(TSKit)
uo.deletejournal()
repeat
wait(50)
until uo.InJournal('You put the') or uo.InJournal('Tailoring failed.')
If UO.InJournal('You put the') then
UO.FindType('-1', '-1', ser)
If UO.FindCount() < 255 then
UO.FindType(tovar, '-1', 'backpack')
If UO.FindCount() > 0 then
repeat
cheklag()
UO.MoveItem('finditem', '0', ser)
wait(500)
UO.FindType('-1', '-1', ser)
a = UO.FindCount()
UO.FindType(tovar, '-1', 'backpack')
until not UO.FindCount() or a == 255
end if
else
c = 0
end if
end if
UO.FindType(TCloth, '-1', 'backpack')
wait(300)
if UO.GetQuantity('finditem') < 5 then
uo.closeuo()
else
wait(50)
end if
wend
end sub
Sub Eda()
if uo.count(eda,'0x0000') < 50 then ## Жрачка, кушаем до изнеможения
uo.findtype(eda,'0x0000',sunduk1)
Cheklag()
uo.moveitem('finditem',STR(50-uo.count(eda,'0x0000')),'backpack')
wait(1000)
end if
uo.deletejournal()
repeat
uo.usetype(eda,'0x0000')
wait(1000)
until uo.injournal("You are stuffed!") or uo.injournal("You can't think of a way to use that item.")
end sub
Sub cheklag()
uo.deletejournal()
uo.click('backpack')
repeat
wait(10)
until uo.InJournal("backpack")
end sub
Sub Reconnector()
var ReconnectTime, RFlag
ReconnectTime = '0'
RFlag = 1
Repeat
While (uo.ObjAtLayer('Bpack') == '')
if RFlag Then
ReconnectTime = MakeTime()
RFlag = 0
endif
Wait(70000) # WorldSave Protection
uo.Say('')
Wait(5000)
uo.Say('')
Wait(5000)
uo.Say('')
Wait(5000)
uo.LDblClick(357,164)
uo.LClick(616,459)
Wait(5000)
WEnd
Wait(3000)
if (RFlag == 0) and (ReconnectTime <> '0') Then
uo.TextOpen()
uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime)
uo.useobject('backpack')
wait(2000)
uo.Exec('terminate Tailor')
wait(5000)
uo.Exec('exec Tailor')
wait(5000)
RFlag = 1
ReconnectTime = '0'
endif
Until false
end sub
Sub MakeTime()
VAR D, T, Ret, i
Ret = STR(uo.Time())
T = ""
For i = 0 To Len(Ret)
T = Ret[Len(Ret)-i] + T
If (I == 2) OR (I == 4) Then
T = ":" + T
EndIf
Next
Ret = STR(uo.Date())
D = ""
For i = 0 To Len(Ret)
D = Ret[Len(Ret)-i] + D
If (I == 2) OR (I == 4) Then
D = "." + D
EndIf
Next
Ret = T + " @ " + D
RETURN Ret
end sub
Sub ToHide()
while not uo.hidden()
uo.exec("warmode 0")
uo.DeleteJournal()
uo.useskill("Hiding")
repeat
wait(10)
until uo.InJournal("You have hidden yourself well") or uo.InJournal("You can't seem to hide here.") or uo.InJournal("You are preoccupied with thoughts of battle.")
if uo.InJournal("You are preoccupied with thoughts of battle.") then
uo.exec("warmode 0")
end if
wend
end sub