kjLotus wrote:
i did just can't unlock them
Sure you can.... @addspell 306 and @addspell 305
kjLotus wrote:
i did just can't unlock them
can't unlock the normal way*Signature wrote:kjLotus wrote:
i did just can't unlock them
Sure you can.... @addspell 306 and @addspell 305
The original script is here :-----------------------------------
-- Area: Garlaige Citadel [S]
-- NPC: Randecque
-- Involved in Mission: BACK TO THE BEGINNING
-- @zone 164
-- @pos -26.824 3.601 -137.082
-----------------------------------
package.loaded["scripts/zones/Garlaige_Citadel_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/keyitems");
require("scripts/zones/Garlaige_Citadel_[S]/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if(player:getCurrentMission(WOTG) == BACK_TO_THE_BEGINNING) then
player:startEvent(0x0072);
elseif(player:getCurrentMission(WOTG) == CAIT_SITH) then
player:startEvent(0x0073);
else
player:startEvent(0x0071);
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 == 0x0001) then
player:addKeyItem(RED_RECOMMENDATION_LETTER);
player:messageSpecial(KEYITEM_OBTAINED,RED_RECOMMENDATION_LETTER);
player:setVar("RedRecommendationLetter",0);
end
end;
I have some problems tho. Right now, if i talk to Randecque, instead of not reacting at all, it triggers something but nothing happen, no cutscene, no dialog, no keyitem rewarded, its like a freeze and i have to @release to get away.-----------------------------------
-- Area: Kazham
-- NPC: Jakoh Wahcondalo
-- @pos 101 -16 -115 250
-----------------------------------
package.loaded["scripts/zones/Kazham/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/missions");
require("scripts/zones/Kazham/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if(player:getCurrentMission(ZILART) == KAZAMS_CHIEFTAINESS) then
player:startEvent(0x0072);
elseif(player:getCurrentMission(ZILART) == THE_TEMPLE_OF_UGGALEPIH) then
player:startEvent(0x0073);
elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 2) then
player:startEvent(0x0109);
else
player:startEvent(0x0071);
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 == 0x0072) then
player:addKeyItem(SACRIFICIAL_CHAMBER_KEY);
player:messageSpecial(KEYITEM_OBTAINED,SACRIFICIAL_CHAMBER_KEY);
player:completeMission(ZILART,KAZAMS_CHIEFTAINESS);
player:addMission(ZILART,THE_TEMPLE_OF_UGGALEPIH);
end
end;
Really trying to figure this out, but i have to say this is brainwashing haha...- @pos
I dont know the NPC POS.
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if(player:getCurrentMission(WOTG) == BACK_TO_THE_BEGINNING) then
player:startEvent(0x0001);
elseif(player:getCurrentMission(WOTG) == CAIT_SITH) then
player:startEvent(0x0002);
else
player:startEvent(0x0003);
end
end;
I dont know what to put into the StartEvent part. I mean... the cs showing the npc talking to you and saying that he's gonna hand out the recommendation later happen if you use @cs 1 at Garlaige Citadel [S]. Tried to do a decimal to hexadecimal but 1 = 1... So i thought it'd be 0x0001 but am i correct ?
I've randomly used 0002 and 0003 in the elseif part because i dont know the cs right now, but will try to figure it out. Can someone tell me how to go from @cs 1 to startEvent(0x.....) ?
if(csid == 0x0001) then
player:addKeyItem(RED_RECOMMENDATION_LETTER);
player:messageSpecial(KEYITEM_OBTAINED,RED_RECOMMENDATION_LETTER);
player:setVar("RedRecommendationLetter",0);
Not sure if you actually have to write RED_RECOMMENDATION_LETTER for Red Recommendation Letter... or if i am mistaken.
And then again (csid == 0x0001) is correct ? Or i am doing something wrong again ?
Is there a scripting line i have to add so the npc do not give me the keyitem over and over again if i already have it ?-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if(player:getCurrentMission(WOTG) == BACK_TO_THE_BEGINNING) then
player:startEvent(0x0001);
elseif(player:getCurrentMission(WOTG) == CAIT_SITH) then
player:startEvent(0x0002);
else
player:startEvent(0x0003);
end
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("RESULT: %u",option);
if(csid == 0x0001) then
player:addKeyItem(RED_RECOMMENDATION_LETTER);
player:messageSpecial(KEYITEM_OBTAINED,RED_RECOMMENDATION_LETTER);
player:setVar("RedRecommendationLetter",0);
end
end;
Code: Select all
-----------------------------------
-- Area: Garlaige Citadel [S]
-- NPC: Randecque
-- @zone 164
-- @pos 61 -6 137
-- Notes: Gives Red Letter required to start "Starts Steamed Rams"
-----------------------------------
package.loaded["scripts/zones/Garlaige_Citadel_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/zones/Garlaige_Citadel_[S]/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if (player:getVar("Used_RED_RECOMMENDATION_LETTER") == 1) then
player:startEvent(0x0003);
elseif (player:hasKeyItem(RED_RECOMMENDATION_LETTER) == false) then
player:startEvent(0x0001);
elseif (player:hasKeyItem(RED_RECOMMENDATION_LETTER) == true) then
player:startEvent(0x0002);
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 == 0x0001 and option == 0) then
player:addKeyItem(RED_RECOMMENDATION_LETTER);
player:messageSpecial(KEYITEM_OBTAINED,RED_RECOMMENDATION_LETTER);
end
end;
Code: Select all
-----------------------------------
-- Area: Southern SandOria [S]
-- NPC: Mainchelite
-- @zone 80
-- @pos -16 1 -30
-----------------------------------
package.loaded["scripts/zones/Southern_San_dOria_[S]/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/settings");
require("scripts/globals/keyitems");
require("scripts/globals/titles");
require("scripts/globals/quests");
require("scripts/globals/missions");
require("scripts/zones/Southern_San_dOria_[S]/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
-- 0x005 = Generic Greeting for Iron Ram members
-- 0x006 = Mid Initiation of other nation
-- 0x007 = Ask player to Join Iron Rams
-- 0x008 = Ask if changed mind about joining Iron rams (after player has declined)
-- 0x009 = Mid Initiation of other nation
-- 0x00A = Player works for another nation, offer to switch +give quest
-- 0x00B = Player works for another nation, offer to switch +give quest
-- 0x00C = Complete investigation
-- 0x00D = "How fares the search, <player>?"
-- 0x00E = "How fares the search, <player>?"
-- 0x00F = No Red Recommendation Letter and has no nation affiliation
local TheFightingFourth = player:getQuestStatus(CRYSTAL_WAR,THE_FIGHTING_FOURTH);
local SnakeOnThePlains = player:getQuestStatus(CRYSTAL_WAR,SNAKE_ON_THE_PLAINS);
local SteamedRams = player:getQuestStatus(CRYSTAL_WAR,STEAMED_RAMS);
local RedLetter = player:hasKeyItem(RED_RECOMMENDATION_LETTER);
local CharredPropeller = player:hasKeyItem(CHARRED_PROPELLER);
local OxidizedPlate = player:hasKeyItem(OXIDIZED_PLATE);
local ShatteredLumber = player:hasKeyItem(PIECE_OF_SHATTERED_LUMBER);
if (TheFightingFourth == QUEST_ACCEPTED or SnakeOnThePlains == QUEST_ACCEPTED) then
player:startEvent(0x009);
elseif (SteamedRams == QUEST_AVAILABLE and RedLetter == true) then
player:startEvent(0x007);
elseif (SteamedRams == QUEST_AVAILABLE and player:getVar("Used_RED_RECOMMENDATION_LETTER") == 1) then
player:startEvent(0x008);
elseif (SteamedRams == QUEST_ACCEPTED and CharredPropeller == true and OxidizedPlate == true and ShatteredLumber == true) then
player:startEvent(0x00C);
elseif (SteamedRams == QUEST_ACCEPTED) then
player:startEvent(0x00D);
elseif (SteamedRams == QUEST_COMPLETED and player:getVar("Iron_Ram_Member") == 1) then
player:startEvent(0x005);
else
player:startEvent(0x00F);
end
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("Option: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
-- printf("CSID: %u",csid);
-- printf("Option: %u",option);
if (csid == 0x007 and option == 0) then
player:addQuest(CRYSTAL_WAR,STEAMED_RAMS);
player:setVar("Used_RED_RECOMMENDATION_LETTER",1);
player:delKeyItem(RED_RECOMMENDATION_LETTER);
elseif (csid == 0x007 and option == 1) then
player:setVar("Used_RED_RECOMMENDATION_LETTER",1);
player:delKeyItem(RED_RECOMMENDATION_LETTER);
elseif (csid == 0x008 and option == 0) then
player:addQuest(CRYSTAL_WAR,STEAMED_RAMS);
elseif (csid == 0x00A and option == 0) then
player:addQuest(CRYSTAL_WAR,STEAMED_RAMS);
elseif (csid == 0x00B and option == 0) then
player:addQuest(CRYSTAL_WAR,STEAMED_RAMS);
elseif (csid == 0x00C and option == 0) then
-- Todo: change this player var into a new db field for Campaign nation allegiance?
player:setVar("Iron_Ram_Member",1);
player:addTitle(KNIGHT_OF_THE_IRON_RAM);
player:addKeyItem(BRONZE_RIBBON_OF_SERVICE);
player:completeQuest(CRYSTAL_WAR,STEAMED_RAMS);
player:delKeyItem(CHARRED_PROPELLER);
player:delKeyItem(OXIDIZED_PLATE);
player:delKeyItem(PIECE_OF_SHATTERED_LUMBER);
player:messageSpecial(KEYITEM_OBTAINED,BRONZE_RIBBON_OF_SERVICE);
elseif (csid == 0x00D and option == 1) then
player:delQuest(CRYSTAL_WAR,STEAMED_RAMS);
end
end;
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE