本帖最后由 蛋清 于 2016-1-18 11:38 编辑
- (store_trigger_param_1,":var_0"),
- (agent_get_team, ":var_3", ":var_0"),
- (try_for_agents,":var_1"),
- (agent_get_position,pos2,":var_1"),
- (get_distance_between_positions,":var_2",pos1,pos2),
- (agent_get_team, ":var_4", ":var_1"),
- (store_random_in_range,":var_5",0,10),
- (agent_get_troop_id,":var_6",":var_0"),
- (try_begin),
- (is_between,":var_5",0,1),#触发几率1是10%,2是20%
- (eq,":var_6","trp_knight_2_1"),
- (neg|gt,":var_2",500),#触发距离500就是方圆10米
- (neg|eq,":var_3",":var_4"),
- (agent_deliver_damage_to_agent,":var_0",":var_1",45),#45是范围伤害数值
- (play_sound,"snd_guanerge"),#播放声音,比如特定人物张飞,可以在这播放录制的张飞的声音,比如燕人张翼德在此
- (else_try),
- (is_between,":var_5",0,1),#触发几率1是10%,2是20%
- (eq,":var_6","trp_knight_2_2"),
- (neg|gt,":var_2",500),#触发距离500就是方圆10米
- (neg|eq,":var_3",":var_4"),
- (agent_deliver_damage_to_agent,":var_0",":var_1",55),#55是范围伤害数值可以设置不同人不同范围和不同伤害数值
- (play_sound,"snd_zhangfei"),#播放声音,以下都一样,看你想设定几个人
- (else_try),
- (is_between,":var_5",0,1),
- (eq,":var_6","trp_knight_2_3"),
- (neg|gt,":var_2",500),
- (neg|eq,":var_3",":var_4"),
- (agent_deliver_damage_to_agent,":var_0",":var_1",50),
- (play_sound,"snd_zhaoyun"),
- (else_try),
- (is_between,":var_5",0,1),
- (eq,":var_6","trp_knight_2_4"),
- (neg|gt,":var_2",500),
- (neg|eq,":var_3",":var_4"),
- (agent_deliver_damage_to_agent,":var_0",":var_1",40),
- (play_sound,"snd_machao"),
- (else_try),
- (is_between,":var_5",0,2),
- (eq,":var_6","trp_kingdom_10_lord"),
- (neg|gt,":var_2",600),
- (neg|eq,":var_3",":var_4"),
- (agent_deliver_damage_to_agent,":var_0",":var_1",60),
- (play_sound,"snd_lvbu"),
- (try_end),
- (try_end),
复制代码 其实用sys语言也不见得有多难,推荐还是学习一下sys,免得被魔球的功能给局限了,这是我随意改的一个用在mt里的sys码,阁下可以参照一下(排版在粘贴的时候出了点问题。。):- (ti_on_agent_hit, 0, 0, [],
- [
- (store_trigger_param_2, ":agent"),
- (copy_position, pos11, pos0),
- (gt,":agent",-1),
- (agent_is_human,":agent"),
- (agent_get_troop_id, ":troop", ":agent"),
- (agent_get_team, ":team1", ":agent"),
- (try_for_agents,":damaged"),
- (gt,":damaged",-1),
- (agent_is_alive,":damaged"),
- (agent_get_position,pos12,":damaged"),
- (get_distance_between_positions,":dist",pos11,pos12),
- (agent_get_team, ":team2", ":damaged"),
- (store_random_in_range,":val",0,10),
- (agent_get_troop_id,":troop",":agent"),
- (neq,":team1",":team2"),
- (try_begin),
- (is_between,":val",0,1),#触发几率1是10%,2是20%
- (eq,":troop","trp_knight_2_1"),#特定人物1,也就是说这个人拿了这件武器会触发这个效果,其他人不行
- (neg|gt,":dist",500),#触发距离500就是方圆10米
- (agent_deliver_damage_to_agent,":agent",":damaged",45),#45是范围伤害数值
- (agent_play_sound, ":agent", "snd_guanerge"),#播放声音,比如特定人物张飞,可以在这播放录制的张飞的声音,比如燕人张翼德在此
- (else_try),
- (is_between,":val",0,1),#触发几率1是10%,2是20%
- (eq,":troop","trp_knight_2_2"),#特定人物2,也就是说这个人拿了这件武器会触发这个效果,其他人不行
- (neg|gt,":dist",500),#触发距离500就是方圆10米
- (agent_deliver_damage_to_agent,":agent",":damaged",55),#55是范围伤害数值可以设置不同人不同范围和不同伤害数值
- (agent_play_sound, ":agent", "snd_zhangfei"),#播放声音,以下都一样,看你想设定几个人
- (else_try),
- (is_between,":val",0,1),
- (eq,":troop","trp_knight_2_3"),
- (neg|gt,":dist",500),
- (agent_deliver_damage_to_agent,":agent",":damaged",50),
- (agent_play_sound, ":agent", "snd_zhaoyun"),
- (else_try),
- (is_between,":val",0,1),
- (eq,":troop","trp_knight_2_4"),
- (neg|gt,":dist",500),
- (agent_deliver_damage_to_agent,":agent",":damaged",40),
- (agent_play_sound, ":agent", "snd_machao"),
- (else_try),
- (is_between,":val",0,2),
- (eq,":troop","trp_kingdom_10_lord"),
- (neg|gt,":dist",600),
- (agent_deliver_damage_to_agent,":agent",":damaged",60),
- (agent_play_sound, ":agent", "snd_lvbu"),
- (try_end),
- (try_end),
- ]),
复制代码 |