• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages

    m_context.truced

    Usage:

    m_context.truced

    Example:

    if m_context.truced echo "This account is in truce"

    returns Boolean (True/False) True if account is in truce

    currentDateTime

    Usage:

    player.currentDateTime

    Example:

    player.currentDateTime

    returns string containing the readable format of "currentTime" (see below) which is actually not current time, but time of last login.

    example: echo player.currentDateTime

    output:

    2013.07.30 18.19.51

    currentTime

    Usage:

    player.currentTime

    Example:

    player.currentTime

    this is not actually currentTime... this is time of last login (in UNIX timestamp format)

    playerInfo.createrTime

    Usage:

    player.playerInfo.createrTime

    Example:

    player.playerInfo.createrTime

    date the account was created, in UNIX timestamp format.

    you can subtract that from timestamp of now and you have account age in milliseconds... you can divide that by (1k milliseconds * 60 seconds * 60 minutes * 24 hrs )= time in days

    echo "account is {floor((date().time-player.playerInfo.createrTime)/1000/60/60/24)} days old."

    playerInfo.office

    Usage:

    player.playerInfo.office

    Example:

    player.playerInfo.office

    This will return a string containing current player office/ rank eg "Civilian", "Lieutenant","Captain","Major","Colonel","General"

    playerInfo.castleCount

    Usage:

    player.playerInfo.castleCount

    Example:

    player.playerInfo.castleCount

    returns count of player's castles

    playerInfo.honor

    Usage:

    player.playerInfo.honor

    Example:

    player.playerInfo.honor

    returns player's honor points

    playerInfo.levelId

    Usage:

    player.playerInfo.levelId

    Example:

    player.playerInfo.levelId

    returns a number which represents position in alliance:

    4 = Host

    5 = Vice Host

    6 = Presbyter

    7 = Officer

    8 = Member 0 = not in an alliance

    playerInfo.medal

    Usage:

    player.playerInfo.medal

    Example:

    player.playerInfo.medal

    returns number of cents on account

    playerInfo.sex

    Usage:

    player.playerInfo.sex

    Example:

    player.playerInfo.sex

    returns a boolean value indicating player sex. (0=Male, 1=Female)

    playerInfo.accountName

    Usage:

    player.playerInfo.accountName

    Example:

    player.playerInfo.accountName

    returns string containing login email address.

    playerInfo.faceUrl

    Usage:

    player.playerInfo.faceUrl

    Example:

    player.playerInfo.faceUrl

    returns string containing path to player avatar icon picture.

    playerInfo.id

    Usage:

    player.playerInfo.id

    Example:

    player.playerInfo.id

    returns number indicating player's internal ID on game database.

    playerInfo.allianceLevel

    Usage:

    player.playerInfo.allianceLevel

    Example:

    player.playerInfo.allianceLevel

    returns string containing player's position in alliance (or null if unallied) eg. "Member","Officer","Presbyter","Vice Host" or "Host".

    playerInfo.population

    Usage:

    player.playerInfo.population

    Example:

    player.playerInfo.population

    returns number which indicates player's total population for all cities.

    playerInfo.flag

    Usage:

    player.playerInfo.flag

    Example:

    player.playerInfo.flag

    returns string containing player's flag.

    playerInfo.prestige

    Usage:

    player.playerInfo.prestige

    Example:

    player.playerInfo.prestige

    returns number containing player's prestige

    playerInfo.userName

    Usage:

    player.playerInfo.userName

    Example:

    player.playerInfo.userName

    Returns string containing player's lord name.

    playerInfo.userId

    Usage:

    player.playerInfo.userId

    Example:

    player.playerInfo.userId

    returns yet another internal Id number for the player on the game server.

    playerInfo.titleId

    Usage:

    player.playerInfo.titleId

    Example:

    player.playerInfo.titleId

    returns a number from 0-9 indicating player's current title.

    example to return player's title in string format:

    titleName=["Civilian,Knight,Baronet,Baron,Viscount,Earl,Marquis,Duke,Furstin,Prinzessin"]

    echo titleName[player.playerInfo.titleId]

    playerInfo.ranking

    Usage:

    player.playerInfo.ranking

    Example:

    player.playerInfo.ranking

    returns number indicating player's rank on server (according to prestige) ie: top prestige player on server is ranked 1

    playerInfo.alliance

    Usage:

    player.playerInfo.alliance

    Example:

    player.playerInfo.alliance

    returns string containing player's alliance name (or null if unallied)

    castleSignBeanArray

    Usage:

    player.castleSignBeanArray

    Example:

    json_encode(player.castleSignBeanArray)

    Returns an array containing your saved coords (ID, Name, X coords, Y coords).


    ScriptObjects

    Player (last edited 2015-08-03 20:39:43 by tech)