Author Topic: Pathfind  (Read 2058 times)

0 Members and 1 Guest are viewing this topic.

Offline seexplosioNTopic starter

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 1
  • seexplosioN has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Pathfind
« on: July 09, 2011, 02:18:03 AM »
0
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.

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: Pathfind
« Reply #1 on: July 10, 2011, 05:36:44 PM »
0
%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?

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Pathfind
« Reply #2 on: July 11, 2011, 03:57:33 AM »
0
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
  }
}

XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Tags: