Pingouinisateur

Répondre
Partager Rechercher
j'ai trouvé un script pour pingouiniser les pj recalcitrants.

voici le script
Code PHP:

//:://///////////////////////////////////////////// 
//:: 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(oPCApplyEffectToObject(DURATION_TYPE_PERMANENTeCoinoCible)); 
     } 
  } 

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

Code PHP:

void main()
{

object oCible GetItemActivatedTarget();
object oItem=GetItemActivated();
string sItem GetTagoItem );
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(oPlayerSpeakString("*jette un de a deux faces et obtient un "+IntToString(d2())+"*"));
}

if ( 
sItem == "dtroisfaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a trois faces et obtient un "+IntToString(d3())+"*"));
}

if ( 
sItem == "dquatrefaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a quatre faces et obtient un "+IntToString(d4())+"*"));
}

if ( 
sItem == "dsixfaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a six faces et obtient un "+IntToString(d6())+"*"));
}

if ( 
sItem == "dhuitfaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a huit faces et obtient un "+IntToString(d8())+"*"));
}

if ( 
sItem == "ddixfaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a dix faces et obtient un "+IntToString(d10())+"*"));
}

if ( 
sItem == "ddouzefaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a douze faces et obtient un "+IntToString(d12())+"*"));
}

if ( 
sItem == "dcentfaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a cent faces et obtient un "+IntToString(d100())+"*"));
}

if ( 
sItem == "dvingtfaces" )
{
object oPlayer GetItemActivator();
AssignCommand(oPlayerSpeakString("*jette un de a vingt faces et obtient un "+IntToString(d20())+"*"));
}
if( 
sItem == "EmoteWand")
{
object oPlayer GetItemActivator();
AssignCommand (oPlayerActionStartConversation(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(oPCApplyEffectToObject(DURATION_TYPE_PERMANENTeCoinoCible));
}
}



Citation :
// Apply eEffect to oTarget.
void ApplyEffectToObject(int nDurationType, effect eEffect, object oTarget, float fDuration=0.0f)
Si tu ne définit pas le dernier paramètre, le PJ ne restera que 0 secondes en forme de pingouin. Je dis peut-être une erreur mais mettre un DURATION_TYPE_PERMANENT ne marche pas s'il y a un temps de 0, non ?
Effectivement, il faut préciser une durée.

D'autre part :
Code PHP:

if(GetIsDM(oPC) != TRUE
ne va pas vraiment non plus puisque tu n'exécute le code que si oPC n'est PAS un MJ

(rappel : machin != TRUE est équivalent à machin == FALSE)
et donc en gros ca donnerait quoi mon script? (si vous pouviez corriger les lignes fausses, car j'suis une quiche meme si j'essaie de passer quiche supérieure!)
En fait tu avais mis ton effet permanent, donc tu n'avais pas besoin de préciser de durée. Mea culpa
(mais de toutes façons, en l'état actuel, l'effet s'en va lorsque le PJ dors)

Code PHP:

if(GetTag(oItem) == "Pingouinisateur"// TAG du l'objet
{
     if(
GetIsDM(oPC) == FALSE// On verifie que l'utilisateur est bien le MJ
        
return;
      
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(oPCApplyEffectToObject(DURATION_TYPE_PERMANENTeCoinoCible));

A priori ça devrais marcher.
moi, j'aime bien rajouter un Script de mouvements aleatoire avec un setcommandable aux pingouinisés (enfin, chez moi, ils sont poringomorphe, et j'etudie la bananomorphose pour bientot ^^; ), ca evite de les voir cliquer sur le bouton "cancel polymorph" meme si la zone est en no-rest...
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés