Page 1 of 1

Domenic - Lower Jeuno BCNM Warp NPC

Posted: Sun Jun 29, 2014 3:50 am
by Signature
Since this Npc isn't scripted in the darkstar repo, Here is my script. Works exactly as retail, only thing i left out was a check for completion of "Beyond Infinity"
quest prior to being able to use his services. Since most likely that quest isn't scripted either.


Well here's the script

\darkstar\scripts\zones\Lower_Jeuno\npcs\Domenic.lua

Code: Select all

-----------------------------------
-- Area: Lower Jeuno
-- NPC:  Domenic
-- BCNM/KSNM Teleporter
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
-----------------------------------

require("scripts/zones/Lower_Jeuno/TextIDs");
require("scripts/globals/settings");
require("scripts/globals/teleports");


csid = 10115;
csidRefuseService = 10116
-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
end;

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

function onTrigger(player,npc)

player:startEvent(csid,player:getGil());

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 == 10115) then
        if (option == 1 and player:getGil() >= 750) then
            player:delGil(750);
			toGhelsba(player)
		elseif (option == 2 and player:getGil() >= 750) then
            player:delGil(750);
			player:setPos(0, 0, 0, 0, 139);
		elseif (option == 3 and player:getGil() >= 750) then
            player:delGil(750);
			player:setPos(0, 0, 0, 0, 144);
		elseif (option == 4 and player:getGil() >= 750) then
            player:delGil(750);
			player:setPos(0, 0, 0, 0, 146);
		elseif (option == 5 and player:getGil() >= 1000) then
            player:delGil(1000);
			player:setPos(0, 0, 0, 0, 206);
        end
	end
end;



Re: Domenic - Lower Jeuno BCNM Warp NPC

Posted: Fri Jul 04, 2014 7:44 am
by bluekirby0
We can't accept submissions that do not work properly as per retail behavior. If you want to put the quest check in then we can take it (and it will work when someone gets around to implementing the quest).

For future reference you are much more likely to get your submissions included if you fork the repository and issue a pull request on github.

Re: Domenic - Lower Jeuno BCNM Warp NPC

Posted: Fri Jul 04, 2014 4:36 pm
by Signature
Well i wasn't expecting this to get added to the repo.... Mainly because of the required completed quest.
But since you showed a little interest. here it is 100% retail.

scripts\zones\Lower_Jeuno\npcs\Domenic.lua

Code: Select all

-----------------------------------
-- Area: Lower Jeuno
-- NPC:  Domenic
-- BCNM/KSNM Teleporter
-----------------------------------
package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil;
-----------------------------------

require("scripts/zones/Lower_Jeuno/TextIDs");
require("scripts/globals/settings");
require("scripts/globals/teleports");
require("scripts/globals/quests");

csid = 10115;
csidRefuseService = 10116;

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

function onTrade(player,npc,trade)
end;

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

function onTrigger(player,npc)
	if (player:hasCompleteQuest(JEUNO,BEYOND_INFINITY) == true) then
		player:startEvent(csid,player:getGil());
	else
		player:startEvent(csidRefuseService);
	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 == 10115) then
        if (option == 1 and player:getGil() >= 750) then
            player:delGil(750);
			toGhelsba(player)
		elseif (option == 2 and player:getGil() >= 750) then
            player:delGil(750);
			player:setPos(0, 0, 0, 0, 139);
		elseif (option == 3 and player:getGil() >= 750) then
            player:delGil(750);
			player:setPos(0, 0, 0, 0, 144);
		elseif (option == 4 and player:getGil() >= 750) then
            player:delGil(750);
			player:setPos(0, 0, 0, 0, 146);
		elseif (option == 5 and player:getGil() >= 1000) then
            player:delGil(1000);
			player:setPos(0, 0, 0, 0, 206);
        end
	end
end;



Re: Domenic - Lower Jeuno BCNM Warp NPC

Posted: Sat Jul 05, 2014 1:52 pm
by bluekirby0
Adjusted to be more in-line with other scripts and committed. If you have anything else to contribute please make a fork.

https://github.com/DarkstarProject/dark ... 1080b3210b