Jump to content

Multi Equip/Unequip spell adding/removal


Rizalgar

Recommended Posts

You're like some kind of bad ass aren't you? Teach me oh wise one! Believe it or not, I used to be really good at Morrowind scripting back when I was like thirteen lol. But that was over a decade ago, I don't remember how to do it worth a crap now lol.

 

I really do appreciate you takin the time to help me out. It is very awesome of you

 

And to answer the buff question, I thought about doing a single strong buff with all 8 pieces, but I decided it would be cooler ( for some reason ) to have it kind of like ESO where you get it for x amount of pieces equipped you get a buff

So I will definitely incorporate this and see what magic you have given unto me!

 

 

 

Edit -- Yep, getting nothing from the script. But why do I feel like you did it intentionally to force me to figure it out for myself? Well, challenge accepted, I say! lol

 

I'm sure I'll be back here in a while to tell you I can't figure it out

Edited by Rizalgar
Link to comment
Share on other sites

You do realize I did not provide the entire script - just the sections that were edited. You still need your timer and set state to 1 along with your original declarations. I showed the declaration of the new variable - that probably caused confusion.

Link to comment
Share on other sites

Ah no I figured as much. I do have a question though. Since at the Script State == 1 you also call Set armorCount to 0 won't that put the spell add/removal in an endless loop? Or am I mistaken?

Edited by Rizalgar
Link to comment
Share on other sites

Ok. Thanks once again to your awesome help I've got it working. I don't know if I just did something wrong altogether from the example you gave me, but I got it working with these minor tweaks

Begin _RizAdSet

Short State
short Counter

If ( State == 0 )
	Set State to 1
EndIf

If ( State == 1 )
	Set Counter to 0
EndIf

If ( Counter == 0 )
	If ( ( Player->HasItemEquipped, "adamantium_bracer_left" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_bracer_right" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	Set State to 2
EndIf

If ( State == 2 )
	If ( Counter >= 2 )
		Player->AddSpell, "_RizAd2Set"
	EndIf
	Set State to 3
EndIf

If ( State == 3 )
	If ( Counter <= 1 )
		Player->RemoveSpell, "_RizAd2Set"
	EndIf
EndIf

Set State to 0

End _RizAdSet
Link to comment
Share on other sites

And here is the full, completely functional, 100% working script. Damn you're awesome Cyran!!!

Begin _RizAdSet

Short State
short Counter

If ( State == 0 )
	Set State to 1
EndIf

If ( State == 1 )
	Set Counter to 0
EndIf

If ( Counter == 0 )
	If ( ( Player->HasItemEquipped, "adamantium_bracer_left" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_bracer_right" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium boots" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_cuirass" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_greaves" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_pauldron_left" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_pauldron_right" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	If ( ( Player->HasItemEquipped, "adamantium_helm" ) >= 1 )
		Set Counter to ( Counter + 1 )
	EndIf
	Set State to 2
EndIf

If ( State == 2 )
	If ( Counter >= 2 )
		Player->AddSpell, "_RizAd2Set"
	EndIf
	If ( Counter >= 3 )
		Player->AddSpell, "_RizAd3Set"
	EndIf
	If ( Counter >= 4 )
		Player->AddSpell, "_RizAd4Set"
	EndIf
	If ( Counter >= 5 )
		Player->AddSpell, "_RizAd5Set"
	EndIf
	If ( Counter >= 6 )
		Player->AddSpell, "_RizAd6Set"
	EndIf
	If ( Counter >= 7 )
		Player->AddSpell, "_RizAd7Set"
	EndIf
	If ( Counter >= 8 )
		Player->AddSPell, "_RizAd8Set"
	EndIf
	Set State to 3
EndIf

If ( State == 3 )
	If ( Counter <= 1 )
		Player->RemoveSpell, "_RizAd2Set"
		Player->RemoveSpell, "_RizAd3Set"
		Player->RemoveSpell, "_RizAd4Set"
		Player->RemoveSpell, "_RizAd5Set"
		Player->RemoveSpell, "_RizAd6Set"
		Player->RemoveSpell, "_RizAd7Set"
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
	If ( Counter <= 2 )
		Player->RemoveSpell, "_RizAd3Set"
		Player->RemoveSpell, "_RizAd4Set"
		Player->RemoveSpell, "_RizAd5Set"
		Player->RemoveSpell, "_RizAd6Set"
		Player->RemoveSpell, "_RizAd7Set"
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
	If ( Counter <= 3 )
		Player->RemoveSpell, "_RizAd4Set"
		Player->RemoveSpell, "_RizAd5Set"
		Player->RemoveSpell, "_RizAd6Set"
		Player->RemoveSpell, "_RizAd7Set"
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
	If ( Counter <= 4 )
		Player->RemoveSpell, "_RizAd5Set"
		Player->RemoveSpell, "_RizAd6Set"
		Player->RemoveSpell, "_RizAd7Set"
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
	If ( Counter <= 5 )
		Player->RemoveSpell, "_RizAd6Set"
		Player->RemoveSpell, "_RizAd7Set"
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
	If ( Counter <= 6 )
		Player->RemoveSpell, "_RizAd7Set"
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
	If ( Counter <= 7 )
		Player->RemoveSpell, "_RizAd8Set"
	EndIf
EndIf

Set State to 0

End _RizAdSet
Link to comment
Share on other sites

Congratulations - and well done... you compensated for a flaw in my orginal script. I failed to take into account that the player might remove armor yet still have enough equipped to qualify for a bluff. I stripped all the buffs at once. It would have been fixed the next time the script ran, but your solution is elegant in removing only those buffs that the player did not merit. The student is now the master :wink:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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