Yoko

All sides of Injection
It is currently 2026-01-21 19:22:39

All times are UTC+02:00




Post new topic  Reply to topic  [ 17 posts ] 
Author Message
 Post subject: RunUO craft gumps
PostPosted: 2004-04-26 02:42:47 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
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:
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:
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:
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.

Top
   
 Post subject:
PostPosted: 2004-05-04 01:24:00 
didnt work here, i got a "you must wait to perform another action" message.....


Top
   
 Post subject:
PostPosted: 2004-05-04 14:24:17 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
author forgot to tell of usage ,set norbcheck and ,set norbcalc
use forum search on word "norbcalc" too seek topics with explanations


Top
   
 Post subject:
PostPosted: 2004-05-06 11:14:47 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Sorry. Fixed :)

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-06-01 22:27:45 
Offline

Joined: 2004-05-12 01:40:04
Posts: 17
why my character dismounts???


Top
   
 Post subject:
PostPosted: 2004-06-02 00:20:26 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Maybe because script targetting to self? You can use any other object , what is not runebook...

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-06-04 21:03:21 
Offline

Joined: 2004-05-09 19:53:49
Posts: 58
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..


Top
   
 Post subject:
PostPosted: 2004-06-05 11:50:15 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Did'nt used tracking on RunUO, sorry...

Maybe, alternative method of gump-handling will help (in fact - this is old good clicking method :) )
Code:
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:
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 ..."

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-06-25 12:53:14 
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'


Top
   
 Post subject:
PostPosted: 2004-06-25 12:56:37 
i mean case with recall self


Top
   
 Post subject:
PostPosted: 2004-06-25 17:36:21 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
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?

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-07-02 17:30:09 
Offline
User avatar

Joined: 2004-06-26 15:36:11
Posts: 46
Location: Praha
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 ...


Top
   
 Post subject:
PostPosted: 2004-07-06 15:51:33 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Quote:
If it would be the case to detect open gump ...

Code:
  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.

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-07-07 07:19:51 
Offline
User avatar

Joined: 2004-06-26 15:36:11
Posts: 46
Location: Praha
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?)


Top
   
 Post subject:
PostPosted: 2004-07-09 12:51:34 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Not possible.
Try to rewrite your script...In fact, this is best solution for all programming problems.

_________________
Без труда не выловишь и рыбку из пруда,

А без пруда не выловишь её и с трудом...


Top
   
 Post subject:
PostPosted: 2004-07-12 12:56:03 
Offline
User avatar

Joined: 2004-06-26 15:36:11
Posts: 46
Location: Praha
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.


Top
   
 Post subject: Re: RunUO craft gumps
PostPosted: 2004-07-31 07:11:45 
Offline

Joined: 2004-07-01 06:02:22
Posts: 36
Lord Ruslan Nightmare wrote:
RunUO craft gumps structure
Code:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 17 posts ] 

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