Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Detecting when a special attack kills something in FO3


YX33A
 Share

Recommended Posts

So I got the green light to use TTT's old script that allowed Robco Certified to check if the player's robots have killed anything, and reward the player some XP for this.

Only problem is, I can't get it to work for me in what I'm doing, even though the code is pretty much the same.

Here's my version.

scn YX33ALaserKillcountScript


short killcount

short xpgain

short level


BEGIN ScriptEffectUpdate

if(level)

	return

elseif(getdead)

	if(getitemcount YX33ALaserKilledFlag)

		set level to 1

		return

	endif


	set killcount to GetPCMS "Creatures Killed" + GetPCMS "People Killed"

	if(killcount <= YX33ALaserQuest.killcount)

		set YX33ALaserQuest.killcount to killcount

		set level to getlevel

		additem YX33ALaserKilledFlag 1


		if(getiscreature)

			if(level >= getGS iXPLevelKillCreatureVeryHard )

				set xpgain to getGS iXPRewardKillOpponentVeryHard

				player.rewardXP xpgain

			elseif(level >= getGS iXPLevelKillCreatureHard )

				set xpgain to getGS iXPRewardKillOpponentHard

				player.rewardXP xpgain

			elseif(level >= getGS iXPLevelKillCreatureAverage )

				set xpgain to getGS iXPRewardKillOpponentAverage

				player.rewardXP xpgain

			elseif(level >= getGS iXPLevelKillCreatureEasy )

				set xpgain to getGS iXPRewardKillOpponentEasy

				player.rewardXP xpgain

			else

				set xpgain to getGS iXPRewardKillOpponentVeryEasy

				player.rewardXP xpgain

			endif

		else

			if(level >= getGS iXPLevelKillNPCVeryHard )

				set xpgain to getGS iXPRewardKillOpponentVeryHard

				player.rewardXP xpgain

			elseif(level >= getGS iXPLevelKillNPCHard )

				set xpgain to getGS iXPRewardKillOpponentHard

				player.rewardXP xpgain

			elseif(level >= getGS iXPLevelKillNPCAverage )

				set xpgain to getGS iXPRewardKillOpponentAverage

				player.rewardXP xpgain

			elseif(level >= getGS iXPLevelKillNPCEasy )

				set xpgain to getGS iXPRewardKillOpponentEasy

				player.rewardXP xpgain

			else

				set xpgain to getGS iXPRewardKillOpponentVeryEasy

				player.rewardXP xpgain

			endif

		endif


	else

		set level to getlevel


	endif

endif

end
And TTT's Version.
scn aaaRobcoKillcountScript


short killcount

short xpgain

short level


BEGIN ScriptEffectUpdate

if(level)

	return

elseif(getdead)

	if(getitemcount aaaRobcoKilledFlag)

		set level to 1

		return

	endif


	set killcount to GetPCMS "Creatures Killed" + GetPCMS "People Killed"

	if(killcount <= aaaRobcoQuest.killcount)

		set aaaRobcoQuest.killcount to killcount

		set level to getlevel

		additem aaaRobcoKilledFlag 1


		if(getiscreature)

			if(level >= getGS iXPLevelKillCreatureVeryHard )

				set xpgain to getGS iXPRewardKillOpponentVeryHard

				rewardXP xpgain

			elseif(level >= getGS iXPLevelKillCreatureHard )

				set xpgain to getGS iXPRewardKillOpponentHard

				rewardXP xpgain

			elseif(level >= getGS iXPLevelKillCreatureAverage )

				set xpgain to getGS iXPRewardKillOpponentAverage

				rewardXP xpgain

			elseif(level >= getGS iXPLevelKillCreatureEasy )

				set xpgain to getGS iXPRewardKillOpponentEasy

				rewardXP xpgain

			else

				set xpgain to getGS iXPRewardKillOpponentVeryEasy

				rewardXP xpgain

			endif

		else

			if(level >= getGS iXPLevelKillNPCVeryHard )

				set xpgain to getGS iXPRewardKillOpponentVeryHard

				rewardXP xpgain

			elseif(level >= getGS iXPLevelKillNPCHard )

				set xpgain to getGS iXPRewardKillOpponentHard

				rewardXP xpgain

			elseif(level >= getGS iXPLevelKillNPCAverage )

				set xpgain to getGS iXPRewardKillOpponentAverage

				rewardXP xpgain

			elseif(level >= getGS iXPLevelKillNPCEasy )

				set xpgain to getGS iXPRewardKillOpponentEasy

				rewardXP xpgain

			else

				set xpgain to getGS iXPRewardKillOpponentVeryEasy

				rewardXP xpgain

			endif

		endif


	else

		set level to getlevel


	endif

endif

end

I'm not sure where I messed up. I've got the stuff so that it should work, using slightly different code names, but it doesn't work anyway.

I'm guessing I need to get some help.

Help?

Link to comment
Share on other sites

Just realized that this script combo won't work no matter what I figure out: It uses FireWeapon, which does not allow for Enchantments to function on the attack.

I guess I'll either have to scrap the idea, or find a even more strange method.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...