- 好友
- 0
- 在线时间
- 0 小时
- 最后登录
- 2024-5-13
随仆
- UID
- 3336352
- 第纳尔
- 2
- 精华
- 0
- 互助
- 1
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 0
- 注册时间
- 2022-3-13
鲜花( 0) 鸡蛋( 0)
|
写了一段刷新自建的黑市商人售卖商品的代码,预想是在自建装备中选出价格10000以上,30000以下的装备,并且每件都只有一半概率出现。但是不知道为什么黑市商人交易界面一直没东西。(刷新函数在大地图触发器和开始函数里都有调用过)
- ("gengxin_heishishangpin",
- [
- (try_for_range, ":cur_merchant", "trp_heishi_shangren_1", "trp_heishi_shangren_end"),
- (troop_clear_inventory, ":cur_merchant"),
- (troop_ensure_inventory_space, ":cur_merchant", 5),
- (try_for_range,":shangpin","itm_damashigedanshoujian_sword","itm_items_end"),
- (item_get_slot,":jiage",":shangpin",slot_item_base_price),
- (ge,":jiage",10000),
- (lt,":jiage",30000),
- (try_begin),
- (store_random_in_range,":gailv",1,10),
- (ge,":gailv",5),
- (troop_add_item,":cur_merchant",":shangpin",0),
- (try_end),
- (try_end),
- (troop_sort_inventory, ":cur_merchant"),
- (store_troop_gold, reg6, ":cur_merchant"),
- (lt, reg6, 1000),
- (store_random_in_range, ":new_gold", 10000, 20000),
- (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
- (end_try),
- ]),
复制代码
|
|