I need a some advice.

Post » Wed Dec 30, 2009 6:54 pm

To be honest I haven't attempted much scripting since Oblivion was still kind of new. With Morrowind I spent most of my time in the construction set scripting. The problem might just be something obvious but I'm not noticing it. I'm a little script rusty.

This is a quest start script. Some things work when I isolate the snippets to object scripts attached to rings. Nothing works when they are combined. Should I have multiple scripts running to obtain the results I'm after or is my coding just way off here?

ref TalkTargetshort DoOnceshort aaaPCSpeechSkillzshort aaaTalkTimeshort aaaTalkyPointsbegin GameModeif Iskeypressed3 35 == 1 && aaaTalkTime == 0	Set TalkTarget to GetCrosshairRef	Set aaaPCSpeechSkillz to Player.GetActorValue Speechcraft	Set aaaTalkTime to 1endif;Add TalkyRing;;if DoOnce == 0;	player.additem aaaTalkyRing 1;	player.equipitem aaaTalkyRing;	set DoOnce to 1;endif;TalkyPoints levelerif aaaTalkyPoints > 99.00	AdvancePCSkill Speechcraft 1	set aaaTalkyPoints to 0endif;Check Player Speechcraft level then execute appropriate TalkTarget reaction, try not to speak to creatures;if aaaTalkTime == 1;	if TalkTarget.IsCreature == 1;		Set aaaTalkTime to 0;		Return;	endif;endifif aaaTalkTime == 1	if aaaPCSpeechSkillz > 9.0 && aaaPCSpeechSkillz < 25.0		Player.sayto TalkTarget HELLO		Set aaaTalkTime to 2	endifendifif aaaTalkTime == 1	if aaaPCSpeechSkillz > 24.0 && aaaPCSpeechSkillz < 50.0		Player.sayto TalkTarget HELLO		Set aaaTalkTime to 3	endifendif		if aaaTalkTime == 1	if aaaPCSpeechSkillz > 49.0 && aaaPCSpeechSkillz < 75.0		Player.sayto TalkTarget hello		Set aaaTalkTime to 4	endifendif		if aaaTalkTime == 1	if aaaPCSpeechSkillz > 74.0 && aaaPCSpeechSkillz < 100.0		Player.sayto TalkTarget hello		Set aaaTalkTime to 5	endifendif	if aaaTalkTime == 1	if aaaPCSpeechSkillz > 99.0		Player.sayto TalkTarget hello		Set aaaTalkTime to 6	endifendif;TalkTarget reactionsif aaaTalkTime == 2	if Player.IsInCombat != 1		set aaaTalkyPoints to aaaTalkyPoints + 5		Message "You have been ignored..."		Set aaaTalkTime to 0	endifendifif aaaTalkTime == 3 	if Player.IsInCombat != 1		TalkTarget.sayto Player HELLO		set aaaTalkyPoints to aaaTalkyPoints + 4		Set aaaTalkTime to 0	endifendifif aaaTalkTime == 4	if Player.IsInCombat != 1		TalkTarget.sayto Player GREETING		set aaaTalkyPoints to aaaTalkyPoints + 2		Set aaaTalkTime to 0	endifendifif aaaTalkTime == 5	if Player.IsInCombat != 1		TalkTarget.sayto Player Question		set aaaTalkyPoints to aaaTalkyPoints + 1		Set aaaTalkTime to 0	endifendifif aaaTalkTime == 6	if Player.IsInCombat != 1		TalkTarget.sayto Player INFOGENERAL		set aaaTalkyPoints to aaaTalkyPoints + 1		Set aaaTalkTime to 0	endifendifend

User avatar
James Shaw
 
Posts: 3399
Joined: Sun Jul 08, 2007 11:23 pm

Return to IV - Oblivion