Page 1 of 1

need help in uo.waitmenu

Posted: 2008-08-30 19:13:27
by iRuLez
I must necessarily put

Code: Select all

uo.waitmenu("Pozioni","(3)")
i can't doing

Code: Select all

uo.waitmenu("Pozioni","(MY_NUMBER)")
?

example:

Code: Select all

sub alchemy(type,Qreag,MY_NUMBER)
	if (uo.count(type) >= Qreag) then
			if (uo.count(emptyB) >=1) then
				if (not uo.waiting()) then
					uo.waitmenu("Pozioni","(MY_NUMBER)")
				end if
				uo.usetype(type)
				uo.deletejournal()
				while (not uo.injournal("You put the") and not uo.injournal(uo.getname('self')+": *You toss the failed mixture from the mortar*"))
					wait(500)
				wend
			else
				uo.print("no bottle")
			end if
		else
			uo.print("no reag")
		end if
end sub
Thanks

Posted: 2008-08-30 19:20:04
by Scripts Writer

Code: Select all

sub alchemy(type,Qreag,MY_NUMBER) 
   if (uo.count(type) >= Qreag) then 
         if (uo.count(emptyB) >=1) then 
            if (not uo.waiting()) then 
               uo.waitmenu("Pozioni",(MY_NUMBER)) 
            end if 
            uo.usetype(type) 
            uo.deletejournal() 
            while (not uo.injournal("You put the") and not uo.injournal(uo.getname('self')+": *You toss the failed mixture from the mortar*")) 
               wait(500) 
            wend 
         else 
            uo.print("no bottle") 
         end if 
      else 
         uo.print("no reag") 
      end if 
end sub

Posted: 2008-08-30 19:31:36
by iRuLez
I had already tried but dont working correctly
that way craft another potion!

Posted: 2008-08-30 19:48:37
by Scripts Writer
Show me how you run this function,-i'd like to see arguments

Posted: 2008-08-30 19:53:31
by iRuLez
Scripts Writer wrote:Show me how you run this function,-i'd like to see arguments
sub crafta_gh()
alchemy(0x0F85,6,6)
# 0x0F85 = type
# 6 = Qreag
# 6 = MY_NUMBER
end sub

Posted: 2008-08-30 20:03:31
by Scripts Writer

Code: Select all

sub alchemy(type,Qreag,MY_NUMBER) 
   if (uo.count(type) >= Qreag) then 
         if (uo.count(emptyB) >=1) then 
            if (not uo.waiting()) then 
               uo.waitmenu("Pozioni",MY_NUMBER) 
            end if 
            uo.usetype(type) 
            uo.deletejournal() 
            while (not uo.injournal("You put the") and not uo.injournal(uo.getname('self')+": *You toss the failed mixture from the mortar*")) 
               wait(500) 
            wend 
         else 
            uo.print("no bottle") 
         end if 
      else 
         uo.print("no reag") 
      end if 
end sub

sub crafta_gh() 
alchemy(0x0F85,6,"6") 
end sub
?

I think it'd craft potion, which has "6" in text string.
Something like this:
  • "Lesser Heal (1 ginseng)"
    "Heal (3 ginseng)"
    "Greater heal (6 ginseng)"

Posted: 2008-08-30 20:53:12
by iRuLez
Why using this

Code: Select all

uo.waitmenu("Pozioni","(1)")
i see in journal with "verbose menu" actived

Code: Select all

Now waiting for menu...
Pozioni -> (1)
Pozione della stamina (1 Black Persl, 1 empty bottle)
and when i use this

Code: Select all

uo.waitmenu("Pozioni",MU_NUMBER)
i see only:

Code: Select all

Now waiting for menu...
Pozioni -> 1
Menu choise successful.
which is the difference from these?
are all right? :roll:

Posted: 2008-08-30 21:16:32
by Destruction
"(" + str( MY_NUMBER ) + ")"

Posted: 2008-08-31 00:13:13
by iRuLez
Destruction wrote:"(" + str( MY_NUMBER ) + ")"
U are the best!

Now Work all ok

Tnx