diff --git a/build_linux.sh b/build_linux.sh index 34e6433a6..ce3160551 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -106,12 +106,21 @@ if [[ $response =~ ^(yes|y| ) ]]; then oldPATH=$PATH PATH=$basedir/build/bin:$PATH - - $basedir/utils/mocha/prepare_all_scripts.sh $basedir/dsrc/sku.0/sys.server/compiled/game/script - $basedir/utils/build_java.sh - $basedir/utils/build_miff.sh - $basedir/utils/build_tab.sh - $basedir/utils/build_tpf.sh + read -p "Do you wanna use multicore scripts or the safe option? (multi/safe) " response + response=${response,,} + if [[ $response =~ ^(multi|m| ) ]]; then + $basedir/utils/mocha/prepare_all_scripts_multi.sh $basedir/dsrc/sku.0/sys.server/compiled/game/script + $basedir/utils/build_java_multi.sh + $basedir/utils/build_miff.sh + $basedir/utils/build_tab_multi.sh + $basedir/utils/build_tpf_multi.sh + else + $basedir/utils/mocha/prepare_all_scripts.sh $basedir/dsrc/sku.0/sys.server/compiled/game/script + $basedir/utils/build_java.sh + $basedir/utils/build_miff.sh + $basedir/utils/build_tab.sh + $basedir/utils/build_tpf.sh + fi $basedir/utils/build_object_template_crc_string_tables.py $basedir/utils/build_quest_crc_string_tables.py diff --git a/dsrc/sku.0/sys.server/compiled/game/script/terminal/terminal_character_builder.script b/dsrc/sku.0/sys.server/compiled/game/script/terminal/terminal_character_builder.script index ef20d7c09..ab71b687c 100644 --- a/dsrc/sku.0/sys.server/compiled/game/script/terminal/terminal_character_builder.script +++ b/dsrc/sku.0/sys.server/compiled/game/script/terminal/terminal_character_builder.script @@ -38,6 +38,9 @@ include library.stealth; include library.sui; include library.utils; include library.weapons; +include library.performance; + + /* Old Republic one/two handed lightsaber @@ -866,8 +869,10 @@ const string[] MISC_OPTIONS = { "Seeker Droid", "Master Crafted EE3 Schematic", "Master Crafted DC-15 Schematic", - "Vet 30k Resource Deed" - + "Vet 30k Resource Deed", + "Biological Focus Crystal", + "Synapse Focus Crystal", + "Grant Buffs" }; const string[] MEDICINE_OPTIONS = { "High Charge Stimpack-A", @@ -970,6 +975,8 @@ const string[] ROBE_OPTIONS = { "(80)Dark Jedi Knight Robe", "(80)Jedi Master Cloak Brown", "(80)Jedi Master Cloak Black", + "(80)Elder Jedi Arbiter Robe", + "(80)Elder Jedi Oppressor Robe", "Reset Jedi Statue Slots for Master Jedi Cloaks Collection" }; const string ARMOR_SET_PREFIX = "object/tangible/wearables/armor/"; @@ -1504,6 +1511,18 @@ const string[] CRAFTING_SUIT = { "Blix's Ultra Crafting Suit" }; + + +const string[] buffComponentKeys = { + "kinetic", + "energy", + "action_cost_reduction", + "dodge" +}; +const int[] buffComponentValues = { + 15, 15, 1, 2 +}; + /***** TRIGGERS ********************************************************/ boolean checkConfigSetting(string configString) @@ -7382,6 +7401,54 @@ messageHandler handleMiscSelect() case 10: // resource kit createObject("object/tangible/veteran_reward/resource.iff", pInv, ""); sendSystemMessageTestingOnly(player, "Resource Kit Issued"); + break; + case 11: // Bio Focus Crystal + static_item.createNewItemFunction("item_force_crystal_04_01", pInv); + sendSystemMessageTestingOnly(player, "Biological Focus Crystal Issued"); + break; + case 12: // Synapse Focus Crystal + static_item.createNewItemFunction("item_force_crystal_04_02", pInv); + sendSystemMessageTestingOnly(player, "Synapse Focus Crystal Issued"); + break; + case 13: + float currentBuffTime = performance.inspireGetMaxDuration(player); + buff.applyBuff(player, "buildabuff_inspiration", 7200); + utils.setScriptVar(player, "performance.buildabuff.buffComponentKeys", buffComponentKeys); + utils.setScriptVar(player, "performance.buildabuff.buffComponentValues", buffComponentValues); + utils.setScriptVar(player, "performance.buildabuff.player", player); + + buff.applyBuff((player), "me_buff_health_2", 7200); + buff.applyBuff((player), "me_buff_action_3", 7200); + buff.applyBuff((player), "me_buff_strength_3", 7200); + buff.applyBuff((player), "me_buff_agility_3", 7200); + buff.applyBuff((player), "me_buff_precision_3", 7200); + buff.applyBuff((player), "me_buff_melee_gb_1", 7200); + buff.applyBuff((player), "me_buff_ranged_gb_1", 7200); + buff.applyBuff((player), "of_buff_def_9", 7200); + buff.applyBuff((player), "of_focus_fire_6", 7200); + buff.applyBuff((player), "of_tactical_drop_6", 7200); + buff.applyBuff((player), "aurilian_crystal_large", 7200); + buff.applyBuff((player), "sm_smuggled", 7200); + buff.applyBuff((player), "tusken_bane", 7200); + buff.applyBuff((player), "vr_familiar_defense_8", 7200); + buff.applyBuff((player), "towPoisonResistAbsorb_3", 7200); + buff.applyBuff((player), "drink_flameout", 7200); + buff.applyBuff((player), "banner_buff_commando", 7200); + buff.applyBuff((player), "banner_buff_smuggler", 7200); + buff.applyBuff((player), "banner_buff_medic", 7200); + buff.applyBuff((player), "banner_buff_officer", 7200); + buff.applyBuff((player), "banner_buff_spy", 7200); + buff.applyBuff((player), "banner_buff_bounty_hunter", 7200); + buff.applyBuff((player), "banner_buff_force_sensitive", 7200); + buff.applyBuff((player), "muon_gold", 7200); + buff.applyBuff((player), "tcg_series1_tusken_talisman", 7200); + buff.applyBuff((player), "event_ewok_drink", 7200); + buff.applyBuff((player), "event_ewok_berry", 7200); + buff.applyBuff((player), "forceCrystalHealth", 7200); + buff.applyBuff((player), "forceCrystalForce", 7200); + + buff.applyBuff((player), "frogBuff", 7200); + sendSystemMessageTestingOnly(player, "Buffs granted."); default: cleanScriptVars(player); return SCRIPT_CONTINUE; @@ -9690,12 +9757,24 @@ messageHandler handleRobeSelect() } break; case 8: + { + static_item.createNewItemFunction("item_jedi_robe_light_04_04", pInv); + sendSystemMessageTestingOnly(player, "Elder Jedi Arbiter Robe Issued!"); + } + break; + case 9: + { + static_item.createNewItemFunction("item_jedi_robe_dark_04_04", pInv); + sendSystemMessageTestingOnly(player, "Elder Jedi Oppressor Robe Issued!"); + } + break; + case 10: { static_item.createNewItemFunction("item_jedi_robe_06_02", pInv); sendSystemMessageTestingOnly(player, "Jedi Master Cloak Issued!"); } break; - case 9: + case 11: { if ( hasCompletedCollectionSlot(player, "jedi_robe_01_07") ) { diff --git a/utils/build_java_multi.sh b/utils/build_java_multi.sh new file mode 100755 index 000000000..bccf907ae --- /dev/null +++ b/utils/build_java_multi.sh @@ -0,0 +1,44 @@ +#/bin/bash + +DIR="$( dirname "${BASH_SOURCE[0]}" )" + +destination="data/sku.0/sys.server/compiled/game" +sourcepath="dsrc/sku.0/sys.server/compiled/game" + +mkdir -p $destination/script + +filenames=$(find $sourcepath -name '*.java') +spinstr='|/-\' +i=0 +current=0 +total=$(ls ${filenames[@]} | wc -l) + +compile () { + OFILENAME=${filename/$sourcepath/$destination} + OFILENAME=${OFILENAME/java/class} + + if [[ -e $OFILENAME && $filename -nt $OFILENAME ]] || [ ! -e $OFILENAME ]; then + result=$(${DIR}/build_java_single.sh $filename 2>&1) + fi + + if [[ ! -z $result ]]; then + printf "\r$filename\n" + printf "$result\n\n" + fi +} + +for filename in $filenames; do + current=$((current+1)) + i=$(( (i+1) %4 )) + perc=$(bc -l <<< "scale=0; $current*100/$total") + printf "\rCompiling java scripts : [${spinstr:$i:1}] $perc%%" + while [ `jobs | wc -l` -ge 20 ] + do + sleep 5 + done + compile $filename & done +wait + +echo "" + + diff --git a/utils/build_tab_multi.sh b/utils/build_tab_multi.sh new file mode 100755 index 000000000..12b8702fe --- /dev/null +++ b/utils/build_tab_multi.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +server=$(find ./dsrc/sku.0/sys.server/compiled/game/datatables -name '*.tab') +inc=$(find ./dsrc/sku.0/sys.shared/compiled/game/datatables/include -name '*.tab') +shared=$(find ./dsrc/sku.0/sys.shared/compiled/game/datatables -name '*.tab') + +filenames=("${server[@]}" "${inc[@]}" "${shared[@]}") + +spinstr='|/-\' +i=0 +current=0 +total=$(ls ${filenames[@]} | wc -l) + +compile () { + ofilename=${filename/dsrc/data} + ofilename=${ofilename/.tab/.iff} + mkdir -p $(dirname $ofilename) + + [ -e $ofilename ] && rm "$ofilename" + + result=$(./exe/linux/bin/DataTableTool -i "$filename" -- -s SharedFile searchPath10=data/sku.0/sys.shared/compiled/game searchPath10=data/sku.0/sys.server/compiled/game 2>&1) + + if [[ ! $result =~ .*SUCCESS.* ]]; then + printf "\r$filename\n" + printf "$result\n\n" + fi +} + +for filename in ${filenames[@]}; do + current=$((current+1)) + i=$(( (i+1) %4 )) + perc=$(bc -l <<< "scale=0; $current*100/$total") + printf "\rGenerating Datatables: [${spinstr:$i:1}] $perc%%" + while [ `jobs | wc -l` -ge 20 ] + do + sleep 5 + done + compile $filename & done +wait + +echo "" + diff --git a/utils/build_tpf_multi.sh b/utils/build_tpf_multi.sh new file mode 100755 index 000000000..ec3d47afa --- /dev/null +++ b/utils/build_tpf_multi.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +filenames=$(find ./dsrc -name '*.tpf') +spinstr='|/-\' +i=0 +current=0 +total=$(find ./dsrc -name '*.tpf' | wc -l) + +compile () { + ofilename=${filename/dsrc/data} + ofilename=${ofilename/.tpf/.iff} + mkdir -p $(dirname $ofilename) + + if [[ -e $ofilename && $filename -nt $ofilename ]] || [ ! -e $ofilename ]; then + result=$(./exe/linux/bin/TemplateCompiler -compile "$filename" 2>&1) + + if [[ ! -z $result ]]; then + printf "\r$filename\n" + printf "$result\n\n" + fi + fi +} + +for filename in $filenames; do + current=$((current+1)) + i=$(( (i+1) %4 )) + perc=$(bc -l <<< "scale=0; $current*100/$total") + printf "\rGenerating Object Templates: [${spinstr:$i:1}] $perc%%" + # Comment this loop out if you have a real fast system.(12Cores+, Fast SSD Storage) + while [ `jobs | wc -l` -ge 50 ] + do + sleep 5 + done + compile $filename & done +wait + +echo "" + + +