diff options
-rw-r--r-- | npc/003-1/events.txt | 210 | ||||
-rw-r--r-- | npc/commands/event.txt | 8 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 1 | ||||
-rw-r--r-- | npc/functions/event.txt | 4 |
4 files changed, 181 insertions, 42 deletions
diff --git a/npc/003-1/events.txt b/npc/003-1/events.txt index d666a03e3..75148ee6d 100644 --- a/npc/003-1/events.txt +++ b/npc/003-1/events.txt @@ -7,7 +7,67 @@ // Use duplicate() command to make it available in other towns as well // Easter -003-1,47,53,0 script Lilica#final NPC_EASTER,{ +003-1,47,53,0 script Aurora NPC_FEMALE,{ + function handleEaster(); + function handleValentine(); + function handleStPatrick(); + function handleAurora(); + mesn; + mesq l("Heya."); + close; + + +// OnRestore causes OnInit to start again +OnRestore: + setnpcdisplay .name$, "Aurora", NPC_FEMALE; +OnInit: + setunitdata(.@npcId, UDT_HEADTOP, Cap); + setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings); + setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars); + //setunitdata(.@npcId, UDT_WEAPON, GMRobe); + setunitdata(.@npcId, UDT_HAIRSTYLE, 14); + setunitdata(.@npcId, UDT_HAIRCOLOR, 18); + .sex = G_FEMALE; + .distance = 5; + end; + +// Overloaded +OnValentine: + setnpcdisplay .name$, "Demure#ValentineFinal", NPC_FEMALE; + .@npcId = getnpcid(.name$); + setunitdata(.@npcId, UDT_HEADTOP, Cap); + setunitdata(.@npcId, UDT_HEADMIDDLE, RedStockings); + setunitdata(.@npcId, UDT_HEADBOTTOM, BunnyEars); + setunitdata(.@npcId, UDT_WEAPON, GMRobe); + setunitdata(.@npcId, UDT_HAIRSTYLE, 14); + setunitdata(.@npcId, UDT_HAIRCOLOR, 18); + end; + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function handleEaster { if (EASTER_YEAR != gettime(GETTIME_YEAR)) { EASTER_YEAR=gettime(GETTIME_YEAR); if (strcharinfo(0) == $@easter_name$[0]) { @@ -31,44 +91,65 @@ mesn; mesq l("Easter is over! I am the last chance to get rid of eggs!!"); mesc l("Note: Golden and Silver Eggs are deleted after the next event end."), 1; + // Heartbeat + select + l("Trade Silver Eggs"), + l("Trade Golden Eggs"), + l("View LeaderBoard"), + l("Thanks Lilica."); + mes ""; + switch (@menu) { + case 1: + openshop "#eastershop1"; + closedialog; + break; + case 2: + openshop "#eastershop2"; + closedialog; + break; + case 3: + mesn l("Easter @@", gettime(GETTIME_YEAR)); + mes("1."+$@easter_name$[0]+" ("+$@easter_value[0]+")"); + mes("2."+$@easter_name$[1]+" ("+$@easter_value[1]+")"); + mes("3."+$@easter_name$[2]+" ("+$@easter_value[2]+")"); + mes("4."+$@easter_name$[3]+" ("+$@easter_value[3]+")"); + mes("5."+$@easter_name$[4]+" ("+$@easter_value[4]+")"); + mes("6."+$@easter_name$[5]+" ("+$@easter_value[5]+")"); + mes("7."+$@easter_name$[6]+" ("+$@easter_value[6]+")"); + mes("8."+$@easter_name$[7]+" ("+$@easter_value[7]+")"); + mes("9."+$@easter_name$[8]+" ("+$@easter_value[8]+")"); + mes("10."+$@easter_name$[9]+" ("+$@easter_value[9]+")"); + break; + } + return; +} - menu - l("Trade Silver Eggs"), L_Silver, - l("Trade Golden Eggs"), L_Golden, - l("View LeaderBoard"), L_Leader, - l("Thanks Lilica."), -; - close; -L_Silver: - openshop "#eastershop1"; - closedialog; - close; -L_Golden: - openshop "#eastershop2"; - closedialog; - close; -L_Leader: - mesn l("Easter @@", gettime(GETTIME_YEAR)); - mes("1."+$@easter_name$[0]+" ("+$@easter_value[0]+")"); - mes("2."+$@easter_name$[1]+" ("+$@easter_value[1]+")"); - mes("3."+$@easter_name$[2]+" ("+$@easter_value[2]+")"); - mes("4."+$@easter_name$[3]+" ("+$@easter_value[3]+")"); - mes("5."+$@easter_name$[4]+" ("+$@easter_value[4]+")"); - mes("6."+$@easter_name$[5]+" ("+$@easter_value[5]+")"); - mes("7."+$@easter_name$[6]+" ("+$@easter_value[6]+")"); - mes("8."+$@easter_name$[7]+" ("+$@easter_value[7]+")"); - mes("9."+$@easter_name$[8]+" ("+$@easter_value[8]+")"); - mes("10."+$@easter_name$[9]+" ("+$@easter_value[9]+")"); - close; -OnInit: - .sex = G_OTHER; - .distance = 5; - disablenpc(.name$); - end; + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function handleValentine { + return; } @@ -93,8 +174,67 @@ OnInit: + +///////////////////////////////////////////////////////////////////////////////// +function handleStPatrick { + return; +} + + + + + + + + + + + + + + + + + + + + + + + + +///////////////////////////////////////////////////////////////////////////////// +function handleAurora { + return; +} + + + + + + + + + + + + + + + + + + + + + + + +// DO NOT REMOVE +} + // Valentine Day -003-1,47,53,0 script Demure#ValentineFinal NPC_FEMALE,{ +003-1,47,53,0 script Demure#ValentineFinal_ NPC_FEMALE,{ mesn; mesq l("Valentine Day is over!"); if (#VALENTINE_SENT+#VALENTINE_OPENED <= 0) @@ -181,7 +321,7 @@ OnInit: // St. Patrick Day -003-1,47,53,0 script Patrick Saulc NPC_WEIRDGREEN,{ +003-1,47,53,0 script Patrick Saulc_ NPC_WEIRDGREEN,{ mesn; mesc l("It's St. Patrick Event!"), 3; mes l("At 00:00, 06:00, 12:00, 15:00, 18:00 and 21:00 server time"); diff --git a/npc/commands/event.txt b/npc/commands/event.txt index 0b18dcbd0..9079a2d03 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -12,10 +12,9 @@ function script sClear { if ($EVENT$ != "Easter") { DelItemFromEveryPlayer(SilverEasteregg); DelItemFromEveryPlayer(GoldenEasteregg); - disablenpc "Lilica#final"; } else { .@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", $@easter_name$, $@easter_value); - enablenpc "Lilica#final"; + setnpcdisplay("Aurora", "Lilica#final", NPC_EASTER); } // Delete all Christmas stuff @@ -45,13 +44,12 @@ function script sClear { // Remove event items DelItemFromEveryPlayer(LoveLetter); DelItemFromEveryPlayer(BoxOfChocolates); - disablenpc "Demure#ValentineFinal"; } else if ($EVENT$ == "Valentine") { htdelete $@VALENTINE_GIFTSTACKS; htdelete $@VALENTINE_LOVELETTER; $@VALENTINE_GIFTSTACKS=0; $@VALENTINE_LOVELETTER=0; - enablenpc "Demure#ValentineFinal"; + donpcevent "Aurora::OnValentine"; } // Longer EXP rate controls @@ -331,7 +329,7 @@ function script GlobalEventMenu { $EVENT$="Patrick"; $@PATRICK_DAYMAX=31; enablenpc "sPatrick"; - enablenpc "Patrick Saulc"; + setnpcdisplay("Aurora", "Patrick Saulc", NPC_WEIRDGREEN); enablenpc "St. Patrick Gold Pot"; donpcevent "St. Patrick Gold Pot::OnForcedMove"; logmes "Enabled ST. PATRICK DAY event (until day 31).", LOGMES_ATCOMMAND; diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index fc6d37004..a8ba3b160 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -103,6 +103,7 @@ function script FYNewEvent { kamibroadcast("Catch the Golden Fish is now open!", "Aurora Events"); break; } + donpcevent "Aurora::OnRestore"; return; } diff --git a/npc/functions/event.txt b/npc/functions/event.txt index 87f913de0..1bd39b2b8 100644 --- a/npc/functions/event.txt +++ b/npc/functions/event.txt @@ -63,6 +63,7 @@ OnCleanUp: killmonster(.@m$, "sPatrick::OnMyMobDeath"); } disablenpc "sPatrick"; + donpcevent "Aurora::OnRestore"; end; } @@ -403,7 +404,7 @@ OnClock0000: $EVENT$="Patrick"; $@PATRICK_DAYMAX=.patrick_endday; enablenpc "sPatrick"; - enablenpc "Patrick Saulc"; + setnpcdisplay("Aurora", "Patrick Saulc", NPC_WEIRDGREEN); enablenpc "St. Patrick Gold Pot"; donpcevent "St. Patrick Gold Pot::OnForcedMove"; } @@ -413,7 +414,6 @@ OnClock0000: sClear(); $EVENT$=""; donpcevent "sPatrick::OnCleanUp"; - disablenpc "Patrick Saulc"; } } |