Welcome to the Builder Academy

Question AFK question

More
17 Mar 2018 14:23 - 17 Mar 2018 14:30 #7707 by JTP
AFK question was created by JTP
Hi

I use this for when people are AFK:
Code:
/* No pkill of afk players */ if (!IS_NPC(victim) && PRF_FLAGGED(victim, PRF_AFK)) { send_to_char(ch, "How cheap! Can't you see the AFK flag?!?\r\n"); SET_BIT_AR(PLR_FLAGS(ch), PLR_KILLER); return (0); }


But agro mobs can't hit afk players either, how should it be done so players dont use AFK to escape agro mobs.
I only wan't this to have effect for PVP. When i switch into the mob, then i see the message.
Last edit: 17 Mar 2018 14:30 by JTP.

Please Log in or Create an account to join the conversation.

More
18 Mar 2018 16:55 #7709 by thomas
Replied by thomas on topic AFK question
Change your logic just a little, and only make it count if the mob is currently switched into:
Code:
- if (!IS_NPC(victim) && PRF_FLAGGED(victim, PRF_AFK)) { + if (ch->desc && !IS_NPC(victim) && PRF_FLAGGED(victim, PRF_AFK)) {
The following user(s) said Thank You: JTP

Please Log in or Create an account to join the conversation.

More
18 Mar 2018 17:21 - 18 Mar 2018 17:22 #7710 by JTP
Replied by JTP on topic AFK question
It works alittle better Then what i had to begin with, but when switched i Can still start the fight. But Then i get the message each round that the player is afk ?
So If switched the mob can't hit the player, but the player Can hit the switched mob :)
Last edit: 18 Mar 2018 17:22 by JTP.

Please Log in or Create an account to join the conversation.

More
19 Mar 2018 19:50 #7722 by JTP
Replied by JTP on topic AFK question
Also now see this in file error:

Mar 18 11:23:07 :: SYSERR: the cityguard (#3060): Attempting to call
non-existing mob function.

The mobs iwe been testing the AFK thing with.

Please Log in or Create an account to join the conversation.

More
20 Mar 2018 07:01 - 20 Mar 2018 07:02 #7736 by JTP
Replied by JTP on topic AFK question
Wrong submit....still have the problem above
Last edit: 20 Mar 2018 07:02 by JTP.

Please Log in or Create an account to join the conversation.

More
21 Mar 2018 21:57 #7750 by JTP
Replied by JTP on topic AFK question
How Can i find out what non-existing mob function the Stock mob 3060 is trying to use ?

There is nothing in spec assign


Mar 18 11:23:07 :: SYSERR: the cityguard (#3060): Attempting to call
non-existing mob function.

The mobs iwe been testing the AFK thing with.

Please Log in or Create an account to join the conversation.

Time to create page: 0.218 seconds