_longsee.c - 聖殿英雄傳說 MUD
By Elma
at 2016-11-30T09:49
at 2016-11-30T09:49
Table of Contents
編輯中
// _longsee.c
// laechan@sanc 2016/11/30
inherit DAEMON;
int cmd_longsee(string str,object me)
{
string tmp,tmp2;
object ppl,env;
mixed tmps;
int wiz;
if(!str || str=="")
return notify_fail(@LONG
遠見魔法(longsee)指令說明:
============================================================
longsee -cast 玩家id 相當於 cast longsee 玩家id
longsee -allppl 觀看線上所有非斷線玩家的情報
longsee -disapparate 數字 觀看消影術所記憶的地點情報
1.該指令的使用限制是:進階法師,手上並需佩戴「戒指類」防具
2.
============================================================
LONG
);
wiz=wizardp(me);
tmp=me->query("adv_guild");
if(wiz<1 &&
tmp!="magemaster" && tmp!="sage" && tmp!="alchemist")
return notify_fail("longsee: 這個指令只有進階法師可以使用喔.\n");
if((int)me->query("armor/ring")<1)
if((int)me->query("armor/leftring")<1)
return notify_fail("longsee: 你的手上要佩戴 ring/leftring 類的物品喔.\n");
if(str=="-cast")
{
me->force_me("cast longsee");
return notify_fail("");
}
else if(str=="-allppl")
{
tmp=me->query("sex_name")+"對著手上的戒指喃喃唸出了咒語.\n"+
"戒指發出了微微的光芒,投影出了以下的景象:\n"+
"===========================================================\n";
tmps=users();
foreach(ppl in tmps)
{
if(!ppl || !interactive(ppl)) continue;
else if(!environment(ppl)) continue;
else if(wiz<1)
{
// 非 wiz 的人看不到 wiz
if(wizardp(ppl)) continue;
// 看不到大魔導士玩家
else if(ppl->query("adv_guild")=="magemaster") continue;
}
else if(!env=environment(ppl)) continue;
if(ppl->query_attackers())
tmp1=ppl->query("short")+NOR+MAG"[戰鬥中]"NOR;
else
tmp1=ppl->query("short")+NOR;
tmp+=tmp1+"\n"CYN"└"NOR+substr(substr(env->query("short"),"\n","")," ","")+NOR"\n";
}
tmp+="===========================================================\n";
me->more(explode(tmp,"\n"),1,1);
return notify_fail("";
}
else if(sscanf(str,"-%s %s",tmp,tmp2)==2)
{
switch(tmp)
{
case "cast":
me->force_me("cast longsee "+tmp2);
return notify_fail("");
break;
}
}
return notify_fail("longsee: 沒有這個語法喔.\n");
}
--
// _longsee.c
// laechan@sanc 2016/11/30
inherit DAEMON;
int cmd_longsee(string str,object me)
{
string tmp,tmp2;
object ppl,env;
mixed tmps;
int wiz;
if(!str || str=="")
return notify_fail(@LONG
遠見魔法(longsee)指令說明:
============================================================
longsee -cast 玩家id 相當於 cast longsee 玩家id
longsee -allppl 觀看線上所有非斷線玩家的情報
longsee -disapparate 數字 觀看消影術所記憶的地點情報
1.該指令的使用限制是:進階法師,手上並需佩戴「戒指類」防具
2.
============================================================
LONG
);
wiz=wizardp(me);
tmp=me->query("adv_guild");
if(wiz<1 &&
tmp!="magemaster" && tmp!="sage" && tmp!="alchemist")
return notify_fail("longsee: 這個指令只有進階法師可以使用喔.\n");
if((int)me->query("armor/ring")<1)
if((int)me->query("armor/leftring")<1)
return notify_fail("longsee: 你的手上要佩戴 ring/leftring 類的物品喔.\n");
if(str=="-cast")
{
me->force_me("cast longsee");
return notify_fail("");
}
else if(str=="-allppl")
{
tmp=me->query("sex_name")+"對著手上的戒指喃喃唸出了咒語.\n"+
"戒指發出了微微的光芒,投影出了以下的景象:\n"+
"===========================================================\n";
tmps=users();
foreach(ppl in tmps)
{
if(!ppl || !interactive(ppl)) continue;
else if(!environment(ppl)) continue;
else if(wiz<1)
{
// 非 wiz 的人看不到 wiz
if(wizardp(ppl)) continue;
// 看不到大魔導士玩家
else if(ppl->query("adv_guild")=="magemaster") continue;
}
else if(!env=environment(ppl)) continue;
if(ppl->query_attackers())
tmp1=ppl->query("short")+NOR+MAG"[戰鬥中]"NOR;
else
tmp1=ppl->query("short")+NOR;
tmp+=tmp1+"\n"CYN"└"NOR+substr(substr(env->query("short"),"\n","")," ","")+NOR"\n";
}
tmp+="===========================================================\n";
me->more(explode(tmp,"\n"),1,1);
return notify_fail("";
}
else if(sscanf(str,"-%s %s",tmp,tmp2)==2)
{
switch(tmp)
{
case "cast":
me->force_me("cast longsee "+tmp2);
return notify_fail("");
break;
}
}
return notify_fail("longsee: 沒有這個語法喔.\n");
}
--
Tags:
線上
All Comments
By Michael
at 2016-11-30T17:56
at 2016-11-30T17:56
By Lucy
at 2016-12-03T00:47
at 2016-12-03T00:47
By Erin
at 2016-12-07T07:20
at 2016-12-07T07:20
By Sarah
at 2016-12-07T11:57
at 2016-12-07T11:57
Related Posts
吸血鬼古城
By Ivy
at 2016-11-30T09:24
at 2016-11-30T09:24
關於一些新手可能會漏掉的知識
By Oscar
at 2016-11-30T04:16
at 2016-11-30T04:16
競技場(2-PICK)選牌原則
By James
at 2016-11-30T03:01
at 2016-11-30T03:01
競技場(2-PICK)選牌原則
By Vanessa
at 2016-11-30T01:03
at 2016-11-30T01:03
(轉)610勝上M臉龍心得
By Hamiltion
at 2016-11-30T00:11
at 2016-11-30T00:11