addspell via NPC

Post Reply
Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

addspell via NPC

Post by Gratis » Wed Feb 19, 2014 12:30 am

Our server has a few perk NPC's and one of them gives out certain key items, trying to add certain spells to that NPC as well but it seems to not be working. Any pointers? I added the player:addspell portion to the NPC but it is not giving out the spells to characters...


-----------------------------------
-- Area: Upper Jeuno
-- NPC: Bheem
-- Standard Info NPC
-----------------------------------

package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil;
require("scripts/zones/Upper_Jeuno/TextIDs");

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

function onTrade(player,npc,trade)
end;

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

function onTrigger(player,npc)
player:startEvent(0x009D);
if(player:hasCompletedMission(ZILART,THE_NEW_FRONTIER) == false) then
player:addMission(3,0);
end
if(player:getVar("Initial_Bonus") ~= 1 and player:getMainLvl() > 1 and player:getSubJob() ~= 0 and player:getRank() ~= 1) then
player:completeQuest(SANDORIA,A_KNIGHT_S_TEST);
player:completeQuest(BASTOK,BLADE_OF_DARKNESS);
player:completeQuest(JEUNO,PATH_OF_THE_BEASTMASTER);
player:completeQuest(JEUNO,PATH_OF_THE_BARD);
player:completeQuest(WINDURST,THE_FANGED_ONE);
player:completeQuest(OUTLANDS,FORGE_YOUR_DESTINY);
player:completeQuest(BASTOK,AYAME_AND_KAEDE);
player:completeQuest(SANDORIA,THE_HOLY_CREST);
player:completeQuest(WINDURST,I_CAN_HEAR_A_RAINBOW);
player:addKeyItem(VIAL_OF_SHROUDED_SAND);
player:addKeyItem(PSC_WILDCAT_BADGE);
player:addKeyItem(AIRSHIP_PASS);
player:addKeyItem(AIRSHIP_PASS_FOR_KAZHAM);
player:addKeyItem(HOLLA_GATE_CRYSTAL);
player:addKeyItem(DEM_GATE_CRYSTAL);
player:addKeyItem(MEA_GATE_CRYSTAL);
player:addKeyItem(VAHZL_GATE_CRYSTAL);
player:addKeyItem(YHOATOR_GATE_CRYSTAL);
player:addKeyItem(ALTEPA_GATE_CRYSTAL);
player:addKeyItem(CERULEAN_CRYSTAL);
player:addKeyItem(LIGHT_OF_ALTAIEU);
player:addKeyItem(CHOCOBO_LICENSE);
player:addspell(BREAKGA);
player:addspell(BLIZZAJA);
player:addspell(BLIZZAGA_IV);
player:addspell(BLIZZAGA_V);
player:addspell(THUNDER_V);
player:addspell(THUNDAJA);
player:addspell(BLIZZAGA_IV);
player:addspell(GRAVITY_II);
player:addspell(FENRIR);
player:addspell(DIABOLOS);
player:addspell(THUNDAGA_IV);
player:addspell(THUNDAGA_V);
player:addFame(0,2500);
player:addFame(1,2500);
player:addFame(2,2500);
player:addFame(5,2500);
player:setRank(10);
player:levelCap(99);
player:setVar("Initial_Bonus",1);
end
if(player:getRank() < 10) then
player:setRank(10);
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);
end;

deviltti
Developer
Posts: 18
Joined: Sun Dec 30, 2012 12:25 am

Re: addspell via NPC

Post by deviltti » Wed Feb 19, 2014 12:14 pm

addSpell versus addspell.

Gratis
Posts: 55
Joined: Wed Jun 26, 2013 11:26 pm

Re: addspell via NPC

Post by Gratis » Wed Feb 19, 2014 9:27 pm

Did not work... orz. ; ;

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: addspell via NPC

Post by demolish » Thu Feb 20, 2014 2:58 am

require("scripts/globals/status");
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

deviltti
Developer
Posts: 18
Joined: Sun Dec 30, 2012 12:25 am

Re: addspell via NPC

Post by deviltti » Thu Feb 20, 2014 11:48 am

You will also need to require keyitems, quests, missions and make aliases for the spell names.

User avatar
Signature
Posts: 126
Joined: Fri May 02, 2014 3:44 am

Re: addspell via NPC

Post by Signature » Sun May 11, 2014 11:13 am

instead of Typing out the spell Name use this method

player:addSpell(217); --Gravity II

use this list of SpellId's https://wiki.dspt.info/index.php/Spell_IDs

Post Reply