#230 (neatz) need a GiveTitle function to work on items/quests

已關閉
image4 年之前創建 · 1 條評論

SQL Updates:

update commands set handler=286 where command='title' and subcommand='list';
update commands set handler=287 where command='title' and subcommand='setprefix';
update commands set handler=288 where command='title' and subcommand='setsuffix';
update commands set handler=289 where command='title' and subcommand='fix';
alter table character_details modify column prefix_title int(10) not null default -1;
alter table character_details modify column suffix_title int(10) not null default -1;

New LUA Functions:

AddMasterTitle(titleName, isPrefix) -- adds a new title all characters can use, isPrefix is 0 or 1, 1 for prefix, 0 for suffix
- returns master title id (sint32) -- if the title already exists, then it re-uses that id

AddCharacterTitle(Spawn, titleName) -- adds a character title to a spawn if not already present

- returns character title index id (sint32)

SetCharacterTitleSuffix(Spawn, titleName) -- sets the players suffix name, must have title already, otherwise AddCharacterTitle needs to be called first
SetCharacterTitlePrefix(Spawn, titleName) -- sets the players suffix name, must have title already, otherwise AddCharacterTitle needs to be called first

ResetCharacterTitleSuffix(Spawn) - empties title suffix
ResetCharacterTitlePrefix(Spawn) - empties title prefix
SQL Updates: ``` update commands set handler=286 where command='title' and subcommand='list'; update commands set handler=287 where command='title' and subcommand='setprefix'; update commands set handler=288 where command='title' and subcommand='setsuffix'; update commands set handler=289 where command='title' and subcommand='fix'; alter table character_details modify column prefix_title int(10) not null default -1; alter table character_details modify column suffix_title int(10) not null default -1; ``` New LUA Functions: ``` AddMasterTitle(titleName, isPrefix) -- adds a new title all characters can use, isPrefix is 0 or 1, 1 for prefix, 0 for suffix - returns master title id (sint32) -- if the title already exists, then it re-uses that id AddCharacterTitle(Spawn, titleName) -- adds a character title to a spawn if not already present - returns character title index id (sint32) SetCharacterTitleSuffix(Spawn, titleName) -- sets the players suffix name, must have title already, otherwise AddCharacterTitle needs to be called first SetCharacterTitlePrefix(Spawn, titleName) -- sets the players suffix name, must have title already, otherwise AddCharacterTitle needs to be called first ResetCharacterTitleSuffix(Spawn) - empties title suffix ResetCharacterTitlePrefix(Spawn) - empties title prefix ```
image 評論 4 年之前'
協同者

As an example this adds the prefix 'Developer' title to the player Spawn, then sets it as the active prefix, already an existing title in the database.

	AddCharacterTitle(Spawn, "Developer") -- adds to character_titles
	SetCharacterTitlePrefix(Spawn, "Developer") -- updates character_details
As an example this adds the prefix 'Developer' title to the player Spawn, then sets it as the active prefix, already an existing title in the database. ``` AddCharacterTitle(Spawn, "Developer") -- adds to character_titles SetCharacterTitlePrefix(Spawn, "Developer") -- updates character_details ```
image4 年之前 關閉
登入 才能加入這對話。
正在加載...
取消
保存
尚未有任何內容