?? ground.c.old
字號:
// create by snowcat.c 2/8/1997
inherit ROOM;
inherit __DIR__"ground3";
#include <ground.h>
void create ()
{
set ("short", "賽場");
set ("long", @LONG
賽場四周是高高的貴賓觀禮臺,十丈見方的場地上整整齊齊地
鋪著一圈彩色瑪瑙石,架著香煙裊繞的四個(gè)巨大金銀銅鐵鼎,
場地中間是軟松的皮絨織錦毯。
LONG);
set("exits", ([
"westup" : __DIR__"west",
"eastup" : __DIR__"east",
"northup" : __DIR__"north",
"southup" : __DIR__"south",
]));
set("objects", ([
__DIR__"npc/wei" : 1,
__DIR__"npc/siguan" : 2,
]));
set("no_quit",1);
set("no_flee",1);
set("broadcast",1);
set("alternative_die",1);
setup();
}
void init ()
{
object who = this_player();
if (wizardp(who))
{
init0();
init1();
init2();
init3();
call_out ("hinting",1,who);
}
add_action ("do_fight","fight");
add_action ("do_fight","kill");
}
int check_fighters (object who, object ob)
{
object *inv = all_inventory (environment(who));
object wei = present ("wei zheng", environment(who));
string names = "";
int i = sizeof (inv);
if (ob == wei)
return 0;
while (i--)
{
if (inv[i]==who || inv[i]==ob || inv[i]==wei)
continue;
if (inv[i]->is_fighting())
names += inv[i]->name();
}
if (names != "")
{
message_vision ("$N對$n說道:這場上"+names+"等正在拚死廝殺,請稍候片刻!\n",wei,who);
return 0;
}
if (! userp(who) || ! userp(ob))
return 1;
call_out ("wait_and_announce",1,who,ob);
return 1;
}
void wait_and_announce (object who, object ob)
{
mapping match = this_room()->query("match");
int step;
string name0, name1, names;
if (! match)
return;
step = match["step"];
if (step != STEP_FIGHT)
return;
if (! who || ! ob)
return;
name0 = who->query("name");
name1 = ob->query("name");
if (strcmp(name0,name1) > 0)
names = name0 + name1;
else
names = name1 + name0;
if (match["fighters"] == names)
return;
match["fighters"] = names;
announce (name0 + "與" + name1 + "水陸大會生死相搏!\n");
}
int do_fight (string arg)
{
object who = this_player();
object ob;
if (! arg)
return 0;
ob = present (arg, environment(who));
if (! ob)
return 0;
if (! check_fighters (who, ob))
return 1;
"/cmds/std/kill"->main(who,arg);
return 1;
}
void hinting (object who)
{
tell_object (who, "\n");
tell_object (who, "◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n");
tell_object (who, "◇大會分籌備、比賽、結(jié)束等階段,不同階段有不同命令。◇\n");
tell_object (who, "◇使用命令時(shí)請注意是否有其他巫師也在此設(shè)置比賽數(shù)據(jù)。◇\n");
tell_object (who, "◇ ◇\n");
tell_object (who, "◇請您隨時(shí)使用 ? 或 what 來查詢您可以使用的命令。 ◇\n");
tell_object (who, "◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n");
tell_object (who, "\n");
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -