Yoko

All sides of Injection
It is currently 2025-11-30 08:22:38

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Help so scriptim
PostPosted: 2004-05-28 22:14:26 
Offline

Joined: 2004-05-17 19:31:50
Posts: 10
Народ напиши плиз скрипт на Бов Крафвт на стрелах, чтобы по 1 стреле переделывал


Top
   
 Post subject:
PostPosted: 2004-05-29 07:03:56 
Offline

Joined: 2004-05-17 19:31:50
Posts: 10
Sub main()
Var what = "Bolt" # What you will make. Chices: Arrow, Bolt
Var shafts = "0x1BD4"
Var feathers = "0x1BD1"
Var num1 = 0
Var num2 = 0

UO.Exec("set quiet 0")
If UO.Waiting() Then
UO.CancelTarget()
End If
UO.CancelMenu()
UO.IgnoreReset()
UO.Exec("automenu 'create?' "+what)

While (UO.Count(shafts)>0 and UO.Count(feathers)>0)
UO.Exec("findtype "+shafts+" backpack")
UO.Exec("moveitem finditem 1 backpack 0 0 0")
UO.Ignore('finditem')
While not (UO.FindCount()==1)
UO.Exec("findtype "+shafts+" backpack")
Wait(500)
Wend
UO.WaitTargetType(feathers)
UO.UseObject('finditem')
UO.DeleteJournal()
While not (UO.InJournal("You"))
Wait(500)
Wend
If UO.InJournal("You create") Then
num1=num1+1
Else
num2=num2+1
End If
UO.IgnoreReset()
Wend
UO.CancelMenu()
UO.Print("No more materials. Script terminates.")
#Printing some stats (optional)
If not (num1==0 and num2==0) Then
UO.Print("Results:")
UO.Print(STR(num1)+" "+what+"s created.")
UO.Print(STR(num2)+" feathers/shafts destroyed")
UO.Print("Efficiency: "+STR(num1*100/(num1+num2))+" percent.")
End If
End Sub


Народ почему тут не переномсит 1 шафт и делает сразу все ????


Top
   
 Post subject:
PostPosted: 2004-05-30 13:40:28 
Offline

Joined: 2004-04-15 14:50:06
Posts: 73
Location: Moscow
Положи шафты на землю рядом с собой и замени следующие строки

While (UO.Count(shafts)>0 and UO.Count(feathers)>0)
UO.Exec("findtype "+shafts+" backpack")
UO.Exec("moveitem finditem 1 backpack 0 0 0")
UO.Ignore('finditem')
на
While (UO.Countground(shafts)>0 and UO.Count(feathers)>0)
UO.drag("1", "~"+shafts )


и
UO.UseObject('finditem')
на
uo.usetype(shafts)

_________________
Я где то рядом... 8)


Top
   
 Post subject:
PostPosted: 2004-05-31 14:36:17 
Offline

Joined: 2004-05-17 19:31:50
Posts: 10
неработает =((


Top
   
 Post subject:
PostPosted: 2004-05-31 14:42:16 
Offline

Joined: 2004-05-17 19:31:50
Posts: 10
он всеравно не ререкладывает в пак


Top
   
 Post subject:
PostPosted: 2004-06-03 18:41:49 
Offline

Joined: 2004-04-15 14:50:06
Posts: 73
Location: Moscow
Вот те рабочий на 100%
Сам ща на нем качаюсь
Те тока ватменю под себя настроить надо

Code:
sub main()
var what = "Arrow" # What you will make. Chices: Arrow, Bolt
var shafts = 0x1BD4
var feathers = 0x1BD1
var num1 = 0
var num2 = 0
var time

While UO.Countground(shafts) && UO.Count(feathers)
 UO.WaitMenu("What you you want to create?", what)
 if not uo.count(shafts) then
  UO.grab( "1" , "~"+str(shafts) )
 endif
 wait(500)
 UO.WaitTargetType(feathers)
 UO.UseType(shafts)
 UO.DeleteJournal()
 time=uo.timer()
 While not UO.InJournal("You") && (uo.timer()-time)<100
  Wait(500)
 Wend
 If UO.InJournal("You create") Then
  num1=num1+1
 Else
  num2=num2+1
 End If
Wend
 UO.Print("No more materials. Script terminates.")
 #Printing some stats (optional)
If not (num1==0 and num2==0) Then
 UO.Print("Results:")
 UO.Print(STR(num1)+" "+what+"s created.")
 UO.Print(STR(num2)+" feathers/shafts destroyed")
 UO.Print("Efficiency: "+STR(num1*100/(num1+num2))+" percent.")
End If
endsub


У тя всю структуру позаимствовал:)

_________________
Я где то рядом... 8)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 8 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