Jump to content

AutoDoc script not working


DrPootis

Recommended Posts

I have a script for an AutoDoc that allows for a range of procedures through a message box, but I cannot get the script to compile.

I have been looking around for a while but still to no avail.

Is anyone able to help?

Here's the script:

 

scn BunkerAutoDocScript

short Button

begin OnActivate

       if IsActionRef player
               ShowMessage BunkerHomeAutoDocMsg
       endif

end

begin MenuMode 1001

       set Button to GetButtonPressed

       Elseif (Button == 1)
               player.resethealth

       Elseif (Button == 2)
               player.restorelimbChest
               player.restorelimbHead
               player.restorelimbLeftArm
               player.restorelimbLeftLeg
               player.restorelimbRightArm
               player.restorelimbRightLeg

       Elseif (Button == 3)
               player.RestoreAV RadiationRads 1000

       Elseif (Button == 4)
               Player.RemoveSpell 0006DC6E

       Elseif (Button == 5)
               ShowPlasticSurgeonMenu

end

 

edit: I just found out I was using spaces instead of tabs, which probably had something to do with it.

Sadly it still isn't working, but here's the new(er) script:

 

scn BunkerAutoDocScript

short Button

begin OnActivate

if IsActionRef player

	ShowMessage BunkerHomeAutoDocMsg

endif

end

begin MenuMode 1001

	set Button to GetButtonPressed

	Elseif ( Button == 1 )
		player.resethealth

	Elseif ( Button == 2 )
		player.RestoreAV RadiationRads 1000

	Elseif ( Button == 3 )
		Player.RemoveSpell 0006DC6E

	Elseif ( Button == 4 )
		ShowBarberMenu

	Elseif ( Button == 5 )
		ShowPlasticSurgeonMenu

end

Edited by DrPootis
Link to comment
Share on other sites

If you have elseif's, you need your if, and endif. And you restore limbs with RestoreAV. Also, you should use the editor ID for the spell, instead of 0006DC6E, or you can use the Doctors quest to remove addictions.

 

These are the limbs http://geck.bethsoft.com/index.php/Stats_List:

 

PerceptionCondition - Base value is 100. Corresponds to the head on humanoid actors

EnduranceCondition - Base value is 100. Corresponds to the torso on humanoid actors

LeftAttackCondition - Base value is 100. Corresponds to the left arm on humanoid actors

RightAttackCondition - Base value is 100. Corresponds to the right arm on humanoid actors

LeftMobilityCondition - Base value is 100. Corresponds to the left leg on humanoid actors

RightMobilityCondition - Base value is 100. Corresponds to the right leg on humanoid actors

 

To restore the player's right leg would be:

 

Player.RestoreAV RightMobilityCondition 100

 

 

scn BunkerAutoDocScript

short Button

begin OnActivate

   	if IsActionRef player
           	ShowMessage BunkerHomeAutoDocMsg
   	endif

end

begin MenuMode 1001

   	set Button to GetButtonPressed

   	if (Button == 1)
           	player.resethealth

   	Elseif (Button == 2)
             	Player.RestoreAV RightMobilityCondition 100
             	;Etc

   	Elseif (Button == 3)
           	player.RestoreAV RadiationRads 1000

   	Elseif (Button == 4)
           	;Player.RemoveSpell 0006DC6E
           	SetStage Doctors 20   ;remove all addictions

   	Elseif (Button == 5)
           	ShowPlasticSurgeonMenu
	
	Endif

end

Link to comment
Share on other sites

  • Recently Browsing   0 members

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