Jump to content

Weapon with a strength requierment


okokokok

Recommended Posts

As i the title sais im trying to make a script for a weapon that adds a strength and/or enduarance requirement to wield.

 

this is what i wrote, it doesn't work at all what so ever :down:

help please :wallbash:

scn GreatHalbredOnEquip

short doOnce

begin OnActivate

Activate
If (player.getav Strength*2 + player.getav Endurance < 200)

	player.Drop 1GreatHalbred 1
	Message "You try to pick up the weapon but it slips from your hands after only a second. You are not strong enough"


elseif (player.getav Strength*2 + player.getav Endurance > 200) && (doOnce != 0)

		set doOnce to 1
		Message "You pick up the weapon with great ease and feel its power rushing through you as it becomes your own"

endif

end

Link to comment
Share on other sites

Try:

 

Begin onequip

If player.getav strenght < 60 && player.getav endurance < 60

Player.unequip sword

Message " the sword is too heavy for me "

Endif

End

 

This may contain some spelling errors, and the values and id of sword should be changed, but i hope youll find it usefull

Link to comment
Share on other sites

@okokok

 

1. I'm not sure if you can use math formulas inside an if statement

 

2. Your elseif statement isn't right (I mean the doOnce condition).

 

3. This is an OnActivate block, which means you are picking up the item. That means it's not in your inventory, so you can't drop it. (I see you put the Activate command there but the sword probably doesn't get into your inventory in time for you to use the drop command.)

Edited by fg109
Link to comment
Share on other sites

Im sorry, i misunderstood - i thought it was about equiping the item. You shouldnt add doonce at all , since it does what it says. If the player picks it up Once, the script wont ever run a second time. And the formulas .... Im sorry but i figured you were the one asking for help and i was the one knowing scripting. If you know what doesnt work without trying, then why are you asking for help?

 

Begin onactivate

If Player.getav strength < 60 && player.getav endurance < 60

message " the weapon is too heavy to lift "

Elseif

Activate

Endif

End

 

Now please try It before telling me i am wrong.

Link to comment
Share on other sites

thanks a lot guys for invalubale assistans, this is going to be an awesome mod! I think i' can release it for real soon.... just a few kinks here and there regarding the weapons enchantment script

 

My first mod is coming up soon Yayifications! ;D

 

oh and FakePersonality, i only made slight modifications to the script you just wrote here, plase tell me if you wish to be credited.....

Link to comment
Share on other sites

  • Recently Browsing   0 members

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