SAI实例研究(1-2)

17 篇文章 0 订阅
6 篇文章 0 订阅

实例1

creature.id = 15937(smart_script.entryorguid)的SAI设置:

  • 第1条(id = 0) 当 creature 进入战斗后(event_type = 0),creature 对当前目标(target_type = 2)周期性施放Chain Lightning法术(action_type = 11,SpellID = 12058)
  • 第2条(id = 1) 当 creature 进入战斗后(event_type = 0),creature 对当前目标(target_type = 2)周期性施放Frost Shock法术(action_type = 11,SpellID = 21030)
  • 第3条(id = 2) 当 creature 的生命值百分比处于0 - 50%时(event_type = 2),creature 对自身(target_type = 1)周期性施放Healing Wave法术(action_type = 11,SpellID = 12491)
  • 第4条(id = 3) 当 creature 死亡时(event_type = 6),对 entry = 15668 的 creature 触发 Set Data(action_type = 45
  • 第5条(id = 4) 第4条触发后(event_type = 61),对 entry = 15669 的 creature 触发 Set Data(action_type = 45

creature.id = 15668(smart_script.entryorguid)的SAI设置:

  • 第1条(id = 0) 当 creature Data Set 时(event_type = 38),creature 对自身(target_type = 1)施放Fear法术(action_type = 11,SpellID = 26661)
  • 第2条(id = 1) 当 creature 的生命值百分比处于0 -15%时(event_type = 2),creature 会逃跑并寻求同伴协助(action_type = 25)

creature.id = 15669(smart_script.entryorguid)的SAI设置:

  • 第1条(id = 0) 当同伴生命值百分比处于0-50%时(event_type = 74),creature 对同伴(target_type = 7)周期性施放Flash Heal法术(action_type = 11,SpellID = 17137)
  • 第2条(id = 1) 当 creature Data Set 时(event_type = 38),creature 对自身(target_type = 1)施放Fear法术(action_type = 11,SpellID = 26661)
  • 第3条(id = 2) 当 creature 的生命值百分比处于0 -15%时(event_type = 2),creature 会逃跑并寻求同伴协助(action_type = 25)

实例2

creature.id = 15402(smart_script.entryorguid)的SAI设置:

  • 共分为0和1两个事件阶段
    • 第0阶段:
      • 第1条(id = 0) 当角色获得任务(QuestID = 8487,被腐蚀的土地)奖励时(event_type = 20),creature 对自身(target_type = 1)触发时间线列表动作( action_type = 80,smart_script.entryorguid = 1540200)
      • 第2条(id = 1) 当角色接到任务(QuestID = 8488,出人意料的结果)时(event_type = 19),将接到任务的队伍(target_type = 16)作为目标列表储存到变量1中(action_type = 64
      • 第3条(id = 2) 在第2条触发后(event_type = 61),creature 对自身(target_type = 1)触发时间线列表动作( action_type = 80,smart_script.entryorguid = 1540201)
      • 第4条(id = 3) 当 creature 进入战斗后(event_type = 0),creature 对当前目标(target_type = 2)周期性施放Fireball法术(action_type = 11,SpellID = 20811)
      • 第9条(id = 8) 当事件刷新时(event_type = 11), creature 对自身设置(target_type = 1)免疫npc攻击伤害(action_type = 145)
    • 第1阶段:
      • 5条(id = 4) 当 creature 死亡时(event_type = 6),第2条储存的目标列表(target_type = 12)中的角色的任务均失败(action_type = 6
      • 6条(id = 5) 当 COUNTER_SET 时(event_type = 77),第2条储存的目标列表(target_type = 12)中的角色的任务均完成(action_type = 15
      • 7条(id = 6) 在第6条触发后(event_type = 61),creature 对自身(target_type = 1)触发 SET_COUNTERaction_type = 63
      • 8条(id = 7) 在第7条触发后(event_type = 61),creature 对自身(target_type = 1)触发时间线列表动作( action_type = 80,smart_script.entryorguid = 1540202)

(标黄部分实际表现为:角色击杀召唤出的怪之后任务完成,具体用法待核实)

creature.id = 15402,entryorguid = 1540200 的时间线列表动作有3条

  • 第1条(id = 0) creature 对自身设置(target_type = 1)npcflag = 0(action_type = 81)
  • 第2条(id = 1) 当 entryorguid = 1540200 的时间线列表动作触发的10秒后,creature 对自身(target_type = 1)触发说话(action_type = 1)
  • 第3条(id = 2) creature 对自身设置(target_type = 1)npcflag = 2(action_type = 81)
    • npcflag = 2 时,creature 将作为任务给予者,任务未完成时,客户端将看到黄色感叹号(creature_queststarter 表必须有数据)

creature.id = 15402,entryorguid = 1540201 的时间线列表动作有5条

  • 第1条(id = 0) creature 对自身设置(target_type = 1)npcflag = 0(action_type = 81)
  • 第2条(id = 1) creature 对自身设置(target_type = 1)faction = 232(action_type = 2)
  • 第3条(id = 2) creature 对自身设置(target_type = 1)不能免疫npc攻击伤害(action_type = 145)
  • 第4条(id = 3) creature 对自身设置(target_type = 1)事件阶段为1阶段(action_type = 22)
  • 第5条(id = 4) creature 对自身(target_type = 1)召唤生物组(action_type = 2)
    • action_param1 对应 creature_summon_groups.groupID 的值
    • creature_summon_groups 字段介绍看:这里

creature.id = 15402,entryorguid = 1540202 的时间线列表动作有4条

  • 第1条(id = 0) creature 对自身设置(target_type = 1)npcflag = 2(action_type = 81)
  • 第2条(id = 1) creature 对自身设置(target_type = 1)faction = 1604(action_type = 2)
  • 第3条(id = 2) creature 对自身设置(target_type = 1)免疫npc攻击伤害(action_type = 145)
  • 第4条(id = 3) creature 对自身设置(target_type = 1)事件阶段为0阶段(action_type = 22)

参考阅读:

SAI专栏

  • 15
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值