Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

[Mudlet]Raise and lower hood via gmcp

JonathinJonathin Retired in a hole.Member Posts: 3,423 @@ - Legendary Achaean
edited December 2012 in Curing Systems and Scripts
This is just a random thing I wrote up because I wanted to raise and lower my hood depending on whether or not I am indoors. 

Script name: hooding
Event handler: gmcp.Room.Info
Script:

function hooding()

  if table.contains(gmcp.Room.Info.details,"indoors") == true then

    if hood == true then

      send("lower hood")

    end

  else

    if hood == false then

      send("raise hood")

    end 

  end

end




Trigger pattern(beginning of the line substring): You carefully lower the hood on

Script: hood = false


Trigger pattern(beginning of the line substring): You carefully raise the hood on

Script: hood = true




Just copy and paste into the appropriate places (script goes into scripts, and triggers go into triggers). Don't copy the yellow highlighted stuff.

Not sure why some of the text is not the same color as the background, I tried removing formatting, and pretty much every other highlight color.




My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
Tutorials and scripts  The Repository

MahtAlyssea

Comments

  • AlysseaAlyssea Member Posts: 417 ✭✭✭✭ - Eminent
    edited December 2012
    Jonathin said:

    Not sure why some of the text is not the same color as the background, I tried removing formatting, and pretty much every other highlight color.

    If you copy and paste something, it shows up with a white background instead of the normal greyish forums background.
    image
  • OnyxionOnyxion Member Posts: 1
    I copied like it says, it fails to raise and lower hood.
  • JonathinJonathin Retired in a hole.Member Posts: 3,423 @@ - Legendary Achaean
    Well, you'll need to raise or lower the hood manually first. I didn't actually set the variable in the script.

    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

Sign In to Comment.