generated from Jaysyn/ModuleTemplate
160 lines
5.8 KiB
Plaintext
160 lines
5.8 KiB
Plaintext
/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
Forsettii's Quest Builder System.
|
|
Version 1.0
|
|
Created for Layonara Online
|
|
Forsettii Forsettii@yahoo.com / Case By Doogz
|
|
April 7, 2004
|
|
Quest Style 8 : Checks for the 8 items (Used for Solo Quests)
|
|
|
|
Variables: Quest_Name - Same as Journal Entry
|
|
item_col_1 - These are the items needed for this 8 part Quest.
|
|
item_col_2
|
|
item_col_3
|
|
item_col_4
|
|
item_col_5
|
|
item_col_6
|
|
item_col_7
|
|
item_col_8
|
|
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);
|
|
int fGold = iGold * 5;
|
|
int fXp = iXp * 5;
|
|
string sTke_Item = GetLocalString(OBJECT_SELF, "item_2_take");
|
|
string sGve_Item = GetLocalString(OBJECT_SELF, "item_2_give");
|
|
object oPC = GetPCSpeaker();
|
|
object oItemToTake;
|
|
string sGet_Item1 = GetLocalString(OBJECT_SELF, "item_col_1");
|
|
string sGet_Item2 = GetLocalString(OBJECT_SELF, "item_col_2");
|
|
string sGet_Item3 = GetLocalString(OBJECT_SELF, "item_col_3");
|
|
string sGet_Item4 = GetLocalString(OBJECT_SELF, "item_col_4");
|
|
string sGet_Item5 = GetLocalString(OBJECT_SELF, "item_col_5");
|
|
string sGet_Item6 = GetLocalString(OBJECT_SELF, "item_col_6");
|
|
string sGet_Item7 = GetLocalString(OBJECT_SELF, "item_col_7");
|
|
string sGet_Item8 = GetLocalString(OBJECT_SELF, "item_col_8");
|
|
|
|
// Remove PC from Party since this is an individual Quest
|
|
RemoveFromParty(oPC);
|
|
// Give the speaker some xp
|
|
GiveXPToCreature(oPC, iXp);
|
|
|
|
// Give the speaker some gold
|
|
GiveGoldToCreature(oPC, iGold);
|
|
|
|
int nVar = GetLocalInt(oPC, sName);
|
|
|
|
switch (nVar)
|
|
{
|
|
case 1:
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 2);
|
|
AddJournalQuestEntry(sName, 2, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item1);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 2:
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 3);
|
|
AddJournalQuestEntry(sName, 3, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item2);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 3:
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 4);
|
|
AddJournalQuestEntry(sName, 4, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item3);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 4:
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 5);
|
|
AddJournalQuestEntry(sName, 5, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item4);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 5:
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 6);
|
|
AddJournalQuestEntry(sName, 6, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item5);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 6:
|
|
// Set the variables
|
|
SetLocalInt(oPC, sName, 7);
|
|
AddJournalQuestEntry(sName, 7, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item6);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 7:
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 8);
|
|
AddJournalQuestEntry(sName, 8, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item7);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
break;
|
|
case 8:
|
|
GiveGoldToCreature(oPC, fGold);
|
|
// Give the party some XP
|
|
GiveXPToCreature(oPC, fXp);
|
|
// Give the speaker the items
|
|
CreateItemOnObject(sGve_Item, oPC, 1);
|
|
// Set the variables
|
|
|
|
SetLocalInt(oPC, sName, 9);
|
|
AddJournalQuestEntry(sName, 9, oPC, TRUE, FALSE, FALSE);
|
|
|
|
// Remove items from the player's inventory
|
|
oItemToTake = GetItemPossessedBy(oPC, sGet_Item8);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
oItemToTake = GetItemPossessedBy(oPC, sTke_Item);
|
|
if(GetIsObjectValid(oItemToTake))
|
|
DestroyObject(oItemToTake);
|
|
|
|
break;
|
|
case 9:
|
|
break;
|
|
}
|
|
}
|
|
|