j'ai trouvé un script pour pingouiniser les pj recalcitrants.
voici le script
//::///////////////////////////////////////////////
//:: Baguette de Transformation
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Permet de transformer un joueur en animal, pour l'exemple ici on
le transforme en Pingouin.
A mettre dans le OnActivateItem.
> Créer un objet a utilisation illimité avec "Pouvoir Unique".
*/
//:://////////////////////////////////////////////
//:: Created By: Asuke
//:: Created On: 01/09/2003
//:://////////////////////////////////////////////
void main()
{
object oCible = GetItemActivatedTarget();
object oItem = GetItemActivated();
object oPC = GetItemActivator();
if(GetTag(oItem) == "Pingouinisateur") // TAG du l'objet
{
if(GetIsDM(oPC) != TRUE) // On verifie que l'utilisateur est bien le MJ
{
effect eCoin = EffectPolymorph(POLYMORPH_TYPE_PENGUIN); // Choix de la transformation (ici le Pingouin)
// Exemple l'autre transformation : POLYMORPH_TYPE_COW (vache), POLYMORPH_TYPE_CHICKEN (poulet), POLYMORPH_TYPE_ZOMBIE (zombi), ...
AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCoin, oCible));
}
}
}
que j'ai essayé de mettre dans mon OnActiveItem, il compile mais ne fonctionne pas! savez vous me dire ou j'ai fait l'erreur?
voici mon script OAI
void main()
{
object oCible = GetItemActivatedTarget();
object oItem=GetItemActivated();
string sItem = GetTag( oItem );
object oPC = GetItemActivator();
if(sItem == "NW_IT_RECALL")
{
location LastRecallUsed;
LastRecallUsed = GetLocation(GetItemActivator());
SetLocalLocation(GetItemActivator(),"LastRecallUsed",LastRecallUsed);
SetLocalInt(GetItemActivator(),"HasRecalled",1);
ActionCastFakeSpellAtObject ( SPELL_DISMISSAL , GetItemActivator());
DelayCommand (0.5,
AssignCommand(GetItemActivator(),
JumpToLocation(GetLocation(GetObjectByTag("NW_RECALL_PORTAL")))));
}
if(sItem == "pierrerappel2")
{
location LastRecallUsed;
LastRecallUsed = GetLocation(GetItemActivator());
SetLocalLocation(GetItemActivator(),"LastRecallUsed",LastRecallUsed);
SetLocalInt(GetItemActivator(),"HasRecalled",1);
ActionCastFakeSpellAtObject ( SPELL_DISMISSAL , GetItemActivator());
DelayCommand (0.5,
AssignCommand(GetItemActivator(),
JumpToLocation(GetLocation(GetObjectByTag("WP_RECALL2")))));
}
if(sItem == "pierreava")
{
location LastRecallUsed;
LastRecallUsed = GetLocation(GetItemActivator());
SetLocalLocation(GetItemActivator(),"LastRecallUsed",LastRecallUsed);
SetLocalInt(GetItemActivator(),"HasRecalled",1);
ActionCastFakeSpellAtObject ( SPELL_DISMISSAL , GetItemActivator());
DelayCommand (0.5,
AssignCommand(GetItemActivator(),
JumpToLocation(GetLocation(GetObjectByTag("palais")))));
}
if ( sItem == "ddeuxfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a deux faces et obtient un "+IntToString(d2())+"*"));
}
if ( sItem == "dtroisfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a trois faces et obtient un "+IntToString(d3())+"*"));
}
if ( sItem == "dquatrefaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a quatre faces et obtient un "+IntToString(d4())+"*"));
}
if ( sItem == "dsixfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a six faces et obtient un "+IntToString(d6())+"*"));
}
if ( sItem == "dhuitfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a huit faces et obtient un "+IntToString(d8())+"*"));
}
if ( sItem == "ddixfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a dix faces et obtient un "+IntToString(d10())+"*"));
}
if ( sItem == "ddouzefaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a douze faces et obtient un "+IntToString(d12())+"*"));
}
if ( sItem == "dcentfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a cent faces et obtient un "+IntToString(d100())+"*"));
}
if ( sItem == "dvingtfaces" )
{
object oPlayer = GetItemActivator();
AssignCommand(oPlayer, SpeakString("*jette un de a vingt faces et obtient un "+IntToString(d20())+"*"));
}
if( sItem == "EmoteWand")
{
object oPlayer = GetItemActivator();
AssignCommand (oPlayer, ActionStartConversation(oPlayer, "emotewand", TRUE));
}
if(GetTag(oItem) == "Pingouinisateur") // TAG du l'objet
{
if(GetIsDM(oPC) != TRUE) // On verifie que l'utilisateur est bien le MJ
{
effect eCoin = EffectPolymorph(POLYMORPH_TYPE_PENGUIN); // Choix de la transformation (ici le Pingouin)
// Exemple l'autre transformation : POLYMORPH_TYPE_COW (vache), POLYMORPH_TYPE_CHICKEN (poulet), POLYMORPH_TYPE_ZOMBIE (zombi), ...
AssignCommand(oPC, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eCoin, oCible));
}
}
}