|
楼主 |
发表于 2015-1-31 19:09:43
|
显示全部楼层
搞定,百度了下,原因找到,原文这样说:等于(=)判断好多时候不好用, 比如说碰到 中文, 碰到 -
通常我是一律用 %ismember 函数来判断, 或者 %pos 函数
%pos(p,s) return the position of pattern p in string s. Return 0/false if not found
%ismember(s,list) return true if s is a member of the given string list
上面的可以改写为
#if (%pos(tianzi-jian,@ag)) {ap=sword};#if (%pos(liumai-shenjian,@ag)) {ap=unarmed}
或者
#if (%ismember(@ag,tianzi-jian|taiji-jian|wudang-jian)) {ap=sword};#if (%ismember(@agliumai-shenjian|taiji-quan)) {ap=unarmed}
list列表用 | 隔开
那么我的句型改成
#if %pos(马蹄,@mulu) {#math page @zhangye-1+4};
#if %pos(说剑,@mulu) {#math page @zhangye-1+99};
#if %pos(盗跖,@mulu) {#math page @zhangye-1+47};
#if %pos(胠箧,@mulu) {#math page @zhangye-1+12};
#if %pos(在宥,@mulu) {#math page @zhangye-1+31};
#if %pos(天地,@mulu) {#math page @zhangye-1+66};
#if %pos(天道,@mulu) {#math page @zhangye-1+116};
#if %pos(大宗师,@mulu) {#math page @zhangye-1+77};
#if %pos(天运,@mulu) {#math page @zhangye-1+151};
#if %pos(缮性,@mulu) {#math page @zhangye-1+201};
#if %pos(至乐,@mulu) {#math page @zhangye-1+51};
#if %pos(秋水,@mulu) {#math page @zhangye-1+1};
#if %pos(达生,@mulu) {#math page @zhangye-1+69};
#if %pos(山木,@mulu) {#math page @zhangye-1+107};
#if %pos(田子方,@mulu) {#math page @zhangye-1+143};
#if %pos(徐无鬼,@mulu) {#math page @zhangye-1+42};
#if %pos(则阳,@mulu) {#math page @zhangye-1+98};
#if %pos(外物,@mulu) {#math page @zhangye-1+141};
#if %pos(寓言,@mulu) {#math page @zhangye-1+168};
#if %pos(让王,@mulu) {#math page @zhangye-1+1};
#if %pos(渔父,@mulu) {#math page @zhangye-1+114};
#if %pos(天下,@mulu) {#math page @zhangye-1+165};
#if %pos(列御寇,@mulu) {#math page @zhangye-1+139};
#if %pos(逍遥游,@mulu) {#math page @zhangye-1+1};
#if %pos(齐物论,@mulu) {#math page @zhangye-1+21};
#if %pos(养生主,@mulu) {#math page @zhangye-1+69};
#if %pos(人间世,@mulu) {#math page @zhangye-1+1};
#if %pos(德充符,@mulu) {#math page @zhangye-1+46};
#if %pos(应帝王,@mulu) {#math page @zhangye-1+124}
就彻底解决问题,高手还是多 |
|