Pour RAT : Oui
Dans sa demeure de R'lyeh la morte, Cthulhu attend en rêvant.
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Bon passons cet égarement convulsif et cabalistique
J'ai donc changé un peu le premier script, pour qu'il s'exécute mieux
//Script Initilal de Mr Coktail , un peu modifie par Damonya
//A Mettre dans le On Used d'un Objet placable (Levier, Gong etc...)
//4 creatures differentes apparaitrons en fonction de votre niveau.
void Summon(string sTag, location coffin_loc);
int Random(int nMaxInteger);
#include "NW_I0_GENERIC"
void main()
{
// Declarations
int nPosLevel, nLastUsedLevel, x, i ;
object oPC ;
object oSummonedDefender ;
location lSpawnPoint ;
effect eSummon ;
effect eDarkGlow ;
// Definitions
x = 0;
x = Random(5) ;
i = 0;
nPosLevel = 1;
nLastUsedLevel = 0;
oPC = GetLastUsedBy();
lSpawnPoint = GetLocation(OBJECT_SELF);
eSummon = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
eDarkGlow = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
//Evaluation du niveau de l'attaquant
while(GetLevelByPosition(nPosLevel, oPC) != 0)
{
nLastUsedLevel = nLastUsedLevel + GetLevelByPosition(nPosLevel, GetLastUsedBy());
nPosLevel++;
}
//Determine la créature à appeller suivant le niveau du PC
if(nLastUsedLevel <=5)
{
ActionDoCommand(Summon("NW_SKELETON", lSpawnPoint));
}
else if(nLastUsedLevel <=10)
{
ActionDoCommand(Summon("NW_SKELWARR01", lSpawnPoint));
}
else if(nLastUsedLevel <=15)
{
ActionDoCommand(Summon("NW_SKELCHIEF", lSpawnPoint));
}
else if(nLastUsedLevel <=20)
{
ActionDoCommand(Summon("NW_GolBone", lSpawnPoint));
}
oSummonedDefender;
//Applique l'effet "black light" glow
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDarkGlow, oSummonedDefender);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSummon, OBJECT_SELF);
}
void Summon(string sTag, location lLoc)
{
CreateObject(OBJECT_TYPE_CREATURE, sTag, lLoc);
}
Mais j'ai essayé votre méthode pour tester le niveau du joueur, mais j'avoue je calle , notamment sur le while
Faut dire que je ne me considere pas du tout comme scripteur, et je ne suis même pas capable de comprendre entièrement tout mon propre script
Voila ca que ça donne et qui ne compile bien sûr pas, car il manque quelquechose et j'ai pas tout compris
void Summon(string sTag, location coffin_loc);
int Random(int nMaxInteger);
#include "NW_I0_GENERIC"
void main()
{
// Declarations
int nL, x, i ;
object oPC ;
object oSummonedDefender ;
location lSpawnPoint ;
effect eSummon ;
effect eDarkGlow ;
// Definitions
x = 0;
x = Random(5) ;
i = 0;
nL = 0;
oPC = GetLastUsedBy();
lSpawnPoint = GetLocation(OBJECT_SELF);
eSummon = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
eDarkGlow = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
//Evaluation du niveau de l'attaquant
while(GetLevelByPosition(nL, oPC) != 0)
{
nL = GetLevelByPosition(oPC,1)+GetLevelByPosition(oPC,2)+GetLevelByPosition(oPC,3);
}
//Determine la créature à appeller suivant le niveau du PC
if(nL <=5)
{
ActionDoCommand(Summon("NW_SKELETON", lSpawnPoint));
}
else if(nL <=10)
{
ActionDoCommand(Summon("NW_SKELWARR01", lSpawnPoint));
}
else if(nL <=15)
{
ActionDoCommand(Summon("NW_SKELCHIEF", lSpawnPoint));
}
else if(nL <=20)
{
ActionDoCommand(Summon("NW_GolBone", lSpawnPoint));
}
oSummonedDefender;
//Applique l'effet "black light" glow
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDarkGlow, oSummonedDefender);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSummon, OBJECT_SELF);
}
void Summon(string sTag, location lLoc)
{
CreateObject(OBJECT_TYPE_CREATURE, sTag, lLoc);
}
Me demandez pas pourquoi j'ai mis ça ou ça, j'en sais rien
Une petite correction serait pas de refus. hésitez surtout pas à me dire mes nombreuses erreurs, j'aime bien apprendre
PS : désolé si je repond pas tout de suite car je m'en vais pour la semaine
salut