/// <summary> /// Gets the player's quickbar slot info /// </summary> /// <param name="player"></param> /// <param name="slot"></param> /// <returns></returns> public static QuickBarSlot GetQuickBarSlot(NWGameObject player, int slot) { string sFunc = "GetQuickBarSlot"; QuickBarSlot qbs = new QuickBarSlot(); NWNXCore.NWNX_PushArgumentInt(NWNX_Player, sFunc, slot); NWNXCore.NWNX_PushArgumentObject(NWNX_Player, sFunc, player); NWNXCore.NWNX_CallFunction(NWNX_Player, sFunc); qbs.Associate = (NWNXCore.NWNX_GetReturnValueObject(NWNX_Player, sFunc)); qbs.AssociateType = NWNXCore.NWNX_GetReturnValueInt(NWNX_Player, sFunc); qbs.DomainLevel = NWNXCore.NWNX_GetReturnValueInt(NWNX_Player, sFunc); qbs.MetaType = NWNXCore.NWNX_GetReturnValueInt(NWNX_Player, sFunc); qbs.INTParam1 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Player, sFunc); qbs.ToolTip = NWNXCore.NWNX_GetReturnValueString(NWNX_Player, sFunc); qbs.CommandLine = NWNXCore.NWNX_GetReturnValueString(NWNX_Player, sFunc); qbs.CommandLabel = NWNXCore.NWNX_GetReturnValueString(NWNX_Player, sFunc); qbs.Resref = NWNXCore.NWNX_GetReturnValueString(NWNX_Player, sFunc); qbs.MultiClass = NWNXCore.NWNX_GetReturnValueInt(NWNX_Player, sFunc); qbs.ObjectType = (QuickBarSlotType)NWNXCore.NWNX_GetReturnValueInt(NWNX_Player, sFunc); qbs.SecondaryItem = (NWNXCore.NWNX_GetReturnValueObject(NWNX_Player, sFunc)); qbs.Item = (NWNXCore.NWNX_GetReturnValueObject(NWNX_Player, sFunc)); return(qbs); }
/// <summary> /// Get the name of the .bic file associated with the player's character. /// </summary> /// <param name="player"></param> /// <returns></returns> public static string GetBicFileName(NWGameObject player) { string sFunc = "GetBicFileName"; NWNXCore.NWNX_PushArgumentObject(NWNX_Player, sFunc, player); NWNXCore.NWNX_CallFunction(NWNX_Player, sFunc); return(NWNXCore.NWNX_GetReturnValueString(NWNX_Player, sFunc)); }
/// <summary> /// Get the data set with NWNX_Effect_SetEffectExpiredScript() /// /// THIS SHOULD ONLY BE CALLED FROM WITHIN A SCRIPT THAT WAS EXECUTED BY SetEffectExpiredScript() /// </summary> /// <returns></returns> public static string GetEffectExpiredData() { string sFunc = "GetEffectExpiredData"; NWNXCore.NWNX_CallFunction(NWNX_Effect, sFunc); return(NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc)); }
// Return a String containing the entire appearance for oItem which can later be // passed to RestoreItemAppearance(). public static string GetEntireItemAppearance(NWGameObject oItem) { string sFunc = "GetEntireItemAppearance"; NWNXCore.NWNX_PushArgumentObject(NWNX_Item, sFunc, oItem); NWNXCore.NWNX_CallFunction(NWNX_Item, sFunc); return(NWNXCore.NWNX_GetReturnValueString(NWNX_Item, sFunc)); }
/// <summary> /// Get player's area exploration state /// </summary> /// <param name="player">The player object</param> /// <param name="area">The area</param> /// <returns></returns> public static string GetAreaExplorationState(NWGameObject player, NWGameObject area) { string sFunc = "GetAreaExplorationState"; NWNXCore.NWNX_PushArgumentObject(NWNX_Player, sFunc, area); NWNXCore.NWNX_PushArgumentObject(NWNX_Player, sFunc, player); NWNXCore.NWNX_CallFunction(NWNX_Player, sFunc); return(NWNXCore.NWNX_GetReturnValueString(NWNX_Player, sFunc)); }
/// <summary> /// Convert native effect type to unpacked structure /// </summary> /// <param name="effect"></param> /// <returns></returns> public static EffectUnpacked UnpackEffect(Effect effect) { string sFunc = "UnpackEffect"; NWNXCore.NWNX_PushArgumentEffect(NWNX_Effect, sFunc, effect); NWNXCore.NWNX_CallFunction(NWNX_Effect, sFunc); EffectUnpacked n = new EffectUnpacked { Tag = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), oParam3 = NWNXCore.NWNX_GetReturnValueObject(NWNX_Effect, sFunc), oParam2 = NWNXCore.NWNX_GetReturnValueObject(NWNX_Effect, sFunc), oParam1 = NWNXCore.NWNX_GetReturnValueObject(NWNX_Effect, sFunc), oParam0 = NWNXCore.NWNX_GetReturnValueObject(NWNX_Effect, sFunc), sParam5 = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), sParam4 = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), sParam3 = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), sParam2 = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), sParam1 = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), sParam0 = NWNXCore.NWNX_GetReturnValueString(NWNX_Effect, sFunc), fParam3 = NWNXCore.NWNX_GetReturnValueFloat(NWNX_Effect, sFunc), fParam2 = NWNXCore.NWNX_GetReturnValueFloat(NWNX_Effect, sFunc), fParam1 = NWNXCore.NWNX_GetReturnValueFloat(NWNX_Effect, sFunc), fParam0 = NWNXCore.NWNX_GetReturnValueFloat(NWNX_Effect, sFunc), nParam7 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam6 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam5 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam4 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam3 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam2 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam1 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), nParam0 = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), NumIntegers = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), LinkRightValid = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), LinkRight = NWNXCore.NWNX_GetReturnValueEffect(NWNX_Effect, sFunc), LinkLeftValid = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), LinkLeft = NWNXCore.NWNX_GetReturnValueEffect(NWNX_Effect, sFunc), CasterLevel = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), ShowIcon = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), Expose = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), SpellID = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), Creator = NWNXCore.NWNX_GetReturnValueObject(NWNX_Effect, sFunc), ExpiryTimeOfDay = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), ExpiryCalendarDay = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), Duration = NWNXCore.NWNX_GetReturnValueFloat(NWNX_Effect, sFunc), SubType = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), Type = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc), EffectID = NWNXCore.NWNX_GetReturnValueInt(NWNX_Effect, sFunc) }; return(n); }
// Gets the message. // Must be called from an chat or system script handler. public static string GetMessage() { NWNXCore.NWNX_CallFunction("NWNX_Chat", "GET_MESSAGE"); return(NWNXCore.NWNX_GetReturnValueString("NWNX_Chat", "GET_MESSAGE")); }
/// <summary> /// Gets the current player password. /// </summary> /// <returns></returns> public static string GetPlayerPassword() { NWNXCore.NWNX_CallFunction("NWNX_Administration", "GET_PLAYER_PASSWORD"); return(NWNXCore.NWNX_GetReturnValueString("NWNX_Administration", "GET_PLAYER_PASSWORD")); }
/// <summary> /// Gets a list of all banned IPs, CD Keys, and player names as a string. /// </summary> /// <returns></returns> public static string GetBannedList() { NWNXCore.NWNX_CallFunction("NWNX_Administration", "GET_BANNED_LIST"); return(NWNXCore.NWNX_GetReturnValueString("NWNX_Administration", "GET_BANNED_LIST")); }