summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-02-09 00:30:19 -0200
committerJesusaves <cpntb1@ymail.com>2019-02-09 00:30:19 -0200
commit3bae9e26d4b672d37f51ae21446104c3ed2fdadd (patch)
treeb150368b02d10e2352cff1daf33e61621b61dbb4 /npc
parent5dac604d77833adad6bd127218153397ddce299e (diff)
downloadserverdata-3bae9e26d4b672d37f51ae21446104c3ed2fdadd.tar.gz
serverdata-3bae9e26d4b672d37f51ae21446104c3ed2fdadd.tar.bz2
serverdata-3bae9e26d4b672d37f51ae21446104c3ed2fdadd.tar.xz
serverdata-3bae9e26d4b672d37f51ae21446104c3ed2fdadd.zip
Valentine Day Rewards is now complete and automated (I don't want the hard work)
Diffstat (limited to 'npc')
-rw-r--r--npc/001-11/Demure.txt1
-rw-r--r--npc/003-1/events.txt103
-rw-r--r--npc/commands/event.txt5
3 files changed, 108 insertions, 1 deletions
diff --git a/npc/001-11/Demure.txt b/npc/001-11/Demure.txt
index 709e7fea6..4f2d07fd5 100644
--- a/npc/001-11/Demure.txt
+++ b/npc/001-11/Demure.txt
@@ -67,6 +67,7 @@
// Get 1 Point per sent box
#VALENTINE_POINTS+=1;
+ #VALENTINE_SENT+=1;
// Handle Love Letter
if (countitem(LoveLetter) {
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt
index f270a1aff..96560c783 100644
--- a/npc/003-1/events.txt
+++ b/npc/003-1/events.txt
@@ -50,6 +50,109 @@ OnInit:
end;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// Valentine Day
+003-1,47,53,0 script Demure#ValentineFinal NPC_FEMALE,{
+ mesn;
+ mesq l("Valentine Day is over!");
+ if (#VALENTINE_SENT+#VALENTINE_OPENED <= 0)
+ close;
+ .@nb = query_sql("SELECT c.name, i.value FROM `acc_reg_num_db` AS i, `char` AS c WHERE i.key='#VALENTINE_POINTS' AND i.account_id=c.account_id ORDER BY i.value DESC LIMIT 10", .@name$, .@value);
+
+ mes "##B"+l("Top 10 - Valentine Day")+"##b";
+ mes("1." +.@name$[0]+" ("+.@value[0]+")");
+ mes("2." +.@name$[1]+" ("+.@value[1]+")");
+ mes("3." +.@name$[2]+" ("+.@value[2]+")");
+ mes("4." +.@name$[3]+" ("+.@value[3]+")");
+ mes("5." +.@name$[4]+" ("+.@value[4]+")");
+ mes("6." +.@name$[5]+" ("+.@value[5]+")");
+ mes("7." +.@name$[6]+" ("+.@value[6]+")");
+ mes("8." +.@name$[7]+" ("+.@value[7]+")");
+ mes("9." +.@name$[8]+" ("+.@value[8]+")");
+ mes("10."+.@name$[9]+" ("+.@value[9]+")");
+ next;
+ #VALENTINE_SENT=0;
+ #VALENTINE_OPENED=0;
+ #VALENTINE_RECEIVED=0;
+ if (strcharinfo(0) == .@name$[0])
+ makepet DoggyDog;
+ else if (strcharinfo(0) == .@name$[1] || strcharinfo(0) == .@name$[2])
+ getitem PrismGift, 1;
+ else if (strcharinfo(0) == .@name$[3] || strcharinfo(0) == .@name$[4])
+ getitem GoldenGift, 1;
+ else if (strcharinfo(0) == .@name$[5] || strcharinfo(0) == .@name$[6])
+ getitem SilverGift, 1;
+ else if (strcharinfo(0) == .@name$[7] || strcharinfo(0) == .@name$[8] || strcharinfo(0) == .@name$[9])
+ getitem BronzeGift, 1;
+ else
+ getitem StrangeCoin, 1;
+
+ getexp #VALENTINE_SENT+#VALENTINE_RECEIVED, #VALENTINE_SENT;
+ Zeny=Zeny+#VALENTINE_OPENED;
+
+ if (strcharinfo(0) == .@name$[0])
+ mesc l("You gained a @@ for the #1 place on the event. Remember to feed it @@, or it may run away from you.", getitemlink(DoggyDog), getitemlink(AnimalBones));
+
+ close;
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADTOP, GMCap);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, GMRobe);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 14);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 18);
+
+ .sex = G_FEMALE;
+ .distance = 5;
+
+ disablenpc(.name$);
+ end;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
// Whatever event use #RARE_POINTS
// Which is a script variable, meaning it will be a really special event.
// Side Note: Might as well add a special cap for such situations.
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index 9631f7d73..da27370a1 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -77,7 +77,8 @@ function script GlobalEventMenu {
// Delete all Valentine Day stuff
if ($EVENT$ != "Valentine") {
DelItemFromEveryPlayer(LoveLetter);
- debugmes "TODO: Delete valentine chocolate box";
+ DelItemFromEveryPlayer(BoxOfChocolates);
+ disablenpc "Demure#ValentineFinal";
} else if ($EVENT$ == "Valentine") {
// ItemDB prefers account variables than quest log
DelAccRegFromEveryPlayer("#VALENTINE_POINTS");
@@ -86,7 +87,9 @@ function script GlobalEventMenu {
DelAccRegFromEveryPlayer("#VALENTINE_SENT");
htdelete $@VALENTINE_GIFTSTACKS;
htdelete $@VALENTINE_LOVELETTER;
+ $@VALENTINE_GIFTSTACKS=0;
$@VALENTINE_LOVELETTER=0;
+ enablenpc "Demure#ValentineFinal";
}
// We must remove any event drop