walk.extra.tin 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #alias {ui.walk.go} {
  2. #local dir {%1};
  3. #if { @char.IsBusy{} || @char.InCombat{} } {
  4. halt;
  5. };
  6. $ui.walk.cmd $dir;
  7. };
  8. #alias {ui.walk.keypad.do} {
  9. #local key {%1};
  10. #local type {%2};
  11. #local args {%3};
  12. #if { "$type" == "cmd" } {
  13. $args;
  14. #return;
  15. };
  16. #local dir {};
  17. #foreach {$args} {dir} {
  18. #local exits {$gMapRoom[exits]};
  19. #if { "$exits" == "" } {
  20. #local exits {@sset.Add{{};$gMapRoom[gmcp][出口信息][]}};
  21. };
  22. #if { @sset.Contains{{$exits};$dir} } {
  23. ui.walk.go $dir;
  24. #return;
  25. };
  26. };
  27. };
  28. option.Define {GancheMode} {Bool} {是否开启运镖模式} {false};
  29. #alias {ui.walk.Ganche.Setup} {
  30. #if { @option.IsDisable{GancheMode} } {
  31. #class ui.walk.ganche.mode kill;
  32. errLog 运镖模式已关闭。;
  33. #if { @option.IsEnable{KeypadWalk} || @option.IsEnable{ScreenKeypad} } {
  34. prompt.Set {{ganche}{@mslp.Exec{option.Toggle GancheMode;<119>已关闭<299>}}};
  35. };
  36. #else {
  37. prompt.Set {{ganche}{}};
  38. };
  39. #var ui.walk.cmd {go};
  40. };
  41. #else {
  42. #class ui.walk.ganche.mode open;
  43. #local short {};
  44. #foreach {n;w;e;s;u;d;ne;nw;se;sw;enter;out} {short} {
  45. #local long {@dir.Long{$short}};
  46. #line sub var #alias {$short} {ui.walk.go $long};
  47. #line sub var #alias {$long} {ui.walk.go $long};
  48. };
  49. #class ui.walk.ganche.mode close;
  50. okLog 运镖模式已开启。;
  51. prompt.Set {{ganche}{@mslp.Exec{option.Toggle GancheMode;<129>已开启<299>}}};
  52. #var ui.walk.cmd {gan che to};
  53. };
  54. };
  55. event.HandleOnce {user-online} {ui/walk/ganche} {pkuxkx/online} {
  56. event.Handle {option/changed} {opt/GancheMode/pkuxkx} {lib/ui/walk/pkuxkx} {ui.walk.Ganche.Setup};
  57. event.Handle {option/changed} {opt/KeypadWalk/pkuxkx} {lib/ui/walk/pkuxkx} {ui.walk.Ganche.Setup};
  58. event.Handle {option/changed} {opt/ScreenKeypad/pkuxkx} {lib/ui/walk/pkuxkx} {ui.walk.Ganche.Setup};
  59. ui.walk.Ganche.Setup;
  60. };