[wizs] _longsee.c

看板mud_sanc (Sanctuary - 聖殿)作者 (揮淚斬馬雲)時間9年前 (2016/11/30 09:49), 9年前編輯推噓0(005)
留言5則, 1人參與, 最新討論串1/1
編輯中 // _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"); } -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.223.203.12 ※ 文章網址: https://www.ptt.cc/bbs/mud_sanc/M.1480470574.A.0F2.html ※ 編輯: laechan (61.223.203.12), 11/30/2016 09:50:07 ※ 編輯: laechan (61.223.203.12), 11/30/2016 11:57:04

11/30 18:32, , 1F
明天再補完剩下的內容
11/30 18:32, 1F

11/30 23:05, , 2F
-allppl 可能改 -all
11/30 23:05, 2F

11/30 23:06, , 3F
應該會增加 longsee -npc 看所有 npc
11/30 23:06, 3F

11/30 23:06, , 4F
longsee -disapparate 這語法會縮短
11/30 23:06, 4F

11/30 23:07, , 5F
目標則是 longsee -area 看能否寫出來
11/30 23:07, 5F
文章代碼(AID): #1OFZ0k3o (mud_sanc)
文章代碼(AID): #1OFZ0k3o (mud_sanc)