mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-23 19:10:28 +02:00
Cleaned up the new scripting code. Added a helper function to do the yielding automatically. Modified all the scripts to use the new system and added a few new ones.
This commit is contained in:
parent
51bbf4ae2e
commit
8743042950
28 changed files with 316 additions and 167 deletions
|
@ -16,23 +16,80 @@ eventTalkChangeOne(skipQuestion)
|
|||
talkOfferMaxOver()
|
||||
askRetryRegionalleve(guildLeveId, leveAllowances);
|
||||
|
||||
Menu Ids:
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
function init(npc)
|
||||
return false, false, 0, 0;
|
||||
end
|
||||
|
||||
function onEventStarted(player, npc)
|
||||
player:RunEventFunction("eventTalkType", 0x30, true, 0x02CE, 0x356, 0x367, true, 0, nil, 0x29, 0,0,0);
|
||||
|
||||
::MENU_LOOP::
|
||||
menuChoice = callClientFunction(player, "eventTalkType", 0x30, true, 0x02CE, 0x356, 0x367, true, 0, nil, 0x29, 0,0,0);
|
||||
--Battlecraft
|
||||
if (menuChoice == 1) then
|
||||
resultGLPack = callClientFunction(player, "eventTalkPack", 201, 207);
|
||||
|
||||
if (resultGLPack == nil) then
|
||||
goto MENU_LOOP;
|
||||
else
|
||||
|
||||
::CARDS_LOOP::
|
||||
cards = {0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9};
|
||||
|
||||
chosenGLCard = callClientFunction(player, "eventTalkCard", cards[1], cards[2], cards[3], cards[4], cards[5], cards[6], cards[7], cards[8]);
|
||||
|
||||
if (chosenGLCard == -1) then
|
||||
goto MENU_LOOP;
|
||||
else
|
||||
wasAccepted = callClientFunction(player, "eventTalkDetail", cards[chosenGLCard], 0, 0xF4242, 0xD, 0xF4242, 0, 0, true, 0);
|
||||
|
||||
if (wasAccepted == true) then
|
||||
|
||||
end
|
||||
|
||||
goto CARDS_LOOP;
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--FieldCraft Miner
|
||||
elseif (menuChoice == 0x15) then
|
||||
--FieldCraft Botanist
|
||||
elseif (menuChoice == 0x16) then
|
||||
--FieldCraft Fisher
|
||||
elseif (menuChoice == 0x17) then
|
||||
--FieldCraft Quit
|
||||
elseif (menuChoice == 0x18) then
|
||||
--Faction Broken Blade
|
||||
elseif (menuChoice == 0x29) then
|
||||
--Faction Shields
|
||||
elseif (menuChoice == 0x2A) then
|
||||
--Faction Horn and Hand
|
||||
elseif (menuChoice == 0x2B) then
|
||||
--Leve Evaluation
|
||||
elseif (menuChoice == 5) then
|
||||
--Tutorial
|
||||
elseif (menuChoice == 6) then
|
||||
--End of Info
|
||||
elseif (menuChoice == 7) then
|
||||
--Quit
|
||||
elseif (menuChoice == 8) then
|
||||
end
|
||||
|
||||
--
|
||||
--
|
||||
--
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
function onEventUpdate(player, npc, step, menuOptionSelected)
|
||||
--player:RunEventFunction("eventTalkType", 0x32, true, 0x02CE, 0x356, 0x367, false, 2, nil, 0x29, 0,0,0);
|
||||
player:RunEventFunction("eventTalkPack", 201, 207);
|
||||
--player:RunEventFunction("eventTalkCard", 0x30C3, 0x30C4, 0x30C1, 0x30C5, 0x30C6, 0x30C7, 0x30C8, 0x30C9);
|
||||
--player:RunEventFunction("eventTalkDetail", 0x30C4, 2, 0xF4242, 0xD, 0xF4242, 0, 0xFF, true, 11);
|
||||
--
|
||||
--player:RunEventFunction("eventGLChangeDetail", 0xDEAD, 0x30C4, 0xFF, 0xF4242, 0xD, 0xF4242, 0, 2, true);
|
||||
player:EndEvent();
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue