The methods of the C_ScriptBindSoul class are listed here.
|
|
Name |
Description |
![]() |
| |
![]() |
|
|
|
Name |
Description |
|
Syntax: soul:AddBuff(string buff_id[, string perk_id]) Adds buff identified by the database id. Returns the instance id. If the buff is the result of a perk, optional perk_id can be used to notify GUI. | |
|
Syntax: soul:AddInjury(1, 'head') add [0,1] injury to a body part, bodyPartName from the database | |
|
Syntax: soul:AddMetaRoleByName(name) Adds a metarole by its name to this soul. | |
|
Syntax: soul:AddPerk(string perk_id) Adds perk identified by the database id. Returns the instance id. | |
|
Syntax: soul:AddSkillXP(string skill, float xp) Adds experience points. Returns how many levels had been reached (0 if no level was reached). | |
|
Syntax: soul:AddStatXP(string stat, float xp) Adds experience points. Returns how many levels had been reached (0 if no level was reached). | |
|
Syntax: soul:AdvanceToSkillLevel(string skill, float level) Set skill level using string name (use skill_name from database). The function will perform correct transition (it will add XPs). Cannot lower the level. | |
|
Syntax: soul:AdvanceToStatLevel(string stat, float level) sets stat level, for example soul:AdvanceToStatLevel('str', 20), it will add xp. Cannot lower the level. | |
|
This is AttachTo, a member of class C_ScriptBindSoul. | |
|
Syntax: customer:CalculateBarterDominance(shopkeeperSoulWuid) returns 1 if the soul has maximum dominance, -1 if the shopkeeper has maximum dominance | |
|
Syntax: soul:CanEatItem("89dada87-6e6c-5d2c-a17a-483ada14b90b") Checks if soul can eat the specified item class. Return true if so, false otherwise. | |
|
Syntax: soul:DealDamage(stamina, health, attackerId = invalid, suppressHitreaction = false, bodyPart = null) Causes the soul to loose given stamina and health. Negative values are accepted and treated as a heal. BodyParts are passed by name (from the database). | |
|
| |
|
Syntax: soul:EatItem("89dada87-6e6c-5d2c-a17a-483ada14b90b") Tries to eat an instance of the specified item class. Returns true if the item has been eaten (this includes checking if the item can be eaten), returns false otherwise. | |
|
Syntax: soul:GenerateCompanionEventDebug() sends a play event for the primary dog companion. Just for debug. | |
|
Syntax: soul:GetArchetype() Returns a table containing the archetype properties. | |
|
Syntax: soul:GetDerivedStat(string stat, table context, table outUsedPerks) returns current value of a derived stat given by the shortcut name (cha, ...) | |
|
Syntax: soul:GetFactionID() Returns the ID of the faction that the soul belongs to. | |
|
Syntax: soul:GetGatherMult( ScriptHandle id) gets gather skill multiplier | |
|
Syntax: soul:GetGender() Returns soul gender. | |
|
Syntax: soul:GetHobbies() Returns a table containing all soul's hobbies. | |
|
Syntax: soul:GetId() Returns unique and persistent id of this soul (WUID). | |
![]() |
This is GetMemoryUsage, a member of class C_ScriptBindSoul. | |
|
Syntax: soul:GetMetaRoles() Returns a table=array containing metarole ids. | |
|
Syntax: soul:GetNameString() returns value of name_string_id column from soul db table | |
|
Syntax: soul:GetNextLevelSkillXP(string skill, uint level) How many XP points is required for going from the level to level + 1. | |
|
Syntax: soul:GetNextLevelStatXP(string stat, uint level) How many XP points is required for going from the level to level + 1. | |
|
Syntax: soul:GetPerceivedFaction() Returns the perceived faction (calculated from all cloths) for this soul. | |
|
| |
|
Syntax: soul:GetRelationship(otherSoulId) returns the relationship between this and the other soul (-1 the worst enemies, 1 the best friends) Optional second argument selects the superfaction type for the other party. Can be Original, Current or Perceived. | |
|
Syntax: soul:GetSchedule() Returns a table containing float-encoded times indexed by activities. | |
|
Syntax: soul:GetSkillLevel(string skill) Get skill value using string name (use skill_name from database). | |
|
Syntax: soul:GetSkillProgress(string skill) Get skill progress from the current level to the next [0,1) using string name (use skill_name from database). | |
|
Syntax: soul:GetSocialClass() Returns social class as a table with Id, Name and Wealth keys. | |
|
| |
|
Syntax: soul:GetState(string state) returns state value for a given name (health, stamina,...) | |
|
Syntax: soul:GetStatLevel(string stat) returns stat value for a given name (str, agi, spc, vit, hea, bar, ...) | |
|
Syntax: soul:GetStatProgress(string stat) returns stat progress from the current level to the next level [0,1) for a given name (str, agi, spc, vit, hea, bar, ...) | |
|
Syntax: soul:HasAbility(string ability) returns true if soul have ability (cha, ...) | |
|
Syntax: soul:HasBuffDebug("89dada87-6e6c-5d2c-a17a-483ada14b90b") supply buff definition id | |
|
Syntax: soul:HasPerk("89dada87-6e6c-5d2c-a17a-483ada14b90b", true) Check if soul has perk and use it. | |
|
Syntax:: soul:HasScriptContext("script_context_name_from_db") Checks if soul currently has script context active | |
|
Syntax: soul:HaveSkill(string skill) Returns true if the soul can use this level. Parameter is name from the database. | |
|
Syntax: soul:HealBleeding(0.5, 1) heal [0,1] bleeding on body part | |
|
Syntax: soul:IsDialogRestricted() return whether dialog is currently restricted | |
|
Syntax: soul:IsInCombatDanger() returns 1 if the soul in in combat danger | |
|
Syntax: soul:IsInTenseCircumstance() returns 1 if the soul in in tense circumstance state | |
|
Syntax: soul:IsLegalToLoot() Check whether looting the soul (dead or unconscious) will not be seen as a crime | |
|
| |
|
Syntax: soul:ModifyMoraleDebug(5) debug function to modify morale, given the database change id | |
|
Syntax: soul:ModifyPlayerReputation('murder', true) Modify NPCs relationship (reputation) to player by the given name from the database. | |
|
Syntax: soul:OnCompanionEvent(companion, 'EventName') sends an event. | |
|
This is Release, a member of class C_ScriptBindSoul. | |
|
Syntax: soul:RemoveAllBuffsByGuid(buffDatabaseId) Forces removal of all buffs of the same database guid. | |
|
Syntax: soul:RemoveBuff(buffInstanceId) Forces removal of a buff. Supply the buff instance id. | |
|
Syntax: soul:RemoveMetaRoleByName(metaroleName) Removes a metarole from this soul. | |
|
Syntax: soul:RemovePerk(PerkInstanceId) Forces removal of a perk. Supply the perk id. | |
|
Syntax: soul:RestrictDialog(true) set soul to dialog restricted mode so it cannot be speak to (hint will not be shown, and this functionality is implemented in lua, using IsDialogRestricted) Also deletes all unfinished requests | |
|
Syntax: soul:SetPlayerReputationDebug(-0.5, 7, true) debug function to directly set reputation. Use the target flags from the database. | |
|
Syntax: soul:SetSkillLevelDebug(string skill, float level) Set skill level using string name (use skill_name from database). | |
|
Syntax: soul:SetState(string state, float value) sets state value for a given name (health, stamina,...) | |
|
Syntax: soul:SetStatLevelDebug(string stat, float level) sets stat level, for example soul:SetStatLevelDebug('str', 20), sets strength to 20 |
|
Copyright (c) 2012. All rights reserved.
|