Jump to content
  • 0

Team vs Team mapflag


bimbi

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  59
  • Reputation:   1
  • Joined:  01/15/12
  • Last Seen:  

Hey this is not really a support and not really a request topic. Let me explain.

In my server there exist 2 Team -> "good" and "evil"

I added to the char -> database the table [team] value's: 1 = good and 2 = evil

So I want create a mapflag which is similiar like pvp mapflag, the players can hit each other, but in mine is one thing different, i want to disable the pvp timing and i want add that good can't hit good, good can only hit evil and evil can only hit good.

I am not sure, do i add the database SELECT/(read) here?

char/char.c

(p->fame != cp->fame)

in my situation it woud be

(p->team!= cp->team)

is that correctly?

Now the main problem:

I have seen in different other mapflag coding that i have to add something like this:


+ WBUFW(buf, 0) = 0x2dd;
+ WBUFL(buf,2) = sd->bl.id;

what does it mean? Is this the packetreading?

Maybe it would be easier if somebody coud help me a lilbit with the teammapflag.

Edited by bimbi
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Lilith's Faction system is the best way I think..
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  59
  • Reputation:   1
  • Joined:  01/15/12
  • Last Seen:  

yea i know, but this system has to damage recalculations and many other addons... I think its easier to write a new one.

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:  

to calculate those can hit and those can't hit is always battle_check_target in battle.c

http://rathena.org/board/topic/72933-pvp-request/#entry153174

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  59
  • Reputation:   1
  • Joined:  01/15/12
  • Last Seen:  

Thanks annieRuru, I updated your code with a mapflag :)

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...