christianerding Posted September 16, 2011 Share Posted September 16, 2011 (edited) Hello Scripters, I wanted to write a script that increases barter by one point PERMANENTLY. So I did stick the script on the chem-effect of mentats.Each time I use one pill it should run once and then end.But regardless how hard I try it does not do ANYTHING.On Activate will not work either, it gives the bonus on Pickup the pills instead of ingestion! :-( Can somebody help me? Maybe I should take a few mentats, too? :-P scn BarterScript short DoOnce begin OnMagicEffectHit ChemIncPEMentatsif IsActionRef player == 1 if ( DoOnce == 0 ) if ( Player.GetPermanentActorValue Barter < 100 ) Player.ModAv Barter 1 endif Activate Set DoOnce to 1 endif endifend Edited September 16, 2011 by christianerding Link to comment Share on other sites More sharing options...
Glenstorm Posted September 16, 2011 Share Posted September 16, 2011 I dunno what you are trying to do there but if I were you, I would do it like this: Create a new Base Effect and point it to an effect script. <Effect Script>scn BarterUpgradeScript short initBarter; BEGIN ScriptEffectStartset initBarter to GetAV BarterSetAV Barter (initBarter + 1)END And add the base effect to the list of effects in the "Spell" associated with Mentats. Or any other ingestible. Link to comment Share on other sites More sharing options...
christianerding Posted September 18, 2011 Author Share Posted September 18, 2011 Hello Glenstorm! Looks much better than my script. But still not working, get error in Line 7It seems that "SetAV Barter" only accepts full decimals und no formulas. Any Idea? Greetings, Christian Link to comment Share on other sites More sharing options...
Glenstorm Posted September 18, 2011 Share Posted September 18, 2011 BEGIN ScriptEffectStartset initBarter to GetAV Barterset initBarter to initBarter + 1SetAV Barter initBarterEND Link to comment Share on other sites More sharing options...
christianerding Posted September 21, 2011 Author Share Posted September 21, 2011 BEGIN ScriptEffectStartset initBarter to GetAV Barterset initBarter to initBarter + 1SetAV Barter initBarterEND THX for helping! I am at the very beginning of scripting. But I am lerning. :-) Link to comment Share on other sites More sharing options...
Recommended Posts