spellbooks making script
Moderators: Murderator+, Murderator
spellbooks making script
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?
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?
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
Code: Select all
sub Scp()
var k
...
k=0
uo.DeleteJournal()
repeat
wait(100)
k=k+1
until uo.InJournal(" ... ") || k>100bah i cant get it to work..
now how do i make this script continue making clumsy scroll until it MAKES one and then proceeds to create food scroll?
Code: Select all
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?
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
Your script is wrong from begin to end.
Start step by step:
Try to write this 5 scripts without errors. Start from first- i'll correct you if something is wrong
Start step by step:
Code: Select all
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
ok doing step one...
i get error "unhandled exception in parser". whats wrong?
Code: Select all
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 subi get error "unhandled exception in parser". whats wrong?
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
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: Select all
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 subbut this script doesnt wait for scroll to be crafted, it just "eats" all my scrolls in a second and then stops...
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
When u write ur script, did u understand what should it do?
Do u know how repeat/until is working? Test it:
and then look at ur script, and try to look for ur mistake.
*me not english*
Do u know how repeat/until is working? Test it:
Code: Select all
sub Sc()
uo.DeleteJournal()
repeat
wait(250)
uo.Print('Look at me ...')
until uo.InJournal('put|fail')
end suband then look at ur script, and try to look for ur mistake.
*me not english*
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
now im making a script that will make 20 recall scrolls and then stops, but i dont know how to use UO.Count....
Code: Select all
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 subHow do i make this script make 20 recall scrolls and then stop?
-
Scripts Writer
- Posts: 2259
- Joined: 2005-04-19 18:00:29
- Location: Московская область
- Contact:
Make
Code: Select all
for/nexthmm how about this
Code: Select all
repeat
(that spell craft)
Until uo.injournal(you put) then
uo.moveitem
repeat
Craft another spell)
Until uo.injournal(you put) then
uo.moveitemMazer wrote:hmm how about thisCode: Select all
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