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

クローズ
4 年 前image によって開かれました · 1 コメント
image4 年 前 にコメントしました

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 ```
image4 年 前 にコメントしました
共同編集者

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 ```
image この課題がコミット 4 年 前 から参照されました
image 4 年 前 に閉じられました
会話に参加するには サインイン してください。
読み込み中…
キャンセル
保存
まだコンテンツがありません