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

Chiuso
aperto 4 anni fa da image · 1 commenti
image ha commentato 4 anni fa

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 ha commentato 4 anni fa
Collaboratori

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 ```
Sign in to join this conversation.
Caricamento...
Annulla
Salva
Non ci sono ancora contenuti.