34 lines
800 B
Plaintext
34 lines
800 B
Plaintext
/*
|
|
** CHD 0.0.1
|
|
** Author: Krisztian PIFKO <monsta@monsta.hu>
|
|
** License: GPL
|
|
** Last modified: 2004-12-04
|
|
**
|
|
** chd_on_conver.nss: look for spoken pattern of a PC and change it's deity
|
|
**
|
|
** use it in an NPC's on conversation event
|
|
*/
|
|
|
|
void main()
|
|
{
|
|
object oPC=GetLastSpeaker();
|
|
int nConversation = GetListenPatternNumber();
|
|
|
|
if (GetIsPC(oPC)){
|
|
|
|
if (nConversation == -1 && GetCommandable(OBJECT_SELF))
|
|
{
|
|
ClearAllActions();
|
|
BeginConversation();
|
|
}
|
|
|
|
if (nConversation==50){
|
|
string sNewDeity=GetMatchedSubstring(0);
|
|
if (sNewDeity!=""){
|
|
SetDeity(oPC,sNewDeity);
|
|
FloatingTextStringOnCreature("Your new deity is now "+sNewDeity+".",oPC,FALSE);
|
|
}
|
|
}
|
|
}
|
|
}
|