diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-04-16 23:27:32 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-04-16 23:27:32 -0300 |
commit | 74b6c827062c839987050d226be838f9943e278f (patch) | |
tree | d129e2f0cac234232596c2c4a3c1531fff475bf8 /npc | |
parent | d9c7d5f194330a798032011b74876c6961a5805f (diff) | |
download | serverdata-74b6c827062c839987050d226be838f9943e278f.tar.gz serverdata-74b6c827062c839987050d226be838f9943e278f.tar.bz2 serverdata-74b6c827062c839987050d226be838f9943e278f.tar.xz serverdata-74b6c827062c839987050d226be838f9943e278f.zip |
Rewrite @toevent + hotfixes
Diffstat (limited to 'npc')
-rw-r--r-- | npc/001-4/lilica.txt | 23 | ||||
-rw-r--r-- | npc/commands/event.txt | 60 |
2 files changed, 48 insertions, 35 deletions
diff --git a/npc/001-4/lilica.txt b/npc/001-4/lilica.txt index 440cba68a..6e5cc1457 100644 --- a/npc/001-4/lilica.txt +++ b/npc/001-4/lilica.txt @@ -44,22 +44,22 @@ L_Leader: close; L_Quest: - setarray .@Seasonal, EggshellHat, EggshellHat, GreenEggshellHat, OrangeEggshellHat, DarkEggshellHat, EggshellHat; + setarray .@Seasonal, EggshellHat, EggshellHat, GreenEggshellHat, OrangeEggshellHat, EggshellHat, EggshellHat; .@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)); + mesq l("As usual, you can get only one hat yearly, for the symbolic amount of 40 @@ and 10 @@!", getitemlink(GoldenEasteregg), getitemlink(SilverEasteregg)); next; menu l("Maybe later."), -, - rif(countitem(GoldenEasteregg) >= 30 && countitem(SilverEasteregg) >= 10, l("Deal.")), L_QuestDone; + rif(countitem(GoldenEasteregg) >= 40 && countitem(SilverEasteregg) >= 10, l("Deal.")), L_QuestDone; close; L_QuestDone: inventoryplace .@Hat, 1; - delitem GoldenEasteregg, 30; + delitem GoldenEasteregg, 40; delitem SilverEasteregg, 10; if (rand(0, 10000) < 1000) goto L_Unlucky; EASTER_EVENT=gettime(7); @@ -81,6 +81,7 @@ L_Unlucky: close; OnClock0100: +OnClock1300: if ($EVENT$ == "Easter") .@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); end; @@ -98,9 +99,9 @@ OnInit: OnInit: tradertype(NST_CUSTOM); + sellitem ChocolateMouboo,100; + sellitem StrangeCoin,50; sellitem GoldenEasteregg,25; - sellitem StrangeCoin,20; - //sellitem ChocolateMouboo,6; sellitem EasterEgg,5; end; @@ -123,20 +124,18 @@ OnInit: tradertype(NST_CUSTOM); setarray .@Seasonal, EggshellHat, EggshellHat, GreenEggshellHat, OrangeEggshellHat, EggshellHat, EggshellHat; .Hat=.@Seasonal[(gettime(7)+1)%6]; // Magically choose the hat from the array - .PrevHat=.@Seasonal[(gettime(7))%6]; // Magically choose the hat from the array - .NextHat=.@Seasonal[(gettime(7)+2)%6]; // Magically choose the hat from the array + .PrevHat=.@Seasonal[(gettime(7)-1)%6]; // Magically choose the hat from the array // Seasonal item sellitem .Hat,200; - sellitem .NextHat,1000; - sellitem .PrevHat,1000; + sellitem .PrevHat,500; // Rare and not-so-rare Items sellitem MercBoxA,500; + sellitem Boots,450; sellitem BronzeGift,100; sellitem BunnyEars,50; - //sellitem Boots,20; - sellitem StrangeCoin,2; + sellitem StrangeCoin,10; sellitem SilverEasteregg,1; end; diff --git a/npc/commands/event.txt b/npc/commands/event.txt index fab032dde..b346b9e41 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -237,17 +237,8 @@ OnCall: end; OnCall: - if (!$@GM_EVENT && $EVENT$ == "Valentine") { - if (readparam(Hp) == readparam(MaxHp) && readparam(Sp) == readparam(MaxSp) && !(getmapname() == "boss" || getmapname() == "sec_pri" || getmapname() ~= "000-*" || getmapname() ~= "008-*" || getmapname() ~= "sore*")) { - warp "001-11", 38, 32; - message strcharinfo(0), l("You are now at the Valentine Highlands."); - } else { - dispbottom l("You cannot be hurt, must have full mana, and must be in a area where the Mana Plane is connected so @toevent work."); - } - end; - } - - if (!$@GM_EVENT && !$@MK_SCENE) + // Calculate + if (!$@GM_EVENT && !$@MK_SCENE && $EVENT$ == "") dispbottom l("The mana bridge is closed at the moment."); else if (BaseLevel < 10) dispbottom l("You are not strong enough to survive this trip."); @@ -272,24 +263,47 @@ OnCall: end; } - if (!$@GM_EVENT) + // Aeros Events takes precedence over permanent events + if ($@GM_EVENT) { - //dispbottom ("SCRIPT ERROR - blame Saulc - gmevent not set, mkscene set"); - dispbottom l("The mana bridge is closed at the moment."); + .@gt=$@AEROS_SPWN; + if (.@gt == 2) + .@gt=rand(0,1); + switch (.@gt) { + case 0: + warp "001-1", 235, 26; break; + case 1: + warp "001-1", 23, 108; break; + } + specialeffect(63, AREA, getcharid(3)); end; } - .@gt=$@AEROS_SPWN; - if (.@gt == 2) - .@gt=rand(0,1); - switch (.@gt) { - case 0: - warp "001-1", 235, 26; break; - case 1: - warp "001-1", 23, 108; break; + // Events are the least priority + if ($EVENT$ == "Valentine") { + warp "001-11", 38, 32; + message strcharinfo(0), l("You are now at the Valentine Highlands."); + end; + } + if ($EVENT$ == "Easter") { + warp "001-4", 151, 157; + message strcharinfo(0), l("You are now at the Magical Forest."); + end; + } + if ($EVENT$ == "Worker Day") { + warp "001-5", 22, 79; + message strcharinfo(0), l("You are now at the Contributor's Cave."); + end; + } + if ($EVENT$ == "Christmas") { + warp "019-4-1", 32, 36; + message strcharinfo(0), l("You are now at the Christmas Workshop."); + end; } - specialeffect(63, AREA, getcharid(3)); } + + // Seems like it was a Blame Saulc-like event... + dispbottom l("The mana bridge is closed at the moment."); end; OnInit: |