Would you like to react to this message? Create an account in a few clicks or log in to continue.

I need a script...

2 posters

Go down

I need a script... Empty I need a script...

Post by Imtherealthing Sun Jun 10, 2012 3:06 pm

Any scripters out there who can script an item that allows PC's to change thier "tail pheno". I want my PC's to use this "riddable barrel" pheno I found on the vault and want to know if someone can be kind enough to make me a script that would allow a PC to change his tail using an item that can change to this tail and back to his normal pheno after by clicking on the item....any helpers out there?
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Wed Jun 13, 2012 6:01 am

Let me check into it.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Wed Jun 13, 2012 6:03 am

Are you sure this is a "tail" setting and not a pheno setting? Link me with the barrel thing you are talking of.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Wed Jun 13, 2012 6:03 am

Ah, I see in your post "tail pheno".

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Wed Jun 13, 2012 6:13 am

Here if you already have the pheno thing in your mod you should be able to just set the constant int I defined at the beginning of the script and drop in mod and use on an item activation.

Code:

const int PHENO_BARREL = 1; // change this to the correct number

void main()
{
    object oPC = GetItemActivator();

    if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
    {// if they are not ridding a barrel set pheno and local on widget
        int nCheck = GetPhenoType( oPC );
        if( nCheck == PHENOTYPE_NORMAL ) SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
        else if ( nCheck == PHENOTYPE_BIG ) SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );

        SetPhenoType( PHENO_BARREL, oPC );
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );
    }
    else
    {
        int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );

        if( nCheck == 1 ) SetPhenoType( PHENOTYPE_NORMAL, oPC );
        else if( nCheck == 2 ) SetPhenoType( PHENOTYPE_BIG, oPC );
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 0 );
        ExportSingleCharacter( oPC );
    }
}

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Wed Jun 13, 2012 6:14 pm

Baragg wrote:Here if you already have the pheno thing in your mod you should be able to just set the constant int I defined at the beginning of the script and drop in mod and use on an item activation.

Code:

const int PHENO_BARREL = 1; // change this to the correct number

void main()
{
object oPC = GetItemActivator();

if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
{// if they are not ridding a barrel set pheno and local on widget
int nCheck = GetPhenoType( oPC );
if( nCheck == PHENOTYPE_NORMAL ) SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
else if ( nCheck == PHENOTYPE_BIG ) SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );

SetPhenoType( PHENO_BARREL, oPC );
SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );
}
else
{
int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );

if( nCheck == 1 ) SetPhenoType( PHENOTYPE_NORMAL, oPC );
else if( nCheck == 2 ) SetPhenoType( PHENOTYPE_BIG, oPC );
SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 0 );
ExportSingleCharacter( oPC );
}
}



Thanks man - I'll try this tonight and get back to you. I really appreciate this.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Wed Jun 13, 2012 10:02 pm

Um..I don't know how to make a "widget" to add this script to. So what would the tag be for the widget? Looking through the script I don't see what I would call the widget in order to make one and set it to "unlimited uses/day"?



On my tailmodel.2da this is where the barrel is located:

545 "Barrel" c_tail_barrel ****



Which of the lines below would I use to "nullify" the tail:

205 "None" **** ****

14 "NullTail" c_nulltail default

So with this info could you plug in where in the script these would go and which ones I would use. Sorry...scripting and making "widgets" not my thing. I also want to use this to also be able to null the flying Carpet:

547 "Flying Carpet 1" c_tail_carpet1 ****
548 "Flying Carpet 2" c_tail_carpet2 ****

Ideally If I had the skills I would love to make items "Barrel" and "carpet" to carry in your inventory and be able to click on them to activate either one to use and where you could also click on them to unactivate them and put them back into your inventory...sigh..wish I knew how to do that.





Here are the links for the riding barrel pheno and flying carpet:



http://nwvault.ign.com/View.php?view=Hakpaks.Detail&id=7816



http://nwvault.ign.com/View.php?view=Hakpaks.Detail&id=7819



I looked at the modules and used the scripts there to be able to add them to a PC....but I really did not know how to de-activate the tails...better yet..how nice it would be if you could put the script up on the vault with the items for each to be able to activate and deactivate. It would be nice to see a carpet put on the ground and then when you click on it..you gain the flying carpet tail...same with a barrel for the barrel riding.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Thu Jun 14, 2012 5:50 pm

Baragg wrote:Let me check into it.



Thanks - did you get a chance to read my new comments I made below?
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 15, 2012 7:23 am

K, had no electricity when I awoke this morning let me look over the info you posted and get back to you.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 15, 2012 7:44 am

As for making a widget you could simply make a misc small item with whatever name you wish and tag it how you wish. For example Name: Barrel Widget, Tag: "widg_barrel_phen". Then after you insured tag based scripting is enabled in your mod, and it usually is by default, you simply compile the above script into your module with the script name of "widg_barrel_phen".

Also as to the unlimited uses per day thing that is an itemproperty you add to the item when it is created in the toolset. When you create the item after naming it and such goto the itemproperties tab, under the Cast Spell tab there will be a two properities entitled "Unique Power", and "Unique Power Self Only". For the purposes of this item I suggest Unique Power Self Only, add that prop then insure it is set to unlimited uses per day.

As to restoring the PC to their normal pheno I had already done that in the script by getting their current pheno before adding the barrel tail. Then restoring it after they activate the widget again. So the PC before riding the barrel will activate the item, bam, they should be riding the barrel. They get ready to dismount, simply activate the widget again, bam, back to normal.

Short Run Thro Of Widget Activation

1. PC activates Widget
2. Script checks to see if the PC is already wearing the tail.
3. If the pc is NOT wearing the barrel tail script gets PCs current pheno, either normal or big
4. If PC pheno is normal set local on widget of "TYPE_PHENO" as 1 else 2 for big
5. Script then sets PC pheno as barrel riding, then set local indicating tail is set.
6. IF the tail is set the script will skip from 3 to 5 in the steps above and move to this step which is get the local set indicating the normal/big pheno reset the PC pheno to that then clears the tail set local and exports the character



Going over this as we have has shown me I missed resetting one local so here is an updated version of that script which resets the local on the widget also.

Also added in the int for you at the top of the script

Code:

const int PHENO_BARREL = 545; // change this to the correct number

void main()
{
    object oPC = GetItemActivator();

    if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
    {// if they are not ridding a barrel set pheno and local on widget
        int nCheck = GetPhenoType( oPC );
        if( nCheck == PHENOTYPE_NORMAL ) SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
        else if ( nCheck == PHENOTYPE_BIG ) SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );

        SetPhenoType( PHENO_BARREL, oPC );
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );
    }
    else
    {
        int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );

        if( nCheck == 1 ) SetPhenoType( PHENOTYPE_NORMAL, oPC );
        else if( nCheck == 2 ) SetPhenoType( PHENOTYPE_BIG, oPC );
        DeleteLocalInt( OBJECT_SELF, "TYPE_PHENO" );
        DeleteLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" );
        ExportSingleCharacter( oPC );
    }
}

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 15, 2012 7:49 am

As to the carpet thing it would simply be a matter of changing const int, script name, item name/tag.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 15, 2012 7:53 am

As to your inventory stashing of said items if you have items the pc can carry in their inventory post the tag/resref of the barrel and carpet carry items and I will tweak that script so when you activate the widget the barrel thing is removed from your invo and you get the barrel tail. Then when you dismount if there is room in your inventory the barrel carry item is recreated in your invo, if not we would create a barrel next to the pc. Of course we would need to have that item useable so that the pc could pick it up after they clear their inventory space to do so.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 15, 2012 8:14 am

Downloaded Bens stuff you linked and after opening the haks and looking at the 2das it may be that that script needs some work. Before you go booger up someones PC let me tweak it a bit.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 15, 2012 8:39 am

Here is the updated I also took into account the possibility your PCs may already have had a tail added to thier characters.

Code:

// Baragg 6-15-12 Created for Imtherealthing
// This script is to be used in tag based scripting to allow a PC to ride
// a barrel. In the Shadow Mountain module we allow PCs to set tail models on
// their PC so I am gonna account for that possibility in this script.

const int PHENO_BARREL = 545; // change this to the correct number
// const int PHENO_CARPET1 = 491; // This is the first model type of carpet
// const int PHENO_CARPET2 = 492; // This is the second model type of carpet


void main()
{
    object oPC = GetItemActivator();
    int nTail = GetCreatureTailType( oPC );

    if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
    {// if the PC is NOT ridding a barrel set pheno to barrel riding and set local on widget
        int nCheck = GetPhenoType( oPC );

        if( nCheck == PHENOTYPE_NORMAL )
        { // if the PCs normal phenotype is PHENOTYPE_NORMAL
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
        }
        else if ( nCheck == PHENOTYPE_BIG )
        { // if the PCs normal phenotype is PHENOTYPE_BIG
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );
        }

        // If the PC already has some type of tail we store that int here on the
        // widget just incase
        if( nTail > 0 )
        {
            SetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL", nTail );
        }

        SetPhenoType( PHENO_BARREL, oPC );                  // set PC as riding
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );  // mark widget
ExportSingleCharacter( oPC );                              // save character incase
    }
    else
    {// if the PC IS riding the barrel reset pheno back to the norm and delete locals
        int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );      // retrieve stored int indicating normal pheno

        if( nCheck == 1 ) SetPhenoType( 0, oPC );          // return PC to PHENOTYPE_NORMAL
        else if( nCheck == 2 ) SetPhenoType( 2, oPC );      // else return PC to PHENOTYPE_BIG
        DeleteLocalInt( OBJECT_SELF, "TYPE_PHENO" );        // delete local indicating "normal" pheotype
        DeleteLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" );  // delete local indicating PC IS riding

        if( nTail > 0 )
        {// if the PC had a tail before they started riding the barrel reset that tail
            SetCreatureTailType( GetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" ), oPC );
            DeleteLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" );  // delete local from widget
        }
        else
        {// else if they PC originally had NO tail set the tail to NULL
            SetCreatureTailType( CREATURE_TAIL_TYPE_NONE, oPC );
        }
        ExportSingleCharacter( oPC );                      // save character
    }
}

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Sat Jun 16, 2012 10:34 am

It removes the barrel but in it's place my PC is riding a horse. It's just about there. I looked through your script but I don't see why it would place a horse as a tail in there. I want to really thank you for taking the time to do this for me...really do appreciate this nice gesture on your part. Any ideas why a horse would be the tail?



Perhaps making this script more simple. If you can just make the widget create a barrel tail when you click on it and then when you click on it again...make it dissappear. That way one can make the barrel and get rid of it on the same item...is this simple to do?
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Sat Jun 16, 2012 4:12 pm

Imtherealthing wrote:
Perhaps making this script more simple. If you can just make the widget create a barrel tail when you click on it and then when you click on it again...make it dissappear. That way one can make the barrel and get rid of it on the same item...is this simple to do?

That is what it should do, mayhap I need to look over the mount scripts. Does your modules onitemactivate script have a reference in the includes to the horse script?

Here is a tweak to the script that simply sets the tail type to none, the IF the pc had a tail before ridding a barrel sets the tail back as it was.


Code:

// Baragg 6-15-12 Created for Imtherealthing
// This script is to be used in tag based scripting to allow a PC to ride
// a barrel. In the Shadow Mountain module we allow PCs to set tail models on
// their PC so I am gonna account for that possibility in this script.

const int PHENO_BARREL = 545; // change this to the correct number
// const int PHENO_CARPET1 = 491; // This is the first model type of carpet
// const int PHENO_CARPET2 = 492; // This is the second model type of carpet


void main()
{
    object oPC = GetItemActivator();
    int nTail = GetCreatureTailType( oPC );

    if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
    {// if the PC is NOT ridding a barrel set pheno to barrel riding and set local on widget
        int nCheck = GetPhenoType( oPC );

        if( nCheck == PHENOTYPE_NORMAL )
        { // if the PCs normal phenotype is PHENOTYPE_NORMAL
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
        }
        else if ( nCheck == PHENOTYPE_BIG )
        { // if the PCs normal phenotype is PHENOTYPE_BIG
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );
        }

        // If the PC already has some type of tail we store that int here on the
        // widget just incase
        if( nTail > 0 )
        {
            SetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL", nTail );
        }

        SetPhenoType( PHENO_BARREL, oPC );                  // set PC as riding
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );  // mark widget
        ExportSingleCharacter( oPC );                      // save character incase
    }
    else
    {// if the PC IS riding the barrel reset pheno back to the norm and delete locals
        int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );      // retrieve stored int indicating normal pheno

        if( nCheck == 1 ) SetPhenoType( 0, oPC );          // return PC to PHENOTYPE_NORMAL
        else if( nCheck == 2 ) SetPhenoType( 2, oPC );      // else return PC to PHENOTYPE_BIG
        DeleteLocalInt( OBJECT_SELF, "TYPE_PHENO" );        // delete local indicating "normal" pheotype
        DeleteLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" );  // delete local indicating PC IS riding


        // Here set the tail type to none
        SetCreatureTailType( CREATURE_TAIL_TYPE_NONE, oPC );


        if( nTail > 0 )
        {// if the PC had a tail before they started riding the barrel reset that tail
            SetCreatureTailType( GetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" ), oPC );
            DeleteLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" );  // delete local from widget
        }

        ExportSingleCharacter( oPC );                      // save character
    }
}

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Sat Jun 16, 2012 4:21 pm

I looked over x3_inc_horse and the script I provided there and have found no reason that they would dismount the barrel only to be on a horse. Send me a txt copy of your tail 2da.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Sat Jun 16, 2012 4:23 pm

Do you have a "special" widget in your mod for mounting and dismounting horses? Maybe if you do your widget does dismount the pc from the horse but does not reset the tail model to none. And this script is reading they should have a horse tail.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Tue Jun 19, 2012 10:01 pm

Here is a rework that should set the tail to 0. But still resets tail they may have had before the barrel.

Code:

// Baragg 6-15-12 Created for Imtherealthing
// This script is to be used in tag based scripting to allow a PC to ride
// a barrel. In the Shadow Mountain module we allow PCs to set tail models on
// their PC so I am gonna account for that possibility in this script.

const int PHENO_BARREL = 545; // change this to the correct number
// const int PHENO_CARPET1 = 491; // This is the first model type of carpet
// const int PHENO_CARPET2 = 492; // This is the second model type of carpet


void main()
{
    object oPC = GetItemActivator();

    if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
    {// if the PC is NOT ridding a barrel set pheno to barrel riding and set local on widget
        int nCheck = GetPhenoType( oPC );
        int nTail = GetCreatureTailType( oPC );

        if( nCheck == PHENOTYPE_NORMAL )
        { // if the PCs normal phenotype is PHENOTYPE_NORMAL
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
        }
        else if ( nCheck == PHENOTYPE_BIG )
        { // if the PCs normal phenotype is PHENOTYPE_BIG
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );
        }

        // If the PC already has some type of tail we store that int here on the
        // widget just incase
        if( nTail > 0 )
        {
            SetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL", nTail );
        }

        SetPhenoType( PHENO_BARREL, oPC );                  // set PC as riding
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );  // mark widget
        ExportSingleCharacter( oPC );                      // save character incase
    }
    else
    {// if the PC IS riding the barrel reset pheno back to the norm and delete locals
        int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );      // retrieve stored int indicating normal pheno
        int nTail = GetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" );

        if( nCheck == 1 ) SetPhenoType( 0, oPC );          // return PC to PHENOTYPE_NORMAL
        else if( nCheck == 2 ) SetPhenoType( 2, oPC );      // else return PC to PHENOTYPE_BIG
        DeleteLocalInt( OBJECT_SELF, "TYPE_PHENO" );        // delete local indicating "normal" pheotype
        DeleteLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" );  // delete local indicating PC IS riding


        // Here set the tail type to none
        SetCreatureTailType( 0, oPC );


        if( nTail > 0 )
        {// if the PC had a tail before they started riding the barrel reset that tail
            SetCreatureTailType( GetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" ), oPC );
            DeleteLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" );  // delete local from widget
        }

        ExportSingleCharacter( oPC );                      // save character
    }
}



Here is a version that does NOT reset the tail

Code:

// Baragg 6-15-12 Created for Imtherealthing
// This script is to be used in tag based scripting to allow a PC to ride
// a barrel. In the Shadow Mountain module we allow PCs to set tail models on
// their PC so I am gonna account for that possibility in this script.

const int PHENO_BARREL = 545; // change this to the correct number
// const int PHENO_CARPET1 = 491; // This is the first model type of carpet
// const int PHENO_CARPET2 = 492; // This is the second model type of carpet


void main()
{
    object oPC = GetItemActivator();

    if( GetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" ) == 0 )
    {// if the PC is NOT ridding a barrel set pheno to barrel riding and set local on widget
        int nCheck = GetPhenoType( oPC );
        int nTail = GetCreatureTailType( oPC );

        if( nCheck == PHENOTYPE_NORMAL )
        { // if the PCs normal phenotype is PHENOTYPE_NORMAL
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 1 );
        }
        else if ( nCheck == PHENOTYPE_BIG )
        { // if the PCs normal phenotype is PHENOTYPE_BIG
            SetLocalInt( OBJECT_SELF, "TYPE_PHENO", 2 );
        }

        // If the PC already has some type of tail we store that int here on the
        // widget just incase
        if( nTail > 0 )
        {
            SetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL", nTail );
        }

        SetPhenoType( PHENO_BARREL, oPC );                  // set PC as riding
        SetLocalInt( OBJECT_SELF, "TAIL_SET_BARREL", 1 );  // mark widget
        ExportSingleCharacter( oPC );                      // save character incase
    }
    else
    {// if the PC IS riding the barrel reset pheno back to the norm and delete locals
        int nCheck = GetLocalInt( OBJECT_SELF, "TYPE_PHENO" );      // retrieve stored int indicating normal pheno
        int nTail = GetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" );

        if( nCheck == 1 ) SetPhenoType( 0, oPC );          // return PC to PHENOTYPE_NORMAL
        else if( nCheck == 2 ) SetPhenoType( 2, oPC );      // else return PC to PHENOTYPE_BIG
        DeleteLocalInt( OBJECT_SELF, "TYPE_PHENO" );        // delete local indicating "normal" pheotype
        DeleteLocalInt( OBJECT_SELF, "TAIL_SET_BARREL" );  // delete local indicating PC IS riding


        // Here set the tail type to none
        SetCreatureTailType( 0, oPC );

        /*
        if( nTail > 0 )
        {// if the PC had a tail before they started riding the barrel reset that tail
            SetCreatureTailType( GetLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" ), oPC );
            DeleteLocalInt( OBJECT_SELF, "TAIL_B4_BARREL" );  // delete local from widget
        }
        */

        ExportSingleCharacter( oPC );                      // save character
    }
}

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Tue Jun 19, 2012 11:00 pm

The first script (the new top one) had a horse tail and the barrel on my PC's Head. When I used the crafting menu to change to normal NWN PC pheno because I have the ACP hak....It got rid of the horse but the barrel stayed on my head.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Tue Jun 19, 2012 11:08 pm

The second new script above puts me back on a horse - but when I use the crafting anvil (ACP pheno choices) to change my pheno back to normal nwn pheno...it works..too bad I have to go through the whole ordel of doing both things to get back to normal pheno.



Thanks for all your help.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Wed Jun 20, 2012 4:48 pm

Post the script from your anvil and I will look to see what does the trick then incorporate that. If it is convo driven please tell me the option that does it.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Wed Jun 20, 2012 4:49 pm

The second script above should set the tail type to none. What is the ACP you speak of.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Wed Jun 20, 2012 8:15 pm

Here is the link to the ACP...dude..can't believe you haven't heard of it..it is awesome. This is the version that works with other animations and the CEP...try it.



http://nwvault.ign.com/View.php?view=Hakpaks.Detail&id=7914
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Wed Jun 20, 2012 8:16 pm

You will find the script in there also.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Thu Jun 21, 2012 7:13 am

Ah, yeah I don't feel like downloading haks then sifting through them to find that.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Thu Jun 21, 2012 5:51 pm

Ok..I'll find the script sorry..I just thought you would like to see how these animations work - they are pretty awesome.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Fri Jun 22, 2012 8:24 am

No prob, really the only thing I like is scripting. It appeals to me.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Sat Jun 23, 2012 12:29 am

I'm trying to find the crafting script where the ACP phenos change..having a hard time finding it. Any hints as to what it would be called? Most likely it would override the default nwn crafting script I'm thinking - I bet that is the script you want.
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Baragg Sat Jun 23, 2012 7:07 am

Well you said the PCs have to goto something and get their tail set to none. Find that object in the module, then find the convo node are whatever that sets them to none and find the code attached to that.

Got your pheno and tail 2da nothing seemed amiss when I perused them.

Baragg

Posts : 43
Join date : 2012-02-12
Location : Vidor, Texas

http://www.smnwn.com

Back to top Go down

I need a script... Empty my script on pc conversation

Post by Imtherealthing Sat Jun 23, 2012 10:06 am

Code:
//::///////////////////////////////////////////////
//:: FileName at_154
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 6/23/2012 9:13:26 AM
//:://////////////////////////////////////////////
void main()
{

// Remove items from the player's inventory
object oItemToTake;
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "coin_ducat2");
if(GetIsObjectValid(oItemToTake) != 0)
DestroyObject(oItemToTake);
{
object oPC = GetPCSpeaker();
if (GetPhenoType(oPC) == 2)
{
SetPhenoType(74, oPC);
}
else
{
SetPhenoType(74, oPC);
}

SetCreatureTailType(545, oPC);

object oStaff = CreateItemOnObject ("ct_qtrstaff7", oPC);
DelayCommand(0.1, AssignCommand(oPC, ActionEquipItem(oStaff, INVENTORY_SLOT_RIGHTHAND)));

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectMovementSpeedIncrease(99), oPC, HoursToSeconds(100));
}
}
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Imtherealthing Sat Jun 23, 2012 10:14 am

I figure I will just add the barrel pheno via a conversation for now. I will do this with the script above that I blended from the Flying carpet module to use for the barrel riding. I will use your widget to undo the tail and just tell the PC's to use the crafting menu (from the anvil) to set thier tail back to the normal default NWN pheno.

This is the best so far I can do. Thanks for your help. At least now I can sort of get rid of it through a little work until I find the crafting script that I'm sure would help solve this issue. All I got to do now is create an item that can be purchased (a barrel to put into the inventory) and when set down on the ground can be activated when clicked on to add the barrel tail. Is that something you can help me with?

That and one more thing..I want ot create a mirror that refelcts back a medusa's turn to stone glare and turn her or any creature using that ability into stone by reflecting it back on them. I had this working once, but now it is broken. Pehaps you have a script that can do this?
Imtherealthing
Imtherealthing

Posts : 31
Join date : 2012-01-28
Age : 56

Back to top Go down

I need a script... Empty Re: I need a script...

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum