北大侠客行MUD论坛

 找回密码
 注册
搜索
热搜: 新手 wiki 升级
查看: 6871|回复: 9

城际通插件地图For神灯教新手套增加内置路径支持

[复制链接]
发表于 2020-1-26 15:39:36 | 显示全部楼层 |阅读模式
本帖最后由 foolenough 于 2020-1-27 10:55 AM 编辑

使用内置路径有几大好处:
1. 省服务器资源,降低服务器负载
2. set walk_spped -1之后走路更快
3. 更为准确
之前因为有内置CD,导致实用性不高。
zine最近非常开明的取消了内置CD,现同步更新新手套中的地图数据如下。
增加了绝大部分内置路径之间的路径,set walk_speed -1后使用。解压后替换原插件的db文件即可
db_new.zip (597.57 KB, 下载次数: 3287)
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2020-1-26 16:05:53 | 显示全部楼层
本帖最后由 foolenough 于 2020-1-26 04:13 PM 编辑

附上本次修改相应素材和脚本
  1. #! /bin/python

  2. import sqlite3

  3. #conn = sqlite3.connect('pkuxkx_p2palias_v2016.db')
  4. conn = sqlite3.connect("pkuxkx_p2palias_v2019_1020.db")
  5. cursor = conn.cursor()

  6. # return nodeno by nodeid
  7. def get_nodeno(nodeid):
  8.   cursor.execute('select nodeno from mud_node where nodeid="%s"' % nodeid)
  9.   nodeno = cursor.fetchone()
  10.   if nodeno is None:
  11.     print(nodeid)
  12.     return nodeno
  13.   return nodeno[0]

  14. lz = [
  15. "lanzhou,hhbeigudu,walk lingzhou",
  16. "hhbeigudu,lanzhou,walk lanzhou",
  17. "lanzhou,huangzhong",
  18. "huangzhong,xingxiu"
  19. ]

  20. bj = [
  21. "puyang,huanghebeidukou3,walk qufu",
  22. "huanghebeidukou3,puyang,walk puyang",
  23. "puyang,beijing",
  24. "beijing,andingmen,walk anding",
  25. "andingmen,beijing,walk yongan",
  26. "beijing,deshengmen,walk desheng",
  27. "deshengmen,beijing,walk yongan",
  28. "beijing,guanganmen,walk guangan",
  29. "andingmen,beijing,walk yongan",
  30. "andingmen,guanwailaolongtou,walk guanwai",
  31. "guanwailaolongtou,andingmen,walk beijing",
  32. "andingmen,deshengmen,walk desheng",
  33. "deshengmen,andingmen,walk anding",
  34. "andingmen,guanganmen,walk guangan",
  35. "guanganmen,andingmen,walk anding",
  36. "deshengmen,guanganmen,walk guangan",
  37. "guanganmen,deshengmen,walk desheng",
  38. "deshengmen,zhangjiakou,walk zhangjiakou",
  39. "zhangjiakou,deshengmen,walk beijing",
  40. "zhangjiakou,menggutulu,walk menggu",
  41. "menggutulu,zhangjiakou,walk zhangjiakou",
  42. "zhangjiakou,jinyangguangchang,walk jinyang",
  43. "jinyangguangchang,zhangjiakou,walk zhangjiakou",
  44. "jinyangguangchang,fenglingdu,walk luoyang",
  45. "fenglingdu,jinyangguangchang,walk jinyang",
  46. "jinyangguangchang,riyue,walk riyue",
  47. "riyue,jinyangguangchang,walk jinyang",
  48. "jinyangguangchang,guanganmen,walk beijing",
  49. "guanganmen,jinyangguangchang,walk jinyang",
  50. "riyue,guanganmen,walk beijing",
  51. "guanganmen,riyue,walk riyue",
  52. ]

  53. yz= [
  54. "yangzhou,yangzijin,walk zhenjiang",
  55. "yangzijin,yangzhou,walk yangzhou",
  56. "yangzhou,changjiangbeidukou1,walk jiankang",
  57. "changjiangbeidukou1,yangzhou,walk yangzhou",
  58. "yangzhou,qufugulou,walk qufu",
  59. "qufugulou,yangzhou,walk yangzhou",
  60. "yangzhou,gaibang",
  61. "yangzhou,xinyang",
  62. "qufugulou,taishandaizongfang,walk taishan",
  63. "taishandaizongfang,qufugulou,walk qufu",
  64. "qufugulou,huanghenandukou1,walk puyang",
  65. "huanghenandukou1,qufugulou,walk qufu",
  66. "qufugulou,huaibei,walk huaibei",
  67. "huaibei,qufugulou,walk qufu",
  68. "huaibei,xuchang",
  69. "nanyang,xuchang",
  70. "ruzhou,xuchang",
  71. "xinyang,xuchang",
  72. "xinyang,cjbeidukou2,walk jiangzhou",
  73. "cjbeidukou2,xinyang,walk xinyang",
  74. "xinyang,xiangyang",
  75. "xinyang,shashouguangchang,walk shashou",
  76. "shashouguangchang,xinyang,walk xinyang",
  77. "xiangyang,nanyang",
  78. "xiangyang,wudangshanmen,walk wudang",
  79. "wudangshanmen,xiangyang,walk xiangyang",
  80. "xiangyang,jingzhou",
  81. "jingzhou,lingji,walk yueyang",
  82. "lingji,jingzhou,walk jingzhou",
  83. "nanyang,luoyang",
  84. "nanyang,xiaocun,walk huashancun",
  85. "xiaocun,nanyang,walk nanyang",
  86. "xiaocun,quanzhengongmen,walk quanzhen",
  87. "quanzhengongmen,xiaocun,walk huashancun",
  88. "quanzhengongmen,gumu,walk gumu",
  89. "gumu,quanzhengongmen,walk quanzhen",
  90. "xiaocun,huashanqianchichuang,walk huashan",
  91. "huashanqianchichuang,xiaocun,walk huashancun",
  92. "luoyang,mengjindu,walk jinyang",
  93. "mengjindu,luoyang,walk luoyang",
  94. "luoyang,ruzhou",
  95. "ruzhou,2xu,walk shaolin",
  96. "2xu,ruzhou,walk ruzhou",
  97. "luoyang,qilincun",
  98. "luoyang,changantonghuamen,walk changan",
  99. "changantonghuamen,luoyang,walk luoyang",
  100. "changantonghuamen,changanjinguangmen,walk jinguang",
  101. "changanjinguangmen,changantonghuamen,walk tonghua",
  102. "changantonghuamen,changanmingdemen,walk mingde",
  103. "changanmingdemen,changantonghuamen,walk tonghua",
  104. "changanjinguangmen,changanmingdemen,walk mingde",
  105. "changanmingdemen,changanjinguangmen,walk jinguang",
  106. "huizuxiaozhen,lingjiu,walk lingjiu",
  107. "lingjiu,huizuxiaozhen,walk huijiang",
  108. "huizuxiaozhen,lingzhou,walk lingzhou",
  109. "lingzhou,huizuxiaozhen,walk huijiang",
  110. "lingzhou,hhnangudu,walk lanzhou",
  111. "hhnangudu,lingzhou,walk lingzhou",
  112. "zanpu,dalunsishanmen,walk dalunsi",
  113. "dalunsishanmen,zanpu,walk zanpu",
  114. "chengdu,emeishanmen,walk emei",
  115. "emeishanmen,chengdu,walk chengdu",
  116. "dali,kunming",
  117. "kunming,pingxiwang,walk pingxi",
  118. "pingxiwang,kunming,walk kunming",
  119. "miaoling,nanchang,walk nanchang",
  120. "nanchang,miaoling,walk miaojiang",
  121. "miaoling,yueyang,walk yueyang",
  122. "yueyang,miaoling,walk miaojiang",
  123. "jiangzhou,nanchang",
  124. "jiangzhou,cjnandukou2,walk xinyang",
  125. "cjnandukou2,jiangzhou,walk jiangzhou",
  126. "jiangzhou,yueyang",
  127. "jiangzhou,jiankangqingliangmen,walk jiankang",
  128. "jiankangqingliangmen,jiangzhou,walk jiangzhou",
  129. "jiankangqingliangmen,jiankangzhengyangmen,walk zhengyang",
  130. "jiankangzhengyangmen,jiankangqingliangmen,walk qingliang",
  131. "jiankangqingliangmen,jiankangshencemen,walk shence",
  132. "jiankangshencemen,jiankangqingliangmen,walk qingliang",
  133. "jiankangqingliangmen,jiankangchaoyangmen,walk chaoyang",
  134. "jiankangchaoyangmen,jiankangqingliangmen,walk qingliang",
  135. "jiankangchaoyangmen,jiankangzhengyangmen,walk zhengyang",
  136. "jiankangzhengyangmen,jiankangchaoyangmen,walk chaoyang",
  137. "jiankangchaoyangmen,jiankangshencemen,walk shence",
  138. "jiankangshencemen,jiankangchaoyangmen,walk chaoyang",
  139. "jiankangzhengyangmen,jiankangshencemen,walk shence",
  140. "jiankangshencemen,jiankangzhengyangmen,walk zhengyang",
  141. "jiankangshencemen,changjiangnanyanziji,walk yanziji",
  142. "changjiangnanyanziji,jiankangshencemen,walk jiankang",
  143. "nanchang,quanzhou",
  144. "quanzhou,jiaxing",
  145. "quanzhou,fuzhou",
  146. "quanzhou,putian",
  147. "quanzhou,hangzhou,walk linan",
  148. "hangzhou,quanzhou,walk quanzhou",
  149. "hangzhou,jiankangzhengyangmen,walk jiankang",
  150. "jiankangzhengyangmen,hangzhou,walk linan",
  151. "hangzhou,gushanmeizhuang,walk meizhuang",
  152. "gushanmeizhuang,hangzhou,walk linan",
  153. "hangzhou,yuefeimu,walk yuewangmu",
  154. "yuefeimu,hangzhou,walk linan",
  155. "putian,fuzhou",
  156. "fuzhou,jiaxing",
  157. "jiaxing,lujiazhuang",
  158. "jiaxing,suzhoucanglangting,walk suzhou",
  159. "suzhoucanglangting,jiaxing,walk jiaxing",
  160. "jiaxing,yuefeimu,walk yuewangmu",
  161. "yuefeimu,jiaxing,walk jiaxing",
  162. "jiaxing,jiaxingtaihubian1,walk murong",
  163. "jiaxingtaihubian1,jiaxing,walk jiaxing",
  164. "jiaxing,mingzhouqingyuangang,walk mingzhou",
  165. "mingzhouqingyuangang,jiaxing,walk jiaxing",
  166. "jiaxing,yashan",
  167. "jiaxing,jiankangzhengyangmen,walk jiankang",
  168. "jiankangzhengyangmen,jiaxing,walk jiaxing",
  169. "suzhoucanglangting,guiyunzhuang,walk guiyun",
  170. "guiyunzhuang,suzhoucanglangting,walk suzhou",
  171. "suzhoucanglangting,murong,walk murong",
  172. "murong,suzhoucanglangting,walk suzhou",
  173. "guiyunzhuang,murong,walk murong",
  174. "murong,guiyunzhuang,walk guiyun",
  175. "suzhoucanglangting,yixingxiancheng,walk yixing",
  176. "yixingxiancheng,suzhoucanglangting,walk suzhou",
  177. "suzhoucanglangting,jiankangchaoyangmen,walk jiankang",
  178. "jiankangchaoyangmen,suzhoucanglangting,walk suzhou",
  179. ]

  180. def prepare(ps):
  181.   results = []
  182.   for ori in ps:
  183.     sections = str.split(ori, ",")
  184.     if len(sections) == 2:
  185.       nodeno = get_nodeno(sections[0])
  186.       linknodeno = get_nodeno(sections[1])
  187.       results.append({"nodeno":nodeno, "linknodeno":linknodeno, "path": "walk %s" % sections[1], "linknodeid":sections[1]})
  188.       results.append({"nodeno":linknodeno, "linknodeno":nodeno, "path": "walk %s" % sections[0], "linknodeid":sections[0]})
  189.     elif len(sections) == 3:
  190.       nodeno = get_nodeno(sections[0])
  191.       linknodeno = get_nodeno(sections[1])
  192.       results.append({"nodeno":nodeno, "linknodeno":linknodeno, "path": sections[2], "linknodeid":sections[1]})
  193.   return results


  194. def sql_prepare(results):
  195.   for res in results:
  196.     statement = 'insert into mud_links(nodeno, linknodeno, path, linknodeid) values (%d,%d,"%s","%s");' % (res["nodeno"], res["linknodeno"], res["path"], res["linknodeid"])
  197.     print(statement)

  198. sql_prepare(prepare(yz))
  199. sql_prepare(prepare(lz))
  200. sql_prepare(prepare(bj))
复制代码
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2020-1-26 16:12:32 | 显示全部楼层
能上传附件的也可以直接更新下qq群共享里的神灯教新手套
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2020-1-26 17:46:13 | 显示全部楼层
这个db是什么格式的?弱弱的问一下
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2020-1-26 18:20:50 | 显示全部楼层
回复 1# foolenough


    SQLiteExpert无法打开db
插件读取db报错
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2020-1-27 10:56:20 | 显示全部楼层
重新更新了一下db文件,可能之前压缩的时候压缩错了。
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2020-1-27 19:41:46 | 显示全部楼层
回复 1# foolenough


    感谢大佬分享。请问绝情谷怎么进不去呢?

乡间土路 -  
               雪峰脚下---乡间土路---乡间土路  
    这里明显的方向有 east 和 west。
>
小路 -  
                           山洞口              
                             ∧     
                            小路               
                                  \
                                     乡间土路  
    这里明显的方向有 southeast 和 enter。
你转身迅速地往绝情谷方向行进。
>
设定环境变量:brief = 0
>
石壁上竟是你之前刻上的路线:
左 左 右 左 后 后 右
>
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
 楼主| 发表于 2020-1-28 11:14:48 | 显示全部楼层
绝情谷是需要自己设置路径别名的,因为每个ID的绝情谷路线都不一样。
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2020-1-28 19:22:17 | 显示全部楼层
本帖最后由 songtao 于 2020-1-28 11:50 AM 编辑

回复 8# foolenough


非常抱歉。从QQ群里下载了神灯套装。但是在使用中还是有个问题,比如所有目的地是wudang的似乎都到不了。
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
发表于 2020-1-28 19:53:27 | 显示全部楼层
走路很重要,提高效率的必备武器
北大侠客行Mud(pkuxkx.com),最好的中文Mud游戏!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-24 02:29 PM , Processed in 0.012448 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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