北大侠客行MUD论坛

 找回密码
 注册
搜索
热搜: 新手 wiki 升级
楼主: vadi

Mudlet3.17-安全的连接,更容易映射,HiDPI,以及更多!

[复制链接]
 楼主| 发表于 2019-3-12 14:04:54 | 显示全部楼层
"If I don't click "Save Item" and "Save Profile" button, the code may lose. If I clicked them, the code won't lose. I have checked autosave on."

That's correct. All 'autosave' does is saves things you've already saved with 'Save Item'.

'Save Item' = update alias/trigger/etc
'Save Profile' = write to disk.
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2019-3-12 14:14:39 | 显示全部楼层
"^棒棒糖说道:「你去帮我弄根(.+)过来吧。」$" is the regex pattern and what is the line that you're matching? Also, what is the code? Or just export the trigger directly
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2019-3-12 19:12:07 | 显示全部楼层
本帖最后由 lboy 于 2019-3-12 11:20 AM 编辑

In the Pozhen task, there are eight directions. One of the directions is correct. The correct direction and some random directions are blinking. So if a direction is not blinking, the player will know it is wrong. Each time the player goes the wrong direction, he will lose some HP. If the player goes the correct direction, a npc will fight with him. If his HP is very low, he will be defeated by the npc.
Without displaying blinking text, the player has no way to know which directions are wrong. So he is likely to fail in the Pozhen task.
I want to catch the blinking directions so that I can know which directions are wrong.



This is the trigger of "^棒棒糖说道:「你去帮我弄根(.+)过来吧。」$":

                                New Trigger111
                               
                                0
                                0
                                0
                                dw
                               
                                #ff0000
                                #ffff00
                               
                                #000000
                                #000000
                               
                                        ^棒棒糖说道:「你去帮我弄根(.+)过来吧。」$
                               

                               
                                        1
                               

                       



The line I want to match is something like:
棒棒糖说道:「你去帮我弄根冰魄杖过来吧。」
Because the "matches" is nil, I have to use varialbe "line".
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2019-3-14 01:15:11 | 显示全部楼层
One thing - os.execute("aplay /home/xxx/Downloads/bibi.wav") - use playSoundFile() or os.execute("aplay /home/xxx/Downloads/bibi.wav &") because what you have will freeze the application while aplay is playing the sound
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2019-3-14 01:55:21 | 显示全部楼层
I couldn't make it happen. Modules definitely don't affect how code is run, only where it is saved. Here's a video: https://streamable.com/5l47g (ignore the ��� - it looks like `echo requires encoding to be utf8).

Can you make a video?
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2019-3-14 13:32:48 | 显示全部楼层
本帖最后由 lboy 于 2019-3-14 05:56 AM 编辑

回复 15# vadi


Thanks!
I retest the trigger and finally find what's wrong. It's not about modules or Chinese. Look at the command "dw", it's the problem. "dw" is one of my complex aliases. I just simply replace it with some random word like "a", and everything works fine.
BUT! It's not my alias' fault. I replace "dw" with a very simple alias, the problem still appears.
I will try to make a video.

This is the video: https://streamable.com/kpaf4

I made a mistake. The variable "matches" is not nil, but it is empty.
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2019-3-17 14:45:05 | 显示全部楼层
"command" is a command to the game, not an alias to run (tooltip also says this).

I recommend making a function in a script instead, and have both your alias and trigger call that function.
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2019-3-22 14:37:54 | 显示全部楼层
@lboy did you get it figured out?
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2019-3-23 12:01:46 | 显示全部楼层
本帖最后由 lboy 于 2019-3-23 04:15 AM 编辑

回复 18# vadi


I found variables are auto exported in 3.18. Thanks for your job!

I will be careful to use aliases in trigger command. But it is still a bug of Mudlet, right?
The rewriting of gps tool is done. But I need more test. And I need to separate it from my existing codes. As I used c++ to make it, I have to test it under windows. I may release it in 15-20 days.

And I have a question. Modules loaded by Module Manager will synchronize all codes and all trigger state. How to make them synchronize only codes but not trigger states? Some triggers need to be enabled in profile A, and they need to be disabled in profile B. And trigger states will change frequently. I don't want them to be synchronized.
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2019-3-24 16:44:53 | 显示全部楼层
"I will be careful to use aliases in trigger command" - no, not a bug, "command" gets sent straight to the game (see tooltip). Just confusing design.

You raise a good point about trigger states. When modules are synced, they're uninstalled and reinstalled - so 'sysSyncUninstallModule' and 'sysSyncInstallModule' should be raised for the module. Try using that to reset the trigger states to what they should be?
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|北大侠客行MUD ( 京ICP备16065414号-1 )

GMT+8, 2024-11-24 09:04 AM , Processed in 0.009693 second(s), 12 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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