项目

一般

简介

拜师出师脚本 » 历史记录 » 修订 3

修订 2 (chenjun, 2022-05-25 18:35) → 修订 3/5 (chenjun, 2022-05-25 18:37)

h4. _*%{color:green}拜师出师脚本%*_ 


 标签:命令定义|unmaster requestUnmaster ok 

 - 
 - 

 

 h4. *%{color:deepskyblue}特戒引擎脚本示例:%* 

 - 
 - 



 bq.[@main] bq. [@main] 
 #say 
 <我想拜师/@master> \ \ 
 <我想出师/@unmaster> \ \ 
 <离开/@exit> 
 &nbsp; 
 &nbsp; 
 &nbsp; 
 [@master] 
 #say 
 想拜师呀,你要拜的师傅来了没有? \ \ 
 输入师傅的名字,开始拜师。 \ \ 
 <输入师傅名字/@@InputStringMaster> \ \  
 <我再想想/@exit> \ \ 
 <返回/@main> 
 &nbsp; 
 &nbsp; 
 [@InputStringMaster] 
 #if 
 %{color:lightGrey};检测玩家输入的内容是否在本服务器存在匹配的角色名% 
 checkMasterName 
 #act 
 goto @agree 
 #elseact 
 messageBox 角色名不存在 
 &nbsp; 
 &nbsp; 
 [@agree] 
 #if 
 %{color:lightGrey};检测准师傅(名字变量<$sMasterName>)是不是已经是某人的师傅了% 
 checkIsMaster 
 #say 
 TA已经是别人的师傅了!!! \ \ 
 <返回/@main> 
 #act 
 break 
 &nbsp; 
 #if 
 %{color:lightGrey};检测准徒弟自身是不是已经拜师了% 
 checkMaster 
 #say 
 你都已经有师傅了,怎么还拜师!!! \ \ 
 <返回/@main> 
 #act  
 break 
 &nbsp; 
 #if 
 %{color:lightGrey};检测准师傅(名字变量<$sMasterName>)当前是不是别人的徒弟% 
 checkPoseMaster 
 #say 
 你找了个什么人做师傅,怎么现在还是别人的徒弟?\ \ 
 <返回/@main> 
 #act 
 break 
 &nbsp; 
 #if 
 %{color:lightGrey};检测准师傅与准徒弟的距离是否在指定范围内,且面对面% 
 checkPoseDir <$sMasterName> 3 
 #elsesay 
 师傅怎么没在你身边啊,都站得离我近一点。\ \ 
 <返回/@main> 
 #elseact 
 break 
 &nbsp; 
 #if 
 checkLevel 160 
 #say 
 你都超过160级了还要找师傅?\ \ 
 <返回/@main> 
 #act 
 break 
 &nbsp; 
 #if 
 %{color:lightGrey};检测准师傅的等级% 
 checkPoseLevel <$sMasterName> > 200  
 #elsesay 
 你找个什么师傅呀,等级还不到200级?\ \ 
 <返回/@main> 
 #elseact 
 break 
 &nbsp; 
 #if 
 #act 
 %{color:lightGrey};执行后徒弟自身执行@StartGetMaster,师傅角色执行@StartMaster% 
 master 
 &nbsp; 
 &nbsp; 
 [@StartGetMaster] 
 #say 
 拜师仪式正式开始。\ \ 
 你是否确认拜师?\ \ 
 <确认/@RequestMaster> 
 &nbsp; 
 &nbsp; 
 [@StartMaster] 
 #say 
 拜师仪式正式开始。\ \ 
 对方已经向你提出拜师请求。\ \ 
 &nbsp; 
 &nbsp; 
 [@RequestMaster] 
 #if  
 checkitem 盟重传送石 1 
 #elsesay 
 你都没信物,怎么拜呀!!!\ \ 
 <返回/@main> 
 #elseact 
 break 
 &nbsp; 
 #if 
 #act 
 take 盟重传送石 1 
 %{color:lightGrey};执行后徒弟自身执行@WateMaster,师傅角色执行@RevMaster% 
 master requestmaster 
 &nbsp; 
 &nbsp; 
 [@WateMaster] 
 #say 
 你已向对方请求拜师,请耐心等待对方的答复。 
 &nbsp; 
 &nbsp; 
 [@RevMaster] 
 #say 
 对方想拜你为师,你是否想收此人为徒? \ \ 
 <同意/@ResposeMaster> \ \ 
 <不同意/@ResposeMasterFail> 
 &nbsp; 
 &nbsp; 
 [@ResposeMaster] 
 #if 
 #act 
 %{color:lightGrey};执行后拜师成功,师傅自身和徒弟角色均执行@EndMaster% 
 master responseMaster ok 
 &nbsp; 
 &nbsp; 
 [@ResposeMasterFail] 
 #if 
 #act 
 %{color:lightGrey};执行后拜师失败,师傅自身和徒弟角色均执行@EndMasterFail% 
 master responseMaster fail 
 &nbsp; 
 &nbsp; 
 [@EndMaster] 
 #say 
 拜师成功,你们俩已经是师徒关系了。\ \ 
 <关闭/@exit> 
 &nbsp; 
 &nbsp; 
 [@EndMasterFail] 
 #say 
 拜师失败,拜师请求被拒。\ \ 
 <关闭/@exit> 
 &nbsp; 
 &nbsp; 
 &nbsp; 
 [@unmaster] 
 #if 
 %{color:lightGrey};检测自身是不是师傅或徒弟% 
 haveMaster  
 #act 
 %{color:lightGrey};如果触发者是师傅,则师傅自身执行@UnIsMaster% 
 %{color:lightGrey};如果触发者是徒弟,且师傅与自身距离大于3,则徒弟自身执行@UnMasterCheckDir% 
 %{color:lightGrey};如果触发者是徒弟,且师傅与自身距离小于等于3,则徒弟自身执行@StartUnMaster,师傅执行@WateUnMaster% 
 unmaster 
 #elsesay 
 你都没师傅,跑来做什么?? \ \ 
 <返回/@main> 
 &nbsp; 
 &nbsp; 
 [@UnIsMaster] 
 #say 
 必须由徒弟提起出师请求!!! \ \ 
 <返回/@main> 
 &nbsp; 
 &nbsp; 
 [@UnMasterCheckDir] 
 #say 
 按正常出师步骤,必须俩人一起过来\ 
 如果师傅来不了你只能选择强行出师了。 \ \ 
 <我要强行出师/@fUnMaster> \ \ 
 <返回/@main> 
 &nbsp; 
 &nbsp; 
 %{color:lightGrey};开始程序后,徒弟显示的信息% 
 [@StartUnMaster] 
 #say 
 出师仪式现在开始!!! \ \ 
 是否确定真的要脱离师徒关系? \ \ 
 <确定/@RequestUnMaster> 
 &nbsp; 
 &nbsp; 
 [@WateUnMaster] 
 #say 
 出师仪式现在开始!!! 
 &nbsp; 
 &nbsp; 
 %{color:lightGrey};徒弟发出请求% 
 [@RequestUnMaster] 
 #if 
 haveMaster 
 #act 
 %{color:lightGrey};执行后徒弟自身执行@WateUnMasterOne,师傅角色执行@RevUnMaster% 
 unmaster requestUnmaster  
 &nbsp; 
 &nbsp; 
 %{color:lightGrey};徒弟请求后显示的信息% 
 [@WateUnMasterOne] 
 #say  
 你已向对方发出请求,请耐心等待对方的答复。 
 &nbsp; 
 &nbsp; 
 %{color:lightGrey};请求后师傅显示的信息% 
 [@RevUnMaster] 
 #say 
 对方向你请求,你是否答应? \ \ 
 <我愿意/@RequestUnMasterOk> \ \ 
 <返回/@main> 
 &nbsp; 
 &nbsp; 
 [@RequestUnMasterOk] 
 #if 
 havemaster 
 #act 
 %{color:lightGrey};执行后出师成功,师傅和徒弟均执行@UnMasterEnd% 
 unmaster requestUnmaster ok  
 &nbsp; 
 &nbsp; 
 %{color:lightGrey};强行出师% 
 [@fUnMaster] 
 #if 
 checkitem 随机传送石 1 
 havemaster 
 #act 
 take 随机传送石 1 
 %{color:lightGrey};执行后徒弟强行出师成功,徒弟执行@UnMasterEnd% 
 unmaster requestUnmaster force  
 #elsesay 
 强行出师要花费一个随机传送石,背包中未发现 \ \ 
 <确定/@exit> 
 &nbsp; 
 &nbsp; 
 %{color:lightGrey};出师完成后的提示信息% 
 [@unMasterEnd] 
 #say 
 出师成功