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).
// We'll make a poring which will automatically attack invoking player:.@mobGID = monster "Prontera",150,150,"Poring",PORING,1; // PORING is defined in the mob db and its value is 1002unitattack .@mobGID, getcharid(3); // Attacker GID, attacked GID
B.) Making the saved GID monster (in .GID NPC variable) walk to an specific cell.
//Will move/walk the poring we made to the coordinates 150,150unitwalk .GID,150,150;
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:
prontera,147,173,6 script Medium 4_F_MOCBOY,{.@GID = monster ("prontera",139,165,"Walking Poring",PORING,1);unitwalk .@GID,165,165;end;}
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:
prontera,147,173,6 script Medium 4_F_MOCBOY,{.@GID = monster ("prontera",139,165,"Walking Poring",PORING,1);sleep 5000;unitwalk .@GID,165,165;end;}
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).
B.) Making the saved GID monster (in .GID NPC variable) walk to an specific cell.
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:
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:
Nothing changed.
Does anybody know how to fix this?
Thank you very much for your help in advance!!
Edited by erijhonShare this post
Link to post
Share on other sites