打印

[寻求帮助] 自动0血+买雪霜+喝雪霜ACI

自动0血+买雪霜+喝雪霜ACI

这是自动使用0血的ACI,
void nx_thread()
{
        while(1)
        {
                if(cast(me(),"凝血离魂"))
                        {
                                break;
                        }
                        sleep(0.5);
                }
        }
        
        void create_nx()
        {
                delete_thread("NX_THREAD");
                create_thread("NX_THREAD","nx_thread");
        }
        

void on_enter_world()
{
        create_nx();
}
        
void on_scan_system_msg(string msg)
{
        if(msg == "凝血离魂使用完毕.")
                {
                        while(1)
                        {
                                if(cast(me(),"凝血离魂"))
                                        {
                                                break;
                                        }
                                sleep(0.5);
                        }
                }
}
这是你发的买人参喝人参的ACI:
string life_potion="万年雪霜";
int life_num_1=500;

void on_post_prepare_for_quest()
{
  mapping npc;
  close_to_npc("potion", &npc);
  talk_to(npc);
  talk_to(npc,"@buy") ;
  buy_item(life_potion, (life_num_1-get_item_amount(life_potion)), npc);

  close_to_npc("item", &npc);
  talk_to(npc);
  talk_to(npc,"@buy") ;
  buy_item("回城卷", (6-get_item_amount("回城卷")), npc);
  buy_item("随机传送卷", (random_num-get_item_amount("随机传送卷")), npc);
}

void drink_timer()
{

      if(me()["life"]<=(me()["max_life"]-170) ||me()["mana"]<=(me()["max_mana"]-250))
                 {
                 delete_thread("dr");
                 create_thread("dr","apply",life_potion);
                 }
                 
       delete_timer("ti");
       set_timer(2,"ti","drink_timer");
                 
}
drink_timer();


void on_enter_world ()
{
  drink_timer();
}

void on_applied_item(mapping ob)
{
  if(get_item_amount(life_potion)<5)  back(5);
}

我把他放到一起就加载错误,怎么把他组合起来,让我的法师又吃人参,又0血啊?

[ 本帖最后由 一米●阳光 于 2006-8-31 10:37 编辑 ]

TOP

顶2下

TOP

void nx_thread()
{
        while(1)
        {
                if(cast(me(),"凝血离魂"))
                        {
                                break;
                        }
                        sleep(0.5);
                }
        }
        
        void create_nx()
        {
                delete_thread("NX_THREAD");
                create_thread("NX_THREAD","nx_thread");
        }
        
void on_scan_system_msg(string msg)
{
        if(msg == "凝血离魂使用完毕.")
                {
                        while(1)
                        {
                                if(cast(me(),"凝血离魂"))
                                        {
                                                break;
                                        }
                                sleep(0.5);
                        }
                }
}
string life_potion="万年雪霜";
int life_num_1=500;

void on_post_prepare_for_quest()
{
  mapping npc;
  close_to_npc("potion", &npc);
  talk_to(npc);
  talk_to(npc,"@buy") ;
  buy_item(life_potion, (life_num_1-get_item_amount(life_potion)), npc);

  close_to_npc("item", &npc);
  talk_to(npc);
  talk_to(npc,"@buy") ;
  buy_item("回城卷", (6-get_item_amount("回城卷")), npc);
  buy_item("随机传送卷", (random_num-get_item_amount("随机传送卷")), npc);
}

void drink_timer()
{

      if(me()["life"]<=(me()["max_life"]-170) ||me()["mana"]<=(me()["max_mana"]-250))
                 {
                 delete_thread("dr");
                 create_thread("dr","apply",life_potion);
                 }
                 
       delete_timer("ti");
       set_timer(2,"ti","drink_timer");
                 
}
drink_timer();
create_nx();
void on_enter_world ()
{
  drink_timer();
  create_nx();
}

void on_applied_item(mapping ob)
{
  if(get_item_amount(life_potion)<5)  back(5);
}

TOP

老大,你好厉害,谢谢啦

TOP

好,顶了.

TOP

ddddddddddd

TOP

ddddddddd

TOP

谢谢阳光的及时回复!!!继续支持BBX一直到.............

TOP

阳光 我加载不上,提示加载代码失败:
Error:   /config/情义传奇-名字能有多长-code.sav: Line 78 The variable(life_potion) has been declared.
Error:   /config/情义传奇-名字能有多长-code.sav: Line 79 The variable(life_num_1) has been declared.
Error:   /config/情义传奇-名字能有多长-code.sav: Function "on_post_prepare_for_quest" has been implemented.
Error: Can not load into object.
Current thread: "t3562"(11)
At EFUN: load_object in Global
At /std_cmds.spt#2789(???) in Global
Call from buffer#2
Failed to load.
Return on the top layer of call stack. Execution abort.

TOP

重新登陆可以了 ,不知道掉线后自动登陆能不能用

TOP

厉害啊!!!

TOP

好,再学习下写法

TOP

都是强人啊

TOP

哎哟,怎么才可以看东西呢?现在很多看不到

TOP

我加载后,怎么不能自动买雪霜啊?是不是在BBX中还要设置什么东东???

TOP

当前时区 GMT+8, 现在时间是 2008-11-23 08:28
新ICP备05002317号
Powered by Discuz! 6.0.0 © 2001-2007 Comsenz Inc.
Processed in 0.029277 second(s), 7 queries, Gzip enabled
TOP
清除 Cookies - 联系我们 - 网络游戏代理 - Archiver - - WAP
Designed By Discuz! 百宝箱论坛