Jump to content

Help with OBSE please


Lydon0321

Recommended Posts

I have no illusions of being a great Modder or scripter but i need a little help.

 

I'm new to scripting with OBSE and I cannot get the desired effect im trying to achive.

My scripting skills are still novice I look at other code and useualy figure out what Im doing from there. This has worked for me so far. I have made bows that have infinite arrows made items apply enchants with 0 cost spells for infanite spell enchanted weapons and so fourth. And I done this befor Some famous mods doing same appears on TESnexus."btw Thank you for doing what i did but better" I also made a few funnie Misc items gimmie spells for kicks and mod my current skill lvls.

 

I made a Sidekick SkeletalHero constant effect Misc item. Lame but was fun for a wile.

I altered the Script and made a Archer Skeleton later on.

 

Well Heres my Problem Im trying to set poison to a weapon but I canot get the line of Code to work

Im trying to make a Spell Apply a Poison to a weapon Basicaly I am tired of opening a menu to do that. I know there are nice mods out there to do simaliar functions But I like my own style mods. And I have looked through a few for lines of code.

 

The script from obse's website is this

 

(oldPoison:ref) reference.SetEquippedWeaponPoison nuPoison:ref

 

oldpoison from best I can guess is a already applied posion. But I dont have one applied.

I found this on a website

 

set oldPoison to player.SetEquippedWeaponPoison PotionDamageAttrAgilityS

if (player.GetEquippedWeaponPoison != PotionDamageAttrAgilityS || oldPoison != 0)

PrintToConsole "SetEquippedWeaponPoison failed!"

So I have Played around with set oldpoison to 0

 

Set oldPoison = Mypoison2

(oldPoison:ref) reference.SetEquippedWeaponPoison MyPoison:ref

 

and

Set oldPoison player.SetEquippedWeaponPoison Mypoison

(oldPoison:ref) reference.SetEquippedWeaponPoison MyPoison:ref

 

and

player.SetEquippedWeaponPoison MyPoison:ref

 

None are working for me

 

Scriptname fire1

 

begin onActivate

 

player.SetEquippedWeaponPoison Firepoison:ref

 

end

 

 

I am trying to acheive a Simlar to ff5 yes I know but im not a FF fanatic and I know some guy already made the mod but I like my own flavor to things. So i sought out to try my own version. Im just trying to make a spell cast equip a poison to a weapon for a single strike.

Any Insight to what I am doing wrong would be very helpful.

Link to comment
Share on other sites

I'm going to try and help you as best as I can:

 

(oldPoison:ref) reference.SetEquippedWeaponPoison nuPoison:ref

 

(oldPoison:ref) <- This means this command will return a value. If there was a poison already applied when you use this function it will return it's ID so you can store it in a variable. Basically you can stock the data of what poison was applied before you replaced it. I doubt it will be useful to you.

 

reference <- In your case, you want to probably type "player".

 

SetEquippedWeaponPoison <- The actual function, nothing to change.

 

nuPoison:ref <- It means to specify the editor ID of the poison.

 

 

Example script below. I will use a poison bottle with the editor ID PSNhealthdmg. Poison effect PSNhealthdmgeffect.

ScriptName PoisonSpellTestScript

Begin ScriptEffectStart
If player.GetItemCount PSNhealthdmg >= 1

player.SetEquippedWeaponPoison PSNhealthdmgeffect
player.removeitem PSNhealthdmg 1
Endif

End

 

That script will apply the effect of the poison on the equipped weapon and will remove one poison bottle (but it's specific) and if you don't have poison bottles the spell will do nothing.

 

More info there:

http://cs.bethsoft.com/constwiki/index.php...pedWeaponPoison

Link to comment
Share on other sites

Thanks alot but I understood Reference I ment why must i use the code since thats all cs wiki gave me. If no poison was applied to begin with why must i reference it. I have done basic scripting in unix, batch files, stack programing, and some C+. It was just odd only showing a code with a reference and not showing how to use a code to just apply. Then i found that other code "player.SetEquippedWeaponPoison" without the reference but how to implement it was my problem but you answered it sorry thanks alot. I just wished CS WIKI have this to begin with player.SetEquippedWeaponPoison and the reference as a side option. I just Wish i had a Full list of all code options, triggers etc.

 

This is my arrow script

Begin Bonded_Arrow

 

if ( "player"->getitemcount "AT_ShortBow" =1 )

if ( "player"->getitemcount "AT_Arrow_red" <1 )

player->additem "AT_Arrow_red" 1

Player->equip "AT_Arrow_red"

player->modcurrentmagicka -5

endif

return

endif

 

End

 

And this is just somthing I made for a little misc item to add a Ability to me like a constant effect item. Instead of Equiping it its in my inventory active.

Made a spell ID set to ability and when added to me it acts as a constant effect item enchanted. Although I cant get Feather to work as an Ability wonder why that is. It applies to char but doesnt actualy effect weight. It sez on my spell page its there but doesnt apply to inventory page encumberance heh.

 

Scriptname RelicMarksman

 

short GotMarksman

 

Begin OnAdd Player

 

if GotMarksman == 0

player.addspell RelicMarksmanSpell

set GotMarksman to 1

endif

 

End

 

 

Begin OnDrop Player

 

if GotMarksman == 1

player.removespell RelicMarksmanSpell

set GotMarksman to 0

endif

 

End

 

BTW that Arrow Script was from Morrowind not Oblivion I made a Obliv equiv but I lost it with a harddrive death and My saves. WD80CavalierSE You will be Missed.

Anyway Babling along Thanks for the help Much Apriciated. :thanks:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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