User Tools

Site Tools


lua:ch:getval

This is an old revision of the document!


Getval works similar to qstatus, but with the setval command. Immortals can look up values on a player with the "qlist" command.

Syntax: getval("arg1", arg2)

The first argument is the string/name of the value. The second argument is the value of the string you're checking.

Example:

if ch:getval("minotaur_kill") == 1 then
    sendtochar( ch , "You've killed the minotaur!\n\r")
end

In this example, the mprog could be attached to just about anything, using any trigger. The result would be the player getting a message that they've killed the minotaur, if the value of "minotaur_kill" was equal to 1.

lua/ch/getval.1419666067.txt.gz · Last modified: 2014/12/27 07:41 by vodur