/** * @brief Modifies the player's standing with the faction. * * Also modifies standing with allies and enemies of the faction. * * @usage f:modPlayer( -5 ) -- Lowers faction by 5 * * @luaparam f Faction to modify player's standing with. * @luaparam mod The modifier to modify faction by. * @luafunc modPlayer( f, mod ) */ static int factionL_modplayer( lua_State *L ) { int f; double n; f = luaL_validfaction(L,1); n = luaL_checknumber(L,2); faction_modPlayer( f, n, "script" ); return 0; }
/** * @brief Increases the player's standing to a faction by an amount. This will * affect player's standing with that faction's allies and enemies also. * * @luaparam faction Name of the faction. * @luaparam mod Amount to modify standing by. * @luafunc modFaction( faction, mod ) */ static int playerL_modFaction( lua_State *L ) { int f; double mod; if (lua_isstring(L,1)) f = faction_get( lua_tostring(L,1) ); else NLUA_INVALID_PARAMETER(); mod = luaL_checknumber(L,2); faction_modPlayer( f, mod ); return 0; }