R> auto-kick when idle in 3mins

Code:
-    script    test    -1,{end;OnPCLoadMapEvent:    if(getmapflag(strcharinfo(3),mf_gvg)){        attachnpctimer ""+strcharinfo(0);        initnpctimer;    }    end;OnTimer181000:    if(checkidle()>=180 && getmapflag(strcharinfo(3),mf_gvg)){        atcommand "@kick "+strcharinfo(0);        end;    }    if(getmapflag(strcharinfo(3),mf_gvg))        initnpctimer;    else        detachnpctimer;    end;}gvgmap    mapflag    loadevent
 
Last edited by a moderator:
[cbox]- script noafk -1,{

OnPCLoadMapEvent:
if(getmapflag(strcharinfo(3),mf_gvg))initnpctimer;

end;
OnTimer181000:
if(checkidle()>180 && getmapflag(strcharinfo(3),mf_gvg))
atcommand "@kick "+strcharinfo(0);


if(getmapflag(strcharinfo(3),mf_gvg))initnpctimer;

end;

}

schg_cas06 mapflag loadevent[/cbox]

nothing happen! but thanks !

 
[cbox]- script noafk -1,{

OnPCLoadMapEvent:

if(getmapflag(strcharinfo(3),mf_gvg))initnpctimer;

end;

OnTimer181000:

if(checkidle()>180 && getmapflag(strcharinfo(3),mf_gvg))

atcommand "@kick "+strcharinfo(0);

if(getmapflag(strcharinfo(3),mf_gvg))initnpctimer;

end;

}

schg_cas06 mapflag loadevent[/cbox]

nothing happen! but thanks !

srry, I forgot attachnpctimer  try it again

 
-  script  test  -1,{end;OnPCLoadMapEvent:  if(getmapflag(strcharinfo(3),mf_gvg)){    attachnpctimer ""+strcharinfo(0);    initnpctimer;  }  end;OnTimer181000:  if(checkidle()>=180 && getmapflag(strcharinfo(3),mf_gvg)){    atcommand "@kick "+strcharinfo(0);    end;  }  if(getmapflag(strcharinfo(3),mf_gvg))    initnpctimer;  else    detachnpctimer;   end;}gvgmap  mapflag  loadevent
same nothing happen!

 
I change mf_gvg  to mf_gvg_castle and test in map prtg_cas03

the script  is working for me now

Code:
-    script    test    -1,{end;OnPCLoadMapEvent:    if(getmapflag(strcharinfo(3),mf_gvg_castle)){	    attachnpctimer ""+strcharinfo(0);	    initnpctimer;    }    end;OnTimer181000:   	 if(checkidle()>=180 && getmapflag(strcharinfo(3),mf_gvg_castle)){	    atcommand "@kick "+strcharinfo(0);	    end;    }    if(getmapflag(strcharinfo(3),mf_gvg_castle))	    initnpctimer;    else	    detachnpctimer;    end;}prtg_cas03    mapflag    loadevent
 
Have you set the corresponding mapflags?

You have to set mapflag loadevent to each map you want this script trigger on. Example:

gvgmap mapflag loadeventgvgmap2 mapflag loadeventgvgmap3 mapflag loadevent
If you don't set this mapflag on the maps you want this script to trigger, nothing will happen.

 
[cbox]- script test -1,{
end;

OnPCLoadMapEvent:
if(getmapflag(strcharinfo(3),mf_gvg_castle)){
attachnpctimer ""+strcharinfo(0);
initnpctimer;
}
end;


OnTimer181000:

if(checkidle()>=180 && getmapflag(strcharinfo(3),mf_gvg_castle)){
atcommand "@kick "+strcharinfo(0);
end;
}
if(getmapflag(strcharinfo(3),mf_gvg_castle))
initnpctimer;
else
detachnpctimer;

end;

}

schg_cas06 mapflag loadevent
schg_cas07 mapflag loadevent
schg_cas08 mapflag loadevent
arug_cas06 mapflag loadevent
arug_cas07 mapflag loadevent
arug_cas08 mapflag loadevent[/cbox]

hmmm not Guild castle.

this map is set to battleground system!

 
For BG maps, you should check for mf_battleground instead of mf_gvg_castle
 

 
1000=1sec

3mins =180000  ===>OnTimer180000:

I have no idea why the script doesn't work for you
default_wacko.png


 
Back
Top