Beginning Genkai 6

Post Reply
Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Beginning Genkai 6

Post by Alexandre24 » Sat Jul 11, 2015 3:28 am

Hello,
I largely scripted up to level 90 for the genkai with nomad moogle has Rulude Gardens.

However, it lacks in the list, the beginning of the EventID . The 10135 corresponds to the end, when he made ​​us past level 80 .
https://wiki.dspt.info/index.php/RuLude ... _Event_IDs

If someone can send me the beginning that I will finalize script and I share in the project. Thank you to all!

The beginning (see video) https://www.youtube.com/watch?v=Tm_wr-ak1wU at 1:05 min

I give my script for him who will like finished ans shared. Thank You.

-----------------------------------
-- Area: Ru'Lude Gardens
-- NPC: Nomad Moogle
-- Type: Adventurer's Assistant
-- @pos 10.012 1.453 121.883 243
-----------------------------------
package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/zones/RuLude_Gardens/TextIDs");

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
local meritCount = player:getMeritCount();

if (player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
-- Trade Kindred's Seal x5 / 3 Merit Points
if (trade:hasItemQty(1127,5) and meritCount >= 3 and trade:getItemCount() == 1) then
player:startEvent (10135); -- Finish Quest "New Worlds Await"
end
elseif (player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
-- Trade Kindred's Crest x5 / 4 Merit Points
if (trade:hasItemQty(2955,5) and meritCount >= 4 and trade:getItemCount() == 1) then
player:startEvent (10136); -- Finish Quest "Expanding Horizons"
end
elseif (player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
-- Trade Kindred's Crest x10 / 5 Merit Points
if (trade:hasItemQty(2955,10) and meritCount >= 5 and trade:getItemCount() == 1) then
player:startEvent (10137); -- Finish Quest "Beyond the Stars"
end
elseif (player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
-- Trade Kindred's Crest / 10 Merit Points / Bloody Robe or Crab Apron or Damselfly Worm or Dangruf Stone or Dhalmel Saliva or Faded Crystal or Magicked Skull or Orcish Armor Plate or Orcish Axe or Quadav Backscale or Siren's Tear or Valkurm Sunsand or Wild Rabbit Tail or Yagudo Caulk
if (trade:hasItemQty(2995,1) and meritCount >= 10 and trade:getItemCount() == 1) then
player:startEvent (10138); -- Finish Quest "Dormant Powers Dislodged)"
end
end
end;

-----------------------------------
-- onTrigger Action
-----------------------------------

function onTrigger(player,npc)
local LvL = player:getMainLvl();
local newWorldsAwait = player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT);
local expandingHorizons = player:getQuestStatus(JEUNO,EXPANDING_HORIZONS);
local beyondTheStars = player:getQuestStatus(JEUNO,BEYOND_THE_STARS);

if (player:hasKeyItem(LIMIT_BREAKER) == false and LvL >= 75) then
player:startEvent(10045,75,2,10,7,30,302895,4095);
else
if (newWorldsAwait == QUEST_AVAILABLE and player:hasKeyItem(LIMIT_BREAKER) == true and LvL >= 75 and player:levelCap() == 75 and MAX_LEVEL >= 80) then
-- player:startEvent(????); -- Start Quest "NEW WORLDS AWAIT"
elseif (newWorldsAwait == QUEST_ACCEPTED) then
-- player:startEvent(????);
elseif (expandingHorizons == QUEST_AVAILABLE and LvL >= 76 and player:levelCap() == 80 and MAX_LEVEL >= 85) then
-- player:startEvent (????); -- Start Quest "EXPANDING HORIZONS"
elseif (expandingHorizons == QUEST_ACCEPTED) then
-- player:startEvent(????);
elseif (beyondTheStars == QUEST_AVAILABLE and LvL >= 81 and player:levelCap() == 85 and MAX_LEVEL >= 90) then
-- player:startEvent(????); -- Start Quest "BEYOND THE STARS"
elseif (beyondTheStars == QUEST_ACCEPTED) then
-- player:startEvent(????);
else
player:startEvent(94);
end
end
end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);

if (csid == 10045 and option ~= -1) then
player:addKeyItem(LIMIT_BREAKER);
player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER);
elseif (csid == 10135 and option == 1) then -- Genkai 6
player:addQuest (JEUNO,NEW_WORLDS_AWAIT);
player:tradeComplete();
player:delitem(KINDREDS_SEAL);
player:setMerits(meritCount - 3)
player:levelCap(80);
player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_80);
player:completeQuest(JEUNO,NEW_WORLDS_AWAIT);
elseif (csid == 10136 and option == 1) then -- Genkai 7
player:addQuest (JEUNO,EXPANDING_HORIZONS);
player:tradeComplete();
player:delitem(KINDREDS_CREST);
player:setMerits(meritCount - 4)
player:levelCap(85);
player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_85);
player:completeQuest(JEUNO,EXPANDING_HORIZONS);
elseif (csid == 10137 and option == 1) then -- Genkai 8
player:addQuest (JEUNO,BEYOND_THE_STARS);
player:tradeComplete();
player:delitem(KINDREDS_CREST);
player:setMerits(meritCount - 5)
player:levelCap(90);
player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_90);
player:completeQuest(JEUNO,BEYOND_THE_STARS);
end
end;

Racsr
Posts: 10
Joined: Thu Dec 20, 2012 12:15 pm

Re: Beginning Genkai 6

Post by Racsr » Tue Jul 28, 2015 10:24 am

I remember working on this back in 2012; here's the link to that post.

The relevant diff from that patch:

Code: Select all

Index: scripts/zones/RuLude_Gardens/npcs/Nomad_Moogle.lua
===================================================================
--- scripts/zones/RuLude_Gardens/npcs/Nomad_Moogle.lua	(revision 2121)
+++ scripts/zones/RuLude_Gardens/npcs/Nomad_Moogle.lua	(working copy)
@@ -8,7 +8,8 @@
 -----------------------------------
 
 require("scripts/globals/settings");
-require("scripts/globals/keyitems");
+require("scripts/globals/keyitems");
+require("scripts/globals/quests");
 require("scripts/zones/RuLude_Gardens/TextIDs");
 
 -----------------------------------
@@ -16,18 +17,59 @@
 -----------------------------------
 
 function onTrade(player,npc,trade)
+
+	if(trade:hasItemQty(1127,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and player:getMerits() > 2) then
+		if(player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
+			player:startEvent(0x2798);
+		end
+	elseif(trade:hasItemQty(2955,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and player:getMerits() > 3) then
+		if(player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
+			--player:startEvent(0);
+		end
+	elseif(trade:hasItemQty(2955,10) == true and trade:getGil() == 0 and trade:getItemCount() == 10 and player:getMerits() > 4) then
+		if(player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
+			--player:startEvent(0);
+		end
+	elseif(trade:hasItemQty(2955,1) == true and trade:hasItemQty(503,1) == true and trade:getGil() == 0 and trade:getItemCount() == 2 and player:getMerits() > 9) then
+		if(player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
+			--player:startEvent(0);
+		end
+	end
+	
 end;
 
 -----------------------------------
 -- onTrigger Action
 -----------------------------------
 
-function onTrigger(player,npc)
+function onTrigger(player,npc)
 
 	if(player:hasKeyItem(LIMIT_BREAKER) == false and player:getMainLvl() >= 75) then
-		player:startEvent(0x2798);
+		player:startEvent(0x2797);
+	elseif(player:getMainLvl() == 75 and player:levelCap() == 75 and MAX_LEVEL >= 80 and player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_AVAILABLE) then
+		player:startEvent(0x273d,0,1,1,0);
+	elseif(player:getMainLvl() >= 76 and player:levelCap() == 80 and MAX_LEVEL >= 85 and player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_AVAILABLE) then
+		player:startEvent(0x273d,0,1,2,0);
+	elseif(player:getMainLvl() >= 81 and player:levelCap() == 85 and MAX_LEVEL >= 90 and player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_AVAILABLE) then
+		player:startEvent(0x273d,0,1,3,0);
+	elseif(player:getMainLvl() >= 91 and player:levelCap() == 90 and MAX_LEVEL >= 95 and player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_AVAILABLE) then
+		player:startEvent(0x273d,0,1,4,0);
+	elseif(player:getMainLvl() >= 91 and player:levelCap() == 95 and MAX_LEVEL >= 99 and player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_AVAILABLE) then
+		player:startEvent(0x273d,0,1,5,0);
+	elseif(player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
+		player:startEvent(0x273d,0,1,1,1);
+	elseif(player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
+		player:startEvent(0x273d,0,1,2,1);
+	elseif(player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
+		player:startEvent(0x273d,0,1,3,1);
+	elseif(player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
+		player:startEvent(0x273d,0,1,4,1);
+	elseif(player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_ACCEPTED) then
+		player:startEvent(0x273d,0,1,5,1); -- player:startEvent(0x273d,0,1,6,1);
+	elseif(player:hasKeyItem(LIMIT_BREAKER) == true and player:getMainLvl() >= 75) then
+		player:startEvent(0x273d,0,1,0,0);
 	else
-		player:startEvent(0x005E);
+		player:startEvent(0x273d,0,2,0,0);
 	end
 
 end;
@@ -46,12 +88,24 @@
 -----------------------------------
 
 function onEventFinish(player,csid,option)
--- printf("CSID: %u",csid);
--- printf("RESULT: %u",option);
+printf("CSID: %u",csid);
+printf("RESULT: %u",option);
 	
-	if(csid == 0x2798) then
+	if(csid == 0x2797) then
 		player:addKeyItem(LIMIT_BREAKER);
-		player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER);
+		player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER);
+	elseif(csid == 0x273d) then
+		if(option == 5) then
+			player:addQuest(JEUNO,NEW_WORLDS_AWAIT);
+		end
+		-- option 6 is Not yet! in Exceeding Limits Lv75-80
+	elseif(csid == 0x2798) then
+		player:tradeComplete();
+		player:setMerits(player:getMerits() - 3);
+		player:addFame(JEUNO,50);
+		player:levelCap(80);
+		player:completeQuest(JEUNO,NEW_WORLDS_AWAIT);
+		player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_80);
 	end
 	
 end;
\ No newline at end of file
I don't think I ever finished the entire quest line but I hope this points you in the right direction!

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: Beginning Genkai 6

Post by Alexandre24 » Thu Jul 30, 2015 4:01 am

Holy s***, thanks! In what you have scripted a couple genkai work?

Fatalerror66
Posts: 2
Joined: Fri Aug 21, 2015 4:29 am

Re: Beginning Genkai 6

Post by Fatalerror66 » Fri Aug 21, 2015 5:22 am

I dont know if anyone is still working this but this is as far as i have gotten, I am stuck on the rock paper scissors part of the Beyond the Stars Quest.

As of now this code allows you to
Talk to the Nomad Moogle in Ru'Lude Gardens and start all the genkei up to 8 -check
Trade the Nomad Moogle the varios Kindred Seals/Crest and Merit Points for a cutscene. - check
You will lose the Kindred's Crests/Seals and the Merit Points. - check
All the cutscenes appear to be correct when i tested them up to genkei 8's it does the first part of the cutscene then when you are supposed to talk to the moogle again to get the second cutscene it doesnt work.

Code: Select all

-----------------------------------
--  Area: Ru'Lude Gardens
--  NPC:  Nomad Moogle
--  Type: Adventurer's Assistant
--  @pos 10.012 1.453 121.883 243
-----------------------------------
package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil;
package.loaded["scripts/globals/settings"] = nil;
-----------------------------------

 
 require("scripts/globals/settings");
 require("scripts/globals/keyitems");
 require("scripts/globals/quests");
 require("scripts/zones/RuLude_Gardens/TextIDs");

-----------------------------------
-- onTrade Action
-----------------------------------
 function onTrade(player,npc,trade)
    local meritCount = player:getMeritCount();

    if(trade:hasItemQty(1127,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and meritCount > 2) then
       if(player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
          player:startEvent(0x2797);
       end
    elseif(trade:hasItemQty(2955,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and meritCount > 3) then
       if(player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
          player:startEvent(0x2798);
       end
    elseif(trade:hasItemQty(2955,10) == true and trade:getGil() == 0 and trade:getItemCount() == 10 and meritCount > 4) then
       if(player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
          player:startEvent(0x2799);
       end
    elseif(trade:hasItemQty(2955,1) == true and trade:hasItemQty(503,1) == true and trade:getGil() == 0 and trade:getItemCount() == 2 and meritCount > 9) then
       if(player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
          player:startEvent(10138);
       end
    end
   
 end;

 -----------------------------------
 -- onTrigger Action
 -----------------------------------

 function onTrigger(player,npc)
 
    if(player:hasKeyItem(LIMIT_BREAKER) == false and player:getMainLvl() >= 75) then
       player:startEvent(0x273d);
    elseif(player:getMainLvl() == 75 and player:levelCap() == 75 and MAX_LEVEL >= 80 and player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_AVAILABLE) then
       player:startEvent(0x273d,0,1,1,0);
    elseif(player:getMainLvl() >= 76 and player:levelCap() == 80 and MAX_LEVEL >= 85 and player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_AVAILABLE) then
       player:startEvent(0x273d,0,1,2,0);
    elseif(player:getMainLvl() >= 81 and player:levelCap() == 85 and MAX_LEVEL >= 90 and player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_AVAILABLE) then
       player:startEvent(0x273d,0,1,3,0);
    elseif(player:getMainLvl() >= 91 and player:levelCap() == 90 and MAX_LEVEL >= 95 and player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_AVAILABLE) then
       player:startEvent(0x273d,0,1,4,0);
    elseif(player:getMainLvl() >= 91 and player:levelCap() == 95 and MAX_LEVEL >= 99 and player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_AVAILABLE) then
       player:startEvent(0x273d,0,1,5,0);
    elseif(player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
       player:startEvent(0x273d,0,1,1,1);
    elseif(player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
       player:startEvent(0x273d,0,1,2,1);
    elseif(player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
       player:startEvent(0x273d,0,1,3,1);
    elseif(player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
       player:startEvent(0x273d,0,1,4,1);
    elseif(player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_ACCEPTED) then
       player:startEvent(0x273d,0,1,5,1); -- player:startEvent(0x273d,0,1,6,1);
    elseif(player:hasKeyItem(LIMIT_BREAKER) == true and player:getMainLvl() >= 75) then
       player:startEvent(0x273d,0,1,0,0);
    else
      player:startEvent(0x273d,0,2,0,0);
    end
 
 end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
--printf("upCSID: %u",csid);
--printf("upRESULT: %u",option);
end;

 -----------------------------------
 --OnEventFinish
 -----------------------------------
   function onEventFinish(player,csid,option)
    local meritCount = player:getMeritCount();
    
    if(csid == 0x273d and option == -1) then
       player:addKeyItem(LIMIT_BREAKER);
       player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER);
    
    elseif(csid == 0x273d) then
       if(option == 5) then
          player:addQuest(JEUNO,NEW_WORLDS_AWAIT);
       elseif(option == 7 )then
          player:addQuest(JEUNO,EXPANDING_HORIZONS);
       elseif(option == 9) then
          player:addQuest(JEUNO,BEYOND_THE_STARS);
       end  
       
       
    elseif(csid == 0x2797) then
       player:tradeComplete();
       player:setMerits(meritCount - 3);
       player:addFame(JEUNO,50);
       player:levelCap(80);
       player:completeQuest(JEUNO,NEW_WORLDS_AWAIT);
       player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_80);
     
    elseif(csid == 0x2798) then
       player:tradeComplete();
       player:setMerits(meritCount - 4);
       player:addFame(JEUNO,50);
       player:levelCap(85);
       player:completeQuest(JEUNO,EXPANDING_HORIZONS);
       player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_85);
       
    elseif(csid == 0x2799) then
       player:tradeComplete();
       player:setMerits(meritCount - 5);
       player:startEvent(0x27B1); -- this is the scene that is suppose to play and you are suppose to have to do correctly inorder to level cap increase to 90
       player:addFame(JEUNO,50);
       player:levelCap(90);
       player:completeQuest(JEUNO,BEYOND_THE_STARS);
       player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_90);
   
    end
  end;
I am also linking a video of what Beyond the Stars quest is supposed to look like. The coding stops @1:03 in this https://www.youtube.com/watch?v=fxCIOFyz2gI

sorry i apologized i have edited with the /code
Last edited by Fatalerror66 on Fri Aug 21, 2015 10:14 pm, edited 2 times in total.

User avatar
TeoTwawki
Developer
Posts: 523
Joined: Mon Jul 15, 2013 9:50 pm

Re: Beginning Genkai 6

Post by TeoTwawki » Fri Aug 21, 2015 8:27 pm

please use the

Code: Select all

[code]code tags
[/code]
Hi, I run The Demiurge server.

Code: Select all

PLS USE [code]CODE TAGS[/code] WHEN POSTING CODE
Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: Beginning Genkai 6

Post by Alexandre24 » Fri Aug 28, 2015 8:31 pm

Fatalerror66, your script is very good. By report at your video. Me, the whole video is on my server. He even told me that I have access at 90 but when I want to win level. I realize that I gain any EXP . I think it worthwhile to work on it until finally the max level.

Fatalerror66
Posts: 2
Joined: Fri Aug 21, 2015 4:29 am

Re: Beginning Genkai 6

Post by Fatalerror66 » Sun Aug 30, 2015 7:02 pm

yeah sadly that is where i am stuck as well i cant get the script to work properly. I dont know how to embed the movie correctly so that it will do that minigame. i have tried a couple of things but none of them seem to work.

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: Beginning Genkai 6

Post by Alexandre24 » Tue Sep 08, 2015 12:18 am

It is hoped someone to take the notes because that 's a shame . Then it will take to address the iLvl

User avatar
TeoTwawki
Developer
Posts: 523
Joined: Mon Jul 15, 2013 9:50 pm

Re: Beginning Genkai 6

Post by TeoTwawki » Fri Sep 11, 2015 4:12 pm

Fatalerror66 wrote:yeah sadly that is where i am stuck as well i cant get the script to work properly. I dont know how to embed the movie correctly so that it will do that minigame. i have tried a couple of things but none of them seem to work.
Probably some use of

Code: Select all

player:updateEvent()
and conditionals checking the option IDs to see what the player selected during said minigame.
Hi, I run The Demiurge server.

Code: Select all

PLS USE [code]CODE TAGS[/code] WHEN POSTING CODE
Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: Continue genkai 9 and 10

Post by Alexandre24 » Sat Nov 07, 2015 5:53 pm

The script works to level 95. A problem happens at the last level 95 of the CS, but the unlock and keyitem is obtained . I continued in big lines to level 99. The script remains to be tweaking with the Wiki FFXIEncyclopedia . I have not been able to follow it 100% . So I share my work hoping that someone is the kindness to finish a 100% share in the project.

Code: Select all

-----------------------------------
-- Area: Ru'Lude Gardens
--  NPC: Nomad Moogle
-- Type: Adventurer's Assistant
-- @pos 10.012 1.453 121.883 243
-----------------------------------
package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/globals/quests");
require("scripts/zones/RuLude_Gardens/TextIDs");

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
    local meritCount = player:getMeritCount();
    if (trade:hasItemQty(1127,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and meritCount > 2) then
        if (player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
            player:startEvent(10135);
        end
    elseif (trade:hasItemQty(2955,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and meritCount > 3) then
        if (player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
            player:startEvent(10136);
        end
    elseif (trade:hasItemQty(2955,10) == true and trade:getGil() == 0 and trade:getItemCount() == 10 and meritCount > 4) then
        if (player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
            player:startEvent(10137);
        end
    elseif (trade:hasItemQty(2955,1) == true and trade:hasItemQty(503,1) == true and trade:getGil() == 0 and trade:getItemCount() == 2 and meritCount > 9) then
        if (player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
            player:startEvent(10138);
	elseif (trade:hasItemQty(3541,1) == true) then
		if (player:getQuestStatus(JEUNO,PRELUDE_TO_PUISSANCE) == QUEST_ACCEPTED) then
			player:startEvent(10139);
	elseif (trade:hasItemQty(2052,1) == true and trade:hasItemQty(2053,1) == true) then
		if (player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_ACCEPTED) then
			player:startEvent(10140);
        end
    end
end;

-----------------------------------
-- onTrigger Action
-----------------------------------

function onTrigger(player,npc)
    if (player:hasKeyItem(LIMIT_BREAKER) == false and player:getMainLvl() >= 75) then
        player:startEvent(10045,75,2,10,7,30,302895,4095);
    elseif (player:getMainLvl() == 75 and player:levelCap() == 75 and MAX_LEVEL >= 80 and player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_AVAILABLE) then
        player:startEvent(10045,0,1,1,0);
    elseif (player:getMainLvl() >= 76 and player:levelCap() == 80 and MAX_LEVEL >= 85 and player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_AVAILABLE) then
        player:startEvent(10045,0,1,2,0);
    elseif (player:getMainLvl() >= 81 and player:levelCap() == 85 and MAX_LEVEL >= 90 and player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_AVAILABLE) then
        player:startEvent(10045,0,1,3,0);
    elseif (player:getMainLvl() >= 86 and player:levelCap() == 90 and MAX_LEVEL >= 95 and player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_AVAILABLE) then
        player:startEvent(10045,0,1,4,0);
    elseif (player:getMainLvl() >= 91 and player:levelCap() == 95 and MAX_LEVEL >= 99 and player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_AVAILABLE) then
        player:startEvent(10045,0,1,5,0);
    elseif (player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then
        player:startEvent(10045,0,1,1,1);
    elseif (player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then
        player:startEvent(10045,0,1,2,1);
    elseif (player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then
        player:startEvent(10045,0,1,3,1);
    elseif (player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then
        player:startEvent(10045,0,1,4,1);
	elseif (player:getQuestStatus (JEUNO,PRELUDE_TO_PUISSANCE) == QUEST_ACCEPTED) then
		player:startEvent(10045,0,1,5,1);
	elseif (player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_ACCEPTED) then
        player:startEvent(10045,0,1,6,1); -- player:startEvent(0x273d,0,1,6,1);
    elseif (player:hasKeyItem(LIMIT_BREAKER) == true and player:getMainLvl() >= 75) then
        player:startEvent(10045,0,1,0,0);
    else
        player:startEvent(10045,0,2,0,0);
    end
end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
    -- printf("CSID: %u",csid);
    -- printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
    -- printf("CSID: %u",csid);
    -- printf("RESULT: %u",option);
    local meritCount = player:getMeritCount();

    if (csid == 10045 and option == -1) then
        player:addKeyItem(LIMIT_BREAKER);
        player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER);
    elseif (csid == 10045) then
        if (option == 5) then
            player:addQuest(JEUNO,NEW_WORLDS_AWAIT);
        elseif (option == 7 ) then
            player:addQuest(JEUNO,EXPANDING_HORIZONS);
        elseif (option == 9) then
            player:addQuest(JEUNO,BEYOND_THE_STARS);
        elseif (option == 11) then
            player:addQuest(JEUNO,DORMANT_POWERS_DISLODGED);
		elseif (option == 13) then
			player:addQuest(JEUNO,PRELUDE_TO_PUISSANCE);
		elseif (option == 15) then
			player:addQuest(JEUNO,BEYOND_INFINITY);
        end
    elseif (csid == 10135) then
        player:tradeComplete();
        player:setMerits(meritCount - 3);
        player:addFame(JEUNO,50);
        player:levelCap(80);
        player:completeQuest(JEUNO,NEW_WORLDS_AWAIT);
        player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_80);
    elseif (csid == 10136) then
        player:tradeComplete();
        player:setMerits(meritCount - 4);
        player:addFame(JEUNO,50);
        player:levelCap(85);
        player:completeQuest(JEUNO,EXPANDING_HORIZONS);
        player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_85);
    elseif (csid == 10137) then
        player:tradeComplete();
        player:setMerits(meritCount - 5);
        player:startEvent(0x27B1); -- this is the scene that is suppose to play and you are suppose to have to do correctly inorder to level cap increase to 90
        player:addFame(JEUNO,50);
        player:levelCap(90);
        player:completeQuest(JEUNO,BEYOND_THE_STARS);
        player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_90);
    elseif (csid == 10138) then
        player:tradeComplete();
        player:setMerits(meritCount - 10);
        player:addFame(JEUNO,50);
        player:levelCap(95);
        player:completeQuest(JEUNO,DORMANT_POWERS_DISLODGED);
        player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_95);
        player:addKeyItem(SOUL_GEM);
        player:messageSpecial(KEYITEM_OBTAINED,SOUL_GEM);
	elseif (csid == 10139) then
		player:tradeComplete();
		player:completeQuest(JEUNO,PRELUDE_TO_PUISSANCE);
		player:addKeyItem(SOUL_GEM_CLASP);
		player:messageSpecial(KEYITEM_OBTAINED,SOUL_GEM_CLASP);
	elseif (csid == 10140) then
		player:tradeComplete();
		player:levelCap(99);
		player:completeQuest(JEUNO,BEYOND_INFINITY);
		player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_99);
    end
end;

Post Reply