- 好友
- 6
- 在线时间
- 2157 小时
- 最后登录
- 2024-11-19
子爵[版主]
高级术士
- UID
- 360141
- 第纳尔
- 1661
- 精华
- 1
- 互助
- 81
- 荣誉
- 38
- 贡献
- 0
- 魅力
- 152
- 注册时间
- 2011-1-6
鲜花( 53) 鸡蛋( 0)
|
发表于 2012-5-9 19:55:22
|
显示全部楼层
本帖最后由 hyidg 于 2012-5-9 21:34 编辑
下面这个代码,用在箭矢等 物品触发器上面的:错在哪里呀
("agent_arrows_shu",#计算箭数量
[
(store_script_param_1, ":agent"),
(store_script_param_2, ":item"),
(agent_get_party_id, ":agent_party", ":agent"),
(try_begin),
(this_or_next|eq, ":agent_party", "p_main_party"),
(this_or_next|party_slot_eq, ":agent_party", slot_party_type, spt_kingdom_hero_party),
(is_between, ":agent_party", walled_centers_begin, walled_centers_end),
(party_get_slot,":a",":agent_party",slot_arrows_number_1),
(try_begin),(gt,":a",0),(val_sub,":a",1),(val_add, "$agent_arrows_number_1", 1),
(party_set_slot,":agent_party",slot_arrows_number_1,":a"),
(else_try),
(try_for_agents,":agent_no"),
(agent_get_party_id, ":agent_party_no", ":agent_no"),
(eq, ":agent_party", ":agent_party_no"),
(agent_is_alive,":agent_no"),(agent_is_human,":agent_no"),(agent_has_item_equipped,":agent_no",":item"),
(agent_set_ammo,":agent_no",":item",0),
(try_end),
(try_end),#
(try_end),
(try_begin),
(neg|agent_is_ally, ":agent"),(store_random_in_range, ":r", 0, 100),(lt,":r",40),
(party_get_slot,":a","p_main_party",slot_arrows_number_1),(val_add,":a",1),(party_set_slot,"p_main_party",slot_arrows_number_1,":a"),
(try_end),
]),
原因找到了,不就红色的部分懒的打吗, 这也不行!!!我哭!!!花了我1天时间了,就觉得我的代码 怎么可能 会错 |
|