///************************************* //* NWN-MySQL 4.0 (c) 2004 FastFrench * //************************************* // This file is licensed under the terms of the // GNU GENERAL PUBLIC LICENSE (GPL) Version 2 // ************************ // ** ff_on_activate.nss ** // ************************ // ** use this script on your OnActivate module event // ** (or add the instruction: // ** ExecuteScript("ff_on_activate", OBJECT_SELF); // ** at the beginning of your main function in your existing script #include "ff_include" void main() { if (!FF_USE_EXTERNAL_DATABASE) return; object oItem = GetItemActivated(); // get the item activated string sItemTag = GetTag(oItem); // and its tag string sItemName = GetName(oItem); // and its name object oActivator = GetItemActivator(); // get the wand's activator if (sItemName=="Un parchemin très fragile") { int NoIndice = StringToInt(sItemTag); string sMsg; if (NoIndice<=0) sMsg = "Celui qui a déposé cet objet là est un âne qui n'a rien compris dans toute la subtilité autour de sa mise en oeuvre !"; sMsg = ff_GetPersistentString("IndiceNo"+IntToString(NoIndice),"global", "... (pas de chance, vous ne parvenez pas a dechiffrer le message)..."); pwWriteLog(oActivator, "LECTURE", "INDICE", "'"+GetName(oActivator)+"' lit l'indice No "+IntToString(NoIndice)+": '"+sMsg+"'"); SendMessageToPC(oActivator, ff_Colorize("[db]Vous déroulez soigneusement le parchemin qui se désagrège alors que vous le lisez:\n[w]"+ sMsg)); FloatingTextStringOnCreature(ff_Colorize("[b]"+GetName(oActivator)+" déroule soigneusement le parchemin qui se désagrège sous vos yeux pendant qu'il le lit: '[w]"+sMsg+"[b]'[y]"), oActivator, TRUE); SQLExecDirect("DELETE FROM global WHERE VarName='IndiceNo"+IntToString(NoIndice)+"'"); DestroyObject(oItem); return; } if (sItemTag=="FastFrenchwand") { AssignCommand(oActivator, ActionStartConversation(oActivator, "ff_serverstat", TRUE, FALSE)); return; } }