mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Merge pull request to Update Master
Updated to latest master
This commit is contained in:
commit
d8c58c679f
280 changed files with 4094 additions and 5831 deletions
|
@ -9,8 +9,8 @@ platform:
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
MSVC_DEFAULT_OPTIONS: ON
|
MSVC_DEFAULT_OPTIONS: ON
|
||||||
BOOST_ROOT_DIR: "C:\\Libraries\\boost_1_60_0"
|
BOOST_ROOT_DIR: "C:\\Libraries\\boost_1_63_0"
|
||||||
BOOST_LIB_DIR: "C:\\Libraries\\boost_1_60_0\\lib32-msvc-14.0"
|
BOOST_LIB_DIR: "C:\\Libraries\\boost_1_63_0\\lib32-msvc-14.0"
|
||||||
MYSQL_PWD: "Password12!"
|
MYSQL_PWD: "Password12!"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -38,6 +38,7 @@ build/
|
||||||
*.la
|
*.la
|
||||||
*.a
|
*.a
|
||||||
*.lib
|
*.lib
|
||||||
|
*.exp
|
||||||
|
|
||||||
# Executables
|
# Executables
|
||||||
*.exe
|
*.exe
|
||||||
|
@ -103,10 +104,13 @@ src/libraries/external/boost_*
|
||||||
*.idb
|
*.idb
|
||||||
|
|
||||||
# sapphire version
|
# sapphire version
|
||||||
src/servers/Server_Common/Version\.cpp
|
src/common/Version\.cpp
|
||||||
|
|
||||||
# edit and continue files
|
# edit and continue files
|
||||||
/enc_temp_folder
|
/enc_temp_folder
|
||||||
|
|
||||||
# travis-ci build mtime cache
|
# travis-ci build mtime cache
|
||||||
.mtime_cache
|
.mtime_cache
|
||||||
|
|
||||||
|
# generated script loader files
|
||||||
|
scripts/native/*/ScriptLoader.cpp
|
|
@ -29,9 +29,10 @@ cache:
|
||||||
before_install:
|
before_install:
|
||||||
- eval "${MATRIX_EVAL}"
|
- eval "${MATRIX_EVAL}"
|
||||||
- gem install --no-ri --no-rdoc mtime_cache
|
- gem install --no-ri --no-rdoc mtime_cache
|
||||||
|
- sudo add-apt-repository -y ppa:rexut/recoil
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt-get install -y libboost-dev libboost-all-dev
|
- sudo apt-get install -y libboost1.63-dev libboost1.63-all-dev
|
||||||
- sudo apt-get install -y libmysqlclient-dev libmysqlcppconn-dev
|
- sudo apt-get install -y libmysqlclient-dev
|
||||||
|
|
||||||
# Build steps
|
# Build steps
|
||||||
script:
|
script:
|
||||||
|
@ -39,6 +40,6 @@ script:
|
||||||
- mtime_cache src/**/*.{%{cpp}} -c .mtime_cache/cache.json
|
- mtime_cache src/**/*.{%{cpp}} -c .mtime_cache/cache.json
|
||||||
- mkdir -p build
|
- mkdir -p build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -DSAPPHIRE_BOOST_VER="1.54.0" && make -j 3
|
- cmake .. -DSAPPHIRE_BOOST_VER="1.63.0" && make -j 3
|
||||||
- cd ..
|
- cd ..
|
||||||
- bash sql_import.sh
|
- bash sql_import.sh
|
||||||
|
|
|
@ -4,8 +4,9 @@ project (Sapphire)
|
||||||
|
|
||||||
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
|
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
|
||||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
set(EXECUTABLE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||||
|
|
||||||
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
|
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
@ -22,7 +23,7 @@ set(SAPPHIRE_BOOST_FOLDER_NAME boost_1_60_0)
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Common and library path
|
# Common and library path
|
||||||
set(SERVER_COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/servers/Server_Common")
|
set(SERVER_COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/common")
|
||||||
set(LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/libraries")
|
set(LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/libraries")
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -36,13 +37,12 @@ include( "cmake/compiler.cmake" )
|
||||||
##############################
|
##############################
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
git_describe(VERSION --tags --dirty=-d)
|
git_describe(VERSION --all --dirty=-d)
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/servers/Server_Common/Version.cpp.in"
|
configure_file("${SERVER_COMMON_DIR}/Version.cpp.in"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/servers/Server_Common/Version.cpp" @ONLY)
|
"${SERVER_COMMON_DIR}/Version.cpp" @ONLY)
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# Common include folders
|
# Common include folders
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/external/ChaiScript-6.0.0/include/")
|
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/sapphire/datReader/")
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/sapphire/datReader/")
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/sapphire/mysqlConnector/")
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/sapphire/mysqlConnector/")
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src")
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||||
|
@ -61,8 +61,12 @@ add_subdirectory("src/servers")
|
||||||
add_subdirectory("src/libraries/sapphire/datReader")
|
add_subdirectory("src/libraries/sapphire/datReader")
|
||||||
add_subdirectory("src/libraries/sapphire/mysqlConnector")
|
add_subdirectory("src/libraries/sapphire/mysqlConnector")
|
||||||
|
|
||||||
|
add_subdirectory("src/common")
|
||||||
|
|
||||||
add_subdirectory("src/tools/exd_common_gen")
|
add_subdirectory("src/tools/exd_common_gen")
|
||||||
add_subdirectory("src/tools/exd_struct_gen")
|
add_subdirectory("src/tools/exd_struct_gen")
|
||||||
add_subdirectory("src/tools/exd_struct_test")
|
add_subdirectory("src/tools/exd_struct_test")
|
||||||
add_subdirectory("src/tools/quest_parser")
|
add_subdirectory("src/tools/quest_parser")
|
||||||
add_subdirectory("src/tools/pcb_reader")
|
#add_subdirectory("src/tools/pcb_reader")
|
||||||
|
|
||||||
|
add_subdirectory("scripts/native")
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<Settings>
|
<Settings>
|
||||||
|
|
||||||
<General>
|
<General>
|
||||||
<!-- Port the zone server accepts game conenctions on -->
|
<!-- Port the zone server accepts game conenctions on -->
|
||||||
<ListenPort>54992</ListenPort>
|
<ListenPort>54992</ListenPort>
|
||||||
|
@ -7,8 +6,22 @@
|
||||||
<ListenIp>127.0.0.1</ListenIp>
|
<ListenIp>127.0.0.1</ListenIp>
|
||||||
<!-- Path of FFXIV dat files -->
|
<!-- Path of FFXIV dat files -->
|
||||||
<DataPath>C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv</DataPath>
|
<DataPath>C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv</DataPath>
|
||||||
|
|
||||||
|
<Scripts>
|
||||||
|
<!-- where compiled scripts are placed -->
|
||||||
|
<Path>./compiledscripts/</Path>
|
||||||
|
<CachePath>./cache/</CachePath>
|
||||||
|
|
||||||
|
<HotSwap>
|
||||||
|
<Enabled>1</Enabled>
|
||||||
|
<ScriptsDir>../scripts/native/</ScriptsDir>
|
||||||
|
<BuildDir>../cmake-build-debug/</BuildDir>
|
||||||
|
<BuildCmd>cmake --build %1% --target %2%</BuildCmd>
|
||||||
|
</HotSwap>
|
||||||
|
</Scripts>
|
||||||
|
|
||||||
<!-- Path of Chai script files -->
|
<!-- Path of Chai script files -->
|
||||||
<ScriptPath>../scripts/chai</ScriptPath>
|
<ScriptPath>./compiledscripts/</ScriptPath>
|
||||||
<!-- Connection settings for the mysql db -->
|
<!-- Connection settings for the mysql db -->
|
||||||
<Mysql>
|
<Mysql>
|
||||||
<Host>127.0.0.1</Host>
|
<Host>127.0.0.1</Host>
|
||||||
|
|
|
@ -11,6 +11,7 @@ if(UNIX)
|
||||||
/usr/local/mysql/include/mysql
|
/usr/local/mysql/include/mysql
|
||||||
$ENV{ProgramFiles}/MySQL/*/include
|
$ENV{ProgramFiles}/MySQL/*/include
|
||||||
$ENV{SystemDrive}/MySQL/*/include
|
$ENV{SystemDrive}/MySQL/*/include
|
||||||
|
${LIBRARY_DIR}/external/MySQL/
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MYSQL_INCLUDE_DIR)
|
if(MYSQL_INCLUDE_DIR)
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
|
|
||||||
class CmnDefCutSceneReplayDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def CmnDefCutSceneReplayDef()
|
|
||||||
{
|
|
||||||
this.id = 721028;
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 1/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 != 0 )
|
|
||||||
{
|
|
||||||
CmnDefCutSceneReplay.Scene00001( player, param2 );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player, returnScene )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0xFB2EC8F8/*flags*/, 0/*unk*/, 1, returnScene,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL CmnDefCutSceneReplay = CmnDefCutSceneReplayDef();
|
|
|
@ -1,61 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
|
|
||||||
|
|
||||||
// Quest Script: SubFst004_00027
|
|
||||||
// Quest Name: Preserving the Past
|
|
||||||
// Quest ID: 65563
|
|
||||||
// Start NPC: 1000194
|
|
||||||
// End NPC: 1000789
|
|
||||||
|
|
||||||
class CmnDefCutSceneReplayDef
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
var quest_name
|
|
||||||
var quest_id
|
|
||||||
|
|
||||||
// These are the quest vars / flags used in this quest
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
attr onScene00000;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
var RewardExpFactor;
|
|
||||||
var RewardItem;
|
|
||||||
var RewardItemCount;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
// some of these may be useful
|
|
||||||
var ACTOR0;
|
|
||||||
var ACTOR1;
|
|
||||||
var ACTOR2;
|
|
||||||
var ITEM0;
|
|
||||||
|
|
||||||
def CmnDefCutSceneReplayDef()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player, eventId, flags, unk, unk1 )
|
|
||||||
{
|
|
||||||
player.eventPlay(eventId, 0, 0x2000, unk, 1,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.eventFinish(eventId, 1);
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
def CmnDefCutSceneReplay_START(player, actorId, eventId)
|
|
||||||
{
|
|
||||||
var quest = CmnDefCutSceneReplay();
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
player.eventStart( actorId, eventId, 1, 0, 0 );
|
|
||||||
CmnDefCutSceneReplay.Scene00000( player, eventId, 0, 0, 0 );
|
|
||||||
}
|
|
|
@ -1,62 +0,0 @@
|
||||||
|
|
||||||
class CmnDefInnBedDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def CmnDefInnBedDef()
|
|
||||||
{
|
|
||||||
this.id = 720916;
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player ) //Menu
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 1/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 > 1 )
|
|
||||||
{
|
|
||||||
CmnDefInnBed.Scene00001( player, param2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player, what ) //Lay down
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0xF32E48F8/*flags*/, 0/*unk*/, 1/*unk*/, what,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
CmnDefInnBed.Scene00002( player, param2 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player, what ) //Log out
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, 0xF32E48F8/*flags*/, 0/*unk*/, 1/*unk*/, what,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player ) //Wake up
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, 0x800/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
def onEnterTerritory( eventId, player, param1, param2 )
|
|
||||||
{
|
|
||||||
this.Scene00100( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL CmnDefInnBed = CmnDefInnBedDef();
|
|
|
@ -1,75 +0,0 @@
|
||||||
|
|
||||||
class CmnDefLinkShellDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def CmnDefLinkShellDef()
|
|
||||||
{
|
|
||||||
this.ACTION_CREATE = 2;
|
|
||||||
this.ACTION_RENAME = 3;
|
|
||||||
this.ACTION_REMOVE = 4;
|
|
||||||
this.id = 0xB0006;
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
switch( param2 )
|
|
||||||
{
|
|
||||||
case( CmnDefLinkShell.ACTION_CREATE )
|
|
||||||
{
|
|
||||||
CmnDefLinkShell.Scene00002( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case( CmnDefLinkShell.ACTION_RENAME )
|
|
||||||
{
|
|
||||||
CmnDefLinkShell.Scene00003( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case( CmnDefLinkShell.ACTION_REMOVE )
|
|
||||||
{
|
|
||||||
CmnDefLinkShell.Scene00004( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player ) // Create Linkshell
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player ) // Rename Linkshell
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player ) // Delete Linkshell
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
this.Scene00001( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
global CmnDefLinkShell = CmnDefLinkShellDef();
|
|
|
@ -1,26 +0,0 @@
|
||||||
|
|
||||||
class HouFurOrchestrionDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def HouFurOrchestrionDef()
|
|
||||||
{
|
|
||||||
this.id = 721226;
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 1/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL HouFurOrchestrion = HouFurOrchestrionDef();
|
|
|
@ -1,57 +0,0 @@
|
||||||
//Aethernet - Aetheryte
|
|
||||||
|
|
||||||
class AethernetDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def AethernetDef()
|
|
||||||
{
|
|
||||||
this.AetheryteBaseId = 0x50000;
|
|
||||||
this.AETHERYTE_MENU_AETHERNET = 1;
|
|
||||||
this.AETHERYTE_MENU_HOUSING = 2;
|
|
||||||
this.AETHERYTE_MENU_HOME_POINT = 3;
|
|
||||||
this.AETHERYTE_MENU_FAVORITE_POINT = 4;
|
|
||||||
this.AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 2, NONE,
|
|
||||||
fun ( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var aetherId = eventId & 0xFFFF;
|
|
||||||
|
|
||||||
if ( param1 == 256 ) // aethernet
|
|
||||||
{
|
|
||||||
//player.setTeleporting( true );
|
|
||||||
player.teleport( param2, 2 );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var ACTION_ATTUNE = 0x13;
|
|
||||||
player.eventActionStart( eventId,
|
|
||||||
ACTION_ATTUNE,
|
|
||||||
// callback function for finished casting
|
|
||||||
fun ( player, eventId, additional )
|
|
||||||
{
|
|
||||||
|
|
||||||
var aetherId = eventId & 0xFFFF;
|
|
||||||
player.aetheryteRegister( aetherId );
|
|
||||||
player.eventPlay( eventId, 3, 0, 0, 0);
|
|
||||||
|
|
||||||
},
|
|
||||||
// callback for interrupted action.
|
|
||||||
fun ( player, eventId, additional ){},
|
|
||||||
0);
|
|
||||||
player.unlock();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
GLOBAL Aethernet = AethernetDef();
|
|
|
@ -1,70 +0,0 @@
|
||||||
//Aethernet - Aetheryte
|
|
||||||
|
|
||||||
class AetheryteDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def AetheryteDef()
|
|
||||||
{
|
|
||||||
this.AetheryteBaseId = 0x50000;
|
|
||||||
this.AETHERYTE_MENU_AETHERNET = 1;
|
|
||||||
this.AETHERYTE_MENU_HOUSING = 2;
|
|
||||||
this.AETHERYTE_MENU_HOME_POINT = 3;
|
|
||||||
this.AETHERYTE_MENU_FAVORITE_POINT = 4;
|
|
||||||
this.AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 0, 1,
|
|
||||||
fun ( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var aetherId = eventId & 0xFFFF;
|
|
||||||
|
|
||||||
if ( param1 == 256 ) // set homepoint
|
|
||||||
{
|
|
||||||
player.setHomepoint( aetherId );
|
|
||||||
player.questMessage( eventId, 2, 0xEA, 0, 0);
|
|
||||||
}
|
|
||||||
else if ( param1 == 512 && param2 == 4 ) // aethernet
|
|
||||||
{
|
|
||||||
player.teleport( param3, 2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var ACTION_ATTUNE = 0x13;
|
|
||||||
player.eventActionStart(eventId,
|
|
||||||
ACTION_ATTUNE,
|
|
||||||
// callback function for finished casting
|
|
||||||
fun ( player, eventId, additional )
|
|
||||||
{
|
|
||||||
var aetherId = eventId & 0xFFFF;
|
|
||||||
player.aetheryteRegister(aetherId);
|
|
||||||
|
|
||||||
// check if teleport is already unlocked
|
|
||||||
if( player.isActionLearned( 4 ) )
|
|
||||||
{
|
|
||||||
player.questMessage( eventId, 0, 2, 0, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.questMessage( eventId, 0, 1, 1, 0);
|
|
||||||
player.learnAction( 4 );
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// callback for interrupted action.
|
|
||||||
fun ( player, eventId, additional )
|
|
||||||
{
|
|
||||||
},
|
|
||||||
0);
|
|
||||||
player.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GLOBAL Aetheryte = AetheryteDef();
|
|
|
@ -1,236 +0,0 @@
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
// Quest sequence
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
global SEQ_COMPLETE = 0xFF
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
// SCENE_FLAGS
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
global SET_EOBJ_BASE = 0xF8400EF3
|
|
||||||
global SET_INVIS_BASE = 0xF8400FFF
|
|
||||||
global SET_BASE = 0xF8400EFB
|
|
||||||
global INVIS_COMPANION = 0x80000000
|
|
||||||
global INVIS_ALLIANCE_BUDDY = 0x40000000
|
|
||||||
global INVIS_ALLIANCE_PC = 0x20000000
|
|
||||||
global INVIS_AOE = 0x08000000
|
|
||||||
global DISABLE_CANCEL_EMOTE = 0x04000000
|
|
||||||
global LOCK_HOTBAR = 0x02000000
|
|
||||||
global LOCK_HUD = 0x01000000
|
|
||||||
global ROLLBACK_HIDE_UI = 0x00800000
|
|
||||||
global DISABLE_STEALTH = 0x00400000
|
|
||||||
global HIDE_FESTIVAL = 0x00200000
|
|
||||||
global DISABLE_SKIP = 0x00080000
|
|
||||||
global SILENT_ENTER_TERRI_ALL = 0x00038000
|
|
||||||
global SILENT_ENTER_TERRI_SE = 0x00020000
|
|
||||||
global SILENT_ENTER_TERRI_BGM = 0x00010000
|
|
||||||
global SILENT_ENTER_TERRI_ENV = 0x00008000
|
|
||||||
global INVINCIBLE = 0x00004000
|
|
||||||
global HIDE_HOTBAR = 0x00002000
|
|
||||||
global AUTO_LOC_CAMERA = 0x00001000
|
|
||||||
global INVIS_ALL = 0xF80003FC
|
|
||||||
global HIDE_UI = 0x00000800
|
|
||||||
global CONDITION_CUTSCENE = 0x00000400
|
|
||||||
global INVIS_TREASURE = 0x00000200
|
|
||||||
global INVIS_AETHERYTE = 0x00000100
|
|
||||||
global INVIS_GATHERING_POINT = 0x00000080
|
|
||||||
global INVIS_PARTY_BUDDY = 0x10000000
|
|
||||||
global INVIS_PARTY_PC = 0x00000040
|
|
||||||
global INVIS_OTHER_PC = 0x00000020
|
|
||||||
global INVIS_BNPC = 0x00000010
|
|
||||||
global INVIS_EOBJ = 0x00000008
|
|
||||||
global INVIS_ENPC = 0x00000004
|
|
||||||
global FADE_OUT = 0x00000002
|
|
||||||
global NO_DEFAULT_CAMERA = 0x00000001
|
|
||||||
global NONE = 0x00000000
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Types
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
global EVENT_TALK = 1
|
|
||||||
global EVENT_EMOTE = 2
|
|
||||||
global EVENT_DISTANCE_BELOW = 3
|
|
||||||
global EVENT_DISTANCE_OVER = 4
|
|
||||||
global EVENT_BATTLE_REWARD = 5
|
|
||||||
global EVENT_CRAFT = 6
|
|
||||||
global EVENT_NEST = 7
|
|
||||||
global EVENT_EVENT_ITEM = 8
|
|
||||||
global EVENT_DROP = 9
|
|
||||||
global EVENT_WITHIN_RANGE = 10
|
|
||||||
global EVENT_OUTSIDE_RANGE = 11
|
|
||||||
global EVENT_GAME_START = 12
|
|
||||||
global EVENT_GAME_PROGRESS = 13
|
|
||||||
global EVENT_ENTER_TERRITORY = 15
|
|
||||||
global EVENT_GAME_COME_BACK = 17
|
|
||||||
global EVENT_ACTION_RESULT = 18
|
|
||||||
global EVENT_MATERIA_CRAFT = 19
|
|
||||||
global EVENT_FISHING = 20
|
|
||||||
global EVENT_UI = 21
|
|
||||||
global EVENT_HOUSING = 22
|
|
||||||
global EVENT_SAY = 23
|
|
||||||
global EVENT_TABLE_GAME = 24
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
// Event finish states
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
global UNLOCK = 1
|
|
||||||
global KEEPLOCK = 0
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
// Possible Event Types
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
global ACTOR_EVENT_ON_CREATE = 1
|
|
||||||
global ACTOR_EVENT_ON_SPAWN = 2
|
|
||||||
global ACTOR_EVENT_ON_DESPAWN = 3
|
|
||||||
global ACTOR_EVENT_ON_AI_TICK = 4
|
|
||||||
global ACTOR_EVENT_ON_TALK_DEFAULT = 5
|
|
||||||
|
|
||||||
global MOB_EVENT_ON_DEATH = 1
|
|
||||||
|
|
||||||
global REGION_EVENT_ON_CREATE= 1
|
|
||||||
global REGION_EVENT_ON_ENTER = 2
|
|
||||||
global REGION_EVENT_ON_LEAVE = 3
|
|
||||||
|
|
||||||
global PLAYER_EVENT_ON_FIRST_ENTER_WORLD = 1
|
|
||||||
global PLAYER_EVENT_ON_ENTER_WORLD = 2
|
|
||||||
global PLAYER_EVENT_ON_DEATH = 3
|
|
||||||
global PLAYER_EVENT_ON_LOGIN = 4
|
|
||||||
global PLAYER_EVENT_ON_LOGOUT = 5
|
|
||||||
|
|
||||||
// End Event Types
|
|
||||||
|
|
||||||
global SLOT_MAINH = 0
|
|
||||||
global SLOT_OFFH = 1
|
|
||||||
global SLOT_HEAD = 2
|
|
||||||
global SLOT_BODY = 3
|
|
||||||
global SLOT_GLOVES = 4
|
|
||||||
global SLOT_WAIST = 5
|
|
||||||
global SLOT_LEGS = 6
|
|
||||||
global SLOT_FEET = 7
|
|
||||||
|
|
||||||
global GENDER_MALE = 0
|
|
||||||
global GENDER_FEMALE = 1
|
|
||||||
|
|
||||||
global ACTION_EVENT_START = 1
|
|
||||||
global ACTION_EVENT_RETURN = 2
|
|
||||||
global ACTION_EVENT_TRADE_RETURN = 3
|
|
||||||
global ACTION_ERANGE_EVENT_START = 4
|
|
||||||
global ACTION_EVENT_EMOTE = 5
|
|
||||||
|
|
||||||
global ACTION_RETURN = 0x26
|
|
||||||
global ACTION_TELEPORT = 0x29
|
|
||||||
|
|
||||||
global EVENTACTION_ATTUNE = 0x13
|
|
||||||
|
|
||||||
global CLASS_GLA = 1
|
|
||||||
global CLASS_PUG = 2
|
|
||||||
global CLASS_MRD = 3
|
|
||||||
global CLASS_LNC = 4
|
|
||||||
global CLASS_ARC = 5
|
|
||||||
global CLASS_CON = 6
|
|
||||||
global CLASS_THM = 7
|
|
||||||
global CLASS_CRP = 8
|
|
||||||
global CLASS_BSM = 9
|
|
||||||
global CLASS_ARM = 10
|
|
||||||
global CLASS_GLD = 11
|
|
||||||
global CLASS_TAN = 12
|
|
||||||
global CLASS_WVR = 13
|
|
||||||
global CLASS_ALC = 14
|
|
||||||
global CLASS_CUL = 15
|
|
||||||
global CLASS_MIN = 16
|
|
||||||
global CLASS_BOT = 17
|
|
||||||
global CLASS_FSH = 18
|
|
||||||
global CLASS_PLD = 19
|
|
||||||
global CLASS_MNK = 20
|
|
||||||
global CLASS_WAR = 21
|
|
||||||
global CLASS_DRG = 22
|
|
||||||
global CLASS_BRD = 23
|
|
||||||
global CLASS_WHM = 24
|
|
||||||
global CLASS_BLM = 25
|
|
||||||
global CLASS_ACN = 26
|
|
||||||
global CLASS_SMN = 27
|
|
||||||
global CLASS_SCH = 28
|
|
||||||
global CLASS_ROG = 29
|
|
||||||
global CLASS_NIN = 30
|
|
||||||
global CLASS_MCH = 31
|
|
||||||
global CLASS_DRK = 32
|
|
||||||
global CLASS_AST = 33
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
|
||||||
// Inventory Enums
|
|
||||||
///////////////////////////////////////////////////////////////
|
|
||||||
global INVENTORY_BAG0 = 0
|
|
||||||
global INVENTORY_BAG1 = 1
|
|
||||||
global INVENTORY_BAG2 = 2
|
|
||||||
global INVENTORY_BAG3 = 3
|
|
||||||
|
|
||||||
global INVENTORY_GEARSET0 = 1000
|
|
||||||
global INVENTORY_GEARSET1 = 1001
|
|
||||||
|
|
||||||
global INVENTORY_CURRENCY = 2000
|
|
||||||
global INVENTORY_CRYSTAL = 2001
|
|
||||||
//global INVENTORY_UNKNOWN_0 = 2003
|
|
||||||
global INVENTORY_KEYITEM = 2004
|
|
||||||
global INVENTORY_DAMAGEDGEAR = 2007
|
|
||||||
//global INVENTORY_UNKNOWN_1 = 2008
|
|
||||||
|
|
||||||
global INVENTORY_ARMORYOFF = 3200
|
|
||||||
global INVENTORY_ARMORYHEAD = 3201
|
|
||||||
global INVENTORY_ARMORYBODY = 3202
|
|
||||||
global INVENTORY_ARMORYHAND = 3203
|
|
||||||
global INVENTORY_ARMORYWAIST = 3204
|
|
||||||
global INVENTORY_ARMORYLEGS = 3205
|
|
||||||
global INVENTORY_ARMORYFEET = 3206
|
|
||||||
global INVENTORY_ARMOTYNECK = 3207
|
|
||||||
global INVENTORY_ARMORYEAR = 3208
|
|
||||||
global INVENTORY_ARMORYWRIST = 3209
|
|
||||||
global INVENTORY_ARMORYRING = 3300
|
|
||||||
|
|
||||||
global INVENTORY_ARMORYSOULCRYSTAL = 3400
|
|
||||||
global INVENTORY_ARMORYMAIN = 3500
|
|
||||||
|
|
||||||
global INVENTORY_RETAINERBAG0 = 10000
|
|
||||||
global INVENTORY_RETAINERBAG1 = 10001
|
|
||||||
global INVENTORY_RETAINERBAG2 = 10002
|
|
||||||
global INVENTORY_RETAINERBAG3 = 10003
|
|
||||||
global INVENTORY_RETAINERBAG4 = 10004
|
|
||||||
global INVENTORY_RETAINERBAG5 = 10005
|
|
||||||
global INVENTORY_RETAINERBAG6 = 10006
|
|
||||||
global INVENTORY_RETAINEREQUIPPEDGEAR = 11000
|
|
||||||
global INVENTORY_RETAINERGIL = 12000
|
|
||||||
global INVENTORY_RETAINERCRYSTAL = 12001
|
|
||||||
global INVENTORY_RETAINERMARKET = 12002
|
|
||||||
|
|
||||||
global INVENTORY_FREECOMPANYBAG0 = 20000
|
|
||||||
global INVENTORY_FREECOMPANYBAG1 = 20001
|
|
||||||
global INVENTORY_FREECOMPANYBAG2 = 20002
|
|
||||||
global INVENTORY_FREECOMPANYGIL = 22000
|
|
||||||
global INVENTORY_FREECOMPANYCRYSTAL = 22001
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
// Currency types
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
global CURRENCY_GIL = 0X01
|
|
||||||
global CURRENCY_STORMSEAL = 0X02
|
|
||||||
global CURRENCY_SERPENTSEAL = 0X03
|
|
||||||
global CURRENCY_FLAMESEAL = 0X04
|
|
||||||
global CURRENCY_TOMESTONEPHILO = 0X05
|
|
||||||
global CURRENCY_TOMESTONEMYTHO = 0X06
|
|
||||||
global CURRENCY_WOLFMARK = 0X07
|
|
||||||
global CURRENCY_TOMESTONESOLD = 0X08
|
|
||||||
global CURRENCY_ALLIEDSEAL = 0X09
|
|
||||||
global CURRENCY_TOMESTONEPOET = 0X0A
|
|
||||||
global CURRENCY_MGP = 0X0B
|
|
||||||
global CURRENCY_TOMESTONELAW = 0X0C
|
|
||||||
global CURRENCY_TOMESTONEESO = 0X0D
|
|
||||||
global CURRENCY_TOMESTONELORE = 0X0E
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
// Skill handle types
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
global STD_DAMAGE = 0X03
|
|
||||||
global STD_HEAL = 0X04
|
|
||||||
global STD_MP_LOSS = 0X0A
|
|
||||||
global STD_MP_GAIN = 0X0B
|
|
||||||
global STD_TP_LOSS = 0X0C
|
|
||||||
global STD_TP_GAIN = 0X0D
|
|
|
@ -1,97 +0,0 @@
|
||||||
// Opening Script: OpeningGridania
|
|
||||||
// Quest Name: OpeningGridania
|
|
||||||
// Quest ID: 1245186
|
|
||||||
|
|
||||||
class OpeningGridaniaDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def OpeningGridaniaDef()
|
|
||||||
{
|
|
||||||
this.id = 1245186;
|
|
||||||
this.name = "OpeningGridania";
|
|
||||||
|
|
||||||
this.ERANGE_HOWTO_ANN_AND_QUEST = 2117539;
|
|
||||||
this.ERANGE_HOWTO_QUEST_REWARD = 2366417;
|
|
||||||
this.ERANGE_SEQ_1_CLOSED_1 = 2351918;
|
|
||||||
this.POS_SEQ_1_CLOSED_RETURN_1 = 2351921;
|
|
||||||
this.ERANGE_SEQ_1_CLOSED_2 = 2351919;
|
|
||||||
this.POS_SEQ_1_CLOSED_RETURN_2 = 2351921;
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_1 = 2280846;
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_1 = 2320804;
|
|
||||||
this.ENPC_ALWAYS_CLOSED_1 = 2367988;
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_3 = 2280851;
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_3 = 2320811;
|
|
||||||
this.ENPC_ALWAYS_CLOSED_3 = 2563491;
|
|
||||||
this.BGM_MUSIC_ZONE_FST_TWN = 1003;
|
|
||||||
this.NCUT_FST_1 = 3;
|
|
||||||
this.NCUT_FST_2 = 53;
|
|
||||||
this.NCUT_FST_3 = 226;
|
|
||||||
this.ENPC_QUEST_OFFER = 1985150;
|
|
||||||
this.NCUT_LIGHT_ALL = 2;
|
|
||||||
this.NCUT_LIGHT_FST_1 = 147;
|
|
||||||
this.NCUT_LIGHT_FST_2 = 146;
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x04AC05, 0, 1,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setOpeningSequence( 1 );
|
|
||||||
OpeningGridania.Scene00001( player );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00020( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00030( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00040( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 40, 1, 2, 1,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( player.getOpeningSequence() == 2 )
|
|
||||||
{
|
|
||||||
// update the instance boundaries
|
|
||||||
OpeningGridania.Scene00030( player );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////// EVENT HANDLERS //////////////////////////////////
|
|
||||||
|
|
||||||
def onEnterTerritory( eventId, player, param1, param2)
|
|
||||||
{
|
|
||||||
if( player.getOpeningSequence() == 0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Scene00040( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onWithinRange( eventId, player, param1, x, y, z)
|
|
||||||
{
|
|
||||||
if( this.ERANGE_ALWAYS_CLOSED_3 == param1 )
|
|
||||||
{
|
|
||||||
this.Scene00020( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL OpeningGridania = OpeningGridaniaDef();
|
|
|
@ -1,107 +0,0 @@
|
||||||
// Opening Script: OpeningLimsaLominsa
|
|
||||||
// Quest Name: OpeningLimsaLominsa
|
|
||||||
// Quest ID: 1245185
|
|
||||||
|
|
||||||
class OpeningLimsaLominsaDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def OpeningLimsaLominsaDef()
|
|
||||||
{
|
|
||||||
this.id = 1245185;
|
|
||||||
this.name = "OpeningLimsaLominsa";
|
|
||||||
|
|
||||||
this.ERANGE_HOWTO_ANN_AND_QUEST = 4101831
|
|
||||||
this.ERANGE_HOWTO_QUEST_REWARD = 4102066
|
|
||||||
this.ERANGE_SEQ_1_CLOSED_1 = 4101785
|
|
||||||
this.POS_SEQ_1_CLOSED_RETURN_1 = 4101797
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_1 = 4101744
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_1 = 4101761
|
|
||||||
this.ENPC_ALWAYS_CLOSED_1 = 4102038
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_2 = 4101746
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_2 = 4101763
|
|
||||||
this.ENPC_ALWAYS_CLOSED_2 = 4102036
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_3 = 4101967
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_3 = 4101982
|
|
||||||
this.ENPC_ALWAYS_CLOSED_3 = 4102033
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_4 = 4101970
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_4 = 4101984
|
|
||||||
this.ENPC_ALWAYS_CLOSED_4 = 4102031
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_5 = 4101973
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_5 = 4101985
|
|
||||||
this.ENPC_ALWAYS_CLOSED_5 = 4102007
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_6 = 4101979
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_6 = 4101988
|
|
||||||
this.ENPC_ALWAYS_CLOSED_6 = 2367400
|
|
||||||
this.BGM_MUSIC_ZONE_SEA_TWN = 1020
|
|
||||||
this.NCUT_SEA_1 = 200
|
|
||||||
this.NCUT_SEA_2 = 132
|
|
||||||
this.NCUT_SEA_3 = 201
|
|
||||||
this.ENPC_QUEST_OFFER = 4102039
|
|
||||||
this.NCUT_LIGHT_ALL = 2
|
|
||||||
this.NCUT_LIGHT_SEA_1 = 147
|
|
||||||
this.NCUT_LIGHT_SEA_2 = 138
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x04AC05, 0, 1,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setOpeningSequence( 1 );
|
|
||||||
OpeningLimsaLominsa.Scene00001( player );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00020( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00030( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00040( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 40, 1, 2, 1,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( player.getOpeningSequence() == 2 )
|
|
||||||
{
|
|
||||||
// update the instance boundaries
|
|
||||||
OpeningLimsaLominsa.Scene00030( player );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////// EVENT HANDLERS //////////////////////////////////
|
|
||||||
|
|
||||||
def onEnterTerritory( eventId, player, param1, param2)
|
|
||||||
{
|
|
||||||
if( player.getOpeningSequence() == 0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Scene00040( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onWithinRange( eventId, player, param1, x, y, z)
|
|
||||||
{
|
|
||||||
if( this.ERANGE_SEQ_1_CLOSED_1 == param1 )
|
|
||||||
{
|
|
||||||
this.Scene00020( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL OpeningLimsaLominsa = OpeningLimsaLominsaDef();
|
|
|
@ -1,98 +0,0 @@
|
||||||
// Opening Script: OpeningUldah
|
|
||||||
// Quest Name: OpeningUldah
|
|
||||||
// Quest ID: 1245187
|
|
||||||
|
|
||||||
class OpeningUldahDef
|
|
||||||
{
|
|
||||||
|
|
||||||
def OpeningUldahDef()
|
|
||||||
{
|
|
||||||
this.id = 1245187;
|
|
||||||
this.name = "OpeningUldah";
|
|
||||||
|
|
||||||
this.ERANGE_HOWTO_ANN_AND_QUEST = 4101650;
|
|
||||||
this.ERANGE_HOWTO_QUEST_REWARD = 4102883;
|
|
||||||
this.ERANGE_SEQ_1_CLOSED_1 = 4101587;
|
|
||||||
this.POS_SEQ_1_CLOSED_RETURN_1 = 4101691;
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_1 = 4101537;
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_1 = 4101685;
|
|
||||||
this.ENPC_ALWAYS_CLOSED_1 = 4101796;
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_2 = 4101525;
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_2 = 4101680;
|
|
||||||
this.ENPC_ALWAYS_CLOSED_2 = 4101789;
|
|
||||||
this.ERANGE_ALWAYS_CLOSED_3 = 4101535;
|
|
||||||
this.POS_ALWAYS_CLOSED_RETURN_3 = 4101681;
|
|
||||||
this.ENPC_ALWAYS_CLOSED_3 = 4101787;
|
|
||||||
this.BGM_MUSIC_ZONE_WIL_TWN = 1035;
|
|
||||||
this.NCUT_WIL_1 = 186;
|
|
||||||
this.NCUT_WIL_2 = 139;
|
|
||||||
this.NCUT_WIL_3 = 187;
|
|
||||||
this.ENPC_QUEST_OFFER = 3969639;
|
|
||||||
this.NCUT_LIGHT_ALL = 2;
|
|
||||||
this.NCUT_LIGHT_WIL_1 = 147;
|
|
||||||
this.NCUT_LIGHT_WIL_2 = 145;
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x04AC05, 0, 1,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setOpeningSequence( 1 );
|
|
||||||
OpeningUldah.Scene00001( player );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00020( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00030( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00040( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 40, 1, 2, 1,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( player.getOpeningSequence() == 2 )
|
|
||||||
{
|
|
||||||
// update the instance boundaries
|
|
||||||
OpeningUldah.Scene00030( player );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////// EVENT HANDLERS //////////////////////////////////
|
|
||||||
|
|
||||||
def onEnterTerritory( eventId, player, param1, param2)
|
|
||||||
{
|
|
||||||
if( player.getOpeningSequence() == 0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Scene00040( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onOutsideRange( eventId, player, param1, x, y, z)
|
|
||||||
{
|
|
||||||
if( this.ERANGE_SEQ_1_CLOSED_1 == param1 )
|
|
||||||
{
|
|
||||||
this.Scene00020( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL OpeningUldah = OpeningUldahDef();
|
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
def onFirstEnterWorld(player)
|
|
||||||
{
|
|
||||||
var name = player.getName();
|
|
||||||
var race = player.getRace();
|
|
||||||
var gender = player.getGender();
|
|
||||||
//var class = player.getClass();
|
|
||||||
|
|
||||||
|
|
||||||
return name;
|
|
||||||
}
|
|
|
@ -1,124 +0,0 @@
|
||||||
// Quest Script: ManFst001_00039
|
|
||||||
// Quest Name: Coming to Gridania
|
|
||||||
// Quest ID: 65575
|
|
||||||
// Start NPC: 1001148
|
|
||||||
// End NPC: 1001140
|
|
||||||
|
|
||||||
class ManFst001Def
|
|
||||||
{
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default ctor
|
|
||||||
def ManFst001Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Coming to Gridania";
|
|
||||||
this.id = 65575;
|
|
||||||
// These are the quest vars / flags used in this quest
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 103;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
// some of these may be useful
|
|
||||||
this.ACTOR0 = 1001148;
|
|
||||||
this.ACTOR1 = 1001140;
|
|
||||||
this.CUT_EVENT = 29;
|
|
||||||
this.EOBJECT0 = 2001659;
|
|
||||||
this.EOBJECT1 = 2001660;
|
|
||||||
this.EOBJECT7 = 2616477;
|
|
||||||
this.EVENT_ACTION_SEARCH = 1;
|
|
||||||
this.HOWTO_QUEST_ACCEPT = 12;
|
|
||||||
this.HOWTO_QUEST_ANNOUNCE = 2;
|
|
||||||
this.HOWTO_REWARD = 11;
|
|
||||||
this.HOWTO_TODO = 3;
|
|
||||||
this.OPENING_EVENT_HANDLER = 1245186;
|
|
||||||
this.SEQ_2_ACTOR1 = 2;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.setOpeningSequence( 2 );
|
|
||||||
ManFst001.Scene00001( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0xF8482EFB/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst001.Scene00002( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( ManFst001.id, ManFst001.SEQ_FINISH );// add quest to player.
|
|
||||||
|
|
||||||
// this is an external event, so we do need to start it here
|
|
||||||
//player.eventStart( player.getId(), ManFst001.OPENING_EVENT_HANDLER, 7, 0, 0 ); // update the instance boundaries, call to the opening event
|
|
||||||
player.eventPlay( ManFst001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0x2c02, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst001.Scene00005( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, 0x20/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // clicked finish button
|
|
||||||
{
|
|
||||||
player.gainExp( 50 );
|
|
||||||
player.addCurrency( 1, ManFst001.RewardGil );
|
|
||||||
player.questFinish( ManFst001.id );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR1 )
|
|
||||||
{
|
|
||||||
this.Scene00004( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManFst001 = ManFst001Def();
|
|
||||||
|
|
||||||
|
|
|
@ -1,258 +0,0 @@
|
||||||
// Quest Script: ManFst002_00124
|
|
||||||
// Quest Name: Close to Home
|
|
||||||
// Quest ID: 65660
|
|
||||||
// Start NPC: 1001140
|
|
||||||
// End NPC: 1000100
|
|
||||||
|
|
||||||
class ManFst002Def
|
|
||||||
{
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default ctor
|
|
||||||
def ManFst002Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Close to Home";
|
|
||||||
this.id = 65621;
|
|
||||||
|
|
||||||
// These are the quest vars / flags used in this quest
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL -- attube to Aetheryte
|
|
||||||
// GetQuestUI8BH -- visit class guild
|
|
||||||
// GetQuestUI8BL -- Listen to Parsement in the market check mark
|
|
||||||
// GetQuestUI8CH -- recieve Key item
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
//this.SEQ_OFFER = ?;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardGil = 107;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
// some of these may be useful
|
|
||||||
this.ACTOR0 = 1001140;
|
|
||||||
this.ACTOR1 = 2;
|
|
||||||
this.ACTOR2 = 1000251;
|
|
||||||
this.ACTOR20 = 1000159;
|
|
||||||
this.ACTOR3 = 1000768;
|
|
||||||
this.ACTOR4 = 1000100;
|
|
||||||
this.BIND_ACTOR0 = 6229224;
|
|
||||||
this.HOW_TO_DESION = 13;
|
|
||||||
this.HOW_TO_MAP_AND_NAVI = 4;
|
|
||||||
this.ITEM0 = 2000074;
|
|
||||||
this.LOC_ACTOR0 = 1003159;
|
|
||||||
this.LOC_MARKER_01 = 2153091;
|
|
||||||
this.LOC_MARKER_02 = 2153104;
|
|
||||||
this.LOC_MARKER_03 = 2153111;
|
|
||||||
this.LOC_MARKER_04 = 2154539;
|
|
||||||
this.LOC_MARKER_05 = 2154540;
|
|
||||||
this.LOC_MARKER_06 = 2154541;
|
|
||||||
this.LOC_MARKER_07 = 2210446;
|
|
||||||
this.LOC_MARKER_08 = 2210454;
|
|
||||||
this.LOC_MARKER_09 = 2210461;
|
|
||||||
this.LOC_MOTION0 = 799;
|
|
||||||
this.POPRANGE0 = 2280858;
|
|
||||||
this.REWARD_DESION = 1;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_0_ACTOR0_LQ = 50;
|
|
||||||
this.SEQ_1_ACTOR0 = 4;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_WAIT = 51;
|
|
||||||
this.SEQ_1_ACTOR2 = 2;
|
|
||||||
this.SEQ_1_ACTOR3 = 3;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
|
|
||||||
this.SEQ_2_ACTOR4 = 5;
|
|
||||||
this.TERRITORYTYPE0 = 132;
|
|
||||||
this.UNLOCK_DESION = 14;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def checkQuestCompletion( player, varIdx )
|
|
||||||
{
|
|
||||||
|
|
||||||
if (varIdx == 3)
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 1, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
else if (varIdx == 2)
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 2, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 0, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
var QUEST_VAR_ATTUNE = player.getQuestUI8AL( this.id );
|
|
||||||
var QUEST_VAR_CLASS = player.getQuestUI8BH( this.id );
|
|
||||||
var QUEST_VAR_TRADE = player.getQuestUI8BL( this.id );
|
|
||||||
|
|
||||||
if ( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
|
|
||||||
{
|
|
||||||
player.questUpdate( this.id, this.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
ManFst002.Scene00050( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( ManFst002.id, 1 );
|
|
||||||
ManFst002.checkQuestCompletion( player, 0 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8BH( ManFst002.id, 1 );
|
|
||||||
ManFst002.checkQuestCompletion( player, 3 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if ( param2 == 1 )
|
|
||||||
{
|
|
||||||
ManFst002.Scene00100( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ManFst002.Scene00099( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( ManFst002.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( ManFst002.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00050( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
// accepting quest "close to home"
|
|
||||||
player.questUpdate( ManFst002.id, 1 );
|
|
||||||
player.setQuestUI8CH( ManFst002.id, 1 ); // receive key item
|
|
||||||
// event is done, need to teleport to real zone.
|
|
||||||
player.setZone( 132 );
|
|
||||||
//player.setZone(183); back to starting griania for debug purpose
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00051( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 51, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst002.Scene00001( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst002.Scene00004( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, 0x0EFB, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8CH( ManFst002.id, 0 ); // remove key item, since we have just traded it
|
|
||||||
player.setQuestUI8BL( ManFst002.id, 1 );
|
|
||||||
ManFst002.checkQuestCompletion(player, 2 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR1 )
|
|
||||||
{
|
|
||||||
|
|
||||||
// starting the eventaction 0x13 ( attuning )
|
|
||||||
player.eventActionStart( 0x050002, 0x13,
|
|
||||||
fun( player, eventId, additional )
|
|
||||||
{
|
|
||||||
player.questMessage( 0x050002, 0, 1, 0, 0 );
|
|
||||||
player.aetheryteRegister( 2 );
|
|
||||||
player.learnAction( 1 );
|
|
||||||
ManFst002.Scene00051( player );
|
|
||||||
},
|
|
||||||
fun( player, eventId, additional ) {},
|
|
||||||
0x050002 );
|
|
||||||
player.unlock();
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR2 )
|
|
||||||
{
|
|
||||||
this.Scene00002( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR3 )
|
|
||||||
{
|
|
||||||
this.Scene00003( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR4 )
|
|
||||||
{
|
|
||||||
this.Scene00005( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManFst002 = ManFst002Def();
|
|
||||||
|
|
|
@ -1,257 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: ManFst003_00123
|
|
||||||
// Quest Name: Close to Home
|
|
||||||
// Quest ID: 65659
|
|
||||||
// Start NPC: 1001140
|
|
||||||
// End NPC: 1000100
|
|
||||||
|
|
||||||
class ManFst003Def
|
|
||||||
{
|
|
||||||
def ManFst003Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Close to Home";
|
|
||||||
this.id = 65659;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
// GetQuestUI8BL
|
|
||||||
// GetQuestUI8CH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardGil = 107;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1001140;
|
|
||||||
this.ACTOR1 = 2;
|
|
||||||
this.ACTOR2 = 1000197;
|
|
||||||
this.ACTOR20 = 1000159;
|
|
||||||
this.ACTOR3 = 1000768;
|
|
||||||
this.ACTOR4 = 1000100;
|
|
||||||
this.BIND_ACTOR0 = 6229224;
|
|
||||||
this.ITEM0 = 2000119;
|
|
||||||
this.LOC_ACTOR0 = 1003159;
|
|
||||||
this.LOC_MARKER_01 = 2153091;
|
|
||||||
this.LOC_MARKER_02 = 2153104;
|
|
||||||
this.LOC_MARKER_03 = 2153111;
|
|
||||||
this.LOC_MARKER_04 = 2154539;
|
|
||||||
this.LOC_MARKER_05 = 2154540;
|
|
||||||
this.LOC_MARKER_06 = 2154541;
|
|
||||||
this.LOC_MARKER_07 = 2210446;
|
|
||||||
this.LOC_MARKER_08 = 2210454;
|
|
||||||
this.LOC_MARKER_09 = 2210461;
|
|
||||||
this.LOC_MOTION0 = 799;
|
|
||||||
this.POPRANGE0 = 2280858;
|
|
||||||
this.REWARD_DESION = 1;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_0_ACTOR0_LQ = 50;
|
|
||||||
this.SEQ_1_ACTOR0 = 4;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_WAIT = 51;
|
|
||||||
this.SEQ_1_ACTOR2 = 2;
|
|
||||||
this.SEQ_1_ACTOR3 = 3;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
|
|
||||||
this.SEQ_2_ACTOR4 = 5;
|
|
||||||
this.TERRITORYTYPE0 = 132;
|
|
||||||
this.UNLOCK_DESION = 14;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def checkQuestCompletion( player, varIdx )
|
|
||||||
{
|
|
||||||
|
|
||||||
if (varIdx == 3)
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 1, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
else if (varIdx == 2)
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 2, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 0, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
var QUEST_VAR_ATTUNE = player.getQuestUI8AL( this.id );
|
|
||||||
var QUEST_VAR_CLASS = player.getQuestUI8BH( this.id );
|
|
||||||
var QUEST_VAR_TRADE = player.getQuestUI8BL( this.id );
|
|
||||||
|
|
||||||
if ( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
|
|
||||||
{
|
|
||||||
player.questUpdate( this.id, this.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
ManFst003.Scene00050( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( ManFst003.id, 1 );
|
|
||||||
ManFst003.checkQuestCompletion( player, 0 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8BH( ManFst003.id, 1 );
|
|
||||||
ManFst003.checkQuestCompletion( player, 3 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if ( param2 == 1 )
|
|
||||||
{
|
|
||||||
ManFst003.Scene00100( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ManFst003.Scene00099( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( ManFst003.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( ManFst003.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00050( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
// accepting quest "close to home"
|
|
||||||
player.questUpdate( ManFst003.id, 1 );
|
|
||||||
player.setQuestUI8CH( ManFst003.id, 1 ); // receive key item
|
|
||||||
// event is done, need to teleport to real zone.
|
|
||||||
player.setZone( 132 );
|
|
||||||
//player.setZone(183); back to starting griania for debug purpose
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00051( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 51, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst003.Scene00001( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst003.Scene00004( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, 0x0EFB, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8CH( ManFst003.id, 0 ); // remove key item, since we have just traded it
|
|
||||||
player.setQuestUI8BL( ManFst003.id, 1 );
|
|
||||||
ManFst003.checkQuestCompletion(player, 2 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR1 )
|
|
||||||
{
|
|
||||||
// starting the Aetheryte eventaction
|
|
||||||
// player.eventStart( actorId, 0x050002, 7, 0, 0);
|
|
||||||
// starting the eventaction 0x13 ( attuning )
|
|
||||||
player.eventActionStart( 0x050002, 0x13,
|
|
||||||
fun( player, eventId, additional )
|
|
||||||
{
|
|
||||||
|
|
||||||
player.questMessage( 0x050002, 0, 1, 0, 0 );
|
|
||||||
player.aetheryteRegister( 2 );
|
|
||||||
player.learnAction( 1 );
|
|
||||||
ManFst003.Scene00051( player );
|
|
||||||
},
|
|
||||||
fun( player, eventId, additional ) {},
|
|
||||||
eventId );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR2 )
|
|
||||||
{
|
|
||||||
this.Scene00002( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR3 )
|
|
||||||
{
|
|
||||||
this.Scene00003( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR4 )
|
|
||||||
{
|
|
||||||
this.Scene00005( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManFst003 = ManFst003Def();
|
|
|
@ -1,246 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
|
|
||||||
|
|
||||||
// Quest Script: ManFst003_00123
|
|
||||||
// Quest Name: Close to Home
|
|
||||||
// Quest ID: 65659
|
|
||||||
// Start NPC: 1001140
|
|
||||||
// End NPC: 1000100
|
|
||||||
|
|
||||||
class ManFst003
|
|
||||||
{
|
|
||||||
var name;
|
|
||||||
var id;
|
|
||||||
var SEQ_0;
|
|
||||||
var SEQ_1;
|
|
||||||
var SEQ_FINISH;
|
|
||||||
var SEQ_OFFER;
|
|
||||||
var RewardExpFactor;
|
|
||||||
var RewardGil;
|
|
||||||
var ACTOR0;
|
|
||||||
var SEQ_0_ACTOR0;
|
|
||||||
var ITEM0;
|
|
||||||
var ACTOR1;
|
|
||||||
var SEQ_1_ACTOR1;
|
|
||||||
var ACTOR2;
|
|
||||||
var SEQ_1_ACTOR2;
|
|
||||||
var ACTOR3;
|
|
||||||
var SEQ_1_ACTOR3;
|
|
||||||
var SEQ_1_ACTOR3_NPCTRADEOK;
|
|
||||||
var SEQ_1_ACTOR3_NPCTRADENO;
|
|
||||||
var SEQ_1_ACTOR0;
|
|
||||||
var ACTOR4;
|
|
||||||
var SEQ_2_ACTOR4;
|
|
||||||
var TERRITORYTYPE0;
|
|
||||||
var POPRANGE0;
|
|
||||||
var LOC_MARKER_01;
|
|
||||||
var LOC_MARKER_02;
|
|
||||||
var LOC_MARKER_03;
|
|
||||||
var LOC_MARKER_04;
|
|
||||||
var LOC_MARKER_05;
|
|
||||||
var LOC_MARKER_06;
|
|
||||||
var LOC_MARKER_07;
|
|
||||||
var LOC_MARKER_08;
|
|
||||||
var LOC_MARKER_09;
|
|
||||||
var SEQ_0_ACTOR0_LQ;
|
|
||||||
var UNLOCK_DESION;
|
|
||||||
var REWARD_DESION;
|
|
||||||
var HOW_TO_MAP_AND_NAVI;
|
|
||||||
var HOW_TO_DESION;
|
|
||||||
var ACTOR20;
|
|
||||||
var SEQ_1_ACTOR1_WAIT;
|
|
||||||
var LOC_ACTOR0;
|
|
||||||
var BIND_ACTOR0;
|
|
||||||
var LOC_MOTION0;
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default ctor
|
|
||||||
def ManFst003()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Close to Home";
|
|
||||||
this.id = 65659;
|
|
||||||
// These are the quest vars / flags used in this quest
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
// GetQuestUI8BL
|
|
||||||
// GetQuestUI8CH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
//this.SEQ_OFFER = ?;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardGil = 107;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
// some of these may be useful
|
|
||||||
this.ACTOR0 = 1001140;
|
|
||||||
this.ACTOR1 = 2;
|
|
||||||
this.ACTOR2 = 1000197;
|
|
||||||
this.ACTOR20 = 1000159;
|
|
||||||
this.ACTOR3 = 1000768;
|
|
||||||
this.ACTOR4 = 1000100;
|
|
||||||
this.BIND_ACTOR0 = 6229224;
|
|
||||||
this.HOW_TO_DESION = 13;
|
|
||||||
this.HOW_TO_MAP_AND_NAVI = 4;
|
|
||||||
this.ITEM0 = 2000119;
|
|
||||||
this.LOC_ACTOR0 = 1003159;
|
|
||||||
this.LOC_MARKER_01 = 2153091;
|
|
||||||
this.LOC_MARKER_02 = 2153104;
|
|
||||||
this.LOC_MARKER_03 = 2153111;
|
|
||||||
this.LOC_MARKER_04 = 2154539;
|
|
||||||
this.LOC_MARKER_05 = 2154540;
|
|
||||||
this.LOC_MARKER_06 = 2154541;
|
|
||||||
this.LOC_MARKER_07 = 2210446;
|
|
||||||
this.LOC_MARKER_08 = 2210454;
|
|
||||||
this.LOC_MARKER_09 = 2210461;
|
|
||||||
this.LOC_MOTION0 = 799;
|
|
||||||
this.POPRANGE0 = 2280858;
|
|
||||||
this.REWARD_DESION = 1;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_0_ACTOR0_LQ = 50;
|
|
||||||
this.SEQ_1_ACTOR0 = 4;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_WAIT = 51;
|
|
||||||
this.SEQ_1_ACTOR2 = 2;
|
|
||||||
this.SEQ_1_ACTOR3 = 3;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
|
|
||||||
this.SEQ_2_ACTOR4 = 5;
|
|
||||||
this.TERRITORYTYPE0 = 132;
|
|
||||||
this.UNLOCK_DESION = 14;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 0, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 1, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 2, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 3, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 4, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 5, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00050( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 50, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00051( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 51, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 99, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player, eventId )
|
|
||||||
{
|
|
||||||
player.eventPlay( eventId, 100, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Entry function for this quest
|
|
||||||
def ManFst003_START(player, actorId, eventId)
|
|
||||||
{
|
|
||||||
var quest = ManFst003();
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
// Script content to be added here....
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,258 +0,0 @@
|
||||||
// Quest Script: ManFst004_00124
|
|
||||||
// Quest Name: Close to Home
|
|
||||||
// Quest ID: 65660
|
|
||||||
// Start NPC: 1001140
|
|
||||||
// End NPC: 1000100
|
|
||||||
|
|
||||||
class ManFst004Def
|
|
||||||
{
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default ctor
|
|
||||||
def ManFst004Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Close to Home";
|
|
||||||
this.id = 65660;
|
|
||||||
|
|
||||||
// These are the quest vars / flags used in this quest
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL -- attube to Aetheryte
|
|
||||||
// GetQuestUI8BH -- visit class guild
|
|
||||||
// GetQuestUI8BL -- Listen to Parsement in the market check mark
|
|
||||||
// GetQuestUI8CH -- recieve Key item
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
//this.SEQ_OFFER = ?;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardGil = 107;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
// some of these may be useful
|
|
||||||
this.ACTOR0 = 1001140;
|
|
||||||
this.ACTOR1 = 2;
|
|
||||||
this.ACTOR2 = 1000323;
|
|
||||||
this.ACTOR20 = 1000159;
|
|
||||||
this.ACTOR3 = 1000768;
|
|
||||||
this.ACTOR4 = 1000100;
|
|
||||||
this.BIND_ACTOR0 = 6229224;
|
|
||||||
this.ITEM0 = 2000120;
|
|
||||||
this.LOC_ACTOR0 = 1003159;
|
|
||||||
this.LOC_MARKER_01 = 2153091;
|
|
||||||
this.LOC_MARKER_02 = 2153104;
|
|
||||||
this.LOC_MARKER_03 = 2153111;
|
|
||||||
this.LOC_MARKER_04 = 2154539;
|
|
||||||
this.LOC_MARKER_05 = 2154540;
|
|
||||||
this.LOC_MARKER_06 = 2154541;
|
|
||||||
this.LOC_MARKER_07 = 2210446;
|
|
||||||
this.LOC_MARKER_08 = 2210454;
|
|
||||||
this.LOC_MARKER_09 = 2210461;
|
|
||||||
this.LOC_MOTION0 = 799;
|
|
||||||
this.POPRANGE0 = 2280858;
|
|
||||||
this.REWARD_DESION = 1;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_0_ACTOR0_LQ = 50;
|
|
||||||
this.SEQ_1_ACTOR0 = 4;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_WAIT = 51;
|
|
||||||
this.SEQ_1_ACTOR2 = 2;
|
|
||||||
this.SEQ_1_ACTOR3 = 3;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
|
|
||||||
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
|
|
||||||
this.SEQ_2_ACTOR4 = 5;
|
|
||||||
this.TERRITORYTYPE0 = 132;
|
|
||||||
this.UNLOCK_DESION = 14;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def checkQuestCompletion( player, varIdx )
|
|
||||||
{
|
|
||||||
|
|
||||||
if (varIdx == 3)
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 1, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
else if (varIdx == 2)
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 2, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.questMessage(this.id, 0, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
var QUEST_VAR_ATTUNE = player.getQuestUI8AL( this.id );
|
|
||||||
var QUEST_VAR_CLASS = player.getQuestUI8BH( this.id );
|
|
||||||
var QUEST_VAR_TRADE = player.getQuestUI8BL( this.id );
|
|
||||||
|
|
||||||
if ( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
|
|
||||||
{
|
|
||||||
player.questUpdate( this.id, this.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
ManFst004.Scene00050( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( ManFst004.id, 1 );
|
|
||||||
ManFst004.checkQuestCompletion( player, 0 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8BH( ManFst004.id, 1 );
|
|
||||||
ManFst004.checkQuestCompletion( player, 3 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if ( param2 == 1 )
|
|
||||||
{
|
|
||||||
ManFst004.Scene00100( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ManFst004.Scene00099( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( ManFst004.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( ManFst004.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00050( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
// accepting quest "close to home"
|
|
||||||
player.questUpdate( ManFst004.id, 1 );
|
|
||||||
player.setQuestUI8CH( ManFst004.id, 1 ); // receive key item
|
|
||||||
// event is done, need to teleport to real zone.
|
|
||||||
player.setZone( 132 );
|
|
||||||
//player.setZone(183); back to starting griania for debug purpose
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00051( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 51, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst004.Scene00001( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, 0, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManFst004.Scene00004( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, 0x0EFB, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8CH( ManFst004.id, 0 ); // remove key item, since we have just traded it
|
|
||||||
player.setQuestUI8BL( ManFst004.id, 1 );
|
|
||||||
ManFst004.checkQuestCompletion(player, 2 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR1 )
|
|
||||||
{
|
|
||||||
// starting the Aetheryte eventaction
|
|
||||||
// player.eventStart( actorId, 0x050002, 7, 0, 0);
|
|
||||||
// starting the eventaction 0x13 ( attuning )
|
|
||||||
player.eventActionStart( 0x050002, 0x13,
|
|
||||||
fun( player, eventId, additional )
|
|
||||||
{
|
|
||||||
|
|
||||||
player.questMessage( 0x050002, 0, 1, 0, 0 );
|
|
||||||
player.aetheryteRegister( 2 );
|
|
||||||
player.learnAction( 1 );
|
|
||||||
ManFst004.Scene00051( player );
|
|
||||||
},
|
|
||||||
fun( player, eventId, additional ) {},
|
|
||||||
eventId );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR2 )
|
|
||||||
{
|
|
||||||
this.Scene00002( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR3 )
|
|
||||||
{
|
|
||||||
this.Scene00003( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR4 )
|
|
||||||
{
|
|
||||||
this.Scene00005( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManFst004 = ManFst004Def();
|
|
||||||
|
|
|
@ -1,202 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: ManSea001_00107
|
|
||||||
// Quest Name: Coming to Limsa Lominsa
|
|
||||||
// Quest ID: 65643
|
|
||||||
// Start NPC: 1001028
|
|
||||||
// End NPC: 1002697
|
|
||||||
|
|
||||||
class ManSea001Def
|
|
||||||
{
|
|
||||||
def ManSea001Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Coming to Limsa Lominsa";
|
|
||||||
this.id = 65643;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 103;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1001028;
|
|
||||||
this.ACTOR1 = 1002732;
|
|
||||||
this.ACTOR2 = 1002697;
|
|
||||||
this.CUT_EVENT = 202;
|
|
||||||
this.EOBJECT0 = 2001679;
|
|
||||||
this.EOBJECT1 = 2001680;
|
|
||||||
this.EVENT_ACTION_SEARCH = 1;
|
|
||||||
this.LOC_ACTOR0 = 1002732;
|
|
||||||
this.LOC_POS_ACTOR0 = 4107186;
|
|
||||||
this.OPENING_EVENT_HANDLER = 1245185;
|
|
||||||
this.POPRANGE0 = 4127803;
|
|
||||||
this.TERRITORYTYPE0 = 181;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
player.setOpeningSequence( 2 );
|
|
||||||
ManSea001.Scene00001( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0xF8482EFB, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManSea001.Scene00002( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManSea001.Scene00003( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( ManSea001.id, 0x01 ); // add quest to player.
|
|
||||||
|
|
||||||
// update the instance boundaries, call to the opening event
|
|
||||||
player.eventPlay( ManSea001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 1, 0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManSea001.Scene00006( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00006( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 6, 0x20, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
player.questUpdate( ManSea001.id, ManSea001.SEQ_FINISH );
|
|
||||||
player.prepareZoning( player.getZoneId(), true, 1, 0 );
|
|
||||||
player.changePos( 9, 40, 14, 2 );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00007( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 7, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00008( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 8, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00009( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 9, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00010( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 10, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00011( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 11, 0x2c02, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManSea001.Scene00012( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00012( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 12, 0x20, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( ManSea001.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( ManSea001.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00013( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 13, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
switch( actor )
|
|
||||||
{
|
|
||||||
case( this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case( this.ACTOR1 )
|
|
||||||
{
|
|
||||||
this.Scene00005( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case( this.ACTOR2 )
|
|
||||||
{
|
|
||||||
this.Scene00011( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManSea001 = ManSea001Def();
|
|
|
@ -1,168 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: ManWil001_00594
|
|
||||||
// Quest Name: Coming to Ul'dah
|
|
||||||
// Quest ID: 66130
|
|
||||||
// Start NPC: 1003987
|
|
||||||
// End NPC: 1003988
|
|
||||||
|
|
||||||
class ManWil001Def
|
|
||||||
{
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default ctor
|
|
||||||
def ManWil001Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Coming to Ul'dah";
|
|
||||||
this.id = 66130;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 103;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1003987;
|
|
||||||
this.ACTOR1 = 1003988;
|
|
||||||
this.ACTOR20 = 1001285;
|
|
||||||
this.CUT_EVENT = 188;
|
|
||||||
this.EOBJECT0 = 2001681;
|
|
||||||
this.EOBJECT1 = 2001682;
|
|
||||||
this.EOBJECT2 = 2001683;
|
|
||||||
this.EOBJECT3 = 2001706;
|
|
||||||
this.EVENT_ACTION_SEARCH = 1;
|
|
||||||
this.OPENING_EVENT_HANDLER = 1245187;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0x2000, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.setOpeningSequence( 2 );
|
|
||||||
ManWil001.Scene00001( player );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0xF8482EFB, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManWil001.Scene00002( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( ManWil001.id, ManWil001.SEQ_FINISH );// add quest to player.
|
|
||||||
player.eventPlay( ManWil001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0x2c02, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
ManWil001.Scene00005( player );
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, 0x20/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // clicked finish button
|
|
||||||
{
|
|
||||||
player.gainExp( 50 );
|
|
||||||
player.addCurrency( 1, ManWil001.RewardGil );
|
|
||||||
player.questFinish( ManWil001.id );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00006( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 6, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00007( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 7, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00008( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 8, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00009( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 9, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00010( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 10, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00011( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 11, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00012( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 12, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00013( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 13, 0, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Entry function for this quest
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR1 )
|
|
||||||
{
|
|
||||||
this.Scene00004( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManWil001 = ManWil001Def();
|
|
|
@ -1,214 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: ManWil001_00594
|
|
||||||
// Quest Name: Coming to Ul'dah
|
|
||||||
// Quest ID: 66130
|
|
||||||
// Start NPC: 1003987
|
|
||||||
// End NPC: 1003988
|
|
||||||
|
|
||||||
class ManWil001
|
|
||||||
{
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// default ctor
|
|
||||||
def ManWil001()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Coming to Ul'dah";
|
|
||||||
this.id = 66130;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 103;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1003987;
|
|
||||||
this.ACTOR1 = 1003988;
|
|
||||||
this.ACTOR20 = 1001285;
|
|
||||||
this.CUT_EVENT = 188;
|
|
||||||
this.EOBJECT0 = 2001681;
|
|
||||||
this.EOBJECT1 = 2001682;
|
|
||||||
this.EOBJECT2 = 2001683;
|
|
||||||
this.EOBJECT3 = 2001706;
|
|
||||||
this.EVENT_ACTION_SEARCH = 1;
|
|
||||||
this.OPENING_EVENT_HANDLER = 1245187;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00006( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 6, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00007( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 7, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00008( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 8, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00009( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 9, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00010( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 10, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00011( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 11, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00012( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 12, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00013( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 13, 0/*flags*/, 0/*unk*/, 0/*unk*/,
|
|
||||||
fun( player, eventId, subEvent, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
var quest := ManWil001Obj;
|
|
||||||
// Callback area for this scene, called when the scene finishes
|
|
||||||
// Add logic here!!!
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Entry function for this quest
|
|
||||||
def eventHandlerNpc( player, actorId, eventId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
// Script content to be added here....
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL ManWil001Obj = ManWil001();
|
|
|
@ -1,176 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst000_00020
|
|
||||||
// Quest Name: Incense and Sensibility
|
|
||||||
// Quest ID: 65556
|
|
||||||
// Start NPC: 1000786
|
|
||||||
// End NPC: 1000705
|
|
||||||
|
|
||||||
class SubFst000Def
|
|
||||||
{
|
|
||||||
def SubFst000Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Incense and Sensibility";
|
|
||||||
this.id = 65556;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_2 = 2;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardItemOptional = [4551, 4555];
|
|
||||||
this.RewardItemOptionalCount = [3, 3];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000786;
|
|
||||||
this.ACTOR1 = 1000705;
|
|
||||||
this.EOBJECT0 = 2000070;
|
|
||||||
this.EOBJECT1 = 2000071;
|
|
||||||
this.ITEM0 = 2000101;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_2_EOBJECT0 = 2;
|
|
||||||
this.SEQ_2_EOBJECT0_USEITEMNO = 99;
|
|
||||||
this.SEQ_2_EOBJECT0_USEITEMOK = 100;
|
|
||||||
this.SEQ_2_EOBJECT1 = 3;
|
|
||||||
this.SEQ_2_EOBJECT1_USEITEMNO = 97;
|
|
||||||
this.SEQ_2_EOBJECT1_USEITEMOK = 98;
|
|
||||||
this.SEQ_3_ACTOR1 = 4;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst000.id, 1 );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8BH( SubFst000.id, 2 );
|
|
||||||
player.questUpdate( SubFst000.id, SubFst000.SEQ_2 );// add quest to player.
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00097( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 97, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00098( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 98, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
switch( actor )
|
|
||||||
{
|
|
||||||
case( this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case( this.ACTOR1 )
|
|
||||||
{
|
|
||||||
this.Scene00001( player );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onEventItem( eventId, player, eventItemId, castTime, targetId )
|
|
||||||
{
|
|
||||||
if( eventItemId == this.ITEM0 )
|
|
||||||
{
|
|
||||||
player.eventItemActionStart( this.id, eventItemId,
|
|
||||||
// callback function for finished action
|
|
||||||
fun ( player, eventId, additional )
|
|
||||||
{
|
|
||||||
var actor = mapActor( additional );
|
|
||||||
|
|
||||||
var censers = player.getQuestUI8AL( eventId );
|
|
||||||
|
|
||||||
player.questMessage( eventId, 1, 2, censers + 1, 2 );
|
|
||||||
|
|
||||||
if ( censers == 2 )
|
|
||||||
{
|
|
||||||
player.questUpdate( eventId, SubFst000.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
else if( actor == SubFst000.EOBJECT0 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL(eventId, 4 );
|
|
||||||
}
|
|
||||||
else if( actor == SubFst000.EOBJECT1 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL(eventId, 8 );
|
|
||||||
}
|
|
||||||
SubFst000.Scene00100( player );
|
|
||||||
|
|
||||||
player.setQuestUI8AL( eventId, 0, censers + 1 );
|
|
||||||
|
|
||||||
},
|
|
||||||
// callback for interrupted action.
|
|
||||||
fun ( player, eventId, additional ) {},
|
|
||||||
targetId );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst000 = SubFst000Def();
|
|
|
@ -1,125 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst001_00024
|
|
||||||
// Quest Name: Coarse Correspondence
|
|
||||||
// Quest ID: 65560
|
|
||||||
// Start NPC: 1000206
|
|
||||||
// End NPC: 1000233
|
|
||||||
|
|
||||||
class SubFst001Def
|
|
||||||
{
|
|
||||||
def SubFst001Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Coarse Correspondence";
|
|
||||||
this.id = 65560;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 103;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000206;
|
|
||||||
this.ACTOR1 = 1000233;
|
|
||||||
this.ITEM0 = 2000079;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_NPCTRADENO = 99;
|
|
||||||
this.SEQ_1_ACTOR1_NPCTRADEOK = 100;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( SubFst001.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( SubFst001.id, 1 );
|
|
||||||
player.setQuestUI8BH( SubFst001.id, 1 );
|
|
||||||
player.questUpdate( SubFst001.id, SubFst001.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( SubFst001.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( SubFst001.id, 99, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( SubFst001.id, 100, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst001.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst001.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == SubFst001.ACTOR0 )
|
|
||||||
{
|
|
||||||
if( !player.hasQuest( SubFst001.id ) )
|
|
||||||
{
|
|
||||||
SubFst001.Scene00000( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SubFst001.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( actor == SubFst001.ACTOR1 )
|
|
||||||
{
|
|
||||||
if( !player.hasQuest( SubFst001.id ) )
|
|
||||||
{
|
|
||||||
// todo: what should this event do?
|
|
||||||
SubFst001.Scene00099( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SubFst001.Scene00100( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst001 = SubFst001Def();
|
|
|
@ -1,107 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst002_00025
|
|
||||||
// Quest Name: Quarrels with Squirrels
|
|
||||||
// Quest ID: 65561
|
|
||||||
// Start NPC: 1000263
|
|
||||||
// End NPC: 1000263
|
|
||||||
|
|
||||||
class SubFst002Def
|
|
||||||
{
|
|
||||||
def SubFst002Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Quarrels with Squirrels";
|
|
||||||
this.id = 65561;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardItemOptional = [3762, 3764, 5823];
|
|
||||||
this.RewardItemOptionalCount = [1, 1, 3];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000263;
|
|
||||||
this.ENEMY0 = 37;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_2_ACTOR0 = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst002.id, SubFst002.SEQ_1 );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst002.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst002.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( !player.hasQuest( SubFst002.id ) )
|
|
||||||
{
|
|
||||||
SubFst002.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst002.ACTOR0 && player.questGetSeq( SubFst002.id ) == SubFst002.SEQ_FINISH )
|
|
||||||
{
|
|
||||||
SubFst002.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onBnpcKill_37( player )
|
|
||||||
{
|
|
||||||
var currentKC = player.getQuestUI8AL(SubFst002.id);
|
|
||||||
currentKC = currentKC + 1;
|
|
||||||
|
|
||||||
player.questMessage( SubFst002.id, 0, 2, currentKC, 6 );
|
|
||||||
|
|
||||||
if( currentKC >= 6 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst002.id, SubFst002.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( SubFst002.id, currentKC );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst002 = SubFst002Def();
|
|
|
@ -1,114 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst003_00026
|
|
||||||
// Quest Name: Once Bitten, Twice Shy
|
|
||||||
// Quest ID: 65562
|
|
||||||
// Start NPC: 1000297
|
|
||||||
// End NPC: 1000315
|
|
||||||
|
|
||||||
class SubFst003Def
|
|
||||||
{
|
|
||||||
def SubFst003Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Once Bitten, Twice Shy";
|
|
||||||
this.id = 65562;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 118;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000297;
|
|
||||||
this.ACTOR1 = 1000315;
|
|
||||||
this.ITEM0 = 2000028;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_NPCTRADENO = 99;
|
|
||||||
this.SEQ_1_ACTOR1_NPCTRADEOK = 100;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst003.id, SubFst003.SEQ_FINISH );
|
|
||||||
player.setQuestUI8AL( SubFst003.id, 1 );
|
|
||||||
player.setQuestUI8BH( SubFst003.id, 1 );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // gave back items
|
|
||||||
{
|
|
||||||
SubFst003.Scene00100( player );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst003.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst003.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( !player.hasQuest( SubFst003.id ) )
|
|
||||||
{
|
|
||||||
SubFst003.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst003.ACTOR1 && player.questGetSeq( SubFst003.id ) == SubFst003.SEQ_FINISH )
|
|
||||||
{
|
|
||||||
SubFst003.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst003 = SubFst003Def();
|
|
|
@ -1,150 +0,0 @@
|
||||||
// Quest Script: SubFst004_00027
|
|
||||||
// Quest Name: Preserving the Past
|
|
||||||
// Quest ID: 65563
|
|
||||||
// Start NPC: 1000194
|
|
||||||
// End NPC: 1000789
|
|
||||||
|
|
||||||
class SubFst004Def
|
|
||||||
{
|
|
||||||
def SubFst004Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Preserving the Past";
|
|
||||||
this.id = 65563;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardItem = [5594];
|
|
||||||
this.RewardItemCount = [10];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000194;
|
|
||||||
this.ACTOR1 = 1000686;
|
|
||||||
this.ACTOR2 = 1000789;
|
|
||||||
this.ITEM0 = 2000024;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_2_ACTOR2 = 2;
|
|
||||||
this.SEQ_2_ACTOR2_NPCTRADENO = 99;
|
|
||||||
this.SEQ_2_ACTOR2_NPCTRADEOK = 100;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
|
|
||||||
player.questUpdate( SubFst004.id, SubFst004.SEQ_1 );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( SubFst004.id, 1 );
|
|
||||||
player.setQuestUI8BH( SubFst004.id, 1 );
|
|
||||||
//player.questMessage( SubFst004.id, 0, 2, 1, 1 );
|
|
||||||
player.questMessage( SubFst004.id, 0, 1, 21002, 0 );
|
|
||||||
player.questUpdate( SubFst004.id, SubFst004.SEQ_FINISH );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
SubFst004.Scene00100( player );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst004.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst004.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == SubFst004.ACTOR0 )
|
|
||||||
{
|
|
||||||
if( !player.hasQuest( SubFst004.id ) )
|
|
||||||
{
|
|
||||||
SubFst004.Scene00000( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SubFst004.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( actor == SubFst004.ACTOR1 )
|
|
||||||
{
|
|
||||||
if( !player.hasQuest( SubFst004.id ) )
|
|
||||||
{
|
|
||||||
// todo: what should this event do?
|
|
||||||
SubFst004.Scene00099( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SubFst004.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( actor == SubFst004.ACTOR2 )
|
|
||||||
{
|
|
||||||
if( !player.hasQuest( SubFst004.id ) )
|
|
||||||
{
|
|
||||||
// todo: what should this event do?
|
|
||||||
SubFst004.Scene00099( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SubFst004.Scene00002( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst004 = SubFst004Def();
|
|
|
@ -1,133 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst007_00031
|
|
||||||
// Quest Name: Essential Oil
|
|
||||||
// Quest ID: 65567
|
|
||||||
// Start NPC: 1000705
|
|
||||||
// End NPC: 1000705
|
|
||||||
|
|
||||||
class SubFst007Def
|
|
||||||
{
|
|
||||||
def SubFst007Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Essential Oil";
|
|
||||||
this.id = 65567;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
// GetQuestUI8BH
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardItemOptional = [3530, 3531, 5823];
|
|
||||||
this.RewardItemOptionalCount = [1, 1, 3];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000705;
|
|
||||||
this.ENEMY0 = 49;
|
|
||||||
this.ITEM0 = 2000098;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_2_ACTOR0 = 1;
|
|
||||||
this.SEQ_2_ACTOR0_NPCTRADENO = 99;
|
|
||||||
this.SEQ_2_ACTOR0_NPCTRADEOK = 100;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst007.id, SubFst007.SEQ_1 );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // gave back items
|
|
||||||
{
|
|
||||||
SubFst007.Scene00100( player );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player ) //unused
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst007.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst007.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( !player.hasQuest( SubFst007.id ) )
|
|
||||||
{
|
|
||||||
SubFst007.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( player.questGetSeq( SubFst007.id ) == SubFst007.SEQ_FINISH )
|
|
||||||
{
|
|
||||||
SubFst007.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onBnpcKill_49( player )
|
|
||||||
{
|
|
||||||
var currentKC = player.getQuestUI8AL(SubFst007.id);
|
|
||||||
currentKC = currentKC + 1;
|
|
||||||
|
|
||||||
player.questMessage( SubFst007.id, 0, 2, currentKC, 6 );
|
|
||||||
player.tryAddItem( 2000098, 1 );
|
|
||||||
|
|
||||||
if( currentKC >= 6 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst007.id, SubFst007.SEQ_FINISH );
|
|
||||||
player.setQuestUI8BH( SubFst007.id, currentKC );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( SubFst007.id, currentKC );
|
|
||||||
player.setQuestUI8BH( SubFst007.id, currentKC );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst007 = SubFst007Def();
|
|
|
@ -1,82 +0,0 @@
|
||||||
// Quest Script: SubFst010_00001
|
|
||||||
// Quest Name: A Good Adventurer Is Hard to Find
|
|
||||||
// Quest ID: 65537
|
|
||||||
// Start NPC: 1000146
|
|
||||||
// End NPC: 1000195
|
|
||||||
|
|
||||||
class SubFst010Def
|
|
||||||
{
|
|
||||||
def SubFst010Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "A Good Adventurer Is Hard to Find";
|
|
||||||
this.id = 65537;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardItem = [4551];
|
|
||||||
this.RewardItemCount = [2];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000146;
|
|
||||||
this.ACTOR1 = 1000195;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventid, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst010.id, SubFst010.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventid, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst010.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst010.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( actor == this.ACTOR0 )
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
else if( actor == this.ACTOR1 )
|
|
||||||
{
|
|
||||||
this.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst010 = SubFst010Def();
|
|
|
@ -1,100 +0,0 @@
|
||||||
// Quest Script: SubFst011_00037
|
|
||||||
// Quest Name: Population Control
|
|
||||||
// Quest ID: 65573
|
|
||||||
// Start NPC: 1000195
|
|
||||||
// End NPC: 1000195
|
|
||||||
|
|
||||||
class SubFst011Def
|
|
||||||
{
|
|
||||||
def SubFst011Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Population Control";
|
|
||||||
this.id = 65573;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 100;
|
|
||||||
this.RewardItemOptional = [2653, 2655, 5823];
|
|
||||||
this.RewardItemOptionalCount = [1, 1, 3];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000195;
|
|
||||||
this.ENEMY0 = 47;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_2_ACTOR0 = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventid, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst011.id, SubFst011.SEQ_1 );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventid, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst011.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst011.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( player.hasQuest(SubFst011.id) )
|
|
||||||
{
|
|
||||||
this.Scene00001( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def onBnpcKill_47( player )
|
|
||||||
{
|
|
||||||
var currentKC = player.getQuestUI8AL(SubFst011.id);
|
|
||||||
currentKC = currentKC + 1;
|
|
||||||
|
|
||||||
player.questMessage( SubFst011.id, 0, 2, currentKC, 6 );
|
|
||||||
|
|
||||||
if( currentKC >= 6 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst011.id, SubFst011.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( SubFst011.id, currentKC );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst011 = SubFst011Def();
|
|
|
@ -1,235 +0,0 @@
|
||||||
// Quest Script: SubFst013_00040
|
|
||||||
// Quest Name: For Friendship
|
|
||||||
// Quest ID: 65576
|
|
||||||
// Start NPC: 1000162
|
|
||||||
// End NPC: 1000162
|
|
||||||
|
|
||||||
class SubFst013Def
|
|
||||||
{
|
|
||||||
def SubFst013Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "For Friendship";
|
|
||||||
this.id = 65576;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_2 = 2;
|
|
||||||
this.SEQ_3 = 3;
|
|
||||||
this.SEQ_4 = 4;
|
|
||||||
this.SEQ_5 = 5;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 111;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000162;
|
|
||||||
this.ACTOR1 = 1000161;
|
|
||||||
this.FIRST_QUEST = 65575;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
this.SEQ_1_ACTOR1_EMOTENO = 99;
|
|
||||||
this.SEQ_1_ACTOR1_EMOTEOK = 100;
|
|
||||||
this.SEQ_2_ACTOR0 = 2;
|
|
||||||
this.SEQ_3_ACTOR1 = 3;
|
|
||||||
this.SEQ_3_ACTOR1_EMOTENO = 97;
|
|
||||||
this.SEQ_3_ACTOR1_EMOTEOK = 98;
|
|
||||||
this.SEQ_4_ACTOR0 = 4;
|
|
||||||
this.SEQ_5_ACTOR1 = 5;
|
|
||||||
this.SEQ_5_ACTOR1_EMOTENO = 95;
|
|
||||||
this.SEQ_5_ACTOR1_EMOTEOK = 96;
|
|
||||||
this.SEQ_6_ACTOR0 = 6;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst013.id, SubFst013.SEQ_1 );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst013.id, SubFst013.SEQ_3 );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player ) //unused
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst013.id, SubFst013.SEQ_5 );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player ) //unused
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00006( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 6, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst013.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst013.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00095( player ) //unused
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 95, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00096( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 96, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst013.id, SubFst013.SEQ_FINISH );
|
|
||||||
player.questMessage( SubFst013.id, 4, 2, 0, 0 );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00097( player ) //unused
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 97, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00098( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 98, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst013.id, SubFst013.SEQ_4 );
|
|
||||||
player.questMessage( SubFst013.id, 2, 2, 0, 0 );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player ) //unused
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst013.id, SubFst013.SEQ_2 );
|
|
||||||
player.questMessage( SubFst013.id, 0, 2, 0, 0 );
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( !player.hasQuest( SubFst013.id ) )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00000( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR1 ) //talk to girl without emotes
|
|
||||||
{
|
|
||||||
SubFst013.Scene00001( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR0 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_2 )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00002( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR0 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_4 )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00004( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR0 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_FINISH )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00006( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onEmote( eventId, player, actorId, emoteId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
print( emoteId );
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR1 && emoteId == 5 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_1 )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00100( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR1 && emoteId == 18 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_3 )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00098( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst013.ACTOR1 && emoteId == 11 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_5 )
|
|
||||||
{
|
|
||||||
SubFst013.Scene00096( player );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst013 = SubFst013Def();
|
|
|
@ -1,261 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst015_00042
|
|
||||||
// Quest Name: Sylphic Gratitude
|
|
||||||
// Quest ID: 65578
|
|
||||||
// Start NPC: 1000286
|
|
||||||
// End NPC: 1000286
|
|
||||||
|
|
||||||
class SubFst015Def
|
|
||||||
{
|
|
||||||
def SubFst015Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "Sylphic Gratitude";
|
|
||||||
this.id = 65578;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestBitFlag8
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_1 = 1;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
//this.SEQ_OFFER = ?;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardGil = 110;
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000286;
|
|
||||||
this.EOBJECT0 = 2000020;
|
|
||||||
this.EOBJECT1 = 2000021;
|
|
||||||
this.EOBJECT2 = 2000022;
|
|
||||||
this.EOBJECT3 = 2000023;
|
|
||||||
this.EOBJECT4 = 2000024;
|
|
||||||
this.EOBJECT5 = 2000025;
|
|
||||||
this.EVENT_ACTION_SEARCH = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst015.id, 1 );
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00002( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 2, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00003( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 3, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00004( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 4, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00005( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 5, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00006( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 6, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00007( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 7, NONE, 0, 0,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 )
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst015.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst015.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00089( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 89, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00090( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 90, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00091( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 91, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00092( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 92, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00093( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 93, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00094( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 94, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00095( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 95, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00096( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 96, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00097( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 97, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00098( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 98, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00099( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 99, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00100( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 100, NONE, 0, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
switch( actor )
|
|
||||||
{
|
|
||||||
case( this.ACTOR0 )
|
|
||||||
{
|
|
||||||
if( player.hasQuest( this.id ) )
|
|
||||||
{
|
|
||||||
this.Scene00007( player );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Scene00000( player );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case ( this.EOBJECT0 ) {}
|
|
||||||
case ( this.EOBJECT1 ) {}
|
|
||||||
case ( this.EOBJECT2 ) {}
|
|
||||||
case ( this.EOBJECT3 ) {}
|
|
||||||
case ( this.EOBJECT4 ) {}
|
|
||||||
case ( this.EOBJECT5 )
|
|
||||||
{
|
|
||||||
player.eventActionStart( this.id, 0x0F,
|
|
||||||
fun( player, eventId, additional )
|
|
||||||
{
|
|
||||||
var actor = mapActor( additional );
|
|
||||||
|
|
||||||
var currVegetal = player.getQuestUI8AL( eventId );
|
|
||||||
|
|
||||||
var despawn1 = player.getQuestUI8FL( eventId );
|
|
||||||
var despawn2 = player.getQuestUI8FH( eventId );
|
|
||||||
|
|
||||||
if( SubFst015.EOBJECT3 == actor )
|
|
||||||
{
|
|
||||||
despawn2 = despawn2 | 1;
|
|
||||||
player.setQuestUI8FH( eventId, despawn2 );
|
|
||||||
}
|
|
||||||
else if( SubFst015.EOBJECT2 == actor )
|
|
||||||
{
|
|
||||||
despawn2 = despawn2 | 2;
|
|
||||||
player.setQuestUI8FH( eventId, despawn2 );
|
|
||||||
}
|
|
||||||
else if( SubFst015.EOBJECT1 == actor )
|
|
||||||
{
|
|
||||||
despawn2 = despawn2 | 4;
|
|
||||||
player.setQuestUI8FH( eventId, despawn2 );
|
|
||||||
}
|
|
||||||
else if( SubFst015.EOBJECT0 == actor )
|
|
||||||
{
|
|
||||||
despawn2 = despawn2 | 8;
|
|
||||||
player.setQuestUI8FH( eventId, despawn2 );
|
|
||||||
}
|
|
||||||
else if( SubFst015.EOBJECT5 == actor )
|
|
||||||
{
|
|
||||||
despawn2 = despawn1 | 4;
|
|
||||||
player.setQuestUI8FL( eventId, despawn2 );
|
|
||||||
}
|
|
||||||
else if( SubFst015.EOBJECT4 == actor )
|
|
||||||
{
|
|
||||||
despawn2 = despawn1 | 8;
|
|
||||||
player.setQuestUI8FL( eventId, despawn2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
player.questMessage( eventId, 0, 2, currVegetal + 1, 6 );
|
|
||||||
|
|
||||||
if ( currVegetal + 1 == 6 )
|
|
||||||
{
|
|
||||||
player.questUpdate( eventId, SubFst015.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.setQuestUI8AL( eventId, currVegetal + 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
SubFst015.Scene00096( player );
|
|
||||||
},
|
|
||||||
fun( player, eventId, additional )
|
|
||||||
{
|
|
||||||
},
|
|
||||||
actorId );
|
|
||||||
player.unlock();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst015 = SubFst015Def();
|
|
|
@ -1,89 +0,0 @@
|
||||||
// This is an automatically generated chai script template
|
|
||||||
// Content needs to be added by hand to make it function
|
|
||||||
// In order for this script to be loaded, change its extension to .chai
|
|
||||||
// and move it to the correct folder in bin/scripts/chai/quest
|
|
||||||
|
|
||||||
// Quest Script: SubFst019_00049
|
|
||||||
// Quest Name: I Am Millicent, Hear Me Roar
|
|
||||||
// Quest ID: 65585
|
|
||||||
// Start NPC: 1000788
|
|
||||||
// End NPC: 1000429
|
|
||||||
|
|
||||||
class SubFst019Def
|
|
||||||
{
|
|
||||||
def SubFst019Def()
|
|
||||||
{
|
|
||||||
// Basic quest information
|
|
||||||
this.name = "I Am Millicent, Hear Me Roar";
|
|
||||||
this.id = 65585;
|
|
||||||
|
|
||||||
// Quest vars / flags used
|
|
||||||
// GetQuestUI8AL
|
|
||||||
|
|
||||||
// Steps in this quest ( 0 is before accepting,
|
|
||||||
// 1 is first, 255 means ready for turning it in
|
|
||||||
this.SEQ_0 = 0;
|
|
||||||
this.SEQ_FINISH = 255;
|
|
||||||
|
|
||||||
// Quest rewards
|
|
||||||
this.RewardExpFactor = 50;
|
|
||||||
this.RewardItem = [4551];
|
|
||||||
this.RewardItemCount = [5];
|
|
||||||
|
|
||||||
// Entities found in the script data of the quest
|
|
||||||
this.ACTOR0 = 1000788;
|
|
||||||
this.ACTOR1 = 1000429;
|
|
||||||
this.SEQ_0_ACTOR0 = 0;
|
|
||||||
this.SEQ_1_ACTOR1 = 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Available Scenes in this quest, not necessarly all are used
|
|
||||||
def Scene00000( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 0, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // accept quest
|
|
||||||
{
|
|
||||||
player.questUpdate( SubFst019.id, SubFst019.SEQ_FINISH );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
def Scene00001( player )
|
|
||||||
{
|
|
||||||
player.eventPlay( this.id, 1, NONE,
|
|
||||||
fun( player, eventId, param1, param2, param3 )
|
|
||||||
{
|
|
||||||
if( param2 == 1 ) // finish quest
|
|
||||||
{
|
|
||||||
if( player.giveQuestRewards( SubFst019.id, 0 ) )
|
|
||||||
{
|
|
||||||
player.questFinish( SubFst019.id );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Event Handlers
|
|
||||||
def onTalk( eventId, player, actorId )
|
|
||||||
{
|
|
||||||
var actor = mapActor( actorId );
|
|
||||||
|
|
||||||
if( !player.hasQuest( SubFst019.id ) )
|
|
||||||
{
|
|
||||||
SubFst019.Scene00000( player );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( actor == SubFst019.ACTOR1 && player.questGetSeq( SubFst019.id ) == SubFst019.SEQ_FINISH )
|
|
||||||
{
|
|
||||||
SubFst019.Scene00001( player );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL SubFst019 = SubFst019Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Stone
|
|
||||||
// Skill ID: 119
|
|
||||||
|
|
||||||
class skillDef_119Def
|
|
||||||
{
|
|
||||||
def skillDef_119Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_DAMAGE, 119, 140, 0, target );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_119 = skillDef_119Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Cure
|
|
||||||
// Skill ID: 120
|
|
||||||
|
|
||||||
class skillDef_120Def
|
|
||||||
{
|
|
||||||
def skillDef_120Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_HEAL, 120, 450, 0, target );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_120 = skillDef_120Def();
|
|
|
@ -1,19 +0,0 @@
|
||||||
// Skill Name: Aero
|
|
||||||
// Skill ID: 121
|
|
||||||
|
|
||||||
class skillDef_121Def
|
|
||||||
{
|
|
||||||
def skillDef_121Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_DAMAGE, 121, 50, 0, target );
|
|
||||||
target.addStatusEffectByIdIfNotExist(143, 20000, player, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_121 = skillDef_121Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Medica
|
|
||||||
// Skill ID: 124
|
|
||||||
|
|
||||||
class skillDef_124Def
|
|
||||||
{
|
|
||||||
def skillDef_124Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_HEAL, 124, 300, 0, player );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_124 = skillDef_124Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Raise
|
|
||||||
// Skill ID: 125
|
|
||||||
|
|
||||||
class skillDef_125Def
|
|
||||||
{
|
|
||||||
def skillDef_125Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
target.addStatusEffectByIdIfNotExist( 148, 60000, player, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_125 = skillDef_125Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Stone II
|
|
||||||
// Skill ID: 127
|
|
||||||
|
|
||||||
class skillDef_127Def
|
|
||||||
{
|
|
||||||
def skillDef_127Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_DAMAGE, 127, 200, 0, target );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_127 = skillDef_127Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Repose
|
|
||||||
// Skill ID: 128
|
|
||||||
|
|
||||||
class skillDef_128Def
|
|
||||||
{
|
|
||||||
def skillDef_128Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
target.addStatusEffectByIdIfNotExist( 3, 30000, player, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_128 = skillDef_128Def();
|
|
|
@ -1,19 +0,0 @@
|
||||||
// Skill Name: Aero II
|
|
||||||
// Skill ID: 132
|
|
||||||
|
|
||||||
class skillDef_132Def
|
|
||||||
{
|
|
||||||
def skillDef_132Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_DAMAGE, 132, 50, 0, target );
|
|
||||||
target.addStatusEffectByIdIfNotExist( 143, 20000, player, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_132 = skillDef_132Def();
|
|
|
@ -1,19 +0,0 @@
|
||||||
// Skill Name: Medica II
|
|
||||||
// Skill ID: 133
|
|
||||||
|
|
||||||
class skillDef_133Def
|
|
||||||
{
|
|
||||||
def skillDef_133Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_HEAL, 133, 200, 0, player );
|
|
||||||
target.addStatusEffectByIdIfNotExist( 150, 30000, player, 50 );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_133 = skillDef_133Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Bootshine
|
|
||||||
// Skill ID: 53
|
|
||||||
|
|
||||||
class skillDef_53Def
|
|
||||||
{
|
|
||||||
def skillDef_53Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_DAMAGE, 53, 140, 0, target );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_53 = skillDef_53Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Sprint
|
|
||||||
// Skill ID: 3
|
|
||||||
|
|
||||||
class skillDef_3Def
|
|
||||||
{
|
|
||||||
def skillDef_3Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.addStatusEffectById(50, 20000, player, 30);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_3 = skillDef_3Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Return
|
|
||||||
// Skill ID: 6
|
|
||||||
|
|
||||||
class skillDef_6Def
|
|
||||||
{
|
|
||||||
def skillDef_6Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.returnToHomepoint();
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_6 = skillDef_6Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Skill Name: Fire II
|
|
||||||
// Skill ID: 147
|
|
||||||
|
|
||||||
class skillDef_147Def
|
|
||||||
{
|
|
||||||
def skillDef_147Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onFinish( player, target )
|
|
||||||
{
|
|
||||||
player.handleScriptSkill( STD_DAMAGE, 147, 80, 0, target );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL skillDef_147 = skillDef_147Def();
|
|
|
@ -1,19 +0,0 @@
|
||||||
// Status Name: Aero
|
|
||||||
// Status ID: 143
|
|
||||||
|
|
||||||
class statusDef_143Def
|
|
||||||
{
|
|
||||||
def statusDef_143Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTick( actor, effect )
|
|
||||||
{
|
|
||||||
print("tick");
|
|
||||||
effect.registerTickEffect( 1, 30 );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL statusDef_143 = statusDef_143Def();
|
|
|
@ -1,18 +0,0 @@
|
||||||
// Status Name: Aero II
|
|
||||||
// Status ID: 144
|
|
||||||
|
|
||||||
class statusDef_144Def
|
|
||||||
{
|
|
||||||
def statusDef_144Def()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
def onTick( actor, effect )
|
|
||||||
{
|
|
||||||
effect.registerTickEffect( 1, 50 );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL statusDef_144 = statusDef_144Def();
|
|
67
scripts/native/CMakeLists.txt
Normal file
67
scripts/native/CMakeLists.txt
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
project(Sapphire_Script)
|
||||||
|
|
||||||
|
file(GLOB SCRIPT_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||||
|
|
||||||
|
include_directories("${CMAKE_SOURCE_DIR}/src/servers/")
|
||||||
|
include_directories("${CMAKE_SOURCE_DIR}/src/servers/sapphire_zone/")
|
||||||
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
|
message("exec: ${EXECUTABLE_OUTPUT_DIRECTORY}")
|
||||||
|
|
||||||
|
set(SCRIPT_LIB_DIR "${EXECUTABLE_OUTPUT_DIRECTORY}/compiledscripts/" )
|
||||||
|
set(EXECUTABLE_OUTPUT_PATH "${SCRIPT_LIB_DIR}")
|
||||||
|
set(LIBRARY_OUTPUT_PATH "${SCRIPT_LIB_DIR}")
|
||||||
|
set(RUNTIME_OUTPUT_DIRECTORY "${SCRIPT_LIB_DIR}")
|
||||||
|
|
||||||
|
|
||||||
|
file(GLOB children "${CMAKE_CURRENT_SOURCE_DIR}/*" )
|
||||||
|
foreach(_scriptDir ${children})
|
||||||
|
get_filename_component(_name "${_scriptDir}" NAME_WE)
|
||||||
|
if(IS_DIRECTORY ${_scriptDir} AND NOT ${_name} MATCHES "CMakeFiles")
|
||||||
|
message("discovered plugin lib: ${_scriptDir} (${_name})")
|
||||||
|
|
||||||
|
file(GLOB_RECURSE SCRIPT_FILES "${_scriptDir}/*.cpp")
|
||||||
|
|
||||||
|
# build file list
|
||||||
|
foreach(_script ${SCRIPT_FILES})
|
||||||
|
get_filename_component( _scriptname "${_script}" NAME_WE)
|
||||||
|
|
||||||
|
if(NOT ${_scriptname} MATCHES "ScriptLoader")
|
||||||
|
if(ScriptIncludes)
|
||||||
|
set(ScriptIncludes "${ScriptIncludes}\n#include \"${_script}\"")
|
||||||
|
else()
|
||||||
|
set(ScriptIncludes "#include \"${_script}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(ScriptNames "${ScriptNames} static_cast< ScriptObject* >( new ${_scriptname} ),\n")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_library("script_${_name}" MODULE "${SCRIPT_FILES}" "${SCRIPT_INCLUDE_FILES}" "${_scriptDir}/ScriptLoader.cpp")
|
||||||
|
target_link_libraries("script_${_name}" sapphire_zone)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set_target_properties("script_${_name}" PROPERTIES
|
||||||
|
CXX_STANDARD 14
|
||||||
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
CXX_EXTENSIONS ON
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SCRIPT_LIB_DIR}"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SCRIPT_LIB_DIR}"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SCRIPT_LIB_DIR}"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${SCRIPT_LIB_DIR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ScriptLoader.cpp.in" "${_scriptDir}/ScriptLoader.cpp")
|
||||||
|
|
||||||
|
add_custom_command(TARGET "script_${_name}" POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.exp"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.lib"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.ilk"
|
||||||
|
)
|
||||||
|
|
||||||
|
unset(ScriptIncludes)
|
||||||
|
unset(ScriptNames)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
36
scripts/native/CmnDef/CmnDefCutSceneReplay.cpp
Normal file
36
scripts/native/CmnDef/CmnDefCutSceneReplay.cpp
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class CmnDefCutSceneReplay : public EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CmnDefCutSceneReplay() : EventScript( "CmnDefCutSceneReplay", 721028 )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 != 0 )
|
||||||
|
{
|
||||||
|
Scene00001( player, param2 );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, 0x2000, 0, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player, uint16_t returnScene )
|
||||||
|
{
|
||||||
|
auto callback = []( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
// todo: this is fucked
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0xFB2EC8F8, 0, 1, returnScene, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
};
|
56
scripts/native/CmnDef/CmnDefInnBed.cpp
Normal file
56
scripts/native/CmnDef/CmnDefInnBed.cpp
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class CmnDefInnBed : public EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CmnDefInnBed() : EventScript( "CmnDefInnBed", 720916 )
|
||||||
|
{}
|
||||||
|
|
||||||
|
// menu
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 > 0 )
|
||||||
|
Scene00001( player, param2 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, 0x2000, 0, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
// lay down
|
||||||
|
void Scene00001( Entity::Player& player, uint16_t param )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00002( player, param2 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0xF32E48F8, 0, 1, param, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
// logout
|
||||||
|
void Scene00002( Entity::Player& player, uint16_t param )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 2, 0xF32E48F8, 0, 1, param, nullptr );
|
||||||
|
}
|
||||||
|
|
||||||
|
// wake up
|
||||||
|
void Scene00100( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = []( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 100, 0x800, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
Scene00100( player );
|
||||||
|
}
|
||||||
|
};
|
58
scripts/native/CmnDef/CmnDefLinkShell.cpp
Normal file
58
scripts/native/CmnDef/CmnDefLinkShell.cpp
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
#define ACTION_CREATE 2
|
||||||
|
#define ACTION_RENAME 3
|
||||||
|
#define ACTION_REMOVE 4
|
||||||
|
|
||||||
|
class CmnDefLinkShell : public EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CmnDefLinkShell() : EventScript( "CmnDefLinkShell", 0xB0006 )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
switch( param2 )
|
||||||
|
{
|
||||||
|
case ACTION_CREATE:
|
||||||
|
Scene00002( player );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ACTION_RENAME:
|
||||||
|
Scene00003( player );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ACTION_REMOVE:
|
||||||
|
Scene00004( player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
// create linkshell
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 2, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// rename linkshell
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 3, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove linkshell
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 4, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
18
scripts/native/CmnDef/HouFurOrchestrion.cpp
Normal file
18
scripts/native/CmnDef/HouFurOrchestrion.cpp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class HouFurOrchestrion : public EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HouFurOrchestrion() : EventScript( "HouFurOrchestrion", 721226 )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 0, 0x2000, 0, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
};
|
16
scripts/native/ScriptLoader.cpp.in
Normal file
16
scripts/native/ScriptLoader.cpp.in
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class ScriptObject;
|
||||||
|
|
||||||
|
@ScriptIncludes@
|
||||||
|
|
||||||
|
const ScriptObject* ptrs[] =
|
||||||
|
{
|
||||||
|
@ScriptNames@
|
||||||
|
nullptr
|
||||||
|
};
|
||||||
|
|
||||||
|
extern "C" EXPORT const ScriptObject** getScripts()
|
||||||
|
{
|
||||||
|
return ptrs;
|
||||||
|
}
|
94
scripts/native/ScriptObject.h
Normal file
94
scripts/native/ScriptObject.h
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
#ifndef SAPPHIRE_SCRIPTOBJECT_H
|
||||||
|
#define SAPPHIRE_SCRIPTOBJECT_H
|
||||||
|
|
||||||
|
#include <Script/NativeScriptApi.h>
|
||||||
|
#include <Forwards.h>
|
||||||
|
#include <Actor/Actor.h>
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <Event/EventHelper.h>
|
||||||
|
|
||||||
|
enum EventFlags
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
NO_DEFAULT_CAMERA = 0x00000001,
|
||||||
|
FADE_OUT = 0x00000002,
|
||||||
|
INVIS_ENPC = 0x00000004,
|
||||||
|
INVIS_EOBJ = 0x00000008,
|
||||||
|
INVIS_BNPC = 0x00000010,
|
||||||
|
INVIS_OTHER_PC = 0x00000020,
|
||||||
|
INVIS_PARTY_PC = 0x00000040,
|
||||||
|
INVIS_PARTY_BUDDY = 0x10000000,
|
||||||
|
INVIS_GATHERING_POINT = 0x00000080,
|
||||||
|
INVIS_AETHERYTE = 0x00000100,
|
||||||
|
INVIS_TREASURE = 0x00000200,
|
||||||
|
CONDITION_CUTSCENE = 0x00000400,
|
||||||
|
HIDE_UI = 0x00000800,
|
||||||
|
INVIS_ALL = 0xF80003FC,
|
||||||
|
AUTO_LOC_CAMERA = 0x00001000,
|
||||||
|
HIDE_HOTBAR = 0x00002000,
|
||||||
|
INVINCIBLE = 0x00004000,
|
||||||
|
SILENT_ENTER_TERRI_ENV = 0x00008000,
|
||||||
|
SILENT_ENTER_TERRI_BGM = 0x00010000,
|
||||||
|
SILENT_ENTER_TERRI_SE = 0x00020000,
|
||||||
|
SILENT_ENTER_TERRI_ALL = 0x00038000,
|
||||||
|
DISABLE_SKIP = 0x00080000,
|
||||||
|
HIDE_FESTIVAL = 0x00200000,
|
||||||
|
DISABLE_STEALTH = 0x00400000,
|
||||||
|
ROLLBACK_HIDE_UI = 0x00800000,
|
||||||
|
LOCK_HUD = 0x01000000,
|
||||||
|
LOCK_HOTBAR = 0x02000000,
|
||||||
|
DISABLE_CANCEL_EMOTE = 0x04000000,
|
||||||
|
INVIS_AOE = 0x08000000,
|
||||||
|
INVIS_ALLIANCE_PC = 0x20000000,
|
||||||
|
INVIS_ALLIANCE_BUDDY = 0x40000000,
|
||||||
|
INVIS_COMPANION = 0x80000000,
|
||||||
|
SET_BASE = 0xF8400EFB,
|
||||||
|
SET_INVIS_BASE = 0xF8400FFF,
|
||||||
|
SET_EOBJ_BASE = 0xF8400EF3
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EventTypes
|
||||||
|
{
|
||||||
|
EVENT_TALK = 1,
|
||||||
|
EVENT_EMOTE = 2,
|
||||||
|
EVENT_DISTANCE_BELOW = 3,
|
||||||
|
EVENT_DISTANCE_OVER = 4,
|
||||||
|
EVENT_BATTLE_REWARD = 5,
|
||||||
|
EVENT_CRAFT = 6,
|
||||||
|
EVENT_NEST = 7,
|
||||||
|
EVENT_EVENT_ITEM = 8,
|
||||||
|
EVENT_DROP = 9,
|
||||||
|
EVENT_WITHIN_RANGE = 10,
|
||||||
|
EVENT_OUTSIDE_RANGE = 11,
|
||||||
|
EVENT_GAME_START = 12,
|
||||||
|
EVENT_GAME_PROGRESS = 13,
|
||||||
|
EVENT_ENTER_TERRITORY = 15,
|
||||||
|
EVENT_GAME_COME_BACK = 17,
|
||||||
|
EVENT_ACTION_RESULT = 18,
|
||||||
|
EVENT_MATERIA_CRAFT = 19,
|
||||||
|
EVENT_FISHING = 20,
|
||||||
|
EVENT_UI = 21,
|
||||||
|
EVENT_HOUSING = 22,
|
||||||
|
EVENT_SAY = 23,
|
||||||
|
EVENT_TABLE_GAME = 24
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EventFinishState
|
||||||
|
{
|
||||||
|
UNLOCK = 1,
|
||||||
|
KEEPLOCK = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
enum DamageType
|
||||||
|
{
|
||||||
|
STD_DAMAGE = 0X03,
|
||||||
|
STD_HEAL = 0X04,
|
||||||
|
STD_MP_LOSS = 0X0A,
|
||||||
|
STD_MP_GAIN = 0X0B,
|
||||||
|
STD_TP_LOSS = 0X0C,
|
||||||
|
STD_TP_GAIN = 0X0D
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif //SAPPHIRE_SCRIPTOBJECT_H
|
13
scripts/native/action/ActionSprint3.cpp
Normal file
13
scripts/native/action/ActionSprint3.cpp
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class ActionSprint3 : public ActionScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ActionSprint3() : ActionScript( "ActionSprint3", 3 )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void onCastFinish( Core::Entity::Player& player, Core::Entity::Actor& targetActor ) override
|
||||||
|
{
|
||||||
|
player.addStatusEffectByIdIfNotExist( 50, 20000, player, 30 );
|
||||||
|
}
|
||||||
|
};
|
46
scripts/native/aetheryte/Aethernet.cpp
Normal file
46
scripts/native/aetheryte/Aethernet.cpp
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
#define ACTION_ATTUNE 0x13
|
||||||
|
|
||||||
|
#define AetheryteBaseId 0x50000
|
||||||
|
#define AETHERYTE_MENU_AETHERNET 1
|
||||||
|
#define AETHERYTE_MENU_HOUSING 2
|
||||||
|
#define AETHERYTE_MENU_HOME_POINT 3
|
||||||
|
#define AETHERYTE_MENU_FAVORITE_POINT 4
|
||||||
|
#define AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN 5
|
||||||
|
|
||||||
|
class Aethernet : public EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Aethernet() : EventScript( "Aethernet", EVENTSCRIPT_AETHERNET_ID )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
||||||
|
{
|
||||||
|
player.eventPlay( eventId, 2, 0, []( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param1 == 256 )
|
||||||
|
{
|
||||||
|
player.teleport( param2, 2 );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.eventActionStart( eventId, ACTION_ATTUNE, []( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||||
|
{
|
||||||
|
player.registerAetheryte( eventId & 0xFFFF );
|
||||||
|
player.eventPlay( eventId, 3, 0, 0, 0 );
|
||||||
|
},
|
||||||
|
[] ( Entity::Player& ply, uint32_t evntId, uint64_t additional )
|
||||||
|
{
|
||||||
|
|
||||||
|
}, 0 );
|
||||||
|
|
||||||
|
player.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
68
scripts/native/aetheryte/Aetheryte.cpp
Normal file
68
scripts/native/aetheryte/Aetheryte.cpp
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
#define ACTION_ATTUNE 0x13
|
||||||
|
#define ACTION_TELEPORT 0x4
|
||||||
|
|
||||||
|
#define AetheryteBaseId 0x50000
|
||||||
|
#define AETHERYTE_MENU_AETHERNET 1
|
||||||
|
#define AETHERYTE_MENU_HOUSING 2
|
||||||
|
#define AETHERYTE_MENU_HOME_POINT 3
|
||||||
|
#define AETHERYTE_MENU_FAVORITE_POINT 4
|
||||||
|
#define AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN 5
|
||||||
|
|
||||||
|
class Aetheryte : public EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Aetheryte() : EventScript( "Aetheryte", EVENTSCRIPT_AETHERYTE_ID )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
||||||
|
{
|
||||||
|
player.eventPlay( eventId, 0, 1, []( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param1 == 256 ) // set homepoint
|
||||||
|
{
|
||||||
|
player.setHomepoint( eventId & 0xFFFF );
|
||||||
|
player.sendQuestMessage( eventId, 2, 0xEA, 0, 0 );
|
||||||
|
}
|
||||||
|
else if( param1 == 512 ) // aethernet access
|
||||||
|
{
|
||||||
|
if( param2 == 4 )
|
||||||
|
{
|
||||||
|
player.teleport( param3, 2 );
|
||||||
|
}
|
||||||
|
else if( param2 == 2 ) // register favored destination
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
// else if( param2 == 0xC3E1 ) // register free destination
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.eventActionStart( eventId, ACTION_ATTUNE, []( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||||
|
{
|
||||||
|
player.registerAetheryte( eventId & 0xFFFF );
|
||||||
|
|
||||||
|
if( player.isActionLearned( ACTION_TELEPORT ) )
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( eventId, 0, 2, 0, 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( eventId, 0, 1, 1, 0 );
|
||||||
|
player.learnAction( ACTION_TELEPORT );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[] ( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||||
|
{}, 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
90
scripts/native/opening/OpeningGridania.cpp
Normal file
90
scripts/native/opening/OpeningGridania.cpp
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class OpeningGridania : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 2117539;
|
||||||
|
static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 2366417;
|
||||||
|
static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 2351918;
|
||||||
|
static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 2351921;
|
||||||
|
static constexpr auto ERANGE_SEQ_1_CLOSED_2 = 2351919;
|
||||||
|
static constexpr auto POS_SEQ_1_CLOSED_RETURN_2 = 2351921;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 2280846;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 2320804;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_1 = 2367988;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 2280851;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 2320811;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_3 = 2563491;
|
||||||
|
static constexpr auto BGM_MUSIC_ZONE_FST_TWN = 1003;
|
||||||
|
static constexpr auto NCUT_FST_1 = 3;
|
||||||
|
static constexpr auto NCUT_FST_2 = 53;
|
||||||
|
static constexpr auto NCUT_FST_3 = 226;
|
||||||
|
static constexpr auto ENPC_QUEST_OFFER = 1985150;
|
||||||
|
static constexpr auto NCUT_LIGHT_ALL = 2;
|
||||||
|
static constexpr auto NCUT_LIGHT_FST_1 = 147;
|
||||||
|
static constexpr auto NCUT_LIGHT_FST_2 = 146;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setOpeningSequence( 1 );
|
||||||
|
Scene00001( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, 0x04AC05, 0, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 1, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 1, 0x32 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00020( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 20, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00030( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 30, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00040( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( player.getOpeningSequence() == 2 )
|
||||||
|
{
|
||||||
|
// update the instance boundaries
|
||||||
|
Scene00030( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 40, 1, 2, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
OpeningGridania() : EventScript( "OpeningGridania", 1245186 )
|
||||||
|
{}
|
||||||
|
|
||||||
|
void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
if( player.getOpeningSequence() == 0 )
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Scene00040( player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
if( param1 == ERANGE_SEQ_1_CLOSED_1 || param1 == ERANGE_SEQ_1_CLOSED_2 )
|
||||||
|
{
|
||||||
|
Scene00020( player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
98
scripts/native/opening/OpeningLimsa.cpp
Normal file
98
scripts/native/opening/OpeningLimsa.cpp
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Opening Script: OpeningLimsaLominsa
|
||||||
|
// Quest Name: OpeningLimsaLominsa
|
||||||
|
// Quest ID: 1245185
|
||||||
|
|
||||||
|
class OpeningLimsa : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 4101831;
|
||||||
|
static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 4102066;
|
||||||
|
static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 4101785;
|
||||||
|
static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 4101797;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 4101744;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 4101761;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_1 = 4102038;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_2 = 4101746;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_2 = 4101763;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_2 = 4102036;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 4101967;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 4101982;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_3 = 4102033;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_4 = 4101970;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_4 = 4101984;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_4 = 4102031;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_5 = 4101973;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_5 = 4101985;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_5 = 4102007;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_6 = 4101979;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_6 = 4101988;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_6 = 2367400;
|
||||||
|
static constexpr auto BGM_MUSIC_ZONE_SEA_TWN = 1020;
|
||||||
|
static constexpr auto NCUT_SEA_1 = 200;
|
||||||
|
static constexpr auto NCUT_SEA_2 = 132;
|
||||||
|
static constexpr auto NCUT_SEA_3 = 201;
|
||||||
|
static constexpr auto ENPC_QUEST_OFFER = 4102039;
|
||||||
|
static constexpr auto NCUT_LIGHT_ALL = 2;
|
||||||
|
static constexpr auto NCUT_LIGHT_SEA_1 = 147;
|
||||||
|
static constexpr auto NCUT_LIGHT_SEA_2 = 138;
|
||||||
|
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setOpeningSequence( 1 );
|
||||||
|
Scene00001( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, 0x04AC05, 0, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 1, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 1, 0x32 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00020( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 20, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00030( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 30, NO_DEFAULT_CAMERA | HIDE_HOTBAR, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00040( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( player.getOpeningSequence() == 2 )
|
||||||
|
{
|
||||||
|
// update instance boundaries
|
||||||
|
Scene00030( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 40, NO_DEFAULT_CAMERA, 2, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
OpeningLimsa() : EventScript( "OpeningLimsa", 1245185 ) {}
|
||||||
|
|
||||||
|
void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
if( player.getOpeningSequence() == 0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else
|
||||||
|
Scene00040( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
// todo: handle closed events
|
||||||
|
}
|
||||||
|
};
|
91
scripts/native/opening/OpeningUldah.cpp
Normal file
91
scripts/native/opening/OpeningUldah.cpp
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class OpeningUldah : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto ERANGE_HOWTO_ANN_AND_QUEST = 4101650;
|
||||||
|
static constexpr auto ERANGE_HOWTO_QUEST_REWARD = 4102883;
|
||||||
|
static constexpr auto ERANGE_SEQ_1_CLOSED_1 = 4101587;
|
||||||
|
static constexpr auto POS_SEQ_1_CLOSED_RETURN_1 = 4101691;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_1 = 4101537;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_1 = 4101685;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_1 = 4101796;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_2 = 4101525;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_2 = 4101680;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_2 = 4101789;
|
||||||
|
static constexpr auto ERANGE_ALWAYS_CLOSED_3 = 4101535;
|
||||||
|
static constexpr auto POS_ALWAYS_CLOSED_RETURN_3 = 4101681;
|
||||||
|
static constexpr auto ENPC_ALWAYS_CLOSED_3 = 4101787;
|
||||||
|
static constexpr auto BGM_MUSIC_ZONE_WIL_TWN = 1035;
|
||||||
|
static constexpr auto NCUT_WIL_1 = 186;
|
||||||
|
static constexpr auto NCUT_WIL_2 = 139;
|
||||||
|
static constexpr auto NCUT_WIL_3 = 187;
|
||||||
|
static constexpr auto ENPC_QUEST_OFFER = 3969639;
|
||||||
|
static constexpr auto NCUT_LIGHT_ALL = 2;
|
||||||
|
static constexpr auto NCUT_LIGHT_WIL_1 = 147;
|
||||||
|
static constexpr auto NCUT_LIGHT_WIL_2 = 145;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setOpeningSequence( 1 );
|
||||||
|
Scene00001( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, 0x04AC05, 0, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 1, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0x32 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00020( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 20, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00030( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 30, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00040( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( player.getOpeningSequence() == 2 )
|
||||||
|
Scene00030( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 40, NO_DEFAULT_CAMERA, 2, 1, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
OpeningUldah() : EventScript( "OpeningUldah", 1245187 ) {}
|
||||||
|
|
||||||
|
void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
if( player.getOpeningSequence() == 0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else
|
||||||
|
Scene00040( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
if( param1 == ERANGE_SEQ_1_CLOSED_1 )
|
||||||
|
Scene00020( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
if( param1 == ERANGE_ALWAYS_CLOSED_1 || param1 == ERANGE_ALWAYS_CLOSED_2 || param1 == ERANGE_ALWAYS_CLOSED_3 )
|
||||||
|
{
|
||||||
|
Scene00020( player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
104
scripts/native/quest/ManFst001.cpp
Normal file
104
scripts/native/quest/ManFst001.cpp
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: ManFst001_00039
|
||||||
|
// Quest Name: Coming to Gridania
|
||||||
|
// Quest ID: 65575
|
||||||
|
// Start NPC: 1001148
|
||||||
|
// End NPC: 1001140
|
||||||
|
|
||||||
|
class ManFst001 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
|
||||||
|
static constexpr auto RewardExpFactor = 50;
|
||||||
|
static constexpr auto RewardGil = 103;
|
||||||
|
|
||||||
|
static constexpr auto ACTOR0 = 1001148;
|
||||||
|
static constexpr auto ACTOR1 = 1001140;
|
||||||
|
static constexpr auto CUT_EVENT = 29;
|
||||||
|
static constexpr auto EOBJECT0 = 2001659;
|
||||||
|
static constexpr auto EOBJECT1 = 2001660;
|
||||||
|
static constexpr auto EOBJECT7 = 2616477;
|
||||||
|
static constexpr auto EVENT_ACTION_SEARCH = 1;
|
||||||
|
static constexpr auto HOWTO_QUEST_ACCEPT = 12;
|
||||||
|
static constexpr auto HOWTO_QUEST_ANNOUNCE = 2;
|
||||||
|
static constexpr auto HOWTO_REWARD = 11;
|
||||||
|
static constexpr auto HOWTO_TODO = 3;
|
||||||
|
static constexpr auto OPENING_EVENT_HANDLER = 1245186;
|
||||||
|
static constexpr auto SEQ_2_ACTOR1 = 2;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
{
|
||||||
|
player.setOpeningSequence( 2 );
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00002( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0xF8482EFB, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
|
||||||
|
player.eventPlay( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, 0, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00005( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 4, 0x2c02, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 5, INVIS_OTHER_PC, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManFst001() : EventScript( "ManFst001", 65575 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else if( actor == ACTOR1 )
|
||||||
|
Scene00004( player );
|
||||||
|
}
|
||||||
|
};
|
223
scripts/native/quest/ManFst002.cpp
Normal file
223
scripts/native/quest/ManFst002.cpp
Normal file
|
@ -0,0 +1,223 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: ManFst002_00124
|
||||||
|
// Quest Name: Close to Home
|
||||||
|
// Quest ID: 65660
|
||||||
|
// Start NPC: 1001140
|
||||||
|
// End NPC: 1000100
|
||||||
|
|
||||||
|
class ManFst002 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_1 = 1;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
//this.SEQ_OFFER = ?;
|
||||||
|
|
||||||
|
// Quest rewards
|
||||||
|
static constexpr auto RewardExpFactor = 100;
|
||||||
|
static constexpr auto RewardGil = 107;
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
// some of these may be useful
|
||||||
|
static constexpr auto ACTOR0 = 1001140;
|
||||||
|
static constexpr auto ACTOR1 = 2;
|
||||||
|
static constexpr auto ACTOR2 = 1000251;
|
||||||
|
static constexpr auto ACTOR20 = 1000159;
|
||||||
|
static constexpr auto ACTOR3 = 1000768;
|
||||||
|
static constexpr auto ACTOR4 = 1000100;
|
||||||
|
static constexpr auto BIND_ACTOR0 = 6229224;
|
||||||
|
static constexpr auto HOW_TO_DESION = 13;
|
||||||
|
static constexpr auto HOW_TO_MAP_AND_NAVI = 4;
|
||||||
|
static constexpr auto ITEM0 = 2000074;
|
||||||
|
static constexpr auto LOC_ACTOR0 = 1003159;
|
||||||
|
static constexpr auto LOC_MARKER_01 = 2153091;
|
||||||
|
static constexpr auto LOC_MARKER_02 = 2153104;
|
||||||
|
static constexpr auto LOC_MARKER_03 = 2153111;
|
||||||
|
static constexpr auto LOC_MARKER_04 = 2154539;
|
||||||
|
static constexpr auto LOC_MARKER_05 = 2154540;
|
||||||
|
static constexpr auto LOC_MARKER_06 = 2154541;
|
||||||
|
static constexpr auto LOC_MARKER_07 = 2210446;
|
||||||
|
static constexpr auto LOC_MARKER_08 = 2210454;
|
||||||
|
static constexpr auto LOC_MARKER_09 = 2210461;
|
||||||
|
static constexpr auto LOC_MOTION0 = 799;
|
||||||
|
static constexpr auto POPRANGE0 = 2280858;
|
||||||
|
static constexpr auto REWARD_DESION = 1;
|
||||||
|
static constexpr auto SEQ_0_ACTOR0 = 0;
|
||||||
|
static constexpr auto SEQ_0_ACTOR0_LQ = 50;
|
||||||
|
static constexpr auto SEQ_1_ACTOR0 = 4;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1 = 1;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1_WAIT = 51;
|
||||||
|
static constexpr auto SEQ_1_ACTOR2 = 2;
|
||||||
|
static constexpr auto SEQ_1_ACTOR3 = 3;
|
||||||
|
static constexpr auto SEQ_1_ACTOR3_NPCTRADENO = 99;
|
||||||
|
static constexpr auto SEQ_1_ACTOR3_NPCTRADEOK = 100;
|
||||||
|
static constexpr auto SEQ_2_ACTOR4 = 5;
|
||||||
|
static constexpr auto TERRITORYTYPE0 = 132;
|
||||||
|
static constexpr auto UNLOCK_DESION = 14;
|
||||||
|
|
||||||
|
|
||||||
|
void checkQuestCompletion( Entity::Player& player, uint32_t varIdx )
|
||||||
|
{
|
||||||
|
if( varIdx == 3 )
|
||||||
|
player.sendQuestMessage( getId(), 1, 0, 0, 0 );
|
||||||
|
else if( varIdx == 2 )
|
||||||
|
player.sendQuestMessage( getId(), 2, 0, 0, 0 );
|
||||||
|
else
|
||||||
|
player.sendQuestMessage( getId(), 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
auto var_attuned = player.getQuestUI8AL( static_cast< uint16_t >( getId() ) );
|
||||||
|
auto var_class = player.getQuestUI8BH( static_cast< uint16_t >( getId() ) );
|
||||||
|
auto var_trade = player.getQuestUI8BL( static_cast< uint16_t >( getId() ) );
|
||||||
|
|
||||||
|
if( var_attuned == 1 && var_class == 1 && var_trade == 1 )
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
Scene00050( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8AL( getId(), 1 );
|
||||||
|
checkQuestCompletion( player, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0x0EFB, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8BH( getId(), 1 );
|
||||||
|
checkQuestCompletion( player, 3 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, 0, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
Scene00100( player );
|
||||||
|
else
|
||||||
|
Scene00099( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 3, 0, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 4, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // finish quest
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00050( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
// on quest accept
|
||||||
|
player.updateQuest( getId(), 1 );
|
||||||
|
player.setQuestUI8CH( getId(), 1 ); // receive key item
|
||||||
|
|
||||||
|
// teleport to real gridania
|
||||||
|
player.forceZoneing( 132 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00051( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 51, 0, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00099( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00004( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 99, 0, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00100( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8CH( getId(), 0 ); // remove traded key item
|
||||||
|
player.setQuestUI8BL( getId(), 1 );
|
||||||
|
|
||||||
|
checkQuestCompletion( player, 2 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 100, 0x0EFB, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManFst002() : EventScript( "ManFst002", 65621 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else if( actor == ACTOR1 )
|
||||||
|
{
|
||||||
|
// attune
|
||||||
|
auto event = [&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( 0x050002, 0, 1, 0, 0 );
|
||||||
|
player.registerAetheryte( 2 );
|
||||||
|
player.learnAction( 1 );
|
||||||
|
|
||||||
|
Scene00051( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventActionStart( 0x050002, 0x13, event, nullptr, 0x050002 );
|
||||||
|
|
||||||
|
player.unlock();
|
||||||
|
}
|
||||||
|
else if( actor == ACTOR2 )
|
||||||
|
Scene00002( player );
|
||||||
|
else if( actor == ACTOR3 )
|
||||||
|
Scene00003( player );
|
||||||
|
else if( actor == ACTOR4 )
|
||||||
|
Scene00005( player );
|
||||||
|
}
|
||||||
|
};
|
21
scripts/native/quest/ManFst003.cpp
Normal file
21
scripts/native/quest/ManFst003.cpp
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: ManFst003_00123
|
||||||
|
// Quest Name: Close to Home
|
||||||
|
// Quest ID: 65659
|
||||||
|
// Start NPC: 1001140
|
||||||
|
// End NPC: 1000100
|
||||||
|
|
||||||
|
class ManFst003 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManFst003() : EventScript( "ManFst003", 65659 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
257
scripts/native/quest/ManFst004.cpp
Normal file
257
scripts/native/quest/ManFst004.cpp
Normal file
|
@ -0,0 +1,257 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, change its extension to .cpp
|
||||||
|
// and move it to the correct folder in <root>/scripts/native/
|
||||||
|
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
|
||||||
|
// Quest Script: ManFst004_00124
|
||||||
|
// Quest Name: Close to Home
|
||||||
|
// Quest ID: 65660
|
||||||
|
// Start NPC: 1001140
|
||||||
|
// End NPC: 1000100
|
||||||
|
|
||||||
|
class ManFst004 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// GetQuestBitFlag8
|
||||||
|
// GetQuestUI8AL
|
||||||
|
// GetQuestUI8BH
|
||||||
|
// GetQuestUI8BL
|
||||||
|
// GetQuestUI8CH
|
||||||
|
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Quest rewards
|
||||||
|
static constexpr auto RewardExpFactor = 100;
|
||||||
|
static constexpr auto RewardGil = 107;
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1001140;
|
||||||
|
static constexpr auto Actor1 = 2;
|
||||||
|
static constexpr auto Actor2 = 1000323;
|
||||||
|
static constexpr auto Actor20 = 1000159;
|
||||||
|
static constexpr auto Actor3 = 1000768;
|
||||||
|
static constexpr auto Actor4 = 1000100;
|
||||||
|
static constexpr auto BindActor0 = 6229224;
|
||||||
|
static constexpr auto Item0 = 2000120;
|
||||||
|
static constexpr auto LocActor0 = 1003159;
|
||||||
|
static constexpr auto LocMarker01 = 2153091;
|
||||||
|
static constexpr auto LocMarker02 = 2153104;
|
||||||
|
static constexpr auto LocMarker03 = 2153111;
|
||||||
|
static constexpr auto LocMarker04 = 2154539;
|
||||||
|
static constexpr auto LocMarker05 = 2154540;
|
||||||
|
static constexpr auto LocMarker06 = 2154541;
|
||||||
|
static constexpr auto LocMarker07 = 2210446;
|
||||||
|
static constexpr auto LocMarker08 = 2210454;
|
||||||
|
static constexpr auto LocMarker09 = 2210461;
|
||||||
|
static constexpr auto LocMotion0 = 799;
|
||||||
|
static constexpr auto Poprange0 = 2280858;
|
||||||
|
static constexpr auto RewardDesion = 1;
|
||||||
|
static constexpr auto Seq0Actor0 = 0;
|
||||||
|
static constexpr auto Seq0Actor0Lq = 50;
|
||||||
|
static constexpr auto Seq1Actor0 = 4;
|
||||||
|
static constexpr auto Seq1Actor1 = 1;
|
||||||
|
static constexpr auto Seq1Actor1Wait = 51;
|
||||||
|
static constexpr auto Seq1Actor2 = 2;
|
||||||
|
static constexpr auto Seq1Actor3 = 3;
|
||||||
|
static constexpr auto Seq1Actor3Npctradeno = 99;
|
||||||
|
static constexpr auto Seq1Actor3Npctradeok = 100;
|
||||||
|
static constexpr auto Seq2Actor4 = 5;
|
||||||
|
static constexpr auto Territorytype0 = 132;
|
||||||
|
static constexpr auto UnlockDesion = 14;
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManFst004() : EventScript( "Close to Home", 65660 ){};
|
||||||
|
~ManFst004(){};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
if( actor == ManFst004::Actor0 )
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
else if( actor == ManFst004::Actor1 )
|
||||||
|
{
|
||||||
|
// starting the Aetheryte eventaction
|
||||||
|
// player.eventStart( actorId, 0x050002, 7, 0, 0);
|
||||||
|
// starting the eventaction 0x13 ( attuning )
|
||||||
|
player.eventActionStart( 0x050002, 0x13,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( 0x050002, 0, 1, 0, 0 );
|
||||||
|
player.registerAetheryte( 2 );
|
||||||
|
player.learnAction( 1 );
|
||||||
|
Scene00051( player );
|
||||||
|
},
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {},
|
||||||
|
eventId );
|
||||||
|
}
|
||||||
|
else if( actor == ManFst004::Actor2 )
|
||||||
|
{
|
||||||
|
Scene00002( player );
|
||||||
|
}
|
||||||
|
else if( actor == ManFst004::Actor3 )
|
||||||
|
{
|
||||||
|
Scene00003( player );
|
||||||
|
}
|
||||||
|
else if( actor == ManFst004::Actor4 )
|
||||||
|
{
|
||||||
|
Scene00005( player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void checkQuestCompletion( Entity::Player& player, uint32_t varIdx )
|
||||||
|
{
|
||||||
|
if( varIdx == 3 )
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( m_id, 1, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
else if( varIdx == 2 )
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( m_id, 2, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.sendQuestMessage( m_id, 0, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
auto questId = m_id;
|
||||||
|
|
||||||
|
auto QUEST_VAR_ATTUNE = player.getQuestUI8AL( questId );
|
||||||
|
auto QUEST_VAR_CLASS = player.getQuestUI8BH( questId );
|
||||||
|
auto QUEST_VAR_TRADE = player.getQuestUI8BL( questId );
|
||||||
|
|
||||||
|
if( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
|
||||||
|
{
|
||||||
|
player.updateQuest( questId, SeqFinish );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 0, 0x2000,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
{
|
||||||
|
Scene00050( player );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 1, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8AL( m_id, 1 );
|
||||||
|
checkQuestCompletion( player, 0 );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 2, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8BH( m_id, 1 );
|
||||||
|
checkQuestCompletion( player, 3 );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 3, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00100( player );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Scene00099( player );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 4, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // finish quest
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( m_id, 0 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( m_id );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00050( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
// accepting quest "close to home"
|
||||||
|
player.updateQuest( m_id, 1 );
|
||||||
|
player.setQuestUI8CH( m_id, 1 ); // receive key item
|
||||||
|
// event is done, need to teleport to real zone.
|
||||||
|
player.setZone( 132 );
|
||||||
|
//player.setZone(183); back to starting griania for debug purpose
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00051( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 51, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00099( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 99, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00004( player );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00100( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( m_id, 100, 0,
|
||||||
|
[&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8CH( m_id, 0 ); // remove key item, since we have just traded it
|
||||||
|
player.setQuestUI8BL( m_id, 1 );
|
||||||
|
checkQuestCompletion( player, 2 );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
161
scripts/native/quest/ManSea001.cpp
Normal file
161
scripts/native/quest/ManSea001.cpp
Normal file
|
@ -0,0 +1,161 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
class ManSea001 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_1 = 1;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
|
||||||
|
static constexpr auto ACTOR0 = 1001028;
|
||||||
|
static constexpr auto ACTOR1 = 1002732;
|
||||||
|
static constexpr auto ACTOR2 = 1002697;
|
||||||
|
static constexpr auto CUT_EVENT = 202;
|
||||||
|
static constexpr auto EOBJECT0 = 2001679;
|
||||||
|
static constexpr auto EOBJECT1 = 2001680;
|
||||||
|
static constexpr auto EVENT_ACTION_SEARCH = 1;
|
||||||
|
static constexpr auto LOC_ACTOR0 = 1002732;
|
||||||
|
static constexpr auto LOC_POS_ACTOR0 = 4107186;
|
||||||
|
static constexpr auto OPENING_EVENT_HANDLER = 1245185;
|
||||||
|
static constexpr auto POPRANGE0 = 4127803;
|
||||||
|
static constexpr auto TERRITORYTYPE0 = 181;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
{
|
||||||
|
player.setOpeningSequence( 2 );
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00002( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0xF8482EFB, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00003( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, NONE, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 1 );
|
||||||
|
|
||||||
|
player.eventPlay( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 1, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 3, NONE, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 4, NONE, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00006( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 5, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
player.prepareZoning( player.getZoneId(), true, 1, 0 );
|
||||||
|
player.changePosition( 9, 40, 14, 2 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 6, INVIS_OTHER_PC, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 7, NONE, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 8, NONE, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 9, NONE, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00010( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 10, NONE, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00012( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 11, 0x2c02, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00012( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // finish quest
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 12, INVIS_OTHER_PC, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00013( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 13, NONE, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManSea001() : EventScript( "ManSea001", 65643 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else if( actor == ACTOR1 )
|
||||||
|
Scene00005( player );
|
||||||
|
else if( actor == ACTOR2 )
|
||||||
|
Scene00011( player );
|
||||||
|
}
|
||||||
|
};
|
149
scripts/native/quest/ManSea002.cpp
Normal file
149
scripts/native/quest/ManSea002.cpp
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: ManSea002_00108
|
||||||
|
// Quest Name: Close to Home
|
||||||
|
// Quest ID: 65644
|
||||||
|
// Start NPC: 1002697
|
||||||
|
// End NPC: 1000972
|
||||||
|
|
||||||
|
class ManSea002 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_1 = 1;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
|
||||||
|
|
||||||
|
static constexpr auto ACTOR0 = 1002697;
|
||||||
|
static constexpr auto ACTOR1 = 1001217;
|
||||||
|
static constexpr auto ACTOR2 = 1000926;
|
||||||
|
static constexpr auto ACTOR3 = 1000972;
|
||||||
|
static constexpr auto AETHERYTE0 = 8;
|
||||||
|
static constexpr auto BIND_ACTOR0 = 6229226;
|
||||||
|
static constexpr auto ITEM0 = 2000104;
|
||||||
|
static constexpr auto LOC_ACTOR1 = 1001023;
|
||||||
|
static constexpr auto LOC_FACE0 = 604;
|
||||||
|
static constexpr auto LOC_FACE1 = 605;
|
||||||
|
static constexpr auto LOC_POS_CAM1 = 4106696;
|
||||||
|
static constexpr auto LOC_POS_CAM2 = 4106698;
|
||||||
|
static constexpr auto REWARD0 = 1;
|
||||||
|
static constexpr auto SCREENIMAGE0 = 14;
|
||||||
|
static constexpr auto UNLOCK_DESION = 14;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
Scene00050( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 4, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 5, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 6, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 7, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 8, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00050( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
// on quest accept
|
||||||
|
player.updateQuest( getId(), 1 );
|
||||||
|
player.setQuestUI8CH( getId(), 1 ); // receive key item
|
||||||
|
|
||||||
|
// teleport to real gridania
|
||||||
|
player.forceZoneing( 128 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback );
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
ManSea002() : EventScript( "ManSea002", 65644 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
// todo: this doesn't actually play a cutscene after accepting the quest
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
};
|
143
scripts/native/quest/ManWil001.cpp
Normal file
143
scripts/native/quest/ManWil001.cpp
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: ManWil001_00594
|
||||||
|
// Quest Name: Coming to Ul'dah
|
||||||
|
// Quest ID: 66130
|
||||||
|
// Start NPC: 1003987
|
||||||
|
// End NPC: 1003988
|
||||||
|
|
||||||
|
class ManWil001 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
|
||||||
|
static constexpr auto ACTOR0 = 1003987;
|
||||||
|
static constexpr auto ACTOR1 = 1003988;
|
||||||
|
static constexpr auto ACTOR20 = 1001285;
|
||||||
|
static constexpr auto CUT_EVENT = 188;
|
||||||
|
static constexpr auto EOBJECT0 = 2001681;
|
||||||
|
static constexpr auto EOBJECT1 = 2001682;
|
||||||
|
static constexpr auto EOBJECT2 = 2001683;
|
||||||
|
static constexpr auto EOBJECT3 = 2001706;
|
||||||
|
static constexpr auto EVENT_ACTION_SEARCH = 1;
|
||||||
|
static constexpr auto OPENING_EVENT_HANDLER = 1245187;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
{
|
||||||
|
player.setOpeningSequence( 2 );
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00002( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, 0xF8482EFB, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
player.eventPlay( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, NONE, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 3, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
Scene00005( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 4, 0x2c02, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ this ]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 5, INVIS_OTHER_PC, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 6, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 7, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 8, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 9, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00010( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 10, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 11, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00012( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 12, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00013( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 13, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManWil001() : EventScript( "ManWil001", 66130 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else if( actor == ACTOR1 )
|
||||||
|
Scene00004( player );
|
||||||
|
}
|
||||||
|
};
|
156
scripts/native/quest/ManWil002.cpp
Normal file
156
scripts/native/quest/ManWil002.cpp
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
#include "../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: ManWil002_00568
|
||||||
|
// Quest Name: Close to Home
|
||||||
|
// Quest ID: 66104
|
||||||
|
// Start NPC: 1003988
|
||||||
|
// End NPC: 1001353
|
||||||
|
|
||||||
|
class ManWil002 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_1 = 1;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
|
||||||
|
|
||||||
|
static constexpr auto ACTOR0 = 1003988;
|
||||||
|
static constexpr auto ACTOR1 = 1002277;
|
||||||
|
static constexpr auto ACTOR2 = 1003908;
|
||||||
|
static constexpr auto ACTOR20 = 1001637;
|
||||||
|
static constexpr auto ACTOR3 = 1001353;
|
||||||
|
static constexpr auto AETHERYTE0 = 9;
|
||||||
|
static constexpr auto BIND_ACTOR0 = 6229228;
|
||||||
|
static constexpr auto ITEM0 = 2000386;
|
||||||
|
static constexpr auto LOC_ACTION1 = 605;
|
||||||
|
static constexpr auto LOC_ACTION2 = 1005;
|
||||||
|
static constexpr auto LOC_MARKER_01 = 4009142;
|
||||||
|
static constexpr auto LOC_MARKER_02 = 4009152;
|
||||||
|
static constexpr auto LOC_POS_CAM1 = 4105872;
|
||||||
|
static constexpr auto LOC_POS_CAM2 = 4105874;
|
||||||
|
static constexpr auto LOC_POS_CAM3 = 4009150;
|
||||||
|
static constexpr auto LOC_POS_CAM4 = 4143488;
|
||||||
|
static constexpr auto POPRANGE0 = 4110794;
|
||||||
|
static constexpr auto REWARD0 = 1;
|
||||||
|
static constexpr auto SCREENIMAGE0 = 14;
|
||||||
|
static constexpr auto SEQ_0_ACTOR0_LQ = 50;
|
||||||
|
static constexpr auto TERRITORYTYPE0 = 130;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
Scene00050( player );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, HIDE_HOTBAR, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 4, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 5, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 6, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 7, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 8, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00050( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
// on quest accept
|
||||||
|
player.updateQuest( getId(), 1 );
|
||||||
|
player.setQuestUI8CH( getId(), 1 ); // receive key item
|
||||||
|
|
||||||
|
// teleport to real gridania
|
||||||
|
player.forceZoneing( 130 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManWil002() : EventScript( "ManWil002", 66104 ) { }
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
};
|
84
scripts/native/quest/subquest/gridania/SubFst001.cpp
Normal file
84
scripts/native/quest/subquest/gridania/SubFst001.cpp
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
#include "../../../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: SubFst001_00024
|
||||||
|
// Quest Name: Coarse Correspondence
|
||||||
|
// Quest ID: 65560
|
||||||
|
// Start NPC: 1000206
|
||||||
|
// End NPC: 1000233
|
||||||
|
|
||||||
|
class SubFst001 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
static constexpr auto ACTOR0 = 1000206;
|
||||||
|
static constexpr auto ACTOR1 = 1000233;
|
||||||
|
static constexpr auto ITEM0 = 2000079;
|
||||||
|
static constexpr auto SEQ_0_ACTOR0 = 0;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1 = 1;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1_NPCTRADENO = 99;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1_NPCTRADEOK = 100;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
{
|
||||||
|
player.setQuestUI8AL( getId(), 1 );
|
||||||
|
player.setQuestUI8BH( getId(), 1 );
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 1, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00099( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 99, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00100( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 100, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
SubFst001() : EventScript( "SubFst001", 65560 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
{
|
||||||
|
if( !player.hasQuest( getId() ) )
|
||||||
|
Scene00000( player );
|
||||||
|
else
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
else if( actor == ACTOR1 )
|
||||||
|
{
|
||||||
|
if( !player.hasQuest( getId() ) )
|
||||||
|
Scene00099( player );
|
||||||
|
else
|
||||||
|
Scene00100( player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
56
scripts/native/quest/subquest/gridania/SubFst010.cpp
Normal file
56
scripts/native/quest/subquest/gridania/SubFst010.cpp
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
#include "../../../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: SubFst010_00001
|
||||||
|
// Quest Name: A Good Adventurer Is Hard to Find
|
||||||
|
// Quest ID: 65537
|
||||||
|
// Start NPC: 1000146
|
||||||
|
// End NPC: 1000195
|
||||||
|
|
||||||
|
class SubFst010 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
static constexpr auto ACTOR0 = 1000146;
|
||||||
|
static constexpr auto ACTOR1 = 1000195;
|
||||||
|
static constexpr auto SEQ_0_ACTOR0 = 0;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1 = 1;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // accept quest
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // finish quest
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
SubFst010() : EventScript( "SubFst010", 65537 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR0 )
|
||||||
|
Scene00000( player );
|
||||||
|
else if( actor == ACTOR1 )
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
184
scripts/native/quest/subquest/gridania/SubFst013.cpp
Normal file
184
scripts/native/quest/subquest/gridania/SubFst013.cpp
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
#include "../../../ScriptObject.h"
|
||||||
|
|
||||||
|
// Quest Script: SubFst013_00040
|
||||||
|
// Quest Name: For Friendship
|
||||||
|
// Quest ID: 65576
|
||||||
|
// Start NPC: 1000162
|
||||||
|
// End NPC: 1000162
|
||||||
|
|
||||||
|
class SubFst013 : public EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static constexpr auto SEQ_0 = 0;
|
||||||
|
static constexpr auto SEQ_1 = 1;
|
||||||
|
static constexpr auto SEQ_2 = 2;
|
||||||
|
static constexpr auto SEQ_3 = 3;
|
||||||
|
static constexpr auto SEQ_4 = 4;
|
||||||
|
static constexpr auto SEQ_5 = 5;
|
||||||
|
static constexpr auto SEQ_FINISH = 255;
|
||||||
|
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto ACTOR0 = 1000162;
|
||||||
|
static constexpr auto ACTOR1 = 1000161;
|
||||||
|
static constexpr auto FIRST_QUEST = 65575;
|
||||||
|
static constexpr auto SEQ_0_ACTOR0 = 0;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1 = 1;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1_EMOTENO = 99;
|
||||||
|
static constexpr auto SEQ_1_ACTOR1_EMOTEOK = 100;
|
||||||
|
static constexpr auto SEQ_2_ACTOR0 = 2;
|
||||||
|
static constexpr auto SEQ_3_ACTOR1 = 3;
|
||||||
|
static constexpr auto SEQ_3_ACTOR1_EMOTENO = 97;
|
||||||
|
static constexpr auto SEQ_3_ACTOR1_EMOTEOK = 98;
|
||||||
|
static constexpr auto SEQ_4_ACTOR0 = 4;
|
||||||
|
static constexpr auto SEQ_5_ACTOR1 = 5;
|
||||||
|
static constexpr auto SEQ_5_ACTOR1_EMOTENO = 95;
|
||||||
|
static constexpr auto SEQ_5_ACTOR1_EMOTEOK = 96;
|
||||||
|
static constexpr auto SEQ_6_ACTOR0 = 6;
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_1 );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 2, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_3 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 2, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 3, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_5 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 4, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 5, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
if( param2 == 1 ) // finish quest
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 6, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00095( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 95, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00096( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_FINISH );
|
||||||
|
player.sendQuestMessage( getId(), 4, 2, 0, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 96, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00097( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 97, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00098( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_4 );
|
||||||
|
player.sendQuestMessage( getId(), 2, 2, 0, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 98, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00099( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventPlay( getId(), 99, NONE );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00100( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), SEQ_2 );
|
||||||
|
player.sendQuestMessage( getId(), 0, 2, 0, 0 );
|
||||||
|
};
|
||||||
|
|
||||||
|
player.eventPlay( getId(), 100, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
SubFst013() : EventScript( "SubFst013", 65576 ) {}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( !player.hasQuest( getId() ) )
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( actor == ACTOR1 ) // talking to Aunillie while on quest
|
||||||
|
Scene00003( player );
|
||||||
|
else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_2 )
|
||||||
|
Scene00002( player );
|
||||||
|
else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_4 )
|
||||||
|
Scene00004( player );
|
||||||
|
else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH )
|
||||||
|
Scene00006( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
|
||||||
|
if( actor == ACTOR1 && emoteId == 5 && player.getQuestSeq( getId() ) == SEQ_1 )
|
||||||
|
Scene00100( player );
|
||||||
|
else if( actor == ACTOR1 && emoteId == 18 && player.getQuestSeq( getId() ) == SEQ_3 )
|
||||||
|
Scene00098( player );
|
||||||
|
else if( actor == ACTOR1 && emoteId == 11 && player.getQuestSeq( getId() ) == SEQ_5 )
|
||||||
|
Scene00096( player );
|
||||||
|
}
|
||||||
|
};
|
|
@ -42,3 +42,7 @@ MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR
|
||||||
|
|
||||||
ALTER TABLE charainfo
|
ALTER TABLE charainfo
|
||||||
ADD `Orchestrion` binary(38) DEFAULT NULL AFTER `Mounts`;
|
ADD `Orchestrion` binary(38) DEFAULT NULL AFTER `Mounts`;
|
||||||
|
|
||||||
|
ALTER TABLE `charainfo` CHANGE `Mounts` `Mounts` BINARY(14) NULL DEFAULT NULL;
|
||||||
|
ALTER TABLE `charainfo` CHANGE `Orchestrion` `Orchestrion` BINARY(40) NULL DEFAULT NULL;
|
||||||
|
ALTER TABLE `charainfo` CHANGE `Minions` `Minions` BINARY(35) NULL DEFAULT NULL;
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(Sapphire)
|
project(Sapphire)
|
||||||
|
|
||||||
file(GLOB UTILS_PUBLIC_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*")
|
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||||
|
|
||||||
|
file(GLOB UTILS_PUBLIC_INCLUDE_FILES
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
||||||
file(GLOB UTILS_SOURCE_FILES
|
file(GLOB UTILS_SOURCE_FILES
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}*.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Config/*.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Config/*.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Crypt/*.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Crypt/*.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Database/*.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Database/*.cpp"
|
||||||
|
@ -14,22 +18,23 @@ file(GLOB UTILS_SOURCE_FILES
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Script/*.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Script/*.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Util/*.cpp")
|
"${CMAKE_CURRENT_SOURCE_DIR}/Util/*.cpp")
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
add_library(Common ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES})
|
add_library(common ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES})
|
||||||
|
|
||||||
set_target_properties(Common PROPERTIES
|
set_target_properties(common PROPERTIES
|
||||||
CXX_STANDARD 14
|
CXX_STANDARD 14
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
CXX_EXTENSIONS ON
|
CXX_EXTENSIONS ON
|
||||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
|
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/"
|
||||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
|
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/"
|
||||||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
|
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/"
|
||||||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
|
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries( Common xivdat mysqlclient mysqlConnector )
|
target_link_libraries( common xivdat mysqlclient mysqlConnector )
|
||||||
else()
|
else()
|
||||||
target_link_libraries( Common xivdat mysqlConnector libmysql )
|
target_link_libraries( common xivdat mysqlConnector libmysql )
|
||||||
endif()
|
endif()
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef _COMMON_H
|
#ifndef _COMMON_H
|
||||||
#define _COMMON_H
|
#define _COMMON_H
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#ifndef _BLOWFISH_H
|
||||||
|
#define _BLOWFISH_H
|
||||||
// blowfish.h interface file for blowfish.cpp
|
// blowfish.h interface file for blowfish.cpp
|
||||||
// _THE BLOWFISH ENCRYPTION ALGORITHM_
|
// _THE BLOWFISH ENCRYPTION ALGORITHM_
|
||||||
// by Bruce Schneier
|
// by Bruce Schneier
|
||||||
|
@ -70,3 +72,4 @@ public:
|
||||||
} w;
|
} w;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
|
@ -1,7 +1,6 @@
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#ifndef _MD52_H
|
#ifndef _MD52_H
|
||||||
#define _MD52_H
|
#define _MD52_H
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
12
src/common/Database/DatabaseDef.h
Normal file
12
src/common/Database/DatabaseDef.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef _DATABASEDEF_H
|
||||||
|
#define _DATABASEDEF_H
|
||||||
|
|
||||||
|
#include "src/libraries/sapphire/mysqlConnector/MySqlConnector.h"
|
||||||
|
#include <common/Database/DbLoader.h>
|
||||||
|
#include <common/Database/CharaDbConnection.h>
|
||||||
|
#include <common/Database/DbWorkerPool.h>
|
||||||
|
#include <common/Database/PreparedStatement.h>
|
||||||
|
|
||||||
|
extern Core::Db::DbWorkerPool< Core::Db::CharaDbConnection > g_charaDb;
|
||||||
|
|
||||||
|
#endif
|
|
@ -2,7 +2,7 @@
|
||||||
#include "DbWorker.h"
|
#include "DbWorker.h"
|
||||||
#include "src/libraries/sapphire/mysqlConnector/MySqlConnector.h"
|
#include "src/libraries/sapphire/mysqlConnector/MySqlConnector.h"
|
||||||
|
|
||||||
#include "src/servers/Server_Common/Logging/Logger.h"
|
#include <common/Logging/Logger.h>
|
||||||
#include "PreparedStatement.h"
|
#include "PreparedStatement.h"
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "src/servers/Server_Common/Util/LockedWaitQueue.h"
|
#include <common/Util/LockedWaitQueue.h>
|
||||||
#include <Server_Common/Util/LockedWaitQueue.h>
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#include <mysqld_error.h>
|
#include <mysqld_error.h>
|
||||||
#include "CharaDbConnection.h"
|
#include "CharaDbConnection.h"
|
||||||
#include "DbWorkerPool.h"
|
#include "DbWorkerPool.h"
|
||||||
#include "src/servers/Server_Common/Logging/Logger.h"
|
#include <common/Logging/Logger.h>
|
||||||
|
|
||||||
extern Core::Logger g_log;
|
extern Core::Logger g_log;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "DbWorker.h"
|
#include "DbWorker.h"
|
||||||
#include "Operation.h"
|
#include "Operation.h"
|
||||||
#include <Server_Common/Util/LockedWaitQueue.h>
|
#include <common/Util/LockedWaitQueue.h>
|
||||||
|
|
||||||
Core::Db::DbWorker::DbWorker( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* newQueue, DbConnection* pConn )
|
Core::Db::DbWorker::DbWorker( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* newQueue, DbConnection* pConn )
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <Server_Common/Util/LockedWaitQueue.h>
|
#include <common/Util/LockedWaitQueue.h>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
|
@ -7,7 +7,7 @@
|
||||||
#include "CharaDbConnection.h"
|
#include "CharaDbConnection.h"
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
|
||||||
#include <Server_Common/Logging/Logger.h>
|
#include <common/Logging/Logger.h>
|
||||||
extern Core::Logger g_log;
|
extern Core::Logger g_log;
|
||||||
|
|
||||||
class PingOperation : public Core::Db::Operation
|
class PingOperation : public Core::Db::Operation
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue