problemes avec pierre de rapel

Répondre
Partager Rechercher
je sais pas si ce script est bon car il marche pas je veut faire un system de pierre de rappel mais il ne marche pas aider moi a le corriger s il vous plais
voila le script:
void main()
{
object oItem=GetItemActivated();
object oActivator=GetItemActivator();

if(GetTag(oItem)=="DMsHelper")
{
if(GetIsDM(oActivator) != TRUE)
{
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
DestroyObject(oItem);
return;
}
// get the wand's activator and target, put target info into local vars on activator
object oMyActivator = GetItemActivator();
object oMyTarget = GetItemActivatedTarget();
SetLocalObject(oMyActivator, "dmwandtarget", oMyTarget);
location lMyLoc = GetItemActivatedTargetLocation();
SetLocalLocation(oMyActivator, "dmwandloc", lMyLoc);

//Make the activator start a conversation with itself
AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "dmwand", TRUE));
return;
}

if(GetTag(oItem)=="AutoFollow")
{
object oTarget = GetItemActivatedTarget();

if(GetIsObjectValid(oTarget))
{
AssignCommand ( oActivator, ActionForceFollowObject(oTarget));
}
return;
}

if(GetTag(oItem) == "NW_IT_RECALL")
{
location LastRecallUsed; //Set the location variable
LastRecallUsed = GetLocation(GetItemActivator()); //Get the location, fill up the variable
SetLocalLocation(GetItemActivator(),"LastRecallUsed",LastRecallUsed); // Set where the portal jump the player to
SetLocalInt(GetItemActivator(),"HasRecalled",1); // To make the recall poretal tells the player if he want to go back
ActionCastFakeSpellAtObject ( SPELL_DISMISSAL , GetItemActivator());
DelayCommand (0.5,
AssignCommand(GetItemActivator(),
JumpToLocation(GetLocation(GetObjectByTag("portail_pierre"))))); // Get the player to the temple

}
}
PS : je le met dans edit module avancee et onunacquieltem es la ou pas que je doit le placer
le probleme c'est qu'il n'y a pas qu'un script....

utilises [p h p] et [/p h p] (tout attaché) pour mettre les lignes de programes sur le topic, c'est illissible sinon.


fouilles le site y a des infos concernant la création de pierre de rappel.
Code PHP:

 void main()
{
  
object oItem=GetItemActivated();
  
object oActivator=GetItemActivator();

  if(
GetTag(oItem)=="DMsHelper")
  {
    if(
GetIsDM(oActivator) != TRUE)
    {
      
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
      
DestroyObject(oItem);
      return;
    }
    
// get the wand's activator and target, put target info into local vars on activator
    
object oMyActivator GetItemActivator();
    
object oMyTarget GetItemActivatedTarget();
    
SetLocalObject(oMyActivator"dmwandtarget"oMyTarget);
    
location lMyLoc GetItemActivatedTargetLocation();
    
SetLocalLocation(oMyActivator"dmwandloc"lMyLoc);

    
//Make the activator start a conversation with itself
    
AssignCommand(oMyActivatorActionStartConversation(oMyActivator"dmwand"TRUE));
    return;
  }

  if(
GetTag(oItem)=="AutoFollow")
  {
    
object oTarget GetItemActivatedTarget();

    if(
GetIsObjectValid(oTarget))
    {
      
AssignCommand oActivatorActionForceFollowObject(oTarget));
    }
    return;
  }

  if(
GetTag(oItem) == "NW_IT_RECALL")
  {
    
location LastRecallUsed//Set the location variable
    
LastRecallUsed GetLocation(GetItemActivator()); //Get the location, fill up the variable
    
SetLocalLocation(GetItemActivator(),"LastRecallUsed",LastRecallUsed);     // Set where the portal jump the player to
    
SetLocalInt(GetItemActivator(),"HasRecalled",1); // To make the recall poretal tells the player if he want to go back
    
ActionCastFakeSpellAtObject SPELL_DISMISSAL ,         GetItemActivator());
    
DelayCommand (0.5,
    
AssignCommand(GetItemActivator(),
    
JumpToLocation(GetLocation(GetObjectByTag("portail_pierre")))));     // Get the player to the temple
  
}

Répondre

Connectés sur ce fil

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