RunUO craft gumps

Special shard settings and features

Moderators: Murderator+, Murderator

Post Reply
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

RunUO craft gumps

Post by Lord Ruslan Nightmare »

RunUO craft gumps structure (www.albion.com.ru shard, AOS)
Use exec("recall self <number>") to choose gump button BEFORE gump is opened. (CAUTON: you must ",set norbcheck 1" and ",set norbcalc 1"!!!) For example :

Code: Select all

uo.useobject("_OLH") # use hammer
exec("recall self 21") # before gump opens, make a choise

will make last item

Button numbers and what they means:

Code: Select all

1 + x*7 - will choose caterogy number x (counting from 0), for example ,recall self 1 will choose "ringmails" category
2 + x*7 - will make x'st item from current category list
3 + x*7 - will open x'st item from current category list properties
4 + x*7 - will make x'st item from "last ten" list
5 + x*7 - will open x'st item from "last ten" list properties
6 + x*7 - will choose x'st material (i think, it should be called only when "select material" gumb must appear)
7 + x*7 - will choose one of "special" buttons


Special buttons:

Code: Select all

7  - select material (iron/leather/hides etc)
14 - smelt item
21 - make last
28 - open "last ten" list
35 - toggle "use/don't use material's color" (in "select material" gump)
42 - repair item
49 - toggle "mark/prompt for mark/don't mark"
56 - select material (scales)
63 - enhance item
70 - ?


....

What ",recall self" with 0 and 70 does?
If somebody knows more about any AOS gumps - please, post it here...
Last edited by Lord Ruslan Nightmare on 2004-05-06 11:14:22, edited 1 time in total.
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
joselito

Post by joselito »

didnt work here, i got a "you must wait to perform another action" message.....
Yoko
Site Admin
Posts: 1964
Joined: 2004-04-03 16:49:38
Contact:

Post by Yoko »

author forgot to tell of usage ,set norbcheck and ,set norbcalc
use forum search on word "norbcalc" too seek topics with explanations
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Sorry. Fixed :)
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
joselito
Posts: 17
Joined: 2004-05-12 01:40:04

Post by joselito »

why my character dismounts???
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Maybe because script targetting to self? You can use any other object , what is not runebook...
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
clagio
Posts: 58
Joined: 2004-05-09 19:53:49

Post by clagio »

i'm using it for tracking..

,recall self 4

and i choose the 4st option of the first gump..but now it open another one, where i have to choose the player to track, there is a way to choose the first, or another option of the second gump?
and better, there's a way to choose not by position in gump, but by the name of the player?

i try ,recall self 4 2 but it doesn't work..
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Did'nt used tracking on RunUO, sorry...

Maybe, alternative method of gump-handling will help (in fact - this is old good clicking method :) )

Code: Select all

sub WaitMenuEx(category,number)
  uo.deletejournal()
  uo.SetGlobal("category",category)
  uo.SetGlobal("number",str(number))
  uo.exec("exec uoWaitMenuEx")
end sub

sub uoWaitMenuEx()
  var category = uo.GetGlobal("category"),number = val(uo.GetGlobal("number"))
  uo.SetGlobal("WaitMenu","1")
  while not uo.injournal("of type 0xC7D4E47C")
    wait(100)
  wend
  if category == "categories" and number > -1 and number < 11 then
    uo.lclick(70,110+18*number)
  endif
  if category == "selections" and number > -1 then
    while number > 9
      number = number - 9
      uo.lclick(423,311)
      wait(300)
    wend
    uo.lclick(275,110 + 18*number)
  endif
  if category == "special" and number < 8 and number > -1 then
    if IsOdd(number) then
      uo.lclick(70,395+18*number/2)
    else
      uo.lclick(325,395+18*(number-1)/2)
    endif
  endif
end sub

sub IsOdd(num)
  var i = num
  i = int(i/2)
  i = i*2
  if i == num then
    return 1
  endif
  return 0
end sub



example:

Code: Select all

sub MakeLastEx()
  var mustuse = 1
  while 1
    if uo.injournal("have worn") then
      mustuse = 1
    endif
    WaitMenuEx("special",7)
    wait(500)
    if mustuse then
      uo.useobject("_OLH")           
      mustuse = 0
    endif
    while not uo.injournal("of type 0xC7D4E47C choiced") and not uo.injournal("you have worn out")
      wait(100)
    wend
  wend
end sub


This method will work, because click happening right after gump appears, and gump always appears in focus (on top of all other gumps)
Maybe you should change gump's type in "of type 0xC7D4E47C ..."
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
ruff

Post by ruff »

it works for the first time, than craft menu remains open, and on second call of useobject lead to 'You must wait to perform another action'
ruff

Post by ruff »

i mean case with recall self
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Dunno...Try to call "recall self" before useobject...In fact, you should call useobject only once, and then call "recall self" every time before craft menu appears...Maybe it's shard-specific?
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
ruff
Posts: 46
Joined: 2004-06-26 15:36:11
Location: Praha

Post by ruff »

maybe, but now i use second 'clicking' method, works fine %) except the case when menu is open and i make usetype again. So i wait for menu to appear again, and then make rclick to menu area. If it would be the case to detect open gump ...
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

If it would be the case to detect open gump ...

Code: Select all

  while not uo.injournal("of type 0xC7D4E47C") 
    wait(100)
  wend

That is it. Try to open some crazft gump, choose something and then use ,showjournal command. You'll see gump events in Text-window.
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
ruff
Posts: 46
Joined: 2004-06-26 15:36:11
Location: Praha

Post by ruff »

yes, but when my script is working it makes deletejournal several times, so in journal i can't detect it, only if take pixel's color from screen (is it possible in inject?)
Lord Ruslan Nightmare
Expert!
Posts: 359
Joined: 2004-04-25 11:11:07
Contact:

Post by Lord Ruslan Nightmare »

Not possible.
Try to rewrite your script...In fact, this is best solution for all programming problems.
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...
ruff
Posts: 46
Joined: 2004-06-26 15:36:11
Location: Praha

Post by ruff »

i've rewritten, i wait for gump to appear again, and then make rklick on menu area. so after procedure i can be sure that gump is closed.
Drakull
Posts: 36
Joined: 2004-07-01 06:02:22

Re: RunUO craft gumps

Post by Drakull »

Lord Ruslan Nightmare wrote:RunUO craft gumps structure

Code: Select all

7  - select material (iron/leather/hides etc)
14 - smelt item
21 - make last
28 - open "last ten" list
35 - toggle "use/don't use material's color" (in "select material" gump)
42 - repair item
49 - toggle "mark/prompt for mark/don't mark"
56 - select material (scales)
63 - enhance item
70 - ?


....

What ",recall self" with 0 and 70 does?
If somebody knows more about any AOS gumps - please, post it here...


,recall self 0 = clicking on the exit button on the gump. Useful to close the screen with the options on your script when the crafting tool has not end it's uses.
Post Reply