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