Index
Page Contents

Common Server Functions

A list of functions available to Lua scripts running from any scenario on the Antilia Server.


Debugging Functions

Log

Log(message)

Parameters

  • message - The message to add to the Server Log.

Example

Log( "Hello world!" )

Faction Functions

AdjustCharacterFactionReputation

Warning:This function may be replaced with functions to add Fame or Infamy separately in the near future.
Warning:This is an asynchronous function. The new quest instance will not yet have been created when this function returns and the LUA script continues.
AdjustCharacterFactionReputation(character_id, faction_id, amount)

Parameters

  • character_id - ID of character to grant reputation to
  • faction_id - ID of faction
  • amount - Positive or Negative amount to influence reputation by.

Sample

AdjustCharacterFactionReputation(pc_id, "taipii-lumberjack-guild", 5 )

Quest Functions

GiveQuest

GiveQuest(character_id, quest_id)

Parameters

  • character_id - ID of the character that initiated the quest instance (others participants may be added later.)
  • quest_id - ID of the quest

Information
Calling this function will create a quest instance object linking the quest participants, quest template, and status data for the quest together.

SetQuestChapter

Notification Functions

SendNotificationToCharacter

SetQuestChapter

Server Variable Functions

SetPersistentClientVar

GetPersistentClientVar

SetTemporaryClientVar

GetTemporaryClientVar

SetPersistentServerVar

GetPersistentServerVar

SetTemporaryServerVar

GetTemporaryServerVar

Scene Functions

SpawnInstanceFromFile

SpawnQuestInstanceFromFile

SpawnQuestInstanceFromFile(instance_resource_id, position_str, quest_instance_id, [chapter_id])

Parameters

  • instanceresourceid - Path to base instance file to clone
  • position_str - Position string
  • questinstanceid - The quest instance that will track (and auto-destroy) the object.
  • chapter_id - (Optional) Quest chapter that will track (and auto-destroy) the object. If omitted the object is tracked at the quest instance level and will not be reset with a specific chapter.

Example

SpawnQuestInstanceFromFile ("data/quest-resources/tree.instance.json", "PL:...", "Ab3....", "fell_tree")