samisam Posted November 18, 2009 Share Posted November 18, 2009 Could someone give me the line of code i would use to make an item apear the first time the player puts on the Grey Fox Cowl? Link to comment Share on other sites More sharing options...
Icewedge Posted November 19, 2009 Share Posted November 19, 2009 This code will add an item to the players inventory when the cowl is equipped: short doOnce begin OnEquip if(doOnce==0) ; if it has not been done yet player.addItem WHATEVERITEMYOUWANT, 1 ; add one of the specified item to the players inventory. set doOnce to 1 ; so it does not go next time it is equipped endifend and this code will place the item in the worldspace: short doOnce begin OnEquip if(doOnce==0) ; if it has not been done yet player.placeAtMe WHATEVERITEMYOUWANT, 1, 100 , 1 ; place one of the specified item 100 units in front of player set doOnce to 1 ; so it does not go next time it is equipped endifend (see http://cs.elderscrolls.com/constwiki/index.php/PlaceAtMe for documentation) Hope that helps! Link to comment Share on other sites More sharing options...
samisam Posted November 19, 2009 Author Share Posted November 19, 2009 This code will add an item to the players inventory when the cowl is equipped: short doOnce begin OnEquip if(doOnce==0) ; if it has not been done yet player.addItem WHATEVERITEMYOUWANT, 1 ; add one of the specified item to the players inventory. set doOnce to 1 ; so it does not go next time it is equipped endifend and this code will place the item in the worldspace: short doOnce begin OnEquip if(doOnce==0) ; if it has not been done yet player.placeAtMe WHATEVERITEMYOUWANT, 1, 100 , 1 ; place one of the specified item 100 units in front of player set doOnce to 1 ; so it does not go next time it is equipped endifend (see http://cs.elderscrolls.com/constwiki/index.php/PlaceAtMe for documentation) Hope that helps! for the item name do i do my chosen custon name or the hex code? Link to comment Share on other sites More sharing options...
Icewedge Posted November 19, 2009 Share Posted November 19, 2009 Since both examples create a new item you would use the items editor ID. Link to comment Share on other sites More sharing options...
samisam Posted November 19, 2009 Author Share Posted November 19, 2009 Since both examples create a new item you would use the items editor ID. Could you tell me how to write that into this code? Sorry for all the questions. ScriptName TGGrayCowlScript Float GFCrimeGold Float GFInfamy Float GFFame Float PCCrimeGold Float PlayerInfamy Float PlayerFame Float TempCrime Begin OnEquip Player If GetPlayerInSEWorld == 0 Set TempCrime to GetGameSetting iCrimeGoldAttackMin If GFCrimeGold < TempCrime Set GFCrimeGold to TempCrime EndIf Set PCCrimeGold to Player.GetCrimeGold Player.SetCrimeGold GFCrimeGold EndIf Set PlayerFame to GetPCFame SetPCFame GFFame If GFInfamy < 100 Set GFInfamy to 100 EndIf Set PlayerInfamy to GetPCInfamy SetPCInfamy GFInfamy End Begin OnUnequip Player If GetPlayerInSEWorld == 0 Set GFCrimeGold to Player.GetCrimeGold Player.SetCrimeGold PCCrimeGold EndIf Set GFFame to GetPCFame SetPCFame PlayerFame Set GFInfamy to GetPCInfamy SetPCInfamy PlayerInfamy End Begin GameMode If GetPlayerInSEWorld == 0 If SECrime.LeftSECowlOn == 1 If SECrime.EnteredSECowlOn == 0 ; duplicate equipping the cowl if the player didn't have it on when he entered SE, but has it on when he leaves Set TempCrime to GetGameSetting iCrimeGoldAttackMin If GFCrimeGold < TempCrime Set GFCrimeGold to TempCrime EndIf Set PCCrimeGold to Player.GetCrimeGold Player.SetCrimeGold GFCrimeGold Set SECrime.LeftSECowlOn to 0 EndIf EndIf If SECrime.LeftSECowlOn == 0 If SECrime.EnteredSECowlOn == 1 ; duplicate unequipping the cowl if the player had it on when he entered SE, but not on when he leaves Set GFCrimeGold to Player.GetCrimeGold Player.SetCrimeGold PCCrimeGold Set SECrime.EnteredSECowlOn to 0 EndIf EndIf EndIf End Link to comment Share on other sites More sharing options...
Sultericdrums Posted November 20, 2009 Share Posted November 20, 2009 Just cut and paste it into the OnEquip block of code and you should be all set. Assuming you've already created the new Item in the CS, just use it's editor ID in the script and you''re all set. Just make sure you don't stick it inside any other if-then statements. Link to comment Share on other sites More sharing options...
Recommended Posts