[wizs] 擊飛武器的程式段

看板mud_sanc (Sanctuary - 聖殿)作者 (小太保)時間15年前 (2010/07/24 17:29), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
int special_fun(object mob,object ppl) { object obs; if(obs=ppl->query("weapon1")) { if((int)ppl->query("stat/str")<1600+random(1200)) { ppl->delete("weapon1"); obs->move_to(environment(ppl)); ppl->set_temp("time_record/wear_remove",time()+15); tell_object(ppl,HIW"你的武器被擊飛出去了喔~~\n"NOR); } } 不能這樣寫。 比較簡易的寫法如下.. "/cmds/std/_remove"->try_remove_one(obs,1); // 0 的話會看到脫武器訊息 highelf 及 wizs 們可參考。~highelf/rs/mob/rsk.c 已更新, 備份檔為 rsk.20100724 Belldandy. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 編輯: laechan 來自: 111.253.168.70 (07/24 17:31)
文章代碼(AID): #1CIh9Vdt (mud_sanc)
文章代碼(AID): #1CIh9Vdt (mud_sanc)