Jump to content
  • 0

Contador de Quest


Rizta

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  109
  • Reputation:   5
  • Joined:  08/12/17
  • Last Seen:  

Entao pessoal... eu estou usando um sistema de quest aqui, mas, ocorre que quando os membros estao em party, caso estejam em mapas diferentes e matem monstros diferentes, a quest conta da mesma forma... eu nunca vi acontecer e nao sei a razão.

Esse é o código que uso para atribuir tal função:

nNPCKillEvent:
	if(getcharid(1) != 0)
		addrid(2,1,getcharid(1));

Usei como referencia essa parte especifica do DOC

*getcharid(<type>{,"<character name>"})

This function will return a unique ID number of the invoking character, or, if a
character name is specified, of that player.

Type is the kind of associated ID number required:

 0 - Character ID
 1 - Party ID
 2 - Guild ID
 3 - Account ID
 4 - Battle Ground ID
 5 - Clan ID

For most purposes other than printing it, a number is better to have than a name
(people do horrifying things to their character names).

If the character is not in a party or not in a guild, the function will return 0
if guild or party number is requested. If a name is specified and the character
is not found, 0 is returned.

If getcharid(0) returns a zero, the script got called not by a character and
doesn't have an attached RID. Note that this will cause the map server to
print "player not attached!" error messages, so it is preferred to use
"playerattached" to check for the character attached to the script.

if (getcharid(2) == 0)
	mes "Only members of a guild are allowed here!";


*addrid(<type>{,<flag>{,<parameters>}});

This command will attach other RIDs to the current script without detaching the
invoking RID. It returns 1 if successful and 0 upon failure.

<type> determines what RIDs are attached:
 0: All players in the server.
 1: All players in the map of the invoking player, or the invoking NPC if no player is attached.
 2: Party members of a specified party ID.
    [ Parameters: <party id> ]
 3: Guild members of a specified guild ID.
    [ Parameters: <guild id> ]
 4: All players in a specified area of the map of the invoking player (or NPC).
    [ Parameters: <x0>,<y0>,<x1>,<y1> ]
 5: All players in the map.
    [ Parameters: "<map name>" ]
 Account ID: If type is Account ID, attach the specified account ID.

<flag> can prevent certain players from being attached:
 0: Players are always attached. (default)
 1: Players currently running another script will not be attached.

O que eu posso fazer pra resolver essa questao dos monstros e do mapa?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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