Jump to content

  •  

Photo

unitwalk is not working


  • Please log in to reply
1 reply to this topic

#1 erijhon

erijhon

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts
  • Github:Erijhon

Posted 24 August 2014 - 11:33 PM

Hi everybody!

 

I have a doubt. I'm testing a summoner NPC that is meant to summon and send some monsters or clones to an specific cell.

Let me say, first, that I have been searching for a long while about this, and tried all the answers I found, but none of them worked.

Let's see if you can help me, guys.

 

Well, I use this scripting manual to check how commands and functions work.

As far as I know, this is the Hercules official manual, isn't it?

 

Let me show you the examples this manual gives about:

 

A.) Summoning a Poring and saving its GID in an NPC temporary variable (.@mobGID).

Spoiler

 

B.) Making the saved GID monster (in .GID NPC variable) walk to an specific cell.

Spoiler

 

So, I asumed that using .@mobGID and .GID variables in my script would result the same, as you will figure out now that I'm posting my script:

Spoiler

 

As I am creating the poring and then telling it the cell it has to go, in the same row, I don't need to use a permanent NPC variable. So I used .@GID NPC temporary variable to store the poring GID and did the same as the manual examples say that is meant to work.

 

Then, I loaded my script, I talked to the "Medium" NPC in Prontera, the "Walking Poring" was summoned, but it was not going to the "x:165 y:165" specified in the script.

 

Why? Is there something missing?

I thought that maybe the time between the "Walking Poring" is summoned and the "unitwalk" command is called was very short so I also tried the following code:

Spoiler

 

Nothing changed.

Does anybody know how to fix this?

 

Thank you very much for your help in advance!!


Edited by erijhon, 24 August 2014 - 11:41 PM.


#2 erijhon

erijhon

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts
  • Github:Erijhon

Posted 25 August 2014 - 02:17 AM

Ok... I found it out by myself...

 

There's a MAX range of cells that if you go over it, the script will fail.

Also, you can't go over obstacles or walls, even if they are in sight.

 

I tried this and the poring walks a perfect square:

 

Spoiler

 

Thanks anyways for your attention, the ones who read this.


Edited by erijhon, 25 August 2014 - 02:17 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 27 user(s)