Test of the Summoner
- ID
- 230
- Название
- Test of the Summoner
- start_npcs_json
- [30634]
- npc_ids_json
- [20089,20090,20176,20192,20193,20267,20268,20269,20270,20271,20552,20553,20555,20563,20577,20578,20579,20580,20581,20582,20600,27102,27103,27104,27105,27106,27107,30063,30634,30635,30636,30637,30638,30639,30640]
- constants_json
- {"LARA":30063,"GALATEA":30634,"ALMORS":30635,"CAMONIELL":30636,"BELTHUS":30637,"BASILLA":30638,"CELESTIEL":30639,"BRYNTHEA":30640,"NOBLE_ANT":20089,"NOBLE_ANT_LEADER":20090,"WYRM":20176,"TYRANT":20192,"TYRANT_KINGPIN":20193,"BREKA_ORC":20267,"BREKA_ORC_ARCHER":20268,"BREKA_ORC_SHAMAN":20269,"BREKA_ORC_OVERLORD":20270,"BREKA_ORC_WARRIOR":20271,"FETTERED_SOUL":20552,"WINDSUS":20553,"GIANT_FUNGUS":20555,"MANASHEN_GARGOYLE":20563,"LETO_LIZARDMAN":20577,"LETO_LIZARDMAN_ARCHER":20578,"LETO_LIZARDMAN_SOLDIER":20579,"LETO_LIZARDMAN_WARRIOR":20580,"LETO_LIZARDMAN_SHAMAN":20581,"LETO_LIZARDMAN_OVERLORD":20582,"KARUL_BUGBEAR":20600,"PAKO_THE_CAT":27102,"UNICORN_RACER":27103,"SHADOW_TUREN":27104,"MIMI_THE_CAT":27105,"UNICORN_PHANTASM":27106,"SILHOUETTE_TILFO":27107,"LETO_LIZARDMAN_AMULET":3337,"SAC_OF_REDSPORES":3338,"KARUL_BUGBEAR_TOTEM":3339,"SHARDS_OF_MANASHEN":3340,"BREKA_ORC_TOTEM":3341,"CRIMSON_BLOODSTONE":3342,"TALONS_OF_TYRANT":3343,"WINGS_OF_DRONEANT":3344,"TUSK_OF_WINDSUS":3345,"FANGS_OF_WYRM":3346,"LARA_LIST_1":3347,"LARA_LIST_2":3348,"LARA_LIST_3":3349,"LARA_LIST_4":3350,"LARA_LIST_5":3351,"GALATEA_LETTER":3352,"BEGINNER_ARCANA":3353,"ALMORS_ARCANA":3354,"CAMONIELL_ARCANA":3355,"BELTHUS_ARCANA":3356,"BASILLIA_ARCANA":3357,"CELESTIEL_ARCANA":3358,"BRYNTHEA_ARCANA":3359,"CRYSTAL_OF_PROGRESS_1":3360,"CRYSTAL_OF_INPROGRESS_1":3361,"CRYSTAL_OF_FOUL_1":3362,"CRYSTAL_OF_DEFEAT_1":3363,"CRYSTAL_OF_VICTORY_1":3364,"CRYSTAL_OF_PROGRESS_2":3365,"CRYSTAL_OF_INPROGRESS_2":3366,"CRYSTAL_OF_FOUL_2":3367,"CRYSTAL_OF_DEFEAT_2":3368,"CRYSTAL_OF_VICTORY_2":3369,"CRYSTAL_OF_PROGRESS_3":3370,"CRYSTAL_OF_INPROGRESS_3":3371,"CRYSTAL_OF_FOUL_3":3372,"CRYSTAL_OF_DEFEAT_3":3373,"CRYSTAL_OF_VICTORY_3":3374,"CRYSTAL_OF_PROGRESS_4":3375,"CRYSTAL_OF_INPROGRESS_4":3376,"CRYSTAL_OF_FOUL_4":3377,"CRYSTAL_OF_DEFEAT_4":3378,"CRYSTAL_OF_VICTORY_4":3379,"CRYSTAL_OF_PROGRESS_5":3380,"CRYSTAL_OF_INPROGRESS_5":3381,"CRYSTAL_OF_FOUL_5":3382,"CRYSTAL_OF_DEFEAT_5":3383,"CRYSTAL_OF_VICTORY_5":3384,"CRYSTAL_OF_PROGRESS_6":3385,"CRYSTAL_OF_INPROGRESS_6":3386,"CRYSTAL_OF_FOUL_6":3387,"CRYSTAL_OF_DEFEAT_6":3388,"CRYSTAL_OF_VICTORY_6":3389,"MARK_OF_SUMMONER":3336,"DIMENSIONAL_DIAMOND":7562}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00230_TestOfTheSummoner/Q00230_TestOfTheSummoner.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20089 | Noble Ant | Нет | 37 |
| 20090 | Noble Ant Leader | Нет | 38 |
| 20176 | Wyrm | Нет | 35 |
| 20192 | Tyrant | Нет | 35 |
| 20193 | Tyrant Kingpin | Нет | 36 |
| 20267 | Breka Orc | Нет | 31 |
| 20268 | Breka Orc Archer | Нет | 32 |
| 20269 | Breka Orc Shaman | Нет | 34 |
| 20270 | Breka Orc Overlord | Нет | 35 |
| 20271 | Breka Orc Warrior | Нет | 33 |
| 20552 | Fettered Soul | Нет | 38 |
| 20553 | Windsus | Нет | 39 |
| 20555 | Giant Fungus | Нет | 40 |
| 20563 | Manashen Gargoyle | Нет | 40 |
| 20577 | Leto Lizardman | Нет | 35 |
| 20578 | Leto Lizardman Archer | Нет | 36 |
| 20579 | Leto Lizardman Soldier | Нет | 37 |
| 20580 | Leto Lizardman Warrior | Нет | 38 |
| 20581 | Leto Lizardman Shaman | Нет | 39 |
| 20582 | Leto Lizardman Overlord | Нет | 40 |
| 20600 | Karul Bugbear | Нет | 40 |
| 27102 | Pako The Cat | Нет | 38 |
| 27103 | Unicorn Racer | Нет | 38 |
| 27104 | Shadow Turen | Нет | 39 |
| 27105 | Mimi The Cat | Нет | 39 |
| 27106 | Unicorn Phantasm | Нет | 40 |
| 27107 | Silhouette Tilfo | Нет | 40 |
| 30063 | Lara | Нет | 70 |
| 30634 | Galatea | Да | 70 |
| 30635 | Almors | Нет | 70 |
| 30636 | Camoniell | Нет | 70 |
| 30637 | Belthus | Нет | 70 |
| 30638 | Basilla | Нет | 70 |
| 30639 | Celestiel | Нет | 70 |
| 30640 | Brynthea | Нет | 70 |
Условия уровней: выражения из Java
else if (player.getLevel() < 39)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, GALATEA_LETTER, 1); giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId())); giveItems(player, LARA_LISTS[random][0], 1); giveItems(player, LARA_LISTS[random][0], 1); giveItems(player, CRYSTAL_OF_PROGRESS_1, 1); // give Starting Crystal giveItems(player, CRYSTAL_OF_PROGRESS_2, 1); giveItems(player, CRYSTAL_OF_PROGRESS_3, 1); giveItems(player, CRYSTAL_OF_PROGRESS_4, 1); giveItems(player, CRYSTAL_OF_PROGRESS_5, 1); giveItems(player, CRYSTAL_OF_PROGRESS_6, 1); giveItems(player, BEGINNER_ARCANA, 2); giveItems(player, MARK_OF_SUMMONER, 1); addExpAndSp(player, 148409, 30000); giveItems(player, ALMORS_ARCANA, 1); giveItems(player, CAMONIELL_ARCANA, 1); giveItems(player, BELTHUS_ARCANA, 1); giveItems(player, BASILLIA_ARCANA, 1); giveItems(player, CELESTIEL_ARCANA, 1); giveItems(player, BRYNTHEA_ARCANA, 1); giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_1, 1); giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_2, 1); giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_3, 1); giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_4, 1); giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_5, 1); giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_6, 1); giveItems(player, SAC_OF_REDSPORES, 1); giveItems(player, LETO_LIZARDMAN_AMULET, 1); giveItems(player, LETO_LIZARDMAN_AMULET, 1); giveItems(player, LETO_LIZARDMAN_AMULET, 1); giveItems(player, SHARDS_OF_MANASHEN, 1); giveItems(player, KARUL_BUGBEAR_TOTEM, 1); giveItems(player, BREKA_ORC_TOTEM, 1); giveItems(player, BREKA_ORC_TOTEM, 1); giveItems(player, CRIMSON_BLOODSTONE, 1); giveItems(player, TUSK_OF_WINDSUS, 1); giveItems(player, TALONS_OF_TYRANT, 1); giveItems(player, WINGS_OF_DRONEANT, 1); giveItems(player, FANGS_OF_WYRM, 1); giveItems(player, CRYSTAL_OF_VICTORY_1, 1); giveItems(player, CRYSTAL_OF_VICTORY_2, 1); giveItems(player, CRYSTAL_OF_VICTORY_3, 1); giveItems(player, CRYSTAL_OF_VICTORY_4, 1); giveItems(player, CRYSTAL_OF_VICTORY_5, 1); giveItems(player, CRYSTAL_OF_VICTORY_6, 1); giveItems(player, CRYSTAL_OF_INPROGRESS_1, 1); giveItems(player, CRYSTAL_OF_FOUL_1, 1); giveItems(player, CRYSTAL_OF_INPROGRESS_2, 1); giveItems(player, CRYSTAL_OF_FOUL_2, 1); giveItems(player, CRYSTAL_OF_INPROGRESS_3, 1); giveItems(player, CRYSTAL_OF_FOUL_3, 1); giveItems(player, CRYSTAL_OF_INPROGRESS_4, 1); giveItems(player, CRYSTAL_OF_FOUL_4, 1); giveItems(player, CRYSTAL_OF_INPROGRESS_5, 1); giveItems(player, CRYSTAL_OF_FOUL_5, 1); giveItems(player, CRYSTAL_OF_INPROGRESS_6, 1); giveItems(player, CRYSTAL_OF_FOUL_6, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30063-01.htm] Trader Lara: I know! You are the summons apprentice! Did you find me because you needed an arcana? I can make one for you... Although it won't be very good, it's just something I do as a pastime. It would be too embarrassing if I sold it for money. So how about an exchange? I'll make you a Beginner's Arcana if you'll find me the goods that I need. Will that work for you? I will find you the things that you need.
[30063-02.htm] Trader Lara: Then I will write down the things that I need. If you can bring me what's written on the list, I will make you two Beginner's Arcanas. Okay, it's a deal.
[30063-03.htm] Trader Lara: You again! What do you want this time? I need some more cards.
[30063-04.htm] Trader Lara: Oh, I see! If that is so, let's do it just like the other day... You find me the things that I need, and I will make you some more Beginner's Arcanas. Here, I'll make a list of the things I need.
[30063-05.htm] Trader Lara: Please bring me all the things I wrote down on the list. Very well. I shall create the Beginner's Arcanas for you.
[30063-06.htm] Trader Lara: You have found all the things that I asked for! Thank you so much. I shall lend you two Beginner's Arcanas as promised. I need more cards.
[30063-07.htm] Trader Lara: Please bring me all the things I wrote down on the list. Very well. I shall lend you two Beginner's Arcanas.
[30063-08.htm] Trader Lara: You have found all the things that I asked for! Thank you so much. I shall lend you two Beginner's Arcanas as I have promised. I need more cards.
[30063-09.htm] Trader Lara: Please bring me all the things I wrote down on the list. Very well. I shall lend you two Beginner's Arcanas.
[30063-10.htm] Trader Lara: You have found all the things that I asked for! Thank you so much. I shall lend you two Beginner's Arcanas as I have promised. I need more cards.
[30063-11.htm] Trader Lara: Please bring me all the things I wrote down on the list. Very well. I shall lend you two Beginner's Arcanas.
[30063-12.htm] Trader Lara: You have found all the things that I asked for! Thank you so much. I shall lend you two Beginner's Arcanas as promised. I need more cards.
[30063-13.htm] Trader Lara: Please bring me all the things I wrote down on the list. Very well. I shall lend you two Beginner's Arcanas.
[30063-14.htm] Trader Lara: You have found all the things that I asked for! Thank you so much. I shall lend you two Beginner's Arcanas as promised. I need more cards.
[30634-01.htm] High Summoner Galatea: From the very beginning, while the world was still young, from when the Elves made pacts with the original elementals of the woods, summoning magic has evolved into a high level mystical art form. Along with the ability to control the elements with spells that command fire and wind, summoning magic is one of the three traditional magical arts contained within the Ivory Tower. Learning summoning magic is not an easy path. A high level of magic is required to communicate with creatures of the netherworld, enter into a contract with them, and bring them to your aide. A very strong will is required to make the summoned creature obey your commands. Many magicians have lost their lives for lacking a strong enough will when summoning. Therefore, high level summoning spells must only be taught to those whose skills have been proven and or acknowledged. You seem to be on a path that is not related to summoning magic. This is not a study to be taken lightly. (This quest may only be undertaken by Wizards, Elven Wizards, or Dark Wizards.)
[30634-02.htm] High Summoner Galatea: From the very beginning, while the world was still young, from when the Elves made pacts with the original elementals of the woods, summoning magic has evolved into a high level mystical art form. Along with the ability to control the elements with spells that command fire and wind, summoning magic is one of the three traditional magical arts contained within the Ivory Tower. Learning summoning magic is not an easy path. A high level of magic is required to communicate with creatures of the netherworld, enter into a contract with them, and bring them to your aide. A very strong will is required to make the summoned creature obey your commands. Many magicians have lost their lives for lacking a strong enough will when summoning. Therefore, high level summoning spells must only be taught to those whose skills have been proven and or acknowledged. If you wish to follow the path of the Summoner, you must take the challenge and pass the Trials of the Summoner. In my opinion, you are not yet ready to attempt the trial. Continue your training, then come and see me again. (This quest may only be undertaken by a character of level 39 and above.)
[30634-03.htm] High Summoner Galatea: From the very beginning, while the world was still young, from when the Elves made pacts with the original elementals of the woods, summoning magic has evolved into a high level mystical art form. Along with the ability to control the elements with spells that command fire and wind, summoning magic is one of the three traditional magical arts contained within the Ivory Tower. Learning summoning magic is not an easy path. A high level of magic is required to communicate with creatures of the netherworld, enter into a contract with them, and bring them to your aide. A very strong will is required to make the summoned creature obey your commands. Many magicians have lost their lives for lacking a strong enough will when summoning. Therefore, high level summoning spells must only be taught to those whose skills have been proven and or acknowledged. If you wish to follow the path of the Summoner, you must take the challenge and pass the Trials of the Summoner. Are you prepared for this challenge? Say you will attempt the trial.
[30634-04.htm] High Summoner Galatea: This trial tests to see if you have the will and determination to become a Summoner. What must be done is quite simple. You must seek out and engage other Summoners in battle. Achieve victory against six opponents and you will prove yourself worthy and pass the test. This may seem an easy task, but a battle amongst Summoners is fairly difficult and will test a Summoner's ability to control his or her summoned creature. Ask about battle methods.
[30634-05.htm] High Summoner Galatea: A battle amongst Summoners is fought by the summoned creatures. The lower ranked Summoner is given the advantage of the first attack. As an apprentice Summoner, you will automatically become the lowest ranked Summoner. During a battle, the Summoner may assist his or her creature with magic, but cannot physically attack an opponent's summoned creature. A penalty is given if a summoner physically attacks an opponent's creature or receives the aid of another. At the conclusion of the battle, the defeated Summoner must surrender his or her Arcana Card to the victor. Ask about Arcana Cards.
[30634-06.htm] High Summoner Galatea: This card is engraved with the Summoner's name and includes a unique mark. The tradition of the Arcana Card derives from the need for early Summoner's to exult in their victories. As an apprentice Summoner may not begin a battle until a higher level Summoner has given you a card. If you do not have an apprentice Arcana Card, the opponent will not accept your challenge. You must give your opponent an Arcana Card each time you lose a battle. Thus, it is suggested that you make 3 or 4 extra cards for yourself. If you win, you are given your opponent's Arcana Card. It is easy to see who a Summoner has defeated by looking at his or her Arcana Card collection. Ask how to create an Arcana Card.
[30634-07.htm] High Summoner Galatea: In the old days Summoners created their own cards, but the cards have become so sophisticated that they must be created by a special craftsmen. Note that you are not yet an official Summoner and may only receive Apprentice Arcana Cards. Perhaps the day will come when you may possess a Major Arcana Card, a card that is only held by the top Summoners of the land! The card you will be making now is for use in the trial, so it need not be ostentatious. You must seek out a craftsman who knows the methods for creating arcana cards. Trader Lara in the Town of Dion will probably make a card for you. She works rather slowly, so I suggest that you order a good supply of them up front. Ask about my possible opponents.
[30634-08.htm] High Summoner Galatea: I have several suggestions regarding opponents - there are quite a few folks who may accept your challenge if asked. First, you should try and contact Summoner Almors. He has been sick lately and is recovering on Talking Island. You should also try Summoner Basillia. I have heard that she is busy researching a new form of Summoning magic near a farm on the southern shores of Gludio. Summoner Camoniell, of the Elves, has been in seclusion in a cottage in southern Dion. I've heard he has had some trouble lately. Summoner Celestiel usually resides in the Ivory Tower, but has returned to the Elven Woods on urgent business from her homeland. Summoner Brynthea and Summoner Belthus of the Dark Elves may be proper opponents for you, but they are hard to find, as they are not likely to stay in one place. Last I heard, Brynthea was somewhere in the northeastern parts of Giran, and Belthus was somewhere in the Cruma Marshlands... These Summoners are all proud and haughty people, and may scoff at a challenge from an apprentice Summoner like yourself. But, at the same time, they will likely accept your challenge, if only to display their supremacy over you.
[30634-08a.htm] Head Summoner Galatea: If you are serious about challenging a more advanced summoner, here are some likely candidates here in Aden. Summoner Almors is recuperating on Talking Island at the moment. Summoner Basillia, rumor has it, is preoccupied with studying new summoning magic at his seaside home in southern Gludio. The Elf, Summoner Camoniell, lives in retirement in his villa in southern Dion; I have heard that he has had some sort of bad experience lately. Summoner Celestiel once lived in the Ivory Tower, but apparently something happened in his hometown and he hastily returned to the Elven Forest. The Dark Elves, Summoner Brynthea and Summoner Belthus, seem likely adversaries for you, but you may have trouble actually finding them. The last I heard, Brynthea is in the eastern part of Giran and Belthus is somewhere in the Cruma Marshlands. All of these summoners are very proud, so when an apprentice summoner such as yourself challenges them to a duel, they may simply scoff at you. Eventually, however, their vanity may win out and they will accept your challenge to demonstrate their own superiority. Here, take this Dimension Diamond. You can trade it to the village gatekeeper for something special that may help you on your journey.
[30634-09.htm] High Summoner Galatea: First, go to Trader Lara in the Town of Dion and have your Arcana Cards made. You cannot enter into a battle with another Summoner without one of these cards. You must battle and defeat 6 Summoners in order to pass the Trials of the Summoner. Do you have any other questions? Ask about battle methods. Ask about Arcana Cards. Ask how to create an Arcana Card. Ask about potential opponents.
[30634-10.htm] High Summoner Galatea: As I previously stated, in order to pass the Trials of the Summoner, you must battle and defeat six summoners. Before you challenge an opponent, you must have your own unique Arcana Cards created. Go and ask Lara of the town of Dion about making cards. Do you have any other questions? Ask about battle methods. Ask about Arcana Cards. Ask how to create an Arcana Card. Ask about potential opponents.
[30634-11.htm] High Summoner Galatea: As I previously stated, in order to pass the Trials of the Summoner, you must battle and achieve victory over 6 Summoners. The Mark of Victory is the opponent's Arcana Card. Do you have any other questions? Ask about battle methods. Ask about Arcana Cards. Ask about the methods of creating an Arcana Card. Ask about potential opponents.
[30634-11a.htm] High Summoner Galatea: The battles are waged between the summoned creatures alone. As an apprentice, you are automatically classified as the lower ranked Summoner and receive the advantage of the first attack. During battle, the Summoner may assist his or her creature with magic, but cannot physically attack an opponent's creature. A penalty is given if a Summoner physically attacks an opponent's creature or receives the aid of another. The defeated Summoner must surrender his or her Arcana Card to the victor. Return
[30634-11b.htm] High Summoner Galatea: The Arcana Card is engraved with the Summoner's name and a unique mark. Most Summoners are highly competitive and wish to show off their victories. Thus, the tradition of Arcana Cards began. As an apprentice, you may begin a battle only after a higher level Summoner has given you a card. If you do not have an apprentice Arcana Card, the opponent will not accept your challenge. You must give your opponent an Arcana Card each time you are defeated, so I suggest that you have a good supply of cards created before hand. If you are victorious you will receive your opponent's card. It is easy to see who a Summoner has defeated by looking at his or her Arcana Card collection. In the past, Summoners created their own cards, but now the cards are much more sophisticated and must be created by special Craftsmen. Return
[30634-11c.htm] High Summoner Galatea: In the past, Summoners created their own cards, but they have become much more sophisticated and now must be created by specialized craftsmen. You are not yet an official Summoner and can only receive apprentice Arcana Cards. Perhaps one day you will possess one of the major Arcana Cards, which are only owned by the top Summoners of the land! The card you will be making now is for use in the trial, so it does not need to be ornate. You must find a craftsman that can create these cards for you. Trader Lara in The Town of Dion would be a good place to start. She works slowly so I recommend that you order a good supply of them in advance. Return
[30634-11d.htm] High Summoner Galatea: I have several ideas regarding potential opponents for you. First, you should try and find Summoner Almors. He has been sick lately and is recovering on Talking Island. You should also try Summoner Basillia. I have heard that she is busy researching a new form of Summoning magic close to a farm on the southern shores of Gludio. Summoner Camoniell, of the Elves, has been in seclusion in a cottage in southern Dion. I've heard he has had some trouble lately. Summoner Celestiel usually resides in the Ivory Tower, but has returned to the Elven Woods on urgent business from her homeland. The Dark Elves, Summoner Brynthea and Summoner Belthus, are savvy opponents for you, but they are hard to find, as they do not stay in one place very long. Last I heard, Brynthea was somewhere in the northeastern parts of Giran, and Belthus was somewhere in the Cruma Marshlands... These Summoners are proud and haughty people, and may scoff at a challenge from an apprentice Summoner like yourself. But, at the same time, they will likely accept your challenge, so that they may display their superiority over you in front of their friends, family, relatives, on-lookers and animals. Return
[30634-12.htm] High Summoner Galatea: Fantastic! You have won 6 Arcana Cards! This is a remarkable feat and worthy of inclusion to the Summoner Archives! You are the first apprentice Summoner to bring back all 6 cards so quickly! Quite frankly, I doubted whether you would succeed... My worries were without merit! You have passed the Trials of the Summoner! Congratulations! I shall give you the Mark of the Summoner. With your talents you will become an excellent Summoner who shall be respected and loved throughout the land. Perhaps one day you will hold one of the Major Arcana Cards...
[30635-01.htm] Summoner Almors: Greetings, my name is Almors. I am the Summoner of the Ivory Tower in Oren. This is my cat, Pako. Pardon my appearance, I have been recuperating here at my aunt's house. I had to get out of Oren's bitter cold. I do wish that I could return to the Ivory Tower to finish my project... Although the slower pace around here is comforting... Ah, I see that you are an apprentice Summoner! Have you come to fight a duel with me, by chance? "I challenge you to a duel!"
[30635-02.htm] Summoner Almors: You have come to challenge me without an Arcana Card? That is preposterous! If you want a duel you must first visit Trader Lara of the Town of Dion. She will make an Arcana Card for you.
[30635-03.htm] Summoner Almors: I suppose you know the rules? The first attack shall be made by summoned creatures! No intervention by the Summoners is allowed! Is that clear? Are you ready for battle? Begin the battle
[30635-04.htm] Summoner Almors: Very well. I accept your Arcana Card of apprenticeship! Let the battle begin! Pako The Cat is ready for your creature's attack!
[30635-05.htm] Summoner Almors: You mustn't be discouraged. This result was inevitable, as you are but an apprentice Summoner. Try as you may you will never defeat me. "I demand a rematch!"
[30635-06.htm] Summoner Almors: Are you ignorant of the rules or just stupid? Oh well, either way you lose again. "I demand a rematch!"
[30635-07.htm] Summoner Almors: My over-confidence has allowed you to get the better of me. Take my Arcana card. Good job. I am sure that you shall pass the Test of the Summoner. Perhaps one day our paths will cross again in the Ivory Tower of Oren.
[30635-08.htm] Summoner Almors: The time for battle has arrived! Tell your animal that Pako The Cat is prepared for the attack!
[30635-09.htm] Summoner Almors: We are in the midst of battle! This is not a time for idle chatter!
[30635-10.htm] Summoner Almors: I suppose you've come to humiliate me further... Wasn't my Arcana card enough for you? How will I face my colleagues on my return to the Ivory Tower of Oren if they find out? I will never hear the end of being beaten by an apprentice Summoner...
[30636-01.htm] Summoner Camoniell: Hello, young apprentice Summoner. Have you come to challenge me? I am not going to fight you right now, in fact, I will concede defeat. Here is my Arcana Card. "That's absurd! I will not accept such a victory!"
[30636-02.htm] Summoner Camoniell: You don't even have an Arcana Card! How do you expect to fight? You can get a card from Trader Lara of the Town of Dion...
[30636-03.htm] Summoner Camoniell: Whew... You are tenacious, aren't you? Ready for a fight even as the world crumbles around you? All right, I accept your challenge to a duel. This will not be easy, but at least it should be over quickly. In fact, it shouldn't take more than a minute... Let me introduce my friend, Unicorn Racer. Now, I am sure you know the rules by now. The battle is only between summoned creatures, and yours is allowed the first attack. Begin the battle
[30636-04.htm] Summoner Camoniell: I'll hold your Arcana Card... You may order your creature to attack when ready...
[30636-05.htm] Summoner Camoniell: That certainly took a lot longer than I expected... Let's stop fighting. Ask for another battle.
[30636-06.htm] Summoner Camoniell: Hey, what do you think you're doing? How rude! How dare you touch my creature... Well, according the rules, I win! Ask for another battle.
[30636-07.htm] Summoner Camoniell: How could I have lost to an apprentice Summoner? Is this really happening? God has forsaken me... I am done for! It is over! Here, take my Arcana Card. Go on! Take it and leave me alone!
[30636-08.htm] Summoner Camoniell: You talk too much. I didn't want to fight you, what makes you think I would want to talk to you? Let's end this now.
[30636-09.htm] Summoner Camoniell: ...Unicorn Racer! Give no quarter! Finish him!
[30636-10.htm] Summoner Camoniell: What do you want now? Stop harassing this poor old Elf, deprived of her lover and defeated by a mere apprentice... Oh, Eva! How can you be so cruel to me?...
[30637-01.htm] Summoner Belthus: Oh really? Are you here to train your creature? You should challenge my Shadow Turen... I'm really glad you showed up! I was beginning to get bored. Look over here... Don't you think this is a perfect place for a battle! "I challenge you to a Summoner's Duel."
[30637-02.htm] Summoner Belthus: As much as I would like to fight right now, it is impossible until you present an Arcana Card... In the Town of Dion there is a woman named Lara that creates and sells adequate Arcana Cards.
[30637-03.htm] Summoner Belthus: I suppose you know the rules? The first attack shall be made by summoned creatures! No intervention by the Summoners is allowed! Is that clear? Are you ready for battle? Begin the battle
[30637-04.htm] Summoner Belthus: I accept your Arcana Card of apprenticeship! Your creature is allowed the first attack. Turen is waiting!
[30637-05.htm] Summoner Belthus: Savor the taste, sweet Turen, next time you may drink more blood... My friend, your control has promise but you still need much practice. Most importantly you didn't trust your creature's instincts. You must not be overbearing in your desire to win. This creates stress and reduced performance of creatures... "Let us battle again!"
[30637-06.htm] Summoner Belthus: Cheating will get you nowhere! For that, you shall forfeit your Arcana Card. "Let us battle again!"
[30637-07.htm] Summoner Belthus: Oh my! What control! Oh well, I lost. Just as I had become sure of my victory, I let a crack open in my concentration... I must look like a fool to lose after all that bragging! Here is my Arcana Card. Handle it with care. This has been an educational experience. This defeat was an eye-opener for me as well as for Turen. Goodbye, my friend. I will look forward to our next battle.
[30637-08.htm] Summoner Belthus: Your heart doesn't seem to be in this at all. Why are you staring off into space during battle? Look at that, my Turen is bored... Order your creature to attack!
[30637-09.htm] Summoner Belthus: I've never fought anyone foolish enough to try to carry on a conversation during a battle. I guess I don't mind, but are you sure you are OK? It appears that my creature is getting the better of yours...? Oops! There he goes again!
[30637-10.htm] Summoner Belthus: Hey, why are you still here? Am I am the only Summoner who will fight you? To pass this trial you must defeat 6 other Summoners... Good luck, and I hope you become a real Summoner soon. It is very humiliating to say that I lost to an apprentice Summoner...
[30638-01.htm] Summoner Basillia: Greetings, traveler. I am Basillia, a Summoner of the Ivory Tower. I was born in this place, but left it over 30 years ago. Let's get down to business, shall we? I know what you're here for... Take out your Arcana Card and prepare for battle! I have already summoned my cat, Mimi. Take out the Arcana Card.
[30638-02.htm] Summoner Basillia: We can go no further until you get an Arcana Card. Trader Lara of the Town of Dion will make one for you.
[30638-03.htm] Summoner Basillia: I suppose you know the rules? The first attack shall be made by summoned creatures! No intervention by the Summoners is allowed! Is that clear? Are you ready for battle? Begin the battle
[30638-04.htm] Summoner Basillia: Very well. I accept your card. Your creature may attack Mimi The Cat now!
[30638-05.htm] Summoner Basillia: Don't be discouraged, the outcome was inevitable. I am invincible! "I demand a rematch!"
[30638-06.htm] Summoner Basillia: Haven't you learned that cheating does not lead to victory? "I demand a rematch!"
[30638-07.htm] Summoner Basillia: ...Well, I certainly didn't see that coming. Quite unexpected I must say... How could I have lost to you? I don't understand it but acquiesce... My Arcana Card is yours, as promised.
[30638-08.htm] Summoner Basillia: The battle has begun. Order your creature to attack!
[30638-09.htm] Summoner Basillia: Shut up, you fool! We are in the midst of battle!
[30638-10.htm] Summoner Basillia: Why are you still here? I assumed that you left for battle with another Summoner...
[30639-01.htm] Summoner Celestiel: How do you do? I am Celestiel the Summoner. This is my comrade Phantasm the unicorn. This place seems good for a battle, doesn't it? What do you think, apprentice Summoner? "I challenge you to a duel!"
[30639-02.htm] Summoner Celestiel: You cannot issue a challenge without an Arcana Card. Trader Lara of the Town of Dion will make one for you.
[30639-03.htm] Summoner Celestiel: You are allowed the first attack and must never touch your opponent's creature. Are you ready? Let's make this a good battle! Begin the battle
[30639-04.htm] Summoner Celestiel: First I will need your Arcana Card. I believe in you, Unicorn Phantasm! Take your time... Keep your eyes on your opponent!
[30639-05.htm] Summoner Celestiel: Ah, yes, I win again... My Unicorn Phantasm is a powerful opponent, no? A weak creature like yours is no match for him. "I demand a rematch!".
[30639-06.htm] Summoner Celestiel: Watch out Phantasm! ...Are you hurt? What the hell are you doing! How dare you touch my animal! You forfeit the match for that... Give me your crude little card... Ask for another battle.
[30639-07.htm] Summoner Celestiel: Oh, my! My poor Unicorn Phantasm! I pray he isn't badly injured! Wow, what a battle! I never imagined such a weak animal would get the better of my Phantasm! Oh, well, I suppose everyone has to lose sometimes. Take my Arcana Card. Take heed, this is the first and the last time shall I lose to you. Take good care of my card until I can win it back!
[30639-08.htm] Summoner Celestiel: Unicorn Phantasm, assume defensive position! Good, stay cool...! It seems to me that your animal is frightened. It appears he doesn't want to attack!
[30639-09.htm] Summoner Celestiel: Good job, Unicorn Phantasm! Yeah, that's it! Step left, now parry! Watch your back! Now kick! ...Ooops! You are blocking my view, that is a penalty!
[30639-10.htm] Summoner Celestiel: I hope you are taking care of my Arcana Card... Are you still taking the Trial of the Summoner? If you defeat me and then lose to others I will be doubly disgraced. I pray you achieve straight victories and earn the Mark of the Summoner!
[30640-01.htm] Summoner Brynthea: Welcome, apprentice Summoner! My name is Brynthea. I am a Summoner like you. Let me introduce my lovely creature, Tilfo. You are here to challenge us, correct? Here is my Arcana Card... Hand-made by a Dwarven slave. Exquisite, isn't it? You shall have it if you defeat me, although that is highly unlikely. ...Is there something you want to say? "I challenge you to a duel!"
[30640-02.htm] Summoner Brynthea: What kind of a fool issues a challenge without a card? If you need a card you should go and see Trader Lara in the Town of Dion. She makes a card suitable for apprentice Summoners. You should go and buy a few!
[30640-03.htm] Summoner Brynthea: I suppose you know the rules? The first attack shall be made by summoned creature of the challenger! No intervention by the Summoners is allowed! Is that clear? Are you ready for battle? Begin the battle
[30640-04.htm] Summoner Brynthea: Ah yes! First, I will take your apprentice Arcana Card! Now, fellow... Start off easy... All right, Tilfo, show them what you've got..!
[30640-05.htm] Summoner Brynthea: Good job, Tilfo! You shall be rewarded later! Let me give you some advice... You must control your creature completely. He seemed to be on his own there for a while... Would you like to have another go? "Let's battle again!"
[30640-06.htm] Summoner Brynthea: Oh my, it seems that you have forgotten the rule about touching the opponent's creature! You lose. Now I shall have that ugly Arcana Card of yours. Ask for another battle.
[30640-07.htm] Summoner Brynthea: I am very disappointed in you, Tilfo! We must now start your training all over! You were a stronger opponent than I imagined! The overpowering ruthlessness... You have the stuff of a real summoner. Now take my Arcana card.
[30640-08.htm] Summoner Brynthea: Tilfo, let your opponent strike the first blow! Do not fear pain. It won't hurt so much once you get used to it! What are you looking at? Go and tell your creature to attack!
[30640-09.htm] Summoner Brynthea: Good job, Tilfo, you are doing well! It doesn't hurt that bad, does it? That's my loyal servant... Good girl... How can you let your creature fight unsupervised?... You must be a bad master indeed! Look there, your creature is bleeding!
[30640-10.htm] Summoner Brynthea: Are you still here? You seem to have great potential... You seek the Mark of the Summoner, correct? I look forward to meeting you on the field as a full-fledged Summoner someday... Ah, the blood, the screams... Just the thought of it sets my heart racing!
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00230_TestOfTheSummoner;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.data.xml.SkillData;
import org.l2jmobius.gameserver.entity.actor.Attackable;
import org.l2jmobius.gameserver.entity.actor.Creature;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.Summon;
import org.l2jmobius.gameserver.entity.actor.enums.player.PlayerClass;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
import org.l2jmobius.gameserver.network.enums.ChatType;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
public class Q00230_TestOfTheSummoner extends Quest
{
// NPCs
private static final int LARA = 30063;
private static final int GALATEA = 30634;
private static final int ALMORS = 30635;
private static final int CAMONIELL = 30636;
private static final int BELTHUS = 30637;
private static final int BASILLA = 30638;
private static final int CELESTIEL = 30639;
private static final int BRYNTHEA = 30640;
// Monsters
private static final int NOBLE_ANT = 20089;
private static final int NOBLE_ANT_LEADER = 20090;
private static final int WYRM = 20176;
private static final int TYRANT = 20192;
private static final int TYRANT_KINGPIN = 20193;
private static final int BREKA_ORC = 20267;
private static final int BREKA_ORC_ARCHER = 20268;
private static final int BREKA_ORC_SHAMAN = 20269;
private static final int BREKA_ORC_OVERLORD = 20270;
private static final int BREKA_ORC_WARRIOR = 20271;
private static final int FETTERED_SOUL = 20552;
private static final int WINDSUS = 20553;
private static final int GIANT_FUNGUS = 20555;
private static final int MANASHEN_GARGOYLE = 20563;
private static final int LETO_LIZARDMAN = 20577;
private static final int LETO_LIZARDMAN_ARCHER = 20578;
private static final int LETO_LIZARDMAN_SOLDIER = 20579;
private static final int LETO_LIZARDMAN_WARRIOR = 20580;
private static final int LETO_LIZARDMAN_SHAMAN = 20581;
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
private static final int KARUL_BUGBEAR = 20600;
// Quest Monsters
private static final int PAKO_THE_CAT = 27102;
private static final int UNICORN_RACER = 27103;
private static final int SHADOW_TUREN = 27104;
private static final int MIMI_THE_CAT = 27105;
private static final int UNICORN_PHANTASM = 27106;
private static final int SILHOUETTE_TILFO = 27107;
// Items
private static final int LETO_LIZARDMAN_AMULET = 3337;
private static final int SAC_OF_REDSPORES = 3338;
private static final int KARUL_BUGBEAR_TOTEM = 3339;
private static final int SHARDS_OF_MANASHEN = 3340;
private static final int BREKA_ORC_TOTEM = 3341;
private static final int CRIMSON_BLOODSTONE = 3342;
private static final int TALONS_OF_TYRANT = 3343;
private static final int WINGS_OF_DRONEANT = 3344;
private static final int TUSK_OF_WINDSUS = 3345;
private static final int FANGS_OF_WYRM = 3346;
private static final int LARA_LIST_1 = 3347;
private static final int LARA_LIST_2 = 3348;
private static final int LARA_LIST_3 = 3349;
private static final int LARA_LIST_4 = 3350;
private static final int LARA_LIST_5 = 3351;
private static final int GALATEA_LETTER = 3352;
private static final int BEGINNER_ARCANA = 3353;
private static final int ALMORS_ARCANA = 3354;
private static final int CAMONIELL_ARCANA = 3355;
private static final int BELTHUS_ARCANA = 3356;
private static final int BASILLIA_ARCANA = 3357;
private static final int CELESTIEL_ARCANA = 3358;
private static final int BRYNTHEA_ARCANA = 3359;
private static final int CRYSTAL_OF_PROGRESS_1 = 3360;
private static final int CRYSTAL_OF_INPROGRESS_1 = 3361;
private static final int CRYSTAL_OF_FOUL_1 = 3362;
private static final int CRYSTAL_OF_DEFEAT_1 = 3363;
private static final int CRYSTAL_OF_VICTORY_1 = 3364;
private static final int CRYSTAL_OF_PROGRESS_2 = 3365;
private static final int CRYSTAL_OF_INPROGRESS_2 = 3366;
private static final int CRYSTAL_OF_FOUL_2 = 3367;
private static final int CRYSTAL_OF_DEFEAT_2 = 3368;
private static final int CRYSTAL_OF_VICTORY_2 = 3369;
private static final int CRYSTAL_OF_PROGRESS_3 = 3370;
private static final int CRYSTAL_OF_INPROGRESS_3 = 3371;
private static final int CRYSTAL_OF_FOUL_3 = 3372;
private static final int CRYSTAL_OF_DEFEAT_3 = 3373;
private static final int CRYSTAL_OF_VICTORY_3 = 3374;
private static final int CRYSTAL_OF_PROGRESS_4 = 3375;
private static final int CRYSTAL_OF_INPROGRESS_4 = 3376;
private static final int CRYSTAL_OF_FOUL_4 = 3377;
private static final int CRYSTAL_OF_DEFEAT_4 = 3378;
private static final int CRYSTAL_OF_VICTORY_4 = 3379;
private static final int CRYSTAL_OF_PROGRESS_5 = 3380;
private static final int CRYSTAL_OF_INPROGRESS_5 = 3381;
private static final int CRYSTAL_OF_FOUL_5 = 3382;
private static final int CRYSTAL_OF_DEFEAT_5 = 3383;
private static final int CRYSTAL_OF_VICTORY_5 = 3384;
private static final int CRYSTAL_OF_PROGRESS_6 = 3385;
private static final int CRYSTAL_OF_INPROGRESS_6 = 3386;
private static final int CRYSTAL_OF_FOUL_6 = 3387;
private static final int CRYSTAL_OF_DEFEAT_6 = 3388;
private static final int CRYSTAL_OF_VICTORY_6 = 3389;
// Rewards
private static final int MARK_OF_SUMMONER = 3336;
private static final int DIMENSIONAL_DIAMOND = 7562;
// Other
private static final int[][] LARA_LISTS = new int[][]
{
// @formatter:off
{LARA_LIST_1, SAC_OF_REDSPORES, LETO_LIZARDMAN_AMULET},
{LARA_LIST_2, KARUL_BUGBEAR_TOTEM, SHARDS_OF_MANASHEN},
{LARA_LIST_3, CRIMSON_BLOODSTONE, BREKA_ORC_TOTEM},
{LARA_LIST_4, TUSK_OF_WINDSUS, TALONS_OF_TYRANT},
{LARA_LIST_5, WINGS_OF_DRONEANT, FANGS_OF_WYRM}
// @formatter:on
};
private static final Map<Integer, ProgressDuelMob> _duelsInProgress = new ConcurrentHashMap<>();
public Q00230_TestOfTheSummoner()
{
super(230, "Test of the Summoner");
registerQuestItems(LETO_LIZARDMAN_AMULET, SAC_OF_REDSPORES, KARUL_BUGBEAR_TOTEM, SHARDS_OF_MANASHEN, BREKA_ORC_TOTEM, CRIMSON_BLOODSTONE, TALONS_OF_TYRANT, WINGS_OF_DRONEANT, TUSK_OF_WINDSUS, FANGS_OF_WYRM, LARA_LIST_1, LARA_LIST_2, LARA_LIST_3, LARA_LIST_4, LARA_LIST_5, GALATEA_LETTER, BEGINNER_ARCANA, ALMORS_ARCANA, CAMONIELL_ARCANA, BELTHUS_ARCANA, BASILLIA_ARCANA, CELESTIEL_ARCANA, BRYNTHEA_ARCANA, CRYSTAL_OF_PROGRESS_1, CRYSTAL_OF_INPROGRESS_1, CRYSTAL_OF_FOUL_1, CRYSTAL_OF_DEFEAT_1, CRYSTAL_OF_VICTORY_1, CRYSTAL_OF_PROGRESS_2, CRYSTAL_OF_INPROGRESS_2, CRYSTAL_OF_FOUL_2, CRYSTAL_OF_DEFEAT_2, CRYSTAL_OF_VICTORY_2, CRYSTAL_OF_PROGRESS_3, CRYSTAL_OF_INPROGRESS_3, CRYSTAL_OF_FOUL_3, CRYSTAL_OF_DEFEAT_3, CRYSTAL_OF_VICTORY_3, CRYSTAL_OF_PROGRESS_4, CRYSTAL_OF_INPROGRESS_4, CRYSTAL_OF_FOUL_4, CRYSTAL_OF_DEFEAT_4, CRYSTAL_OF_VICTORY_4, CRYSTAL_OF_PROGRESS_5, CRYSTAL_OF_INPROGRESS_5, CRYSTAL_OF_FOUL_5, CRYSTAL_OF_DEFEAT_5, CRYSTAL_OF_VICTORY_5, CRYSTAL_OF_PROGRESS_6, CRYSTAL_OF_INPROGRESS_6, CRYSTAL_OF_FOUL_6, CRYSTAL_OF_DEFEAT_6, CRYSTAL_OF_VICTORY_6);
addStartNpc(GALATEA);
addTalkId(GALATEA, ALMORS, CAMONIELL, BELTHUS, BASILLA, CELESTIEL, BRYNTHEA, LARA);
addKillId(NOBLE_ANT, NOBLE_ANT_LEADER, WYRM, TYRANT, TYRANT_KINGPIN, BREKA_ORC, BREKA_ORC_ARCHER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, BREKA_ORC_WARRIOR, FETTERED_SOUL, WINDSUS, GIANT_FUNGUS, MANASHEN_GARGOYLE, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, KARUL_BUGBEAR, PAKO_THE_CAT, UNICORN_RACER, SHADOW_TUREN, MIMI_THE_CAT, UNICORN_PHANTASM, SILHOUETTE_TILFO);
addAttackId(PAKO_THE_CAT, UNICORN_RACER, SHADOW_TUREN, MIMI_THE_CAT, UNICORN_PHANTASM, SILHOUETTE_TILFO);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final QuestState st = player.getQuestState(getName());
if (st == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "30634-08.htm":
{
st.startQuest();
st.set("Belthus", "1");
st.set("Brynthea", "1");
st.set("Celestiel", "1");
st.set("Camoniell", "1");
st.set("Basilla", "1");
st.set("Almors", "1");
giveItems(player, GALATEA_LETTER, 1);
if (!player.getVariables().getBoolean("secondClassChange39", false))
{
htmltext = "30634-08a.htm";
giveItems(player, DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getPlayerClass().getId()));
player.getVariables().set("secondClassChange39", true);
}
break;
}
case "30063-02.htm":
{
st.setCond(2, true);
takeItems(player, GALATEA_LETTER, 1);
final int random = getRandom(5);
giveItems(player, LARA_LISTS[random][0], 1);
st.set("Lara", String.valueOf(random + 1)); // avoid 0
break;
}
case "30063-04.htm":
{
final int random = getRandom(5);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(player, LARA_LISTS[random][0], 1);
st.set("Lara", String.valueOf(random + 1));
break;
}
case "30635-02.htm":
{
if (hasQuestItems(player, BEGINNER_ARCANA))
{
htmltext = "30635-03.htm";
}
break;
}
case "30635-04.htm":
{
st.set("Almors", "2"); // set state ready to fight
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_FOUL_1, -1); // just in case he cheated or lost
takeItems(player, CRYSTAL_OF_DEFEAT_1, -1);
takeItems(player, BEGINNER_ARCANA, 1);
giveItems(player, CRYSTAL_OF_PROGRESS_1, 1); // give Starting Crystal
npc.setTarget(player);
npc.doCast(SkillData.getInstance().getSkill(4126, 1));
break;
}
case "30636-02.htm":
{
if (hasQuestItems(player, BEGINNER_ARCANA))
{
htmltext = "30636-03.htm";
}
break;
}
case "30636-04.htm":
{
st.set("Camoniell", "2");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_FOUL_2, -1);
takeItems(player, CRYSTAL_OF_DEFEAT_2, -1);
takeItems(player, BEGINNER_ARCANA, 1);
giveItems(player, CRYSTAL_OF_PROGRESS_2, 1);
npc.setTarget(player);
npc.doCast(SkillData.getInstance().getSkill(4126, 1));
break;
}
case "30637-02.htm":
{
if (hasQuestItems(player, BEGINNER_ARCANA))
{
htmltext = "30637-03.htm";
}
break;
}
case "30637-04.htm":
{
st.set("Belthus", "2");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_FOUL_3, -1);
takeItems(player, CRYSTAL_OF_DEFEAT_3, -1);
takeItems(player, BEGINNER_ARCANA, 1);
giveItems(player, CRYSTAL_OF_PROGRESS_3, 1);
npc.setTarget(player);
npc.doCast(SkillData.getInstance().getSkill(4126, 1));
break;
}
case "30638-02.htm":
{
if (hasQuestItems(player, BEGINNER_ARCANA))
{
htmltext = "30638-03.htm";
}
break;
}
case "30638-04.htm":
{
st.set("Basilla", "2");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_FOUL_4, -1);
takeItems(player, CRYSTAL_OF_DEFEAT_4, -1);
takeItems(player, BEGINNER_ARCANA, 1);
giveItems(player, CRYSTAL_OF_PROGRESS_4, 1);
npc.setTarget(player);
npc.doCast(SkillData.getInstance().getSkill(4126, 1));
break;
}
case "30639-02.htm":
{
if (hasQuestItems(player, BEGINNER_ARCANA))
{
htmltext = "30639-03.htm";
}
break;
}
case "30639-04.htm":
{
st.set("Celestiel", "2");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_FOUL_5, -1);
takeItems(player, CRYSTAL_OF_DEFEAT_5, -1);
takeItems(player, BEGINNER_ARCANA, 1);
giveItems(player, CRYSTAL_OF_PROGRESS_5, 1);
npc.setTarget(player);
npc.doCast(SkillData.getInstance().getSkill(4126, 1));
break;
}
case "30640-02.htm":
{
if (hasQuestItems(player, BEGINNER_ARCANA))
{
htmltext = "30640-03.htm";
}
break;
}
case "30640-04.htm":
{
st.set("Brynthea", "2");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_FOUL_6, -1);
takeItems(player, CRYSTAL_OF_DEFEAT_6, -1);
takeItems(player, BEGINNER_ARCANA, 1);
giveItems(player, CRYSTAL_OF_PROGRESS_6, 1);
npc.setTarget(player);
npc.doCast(SkillData.getInstance().getSkill(4126, 1));
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
final int cond = st.getCond();
final int npcId = npc.getId();
switch (st.getState())
{
case State.CREATED:
{
if ((player.getPlayerClass() != PlayerClass.WIZARD) && (player.getPlayerClass() != PlayerClass.ELVEN_WIZARD) && (player.getPlayerClass() != PlayerClass.DARK_WIZARD))
{
htmltext = "30634-01.htm";
}
else if (player.getLevel() < 39)
{
htmltext = "30634-02.htm";
}
else
{
htmltext = "30634-03.htm";
}
break;
}
case State.STARTED:
{
switch (npcId)
{
case LARA:
{
if (cond == 1)
{
htmltext = "30063-01.htm";
}
else
{
if (st.getInt("Lara") == 0)
{
htmltext = "30063-03.htm";
}
else
{
final int[] laraPart = LARA_LISTS[st.getInt("Lara") - 1];
if ((getQuestItemsCount(player, laraPart[1]) < 30) || (getQuestItemsCount(player, laraPart[2]) < 30))
{
htmltext = "30063-05.htm";
}
else
{
htmltext = "30063-06.htm";
st.setCond(3, true);
st.unset("Lara");
takeItems(player, laraPart[0], 1);
takeItems(player, laraPart[1], -1);
takeItems(player, laraPart[2], -1);
giveItems(player, BEGINNER_ARCANA, 2);
}
}
}
break;
}
case GALATEA:
{
if (cond == 1)
{
htmltext = "30634-09.htm";
}
else if ((cond == 2) || (cond == 3))
{
htmltext = (!hasQuestItems(player, BEGINNER_ARCANA)) ? "30634-10.htm" : "30634-11.htm";
}
else if (cond == 4)
{
htmltext = "30634-12.htm";
takeItems(player, BEGINNER_ARCANA, -1);
takeItems(player, ALMORS_ARCANA, -1);
takeItems(player, BASILLIA_ARCANA, -1);
takeItems(player, BELTHUS_ARCANA, -1);
takeItems(player, BRYNTHEA_ARCANA, -1);
takeItems(player, CAMONIELL_ARCANA, -1);
takeItems(player, CELESTIEL_ARCANA, -1);
takeItems(player, LARA_LIST_1, -1);
takeItems(player, LARA_LIST_2, -1);
takeItems(player, LARA_LIST_3, -1);
takeItems(player, LARA_LIST_4, -1);
takeItems(player, LARA_LIST_5, -1);
giveItems(player, MARK_OF_SUMMONER, 1);
addExpAndSp(player, 148409, 30000);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
}
break;
}
case ALMORS:
{
final int almorsStat = st.getInt("Almors");
if (almorsStat == 1)
{
htmltext = "30635-01.htm";
}
else if (almorsStat == 2)
{
htmltext = "30635-08.htm";
}
else if (almorsStat == 3)
{
htmltext = "30635-09.htm";
}
else if (almorsStat == 4)
{
htmltext = "30635-05.htm";
}
else if (almorsStat == 5)
{
htmltext = "30635-06.htm";
}
else if (almorsStat == 6)
{
htmltext = "30635-07.htm";
st.set("Almors", "7");
takeItems(player, CRYSTAL_OF_VICTORY_1, -1);
giveItems(player, ALMORS_ARCANA, 1);
if (hasQuestItems(player, CAMONIELL_ARCANA, BELTHUS_ARCANA, BASILLIA_ARCANA, CELESTIEL_ARCANA, BRYNTHEA_ARCANA))
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (almorsStat == 7)
{
htmltext = "30635-10.htm";
}
break;
}
case CAMONIELL:
{
final int camoniellStat = st.getInt("Camoniell");
if (camoniellStat == 1)
{
htmltext = "30636-01.htm";
}
else if (camoniellStat == 2)
{
htmltext = "30636-08.htm";
}
else if (camoniellStat == 3)
{
htmltext = "30636-09.htm";
}
else if (camoniellStat == 4)
{
htmltext = "30636-05.htm";
}
else if (camoniellStat == 5)
{
htmltext = "30636-06.htm";
}
else if (camoniellStat == 6)
{
htmltext = "30636-07.htm";
st.set("Camoniell", "7");
takeItems(player, CRYSTAL_OF_VICTORY_2, -1);
giveItems(player, CAMONIELL_ARCANA, 1);
if (hasQuestItems(player, ALMORS_ARCANA, BELTHUS_ARCANA, BASILLIA_ARCANA, CELESTIEL_ARCANA, BRYNTHEA_ARCANA))
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (camoniellStat == 7)
{
htmltext = "30636-10.htm";
}
break;
}
case BELTHUS:
{
final int belthusStat = st.getInt("Belthus");
if (belthusStat == 1)
{
htmltext = "30637-01.htm";
}
else if (belthusStat == 2)
{
htmltext = "30637-08.htm";
}
else if (belthusStat == 3)
{
htmltext = "30637-09.htm";
}
else if (belthusStat == 4)
{
htmltext = "30637-05.htm";
}
else if (belthusStat == 5)
{
htmltext = "30637-06.htm";
}
else if (belthusStat == 6)
{
htmltext = "30637-07.htm";
st.set("Belthus", "7");
takeItems(player, CRYSTAL_OF_VICTORY_3, -1);
giveItems(player, BELTHUS_ARCANA, 1);
if (hasQuestItems(player, ALMORS_ARCANA, CAMONIELL_ARCANA, BASILLIA_ARCANA, CELESTIEL_ARCANA, BRYNTHEA_ARCANA))
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (belthusStat == 7)
{
htmltext = "30637-10.htm";
}
break;
}
case BASILLA:
{
final int basillaStat = st.getInt("Basilla");
if (basillaStat == 1)
{
htmltext = "30638-01.htm";
}
else if (basillaStat == 2)
{
htmltext = "30638-08.htm";
}
else if (basillaStat == 3)
{
htmltext = "30638-09.htm";
}
else if (basillaStat == 4)
{
htmltext = "30638-05.htm";
}
else if (basillaStat == 5)
{
htmltext = "30638-06.htm";
}
else if (basillaStat == 6)
{
htmltext = "30638-07.htm";
st.set("Basilla", "7");
takeItems(player, CRYSTAL_OF_VICTORY_4, -1);
giveItems(player, BASILLIA_ARCANA, 1);
if (hasQuestItems(player, ALMORS_ARCANA, CAMONIELL_ARCANA, BELTHUS_ARCANA, CELESTIEL_ARCANA, BRYNTHEA_ARCANA))
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (basillaStat == 7)
{
htmltext = "30638-10.htm";
}
break;
}
case CELESTIEL:
{
final int celestielStat = st.getInt("Celestiel");
if (celestielStat == 1)
{
htmltext = "30639-01.htm";
}
else if (celestielStat == 2)
{
htmltext = "30639-08.htm";
}
else if (celestielStat == 3)
{
htmltext = "30639-09.htm";
}
else if (celestielStat == 4)
{
htmltext = "30639-05.htm";
}
else if (celestielStat == 5)
{
htmltext = "30639-06.htm";
}
else if (celestielStat == 6)
{
htmltext = "30639-07.htm";
st.set("Celestiel", "7");
takeItems(player, CRYSTAL_OF_VICTORY_5, -1);
giveItems(player, CELESTIEL_ARCANA, 1);
if (hasQuestItems(player, ALMORS_ARCANA, CAMONIELL_ARCANA, BELTHUS_ARCANA, BASILLIA_ARCANA, BRYNTHEA_ARCANA))
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (celestielStat == 7)
{
htmltext = "30639-10.htm";
}
break;
}
case BRYNTHEA:
{
final int bryntheaStat = st.getInt("Brynthea");
if (bryntheaStat == 1)
{
htmltext = "30640-01.htm";
}
else if (bryntheaStat == 2)
{
htmltext = "30640-08.htm";
}
else if (bryntheaStat == 3)
{
htmltext = "30640-09.htm";
}
else if (bryntheaStat == 4)
{
htmltext = "30640-05.htm";
}
else if (bryntheaStat == 5)
{
htmltext = "30640-06.htm";
}
else if (bryntheaStat == 6)
{
htmltext = "30640-07.htm";
st.set("Brynthea", "7");
takeItems(player, CRYSTAL_OF_VICTORY_6, -1);
giveItems(player, BRYNTHEA_ARCANA, 1);
if (hasQuestItems(player, ALMORS_ARCANA, CAMONIELL_ARCANA, BELTHUS_ARCANA, BASILLIA_ARCANA, CELESTIEL_ARCANA))
{
st.setCond(4, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
else if (bryntheaStat == 7)
{
htmltext = "30640-10.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onDeath(Creature killer, Creature victim, QuestState st)
{
if (st == null)
{
return;
}
if (!(killer instanceof Attackable))
{
return;
}
switch (killer.asNpc().getId())
{
case PAKO_THE_CAT:
{
if (st.getInt("Almors") == 3)
{
st.set("Almors", "4");
playSound(killer.asPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_1, 1);
}
break;
}
case UNICORN_RACER:
{
if (st.getInt("Camoniell") == 3)
{
st.set("Camoniell", "4");
playSound(killer.asPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_2, 1);
}
break;
}
case SHADOW_TUREN:
{
if (st.getInt("Belthus") == 3)
{
st.set("Belthus", "4");
playSound(killer.asPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_3, 1);
}
break;
}
case MIMI_THE_CAT:
{
if (st.getInt("Basilla") == 3)
{
st.set("Basilla", "4");
playSound(killer.asPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_4, 1);
}
break;
}
case UNICORN_PHANTASM:
{
if (st.getInt("Celestiel") == 3)
{
st.set("Celestiel", "4");
playSound(killer.asPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_5, 1);
}
break;
}
case SILHOUETTE_TILFO:
{
if (st.getInt("Brynthea") == 3)
{
st.set("Brynthea", "4");
playSound(killer.asPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(killer.asPlayer(), CRYSTAL_OF_DEFEAT_6, 1);
}
break;
}
}
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
final int npcId = npc.getId();
switch (npcId)
{
case GIANT_FUNGUS:
if ((st.getInt("Lara") == 1) && (getRandom(100) < 80) && (getQuestItemsCount(player, SAC_OF_REDSPORES) < 30))
{
giveItems(player, SAC_OF_REDSPORES, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case LETO_LIZARDMAN:
case LETO_LIZARDMAN_ARCHER:
if ((st.getInt("Lara") == 1) && (getRandom(100) < 25) && (getQuestItemsCount(player, LETO_LIZARDMAN_AMULET) < 30))
{
giveItems(player, LETO_LIZARDMAN_AMULET, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case LETO_LIZARDMAN_SOLDIER:
case LETO_LIZARDMAN_WARRIOR:
if ((st.getInt("Lara") == 1) && (getRandom(100) < 50) && (getQuestItemsCount(player, LETO_LIZARDMAN_AMULET) < 30))
{
giveItems(player, LETO_LIZARDMAN_AMULET, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case LETO_LIZARDMAN_SHAMAN:
case LETO_LIZARDMAN_OVERLORD:
if ((st.getInt("Lara") == 1) && (getRandom(100) < 75) && (getQuestItemsCount(player, LETO_LIZARDMAN_AMULET) < 30))
{
giveItems(player, LETO_LIZARDMAN_AMULET, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case MANASHEN_GARGOYLE:
if ((st.getInt("Lara") == 2) && (getRandom(100) < 80) && (getQuestItemsCount(player, SHARDS_OF_MANASHEN) < 30))
{
giveItems(player, SHARDS_OF_MANASHEN, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case KARUL_BUGBEAR:
if ((st.getInt("Lara") == 2) && (getRandom(100) < 80) && (getQuestItemsCount(player, KARUL_BUGBEAR_TOTEM) < 30))
{
giveItems(player, KARUL_BUGBEAR_TOTEM, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case BREKA_ORC:
case BREKA_ORC_ARCHER:
case BREKA_ORC_WARRIOR:
if ((st.getInt("Lara") == 3) && (getRandom(100) < 25) && (getQuestItemsCount(player, BREKA_ORC_TOTEM) < 30))
{
giveItems(player, BREKA_ORC_TOTEM, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case BREKA_ORC_SHAMAN:
case BREKA_ORC_OVERLORD:
if ((st.getInt("Lara") == 3) && (getRandom(100) < 50) && (getQuestItemsCount(player, BREKA_ORC_TOTEM) < 30))
{
giveItems(player, BREKA_ORC_TOTEM, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case FETTERED_SOUL:
if ((st.getInt("Lara") == 3) && (getRandom(100) < 60) && (getQuestItemsCount(player, CRIMSON_BLOODSTONE) < 30))
{
giveItems(player, CRIMSON_BLOODSTONE, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case WINDSUS:
if ((st.getInt("Lara") == 4) && (getRandom(100) < 70) && (getQuestItemsCount(player, TUSK_OF_WINDSUS) < 30))
{
giveItems(player, TUSK_OF_WINDSUS, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case TYRANT:
case TYRANT_KINGPIN:
if ((st.getInt("Lara") == 4) && (getRandom(100) < 50) && (getQuestItemsCount(player, TALONS_OF_TYRANT) < 30))
{
giveItems(player, TALONS_OF_TYRANT, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case NOBLE_ANT:
case NOBLE_ANT_LEADER:
if ((st.getInt("Lara") == 5) && (getRandom(100) < 60) && (getQuestItemsCount(player, WINGS_OF_DRONEANT) < 30))
{
giveItems(player, WINGS_OF_DRONEANT, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case WYRM:
if ((st.getInt("Lara") == 5) && (getRandom(100) < 50) && (getQuestItemsCount(player, FANGS_OF_WYRM) < 30))
{
giveItems(player, FANGS_OF_WYRM, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
case PAKO_THE_CAT:
if ((st.getInt("Almors") == 3) && _duelsInProgress.containsKey(npcId))
{
st.set("Almors", "6");
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, CRYSTAL_OF_INPROGRESS_1, -1);
giveItems(player, CRYSTAL_OF_VICTORY_1, 1);
npc.broadcastSay(ChatType.GENERAL, "I'm sorry, Lord!");
st.getPlayer().addNotifyQuestOfDeath(st);
_duelsInProgress.remove(npcId);
}
break;
case UNICORN_RACER:
if ((st.getInt("Camoniell") == 3) && _duelsInProgress.containsKey(npcId))
{
st.set("Camoniell", "6");
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, CRYSTAL_OF_INPROGRESS_2, -1);
giveItems(player, CRYSTAL_OF_VICTORY_2, 1);
npc.broadcastSay(ChatType.GENERAL, "I LOSE");
st.getPlayer().addNotifyQuestOfDeath(st);
_duelsInProgress.remove(npcId);
}
break;
case SHADOW_TUREN:
if ((st.getInt("Belthus") == 3) && _duelsInProgress.containsKey(npcId))
{
st.set("Belthus", "6");
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, CRYSTAL_OF_INPROGRESS_3, -1);
giveItems(player, CRYSTAL_OF_VICTORY_3, 1);
npc.broadcastSay(ChatType.GENERAL, "Ugh! I lost...!");
st.getPlayer().addNotifyQuestOfDeath(st);
_duelsInProgress.remove(npcId);
}
break;
case MIMI_THE_CAT:
if ((st.getInt("Basilla") == 3) && _duelsInProgress.containsKey(npcId))
{
st.set("Basilla", "6");
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, CRYSTAL_OF_INPROGRESS_4, -1);
giveItems(player, CRYSTAL_OF_VICTORY_4, 1);
npc.broadcastSay(ChatType.GENERAL, "Lost! Sorry, Lord!");
st.getPlayer().addNotifyQuestOfDeath(st);
_duelsInProgress.remove(npcId);
}
break;
case UNICORN_PHANTASM:
if ((st.getInt("Celestiel") == 3) && _duelsInProgress.containsKey(npcId))
{
st.set("Celestiel", "6");
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, CRYSTAL_OF_INPROGRESS_5, -1);
giveItems(player, CRYSTAL_OF_VICTORY_5, 1);
npc.broadcastSay(ChatType.GENERAL, "I LOSE");
st.getPlayer().addNotifyQuestOfDeath(st);
_duelsInProgress.remove(npcId);
}
break;
case SILHOUETTE_TILFO:
if ((st.getInt("Brynthea") == 3) && _duelsInProgress.containsKey(npcId))
{
st.set("Brynthea", "6");
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
takeItems(player, CRYSTAL_OF_INPROGRESS_6, -1);
giveItems(player, CRYSTAL_OF_VICTORY_6, 1);
npc.broadcastSay(ChatType.GENERAL, "Ugh! Can this be happening?!");
st.getPlayer().addNotifyQuestOfDeath(st);
_duelsInProgress.remove(npcId);
}
break;
}
}
@Override
public void onAttack(Npc npc, Player player, int damage, boolean isPet)
{
QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
st.addNotifyOfDeath(npc);
final int npcId = npc.getId();
switch (npcId)
{
case PAKO_THE_CAT:
if ((st.getInt("Almors") == 2) && isPet && ((npc.getCurrentHp() + damage) >= npc.getMaxHp()))
{
st.set("Almors", "3");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_PROGRESS_1, -1);
giveItems(player, CRYSTAL_OF_INPROGRESS_1, 1);
npc.broadcastSay(ChatType.GENERAL, "Whhiisshh!");
_duelsInProgress.put(npcId, new ProgressDuelMob(player, player.getSummon()));
}
else if ((st.getInt("Almors") == 3) && _duelsInProgress.containsKey(npcId))
{
final ProgressDuelMob duel = _duelsInProgress.get(npcId);
// check if the attacker is the same pet as the one that attacked before.
if (!isPet || (player.getSummon() != duel.getPet())) // if a foul occurred find the player who had the duel in progress and give a foul crystal
{
final Player foulPlayer = duel.getAttacker();
if (foulPlayer != null)
{
st = foulPlayer.getQuestState(getName());
if (st != null)
{
st.set("Almors", "5");
takeItems(player, CRYSTAL_OF_PROGRESS_1, -1);
takeItems(player, CRYSTAL_OF_INPROGRESS_1, -1);
giveItems(player, CRYSTAL_OF_FOUL_1, 1);
st.getPlayer().addNotifyQuestOfDeath(st);
npc.broadcastSay(ChatType.GENERAL, "Rule violation!");
npc.doDie(npc);
}
}
}
}
break;
case UNICORN_RACER:
if ((st.getInt("Camoniell") == 2) && isPet && ((npc.getCurrentHp() + damage) >= npc.getMaxHp()))
{
st.set("Camoniell", "3");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_PROGRESS_2, -1);
giveItems(player, CRYSTAL_OF_INPROGRESS_2, 1);
npc.broadcastSay(ChatType.GENERAL, "START DUEL");
_duelsInProgress.put(npcId, new ProgressDuelMob(player, player.getSummon()));
}
else if ((st.getInt("Camoniell") == 3) && _duelsInProgress.containsKey(npcId))
{
final ProgressDuelMob duel = _duelsInProgress.get(npcId);
if (!isPet || (player.getSummon() != duel.getPet()))
{
final Player foulPlayer = duel.getAttacker();
if (foulPlayer != null)
{
st = foulPlayer.getQuestState(getName());
if (st != null)
{
st.set("Camoniell", "5");
takeItems(player, CRYSTAL_OF_PROGRESS_2, -1);
takeItems(player, CRYSTAL_OF_INPROGRESS_2, -1);
giveItems(player, CRYSTAL_OF_FOUL_2, 1);
st.getPlayer().addNotifyQuestOfDeath(st);
npc.broadcastSay(ChatType.GENERAL, "RULE VIOLATION");
npc.doDie(npc);
}
}
}
}
break;
case SHADOW_TUREN:
if ((st.getInt("Belthus") == 2) && isPet && ((npc.getCurrentHp() + damage) >= npc.getMaxHp()))
{
st.set("Belthus", "3");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_PROGRESS_3, -1);
giveItems(player, CRYSTAL_OF_INPROGRESS_3, 1);
npc.broadcastSay(ChatType.GENERAL, "So shall we start?!");
_duelsInProgress.put(npcId, new ProgressDuelMob(player, player.getSummon()));
}
else if ((st.getInt("Belthus") == 3) && _duelsInProgress.containsKey(npcId))
{
final ProgressDuelMob duel = _duelsInProgress.get(npcId);
if (!isPet || (player.getSummon() != duel.getPet()))
{
final Player foulPlayer = duel.getAttacker();
if (foulPlayer != null)
{
st = foulPlayer.getQuestState(getName());
if (st != null)
{
st.set("Belthus", "5");
takeItems(player, CRYSTAL_OF_PROGRESS_3, -1);
takeItems(player, CRYSTAL_OF_INPROGRESS_3, -1);
giveItems(player, CRYSTAL_OF_FOUL_3, 1);
st.getPlayer().addNotifyQuestOfDeath(st);
npc.broadcastSay(ChatType.GENERAL, "Rule violation!!!");
npc.doDie(npc);
}
}
}
}
break;
case MIMI_THE_CAT:
if ((st.getInt("Basilla") == 2) && isPet && ((npc.getCurrentHp() + damage) >= npc.getMaxHp()))
{
st.set("Basilla", "3");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_PROGRESS_4, -1);
giveItems(player, CRYSTAL_OF_INPROGRESS_4, 1);
npc.broadcastSay(ChatType.GENERAL, "Whish! Fight!");
_duelsInProgress.put(npcId, new ProgressDuelMob(player, player.getSummon()));
}
else if ((st.getInt("Basilla") == 3) && _duelsInProgress.containsKey(npcId))
{
final ProgressDuelMob duel = _duelsInProgress.get(npcId);
if (!isPet || (player.getSummon() != duel.getPet()))
{
final Player foulPlayer = duel.getAttacker();
if (foulPlayer != null)
{
st = foulPlayer.getQuestState(getName());
if (st != null)
{
st.set("Basilla", "5");
takeItems(player, CRYSTAL_OF_PROGRESS_4, -1);
takeItems(player, CRYSTAL_OF_INPROGRESS_4, -1);
giveItems(player, CRYSTAL_OF_FOUL_4, 1);
st.getPlayer().addNotifyQuestOfDeath(st);
npc.broadcastSay(ChatType.GENERAL, "Rule violation!");
npc.doDie(npc);
}
}
}
}
break;
case UNICORN_PHANTASM:
if ((st.getInt("Celestiel") == 2) && isPet && ((npc.getCurrentHp() + damage) >= npc.getMaxHp()))
{
st.set("Celestiel", "3");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_PROGRESS_5, -1);
giveItems(player, CRYSTAL_OF_INPROGRESS_5, 1);
npc.broadcastSay(ChatType.GENERAL, "START DUEL");
_duelsInProgress.put(npcId, new ProgressDuelMob(player, player.getSummon()));
}
else if ((st.getInt("Celestiel") == 3) && _duelsInProgress.containsKey(npcId))
{
final ProgressDuelMob duel = _duelsInProgress.get(npcId);
if (!isPet || (player.getSummon() != duel.getPet()))
{
final Player foulPlayer = duel.getAttacker();
if (foulPlayer != null)
{
st = foulPlayer.getQuestState(getName());
if (st != null)
{
st.set("Celestiel", "5");
takeItems(player, CRYSTAL_OF_PROGRESS_5, -1);
takeItems(player, CRYSTAL_OF_INPROGRESS_5, -1);
giveItems(player, CRYSTAL_OF_FOUL_5, 1);
st.getPlayer().addNotifyQuestOfDeath(st);
npc.broadcastSay(ChatType.GENERAL, "RULE VIOLATION");
npc.doDie(npc);
}
}
}
}
break;
case SILHOUETTE_TILFO:
if ((st.getInt("Brynthea") == 2) && isPet && ((npc.getCurrentHp() + damage) >= npc.getMaxHp()))
{
st.set("Brynthea", "3");
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
takeItems(player, CRYSTAL_OF_PROGRESS_6, -1);
giveItems(player, CRYSTAL_OF_INPROGRESS_6, 1);
npc.broadcastSay(ChatType.GENERAL, "I'll walk all over you!");
_duelsInProgress.put(npcId, new ProgressDuelMob(player, player.getSummon()));
}
else if ((st.getInt("Brynthea") == 3) && _duelsInProgress.containsKey(npcId))
{
final ProgressDuelMob duel = _duelsInProgress.get(npcId);
if (!isPet || (player.getSummon() != duel.getPet()))
{
final Player foulPlayer = duel.getAttacker();
if (foulPlayer != null)
{
st = foulPlayer.getQuestState(getName());
if (st != null)
{
st.set("Brynthea", "5");
takeItems(player, CRYSTAL_OF_PROGRESS_6, -1);
takeItems(player, CRYSTAL_OF_INPROGRESS_6, -1);
giveItems(player, CRYSTAL_OF_FOUL_6, 1);
st.getPlayer().addNotifyQuestOfDeath(st);
npc.broadcastSay(ChatType.GENERAL, "Rule violation!!!");
npc.doDie(npc);
}
}
}
}
break;
}
}
private class ProgressDuelMob
{
private final Player _attacker;
private final Summon _pet;
public ProgressDuelMob(Player attacker, Summon pet)
{
_attacker = attacker;
_pet = pet;
}
public Player getAttacker()
{
return _attacker;
}
public Summon getPet()
{
return _pet;
}
}
}