Jump to content

@afk with AFK Hat


Rebel

Recommended Posts


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  168
  • Reputation:   0
  • Joined:  11/20/13
  • Last Seen:  

hi rebel.. update for this source? seems is not working anymore while compiling in latest rA

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  02/21/14
  • Last Seen:  

How to make @afk can auto-login after restart server like @autotrade?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  111
  • Reputation:   2
  • Joined:  05/09/13
  • Last Seen:  

Again !!

atcommand.c: In function 'atcommand_basecommands':
atcommand.c:9701: error: 'atcommand_reloadmsgconf' undeclared (first use in this function)
atcommand.c:9701: error: (Each undeclared identifier is reported only once
atcommand.c:9701: error: for each function it appears in.)
make[1]: Leaving directory `/home/trincli0267/trunk/src/map'
make[1]: *** [obj_sql/atcommand.o] Error 1
make: *** [map] Error 2

 

How to fix this ?? latest Rev.

thnx

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  258
  • Reputation:   53
  • Joined:  01/09/12
  • Last Seen:  

Again !!

atcommand.c: In function 'atcommand_basecommands':

atcommand.c:9701: error: 'atcommand_reloadmsgconf' undeclared (first use in this function)

atcommand.c:9701: error: (Each undeclared identifier is reported only once

atcommand.c:9701: error: for each function it appears in.)

make[1]: Leaving directory `/home/trincli0267/trunk/src/map'

make[1]: *** [obj_sql/atcommand.o] Error 1

make: *** [map] Error 2

 

How to fix this ?? latest Rev.

thnx

 yeah have error

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

this post dont have any support.

 

Im using svn: r 17704. yes it not compatible with my SVN. all u need is try and error. i am beginner on scripting and src mod. just try and error and fix the error. the console will give u the error. the error will give u the detail where the problem. its not hard thought.

Edited by Happy Mikura
Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

Is it possible to change this to EQI_COSTUME_HEAD_TOP instead of LOOK_HEAD_TOP?

 

Nevermind forget what i just said :P

Edited by Lelouch vi Britannia
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  92
  • Reputation:   2
  • Joined:  01/04/15
  • Last Seen:  

does still work this script?

Link to comment
Share on other sites

  • 9 months later...

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

Try this, modified with remove changelook and afk timeout.

 

atcommand.c

#include "../custom/atcommand.inc"

+/*==========================================
+* @afk
+*------------------------------------------*/
+ACMD_FUNC(afk) {
+ 
+        nullpo_retr(-1, sd);
+				
+				if(sd->bl.m == map_mapname2mapid("prontera")) {
+				clif_displaymessage(fd, "@afk is not allowed on this map.");
+				return 0;
+				}
+				
+				if( pc_isdead(sd) ) {
+				clif_displaymessage(fd, "Cannot @afk if you are dead.");
+				return -1;
+				}
+
+                if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag )
+                {
+
+                if(map[sd->bl.m].flag.pvp  || map[sd->bl.m].flag.gvg){
+                clif_displaymessage(fd, "You may not use the @afk maps PVP or GVG.");
+                return -1;}
+
+                        sd->state.autotrade = 1;
+                        sd->state.monster_ignore = 1;
+			 			 pc_setsit(sd);
+                        skill_sit(sd,1);
+                        clif_sitting(&sd->bl);
+                        clif_specialeffect(&sd->bl, 234,AREA);                       
+                        clif_authfail_fd(fd, 15);
+                } else
+                        clif_displaymessage(fd, "@afk is not allowed on this map.");
+        return 0;
+}
+
 		ACMD_DEF(channel),
 		ACMD_DEF(fontcolor),
 		ACMD_DEF(langtype),
+		ACMD_DEF(afk),
#ifdef VIP_ENABLE
		ACMD_DEF(vip),
		ACMD_DEF(showrate),
Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  120
  • Reputation:   0
  • Joined:  01/03/12
  • Last Seen:  

How want to switch hats to name example [AFK] Player Name ?

Edited by NeoGenesis
Link to comment
Share on other sites

  • 4 weeks later...

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

set to 12 hours but when the player reach 12hours. they not disconnect from the server and still AFK..

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  44
  • Reputation:   3
  • Joined:  11/01/13
  • Last Seen:  

how to apply patch? please anyone here willing to give me step by step guide? thank you! <3

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  72
  • Reputation:   6
  • Joined:  04/30/14
  • Last Seen:  

atcommand.c: In function 'ACMD':
atcommand.c:11702: error: 'src' undeclared (first use in this function)
atcommand.c:11702: error: (Each undeclared identifier is reported only once
atcommand.c:11702: error: for each function it appears in.)
atcommand.c:11706: error: 'sd' undeclared (first use in this function)
atcommand.c:11708: error: 'pc' undeclared (first use in this function)
atcommand.c:11710: error: 'clif' undeclared (first use in this function)
atcommand.c:11715: error: 'message' undeclared (first use in this function)
atcommand.c:11717:37: error: macro "msg_txt" requires 2 arguments, but only 1 given
atcommand.c:11717: error: 'msg_txt' undeclared (first use in this function)
atcommand.c:11718: error: 'fd' undeclared (first use in this function)
atcommand.c:11725: error: 'skill' undeclared (first use in this function)
atcommand.c:11730:37: error: macro "msg_txt" requires 2 arguments, but only 1 given
atcommand.c: In function 'atcommand_basecommands':
atcommand.c:12098: error: 'atcommand_afk' undeclared (first use in this function)
make[1]: *** [obj/atcommand.o] Error 1
make[1]: Leaving directory `/root/wolf/src/map'
make: *** [map] Error 2

 

Link to comment
Share on other sites

  • 7 months later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  09/29/17
  • Last Seen:  

A just a little mod for this @afk command, a small switch to enable the autokick or leave your players online with afk mode.

1.1 Added diff file.

battle.h

int afk_kick;

battle.c
 

{ "afk_kick",                           &battle_config.afk_kick,                        0,      0,      1,              },

atcommand.c

 

if( battle_config.afk_kick == 1)
					{
						if( battle_config.afk_timeout )
                        {
                                int timeout = atoi(message);
                                status_change_start(NULL, &sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.afk_timeout) : battle_config.afk_timeout)*60000,0);
                        }
					}


misc.conf
 

// Set this to kick the char on @afk command or leave the char connected, 1 = yes kick
afk_kick: 1

 

afk_v1.3RoPower.diff

Edited by ropowernet
Link to comment
Share on other sites

  • 9 months later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   14
  • Joined:  07/23/18
  • Last Seen:  

How to make it now with C++?

Cause that's .cpp now, not .c and I need it so much ?

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  08/20/14
  • Last Seen:  

Any news? 
The last github version not working!! Please help!

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

Can anyone update for working @afk script bcoz the old script wont work anymore

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   4
  • Joined:  02/06/15
  • Last Seen:  

3 hours ago, skymia said:

Can anyone update for working @afk script bcoz the old script wont work anymore

-    script    AFK_1    -1,{
      
OnInit:
    bindatcmd("afk", strnpcinfo(3) +"::OnAFK");
end;
 
OnAFK:
    if (@AFK) {
    set @AFK, 0;
    changelook 4,headupper;
    dispbottom "AFK mode is OFF.";
end;
    } else {
    set @AFK, 1;
    headupper=getlook(4);
    changelook 4,471;
    dispbottom "AFK mode is ON.";
    end;
}
}

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

13 hours ago, Takerio said:

-    script    AFK_1    -1,{
      
OnInit:
    bindatcmd("afk", strnpcinfo(3) +"::OnAFK");
end;
 
OnAFK:
    if (@AFK) {
    set @AFK, 0;
    changelook 4,headupper;
    dispbottom "AFK mode is OFF.";
end;
    } else {
    set @AFK, 1;
    headupper=getlook(4);
    changelook 4,471;
    dispbottom "AFK mode is ON.";
    end;
}
}

 

is this script have afk hat?

if yes how to remove it thanks

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   4
  • Joined:  02/06/15
  • Last Seen:  

6 hours ago, skymia said:

is this script have afk hat?

if yes how to remove it thanks

 

 
@afk gives you
@afk removes it
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
Reply to this topic...

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