Replace the content inside 'main.lua' located in MWSE\mods\mer\PetTheDamnScrib with one of these;
1. For just petting diseased and blighted scribs
---@param e activateEventData event.register("activate", function(e)
local target = e.target.baseObject.id:lower()
if target ~= "scrib" and target ~= "scrib diseased" and target ~= "scrib blighted" then return end if not e.target.mobile then return end if e.target.mobile.inCombat then return end if e.target.isDead then return end tes3.playAnimation{reference = e.target, group = tes3.animationGroup.idle3, loopCount = 0, startFlag = tes3.animationStartFlag.immediate} tes3.messageBox("You pet the scrib.") end)
2. If you want different messages for different scribs
---@param e activateEventData event.register("activate", function(e)
local target = e.target.baseObject.id:lower()
if target ~= "scrib" and target ~= "scrib diseased" and target ~= "scrib blighted" then return end if not e.target.mobile then return end if e.target.mobile.inCombat then return end if e.target.isDead then return end tes3.playAnimation{reference = e.target, group = tes3.animationGroup.idle3, loopCount = 0, startFlag = tes3.animationStartFlag.immediate}
-- Different messages depending on the type of scrib
local message = "You pet the "
if target == "scrib" then message = message .. "scrib." elseif target == "scrib diseased" then message = message .. "diseased scrib, hopefully this one can make it through." elseif target == "scrib blighted" then message = message .. "blighted scrib, sadly it is already too late for this one." end
tes3.messageBox(message)
end)
Send me a message directly, or reply below if you need help or have questions!
This is awesome to allow others to modify the script, thank you very much for the demo. Can't pet you but have some kudos! It's also made obvious how to customize it to your liking. Is there an MWSE option to trigger multiple/randomized messages?
Cleaned the code a bit and added the possibility for multiple messages.
Replace the content inside 'main.lua' located in MWSE\mods\mer\PetTheDamnScrib --@param e activateEventData event.register("activate", function(e)
local target = e.target.baseObject.id:lower()
if target ~= "scrib" and target ~= "scrib diseased" and target ~= "scrib blighted" then return end if not e.target.mobile then return end if e.target.mobile.inCombat then return end if e.target.isDead then return end
-- Different messages depending on the type of scrib -- * Add/Remove messages as you wish, there is no limit
local scribMessages = { "You pet the scrib. It nuzzles you.", "The scrib looks up at you and seems to trust your touch.", "The scrib is cool to the touch, but your love for it is warm.", }
local diseasedScribMessages = { "You pet the diseased scrib, hopefully this one can make it through.", "This scrib seems weak, but maybe your touch will give it motivation to continue.", "This one is sick. If your love could cure, the scribs would rule the Nirn.", }
local blightedScribMessages = { "You pet the blighted scrib, may your touch be its hope.", "What kind of god would blight a creature this sweet?", "Your touch may be self-serving, but for this one it is life itself.", }
local function getRandomMessage(messages) return messages[math.random(#messages)] end
local message if target == "scrib" then message = getRandomMessage(scribMessages) elseif target == "scrib diseased" then message = getRandomMessage(diseasedScribMessages) elseif target == "scrib blighted" then message = getRandomMessage(blightedScribMessages) end
unfortunately, I have to miss out on all the scrib pets. OpenMW is the new kid on the block, and hasn't gotten all the good Oldwind mods converted over.
58 comments
1. For just petting diseased and blighted scribs
---@param e activateEventData
event.register("activate", function(e)
local target = e.target.baseObject.id:lower()
if target ~= "scrib" and target ~= "scrib diseased" and target ~= "scrib blighted" then return end
if not e.target.mobile then return end
if e.target.mobile.inCombat then return end
if e.target.isDead then return end
tes3.playAnimation{reference = e.target, group = tes3.animationGroup.idle3, loopCount = 0, startFlag = tes3.animationStartFlag.immediate}
tes3.messageBox("You pet the scrib.")
end)
2. If you want different messages for different scribs
---@param e activateEventData
event.register("activate", function(e)
local target = e.target.baseObject.id:lower()
if target ~= "scrib" and target ~= "scrib diseased" and target ~= "scrib blighted" then return end
if not e.target.mobile then return end
if e.target.mobile.inCombat then return end
if e.target.isDead then return end
tes3.playAnimation{reference = e.target, group = tes3.animationGroup.idle3, loopCount = 0, startFlag = tes3.animationStartFlag.immediate}
-- Different messages depending on the type of scrib
local message = "You pet the "
if target == "scrib" then
message = message .. "scrib."
elseif target == "scrib diseased" then
message = message .. "diseased scrib, hopefully this one can make it through."
elseif target == "scrib blighted" then
message = message .. "blighted scrib, sadly it is already too late for this one."
end
tes3.messageBox(message)
end)
Send me a message directly, or reply below if you need help or have questions!
Replace the content inside 'main.lua' located in MWSE\mods\mer\PetTheDamnScrib
--@param e activateEventData
event.register("activate", function(e)
local target = e.target.baseObject.id:lower()
if target ~= "scrib" and target ~= "scrib diseased" and target ~= "scrib blighted" then return end
if not e.target.mobile then return end
if e.target.mobile.inCombat then return end
if e.target.isDead then return end
tes3.playAnimation{
reference = e.target,
group = tes3.animationGroup.idle3,
loopCount = 0,
startFlag = tes3.animationStartFlag.immediate
}
-- Different messages depending on the type of scrib
-- * Add/Remove messages as you wish, there is no limit
local scribMessages = {
"You pet the scrib. It nuzzles you.",
"The scrib looks up at you and seems to trust your touch.",
"The scrib is cool to the touch, but your love for it is warm.",
}
local diseasedScribMessages = {
"You pet the diseased scrib, hopefully this one can make it through.",
"This scrib seems weak, but maybe your touch will give it motivation to continue.",
"This one is sick. If your love could cure, the scribs would rule the Nirn.",
}
local blightedScribMessages = {
"You pet the blighted scrib, may your touch be its hope.",
"What kind of god would blight a creature this sweet?",
"Your touch may be self-serving, but for this one it is life itself.",
}
local function getRandomMessage(messages)
return messages[math.random(#messages)]
end
local message
if target == "scrib" then
message = getRandomMessage(scribMessages)
elseif target == "scrib diseased" then
message = getRandomMessage(diseasedScribMessages)
elseif target == "scrib blighted" then
message = getRandomMessage(blightedScribMessages)
end
tes3.messageBox(message)
end)