[wizs] 副本 (多層式副本)

看板mud_sanc (Sanctuary - 聖殿)作者 (揮淚斬馬雲)時間7年前 (2018/05/13 22:16), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
// 簡單副本 // /std/new_ob/instance/laechan/006.c #include "../instance.h" inherit INSTANCE_OB; void create() { string tmp; int i; ::create(); seteuid(getuid(this_object())); set("pre_clean",1); instance_cd_times=INSTANCE_CD_TIMES; // 設定區開始 // 理論上多張地圖可畫在同一 map2data 中, 重點在新增出口串接 // 同一副本下模擬其為多個副本的適當做法應該就是這樣, 結案 instance_map2data=@LONG 501 | 502 | 503 LONG ; instance_names="測試串接副本1"; instance_comm=(["xxxxx":1]); instance_data=([ "503":([ "instance_check":1, ]), ]); instance_paths="/u/l/laechan/area/felid/room/"; // 副本實際區域目錄 instance_ob=base_name(this_object()); // 固定 // 副本區域房間範圍, 第一個 room (如083) 固定為起點 instance_files=({ "501","502","503", }); // 底下固定 foreach(tmp in instance_files) instance_files[i++]=instance_paths+tmp; // 怪物資料 files 必備, 其它就是 short, long, ... 等可自訂 instance_mob_datas=([ "corps1":(["files":"/u/l/laechan/area/whitetile/mob/corps1", "level":150, ]), ]); // 副本各房間生怪資料, 所生的怪在 instance_mob_datas 都要有定義 instance_mobs=([ "5":([ "501":({"corps1","corps1"}), "086":({"corps1","corps1"}), "087":({"corps1","corps1"}), ]), ]); // 設定區結束 } int instance_check(string files,object room) { int flags,t; switch(files) { case "503": flags=(int)room->query("instance_flags"); t=time(); switch(flags) { case 0: // 工兵都被消滅時 if(!present("felid corps",room)) room->set("instance_flags",1); break; default: // 這裡主要實驗串接其它副本, how? // 1.用出口?(如何設 pre_exit_func? 要用 next 這樣的確定出口?) // 2.呼叫 npc 出來處理?(較簡單) // 3.直接處理不等待?(即滿足條件馬上就串) break; } break; } return 1; } [編輯中...] -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.117.106.224 ※ 文章網址: https://www.ptt.cc/bbs/mud_sanc/M.1526220988.A.C1D.html
文章代碼(AID): #1Q-4YymT (mud_sanc)
文章代碼(AID): #1Q-4YymT (mud_sanc)