mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-22 12:47:45 +00:00
100 lines
No EOL
2.5 KiB
ChaiScript
100 lines
No EOL
2.5 KiB
ChaiScript
// Quest Script: SubFst011_00037
|
|
// Quest Name: Population Control
|
|
// Quest ID: 65573
|
|
// Start NPC: 1000195
|
|
// End NPC: 1000195
|
|
|
|
class SubFst011Def
|
|
{
|
|
def SubFst011Def()
|
|
{
|
|
// Basic quest information
|
|
this.name = "Population Control";
|
|
this.id = 65573;
|
|
|
|
// 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_1 = 1;
|
|
this.SEQ_FINISH = 255;
|
|
|
|
// Quest rewards
|
|
this.RewardExpFactor = 100;
|
|
this.RewardItemOptional = [2653, 2655, 5823];
|
|
this.RewardItemOptionalCount = [1, 1, 3];
|
|
|
|
// Entities found in the script data of the quest
|
|
this.ACTOR0 = 1000195;
|
|
this.ENEMY0 = 47;
|
|
this.SEQ_0_ACTOR0 = 0;
|
|
this.SEQ_2_ACTOR0 = 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( SubFst011.id, SubFst011.SEQ_1 );
|
|
}
|
|
});
|
|
}
|
|
|
|
def Scene00001( player )
|
|
{
|
|
player.eventPlay( this.id, 1, NONE,
|
|
fun( player, eventid, param1, param2, param3 )
|
|
{
|
|
if( param2 == 1 ) // accept quest
|
|
{
|
|
if( player.giveQuestRewards( SubFst011.id, 0 ) )
|
|
{
|
|
player.questFinish( SubFst011.id );
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
def onTalk( eventId, player, actorId )
|
|
{
|
|
var actor = mapActor( actorId );
|
|
|
|
if( player.hasQuest(SubFst011.id) )
|
|
{
|
|
this.Scene00001( player );
|
|
}
|
|
else
|
|
{
|
|
this.Scene00000( player );
|
|
}
|
|
}
|
|
|
|
def onBnpcKill_47( player )
|
|
{
|
|
var currentKC = player.getQuestUI8AL(SubFst011.id);
|
|
currentKC = currentKC + 1;
|
|
|
|
player.questMessage( SubFst011.id, 0, 2, currentKC, 6 );
|
|
|
|
if( currentKC >= 6 )
|
|
{
|
|
player.questUpdate( SubFst011.id, SubFst011.SEQ_FINISH );
|
|
}
|
|
else
|
|
{
|
|
player.setQuestUI8AL( SubFst011.id, currentKC );
|
|
}
|
|
}
|
|
|
|
};
|
|
|
|
GLOBAL SubFst011 = SubFst011Def(); |