ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: seexplosioN on July 09, 2011, 02:18:03 AM

Title: Pathfind
Post by: seexplosioN on July 09, 2011, 02:18:03 AM
Hey all :)

I'm trying to make my own automatic meer hunting with pets script but having trouble with 2 subject.

First thing is script is not sees Meer Eternal or Captain etc. but it sees Blood Elemental. I guess the thing is Meer Eternal is blue, as you know and thats why Script not sees them. (Ofcourse this is my idea, could be anything else)

Second thing is script moves to target, I handle it :) But its moving too close, so monster starting attack me. I'm using these codes for walk;

Code: [Select]
event pathfind #findx #findy
gosub scanJournalFor get_there

sub scanJournalFor
{
    scanjournal #JINDEX
    if %1 in #journal
    {
        return #true
    }
    else
    {
        return #false
    }
}

sub waitForKill
{
    finditem %target G_15
    while #findkind <> -1
    {
          if #enemyID = N/A
          {
        set #ltargetid %target
        Event Macro 13 9         ; use skill peacemaking
        Event Macro 22 0         ; last target
        wait 1s
        msg %TankPet kill$
        Event Macro 22 0         ; last target
        wait 3s
        msg %DamagePet kill$
        Event Macro 22 0         ; last target
        wait 1s
          }
          set %x #findx - #charposx
          if %x < 0
          {
             set %x %x * -1
          }
          set %y #findy - #charposy
          if %y < 0
          {
             set %y %y * -1
          }
          if %x > 1 || %y > 3
          {
              event pathfind #findx #findy
              gosub scanJournalFor get_there
              if #Result
              {
                  set %bZone #false
                  set %attacking #false
                  set %target X
                  return #false
              }
          }

Waiting for your help, thanks.
Title: Re: Pathfind
Post by: Masscre on July 10, 2011, 05:36:44 PM
%target is not defined in the part of the script you posted this could be your problem or you did not list the program as a whole?
Title: Re: Pathfind
Post by: Cerveza on July 11, 2011, 03:57:33 AM
Use event property if the item type is something like human.

Code: [Select]
findItem IS G_15 ; IS is the item type for human male
if #findCnt > 0
{
  event Property #findID
  if Meer in #property
  {
    Whatever you want to do cause it found a Meer
  }
}