• 0
danielps

Getmapxy for mob?

Question

Hi,

In the latest vers of rathena getmapxy doesn't work for mobs?

I looked script.c in src, maybe i can use UNITTYPE_MER for mobs?
I assume that since in src it's like this:

case UNITTYPE_MER: //Get Mercenary Position
			if( script_nick2sd(6, sd) && sd->md )
				bl = &sd->md->bl;

MER is the only type with bl = &sd->md->bl;

In my small knowledge of src md is a struct that saves mob infos, right? So using getmapxy with type = UNITTYPE_MER will work for mobs as well?

May i ask another question too? About bg commands, are there a limit for members? May i have 2 bg teams with 500 members each? xD

No, i wont create only 2 teams of 500 players and put them in the same map xD
I will create a bg, max 5 per team, but my script will be using instance_create command, so it will create another map and duplicate all scripts inside it as well, liek endless tower, right?
But the problem i'm thinking in is: the bg warper will set only 2 teams always, so even that each map (instance) will be duplicated and filled with only 10 players (5 each team), the bg group of them will be the same.... dont knnow if i was clear xD

Thanks ^_^

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Why shouldn't getmapxy for mobs won't work? I recently used it myself.
Works just fine.
If the mob isn't attached you want the coordinates from you have to define it after the UNITTYPE_NPC:

getmapxy([email protected]$,[email protected],[email protected],UNITTYPE_NPC,"Mob");


I'm not sure if you can make an instanced bg, so I can't really help you there.
Well after the instances was created with instance_create you can set an instance variable for the bg ids and save them also in an global array so they can stay unique.

"'"      - An instance variable.
           These are used with the instancing system and are unique to each
           instance type.

Regards,
Chris

Edited by llchrisll

Share this post


Link to post
Share on other sites
  • 0

getunitdata is used to get special data related to the unit, including mapid x and y.

*getunitdata <GID>,<arrayname>;
...
	UMOB_MAPID
	UMOB_X
	UMOB_Y

 

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, llchrisll said:

Why shouldn't getmapxy for mobs won't work? I recently used it myself.
Works just fine.
If the mob isn't attached you want the coordinates from you have to define it after the UNITTYPE_NPC:

getmapxy([email protected]$,[email protected],[email protected],UNITTYPE_NPC,"Mob");


I'm not sure if you can make an instanced bg, so I can't really help you there.
Well after the instances was created with instance_create you can set an instance variable for the bg ids and save them also in an global array so they can stay unique.

"'"      - An instance variable.
           These are used with the instancing system and are unique to each
           instance type.

Regards,
Chris

So using type UNITTYPE_NPC will work for npcs and also mobs? I'm using the latest rA version, is it working UNITTYPE_NPC for mobs too ? o.O

 

5 hours ago, Capuche said:

getunitdata is used to get special data related to the unit, including mapid x and y.

*getunitdata <GID>,<arrayname>;
...
	UMOB_MAPID
	UMOB_X
	UMOB_Y

 

Yeah! I forgot this scritp command haha
But this one will return lots of data from the mob, getmapxy wouldn't be better ? But if getmapxy doesn't work i will use getunitdata! Thanks a lot like for you both guys! 

Share this post


Link to post
Share on other sites
  • 0
On 4/29/2018 at 2:27 AM, danielps said:

So using type UNITTYPE_NPC will work for npcs and also mobs? I'm using the latest rA version, is it working UNITTYPE_NPC for mobs too ? 

Mobs are Non-Playing Characters, too. As far as i know. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.