Page: << 1 >>
Quests
Author Message
Post #202371 Quests

hey in order to make a quest repeatable I just replace end() with Reset()?


an how do I make a quest once a day?

7 years, 8 weeks ago
Post #202372 Re: Quests

I'm not sure on this, but I think it's either DoneDaily() or ResetDaily().

Writing them out made me think they're both actions tho..


7 years, 8 weeks ago
Post #202374 Re: Quests

Here's an old daily I used for gifts, maybe it can give you a general idea.


Main

{

        questname       "Get your gift! (Daily)"

        version         1

}

 

state Begin

{

        desc            "Get your gift! (Daily)"


    action  AddNpcChat(5, "I have daily free gifts for those above level 20!");

if IsLevel(20) goto Begin1

else Reset();

}

state Begin1

{

        desc            "Get your gift! (Daily)"


action AddNpcText( 5 , "Welcome to Delos, [name]! Once per day, you can come to me for your free gift!");

action AddNpcInput( 5 , 1 , "Thank you!");


rule InputNpc ( 1 ) goto Check1

}

state Check1

{

        desc            "Get your gift! (Daily)"

 

        action          Roll(5)


        rule            DoneDaily( 1 ) goto EndWithoutReset

        rule            Rolled(1)       goto Ing1

        rule            Rolled(2)       goto Ing2

        rule            Rolled(3)       goto Ing3

        rule            Rolled(4)       goto Ing4

        rule            Rolled(5)       goto Ing5

}

state Ing1

{

action GiveItem(16, 50);

action ShowHint("You have won a Gift of Potions!");

action SetState("GetReward");

}

state Ing2

{

action GiveItem(1, 45000);

action ShowHint("You have won a Gift of Cash");

action SetState("GetReward");

}

state Ing3

{

action GiveItem(20, 10);

action ShowHint("You have won a Gift of Exp Potions");

action SetState("GetReward");

}

state Ing4

{

action GiveItem(32, 1);

action ShowHint("You have won a ... Golden...Turd?!");

action SetState("GetReward");

}

state Ing5

{

action GiveItem(451, 1);

action ShowHint("You've won Sunglasses!");

action SetState("GetReward");

}

state GetReward

{

        action          ShowHint("You have been gifted! (DAILY)");

        action          PlaySound(3);


        action          GiveExp(2000)

        action          ResetDaily();

}


state EndWithoutReset

{

        desc            "Get your gift! (Pending Reset)"

        action          ShowHint("You can only complete this quest once a day.");

        action          AddNpcText( 5 , "You have already had your free gift today, please come back tomorrow." );

        rule            TalkedToNpc( 5 ) goto Reset

}


state Reset

{

        action          ShowHint("Get your gift quest aborted...")

        action          Reset();

}


7 years, 8 weeks ago
Post #202376 Re: Quests

pretty much copied your quest at the end but its not doin it as daily its doin it as repeatable




State chris1



{


desc "Talk to Chirs"



 


action AddNpcText(9, "Hey your done huh, Dan tells me you did good ");


action AddNpcText(9, "Hope he didnt work you to hard.Well when you ever need the extra cash come back tomorrow an we'll find you something ");


action AddNpcText(9, "Well here's your pay for the day");




rule TalkedToNpc(9) goto getreward



}


State getreward



{


 


action ShowHint("You have finished your job for the day (Daily)");


action GiveItem(1, 3000);


action GiveEXP(20000);


action ResetDaily();



}


State endwithoutreset



{


desc "Start Work Again (Pending Reset)"



 


action ShowHint("You can only complete this job once a day ");


action AddNpcText(9, "You have already worked today its to late for more work come back in the morning ");


rule TalkedToNpc(9) goto reset



}


State reset



{



action ShowHint("Get your Farm quest aborted ");


action Reset();



}


7 years, 8 weeks ago
Page: << 1 >>