summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-10-15 17:06:04 -0300
committerJesusaves <cpntb1@ymail.com>2020-10-15 17:06:04 -0300
commit1d04fb2a33c1d481198a9ca9d52a5078bc27f57f (patch)
tree7099416a879aacb062685dc54112b1e830ec89cb
parent735a8f1a2049659ba66fddac4c32b70f24f30830 (diff)
downloadserverdata-livio/galimatia.tar.gz
serverdata-livio/galimatia.tar.bz2
serverdata-livio/galimatia.tar.xz
serverdata-livio/galimatia.zip
Minor Cleanup. Disable quest except on test server (not yet finished)livio/galimatia
-rw-r--r--npc/008-1-1/galimatia.txt147
1 files changed, 70 insertions, 77 deletions
diff --git a/npc/008-1-1/galimatia.txt b/npc/008-1-1/galimatia.txt
index 5e4e457d..6197d3bf 100644
--- a/npc/008-1-1/galimatia.txt
+++ b/npc/008-1-1/galimatia.txt
@@ -3,6 +3,7 @@
// Micksha
// The other player I've forgot the name
// Livio
+// Jesusalva
// Description:
// Galimatia the beekeeper.
// THIS IS A PLACEHOLDER!
@@ -11,21 +12,14 @@
function script usePurificationPotion {
// Check quest status, if not in a quest provide default item behaviour
- if (getq(ArgaesQuest_Galimatia) == 1){
+ if (getq(ArgaesQuest_Galimatia) == 1) {
// Do as requested by quest
- getmapxy(.@m$, .@x, .@y, 0);
- // FIXME Fix drop points after release. <Micksha> just in case, it is a square 95,45 -> 99,48
- if (
- .@m$ == "008-1-1" &&
- .@x == 113 &&
- .@y == 62
- ){
+ if (isin("008-1-1", 95, 45, 99, 48)) {
setq(ArgaesQuest_Galimatia, 2);
- message strcharinfo(0), "Done. Maybe it's time to ask Galimatia what to do now.";
+ message strcharinfo(0), l("Done. Maybe it's time to ask Galimatia what to do now.");
delitem PurificationPotion, 1;
} else {
- message strcharinfo(0), "Hmm... I'm sure that is not the right place to put it.";
- getitem PurificationPotion, 1;
+ message strcharinfo(0), l("Hmm... I'm sure that is not the right place to put it.");
return true;
}
} else return false;
@@ -33,21 +27,14 @@ function script usePurificationPotion {
function script useFertilityPotion {
// Check quest status, if not in a quest provide default item behaviour
- if (getq(ArgaesQuest_Galimatia) == 3){
+ if (getq(ArgaesQuest_Galimatia) == 3) {
// Do as requested by quest
- getmapxy(.@m$, .@x, .@y, 0);
- // FIXME Fix drop points after release. <Micksha> just in case, it is a square 95,45 -> 99,48
- if (
- .@m$ == "008-1-1" &&
- .@x == 113 &&
- .@y == 62
- ){
+ if (isin("008-1-1", 95, 45, 99, 48)) {
setq(ArgaesQuest_Galimatia, 4);
- message strcharinfo(0), "All right! I've poured even this one..";
+ message strcharinfo(0), l("All right! I've poured even this one..");
delitem FertilityPotion, 1;
} else {
- message strcharinfo(0), "Hmm... This one is supposed to be poured where the other one were.";
- getitem FertilityPotion, 1;
+ message strcharinfo(0), l("Hmm... This one is supposed to be poured where the other one were.");
return true;
}
} else return false;
@@ -55,21 +42,27 @@ function script useFertilityPotion {
// ------------------------------------
008-1-1,113,59,0 script Galimatia NPC_GALIMATIA,{
-
-//QuestDebug1034(); // Comment during production phase and put into proper sections. In case of fire call gumi.
-
-function advanceQuest;
-function printIngredients;
-
-function QuestPart0;
-function QuestPart1;
-function QuestPart2;
-function QuestPart3;
-function QuestPart4;
-function QuestPart5;
-function QuestPart6;
-
- switch(getq(ArgaesQuest_Galimatia)){
+ function advanceQuest;
+ function printIngredients;
+
+ function QuestPart0;
+ function QuestPart1;
+ function QuestPart2;
+ function QuestPart3;
+ function QuestPart4;
+ function QuestPart5;
+ function QuestPart6;
+
+ // TODO FIXME remove this once ready
+ if (!debug) {
+ speech
+ l("Hello."),
+ l("If only someone could help me to make my flowers bloom again."),
+ l("I just dont know what to do. Perhaps all gets better when I stay here, whining and waiting. Please, leave me alone.");
+ close;
+ }
+
+ switch(getq(ArgaesQuest_Galimatia)) {
case 0: QuestPart0(); break;
case 1: QuestPart1(); break;
case 2: QuestPart2(); break;
@@ -78,7 +71,7 @@ function QuestPart6;
case 5: QuestPart5(); break;
case 6: QuestPart6(); break;
default:
- mesq l("[Invalid quest status: check script]");
+ mesq l("[Invalid quest status: %d, check script]", getq(ArgaesQuest_Galimatia));
}
close;
@@ -90,8 +83,8 @@ function QuestPart6;
@returns nothing
*/
function printIngredients {
- for (.@i = 0; .@i < getarraysize(getarg(0)); .@i++){
- mesq l(" - %d %s", getelementofarray(getarg(1), .@i), getitemlink(getelementofarray(getarg(0), .@i)));
+ for (.@i = 0; .@i < getarraysize(getarg(0)); .@i++) {
+ mesf(" - %d %s", getelementofarray(getarg(1), .@i), getitemlink(getelementofarray(getarg(0), .@i)));
}
return;
}
@@ -103,9 +96,9 @@ function printIngredients {
@returns false if player doesn't have required items
*/
function checkForItems {
- for (.@i = 0; .@i < getarraysize(getarg(0)); .@i++){
+ for (.@i = 0; .@i < getarraysize(getarg(0)); .@i++) {
// If even a single thing is missing abort immediately
- if(getelementofarray(getarg(1), .@i) > countitem(getelementofarray(getarg(0), .@i))){
+ if(getelementofarray(getarg(1), .@i) > countitem(getelementofarray(getarg(0), .@i))) {
return false;
}
}
@@ -132,7 +125,7 @@ function craftFromPlayer {
else getitem(getarg(2), getarg(3));
// Delete Items from player inventory
- for (.@i = getarrayindex(getarg(0)); .@i < getarraysize(getarg(0)); .@i++){
+ for (.@i = getarrayindex(getarg(0)); .@i < getarraysize(getarg(0)); .@i++) {
delitem(getelementofarray(getarg(0), .@i), getelementofarray(getarg(1), .@i));
}
@@ -158,7 +151,7 @@ function NPCcrafting {
mesq l("Come on, move!");
close();
} else {
- switch(craftFromPlayer(getarg(0), getarg(1), getarg(2), getarg(3))){
+ switch(craftFromPlayer(getarg(0), getarg(1), getarg(2), getarg(3))) {
case 0:
mesq getarg(5);
return true;
@@ -196,7 +189,7 @@ function NPCdemandsIngredients {
l("Nope. You don't have enough ingredients for that."),
l("I can't give you nothing if you don't leave some room for it!")
)
- ){
+ ) {
advanceQuest();
mesq l("You must now pour it over the land again in the same spot.");
}
@@ -229,7 +222,7 @@ function QuestPart0 {
l("I don't have time to spend on flowers.")
);
- switch(@menu){
+ switch(@menu) {
case 1:
mesq l("All right! I need you to get:");
printIngredients(.REQ0_INGREDIENTS, .REQ0_INGREDIENTS_AMOUNT);
@@ -242,7 +235,7 @@ function QuestPart0 {
l("Nope. You don't have enough ingredients for that."),
l("I can't give you nothing if you don't leave some room for it!")
)
- ){
+ ) {
advanceQuest();
mesq l("You must now pour it over the land.");
}
@@ -267,7 +260,7 @@ function QuestPart0 {
She made a Purification Potion out of ingredients to heal the land and gives it to the player and says it must be poured over the land (marked in some way. Like in the Orum and Waric follow-up quest).
*/
function QuestPart1 {
- if(checkForItems(.REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT)){
+ if(checkForItems(.REQ0_OUTPUT, .REQ0_OUTPUT_AMOUNT)) {
speech
l("What's up? You want me to show how to open a bottle and pour its content on the ground?");
} else {
@@ -285,7 +278,7 @@ function QuestPart1 {
l("No! Have you already forgot what I need for it?"),
l("You don't even have the space in your inventory to carry it!!! Oh, man you are a disaster...")
)
- ){
+ ) {
// FIXME Put some messages about making again the potion so the NPC can look different and react like it was somewhat disturbed by player failure
mesq l("Remember: you must pour it over the land.");
}
@@ -312,7 +305,7 @@ function QuestPart2 {
l("No! You haven't!"),
l("I can't give you nothing if you don't leave some room for it!")
)
- ){
+ ) {
advanceQuest();
mesq l("You must now pour it over the land again in the same spot.");
}
@@ -322,7 +315,7 @@ function QuestPart2 {
function QuestPart3 {
- if(checkForItems(.REQ1_OUTPUT, .REQ1_OUTPUT_AMOUNT)){
+ if(checkForItems(.REQ1_OUTPUT, .REQ1_OUTPUT_AMOUNT)) {
speech
l("Come on pal, what's the matter?");
} else {
@@ -340,7 +333,7 @@ function QuestPart3 {
l("No! Have you already forgot what I need for it?"),
l("I can't give you nothing if you don't leave some room for it!")
)
- ){
+ ) {
// FIXME Put some messages about making again the potion so the NPC can look different and react like it was somewhat disturbed by player failure
mesq l("Remember: you must now pour it over the land.");
}
@@ -360,7 +353,7 @@ function QuestPart4 {
speech
l("Now I need %d %s.", .REQ2_INGREDIENTS_AMOUNT, getitemlink(.REQ2_INGREDIENTS));
// We take player items without asking
- if(checkForItems(.REQ2_INGREDIENTS, .REQ2_INGREDIENTS_AMOUNT)){
+ if(checkForItems(.REQ2_INGREDIENTS, .REQ2_INGREDIENTS_AMOUNT)) {
speech
l("Nice, gimme that!");
advanceQuest();
@@ -387,10 +380,10 @@ function QuestPart5 {
l("What do you want?"),
l("A %s or a %s?", getitemlink(.QUESTPRIZES[0]) , getitemlink(.QUESTPRIZES[1]));
select(
- l("I want the %s!", getitemname(.QUESTPRIZES[0])),
- l("A %s?!? Cool!!!", getitemname(.QUESTPRIZES[1]))
+ l("I want the %s!", getitemname(.QUESTPRIZES[0])),
+ l("A %s?!? Cool!!!", getitemname(.QUESTPRIZES[1]))
);
- if (!checkweight(.QUESTPRIZES[@menu-1], .QUESTPRIZES_AMOUNT[@menu-1])){
+ if (!checkweight(.QUESTPRIZES[@menu-1], .QUESTPRIZES_AMOUNT[@menu-1])) {
mesq l("I can't give you a prize if you are overburdened. Make room in your inventory!");
}
else{
@@ -416,7 +409,7 @@ function QuestPart6 {
mesq l("As you wish.");
close();
} else {
- if(Zeny>=.REQ3_COST){
+ if(Zeny>=.REQ3_COST) {
if(NPCcrafting(
.REQ3_INGREDIENTS, .REQ3_INGREDIENTS_AMOUNT,
.REQ3_OUTPUT, .REQ3_OUTPUT_AMOUNT,
@@ -435,28 +428,28 @@ function QuestPart6 {
OnInit:
// NPC ITEM REQUESTS
- setarray(.REQ0_INGREDIENTS , BottleOfWater , PinkPetal );
- setarray(.REQ0_INGREDIENTS_AMOUNT , 1 , 5 );
- .REQ0_OUTPUT = PurificationPotion;
- .REQ0_OUTPUT_AMOUNT = 1 ;
+ setarray(.REQ0_INGREDIENTS , BottleOfWater , PinkPetal );
+ setarray(.REQ0_INGREDIENTS_AMOUNT , 1 , 5 );
+ .REQ0_OUTPUT = PurificationPotion;
+ .REQ0_OUTPUT_AMOUNT = 1 ;
// FIXME ingredients are wrong (because I'm tired of use /createitems everytime)
- setarray(.REQ1_INGREDIENTS , BottleOfWater , PinkPetal );
- setarray(.REQ1_INGREDIENTS_AMOUNT , 1 , 5 );
- .REQ1_OUTPUT = FertilityPotion;
- .REQ1_OUTPUT_AMOUNT = 1 ;
-
- setarray(.REQ2_INGREDIENTS , BottleOfWater );
- setarray(.REQ2_INGREDIENTS_AMOUNT , 1 );
-
- setarray(.QUESTPRIZES , TrainingWand , RubberBat );
- setarray(.QUESTPRIZES_AMOUNT , 1 , 1 );
-
- setarray(.REQ3_INGREDIENTS , BottleOfWater );
- setarray(.REQ3_INGREDIENTS_AMOUNT , 1 );
- .REQ3_COST = 1000;
- .REQ3_OUTPUT = Dagger;
- .REQ3_OUTPUT_AMOUNT = 1 ;
+ setarray(.REQ1_INGREDIENTS , BottleOfWater, MaggotSlime, MauveHerb);
+ setarray(.REQ1_INGREDIENTS_AMOUNT , 1 , 10 , 5);
+ .REQ1_OUTPUT = FertilityPotion;
+ .REQ1_OUTPUT_AMOUNT = 1;
+
+ setarray(.REQ2_INGREDIENTS , FlowerSeeds);
+ setarray(.REQ2_INGREDIENTS_AMOUNT , 5);
+
+ setarray(.QUESTPRIZES , TrainingWand , RubberBat );
+ setarray(.QUESTPRIZES_AMOUNT , 1 , 1 );
+
+ setarray(.REQ3_INGREDIENTS , ABlueRose);
+ setarray(.REQ3_INGREDIENTS_AMOUNT , 10 );
+ .REQ3_COST = 1000;
+ .REQ3_OUTPUT = RoseHat;
+ .REQ3_OUTPUT_AMOUNT = 1;
.bodytype = BODYTYPE_2;
.distance = 4;