Advertisement
Chirbi

The Golden Belt of the Enlightened

Jul 26th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. Here's an easy way to make use of your Belt of the Enlightened with GMCP, Mudlet's Mapper, and the IRE Mapping Script in under 5 minutes. First, we'll map the chamber and second, we'll create the script. Once you're up and running, the mapper will begin to check all rooms to see if they're outdoors, and if so remember them as a location where you can use your belt. If you've not yet enabled GMCP, it can be turned on by clicking 'Settings' and selecting 'Enable GMCP' on the first screen, second from the bottom.
  2.  
  3. First, touch your belt to teleport to the chamber. To map the room, enter the following commands in order from Mudlet's main command line:
  4. mc on
  5. rlc v19627 0 0 0
  6. area add Limbo
  7. room area Limbo
  8. rlk 19343 se one
  9. rlk 19514 nw one
  10. rlk 19222 up one
  11. rlk 19666 sw one
  12. rlk 19527 ne one
  13. rlk 11401 down one
  14. rlk 19693 north one
  15. mc off
  16.  
  17. Second, we setup the script! We'll create a script group, I called mine 'MapHax'. I didn't place it inside of 'mudlet-mapper' to avoid any issues when the IRE Mapping Script updates. Open up a plain text editor (Notepad, Gedit, etc.) and save a blank file inside your mudlet home directory called 'maphax'. If you don't know where your mudlet home directory is, from the command line run 'lua echo(getMudletHomeDir())'. Inside the group, paste the following script:
  18.  
  19. maphaxloc = getMudletHomeDir().. "/maphax"
  20. maphax = maphax or {beltlocked = {}}
  21.  
  22. function MapHax()
  23. loadMapHax()
  24. end
  25.  
  26. function loadMapHax()
  27. if io.exists(maphaxloc) then table.load(maphaxloc, maphax) end
  28. end
  29.  
  30. function saveMapHax()
  31. if io.exists(maphaxloc) then table.save(maphaxloc, maphax) end
  32. end
  33. Inside that group, we'll create a script item called 'The Belt of the Enlightened'. In the body of the script, copy and paste the following:
  34. registerAnonymousEventHandler("gmcp.Room.Info", "checkBelt")
  35.  
  36. function checkBelt()
  37. local area = gmcp.Room.Info.area
  38. local outdoors = gmcp.Room.Info.details[2]
  39. if not table.contains(maphax.beltlocked, area) and outdoors == "outdoors" then
  40. local num = gmcp.Room.Info.num
  41. if not table.contains(getSpecialExits(num), "TOUCH ENLIGHTENED") then
  42. addSpecialExit(num, 19627, "TOUCH ENLIGHTENED")
  43. echo("\n(Map Hax): Added use of the Golden Belt of the Enlightened from v".. num..".")
  44. end
  45. end
  46. end
  47.  
  48. function beltLock(num, area)
  49. if not table.contains(maphax.beltlocked) then
  50. table.insert(maphax.beltlocked, area)
  51. echo("\n(MapHax): Can't use the Golden Belt of the Enlightened, locking the area.")
  52. end
  53.  
  54. for k, v in pairs(getAreaRooms(getRoomArea(num))) do
  55. if table.contains(getSpecialExits(v), "TOUCH ENLIGHTENED") then
  56. removeSpecialExit(v, "TOUCH ENLIGHTENED")
  57. end
  58. end
  59. end
  60.  
  61. For ease of copy+paste and sharing, this is also available via pastebin: https://pastebin.com/m663YbL8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement