Yoko

All sides of Injection
It is currently 2025-12-09 03:26:31

All times are UTC+02:00




Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next
Author Message
 Post subject: spellbooks making script
PostPosted: 2007-11-23 22:56:52 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
hello, im making a script that will make full spellbooks. but i dont know how to make script repeat making a scroll if it fails?

lets say im making flamestrike scroll, i fail. how do i make the script repeat until i succeed and then carry on to next scroll?


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

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Look it in a journal. I think u have a msg when you make ur scroll || book like "you put" and "fail" when u failed


Top
   
 Post subject:
PostPosted: 2007-11-23 23:16:20 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
Scripts Writer wrote:
Look it in a journal. I think u have a msg when you make ur scroll || book like "you put" and "fail" when u failed


yeah i do, but im not expert scripter. i dont know what commands i should use :/


Top
   
 Post subject:
PostPosted: 2007-11-23 23:17:28 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Look help and other simply scripts


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

Joined: 2007-11-17 12:39:26
Posts: 24
is it something like...


repeat
.......
.......
blabla
..............
until uo.injournal("you put")

?


Top
   
 Post subject:
PostPosted: 2007-11-23 23:20:00 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
sub Scp()
var k
...

k=0
uo.DeleteJournal()
repeat
  wait(100)
  k=k+1
until uo.InJournal(" ... ") || k>100


Top
   
 Post subject:
PostPosted: 2007-11-24 13:24:18 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
bah i cant get it to work..

Code:
sub spellbook()
Var T
UO.CancelMenu()
UO.AutoMenu("Spell Circles","First Circle")
UO.AutoMenu('Spell Circle 1','Clumsy')
While UO.Count('scroll')>=2
  UO.DeleteJournal()
  Wait(100)
  UO.UseType('scroll')
  T=UO.Timer()
  until (uo.injournal('failed') or uo.injournal(ItName) or (UO.Timer()-T>=1000))
   Wait(100)
  Wend
  Wait(1000)
UO.CancelMenu()

UO.CancelMenu()
UO.AutoMenu('Spell Circles','First Circle')
UO.AutoMenu('Spell Circle1','Create Food')
  UO.DeleteJournal()
  Wait(100)
  UO.UseType('scroll')
  T=UO.Timer()
  until (uo.injournal('failed') or uo.injournal(ItName) or (UO.Timer()-T>=1000))
   Wait(100)
  Wend
  Wait(1000)
WEnd
UO.CancelMenu()
UO.Print("DONE")
end sub



now how do i make this script continue making clumsy scroll until it MAKES one and then proceeds to create food scroll?


Top
   
 Post subject:
PostPosted: 2007-11-24 13:32:16 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Your script is wrong from begin to end.
Start step by step:

Code:
1. To create 1 scroll.
2. To create 1 scroll. If it make-output message "You make scroll"
3. To create 5 scrolls. After this-output message "You make " quantity maked scrolls " scroll".
4. To create 1 clumsy scroll, 1 create food scrolls .
5. And only after this, create 1 clumsy scroll, if u make this- create 1 food scroll.


Try to write this 5 scripts without errors. Start from first- i'll correct you if something is wrong


Top
   
 Post subject:
PostPosted: 2007-11-24 19:20:11 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
ok doing step one...

Code:
sub spellbook()
UO.CancelMenu()
UO.AutoMenu('Spell Circles','First Circle')
UO.AutoMenu('Spell Circle 1','Clumsy')
  UO.DeleteJournal()
Until (uo.injournal('failed') or uo.injournal('Clumsy'))
  Wait(100)
  UO.UseType("scroll")
  Wait(100)
Wend
UO.CancelMenu()
UO.Print("scroll has been crafted")
end sub



i get error "unhandled exception in parser". whats wrong?


Top
   
 Post subject:
PostPosted: 2007-11-24 20:15:38 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Try to write from first function. Not copy/past.
Look how to make repeat-until, how to make while-wend. Use uo.WaitMenu, look how to make all this in craft scripts and then try to write .


Top
   
 Post subject:
PostPosted: 2007-11-24 20:41:10 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
Scripts Writer wrote:
Try to write from first function. Not copy/past.
Look how to make repeat-until, how to make while-wend. Use uo.WaitMenu, look how to make all this in craft scripts and then try to write .


im not scripter, im completely new to this. why cant you just edit my script a bit so it would do what i want please? :(

ok now i got this

Code:
sub spellbook()
UO.CancelMenu()
UO.AutoMenu('Spell Circles','First Circle')
UO.AutoMenu('Spell Circle 1','Clumsy')
Repeat
  UO.DeleteJournal()
  Wait(100)
  UO.UseType("scroll")
  Wait(1000)
Until (uo.injournal('failed') or uo.injournal('you put'))
UO.CancelMenu()
UO.Print("scroll has been crafted")
end sub


but this script doesnt wait for scroll to be crafted, it just "eats" all my scrolls in a second and then stops...


Top
   
 Post subject:
PostPosted: 2007-11-24 20:48:31 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
When u write ur script, did u understand what should it do?
Do u know how repeat/until is working? Test it:

Code:
sub Sc()
  uo.DeleteJournal()
  repeat
    wait(250)
    uo.Print('Look at me ...')
  until uo.InJournal('put|fail')
end sub


and then look at ur script, and try to look for ur mistake.

*me not english*


Top
   
 Post subject:
PostPosted: 2007-11-24 21:19:38 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
Got it working. :) Thank you Script Writer. :)


Top
   
 Post subject:
PostPosted: 2007-11-24 21:22:33 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
To make big scripts u have to know, what's ur every string is doing and nothing else


Top
   
 Post subject:
PostPosted: 2007-11-24 21:50:15 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
:)

now im making a script that will make 20 recall scrolls and then stops, but i dont know how to use UO.Count....

Code:
sub recall()

UO.CancelMenu()
UO.AutoMenu('Spell Circles','Fourth Circle')
UO.AutoMenu('Spell Circle 4','Recall')
Repeat
  UO.DeleteJournal()
  wait(100)
  UO.UseType("scroll")
  wait(4500)
Until UO.Count(????????????)
   Wait(100)
UO.CancelMenu()
UO.Print("done")
end sub



How do i make this script make 20 recall scrolls and then stop?


Top
   
 Post subject:
PostPosted: 2007-11-24 21:53:59 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Make
Code:
for/next


Top
   
 Post subject:
PostPosted: 2007-11-24 22:07:03 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
also when using my spellbook script sometimes i randomly get error... unexpected error bla bla.. what may cause this?


Top
   
 Post subject:
PostPosted: 2007-11-24 22:07:27 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
Scripts Writer wrote:
Make
Code:
for/next


i dont understand this sorry :S


Top
   
 Post subject:
PostPosted: 2007-11-24 22:14:11 
Offline

Joined: 2007-11-13 00:39:14
Posts: 125
hmm how about this

Code:
repeat 
(that spell craft)
Until uo.injournal(you put) then
uo.moveitem
repeat
Craft another spell)
Until uo.injournal(you put) then
uo.moveitem


Top
   
 Post subject:
PostPosted: 2007-11-24 22:20:57 
Offline

Joined: 2007-11-17 12:39:26
Posts: 24
Mazer wrote:
hmm how about this

Code:
repeat 
(that spell craft)
Until uo.injournal(you put) then
uo.moveitem
repeat
Craft another spell)
Until uo.injournal(you put) then
uo.moveitem


um no i just need script to stop after i have 20 scrolls in backpack, and thats done with UO.Count i think


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next

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