DrPootis Posted March 17, 2012 Share Posted March 17, 2012 (edited) 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 March 18, 2012 by DrPootis Link to comment Share on other sites More sharing options...
rickerhk Posted March 18, 2012 Share Posted March 18, 2012 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 actorsEnduranceCondition - Base value is 100. Corresponds to the torso on humanoid actorsLeftAttackCondition - Base value is 100. Corresponds to the left arm on humanoid actorsRightAttackCondition - Base value is 100. Corresponds to the right arm on humanoid actorsLeftMobilityCondition - Base value is 100. Corresponds to the left leg on humanoid actorsRightMobilityCondition - 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 More sharing options...
DrPootis Posted March 18, 2012 Author Share Posted March 18, 2012 I added the extra if, and changed the remove spell to setstage doctors 20, and it worked! :DThank you so much :Pmind if I put you in the mod readme to thank for your help? Link to comment Share on other sites More sharing options...
rickerhk Posted March 19, 2012 Share Posted March 19, 2012 You don't have to do that but I don't mind ;) Link to comment Share on other sites More sharing options...
Recommended Posts