Esempio n. 1
0
int main(object me, string arg)
{
    int mem;

    write("整理结果,共清除 " + reclaim_objects() + " 个变数。\n");
    return 1;
}
Esempio n. 2
0
void auto_clear()
{
        int i,mem;
        object *ob, link_ob;
        string id;
        CHANNEL_D->do_channel( this_object(), "sys",
                sprintf("系统自动清除 " + reclaim_objects() + " 个变数。\n"));
        CHANNEL_D->do_channel( this_object(), "chat",
                sprintf("本站ip地址:210.34.120.6 6666(7777,8888)"));
        CHANNEL_D->do_channel( this_object(), "chat",
                sprintf("本站总站网址:http://zmud.7i24.com"));
        CHANNEL_D->do_channel( this_object(), "chat",
                sprintf("本站网址:http://xlqysjsh.51.net"));
        remove_call_out("auto_clear");
        call_out("auto_clear", 1200+random(120));
remove_call_out("init_dynamic_quest");
  TASK_D->init_dynamic_quest(1);
    write("更新系统 TASK 完成!\n");
    rm("/log/dlog/money");
    if (random(5)==1) rm("/log/debug.log"); //防止debug very big
    rm("/log/monitord");
     "/adm/daemons/money"->move_money();
     "/adm/daemons/money"->move_money();
//     "/adm/daemons/money"->move_money();
//     "/adm/daemons/money"->move_money();
     "/adm/daemons/money"->move_money();
}
Esempio n. 3
0
void auto_relaim()
{
        int i;

        if (i = reclaim_objects())
	        CHANNEL_D->do_channel( this_object(), "sys",
		        sprintf("系统自动清除 %d 个变量。", i));

        remove_call_out("auto_relaim");
        call_out("auto_relaim", 30);
}
Esempio n. 4
0
void auto_check(int duration)
{
	    object *list;
	    int t;
	    int j;
	    int i;
	    int flag;
		
	    list = filter_array(objects(), (: userp :));
	    j=sizeof(list);
	    while( j-- ) {
	        if( !environment(list[j]) 
	        || !interactive(list[j])  ) continue;
	        //auto record pot 异常
	        
	        if(list[j]->query("potential")>list[j]->query("max_pot"))
	        	log_file("static/autocheck",
	        	sprintf("%-23s pot:%-10d max_pot:%-10d",
	        	list[j]->name(1)+"("+list[j]->query("id")+")",
	        	list[j]->query("potential"),
	        	list[j]->query("max_pot")
	        	)
	        	);
	        	
	        if((list[j]->query("kar")>30||list[j]->query("pur")>30)&&!wizardp(list[j]))
	        	log_file("static/autocheck",
	        	sprintf("%-23s kar:%-10d kur:%-10d",
	        	list[j]->name(1)+"("+list[j]->query("id")+")",
	        	list[j]->query("kar"),
	        	list[j]->query("pur")
	        	)
	        	);
	        
	        if((list[j]->query("mud_age") - list[j]->query_temp("mud_age"))<=0) continue;
	        //因为在char.c 里控制了8M
	        if(list[j]->query("combat_exp") < 8000000) continue;
	        i = (list[j]->query("combat_exp") - list[j]->query_temp("combat_exp")) * 60
	                / (list[j]->query("mud_age") - list[j]->query_temp("mud_age"));
	        if (i < 120) continue;
	        t = list[j]->query("mud_age") - list[j]->query_temp("mud_age");
	                   
	        log_file("static/autocheck",
					sprintf("%-23s%-16d %-16d%-3d/%-16d%s\n",
						                (list[j]->is_robot()?(HIG+list[j]->name(1)+NOR):list[j]->name(1))+"("+list[j]->query("id")+")",
						                list[j]->query_temp("combat_exp"), 
						                list[j]->query("combat_exp"),
						                i,
						                i*60,
						                CHINESE_D->chinese_time(t)
						            )
						);
						flag = 1;
	

	        
	    }      
        if (flag)
        	        CHANNEL_D->do_channel( this_object(), "sys",sprintf("系统发现玩家速度异常,请检查。"));
        CHANNEL_D->do_channel( this_object(), "sys",sprintf("系统自动清除 " + reclaim_objects() + " 个变数。"));
        remove_call_out("auto_check");
        call_out("auto_check", 50+random(10), duration); //轮一次的时间是35*13
}