Преглед изворни кода

Added new achievements (#4368)

* Added new achievements
* Reordered some older achievements by ID.
* Fixed memory management on duplicate achievements.
Thanks to @Lemongrass3110!
Aleos пре 5 година
родитељ
комит
bbca9efd57
3 измењених фајлова са 446 додато и 392 уклоњено
  1. 216 196
      db/pre-re/achievement_db.yml
  2. 216 196
      db/re/achievement_db.yml
  3. 14 0
      src/map/achievement.cpp

+ 216 - 196
db/pre-re/achievement_db.yml

@@ -1726,6 +1726,12 @@ Body:
     Reward:
       ItemID: 617
     Score: 50
+  - ID: 129021
+    Group: "AG_BATTLE"
+    Name: "Glastheim Challenge Mode" # Complete 100 times?
+    Reward:
+      TitleID: 1045
+    Score: 10
   - ID: 130000 # Talk to Prince NPC (npc/quests/quests_morocc.txt L5288)
     Group: "AG_CHATTING"
     Name: "Socialite debut"
@@ -1983,6 +1989,216 @@ Body:
     #Reward:
     #  ItemID: 23585
     Score: 10
+  - ID: 200033
+    Group: "AG_GOAL_LEVEL"
+    Name: "With a new mind!(1)"
+    Condition: " BaseLevel == 170 && (Class >= JOB_RUNE_KNIGHT && Class <= JOB_GUILLOTINE_CROSS_T) "
+    #Reward:
+    #  ItemID: 6959
+    Score: 50
+  - ID: 200034
+    Group: "AG_GOAL_LEVEL"
+    Name: "With a new mind!(2)"
+    Condition: " BaseLevel == 170 && (Class >= JOB_ROYAL_GUARD && Class <= JOB_SHADOW_CHASER_T) "
+    #Reward:
+    #  ItemID: 6959
+    Score: 50
+  - ID: 220000
+    Group: "AG_CHATTING_CREATE"
+    Name: "Community begin"
+    Score: 10
+  - ID: 220001
+    Group: "AG_CHATTING_DYING"
+    Name: "A mouth only moment"
+    Score: 10
+  - ID: 220002
+    Group: "AG_CHATTING_COUNT"
+    Name: "Admiring the chatter"
+    Condition: " ARG0 == 20 "
+    Score: 10
+  - ID: 220003
+    Group: "AG_ADD_FRIEND"
+    Name: "My friend's friend~"
+    Condition: " ARG0 >= 1 "
+    Score: 10
+  - ID: 220004
+    Group: "AG_ADD_FRIEND"
+    Name: "A competition of popularity"
+    Condition: " ARG0 >= 10 "
+    Score: 10
+  - ID: 220005
+    Group: "AG_PARTY"
+    Name: "Let's Party~"
+    Score: 10
+  - ID: 220006
+    Group: "AG_MARRY"
+    Name: "Married with who..?"
+    Reward:
+      TitleID: 1022
+    Score: 20
+  - ID: 220007
+    Group: "AG_BABY"
+    Name: "Can you grow?"
+    Condition: " ARG0 == 1 "
+    Reward:
+      TitleID: 1032
+    Score: 20
+  - ID: 220008
+    Group: "AG_BABY"
+    Name: "Being a parent"
+    Condition: " ARG0 == 2 "
+    Reward:
+      TitleID: 1033
+    Score: 20
+  - ID: 220009
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (1)"
+    Condition: " ARG0 >= 10000 "
+    Target:
+      - Id: 0
+        Count: 10000
+    Score: 10
+  - ID: 220010
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (2)"
+    Condition: " ARG0 >= 100000 "
+    Target:
+      - Id: 0
+        Count: 100000
+    Score: 15
+  - ID: 220011
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (3)"
+    Condition: " ARG0 >= 500000 "
+    Target:
+      - Id: 0
+        Count: 500000
+    Score: 20
+  - ID: 220012
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (4)"
+    Condition: " ARG0 >= 1000000 "
+    Target:
+      - Id: 0
+        Count: 1000000
+    Score: 30
+  - ID: 220013
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (5)"
+    Condition: " ARG0 >= 5000000 "
+    Target:
+      - Id: 0
+        Count: 5000000
+    Score: 50
+  - ID: 220014
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (1)"
+    Condition: " ARG0 == 1 && ARG1 >= 7 "
+    Score: 10
+  - ID: 220015
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (2)"
+    Condition: " ARG0 == 1 && ARG1 >= 12 "
+    Score: 15
+  - ID: 220016
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (3)"
+    Condition: " ARG0 == 2 && ARG1 >= 7 "
+    Score: 10
+  - ID: 220017
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (4)"
+    Condition: " ARG0 == 2 && ARG1 >= 12 "
+    Score: 15
+  - ID: 220018
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (5)"
+    Condition: " ARG0 == 3 && ARG1 >= 7 "
+    Score: 15
+  - ID: 220019
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (6)"
+    Condition: " ARG0 == 3 && ARG1 >= 12 "
+    Score: 20
+  - ID: 220020
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (7)"
+    Condition: " ARG0 == 4 && ARG1 >= 7 "
+    Score: 20
+  - ID: 220021
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (8)"
+    Condition: " ARG0 == 4 && ARG1 >= 12 "
+    Score: 30
+  - ID: 220022
+    Group: "AG_ENCHANT_FAIL"
+    Name: "Human's greed has no ending.."
+    Score: 10
+  - ID: 220023
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (1)"
+    Condition: " ARG0 >= 100 "
+    Score: 10
+  - ID: 220024
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (2)"
+    Condition: " ARG0 >= 1000 "
+    Score: 10
+  - ID: 220025
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (3)"
+    Condition: " ARG0 >= 5000 "
+    Score: 15
+  - ID: 220026
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (4)"
+    Condition: " ARG0 >= 10000 "
+    Score: 15
+  - ID: 220027
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (5)"
+    Condition: " ARG0 >= 50000 "
+    Score: 20
+  - ID: 220028
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (6)"
+    Condition: " ARG0 >= 100000 "
+    Score: 20
+  - ID: 220029
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (7)"
+    Condition: " ARG0 >= 150000 "
+    Score: 30
+  - ID: 220030
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (1)"
+    Condition: " ARG0 >= 10000 "
+    Score: 10
+  - ID: 220031
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (2)"
+    Condition: " ARG0 >= 100000 "
+    Score: 15
+  - ID: 220032
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (3)"
+    Condition: " ARG0 >= 1000000 "
+    Score: 20
+  - ID: 220033
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (4)"
+    Condition: " ARG0 >= 10000000 "
+    Score: 25
+  - ID: 220034
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (5)"
+    Condition: " ARG0 >= 100000000 "
+    Score: 30
+  - ID: 220035
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (6)"
+    Condition: " ARG0 >= 1000000000 "
+    Score: 40
   - ID: 230100
     Group: "AG_TAMING"
     Name: "Poring is Love"
@@ -2240,202 +2456,6 @@ Body:
         MobID: 1505
         Count: 1
     Score: 10
-  - ID: 220000
-    Group: "AG_CHATTING_CREATE"
-    Name: "Community begin"
-    Score: 10
-  - ID: 220001
-    Group: "AG_CHATTING_DYING"
-    Name: "A mouth only moment"
-    Score: 10
-  - ID: 220002
-    Group: "AG_CHATTING_COUNT"
-    Name: "Admiring the chatter"
-    Condition: " ARG0 == 20 "
-    Score: 10
-  - ID: 220003
-    Group: "AG_ADD_FRIEND"
-    Name: "My friend's friend~"
-    Condition: " ARG0 >= 1 "
-    Score: 10
-  - ID: 220004
-    Group: "AG_ADD_FRIEND"
-    Name: "A competition of popularity"
-    Condition: " ARG0 >= 10 "
-    Score: 10
-  - ID: 220005
-    Group: "AG_PARTY"
-    Name: "Let's Party~"
-    Score: 10
-  - ID: 220006
-    Group: "AG_MARRY"
-    Name: "Married with who..?"
-    Reward:
-      TitleID: 1022
-    Score: 20
-  - ID: 220007
-    Group: "AG_BABY"
-    Name: "Can you grow?"
-    Condition: " ARG0 == 1 "
-    Reward:
-      TitleID: 1032
-    Score: 20
-  - ID: 220008
-    Group: "AG_BABY"
-    Name: "Being a parent"
-    Condition: " ARG0 == 2 "
-    Reward:
-      TitleID: 1033
-    Score: 20
-  - ID: 220009
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (1)"
-    Condition: " ARG0 >= 10000 "
-    Target:
-      - Id: 0
-        Count: 10000
-    Score: 10
-  - ID: 220010
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (2)"
-    Condition: " ARG0 >= 100000 "
-    Target:
-      - Id: 0
-        Count: 100000
-    Score: 15
-  - ID: 220011
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (3)"
-    Condition: " ARG0 >= 500000 "
-    Target:
-      - Id: 0
-        Count: 500000
-    Score: 20
-  - ID: 220012
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (4)"
-    Condition: " ARG0 >= 1000000 "
-    Target:
-      - Id: 0
-        Count: 1000000
-    Score: 30
-  - ID: 220013
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (5)"
-    Condition: " ARG0 >= 5000000 "
-    Target:
-      - Id: 0
-        Count: 5000000
-    Score: 50
-  - ID: 220014
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (1)"
-    Condition: " ARG0 == 1 && ARG1 >= 7 "
-    Score: 10
-  - ID: 220015
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (2)"
-    Condition: " ARG0 == 1 && ARG1 >= 12 "
-    Score: 15
-  - ID: 220016
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (3)"
-    Condition: " ARG0 == 2 && ARG1 >= 7 "
-    Score: 10
-  - ID: 220017
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (4)"
-    Condition: " ARG0 == 2 && ARG1 >= 12 "
-    Score: 15
-  - ID: 220018
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (5)"
-    Condition: " ARG0 == 3 && ARG1 >= 7 "
-    Score: 15
-  - ID: 220019
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (6)"
-    Condition: " ARG0 == 3 && ARG1 >= 12 "
-    Score: 20
-  - ID: 220020
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (7)"
-    Condition: " ARG0 == 4 && ARG1 >= 7 "
-    Score: 20
-  - ID: 220021
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (8)"
-    Condition: " ARG0 == 4 && ARG1 >= 12 "
-    Score: 30
-  - ID: 220022
-    Group: "AG_ENCHANT_FAIL"
-    Name: "Human's greed has no ending.."
-    Score: 10
-  - ID: 220023
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (1)"
-    Condition: " ARG0 >= 100 "
-    Score: 10
-  - ID: 220024
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (2)"
-    Condition: " ARG0 >= 1000 "
-    Score: 10
-  - ID: 220025
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (3)"
-    Condition: " ARG0 >= 5000 "
-    Score: 15
-  - ID: 220026
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (4)"
-    Condition: " ARG0 >= 10000 "
-    Score: 15
-  - ID: 220027
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (5)"
-    Condition: " ARG0 >= 50000 "
-    Score: 20
-  - ID: 220028
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (6)"
-    Condition: " ARG0 >= 100000 "
-    Score: 20
-  - ID: 220029
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (7)"
-    Condition: " ARG0 >= 150000 "
-    Score: 30
-  - ID: 220030
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (1)"
-    Condition: " ARG0 >= 10000 "
-    Score: 10
-  - ID: 220031
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (2)"
-    Condition: " ARG0 >= 100000 "
-    Score: 15
-  - ID: 220032
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (3)"
-    Condition: " ARG0 >= 1000000 "
-    Score: 20
-  - ID: 220033
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (4)"
-    Condition: " ARG0 >= 10000000 "
-    Score: 25
-  - ID: 220034
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (5)"
-    Condition: " ARG0 >= 100000000 "
-    Score: 30
-  - ID: 220035
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (6)"
-    Condition: " ARG0 >= 1000000000 "
-    Score: 40
   - ID: 230200
     Group: "AG_BATTLE"
     Name: "Poring seeker"

+ 216 - 196
db/re/achievement_db.yml

@@ -1726,6 +1726,12 @@ Body:
     Reward:
       ItemID: 617
     Score: 50
+  - ID: 129021
+    Group: "AG_BATTLE"
+    Name: "Glastheim Challenge Mode" # Complete 100 times?
+    Reward:
+      TitleID: 1045
+    Score: 10
   - ID: 130000 # Talk to Prince NPC (npc/quests/quests_morocc.txt L5288)
     Group: "AG_CHATTING"
     Name: "Socialite debut"
@@ -1983,6 +1989,216 @@ Body:
     #Reward:
     #  ItemID: 23585
     Score: 10
+  - ID: 200033
+    Group: "AG_GOAL_LEVEL"
+    Name: "With a new mind!(1)"
+    Condition: " BaseLevel == 170 && (Class >= JOB_RUNE_KNIGHT && Class <= JOB_GUILLOTINE_CROSS_T) "
+    #Reward:
+    #  ItemID: 6959
+    Score: 50
+  - ID: 200034
+    Group: "AG_GOAL_LEVEL"
+    Name: "With a new mind!(2)"
+    Condition: " BaseLevel == 170 && (Class >= JOB_ROYAL_GUARD && Class <= JOB_SHADOW_CHASER_T) "
+    #Reward:
+    #  ItemID: 6959
+    Score: 50
+  - ID: 220000
+    Group: "AG_CHATTING_CREATE"
+    Name: "Community begin"
+    Score: 10
+  - ID: 220001
+    Group: "AG_CHATTING_DYING"
+    Name: "A mouth only moment"
+    Score: 10
+  - ID: 220002
+    Group: "AG_CHATTING_COUNT"
+    Name: "Admiring the chatter"
+    Condition: " ARG0 == 20 "
+    Score: 10
+  - ID: 220003
+    Group: "AG_ADD_FRIEND"
+    Name: "My friend's friend~"
+    Condition: " ARG0 >= 1 "
+    Score: 10
+  - ID: 220004
+    Group: "AG_ADD_FRIEND"
+    Name: "A competition of popularity"
+    Condition: " ARG0 >= 10 "
+    Score: 10
+  - ID: 220005
+    Group: "AG_PARTY"
+    Name: "Let's Party~"
+    Score: 10
+  - ID: 220006
+    Group: "AG_MARRY"
+    Name: "Married with who..?"
+    Reward:
+      TitleID: 1022
+    Score: 20
+  - ID: 220007
+    Group: "AG_BABY"
+    Name: "Can you grow?"
+    Condition: " ARG0 == 1 "
+    Reward:
+      TitleID: 1032
+    Score: 20
+  - ID: 220008
+    Group: "AG_BABY"
+    Name: "Being a parent"
+    Condition: " ARG0 == 2 "
+    Reward:
+      TitleID: 1033
+    Score: 20
+  - ID: 220009
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (1)"
+    Condition: " ARG0 >= 10000 "
+    Target:
+      - Id: 0
+        Count: 10000
+    Score: 10
+  - ID: 220010
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (2)"
+    Condition: " ARG0 >= 100000 "
+    Target:
+      - Id: 0
+        Count: 100000
+    Score: 15
+  - ID: 220011
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (3)"
+    Condition: " ARG0 >= 500000 "
+    Target:
+      - Id: 0
+        Count: 500000
+    Score: 20
+  - ID: 220012
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (4)"
+    Condition: " ARG0 >= 1000000 "
+    Target:
+      - Id: 0
+        Count: 1000000
+    Score: 30
+  - ID: 220013
+    Group: "AG_SPEND_ZENY"
+    Name: "Activating the market economy (5)"
+    Condition: " ARG0 >= 5000000 "
+    Target:
+      - Id: 0
+        Count: 5000000
+    Score: 50
+  - ID: 220014
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (1)"
+    Condition: " ARG0 == 1 && ARG1 >= 7 "
+    Score: 10
+  - ID: 220015
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (2)"
+    Condition: " ARG0 == 1 && ARG1 >= 12 "
+    Score: 15
+  - ID: 220016
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (3)"
+    Condition: " ARG0 == 2 && ARG1 >= 7 "
+    Score: 10
+  - ID: 220017
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (4)"
+    Condition: " ARG0 == 2 && ARG1 >= 12 "
+    Score: 15
+  - ID: 220018
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (5)"
+    Condition: " ARG0 == 3 && ARG1 >= 7 "
+    Score: 15
+  - ID: 220019
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (6)"
+    Condition: " ARG0 == 3 && ARG1 >= 12 "
+    Score: 20
+  - ID: 220020
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (7)"
+    Condition: " ARG0 == 4 && ARG1 >= 7 "
+    Score: 20
+  - ID: 220021
+    Group: "AG_ENCHANT_SUCCESS"
+    Name: "I can't quit from refining! (8)"
+    Condition: " ARG0 == 4 && ARG1 >= 12 "
+    Score: 30
+  - ID: 220022
+    Group: "AG_ENCHANT_FAIL"
+    Name: "Human's greed has no ending.."
+    Score: 10
+  - ID: 220023
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (1)"
+    Condition: " ARG0 >= 100 "
+    Score: 10
+  - ID: 220024
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (2)"
+    Condition: " ARG0 >= 1000 "
+    Score: 10
+  - ID: 220025
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (3)"
+    Condition: " ARG0 >= 5000 "
+    Score: 15
+  - ID: 220026
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (4)"
+    Condition: " ARG0 >= 10000 "
+    Score: 15
+  - ID: 220027
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (5)"
+    Condition: " ARG0 >= 50000 "
+    Score: 20
+  - ID: 220028
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (6)"
+    Condition: " ARG0 >= 100000 "
+    Score: 20
+  - ID: 220029
+    Group: "AG_GET_ITEM"
+    Name: "I found it! (7)"
+    Condition: " ARG0 >= 150000 "
+    Score: 30
+  - ID: 220030
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (1)"
+    Condition: " ARG0 >= 10000 "
+    Score: 10
+  - ID: 220031
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (2)"
+    Condition: " ARG0 >= 100000 "
+    Score: 15
+  - ID: 220032
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (3)"
+    Condition: " ARG0 >= 1000000 "
+    Score: 20
+  - ID: 220033
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (4)"
+    Condition: " ARG0 >= 10000000 "
+    Score: 25
+  - ID: 220034
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (5)"
+    Condition: " ARG0 >= 100000000 "
+    Score: 30
+  - ID: 220035
+    Group: "AG_GET_ZENY"
+    Name: "Rich King (6)"
+    Condition: " ARG0 >= 1000000000 "
+    Score: 40
   - ID: 230100
     Group: "AG_TAMING"
     Name: "Poring is Love"
@@ -2240,202 +2456,6 @@ Body:
         MobID: 1505
         Count: 1
     Score: 10
-  - ID: 220000
-    Group: "AG_CHATTING_CREATE"
-    Name: "Community begin"
-    Score: 10
-  - ID: 220001
-    Group: "AG_CHATTING_DYING"
-    Name: "A mouth only moment"
-    Score: 10
-  - ID: 220002
-    Group: "AG_CHATTING_COUNT"
-    Name: "Admiring the chatter"
-    Condition: " ARG0 == 20 "
-    Score: 10
-  - ID: 220003
-    Group: "AG_ADD_FRIEND"
-    Name: "My friend's friend~"
-    Condition: " ARG0 >= 1 "
-    Score: 10
-  - ID: 220004
-    Group: "AG_ADD_FRIEND"
-    Name: "A competition of popularity"
-    Condition: " ARG0 >= 10 "
-    Score: 10
-  - ID: 220005
-    Group: "AG_PARTY"
-    Name: "Let's Party~"
-    Score: 10
-  - ID: 220006
-    Group: "AG_MARRY"
-    Name: "Married with who..?"
-    Reward:
-      TitleID: 1022
-    Score: 20
-  - ID: 220007
-    Group: "AG_BABY"
-    Name: "Can you grow?"
-    Condition: " ARG0 == 1 "
-    Reward:
-      TitleID: 1032
-    Score: 20
-  - ID: 220008
-    Group: "AG_BABY"
-    Name: "Being a parent"
-    Condition: " ARG0 == 2 "
-    Reward:
-      TitleID: 1033
-    Score: 20
-  - ID: 220009
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (1)"
-    Condition: " ARG0 >= 10000 "
-    Target:
-      - Id: 0
-        Count: 10000
-    Score: 10
-  - ID: 220010
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (2)"
-    Condition: " ARG0 >= 100000 "
-    Target:
-      - Id: 0
-        Count: 100000
-    Score: 15
-  - ID: 220011
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (3)"
-    Condition: " ARG0 >= 500000 "
-    Target:
-      - Id: 0
-        Count: 500000
-    Score: 20
-  - ID: 220012
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (4)"
-    Condition: " ARG0 >= 1000000 "
-    Target:
-      - Id: 0
-        Count: 1000000
-    Score: 30
-  - ID: 220013
-    Group: "AG_SPEND_ZENY"
-    Name: "Activating the market economy (5)"
-    Condition: " ARG0 >= 5000000 "
-    Target:
-      - Id: 0
-        Count: 5000000
-    Score: 50
-  - ID: 220014
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (1)"
-    Condition: " ARG0 == 1 && ARG1 >= 7 "
-    Score: 10
-  - ID: 220015
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (2)"
-    Condition: " ARG0 == 1 && ARG1 >= 12 "
-    Score: 15
-  - ID: 220016
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (3)"
-    Condition: " ARG0 == 2 && ARG1 >= 7 "
-    Score: 10
-  - ID: 220017
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (4)"
-    Condition: " ARG0 == 2 && ARG1 >= 12 "
-    Score: 15
-  - ID: 220018
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (5)"
-    Condition: " ARG0 == 3 && ARG1 >= 7 "
-    Score: 15
-  - ID: 220019
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (6)"
-    Condition: " ARG0 == 3 && ARG1 >= 12 "
-    Score: 20
-  - ID: 220020
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (7)"
-    Condition: " ARG0 == 4 && ARG1 >= 7 "
-    Score: 20
-  - ID: 220021
-    Group: "AG_ENCHANT_SUCCESS"
-    Name: "I can't quit from refining! (8)"
-    Condition: " ARG0 == 4 && ARG1 >= 12 "
-    Score: 30
-  - ID: 220022
-    Group: "AG_ENCHANT_FAIL"
-    Name: "Human's greed has no ending.."
-    Score: 10
-  - ID: 220023
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (1)"
-    Condition: " ARG0 >= 100 "
-    Score: 10
-  - ID: 220024
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (2)"
-    Condition: " ARG0 >= 1000 "
-    Score: 10
-  - ID: 220025
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (3)"
-    Condition: " ARG0 >= 5000 "
-    Score: 15
-  - ID: 220026
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (4)"
-    Condition: " ARG0 >= 10000 "
-    Score: 15
-  - ID: 220027
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (5)"
-    Condition: " ARG0 >= 50000 "
-    Score: 20
-  - ID: 220028
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (6)"
-    Condition: " ARG0 >= 100000 "
-    Score: 20
-  - ID: 220029
-    Group: "AG_GET_ITEM"
-    Name: "I found it! (7)"
-    Condition: " ARG0 >= 150000 "
-    Score: 30
-  - ID: 220030
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (1)"
-    Condition: " ARG0 >= 10000 "
-    Score: 10
-  - ID: 220031
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (2)"
-    Condition: " ARG0 >= 100000 "
-    Score: 15
-  - ID: 220032
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (3)"
-    Condition: " ARG0 >= 1000000 "
-    Score: 20
-  - ID: 220033
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (4)"
-    Condition: " ARG0 >= 10000000 "
-    Score: 25
-  - ID: 220034
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (5)"
-    Condition: " ARG0 >= 100000000 "
-    Score: 30
-  - ID: 220035
-    Group: "AG_GET_ZENY"
-    Name: "Rich King (6)"
-    Condition: " ARG0 >= 1000000000 "
-    Score: 40
   - ID: 230200
     Group: "AG_BATTLE"
     Name: "Poring seeker"

+ 14 - 0
src/map/achievement.cpp

@@ -187,7 +187,14 @@ uint64 AchievementDatabase::parseBodyNode(const YAML::Node &node){
 			condition = "achievement_condition( " + condition + " );";
 		}
 
+		if( achievement->condition ){
+			aFree( achievement->condition );
+			achievement->condition = nullptr;
+		}
+
 		achievement->condition = parse_script( condition.c_str(), this->getCurrentFile().c_str(), node["Condition"].Mark().line + 1, SCRIPT_IGNORE_EXTERNAL_BRACKETS );
+	}else{
+		achievement->condition = nullptr;
 	}
 
 	if( this->nodeExists( node, "Map" ) ){
@@ -270,7 +277,14 @@ uint64 AchievementDatabase::parseBodyNode(const YAML::Node &node){
 				return 0;
 			}
 
+			if( achievement->rewards.script ){
+				aFree( achievement->rewards.script );
+				achievement->rewards.script = nullptr;
+			}
+
 			achievement->rewards.script = parse_script( script.c_str(), this->getCurrentFile().c_str(), achievement_id, SCRIPT_IGNORE_EXTERNAL_BRACKETS );
+		}else{
+			achievement->rewards.script = nullptr;
 		}
 
 		// TODO: not camel case