Jump to content

Recommended Posts

  • 2 months later...
  • 1 month later...
Posted

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

  • 3 weeks later...
Posted

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

  • 1 month later...
Posted (edited)

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
  • 3 months later...
  • 1 month later...
  • 9 months later...
Posted

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),
  • 3 months later...
  • 4 weeks later...
  • 1 month later...
  • 1 year later...
Posted
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

 

  • 7 months later...
Posted (edited)

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
  • 9 months later...
  • 1 year later...
  • 2 months later...
Posted
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;
}
}

 

Posted
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

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...