Jump to content

scripting help


Recommended Posts

I need help with this script, I'm trying to make it so if the player is carrying the weight equivlent of full heavy armor, he cannot swim effectively. but for some reason, I get slower swimming speed no matter what the player's encumberance is.

begin AAAweightswimming

long enc
long maxenc
long swiftswim
long pcref

if ( player->geteffect sEffectSwiftSwim == 0 )
	set swiftswim to 1
endif

if ( player->geteffect sEffectSwiftSwim == 1 )
	set swiftswim to 0
endif


if ( swiftswim )
	Setx pcref to xGetRef, "Player"
	XSetRef pcref
	setx enc to xgetencumb
	set maxenc to ( player->getstrength )

	if ( enc <= maxenc )
		player->setswimspeed 0
	endif

	if ( enc > maxenc )
		player->setswimspeed -90
	endif
endif


end
Edited by bioshards
Link to comment
Share on other sites

  • Recently Browsing   0 members

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