Jump to content

Yet another scripting issue/problem.


JcHARP

Recommended Posts

Nah.... This is what I done.

 

I set up two quests.

BSPSetUp

BSPMain

 

I set up a script called BSPSetUp and it's code was

 

scn BSPSetUpScript

Short Stage

Begin GameMode
	if (Stage != 2)
		Set Stage to 2
		SetQuestDelay BSPMain 0.1
	endif
end

 

I made that script type a quest and put it in the BSPSetUpQuest

Then started a new script which was

 

scn BSPMainScript

ref Person

Begin GameMode
If (BSPSetUp.Stage == 2)
Set Person to Player.GetCrosshairRef
	if (Person.GetIsRace Caucasian) || (Person.GetIsRace CaucasianOld) || (Person.GetIsRace CaucasianOldAged) && (Person.IsKiller Player)
		BDSHitmanBoxREF.AddItem Caps001 25
	endif
endif
end

 

Set that script to quest script and stuck it in that quest.

Link to comment
Share on other sites

Create a quest (start game enabled, or added with a perk - whatever you were planning) and attach it this script:

scn BSPHitmanQuestScript

short	iKillCount

begin GameMode

	if iKillCount == 0
		set iKillCount to GetPCMiscStat "People Killed"
	endif

	if GetPCMiscStat "People Killed" > iKillCount
		set iKillCount to iKillCount + 1
		BDSHitmanBoxREF.Additem Caps001 25
	endif

end

It monitors all your human kills, but does not discriminate between races. Not exactly what you asked for, but close enough.

 

The same thing can probably be done with a challenge, so you may want to check that out also, if you prefer not to use the above method.

Link to comment
Share on other sites

Do the challenges allow you have specific enough conditions that you could set the race of NPCs killed as a condition?

If so, it'd be a bit of a messy way I'll admit, but if you set up a quets to track the completion of that challenge that should get the desired effect.

Set the quest as repeatable and maybe make it set to having to kill one person to complete the challenge.

All hypothetical at this point, I've never really done much with challenges; and I'm having problems reinstalling my game. So I can't check right now unfortuanately

Link to comment
Share on other sites

This would run on a quest.

scn CapsForKillsSCRIPT

int iKillCount

BEGIN GameMode
	if (iKillCount < GetPCMiscStat "Total Things Killed")
		set iKillCount to GetPCMiscStat "Total Things Killed"
		DropboxREF.AddItem Caps001 25
	endif
END
In order to work well, it would need to run at a very low delay, meaning it uses more resources. I've not clue as to the efficiency of the GetPCMiscStat function, but it'd be better to do something like this:
scn CapsForKillsSCRIPT

int iStatKills
int iKillCount
int iDiff

BEGIN GameMode
	set iStatKills to GetPCMiscStat "Total Things Killed"
	if (iKillCount < iStatKills)
		set iDiff to (iStatKills - iKillCount) * KillCapReward
		DropboxREF.AddItem Caps001 iDiff
		set iKillCount to iStatKills
	endif
END
This also runs on a quest script, but instead of just looking for an increase, it calculates the amount increased since it last ran. That way you can put it on a very nice friendly delay of 10 seconds or so. It will check the kill count, if it has increased, it will get the difference since last time, multiply it by your reward amount, and then add that many caps to the container.
I've been doing some work with challenges lately and they might also work. No, you cannot specify a race or gender, and to specify any specific group you would need to put all the base forms into a form list and use that for the challenge. What you could do however is have a challenge set to a threshold of 1, with an interval of 1. This should complete every time you do whatever the challenge is.
You set the challenge to Misc Stat type, and select either "People Killed" or "Total Things Killed". People will only be NPCs, etc. You then make a reward script for the challenge. That script would be something like this:
scn ChallengeCapsForKills

BEGIN ScriptEffectStart
	DropboxRef.AddItem caps001 25
END

 

It needs to be an Effect type script, and you attach it to the challenge. Once done, any kill you make against either NPCs or anything (depending on how you set it up) will result in money being added, and that horrible challenge completion sound.

Link to comment
Share on other sites

I would ref-walk for NPCs when combat starts, add them to a form list, and then check the list for dead people and remove them all when combat ends, awarding the caps for each dead NPC. You can set up whatever exclusion criteria you want before adding them to the check list. Edited by luthienanarion
Link to comment
Share on other sites

would ref-walk for NPCs when combat starts, add them to a form list, and then check the list for dead people and remove them all when combat ends, awarding the caps for each dead NPC. You can set up whatever exclusion criteria you want before adding them to the check list.

Well yeah, what luthien says would work well, but is considerably more work. It is however the ideal scenario, as you would be able to add any checks you want. You could limit by race, gender, and even what type of weapon or where on the body the kill was made. You can give rewards for level, health, limb dismember, etc with this method. It would be very robust and easy to add onto. Especially if you put in a check for the player's weapon, you could give bonus rewards for things like killing deathclaws with pistols or melee. Just thoughts and reasons why ref walking is awesome.

 

So, easy way is the way I said first, better way is the second way I said, and best (ie most comprehensive coverage) is the way luthien says, it's just also the most difficult to implement.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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