Initial Commit
Initial Commit
This commit is contained in:
23
_module/nss/fishing_lowskill.nss
Normal file
23
_module/nss/fishing_lowskill.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "x4_inc_functions"
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
|
||||
object oLeft = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
|
||||
object oRod;
|
||||
if (GetTag(oRight) == "fishrod") oRod = oRight;
|
||||
else oRod = oLeft;
|
||||
string sResRef = GetResRef(oRod);
|
||||
|
||||
SetLocalString(oPC, "FishingRod", sResRef);
|
||||
|
||||
int nSkill = 0;
|
||||
if (sResRef == "fishrod_black") nSkill = 700;
|
||||
if (sResRef == "fishrod_diamond") nSkill = 300;
|
||||
if (sResRef == "fishrod_glass") nSkill = 130;
|
||||
if (sResRef == "fishrod_steel") nSkill = 50;
|
||||
int nPCSkill = GetCampaignInt(CharacterDB(oPC), "FISHING_SKILL");
|
||||
if (nPCSkill < nSkill) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user