local roomnum = gmcp.Room.Info.num
local roomname = gmcp.Room.Info.name
local roomarea = gmcp.Room.Info.area
if k == target then
mm.cc("Targeting: " .. target.." - I'm currently located at "..roomname.." in "..roomarea.." ("..roomnum..")", false)
else
mm.cc("Targeting: " .. target, false)
end -- if
end -- for
Comments
If you are using Mudlet, I'd suggest going to Mudlet's forums and asking for help there. You might have a better chance of getting the advice you want more quickly there. Like I said, I wish I could help but I'm shit at Mudlet Best of luck!
I got it working though. I just added a variable to the For statement and then checked that Variable for the actual callout.
To be honest if it wasn't for @Tarkenton's gui I probably would not have figured it out. My work around is probably not the most elegant, but it works.
for k,v in pairs(gmcp.Room.Players) do
if target == gmcp.Room.Players[k].name then
targetHere = true
end -- end if
end -- end for
if targetHere == true then
mm.cc("Targeting: " .. target.." - I'm currently located at "..roomname.." in "..roomarea.." ("..roomnum..")", false)
else
mm.cc("Targeting: " .. target, false)
end -- if
target = string.title(matches[2])
local roomnum = gmcp.Room.Info.num
local roomname = gmcp.Room.Info.name
local roomarea = gmcp.Room.Info.area
local playerinroom = false
for k,v in pairs(gmcp.Room.Players) do
if v["name"] == target then
playerinroom = true
end -- if
end -- for
if playerinroom then
mm.cc("Targeting: " .. target.." - I'm currently located at "..roomname.." in "..roomarea.." ("..roomnum..")", false)
else
mm.cc("Targeting: " .. target, false)
end