mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-22 12:47:45 +00:00
89 lines
2.4 KiB
ChaiScript
89 lines
2.4 KiB
ChaiScript
// This is an automatically generated chai script template
|
|
// Content needs to be added by hand to make it function
|
|
// In order for this script to be loaded, change its extension to .chai
|
|
// and move it to the correct folder in bin/scripts/chai/quest
|
|
|
|
// Quest Script: SubFst019_00049
|
|
// Quest Name: I Am Millicent, Hear Me Roar
|
|
// Quest ID: 65585
|
|
// Start NPC: 1000788
|
|
// End NPC: 1000429
|
|
|
|
class SubFst019Def
|
|
{
|
|
def SubFst019Def()
|
|
{
|
|
// Basic quest information
|
|
this.name = "I Am Millicent, Hear Me Roar";
|
|
this.id = 65585;
|
|
|
|
// Quest vars / flags used
|
|
// GetQuestUI8AL
|
|
|
|
// Steps in this quest ( 0 is before accepting,
|
|
// 1 is first, 255 means ready for turning it in
|
|
this.SEQ_0 = 0;
|
|
this.SEQ_FINISH = 255;
|
|
|
|
// Quest rewards
|
|
this.RewardExpFactor = 50;
|
|
this.RewardItem = [4551];
|
|
this.RewardItemCount = [5];
|
|
|
|
// Entities found in the script data of the quest
|
|
this.ACTOR0 = 1000788;
|
|
this.ACTOR1 = 1000429;
|
|
this.SEQ_0_ACTOR0 = 0;
|
|
this.SEQ_1_ACTOR1 = 1;
|
|
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Available Scenes in this quest, not necessarly all are used
|
|
def Scene00000( player )
|
|
{
|
|
player.eventPlay( this.id, 0, NONE,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
if( param2 == 1 ) // accept quest
|
|
{
|
|
player.questUpdate( SubFst019.id, SubFst019.SEQ_FINISH );
|
|
}
|
|
} );
|
|
}
|
|
|
|
def Scene00001( player )
|
|
{
|
|
player.eventPlay( this.id, 1, NONE,
|
|
fun( player, eventId, param1, param2, param3 )
|
|
{
|
|
if( param2 == 1 ) // finish quest
|
|
{
|
|
if( player.giveQuestRewards( SubFst019.id, 0 ) )
|
|
{
|
|
player.questFinish( SubFst019.id );
|
|
}
|
|
}
|
|
} );
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Event Handlers
|
|
def onTalk( eventId, player, actorId )
|
|
{
|
|
var actor = mapActor( actorId );
|
|
|
|
if( !player.hasQuest( SubFst019.id ) )
|
|
{
|
|
SubFst019.Scene00000( player );
|
|
}
|
|
|
|
if( actor == SubFst019.ACTOR1 && player.questGetSeq( SubFst019.id ) == SubFst019.SEQ_FINISH )
|
|
{
|
|
SubFst019.Scene00001( player );
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
GLOBAL SubFst019 = SubFst019Def();
|