3 scripts SOA
Posted: Sun Apr 24, 2016 9:43 pm
Hello
I finished for me, three scripts but I think she has errors .
If anyone can try to correct them and send them to the DSP project, its 'll appreciate.
I 'm not really good for the code but I try to want to understand .
Here are my scripts:
I finished for me, three scripts but I think she has errors .
If anyone can try to correct them and send them to the DSP project, its 'll appreciate.
I 'm not really good for the code but I try to want to understand .
Here are my scripts:
Code: Select all
-----------------------------------
--
-- Zone: Western Adoulin
--
-----------------------------------
require("scripts/globals/settings");
package.loaded["scripts/zones/Western_Adoulin/TextIDs"] = nil;
require("scripts/zones/Western_Adoulin/TextIDs");
-----------------------------------
-- onInitialize
-----------------------------------
function onInitialize(zone)
end;
-----------------------------------
-- onZoneIn
-----------------------------------
function onZoneIn(player,prevZone)
cs = -1;
if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then
player:setPos(-142,4,-18,4);
end
return cs;
end;
-----------------------------------
-- onRegionEnter
-----------------------------------
function onRegionEnter(player,region)
local regionID =region:GetRegionID();
if (regionID==1 and player:getCurrentMission(SOA) == HEARTWINGS_AND_THE_KINDHEARTED then
player:startEvent(0x2);
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;
Code: Select all
-----------------------------------
-- Area: Western Adoulin
-- NPC: Brenton
-- Location: E-8
-----------------------------------
package.loaded["scripts/zones/Western_Adoulin/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Western_Adoulin/TextIDs");
require("scripts/globals/settings");
require("scripts/globals/keyitems")
require("scripts/globals/missions")
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
if (player:getMissionStatus(SOA,PIONEER_REGISTRATION) then
local Bayld = player:getCurrency("bayld");
player:startEvent(0x3);
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 == 3 then
player:completeMission(SOA,PIONEER_REGISTRATION);
player:addKeyItem(PIONEER_S_BADGE);
player:messageSpecial(KEYITEM_OBTAINED,PIONEER_S_BADGE);
player:addKeyItem(MAP_OF_ADOULIN);
player:messageSpecial(KEYITEM_OBTAINED,MAP_OF_ADOULIN);
player:addCurrency("bayld", 1000);
end
end;
Code: Select all
-----------------------------------
-- Area: Western Adoulin
-- NPC: Levil
-- Location: E-8
-----------------------------------
package.loaded["scripts/zones/Western_Adoulin/TextIDs"] = nil;
-----------------------------------
require("scripts/zones/Western_Adoulin/TextIDs");
require("scripts/globals/settings");
require("scripts/globals/missions")
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
player:startEvent(0x4);
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;