summaryrefslogblamecommitdiff
path: root/npc/items/valentine.txt
blob: 2bb56ab261249ca9979ab75fd47a746bf03f45d0 (plain) (tree)
1
2
3
4
5
6
7
8
9





                      

                                                
                                                 


















                                                                                   


           
// TMW-2 script.
// Author:
//    Jesusalva
// Description:
//    Valentine eating

// Eats chocolate, returns bad ones if requested
// EatValentineChocolate()
function	script	EatValentineChocolate	{
	if ($EVENT$ != "Valentine") {
		dispbottom l("Past due date.");
	} else if (#VALENTINE_OPENED >= #VALENTINE_RECEIVED) {
        dispbottom l("This is not meant for me.");
        getitem BoxOfChocolates, 1;
	} else {
        .@pts=1;
        if (!GSET_VALENTINE_EATONE) {
            .@pts=(#VALENTINE_RECEIVED-#VALENTINE_OPENED);
            delitem BoxOfChocolates, .@pts-1;
        }
		// I know technically this is wrong grammar, but I want fixed width
		#VALENTINE_OPENED=#VALENTINE_OPENED+.@pts;
		#VALENTINE_POINTS=#VALENTINE_POINTS+.@pts;
		if (rand2(0,1))
			dispbottom l("It's tasty ^.^");
		else
			dispbottom l("It's yummy ^.^");
	}
    return;
}