Jump to content
  • 0

Getmapxy for mob?


danielps

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

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 ^_^

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  625
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

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(.@map$,.@x,.@y,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
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

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(.@map$,.@x,.@y,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! 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  429
  • Reputation:   163
  • Joined:  12/12/17
  • Last Seen:  

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. 

Link to comment
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.

×
×
  • Create New...