查看: 681|回复: 12

[问题求助] SAI设置BOSS死亡后,给附近玩家发放物品,为什么不成功啊!

[复制链接]

95

时沙

0

精华

1

主题

声望: 106   虚弱: 0

Lv.2(潜行者)

 楼主| 发表于 2025-6-2 11:44:13 | 显示全部楼层 |阅读模式
10DKP
entryorguid        source_type        id        link        event_type        event_phase_mask        event_chance        event_flags        event_param1        event_param2        event_param3        event_param4        action_type        action_param1        action_param2        action_param3        action_param4        action_param5        action_param6        target_type        target_param1        target_param2        target_param3        target_x        target_y        target_z        target_o        comment
148888        0        0        0        6        0        100        0        0        0        0        0        56        100111        1        0        0        0        0        24        0        0        0        0        0        0        0        BOSS死亡获得ID100111物品1个
这是我写的SAI,目标类型24是全部仇恨列表,21最近玩家,我都试了还是不行,求大佬指导一下小白。

456

时沙

0

精华

13

主题

声望: 1673   虚弱: 0

Lv.4(锻造者)

发表于 2025-6-3 07:24:59 | 显示全部楼层
boss死了尸体还在吗?
回复

使用道具 举报

171

时沙

0

精华

3

主题

声望: 660   虚弱: 0

Lv.4(锻造者)

灵蛇献瑞(尚美制作)炉石

发表于 2025-6-3 13:39:51 | 显示全部楼层
(148888, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 56, 100111, 1, 0, 0, 0, 0, 18, 50, 0, 0, 0, 0, 0, 0, "BOSS死亡: 50码内参与战斗的玩家获得物品");
用这段SAI试试,若仍不生效,请检查smart_scripts表引擎是否为InnoDB(MyISAM可能导致脚本不触发)
回复

使用道具 举报

95

时沙

0

精华

1

主题

声望: 106   虚弱: 0

Lv.2(潜行者)

 楼主| 发表于 2025-6-3 21:45:17 | 显示全部楼层
wang0518 发表于 2025-6-3 07:24
boss死了尸体还在吗?

尸体还在的
回复

使用道具 举报

95

时沙

0

精华

1

主题

声望: 106   虚弱: 0

Lv.2(潜行者)

 楼主| 发表于 2025-6-3 21:49:58 | 显示全部楼层
本帖最后由 热爱学习者 于 2025-6-3 21:52 编辑
小雪糕她爸 发表于 2025-6-3 13:39
(148888, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 56, 100111, 1, 0, 0, 0, 0, 18, 50, 0, 0, 0, 0, 0, 0, "BO ...

之前是MyISAM,试了不行,然后我改成InnoDB,试也不行。 改完需要重启红蓝端吗?.reload smart_scripts 我是热更新的
回复

使用道具 举报

429

时沙

0

精华

6

主题

声望: 363   虚弱: 0

Lv.4(锻造者)

发表于 2025-6-5 21:19:06 | 显示全部楼层
你是不是没有给生物增加asi啊  默认是空的

  1. -- Creature 148888 smart ai
  2. SET @ENTRY := 148888;
  3. UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
  4. DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
  5. INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
  6. (@ENTRY, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 56, 100111, 1, 0, 0, 0, 0, 18, 50, 0, 0, 0, 0, 0, 0, 'On death - Players in 50 yards: Add item 100111');
  7. DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = @ENTRY AND `SourceId` = 0;
复制代码
回复

使用道具 举报

429

时沙

0

精华

6

主题

声望: 363   虚弱: 0

Lv.4(锻造者)

发表于 2025-6-5 21:19:22 | 显示全部楼层
本帖最后由 fangshun2004 于 2025-6-5 21:41 编辑

我查询了一下 生物:148888和物品:100111 游戏里面默认不存在,应该是你自己添加的吧。可能自定义物品或者自定义生物模板 不对,先改个游戏里面存在生物和物品修改一下试试  下面这个是 丧钟镇悲惨食尸鬼的asi    物品是24格包包  我自己测试是工作的

  1. -- Wretched Ghoul smart ai
  2. SET @ENTRY := 1502;
  3. UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
  4. DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
  5. INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
  6. (@ENTRY, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 56, 51809, 1, 0, 0, 0, 0, 18, 50, 0, 0, 0, 0, 0, 0, 'On death - Players in 50 yards: Add item Portable Hole (51809)');
  7. DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = @ENTRY AND `SourceId` = 0;
复制代码


回复

使用道具 举报

95

时沙

0

精华

1

主题

声望: 106   虚弱: 0

Lv.2(潜行者)

 楼主| 发表于 2025-6-6 10:44:58 | 显示全部楼层
fangshun2004 发表于 2025-6-5 21:19
我查询了一下 生物:148888和物品:100111 游戏里面默认不存在,应该是你自己添加的吧。可能自定义物品或者自 ...

我这个还是不行,我这是548版本,因为版本的问题吗?
回复

使用道具 举报

1075

时沙

0

精华

71

主题

声望: 6854   虚弱: 0

Lv.6(觉醒者)

祥龙贺岁(尚美制作)信仰战今天也只能打恢复的增强萨

发表于 2025-6-6 17:48:57 | 显示全部楼层
热爱学习者 发表于 2025-6-6 10:44
我这个还是不行,我这是548版本,因为版本的问题吗?

你该 不会是改25人H的死亡之翼吧?
回复

使用道具 举报

95

时沙

0

精华

1

主题

声望: 106   虚弱: 0

Lv.2(潜行者)

 楼主| 发表于 2025-6-7 22:13:38 | 显示全部楼层
钱多多 发表于 2025-6-6 17:48
你该 不会是改25人H的死亡之翼吧?

没有就是,想弄个大家一起打的怪,不用管红名灰名,造成伤害就给奖励。548 的教学太少了
[发帖际遇]: 热爱学习者推倒一粒蛋,获得了狗蛋之颅,熬了一锅汤趁热喝下,获得2 声望. 幸运榜 / 衰神榜
回复

使用道具 举报

快速回复 返回顶部 返回列表