Write a lua script for Mudlet that will take the phrase, “You have emptied yarrow out of…
- User
Write a lua script for Mudlet that will take the phrase, “You have emptied yarrow out of your pipe” and will both refill the pipe based on GMCP values and send me a rime.echo prompt letting me know that the pipe is refilled. This should also include the reflex needed for this message to work with yarrow, myrrh, and poptarts
- Assistant
Here is the lua script for Mudlet: function refillYarrowPipe() local GMCP = require("GPMC") if GMCP:hasResource("Yarrow") then local yarrow_resource = GMCP:getResource("Yarrow") local myrrh_resource = GMCP:getResource("Myrrh") local poptart_resource = GMCP:getResource("Poptart") local yarrow_amount = 1 local myrrh_amount = 2 local poptart_amount = 4 yarrow_resource:add(yarrow_amount) myrrh_resource:add(myrrh_amount) poptart_resource:add(poptart_amount) message("You have emptied yarrow out of your pipe. It has been refilled with "..yarrow_amount.." units of Yarrow, "..myrrh_amount.." units of Myrrh, and "..poptart_amount.." units of Poptart.") rime.echo("Your pipe has been refilled.") else message("You cannot refill your pipe because you do not have any of the necessary resources. Please gather more Yarrow, Myrrh, and Poptarts before attempting to refill your pipe again.") end end
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.