[法師] 暫定契約指令檔 (隨時更新)
看板mud_sanc (Sanctuary - 聖殿)作者laechan (小太保)時間16年前 (2010/03/01 11:40)推噓7(7推 0噓 12→)留言19則, 5人參與討論串1/2 (看更多)
// _tempbond.c
// Laechan@Sanc add in 2010/03/01
inherit DAEMON;
int cmd_tempbond(string str,object me)
{
string sk_name="tempbond",tmp1,tmp2,names;
object ppl,env;
mixed tempbond;
// wiz 可以略過底下限制
if(!wizardp(me))
{
if((string)me->query("pri_guild")!="mage")
return notify_fail("tempbond: 這個指令只有主職的魔法師才可以使用喔.\n");
if(me->query("skill/"+sk_name)<100)
return notify_fail("tempbond: 你的技能必須練到 100 才能使用這個指令喔.\n");
}
if(str=="back")
{
tempbond=(mixed)me->query("record_data/tempbond");
if(sizeof(tempbond)<1)
return notify_fail("tempbond: 你還沒有與任何人訂立暫定契約喔.\n");
if(!ppl=find_player(tempbond[0]))
return notify_fail("tempbond: 你的契約主人目前處於離線狀態喔.\n");
if(!env=environment(ppl))
return notify_fail("tempbond: 你的契約主人目前處於虛幻時空喔.\n");
if(env->query("no_recall") || env->query("no_return"))
return notify_fail("tempbond: 你的契約主人目前處於你無法前往的地方喔.\n");
// 即使是隨從的主動 back 也需設定使用後 delay time
me->move(env,"SNEAK");
// 加上移動訊息
}
if(sscanf(str,"-%s %s",tmp1,tmp2)!=2)
return notify_fail("tempbond: 請參考 help tempbond 指令說明喔.\n");
switch(tmp1)
{
// 訂立暫定契約
case "order":
// 一定要加的限制,不然會造成A與B互訂契約的情況
if(ppl->query("record_data/tempbond"))
return notify_fail("tempbond: 你已經與他人建立了暫定契約關係了喔.\n");
if(!ppl=present(tmp2,me))
return notify_fail("tempbond: "+tmp2+" 不在這裡喔.\n");
// 玩家無法與 wiz 訂立暫定契約(訊息顯示同上, 不管該 wiz 是否隱形)
if(wizardp(ppl) && !wizardp(me))
return notify_fail("tempbond: "+tmp2+" 不在這裡喔.\n");
if(!userp(ppl))
return notify_fail("tempbond: "+tmp2+" 不是玩家喔.\n");
// 暫時做的限制,避免初期的混亂
if(!ppl->query("pri_guild") || (string)ppl->query("pri_guild")=="mage")
return notify_fail("tempbond: "+tmp2+" 的主職不能是冒險者以及法師喔.\n");
// 讀取 tempbond 資料串 ({"誰跟他訂契約",目前等級,目前經驗值,..}) 前三確定
tempbond=(mixed)ppl->query("record_data/tempbond");
// 原則上不主動透露該玩家與哪位魔法師訂立暫定契約
if(sizeof(tempbond)>0)
return notify_fail("tempbond: "+tmp2+" 已經與別人訂立暫定契約了。\n");
names=me->query("name");
if(ppl->query_temp("tempbond_order/"+names))
return notify_fail("tempbond: 你已經對 "+tmp2+" 送出訂立契約的要求囉.\n");
// 暫時不設立其它的訂契約條件(可能需要第三人在場、或者需要特殊道具、...)
// 我個人傾向兩種條件都要成立,特殊道具可經由打區域拿到並可屯積、拍賣
tell_object(ppl,me->query("short")+"想與你訂下暫定契約。\n"+
"若你同意的話請下 tempbond -agree "+names+" 指令.\n");
ppl->set_temp("tempbond_order/"+names,1);
return notify_fail("tempbond: 你對 "+tmp2+" 送出了訂立暫定契約的要求.\n"+
" 請等待他的同意吧!!\n");
break;
case "call":
if(!ppl=find_player(tmp2))
return notify_fail("tempbond: "+tmp2+" 現在是離線狀態喔.\n");
if(wizardp(ppl) && !wizardp(me))
return notify_fail("tempbond: "+tmp2+" 現在是離線狀態喔.\n");
tempbond=(mixed)ppl->query("record_data/tempbond");
if(sizeof(tempbond)<1)
return notify_fail("tempbond: "+tmp2+" 跟你沒有暫定契約關係喔.\n");
names=me->query("name");
if((string)tempbond[0]!=names)
return notify_fail("tempbond: "+tmp2+" 跟你沒有暫定契約關係喔.\n");
if(!env=environment(ppl))
return notify_fail("tempbond: "+tmp2+" 現在的狀態無法被你召喚喔.\n");
if(env==environment(me))
return notify_fail("tempbond: "+tmp2+" 已經在這裡了喔.\n");
env=environment(me);
if(env->query("no_recall") || env->query("no_return"))
return notify_fail("tempbond: 你現在位於無法召喚 "+tmp2+" 的地方喔.\n");
// 這裡必須再加上其它的限制
// 召喚玩家之後,再下一次的召喚時間限制必須做
ppl->move_player(env);
// 加上雙方及房間其它玩家都能看到的訊息
break;
case "agree":
// 讀取 tempbond 資料串 ({"誰跟他訂契約",目前等級,目前經驗值,..}) 前三確定
tempbond=(mixed)me->query("record_data/tempbond");
// 原則上不主動透露該玩家與哪位魔法師訂立暫定契約
if(sizeof(tempbond)>0)
return notify_fail("tempbond: 你已經有與別人訂立暫定契約了。\n");
if(!me->query_temp("tempbond_agree"))
return notify_fail("tempbond: 你目前沒有需要同意訂立暫定契約的對象喔.\n");
if(!ppl=present(tmp2,me))
return notify_fail("tempbond: "+tmp2+" 不在這裡喔.\n");
if(!userp(ppl))
return notify_fail("tempbond: "+tmp2+" 不是玩家喔.\n");
if(!me->query_temp("tempbond_agree/"+tmp2))
return notify_fail("tempbond: "+tmp2+" 並沒有想要與你訂立暫定契約喔.\n");
// 底下契約就會成立
break;
==
一、quest 或 plain/hlead 若有看到,我傾向讓訂立契約的道具
名稱為「契約之符」,說明敘述與暫定契約有關,然後可在
你們的區域解任務或打敗某隻怪物拿到。
拿到的難度由你們決定,我個人是希望很難拿到。另外如果
highelf 你覺得你的區域也有難以闖關的任務or難以打敗的
怪物,也可以提出契約之符道具的擺放權。
(因為我的區域完全沒有這類的特質)
然後不認主,純物品,可以被存進家or家族。
二、我傾向有第三人在場,該人為魔法師,負責以契約之符搭配魔
法陣畫出暫定契約魔法陣(增加魔法陣的適用範圍),該魔法陣
有時間性,時間到就消失,訂立契約的雙方必須在時間內完成
契約,不然就要再來一次(增加契約之符消耗可能)。
三、我傾向由「二轉法師」才擁有施展暫定契約魔法陣的能力,初
期的二轉全部個案處理─由 wiz 協助二轉。
四、暫定契約會限制在特定地點(避免一些 bug)。
五、暫定契約儲存資料可能還包括卡片相關資料等,以第四欄位起
做為儲存區。
六、暫定契約初期開放能力
1)加強受契約者的戰鬥能力
2)spiriten -clone tempbond 召喚契約附送道具
3)tempbond -summon 及 tempbond -reback 從者召喚返回功能
下午將繼續撰寫該技能檔案。
Laechan
--
※ 發信站: 批踢踢實業坊(ptt.cc)
※ 編輯: laechan 來自: 61.225.162.84 (03/01 14:30)
→
03/01 16:42, , 1F
03/01 16:42, 1F
→
03/01 16:44, , 2F
03/01 16:44, 2F
→
03/01 16:47, , 3F
03/01 16:47, 3F
※ 編輯: laechan 來自: 61.225.162.84 (03/01 16:53)
推
03/01 20:58, , 4F
03/01 20:58, 4F
→
03/01 21:00, , 5F
03/01 21:00, 5F
推
03/01 21:02, , 6F
03/01 21:02, 6F
→
03/01 21:56, , 7F
03/01 21:56, 7F
coding 不下去了...睡覺 ^_^ 明天繼續~
※ 編輯: laechan 來自: 119.15.246.19 (03/01 22:50)
推
03/02 08:01, , 8F
03/02 08:01, 8F
→
03/02 08:04, , 9F
03/02 08:04, 9F
推
03/02 10:37, , 10F
03/02 10:37, 10F
※ 編輯: laechan 來自: 61.225.161.85 (03/02 13:59)
→
03/02 14:01, , 11F
03/02 14:01, 11F
→
03/02 14:01, , 12F
03/02 14:01, 12F
推
03/02 18:19, , 13F
03/02 18:19, 13F
→
03/02 18:21, , 14F
03/02 18:21, 14F
我會先寫提升隨從基礎能力的部份,這個若寫好 tempbond
就可以先開放,其它沒有時間壓力(也並非只有我能寫),
重點是讓大家能先享受該技能的重點效果及好處。
所以沒意外的話接著會寫 tempbond -clone [契約道具id]
這是最複雜的,因為契約道具有武器、有防具,甚至道具,
在原作中隨從無法自己選擇武器,聖殿可行的做法是...
一、闖區域拿物品,再依該物品「登錄」為隨從道具。例如
「破魔石」的相對映道具即為破魔之劍。(這是舉例)
二、依照隨從的主職業,「隨機」產生對映物品。例如劍類
隨從道具有三把,隨機給予一把。
我個人原先規劃是採二的方案,但目前傾向一的方案,因為
與原作不同比較有趣,再者讓玩家選擇自己想要的道具也不
錯。
(不過這也確定了[卡片]的設計也會與原作不同)
※ 編輯: laechan 來自: 119.15.246.19 (03/02 20:15)
推
03/03 09:05, , 15F
03/03 09:05, 15F
→
03/03 09:29, , 16F
03/03 09:29, 16F
→
03/03 09:29, , 17F
03/03 09:29, 17F
→
03/03 09:30, , 18F
03/03 09:30, 18F
推
03/03 11:54, , 19F
03/03 11:54, 19F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
7
19
mud_sanc 近期熱門文章
PTT遊戲區 即時熱門文章
21
49