need help in uo.waitmenu

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

need help in uo.waitmenu

Post 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
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post 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
Last edited by Scripts Writer on 2008-08-30 19:47:55, edited 1 time in total.
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post by iRuLez »

I had already tried but dont working correctly
that way craft another potion!
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Show me how you run this function,-i'd like to see arguments
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post 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
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post 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)"
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post 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:
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

"(" + str( MY_NUMBER ) + ")"
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post by iRuLez »

Destruction wrote:"(" + str( MY_NUMBER ) + ")"


U are the best!

Now Work all ok

Tnx
Post Reply