EQ2EMu/DB/updates/spiritshards_xpdebt_feb7_2021.sql
Image 65e7222de5 Spirit Shards, Group and Solo EXP Debt (PVE/PVP), new lua functions, rules included
xp_debt in InfoStruct changed to float use SetInfoStructFloat and GetInfoStructFloat for it

SpawnScript file is now listed in /spawn details on the last page

LUA functions added:
bool GetRuleFlagBool(category, name)
float GetRuleFlagFloat(category, name)
int32 GetShardID(Spawn)
int32 GetShardCharID(Spawn)
int64 GetShardCreatedTimestamp(Spawn)
bool DeleteDBShardID(shardid) -- using GetShardID
int32 GetCharacterID(Spawn)
bool SetAccessToEntityCommandByCharID(Spawn, CharID, command_string, val) -- same as SetAccessToEntityCommand, but using a CharID instead of player

Rules added:

RULE_INIT(R_Combat, DeathExperienceDebt, "50.00"); // divide by 100, 50/100 = .5% debt per pve death
RULE_INIT(R_Combat, PVPDeathExperienceDebt, "25.00"); // divide by 100, 25/100 = .25% debt per pvp death
RULE_INIT(R_Combat, GroupExperienceDebt, "0"); // set to 1 means we will share debt between the group
RULE_INIT(R_Combat, ExperienceToDebt, "50.00"); // percentage of xp earned to debt vs obtained xp 50/100 = 50% to debt
RULE_INIT(R_Combat, ExperienceDebtRecoveryPercent, "5.00"); // recovery percentage per period of time, 5/100 = 5% recovered (so if .5% debt, .5*.05 = .025, .5-.025=.475% debt left)
RULE_INIT(R_Combat, ExperienceDebtRecoveryPeriod, "600"); // every 10 minutes (x*60 seconds) recover ExperienceDebtRecoveryPercent
RULE_INIT(R_Combat, EnableSpiritShards, "1");
RULE_INIT(R_Combat, SpiritShardSpawnScript, "SpawnScripts/Generic/SpiritShard.lua");
RULE_INIT(R_Combat, ShardDebtRecoveryPercent, "25.00"); // recovered percentage of debt upon obtainig shard, 25/100 means 25%.  If there is .5 DeathExperienceDebt, .5*25% = .125,  .5 - .125 = .375
2021-02-07 22:19:03 -05:00

41 lines
2.1 KiB
SQL

alter table character_details modify column xp_debt float not null default 0.0;
CREATE TABLE `character_spirit_shards` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`timestamp` BIGINT signed NOT NULL DEFAULT CURRENT_TIMESTAMP,
`name` varchar(64) not null default '',
`level` int(10) unsigned NOT NULL DEFAULT 0,
`race` tinyint(3) unsigned NOT NULL DEFAULT 0,
`gender` tinyint(3) unsigned NOT NULL DEFAULT 0,
`adventure_class` tinyint(3) unsigned NOT NULL DEFAULT 0,
`model_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`soga_model_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`hair_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`hair_face_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`wing_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`chest_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`legs_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`soga_hair_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`soga_hair_face_type` mediumint(8) unsigned NOT NULL DEFAULT 0,
`hide_hood` tinyint(3) unsigned NOT NULL DEFAULT 0,
`size` mediumint(8) unsigned NOT NULL DEFAULT 0,
`collision_radius` mediumint(8) unsigned NOT NULL DEFAULT 0,
`action_state` mediumint(8) unsigned NOT NULL DEFAULT 0,
`visual_state` mediumint(8) unsigned NOT NULL DEFAULT 0,
`mood_state` mediumint(8) unsigned NOT NULL DEFAULT 0,
`emote_state` mediumint(8) unsigned NOT NULL DEFAULT 0,
`pos_state` mediumint(8) unsigned NOT NULL DEFAULT 0,
`activity_status` mediumint(8) unsigned NOT NULL DEFAULT 0,
`sub_title` varchar(255) not null default '',
`prefix_title` varchar(128) not null default '',
`suffix_title` varchar(128) not null default '',
`lastname` varchar(64) not null default '',
`x` float not null default 0.0,
`y` float not null default 0.0,
`z` float not null default 0.0,
`heading` float not null default 0.0,
`gridid` int(10) unsigned NOT NULL DEFAULT 0,
`zoneid` int(10) unsigned NOT NULL DEFAULT 0,
`instanceid` int(10) unsigned NOT NULL DEFAULT 0,
`charid` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;