generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
43
_module/nss/qst_1_gv_rwd_3.nss
Normal file
43
_module/nss/qst_1_gv_rwd_3.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
Forsettii's Quest Builder System.
|
||||
Version 1.0
|
||||
Created for Layonara Online
|
||||
Forsettii Forsettii@yahoo.com
|
||||
April 7, 2004
|
||||
Quest Style 1 : Give Rewards Script (Used for Solo Quests)
|
||||
Variables: Quest_Name - Same as Journal Entry
|
||||
gold_2_give - Amount of Gold Given
|
||||
item_2_take - Item to Take #1
|
||||
item_2_give - Item Given to player for finishing quest
|
||||
xp is given to Player from the Journal
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
|
||||
#include "nw_i0_tool"
|
||||
|
||||
void main()
|
||||
{
|
||||
string sName = GetLocalString(OBJECT_SELF, "quest_name");
|
||||
int iGold = GetLocalInt(OBJECT_SELF, "gold_2_give");
|
||||
int iXp = GetJournalQuestExperience(sName);
|
||||
string sGet_Item = GetLocalString(OBJECT_SELF, "item_2_take");
|
||||
string sGve_Item = GetLocalString(OBJECT_SELF, "item_2_give");
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
// Remove PC from Party since this is an individual Quest
|
||||
RemoveFromParty(oPC);
|
||||
// Give the speaker some gold
|
||||
GiveGoldToCreature(oPC, iGold);
|
||||
|
||||
// Give the speaker some XP (XP to Party)
|
||||
GiveXPToCreature(oPC, iXp);
|
||||
|
||||
// Give the speaker the items
|
||||
CreateItemOnObject(sGve_Item, oPC, 1);
|
||||
|
||||
// Remove items from the player's inventory
|
||||
object oItem = GetObjectByTag(sGet_Item);
|
||||
if(GetIsObjectValid(oItem) != 0)
|
||||
DestroyObject(oItem);
|
||||
// Set the variables
|
||||
SetLocalInt(oPC, sName, 4);
|
||||
AddJournalQuestEntry(sName, 4, oPC, TRUE, FALSE, FALSE);
|
||||
}
|
||||
Reference in New Issue
Block a user