Code:
context %actor.id%
if %spoken_with_mayor% != 1
emote looks up from his work at %actor.name%.
Should be:
Code:
if !%actor.varexists(spoken_with_mayor)%
emote looks up from his work at %actor.name%.
You are currently getting global variables and remote variables mixed up. If you would like to attach a variable to a mob/obj/room that is used for only 1 character you can go about using globals:
Code:
context %actor.id%
if %variable%
do stuff
else
set variable 1
global variable
end
If you want to attach a variable to the PC, so that it maybe used by other triggers both during the current boot of your MUD, and following reboots (variable is saved to pfile), then you want remote triggers.
Code:
if %actor.varexists(variable)%
if %actor.variable% == 1
do stuff
elseif %actor.variable% == 2
do stuff
else
do other stuff
end
rdelete variable %actor.id%
else
set variable 1
remote variable %actor.id%
end
Globals are useful for things like repeatable quests, treasure chests, and other INSTANCED tasks. While remote variables are good for things like on-going story quests, relationships or other variables that will remain with the character for potentially his/her lifetime.