Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
91
_module/nss/fr_write02.nss
Normal file
91
_module/nss/fr_write02.nss
Normal file
@@ -0,0 +1,91 @@
|
||||
void main()
|
||||
{
|
||||
object oPC=GetLastUsedBy();
|
||||
object oItemToTake;
|
||||
int iBonus = GetSkillRank(SKILL_LORE, oPC);
|
||||
int iDC = 25;
|
||||
int sBonus = 0;
|
||||
|
||||
//checks race
|
||||
if (RACIAL_TYPE_ELF)
|
||||
{
|
||||
int sBonus = 5;
|
||||
//checks lore
|
||||
if ((d20() + iBonus + sBonus) >= iDC)
|
||||
{
|
||||
//checks for paper, quill and ink
|
||||
if ((GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscparchment")))&&(GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscquill")))&&(GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscinkwell"))))
|
||||
{
|
||||
oItemToTake = GetItemPossessedBy(oPC, "ah_miscparchment");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
CreateItemOnObject("fr_elfscroll02", oPC);
|
||||
}
|
||||
//if one is missing tells the following
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You require proper equipment to make notes while you translate");
|
||||
}
|
||||
}
|
||||
//if lore fails
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You failed to understand the text");
|
||||
}
|
||||
}
|
||||
//checks race
|
||||
else if (RACIAL_TYPE_HALFELF)
|
||||
{
|
||||
int sBonus = 3;
|
||||
//checks lore
|
||||
if ((d20() + iBonus + sBonus) >= iDC)
|
||||
{
|
||||
//checks for paper, quill and ink
|
||||
if ((GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscparchment")))&&(GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscquill")))&&(GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscinkwell"))))
|
||||
{
|
||||
oItemToTake = GetItemPossessedBy(oPC, "ah_miscparchment");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
CreateItemOnObject("fr_elfscroll02", oPC);
|
||||
}
|
||||
//if one is missing tells the following
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You require proper equipment to make notes while you translate");
|
||||
}
|
||||
}
|
||||
//if lore fails
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You failed to understand the text");
|
||||
}
|
||||
}
|
||||
//if other race than elf...
|
||||
else
|
||||
{
|
||||
int sBonus = 0;
|
||||
//checks lore
|
||||
if ((d20() + iBonus + sBonus) >= iDC)
|
||||
{
|
||||
//checks for paper, quill and ink
|
||||
if ((GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscparchment")))&&(GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscquill")))&&(GetIsObjectValid(GetItemPossessedBy(oPC,"ah_miscinkwell"))))
|
||||
{
|
||||
oItemToTake = GetItemPossessedBy(oPC, "ah_miscparchment");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
CreateItemOnObject("fr_elfscroll02", oPC);
|
||||
}
|
||||
//if one is missing tells the following
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You require proper equipment to make notes while you translate");
|
||||
}
|
||||
}
|
||||
//if lore fails
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oPC,"You failed to understand the text");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user