脚本自动化的一点想法

来源:互联网 发布:淘宝买家能贷款吗 编辑:程序博客网 时间:2024/06/05 23:47
 "" "" scrollreturn1 fumodianBook
fumodianBook fumodianMapID

"" "" skillreturn1 backSkill
backskill LongJieMapID

script script move1 (FLY-WALK)
followpath startFly followpath

"" "" throughGate1 ThroughGateTID
throughGate

"" "" transport2 npctid destid
transport

"" "" supplyitem1 npctid
supplyItem

 

在实践中改进版:

 

SCROLL        Book
WALK             Buy.supply
SupplyItem    tNPC
WALK             walk.supply
Transport       Airport
SupplyItem    NPC
SKILL              Skill

 

改进版:每个特定动作带上参数。而原来是考虑的角度在于世界边的概念。如:script script move1 (FLY-WALK)中的script script 分表代表边,Fly代表连接边的动作。"" "" transport2 npctid destid 中边为空,是因为我不知道传送飞行前或飞行的地点,只知道执行这个动作,之后一直觉得有些不自然。后来想到为何不将边的概念抛弃,直接思考
执行动作,然后尝试将每条边拆分成动作执行,如何执行就是后面带的参数。这样改进下来,方觉得自然。

原创粉丝点击