Jump to content

Recommended Posts

Posted
I've created a script that is essentially a modified transmute spell script so you can change from one form of a weapon to another but since it just removes/adds the weapon it looses it's upgrades. I am wondering if there is a way to make it so that the upgrades can be carried over to the weapons that are being switched. I would also like to know how to have it be auto added to someones inventory. (Sorry I'm such a n00b at this >.<)
Posted
  On 4/2/2012 at 8:10 PM, fg109 said:

There's currently no way to do this. You can get the upgrades on a weapon by using GetItemHealthPercent put there is no SetItemHealthPercent to apply the upgrades.

Thanks for your response guess I'll make do with not upgrading them. Do you know how to auto-add the spell into a players inventory?

Posted (edited)
Instead of removing the weapon completely, how about removing it to a persistent container hidden away somewhere, then you could swap it back later. No loss of upgrades or even poison if such had been applied. Edited by flobalob
Posted
  On 4/3/2012 at 12:37 AM, flobalob said:

Instead of removing the weapon completely, how about removing it to a persistent container hidden away somewhere, then you could swap it back later. No loss of upgrades or even poison if such had been applied.

As much as I would love to do that I'm just to bad at scripting to actually do it. That is why I used transmute because it was easy to copy and read from. If someone would like to take my script and convert it to that way I would put it up or if someone could start a base where I could build off of it I would be very grateful but at this point I don't think I could do it alone.

Posted

I'm presuming that you are already using something along the lines of

 

Game.GetPlayer().RemoveItem(<Weapon_Reference>, 1)

 

The RemoveItem function has 2 optional statements to specify whether to display a mesage and a container to receive the removed item(s). See CK Wiki. So you would use

 

Game.GetPlayer().RemoveItem(<Weapon_Reference>, 1, False, <MyPersistant_Container>)

 

Obviously you will have to create a property for the weapon & container references.

Posted (edited)
Thank you so much! But now I have one last problem :confused: . I can't get the weapon's property to reference back to the one specifically inside the container. If I do "ObjectReference" I can only point it to the container and not what's inside and if I do "Weapon" it will just add a new weapon. I have it being removed from the inventory to the chest though so now I am 1/2 way there. Edited by Quibber123
Posted
  On 4/4/2012 at 2:51 AM, tunaisafish said:

If there's nothing else in the storage container, then just use RemoveAllItems() from the container to the NPC.

I said weapon to keep it simple but it is technically a few so there is more than just one. I could just make a few more chests and throw the others in those if there really isn't a way to direct it to a specific one inside of it. Thanks for the help as I may have to use this :) .

Posted

You can use RemoveItem as you did before, you need the base item id of the weapon, not the object Ref. If there were many of the same type though, you couldn't target a specific one. (ie. if they had different improvements)

 

So does this transmute spell only last for a certain time?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...