Guest User

Untitled

a guest
Oct 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. add this to the window scry script in the mapper folder
  2.  
  3. if matches[2] == string.title(target) and tracking == 1 then
  4. sondy_roomtrack(matches[4])
  5. elseif matches[2] == findperson and tracking == 1 then
  6. sondy_roomtrack(matches[4])
  7. end
  8.  
  9. -------------------
  10. make a new script and put this function in it
  11.  
  12. function sondy_roomtrack(query)
  13. local result = mmp.searchRoom(query)
  14.  
  15. if not tonumber(select(2, next(result))) then
  16. for roomid, roomname in pairs(result) do roomid = tonumber(roomid)
  17. mmp.gotoRoom(roomid)
  18. end
  19.  
  20. else
  21. for roomname, roomid in pairs(result) do roomid = tonumber(roomid)
  22. mmp.gotoRoom(roomid)
  23. end
  24. end
  25. end
  26.  
  27.  
  28. --------------------
  29.  
  30. create an alias something like ^track$ or ^find (\w+)$
  31.  
  32. for the track one:
  33.  
  34. tracking = 1
  35. send("abjure window "..target)
  36. tempTimer( 2.0, [[tracking = 0]])
  37.  
  38. for the find one:
  39.  
  40. findperson = string.title(matches[2])
  41. tracking = 1
  42. send("abjure window "..findperson)
  43. tempTimer( 2.0, [[tracking = 0]])
  44. ---------
  45.  
  46. hopefuly this stuff works for you!
Add Comment
Please, Sign In to add comment