diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/001-4/lilica.txt | 67 |
1 files changed, 59 insertions, 8 deletions
diff --git a/npc/001-4/lilica.txt b/npc/001-4/lilica.txt index a2242f904..b5858258d 100644 --- a/npc/001-4/lilica.txt +++ b/npc/001-4/lilica.txt @@ -6,14 +6,16 @@ 001-4,139,151,0 script Lilica#easter NPC_EASTER,{ mesn; - mesq lg("Ah, traveller! I am Lilica the Scary Bunny! I exchange many @@ for neat rewards!","Ah, traveller! I am Lilica the Scary Bunny! I exchange many @@ for neat rewards!", getitemlink(SilverEasteregg)); + mesq lg("Ah, traveller! I am Lilica the Scary Bunny! I exchange many @@ and @@ for neat rewards!","Ah, traveller! I am Lilica the Scary Bunny! I exchange many @@ and @@ for neat rewards!", getitemlink(SilverEasteregg), getitemlink(GoldenEasteregg)); next; mesn; - mesq l("Golden Eggs are used for the grand collectioner prize. Ah, I love Easter! I loooooooove it!"); + mesq l("Golden Eggs are used for the grand collector prize. Ah, I love Easter! I loooooooove it!"); menu l("Scary..........."), -, l("Trade Silver Eggs"), L_Silver, + l("Trade Golden Eggs"), L_Golden, + rif(EASTER_EVENT != gettime(7),l("I want an Eggshell Hat!")), L_Quest, l("View LeaderBoard"), L_Leader; close; @@ -22,6 +24,11 @@ L_Silver: closedialog; close; +L_Golden: + openshop "#eastershop2"; + closedialog; + close; + L_Leader: .@nb = query_sql("SELECT c.name, i.amount FROM `inventory` AS i, `char` AS c WHERE i.nameid=834 AND i.char_id=c.char_id ORDER BY i.amount DESC LIMIT 10", .@name$, .@value); @@ -35,7 +42,32 @@ L_Leader: mes("8."+.@name$[7]+" ("+.@value[7]+")"); mes("9."+.@name$[8]+" ("+.@value[8]+")"); mes("10."+.@name$[9]+" ("+.@value[9]+")"); + close; +L_Quest: + setarray .@Seasonal, BlackCottonDye, SilverCottonDye, EggshellHat, OrangeCottonDye, TealCottonDye, RedCottonDye; + .@Hat=.@Seasonal[gettime(7)%6]; // Magically choose the hat from the array + mesn; + mesq l("Good choice! This year we're having a @@!", getitemlink(.@Hat)); + next; + mesn; + mesq l("As usual, you can get only one hat yearly, for the symbolic amount of 30 @@ and 10 @@!", getitemlink(GoldenEasteregg), getitemlink(SilverEasteregg)); + next; + menu + l("Maybe later."), -, + rif(countitem(GoldenEasteregg) >= 30 && countitem(SilverEasteregg) >= 10, l("Deal.")), L_QuestDone; + close; + +L_QuestDone: + inventoryplace .@Hat, 1; + EASTER_EVENT=gettime(7); + delitem GoldenEasteregg, 30; + delitem SilverEasteregg, 10; + // The code below not allow hat to leave user account. A bad idea here so I left commented. + //getitembound(.@Hat, 1, 1); + getnameditem(.@Hat, strcharinfo(0)); + mesn; + mesq l("Here you go! Happy easter! Bhop bhop!"); close; OnInit: @@ -51,13 +83,10 @@ OnInit: OnInit: tradertype(NST_CUSTOM); - // Rare Items - sellitem BunnyEars,2500; - - sellitem GoldenEasteregg,50; - + sellitem GoldenEasteregg,25; sellitem StrangeCoin,20; - sellitem EasterEgg,5; + sellitem ChocolateMouboo,6; + sellitem EasterEgg,3; end; OnCountFunds: @@ -70,7 +99,29 @@ OnPayFunds: delitem SilverEasteregg,@price; purchaseok(); end; +} +// Golden Easter Egg exchange. +001-4,139,151,0 trader #eastershop2 NPC_HIDDEN,{ + end; + +OnInit: + tradertype(NST_CUSTOM); + + // Rare Items + sellitem BunnyEars,50; + sellitem StrangeCoin,2; + sellitem SilverEasteregg,1; + end; +OnCountFunds: + setcurrency(countitem(GoldenEasteregg)); + end; +OnPayFunds: + if( countitem(GoldenEasteregg) < @price ) + end; + delitem GoldenEasteregg,@price; + purchaseok(); + end; } |