Fusion de scriptes

Répondre
Partager Rechercher
Bonjour tout le monde Ben voilà; j'ai un probleme je doit preparer un monde persistant et je doit fusionner des scripts genre parchemin de teleportaion et baton md, emotes etc... J'ai essayer mais il refuse de le compiler Y aurait il quelqu'un pour bien m'ezxpliquer comment faire svp Je vous remercie du fond du coeur et vous souhaite une agreable journée Au revoir tout le monde
Les scriptes ;)
Ha merci beaucoup j'ai eu beau chercher sur des sites je n'ai rien vu qui me permettais de comprendre donc voici un exemple mais est ce le meme principe de fusion stp ?
ben voici genre des scriptes que j'aimerais mettre dans le "onenter" du module mais etant donner que je fais tout un monde persistant seul stp donne moi les indications adéquates pour pouvoir etre indépendant

ceci est un scripte pour les parchemins de teleportation et je te met aussi celui du baton MD


ca c'est le scripte du parchemin



void main()
{
object oItem=GetItemActivated();
object oActivator=GetItemActivator();
object oCible = GetItemActivator();
effect eVisual = EffectVisualEffect(VFX_FNF_FIRESTORM);
effect eVisual1 = EffectVisualEffect( VFX_FNF_IMPLOSION );
effect eVisual2 = EffectVisualEffect( VFX_FNF_SUMMON_CELESTIAL );



if(GetTag(oItem) == "tag du parchemin")
{



DelayCommand (2.9,
AssignCommand(GetItemActivator(),
JumpToLocation(GetLocation(GetObjectByTag("tag du lieu de destination")))));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual1, oCible);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual2, oCible);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oCible);
}
}


Et ca c'est le scripte du baton MD



//dmw_activate

// ** This script goes in the OnItemActivation event of your Module
// ** Properties. It checks to see if the item used is a DM Helper
// ** And if so, and the user isnt a DM, destroys it, otherwise it
// ** Starts the DM Helper working.

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

if(GetTag(oItem)=="DMsHelper")
{
if(GetIsDM(oActivator) != TRUE)
{
object oTest = GetFirstPC();
string sTestName = GetPCPlayerName(oActivator);
int nFound = FALSE;
while (GetIsObjectValid(oTest) && (! nFound))
{
if (GetPCPlayerName(oTest) == sTestName)
{
if(GetIsDM(oTest))
{
nFound = TRUE;
}
else
{
DestroyObject(oItem);
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
return;
}
}
oTest=GetNextPC();
}
}
// 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;
}
}

Voilà ben je te remercie en tout cas et pe etre qu'on se verras sur mon MP ceserat le monde oublier Merci beaucoup en tout cas



Squalthor
Quand tu souhaite poster un script, en dessous de vB Code, coche "Mode Expert". À l'endroit où tu souhaite poster ton code, clique d'abord sur le bouton PHP, copie-colle ton script puis clique sur "Fermer la balise".
HA ca devrait marcher ;)
Ha cool merci bcp je suis tres long a comprendre merci de ta patience t cool
Donc voici le scripte des parchemins de teleportation


void main()
{
object oItem=GetItemActivated();
object oActivator=GetItemActivator();
object oCible = GetItemActivator();
effect eVisual = EffectVisualEffect(VFX_FNF_FIRESTORM);
effect eVisual1 = EffectVisualEffect( VFX_FNF_IMPLOSION );
effect eVisual2 = EffectVisualEffect( VFX_FNF_SUMMON_CELESTIAL );



if(GetTag(oItem) == "tag du parchemin")
{



DelayCommand (2.9,
AssignCommand(GetItemActivator(),
JumpToLocation(GetLocation(GetObjectByTag("tag du lieu de destination")))));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual1, oCible);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual2, oCible);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oCible);
}
}


Et celui du baton md


//dmw_activate

// ** This script goes in the OnItemActivation event of your Module
// ** Properties. It checks to see if the item used is a DM Helper
// ** And if so, and the user isnt a DM, destroys it, otherwise it
// ** Starts the DM Helper working.

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

if(GetTag(oItem)=="DMsHelper")
{
if(GetIsDM(oActivator) != TRUE)
{
object oTest = GetFirstPC();
string sTestName = GetPCPlayerName(oActivator);
int nFound = FALSE;
while (GetIsObjectValid(oTest) && (! nFound))
{
if (GetPCPlayerName(oTest) == sTestName)
{
if(GetIsDM(oTest))
{
nFound = TRUE;
}
else
{
DestroyObject(oItem);
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
return;
}
}
oTest=GetNextPC();
}
}
// 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;
}
}


Et bien je te remercie bcp ca doit pas etre evuident a gerer
Arf :(
Ah non apparement g mal fait ben laissons tomber l'ami je vais te faire perdre ton temps plutot qu'autre choses mais merci bcp de ton aide Passe une bonne journée et que dieu te garde
Code PHP:

void main()
{
    
object oItem=GetItemActivated();
    
object oActivator=GetItemActivator();
    
object oCible GetItemActivator();
    
effect eVisual EffectVisualEffect(VFX_FNF_FIRESTORM);
    
effect eVisual1 EffectVisualEffectVFX_FNF_IMPLOSION );
    
effect eVisual2 EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL );

    if(
GetTag(oItem) == "tag du parchemin")
    {
        
DelayCommand (2.9,
        
AssignCommand(GetItemActivator(),
        
JumpToLocation(GetLocation(GetObjectByTag("tag du lieu de destination")))));
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisual1oCible);
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisual2oCible);
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisualoCible);
    }

Code PHP:

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

    if(
GetTag(oItem)=="DMsHelper")
    {
        if(
GetIsDM(oActivator) != TRUE)
        {
            
object oTest GetFirstPC();
            
string sTestName GetPCPlayerName(oActivator);
            
int nFound FALSE;
            while (
GetIsObjectValid(oTest) && (! nFound))
            {
                if (
GetPCPlayerName(oTest) == sTestName)
                {
                    if(
GetIsDM(oTest))
                    {
                        
nFound TRUE;
                    }
                    else
                    {
                    
DestroyObject(oItem);
                    
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
                    return;
                    }
                }
                
oTest=GetNextPC();
            }
        }
// 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;
    }

Et les deux scripts en même temps:
Code PHP:

void main()
{
    
object oItem GetItemActivated();
    
object oActivator GetItemActivator();
    
object oTarget GetItemActivatedTarget();
    
location lTarget GetItemActivatedTargetLocation();

    if(
GetTag(oItem) == "DMsHelper")
    {
        if(
GetIsDM(oActivator) != TRUE)
        {
            
object oTest GetFirstPC();
            
string sTestName GetPCPlayerName(oActivator);
            
int nFound FALSE;
            while (
GetIsObjectValid(oTest) && (! nFound))
            {
                if (
GetPCPlayerName(oTest) == sTestName)
                {
                    if(
GetIsDM(oTest))
                    {
                        
nFound TRUE;
                    }
                    else
                    {
                    
DestroyObject(oItem);
                    
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
                    return;
                    }
                }
                
oTest=GetNextPC();
            }
        }
// get the wand's activator and target, put target info into local vars on activator
        
SetLocalObject(oActivator"dmwandtarget"oTarget);
        
SetLocalLocation(oActivator"dmwandloc"lTarget);

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

    if(
GetTag(oItem) == "AutoFollow")
    {
        if(
GetIsObjectValid(oTarget))
        {
            
AssignCommand oActivatorActionForceFollowObject(oTarget));
        }
        return;
    }

    if(
GetTag(oItem) == "tag du parchemin")
    {
        
effect eVisual EffectVisualEffect(VFX_FNF_FIRESTORM);
        
effect eVisual1 EffectVisualEffectVFX_FNF_IMPLOSION );
        
effect eVisual2 EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL );

        
DelayCommand (2.9,
        
AssignCommand(oActivator,
        
JumpToLocation(GetLocation(GetObjectByTag("tag du lieu de destination")))));
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisual1oActivator);
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisual2oActivator);
        
ApplyEffectToObject(DURATION_TYPE_INSTANTeVisualoActivator);
    }

J'ai pô testé mais ça compile. En tout cas je ne le ferai pô tous les jours, soit en sûr
Grand merci :
Ha merci du fond du coeur :d c de la balle :d:d:d jevais etudier le scripte pour voir comment tu as fait j'espere etre aussi douer que vous :d en tout cas tout un monde a faire m'attend et c'est grace a toii que je peux y arriver peux etre qu'un joiur je te verrais sur le contient perdu Merci O grand scripteur, j'espere pouvoir marcher sur tes pas Squalthor ( dit Squal)
Répondre

Connectés sur ce fil

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