1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

How to create a Smith?

Discussion in 'Neverwinter Nights (Classic)' started by Daed, Dec 23, 2003.

  1. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    How to make a custom NPC Smith to craft weapons with a forge? And to enhance weapons/armors with magical attributes? Like the smith in the Underdark {HOTU} ? I putted down NPC with high crafting skills, put down a forge and an anvil,but now :confused:
     
  2. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    The script type needed is CutApplyEffectToObject. To explain:

    object oPC = GetPCSpeaker();
    effect eEffect = <effect here - look at Constants in the script editor>;
    object oItem = GetRightHandWeapon(oPC);
    CutApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oItem);

    I think that will work, but I'm not really sure. I trawled that out of the script used in HotU, and that confused me.

    The NPC having a high Craft Weapon skill is not needed, as it's all done through a script. The anvil isn't needed either, but it does help to set the scene.
     
  3. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    Cool script Alavin, let's try it!

    edit: I tryed this but it wont compile

    void main()
    {
    object oPC = GetPCSpeaker();
    effect eEffect = EFFECT_TYPE_HASTE;
    object oItem = GetRightHandWeapon(oPC);
    CutApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oItem);
    }


    Error. 'itemenchant' did not compile.
    itemenchant.nss(5): ERROR: PARSING VARIABLE LIST

    [ December 23, 2003, 20:15: Message edited by: Daed ]
     
  4. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    I thought that may happen. In the script, under Functions, GetRightHandWeapon was in bold type, which means that its use is limited to certain fields. As this script was used in a conversation, and therefore uses only standard script types, I don't think this could work. CutApplyEffectToObject was also in bold.

    You could try exporting the script directly from HotU, and seeing if it will work like that.
     
  5. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    True i noticed it looking to the script editor,but I've found this uinder Functions:
    ------------------------------------------------

    // Get the object which is in oCreature's specified inventory slot
    // - nInventorySlot: INVENTORY_SLOT_*
    // - oCreature
    // * Returns OBJECT_INVALID if oCreature is not a valid creature or there is no
    // item in nInventorySlot.
    object GetItemInSlot(int nInventorySlot, object oCreature=OBJECT_SELF)

    -------------------------------------------------

    Maybe there is a way to sobstitute GetRightHandWeapon(oPC); with that one... don't know really
     
  6. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    Yes, that would work.

    object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, OBJECT_SELF);

    However, there's still no CutApplyEffectToObject script, so it's undoable as far as I can see. However, you may want to ask on the Bioware boards, where the more advanced scripters can help you.

    [Edit - on NWVault, I found this that may help you. http://nwvault.ign.com/Files/scripts/data/1052707690200.shtml ]
     
  7. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    Ty for the help and link Alavin! You are the man m8 ;)
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.