Jump to content
  • 0

Get party member count


Dissidia

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

get online party member count in source code.. inside the mob.c

Edited by Yurika
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

we have this Getpartymember

just loop through party member data to check it's online or not..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

ahm i want to put the Getpartymember online inside the mob.c sir.. what code do i need?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

no, it should be in script.c

practically I suggest add another variable like

$@partymemberonline = return how many players online in the party

since getpartymember has to be use in any kind of party script anyway

and what emistry means is this

http://www.eathena.ws/board/index.php?s=&showtopic=156045&view=findpost&p=860205

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

Create a variable of type struct party_data;

Sample:

struct party_data *party;

Use party_search function:

party_search(party_id);

Sample:

party = party_search(party_id);

Use a counter(You'll need to create some int vars before, which will be used in the loop[MAX_PARTY is a constant, and already exists]):

if(party!=NULL){
 for(i=0;i<MAX_PARTY;i++){
  if(p->party.member[i].account_id)
j++;
 }
}

j will be the number of party members.

Of course, it'll depends on how u know the code.

it'd be better you u told exactly what you want to do, maybe there're other way of doing it without changing mob.c.

Edited by MarkZD
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...