generated from Jaysyn/ModuleTemplate
45 lines
1.7 KiB
Plaintext
45 lines
1.7 KiB
Plaintext
/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
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, 3);
|
|
AddJournalQuestEntry(sName, 3, oPC, TRUE, FALSE, FALSE);
|
|
|
|
}
|