Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - VicVega

Pages: 1 [2]
16
General UO Chat / Easy UO and afk macroing friendly shard
« on: April 20, 2009, 05:22:45 AM »
I was wondering if anyone can recommend me a shard where it's allowed to use Easy UO and afk macroing, preferebly without skillcap.

17
Script Debug / Fishing sub
« on: April 19, 2009, 02:09:21 AM »
I was wondering if there is a better way to handle the spots where I can't fish in the fishing sub (too close spots or too far ones) in order to avoid them.

Right now the badspots are handle with "sub badspots" called from the fishing sub.

Also I would like to know if it's better to call the "badspots" passing parameters like this:

Code: [Select]
gosub badSpots %x %y
And then use %1 and %2 in the sub, or if it's the same and it does not improve stability.

Code: [Select]
set %poleType NSL_KSL
set %pathReconnect reconnect.txt
set %maxTimeOutScan 20

sub fishing
  for %x -5 5
  {
    for %y -5 5
    {
      if #contkind = ORLB
          call %pathReconnect
      if #weight < %maxweight
      {
        event sysmessage %x %y
        gosub badSpots
        if #result = good
        {
           gosub usePole
           gosub scan
           deletejournal
           gosub pickupFish
        }

      }
    }
  }
return

sub pickUpFish
    finditem %fishType G_2
    if #findkind <> -1
        call pickupFish.txt
return

sub badSpots
  if %x = -5 && %y = -5 ; too far
     return bad
  if %x = -5 && %y = 5 ; too far
     return bad
     
  if %x = -1 && %y = 0 ; too close
     return bad
  if %x = -1 && %y = -1 ; too close
     return bad
  if %x = -1 && %y = 1 ; too close
     return bad
     
  if %x = 0 && %y = -1 ; too close
     return bad
  if %x = 0 && %y = 0 ; too close
     return bad
  if %x = 0 && %y = 1 ; too close
     return bad
     
  if %x = 1 && %y = 0 ; too close
     return bad
  if %x = 1 && %y = -1 ; too close
     return bad
  if %x = 1 && %y = 1 ; too close
     return bad


  if %x = 5 && %y = -4 ; too far
     return bad
  if %x = 5 && %y = -5 ; too far
     return bad
return good

sub scan
  set %timeout #scnt + %maxTimeOutScan
  set %jrnl #jindex
  scanjournal %jrnl

  while #scnt < %timeout
  {
    if %jrnl < #jindex
    {
      set %jrnl %jrnl + 1
      scanjournal %jrnl
    }
   
    if ( mala_suerte in #journal || Pescaste in #journal )
    {
      set %timeout #scnt + %maxTimeOutScan
      gosub usePole
    }
   
    if ( no_hay_peces in #journal || demasiado_lejos in #journal
        + || no_puedes_pescar in #journal || mejor_pesca in #journal )
    {
      wait 5
      return
    }
  }

sub UsePole
set #lTargetKind 2
set #lTargetX #CHARPOSX + %x
set #lTargetY #CHARPOSY + %y
finditem %poleType
set #LOBJECTID #FINDID
event macro 17
target 3s
event macro 22
return

sub pickUpFish
    finditem %fishType G_2
    if #findkind <> -1
        call pickupFish.txt
return

18
Script Debug / Buy_List Gump Menu issue
« on: April 12, 2009, 06:19:44 AM »
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.

Pages: 1 [2]