andreadixon825
Member
|
Hello I need a little help with make quests.
Hello,
I'm looking at the source code to esenthel rpg 2, to make more then one quest, would I just add something like this next to the same one in the source? And just change name.
Code:
virtual void toggleChr (Chr &chr )
{
if(!chr.alive()) // loot corpse
{
Storage.link(&chr);
Storage.show();
InvGui .show();
}else
if(chr.type==CHR_HUMAN) // talk to
{
if(!QuestCompleted)
{
// check if we have required items
Item *chalice=null, *wine=null, *key=null;
REPA(inv.items)
{
Item &item=inv.items[i];
if(item.name=="Chalice")chalice=&item;else
if(item.name=="Wine" )wine =&item;else
if(item.name=="Key" )key =&item;
}
if(chalice && wine && key)
{
itemDestroy(*chalice);
itemDestroy(*wine );
itemDestroy(*key );
QuestShow("Thanks for bringing back the items.\nYou're awesome!\nThe horse is yours.");
QuestCompleted=true;
}else
{
QuestShow("Please help fellow Adventurer!\nThose nasty goblins stole my precious items, please bring them back.\nIf you'll return them safely I will give you my horse. You can find the two goblins behind the windmill, please hurry.");
}
}else
{
QuestShow("Again thank you so much!");
}
}
}
How dose quests work? and can you have more then one quest on an object like human.
|
|
09-07-2016 06:07 PM |
|