Author Topic: Buy_List Gump Menu issue  (Read 6773 times)

0 Members and 1 Guest are viewing this topic.

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Buy_List Gump Menu issue
« on: April 12, 2009, 06:19:44 AM »
0
The shard where I play uses the mondains legacy game.

I have made an script in order to sell my fishes more quickly. The script works fine and serves it's purpose. But I would like to improve this part:

 
Code: [Select]
set %amount 30
click 240 80 x %amount ; It clicks 30 times on the first element of the menu list

click 315 420 ; accept button
gosub waitForGumpDisappear
finditem %fishType C_ , #backpackID
}

There is a way to know wich fish it's gonna be first in the buy_list menu?

So I could make something like this:


 
Code: [Select]
set %amount #findStack
click 240 80 x %amount ; It clicks 30 times on the first element of the menu list

click 315 420 ; accept button
gosub waitForGumpDisappear
finditem %fishType C_ , #backpackID
}

Use #findstack to determine the number of clicks that have to be made.

Another thing I would like to improve it's the method to open the buy_list gump, I've tried the exevent popup without success with something like this:

Code: [Select]
finditem %vendor G_10
if #FINDCNT > 0
exevent Popup #findid 1
halt

The complete working script that I'm currently using:


Code: [Select]
;==================================
; Script Name: SellSub
; Author: VicVega
; Version: 0.1
; Client Tested with: 5. Something
; EUO version tested with: 1.5 (Version 148)
; Shard: Epsilon UO
; Revision Date: 12-04-09
; Public Release:
; PSL Release:
; Purpose: Sells all fish in your Backpack to an NPC
;==================================
set %fishType GQD_TLW_VLW_DMW_LGW_NGW_GMW_FQD_OGW_WLW_
              +YLW_DQD_SLW_ULW_FMW_EMW_XLW_RLW_EQD
set %vendor Conway

sell:
;open vendor's popup menu and click sell option
finditem %fishType C_ , #backpackID
while #findkind <> -1
{

msg %vendor sell $

gosub waitForgump


set %amount 30
click 240 80 x %amount

click 315 420 ; accept button
gosub waitForGumpDisappear
finditem %fishType C_ , #backpackID
}

exit

sub waitForGump
set %timeout #scnt + 5
loop:
If #contname <> bill_gump
{
 if #scnt > %timeout
    return
 else
   goto loop
}
return

sub waitForGumpDisappear
set %timeout #scnt + 5
loop2:
If #contname = bill_gump
{
 if #scnt > %timeout
    return
 else
   goto loop2
}
return

Also later on I'm planning on add another sub in order to know how muck money it's gained in the complete transaction.
« Last Edit: April 12, 2009, 06:37:13 AM by VicVega »
To learn, read.
To know, write.
To master, teach.

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: Buy_List Gump Menu issue
« Reply #1 on: April 12, 2009, 07:03:10 AM »
0
I don't belive there is a way to search the first fish in the SELL gump, there are however ways to search in the BUY gump

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Buy_List Gump Menu issue
« Reply #2 on: April 12, 2009, 04:00:54 PM »
0
The only way to do it is buy pixel scanning the sell gump .. can be done but not so easy
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Buy_List Gump Menu issue
« Reply #3 on: April 13, 2009, 12:33:48 AM »
0
I will leave a static number of clicks then.

Any idea why exevent popup doesn't work?

The #findID of the vendor I use in order to try to use the exevent popup it's fine but nothing happens.
To learn, read.
To know, write.
To master, teach.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Buy_List Gump Menu issue
« Reply #4 on: April 13, 2009, 07:45:03 AM »
0
Event popup has been bugged for quite some time.  Actually I thought it worked on RunUO-based shards, but has never worked for me on OSI.  Normally when I use event popup, I wait for the particular gump to popup and then manually click into the gump region.  This works for OSI/RunUO/Anything:

Code: [Select]
      exevent popup !bagofsending
      gosub GumpWait normal_gump normal_gump
      set !clickx #CONTPOSX + 30
      set !clicky #CONTPOSY + 28
      click !clickx !clicky dmc
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Buy_List Gump Menu issue
« Reply #5 on: April 13, 2009, 08:05:25 AM »
0
Event popup has been bugged for quite some time.  Actually I thought it worked on RunUO-based shards, but has never worked for me on OSI.  Normally when I use event popup, I wait for the particular gump to popup and then manually click into the gump region.  This works for OSI/RunUO/Anything:

Code: [Select]
      exevent popup !bagofsending
      gosub GumpWait normal_gump normal_gump
      set !clickx #CONTPOSX + 30
      set !clicky #CONTPOSY + 28
      click !clickx !clicky dmc

What's this? -> !bagofsending

you don't use the vendor's ID on the exevent popup?
To learn, read.
To know, write.
To master, teach.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Buy_List Gump Menu issue
« Reply #6 on: April 13, 2009, 08:26:22 AM »
0
What's this? -> !bagofsending

you don't use the vendor's ID on the exevent popup?

Oh, that's just the #FINDID of my bag of sending.  This was just a snippet of code that also uses event popup, but on a BOS.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Buy_List Gump Menu issue
« Reply #7 on: April 13, 2009, 08:29:32 AM »
0
Here's an extended example of how I use the context menu for items/venders:

http://www.scriptuo.com/index.php?topic=79.0
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Buy_List Gump Menu issue
« Reply #8 on: April 13, 2009, 11:00:40 AM »
0
I think I understand then, but the problem it's that I also use #findID in order to use exevent popup:

Code: [Select]
set %vendor IS
finditem %vendor G_10
if #FINDCNT > 0
exevent Popup #findid
halt

But it doesn't work, nothings happens and I don't know why.
« Last Edit: April 13, 2009, 11:05:03 AM by VicVega »
To learn, read.
To know, write.
To master, teach.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Buy_List Gump Menu issue
« Reply #9 on: April 13, 2009, 11:15:35 AM »
0
Are you on a RunUO-based shard?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline VicVegaTopic starter

  • Jr. Member
  • **
  • Posts: 71
  • Activity:
    0%
  • Reputation Power: 0
  • VicVega has no influence.
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Buy_List Gump Menu issue
« Reply #10 on: April 13, 2009, 11:19:01 AM »
0
It's a Sphere Server. It uses Mondains Legacy 5.8.0.1

Sphere server 0.59b I think
To learn, read.
To know, write.
To master, teach.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Buy_List Gump Menu issue
« Reply #11 on: April 13, 2009, 11:32:14 AM »
0
It's a Sphere Server. It uses Mondains Legacy 5.8.0.1

Sphere server 0.59b I think

Hummm, that might be the problem.  Where it works perfectly on RunUO, and kinda works on OSI, it just may not work at all on Sphere.  I'm afraid you might be out of luck.  The only other way I can think of is to manually click the vender, wait for gump and continue.  Problem with that is you'll have to convert world to screen coordinates.  That can be problematic.  ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: