///************************************* //* NWN-FF 4.0 (c) 2004 FastFrench * //************************************* // This file is licensed under the terms of the // GNU GENERAL PUBLIC LICENSE (GPL) Version 2 // ******************** // ** ff_modhb_inc.nss ** // ******************** // ** include file used to process speech data #include "ff_include" // Commandes PC const int CMD_ADMIN = 1; const int CMD_ANIM1 = 2; const int CMD_ANIM2 = 3; const int CMD_INCLINE = 4; const int CMD_ASSOIT = 5; const int CMD_VOLE = 6; const int CMD_SALUT = 7; const int CMD_GAUCHE = 8; const int CMD_DROITE = 9; const int CMD_LIT = 10; const int CMD_PAUSE2 = 11; const int CMD_PAUSE1 = 12; const int CMD_PAUSE3 = 13; const int CMD_PAUSE4 = 14; const int CMD_BONJOUR = 15; const int CMD_RIT = 16; const int CMD_DANCE = 17; const int CMD_MORT = 18; const int CMD_TROM = 19; const int CMD_FATIGUE = 20; const int CMD_PARLE = 21; const int CMD_PARLE2 = 22; const int CMD_PARLE3 = 23; const int CMD_SPASMES = 24; const int CMD_BOIT = 25; const int CMD_PRIE = 26; const int CMD_ECOUTE = 27; const int CMD_MEDITE = 28; const int CMD_AIDE = 29; const int CMD_SUIT = 30; const int CMD_FUIT = 31; const int CMD_JOURNAL = 32; const int CMD_STRIPTEASE = 34; const int CMD_SEPENCHE = 35; const int CMD_SEBAISSE = 36; const int CMD_CONJURE = 37; const int CMD_CONJURE2 = 38; const int CMD_REGARDELOIN = 39; const int CMD_ESQUIVE = 40; const int CMD_EVITE = 41; const int CMD_PROVOQUE = 42; const int CMD_VICTOIRE = 43; const int CMD_VICTOIRE2 = 44; const int CMD_VICTOIRE3 = 45; const int CMD_PAUSE = 46; const int CMD_VICTOIRE1 = 47; const int CMD_CONJURE1 = 48; const int CMD_MEGASPY = 49; const int CMD_CHANTE = 51; const int CMD_RONFLE = 52; const int CMD_SIFFLE = 53; const int CMD_ACCLAME = 54; const int CMD_ETERNUE = 55; const int CMD_GROGNE = 56; const int CMD_GEMIT = 57; const int CMD_PLEURE = 58; const int CMD_CRIT = 59; const int CMD_SERVEUR = 60; // Commande Anim const int CMD_VIVANT = 100; const int CMD_INVISIBLE = 101; const int CMD_RAPIDE = 102; const int CMD_VISIBLE = 103; const int CMD_BOUCLIER = 104; const int CMD_MINOR_POLYMORPH = 106; const int CMD_REGEN = 107; const int CMD_SETPOS = 108; const int CMD_RECALL = 109; const int CMD_DOUE = 110; const int CMD_ETHERAL = 111; const int CMD_NORMAL = 112; const int CMD_BOOST = 113; // Commande Anim Snr const int CMD_FAUBOURG = 200; const int CMD_MARSEILLE = 201; const int CMD_PAIX = 204; const int CMD_RESU = 205; const int CMD_BIEN = 206; const int CMD_MAL = 207; const int CMD_POLYMORPH = 208; const int CMD_MAJOR_POLYMORPH = 209; const int CMD_VAMPIREQG = 210; const int CMD_KARAK = 211; const int CMD_GB = 212; // Commande DM // Commande Admin const int CMD_AMOUR = 400; const int CMD_HAINE = 401; const int CMD_TEST1 = 402; const int CMD_TEST2 = 403; const int CMD_TEST3 = 404; const int CMD_DISPELDM = 405; const int CMD_DM = 406; void MagicMoveTo(object oPC, object oCible) { //AssignCommand(oPC,JumpToObject(oWP)); AssignCommand(oPC,ClearAllActions(TRUE)); effect eDi = EffectDisappear(); ApplyEffectToObject(DURATION_TYPE_INSTANT,eDi,oPC); AssignCommand(oPC,DelayCommand(3.0,JumpToLocation(GetLocation(oCible)))); } void InitSpeech() { object oSpeech = GetWaypointByTag("NWN_Speech"); SetLocalString(oSpeech, "NWNX!FFSPEECH!VERSION", "xxxxxxxxxxxxxxxxxxxxxxxx"); string sVersion = GetLocalString(oSpeech, "NWNX!FFSPEECH!VERSION"); if (sVersion=="xxxxxxxxxxxxxxxxxxxxxxxx") WriteTimestampedLogEntry("NWNx_FFSpeech.dll NOT LOADED !!"); else { WriteTimestampedLogEntry("NWNx_FFSpeech.dll version "+sVersion+" LOADED !!"); SetLocalInt(oSpeech, "GUsingSpeech", 1); } SetLocalString(oSpeech, "NWNX!FFSPEECH!FILTER", "*"); SetLocalString(oSpeech, "NWNX!FFSPEECH!DEADCANSPEAK", IntToString(FF_SPEECH_DEADCANSPEAK)); SetLocalString(oSpeech, "NWNX!FFSPEECH!INCLUDECHANNEL", IntToString(FF_SPEECH_GETCHANNEL)); SetLocalString(oSpeech, "NWNX!FFSPEECH!INCLUDEIP", IntToString(FF_SPEECH_GETIP)); SetLocalString(oSpeech, "Anim1", ff_GetPersistentString("GAnim1", "global", "FF ANIMATOR")); SetLocalString(oSpeech, "Anim2", ff_GetPersistentString("GAnim2", "global", "FF ANIMATOR LDR")); SetLocalInt(oSpeech, "THIS IS A SECRET KEY SENTENCE" , CMD_ADMIN ); SetLocalInt(oSpeech, GetLocalString(oSpeech, "Anim1") , CMD_ANIM1 ); SetLocalInt(oSpeech, GetLocalString(oSpeech, "Anim2") , CMD_ANIM2 ); SetLocalInt(oSpeech, "S'INCLINE" , CMD_INCLINE ); SetLocalInt(oSpeech, "BOW" , CMD_INCLINE ); SetLocalInt(oSpeech, "BOWS" , CMD_INCLINE ); SetLocalInt(oSpeech, "S'ASSOIT" , CMD_ASSOIT ); SetLocalInt(oSpeech, "SITS DOWN" , CMD_ASSOIT ); SetLocalInt(oSpeech, "SIT DOWN" , CMD_ASSOIT ); SetLocalInt(oSpeech, "SIT" , CMD_ASSOIT ); SetLocalInt(oSpeech, "VOLE" , CMD_VOLE ); SetLocalInt(oSpeech, "PICKPOCKET" , CMD_VOLE ); SetLocalInt(oSpeech, "STEAL" , CMD_VOLE ); SetLocalInt(oSpeech, "STEALS" , CMD_VOLE ); SetLocalInt(oSpeech, "SALUT" , CMD_SALUT ); SetLocalInt(oSpeech, "HELLO" , CMD_SALUT ); SetLocalInt(oSpeech, "GAUCHE" , CMD_GAUCHE ); SetLocalInt(oSpeech, "LEFT" , CMD_GAUCHE ); SetLocalInt(oSpeech, "DROITE" , CMD_DROITE ); SetLocalInt(oSpeech, "RIGHT" , CMD_DROITE ); SetLocalInt(oSpeech, "LIT" , CMD_LIT ); SetLocalInt(oSpeech, "READS" , CMD_LIT ); SetLocalInt(oSpeech, "READ" , CMD_LIT ); SetLocalInt(oSpeech, "PAUSE" , CMD_PAUSE ); SetLocalInt(oSpeech, "S'ENNUIE" , CMD_PAUSE2 ); SetLocalInt(oSpeech, "SE GRATTE LA TETE" , CMD_PAUSE1 ); SetLocalInt(oSpeech, "SCRATCHS HIS HEAD" , CMD_PAUSE1 ); SetLocalInt(oSpeech, "PAUSE2" , CMD_PAUSE3 ); SetLocalInt(oSpeech, "ATTEND" , CMD_PAUSE4 ); SetLocalInt(oSpeech, "WAIT" , CMD_PAUSE4 ); SetLocalInt(oSpeech, "WAITS" , CMD_PAUSE4 ); SetLocalInt(oSpeech, "BONJOUR" , CMD_BONJOUR ); SetLocalInt(oSpeech, "RIT" , CMD_RIT ); SetLocalInt(oSpeech, "LAUGH" , CMD_RIT ); SetLocalInt(oSpeech, "LAUGHS" , CMD_RIT ); SetLocalInt(oSpeech, "LOL" , CMD_RIT ); SetLocalInt(oSpeech, "DANCE" , CMD_DANCE ); SetLocalInt(oSpeech, "DANCES" , CMD_DANCE ); SetLocalInt(oSpeech, "MORT" , CMD_MORT ); SetLocalInt(oSpeech, "DEAD" , CMD_MORT ); SetLocalInt(oSpeech, "TROM" , CMD_TROM ); SetLocalInt(oSpeech, "DAED" , CMD_TROM ); SetLocalInt(oSpeech, "FATIGUE" , CMD_FATIGUE ); SetLocalInt(oSpeech, "TIRED" , CMD_FATIGUE ); SetLocalInt(oSpeech, "PARLE" , CMD_PARLE ); SetLocalInt(oSpeech, "SPEAK" , CMD_PARLE ); SetLocalInt(oSpeech, "SPEAKS" , CMD_PARLE ); SetLocalInt(oSpeech, "PLAIDE" , CMD_PARLE2 ); SetLocalInt(oSpeech, "PARLE AVEC FORCE" , CMD_PARLE3 ); SetLocalInt(oSpeech, "SPASMES" , CMD_SPASMES ); SetLocalInt(oSpeech, "BOIT" , CMD_BOIT ); SetLocalInt(oSpeech, "DRINK" , CMD_BOIT ); SetLocalInt(oSpeech, "DRINKS" , CMD_BOIT ); SetLocalInt(oSpeech, "PRIE" , CMD_PRIE ); SetLocalInt(oSpeech, "PRAY" , CMD_PRIE ); SetLocalInt(oSpeech, "ECOUTE" , CMD_ECOUTE ); SetLocalInt(oSpeech, "LISTEN" , CMD_ECOUTE ); SetLocalInt(oSpeech, "LISTENS" , CMD_ECOUTE ); SetLocalInt(oSpeech, "MEDITE" , CMD_MEDITE ); SetLocalInt(oSpeech, "AIDE" , CMD_AIDE ); SetLocalInt(oSpeech, "HELP" , CMD_AIDE ); SetLocalInt(oSpeech, "SOS" , CMD_AIDE ); SetLocalInt(oSpeech, "SUIT" , CMD_SUIT ); SetLocalInt(oSpeech, "FOLLOW" , CMD_SUIT ); SetLocalInt(oSpeech, "FOLLOWS" , CMD_SUIT ); SetLocalInt(oSpeech, "FUIT" , CMD_FUIT ); SetLocalInt(oSpeech, "FLEE" , CMD_FUIT ); SetLocalInt(oSpeech, "FLEES" , CMD_FUIT ); SetLocalInt(oSpeech, "JOURNAL" , CMD_JOURNAL ); SetLocalInt(oSpeech, "STRIP-TEASE" , CMD_STRIPTEASE ); SetLocalInt(oSpeech, "SE PENCHE" , CMD_SEPENCHE ); SetLocalInt(oSpeech, "SE BAISSE" , CMD_SEBAISSE ); SetLocalInt(oSpeech, "CONJURE1" , CMD_CONJURE1 ); SetLocalInt(oSpeech, "CONJURE2" , CMD_CONJURE2 ); SetLocalInt(oSpeech, "REGARDE AU LOIN" , CMD_REGARDELOIN ); SetLocalInt(oSpeech, "ESQUIVE" , CMD_ESQUIVE ); SetLocalInt(oSpeech, "DODGE" , CMD_ESQUIVE ); SetLocalInt(oSpeech, "DODGES" , CMD_ESQUIVE ); SetLocalInt(oSpeech, "EVITE" , CMD_EVITE ); SetLocalInt(oSpeech, "AVOID" , CMD_EVITE ); SetLocalInt(oSpeech, "AVOIDS" , CMD_EVITE ); SetLocalInt(oSpeech, "PROVOQUE" , CMD_PROVOQUE ); SetLocalInt(oSpeech, "VICTOIRE" , CMD_VICTOIRE ); SetLocalInt(oSpeech, "VICTOIRE1" , CMD_VICTOIRE2 ); SetLocalInt(oSpeech, "VICTOIRE2" , CMD_VICTOIRE2 ); SetLocalInt(oSpeech, "VICTOIRE3" , CMD_VICTOIRE3 ); SetLocalInt(oSpeech, "VICTORY" , CMD_VICTOIRE ); SetLocalInt(oSpeech, "VICTORY1" , CMD_VICTOIRE2 ); SetLocalInt(oSpeech, "VICTORY2" , CMD_VICTOIRE2 ); SetLocalInt(oSpeech, "VICTORY3" , CMD_VICTOIRE3 ); SetLocalInt(oSpeech, "CONJURE" , CMD_CONJURE ); SetLocalInt(oSpeech, "MEGASPY" , CMD_MEGASPY ); SetLocalInt(oSpeech, "CHANTE" , CMD_CHANTE ); SetLocalInt(oSpeech, "SING" , CMD_CHANTE ); SetLocalInt(oSpeech, "SINGS" , CMD_CHANTE ); SetLocalInt(oSpeech, "RONFLE" , CMD_RONFLE ); SetLocalInt(oSpeech, "SIFFLE" , CMD_SIFFLE ); SetLocalInt(oSpeech, "ACCLAME" , CMD_ACCLAME ); SetLocalInt(oSpeech, "ETERNUE" , CMD_ETERNUE ); SetLocalInt(oSpeech, "GROGNE" , CMD_GROGNE ); SetLocalInt(oSpeech, "GEMIT" , CMD_GEMIT ); SetLocalInt(oSpeech, "PLEURE" , CMD_PLEURE ); SetLocalInt(oSpeech, "CRY" , CMD_PLEURE ); SetLocalInt(oSpeech, "CRIES" , CMD_PLEURE ); SetLocalInt(oSpeech, "CRIT" , CMD_CRIT ); SetLocalInt(oSpeech, "SERVEUR" , CMD_SERVEUR ); SetLocalInt(oSpeech, "SERVER" , CMD_SERVEUR ); SetLocalInt(oSpeech, "INVISIBLE" , CMD_INVISIBLE ); SetLocalInt(oSpeech, "NORMAL" , CMD_NORMAL ); SetLocalInt(oSpeech, "ETHERAL" , CMD_ETHERAL ); SetLocalInt(oSpeech, "DOUE" , CMD_DOUE ); SetLocalInt(oSpeech, "SETPOS" , CMD_SETPOS ); SetLocalInt(oSpeech, "RECALL" , CMD_RECALL ); SetLocalInt(oSpeech, "REGEN" , CMD_REGEN ); SetLocalInt(oSpeech, "POLYMORPH" , CMD_POLYMORPH ); SetLocalInt(oSpeech, "MINOR POLYMORPH" , CMD_MINOR_POLYMORPH ); SetLocalInt(oSpeech, "MAJOR POLYMORPH" , CMD_MAJOR_POLYMORPH ); SetLocalInt(oSpeech, "VIVANT" , CMD_VIVANT ); SetLocalInt(oSpeech, "ALIVE" , CMD_VIVANT ); SetLocalInt(oSpeech, "RAPIDE" , CMD_RAPIDE ); SetLocalInt(oSpeech, "FAST" , CMD_RAPIDE ); SetLocalInt(oSpeech, "VISIBLE" , CMD_VISIBLE ); SetLocalInt(oSpeech, "BOUCLIER" , CMD_BOUCLIER ); SetLocalInt(oSpeech, "SHIELD" , CMD_BOUCLIER ); SetLocalInt(oSpeech, "PAIX" , CMD_PAIX ); SetLocalInt(oSpeech, "PEACE" , CMD_PAIX ); SetLocalInt(oSpeech, "RESU" , CMD_RESU ); SetLocalInt(oSpeech, "BIEN" , CMD_BIEN ); SetLocalInt(oSpeech, "GOOD" , CMD_BIEN ); SetLocalInt(oSpeech, "MAL" , CMD_MAL ); SetLocalInt(oSpeech, "EVIL" , CMD_MAL ); SetLocalInt(oSpeech, "AMOUR" , CMD_AMOUR ); SetLocalInt(oSpeech, "LOVE" , CMD_AMOUR ); SetLocalInt(oSpeech, "HAINE" , CMD_HAINE ); SetLocalInt(oSpeech, "HATE" , CMD_HAINE ); SetLocalInt(oSpeech, "TEST1" , CMD_TEST1 ); SetLocalInt(oSpeech, "TEST2" , CMD_TEST2 ); SetLocalInt(oSpeech, "TEST3" , CMD_TEST3 ); SetLocalInt(oSpeech, "GB" , CMD_GB ); SetLocalInt(oSpeech, "BOOST" , CMD_BOOST ); SetLocalInt(oSpeech, "DISPELDM" , CMD_DISPELDM ); SetLocalInt(oSpeech, "DM" , CMD_DM ); } void GoodEffect(object oAfPC, object oPC, int iLevel) // 0: effets visuels 1: soin et effet visuel, 2: plus resu, 3: plus effets { if (iLevel>1) if (GetIsDead(oAfPC)) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oAfPC); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_RAISE_DEAD), oAfPC); ff_FlushData(oAfPC); DeleteLocalObject(oAfPC, "LastBadPK"); WriteTimestampedLogEntry("> (DM)"+GetName(oPC)+" ressuscite "+GetName(oAfPC)); } ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_HEALING_X),oAfPC); if (iLevel>0) { int iMaxHP = GetMaxHitPoints(oAfPC); int iCurrentHP = GetCurrentHitPoints(oAfPC); if (iMaxHP != 0 && iMaxHP!=iCurrentHP) { int iDamage = iMaxHP-iCurrentHP; ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(iDamage),oAfPC); if (!GetIsInCombat(oAfPC)) AssignCommand(oAfPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, 1.0, 10.0)); } } if (iLevel>2) { if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectAttackIncrease(Random(8)+1),oAfPC, 10.0+Random(60)*Random(5)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectDamageIncrease(Random(8)+1,DAMAGE_TYPE_DIVINE),oAfPC, 10.0+Random(60)*Random(5)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectACIncrease(Random(8)+1),oAfPC, 10.0+Random(60)*Random(5)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectMovementSpeedIncrease(Random(100)),oAfPC, 10.0+Random(60)*Random(5)); } } void BadEffect(object oAfPC, object oPC, int iLevel) // 0/1: juste anim et effet visual, 2: degats, 3: degats et effets { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY),oAfPC); AssignCommand(oAfPC, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_BACK, 1.0, 3.0)); if (iLevel>2) { if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectDisease(Random(DISEASE_VERMIN_MADNESS+1)),oAfPC, 10.0+Random(60)*Random(5)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectPoison(Random(POISON_IRON_GOLEM+1)),oAfPC, 10.0+Random(60)*Random(5)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectConfused(),oAfPC, 10.0+Random(60)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectCurse(Random(5),Random(5),Random(5),Random(5),Random(5),Random(5)),oAfPC, 10.0+Random(60)*Random(5)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectMovementSpeedDecrease(Random(100)),oAfPC, 10.0+Random(80)); if (Random(3)==0) ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectACDecrease(Random(8)+1),oAfPC, 10.0+Random(60)*Random(5)); } if (iLevel>1) { int iCurrentHP = GetCurrentHitPoints(oAfPC); if (iCurrentHP>1) { int iDamage = Random(iCurrentHP); ApplyEffectToObject(DURATION_TYPE_INSTANT,SupernaturalEffect(EffectDamage(iDamage,DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE)),oAfPC); } } } void CreateAndSend(object oPC, string sName, string sMsg) { object oPigeon = CreateObject(OBJECT_TYPE_CREATURE, "ff_pigeon2", GetLocation(oPC), TRUE); AssignCommand(oPigeon,SetIsDestroyable(TRUE, FALSE, FALSE)); effect ef = EffectDisappear(); DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,ef,oPigeon)); SQLExecDirect("SELECT Id,Actif FROM idplayer WHERE Name='"+SQLEncodeSpecialChars(sName)+"' AND Ban=0 LIMIT 1"); string sDest = sName; if (SQLLocalFetch()!=SQL_SUCCESS) { SQLExecDirect("SELECT Name,Id,Actif FROM idplayer WHERE Name RLIKE '"+SQLEncodeSpecialChars(sName)+"' AND Ban=0 LIMIT 1"); if (SQLLocalFetch()!=SQL_SUCCESS) { SendMessageToPC(oPC,"Il n'y a aucun personnage actif du nom de "+sName+" dans ce monde: votre pigeon part a l'aveuglette"); DelayCommand(7.0, DestroyObject(oPigeon)); return; } else { sDest = SQLDecodeSpecialChars(SQLLocalEatData()); SendMessageToPC(oPC,"Le pigeon ira remettre ce message a '"+sDest+"' (et non '"+sName+"' qui n'existe pas)"); } } string Id = SQLLocalEatData(); string sMesFin = "[g]"+GetName(oPC)+"[dg] vous écrit '[w]"+sMsg+"[dg]'"; if (SQLLocalEatDataInt()==1) { object oDest=GetFirstPC(); while (oDest!=OBJECT_INVALID) { if (GetLocalString(oDest, "PWId")==Id) { //SendPigeonToPC(oDest, sMesFin); SendMessageToAllDMs(GetName(oPC)+" send to "+sDest+" the following message: '"+ff_Colorize(sMesFin)+"'"); SendMessageToPC(oPC,"The pigeon reaches its destination and gives his message "+sDest); SendMessageToPC(oDest,"A pigeon just arrived and gives you the following message:\n"+ff_Colorize(sMesFin)); object oPig2 = CreateObject(OBJECT_TYPE_CREATURE, "ff_pigeon2", GetLocation(oDest), TRUE); AssignCommand(oPig2,SetIsDestroyable(TRUE, FALSE, FALSE)); //AssignCommand(oPig2, DelayCommand(6.0, SpeakString(Colorize(sMesFin)))); CreateItemOnObject("ff_pigeonobj",oDest); DestroyObject(oPig2,10.0); DestroyObject(oPigeon,15.0); return; } oDest = GetNextPC(); } } // string sId = GetLocalString(oPlayer, "PWId"); SQLExecDirect("INSERT INTO logactions (Id,Action,OnlyOnce,DelayFromLoad,Value1,Date) VALUES("+Id+",'MESSAGE',1,20,'"+SQLEncodeSpecialChars(sMesFin)+"',NOW())");// Actions a etendre a tous les joueurs actifs SendMessageToPC(oPC,"Le pigeon ne parvient pas a trouver le destinataire du message, il continuera a le chercher jusqu'a ce qu'il trouve "+sDest); SendMessageToAllDMs(GetName(oPC)+" a envoye a "+sDest+" le message suivant: '"+sMesFin+"'. Ce message est stocke dans la base de donnees pour quand il se connectera."); DelayCommand(15.0, DestroyObject(oPigeon)); //AssignCommand(oPC,ActionDoCommand(DestroyObject(oPigeon))); } void subloop(object oSpeech, int bUsingSpeech); void boucle() { object oSpeech=GetWaypointByTag("NWN_Speech"); int bUsingSpeech = GetLocalInt(oSpeech, "GUsingSpeech"); if (bUsingSpeech == 0) return; bUsingSpeech++; SetLocalInt(oSpeech, "GUsingSpeech", bUsingSpeech); subloop(oSpeech, bUsingSpeech); } void subloop(object oSpeech, int bUsingSpeech) { if (GetLocalInt(oSpeech, "GUsingSpeech") != bUsingSpeech) return; SetLocalString(oSpeech, "NWNX!FFSPEECH!HASSPEECH", "0"); if (GetLocalString(oSpeech, "NWNX!FFSPEECH!HASSPEECH")=="0") {DelayCommand(0.2, subloop(oSpeech, bUsingSpeech));return;} string sBuf = GetLocalString(GetNWNMySQLWP(), "NWNX!ODBC!SPACER"); SetLocalString(oSpeech, "NWNX!FFSPEECH!GETSPEECH", sBuf); LOCAL_BUFFER = GetLocalString(oSpeech, "NWNX!FFSPEECH!GETSPEECH"); int Nb=0; object oPC; string sExtract; while (GetStringLength(LOCAL_BUFFER)>2) { string sName = SQLLocalEatData(); // Not really SQL data, but the string has the same format int iCanal = SPEECHVOLUME_INVALID; // string sIP="127.0.0.1"; if (FF_SPEECH_GETIP) sIP = SQLLocalEatData(); if (FF_SPEECH_GETCHANNEL) // Channel needed iCanal = SQLLocalEatDataInt(); string sSpeech = SQLLocalEatData(); // Not really SQL data, but the string has the same format Nb++; int bFound = FALSE; effect ef; oPC = GetLocalObject(oSpeech,sName); if (oPC == OBJECT_INVALID) { if (FF_SPEECH_GETIP && (GetLocalObject(oSpeech,sIP)!=OBJECT_INVALID) ) oPC = GetLocalObject(oSpeech,sIP); else { WriteTimestampedLogEntry("Name='"+sName+"' => aucun objet associe (sSpeech='"+sSpeech+"')"); continue; } } int iLVPlayer = GetLocalInt(oPC, "DM_STATUS"); if (iLVPlayer==0) { WriteTimestampedLogEntry("Name='"+sName+"', sSpeech='"+sSpeech+"' => iLVPlayer=0) - Name(oPC): "+GetName(oPC)); continue; } if (GetPCPlayerName(oPC)!=sName && GetPCIPAddress(oPC)!=sIP) { object oPC2 = GetLocalObject(oSpeech,"B¬"+sName); if (GetIsObjectValid(oPC2) && GetPCPlayerName(oPC2)==sName) { oPC = oPC2; bFound = 2; } else { oPC2 = GetLocalObject(oSpeech,"B¬"+sIP); if (GetIsObjectValid(oPC2) && GetPCIPAddress(oPC2)==sIP) { oPC = oPC2; bFound = 2; } } } else { bFound = TRUE; ff_FlushData(oPC); } if (bFound == FALSE) { if (GetIsPossessedFamiliar(GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC))) { object oPC2 = GetAssociate(ASSOCIATE_TYPE_FAMILIAR,oPC); //string sReport = GetName(oPC)+" parle a travers son familier "+GetName(oPC2)+" ? :'"+sSpeech+"'"; if (GetPCPlayerName(oPC2)==sName) { SetLocalInt(oPC2, "DM_STATUS", iLVPlayer); SetLocalObject(oSpeech,"B¬"+sName,oPC2); SetLocalObject(oSpeech,"B¬"+sIP,oPC2); //sReport += " (IP OK)"; oPC = oPC2; bFound = 2; } else { string sReport = GetName(oPC)+" parle a travers son familier "+GetName(oPC2)+" ? :'"+sSpeech+"' (PCNames differ: '"+GetPCPlayerName(oPC2)+"' vs '"+sName+"')"; WriteTimestampedLogEntry(sReport); SendMessageToAllDMs(sReport); } } else if (GetIsDM(oPC)) { int iLocStar = FindSubString(sSpeech, "*"); if (iLocStar<0) continue; location lLoc = GetLocalLocation(oPC, "Position"); object oTarget; string sReport = "Recherche du NPC incarne par '"+GetName(oPC)+"' dans '"+GetName(GetAreaFromLocation(lLoc))+"'..."; WriteTimestampedLogEntry(sReport); SendMessageToPC(oPC,sReport); /// int Nb=1; while ((oTarget = GetNearestCreatureToLocation(CREATURE_TYPE_IS_ALIVE, TRUE, lLoc, Nb++))!=OBJECT_INVALID) { if (GetIsObjectValid(oTarget)) if (GetIsDMPossessed(oTarget)) { SendMessageToPC(oTarget, GetName(oTarget)+" (dans '"+GetName(OBJECT_SELF)+"') est possede par un DM !\n IP:"+GetPCIPAddress(oTarget)+"\n GetPCPlayerName:"+GetPCPlayerName(oTarget)+"\n Tag:"+GetTag(oTarget)+"\n Master:"+GetName(GetMaster(oTarget))); WriteTimestampedLogEntry("Recherche DM(Speech) => "+ GetName(oTarget)+" (dans '"+GetName(OBJECT_SELF)+"') est possede par un DM !\n IP:"+GetPCIPAddress(oTarget)+"\n GetPCPlayerName:"+GetPCPlayerName(oTarget)+"\n Tag:"+GetTag(oTarget)+"\n Master:"+GetName(GetMaster(oTarget))); SetLocalObject(oSpeech,"B¬"+GetPCPlayerName(oTarget),oTarget); SetLocalObject(oSpeech,"B¬"+GetPCIPAddress(oTarget),oTarget); SetLocalInt(oTarget, "DM_STATUS", GetLocalInt(GetMaster(oTarget),"DM_STATUS")); if (GetMaster(oTarget) == oPC) { bFound = 2; SendMessageToAllDMs(sReport); oPC = oTarget; break; } } } } if (!GetIsObjectValid(oPC) || (bFound==FALSE)) continue; } if (iLVPlayer=LV_ANIM1) && ((GetStringLeft(sExtract,7)=="INDICE:") || (GetStringLeft(sExtract,5)=="HINT:") || (GetStringLeft(sExtract,7)=="SCROLL:"))) { string sName=GetSubString(sSpeech, 7, iLocStar2 - 7); SendMessageToPC(oPC,"Creation of a new scroll-hint:'"+sName+"'"); int NbIndice = ff_GetPersistentInt("GNextIndice","global", 1); CreateObject(OBJECT_TYPE_ITEM, "ff_indice",GetLocation(oPC),TRUE,IntToString(NbIndice)); AssignCommand(oPC,ff_SetPersistentInt("GNextIndice",NbIndice+1)); AssignCommand(oPC,ff_SetPersistentString("IndiceNo"+IntToString(NbIndice),sName)); AssignCommand(oPC,pwWriteLog(oPC, "ANIM", "INDICE", "'"+GetName(oPC)+"' ecrit l'indice No "+IntToString(NbIndice)+" a "+GetName(GetArea(oPC))+": '"+sName+"'")); } else if (iLVPlayer==LV_ADMIN) if (GetStringLeft(sExtract,3)=="WP:") { string sName = GetSubString(sSpeech,3, GetStringLength(sExtract)-3); object oWP = GetWaypointByTag(sName); if (!GetIsObjectValid(oWP)) oWP = GetObjectByTag(sName); if (!GetIsObjectValid(oWP)) // Ni un WP, ni un objet => recherche d'un joueur avec ce nom // { object oAfPC = GetFirstPC(); while (oAfPC!=OBJECT_INVALID) { if ( (GetName(oAfPC)==sName) || (GetPCPlayerName(oAfPC)==sName) ) { oWP = oAfPC; break; } oAfPC =GetNextPC(); } } // if (GetIsObjectValid(oWP)) { AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "WP:", GetName(oPC)+" se teleporte vers '"+GetSubString(sSpeech,3, GetStringLength(sExtract)-3)+"' (cible OK)")); MagicMoveTo(oPC, oWP); } else { AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "WP:", GetName(oPC)+" voudrait aller vers '"+GetSubString(sSpeech,3, GetStringLength(sExtract)-3)+"' (cible INVALIDE)")); SendMessageToPC(oPC,GetSubString(sSpeech,3, GetStringLength(sExtract)-3)+" ??! C'est quoi ca ?! (ni un WP, ni le TAG d'un object, ni meme un PC valide)"); } } else if (GetStringLeft(sExtract,4)=="RUN:") { ExecuteScript(GetSubString(sExtract,4, GetStringLength(sExtract)-4),oPC); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "RUN", GetName(oPC)+" lance: '"+sExtract+"'")); } else if (GetStringLeft(sExtract,7)=="SETANIM") { string sPSW = GetSubString(sExtract,9, GetStringLength(sExtract)-9); if (GetStringLeft(sExtract,9)=="SETANIM1:") { string OldPsw = GetLocalString(oSpeech, "Anim1"); DeleteLocalInt(oSpeech, OldPsw); SetLocalInt(oSpeech, sPSW, CMD_ANIM1); SetLocalString(oSpeech, "Anim1", sPSW); AssignCommand(oPC,ff_SetPersistentString("GAnim1", sPSW)); SendMessageToPC(oPC," Ancien mot de passe Animateur Basic:"+ OldPsw+", Nouveau mot de passe:"+sPSW); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "ANIM1", GetName(oPC)+" a change de mot de passe: "+OldPsw+"=>"+sPSW)); SendMessageToAllDMs("Mot de passe Anim1 change par "+GetName(oPC)); object oAfPC = GetFirstPC(); while (oAfPC!=OBJECT_INVALID) { if (GetLocalInt(oAfPC, "DM_STATUS") == LV_ANIM1) { ef = GetFirstEffect(oAfPC); int iType, iSubType, iDuration; while (GetIsEffectValid(ef)) { iType = GetEffectType(ef); if ( (GetEffectDurationType(ef) == DURATION_TYPE_PERMANENT) && (GetEffectSubType(ef) == SUBTYPE_MAGICAL)) RemoveEffect(oAfPC,ef); ef = GetNextEffect(oAfPC); } SendMessageToPC(oAfPC,"Sniff, vous perdez tous vos super-pouvoirs :("); SendMessageToAllDMs(GetName(oAfPC)+" perd tous ses super-pouvoirs :)"); if (GetSubRace(oAfPC)=="Vampire") SetLocalInt(oAfPC, "DM_STATUS",LV_VAMPIRE); else SetLocalInt(oAfPC, "DM_STATUS",LV_PC); } oAfPC =GetNextPC(); } } if (GetStringLeft(sExtract,9)=="SETANIM2:") { string OldPsw = GetLocalString(oSpeech, "Anim2"); DeleteLocalInt(oSpeech, OldPsw); SetLocalInt(oSpeech, sPSW, CMD_ANIM2); SetLocalString(oSpeech, "Anim2", sPSW); AssignCommand(oPC,ff_SetPersistentString("GAnim2", sPSW)); SendMessageToPC(oPC," Ancien mot de passe Animateur Avance:"+ OldPsw+", Nouveau mot de passe:"+sPSW); SendMessageToAllDMs("Mot de passe Anim2 change par "+GetName(oPC)); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "ANIM2", GetName(oPC)+" a change de mot de passe: "+OldPsw+"=>"+sPSW)); object oAfPC = GetFirstPC(); while (oAfPC!=OBJECT_INVALID) { if (GetLocalInt(oAfPC, "DM_STATUS") == LV_ANIM2) { ef = GetFirstEffect(oAfPC); int iType, iSubType, iDuration; while (GetIsEffectValid(ef)) { iType = GetEffectType(ef); if ( (GetEffectDurationType(ef) == DURATION_TYPE_PERMANENT) && (GetEffectSubType(ef) == SUBTYPE_MAGICAL)) RemoveEffect(oAfPC,ef); ef = GetNextEffect(oAfPC); } SendMessageToPC(oAfPC,"Sniff, vous perdez tous vos super-pouvoirs :("); SendMessageToAllDMs(GetName(oAfPC)+" perd tous ses super-pouvoirs :)"); if (GetSubRace(oAfPC)=="Vampire") SetLocalInt(oAfPC, "DM_STATUS",LV_VAMPIRE); else SetLocalInt(oAfPC, "DM_STATUS",LV_PC); } oAfPC =GetNextPC(); } } // SETANIM2: } // SETANIM } // NoCommand == 0 else if (NoCommand=LV_ANIM1) { ef = GetFirstEffect(oPC2); int iType, iSubType, iDuration; int Dispeled = FALSE; if (GetIsDead(oPC2)) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPC2); DeleteLocalObject(oPC2, "LastBadPK"); } int iMaxHP = GetMaxHitPoints(oPC2); int iCurrentHP = GetCurrentHitPoints(oPC2); if (iMaxHP != 0 && iMaxHP>iCurrentHP) { int iDamage = iMaxHP-iCurrentHP; ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(iDamage),oPC2); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_HEALING_X),oPC2); } ef = GetFirstEffect(oPC2); while (GetIsEffectValid(ef)) { Dispeled = TRUE; RemoveEffect(oPC2,ef); ef = GetNextEffect(oPC2); } AssignCommand(oPC2,ff_FlushData(oPC2)); if (Dispeled) SendMessageToPC(oPC2,"Sniff, vous perdez tous vos super-pouvoirs :("); SendMessageToAllDMs(GetName(oPC2)+" perd tous ses super-pouvoirs :)"); } oPC2 = GetNextPC(); } break; } case CMD_ADMIN: { SetLocalInt(oPC, "DM_STATUS", LV_ADMIN); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(60), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageResistance(4095,10000), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageImmunityIncrease(4095, 100), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectRegenerate(50,1.0), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(50,ATTACK_BONUS_MISC),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectModifyAttacks(5),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_SONIC),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_COLD),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_FIRE),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_MAGICAL),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_SLASHING),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectACIncrease(100, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL),oPC)); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "LOG", GetName(oPC)+" est devenu ADMINISTRATEUR")); break; } case CMD_ANIM1: { SetLocalInt(oPC, "DM_STATUS",LV_ANIM1); SendMessageToPC(oPC, "Vous voila desormais ANIMATEUR"); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW, 1.0)); AssignCommand(oPC,pwWriteLog(oPC, "ANIM1", "LOG", GetName(oPC)+" est devenu Animateur Basic")); break; } case CMD_ANIM2: { SetLocalInt(oPC, "DM_STATUS",LV_ANIM2); SendMessageToPC(oPC, "Vous voila desormais ANIMATEUR Senior"); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW, 1.0)); AssignCommand(oPC,pwWriteLog(oPC, "ANIM2", "LOG", GetName(oPC)+" est devenu Animateur Avance")); break; } case CMD_INCLINE: { AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW, 1.0)); break; } case CMD_ASSOIT: { AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS, 1.0, 300.0)); break; } case CMD_VOLE: { AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_STEAL, 1.0)); break; } case CMD_SALUT: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_GOODBYE,oPC))); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE, 1.0)); break; } case CMD_GAUCHE: { AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 1.0)); break; } case CMD_DROITE: { AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_RIGHT, 1.0)); break; } case CMD_LIT: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_READ)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_READ)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_READ)); break; } case CMD_PAUSE2: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_BORED,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_PAUSE_BORED)); break; } case CMD_PAUSE1: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD)); break; } case CMD_PAUSE3: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_PAUSE,1.0,3.0)); break; } case CMD_PAUSE4: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_PAUSE2,1.0,5.0)); break; } case CMD_BONJOUR: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_HELLO,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_GREETING)); break; } case CMD_RIT: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_LAUGH,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 1.0, 7.0)); break; } case CMD_DANCE: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY2)); AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_LAUGH,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 3.0, 2.0)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_GET_MID, 3.0, 2.0)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3)); AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_LAUGH,oPC))); break; } case CMD_STRIPTEASE: { object oItemstrips = GetItemInSlot (INVENTORY_SLOT_CHEST, oPC); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2,1.0)); AssignCommand(oPC, ActionDoCommand(SetFacing (DIRECTION_WEST))); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP,1.0)); //the strip part AssignCommand(oPC, ActionUnequipItem (oItemstrips)); //more danceing AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2,1.0)); AssignCommand(oPC, ActionDoCommand(SetFacing (DIRECTION_EAST))); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW,1.0)); AssignCommand(oPC, ActionDoCommand(SetFacing (DIRECTION_WEST))); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP,1.0)); AssignCommand(oPC, ActionDoCommand(SetFacing (DIRECTION_EAST))); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2,1.0)); AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW,1.0)); AssignCommand(oPC, ActionEquipItem(oItemstrips, INVENTORY_SLOT_CHEST)); break; } case CMD_MORT: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_DEATH,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_DEAD_FRONT, 1.0, 240.0)); break; } case CMD_TROM: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_DEATH,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_DEAD_BACK, 1.0, 240.0)); break; } case CMD_FATIGUE: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_PAUSE_TIRED, 1.0, 10.0)); PlayVoiceChat(VOICE_CHAT_REST, oPC); break; } case CMD_PARLE: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_NORMAL, 1.0, 15.0)); break; } case CMD_PARLE2: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_PLEADING, 1.0, 10.0)); break; } case CMD_PARLE3: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 7.0)); break; } case CMD_SPASMES: { switch (Random(5)) { case 0: AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_PAIN1,oPC))); break; case 1: AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_PAIN2,oPC))); break; case 2: AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_PAIN3,oPC))); break; case 3: AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_POISONED,oPC))); break; case 4: AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_NEARDEATH,oPC))); break; } AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_SPASM, 1.0, 7.0)); break; } case CMD_BOIT: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_CHEER,oPC))); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_FIREFORGET_DRINK, 1.0)); AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, 12.0)); break; } case CMD_PRIE: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_WORSHIP, 1.0, 180.0)); break; } case CMD_ECOUTE: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_LISTEN, 1.0, 7.0)); break; } case CMD_MEDITE: { AssignCommand(oPC, ActionPlayAnimation( ANIMATION_LOOPING_MEDITATE, 1.0, 120.0)); break; } case CMD_SEPENCHE: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 1.0, 5.0)); break; } case CMD_SEBAISSE: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_LOW, 1.0, 5.0)); break; } case CMD_PROVOQUE: { AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_TAUNT,oPC))); AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_TAUNT)); break; } case CMD_VICTOIRE: { switch (Random(3)) { case 0: AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY1)); break; case 1: AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY2)); break; case 2: AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY3)); break; } break; } case CMD_VICTOIRE1: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY1)); break; } case CMD_VICTOIRE2: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY2)); break; } case CMD_VICTOIRE3: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY3)); break; } case CMD_CONJURE: { switch (Random(2)) { case 0: AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_CONJURE1, 1.0, 3.0+Random(6))); break; case 1: AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_CONJURE2, 1.0, 3.0+Random(6))); break; } break; } case CMD_CONJURE1: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_CONJURE1, 1.0, 5.0)); break; } case CMD_CONJURE2: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_CONJURE2, 1.0, 5.0)); break; } case CMD_ESQUIVE: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_DODGE_DUCK)); break; } case CMD_EVITE: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_FIREFORGET_DODGE_SIDE)); break; } case CMD_REGARDELOIN: { AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_LOOK_FAR, 1.0, 5.0)); break; } case CMD_AIDE: { //AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_HELP,oPC))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[y]Here is the list of all the orders you can say on any channel (talk...). Just enclose them with two stars '*'"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[y]For instance, on the channel 'talk', you can try to type: [w]/tp MyAccount *ECOUTE* *MEDITE* *SPASMES* *DEAD*\n"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Long animations:[g] *Medite*, *Prie*, *Dead*, *Daed*, *S'assoit*"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Complex animations:[g] *Dance*, *Strip-tease*"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Short pauses (2 to 7 seconds):[g] *Pause*, *Attend*, *Se gratte la tete*, *S'ennuie*, *Regarde au loin*, *Ecoute*, *Fatigue*"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Communication:[g] *Speak*, *Plaide*, *Parle avec force*, *Rit* (ou *LOL*), *Lit*, *Bonjour*, *Provoque*"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Random animations:[g] *Conjure* (*Conjure1*, *Conjure2*), *Victory* (*Victory1*, *Victory2*, *Victory3*)"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Other animations:[g] *Drink*, *Spasmes*, *Right*, *Left*, *Salut*, *Vole*, *S'incline*, *Se penche*, *Se baisse*\n"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Other kind of actions: [b]*Suit*, *Fuit*, *Journal*, *Help*[y]"))); if (iLVPlayer >= LV_ANIM1) AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Distant RP communication: [b]*Write to Nom:Message*[y]"))); else AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("[w]Distant RP communication: [b]*Write to Nom:Message* (need a pigeon egg)[y]"))); //if (iLVPlayer >= LV_VAMPIRE) // AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("\n[w]For the vampires: [c]*Time*, *noirceur*\n"))); if (iLVPlayer >= LV_ANIM1) AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("\n[w]For the animators: [c]*Alive*, *Invisible*, *Visible*, *Shield*, *Fast*, *Minor Polymorph*, *Doue*, *Regen*, *SetPos*, *Recall*, *Etheral*, *Boost*, *Normal*, [w]*Scroll:*\n"))); if (iLVPlayer >= LV_ANIM2) AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("\n[w]For the senior animators: [g]*Resu*, *Evil*, *Good*, *Peace*, [w]*Polymorph*, *Major Polymorph*, *GB*\n"))); //(No DM command left on this light version) //if (iLVPlayer >= LV_DM) // AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("\n[w]Pour les DMs: [c]\n"))); if (iLVPlayer >= LV_ADMIN) { AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("\n[w]And for the admins: [c]*WP:xxx*, *RUN:xxx*, *Love*, *Hate*[y]\n"))); AssignCommand(oPC, SendMessageToPC(oPC,ff_Colorize("\n[dw]And **secret** commands, that can be used by any player: [dc]*"+GetLocalString(oSpeech, "Anim1")+"*, *"+GetLocalString(oSpeech, "Anim2")+"*[w]. *SETANIM1:xxx* et *SETANIM2:xxx* allow you to persistantly change those passwords\n[dg]*MegaSpy*, *DispelDM*, *DM* [db]*Test1*, *Test2* et *Test3* are reserved for experimental needs"))); } break; } case CMD_JOURNAL: { SendMessageToPC(oPC,ff_Colorize("[g]You've played this char for [w]"+ff_GetStrTotalTime(GetLocalInt(oPC, "Time")))); break; } case CMD_SUIT: { object oTarget = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oPC, 1); if (oTarget==oPC) oTarget = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, oPC, 2); if(GetIsObjectValid(oTarget)) { AssignCommand(oTarget, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_FOLLOWME,oTarget))); AssignCommand (oPC, ActionForceFollowObject(oTarget)); SendMessageToPC(oPC, "OK, you're now following "+GetName(oTarget)); float fDelay = 30.0+Random(300); AssignCommand(oPC,DelayCommand(fDelay,ClearAllActions())); } else SendMessageToPC(oPC, "OK, but who do you want to follow?!"); break; } case CMD_FUIT: { object oTarget = GetLastHostileActor(oPC); if(GetIsObjectValid(oTarget)) { AssignCommand(oPC,ClearAllActions(TRUE)); AssignCommand(oPC, ActionDoCommand(PlayVoiceChat(VOICE_CHAT_FLEE,oPC))); AssignCommand (oPC, ActionMoveAwayFromObject(oTarget, TRUE, 30.0)); SendMessageToPC(oPC, "You're running away from "+GetName(oPC)); } else SendMessageToPC(oPC,"Fleeing ? OK, but who ?"); break; } case CMD_NORMAL: { if (GetIsDead(oPC)) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPC); DeleteLocalObject(oPC, "LastBadPK"); } int iMaxHP = GetMaxHitPoints(oPC); int iCurrentHP = GetCurrentHitPoints(oPC); if (iMaxHP != 0 && iMaxHP>iCurrentHP) { int iDamage = iMaxHP-iCurrentHP; ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(iDamage),oPC); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_HEALING_X),oPC); } ef = GetFirstEffect(oPC); while (GetIsEffectValid(ef)) { RemoveEffect(oPC,ef); ef = GetNextEffect(oPC); } AssignCommand(oPC,ff_FlushData(oPC)); break; } case CMD_CHANTE: { if(GetGender(oPC)==GENDER_MALE) { if(GetAlignmentGoodEvil(oPC)==ALIGNMENT_EVIL) AssignCommand (oPC, PlaySound("as_pl_evilchantm")); else AssignCommand (oPC, PlaySound("as_pl_chantingm"+IntToString(Random(2)+1))); } else AssignCommand (oPC, PlaySound("as_pl_chantingf"+IntToString(Random(2)+1))); break; } case CMD_RONFLE: { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_SLEEP), oPC); if(GetGender(oPC)==GENDER_MALE) AssignCommand (oPC, PlaySound("as_pl_snoringm"+IntToString(Random(2)+1))); else AssignCommand (oPC, PlaySound("as_pl_snoringf1")); break; } case CMD_CRIT: { if(GetGender(oPC)==GENDER_MALE) { if(Random(2)==0) AssignCommand (oPC, PlaySound("as_pl_x2screamm"+IntToString(Random(6)+1))); else AssignCommand (oPC, PlaySound("as_pl_screamm"+IntToString(Random(6)+1))); } else { if(Random(2)==0) AssignCommand (oPC, PlaySound("as_pl_x2screamf"+IntToString(Random(6)+1))); else AssignCommand (oPC, PlaySound("as_pl_screamf"+IntToString(Random(6)+1))); } break; } case CMD_PLEURE: { if(GetGender(oPC)==GENDER_MALE) AssignCommand (oPC, PlaySound("as_pl_wailingm"+IntToString(Random(6)+1))); else AssignCommand (oPC, PlaySound("as_pl_wailingf"+IntToString(Random(6)+1))); break; } case CMD_GEMIT: { if(GetGender(oPC)==GENDER_MALE) AssignCommand (oPC, PlaySound("as_pl_ailingm"+IntToString(Random(5)+1))); else AssignCommand (oPC, PlaySound("as_pl_ailingf"+IntToString(Random(5)+1))); break; } case CMD_GROGNE: { if(GetGender(oPC)==GENDER_MALE) AssignCommand (oPC, PlaySound("as_pl_hangoverm1")); else AssignCommand (oPC, PlaySound("as_pl_hangoverf1")); break; } case CMD_ETERNUE: { if(GetGender(oPC)==GENDER_MALE) AssignCommand (oPC, PlaySound("as_pl_sneezingm1")); else AssignCommand (oPC, PlaySound("as_pl_sneezingf1")); break; } case CMD_ACCLAME: { PlayVoiceChat(VOICE_CHAT_CHEER, oPC); int rand=Random(3); if(rand==0) AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1)); else if(rand==1) AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2)); else if(rand==2) AssignCommand(oPC, ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3)); break; } case CMD_SIFFLE: { AssignCommand(oPC, PlaySound("as_pl_whistle2")); break; } case CMD_DOUE: { ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSkillIncrease(SKILL_ALL_SKILLS, 20), oPC); break; } case CMD_ETHERAL: { ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectEthereal(), oPC); break; } case CMD_VIVANT: { if (GetIsDead(oPC)) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPC); DeleteLocalObject(oPC, "LastBadPK"); } int iMaxHP = GetMaxHitPoints(oPC); int iCurrentHP = GetCurrentHitPoints(oPC); if (iMaxHP != 0 && iMaxHP>iCurrentHP) { int iDamage = iMaxHP-iCurrentHP; ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(iDamage),oPC); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_HEALING_X),oPC); } AssignCommand(oPC,ff_FlushData(oPC)); break; } case CMD_SETPOS: { SetLocalLocation(oPC, "SetPos", GetLocation(oPC)); SendMessageToPC(oPC, "Position memorisee"); break; } case CMD_RECALL: { location lLoc = GetLocalLocation(oPC, "SetPos"); if (GetAreaFromLocation(lLoc)==OBJECT_INVALID) { MagicMoveTo(oPC, GetWaypointByTag("WP_Barak_02")); //AssignCommand(oPC,JumpToObject(GetWaypointByTag("WP_Barak_02"))); SendMessageToPC(oPC, "Pas de position memorisee"); } else { AssignCommand(oPC,JumpToLocation(lLoc)); //AssignCommand(oPC,JumpToLocation(lLoc)); SendMessageToPC(oPC, "Retour a la position memorisee"); } break; } case CMD_DM: { SetLocalInt(oPC, "DM_STATUS", LV_DM); SendMessageToPC(oPC, "Vous etes redevenu simple DM..."); break; } case CMD_INVISIBLE: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectInvisibility(INVISIBILITY_TYPE_IMPROVED),oPC); if (iLVPlayer>=LV_ANIM2) ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectVisualEffect(VFX_DUR_INVISIBILITY),oPC); if (iLVPlayer>=LV_ADMIN) ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY),oPC); //ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY),oPC); break; } case CMD_RAPIDE: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectHaste(),oPC); ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectMovementSpeedIncrease(99),oPC); ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectMovementSpeedIncrease(99),oPC); break; } case CMD_VISIBLE: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectTrueSeeing(),oPC); ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectUltravision(),oPC); break; } case CMD_BOUCLIER: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectDamageShield(20,DAMAGE_BONUS_2d6, DAMAGE_TYPE_NEGATIVE),oPC); ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectDamageShield(20,DAMAGE_BONUS_2d6, DAMAGE_TYPE_COLD),oPC); break; } case CMD_REGEN: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectRegenerate(5,1.0),oPC); break; } case CMD_MINOR_POLYMORPH: { switch(Random(8)) { case 0: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_BADGER),oPC); break; case 1: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_BOAR),oPC); break; case 2: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_COW),oPC); break; case 3: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_DIRE_BADGER),oPC); break; case 4: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_DIRE_BOAR),oPC); break; case 5: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_IMP),oPC); break; case 6: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_PENGUIN),oPC); break; case 7: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_PIXIE),oPC); break; } break; } case CMD_POLYMORPH: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(Random(46)),oPC); break; } case CMD_MAJOR_POLYMORPH: { switch(Random(8)) { case 0: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_RED_DRAGON),oPC); break; case 1: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_IRON_GOLEM),oPC); break; case 2: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_ELDER_AIR_ELEMENTAL),oPC); break; case 3: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_CELESTIAL_AVENGER),oPC); break; case 4: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_BALOR),oPC); break; case 5: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_DEATH_SLAAD),oPC); break; case 6: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_ELDER_FIRE_ELEMENTAL),oPC); break; case 7: ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectPolymorph(POLYMORPH_TYPE_ELDER_WATER_ELEMENTAL),oPC); break; } break; } case CMD_PAIX: { int iNo=1; object oTarget = GetFirstObjectInArea(GetArea(oPC)); while (oTarget!=OBJECT_INVALID) { if (GetIsObjectValid(oTarget) && GetObjectType(oTarget)==OBJECT_TYPE_CREATURE) { object oEn = GetLastHostileActor(oTarget); if (oEn!=OBJECT_INVALID) { SetIsTemporaryFriend(oEn, oTarget); SetIsTemporaryFriend(oTarget, oEn); AssignCommand(oEn, ClearAllActions(TRUE)); AssignCommand(oTarget, ClearAllActions(TRUE)); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_CHARM), oEn); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_CHARM), oTarget); SendMessageToPC(oPC,GetName(oTarget)+" et "+GetName(oEn)+" sont maintenant de vrais amis inseparables :)"); if (GetIsPC(oTarget)) SendMessageToPC(oTarget,"Une musique incroyable et apaisante retentit dans votre tete, et vous n'avez soudain plus aucune envie de combattre "+GetName(oEn)); if (GetIsPC(oEn)) SendMessageToPC(oEn,"Une musique incroyable et apaisante retentit dans votre tete, et vous n'avez soudain plus aucune envie de combattre "+GetName(oTarget)); AssignCommand(oPC,pwWriteLog(oPC, "ANIM2", "PAIX", GetName(oPC)+" a lance *PAIX* entre "+GetName(oTarget)+" et "+GetName(oEn))); } else SendMessageToPC(oPC,GetName(oTarget)+" ne semble pas etre en combat actuellement (GetIsInCombat="+IntToString(GetIsInCombat(oTarget))+")"); } oTarget = GetNextObjectInArea(GetArea(oPC)); } break; } case CMD_RESU: { object oRESU = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, FALSE, oPC); if (oRESU!=OBJECT_INVALID) { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oRESU); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_RAISE_DEAD), oRESU); if (GetIsPC(oRESU)) { SendMessageToPC(oRESU, "Une puissance mysterieuse vous fait revenir du royaume des morts"); AssignCommand(oPC,ff_FlushData(oRESU)); DeleteLocalObject(oRESU, "LastBadPK"); AssignCommand(oRESU, ActionPlayAnimation( ANIMATION_LOOPING_WORSHIP, 1.0, 10.0)); WriteTimestampedLogEntry("> (DM)"+GetName(oPC)+" ressuscite "+GetName(oRESU)); } AssignCommand(oPC,pwWriteLog(oPC, "ANIM2", "RESU", GetName(oPC)+" a lance *RESU* sur "+GetName(oRESU))); } else SendMessageToPC(oPC,"Non, aucune creature morte a proximite"); break; } case CMD_BIEN: { object oAfPC = GetFirstPC(); object oArea = GetArea(oPC); while (oAfPC!=OBJECT_INVALID) { if (GetArea(oAfPC) == oArea) { if (GetAlignmentGoodEvil(oAfPC)==ALIGNMENT_GOOD) { GoodEffect(oAfPC,oPC,3); SendMessageToPC(oAfPC, ff_Colorize("[w]Vous recevez une grande bouffee d'[b]amour[w] provenant d'une merveilleuse puissance divine et aimante, qui vous remet en pleine forme[y]")); } else if (GetAlignmentGoodEvil(oAfPC)==ALIGNMENT_EVIL) { BadEffect(oAfPC,oPC,3); SendMessageToPC(oAfPC, ff_Colorize("[w]Vous suffoquez en sentant passer une grande bouffee d'[b]amour[w] provenant d'une merveilleuse puissance divine et aimante[y]")); } else if (GetAlignmentGoodEvil(oAfPC)==ALIGNMENT_NEUTRAL) { GoodEffect(oAfPC,oPC,0); SendMessageToPC(oAfPC, ff_Colorize("[w]Vous restez relativement indifferent en sentant passer une grande bouffee d'[b]amour[w] provenant d'une merveilleuse puissance divine et aimante[y]")); } } oAfPC =GetNextPC(); } AssignCommand(oPC,pwWriteLog(oPC, "DM", "BIEN", GetName(oPC)+" a lance *BIEN* dans "+GetName(GetArea(oPC)))); break; } case CMD_MAL: { object oAfPC = GetFirstPC(); object oArea = GetArea(oPC); while (oAfPC!=OBJECT_INVALID) { if (GetArea(oAfPC) == oArea) if (GetAlignmentGoodEvil(oAfPC)==ALIGNMENT_EVIL) { GoodEffect(oAfPC,oPC,3); SendMessageToPC(oAfPC, ff_Colorize("[w]Vous jubilez en sentant une grande bouffee de [r]haine[w] provenant d'une horrible puissance malfaisante")); } else if (GetAlignmentGoodEvil(oAfPC)==ALIGNMENT_GOOD) { BadEffect(oAfPC,oPC,3); SendMessageToPC(oAfPC, ff_Colorize("[w]Vous etouffez sous une grande bouffee de [r]haine[w] provenant d'une horrible puissance malfaisante")); } else { BadEffect(oAfPC,oPC,0); SendMessageToPC(oAfPC, ff_Colorize("[w]Vous restez relativement indifferent face a la grande bouffee de [r]haine[w] provenant d'une horrible puissance malfaisante")); } oAfPC =GetNextPC(); } AssignCommand(oPC,pwWriteLog(oPC, "DM", "MAL", GetName(oPC)+" a lance *MAL* dans "+GetName(GetArea(oPC)))); break; } case CMD_GB: { AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(60), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageResistance(4095,10000), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageImmunityIncrease(4095, 100), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectRegenerate(50,1.0), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(50,ATTACK_BONUS_MISC),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectModifyAttacks(5),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_SONIC),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_COLD),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_FIRE),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_MAGICAL),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_2d6,DAMAGE_TYPE_SLASHING),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectACIncrease(100, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL),oPC)); AssignCommand(oPC,pwWriteLog(oPC, "ANIM2", "GB", GetName(oPC)+" est devenu GrosBill !")); break; } case CMD_BOOST: { AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(10), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageResistance(4095,100), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectRegenerate(1,1.0), oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(10,ATTACK_BONUS_MISC),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectModifyAttacks(1),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_1,DAMAGE_TYPE_SONIC),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_1,DAMAGE_TYPE_COLD),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_1,DAMAGE_TYPE_FIRE),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_1,DAMAGE_TYPE_MAGICAL),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_1,DAMAGE_TYPE_SLASHING),oPC)); AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectACIncrease(10, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL),oPC)); AssignCommand(oPC,pwWriteLog(oPC, "ANIM1", "BOOST", GetName(oPC)+" est un peu booste !")); break; } case CMD_AMOUR: { int iNb=0; object oAfPC = GetFirstPC(); while (oAfPC!=OBJECT_INVALID) { if (GetSubRace(oAfPC)!="Vampire") { DelayCommand(IntToFloat(iNb)/10,GoodEffect(oAfPC,oPC,3)); DelayCommand(IntToFloat(iNb)/10,SendMessageToPC(oAfPC, ff_Colorize("[w]Vous recevez une grande bouffee d'[b]amour[w] provenant d'une merveilleuse puissance divine et aimante, qui vous remet en pleine forme[y]"))); } else { DelayCommand(IntToFloat(iNb)/10,BadEffect(oAfPC,oPC,0)); DelayCommand(IntToFloat(iNb)/10,SendMessageToPC(oAfPC, ff_Colorize("[w]Vous frissonnez en sentant passer une grande bouffee d'[b]amour[w] provenant d'une merveilleuse puissance divine et aimante[y]"))); } iNb++; oAfPC =GetNextPC(); } AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "AMOUR", GetName(oPC)+" a lance *AMOUR*")); SendMessageToAllDMs("Une enorme vague d'AMOUR lancee par "+GetName(oPC)); break; } case CMD_HAINE: { object oAfPC = GetFirstPC(); int iNb=0; while (oAfPC!=OBJECT_INVALID) { if (GetSubRace(oAfPC)!="Vampire") { DelayCommand(IntToFloat(iNb)/10,SendMessageToPC(oAfPC, ff_Colorize("[w]Vous etouffez sous une grande bouffee de [r]haine[w] provenant d'une horrible puissance malfaisante"))); DelayCommand(IntToFloat(iNb)/10,BadEffect(oAfPC,oPC,3)); } else { DelayCommand(IntToFloat(iNb)/10,SendMessageToPC(oAfPC, ff_Colorize("[w]Vous jubilez en sentant une grande bouffee de [r]haine[w] provenant d'une horrible puissance malfaisante"))); DelayCommand(IntToFloat(iNb)/10,GoodEffect(oAfPC,oPC,0)); } iNb++; oAfPC =GetNextPC(); } AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "HAINE", GetName(oPC)+" a lance *HAINE*")); SendMessageToAllDMs("Une enorme vague de HAINE lancee par "+GetName(oPC)); break; } case CMD_TEST1: { object oRESU = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oPC); if (oRESU!=OBJECT_INVALID) { SendMessageToPC(oRESU,"Vous entrez soudain en Trance et perdez le controle de votre corps... comme possede."); AssignCommand(oPC,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,SupernaturalEffect(EffectCutsceneDominated()),oRESU, 60.0)); SendMessageToPC(oPC, "EffectCutsceneDominated() actif sur "+GetName(oRESU)+" pendant 60 secondes"); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "TEST1", GetName(oPC)+" a lance Test1 (EffectCutsceneDominated()) sur "+GetName(oRESU))); } break; } case CMD_TEST2: { ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDisappear(),oPC); DelayCommand(2.0,SendMessageToPC(oPC, "Pouff, t'es plus la ?!")); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "TEST2", GetName(oPC)+" a disparu ?! (test2)")); break; } case CMD_TEST3: { ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY),oPC); AssignCommand(oPC,pwWriteLog(oPC, "ADMIN", "TEST3", GetName(oPC)+" a disparu ?! (test3)")); break; } } // switch sSpeech = GetSubString(sSpeech, iLocStar2+1, GetStringLength(sSpeech)-(iLocStar2+1)); } // while sSpeech != "" } // while (GetStringLength(LOCAL_BUFFER)>2) DelayCommand(0.2, subloop(oSpeech, bUsingSpeech)); }