Index: conf/commands.conf =================================================================== --- conf/commands.conf (revision 2121) +++ conf/commands.conf (working copy) @@ -14,7 +14,7 @@ commands_ini[1] = { ["name"] = "additem", ["path"] = "scripts/commands", ["parameters"] = "ii" }; commands_ini[2] = { ["name"] = "release", ["path"] = "scripts/commands", ["parameters"] = "" }; -commands_ini[3] = { ["name"] = "cs", ["path"] = "scripts/commands", ["parameters"] = "iiiiiiiii"}; +commands_ini[3] = { ["name"] = "cs", ["path"] = "scripts/commands", ["parameters"] = "siiiiiiii"}; commands_ini[4] = { ["name"] = "addkeyitem", ["path"] = "scripts/commands", ["parameters"] = "i" }; commands_ini[5] = { ["name"] = "delkeyitem", ["path"] = "scripts/commands", ["parameters"] = "i" }; commands_ini[6] = { ["name"] = "setgil", ["path"] = "scripts/commands", ["parameters"] = "i" }; @@ -54,4 +54,13 @@ commands_ini[40] = { ["name"] = "addallspells", ["path"] = "scripts/commands", ["parameters"] = "" }; commands_ini[41] = { ["name"] = "capallskills", ["path"] = "scripts/commands", ["parameters"] = "" }; commands_ini[42] = { ["name"] = "setplayermerits",["path"] = "scripts/commands", ["parameters"] = "si" }; -commands_ini[43] = { ["name"] = "resetplayer", ["path"] = "scripts/commands", ["parameters"] = "s" }; \ No newline at end of file +commands_ini[43] = { ["name"] = "resetplayer", ["path"] = "scripts/commands", ["parameters"] = "s" }; +commands_ini[44] = { ["name"] = "setflag", ["path"] = "scripts/commands", ["parameters"] = "i" }; +commands_ini[45] = { ["name"] = "addquest", ["path"] = "scripts/commands", ["parameters"] = "ii" }; +commands_ini[46] = { ["name"] = "delquest", ["path"] = "scripts/commands", ["parameters"] = "ii" }; +commands_ini[47] = { ["name"] = "completequest", ["path"] = "scripts/commands", ["parameters"] = "ii" }; +commands_ini[48] = { ["name"] = "addmission", ["path"] = "scripts/commands", ["parameters"] = "ii" }; +commands_ini[49] = { ["name"] = "delmission", ["path"] = "scripts/commands", ["parameters"] = "ii" }; +commands_ini[50] = { ["name"] = "completemission",["path"] = "scripts/commands", ["parameters"] = "ii" }; +commands_ini[51] = { ["name"] = "setdebugflag", ["path"] = "scripts/commands", ["parameters"] = "i" }; +commands_ini[52] = { ["name"] = "loadnpc", ["path"] = "scripts/commands", ["parameters"] = "i" }; \ No newline at end of file Index: conf/login_darkstar.conf =================================================================== --- conf/login_darkstar.conf (revision 2121) +++ conf/login_darkstar.conf (working copy) @@ -63,3 +63,6 @@ #Server name (not longer than 15 characters) servername: DarkStar +# LAN IP Mask +lan_ipmask: 192.168.0.* + Index: conf/map_darkstar.conf =================================================================== --- conf/map_darkstar.conf (revision 2121) +++ conf/map_darkstar.conf (working copy) @@ -44,7 +44,7 @@ #Packet settings #-------------------------------- -buff_maxsize: 1750 +buff_size: 1750 max_time_lastupdate: 60 #-------------------------------- @@ -90,3 +90,62 @@ # 0100 4 Guard # 0111 7 Parry, Block, & Guard newstyle_skillups: 7 + +#Multiplies the distance that you can engage target. Change to 2 for double the distance. Default is 1. +engage_dist_mod: 1 + +#Multiplies the distance that you can cast magic on a target. Change to 2 for double the distance. Default is 1. +magic_dist_mod: 1 + +#Multiplies the distance that you can used ranged attack on a target. Change to 2 for double the distance. Default is 1. +ranged_dist_mod: 1 + +#Set to 1 to disable the delay that happens just after killing a target, or after equipping a weapon. +remove_engage_delay: 1 + +#Set to 1 to allow movement while casting magic. +magic_movement: 0 + +#Increases chance of exp mobs dropping seals or crests. Set from 0 - 60. Default is 0. +seal_crest_bonus: 0 + +#Allows non exp beastman mobs to drop seals and crests. Set to 1 for non exp beastman mobs to drop seals and crests. Default is 0. +always_seal_crest: 0 + +#Adds to the drop rate percentage. Set to 20 to add additional %20 drop rate on items. Default 0. +drop_rate_bonus: 0 + +#Set to 1 to allow all mobs to drop gil. Currently does not display in-game messages for these gil drops. Default is 0. +all_mobs_drop_gil: 0 + +#Multiplies the amount of gil dropped. Default is 1. +gil_bonus: 1 + +#Allows exp chain on any exp mob. Default is 0. +chain_on_easy: 0 + +#Increases the time frame allowed to get an exp chain. Default is 1. +chain_bonus: 1 + +#Allows same skill-up on chance for failures as crafting successes have. Default is 0. +craft_skill_onfail: 0 + +#Increases the chance of getting larger skill-ups while crafting. Set 0 to 100. Default 0. +craft_skillamt: 0 + +#Increases the chance of succeeding at crafting. Set 0 to 100. Default 0. +craft_success: 0 + +#Multiplies the amount of conquest points earned on an exp mob kill. Default is 1. +conquest_bonus: 1 + +#Sets 1 nation and owner of all regions. 0 = off, 1 = Sandoria, 2 = Bastok, 3 = Windurst, 4 = Beastmen. Default is 0. +conquest_constant: 0 + +# Give all players GM commands for debugging. +debugging_commands: 1 + +notorious_hp_mod: 2.5 +notorious_mp_mod: 2.5 + +fov_allow_alliance: 1 \ No newline at end of file Index: scripts/commands/addmission.lua =================================================================== --- scripts/commands/addmission.lua (revision 0) +++ scripts/commands/addmission.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: addmission +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,logID,missionID) + player:addMission(logID,missionID); +end; \ No newline at end of file Index: scripts/commands/addquest.lua =================================================================== --- scripts/commands/addquest.lua (revision 0) +++ scripts/commands/addquest.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: addquest +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,logID,questID) + player:addQuest(logID,questID); +end; \ No newline at end of file Index: scripts/commands/completemission.lua =================================================================== --- scripts/commands/completemission.lua (revision 0) +++ scripts/commands/completemission.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: completemission +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,logID,missionID) + player:completeMission(logID,missionID); +end; \ No newline at end of file Index: scripts/commands/completequest.lua =================================================================== --- scripts/commands/completequest.lua (revision 0) +++ scripts/commands/completequest.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: completequest +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,logID,questID) + player:completeQuest(logID,questID); +end; \ No newline at end of file Index: scripts/commands/delmission.lua =================================================================== --- scripts/commands/delmission.lua (revision 0) +++ scripts/commands/delmission.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: delmission +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,logID,missionID) + player:delMission(logID,missionID); +end; \ No newline at end of file Index: scripts/commands/delquest.lua =================================================================== --- scripts/commands/delquest.lua (revision 0) +++ scripts/commands/delquest.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: delquest +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,logID,questID) + player:delQuest(logID,questID); +end; \ No newline at end of file Index: scripts/commands/loadnpc.lua =================================================================== --- scripts/commands/loadnpc.lua (revision 0) +++ scripts/commands/loadnpc.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: spawnnpc +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,npcid) + player:SpawnNPC(npcid); +end; \ No newline at end of file Index: scripts/commands/setdebugflag.lua =================================================================== --- scripts/commands/setdebugflag.lua (revision 0) +++ scripts/commands/setdebugflag.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: setdebugflag +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,flag) + player:setDebugFlag(flag); +end; \ No newline at end of file Index: scripts/commands/setflag.lua =================================================================== --- scripts/commands/setflag.lua (revision 0) +++ scripts/commands/setflag.lua (working copy) @@ -0,0 +1,13 @@ +----------------------------------- +-- [Command name]: setflag +-- [Author ]: +-- [Description ]: +----------------------------------- + +----------------------------------- +-- Action +----------------------------------- + +function onTrigger(player,flag) + player:setFlag(flag); +end; \ No newline at end of file Index: scripts/globals/abilities/azure_lore.lua =================================================================== --- scripts/globals/abilities/azure_lore.lua (revision 0) +++ scripts/globals/abilities/azure_lore.lua (working copy) @@ -0,0 +1,14 @@ +----------------------------------- +-- Author: Kegsay +-- Azure Lore +-- Enhances the effect of blue magic spells. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + --print(); + player:addStatusEffect(EFFECT_AZURE_LORE,1,0,30); + target:updateEnmity(player,300,1); +end; \ No newline at end of file Index: scripts/globals/abilities/blade_bash.lua =================================================================== --- scripts/globals/abilities/blade_bash.lua (revision 0) +++ scripts/globals/abilities/blade_bash.lua (working copy) @@ -0,0 +1,26 @@ +----------------------------------- +-- Blade Bash +-- Delivers an attack that can plague the target. Two-handed weapon required. +-- +-- Mainly added for enmity, but will also do damage. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + + if (player:isWeaponTwoHanded()) then + final = player:getMainLvl(); + + if (player:getEquipID(SLOT_EAR1) == 0x39a6 or player:getEquipID(SLOT_EAR2) == 0x39a6) then --Knightly Earring + final = final+10; + end + + target:removeHP(final); + target:updateEnmity(player,900,1); + ability:setMsg(110); + ability:setResult(final); + end + +end; \ No newline at end of file Index: scripts/globals/abilities/chain_affinity.lua =================================================================== --- scripts/globals/abilities/chain_affinity.lua (revision 0) +++ scripts/globals/abilities/chain_affinity.lua (working copy) @@ -0,0 +1,14 @@ +----------------------------------- +-- Author: Kegsay +-- Chain Affinity +-- Makes it possible for your next "physical" blue magic spell to be used in a skillchain. Effect varies with TP. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + --print(); + player:addStatusEffect(EFFECT_CHAIN_AFFINITY,1,0,30); + target:updateEnmity(player,300,1); +end; \ No newline at end of file Index: scripts/globals/abilities/chocobo_jig.lua =================================================================== --- scripts/globals/abilities/chocobo_jig.lua (revision 0) +++ scripts/globals/abilities/chocobo_jig.lua (working copy) @@ -0,0 +1,37 @@ +----------------------------------- +-- Chocobo Jig +-- Increases movement speed. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + -- Lasts for 120 seconds + duration = 120; + + -- Bonuses (25 seconds each) + bonus = 25; + legs = player:getEquipID(SLOT_LEGS); + feet = player:getEquipID(SLOT_FEET); + -- Relic Legs (NQ/HQ) + if (legs == 16360 or legs == 16361) then + duration = duration + bonus; + end + -- Artifact Feet (NQ/HQ) + if (feet == 15746 or feet == 15747 or feet == 11393 or feet == 11394) then + duration = duration + bonus; + end + + if (player:getStatusEffect(EFFECT_QUICKENING)) then + player:removeStatusType(EFFECT_QUICKENING); + end + + -- No effect if Flee or Mazurka is active + if (player:getStatusEffect(EFFECT_FLEE) or player:getStatusEffect(EFFECT_MAZURKA)) then + ability:setMsg(323); + else + player:addStatusEffect(EFFECT_QUICKENING,25,0,duration); + ability:setMsg(126); + end +end; \ No newline at end of file Index: scripts/globals/abilities/cover.lua =================================================================== --- scripts/globals/abilities/cover.lua (revision 0) +++ scripts/globals/abilities/cover.lua (working copy) @@ -0,0 +1,19 @@ +----------------------------------- +-- Author: Tenjou +-- Cover +-- Allows player to protect the target by placing themselves between them and the enemy. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + --print(); + ability:setMsg(0); + if (target ~= player) then + target:addStatusEffect(EFFECT_COVER,1,0,60); + cover = target:getStatusEffect(EFFECT_COVER); + cover:setEffector(player); + end + --target:updateEnmity(player,300,1); +end; \ No newline at end of file Index: scripts/globals/abilities/dark_seal.lua =================================================================== --- scripts/globals/abilities/dark_seal.lua (revision 0) +++ scripts/globals/abilities/dark_seal.lua (working copy) @@ -0,0 +1,15 @@ +----------------------------------- +-- Ability: Dark Seal +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + player:addStatusEffect(EFFECT_DARK_SEAL,1,0,60); + target:updateEnmity(player,1,300); +end; \ No newline at end of file Index: scripts/globals/abilities/devotion.lua =================================================================== --- scripts/globals/abilities/devotion.lua (revision 0) +++ scripts/globals/abilities/devotion.lua (working copy) @@ -0,0 +1,17 @@ +----------------------------------- +-- Ability: Devotion +----------------------------------- + +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + if (player:getHP() > 3) then + effectPower = player:getHP()/4; + player:delHP(effectPower); + target:addMP(effectPower); + end +end; Index: scripts/globals/abilities/eagle_eye_shot.lua =================================================================== --- scripts/globals/abilities/eagle_eye_shot.lua (revision 0) +++ scripts/globals/abilities/eagle_eye_shot.lua (working copy) @@ -0,0 +1,21 @@ +----------------------------------- +-- Author: Tenjou +-- Eagle Eye Shot +-- Delivers an accurate and powerful ranged attack. +-- +-- Some comments about the source of any formulas you may find. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) +--print(); + +final = player:getBaseDmg()*5; --NEEDS TO BE FIXED + +--Do it! +target:removeHP(final); +ability:setMsg(110); +ability:setResult(final); +end; \ No newline at end of file Index: scripts/globals/abilities/haste_samba.lua =================================================================== --- scripts/globals/abilities/haste_samba.lua (revision 0) +++ scripts/globals/abilities/haste_samba.lua (working copy) @@ -0,0 +1,34 @@ +------------------------- +--Haste Samba +--Author: TheRedLightning +--http://wiki.ffxiclopedia.org/wiki/Haste_Samba) +------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +-- Defines +duration = 90; + power = 5; -- 5% haste +-------------------------------------- + +function OnUseAbility(player, target, ability) + --Grabbing variables. + local mjob = player:getMainJob(); --45 for DNC main. + + --Reducing TP. + local tp = player:getTP(); + tp = tp - 35; + player:setTP(tp); + + --Do it + haste = player:getStatusEffect(EFFECT_HASTE); + if(haste ~= nil)then + player:removeStatusType(EFFECT_HASTE); + player:addStatusEffect(EFFECT_HASTE,power,0,duration,FLAG_DISPELABLE); + else + player:addStatusEffect(EFFECT_HASTE,power,0,duration,FLAG_DISPELABLE); + end + target:updateEnmity(player,300,1); +--Message +end; \ No newline at end of file Index: scripts/globals/abilities/martyr.lua =================================================================== --- scripts/globals/abilities/martyr.lua (revision 0) +++ scripts/globals/abilities/martyr.lua (working copy) @@ -0,0 +1,17 @@ +----------------------------------- +-- Ability: Martyr +----------------------------------- + +require("scripts/globals/status"); + +----------------------------------- +-- OnUseAbility +----------------------------------- + +function OnUseAbility(player, target, ability) + if (player:getHP() > 3) then + effectPower = player:getHP()/4; + target:delHP(effectPower); + player:addHP(effectPower*2); + end +end; Index: scripts/globals/abilities/mijin_gakure.lua =================================================================== --- scripts/globals/abilities/mijin_gakure.lua (revision 0) +++ scripts/globals/abilities/mijin_gakure.lua (working copy) @@ -0,0 +1,22 @@ +----------------------------------- +-- Mijin Gakure +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + + playerHP = player:getHP(); + mobHP = target:getHP(); + + if(playerHP > mobHP) then + playerHP = mobHP; + end + + target:removeHP(playerHP); + player:setHP(0); + + ability:setMsg(110); + ability:setResult(playerHP); +end; \ No newline at end of file Index: scripts/globals/abilities/perfect_dodge.lua =================================================================== --- scripts/globals/abilities/perfect_dodge.lua (revision 2121) +++ scripts/globals/abilities/perfect_dodge.lua (working copy) @@ -10,5 +10,5 @@ ----------------------------------- function OnUseAbility(player, target, ability) - player:addStatusEffect(EFFECT_PERFECT_DODGE,1,0,45); + player:addStatusEffect(EFFECT_PERFECT_DODGE,1,0,30); end; \ No newline at end of file Index: scripts/globals/abilities/scavenge.lua =================================================================== --- scripts/globals/abilities/scavenge.lua (revision 0) +++ scripts/globals/abilities/scavenge.lua (working copy) @@ -0,0 +1,124 @@ +----------------------------------- +-- Scavenge +-- Player will have a default 10% chance of finding an item +-- Hunter's Socks equipped will increase chance by 5% +-- Items found are dependant on the average level of zone's mobs +-- Items can not be scavenged in Cities, Transports, or Battlefields +----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + ----------------------------------- + -- zoneSet contains an array of zoneIds and corresponding setId + -- (zoneId,setId,zoneId,setId,zoneId,setId,...) + ----------------------------------- + zoneSet = {2,2,4,6,5,9,7,6,9,8,11,5,12,5,24,6,25,6,27,7,28,8,29,8,30,7, + 33,9,34,9,35,9,51,8,52,8,54,9,57,9,61,9,62,9,65,9,68,9,72,9,79, + 8,81,7,82,8,83,9,84,9,85,9,88,7,89,9,90,9,91,8,92,9,95,7,96,9, + 97,9,98,9,99,9,100,1,101,1,102,2,103,4,104,5,105,5,106,1,107,1, + 108,2,109,5,110,5,111,6,112,7,113,9,114,6,115,2,116,1,117,2,118,4, + 119,5,120,5,121,5,122,9,123,6,124,6,125,7,126,5,127,7,128,9,130,9, + 136,9,137,7,140,1,141,2,142,2,143,1,145,1,147,5,148,7,149,5,150,7, + 151,5,152,7,153,9,154,9,157,6,158,6,159,8,160,9,161,8,162,8,164,9, + 166,6,167,8,169,7,171,9,172,1,173,5,174,8,175,9,176,7,177,9,178,9, + 184,5,190,4,191,1,192,1,193,4,194,2,195,7,196,4,197,7,198,4,200,7, + 204,8,205,9,208,8,212,9,213,8}; + ----------------------------------- + -- itemSet contains an array of setIds and corresponding item + -- tables (setId,{itemlist}) + ----------------------------------- + itemSet = {0,{0X0000}, + 1,{0x04BB,0x04BE,0x02CB,0x02C1,0x04C5,0x1064,0x1065}, + 2,{0x04BF,0x04DA,0x02CB,0x02C1,0x04C6,0x1064,0x1065,0x1496,0x149E}, + 3,{0x04DB,0x05EB,0x02CB,0x02C1,0x04C6,0x1064,0x1065,0x1496,0x149E}, + 4,{0x04DB,0x05EB,0x02CB,0x02C1,0x04C6,0x1064,0x1065,0x1496,0x149E,0x03B3}, + 5,{0x04C1,0x04DD,0x04C6,0x02CB,0x02C1,0x1064,0x1065,0x1496,0x149E,0x14A4,0x03B3}, + 6,{0x04E1,0x04DC,0x04C7,0x02CB,0x02C1,0x1064,0x1065,0x1496,0x149E,0x14A4,0x03B3}, + 7,{0x04BC,0x04E2,0x02CB,0x02C1,0x04C8,0x1064,0x1065,0x1496,0x149E,0x14A4,0x03B3}, + 8,{0x065B,0x04BD,0x02CB,0x02C1,0x04E6,0x1064,0x1065,0x1496,0x149E,0x14A4,0x03B3}, + 9,{0x04E3,0x04BD,0x04E6,0x02CB,0x02C1,0x1064,0x1065,0x1496,0x149E,0x14A4,0x03B3}}; + + ----------------------------------- + -- Determine the current zone's setId + ----------------------------------- + currZone = player:getZone(); + setId = 0; + i = 1; + while i <= (table.getn(zoneSet)-1) do + if (zoneSet[i] == currZone) then + setId = zoneSet[i+1]; + break; + end + i = i+2; + end; + + ----------------------------------- + -- Set itemList array based on setId + ----------------------------------- + itemList = {0X0000}; + j = 1 + while j <= (table.getn(itemSet))do + if (itemSet[j] == setId) then + itemList = itemSet[j+1]; + break; + end + j = j+2; + end; + + ----------------------------------- + -- Determine found item and if player gets the item + -- Player will receive item 10% of the time + -- Hunter's Socks & Hunter's Socks +1 increase rate by 5% + ----------------------------------- + rate = SCAVENGE_RATE * 100; + if (player:getEquipID(SLOT_FEET) == 0x3713 or player:getEquipID(SLOT_FEET) == 0x3C02) then + rate = rate + 5; + end; + if (rate > 100) then rate = 100; end + + rand = math.random(1,table.getn(itemList)); + item = itemList[rand]; + + rand = math.random(0,99); + if (rand >= rate) then + item = 0x0000; + end; + + ----------------------------------- + -- Compensate for multiple itemIDs for the same item (Old Ammo) + ----------------------------------- + oldAmmo = {0x1496,0x1497,0x1498,0x1499,0x149A,0x149B,0x149C,0x149D, + 0x149E,0x149F,0x14A0,0x14A1,0x14A2,0x14A3,0x14A4,0x14A5}; + + if (item == 0x1496 or item == 0x149E or item == 0x14A4) then + if (item == 0x1496) then + min = 1; + max = 8; + + elseif (item == 0x149E) then + min = 9; + max = 14; + else + min = 15; + max = 16; + end; + rand = math.random(min,max); + item = oldAmmo[rand]; + end; + + ----------------------------------- + -- Give player the scavenged item + ----------------------------------- + if (player:getFreeSlotsCount() == 0) then + ability:setMsg(356); + else + if (item ~= 0) then + ability:setMsg(140); + player:addItem(item); + else + ability:setMsg(139); + end + end + +end; \ No newline at end of file Index: scripts/globals/abilities/sentinel.lua =================================================================== --- scripts/globals/abilities/sentinel.lua (revision 0) +++ scripts/globals/abilities/sentinel.lua (working copy) @@ -0,0 +1,24 @@ +----------------------------------- +-- Sentinel +-- Reduces physical damage taken and increases enmity. +-- missing msg id for +-- "{Player Name} uses Sentinel. {Player Name}'s defense is enhanced." +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + initial_reduction = 90; + tick = 3; + feet = target:getEquipID(SLOT_FEET); + if feet == 15138 then + initial_reduction = 100; + elseif feet == 15671 or feet == 10736 then + initial_reduction = 100; + tick = 6; + end; + player:addStatusEffect(EFFECT_SENTINEL,initial_reduction,tick,30,FLAG_DISPELABLE); + --ability:setMsg(); + target:updateEnmity(player,1800,1); +end; \ No newline at end of file Index: scripts/globals/abilities/shield_bash.lua =================================================================== --- scripts/globals/abilities/shield_bash.lua (revision 0) +++ scripts/globals/abilities/shield_bash.lua (working copy) @@ -0,0 +1,45 @@ +----------------------------------- +-- Shield Bash +-- Delivers an attack that can stun the target. Shield required. +-- +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + --print(); + level = player:getMainLvl(); --Complete guess at damage. + damage=math.floor(math.random((level/3),(level/2))+1); + if (player:getEquipID(SLOT_SUB) < 0x4000) then --Player is using a shield (or at least not a weapon). + if (player:getEquipID(SLOT_SUB) == 0x3ade) then --Aegis + damage = damage+200; + crit=0.1; + if(math.random()= 0.75 and tp >= 100) then --Latent effect active + damage = damage+10; + end + end + if (player:getEquipID(SLOT_EAR1) == 0x39a6 or player:getEquipID(SLOT_EAR2) == 0x39a6) then --Knightly Earring + damage = damage+10; + end + target:removeHP(damage); + target:updateEnmity(player,900,1); + ability:setMsg(110); + ability:setResult(damage); + end +end; \ No newline at end of file Index: scripts/globals/abilities/shikikoyo.lua =================================================================== --- scripts/globals/abilities/shikikoyo.lua (revision 0) +++ scripts/globals/abilities/shikikoyo.lua (working copy) @@ -0,0 +1,38 @@ +------------------------- +-- Shikikoyo +------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + selftp = player:getTP(); + targettp = target:getTP(); + + if (selftp <= 100) then + newttp = targettp; + newstp = selftp; + addtp = 0; + end + if (selftp >= 100) then + addtp = selftp - 100; + newttp = targettp + addtp; + newstp = 100; + end + + if (targettp >= 300) then + newttp = targettp; + newstp = selftp; + addtp = 0; + end + if (selftp <= 100) then + ability:setMsg(323); + ability:setResult(addtp); + else + ability:setMsg(452); + ability:setResult(addtp); + end + + player:setTP(newstp); + target:setTP(newttp); + target:updateEnmity(player,300,1); --Possibly the same as Devotion or Martyr. +end; \ No newline at end of file Index: scripts/globals/abilities/soul_voice.lua =================================================================== --- scripts/globals/abilities/soul_voice.lua (revision 0) +++ scripts/globals/abilities/soul_voice.lua (working copy) @@ -0,0 +1,14 @@ +----------------------------------- +-- Soul Voice +-- Enhances the effect of songs. +-- +-- Actually doubles the effect of songs. +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + target:addStatusEffect(EFFECT_SOUL_VOICE,1,0,180); + target:updateEnmity(player,0,1); +end; \ No newline at end of file Index: scripts/globals/abilities/sublimation.lua =================================================================== --- scripts/globals/abilities/sublimation.lua (revision 0) +++ scripts/globals/abilities/sublimation.lua (working copy) @@ -0,0 +1,26 @@ +----------------------------------- +-- Sublimation +-- Gradually creates a storage of MP while reducing your HP. +----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + if (player:getStatusEffect(EFFECT_SUBLIMATION_ACTIVATE) or player:getStatusEffect(EFFECT_SUBLIMATION_COMPLETE)) then + player:removeStatusType(EFFECT_SUBLIMATION_ACTIVATE); + player:removeStatusType(EFFECT_SUBLIMATION_COMPLETE); + mp = player:getMod(MOD_SUBLIMATION_POOL); + player:removeMod(MOD_SUBLIMATION_POOL,player:getMod(MOD_SUBLIMATION_POOL)); + + if ((player:getMaxMP() - player:getMP()) < mp) then + mp = (player:getMaxMP() - player:getMP()); + end + + ability:setMsg(451); + ability:setResult(mp); + player:addMP(mp); + else + player:addStatusEffect(EFFECT_SUBLIMATION_ACTIVATE,2,3,3600); + end + target:updateEnmity(player,300,1); +end; \ No newline at end of file Index: scripts/globals/abilities/weapon_bash.lua =================================================================== --- scripts/globals/abilities/weapon_bash.lua (revision 0) +++ scripts/globals/abilities/weapon_bash.lua (working copy) @@ -0,0 +1,23 @@ +----------------------------------- +-- Weapon Bash +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); + +function OnUseAbility(player, target, ability) + + if (player:isWeaponTwoHanded()) then + final = player:getMainLvl(); + + if (player:getEquipID(SLOT_EAR1) == 0x39a6 or player:getEquipID(SLOT_EAR2) == 0x39a6) then --Knightly Earring + final = final+10; + end + + target:removeHP(final); + target:updateEnmity(player,900,1); + ability:setMsg(110); + ability:setResult(final); + end + +end; \ No newline at end of file Index: scripts/globals/effects/healing.lua =================================================================== --- scripts/globals/effects/healing.lua (revision 2121) +++ scripts/globals/effects/healing.lua (working copy) @@ -6,6 +6,7 @@ ----------------------------------- require("scripts/globals/status"); +require("scripts/globals/settings"); ----------------------------------- -- onEffectGain Action @@ -26,12 +27,12 @@ if (healtime > 1) then if (not(target:hasStatusEffect(EFFECT_DISEASE))) then if (target:getContinentID() == 1 and target:hasStatusEffect(EFFECT_SIGNET)) then - target:addHP(10+(3*math.floor(target:getMainLvl()/10))+(healtime-2)*(1+math.floor(target:getMaxHP()/300))+(target:getMod(MOD_HPHEAL))); + target:addHP(BASE_HP_HEAL_BONUS+10+(3*math.floor(target:getMainLvl()/10))+HP_HEAL_BONUS*(healtime-2)*(1+math.floor(target:getMaxHP()/300))+(target:getMod(MOD_HPHEAL))); else - target:setTP(target:getTP()-10); - target:addHP(10+(healtime-2)+(target:getMod(MOD_HPHEAL))); + target:setTP(target:getTP() - (TP_LOSS * 2)); -- Account for the current map server configuration on TP Multiplier. + target:addHP(BASE_HP_HEAL_BONUS+10+HP_HEAL_BONUS*(healtime-2)+(target:getMod(MOD_HPHEAL))); end - target:addMP(12+(healtime-2)+(target:getMod(MOD_MPHEAL))+(target:getMod(MOD_CLEAR_MIND)*(healtime-2))); + target:addMP(BASE_MP_HEAL_BONUS+12+MP_HEAL_BONUS*(healtime-2)+(target:getMod(MOD_MPHEAL))+(target:getMod(MOD_CLEAR_MIND)*(healtime-2))); end end @@ -43,5 +44,5 @@ function onEffectLose(target,effect) target:setAnimation(0); - target:delStatusEffect(EFFECT_LEAVEGAME); -end; \ No newline at end of file + target:delStatusEffect(EFFECT_LEAVEGAME); +end; Index: scripts/globals/effects/sanction.lua =================================================================== --- scripts/globals/effects/sanction.lua (revision 2121) +++ scripts/globals/effects/sanction.lua (working copy) @@ -1,7 +1,7 @@ ----------------------------------- -- +-- EFFECT_SANCTION -- --- ----------------------------------- ----------------------------------- @@ -16,6 +16,11 @@ ----------------------------------- function onEffectTick(target,effect) + if(effect:getPower() == 1) then + target:addHP(3); + elseif(effect:getPower() == 2) then + target:addMP(3); + end end; ----------------------------------- Index: scripts/globals/effects/store_tp.lua =================================================================== --- scripts/globals/effects/store_tp.lua (revision 0) +++ scripts/globals/effects/store_tp.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- +-- MOD_STORETP +-- +----------------------------------- + +----------------------------------- +-- onEffectGain Action +----------------------------------- + +function onEffectGain(target,effect) + target:addMod(MOD_STORETP, effect:getPower()); +end; + +----------------------------------- +-- onEffectTick Action +----------------------------------- + +function onEffectTick(target,effect) +end; + +----------------------------------- +-- onEffectLose Action +----------------------------------- + +function onEffectLose(target,effect) + target:delMod(MOD_STORETP, effect:getPower()); +end; \ No newline at end of file Index: scripts/globals/effects/weakness.lua =================================================================== --- scripts/globals/effects/weakness.lua (revision 2121) +++ scripts/globals/effects/weakness.lua (working copy) @@ -34,4 +34,5 @@ target:delMod(MOD_HPP,-75); target:delMod(MOD_MPP,-75); target:delMod(MOD_HASTE,-100); + target:updateHealth(); end; \ No newline at end of file Index: scripts/globals/effects/weight.lua =================================================================== --- scripts/globals/effects/weight.lua (revision 2121) +++ scripts/globals/effects/weight.lua (working copy) @@ -1,6 +1,6 @@ ----------------------------------- -- --- EFFECT_NONE +-- EFFECT_WEIGHT -- ----------------------------------- @@ -9,6 +9,8 @@ ----------------------------------- function onEffectGain(target,effect) + target:addMod(MOD_MOVE,effect:getPower()); + target:addMod(MOD_EVAP,-5); end; ----------------------------------- @@ -23,4 +25,6 @@ ----------------------------------- function onEffectLose(target,effect) + target:delMod(MOD_MOVE,effect:getPower()); + target:delMod(MOD_EVAP,-5); end; \ No newline at end of file Index: scripts/globals/fieldsofvalor.lua =================================================================== --- scripts/globals/fieldsofvalor.lua (revision 2121) +++ scripts/globals/fieldsofvalor.lua (working copy) @@ -269,13 +269,13 @@ FOV_EVENT_YUHTUNGA =0x003d; FOV_EVENT_YHOATOR =0x003d; FOV_EVENT_WEST_ALTEPA =0x003d; -FOV_EVENT_EAST_ALTEPA =0x003d; --test +FOV_EVENT_EAST_ALTEPA =0x003d; FOV_EVENT_BEAUCEDINE =0x00da; FOV_EVENT_XARCABARD =0x0030; FOV_EVENT_BEHEMOTH =0x003d; FOV_EVENT_ZITAH =0x003d; FOV_EVENT_ROMAEVE =0x003d; -FOV_EVENT_TERIGGAN =0x003d; --test +FOV_EVENT_TERIGGAN =0x003d; FOV_EVENT_SORROWS =0x003d; ---------------------------------- @@ -535,12 +535,13 @@ newreward = getRegimeReward(rid); reward = killer:checkExpPoints(mob, newreward); tabs = killer:getVar("tabs"); - tabs = tabs+math.floor((reward/10)); + tabs = tabs+(math.floor((reward/10))*TABS_RATE); killer:setVar("tabs",tabs); - killer:messageBasic(FOV_MSG_GET_TABS,math.floor((reward/10)),tabs); - killer:addGil(reward); + killer:messageBasic(FOV_MSG_GET_TABS,math.floor((reward/10))*EXP_RATE,tabs*TABS_RATE); + killer:addGil(reward*GIL_RATE); + killer:messageSpecial(GIL_OBTAINED,reward*GIL_RATE); --TODO: display msgs (based on zone annoyingly, so will need killer:getZone() then a lookup) - killer:addExp(reward); + killer:addExp(reward*EXP_RATE); if (k1 ~= 0) then killer:setVar("fov_numkilled1",0); end if (k2 ~= 0) then killer:setVar("fov_numkilled2",0); end if (k3 ~= 0) then killer:setVar("fov_numkilled3",0); end Index: scripts/globals/items/axe_of_trials.lua =================================================================== --- scripts/globals/items/axe_of_trials.lua (revision 0) +++ scripts/globals/items/axe_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 16735 +-- Equip: Axe of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 16735) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_EARTHDEF, 10); + target:addMod(MOD_WATERDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_EARTHDEF, 10); + target:delMod(MOD_WATERDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/club_of_trials.lua =================================================================== --- scripts/globals/items/club_of_trials.lua (revision 0) +++ scripts/globals/items/club_of_trials.lua (working copy) @@ -0,0 +1,31 @@ +----------------------------------------- +-- ID: 17456 +-- Equip: Club of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17456) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 10); + target:addMod(MOD_MP, 10); + target:addMod(MOD_EARTHDEF, 10); + target:addMod(MOD_WATERDEF, 10); + else + target:delMod(MOD_HP, 10); + target:delMod(MOD_MP, 10); + target:delMod(MOD_EARTHDEF, 10); + target:delMod(MOD_WATERDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/dagger_of_trials.lua =================================================================== --- scripts/globals/items/dagger_of_trials.lua (revision 0) +++ scripts/globals/items/dagger_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 17616 +-- Equip: Dagger of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17616) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_ICEDEF, 10); + target:addMod(MOD_EARTHDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_ICEDEF, 10); + target:delMod(MOD_EARTHDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/knuckles_of_trials.lua =================================================================== --- scripts/globals/items/knuckles_of_trials.lua (revision 0) +++ scripts/globals/items/knuckles_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 17507 +-- Equip: Knuckles of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17507) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_EARTHDEF, 10); + target:addMod(MOD_WATERDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_EARTHDEF, 10); + target:delMod(MOD_WATERDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/kodachi_of_trials.lua =================================================================== --- scripts/globals/items/kodachi_of_trials.lua (revision 0) +++ scripts/globals/items/kodachi_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 17773 +-- Equip: Kodachi of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17773) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_FIREDEF, 10); + target:addMod(MOD_LIGHTDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_FIREDEF, 10); + target:delMod(MOD_LIGHTDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/magic_slacks.lua =================================================================== --- scripts/globals/items/magic_slacks.lua (revision 0) +++ scripts/globals/items/magic_slacks.lua (working copy) @@ -0,0 +1,26 @@ +----------------------------------------- +-- ID: 15372 +-- Item: magic slacks +-- Restores MP +----------------------------------------- +-- Grants 30 - 39 MP. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target) + result = 0; + return result; +end; + +----------------------------------------- +-- OnItemUse +----------------------------------------- + +function onItemUse(target) + target:addMP(rand(30,39)); +end; \ No newline at end of file Index: scripts/globals/items/olduum_ring.lua =================================================================== --- scripts/globals/items/olduum_ring.lua (revision 0) +++ scripts/globals/items/olduum_ring.lua (working copy) @@ -0,0 +1,14 @@ +----------------------------------------- +-- ID: 15769 +-- Item: Olduum Ring +-- Transports players to the Laypoint in Wajom +----------------------------------------- +require("scripts/globals/teleports"); + +function onItemCheck(target) + return 0; +end; + +function onItemUse(target) + toWajaomLaypoint(target); +end; \ No newline at end of file Index: scripts/globals/items/pick_of_trials.lua =================================================================== --- scripts/globals/items/pick_of_trials.lua (revision 0) +++ scripts/globals/items/pick_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 17933 +-- Equip: Pick of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17933) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_WINDDEF, 10); + target:addMod(MOD_THUNDERDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_WINDDEF, 10); + target:delMod(MOD_THUNDERDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/pole_of_trials.lua =================================================================== --- scripts/globals/items/pole_of_trials.lua (revision 0) +++ scripts/globals/items/pole_of_trials.lua (working copy) @@ -0,0 +1,31 @@ +----------------------------------------- +-- ID: 17527 +-- Equip: Pole of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17527) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 10); + target:addMod(MOD_MP, 10); + target:addMod(MOD_FIREDEF, 10); + target:addMod(MOD_LIGHTDEF, 10); + else + target:delMod(MOD_HP, 10); + target:delMod(MOD_MP, 10); + target:delMod(MOD_FIREDEF, 10); + target:delMod(MOD_LIGHTDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/sagacious_gold_obi.lua =================================================================== --- scripts/globals/items/sagacious_gold_obi.lua (revision 0) +++ scripts/globals/items/sagacious_gold_obi.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------------- +-- ID: 15459 +-- Item: Sagacious Gold Obi +-- INT+3 +----------------------------------------- + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target) + result = 0; + + if (target:hasStatusEffect(EFFECT_INT_BOOST) == true) then + result = 56; + end + + return result; +end; + +----------------------------------------- +-- OnItemUse +----------------------------------------- + +function onItemUse(target) + target:addStatusEffect(EFFECT_INT_BOOST,3,0,3000,15459); +end; \ No newline at end of file Index: scripts/globals/items/sapara_of_trials.lua =================================================================== --- scripts/globals/items/sapara_of_trials.lua (revision 0) +++ scripts/globals/items/sapara_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 17654 +-- Equip: Sapara of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17654) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_FIREDEF, 10); + target:addMod(MOD_WINDDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_FIREDEF, 10); + target:delMod(MOD_WINDDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/scythe_of_trials.lua =================================================================== --- scripts/globals/items/scythe_of_trials.lua (revision 0) +++ scripts/globals/items/scythe_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 16793 +-- Equip: Scythe of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 16793) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_THUNDERDEF, 10); + target:addMod(MOD_LIGHTDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_THUNDERDEF, 10); + target:delMod(MOD_LIGHTDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/spear_of_trials.lua =================================================================== --- scripts/globals/items/spear_of_trials.lua (revision 0) +++ scripts/globals/items/spear_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 16892 +-- Equip: Spear of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 16892) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_DARKDEF, 10); + target:addMod(MOD_WATERDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_DARKDEF, 10); + target:delMod(MOD_WATERDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/sword_of_trials.lua =================================================================== --- scripts/globals/items/sword_of_trials.lua (revision 0) +++ scripts/globals/items/sword_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 16952 +-- Equip: Sword of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 16952) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_EARTHDEF, 10); + target:addMod(MOD_ICEDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_EARTHDEF, 10); + target:delMod(MOD_ICEDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/items/tachi_of_trials.lua =================================================================== --- scripts/globals/items/tachi_of_trials.lua (revision 0) +++ scripts/globals/items/tachi_of_trials.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------------- +-- ID: 17815 +-- Equip: Tachi of Trials +-- Latent effect is active while less then 300 weapon skills have been preformed on EP+ Mobs using this weapon. +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnItemCheck +----------------------------------------- + +function onItemCheck(target,prevsjob) + + mainEquip = target:getEquipID(SLOT_MAIN); + + if (mainEquip == 17815) then + if (target:getVar("WSNMHits") < 300) then + target:addMod(MOD_HP, 20); + target:addMod(MOD_ICEDEF, 10); + target:addMod(MOD_DARKDEF, 10); + else + target:delMod(MOD_HP, 20); + target:delMod(MOD_ICEDEF, 10); + target:delMod(MOD_DARKDEF, 10); + end + end + +end; \ No newline at end of file Index: scripts/globals/keyitems.lua =================================================================== --- scripts/globals/keyitems.lua (revision 2121) +++ scripts/globals/keyitems.lua (working copy) @@ -1782,7 +1782,7 @@ MAP_OF_AYDEEWA_SUBTERRANE = 1861; MAP_OF_MAMOOK = 1862; MAP_OF_HALVUNG = 1863; -MAP_OF_ARAPAGO_REEF = 1864; +MAP_OF_ARRAPAGO_REEF = 1864; MAP_OF_ALZADAAL_RUINS = 1865; MAP_OF_LEUJAOAM_SANCTUM = 1866; MAP_OF_THE_TRAINING_GROUNDS = 1867; Index: scripts/globals/magic.lua =================================================================== --- scripts/globals/magic.lua (revision 2121) +++ scripts/globals/magic.lua (working copy) @@ -139,68 +139,68 @@ -- List of gear which enhances Cure Potency. ----------------------------------- function curePotency(caster) -c = 0; -main = caster:getEquipID(SLOT_MAIN); -sub = caster:getEquipID(SLOT_SUB); -range = caster:getEquipID(SLOT_RANGED); -ammo = caster:getEquipID(SLOT_AMMO); -head = caster:getEquipID(SLOT_HEAD); -body = caster:getEquipID(SLOT_BODY); -hand = caster:getEquipID(SLOT_HANDS); -leg = caster:getEquipID(SLOT_LEGS); -foot = caster:getEquipID(SLOT_FEET); -neck = caster:getEquipID(SLOT_NECK); -waist = caster:getEquipID(SLOT_WAIST); -ear1 = caster:getEquipID(SLOT_EAR1); -ear2 = caster:getEquipID(SLOT_EAR2); -ring1 = caster:getEquipID(SLOT_RING1); -ring2 = caster:getEquipID(SLOT_RING2); -back = caster:getEquipID(SLOT_BACK); + c = 0; + main = caster:getEquipID(SLOT_MAIN); + sub = caster:getEquipID(SLOT_SUB); + range = caster:getEquipID(SLOT_RANGED); + ammo = caster:getEquipID(SLOT_AMMO); + head = caster:getEquipID(SLOT_HEAD); + body = caster:getEquipID(SLOT_BODY); + hand = caster:getEquipID(SLOT_HANDS); + leg = caster:getEquipID(SLOT_LEGS); + foot = caster:getEquipID(SLOT_FEET); + neck = caster:getEquipID(SLOT_NECK); + waist = caster:getEquipID(SLOT_WAIST); + ear1 = caster:getEquipID(SLOT_EAR1); + ear2 = caster:getEquipID(SLOT_EAR2); + ring1 = caster:getEquipID(SLOT_RING1); + ring2 = caster:getEquipID(SLOT_RING2); + back = caster:getEquipID(SLOT_BACK); -if (main == 0x443a or sub == 0x443a) then - c = (c+0.01); - --print("Cure enhanced by Dia Wand."); -end -if (main == 0x442e or sub == 0x442e) then - c = (c+0.05); - --print("Cure enhanced by Asklepios."); -end -if (main == 0x4999 or sub == 0x4999) then - c = (c+0.10); - --print("Cure enhanced by Templar Mace."); -end -if (main == 17557 or main == 17558 or main == 0x42d4 or main == 0x429b) then - c = (c+0.10); - --print("Cure enhanced by Staff."); -end -if (body == 0x313d) then - c = (c+0.10); - --print("Cure enhanced by Noble's Tunic."); -elseif (body == 0x35ce) then - c = (c+0.12); - --print("Cure enhanced by Aristocrat's Coat."); -end -if (ear1 == 0x39d7 or ear2 == 0x39d7) then - c = (c+0.05); - --print("Cure enhanced by Hospitaler Earring."); -end -if (ear1 == 0x3e82 or ear2 == 0x3e82) then - c = (c+0.05); - --print("Cure enhanced by Roundel Earring."); -end -if (ring1 == 0x33e8 or ring2 == 0x33e8) then - hp = caster:getHP(); - maxhp = caster:getMaxHP(); - ratio = (hp/maxhp); - tp = caster:getTP(); - if (ratio <= 0.75 and tp <= 100) then - c = (c+0.10); - --print("Cure enhanced by Medicine Ring."); - end -end ---print("Total enhancement: " .. (c+1)); -return c; - end; + if (main == 0x443a or sub == 0x443a) then + c = (c+0.01); + --print("Cure enhanced by Dia Wand."); + end + if (main == 0x442e or sub == 0x442e) then + c = (c+0.05); + --print("Cure enhanced by Asklepios."); + end + if (main == 0x4999 or sub == 0x4999) then + c = (c+0.10); + --print("Cure enhanced by Templar Mace."); + end + if (main == 17557 or main == 17558 or main == 0x42d4 or main == 0x429b) then + c = (c+0.10); + --print("Cure enhanced by Staff."); + end + if (body == 0x313d) then + c = (c+0.10); + --print("Cure enhanced by Noble's Tunic."); + elseif (body == 0x35ce) then + c = (c+0.12); + --print("Cure enhanced by Aristocrat's Coat."); + end + if (ear1 == 0x39d7 or ear2 == 0x39d7) then + c = (c+0.05); + --print("Cure enhanced by Hospitaler Earring."); + end + if (ear1 == 0x3e82 or ear2 == 0x3e82) then + c = (c+0.05); + --print("Cure enhanced by Roundel Earring."); + end + if (ring1 == 0x33e8 or ring2 == 0x33e8) then + hp = caster:getHP(); + maxhp = caster:getMaxHP(); + ratio = (hp/maxhp); + tp = caster:getTP(); + if (ratio <= 0.75 and tp <= 100) then + c = (c+0.10); + --print("Cure enhanced by Medicine Ring."); + end + end + --print("Total enhancement: " .. (c+1)); + return c; +end; ----------------------------------- -- Author: ReaperX @@ -208,22 +208,26 @@ ----------------------------------- -- affinities that strengthen/weaken the index element - - function AffinityBonus(caster,spell) bonus = 1.00; ele = spell:getElement(); - + mainEquip = caster:getEquipID(SLOT_MAIN); + affinity = caster:getMod(strongAffinity[ele]) - caster:getMod(weakAffinity[ele]); if affinity > 0 then bonus = bonus + 0.05 + 0.05 * affinity; elseif affinity < 0 then bonus = bonus - 0.05 + 0.05 * affinity; + elseif mainEquip == 18632 then + bonus = 1.10; + elseif mainEquip == 18633 then + bonus = 1.15; end + printf("Staff Bonus: %u",bonus); return bonus; end; @@ -237,7 +241,7 @@ function applyResistance(player,spell,target,diff,skill,staff) resist = 1.0; - magicaccbonus = 0; + magicaccbonus = BASE_MAGIC_ACC_BONUS; --get the base acc (just skill plus magic acc mod) magicacc = player:getSkillLevel(skill) + player:getMod(79 + skill) + player:getMod(MOD_MACC); @@ -617,7 +621,7 @@ -- print(mab); -- print(magicDmgMod); - return dmg; + return dmg * SPELL_POWER; end --------------------------------------------------------------------- Index: scripts/globals/missions.lua =================================================================== --- scripts/globals/missions.lua (revision 2121) +++ scripts/globals/missions.lua (working copy) @@ -14,7 +14,7 @@ ACP = 9; ----------------------------------- --- San d'Oria +-- San d'Oria (0) ----------------------------------- SMASH_THE_ORCISH_SCOUTS = 0; -- -- @@ -43,7 +43,7 @@ THE_HEIR_TO_THE_LIGHT = 23; ----------------------------------- --- Bastok +-- Bastok (1) ----------------------------------- THE_ZERUHN_REPORT = 0; -- -- @@ -72,7 +72,7 @@ WHERE_TWO_PATHS_CONVERGE = 23; ----------------------------------- --- Windurst +-- Windurst (2) ----------------------------------- THE_HORUTOTO_RUINS_EXPERIMENT = 0; -- -- @@ -101,7 +101,7 @@ MOON_READING = 23; ----------------------------------- --- Zilart Missions +-- Zilart Missions (3) ----------------------------------- THE_NEW_FRONTIER = 0; -- -- @@ -124,7 +124,7 @@ THE_LAST_VERSE = 31; ----------------------------------- --- Promathia Missions +-- Promathia Missions (6) ----------------------------------- ANCIENT_FLAMES_BECKON = 0 @@ -193,7 +193,7 @@ THE_LAST_VERSE = 63 ----------------------------------- --- Aht Urhgan Missions +-- Aht Urhgan Missions (4) ----------------------------------- LAND_OF_SACRED_SERPENTS = 0; @@ -246,70 +246,166 @@ ETERNAL_MERCENARY = 47; ----------------------------------- --- +-- Wings of the Goddess (5) ----------------------------------- ---jAuriya|Moki: Old function, will likely be further tested and rewritten later +CAVERNOUS_MAWS = 0; +BACK_TO_THE_BEGINNING = 1; +CAIT_SITH = 2; +THE_QUEEN_OF_THE_DANCE = 3; +WHILE_THE_CAT_IS_AWAY = 4; +A_TIMESWEPT_BUTTERFLY = 5; +PURPLE,_THE_NEW_BLACK = 6; +IN_THE_NAME_OF_THE_FATHER = 7; +DANCERS_IN_DISTRESS = 8; +DAUGHTER_OF_A_KNIGHT = 9; +A_SPOONFUL_OF_SUGAR = 10; +AFFAIRS_OF_STATE = 11; +BORNE_BY_THE_WIND = 12; +A_NATION_ON_THE_BRINK = 13; +CROSSROADS_OF_TIME = 14; +SANDSWEPT_MEMORIES = 15; +NORTHLAND_EXPOSURE = 16; +TRAITOR_IN_THE_MIDST = 17; +BETRAYAL_AT_BEAUCEDINE = 18; +ON_THIN_ICE = 19; +PROOF_OF_VALOR = 20; +A_SANGUINARY_PRELUDE = 21; +DUNGEONS_AND_DANCERS = 22; +DISTORTER_OF_TIME = 23; +THE_WILL_OF_THE_WORLD = 24; +FATE_IN_HAZE = 25; +THE_SCENT_OF_BATTLE = 26; +ANOTHER_WORLD = 27; +A_HAWK_IN_REPOSE = 28; +THE_BATTLE_OF_XARCABARD = 29; +PRELUDE_TO_A_STORM = 30; +STORM_S_CRESCENDO = 31; +INTO_THE_BEAST_S_MAW = 32; +THE_HUNTER_ENSNARED = 33; +FLIGHT_OF_THE_LION = 34; +FALL_OF_THE_HAWK = 35; +DARKNESS_DESCENDS = 36; +ADIEU__LILISETTE = 37; +BY_THE_FADING_LIGHT = 38; +EDGE_OF_EXISTENCE = 39; +HER_MEMORIES = 40; +FORGET_ME_NOT = 41; +PILLAR_OF_HOPE = 42; +GLIMMER_OF_LIFE = 43; +TIME_SLIPS_AWAY = 44; +WHEN_WILLS_COLLIDE = 45; +WHISPERS_OF_DAWN = 46; +A_DREAMY_INTERLUDE = 47; +CAIT_IN_THE_WOODS = 48; +FORK_IN_THE_ROAD = 49; +MAIDEN_OF_THE_DUSK = 50; +WHERE_IT_ALL_BEGAN = 51; +A_TOKEN_OF_TROTH = 52; +LEST_WE_FORGET = 53; + + +----------------------------------- +-- Assualt (7) +----------------------------------- + +LEUJAOAM_CLEANSING = 1; +ORICHALCUM_SURVEY = 2; +ESCORT_PROFESSOR_CHANOIX = 3; +SHANARHA_GRASS_CONSERVATION = 4; +COUNTING_SHEEP = 5; +SUPPLIES_RECOVERY = 6; +AZURE_EXPERIMENTS = 7; +IMPERIAL_CODE = 8; +RED_VERSUS_BLUE = 9; +BLOODY_RONDO = 10; +IMPERIAL_AGENT_RESCUE = 11; +PREEMPTIVE_STRIKE = 12; +SAGELORD_ELIMINATION = 13; +BREAKING_MORALE = 14; +THE_DOUBLE_AGENT = 15; +IMPERIAL_TREASURE_RETRIEVAL = 16; +BLITZKRIEG = 17; +MARIDS_IN_THE_MIST = 18; +AZURE_AILMENTS = 19; +THE_SUSANOO_SHUFFLE = 20; +EXCAVATION_DUTY = 21; +LEBROS_SUPPLIES = 22; +TROLL_FUGITIVES = 23; +EVADE_AND_ESCAPE = 24; +SIEGEMASTER_ASSASSINATION = 25; +APKALLU_BREEDING = 26; +WAMOURA_FARM_RAID = 27; +EGG_CONSERVATION = 28; +OPERATION__BLACK_PEARL = 29; +BETTER_THAN_ONE = 30; +SEAGULL_GROUNDED = 31; +REQUIEM = 32; +SAVING_PRIVATE_RYAAF = 33; +SHOOTING_DOWN_THE_BARON = 34; +BUILDING_BRIDGES = 35; +STOP_THE_BLOODSHED = 36; +DEFUSE_THE_THREAT = 37; +OPERATION__SNAKE_EYES = 38; +WAKE_THE_PUPPET = 39; +THE_PRICE_IS_RIGHT = 40; +GOLDEN_SALVAGE = 41; +LAMIA_NO_13 = 42; +EXTERMINATION = 43; +DEMOLITION_DUTY = 44; +SEARAT_SALVATION = 45; +APKALLU_SEIZURE = 46; +LOST_AND_FOUND = 47; +DESERTER = 48; +DESPERATELY_SEEKING_CEPHALOPODS = 49; +BELLEROPHON_S_BLISS = 50; +NYZUL_ISLE_INVESTIGATION = 51; +NYZUL_ISLE_UNCHARTED_AREA_SURVEY = 52; + +----------------------------------- +-- Campaign (8) +----------------------------------- + +----------------------------------- +-- ACP (9) +----------------------------------- +A_CRYSTALLINE_PROPHECY = 0; +THE_ECHO_AWAKENS = 1; +GATHERER_OF_LIGHT = 3; + function rankPointMath(rank) return 0.372*rank^2 - 1.62*rank + 6.2; end ---jAuriya|Moki: Old function as well, I have only uncommented this function getMissionRankPoints(player, missionID) - if (missionID == 3) then -- mission 2.1 - crystals = 9; - elseif (missionID == 4) then -- mission 2.2 - crystals = 17; - elseif (missionID == 5) then -- mission 2.3 - crystals = 42; - elseif (missionID == 10) then -- mission 3.1 - crystals = 12; -- 1 stack needed to unlock - elseif (missionID == 11) then -- mission 3.2 - crystals = 30; -- 2.5 stacks needed to unlock (2 stacks of crystals + 3.1 rank points corresponding to half a stack) - elseif (missionID == 12) then -- mission 3.3 - crystals = 48; -- 4 stacks to unlock (3.5 stacks + 3.1 rank points corresponding to half a stack) - elseif (missionID == 13) then -- Magicite mission - crystals = 36; -- 3 stacks to unlock - -- 5.1 starts directly after Magicite, no crystals needed - elseif (missionID == 15) then -- mission 5.2 (shadow lord fight) - crystals = 44; -- Mission unlocks at 50% rank bar ~= 44 crystals using the present formula. - - elseif (missionID == 16) then -- mission 6.1 - crystals = 36; -- 3 stacks to unlock - elseif (missionID == 17) then -- mission 6.2 - crystals = 93; -- 3 additional stacks to unlock + 3 original stacks + 21 from mission 6.1 - - elseif (missionID == 18) then -- mission 7.1 - crystals = 45; -- 45 needed, from http://wiki.ffxiclopedia.org/wiki/The_Final_Image - -- (http://wiki.ffxiclopedia.org/wiki/Prestige_of_the_Papsque says 47 though) - elseif (missionID == 19) then -- mission 7.2 - crystals = 119; -- 4 additional stacks needed, plus mission reward of 26 - - elseif (missionID == 20) then -- mission 8.1 - crystals = 57; -- 4 3/4 stacks needed - elseif (missionID == 21) then -- mission 8.2 - crystals = 148; -- 5 additional stacks needed, plus mission reward of 31, - - elseif (missionID == 22) then -- mission 9.1 - crystals = 96; -- 8 stacks needed (higher value chosen so final rank bar requirement is closer to 90%) - elseif (missionID == 23) then -- mission 9.2 - crystals = 228; -- Additional 8 stacks needed, plus mission reward of 36 (87% rank bar) + if (missionID == 3) then crystals = 9; + elseif (missionID == 4) then crystals = 17; + elseif (missionID == 5) then crystals = 42; + elseif (missionID == 10) then crystals = 12; -- 1 stack needed to unlock + elseif (missionID == 11) then crystals = 30; -- 2.5 stacks needed to unlock (2 stacks of crystals + 3.1 rank points corresponding to half a stack) + elseif (missionID == 12) then crystals = 48; -- 4 stacks to unlock (3.5 stacks + 3.1 rank points corresponding to half a stack) + elseif (missionID == 13) then crystals = 36; -- 3 stacks to unlock + -- 5.1 starts directly after Magicite, no crystals needed + elseif (missionID == 15) then crystals = 44; -- Mission unlocks at 50% rank bar ~= 44 crystals using the present formula. + elseif (missionID == 16) then crystals = 36; -- 3 stacks to unlock + elseif (missionID == 17) then crystals = 93; -- 3 additional stacks to unlock + 3 original stacks + 21 from mission 6.1 + elseif (missionID == 18) then crystals = 45; -- 45 needed, from http://wiki.ffxiclopedia.org/wiki/The_Final_Image + elseif (missionID == 19) then crystals = 119; -- 4 additional stacks needed, plus mission reward of 26 + elseif (missionID == 20) then crystals = 57; -- 4 3/4 stacks needed + elseif (missionID == 21) then crystals = 148; -- 5 additional stacks needed, plus mission reward of 31, + elseif (missionID == 22) then crystals = 96; -- 8 stacks needed (higher value chosen so final rank bar requirement is closer to 90%) + elseif (missionID == 23) then crystals = 228; -- Additional 8 stacks needed, plus mission reward of 36 (87% rank bar) end; points_needed = 1024 * (crystals-.25) / (3*rankPointMath(player:getRank())); - --printf("Got [%d/%d] for Mission with ID: %d", player:getRankPoints(), points_needed, missionID); + if(player:getRankPoints() >= points_needed) then return 1; else return 0; end - - --return (true); end; - ---jAuriya|Moki: Pretty much re-did the entire function, this way it's customizable, for example if --- someone later would want to run a server that has all missions repeatable, etc function getMissionMask(player) rank = player:getRank() nation = player:getNation(); -- 0 = San d'Oria ; 1 = Bastok ; 2 = Windurst @@ -368,16 +464,13 @@ end if(rank == 4) then -- The mission is triggered by the Ambassador in Jeuno - --if(player:hasCompletedMission(WINDURST,MAGICITE) == false and getMissionRankPoints(player,0) == 1) then - -- 4-1 NOTE: This mission will not be listed in the Mission List - --first_mission = first_mission + 8192; - --end + first_mission = first_mission + 8192; + end end if(rank == 5) then - --if(player:hasCompletedMission(WINDURST,THE_FINAL_SEAL) == false and getMissionRankPoints(player,0) == 1 and mission_status == 0) then - -- 5-1 NOTE: This mission will not be listed in the Mission List - --first_mission = first_mission + 16384; - --end + if(player:hasCompletedMission(WINDURST,THE_FINAL_SEAL) == false and getMissionRankPoints(player,0) == 1 and mission_status == 0) then + first_mission = first_mission + 16384; + end if(player:hasCompletedMission(WINDURST,THE_FINAL_SEAL) and player:hasCompletedMission(WINDURST,THE_SHADOW_AWAITS) == false and getMissionRankPoints(player,15) == 1) then -- 5-2 first_mission = first_mission + 32768; @@ -465,16 +558,13 @@ end if(rank == 4) then -- The mission is triggered by the Ambassador in Jeuno - --if(player:hasCompletedMission(SANDORIA,MAGICITE_SAN_D_ORIA) == false and getMissionRankPoints(player,0) == 1) then - -- 4-1 NOTE: This mission will not be listed in the Mission List - --first_mission = first_mission + 8192; - --end + first_mission = first_mission + 8192; + end end if(rank == 5) then - --if(player:hasCompletedMission(SANDORIA,THE_RUINS_OF_FEI_YIN) == false and player:hasKeyItem(69) == false) then - -- 5-1 NOTE: This mission will not be listed in the Mission List - --first_mission = first_mission + 16384; - --end + if(player:hasCompletedMission(SANDORIA,THE_RUINS_OF_FEI_YIN) == false and player:hasKeyItem(69) == false) then + first_mission = first_mission + 16384; + end if(player:hasCompletedMission(SANDORIA,THE_SHADOW_LORD) == false and player:hasCompletedMission(SANDORIA,THE_RUINS_OF_FEI_YIN) and getMissionRankPoints(player,15) == 1) then -- 5-2 first_mission = first_mission + 32768; @@ -563,16 +653,13 @@ end if(rank == 4) then -- The mission is triggered by the Ambassador in Jeuno - --if(player:hasCompletedMission(BASTOK,MAGICITE_BASTOK) == false and getMissionRankPoints(player,0) == 1) then - -- 4-1 NOTE: This mission will not be listed in the Mission List - --first_mission = first_mission + 8192; - --end + first_mission = first_mission + 8192; + end end if(rank == 5) then - --if(player:hasCompletedMission(BASTOK,DARKNESS_RISING) == false and getMissionRankPoints(player,0) == 1 and mission_status == 0) then - -- 5-1 NOTE: This mission will not be listed in the Mission List - --first_mission = first_mission + 16384; - --end + if(player:hasCompletedMission(BASTOK,DARKNESS_RISING) == false and getMissionRankPoints(player,0) == 1 and mission_status == 0) then + first_mission = first_mission + 16384; + end if(player:hasCompletedMission(BASTOK,DARKNESS_RISING) and player:hasCompletedMission(BASTOK,XARCABARD_LAND_OF_TRUTHS) == false and getMissionRankPoints(player,15) == 1) then -- 5-2 first_mission = first_mission + 32768; @@ -620,7 +707,8 @@ mission_mask = 2147483647 - 16384; else mission_mask = 2147483647 - repeat_mission - first_mission; -- 2^31 -1 - .. - end + end + return mission_mask,repeat_mission; end; Index: scripts/globals/mobs.lua =================================================================== --- scripts/globals/mobs.lua (revision 2121) +++ scripts/globals/mobs.lua (working copy) @@ -16,14 +16,9 @@ ----------------------------------- function onMobDeathEx(mob,killer) + + mainEquip = killer:getEquipID(SLOT_MAIN); - -- DRK quest - Blade Of Darkness - if(killer:getEquipID(SLOT_MAIN) == 16607) then - local SwordKills = killer:getVar("Blade_of_Darkness_SwordKills"); - if(SwordKills < 200) then - killer:setVar("Blade_of_Darkness_SwordKills", SwordKills + 1); - end - end if(killer:getCurrentMission(WINDURST) == A_TESTING_TIME) then if(killer:hasCompletedMission(WINDURST,A_TESTING_TIME) and killer:getZone() == 118) then killer:setVar("testingTime_crea_count",killer:getVar("testingTime_crea_count") + 1); @@ -32,4 +27,12 @@ end end + -- DRK quest - Blade Of Darkness + if(mainEquip == 16607) then + local SwordKills = killer:getVar("Blade_of_Darkness_SwordKills"); + if(SwordKills < 200) then + killer:setVar("Blade_of_Darkness_SwordKills", SwordKills + 1); + end + end + end; \ No newline at end of file Index: scripts/globals/mobskills/Spalsh_Breath.lua =================================================================== --- scripts/globals/mobskills/Spalsh_Breath.lua (revision 0) +++ scripts/globals/mobskills/Spalsh_Breath.lua (working copy) @@ -0,0 +1,21 @@ +--------------------------------------------------- +-- Splash Breath +-- Deals Water damage in a fan-shaped cone area of effect. +--------------------------------------------------- + +require("/scripts/globals/settings"); +require("/scripts/globals/status"); +require("/scripts/globals/monstertpmoves"); + +--------------------------------------------------- + +function OnMobWeaponSkill(target, mob, skill) + + dmgmod = 1; + accmod = 1; + info = MobMagicalMove(mob,target,skill,mob:getWeaponDmg() * 3,accmod,dmgmod,TP_MAB_BONUS,1); + dmg = MobFinalAdjustments(info.dmg,mob,skill,target,MOBSKILL_MAGICAL,MOBPARAM_WATER,MOBPARAM_WIPE_SHADOWS); + target:delHP(dmg); + return dmg; + +end \ No newline at end of file Index: scripts/globals/quests.lua =================================================================== --- scripts/globals/quests.lua (revision 2121) +++ scripts/globals/quests.lua (working copy) @@ -205,7 +205,7 @@ THE_NAMING_GAME = 81; CHIPS = 82; BAIT_AND_SWITCH = 83; -LURE_OF_THE_WILDCAT_BASTOK = 84; +LURE_OF_THE_WILDCAT_BASTOK = 84; -- -- ACHIEVING_TRUE_POWER = 85; TOO_MANY_CHEFS = 86; A_PROPER_BURIAL = 87; @@ -280,14 +280,14 @@ FLOWER_CHILD = 65; -- -- THE_THREE_MAGI = 66; -- -- RECOLLECTIONS = 67; -- -- -THE_ROOT_OF_THE_PROBLEM = 68; +THE_ROOT_OF_THE_PROBLEM = 68; -- -- THE_TENSHODO_SHOWDOWN = 69; -- + -- AS_THICK_AS_THIEVES = 70; -- + -- HITTING_THE_MARQUISATE = 71; -- + -- SIN_HUNTING = 72; FIRE_AND_BRIMSTONE = 73; UNBRIDLED_PASSION = 74; -I_CAN_HEAR_A_RAINBOW = 75; +I_CAN_HEAR_A_RAINBOW = 75; -- + -- CRYING_OVER_ONIONS = 76; -- + -- WILD_CARD = 77; -- + -- THE_PROMISE = 78; -- + -- @@ -444,9 +444,9 @@ WHENCE_BLOWS_THE_WIND = 130; -- + -- RIDING_ON_THE_CLOUDS = 131; -- + -- SHATTERING_STARS = 132; -- + -- -NEW_WORLDS_AWAIT = 133; -EXPANDING_HORIZONS = 134; -BEYOND_THE_STARS = 135; +NEW_WORLDS_AWAIT = 133; -- + -- +EXPANDING_HORIZONS = 134; -- + -- +BEYOND_THE_STARS = 135; -- + -- DORMANT_POWERS_DISLODGED = 136; BEYOND_INFINITY = 137; @@ -492,7 +492,7 @@ TRIAL_BY_LIGHTNING = 27; -- -- TRIAL_SIZE_TRIAL_BY_LIGHTNING = 28; IT_S_RAINING_MANNEQUINS = 29; -RECYCLING_RODS = 30; +RECYCLING_RODS = 30; -- -- PICTURE_PERFECT = 31; WAKING_THE_BEAST = 32; SURVIVAL_OF_THE_WISEST = 33; @@ -594,12 +594,17 @@ ----------------------------------- KEEPING_NOTES = 0; -ARTS_AND_CRAFTS = 1; +ARTS_AND_CRAFTS = 1; -- -- +OLDUUM = 2; -- -- +FEAR_OF_THE_DARK_II = 14; -- -- +DELIVERING_THE_GOODS = 61; -- -- ----------------------------------- -- Crystal War ----------------------------------- +THE_WEEKLY_ADVENTURER = 2; +THE_FIGHTING_FOURTH = 7; ----------------------------------- -- Abyssea Index: scripts/globals/server.lua =================================================================== --- scripts/globals/server.lua (revision 2121) +++ scripts/globals/server.lua (working copy) @@ -1,9 +1,3 @@ ------------------------------------ --- Note from Tenjou: --- now you can customize it a little more in the settings! --- ------------------------------------ - require("scripts/globals/conquest"); require("scripts/globals/keyitems"); require("scripts/globals/missions"); Index: scripts/globals/settings.lua =================================================================== --- scripts/globals/settings.lua (revision 2121) +++ scripts/globals/settings.lua (working copy) @@ -2,7 +2,7 @@ ------------- GLOBAL SETTINGS ------------- ----------------------------------------------- ---This is to allow server operators to further customize their servers. As more features are added to pXI, the list will surely expand. +--This is to allow server operators to further customize their servers. As more features are added to DarkStar, the list will surely expand. --Anything scripted can be customized with proper script editing. --PLEASE REQUIRE THIS SCRIPT IN ANY SCRIPTS YOU DO: ADD THIS LINE TO THE TOP!!!! @@ -12,58 +12,52 @@ --Common functions require("scripts/globals/common"); ---Always include status.lua, which defines mods ---require("scripts/globals/status"); - ---See chocoprice.lua to adjust chocobo stables. ---require("scripts/globals/chocoprice"); - -- CHARACTER CONFIG -INITIAL_LEVEL_CAP = 50; --The initial level cap for new players. There seems to be a hardcap of 255. -MAX_LEVEL = 75; -- Level max of the server, works by disabling Maat quests. -START_GIL = 10; --Amount of gil given to newly created characters. -START_INVENTORY = 30; --Starting inventory and satchel size. Ignores values < 30. Do not set above 80! -OPENING_CUTSCENE_ENABLE = 0; --Set to 1 to enable opening cutscenes, 0 to disable. -SUBJOB_QUEST_LEVEL = 18; --Minimum level to accept either subjob quest. Set to 0 to start the game with subjobs unlocked. -ADVANCED_JOB_LEVEL = 30; --Minimum level to accept advanced job quests. Set to 0 to start the game with advanced jobs. -ALL_MAPS = 0; -- Set to 1 to give starting characters all the maps. +INITIAL_LEVEL_CAP = 50; -- The initial level cap for new players. There seems to be a hardcap of 255. +MAX_LEVEL = 75; -- Level max of the server. +START_GIL = 10; -- Amount of gil given to newly created characters. +START_INVENTORY = 30; -- Starting inventory and satchel size. Ignores values < 30. Do not set above 80! +OPENING_CUTSCENE_ENABLE = 1; -- Set to 1 to enable opening cutscenes, 0 to disable. +SUBJOB_QUEST_LEVEL = 18; -- Minimum level to accept either subjob quest. Set to 0 to start the game with subjobs unlocked. +ADVANCED_JOB_LEVEL = 30; -- Minimum level to accept advanced job quests. Set to 0 to start the game with advanced jobs. +ALL_MAPS = 0; -- Set to 1 to give starting characters all the maps. -SHOP_PRICE = 1.000; --Multiplies prices in NPC shops. -GIL_RATE = 1.000; --Multiplies gil earned from quests. Won't always display in game. -EXP_RATE = 1.000; --Multiplies exp earned from fov. -TABS_RATE = 1.000; --Multiplies tabs earned from fov. -SAN_FAME = 1.000; --Multiplies fame earned from San d'Oria quests. -BAS_FAME = 1.000; --Multiplies fame earned from Bastok quests. -WIN_FAME = 1.000; --Multiplies fame earned from Windurst quests. -NORG_FAME = 1.000; --Multiplies fame earned from Norg and Tenshodo quests. +SHOP_PRICE = 1.000; -- Multiplies prices in NPC shops. +GIL_RATE = 1.000; -- Multiplies gil earned from quests. Won't always display in game. +EXP_RATE = 1.000; -- Multiplies exp earned from fov. +SAN_FAME = 1.000; -- Multiplies fame earned from San d'Oria quests. +BAS_FAME = 1.000; -- Multiplies fame earned from Bastok quests. +WIN_FAME = 1.000; -- Multiplies fame earned from Windurst quests. +NORG_FAME = 1.000; -- Multiplies fame earned from Norg and Tenshodo quests. -FISHING_GUILD_POINTS = 1.000; --Multiplies guild points earned from fishermans' guild trades. -WOODWORKING_GUILD_POINTS = 1.000; --Multiplies guild points earned from carpenters' guild trades. -SMITHING_GUILD_POINTS = 1.000; --Multiplies guild points earned from blacksmiths' guild trades. -GOLDSMITHING_GUILD_POINTS = 1.000; --Multiplies guild points earned from goldsmiths' guild trades. -CLOTHCRAFT_GUILD_POINTS = 1.000; --Multiplies guild points earned from weavers' guild trades. -LEATHERCRAFT_GUILD_POINTS = 1.000; --Multiplies guild points earned from tanners' guild trades. -BONECRAFT_GUILD_POINTS = 1.000; --Multiplies guild points earned from boneworkers' guild trades. -ALCHEMY_GUILD_POINTS = 1.000; --Multiplies guild points earned from alchemists' guild trades. -COOKING_GUILD_POINTS = 1.000; --Multiplies guild points earned from culinarians' guild trades. -DISABLE_GUILD_CONTRACTS = 0; --Set to 1 to disable guild contracts, allowing players to accumulate guild points from all guilds at once. +FISHING_GUILD_POINTS = 1.000; -- Multiplies guild points earned from fishermans' guild trades. +WOODWORKING_GUILD_POINTS = 1.000; -- Multiplies guild points earned from carpenters' guild trades. +SMITHING_GUILD_POINTS = 1.000; -- Multiplies guild points earned from blacksmiths' guild trades. +GOLDSMITHING_GUILD_POINTS = 1.000; -- Multiplies guild points earned from goldsmiths' guild trades. +CLOTHCRAFT_GUILD_POINTS = 1.000; -- Multiplies guild points earned from weavers' guild trades. +LEATHERCRAFT_GUILD_POINTS = 1.000; -- Multiplies guild points earned from tanners' guild trades. +BONECRAFT_GUILD_POINTS = 1.000; -- Multiplies guild points earned from boneworkers' guild trades. +ALCHEMY_GUILD_POINTS = 1.000; -- Multiplies guild points earned from alchemists' guild trades. +COOKING_GUILD_POINTS = 1.000; -- Multiplies guild points earned from culinarians' guild trades. +DISABLE_GUILD_CONTRACTS = 1; -- Set to 1 to disable guild contracts, allowing players to accumulate guild points from all guilds at once. -CURE_POWER = 1.000; --Multiplies amount healed from Healing Magic, including the relevant Blue Magic. -SPELL_POWER = 1.000; --Multiplies damage dealt by Elemental and Divine Magic. -BLUE_POWER = 1.000; --Multiplies damage dealt by most Blue Magic. -DRAIN_POWER = 1.000; --Multiplies amount drained by Drain, Aspir, and relevant Blue Magic spells. -ITEM_POWER = 1.000; --Multiplies the effect of items such as Potions and Ethers. -WEAPON_SKILL_POWER = 1.000; -- Multiplies damage dealt by Weapon Skills. -WEAPON_SKILL_POINTS = 1.000; --Multiplies points earned during weapon unlocking. +CURE_POWER = 1.000; -- Multiplies amount healed from Healing Magic, including the relevant Blue Magic. +SPELL_POWER = 1.000; -- Multiplies damage dealt by Elemental and Divine Magic. +BLUE_POWER = 1.000; -- Multiplies damage dealt by most Blue Magic. +DRAIN_POWER = 1.000; -- Multiplies amount drained by Drain, Aspir, and relevant Blue Magic spells. +BASE_MAGIC_ACC_BONUS = 0; -- Add raw base magic accuracy. Default is 0. +ITEM_POWER = 1.000; -- Multiplies the effect of items such as Potions and Ethers. +WEAPON_SKILL_POWER = 1.000; -- Multiplies damage dealt by Weapon Skills. +WEAPON_SKILL_POINTS = 1.000; -- Multiplies points earned during weapon unlocking. -HARVESTING_BREAK_CHANCE = 0.33; --% chance for the sickle to break during harvesting. Set between 0 and 1. -EXCAVATION_BREAK_CHANCE = 0.33; --% chance for the pickaxe to break during excavation. Set between 0 and 1. -LOGGING_BREAK_CHANCE = 0.33; --% chance for the hatchet to break during logging. Set between 0 and 1. -MINING_BREAK_CHANCE = 0.33; --% chance for the pickaxe to break during mining. Set between 0 and 1. -HARVESTING_RATE = 0.50; --% chance to recieve an item from haresting. Set between 0 and 1. -EXCAVATION_RATE = 0.50; --% chance to recieve an item from excavation. Set between 0 and 1. -LOGGING_RATE = 0.50; --% chance to recieve an item from logging. Set between 0 and 1. -MINING_RATE = 0.50; --% chance to recieve an item from mining. Set between 0 and 1. +HARVESTING_BREAK_CHANCE = 0.33; -- % chance for the sickle to break during harvesting. Set between 0 and 1. +EXCAVATION_BREAK_CHANCE = 0.33; -- % chance for the pickaxe to break during excavation. Set between 0 and 1. +LOGGING_BREAK_CHANCE = 0.33; -- % chance for the hatchet to break during logging. Set between 0 and 1. +MINING_BREAK_CHANCE = 0.33; -- % chance for the pickaxe to break during mining. Set between 0 and 1. +HARVESTING_RATE = 0.50; -- % chance to recieve an item from haresting. Set between 0 and 1. +EXCAVATION_RATE = 0.50; -- % chance to recieve an item from excavation. Set between 0 and 1. +LOGGING_RATE = 0.50; -- % chance to recieve an item from logging. Set between 0 and 1. +MINING_RATE = 0.50; -- % chance to recieve an item from mining. Set between 0 and 1. -- SE implemented coffer/chest illusion time in order to prevent coffer farming. No-one in the same area can open a chest or coffer for loot (gil, gems & items) -- till a random time between MIN_ILLSION_TIME and MAX_ILLUSION_TIME. During this time players can loot keyitem and item related to quests (AF, maps... etc.) @@ -76,11 +70,17 @@ -- DYNAMIS SETTINGS BETWEEN_2DYNA_WAIT_TIME = 1; -- wait time between 2 dynamis (in real day) min: 1 day DYNA_LEVEL_MIN = 65; -- level min for entering in dynamis - TIMELESS_HOURGLASS_COST = 500000; -- cost of the timeless hourglass for Dynamis. RELIC_1ST_UPGRADE_WAIT_TIME = 100; -- wait time for 1st relic upgrade (stage 1 -> stage 2) in seconds. 86400s = 1 RL day. RELIC_2ND_UPGRADE_WAIT_TIME = 100; -- wait time for 2nd relic upgrade (stage 2 -> stage 3) in seconds. 604800s = 1 RL week. RELIC_3RD_UPGRADE_WAIT_TIME = 100; -- wait time for 3rd relic upgrade (stage 3 -> stage 4) in seconds. 295200s = 82 hours. +-- HEALING/RESTING +BASE_HP_HEAL_BONUS = 0; -- Default is 0. Adds to the default base of 10HP for resting. i.e. change to 20 to have a base heal tick of 30HP. +HP_HEAL_BONUS = 1; -- Default is 1. Multiplies the increased HP added to each resting tick. Default rest ticks are 10, 11, 12, 13 etc without any bonuses. Changing this value to 5 would cause a new rest ticks of 10, 15, 20, 25, etc. +BASE_MP_HEAL_BONUS = 0; -- Default is 0. Adds to the default base of 10MP for resting. i.e. change 20 to have a base heal tick of 30MP. +MP_HEAL_BONUS = 1; -- Default is 1. Multiplies the increased MP added to each resting tick. Default rest ticks are 10, 11, 12, 13 etc without any bonuses. Changing this value to 5 would cause a new rest ticks 10, 15, 20, 25, etc. +TP_LOSS = 10; -- Changes the amount of TP lost on each tick while resting. Default is 10. + -- QUEST/MISSION SPECIFIC SETTINGS WSNM_LEVEL = 70; -- Min Level to get WSNM Quests WSNM_SKILL_LEVEL = 240; @@ -93,9 +93,12 @@ QM_RESET_TIME = 300; -- Default time (in seconds) you have from killing ???-pop mission NMs to click again and get key item, until ??? resets. -- FIELDS OF VALOR SETTINGS -REGIME_WAIT = 1; --Make people wait till 00:00 game time as in retail. If it's 0, there is no wait time. -FIELD_MANUALS = 1; -- Enables Fields of Valor manuals +FIELD_MANUALS = 1; --Enables Field Manuals +REGIME_WAIT = 0; --Make people wait till 00:00 game time as in retail. If it's 0, there is no wait time. LOW_LEVEL_REGIME = 0; --Allow people to kill regime targets even if they give no exp, allowing people to farm regime targets at 75 in low level areas. +FOV_EXP_RATE = 1.0; --Multiplies exp earned from fov. +TABS_RATE = 1.0; --Multiplies tabs earned from fov. +FOV_GIL_RATE = 1.0; --Multiplies gil earned from fov. -- JOB ABILITY/TRAIT SPECIFIC SETTINGS SCAVENGE_RATE = 0.1; --The chance of obtaining an item when you use the Ranger job ability Scavenge. Do not set above 1! @@ -114,7 +117,7 @@ BARD_SONG_LIMIT = 1; --Maximum amount of songs from a single Bard that can be granted to a single target at once. Set between 1 and 31. BARD_INSTRUMENT_LIMIT = 2; --Maximum amount of songs from a single Bard with an instrument that can be granted to a single target at once. Set between 2 and 32. ENHANCING_SONG_DURATION = 120; -- duration of enhancing bard songs such as Minuets, Ballads, etc. -STONESKIN_CAP = 350; -- soft cap for hp absorbed by stoneskin +STONESKIN_CAP = 300; -- soft cap for hp absorbed by stoneskin BLINK_SHADOWS = 2; -- number of shadows supplied by Blink spell ENSPELL_DURATION = 180; -- duration of RDM en-spells SPIKE_EFFECT_DURATION = 180; -- the duration of RDM, BLM spikes effects (not Reprisal) @@ -127,18 +130,19 @@ SNEAK_INVIS_DURATION_MULTIPLIER = 1; -- multiplies duration of sneak,invis,deodorize to reduce player torture. 1 = retail behavior. MUST BE INTEGER. -- CELEBRATIONS -EXPLORER_MOOGLE = 1; -- Enables Explorer Moogle teleports +EXPLORER_MOOGLE = 1; -- Enables Explorer Moogle teleports EXPLORER_MOOGLE_LEVELCAP = 10; -JINX_MODE_2005 = 0; -- Set to 1 to give starting characters swimsuits from 2005. Ex: Hume Top -JINX_MODE_2008 = 0; -- Set to 1 to give starting characters swimsuits from 2008. Ex: Custom Top -JINX_MODE_2012 = 0; -- Set to 1 to give starting characters swimsuits from 2012. Ex: Marine Top -SUMMERFEST_2004 = 0; -- Set to 1 to give starting characters Far East dress from 2004. Ex: Onoko Yukata -SUNBREEZE_2009 = 0; -- Set to 1 to give starting characters Far East dress from 2009. Ex: Otokogusa Yukata -SUNBREEZE_2011 = 0; -- Set to 1 to give starting characters Far East dress from 2011. Ex: Hikogami Yukata -CHRISTMAS = 0; -- Set to 1 to give starting characters Christmas dress. -HALLOWEEN = 0; -- Set to 1 to give starting characters Halloween items. +JINX_MODE_2005 = 0; -- Set to 1 to give starting characters swimsuits from 2005. Ex: Hume Top +JINX_MODE_2008 = 0; -- Set to 1 to give starting characters swimsuits from 2008. Ex: Custom Top +JINX_MODE_2012 = 0; -- Set to 1 to give starting characters swimsuits from 2012. Ex: Marine Top +SUMMERFEST_2004 = 0; -- Set to 1 to give starting characters Far East dress from 2004. Ex: Onoko Yukata +SUNBREEZE_2009 = 0; -- Set to 1 to give starting characters Far East dress from 2009. Ex: Otokogusa Yukata +SUNBREEZE_2011 = 0; -- Set to 1 to give starting characters Far East dress from 2011. Ex: Hikogami Yukata +CHRISTMAS = 0; -- Set to 1 to give starting characters Christmas dress. +HALLOWEEN = 0; -- Set to 1 to give starting characters Halloween items. ---MISC +-- MISC HOMEPOINT_HEAL = 0; --Set to 1 if you want Home Points to heal you like in single-player Final Fantasy games. RIVERNE_PORTERS = 120; -- Time in seconds that Unstable Displacements in Cape Riverne stay open after trading a scale. -LANTERNS_STAY_LIT = 1200; -- time in seconds that lanterns in the Den of Rancor stay lit. +LANTERNS_STAY_LIT = 1200; -- time in seconds that lanterns in the Den of Rancor stay lit. +EVERYONE_CAN_ACCESS_SEA = 0; -- Allows the use of the Dimensional Portal's with out having completed the CoP missions for Sea access. Index: scripts/globals/spells/absorb-tp.lua =================================================================== --- scripts/globals/spells/absorb-tp.lua (revision 0) +++ scripts/globals/spells/absorb-tp.lua (working copy) @@ -0,0 +1,35 @@ +-------------------------------------- +-- Spell: Absorb-TP +-- Steals an enemy's TP. +-------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + bonus = AffinityBonus(caster,spell); + dINT = caster:getStat(MOD_INT) - target:getStat(MOD_INT); + resist = applyResistance(caster,spell,target,dINT,37,bonus); + final = (target:getTP() / 2) * resist; + if(resist <= 0.125) then + spell:setMsg(85); + else + if(target:getTP() > 0) then + spell:setMsg(454); + caster:addTP(final); -- caster gains TP + target:delTP(final); -- target loses TP + else + spell:setMsg(114); + end + end + target:updateEnmity(caster,640,1); + + return final; + +end; Index: scripts/globals/spells/aisha_ichi.lua =================================================================== --- scripts/globals/spells/aisha_ichi.lua (revision 0) +++ scripts/globals/spells/aisha_ichi.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------------- +-- Spell: Aisha: Ichi +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + -- Pull base stats. + dINT = (caster:getStat(MOD_INT) - target:getStat(MOD_INT)); + staff = StaffBonus(caster,spell); + + -- Base power. + power = 15; + + -- Duration, including resistance. Unconfirmed. + duration = 180 * applyResistance(caster,spell,target,dINT,43,staff); + + if(duration >= 90) then --Do it! + -- Try to erase a weaker attkdown. + attkdown = target:getStatusEffect(EFFECT_ATTACK_DOWN) + if(attkdown ~= nil) then + if(attkdown:getPower() < power) then + target:delStatusEffect(EFFECT_ATTACK_DOWN); + target:addStatusEffect(EFFECT_ATTACK_DOWN,power,0,duration); +-- if(spell:isAOE() == false) then +-- spell:setMsg(237); +-- else + spell:setMsg(267); +-- end + else + spell:setMsg(75); + end + else + target:addStatusEffect(EFFECT_ATTACK_DOWN,power,0,duration); +-- if(spell:isAOE() == false) then +-- spell:setMsg(237); +-- else + spell:setMsg(267); +-- end + end + else +-- if(spell:isAOE() == false) then +-- spell:setMsg(85); +-- else + spell:setMsg(284); +-- end + end + + target:updateEnmity(caster,320,1); + + return EFFECT_ATTACK_DOWN; + +end; \ No newline at end of file Index: scripts/globals/spells/baramnesia.lua =================================================================== --- scripts/globals/spells/baramnesia.lua (revision 0) +++ scripts/globals/spells/baramnesia.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Baramnesia +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARAMNESIA); + target:addStatusEffect(EFFECT_BARAMNESIA,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/baramnesra.lua =================================================================== --- scripts/globals/spells/baramnesra.lua (revision 0) +++ scripts/globals/spells/baramnesra.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Baramnesra +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARAMNESIA); + target:addStatusEffect(EFFECT_BARAMNESIA,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barblind.lua =================================================================== --- scripts/globals/spells/barblind.lua (revision 0) +++ scripts/globals/spells/barblind.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barblind +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARBLIND); + target:addStatusEffect(EFFECT_BARBLIND,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barparalyze.lua =================================================================== --- scripts/globals/spells/barparalyze.lua (revision 0) +++ scripts/globals/spells/barparalyze.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barparalyze +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARPARALYZE); + target:addStatusEffect(EFFECT_BARPARALYZE,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barpetrify.lua =================================================================== --- scripts/globals/spells/barpetrify.lua (revision 0) +++ scripts/globals/spells/barpetrify.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barpetrify +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARPETRIFY); + target:addStatusEffect(EFFECT_BARPETRIFY,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barpoison.lua =================================================================== --- scripts/globals/spells/barpoison.lua (revision 0) +++ scripts/globals/spells/barpoison.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barpoison +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARPOISON); + target:addStatusEffect(EFFECT_BARPOISON,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barsilence.lua =================================================================== --- scripts/globals/spells/barsilence.lua (revision 0) +++ scripts/globals/spells/barsilence.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barsilence +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARSILENCE); + target:addStatusEffect(EFFECT_BARSILENCE,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barsleep.lua =================================================================== --- scripts/globals/spells/barsleep.lua (revision 0) +++ scripts/globals/spells/barsleep.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barsleep +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARSLEEP); + target:addStatusEffect(EFFECT_BARSLEEP,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barvira.lua =================================================================== --- scripts/globals/spells/barvira.lua (revision 0) +++ scripts/globals/spells/barvira.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barvira +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARVIRUS); + target:addStatusEffect(EFFECT_BARVIRUS,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/barvirus.lua =================================================================== --- scripts/globals/spells/barvirus.lua (revision 0) +++ scripts/globals/spells/barvirus.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Barvirus +----------------------------------------- +require("scripts/globals/magic"); +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = getBarspellDuration(caster); + power = getBarspellPower(caster); + + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster == target) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_BARVIRUS); + target:addStatusEffect(EFFECT_BARVIRUS,power,0,duration); +end; \ No newline at end of file Index: scripts/globals/spells/bio.lua =================================================================== --- scripts/globals/spells/bio.lua (revision 2121) +++ scripts/globals/spells/bio.lua (working copy) @@ -16,9 +16,15 @@ --calculate raw damage basedmg = caster:getSkillLevel(DARK_MAGIC_SKILL) / 4; dmg = calculateMagicDamage(basedmg,1,caster,spell,target,DARK_MAGIC_SKILL,MOD_INT,false); - if dmg > 2 then + + -- Softcaps at 2, should always do at least 1 + if(dmg > 2) then dmg = 2; end + if(dmg < 1) then + dmg = 1; + end + --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),DARK_MAGIC_SKILL,1.0); --get the resisted damage Index: scripts/globals/spells/bio_ii.lua =================================================================== --- scripts/globals/spells/bio_ii.lua (revision 2121) +++ scripts/globals/spells/bio_ii.lua (working copy) @@ -16,9 +16,15 @@ --calculate raw damage basedmg = caster:getSkillLevel(DARK_MAGIC_SKILL) / 4; dmg = calculateMagicDamage(basedmg,2,caster,spell,target,DARK_MAGIC_SKILL,MOD_INT,false); - if dmg > 8 then + + -- Softcaps at 8, should always do at least 1 + if(dmg > 8) then dmg = 8; end + if(dmg < 1) then + dmg = 1; + end + --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),DARK_MAGIC_SKILL,1.0); --get the resisted damage Index: scripts/globals/spells/bio_iii.lua =================================================================== --- scripts/globals/spells/bio_iii.lua (revision 2121) +++ scripts/globals/spells/bio_iii.lua (working copy) @@ -16,6 +16,15 @@ --calculate raw damage basedmg = caster:getSkillLevel(DARK_MAGIC_SKILL) / 4; dmg = calculateMagicDamage(basedmg,3,caster,spell,target,DARK_MAGIC_SKILL,MOD_INT,false); + + -- Softcaps at 32, should always do at least 1 + if(dmg > 32) then + dmg = 32; + end + if(dmg < 1) then + dmg = 1; + end + --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),DARK_MAGIC_SKILL,1.0); --get the resisted damage Index: scripts/globals/spells/blaze_spikes.lua =================================================================== --- scripts/globals/spells/blaze_spikes.lua (revision 2121) +++ scripts/globals/spells/blaze_spikes.lua (working copy) @@ -10,9 +10,10 @@ function onSpellCast(caster,target,spell) duration = 180; + power = 8; if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then duration = duration * 3; end target:delStatusEffect(EFFECT_BLAZE_SPIKES); - target:addStatusEffect(EFFECT_BLAZE_SPIKES,0,0,duration); + target:addStatusEffect(EFFECT_BLAZE_SPIKES,power,0,duration); end; Index: scripts/globals/spells/dia.lua =================================================================== --- scripts/globals/spells/dia.lua (revision 2121) +++ scripts/globals/spells/dia.lua (working copy) @@ -16,9 +16,15 @@ --calculate raw damage basedmg = caster:getSkillLevel(ENFEEBLING_MAGIC_SKILL) / 4; dmg = calculateMagicDamage(basedmg,1,caster,spell,target,ENFEEBLING_MAGIC_SKILL,MOD_INT,false); - if dmg > 2 then + + -- Softcaps at 2, should always do at least 1 + if(dmg > 2) then dmg = 2; end + if(dmg < 1) then + dmg = 1; + end + --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),ENFEEBLING_MAGIC_SKILL,1.0); --get the resisted damage Index: scripts/globals/spells/dia_ii.lua =================================================================== --- scripts/globals/spells/dia_ii.lua (revision 2121) +++ scripts/globals/spells/dia_ii.lua (working copy) @@ -16,9 +16,15 @@ --calculate raw damage basedmg = caster:getSkillLevel(ENFEEBLING_MAGIC_SKILL) / 4; dmg = calculateMagicDamage(basedmg,3,caster,spell,target,ENFEEBLING_MAGIC_SKILL,MOD_INT,false); - if dmg > 8 then + + -- Softcaps at 8, should always do at least 1 + if(dmg > 8) then dmg = 8; end + if(dmg < 1) then + dmg = 1; + end + --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),ENFEEBLING_MAGIC_SKILL,1.0); --get the resisted damage Index: scripts/globals/spells/dia_iii.lua =================================================================== --- scripts/globals/spells/dia_iii.lua (revision 2121) +++ scripts/globals/spells/dia_iii.lua (working copy) @@ -16,6 +16,15 @@ --calculate raw damage basedmg = caster:getSkillLevel(ENFEEBLING_MAGIC_SKILL) / 4; dmg = calculateMagicDamage(basedmg,5,caster,spell,target,ENFEEBLING_MAGIC_SKILL,MOD_INT,false); + + -- Softcaps at 32, should always do at least 1 + if(dmg > 32) then + dmg = 32; + end + if(dmg < 1) then + dmg = 1; + end + --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),ENFEEBLING_MAGIC_SKILL,1.0); --get the resisted damage Index: scripts/globals/spells/dispel.lua =================================================================== --- scripts/globals/spells/dispel.lua (revision 2121) +++ scripts/globals/spells/dispel.lua (working copy) @@ -9,4 +9,5 @@ function onSpellCast(caster,target,spell) target:dispelStatusEffect(); + target:updateEnmity(caster,380,1); end; Index: scripts/globals/spells/dokumori_ichi.lua =================================================================== --- scripts/globals/spells/dokumori_ichi.lua (revision 0) +++ scripts/globals/spells/dokumori_ichi.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Dokumori: Ichi +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + if(target:hasStatusEffect(EFFECT_POISON) == false) then -- This stops Poison from being stacked, since poison doesn't over write itself we can't use delete effect. + duration = 30; + res = target:getMod(MOD_POISONRES); + if(res > 0) then + res = 3 * res; + duration = duration - res; + end + + cLvl = caster:getMainLvl(); -- This is a temporary fix that allows the spells damage to vary on Lvl since magic skill is broken + if(cLvl < 18) then + power = 1; + end + + if(cLvl >= 18 and cLvl < 38) then + power = 2; + end + if(cLvl >= 38 and cLvl < 56) then + power = 3; + end + if(cLvl >= 56) then + power = 4; + end + + target:addStatusEffect(EFFECT_POISON,power,3,duration); + end + return 0; +end; \ No newline at end of file Index: scripts/globals/spells/dokumori_ni.lua =================================================================== --- scripts/globals/spells/dokumori_ni.lua (revision 0) +++ scripts/globals/spells/dokumori_ni.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Dokumori: Ni +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + if(target:hasStatusEffect(EFFECT_POISON) == false) then -- This stops Poison from being stacked, since poison doesn't over write itself we can't use delete effect. + duration = 60; + res = target:getMod(MOD_POISONRES); + if(res > 0) then + res = 3 * res; + duration = duration - res; + end + + cLvl = caster:getMainLvl(); -- This is a temporary fix that allows the spells damage to vary on Lvl since magic skill is broken + if(cLvl < 18) then + power = 4; + end + + if(cLvl >= 18 and cLvl < 38) then + power = 8; + end + if(cLvl >= 38 and cLvl < 56) then + power = 16; + end + if(cLvl >= 56) then + power = 24; + end + + target:addStatusEffect(EFFECT_POISON,power,3,duration); + end + return 0; +end; \ No newline at end of file Index: scripts/globals/spells/dokumori_san.lua =================================================================== --- scripts/globals/spells/dokumori_san.lua (revision 0) +++ scripts/globals/spells/dokumori_san.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Dokumori: San +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + if(target:hasStatusEffect(EFFECT_POISON) == false) then -- This stops Poison from being stacked, since poison doesn't over write itself we can't use delete effect. + duration = 60; + res = target:getMod(MOD_POISONRES); + if(res > 0) then + res = 3 * res; + duration = duration - res; + end + + cLvl = caster:getMainLvl(); -- This is a temporary fix that allows the spells damage to vary on Lvl since magic skill is broken + if(cLvl < 18) then + power = 16; + end + + if(cLvl >= 18 and cLvl < 38) then + power = 24; + end + if(cLvl >= 38 and cLvl < 56) then + power = 36; + end + if(cLvl >= 56) then + power = 42; + end + + target:addStatusEffect(EFFECT_POISON,power,3,duration); + end + return 0; +end; \ No newline at end of file Index: scripts/globals/spells/drain.lua =================================================================== --- scripts/globals/spells/drain.lua (revision 2121) +++ scripts/globals/spells/drain.lua (working copy) @@ -5,6 +5,7 @@ require("scripts/globals/magic"); require("scripts/globals/status"); +require("scripts/globals/settings"); ----------------------------------------- -- OnSpellCast @@ -13,7 +14,7 @@ function onSpellCast(caster,target,spell) --calculate raw damage (unknown function -> only dark skill though) - using http://www.bluegartr.com/threads/44518-Drain-Calculations -- also have small constant to account for 0 dark skill - dmg = 10 + 1.035 * (caster:getSkillLevel(DARK_MAGIC_SKILL) + caster:getMod(79 + DARK_MAGIC_SKILL)); + dmg = 10 + (1.035 * (caster:getSkillLevel(DARK_MAGIC_SKILL)) + caster:getMod(79 + DARK_MAGIC_SKILL)); --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),DARK_MAGIC_SKILL,1.0); --get the resisted damage @@ -23,8 +24,14 @@ --add in target adjustment dmg = adjustForTarget(target,dmg); --add in final adjustments + if (dmg > (caster:getSkillLevel(DARK_MAGIC_SKILL) + 20)) then + dmg = (caster:getSkillLevel(DARK_MAGIC_SKILL) + 20); + end --TODO: CHECK FOR UNDEAD! dmg = finalMagicAdjustments(caster,target,spell,dmg); + + dmg = (dmg * DRAIN_POWER); + caster:addHP(dmg); return dmg; end; Index: scripts/globals/spells/drain_ii.lua =================================================================== --- scripts/globals/spells/drain_ii.lua (revision 2121) +++ scripts/globals/spells/drain_ii.lua (working copy) @@ -5,6 +5,7 @@ require("scripts/globals/magic"); require("scripts/globals/status"); +require("scripts/globals/settings"); ----------------------------------------- -- OnSpellCast @@ -13,7 +14,7 @@ function onSpellCast(caster,target,spell) --calculate raw damage (unknown function -> only dark skill though) - using http://www.bluegartr.com/threads/44518-Drain-Calculations -- also have small constant to account for 0 dark skill - dmg = 20 + 1.236 * (caster:getSkillLevel(DARK_MAGIC_SKILL) + caster:getMod(79 + DARK_MAGIC_SKILL)); + dmg = 20 + (1.236 * (caster:getSkillLevel(DARK_MAGIC_SKILL)) + caster:getMod(79 + DARK_MAGIC_SKILL)); --get resist multiplier (1x if no resist) resist = applyResistance(caster,spell,target,caster:getMod(MOD_INT)-target:getMod(MOD_INT),DARK_MAGIC_SKILL,1.0); --get the resisted damage @@ -23,8 +24,14 @@ --add in target adjustment dmg = adjustForTarget(target,dmg); --add in final adjustments + if (dmg > (caster:getSkillLevel(DARK_MAGIC_SKILL) + 85)) then + dmg = (caster:getSkillLevel(DARK_MAGIC_SKILL) + 85); + end --TODO: CHECK FOR UNDEAD! dmg = finalMagicAdjustments(caster,target,spell,dmg); + + dmg = (dmg * DRAIN_POWER); + caster:addHP(dmg); spell:setMsg(227); --change msg to 'xxx hp drained from the yyyy.' return dmg; Index: scripts/globals/spells/dread_spikes.lua =================================================================== --- scripts/globals/spells/dread_spikes.lua (revision 0) +++ scripts/globals/spells/dread_spikes.lua (working copy) @@ -0,0 +1,19 @@ +----------------------------------------- +-- Spell: Dread Spikes +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = 180; + power = 8; + if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then + duration = duration * 3; + end + target:delStatusEffect(EFFECT_DREAD_SPIKES); + target:addStatusEffect(EFFECT_DREAD_SPIKES,power,0,duration); +end; Index: scripts/globals/spells/erase.lua =================================================================== --- scripts/globals/spells/erase.lua (revision 2121) +++ scripts/globals/spells/erase.lua (working copy) @@ -9,4 +9,5 @@ function onSpellCast(caster,target,spell) target:eraseStatusEffect(); + target:updateEnmity(caster,380,1); end; Index: scripts/globals/spells/gravity.lua =================================================================== --- scripts/globals/spells/gravity.lua (revision 0) +++ scripts/globals/spells/gravity.lua (working copy) @@ -0,0 +1,36 @@ +----------------------------------------- +-- Spell: Gravity +-- Spell accuracy is most highly affected by Enfeebling Magic Skill, Magic Accuracy, and INT. +-- Weighs an enemy down and lowers its movement speed. +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + dINT = (caster:getStat(MOD_INT) - target:getStat(MOD_INT)); + bonus = AffinityBonus(caster,spell); + power = 20; + + power = power * -1; + duration = 120 * applyResistance(caster,spell,target,dINT,35,bonus); + + if (duration < 30) then duration = 30 end + + if (resist > 0.4) then + target:delStatusEffect(EFFECT_WEIGHT); + target:addStatusEffect(EFFECT_WEIGHT,power,0,duration); + spell:setMsg(237); + else + spell:setMsg(85); + end + + target:updateEnmity(caster,220,1); + + return EFFECT_WEIGHT; +end; \ No newline at end of file Index: scripts/globals/spells/gravity_ii.lua =================================================================== --- scripts/globals/spells/gravity_ii.lua (revision 0) +++ scripts/globals/spells/gravity_ii.lua (working copy) @@ -0,0 +1,37 @@ +----------------------------------------- +-- Spell: Gravity II +-- Spell accuracy is most highly affected by Enfeebling Magic Skill, Magic Accuracy, and INT. +-- Weighs an enemy down and lowers its movement speed. +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + dINT = (caster:getStat(MOD_INT) - target:getStat(MOD_INT)); + bonus = AffinityBonus(caster,spell); + power = 30; + + power = power * -1; + + duration = 120 * applyResistance(caster,spell,target,dINT,35,bonus); + + if (duration < 60) then duration = 60 end + + if (resist > 0.4) then + target:delStatusEffect(EFFECT_WEIGHT); + target:addStatusEffect(EFFECT_WEIGHT,power,0,duration); + spell:setMsg(237); + else + spell:setMsg(85); + end + + target:updateEnmity(caster,220,1); + + return EFFECT_WEIGHT; +end; \ No newline at end of file Index: scripts/globals/spells/hojo_san.lua =================================================================== --- scripts/globals/spells/hojo_san.lua (revision 0) +++ scripts/globals/spells/hojo_san.lua (working copy) @@ -0,0 +1,86 @@ +----------------------------------------- +-- Spell: Hojo: San +-- Spell accuracy is most highly affected by Ninjutsu Skill, Magic Accuracy, and INT. +-- Hojo's potency is calculated with the formula (150 + dINT*2)/1024, and caps at 300/1024 (~29.3%). +-- And INT of 75 is neccessary to reach the hardcap of Hojo. +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + dINT = (caster:getStat(MOD_INT) - target:getStat(MOD_INT)); + staff = StaffBonus(caster,spell); + + --Power. + power = math.floor((100 / 1024) * (150 + dINT * 2)) + if(power > 50) then + power = 50; + end + + power = power * -1; + + --Duration, including resistance. + duration = 120 * applyResistance(caster,spell,target,dINT,43,staff); + + if(100 * math.random() >= target:getMod(MOD_SLOWRES)) then + if(duration >= 60) then --Do it! + --Try to erase a weaker slow or haste. + slow = target:getStatusEffect(EFFECT_SLOW); + haste = target:getStatusEffect(EFFECT_HASTE); + if(slow ~= nil) then + if(slow:getPower() > power) then + target:delStatusEffect(EFFECT_SLOW); + target:addStatusEffect(EFFECT_SLOW,power,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + else + spell:setMsg(75); + end + elseif(haste ~= nil) then + if(haste:getPower() < (-1 * power)) then + target:delStatusEffect(EFFECT_HASTE); + target:addStatusEffect(EFFECT_SLOW,power,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + else + spell:setMsg(75); + end + else + target:addStatusEffect(EFFECT_SLOW,1,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + end + else +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + else +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + + target:updateEnmity(caster,320,1); + + return EFFECT_SLOW; +end; \ No newline at end of file Index: scripts/globals/spells/ice_spikes.lua =================================================================== --- scripts/globals/spells/ice_spikes.lua (revision 2121) +++ scripts/globals/spells/ice_spikes.lua (working copy) @@ -10,10 +10,10 @@ function onSpellCast(caster,target,spell) duration = 180; + power = 8; if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then duration = duration * 3; end - - target:delStatusEffect(EFFECT_ICE_SPIKES); - target:addStatusEffect(EFFECT_ICE_SPIKES,0,0,duration); + target:delStatusEffect(EFFECT_ICE_SPIKES); + target:addStatusEffect(EFFECT_ICE_SPIKES,power,0,duration); end; Index: scripts/globals/spells/jubaku_ichi.lua =================================================================== --- scripts/globals/spells/jubaku_ichi.lua (revision 0) +++ scripts/globals/spells/jubaku_ichi.lua (working copy) @@ -0,0 +1,78 @@ +----------------------------------------- +-- Spell: Jubaku: Ichi +-- Spell accuracy is most highly affected by Enfeebling Magic Skill, Magic Accuracy, and INT. +-- Paralyze's potency is calculated with the formula (150 + dINT*2)/1024, and caps at 300/1024 (~29.3%). +-- And INT of 75 is neccessary to reach the hardcap of Paralyze. +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + -- Calculate duration. + -- Generates rand# from 0.2~1.2 which is then x100 to form the duration (20-120). + local double duration = (0.2 + math.random()) * 100; + + -- Grabbing variables for paralyze potency + mLVL = caster:getMainLvl(); + pINT = caster:getStat(MOD_INT); + mINT = target:getStat(MOD_INT); + + dINT = (pINT - mINT); + multiplier = 150 / mLVL; + + -- Calculate potency. + potency = (multiplier * (pINT + dINT)) / 10; + --printf("Duration : %u",duration); + --printf("Potency : %u",potency); + + --Try to resist entirely. + if(math.random(0,100) >= target:getMod(MOD_PARALYZERES)) then + --See ifeffect is already on.... + if(target:getStatusEffect(EFFECT_PARALYSIS) ~= nil) then --effect already on, do nothing + spell:setMsg(75); + else + staff = StaffBonus(caster, spell); + resist = applyResistance(caster,spell,target,dINT,43,staff); + printf("resist : %u",resist); + if(resist == 1) then -- Full hit, no duration penalty + target:addStatusEffect(EFFECT_PARALYSIS,potency,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + elseif(resist == 0.5) then -- Half duration + duration = duration / 2; + target:addStatusEffect(EFFECT_PARALYSIS,potency,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + else -- resist entirely. +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + end + else -- resist entirely. +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + + target:updateEnmity(caster,320,1); + + return EFFECT_PARALYSIS; + +end; \ No newline at end of file Index: scripts/globals/spells/jubaku_ni.lua =================================================================== --- scripts/globals/spells/jubaku_ni.lua (revision 0) +++ scripts/globals/spells/jubaku_ni.lua (working copy) @@ -0,0 +1,78 @@ +----------------------------------------- +-- Spell: Jubaku: Ni +-- Spell accuracy is most highly affected by Enfeebling Magic Skill, Magic Accuracy, and INT. +-- Slow's potency is calculated with the formula (150 + dINT*2)/1024, and caps at 300/1024 (~29.3%). +-- And INT of 75 is neccessary to reach the hardcap of Paralyze. +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + -- Calculate duration. + -- Generates rand# from 0.2~1.2 which is then x100 to form the duration (20-120). + local double duration = (0.2 + math.random()) * 100; + + -- Grabbing variables for paralyze potency + mLVL = caster:getMainLvl(); + pINT = caster:getStat(MOD_INT); + mINT = target:getStat(MOD_INT); + + dINT = (pINT - mINT); + multiplier = 150 / mLVL; + + -- Calculate potency. + potency = (multiplier * (pINT + dINT)) / 6; + --printf("Duration : %u",duration); + --printf("Potency : %u",potency); + + --Try to resist entirely. + if(math.random(0,100) >= target:getMod(MOD_PARALYZERES)) then + --See ifeffect is already on.... + if(target:getStatusEffect(EFFECT_PARALYSIS) ~= nil) then --effect already on, do nothing + spell:setMsg(75); + else + staff = StaffBonus(caster, spell); + resist = applyResistance(caster,spell,target,dINT,43,staff); + printf("resist : %u",resist); + if(resist == 1) then -- Full hit, no duration penalty + target:addStatusEffect(EFFECT_PARALYSIS,potency,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + elseif(resist == 0.5) then -- Half duration + duration = duration / 2; + target:addStatusEffect(EFFECT_PARALYSIS,potency,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + else -- resist entirely. +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + end + else -- resist entirely. +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + + target:updateEnmity(caster,320,1); + + return EFFECT_PARALYSIS; + +end; \ No newline at end of file Index: scripts/globals/spells/jubaku_san.lua =================================================================== --- scripts/globals/spells/jubaku_san.lua (revision 0) +++ scripts/globals/spells/jubaku_san.lua (working copy) @@ -0,0 +1,78 @@ +----------------------------------------- +-- Spell: Jubaku: San +-- Spell accuracy is most highly affected by Enfeebling Magic Skill, Magic Accuracy, and INT. +-- Slow's potency is calculated with the formula (150 + dINT*2)/1024, and caps at 300/1024 (~29.3%). +-- And INT of 75 is neccessary to reach the hardcap of Paralyze. +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + -- Calculate duration. + -- Generates rand# from 0.2~1.2 which is then x100 to form the duration (20-120). + local double duration = (0.2 + math.random()) * 100; + + -- Grabbing variables for paralyze potency + mLVL = caster:getMainLvl(); + pINT = caster:getStat(MOD_INT); + mINT = target:getStat(MOD_INT); + + dINT = (pINT - mINT); + multiplier = 150 / mLVL; + + -- Calculate potency. + potency = (multiplier * (pINT + dINT)) / 4; + --printf("Duration : %u",duration); + --printf("Potency : %u",potency); + + --Try to resist entirely. + if(math.random(0,100) >= target:getMod(MOD_PARALYZERES)) then + --See ifeffect is already on.... + if(target:getStatusEffect(EFFECT_PARALYSIS) ~= nil) then --effect already on, do nothing + spell:setMsg(75); + else + staff = StaffBonus(caster, spell); + resist = applyResistance(caster,spell,target,dINT,43,staff); + printf("resist : %u",resist); + if(resist == 1) then -- Full hit, no duration penalty + target:addStatusEffect(EFFECT_PARALYSIS,potency,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + elseif(resist == 0.5) then -- Half duration + duration = duration / 2; + target:addStatusEffect(EFFECT_PARALYSIS,potency,0,duration); +-- if(spell:isAOE() == false) then + spell:setMsg(237); +-- else +-- spell:setMsg(267); +-- end + else -- resist entirely. +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + end + else -- resist entirely. +-- if(spell:isAOE() == false) then + spell:setMsg(85); +-- else +-- spell:setMsg(284); +-- end + end + + target:updateEnmity(caster,320,1); + + return EFFECT_PARALYSIS; + +end; \ No newline at end of file Index: scripts/globals/spells/kakka_ichi.lua =================================================================== --- scripts/globals/spells/kakka_ichi.lua (revision 0) +++ scripts/globals/spells/kakka_ichi.lua (working copy) @@ -0,0 +1,19 @@ +----------------------------------------- +-- Spell: Kakka: Ichi +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + target:delStatusEffect(EFFECT_STORE_TP); + effect = target:getStatusEffect(EFFECT_STORE_TP); + + target:addStatusEffect(EFFECT_STORE_TP,EFFECT_STORE_TP,10,0,180); + spell:setMsg(230); + + return EFFECT_STORE_TP; +end; \ No newline at end of file Index: scripts/globals/spells/kurayami_san.lua =================================================================== --- scripts/globals/spells/kurayami_san.lua (revision 0) +++ scripts/globals/spells/kurayami_san.lua (working copy) @@ -0,0 +1,70 @@ +----------------------------------------- +-- Spell: Kurayami: Ichi +----------------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/magic"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + -- Pull base stats. + dINT = (caster:getStat(MOD_INT) - target:getStat(MOD_INT)); + staff = StaffBonus(caster,spell); + + -- Base power. May need more research. + power = math.floor((dINT + 60) / 4); + if(power < 15) then + power = 15; + end + + -- Duration, including resistance. Unconfirmed. + duration = 180 * applyResistance(caster,spell,target,dINT,43,staff); + + if(100 * math.random() >= target:getMod(MOD_BLINDRES)) then + if(duration >= 90) then --Do it! + -- Try to erase a weaker blind. + blind = target:getStatusEffect(EFFECT_BLINDNESS) + if(blind ~= nil) then + if(blind:getPower() < power) then + target:delStatusEffect(EFFECT_BLINDNESS); + target:addStatusEffect(EFFECT_BLINDNESS,power,0,duration); +-- if(spell:isAOE() == false) then +-- spell:setMsg(237); +-- else + spell:setMsg(267); +-- end + else + spell:setMsg(75); + end + else + target:addStatusEffect(EFFECT_BLINDNESS,power,0,duration); +-- if(spell:isAOE() == false) then +-- spell:setMsg(237); +-- else + spell:setMsg(267); +-- end + end + else +-- if(spell:isAOE() == false) then +-- spell:setMsg(85); +-- else + spell:setMsg(284); +-- end + end + else +-- if(spell:isAOE() == false) then +-- spell:setMsg(85); +-- else + spell:setMsg(284); +-- end + end + + target:updateEnmity(caster,320,1); + + return EFFECT_BLINDNESS; + +end; \ No newline at end of file Index: scripts/globals/spells/migawari_ichi.lua =================================================================== --- scripts/globals/spells/migawari_ichi.lua (revision 0) +++ scripts/globals/spells/migawari_ichi.lua (working copy) @@ -0,0 +1,19 @@ +----------------------------------------- +-- Spell: Migawari: Ichi +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + target:delStatusEffect(EFFECT_MIGAWARI); + effect = target:getStatusEffect(EFFECT_MIGAWARI); + + target:addStatusEffect(EFFECT_MIGAWARI,EFFECT_MIGAWARI,0,0,60); + spell:setMsg(230); + + return EFFECT_MIGAWARI; +end; \ No newline at end of file Index: scripts/globals/spells/myoshui_ichi.lua =================================================================== --- scripts/globals/spells/myoshui_ichi.lua (revision 0) +++ scripts/globals/spells/myoshui_ichi.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Myoshui: Ichi +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + target:delStatusEffect(EFFECT_SUBTLE_BLOW_PLUS); + effect = target:getStatusEffect(EFFECT_SUBTLE_BLOW_PLUS); + + -- The power is unknown. + target:addStatusEffect(EFFECT_SUBTLE_BLOW_PLUS,EFFECT_SUBTLE_BLOW_PLUS,10,0,180); + spell:setMsg(230); + + return EFFECT_SUBTLE_BLOW_PLUS; +end; \ No newline at end of file Index: scripts/globals/spells/poison_ii.lua =================================================================== --- scripts/globals/spells/poison_ii.lua (revision 0) +++ scripts/globals/spells/poison_ii.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Poison II +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + if(target:hasStatusEffect(EFFECT_POISON) == false) then -- This stops Poison from being stacked, since poison doesn't over write itself we can't use delete effect. + duration = 60; + res = target:getMod(MOD_POISONRES); + if(res > 0) then + res = 3 * res; + duration = duration - res; + end + + cLvl = caster:getMainLvl(); -- This is a temporary fix that allows the spells damage to vary on Lvl since magic skill is broken + if(cLvl < 18) then + power = 4; + end + + if(cLvl >= 18 and cLvl < 38) then + power = 8; + end + if(cLvl >= 38 and cLvl < 56) then + power = 16; + end + if(cLvl >= 56) then + power = 24; + end + + target:addStatusEffect(EFFECT_POISON,power,3,duration); + end + return 0; +end; \ No newline at end of file Index: scripts/globals/spells/poisonga.lua =================================================================== --- scripts/globals/spells/poisonga.lua (revision 0) +++ scripts/globals/spells/poisonga.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Poisonga +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + if(target:hasStatusEffect(EFFECT_POISON) == false) then -- This stops Poison from being stacked, since poison doesn't over write itself we can't use delete effect. + duration = 30; + res = target:getMod(MOD_POISONRES); + if(res > 0) then + res = 3 * res; + duration = duration - res; + end + + cLvl = caster:getMainLvl(); -- This is a temporary fix that allows the spells damage to vary on Lvl since magic skill is broken + if(cLvl < 18) then + power = 1; + end + + if(cLvl >= 18 and cLvl < 38) then + power = 2; + end + if(cLvl >= 38 and cLvl < 56) then + power = 3; + end + if(cLvl >= 56) then + power = 4; + end + + target:addStatusEffect(EFFECT_POISON,power,3,duration); + end + return 0; +end; \ No newline at end of file Index: scripts/globals/spells/poisonga_ii.lua =================================================================== --- scripts/globals/spells/poisonga_ii.lua (revision 0) +++ scripts/globals/spells/poisonga_ii.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------------- +-- Spell: Poisonga II +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + if(target:hasStatusEffect(EFFECT_POISON) == false) then -- This stops Poison from being stacked, since poison doesn't over write itself we can't use delete effect. + duration = 60; + res = target:getMod(MOD_POISONRES); + if(res > 0) then + res = 3 * res; + duration = duration - res; + end + + cLvl = caster:getMainLvl(); -- This is a temporary fix that allows the spells damage to vary on Lvl since magic skill is broken + if(cLvl < 18) then + power = 4; + end + + if(cLvl >= 18 and cLvl < 38) then + power = 8; + end + if(cLvl >= 38 and cLvl < 56) then + power = 16; + end + if(cLvl >= 56) then + power = 24; + end + + target:addStatusEffect(EFFECT_POISON,power,3,duration); + end + return 0; +end; \ No newline at end of file Index: scripts/globals/spells/refresh_ii.lua =================================================================== --- scripts/globals/spells/refresh_ii.lua (revision 0) +++ scripts/globals/spells/refresh_ii.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------------- +-- Spell: Refresh II +-- Gradually restores target party member's MP +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + + + mp = 6; + duration = 180; + + + if (target:getMainLvl() < 41) then + duration = duration * target:getMainLvl() / 41; + end + + target:delStatusEffect(EFFECT_REFRESH); + target:addStatusEffect(EFFECT_REFRESH,mp,3,duration); + return 0; + +end; \ No newline at end of file Index: scripts/globals/spells/repose.lua =================================================================== --- scripts/globals/spells/repose.lua (revision 0) +++ scripts/globals/spells/repose.lua (working copy) @@ -0,0 +1,33 @@ +----------------------------------------- +-- Spell: Repose (Unoffical) +----------------------------------------- +require("scripts/globals/status"); +require("scripts/globals/magic"); +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + duration = 60; + staff = StaffBonus(caster, spell); + pINT = caster:getStat(MOD_INT); + mINT = target:getStat(MOD_INT); + dINT = (pINT - mINT); + resm = applyResistance(caster,spell,target,dINT,37,staff); + if(resm < 0.5) then + spell:setMsg(75); + --TODO: Set resist msg + --return 0; + end + + if(target:hasStatusEffect(EFFECT_SLEEP_II) or target:hasStatusEffect(EFFECT_SLEEP_I)) then + --TODO: No effect + spell:setMsg(85); + else + spell:setMsg(237); + target:addStatusEffect(EFFECT_SLEEP_I,1,0,duration); + -- print ("slept!"); + end + target:updateEnmity(caster,320,1); + return EFFECT_SLEEP_I; +end; \ No newline at end of file Index: scripts/globals/spells/shock_spikes.lua =================================================================== --- scripts/globals/spells/shock_spikes.lua (revision 2121) +++ scripts/globals/spells/shock_spikes.lua (working copy) @@ -10,9 +10,10 @@ function onSpellCast(caster,target,spell) duration = 180; + power = 8; if (caster:hasStatusEffect(EFFECT_COMPOSURE) == true and caster:getID() == target:getID()) then duration = duration * 3; end target:delStatusEffect(EFFECT_SHOCK_SPIKES); - target:addStatusEffect(EFFECT_SHOCK_SPIKES,0,0,duration); + target:addStatusEffect(EFFECT_SHOCK_SPIKES,power,0,duration); end; Index: scripts/globals/spells/yurin_ichi.lua =================================================================== --- scripts/globals/spells/yurin_ichi.lua (revision 0) +++ scripts/globals/spells/yurin_ichi.lua (working copy) @@ -0,0 +1,20 @@ +----------------------------------------- +-- Spell: Yurin: Ichi +----------------------------------------- + +require("scripts/globals/status"); + +----------------------------------------- +-- OnSpellCast +----------------------------------------- + +function onSpellCast(caster,target,spell) + target:delStatusEffect(EFFECT_INHIBIT_TP); + effect = target:getStatusEffect(EFFECT_INHIBIT_TP); + + -- The power is unknown. + target:addStatusEffect(EFFECT_INHIBIT_TP,EFFECT_INHIBIT_TP,10,0,180); + spell:setMsg(230); + + return EFFECT_INHIBIT_TP; +end; \ No newline at end of file Index: scripts/globals/teleports.lua =================================================================== --- scripts/globals/teleports.lua (revision 2121) +++ scripts/globals/teleports.lua (working copy) @@ -293,6 +293,56 @@ end; end; +function toMaw(player, option) + if (option == 1) then -- Batallia Downs [S] + player:setPos(-48, 0, 437, 52, 0x54); + elseif (option == 2) then -- Batallia Downs + player:setPos(-49, 0, 435, 1, 0x69); + elseif (option == 3) then -- Rolanberry Fields [S] + player:setPos(-190, -8, 363, 11, 0x5b); + elseif (option == 4) then -- Rolanberry Fields + player:setPos(-193, 8, 360, 0, 0x6e); + elseif (option == 5) then -- Sauromugue Champaign [S] + player:setPos(372, 9, -228, 27, 0x62); + elseif (option == 6) then -- Sauromugue Champaign + player:setPos(370, 8, -228, 0, 0x78); + elseif (option == 7) then -- West Sarutabaruta [S] + player:setPos(0, 0, -164, 29, 0x5f); + elseif (option == 8) then -- West Sarutabaruta + player:setPos(0, 0, -164, 29, 0x73); + elseif (option == 9) then -- East Ronfaure [S] + player:setPos(320, -60, 500, 79, 0x51); + elseif (option == 10) then -- East Ronfaure + player:setPos(320, -60, 500, 79, 0x65); + elseif (option == 11) then -- North Gustaberg [S] + player:setPos(469, 0, 479, 254, 0x58); + elseif (option == 12) then -- North Gustaberg + player:setPos(469, 0, 479, 254, 0x6A); + --elseif (option == 13) then -- Jugner Forest [S] + -- player:setPos(); + --elseif (option == 14) then -- Jugner Forest + -- player:setPos(); + --elseif (option == 15) then -- Pashhow Marshlands [S] + -- player:setPos(); + --elseif (option == 16) then -- Pashhow Marshlands + -- player:setPos(); + --elseif (option == 17) then -- Meriphataud Mountains [S] + -- player:setPos(); + --elseif (option == 18) then -- Meriphataud Mountains + -- player:setPos(); + -- Abyessa Maws + --Tahrongi Canyon (H-12) + --Konschtat Highlands (I-12) + --La Theine Plateau (E-4) + --Valkurm Dunes (I-9) + --Jugner Forest (J-8) + --Buburimu Peninsula (F-7) + --South Gustaberg (J-10) + --North Gustaberg (G-6) + --Xarcabard (H-8) + end; +end; + function recallJugner(player) player:setPos(-122.862, 0, -163.154, 192, 0x52); -- {R} end; Index: scripts/globals/weaponskills.lua =================================================================== --- scripts/globals/weaponskills.lua (revision 2121) +++ scripts/globals/weaponskills.lua (working copy) @@ -158,6 +158,28 @@ end attacker:delHP((tpHitsLanded+extraHitsLanded)*percent*attacker:getHP()); end + + mainEquip = attacker:getEquipID(SLOT_MAIN); + + -- WSNM + if(mainEquip == 16735 -- Axe + or mainEquip == 16793 -- Scythe + or mainEquip == 16892 -- Spear + or mainEquip == 16952 -- Sword + or mainEquip == 17456 -- Club + or mainEquip == 17507 -- Knuckles + or mainEquip == 17527 -- Pole + or mainEquip == 17616 -- Dagger + or mainEquip == 17654 -- Sapara + or mainEquip == 17773 -- Kodachi + or mainEquip == 17815 -- Tachi + or mainEquip == 17933) then -- Pick + local WSNMHits = attacker:getVar("WSNMHits"); + if(WSNMHits < 300 and target:checkBaseExp()) then + attacker:setVar("WSNMHits", WSNMHits + 1); + end + end + return finaldmg, tpHitsLanded, extraHitsLanded; end; @@ -553,6 +575,16 @@ end --print("Landed " .. hitslanded .. "/" .. numHits .. " hits with hitrate " .. hitrate .. "!"); + mainEquip = attacker:getEquipID(SLOT_MAIN); + -- WSNM + if(mainEquip == 18144 -- Bow + or mainEquip == 18146) then -- Gun + local WSNMHits = attacker:getVar("WSNMHits"); + if(WSNMHits < 300 and target:checkBaseExp()) then + attacker:setVar("WSNMHits", WSNMHits + 1); + end + end + return finaldmg, tpHitsLanded, extraHitsLanded; end; Index: scripts/globals/weaponskills/tachi_goten.lua =================================================================== --- scripts/globals/weaponskills/tachi_goten.lua (revision 0) +++ scripts/globals/weaponskills/tachi_goten.lua (working copy) @@ -0,0 +1,33 @@ +----------------------------------- +-- Tachi Goten +-- Great Katana weapon skill +-- Skill Level: 70 +-- Deals lightning elemental damage to enemy. Damage varies with TP. +-- Will stack with Sneak Attack. +-- Aligned with the Light Gorget / Thunder Gorget. +-- Aligned with the Light Belt / Thunder Belt. +-- Element: Thunder +-- Modifiers: STR:30% +-- 100%TP 200%TP 300%TP +-- 1.00 1.00 1.00 +----------------------------------- + +require("scripts/globals/status"); +require("scripts/globals/settings"); +require("scripts/globals/weaponskills"); +----------------------------------- + +function OnUseWeaponSkill(player, target, wsID) + + numHits = 1; + ftp100 = 1; ftp200 = 1; ftp300 = 1; + str_wsc = 0.5; dex_wsc = 0.0; vit_wsc = 0.0; agi_wsc = 0.0; int_wsc = 0.0; mnd_wsc = 0.0; chr_wsc = 0.0; + crit100 = 0.0; crit200 = 0.0; crit300 = 0.0; + canCrit = false; + acc100 = 0.0; acc200= 0.0; acc300= 0.0; + atkmulti = 1; + damage = doPhysicalWeaponskill(player,target,numHits,str_wsc,dex_wsc,vit_wsc,agi_wsc,int_wsc,mnd_wsc,chr_wsc,canCrit,crit100,crit200,crit300,acc100,acc200,acc300,atkmulti); + + return damage * WEAPON_SKILL_POWER; + +end Index: scripts/zones/Abdhaljs_Isle-Purgonorgo/npcs/Herald.lua =================================================================== --- scripts/zones/Abdhaljs_Isle-Purgonorgo/npcs/Herald.lua (revision 0) +++ scripts/zones/Abdhaljs_Isle-Purgonorgo/npcs/Herald.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Area: Abdhaljs Isle-Purgonorgo +-- NPC: Herald +-- Type: Ballista/Brenner Referee +-- @zone: 44 +-- @pos: (H-7) +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0000); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua =================================================================== --- scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua (revision 2121) +++ scripts/zones/Abyssea-Empyreal_Paradox/Zone.lua (working copy) @@ -20,9 +20,12 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + --player:setPos(-495,0,483,205); -- BC Area + player:setPos(540,-500,-565,64); + end + return cs; end; ----------------------------------- Index: scripts/zones/Abyssea-Konschtat/npcs/Atma_Fabricant.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Atma_Fabricant.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Atma_Fabricant.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Atma Fabricant +-- Type: +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0886); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Cleades.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Cleades.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Cleades.lua (working copy) @@ -0,0 +1,6 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Cleades +-- Type: +----------------------------------- +-- Event IDs: 0x0109 0x010a 0x010b 0x010c 0x010d \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Echo_Hawk.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Echo_Hawk.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Echo_Hawk.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Echo Hawk +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x011f); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Flaco.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Flaco.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Flaco.lua (working copy) @@ -0,0 +1,6 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Flaco +-- Type: +----------------------------------- +-- Event IDs: 0x0119 0x011a 0x011b 0x011c 0x011d 0x011e \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Helga.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Helga.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Helga.lua (working copy) @@ -0,0 +1,7 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Helga +-- Type: +----------------------------------- +-- Event IDs: 0x010e 0x010f 0x0110 0x0111 0x0112 0x0113 +-- 0x0114 0x0115 0x0116 0x0117 0x0118 \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Ihsan.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Ihsan.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Ihsan.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Ihsan +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0120); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Naji.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Naji.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Naji.lua (working copy) @@ -0,0 +1,6 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Naji +-- Type: +----------------------------------- +-- Event IDs: 0x0127 \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Offa.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Offa.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Offa.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Offa +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0122); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Rashid.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Rashid.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Rashid.lua (working copy) @@ -0,0 +1,6 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Rashid +-- Type: Quest NPC +----------------------------------- +-- Event IDs: 0x0105 0x0106 0x0107 0x0108 \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Red_Canyon.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Red_Canyon.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Red_Canyon.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Red Canyon +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0123); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Romualdo.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Romualdo.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Romualdo.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Romualdo +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0125); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Silver_Owl.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Silver_Owl.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Silver_Owl.lua (working copy) @@ -0,0 +1,7 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Silver Owl +-- Type: Quest NPC +----------------------------------- +-- Quest Events: Offer 0x0100 During 0x0101 Complete 0x0102 +-- Events 0x0104 0x0105 \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Steel_Bones.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Steel_Bones.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Steel_Bones.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Steel Bones +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0121); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/npcs/Sugandhi.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/npcs/Sugandhi.lua (revision 0) +++ scripts/zones/Abyssea-Konschtat/npcs/Sugandhi.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Zone: Abyssea-Konschtat +-- NPC: Sugandhi +-- Type: General NPC +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0124); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Abyssea-Konschtat/Zone.lua =================================================================== --- scripts/zones/Abyssea-Konschtat/Zone.lua (revision 2121) +++ scripts/zones/Abyssea-Konschtat/Zone.lua (working copy) @@ -4,6 +4,13 @@ -- ----------------------------------- +-- Dev Research +-- EventID 0x0400-0x0405 aura of boundless rage +-- EventID 0x0800-0x0883 The treasure chest will disappear is 180 seconds menu. +-- EventID 0x0884 Conflux Teleport? +-- EventID 0x0885 DEBUG Menu + + require("scripts/globals/settings"); package.loaded["scripts/zones/Abyssea-Konschtat/TextIDs"] = nil; require("scripts/zones/Abyssea-Konschtat/TextIDs"); @@ -20,9 +27,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(147,-71,-838,134); + end + return cs; end; ----------------------------------- Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Abquhbah.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Abquhbah.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Abquhbah.lua (working copy) @@ -16,7 +16,11 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x00FE); + if(getMercenaryRank(player) > 0) then + player:startEvent(0x00FF); --Default Mercenary + else + player:startEvent(0x00FE); --Default + end end; ----------------------------------- Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Asrahd.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Asrahd.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Asrahd.lua (working copy) @@ -91,7 +91,7 @@ player:delPoint(IS,1000); elseif(option <= 2049) then -- player bought item item, price = getISPItem(option) - if(player:getFreeSlotCount(0) > 0) then + if(player:getFreeSlotsCount() > 0) then player:delPoint(IS,price); player:addItem(item); player:messageSpecial(ITEM_OBTAINED,item); Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Balakaf.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Balakaf.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Balakaf.lua (working copy) @@ -1,45 +1,37 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Balakaf --- Type: Standard NPC --- @zone: 50 --- @pos: 25.505 -6.999 126.478 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0203); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Balakaf +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); +artsAndCrafts_Balakaf = player:getVar("QUEST_ARTSANDCRAFTS_BALAKAF"); + + if (artsAndCrafts == QUEST_ACCEPTED and artsAndCrafts_Balakaf ~= 1) then + player:startEvent(0x0203); + else + player:startEvent(0x0221); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x0203) then + player:setVar("QUEST_ARTSANDCRAFTS_BALAKAF",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Bhoy_Yhupplo.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Bhoy_Yhupplo.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Bhoy_Yhupplo.lua (working copy) @@ -1,45 +1,153 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Bhoy Yhupplo --- Type: Assault Mission Giver --- @zone: 50 --- @pos: 127.474 0.161 -30.418 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x011b); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Bhoy Yhupplo (Ilrusi Atoll Assault NPC) +-- Get assault missions and item rewards +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + rank = getMercenaryRank(player); + ilrusi_assault_points = player:getPoint(8); -- points for this area + has_key_item = player:hasKeyItem(0x313); -- has Imperial Army I.D. Tag? + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- this is the number of the assault mission that the player + -- has signed up for. None = 0, {} = 1, etc. + + if (current_assault_mission > 0) then + has_assault_mission_already = 1; + else + has_assault_mission_already = 0; + end; + + if (rank == 0) then + player:startEvent(0x011B); + else + player:startEvent(0x0115,rank,has_key_item, ilrusi_assault_points,has_assault_mission_already, 2); + -- last param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip - since it's not known at this call time what the player is + -- going to select, this can't be set correctly ??? + end + +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +--onEventSelection Action-- +----------------------------------- +function onEventSelection(player,csid,option) + --print("onEventSelection") + --print("onEventSelection - CSID:",csid); + --print("onEventSelection - option ===",option); + + -- last_param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip + -- to check for equipment, + + -- here we would need something like last_param = player:canEquip(itemID) that returns the needed values. + -- could implement this on a case-by-case basis here, but would inefficient, since the item data that is + -- already in the database and would have to be duplicated here. + + player:updateEvent(0,0,0,0,2); --- last_param = 2 hardcoded for now. +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + --print("CSID:",csid); + --print("RESULT:",option); + + if (option >= 657) and (option <=801) then -- player signed up one of the missions: + + -- option = 657: Imperial Agent Rescue + -- option = 673: Preemptive Strike + -- option = 689: Sagelord Elimination + -- option = 705: Breaking Morale + -- option = 721: The Double Agent + -- option = 737: Imperial Treasure Retrieval + -- option = 753: Blitzkrieg + -- option = 769: Marids in the Mist + -- option = 785: Azure Ailments + -- option = 801: The Susanoo Shuffle + + player:setVar("ASSAULT_NUMBER", (option-641)/16); -- number of current mission signed up for, has to be used later at entry. + player:addKeyItem(0x2FE); -- give player ilrusi assault oders + player:messageSpecial(KEYITEM_OBTAINED,0x2FE); + player:delKeyItem(0x313); -- remove imperial army I.D. tag (can someone confirm that the key item is removed at this time??) + --print("Player got key item"); + end; + + if (option >= 16386) then -- player chose to buy an item + + --- rewards ----------------- + -- option=16386: Velocity Earring 3,000 + -- option=32770: Garrulous Ring 5,000 + -- option=49154: Grandiose Chain 8,000 + -- option=65538: Hurling Belt 10,000 + -- option=81922: Invigorating Cape 10,000 + -- option=98306: Imperial Kaman 15,000 + -- option=114690: Storm Zaghnal 15,000 + -- option=131074: Storm Fife 15,000 + -- option=147458: Yigit Turban 20,000 + -- option=163842: Amir Dirs 20,000 + -- option=180226: Pahluwan Khazagand 20,000 + ------------------------ + + cost = 0; + if (option == 16386) then + cost = 3000; + player:addItem(15974); + player:messageSpecial(ITEM_OBTAINED,15974); + elseif (option == 32770) then + cost = 5000; + player:addItem(15779); + player:messageSpecial(ITEM_OBTAINED,15779); + elseif (option == 49154) then + cost = 8000; + player:addItem(15525); + player:messageSpecial(ITEM_OBTAINED,15525); + elseif (option == 65538) then + cost = 10000; + player:addItem(15888); + player:messageSpecial(ITEM_OBTAINED,15888); + elseif (option == 81922) then + cost = 10000; + player:addItem(15494); + player:messageSpecial(ITEM_OBTAINED,15494); + elseif (option == 98306) then + cost = 15000; + player:addItem(18685); + player:messageSpecial(ITEM_OBTAINED,18685); + elseif (option == 114690) then + cost = 15000; + player:addItem(18065); + player:messageSpecial(ITEM_OBTAINED,18065); + elseif (option == 131074) then + cost = 15000; + player:addItem(17851); + player:messageSpecial(ITEM_OBTAINED,17851); + elseif (option == 147458) then + cost = 20000; + player:addItem(16064); + player:messageSpecial(ITEM_OBTAINED,16064); + elseif (option == 163842) then + cost = 20000; + player:addItem(15604); + player:messageSpecial(ITEM_OBTAINED,15604); + elseif (option == 180226) then + cost = 20000; + player:addItem(14530); + player:messageSpecial(ITEM_OBTAINED,14530); + end; + + player:delPoint(8, cost); + end; +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Dkhaaya.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Dkhaaya.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Dkhaaya.lua (working copy) @@ -1,45 +1,94 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Dkhaaya --- Type: Standard NPC --- @zone: 50 --- @pos: -73.212 -1 -5.842 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x007); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Dkhaaya +-- Starts and Finishes 'Olduum' Quest +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/quests"); + +function onTrigger(player,npc) + +oldummStatus = player:getQuestStatus(AHT_URHGAN,OLDUUM); +quest_status = player:getVar("OLDUUM_QUEST_STATUS"); +-- quest_status == 0 : quest hasn't been activated +-- quest_status == 1 : on quest for the first time +-- quest_status == 2 : completed for the first time +-- quest_status == 3 : restarted, not yet completed again +-- quest_status == 4 : completed again (distinction is important for setting correct CS at leypoint) + + local keyitem = 0; + + if (oldummStatus == QUEST_AVAILABLE) then + event = 0x0004; + player:addKeyItem(0x02FF); -- add keyitem Dkhaaya's research journal + player:messageSpecial(KEYITEM_OBTAINED,0x02FF); + player:addQuest(6,2); + player:setVar("OLDUUM_QUEST_STATUS",1); + elseif (oldummStatus == QUEST_ACCEPTED and (quest_status == 1 or quest_status == 3)) then + if (player:hasKeyItem(0x0300) == 1) then -- electrocell + keyitem = 0x300; + end + if (player:hasKeyItem(0x0301) == 1) then -- electropod + keyitem = 0x301; + end + if (player:hasKeyItem(0x0302) == 1) then -- electrolocomotive + keyitem = 0x302; + end + if (keyitem == 0) then + event = 0x0005; + else + if (quest_status == 3) then -- quest is being finished again + event = 0x0008; + else -- quest is being finished for the first time + event = 0x0006; + end; + end + elseif (oldummStatus == QUEST_COMPLETED and (quest_status ==2 or quest_status ==4)) then + if ((player:hasItem(2217) == 1) or (player:hasItem(15769) == 1)) then -- player has lightning band or olduum ring? + event = 0x0007; + else + event = 0x0004; -- NEED TO FIX THIS for starting repeat of the quest, but this will do for now + player:setVar("OLDUUM_QUEST_STATUS",3); + end + end + + player:startEvent(event,keyitem); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x0006 or csid == 0x0008) then + player:completeQuest(AHT_URHGAN,OLDUUM) + player:addItem(2217) -- player receives lightning band + player:messageSpecial(ITEM_OBTAINED,2217); + if (csid == 0x0006) then + player:setVar("OLDUUM_QUEST_STATUS",2); + elseif (csid == 0x0008) then + player:setVar("OLDUUM_QUEST_STATUS",4); + end; + + if (player:hasKeyItem(0x300) == 1) then + player:delKeyItem(0x300); -- electrocell + end + if (player:hasKeyItem(0x301) == 1) then + player:delKeyItem(0x301); -- electropod + end + if (player:hasKeyItem(0x302) == 1) then + player:delKeyItem(0x302); -- electrolocomotive + end + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Famad.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Famad.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Famad.lua (working copy) @@ -1,45 +1,154 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Famad --- Type: Assault Mission Giver --- @zone: 50 --- @pos: 134.098 0.161 -43.759 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0119); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Famad (Lebros Cavern Assault NPC) +-- Get assault missions and item rewards +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + rank = getMercenaryRank(player); + lebros_assault_points = player:getPoint(6); -- points for this area + has_key_item = player:hasKeyItem(0x313); -- has Imperial Army I.D. Tag? + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- this is the number of the assault mission that the player + -- has signed up for. None = 0, {} = 1, etc. + if (current_assault_mission > 0) then + has_assault_mission_already = 1; + else + has_assault_mission_already = 0; + end; + + if (rank == 0) then + player:startEvent(0x0119); + else + player:startEvent(0x0113,rank,has_key_item, lebros_assault_points,has_assault_mission_already, 2); + -- last param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip - since it's not known at this call time what the player is + -- going to select, this can't be set correctly ??? + end + +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +--onEventSelection Action-- +----------------------------------- +function onEventSelection(player,csid,option) +--print("onEventSelection") +--print("onEventSelection - CSID:",csid); +--print("onEventSelection - option ===",option); + + -- last_param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip + -- to check for equipment, + + -- here we would need something like last_param = player:canEquip(itemID) that returns the needed values. + -- could implement this on a case-by-case basis here, but would inefficient, since the item data that is + -- already in the database and would have to be duplicated here. + + player:updateEvent(0,0,0,0,2); --- last_param = 2 hardcoded for now. +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + --print("CSID:",csid); + --print("RESULT:",option); + + if (option >= 337) and (option <=481) then -- player signed up one of the missions: + + -- option = 337: Excavation Duty + -- option = 353: Lebros Supplies + -- option = 369: Troll Fugitives + -- option = 385: Evade and Escape + -- option = 401: Siegemaster Assassination + -- option = 417: Apkallu Breeding + -- option = 433: Wamoura Farm Raid + -- option = 449: Egg Conservation + -- option = 465: Operation: Black Pearl + -- option = 481: Better Than One + + player:setVar("ASSAULT_NUMBER", (option-321)/16); -- number of current mission signed up for, has to be used later at entry. + player:addKeyItem(0x2FC); -- give player lebros assault oders + player:messageSpecial(KEYITEM_OBTAINED,0x2FC); + player:removeKeyItem(0x313); -- remove imperial army I.D. tag (can someone confirm that the key item is removed at this time??) + --print("Player got key item"); + end; + + if (option >= 16386) then -- player chose to buy an item + + --- rewards ----------------- + -- option=16386: Insomnia Earring 3,000 + -- option=32770: Hale Ring 5,000 + -- option=49154: Chivalrous Chain 8,000 + -- option=65538: Precise Belt 10,000 + -- option=81922: Intensifying Cape 10,000 + -- option=98306: Imperial Pole 15,000 + -- option=114690: Doombringer 15,000 + -- option=131074: Sayosamonji 15,000 + -- option=147458: Pahluwan Dastanas 20,000 + -- option=163842: Yigit Crackows 20,000 + -- option=180226: Amir Korazin 20,000 + ------------------------ + + cost = 0; + if (option == 16386) then + cost = 3000; + player:addItem(15972); + player:messageSpecial(ITEM_OBTAINED,15972); + elseif (option == 32770) then + cost = 5000; + player:addItem(15777); + player:messageSpecial(ITEM_OBTAINED,15777); + elseif (option == 49154) then + cost = 8000; + player:addItem(15523); + player:messageSpecial(ITEM_OBTAINED,15523); + elseif (option == 65538) then + cost = 10000; + player:addItem(15886); + player:messageSpecial(ITEM_OBTAINED,15886); + elseif (option == 81922) then + cost = 10000; + player:addItem(15492); + player:messageSpecial(ITEM_OBTAINED,15492); + elseif (option == 98306) then + cost = 15000; + player:addItem(18583); + player:messageSpecial(ITEM_OBTAINED,18583); + elseif (option == 114690) then + cost = 15000; + player:addItem(18388); + player:messageSpecial(ITEM_OBTAINED,18388); + elseif (option == 131074) then + cost = 15000; + player:addItem(18417); + player:messageSpecial(ITEM_OBTAINED,18417); + elseif (option == 147458) then + cost = 20000; + player:addItem(14940); + player:messageSpecial(ITEM_OBTAINED,14940); + elseif (option == 163842) then + cost = 20000; + player:addItem(15690); + player:messageSpecial(ITEM_OBTAINED,15690); + elseif (option == 180226) then + cost = 20000; + player:addItem(14525); + player:messageSpecial(ITEM_OBTAINED,14525); + end; + + player:delPoint(6, cost); + end; + +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Fochacha.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Fochacha.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Fochacha.lua (working copy) @@ -1,45 +1,43 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Fochacha --- Type: Standard NPC --- @zone: 50 --- @pos: 2.897 -1 -10.781 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x002e); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Fochacha +-- Quest 'Delivering the Goods' +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +function onTrigger(player,npc) + deliveringTheGoods = player:getQuestStatus(AHT_URHGAN,DELIVERING_THE_GOODS); +deliveringTheGoodsStatus = player:getVar("QUEST_DELIVERINGTHEGOODS_STATUS"); + + if (deliveringTheGoods == QUEST_AVAILABLE) then + player:startEvent(0x0027); + elseif (deliveringTheGoods == QUEST_ACCEPTED and deliveringTheGoodsStatus ~= 1) then + player:startEvent(0x002E); + elseif (deliveringTheGoods == QUEST_ACCEPTED and deliveringTheGoodsStatus == 1) then + player:startEvent(0x0029); + else + -- Default Dialog? + end +end; + +----------------------------------- +-- onTrade Action +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +function onEventFinish(player,csid,option) + if (csid == 0x0027) then + player:addQuest(AHT_URHGAN,DELIVERING_THE_GOODS); + elseif (csid == 0x0029) then + player:addItem(0x888,3); -- 2184 Imperical Bronze Piece + player:messageSpecial(ITEMS_OBTAINED,0x888,3); + player:setVar("QUEST_DELIVERINGTHEGOODS_STATUS",0) + player:completeQuest(AHT_URHGAN,DELIVERING_THE_GOODS); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/GateChocoboC.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/GateChocoboC.lua (revision 0) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/GateChocoboC.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------- +-- Gate: Chocobo Circuit +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); + +function onTrigger(player,npc) + player:startEvent(0x0084); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Ghanraam.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Ghanraam.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Ghanraam.lua (working copy) @@ -1,45 +1,101 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Ghanraam --- Type: "Nyzul Weapon/Salvage Armor Storer," --- @zone: 50 --- @pos: 108.773 -6.999 -51.297 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x037d); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------------- +-- Ghanraam +-- Salvage Armor quest +-- Preliminary script only, main functionality still missing. More research is needed. +-- +-- Unknown: +-- how to confirm that you want an item returned and trigger the message "Ghanraam reluctantly returns the {item} to you." +-- how to handle the case when player wants to change the set but has items stored. +---------------------------------------- + +require("scripts/globals/settings"); + +--[[ events +0x32E introduction to Salvage armor quest +0x37D introduction to Nyzul relics +0x32F standard menu +0x330 nothing- one of the currently unsupported Aht Urhgan events?? This should be the trade event. +0x33A "Your armor is being crafted as we speak. Such magnificence takes time." +0x33B "Here is your completed armor. Such masterful work..." +--]] + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + status = player:getVar("GHANRAAM_STATUS"); + set = player:getVar("SALVAGE_SET"); -- which salvage set the player has chosen. 0 = ares, 1 = skadi, 2 = usukane, 3 = marduk, 4 = morrigan, 5=nothing. + if (status == 0) then + player:startEvent(0x032E); + else + player:startEvent(0x032F); + end; +end; + +function onEventSelection(player,csid,option) + print("-->",csid, option); + currentset = player:getVar("SALVAGE_SET"); + if (option == 1) or (option == 3) or (option == 5) or (option == 7) or (option == 9) then -- player wants to change set. + --param 1: number of the set you had already decided on if param2 is set to 2 or higher. (0-based) + --param2 = 0 he accepts your choice + --param2 = setnumber+1 = "that is the set you have already chosen" + --param2 = 6 triggers the dialog "I believe you already have this armor on your person." + --param2 = apparently, any other value triggers "I believe you had already decided on..". Using 7 here. + -- missing: which params make him refuse your request to change a set on the grounds that you already have stored items? + newset = (option-1)/2; + if (currentset == 5) then + player:updateEvent(0,0); + elseif (currentset == newset) then + player:updateEvent(newset, newset + 1); + else + player:updateEvent(currentset, 11); + end; + elseif (option == 2) or (option == 4) or (option == 6) or (option == 8) or (option == 10) then -- player has confirmed set change + player:updateEvent(0,0,0,0,0,0,0,0); -- without this event update, the event will just revert back to the menu. + elseif (option == 11) then -- player is asking for armor back + -- param 1: a bitmask for the first page of items. (contains 8 items, head ) + --- 1: level 15 head, 2: level 25 head, 4: level 35 head, + --- 8: level 15 body, 16: level 25 body, 32: level 35 body + --- 64: level 15 hands,128: level 25 hands 256: switches off "next option" + -- param 2: a bitmask for the second page of items. (contains 7 items). Next highest bit switches of the "previous" option + -- param 3: gear set. 1 = ares, 2 = skadi, 3 = usukane, 4 = marduk, 5 = morrigan. + -- param 4: a flag that says that there are item stored in the gallery. > 0 seems to suffice. + player:updateEvent(255,127,currentset + 1,1); + --print("looking at armor to be returned"); + elseif (option >= 12) and (option <= 26) then -- player has confirmed he wants armor back. + --print("player has decided to ask for armor back."); + + --this update should activate the text "Ghanraam reluctantly returns the {item} to you." but I could find no + -- parameters that triggered this. + + player:updateEvent(0,0,0,0,0,0,0,0); -- this doesn't work + elseif (option == 27) then -- player is asking for weapon back + player:updateEvent(255,255,15,1); -- first 3 params appear to be bitmasks (8 weapons at a time.) Next highest unused bit switches off next and previous options. + end; +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +print("CSID:",csid); +print("RESULT:",option); + if (csid == 0x32E) then + player:setVar("GHANRAAM_STATUS",1); + player:setVar("SALVAGE_SET", 5); -- no set chosen yet. + elseif (csid == 0x32F) then + if (option == 1) or (option == 3) or (option == 5) or (option == 7) or (option == 9) then -- player has chosen a set. + player:setVar("SALVAGE_SET", (option-1)/2 ); --1: ares, 3: skadi, 5: usukane, 7: marduk, 9: morrigan. + elseif (option == 2) or (option == 4) or (option == 6) or (option == 8) or (option == 10) then -- player has changed set to + player:setVar("SALVAGE_SET", (option-2)/2 ); -- 2: ares, 4: skadi, 6: usukane, 8: marduk, 10: morrigan. + end; + end; +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Hadahda.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Hadahda.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Hadahda.lua (working copy) @@ -1,45 +1,79 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Hadahda --- Type: Standard NPC --- @zone: 50 --- @pos: -112.029 -6.999 -66.114 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0206); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Hadahda +-- Quest 'Arts and Crafts' +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs"); + +----------------------------------- +-- onTrigger Action +function onTrigger(player,npc) + +----------------------------------- +-- Initialization +artsAndCrafts_EkhuPesshyadha = player:getVar("QUEST_ARTSANDCRAFTS_EKHUPESSHYADHA"); + artsAndCrafts_Zabahf = player:getVar("QUEST_ARTSANDCRAFTS_ZABAHF"); + artsAndCrafts_Mathlouq = player:getVar("QUEST_ARTSANDCRAFTS_MATHLOUQ"); + artsAndCrafts_Balakaf = player:getVar("QUEST_ARTSANDCRAFTS_BALAKAF"); + artsAndCrafts_Matifa = player:getVar("QUEST_ARTSANDCRAFTS_MATIFA"); + artsAndCrafts_Mhasbaf = player:getVar("QUEST_ARTSANDCRAFTS_MHASBAF"); + artsAndCrafts_Qutiba = player:getVar("QUEST_ARTSANDCRAFTS_QUTIBA"); + artsAndCrafts_Kindness = player:getVar("QUEST_ARTSANDCRAFTS_KINDNESS"); + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); + + if (artsAndCrafts == 2 and artsAndCrafts_Kindness == 0) then + player:showText(npc,HADAHDA_DIALOG + 50); + elseif (artsAndCrafts == 2 and artsAndCrafts_Kindness == 1) then + player:showText(npc,HADAHDA_DIALOG + 52); + elseif (artsAndCrafts == 1 and artsAndCrafts_Zabahf == 1 and artsAndCrafts_Mathlouq == 1 and artsAndCrafts_EkhuPesshyadha == 1 and artsAndCrafts_Balakaf == 1 and + artsAndCrafts_Matifa == 1 and artsAndCrafts_Mhasbaf == 1 and artsAndCrafts_Qutiba == 1) then + player:startEvent(0x0205); + elseif (artsAndCrafts == 1) then + player:showText(npc,HADAHDA_DIALOG + 9); + elseif (artsAndCrafts == 0) then + player:startEvent(0x01FC); + end +end; + +----------------------------------- +-- onTrade Action +function onTrade(player,npc,trade) + + bowlOfSutlac = 0x15C9; -- 5577 + imperialBronzePiece = 0x0888; -- 2184 + + tradeChkG = trade:getGil(); + count = trade:getItemCount(); + tradeChk1 = trade:hasItemQty(bowlOfSutlac,1); + slotCount = player:getFreeSlotCount(0); + artsAndCrafts = player:getQuestStatus(6,1); + + if (tradeChkG == 0 and count = 1 and tradeChk1 and artsAndCrafts == 2) then + player:tradeComplete(); + player:showText(npc,HADAHDA_DIALOG + 51); + player:addItem(imperialBronzePiece); + player:setVar("QUEST_ARTSANDCRAFTS_KINDNESS",1); + player:messageSpecial(ITEM_OBTAINED,imperialBronzePiece); + end +end; + +----------------------------------- +-- onEventFinish Action +function onEventFinish(player,csid,option) + if (csid = 0x01FC) then + player:addQuest(AHT_URHGAN,ARTS_AND_CRAFTS); + elseif (csid == 0x0205) then + player:addItem(0x15C9); -- Bowl of Sutlac + player:messageSpecial(ITEM_OBTAINED,0x15C9); + player:setVar("QUEST_ARTSANDCRAFTS_ZABAHF",0); + player:setVar("QUEST_ARTSANDCRAFTS_MATHLOUQ",0); + player:setVar("QUEST_ARTSANDCRAFTS_EKHUPESSHYADHA",0); + player:setVar("QUEST_ARTSANDCRAFTS_BALAKAF",0); + player:setVar("QUEST_ARTSANDCRAFTS_MHASBAF",0); + player:setVar("QUEST_ARTSANDCRAFTS_QUTIBA",0); + player:completeQuest(AHT_URHGAN,ARTS_AND_CRAFTS); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Isdebaaq.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Isdebaaq.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Isdebaaq.lua (working copy) @@ -1,45 +1,155 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Isdebaaq --- Type: Assault Mission Giver --- @zone: 50 --- @pos: 127.565 0.161 -43.846 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0118); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Isdebaaq (Mamool Ja Training Grounds Assault NPC) +-- Get assault missions and item rewards +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + rank = getMercenaryRank(player); + mamool_assault_points = player:getPoint(5); -- points for this area + has_key_item = player:hasKeyItem(0x313); -- has Imperial Army I.D. Tag? + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- this is the number of the assault mission that the player + -- has signed up for. None = 0, {} = 1, etc. + if (current_assault_mission > 0) then + has_assault_mission_already = 1; + else + has_assault_mission_already = 0; + end; + + if (rank == 0) then + player:startEvent(0x0118); + else + player:startEvent(0x0112,rank,has_key_item, mamool_assault_points,has_assault_mission_already, 2); + -- last param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip - since it's not known at this call time what the player is + -- going to select, this can't be set correctly ??? + end + +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +--onEventSelection Action-- +----------------------------------- +function onEventSelection(player,csid,option) +--print("onEventSelection") +--print("onEventSelection - CSID:",csid); +--print("onEventSelection - option ===",option); + + + -- last_param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip + -- to check for equipment, + + -- here we would need something like last_param = player:canEquip(itemID) that returns the needed values. + -- could implement this on a case-by-case basis here, but would inefficient, since the item data that is + -- already in the database and would have to be duplicated here. + + player:updateEvent(0,0,0,0,2); --- last_param = 2 hardcoded for now. +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + + if (option >= 177) and (option <=321) then -- player signed up one of the missions: + + -- option = 177: Imperial Agent Rescue + -- option = 193: Preemptive Strike + -- option = 209: Sagelord Elimination + -- option = 225: Breaking Morale + -- option = 241: The Double Agent + -- option = 257: Imperial Treasure Retrieval + -- option = 273: Blitzkrieg + -- option = 289: Marids in the Mist + -- option = 305: Azure Ailments + -- option = 321: The Susanoo Shuffle + + player:setVar("ASSAULT_NUMBER", (option-161)/16); -- number of current mission signed up for, has to be used later at entry. + player:addKeyItem(0x2FB); -- give player mamool assault oders + player:messageSpecial(KEYITEM_OBTAINED,0x2FB); + player:removeKeyItem(0x313); -- remove imperial army I.D. tag (can someone confirm that the key item is removed at this time??) + --print("Player got key item"); + end; + + if (option >= 16386) then -- player chose to buy an item + + --- rewards ----------------- + -- option=16386: Antivenom Earring 3,000 + -- option=32770: Ebullient Ring 5,000 + -- option=49154: Enlightened Chain 8,000 + -- option=65538: Spectral Belt 10,000 + -- option=81922: Bullseye Cape 10,000 + -- option=98306: Storm Tulwar 15,000 + -- option=114690: Imperial Neza 15,000 + -- option=131074: Storm Tabar 15,000 + -- option=147458: Yigit Gages 20,000 + -- option=163842: Amir Boots 20,000 + -- option=180226: Pahluwan Seraweels 20,000 + ------------------------ + + cost = 0; + if (option == 16386) then + cost = 3000; + player:addItem(15971); + player:messageSpecial(ITEM_OBTAINED,15971); + elseif (option == 32770) then + cost = 5000; + player:addItem(15776); + player:messageSpecial(ITEM_OBTAINED,15776); + elseif (option == 49154) then + cost = 8000; + player:addItem(15522); + player:messageSpecial(ITEM_OBTAINED,15522); + elseif (option == 65538) then + cost = 10000; + player:addItem(15885); + player:messageSpecial(ITEM_OBTAINED,15885); + elseif (option == 81922) then + cost = 10000; + player:addItem(15491); + player:messageSpecial(ITEM_OBTAINED,15491); + elseif (option == 98306) then + cost = 15000; + player:addItem(17715); + player:messageSpecial(ITEM_OBTAINED,17715); + elseif (option == 114690) then + cost = 15000; + player:addItem(18113); + player:messageSpecial(ITEM_OBTAINED,18113); + elseif (option == 131074) then + cost = 15000; + player:addItem(17951); + player:messageSpecial(ITEM_OBTAINED,17951); + elseif (option == 147458) then + cost = 20000; + player:addItem(14935); + player:messageSpecial(ITEM_OBTAINED,14935); + elseif (option == 163842) then + cost = 20000; + player:addItem(15688); + player:messageSpecial(ITEM_OBTAINED,15688); + elseif (option == 180226) then + cost = 20000; + player:addItem(15609); + player:messageSpecial(ITEM_OBTAINED,15609); + end; + + player:delPoint(5, cost); + end; + +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Kaduru_Haiduru.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Kaduru_Haiduru.lua (revision 0) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Kaduru_Haiduru.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Kaduru-Haiduru +-- Pay-Teleport taru +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + --player:startEvent(0x80097,0x0,0x0,0x3,0xFF,0xFF,0xFF,0xFF,0xFF); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) + if(os.time() < player:getVar("reekofamateursorcery")) then + -- You have used the other teleport taru within a vanadiel day so no teleport for you + else + -- do the trade + end +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Kuhn_Tsahnpri.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Kuhn_Tsahnpri.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Kuhn_Tsahnpri.lua (working copy) @@ -16,7 +16,7 @@ ----------------------------------- function onTrigger(player,npc) -player:startEvent(0x00EC); + player:startEvent(0x00EC); end; ----------------------------------- @@ -35,6 +35,9 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + if(csid == 0x00EC) then + player:setPos(12,2,-100,190,0x35); + end end; Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Lageegee.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Lageegee.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Lageegee.lua (working copy) @@ -1,45 +1,149 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Lageegee --- Type: Assault Mission Giver --- @zone: 50 --- @pos: 120.808 0.161 -30.435 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x011a); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Lageegee (Periqia assault NPC) +-- Get assault missions and item rewards +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + rank = getMercenaryRank(player); + periqia_assault_points = player:getPoint(7); -- points for this area + has_key_item = player:hasKeyItem(0x313); -- has Imperial Army I.D. Tag? + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- this is the number of the assault mission that the player + -- has signed up for. None = 0, {} = 1, etc. + if (current_assault_mission > 0) then + has_assault_mission_already = 1; + else + has_assault_mission_already = 0; + end; + + if (rank == 0) then + player:startEvent(0x011A); + else + player:startEvent(0x0114,rank,has_key_item,periqia_assault_points,has_assault_mission_already,2); + end +end; + +----------------------------------- +-- onEventSelection Action +----------------------------------- +function onEventSelection(player,csid,option) +--print("onEventSelection") +--print("onEventSelection - CSID:",csid); +--print("onEventSelection - option ===",option); + + + -- last_param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip + -- to check for equipment, + + -- here we would need something like last_param = player:canEquip(itemID) that returns the needed values. + -- could implement this on a case-by-case basis here, but would inefficient, since the item data that is + -- already in the database and would have to be duplicated here. + + player:updateEvent(0,0,0,0,2); --- last_param = 2 hardcoded for now. +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + + if (option >= 497) and (option <=641) then -- player signed up one of the missions: + + -- option = 497: Seagull Grounded + -- option = 513: Requiem + -- option = 529: Saving Private Ryaaf + -- option = 545: Shooting Down the Baron + -- option = 561: Building Bridges + -- option = 577: Stop the Bloodshed + -- option = 593: Defuse the Threat + -- option = 609: Operation: Snake Eyes + -- option = 625: Wake the Puppet + -- option = 641: The Price is Right + + player:setVar("ASSAULT_NUMBER", (option-481)/16); -- number of current mission signed up for, has to be used later at entry. + player:addKeyItem(0x2FD); -- give player periqia assault oders + player:messageSpecial(KEYITEM_OBTAINED,0x2FD); + player:removeKeyItem(0x313); -- remove imperial army I.D. tag (can someone confirm that the key item is removed at this time??) + end; + + if (option >= 16386) then -- player chose to buy an item + + --- rewards ----------------- + -- option=16386: Vision Earring 3,000 + -- option=32770: Unyielding Ring 5,000 + -- option=49154: Fortified Chain 8,000 + -- option=65538: Resolute Belt 10,000 + -- option=81922: Bushido Cape 10,000 + -- option=98306: Khanjar 15,000 + -- option=114690: Hotarumaru 15,000 + -- option=131074: Imperial Gun 15,000 + -- option=147458: Amir Puggaree 20,000 + -- option=163842: Pahluwan Crackows 20,000 + -- option=180226: Yigit Gomlek 20,000 + ------------------------ + + cost = 0; + if (option == 16386) then + cost = 3000; + player:addItem(15973); + player:messageSpecial(ITEM_OBTAINED,15973); + elseif (option == 32770) then + cost = 5000; + player:addItem(15778); + player:messageSpecial(ITEM_OBTAINED,15778); + elseif (option == 49154) then + cost = 8000; + player:addItem(15524); + player:messageSpecial(ITEM_OBTAINED,15524); + elseif (option == 65538) then + cost = 10000; + player:addItem(15887); + player:messageSpecial(ITEM_OBTAINED,15887); + elseif (option == 81922) then + cost = 10000; + player:addItem(15493); + player:messageSpecial(ITEM_OBTAINED,15493); + elseif (option == 98306) then + cost = 15000; + player:addItem(18025); + player:messageSpecial(ITEM_OBTAINED,18025); + elseif (option == 114690) then + cost = 15000; + player:addItem(18435); + player:messageSpecial(ITEM_OBTAINED,18435); + elseif (option == 131074) then + cost = 15000; + player:addItem(18686); + player:messageSpecial(ITEM_OBTAINED,18686); + elseif (option == 147458) then + cost = 20000; + player:addItem(16062); + player:messageSpecial(ITEM_OBTAINED,16062); + elseif (option == 163842) then + cost = 20000; + player:addItem(15695); + player:messageSpecial(ITEM_OBTAINED,15695); + elseif (option == 180226) then + cost = 20000; + player:addItem(14527); + player:messageSpecial(ITEM_OBTAINED,14527); + end; + + player:delPoint(7, cost); + end; + +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Mathlouq.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Mathlouq.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Mathlouq.lua (working copy) @@ -1,45 +1,37 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Mathlouq --- Type: Standard NPC --- @zone: 50 --- @pos: -92.892 -7 129.277 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x021f); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Mathlouq +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); +artsAndCrafts_Mathloug = player:getVar("QUEST_ARTSANDCRAFTS_MATHLOUQ"); + + if (artsAndCrafts == 1 and artsAndCrafts_Mathloug ~= 1) then + player:startEvent(0x01FF); + else + player:startEvent(0x021F); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x01FF) then + player:setVar("QUEST_ARTSANDCRAFTS_MATHLOUQ",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Matifa.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Matifa.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Matifa.lua (working copy) @@ -1,45 +1,37 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Matifa --- Type: Standard NPC --- @zone: 50 --- @pos: -10.583 -1 -8.820 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x021d); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Matifa +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); +artsAndCrafts_Matifa = player:getVar("QUEST_ARTSANDCRAFTS_MATIFA"); + + if (artsAndCrafts == 1 and artsAndCrafts_Matifa ~= 1) then + player:startEvent(0x0204); + else + player:startEvent(0x021D); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x0204) then + player:setVar("QUEST_ARTSANDCRAFTS_MATIFA",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Mhasbaf.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Mhasbaf.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Mhasbaf.lua (working copy) @@ -1,45 +1,35 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Mhasbaf --- Type: Standard NPC --- @zone: 50 --- @pos: 54.701 -6.999 11.387 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x021e); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Mhasbaf +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); +artsAndCrafts_Mhasbaf = player:getVar("QUEST_ARTSANDCRAFTS_MHASBAF"); + + if (artsAndCrafts == 1 and artsAndCrafts_Mhasbaf ~= 1) then + player:startEvent(0x01FE); + else + player:startEvent(0x021E); + end +end; + +----------------------------------- +-- onTrade Action +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +function onEventFinish(player,csid,option) + if (csid == 0x01FE) then + player:setVar("QUEST_ARTSANDCRAFTS_MHASBAF",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Mushayra.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Mushayra.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Mushayra.lua (working copy) @@ -1,45 +1,34 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Mushayra --- Type: Standard NPC --- @zone: 50 --- @pos: -111.551 -6.999 -61.720 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0207); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Mushayra +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); + + if (artsAndCrafts == QUEST_ACCEPTED) then + player:showText(npc,HADAHDA_DIALOG + 16); + else + player:startEvent(0x0207); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Qutiba.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Qutiba.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Qutiba.lua (working copy) @@ -1,45 +1,42 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Qutiba --- Type: Standard NPC --- @zone: 50 --- @pos: 92.341 -7.5 -129.980 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0034); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Qutiba +-- Quest 'Delivering the Goods'(Involved) +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); + deliveringTheGoods = player:getQuestStatus(AHT_URHGAN,DELIVERING_THE_GOODS); +deliveringTheGoodsStatus = player:getVar("QUEST_DELIVERINGTHEGOODS_STATUS"); + artsAndCrafts_Qutiba = player:getVar("QUEST_ARTSANDCRAFTS_QUTIBA"); + + if (artsAndCrafts == 1 and artsAndCrafts_Qutiba ~= 1) then + player:startEvent(0x0202); + elseif (deliveringTheGoods == 1 and deliveringTheGoodsStatus ~= 1) then + player:startEvent(0x0028); + else + player:startEvent(0x0033); + end +end; + +----------------------------------- +-- onTrade Action +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +function onEventFinish(player,csid,option) + if (csid == 0x0202) then + player:setVar("QUEST_ARTSANDCRAFTS_QUTIBA",1); + elseif (csid == 0x0028) then + player:setVar("QUEST_DELIVERINGTHEGOODS_STATUS",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Ryo.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Ryo.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Ryo.lua (working copy) @@ -1,51 +1,34 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Ryo --- Type: ZNM --- @pos -127.086 0.999 22.693 50 ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - -require("scripts/globals/besieged"); -require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs"); - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0391); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) ---printf("updateCSID: %u",csid); ---printf("updateRESULT: %u",option); - - if(option == 300) then - player:updateEvent(player:getPoint(ZENI),0); - else - player:updateEvent(0,0); - end - -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) ---printf("finishCSID: %u",csid); ---printf("finishRESULT: %u",option); +----------------------------------- +-- Ryo +-- Basic Chat Text, reports Zeni balance +----------------------------------- + +require("scripts/globals/settings"); + +function onTrigger(player,npc) + player:startEvent(0x0391); +end; + +function onEventSelection(player,csid,option) + if (option == 300) then -- player asked about zeni balance + player:updateEvent(player:getPoint(10),0); + else + player:updateEvent(0,0); -- first parameter serves as bitmask to delete options from main menu, needs to be reset + end; +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Rytaal.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Rytaal.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Rytaal.lua (working copy) @@ -1,45 +1,60 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Rytaal --- Type: Standard NPC --- @zone: 50 --- @pos: 112.002 -1.338 -45.038 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x010e); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Rytaal +-- Gives out new imperial army I.D. tags, counts their number, won't give you a new tag if you already have one +-- or are on an assault mission, checks level and mercenary rank requirement. +-- Known Problems: will give tags if number of tags on server is <=0 (couldn't find input params to trigger). +-- Not implemented: time-based tag refresh. +----------------------------------- +-- Includes +require("scripts/globals/settings"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + rank = getMercenaryRank(player); + tags_on_server = player:getVar("TAGS_ON_SERVER"); + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- if this is 0, player is not currently on any assault missions. + + if (rank == 0) or (player:getMainLvl()<50) then + player:startEvent(0x010E); + else + has_key_item = player:hasKeyItem(0x313); + if (tags_on_server == 0) then + print("Rytaal: Handling for zero tags not implemented"); + --- I couldn't figure out what combination of input parameters, if any, produces the message that there are no more + --- tags until {date and time}. tags_on_server = 0 alone doesn't do. + end; + player:startEvent(0x010C,0,tags_on_server,current_assault_mission,has_key_item); + end +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); + tags_on_server = player:getVar("TAGS_ON_SERVER"); + + if (option == 2) then -- player wants to cancel current assault mission + + player:removeKeyItem(0x2FA); + player:removeKeyItem(0x2FB); + player:removeKeyItem(0x2FC); + player:removeKeyItem(0x2FD); + player:removeKeyItem(0x2FE); + player:removeKeyItem(0x36E); + player:setVar("ASSAULT_NUMBER",0); + player:addKeyItem(0x313); + player:messageSpecial(KEYITEM_OBTAINED,0x313); + + elseif (option == 1) then + player:addKeyItem(0x313); + player:messageSpecial(KEYITEM_OBTAINED,0x313); + player:setVar("TAGS_ON_SERVER",tags_on_server-1); + end + +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Sajaaya.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Sajaaya.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Sajaaya.lua (working copy) @@ -1,45 +1,29 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Sajaaya --- Type: Weather Checker --- @zone: 50 --- @pos: -4.727 -6.999 -25.312 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x01f6); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Sajaaya +-- Gives weather reports. +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + birth = 1009810800; + timer = os.time(); + counter = (timer - birth); + player:startEvent(0x01f6,0,0,0,0,0,0,0,counter); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Sharin-Garin.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Sharin-Garin.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Sharin-Garin.lua (working copy) @@ -35,7 +35,7 @@ merc = 2 -- Probably could be done, but not really important atm - player:startEvent(0x008C,0,merc,runicpass,player:getPoint(IS),getAstralCandescence(),cost,captain); + player:startEvent(0x008C,0,merc,runicpass,player:getPoint(3),getAstralCandescence(),cost,captain); end; Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Sorrowful_Sage.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Sorrowful_Sage.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Sorrowful_Sage.lua (working copy) @@ -1,45 +1,57 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Sorrowful Sage --- Type: Assault Mission Giver --- @zone: 50 --- @pos: 134.096 0.161 -30.401 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x011c); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Sorrowful Sage (Nyzul Assault NPC) +-- Get assault missions and item rewards +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + rank = getMercenaryRank(player); + ilrusi_assault_points = player:getPoint(9); -- points for this area + has_key_item = player:hasKeyItem(0x313); -- has Imperial Army I.D. Tag? + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- this is the number of the assault mission that the player + -- has signed up for. None = 0, {} = 1, etc. + nyzul_floor = player:getVar("NYZUL_FLOOR"); + + if (current_assault_mission > 0) then + has_assault_mission_already = 1; + else + has_assault_mission_already = 0; + end; + + if (rank == 0) then + player:startEvent(0x011C); + else + player:startEvent(0x0116,rank,has_key_item,nyzul_tokens,has_assault_mission_already,nyzul_floor); + end + +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + --print("CSID:",csid); + --print("RESULT:",option); + + if (option == 817) then -- player signed up for nyzul assault + player:setVar("ASSAULT_NUMBER", 1); -- number of current mission signed up for, always 1 for Nyzul. + player:addKeyItem(0x36E); -- give player Nyzul Isle Assault orders + player:messageSpecial(KEYITEM_OBTAINED,0x36E); + player:delKeyItem(0x313); -- remove imperial army I.D. tag (can someone confirm that the key item is removed at this time??) + --print("Player got key item"); + end; + +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Ulamaal.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Ulamaal.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Ulamaal.lua (working copy) @@ -1,45 +1,36 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Ulamaal --- Type: Standard NPC --- @zone: 50 --- @pos: 93.512 -7.5 -128.530 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0035); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Ulamaal +-- Quest 'Delivering the Goods'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +function onTrigger(player,npc) + deliveringTheGoods = player:getQuestStatus(AHT_URHGAN,DELIVERING_THE_GOODS); +deliveringTheGoodsStatus = player:getVar("QUEST_DELIVERINGTHEGOODS_STATUS"); + + if (deliveringTheGoods == 1 and deliveringTheGoodsStatus ~= 1) then + player:startEvent(0x0028); + else + player:startEvent(0x0033); + end +end; + + +----------------------------------- +-- onTrade Action +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +function onEventFinish(player,csid,option) + if (csid == 0x0028) then + player:setVar("QUEST_DELIVERINGTHEGOODS_STATUS",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Yahsra.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Yahsra.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Yahsra.lua (working copy) @@ -1,45 +1,151 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Yahsra --- Type: Assault Mission Giver --- @zone: 50 --- @pos: 120.967 0.161 -44.002 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0117); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Yahsra (Leujaoam assault NPC) +-- Get assault missions and item rewards +----------------------------------- +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + rank = getMercenaryRank(player); + leujaoam_assault_points = player:getPoint(4); -- points for this area + has_key_item = player:hasKeyItem(0x313); -- has Imperial Army I.D. Tag? + current_assault_mission = player:getVar("ASSAULT_NUMBER"); -- this is the number of the assault mission that the player + -- has signed up for. None = 0, Leujaoam Cleansing = 1, etc. + if (current_assault_mission > 0) then + has_assault_mission_already = 1; + else + has_assault_mission_already = 0; + end; + + if (rank == 0) then + player:startEvent(0x0117); + else + player:startEvent(0x0111,rank,has_key_item,leujaoam_assault_points,has_assault_mission_already,2); + end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +--onEventSelection Action-- +----------------------------------- +function onEventSelection(player,csid,option) +--print("onEventSelection") +--print("onEventSelection - CSID:",csid); +--print("onEventSelection - option ===",option); + + + -- last_param: 0 = wrong job to equip, 1 = too low to equip, 2 can equip + -- to check for equipment, + + -- here we would need something like last_param = player:canEquip(itemID) that returns the needed values. + -- could implement this on a case-by-case basis here, but would inefficient, since the item data that is + -- already in the database and would have to be duplicated here. + + player:updateEvent(0,0,0,0,2); --- last_param = 2 hardcoded for now. +end; + + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + --print("CSID:",csid); + --print("RESULT:",option); + + if (option >= 17) and (option <=161) then -- player signed up one of the missions: + + -- option = 17: Leujaoam Cleansing + -- option = 33: Orichalcum Survey + -- option = 49: Escort Professor Chanoix + -- option = 65: Shanarha Grass Conservation + -- option = 81: Counting Sheep + -- option = 97: Supplies Recovery + -- option = 113: Azure Experiments + -- option = 129: Imperial Code + -- option = 145: Red Versus Blue + -- option = 161: Bloody Rondo + + player:setVar("ASSAULT_NUMBER", (option-1)/16); -- number of current mission signed up for, has to be used later at entry. + player:addKeyItem(0x2FA); -- give player Leujaoam assault oders + player:messageSpecial(KEYITEM_OBTAINED,0x2FA); + player:removeKeyItem(0x313); -- remove imperial army I.D. tag (can someone confirm that the key item is removed at this time??) + end; + + if (option >= 16386) then -- player chose to buy an item + + --- rewards ----------------- + -- option=16386: Stoic Earring 3,000 + -- option=32770: Unfettered Ring 5,000 + -- option=49154: Tempered Chain 8,000 + -- option=65538: Potent Belt 10,000 + -- option=81922: Miraculous Cape 10,000 + -- option=98306: Yigit Bulawa 15,000 + -- option=114690: Imperial Bhuj 15,000 + -- option=131074: Pahluwan Patas 15,000 + -- option=147458: Amir Kolluks 20,000 + -- option=163842: Pahluwan Qalansuwa 20,000 + -- option=180226: Yigit Seraweels 20,000 + ------------------------ + + cost = 0; + if (option == 16386) then + cost = 3000; + player:addItem(15970); + player:messageSpecial(ITEM_OBTAINED,15970); + elseif (option == 32770) then + cost = 5000; + player:addItem(15775); + player:messageSpecial(ITEM_OBTAINED,15775); + elseif (option == 49154) then + cost = 8000; + player:addItem(15521); + player:messageSpecial(ITEM_OBTAINED,15521); + elseif (option == 65538) then + cost = 10000; + player:addItem(15884); + player:messageSpecial(ITEM_OBTAINED,15884); + elseif (option == 81922) then + cost = 10000; + player:addItem(15490); + player:messageSpecial(ITEM_OBTAINED,15490); + elseif (option == 98306) then + cost = 15000; + player:addItem(18408); + player:messageSpecial(ITEM_OBTAINED,18408); + elseif (option == 114690) then + cost = 15000; + player:addItem(18485); + player:messageSpecial(ITEM_OBTAINED,18485); + elseif (option == 131074) then + cost = 15000; + player:addItem(18365); + player:messageSpecial(ITEM_OBTAINED,18365); + elseif (option == 147458) then + cost = 20000; + player:addItem(14933); + player:messageSpecial(ITEM_OBTAINED,14933); + elseif (option == 163842) then + cost = 20000; + player:addItem(16069); + player:messageSpecial(ITEM_OBTAINED,16069); + elseif (option == 180226) then + cost = 20000; + player:addItem(15606); + player:messageSpecial(ITEM_OBTAINED,15606); + end; + + player:delPoint(4, cost); + end; + +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Zabahf.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Zabahf.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Zabahf.lua (working copy) @@ -1,45 +1,37 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Zabahf --- Type: Standard NPC --- @zone: 50 --- @pos: -90.070 -1 10.140 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0200); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Zabahf +-- Quest 'Arts and Crafts'(Involved) +----------------------------------- +-- Includes +require("scripts/globals/settings"); +require("scripts/globals/quests"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + artsAndCrafts = player:getQuestStatus(AHT_URHGAN,ARTS_AND_CRAFTS); +artsAndCrafts_Zabahf = player:getVar("QUEST_ARTSANDCRAFTS_ZABAHF"); + + if (artsAndCrafts == 1 and artsAndCrafts_Zabahf ~= 1) then + player:startEvent(0x0200); + else + player:startEvent(0x0215); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x0200) then + player:setVar("QUEST_ARTSANDCRAFTS_ZABAHF",1); + end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/npcs/Zasshal.lua (working copy) @@ -1,45 +1,176 @@ ------------------------------------ --- Area: Aht Urhgan Whitegate --- NPC: Zasshal --- Type: Salvage --- @zone: 50 --- @pos: 101.468 -1 -20.088 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0331); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Zasshal (Salvage NPC) +-- gives remnants permit for assault points +-- +-- not implemented yet: Zasshal should only give one remnants permit per RL day (once every JP day on retail servers). +-- +-- possibly non-canonical functionality: when you already have a Remnants Permit, Zasshal automatically tells you "Time to explain stuff +-- again.." and turns you away, even if you are on the quest "Duties, Tasks and Deeds" and may just be there to buy "Wyrmseeker of Areuhat". +-- If JP midnight has not passed yet since you last got a permit, Zasshal tells you that and the option "I'm In" is removed. +--------------------------------------------------------------------- +-- Includes +require("scripts/globals/settings"); +package.loaded["scripts/zones/Aht_Urhgan_Whitegate/TextIDs"] = nil; +require("scripts/zones/Aht_Urhgan_Whitegate/TextIDs"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + + +------------- debug code ------------------ +player:setVar("AHT_URHGAN_MISSION",17) +player:setVar("SALVAGE_COUNT",2); +--------------------------------------- + +--------------- Zasshal events: --------------------------------------- +-- 0x0331 : "Wot are you looking at?" (player not eligible to sign up for salvage, needs ToAU mission 17 or higher) +-- 0x0332 : CS with explanation of Salvage for first-time users + usual salvage menu +-- 0x0333 : CS + salvage menu +-- 0x0334 : "Back for more?" + salvage menu +-- 0x0335 : "Time to explain stuff again" (player already has salvage permit) +-- 0x0336 : "Here's your remnants permit".. obtained key item. +-- 0x011F : "Deal! That settles it then" (player bought Wyrmseeker of Areuhat) +-- 0x011E : CS when player is first interested in Wyrmseeker of Areuhat +------------------------------------------------------------ + +-- debug code ---------------------------------------------------- +--player:setVar("AHT_URHGAN_MISSION",18) +--player:setVar("NYZUL_TOKENS",300000) +--player:setVAR("PLAYER_HAS_SEEN_WYRMSEEKER_CS,0); -- is there a server mechanism for keeping track of whether a player + -- has seen a one-time CS after satisfying a condition? +------------------------------------------------------------ + +aht_urhgan_mission = player:getVar("AHT_URHGAN_MISSION") -- highest completed Aht Urhgan Mission +salvage_count = player:getVar("SALVAGE_COUNT") -- number of Salvage runs performed +player_has_seen_wyrmseeker_cs = player:getVar("PLAYER_HAS_SEEN_WYRMSEEKER_CS"); +mythic_quest = player:getQuestStatus(6,71) -- player on quest "Duties, Tasks and Deeds"? LogID = 6 for Aht Urhgan Quests? + +-- debug code ---- +-- mythic_quest = 1 +------------- + + +leujaoam_assault_points = player:getVar("LEUJAOAM_ASSAULT_POINTS") -- retrieve assault points +mamool_assault_points = player:getVar("MAMOOL_ASSAULT_POINTS") +lebros_assault_points = player:getVar("LEBROS_ASSAULT_POINTS") +periqia_assault_points = player:getVar("PERIQIA_ASSAULT_POINTS") +ilrusi_assault_points = player:getVar("ILRUSI_ASSAULT_POINTS") +nyzul_tokens = player:getVar("NYZUL_TOKENS") + +--print(leujaoam_assault_points, mamool_assault_points, lebros_assault_points, periqia_assault_points,ilrusi_assault_points); + +has_remnants_permit = player:hasKeyItem(0x356); -- has Remnants Permit? +last_remnants_permit_bought = player:getVar("LAST_REMNANTS_PERMIT_BOUGHT"); + +time_elapsed = os.time()-last_remnants_permit_bought; +--print("time----",time_elapsed,"---"); + +if (aht_urhgan_mission < 17) then + event = Event(0x0331) + +elseif ((player_has_seen_wyrmseeker_cs == 0) and (mythic_quest == 1)) then + event = Event(0x011E) + player:setVar("PLAYER_HAS_SEEN_WYRMSEEKER_CS",1); + +else + if (has_remnants_permit == 1) then + event = Event(0x0335) + else + if (time_elapsed >=86400) then -- one RL day has passed since last permit was obtained? + japanese_midnight_has_passed_since_last_permit = 1; -- use this instead of midnight check for now. + else + japanese_midnight_has_passed_since_last_permit = 0; + end; + if (japanese_midnight_has_passed_since_last_permit == 0) then + player:showText(npc,ZASSHAL_DIALOG); + param7 = 1; -- for disabling "I'm in" option + else + param7 = 0; + end; + + if (salvage_count == 0) then + event = Event(0x0332) + elseif (salvage_count == 1) then + event = Event(0x0333) + elseif (salvage_count > 1) then + event = Event(0x0334) + end + -- parameter 3: number of nyzul tokens + -- parameter 7 == a bit mask to disable menu options + -- other parameters unknown + + if (mythic_quest == 0) then + param7 = param7 + 32; -- disable Wyrmseeker of Areuhat option; + end + event:setParams(0,0,nyzul_tokens,0,0,0,param7,0); + end +end +player:startEvent(event); +end; + + ----------------------------------- +--onEventSelection Action-- +----------------------------------- +function onEventSelection(player,csid,option) +--print("onEventSelection") +--print("onEventSelection - CSID:",csid); -- we are now in the part of the dialog where you select +--print("onEventSelection - option ===",option); -- an area to exchange assault points from for a permit + +if (option == 0) then + player:updateEvent(leujaoam_assault_points,0,0,0,0,0,0,0) + +elseif (option == 1) then + player:updateEvent(mamool_assault_points,0,0,0,0,0,0,0) + +elseif (option == 2) then + player:updateEvent(lebros_assault_points,0,0,0,0,0,0,0) + +elseif (option == 3) then + player:updateEvent(periqia_assault_points,0,0,0,0,0,0,0) + +elseif (option == 4) then + player:updateEvent(ilrusi_assault_points,0,0,0,0,0,0,0) + +elseif (option == 10) then -- player traded Leujaoam points for permit + player:setVar("LEUJAOAM_ASSAULT_POINTS",leujaoam_assault_points-1500) + +elseif (option == 11) then -- player traded Mamool points for permit + player:setVar("MAMOOL_ASSAULT_POINTS",mamool_assault_points-1500) + +elseif (option == 12) then -- player traded Lebros points for permit + player:setVar("LEBROS_ASSAULT_POINTS",lebros_assault_points-1500) + +elseif (option == 13) then -- player traded Periqia points for permit + player:setVar("PERIQIA_ASSAULT_POINTS",periqia_assault_points-1500) + +elseif (option == 14) then -- player traded Ilrusi points for permit + player:setVar("ILRUSI_ASSAULT_POINTS",ilrusi_assault_points-1500) +end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +if (option == 100) then -- player wants a permit + player:addKeyItem(0x356); -- give player a remnants permit + player:messageSpecial(KEYITEM_OBTAINED,0x356); + player:setVar("LAST_REMNANTS_PERMIT_BOUGHT",os.time()); +elseif (option == 101) then -- player bought "copy of Wyrmseeker of Areuhat" for 150,000 Nyzul tokens + player:addItem(2489); + player:messageSpecial(ITEM_OBTAINED,2489); + player:setVar("NYZUL_TOKENS",nyzul_tokens-150000) +end +end; \ No newline at end of file Index: scripts/zones/Aht_Urhgan_Whitegate/TextIDs.lua =================================================================== --- scripts/zones/Aht_Urhgan_Whitegate/TextIDs.lua (revision 2121) +++ scripts/zones/Aht_Urhgan_Whitegate/TextIDs.lua (working copy) @@ -7,7 +7,9 @@ KEYITEM_OBTAINED = 218; -- Obtained key item: NOT_HAVE_ENOUGH_GIL = 0; -- You do not have enough gil HOMEPOINT_SET = 1272; -- Home point set! - + RUNIC_PORTAL = 3639; -- You cannot use the runic portal without the Empire's authorization. (UNCONF) + INVENTORY_FULL = 12045; -- Speak to me again after you've reorganized your inventory. (UNCONF) + -- Conquest system SANCTION = 9660; -- You have received the Empire's Sanction. Index: scripts/zones/Al_Zahbi/npcs/Falzuuk.lua =================================================================== --- scripts/zones/Al_Zahbi/npcs/Falzuuk.lua (revision 2121) +++ scripts/zones/Al_Zahbi/npcs/Falzuuk.lua (working copy) @@ -1,45 +1,73 @@ ------------------------------------ --- Area: Al Zahbi --- NPC: Falzuuk --- Type: Imperial Officer --- @zone: 48 --- @pos: -60.486 0.999 105.397 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x00d8, npc); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +------------------------------------------------------ +-- Area: Al Zahbi +-- NPC: Falzuuk +-- Type: Imperial Officer +-- @zone: 48 +-- @pos: +-- +-- Grants Sanction, sells items for imperial standing. +------------------------------------------------------ +package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; +require("scripts/zones/Al_Zahbi/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +function onTrigger(player,npc) + merc_rank = getMercenaryRank(player); + if (merc_rank == 0) then + player:startEvent(0x00d9,npc); + else + maps = getMapBitmask(player); + if (getAstralCandescence() == 1) then + maps = maps + 0x80000000; + end; + IS = player:getPoint(3); + x,y,z,w = getImperialDefenseStats(); + player:startEvent(0x00d8,IS,maps,merc_rank,0,x,y,z,w); + end; +end; + +function onEventSelection(player,csid,option) + if (csid == 0x00d8 and option>= 1 and option <= 2049) then + itemid = getISPItem(option); + player:updateEvent(0,0,0,canEquip(player, itemid)); + end; +end; + +function onTrade(player,npc,trade) +end; + +function onEventFinish(player,csid,option) +if (csid == 0x00d8) then + if (option == 0 or option == 16 or option == 32 or option == 48) then -- player chose sanction. + if (option ~=0) then + player:delPoint(3,100); + end; + player:delStatusEffect(EFFECT_SIGIL); + player:delStatusEffect(EFFECT_SANCTION); + player:delStatusEffect(EFFECT_SIGNET); + duration = getSanctionDuration(player); + if (option == 16) or (option == 32) then -- refresh and regen sanction + tick = 3; + else + tick = 0; + end; + player:addStatusEffect(EFFECT_SANCTION,option / 16,tick,duration); -- effect size 1=regen, 2=refresh, 3=food. + player:messageSpecial(SANCTION); + elseif (option % 256 == 17) then -- player bought one of the maps + id = MapOfMamook + (option-17)/256; + player:addKeyItem(id); + player:messageSpecial(KEYITEM_OBTAINED,id); + player:delPoint(3,1000); + elseif (option <= 2049) then -- player bought item + item, price = getISPItem(option); + if (player:getFreeSlotsCount() > 0) then + player:addItem(item); + player:messageSpecial(ITEM_OBTAINED,item); + player:delPoint(3,price); + else + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,item); + end; + end; +end; +end; \ No newline at end of file Index: scripts/zones/Al_Zahbi/npcs/Famatar.lua =================================================================== --- scripts/zones/Al_Zahbi/npcs/Famatar.lua (revision 2121) +++ scripts/zones/Al_Zahbi/npcs/Famatar.lua (working copy) @@ -1,45 +1,73 @@ ------------------------------------ --- Area: Al Zahbi --- NPC: Famatar --- Type: Imperial Officer --- @zone: 48 --- @pos: -105.538 0.999 75.456 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x00da, npc); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +------------------------------------------------------ +-- Area: Al Zahbi +-- NPC: Famatar +-- Type: Imperial Officer +-- @zone: 48 +-- @pos: -105.538 0.999 75.456 +-- +-- Grants Sanction, sells items for imperial standing. +------------------------------------------------------ +package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; +require("scripts/zones/Al_Zahbi/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/besieged"); + +function onTrigger(player,npc) + merc_rank = getMercenaryRank(player); + if (merc_rank == 0) then + player:startEvent(0x00db,npc); + else + maps = getMapBitmask(player); + if (getAstralCandescence() == 1) then + maps = maps + 0x80000000; + end; + IS = player:getPoint(3); + x,y,z,w = getImperialDefenseStats(); + player:startEvent(0x00da,IS,maps,merc_rank,0,x,y,z,w); + end; +end; + +function onEventSelection(player,csid,option) + if (csid == 0xDA and option>= 1 and option <= 2049) then + itemid = getISPItem(option); + player:updateEvent(0,0,0,canEquip(player, itemid)); + end; +end; + +function onTrade(player,npc,trade) +end; + +function onEventFinish(player,csid,option) +if (csid == 0xDA) then + if (option == 0 or option == 16 or option == 32 or option == 48) then -- player chose sanction. + if (option ~=0) then + player:delPoint(3,100); + end; + player:delStatusEffect(EFFECT_SIGIL); + player:delStatusEffect(EFFECT_SANCTION); + player:delStatusEffect(EFFECT_SIGNET); + duration = getSanctionDuration(player); + if (option == 16) or (option == 32) then -- refresh and regen sanction + tick = 3; + else + tick = 0; + end; + player:addStatusEffect(EFFECT_SANCTION,option / 16,tick,duration); -- effect size 1=regen, 2=refresh, 3=food. + player:messageSpecial(SANCTION); + elseif (option % 256 == 17) then -- player bought one of the maps + id = MapOfMamook + (option-17)/256; + player:addKeyItem(id); + player:messageSpecial(KEYITEM_OBTAINED,id); + player:delPoint(3,1000); + elseif (option <= 2049) then -- player bought item + item, price = getISPItem(option); + if (player:getFreeSlotsCount() > 0) then + player:addItem(item); + player:messageSpecial(ITEM_OBTAINED,item); + player:delPoint(3,price); + else + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,item); + end; + end; +end; +end; \ No newline at end of file Index: scripts/zones/Al_Zahbi/npcs/Kahah_Hobichai.lua =================================================================== --- scripts/zones/Al_Zahbi/npcs/Kahah_Hobichai.lua (revision 2121) +++ scripts/zones/Al_Zahbi/npcs/Kahah_Hobichai.lua (working copy) @@ -20,17 +20,20 @@ ----------------------------------- function onTrigger(player,npc) - -player:showText(npc,KAHAHHOBICHAI_SHOP_DIALOG); + if(getAstralCandescence() == 1) then + player:showText(npc,KAHAHHOBICHAI_SHOP_DIALOG); -stock = {0x005A,200, -- Rusty Bucket - 0x025d,200, -- Pickaxe (not available when AC is taken) - 0x03FC,300, -- Sickle (not available when AC is taken) - 0x03FD,500, -- Hatchet (not available when AC is taken) - 0x4051,164, -- Bronze Knife - 0x4052,2425} -- Knife - -showShop(player, STATIC, stock); + stock = {0x005A,200, -- Rusty Bucket + 0x025d,200, -- Pickaxe (not available when AC is taken) + 0x03FC,300, -- Sickle (not available when AC is taken) + 0x03FD,500, -- Hatchet (not available when AC is taken) + 0x4051,164, -- Bronze Knife + 0x4052,2425} -- Knife + + showShop(player, STATIC, stock); + else + player:messageSpecial(0); -- Missing the denied due to lack of Astral Candescence message. + end end; ----------------------------------- Index: scripts/zones/Al_Zahbi/npcs/Shihu-Danhu.lua =================================================================== --- scripts/zones/Al_Zahbi/npcs/Shihu-Danhu.lua (revision 2121) +++ scripts/zones/Al_Zahbi/npcs/Shihu-Danhu.lua (working copy) @@ -7,6 +7,7 @@ ----------------------------------- require("scripts/globals/teleports"); +require("scripts/globals/besieged"); ----------------------------------- -- onTrade Action @@ -20,7 +21,11 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x0067); + if(getAstralCandescence() == 1) then + player:startEvent(0x0067); + else + player:messageSpecial(0); -- Missing the denied due to lack of Astral Candescence message. + end end; ----------------------------------- Index: scripts/zones/Al_Zahbi/npcs/Suldiran.lua =================================================================== --- scripts/zones/Al_Zahbi/npcs/Suldiran.lua (revision 2121) +++ scripts/zones/Al_Zahbi/npcs/Suldiran.lua (working copy) @@ -1,45 +1,58 @@ ------------------------------------ --- Area: Al Zahbi --- NPC: Suldiran --- Type: NPC Quest --- @zone: 48 --- @pos: 41.658 -6.999 -42.528 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x000e); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Suldiran +-- Quest 'Fear of the Dark II' +----------------------------------- +-- Includes +package.loaded["scripts/zones/Al_Zahbi/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/quests"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + local questStatus = player:getQuestStatus(AHT_URHGAN,FEAR_OF_THE_DARK_II); + + if (questStatus == QUEST_AVAILABLE) then + player:startEvent(0x000E); + elseif (questStatus == QUEST_ACCEPTED) then + player:startEvent(0x000F); + elseif (questStatus == QUEST_COMPLETED) then + player:startEvent(0x0011); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) + local questStatus = player:getQuestStatus(AHT_URHGAN,FEAR_OF_THE_DARK_II); + local tradeCount = trade:getItemCount(); + local tradeChkG = trade:getGil(); + local tradeChk1 = trade:hasItemQty(0x873,2); -- 2163, Imp Wing + + if (tradeCount == 2 and tradeChkG == 0 and tradeChk1 == true and questStatus == QUEST_ACCEPTED) then + player:tradeComplete(); + player:startEvent(0x0010); + elseif (tradeCount == 2 and tradeChkG == 0 and tradeChk1 == true and questStatus == QUEST_COMPLETED) then + player:tradeComplete(); + player:startEvent(0x0012); + end +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x000E) then + player:addQuest(AHT_URHGAN,FEAR_OF_THE_DARK_II); + elseif (csid == 0x0010) then + player:setTitle(440); + player:addGil(200); + player:messageSpecial(GIL_OBTAINED,200); + player:completeQuest(AHT_URHGAN,FEAR_OF_THE_DARK_II); + elseif (csid == 0x0012) then + player:addGil(200); + player:messageSpecial(GIL_OBTAINED,200); + end +end; \ No newline at end of file Index: scripts/zones/Al_Zahbi/TextIDs.lua =================================================================== --- scripts/zones/Al_Zahbi/TextIDs.lua (revision 2121) +++ scripts/zones/Al_Zahbi/TextIDs.lua (working copy) @@ -5,9 +5,15 @@ ITEM_OBTAINED = 6378; -- Obtained: GIL_OBTAINED = 6379; -- Obtained gil KEYITEM_OBTAINED = 6381; -- Obtained key item: - + HOMEPOINT_SET = 1208; -- Home point Set! (UNCONF) + SHIHU_DANHU = 1624; -- I-I'm terribly s-sorry... I s-seem to be out of m-magic. M-maybe you can h-help me out another t-time...? (UNCONF) + -- Shop Texts ALLARD_SHOP_DIALOG = 0; -- [UNKNOWN] CHAYAYA_SHOP_DIALOG = 0; -- [UNKNOWN] KAHAHHOBICHAI_SHOP_DIALOG = 0; -- [UNKNOWN] ZAFIF_SHOP_DIALOG = 0; -- [UNKNOWN] +-- I don't want to be locked up in this funny-looking jar forrrever! Please get me out of here! (Not sure who this belongs to) + +-- Conquest system +SANCTION = 1633; -- You have received the Empire's Sanction. \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/_0x0.lua =================================================================== --- scripts/zones/AlTaieu/npcs/_0x0.lua (revision 2121) +++ scripts/zones/AlTaieu/npcs/_0x0.lua (working copy) @@ -1,48 +1,48 @@ ------------------------------------ --- Area: Al'Taieu --- NPC: Crystalline Field --- @pos 0 -10 -464 33 ------------------------------------ -package.loaded["scripts/zones/AlTaieu/TextIDs"] = nil; ------------------------------------ - -require("scripts/zones/AlTaieu/TextIDs"); - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0064); - return 1; -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) --- printf("CSID: %u",csid); --- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) --- printf("CSID: %u",csid); --- printf("RESULT: %u",option); - - if(csid == 0x0064 and option == 1) then - player:setPos(-20,0,-355,192,0x22); - end - +----------------------------------- +-- Area: Al'Taieu +-- NPC: Crystalline Field +-- @pos 0 -10 -464 33 +----------------------------------- +package.loaded["scripts/zones/AlTaieu/TextIDs"] = nil; +----------------------------------- + +require("scripts/zones/AlTaieu/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0064); + return 1; +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); + + if(csid == 0x0064 and option == 1) then + player:setPos(-20,0,-355,192,0x22); + end + end; \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/Auroral_Updraft.lua =================================================================== --- scripts/zones/AlTaieu/npcs/Auroral_Updraft.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/Auroral_Updraft.lua (working copy) @@ -0,0 +1,42 @@ +----------------------------------- +-- Author: ReaperX +-- Auroral Updraft +-- Teleport player to the palace entrance, or back to Sealion's Den. +----------------------------------- + +-- Events: +-- 0x96 return to the Sealion's Den +-- 0x9A - 0x9E return to palace entrance + +-- Problem: I could find no combination of event or update parameters that would +-- make 0x9A teleport the player and then play the reappearing animation. So I'm +-- porting the player via zonepos and then playing the reappearing animation 0x33. + +-- Small bug (?): player remains event-locked after porting back to palace entrance, +-- needs to press ESC. + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + X = player:getXPos(); + Z = player:getZPos(); + if (X > -54) and (X < -24) and (Z > -650) and (Z < -614) then + player:startEvent(0x96); + else + player:startEvent(0x9A); + end; +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x96) and (option == 1) then + player:setPos(610, 132, 774, 180, 0x20); -- to Sealion's Den + elseif (csid == 0x9A) and (option == 1) then + player:setPos(-25, 0, -615, 200); -- to Palace Entrance + player:startEvent(0x33); + end; +end; + Index: scripts/zones/AlTaieu/npcs/Dimensional_Portal.lua =================================================================== --- scripts/zones/AlTaieu/npcs/Dimensional_Portal.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/Dimensional_Portal.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Author: ReaperX +-- Dimensional Portals back to Dem, Mea, Holla +----------------------------------- + +----------------------------------- +--onTrigger Action-- (Trin) +----------------------------------- + +function onTrigger(player,npc) + X = player:getXPos(); + if (X < -600) then + player:startEvent(0x98); + elseif (X < 100) and (X > -100) then + player:startEvent(0x97); + else + player:startEvent(0x99); + end; +end; + + +----------------------------------- +-- onTrade Action (Tenjou) +----------------------------------- +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x98) and (option == 1) then + player:setPos(220,19,132,64,0x6c); + elseif (csid == 0x97) and (option == 1) then + player:setPos(420,19,-150,64,0x66); + elseif (csid == 0x99) and (option == 1) then + player:setPos(265,35,340,0,0x75); + end; +end; \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/qm1.lua =================================================================== --- scripts/zones/AlTaieu/npcs/qm1.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/qm1.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Author: ReaperX +-- ??? Jailer of Hope +----------------------------------- +require("scripts/globals/settings"); + +FifthVirtue = 0x737 +FourthVirtue = 0x738; +SixthVirtue = 0x739; +FirstVirtue = 0x73A +DeedOfPlacidity = 0x73B; +HQPhuaboOrgan = 0x73C; +SecondVirtue = 0x73D; +DeedOfModeration = 0x73E; +HQXzomitOrgan = 0x73F; +ThirdVirtue = 0x740; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0xC8); +end; + +function onTrade(player,npc,trade) + if (trade:getItemCount() == 3) and (trade:hasItemQty(FirstVirtue,1)) and (trade:hasItemQty(DeedOfPlacidity,1)) and (trade:hasItemQty(HQPhuaboOrgan,1)) then + trade:isComplete(); + loc = 0x21; + loc:spawnMob("JailerofHope",-676, 0, -68,138,player:getId()); + end; +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/qm2.lua =================================================================== --- scripts/zones/AlTaieu/npcs/qm2.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/qm2.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Author: ReaperX +-- ??? Jailer of Justice +----------------------------------- +require("scripts/globals/settings"); + +FifthVirtue = 0x737 +FourthVirtue = 0x738; +SixthVirtue = 0x739; +FirstVirtue = 0x73A +DeedOfPlacidity = 0x73B; +HQPhuaboOrgan = 0x73C; +SecondVirtue = 0x73D; +DeedOfModeration = 0x73E; +HQXzomitOrgan = 0x73F; +ThirdVirtue = 0x740; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0xC9); +end; + +function onTrade(player,npc,trade) + if (trade:getItemCount() == 3) and (trade:hasItemQty(SecondVirtue,1)) and (trade:hasItemQty(DeedOfModeration,1)) and (trade:hasItemQty(HQXzomitOrgan,1)) then + trade:isComplete(); + loc = 0x21; + loc:spawnMob("JailerofJustic",-281, 0, -466,232,player:getId()); + end; +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/qm3.lua =================================================================== --- scripts/zones/AlTaieu/npcs/qm3.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/qm3.lua (working copy) @@ -0,0 +1,44 @@ +----------------------------------- +-- Author: ReaperX +-- ??? Jailer of Prudence +----------------------------------- +require("scripts/globals/settings"); + +FifthVirtue = 0x737 +FourthVirtue = 0x738; +SixthVirtue = 0x739; +FirstVirtue = 0x73A +DeedOfPlacidity = 0x73B; +HQPhuaboOrgan = 0x73C; +SecondVirtue = 0x73D; +DeedOfModeration = 0x73E; +HQXzomitOrgan = 0x73F; +ThirdVirtue = 0x740; +DeedOfSensibility = 0x74E; +HQHpemdeOrgan = 0x74F; +GhrahMChip = 0x750; + + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0xCA); +end; + +function onTrade(player,npc,trade) + if (trade:getItemCount() == 3) and (trade:hasItemQty(ThirdVirtue,1)) and (trade:hasItemQty(DeedOfSensibility,1)) and (trade:hasItemQty(HQHpemdeOrgan,1)) then + trade:isComplete(); + loc = 0x21; + loc:spawnMob("JailerofPruden",706, -1.4, 17,0,player:getId()); + end; +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/qm4.lua =================================================================== --- scripts/zones/AlTaieu/npcs/qm4.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/qm4.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Author: ReaperX +-- ??? Jailer of Love +----------------------------------- +require("scripts/globals/settings"); + +FifthVirtue = 0x737 +FourthVirtue = 0x738; +SixthVirtue = 0x739; +FirstVirtue = 0x73A +DeedOfPlacidity = 0x73B; +HQPhuaboOrgan = 0x73C; +SecondVirtue = 0x73D; +DeedOfModeration = 0x73E; +HQXzomitOrgan = 0x73F; +ThirdVirtue = 0x740; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0xCB); +end; + +function onTrade(player,npc,trade) + if (trade:getItemCount() == 3) and (trade:hasItemQty(FourthVirtue,1)) and (trade:hasItemQty(FifthVirtue,1)) and (trade:hasItemQty(SixthVirtue,1)) then + trade:isComplete(); + loc = 0x21; + loc:spawnMob("JailerofLove",441, -2, -595,232,player:getId()); + end; +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +end; \ No newline at end of file Index: scripts/zones/AlTaieu/npcs/Swirling_Vortex.lua =================================================================== --- scripts/zones/AlTaieu/npcs/Swirling_Vortex.lua (revision 0) +++ scripts/zones/AlTaieu/npcs/Swirling_Vortex.lua (working copy) @@ -0,0 +1,25 @@ +----------------------------------- +-- Swirling Vortex +-- Leads to Apollyon +----------------------------------- + +function onTrigger(player,npc) + X = player:getXPos(); + if (X > 0) then + player:startEvent(0x9F); + else + player:startEvent(0xA0); + end; +end; + +function onTrade(player,npc,trade) + +end; + +function onEventFinish(player,csid,option) + if (csid == 0x9F) and (option == 1) then + player:setPos(600,0,-600,0,0x26); + elseif (csid == 0xA0) and (option == 1) then + player:setPos(-600,0,-600,0,0x26); + end; +end; \ No newline at end of file Index: scripts/zones/AlTaieu/Zone.lua =================================================================== --- scripts/zones/AlTaieu/Zone.lua (revision 2121) +++ scripts/zones/AlTaieu/Zone.lua (working copy) @@ -22,7 +22,7 @@ function onZoneIn(player,prevZone) cs = -1; if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then - player:setPos(0,0.079,718.112,60); + player:setPos(-25,0,-615,200); end return cs; end; Index: scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua =================================================================== --- scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua (revision 2121) +++ scripts/zones/Alzadaal_Undersea_Ruins/Zone.lua (working copy) @@ -44,7 +44,7 @@ function onZoneIn(player,prevZone) cs = -1; if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then - player:setPos(325,-6.5,-620,0); + player:setPos(223,0,19,127); end return cs; end; Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x006F); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger1.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger1.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger1.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger1 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0070); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger2.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger2.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger2.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger2 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0071); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger3.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger3.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger3.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger3 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0072); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger4.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger4.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger4.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger4 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0073); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger5.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger5.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger5.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger5 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0074); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger6.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger6.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger6.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger6 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0075); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger7.lua =================================================================== --- scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger7.lua (revision 0) +++ scripts/zones/Bastok-Jeuno_Airship/npcs/Passenger7.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger7 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0076); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Bastok_Markets/npcs/Rabid_Wolf_IM.lua =================================================================== --- scripts/zones/Bastok_Markets/npcs/Rabid_Wolf_IM.lua (revision 2121) +++ scripts/zones/Bastok_Markets/npcs/Rabid_Wolf_IM.lua (working copy) @@ -12,8 +12,8 @@ package.loaded["scripts/zones/Bastok_Markets/TextIDs"] = nil; package.loaded["scripts/globals/conquestguards"] = nil; ------------------------------------- - + require("scripts/globals/conquestguards"); require("scripts/zones/Bastok_Markets/TextIDs"); @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Bastok_Markets/npcs/Salimah.lua =================================================================== --- scripts/zones/Bastok_Markets/npcs/Salimah.lua (revision 2121) +++ scripts/zones/Bastok_Markets/npcs/Salimah.lua (working copy) @@ -105,8 +105,8 @@ fame=60; end - player:addGil(gil); - player:messageSpecial(GIL_OBTAINED,gil); + player:addGil(gil*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,gil*GIL_RATE); player:addFame(BASTOK,BAS_FAME*fame); player:addTitle(MOMMYS_HELPER); player:needToZone(true); Index: scripts/zones/Bastok_Markets_[S]/npcs/Adelbrecht.lua =================================================================== --- scripts/zones/Bastok_Markets_[S]/npcs/Adelbrecht.lua (revision 0) +++ scripts/zones/Bastok_Markets_[S]/npcs/Adelbrecht.lua (working copy) @@ -0,0 +1,58 @@ +----------------------------------- (NOT TESTED AT ALL) +-- Area: Bastok Markets [S] +-- NPC: Adelbrecht +-- Mission NPC +----------------------------------- + +package.loaded["scripts/zones/Bastok_Markets_[S]/TextIDs"] = nil; +require("scripts/zones/Bastok_Markets_[S]/TextIDs"); +require("scripts/globals/missions"); +require("scripts/globals/keyitems"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + blueRecommendationLetter = player:hasKeyItem(BLUE_RECOMMENDATION_LETTER); + currentMission = player:getCurrentMission(WOTG); + + if (currentMission == BACK_TO_THE_BEGINNING and blueRecommendationLetter == true) then + player:startEvent(0x008b); + elseif(currentMission == BACK_TO_THE_BEGINNING and blueRecommendationLetter == false) then + player:startEvent(0x008c); + elseif(currentMission > BACK_TO_THE_BEGINNING) then -- NEED TO ADD QUEST STUFF 'THE FIGHTING FOURTH' + player:startEvent(0x0003); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x008b and option == 0) then + player:delKeyItem(BLUE_RECOMMENDATION_LETTER); + player:addQuest(CRYSTAL_WAR,THE_FIGHTING_FOURTH); + player:addKeyItem(BATTLE_RATIONS); + player:messageSpecial(KEYITEM_OBTAINED,BATTLE_RATIONS) + end +end; \ No newline at end of file Index: scripts/zones/Bastok_Mines/npcs/Crying_Wind_IM.lua =================================================================== --- scripts/zones/Bastok_Mines/npcs/Crying_Wind_IM.lua (revision 2121) +++ scripts/zones/Bastok_Mines/npcs/Crying_Wind_IM.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Bastok_Mines/npcs/Trail_Markings.lua =================================================================== --- scripts/zones/Bastok_Mines/npcs/Trail_Markings.lua (revision 2121) +++ scripts/zones/Bastok_Mines/npcs/Trail_Markings.lua (working copy) @@ -29,7 +29,7 @@ player:startEvent(0x00CB); -- cs with Cornelia elseif(player:getVar("DynaBastok_Win") == 1) then player:startEvent(0x00d7,HYDRA_CORPS_EYEGLASS); -- Win CS - elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then + elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then -- and player:hasKeyItem(PRISMATIC_HOURGLASS)) then local firstDyna = 0; local realDay = tonumber(os.date("%j")) local dynaWaitxDay = player:getVar("dynaWaitxDay"); Index: scripts/zones/Bastok_Mines/npcs/Wahid.lua =================================================================== --- scripts/zones/Bastok_Mines/npcs/Wahid.lua (revision 2121) +++ scripts/zones/Bastok_Mines/npcs/Wahid.lua (working copy) @@ -66,8 +66,8 @@ player:tradeComplete(); player:completeQuest(BASTOK,THE_SIREN_S_TEAR); player:addFame(BASTOK,BAS_FAME*120); - player:addGil(150); - player:messageSpecial(GIL_OBTAINED,150); + player:addGil(150*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,150*GIL_RATE); player:addTitle(TEARJERKER); player:setVar("SirensTear",0); end Index: scripts/zones/Batallia_Downs/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/Batallia_Downs/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/Batallia_Downs/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to Batallia_Downs_S +----------------------------------- +package.loaded["scripts/zones/Batallia_Downs/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Batallia_Downs/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); +require("scripts/globals/missions"); + +function onTrigger(player,npc) + if (player:hasKeyItem(PURE_WHITE_FEATHER) == false) then + player:startEvent(0x01f4,0); + elseif (player:getVar("MAWS_BATALLIA") == 1) then + player:startEvent(0x038e); + else + player:messageSpecial(NOTHING_HAPPENS); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x01f4) then + r = math.random(1,3); + player:addKeyItem(PURE_WHITE_FEATHER); + player:messageSpecial(KEYITEM_OBTAINED, PURE_WHITE_FEATHER); + player:completeMission(WOTG,CAVERNOUS_MAWS); + player:addMission(WOTG,BACK_TO_THE_BEGINNING); + if (r == 1) then + player:setVar("MAWS_BATALLIA",1); + toMaw(player,1); -- Batallia_Downs[S] maw + elseif (r == 2) then + player:setVar("MAWS_ROLANBERRY",1); + toMaw(player,3); -- Rolanberry_Fields_[S] maw + elseif (r == 3) then + player:setVar("MAWS_SAUROMUGUE",1); + toMaw(player,5); -- Sauromugue_Champaign_[S] maw + end; + elseif (csid == 0x038e and option == 1) then + toMaw(player,1); -- Batallia_Downs[S] maw + end; +end; \ No newline at end of file Index: scripts/zones/Batallia_Downs/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Batallia_Downs/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Batallia_Downs/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x10000); end end; Index: scripts/zones/Batallia_Downs/TextIDs.lua =================================================================== --- scripts/zones/Batallia_Downs/TextIDs.lua (revision 2121) +++ scripts/zones/Batallia_Downs/TextIDs.lua (working copy) @@ -5,3 +5,4 @@ ITEM_OBTAINED = 6381; -- Obtained: GIL_OBTAINED = 6382; -- Obtained gil KEYITEM_OBTAINED = 6384; -- Obtained key item: + NOTHING_HAPPENS = 7248; -- Nothing happens... Index: scripts/zones/Batallia_Downs_[S]/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/Batallia_Downs_[S]/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/Batallia_Downs_[S]/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to Batallia Downs +----------------------------------- +package.loaded["scripts/zones/Batallia_Downs_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Batallia_Downs_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_BATALLIA") == 0) then + player:startEvent(0x0064); + player:setVar("MAWS_BATALLIA",1); + else + player:startEvent(0x0065); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x0064 or csid == 0x0065) and (option == 1)) then + toMaw(player,2); + end +end; \ No newline at end of file Index: scripts/zones/Batallia_Downs_[S]/npcs/Fortilace.lua =================================================================== --- scripts/zones/Batallia_Downs_[S]/npcs/Fortilace.lua (revision 0) +++ scripts/zones/Batallia_Downs_[S]/npcs/Fortilace.lua (working copy) @@ -0,0 +1,35 @@ +----------------------------------- +-- Fortilace +-- Teleports Players to Everbloom Hollow (D-6) for Campaign Ops +----------------------------------- +package.loaded["scripts/zones/Batallia_Downs_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Batallia_Downs_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + player:startEvent(0x00C8); +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x00C8) and (option == 1)) then + --player:setPos(); -- MISSING CORDS + end +end; \ No newline at end of file Index: scripts/zones/Beadeaux/npcs/Haggleblix.lua =================================================================== --- scripts/zones/Beadeaux/npcs/Haggleblix.lua (revision 2121) +++ scripts/zones/Beadeaux/npcs/Haggleblix.lua (working copy) @@ -4,18 +4,25 @@ -- Type: Dynamis NPC -- @zone: 147 -- @pos: -255.847 0.595 106.485 --- --- Auto-Script: Requires Verification +-- (WIP!) ----------------------------------- package.loaded["scripts/zones/Beadeaux/TextIDs"] = nil; -require("scripts/zones/Beadeaux/TextIDs"); +require("scripts/globals/keyitems"); ----------------------------------- -- onTrade Action ----------------------------------- function onTrade(player,npc,trade) + tradeChkG = trade:getGil(); + count = trade:getItemCount(); + + if(tradeChkG == 50000 and count == 0 and player:hasKeyItem(VIAL_OF_SHROUDED_SAND) and player:hasKeyItem(PRISMATIC_HOURGLASS) ~= true) then + player:addKeyItem(PRISMATIC_HOURGLASS); + player:messageSpecial(KEYITEM_OBTAINED,PRISMATIC_HOURGLASS); + player:tradeComplete(); + end end; ----------------------------------- @@ -23,7 +30,11 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x0082); + --if(player:hasKeyItem(VIAL_OF_SHROUDED_SAND) and player:hasKeyItem(PRISMATIC_HOURGLASS) ~= true) then + --player:startEvent(0x0033,0,0,0,1,PRISMATIC_HOURGLASS,50000); -- This does not work right... + --else + player:startEvent(0x0082); + --end end; ----------------------------------- Index: scripts/zones/Beadeaux/npcs/The_Mute.lua =================================================================== --- scripts/zones/Beadeaux/npcs/The_Mute.lua (revision 2121) +++ scripts/zones/Beadeaux/npcs/The_Mute.lua (working copy) @@ -2,13 +2,10 @@ -- Area: Beadeaux -- NPC: ??? -- @zone 147 --- @pos ----------------------------------- package.loaded["scripts/zones/Beadeaux/TextIDs"] = nil; ----------------------------------- -require("scripts/zones/Beadeaux/TextIDs"); - ----------------------------------- -- onTrade Action ----------------------------------- @@ -21,6 +18,9 @@ ----------------------------------- function onTrigger(player,npc) + if (player:getQuestStatus(BASTOK,THE_CURSE_COLLECTOR) == 1 and player:getVar("TCC_Mute_tempVar") == 0) then + player:setVar("TCC_Mute",1); + end if(player:hasStatusEffect(EFFECT_MUTE) == false) then player:addStatusEffect(EFFECT_MUTE,0,0,300); Index: scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Beadeaux/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Beadeaux/TextIDs"); @@ -88,8 +88,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Bearclaw_Pinnacle/Zone.lua =================================================================== --- scripts/zones/Bearclaw_Pinnacle/Zone.lua (revision 2121) +++ scripts/zones/Bearclaw_Pinnacle/Zone.lua (working copy) @@ -22,7 +22,7 @@ function onZoneIn(player,prevZone) cs = -1; if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then - player:setPos(-680,16,-540,129); + player:setPos(125,-192,660,249); end return cs; end; Index: scripts/zones/Bhaflau_Thickets/npcs/Kamih_Mapokhalam.lua =================================================================== --- scripts/zones/Bhaflau_Thickets/npcs/Kamih_Mapokhalam.lua (revision 2121) +++ scripts/zones/Bhaflau_Thickets/npcs/Kamih_Mapokhalam.lua (working copy) @@ -64,7 +64,7 @@ elseif(csid == 0x0092) then player:tradeComplete(); player:addKeyItem(MAP_OF_ALZADAAL_RUINS); - player:specialMessage(KEYITEM_OBTAINED,MAP_OF_ALZADAAL_RUINS); + player:messageSpecial(KEYITEM_OBTAINED,MAP_OF_ALZADAAL_RUINS); end end; \ No newline at end of file Index: scripts/zones/Buburimu_Peninsula/npcs/Song_Runes.lua =================================================================== --- scripts/zones/Buburimu_Peninsula/npcs/Song_Runes.lua (revision 2121) +++ scripts/zones/Buburimu_Peninsula/npcs/Song_Runes.lua (working copy) @@ -18,14 +18,11 @@ function onTrade(player,npc,trade) if (player:getVar("TheOldMonument_Event") == 3) then - count = trade:getItemCount(); - gil = trade:getGil(); - - if (trade:hasItemQty(917,1) == true and count == 1 and gil == 0) then + if (trade:hasItemQty(PARCHMENT,1) == true and trade:getItemCount() == 1 and trade:getGil() == 0) then player:tradeComplete(); player:completeQuest(JEUNO,THE_OLD_MONUMENT); - player:addItem(634,1); - player:messageSpecial(ITEM_OBTAINED, 634); + player:addItem(POETIC_PARCHMENT,1); + player:messageSpecial(ITEM_OBTAINED, POETIC_PARCHMENT); player:addTitle(RESEARCHER_OF_CLASSICS); player:addFame(BASTOK,BAS_FAME*10); player:addFame(SANDORIA,SAN_FAME*10); Index: scripts/zones/Buburimu_Peninsula/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Buburimu_Peninsula/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Buburimu_Peninsula/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x02000); end end; Index: scripts/zones/Buburimu_Peninsula/TextIDs.lua =================================================================== --- scripts/zones/Buburimu_Peninsula/TextIDs.lua (revision 2121) +++ scripts/zones/Buburimu_Peninsula/TextIDs.lua (working copy) @@ -1,16 +1,20 @@ --- Variable TextID Description text - --- General Texts -ITEM_CANNOT_BE_OBTAINED = 6378; -- You cannot obtain the item come back again after sorting your inventory - ITEM_OBTAINED = 6381; -- Obtained: - GIL_OBTAINED = 6382; -- Obtained gil - KEYITEM_OBTAINED = 6384; -- Obtained key item: - --- Conquest -CONQUEST = 7316; -- You've earned conquest points! - --- Logging -LOGGING_IS_POSSIBLE_HERE = 7300; -- Logging is possible here if you have - --- Dialog Texts -FIVEOFSPADES_DIALOG = 7156; -- GiMme★fIvE! FiVe is★A cArdIan★OF WiN-DuRst! FIvE★iS On★pA-tRol! +-- Variable TextID Description text + +-- General Texts +ITEM_CANNOT_BE_OBTAINED = 6378; -- You cannot obtain the item come back again after sorting your inventory + ITEM_OBTAINED = 6381; -- Obtained: + GIL_OBTAINED = 6382; -- Obtained gil + KEYITEM_OBTAINED = 6384; -- Obtained key item: + +-- Conquest +CONQUEST = 7316; -- "You've earned conquest points!" + +-- Quest Items +POETIC_PARCHMENT = 634; -- + PARCHMENT = 917; -- + +-- Logging +LOGGING_IS_POSSIBLE_HERE = 7300; -- Logging is possible here if you have + +-- Dialog Texts +FIVEOFSPADES_DIALOG = 7156; -- GiMme?fIvE! FiVe is?A cArdIan?OF WiN-DuRst! FIvE?iS On?pA-tRol! \ No newline at end of file Index: scripts/zones/Castle_Oztroja/npcs/Antiqix.lua =================================================================== --- scripts/zones/Castle_Oztroja/npcs/Antiqix.lua (revision 2121) +++ scripts/zones/Castle_Oztroja/npcs/Antiqix.lua (working copy) @@ -4,10 +4,10 @@ -- Type: Dynamis Vendor -- @zone: 151 -- @pos: -207.835 -0.751 -25.498 --- --- Auto-Script: Requires Verification (Verified by Brawndo) +-- (WIP!) ----------------------------------- package.loaded["scripts/zones/Castle_Oztroja/TextIDs"] = nil; +require("scripts/globals/keyitems"); ----------------------------------- ----------------------------------- @@ -15,6 +15,14 @@ ----------------------------------- function onTrade(player,npc,trade) + tradeChkG = trade:getGil(); + count = trade:getItemCount(); + + if(tradeChkG == 50000 and count == 0 and player:hasKeyItem(VIAL_OF_SHROUDED_SAND) and player:hasKeyItem(PRISMATIC_HOURGLASS) ~= true) then + player:addKeyItem(PRISMATIC_HOURGLASS); + player:messageSpecial(KEYITEM_OBTAINED,PRISMATIC_HOURGLASS); + player:tradeComplete(); + end end; ----------------------------------- @@ -22,7 +30,11 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x0032); + --if(player:hasKeyItem(VIAL_OF_SHROUDED_SAND) and player:hasKeyItem(PRISMATIC_HOURGLASS) ~= true) then + --player:startEvent(0x0033,0,0,0,1,PRISMATIC_HOURGLASS,50000); -- This does not work right... + --else + player:startEvent(0x0032); + --end end; ----------------------------------- Index: scripts/zones/Castle_Oztroja/npcs/Treasure_Chest.lua =================================================================== --- scripts/zones/Castle_Oztroja/npcs/Treasure_Chest.lua (revision 2121) +++ scripts/zones/Castle_Oztroja/npcs/Treasure_Chest.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Castle_Oztroja/TextIDs"); @@ -68,8 +68,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Castle_Oztroja/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Castle_Oztroja/TextIDs"); @@ -79,8 +79,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Chest.lua =================================================================== --- scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Chest.lua (revision 0) +++ scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Chest.lua (working copy) @@ -0,0 +1,104 @@ +----------------------------------- +-- Treasure Chest +----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/treasure"); +package.loaded["scripts/zones/Castle_Zvahl_Baileys/TextIDs"] = nil; +require("scripts/zones/Castle_Zvahl_Baileys/TextIDs"); +------------------------------------------- +-- Initialization variables +------------------------------------------- + treasureLVL = 52; + minLVL = 42; + zoneKey = 0x40E; -- 1038 +questItemNeeded = 0; +-- Loot + treasureGilArray = {0.346,5000,13950}; + treasureGemsArray = {0.077,Ametrine,Garnet,Goshenite,Peridot,Onyx,Sphene}; +treasureItemsArray = {0.577,PhalanxRing}; +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:messageSpecial(CHEST_LOCKED,zoneKey); +end; + +----------------------------------- +-- onTrade Action-- +----------------------------------- +function onTrade(player,npc,trade) + count = trade:getItemCount(); + keyTraded = trade:hasItemQty(zoneKey,1); + gil = trade:getGil(); + totl = 0; + UnMoment = 0x153; + -- A Test of True Love + if(player:getQuestStatus(1,62) == 1 and player:hasKeyItem(UnMoment) == 0) then + totl = 1; + questItemNeeded = totl; + end + + if (( keyTraded or isTHFKey(trade) ) and count == 1 and gil == 0) then -- Player traded a key and zero gil. + success_array = openChance(player,npc,trade,treasureLVL,minLVL,questItemNeeded); + success = success_array[1]; + message_type = success_array[2]; + -- Always shows this? + --if(message_type == CHEST_WEAK_AUX)then + --player:messageSpecial(CHEST_WEAK); + if(message_type == CHEST_ILLUSION_AUX)then + player:messageSpecial(CHEST_ILLUSION); + elseif(message_type == CHEST_FAIL_AUX)then + player:messageSpecial(CHEST_FAIL); + end + if(not(success == -2)) then + diceroll = math.random(); + diceroll = math.random(); + diceroll = math.random(); + player:tradeComplete(); + if (diceroll <= success) then + -- Succeded to open the coffer + player:messageSpecial(CHEST_UNLOCKED); + if( totl == 1) then + player:addKeyItem(UnMoment); + player:messageSpecial(KEYITEM_OBTAINED,UnMoment); + else + local loot = chestLoot(zone,npc); + if (loot[1] == "gil") then + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); + else + -- Item + player:addItem(loot[2]); + player:messageSpecial(ITEM_OBTAINED,loot[2]); + end + randomIllusionTime = math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME); + randomIllusionTime = math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME); + randomIllusionTime = math.random(CHEST_MIN_ILLUSION_TIME,CHEST_MAX_ILLUSION_TIME); + end + else + -- Failed to open the coffer. + if (success ~= -1 ) then -- success -1 means it failed cause of weakness or illusionTime. Other value means it normally failed to open + -- Now checking if It is a critical failure + critfailureroll = math.random(); + critfailureroll = math.random(); + critfailureroll = math.random(); + if (critfailureroll <= 0.2) then -- 20% chance + randomWeaknessTime = math.random(300,3600); + randomWeaknessTime = math.random(300,3600); + randomWeaknessTime = math.random(300,3600); + weakness = player:getStatusEffect(EFFECT_WEAKNESS); + if(weakness ~= nil)then + player:removeStatusType(EFFECT_WEAKNESS); + player:addStatusEffect(EFFECT_WEAKNESS,2,0,randomWeaknessTime); + else + player:addStatusEffect(EFFECT_WEAKNESS,1,0,randomWeaknessTime); + end + player:messageSpecial(CHEST_TRAP); + else + player:messageSpecial(CHEST_FAIL,1,1,1); + end + end + end + end -- Your key is not wasted + end -- traded a key +end; \ No newline at end of file Index: scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Castle_Zvahl_Baileys/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Castle_Zvahl_Baileys/TextIDs"); @@ -85,8 +85,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Castle_Zvahl_Keep/npcs/_4i5.lua =================================================================== --- scripts/zones/Castle_Zvahl_Keep/npcs/_4i5.lua (revision 2121) +++ scripts/zones/Castle_Zvahl_Keep/npcs/_4i5.lua (working copy) @@ -1,60 +1,54 @@ ------------------------------------ --- Area: Castle Zvahl Keep --- NPC: Ore door --- Involved In Quest: Recollections --- @pos -14 0 69 162 ------------------------------------ -package.loaded["scripts/zones/Castle_Zvahl_Keep/TextIDs"] = nil; ------------------------------------ - -require("scripts/globals/keyitems"); -require("scripts/zones/Castle_Zvahl_Keep/TextIDs"); - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) - - if(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED and player:getVar("recollectionsQuest") == 2) then - if(trade:hasItemQty(1106,1) and trade:getItemCount() == 1) then - player:startEvent(0x0008,1106); - end - end - -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0009); - return 1; -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) ---printf("CSID: %u",csid); ---printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) ---printf("CSID: %u",csid); ---printf("RESULT: %u",option); - - if(csid == 0x0008) then - player:tradeComplete(); - player:setVar("recollectionsQuest",3); - player:addKeyItem(FOE_FINDER_MK_I); - player:messageSpecial(KEYITEM_OBTAINED,FOE_FINDER_MK_I); - end - +----------------------------------- +-- Area: Castle Zvahl Keep +-- NPC: Ore door +-- Involved In Quest: Recollections +-- @pos -14 0 69 162 +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/quests"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + if(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED and player:getVar("windurstRecollectionsStep") == 2) then + if(trade:hasItemQty(1106,1) and trade:getItemCount() == 1) then + player:startEvent(0x0008,0x452); + end + end +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x0009); + return 1; +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0008) then + player:tradeComplete(); + player:setPos(-31,0,69,128); + player:addKeyItem(0xb5); + player:messageSpecial(KEYITEM_OBTAINED,181); + end end; \ No newline at end of file Index: scripts/zones/Cloister_of_Storms/mobs/Leviathan_Prime.lua =================================================================== --- scripts/zones/Cloister_of_Storms/mobs/Leviathan_Prime.lua (revision 0) +++ scripts/zones/Cloister_of_Storms/mobs/Leviathan_Prime.lua (working copy) @@ -0,0 +1,60 @@ +----------------------------------- +-- Area: Cloister of Tides +-- NPC: Leviathan Prime +-- Involved in Quest: Trial by Lightning, Trial Size Trial by Lightning +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); + +----------------------------------- +-- OnMobSpawn Action +----------------------------------- + +function onMobSpawn(mob) +end; + +----------------------------------- +-- OnMobDeath Action +----------------------------------- + +function onMobDeath(mob, killer) + + killer:setVar("BCNM_Killed",1); + record = 300; + partyMembers = 6; + pZone = killer:getZone(); + + killer:startEvent(0x7d01,0,record,0,(os.time() - killer:getVar("BCNM_Timer")),partyMembers,0,0); + +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("onUpdate CSID: %u",csid); +--printf("onUpdate RESULT: %u",option); + + if(csid == 0x7d01) then + player:delStatusEffect(EFFECT_BATTLEFIELD); + end + +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("onFinish CSID: %u",csid); +--printf("onFinish RESULT: %u",option); + + if(csid == 0x7d01) then + player:delKeyItem(TUNING_FORK_OF_WATER); + player:addKeyItem(WHISPER_OF_TIDES); + player:messageSpecial(KEYITEM_OBTAINED,WHISPER_OF_TIDES); + end + +end; \ No newline at end of file Index: scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua =================================================================== --- scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua (revision 2121) +++ scripts/zones/Crawlers_Nest/npcs/Treasure_Chest.lua (working copy) @@ -10,7 +10,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/zones/Crawlers_Nest/TextIDs"); local TreasureType = "Chest"; @@ -67,8 +67,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Crawlers_Nest/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Crawlers_Nest/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Crawlers_Nest/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Crawlers_Nest/TextIDs"); @@ -85,8 +85,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Crawlers_Nest_[S]/npcs/Kalsu-Kalasu.lua =================================================================== --- scripts/zones/Crawlers_Nest_[S]/npcs/Kalsu-Kalasu.lua (revision 0) +++ scripts/zones/Crawlers_Nest_[S]/npcs/Kalsu-Kalasu.lua (working copy) @@ -0,0 +1,56 @@ +----------------------------------- +-- Area: Crawlers Nest [S] +-- NPC: Kalsu-Kalasu +-- Mission NPC +----------------------------------- + +package.loaded["scripts/zones/Crawlers_Nest_[S]/TextIDs"] = nil; +require("scripts/zones/Crawlers_Nest_[S]/TextIDs"); +require("scripts/globals/missions"); +require("scripts/globals/keyitems"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + greenRecommendationLetter = player:hasKeyItem(GREEN_RECOMMENDATION_LETTER); + currentMission = player:getCurrentMission(WOTG); + + if (currentMission == BACK_TO_THE_BEGINNING and greenRecommendationLetter == false) then + player:startEvent(0x0001); + elseif(currentMission == BACK_TO_THE_BEGINNING and greenRecommendationLetter == true) then + player:startEvent(0x0002); + elseif(currentMission > BACK_TO_THE_BEGINNING) then + player:startEvent(0x0003); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0001 and option == 0) then + player:addKeyItem(GREEN_RECOMMENDATION_LETTER); + player:messageSpecial(KEYITEM_OBTAINED,GREEN_RECOMMENDATION_LETTER) + end +end; \ No newline at end of file Index: scripts/zones/Crawlers_Nest_[S]/npcs/Naiko-Paneiko.lua =================================================================== --- scripts/zones/Crawlers_Nest_[S]/npcs/Naiko-Paneiko.lua (revision 0) +++ scripts/zones/Crawlers_Nest_[S]/npcs/Naiko-Paneiko.lua (working copy) @@ -0,0 +1,57 @@ +----------------------------------- +-- Area: Crawlers Nest [S] +-- NPC: Naiko-Paneiko +-- Quest NPC +----------------------------------- + +package.loaded["scripts/zones/Crawlers_Nest_[S]/TextIDs"] = nil; +require("scripts/zones/Crawlers_Nest_[S]/TextIDs"); +require("scripts/globals/quests"); +require("scripts/globals/keyitems"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + scoopdedicatedLinkpearl = player:hasKeyItem(SCOOPDEDICATED_LINKPEARL); + questStatus = player:getQuestStatus(CRYSTAL_WAR,THE_WEEKLY_ADVENTURER); + + if (questStatus == QUEST_AVAILABLE) then + player:startEvent(0x0010); + elseif(questStatus == QUEST_ACCEPTED) then -- HAS DONE NOTHING, NEED HAS DONE, AND COMPLETED + player:startEvent(0x0015); + elseif(questStatus == QUEST_COMPLETED) then + player:startEvent(0x0004); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0010) then + player:addKeyItem(SCOOPDEDICATED_LINKPEARL); + player:messageSpecial(KEYITEM_OBTAINED,SCOOPDEDICATED_LINKPEARL); + player:addQuest(CRYSTAL_WAR,THE_WEEKLY_ADVENTURER); + end +end; \ No newline at end of file Index: scripts/zones/Dangruf_Wadi/Zone.lua =================================================================== --- scripts/zones/Dangruf_Wadi/Zone.lua (revision 2121) +++ scripts/zones/Dangruf_Wadi/Zone.lua (working copy) @@ -40,15 +40,15 @@ { [1] = function (x) player:startEvent(0x000A); - SendUncnown0x39Packet(17559896, 0x32); + SendUnknown0x39Packet(17559896, 0x32); end, [2] = function (x) player:startEvent(0x000B); - SendUncnown0x39Packet(17559897, 0x31); + SendUnknown0x39Packet(17559897, 0x31); end, [3] = function (x) player:startEvent(0x000C); - SendUncnown0x39Packet(17559898, 0x33); + SendUnknown0x39Packet(17559898, 0x33); end, } if (player:hasKeyItem(BLUE_ACIDITY_TESTER)) then Index: scripts/zones/Davoi/npcs/Lootblox.lua =================================================================== --- scripts/zones/Davoi/npcs/Lootblox.lua (revision 2121) +++ scripts/zones/Davoi/npcs/Lootblox.lua (working copy) @@ -4,10 +4,10 @@ -- Type: Standard NPC -- @zone: 149 -- @pos: 218.073 -0.982 -20.746 --- --- Auto-Script: Requires Verification (Verified by Brawndo) +-- (WIP!) ----------------------------------- package.loaded["scripts/zones/Davoi/TextIDs"] = nil; +require("scripts/globals/keyitems"); ----------------------------------- ----------------------------------- @@ -15,6 +15,14 @@ ----------------------------------- function onTrade(player,npc,trade) + tradeChkG = trade:getGil(); + count = trade:getItemCount(); + + if(tradeChkG == 50000 and count == 0 and player:hasKeyItem(VIAL_OF_SHROUDED_SAND) and player:hasKeyItem(PRISMATIC_HOURGLASS) ~= true) then + player:addKeyItem(PRISMATIC_HOURGLASS); + player:messageSpecial(KEYITEM_OBTAINED,PRISMATIC_HOURGLASS); + player:tradeComplete(); + end end; ----------------------------------- @@ -22,7 +30,11 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x0082); + --if(player:hasKeyItem(VIAL_OF_SHROUDED_SAND) and player:hasKeyItem(PRISMATIC_HOURGLASS) ~= true) then + --player:startEvent(0x0033,0,0,0,1,PRISMATIC_HOURGLASS,50000); -- This does not work right... + --else + player:startEvent(0x0082); + --end end; ----------------------------------- Index: scripts/zones/Den_of_Rancor/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Den_of_Rancor/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Den_of_Rancor/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Den_of_Rancor/TextIDs"); @@ -67,8 +67,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Dynamis-Buburimu/Zone.lua =================================================================== --- scripts/zones/Dynamis-Buburimu/Zone.lua (revision 2121) +++ scripts/zones/Dynamis-Buburimu/Zone.lua (working copy) @@ -20,9 +20,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(163,0,-153,164); -- Completely wrong? + end + return cs; end; ----------------------------------- Index: scripts/zones/Dynamis-Qufim/Zone.lua =================================================================== --- scripts/zones/Dynamis-Qufim/Zone.lua (revision 2121) +++ scripts/zones/Dynamis-Qufim/Zone.lua (working copy) @@ -20,9 +20,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(113,-7,116,124); + end + return cs; end; ----------------------------------- Index: scripts/zones/East_Ronfaure/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/East_Ronfaure/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/East_Ronfaure/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to East Ronfaure [S] +----------------------------------- +package.loaded["scripts/zones/East_Ronfaure/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/East_Ronfaure/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_RONFAURE") == 1 and player:hasKeyItem(PURE_WHITE_FEATHER) == true) then + player:startEvent(0x0388); + else + player:messageSpecial(NOTHING_HAPPENS); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x0388 and option == 1) then + toMaw(player,9); + end +end; \ No newline at end of file Index: scripts/zones/East_Ronfaure/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/East_Ronfaure/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/East_Ronfaure/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00002); end end; Index: scripts/zones/East_Ronfaure_[S]/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/East_Ronfaure_[S]/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/East_Ronfaure_[S]/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,41 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to East Ronfaure +----------------------------------- +package.loaded["scripts/zones/East_Ronfaure_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/East_Ronfaure_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_RONFAURE") == 1) then + player:startEvent(0x0065); + else + player:startEvent(0x0064); + player:setVar("MAWS_RONFAURE",1) + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x0065 or csid == 0x0064) and (option == 1)) then + toMaw(player,10); + end +end; \ No newline at end of file Index: scripts/zones/East_Sarutabaruta/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/East_Sarutabaruta/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/East_Sarutabaruta/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00800); end end; Index: scripts/zones/Empyreal_Paradox/Zone.lua =================================================================== --- scripts/zones/Empyreal_Paradox/Zone.lua (revision 2121) +++ scripts/zones/Empyreal_Paradox/Zone.lua (working copy) @@ -22,9 +22,12 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + --player:setPos(502,0,500,222); -- BC Area + player:setPos(539,-1,-500,69); + end + return cs; end; ----------------------------------- Index: scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Garlaige_Citadel/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Garlaige_Citadel/TextIDs"); @@ -85,8 +85,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Garlaige_Citadel_[S]/npcs/Randecque.lua =================================================================== --- scripts/zones/Garlaige_Citadel_[S]/npcs/Randecque.lua (revision 0) +++ scripts/zones/Garlaige_Citadel_[S]/npcs/Randecque.lua (working copy) @@ -0,0 +1,56 @@ +----------------------------------- (NOT TESTED AT ALL) +-- Area: Garlaige Citadel [S] +-- NPC: Randecque +-- Mission NPC +----------------------------------- + +package.loaded["scripts/zones/Garlaige_Citadel_[S]/TextIDs"] = nil; +require("scripts/zones/Garlaige_Citadel_[S]/TextIDs"); +require("scripts/globals/missions"); +require("scripts/globals/keyitems"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + redRecommendationLetter = player:hasKeyItem(RED_RECOMMENDATION_LETTER); + currentMission = player:getCurrentMission(WOTG); + + if (currentMission == BACK_TO_THE_BEGINNING and redRecommendationLetter == false) then + player:startEvent(0x0001); + elseif(currentMission == BACK_TO_THE_BEGINNING and redRecommendationLetter == true) then + player:startEvent(0x0002); + elseif(currentMission > BACK_TO_THE_BEGINNING) then + player:startEvent(0x0003); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0001 and option == 0) then + player:addKeyItem(RED_RECOMMENDATION_LETTER); + player:messageSpecial(KEYITEM_OBTAINED,RED_RECOMMENDATION_LETTER) + end +end; \ No newline at end of file Index: scripts/zones/Giddeus/npcs/Treasure_Chest.lua =================================================================== --- scripts/zones/Giddeus/npcs/Treasure_Chest.lua (revision 2121) +++ scripts/zones/Giddeus/npcs/Treasure_Chest.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Giddeus/TextIDs"); @@ -55,8 +55,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Hall_of_Transference/npcs/_0e2.lua =================================================================== --- scripts/zones/Hall_of_Transference/npcs/_0e2.lua (revision 0) +++ scripts/zones/Hall_of_Transference/npcs/_0e2.lua (working copy) @@ -0,0 +1,53 @@ +----------------------------------- +-- Area: Hall of Transference +-- NPC: Cermet Gate (Mea) +----------------------------------- +package.loaded["scripts/zones/Hall_of_Transference/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Hall_of_Transference/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getCurrentMission(COP) <= BELOW_THE_ARKS) then + player:messageSpecial(FIRMLY_SHUT); + else + player:startEvent(0x0096); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + + if(csid == 0x0096 and option == 1) then + player:setPos(-96,0,174,155,0x14); + end + +end; \ No newline at end of file Index: scripts/zones/Hall_of_Transference/npcs/_0e7.lua =================================================================== --- scripts/zones/Hall_of_Transference/npcs/_0e7.lua (revision 0) +++ scripts/zones/Hall_of_Transference/npcs/_0e7.lua (working copy) @@ -0,0 +1,54 @@ +----------------------------------- +-- Area: Hall of Transference +-- NPC: Large Apparatus (Mea, Left) +----------------------------------- +package.loaded["scripts/zones/Hall_of_Transference/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Hall_of_Transference/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") > 2) then + player:startEvent(0x00a0); + else + player:messageSpecial(NO_RESPONSE); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + + if(csid == 0x00a0) then + player:setPos(-96,0,174,155,0x14); + player:setVar("CopStatus",3); + end + +end; \ No newline at end of file Index: scripts/zones/Hall_of_Transference/npcs/_0e8.lua =================================================================== --- scripts/zones/Hall_of_Transference/npcs/_0e8.lua (revision 0) +++ scripts/zones/Hall_of_Transference/npcs/_0e8.lua (working copy) @@ -0,0 +1,48 @@ +----------------------------------- +-- Area: Hall of Transference +-- NPC: Large Apparatus (Mea, Right) +----------------------------------- +package.loaded["scripts/zones/Hall_of_Transference/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Hall_of_Transference/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(1 > 2) then -- Something to due with having the keyitem missing chip + player:startEvent(0x00a4); + else + player:startEvent(0x00a3); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Hall_of_Transference/TextIDs.lua =================================================================== --- scripts/zones/Hall_of_Transference/TextIDs.lua (revision 2121) +++ scripts/zones/Hall_of_Transference/TextIDs.lua (working copy) @@ -5,3 +5,5 @@ ITEM_OBTAINED = 6378; -- Obtained: GIL_OBTAINED = 6379; -- Obtained gil KEYITEM_OBTAINED = 6381; -- Obtained key item: + NO_RESPONSE = 7189; -- There is no response. + FIRMLY_SHUT = 7190; -- The door is firmly shut. Index: scripts/zones/Hall_of_Transference/Zone.lua =================================================================== --- scripts/zones/Hall_of_Transference/Zone.lua (revision 2121) +++ scripts/zones/Hall_of_Transference/Zone.lua (working copy) @@ -2,6 +2,12 @@ -- -- Zone: Hall_of_Transference -- +-- Consists of three separate but identically looking areas, for dem, holla and mea: +-- 280 -80 -68 (mea) +-- -260 -40 -280 (dem) +-- -260 0 280 (holla) +-- +-- 0x009b "I heard you were poking your nose at the Second Creig so I knew you would show here" ----------------------------------- require("scripts/globals/settings"); @@ -13,6 +19,9 @@ ----------------------------------- function onInitialize(zone) + zone:registerRegion(1, 277, -83, -80, 282, -82, -77); -- porter back to mea + zone:registerRegion(2, -281, -43, -277, -277, -42, -282); -- porter back to dem + zone:registerRegion(3, -281, -3, 277, -277, -2, 283); -- porter back to holla end; ----------------------------------- @@ -20,9 +29,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(279,-80,-68,193); + end + return cs; end; ----------------------------------- @@ -30,8 +41,32 @@ ----------------------------------- function onRegionEnter(player,region) + + switch (region:GetRegionID()): caseof + { + [1] = function (x) + player:setVar("option",1); + player:startEvent(0x00A1); + end, + [2] = function (x) + player:setVar("option",1); + player:startEvent(0x00A1); + end, + [3] = function (x) + player:setVar("option",1); + player:startEvent(0x00A1); + end, + } + end; +----------------------------------- +-- onRegionLeave +----------------------------------- + +function onRegionLeave(player,region) +end; + ----------------------------------- -- onEventUpdate ----------------------------------- @@ -46,8 +81,19 @@ ----------------------------------- function onEventFinish(player,csid,option) ---printf("CSID: %u",csid); ---printf("RESULT: %u",option); +printf("CSID: %u",csid); +printf("RESULT: %u",option); + if (option == 1) and (csid == 0x00A1) then + x = player:getXPos(); + z = player:getZPos(); + if (x > 0) then + player:setPos(179,35,250,64,0x75); -- -> back to mea shattered telepoint + elseif (z < 0) then + player:setPos(131,20,220,128,0x6c); -- -> back to dem shattered telepoint + else + player:setPos(338,19,-60,0,0x66); -- -> back to holla shattered telepoint + end; + end end; Index: scripts/zones/Heavens_Tower/npcs/Chumimi.lua =================================================================== --- scripts/zones/Heavens_Tower/npcs/Chumimi.lua (revision 2121) +++ scripts/zones/Heavens_Tower/npcs/Chumimi.lua (working copy) @@ -1,15 +1,15 @@ ----------------------------------- -- Area: Heaven's Tower -- NPC: Chumimi --- Starts and Finishes Quest: The Three Magi, Recollections --- @pos 0 30 21 242 +-- Starts and Finishes Several BLM quests +-- @zone 242 +-- @pos 0 30 21 ----------------------------------- package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/titles"); -require("scripts/globals/keyitems"); require("scripts/globals/quests"); require("scripts/zones/Heavens_Tower/TextIDs"); @@ -18,17 +18,21 @@ ----------------------------------- function onTrade(player,npc,trade) - + if(player:getQuestStatus(WINDURST,THE_THREE_MAGI) == QUEST_ACCEPTED) then if(trade:hasItemQty(1104,1) and trade:getItemCount() == 1) then -- Trade Glowstone player:startEvent(0x010d); -- Finish Quest "The Three Magi" end - elseif(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED and player:getVar("recollectionsQuest") < 2) then + elseif(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED) then if(trade:hasItemQty(1105,1) and trade:getItemCount() == 1) then - player:startEvent(0x010F); + player:startEvent(0x010f); end + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 1) then + if (trade:hasItemQty(829,1) and trade:getItemCount() == 1) then + player:startEvent(0x0116); + end end - + end; ----------------------------------- @@ -37,26 +41,57 @@ function onTrigger(player,npc) - theThreeMagi = player:getQuestStatus(WINDURST,THE_THREE_MAGI); - recollections = player:getQuestStatus(WINDURST,RECOLLECTIONS); + theThreeMagi = player:getQuestStatus(WINDURST,THE_THREE_MAGI); + recollections = player:getQuestStatus(WINDURST,RECOLLECTIONS); + theRootOfTheProblem = player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM); mLvl = player:getMainLvl(); mJob = player:getMainJob(); - if(theThreeMagi == QUEST_AVAILABLE and mJob == 4 and mLvl >= AF1_QUEST_LEVEL) then + if(theThreeMagi == QUEST_AVAILABLE and mJob == 4 and mLvl >= 40) then player:startEvent(0x0104,0,613,0,0,0,1104); -- Start Quest "The Three Magi" --- NOTE: 5th parameter is "Meteorites" but he doesn't exist --- elseif(theThreeMagi == QUEST_ACCEPTED) then player:startEvent(0x0105,0,0,0,0,0,1104); -- During Quest "The Three Magi" - elseif(theThreeMagi == QUEST_COMPLETED and recollections == QUEST_AVAILABLE and (mJob == 4 and mLvl < AF2_QUEST_LEVEL or mJob ~= 4)) then - player:startEvent(0x010c); -- New standard dialog after "The Three Magi" - elseif(theThreeMagi == QUEST_COMPLETED and mJob == 4 and mLvl >= AF2_QUEST_LEVEL and player:needToZone() == false and recollections == QUEST_AVAILABLE) then - player:startEvent(0x010E,0,1105); -- Start Quest "Recollections" - elseif(recollections == QUEST_ACCEPTED and player:hasKeyItem(FOE_FINDER_MK_I)) then - player:startEvent(0x0113); -- Finish Quest "Recollections" + elseif(recollections == QUEST_AVAILABLE and theThreeMagi == QUEST_COMPLETED and mJob == 4 and mLvl >= 50) then + player:startEvent(0x010e,0x451,0x451,0x451,0x451); + elseif(recollections == QUEST_ACCEPTED) then + if(player:getVar("windurstRecollectionsStep") == 1) then + player:startEvent(0x0110); + elseif(player:getVar("windurstRecollectionsStep") == 2) then + if(player:hasKeyItem(0xb5)) then + player:startEvent(0x0113); + else + player:startEvent(0x0111); + end + end + elseif(theRootOfTheProblem == QUEST_AVAILABLE and recollections == QUEST_COMPLETED and mJob == 4 and mLvl >= 50) then + player:startEvent(0x0114,0,0x33d); + elseif(theRootOfTheProblem == QUEST_ACCEPTED) then + if(player:getVar("windurstTheRootOfTheProblem") == 1) then + player:startEvent(0x0118); + elseif(player:getVar("windurstTheRootOfTheProblem") == 2) then + player:startEvent(0x0117); + elseif(player:getVar("windurstTheRootOfTheProblem") == 7) then + player:startEvent(0x0119,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6); + else + player:startEvent(0x0112); + end else - player:startEvent(0x0103); -- Standard dialog + if(theThreeMagi == QUEST_COMPLETED and recollections ~= QUEST_COMPLETED and (mJob == 4 and mLvl < 50 or mJob ~= 4)) then + player:startEvent(0x010c); -- New standard dialog after "The Three Magi" + elseif(recollections == QUEST_COMPLETED and theRootOfTheProblem ~= QUEST_COMPLETED) then + if(player:getVar("windurstTheRootOfTheProblem") == 2) then + player:startEvent(0x0115,0,0x33d); + else + player:startEvent(0x0112); + end + elseif(theRootOfTheProblem == QUEST_COMPLETED and (mJob == 4 and mLvl < 50 or mJob ~= 4)) then + player:startEvent(0x011a); -- Maybe not... FIXME + else + player:startEvent(0x0103); -- Standard dialog + end end - + end; ----------------------------------- @@ -80,6 +115,9 @@ -- option 3: Koru-Moru -- option 2: Shantotto -- option 1: Yoran-Oran player:addQuest(WINDURST,THE_THREE_MAGI); player:setVar("theThreeMagiSupport",option); + elseif(csid == 0x010e) then + player:addQuest(WINDURST,RECOLLECTIONS); + player:setVar("windurstRecollectionsStep",1); elseif(csid == 0x010d) then if(player:getFreeSlotsCount() == 0) then player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,17423); -- Casting Wand @@ -97,27 +135,41 @@ player:tradeComplete(); player:addItem(17423); player:messageSpecial(ITEM_OBTAINED, 17423); -- Casting Wand - player:needToZone(true); player:setVar("theThreeMagiSupport",0); - player:addFame(WINDURST,WIN_FAME*AF1_FAME); + player:addFame(WINDURST,WIN_FAME*30); player:completeQuest(WINDURST,THE_THREE_MAGI); end - elseif(csid == 0x010E) then - player:addQuest(WINDURST,RECOLLECTIONS); - elseif(csid == 0x010F) then - player:tradeComplete(); - player:setVar("recollectionsQuest",2); + elseif(csid == 0x010f) then + player:setVar("windurstRecollectionsStep",2); elseif(csid == 0x0113) then - if(player:getFreeSlotsCount() == 0) then - player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,14092); -- wizards sabots + if(player:getFreeSlotsCount() == 0) then + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,14092); else - player:setVar("recollectionsQuest",0); - player:delKeyItem(FOE_FINDER_MK_I); - player:addItem(14092); - player:messageSpecial(ITEM_OBTAINED,14092); -- wizards sabots - player:addFame(WINDURST,WIN_FAME*AF2_FAME); + player:delKeyItem(0xb5); + player:addItem(0x370c); + player:messageSpecial(ITEM_OBTAINED, 14092); + player:setVar("windurstRecollectionsStep",0); player:completeQuest(WINDURST,RECOLLECTIONS); + player:addFame(WINDURST,WIN_FAME*30); end + elseif(csid == 0x0114) then + player:setVar("windurstTheRootOfTheProblem",1); + player:addQuest(WINDURST,THE_ROOT_OF_THE_PROBLEM); + elseif(csid == 0x0117) then + player:addKeyItem(0xb4); + player:messageSpecial(KEYITEM_OBTAINED,180); + player:setVar("windurstTheRootOfTheProblem",3); + elseif(csid == 0x0119) then + if(player:getFreeSlotsCount() == 0) then + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,13856); + else + player:addItem(0x3620); + player:messageSpecial(ITEM_OBTAINED,13856); + player:setVar("windurstTheRootOfTheProblem",8); + player:completeQuest(WINDURST,THE_ROOT_OF_THE_PROBLEM); + player:setTitle(PARAGON_OF_BLACK_MAGE_EXCELLENCE); + player:addFame(WINDURST,WIN_FAME*30); + end end - -end; \ No newline at end of file + +end; Index: scripts/zones/Heavens_Tower/npcs/Rhy_Epocan.lua =================================================================== --- scripts/zones/Heavens_Tower/npcs/Rhy_Epocan.lua (revision 2121) +++ scripts/zones/Heavens_Tower/npcs/Rhy_Epocan.lua (working copy) @@ -1,65 +1,113 @@ ------------------------------------ --- Area: Heavens Tower --- NPC: Rhy Epocan --- Involved in Mission 3-1 --- @pos 2 -48 14 242 ------------------------------------ -package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; -package.loaded["scripts/globals/missions"] = nil; ------------------------------------ - -require("scripts/globals/missions"); -require("scripts/zones/Heavens_Tower/TextIDs"); - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - - currentMission = player:getCurrentMission(WINDURST); - MissionStatus = player:getVar("MissionStatus"); - - if(currentMission == TO_EACH_HIS_OWN_RIGHT and MissionStatus == 1) then - player:startEvent(0x006B); - elseif(currentMission == TO_EACH_HIS_OWN_RIGHT and MissionStatus == 2) then - player:startEvent(0x006C); - elseif(currentMission == TO_EACH_HIS_OWN_RIGHT and MissionStatus == 4) then - player:startEvent(0x0072); - else - player:startEvent(0x005d); - end - -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) --- printf("CSID: %u",csid); --- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) --- printf("CSID: %u",csid); -printf("RESULT: %u",option); - - if(csid == 0x006B) then - player:setVar("MissionStatus",2); - elseif(csid == 0x0072) then - finishMissionTimeline(player,2,csid,option); - end - +----------------------------------- +-- Area: Heavens Tower +-- NPC: Rhy Epocan +-- Involved in Mission 3-1 +-- @pos 2 -48 14 242 +----------------------------------- +package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; +package.loaded["scripts/globals/missions"] = nil; +----------------------------------- + +require("scripts/globals/missions"); +require("scripts/zones/Heavens_Tower/TextIDs"); + +--[[ events: +005D default message +0006 Ajido-Marujido appears (incomplete CS, played as part of 6B) +006B 3-1: CS with Semih Lafihna, Ajido-Marujido appears +006C 3-1 reaction after 6B +0072 3-1 CS after you're back from castle O. +0073 3-1 reaction after 72 +009E for 3-3 +00A0 "remember, you will be representing your country. Act accordingly!" +00AA "proceeed to the door in the back." (currently not used) +00AF "The talisman sealing Castle Zvahl has been stolen from the Horutoto Rrruins." +00C3 "proceeed to the door in the back." (end of mission 5-2) +00C8 "I knew it! The beastmen were planning the rrreturn of the shadow lord all along." +00DA her reaction to the Shadow Lord's death +013E her reaction after you reach rank 6. +0143 After the defeat of the shadow lord, I thought there would be a change in attitude from the Yagudo. +012E "proceeed to the door in the back." (beginning of mission 6-2 ?) +0133 "The Shadow Lord has fallen, but the beastmen are still stirring.." +0171 "I feel so useless.. our best attacks merely rebounded off that ring. So this is what it feels like to be completely outmatched.." (9-1) +0176 talks about the Joker and the bearer of Darkness (after 9-1) +0178 "Semih Lafihna awaits you in the Vestal Chamber" (9-2) +017C "Let us join our strength and change the flow of fate." (9-2) +0195 Talks about the yagudo (9-2?) +0x182 (CS for 9-2) +--]] + +require("scripts/globals/settings"); + +function onTrigger(player,npc) +currentMission = player:getCurrentMission(WINDURST); + MissionStatus = player:getVar("MissionStatus"); + + if(currentMission == TO_EACH_HIS_OWN_RIGHT and MissionStatus == 1) then + player:startEvent(0x006B); + elseif(currentMission == TO_EACH_HIS_OWN_RIGHT and MissionStatus == 2) then + player:startEvent(0x006C); + elseif(currentMission == TO_EACH_HIS_OWN_RIGHT and MissionStatus == 4) then + player:startEvent(0x0072); + --[[elseif (player:getMissionStatus(2,10) == 2) and (player:getMissionStatus(2,11) == 0) then + player:startEvent(0x73); + elseif ((player:getMissionStatus(2,23) == 1) and (mission_status >= 5)) or (player:getNation() == 2 and player:getRank() == 10) then + player:startEvent(0x17C); -- new default message (speculative) + elseif (player:getMissionStatus(2,23) == 1) and (mission_status == 4) then + player:startEvent(0x195); + elseif (player:getMissionStatus(2,23) == 1) and (mission_status >= 2) then + player:startEvent(0x17C); + elseif (player:getMissionStatus(2,23) == 1) and (mission_status == 1) then + player:startEvent(0x178); + elseif (player:getMissionStatus(2,22) == 2) then + player:startEvent(0x176); + elseif (player:getMissionStatus(2,22) == 1) and (mission_status >= 2) then + player:startEvent(0x171); + elseif (player:getMissionStatus(2,17) == 1) and mission_status == 1 then + player:startEvent(0x12E); + elseif (player:hasKeyItem(StarCrestedSummons) == 1) then + player:startEvent(0x9E); + elseif (player:hasKeyItem(LetterToTheAmbassador) == 1) then + player:startEvent(0xA0); + elseif (player:hasKeyItem(BurntSeal) == 1) then + player:startEvent(0xC3); + elseif (player:hasKeyItem(MessageToJeunoWindurst) == 1) or (player:getMissionStatus(2,14) == 1) then + player:startEvent(0xAF); + elseif player:getMissionStatus(2,15) == 2 then + player:startEvent(0x13E); + elseif (player:hasKeyItem(ShadowFragment) == 1) then + player:startEvent(0xDA); + elseif (player:getMissionStatus(2,14) == 2) then + player:startEvent(0xC8);]]-- + else + player:startEvent(0x005D); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if(csid == 0x006B) then + player:setVar("MissionStatus",2); + elseif(csid == 0x0072) then + finishMissionTimeline(player,2,csid,option); + end end; \ No newline at end of file Index: scripts/zones/Heavens_Tower/npcs/Shaz_Norem.lua =================================================================== --- scripts/zones/Heavens_Tower/npcs/Shaz_Norem.lua (revision 2121) +++ scripts/zones/Heavens_Tower/npcs/Shaz_Norem.lua (working copy) @@ -1,45 +1,71 @@ ------------------------------------ --- Area: Heavens Tower --- NPC: Shaz Norem --- Type: Standard NPC --- @zone: 242 --- @pos: 2.805 -47.999 -15.083 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x005b); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +--------------------------------------------------------------------- +-- Shaz Norem +-- one of the Sibyl Guards, involved in Windurst Missions +--------------------------------------------------------------------- + +require("scripts/globals/settings"); + +function onTrigger(player,npc) + +--[[ events: +0x05B standard greetings +0x006 Ajido-Marujido appears (incomplete CS, played as part of 6B) +0x06B (3-1: CS with Semih Lafihna, Ajido-Marujido appears) +0x06E her reaction to 6B +0x072 (3-1 CS after you're back from castle O.) +0x075 her reaction to 72 +0x0AE after the talisman was stolen +0x0C7 her reaction after 5-1 +0x0DE her reaction to the Shadow Lord's death +0x141 as you can see, we Sibyl guards are not a chosen few.. +0x132 do you remember the bearer of darkness that appeared here? Someone came here claiming to have seen it in another country.. +0x16D 9-1 (talks about the bearer of darkness) +0x173 "Rescuing the Star Sibyl will best be accomplished by a small, well-coordinated team. " (after 9-1, into 9-2) +0x17F talks about the Yagudo's attack plans (9-2) +0x191 talks about the Yagudo's obsession with the magix towers (?) +--]] + +mission_status = player:getVar("mission_status"); + +if (player:getMissionStatus(2,10) == 1) and (mission_status == 3) then + player:startEvent(0x6E); +elseif (player:getMissionStatus(2,10) == 2) and (player:getMissionStatus(2,11) == 0) then + player:startEvent(0x75); +elseif (player:hasKeyItem(MessageToJeunoWindurst) == 1) or (player:getMissionStatus(2,14) == 1) then + player:startEvent(0xAE); +elseif ((player:getMissionStatus(2,23) == 1) and (mission_status >= 5)) or (player:getNation() == 2 and player:getRank() == 10) then + player:startEvent(0x5B); -- new default message (speculative) +elseif (player:getMissionStatus(2,23) == 1) and (mission_status == 4) then + player:startEvent(0x191); +elseif (player:getMissionStatus(2,23) == 1) and mission_status ==3 then + player:startEvent(0x17F); +elseif (player:getMissionStatus(2,22) == 2) then + player:startEvent(0x173); +elseif (player:getMissionStatus(2,22) == 1) and (mission_status >= 2) then + player:startEvent(0x16D); +elseif (player:getMissionStatus(2,17) == 1) then + player:startEvent(0x132); +elseif (player:getMissionStatus(2,16) == 1) then + player:startEvent(0x141); +elseif (player:hasKeyItem(ShadowFragment) == 1) or ((player:getMissionStatus(2,15) == 2) and (player:getMissionStatus(2,16) == 0)) then + player:startEvent(0xDE); +elseif (player:getMissionStatus(2,14) == 2) then + player:startEvent(0xC7); +else + player:startEvent(0x5B); +end; +end; + +--------------------------------------------------------------------- +-- onTrade Action +--------------------------------------------------------------------- +function onTrade(player,npc,trade) +end; + +--------------------------------------------------------------------- +-- onEventFinish Action +--------------------------------------------------------------------- +function onEventFinish(player,csid,option) +print("CSID:",csid); +print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Heavens_Tower/npcs/Ufu_Koromoa.lua =================================================================== --- scripts/zones/Heavens_Tower/npcs/Ufu_Koromoa.lua (revision 2121) +++ scripts/zones/Heavens_Tower/npcs/Ufu_Koromoa.lua (working copy) @@ -1,45 +1,88 @@ ------------------------------------ --- Area: Heavens Tower --- NPC: Ufu Koromoa --- Type: Standard NPC --- @zone: 242 --- @pos: -2.074 -48 14.000 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x005e); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +--------------------------------------------------------------------- +-- Ufu Koromoa +-- one of the Sibyl Guards, involved in Windurst Missions +--------------------------------------------------------------------- + +require("scripts/globals/settings"); +package.loaded["scripts/globals/rankpoints"] = nil; +require("scripts/globals/rankpoints"); + +function onTrigger(player,npc) +--[[ events: +0x05E default greetings +0x006 Ajido-Marujido appears (incomplete CS, played as part of 6B) +0x06B (3-1: CS with Semih Lafihna, Ajido-Marujido appears) +0x06F her reaction after 6B +0x072 (3-1 CS after you're back from castle O.) +0x076 her reaction after 72 +0x09F for 3-3 +0x0A1 "I Shall pray to the stars that your mission is a success." +0x0AB "Watch yourself in there or you will have Lady Semih Lafihna to answerrr to!" +0x0B0 Who could have stolen the talisman from right under our tails? (after Magicite mission) +0x0C4 "Watch yourself in there or you will have Lady Semih Lafihna to answerrr to!" +0x0C9 "My Mithra blood is boiling. I still have dreams about my motherrr being slaughtered by the beastmen." +0x0DB her reaction after you return from 5-2 BCNM. +0x13F her reaction after you reach rank 6. +0x144 "The strongest of the Sibyl Guards is, without a doubt, Semih Lafihna. She has the ability to read the flow of things." +0x12F "Watch yourself in there or you will have Lady Semih Lafihna to answerrr to!" (start of 6-2 ?) +0x134 +0x16E +0x172 "Those soulless eyes.. a chill runs down my spine just thinking about it." +0x177 says that it was too dangerous for the Star Sibyl to head to the Full Moon Fountain (after 9-1) +0x179 "Semih Lafihna awaits you in the Star Sibyl's Chambers" (9-2) +0x17D "You look nervous. I understand. A heavy fate rides upon your shoulders." (9-2) +0x192 "by killing the great beast, Karaha-Baruha saved Windurst from its fate of destruction.." (9-2?) +0x182 (CS for 9-2) +--]] +mission_status = player:getVar("mission_status"); + +if (player:getMissionStatus(2,10) == 1) and (mission_status == 3) then + player:startEvent(0x6F); +elseif (player:getMissionStatus(2,10) == 2) and (player:getMissionStatus(2,11) == 0) then + player:startEvent(0x76); +elseif ((player:getMissionStatus(2,23) == 1) and (mission_status >= 5)) or (player:getNation() == 2 and player:getRank() == 10) then + player:startEvent(0x192); -- new default message (speculative) +elseif (player:getMissionStatus(2,23) == 1) and (mission_status == 4) then + player:startEvent(0x192); +elseif (player:getMissionStatus(2,23) == 1) and (mission_status >= 2) then + player:startEvent(0x17D); +elseif (player:getMissionStatus(2,23) == 1) and (mission_status == 1) then + player:startEvent(0x179); +elseif (player:getMissionStatus(2,22) == 2) then + player:startEvent(0x177); +elseif (player:getMissionStatus(2,22) == 1) and (mission_status >= 2) then + player:startEvent(0x172); +elseif (player:getMissionStatus(2,17) == 1) and mission_status == 1 then + player:startEvent(0x12F); +elseif (player:hasKeyItem(StarCrestedSummons) == 1) then + player:startEvent(0xAB); +elseif (player:hasKeyItem(LetterToTheAmbassador) == 1) then + player:startEvent(0x91); +elseif (player:hasKeyItem(BurntSeal) == 1) then + player:startEvent(0xC4); +elseif (player:hasKeyItem(MessageToJeunoWindurst) == 1) or (player:getMissionStatus(2,14) == 1) then + player:startEvent(0xB0); +elseif player:getMissionStatus(2,15) == 2 then + player:startEvent(0x13F); +elseif (player:hasKeyItem(ShadowFragment) == 1) then + player:startEvent(0xDB); +elseif (player:getMissionStatus(2,14) == 2) then + player:startEvent(0xC9); +else + player:startEvent(0x5E); +end; +end; + +--------------------------------------------------------------------- +-- onTrade Action +--------------------------------------------------------------------- +function onTrade(player,npc,trade) +end; + +--------------------------------------------------------------------- +-- onEventFinish Action +--------------------------------------------------------------------- +function onEventFinish(player,csid,option) +print("CSID:",csid); +print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Heavens_Tower/npcs/Vahn_Paineesha.lua =================================================================== --- scripts/zones/Heavens_Tower/npcs/Vahn_Paineesha.lua (revision 2121) +++ scripts/zones/Heavens_Tower/npcs/Vahn_Paineesha.lua (working copy) @@ -1,45 +1,89 @@ ------------------------------------ --- Area: Heavens Tower --- NPC: Vahn Paineesha --- Type: Standard NPC --- @zone: 242 --- @pos: -2.502 -47.999 -15.083 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0059); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Area: Heavens Tower +-- NPC: Vahn Paineesha +-- Type: Standard NPC +-- @zone: 242 +-- @pos: -2.502 -47.999 -15.083 +-- +-- one of the Sibyl Guards, involved in Windurst Missions +----------------------------------- +package.loaded["scripts/zones/Heavens_Tower/TextIDs"] = nil; + +function onTrigger(player,npc) + --[[ events: + + 0x059 standard greeting + 0x006 Ajido-Marujido appears (incomplete CS, played as part of 6B) + 0x06B (3-1: CS with Semih Lafihna, Ajido-Marujido appears) + 0x06D her reaction to 6B + 0x072 (3-1 CS after you're back from castle O.) + 0x074 her reaction to 72 + 0x0AD about the stolen talisman + 0x0C6 about the shadow lord's return (after 5-1 has been completed) + 0x0DD her reaction to the shadow lord's death (after 5-2) + 0x142 talks about renegade missions given out by the gatehouse (during and after mission 6-1) + 0x131 talks about the dark dungeon (pre-jailbreak) + 0x170 talks about the creature that attacked the Star Sibyl (9-1) + 0x175 talks about the frustration the Star Sibyl must have felt faking those readings (during 9-1) + 0x17B talks about rescuing the Star Sibyl from the cardians (between 9-1 and 9-2) + 0x17E Semih Lafihna has given the order to rescue the Star Sibyl + 0x194 talks about the Moon Reading + --]] + --[[ + mission_status = player:getVar("mission_status"); + + if (player:getMissionStatus(2,10) == 1) and (mission_status == 3) then + player:startEvent(0x6D); + elseif (player:getMissionStatus(2,10) == 2) and (player:getMissionStatus(2,11) == 0) then + player:startEvent(0x74); + elseif (player:hasKeyItem(MessageToJeunoWindurst) == 1) or (player:getMissionStatus(2,14) == 1) then + player:startEvent(0xAD); + elseif ((player:getMissionStatus(2,23) == 1) and (mission_status >= 5)) or (player:getNation() == 2 and player:getRank() == 10) then + player:startEvent(0x59); -- new default message (speculative) + elseif (player:getMissionStatus(2,23) == 1) and (mission_status == 4) then + player:startEvent(0x194); + elseif (player:getMissionStatus(2,23) == 1) and mission_status ==3 then + player:startEvent(0x17E); + elseif (player:getMissionStatus(2,22) == 2) then + player:startEvent(0x17B); + elseif (player:getMissionStatus(2,22) == 1) and (mission_status >= 4) then + player:startEvent(0x175); + elseif (player:getMissionStatus(2,22) == 1) and (mission_status >= 2) then + player:startEvent(0x170); + elseif (player:getMissionStatus(2,17) >= 1) then + player:startEvent(0x131); + elseif (player:getMissionStatus(2,16) == 1) then + player:startEvent(0x142); + elseif (player:hasKeyItem(ShadowFragment) == 1) or ((player:getMissionStatus(2,15) == 2) and (player:getMissionStatus(2,16) == 0)) then + player:startEvent(0xDD); + elseif player:getMissionStatus(2,14) == 2 and player:getMissionStatus(2,15) <= 1 then + player:startEvent(0xC6); + else + player:startEvent(0x59); + end; + --]] + player:startEvent(0x0059); +end; + +--------------------------------------------------------------------- +-- onTrade Action +--------------------------------------------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +--------------------------------------------------------------------- +-- onEventFinish Action +--------------------------------------------------------------------- +function onEventFinish(player,csid,option) +print("CSID:",csid); +print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Ifrits_Cauldron/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Ifrits_Cauldron/TextIDs"); @@ -92,8 +92,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Inner_Horutoto_Ruins/Zone.lua =================================================================== --- scripts/zones/Inner_Horutoto_Ruins/Zone.lua (revision 2121) +++ scripts/zones/Inner_Horutoto_Ruins/Zone.lua (working copy) @@ -47,28 +47,34 @@ [1] = function (x) -- Red Circle if(player:getMainJob() == 5 and region:AddCount(1) == 1) then red:setAnimation(8); - if(white:getAnimation() == 8 and black:getAnimation() == 8) then + white:setAnimation(8); + black:setAnimation(8); + --if(white:getAnimation() == 8 and black:getAnimation() == 8) then GetNPCByID(17563861):openDoor(30); GetNPCByID(17563862):openDoor(30); - end + --end end end, [2] = function (x) -- White Circle if(player:getMainJob() == 3 and region:AddCount(1) == 1) then - white:setAnimation(8); - if(red:getAnimation() == 8 and black:getAnimation() == 8) then + red:setAnimation(8); + white:setAnimation(8); + black:setAnimation(8); + --if(red:getAnimation() == 8 and black:getAnimation() == 8) then GetNPCByID(17563861):openDoor(30); GetNPCByID(17563862):openDoor(30); - end + --end end end, [3] = function (x) -- Black Circle if(player:getMainJob() == 4 and region:AddCount(1) == 1) then - black:setAnimation(8); - if(red:getAnimation() == 8 and white:getAnimation() == 8) then + red:setAnimation(8); + white:setAnimation(8); + black:setAnimation(8); + --if(red:getAnimation() == 8 and white:getAnimation() == 8) then GetNPCByID(17563861):openDoor(30); GetNPCByID(17563862):openDoor(30); - end + --end end end, [4] = function (x) -- Teleport at H-6 @@ -92,16 +98,22 @@ { [1] = function (x) -- Red Circle if(player:getMainJob() == 5 and region:DelCount(1) == 0) then - red:setAnimation(9); + red:setAnimation(9); + white:setAnimation(9); + black:setAnimation(9); end end, [2] = function (x) -- White Circle if(player:getMainJob() == 3 and region:DelCount(1) == 0) then - white:setAnimation(9); + red:setAnimation(9); + white:setAnimation(9); + black:setAnimation(9); end end, [3] = function (x) -- Black Circle if(player:getMainJob() == 4 and region:DelCount(1) == 0) then + red:setAnimation(9); + white:setAnimation(9); black:setAnimation(9); end end, Index: scripts/zones/Jugner_Forest/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Jugner_Forest/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Jugner_Forest/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00010); end end; Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x006F); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger1.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger1.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger1.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger1 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0070); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger2.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger2.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger2.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger2 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0071); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger3.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger3.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger3.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger3 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0072); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger4.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger4.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger4.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger4 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0073); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger5.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger5.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger5.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger5 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0074); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger6.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger6.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger6.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger6 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0075); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger7.lua =================================================================== --- scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger7.lua (revision 0) +++ scripts/zones/Kazham-Jeuno_Airship/npcs/Passenger7.lua (working copy) @@ -0,0 +1,28 @@ +----------------------------------- +-- Passenger7 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:startEvent(0x0076); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Kazham/npcs/Pahya_Lolohoiv.lua =================================================================== --- scripts/zones/Kazham/npcs/Pahya_Lolohoiv.lua (revision 2121) +++ scripts/zones/Kazham/npcs/Pahya_Lolohoiv.lua (working copy) @@ -21,7 +21,7 @@ function onTrigger(player,npc) ---player:startEvent(Event(0x004B)); +--player:startEvent(0x004B); player:showText(npc,PAHYALOLOHOIV_SHOP_DIALOG); stock = {0x119d,10, -- Distilled Water Index: scripts/zones/Konschtat_Highlands/npcs/Dimensional_Portal.lua =================================================================== --- scripts/zones/Konschtat_Highlands/npcs/Dimensional_Portal.lua (revision 0) +++ scripts/zones/Konschtat_Highlands/npcs/Dimensional_Portal.lua (working copy) @@ -0,0 +1,34 @@ +----------------------------------- +-- Dem Dimensional Portal to Sea +----------------------------------- +package.loaded["scripts/zones/Konschtat_Highlands/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/missions"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + if(player:hasCompletedMission(COP,THE_WARRIOR_S_PATH) == true or EVERYONE_CAN_ACCESS_SEA == 1) then + player:startEvent(0x0393); + else + player:messageSpecial(TELEPOINT_DISAPPEARED); + end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x393) and (option == 1) then + player:setPos(-635,-1,164,90,0x21); -- Teleport to Dem side of Al'Taieu + end; +end; \ No newline at end of file Index: scripts/zones/Konschtat_Highlands/npcs/Shattered_Telepoint.lua =================================================================== --- scripts/zones/Konschtat_Highlands/npcs/Shattered_Telepoint.lua (revision 0) +++ scripts/zones/Konschtat_Highlands/npcs/Shattered_Telepoint.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------- +-- Area: Konschtat Highlands +-- NPC: Shattered Telepoint +----------------------------------- +package.loaded["scripts/zones/Konschtat_Highlands/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/keyitems"); +require("scripts/globals/missions"); +require("scripts/zones/Konschtat_Highlands/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 2) then + player:startEvent(0x0390); + elseif(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") > 2) then + player:startEvent(0x0391); + elseif(player:hasCompletedMission(COP,BELOW_THE_ARKS)) then + player:startEvent(0x0391); + else + player:messageSpecial(TELEPOINT_SHATTERED); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + printf("CSID: %u",csid); + printf("RESULT: %u",option); + + if(csid == 0x0390) then + player:setVar("CopStatus",3); + player:setPos(-260,-40,-280,193,0x0e); + end + if(csid == 0x0391 and option == 1) then + player:setPos(-260,-40,-280,193,0x0e); + end +end; \ No newline at end of file Index: scripts/zones/Konschtat_Highlands/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Konschtat_Highlands/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Konschtat_Highlands/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00080); end end; Index: scripts/zones/Konschtat_Highlands/TextIDs.lua =================================================================== --- scripts/zones/Konschtat_Highlands/TextIDs.lua (revision 2121) +++ scripts/zones/Konschtat_Highlands/TextIDs.lua (working copy) @@ -6,7 +6,9 @@ GIL_OBTAINED = 6379; -- Obtained gil KEYITEM_OBTAINED = 6381; -- Obtained key item: ALREADY_OBTAINED_TELE = 7153; -- You already possess the gate crystal for this telepoint. - + TELEPOINT_SHATTERED = 7409; -- The telepoint has been shattered into a thousand pieces... + TELEPOINT_DISAPPEARED = 7154; -- The telepoint has disappeared... + -- Quest Dialog SIGNPOST_DIALOG_1 = 7319; -- North: Valkurm Dunes South: To Gustaberg SIGNPOST_DIALOG_2 = 7320; -- You see something stuck behind the signpost. Index: scripts/zones/Kuftal_Tunnel/npcs/qm2.lua =================================================================== --- scripts/zones/Kuftal_Tunnel/npcs/qm2.lua (revision 0) +++ scripts/zones/Kuftal_Tunnel/npcs/qm2.lua (working copy) @@ -0,0 +1,49 @@ +----------------------------------- +-- Area: Kuftal Tunnel +-- NPC: ??? (Spawn Cancer) +-- @pos +----------------------------------- +package.loaded["scripts/zones/Kuftal_Tunnel/TextIDs"] = nil; +----------------------------------- + +require("scripts/zones/Kuftal_Tunnel/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + + if(trade:hasItemQty(4514,1) and trade:getItemCount() == 1) then -- Trade Quus + player:tradeComplete(); + --SpawnMob(17490232,180):updateEnmity(player); -- Robber Crab + SpawnMob(17490231,180):updateEnmity(player); -- Cancer + end + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:messageSpecial(NOTHING_HAPPENS); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/Kuftal_Tunnel/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Kuftal_Tunnel/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Kuftal_Tunnel/npcs/Treasure_Coffer.lua (working copy) @@ -8,7 +8,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Kuftal_Tunnel/TextIDs"); Index: scripts/zones/La_Theine_Plateau/npcs/Dimensional_Portal.lua =================================================================== --- scripts/zones/La_Theine_Plateau/npcs/Dimensional_Portal.lua (revision 0) +++ scripts/zones/La_Theine_Plateau/npcs/Dimensional_Portal.lua (working copy) @@ -0,0 +1,34 @@ +----------------------------------- +-- Holla Dimensional Portal to Sea +----------------------------------- +package.loaded["scripts/zones/La_Theine_Plateau/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/missions"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + if(player:hasCompletedMission(COP,THE_WARRIOR_S_PATH) == true or EVERYONE_CAN_ACCESS_SEA == 1) then + player:startEvent(0x00CC); + else + player:messageSpecial(TELEPOINT_DISAPPEARED); + end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x00CC) and (option == 1) then + player:setPos(25,-1,579,50,0x21); -- Teleport to Holla side of Al'Taieu + end; +end; \ No newline at end of file Index: scripts/zones/La_Theine_Plateau/npcs/Shattered_Telepoint.lua =================================================================== --- scripts/zones/La_Theine_Plateau/npcs/Shattered_Telepoint.lua (revision 0) +++ scripts/zones/La_Theine_Plateau/npcs/Shattered_Telepoint.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------- +-- Area: La Theine Plateau +-- NPC: Shattered Telepoint +----------------------------------- +package.loaded["scripts/zones/La_Theine_Plateau/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/keyitems"); +require("scripts/globals/missions"); +require("scripts/zones/La_Theine_Plateau/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 2) then + player:startEvent(0x00c9); + elseif(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") > 2) then + player:startEvent(0x00ca); + elseif(player:hasCompletedMission(COP,BELOW_THE_ARKS)) then + player:startEvent(0x00ca); + else + player:messageSpecial(TELEPOINT_SHATTERED); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + printf("CSID: %u",csid); + printf("RESULT: %u",option); + + if(csid == 0x00c9) then + player:setVar("CopStatus",3); + player:setPos(-260,0,280,193,0x0e); + end + if(csid == 0x00ca and option == 1) then + player:setPos(-260,0,280,193,0x0e); + end +end; \ No newline at end of file Index: scripts/zones/La_Theine_Plateau/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/La_Theine_Plateau/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/La_Theine_Plateau/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00004); end end; Index: scripts/zones/La_Theine_Plateau/TextIDs.lua =================================================================== --- scripts/zones/La_Theine_Plateau/TextIDs.lua (revision 2121) +++ scripts/zones/La_Theine_Plateau/TextIDs.lua (working copy) @@ -6,6 +6,8 @@ GIL_OBTAINED = 6379; -- Obtained gil KEYITEM_OBTAINED = 6381; -- Obtained key item: ALREADY_OBTAINED_TELE = 7153; -- You already possess the gate crystal for this telepoint. + TELEPOINT_SHATTERED = 7681; -- The telepoint has been shattered into a thousand pieces... + TELEPOINT_DISAPPEARED = 7154; -- The telepoint has disappeared... -- Quest Dialogs UNLOCK_SUMMONER = 7501; -- You can now become a summoner. Index: scripts/zones/Lower_Delkfutts_Tower/npcs/Cermet_Door.lua =================================================================== --- scripts/zones/Lower_Delkfutts_Tower/npcs/Cermet_Door.lua (revision 2121) +++ scripts/zones/Lower_Delkfutts_Tower/npcs/Cermet_Door.lua (working copy) @@ -31,6 +31,12 @@ function onEventUpdate(player,csid,option) --print("CSID:",csid); --print("RESULT:",option); + if (csid == 0x0014) then + update = update + 1; + if(update == 2) then + GetNPCByID(17531153):setAnimation(8); + end + end end; ----------------------------------- @@ -42,6 +48,7 @@ --print("RESULT:",option); if(csid == 0x0014 and option == 1) then + GetNPCByID(17531153):setAnimation(9); player:setPos(313, 16, 20, 128, 0x9E); -- to Upper Delkfutt's Tower end end; Index: scripts/zones/Lower_Delkfutts_Tower/Zone.lua =================================================================== --- scripts/zones/Lower_Delkfutts_Tower/Zone.lua (revision 2121) +++ scripts/zones/Lower_Delkfutts_Tower/Zone.lua (working copy) @@ -6,7 +6,8 @@ package.loaded["scripts/zones/Lower_Delkfutts_Tower/TextIDs"] = nil; ----------------------------------- -require("scripts/globals/missions"); +require("scripts/globals/settings"); +require("scripts/globals/missions"); require("scripts/zones/Lower_Delkfutts_Tower/TextIDs"); ----------------------------------- @@ -30,8 +31,11 @@ if((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(460.022,-1.77,-103.442,188); - elseif(player:getCurrentMission(ZILART) == RETURN_TO_DELKFUTTS_TOWER and player:getVar("ZilartStatus") <= 1) then + end + if(player:getCurrentMission(ZILART) == RETURN_TO_DELKFUTTS_TOWER and player:getVar("ZilartStatus") <= 1) then cs = 0x000f; + elseif(player:getCurrentMission(COP) == ANCIENT_FLAMES_BECKON and player:getVar("CopStatus") < 1) then + cs = 0x0016; end return cs; @@ -81,18 +85,31 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + if(csid == 0x0016) then + player:startEvent(0x0024); + elseif(csid == 0x0024) then + player:startEvent(0x0025); + elseif(csid == 0x0025) then + player:startEvent(0x0026); + elseif(csid == 0x0026) then + player:startEvent(0x0027); + elseif(csid == 0x0027) then + player:setVar("CopStatus",1); + player:completeMission(COP,ANCIENT_FLAMES_BECKON); + player:addMission(COP,THE_RITES_OF_LIFE); + end if(csid == 0x000f) then player:setVar("ZilartStatus",2); elseif(option == 1) then - if(player:getVar("option") == 1) then + if(player:getVar("LDT_option") == 1) then player:setPos(-28, -48, 80, 111, 157); else player:setPos(-51, -48, -40, 246, 157); end - player:setVar("option",0); + player:setVar("LDT_option",0); elseif(option == 0 or option >= 3) then player:setVar("option",0); end -end; \ No newline at end of file +end; Index: scripts/zones/Lower_Jeuno/npcs/Alrauverat.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Alrauverat.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/npcs/Alrauverat.lua (working copy) @@ -93,7 +93,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then itemCP = inventory[Item + 1]; player:delCP(itemCP); player:addItem(inventory[Item + 2],1); Index: scripts/zones/Lower_Jeuno/npcs/Bki_Tbujhja.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Bki_Tbujhja.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/npcs/Bki_Tbujhja.lua (working copy) @@ -58,6 +58,8 @@ player:startEvent(0x0096); -- Finish Quest "The Requiem" elseif(TheRequiem == QUEST_COMPLETED) then player:startEvent(0x0086); -- Standard dialog after "The Requiem" + else + player:startEvent(0x00b4); end end; Index: scripts/zones/Lower_Jeuno/npcs/Faursel.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Faursel.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/npcs/Faursel.lua (working copy) @@ -18,6 +18,7 @@ function onTrade(player,npc,trade) questStatus = player:getQuestStatus(JEUNO,THE_ROAD_TO_AHT_URHGAN); + questStatusVar = player:getVar("THE_ROAD_TO_AHT_URHGAN"); if (questStatus == QUEST_ACCEPTED and questStatusVar == 1) then Index: scripts/zones/Lower_Jeuno/npcs/Game_Table.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Game_Table.lua (revision 0) +++ scripts/zones/Lower_Jeuno/npcs/Game_Table.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Game Table +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x2759); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Lower_Jeuno/npcs/Guide_Stone.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Guide_Stone.lua (revision 0) +++ scripts/zones/Lower_Jeuno/npcs/Guide_Stone.lua (working copy) @@ -0,0 +1,26 @@ +----------------------------------- +-- Guide Stone +-- Normal Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:messageSpecial(GUIDE_STONE); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Lower_Jeuno/npcs/Mertaire.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Mertaire.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/npcs/Mertaire.lua (working copy) @@ -20,7 +20,7 @@ function onTrade(player,npc,trade) if(player:getQuestStatus(JEUNO, THE_OLD_MONUMENT) == QUEST_COMPLETED) then - if(trade:hasItemQty(634,1) == true and trade:getItemCount() == 1) then + if(trade:hasItemQty(POETIC_PARCHMENT,1) == true and trade:getItemCount() == 1) then player:startEvent(0x0065); end end @@ -33,13 +33,15 @@ function onTrigger(player,npc) - painfulMemory = player:getQuestStatus(JEUNO,PAINFUL_MEMORY); + local painfulMemory = player:getQuestStatus(JEUNO,PAINFUL_MEMORY); + local job = player:getMainJob() + local level = player:getMainLvl() - if(player:getMainJob() ~= 10 and player:getMainLvl() >= 30) then + if(job ~= 10 and level >= ADVANCED_JOB_LEVEL) then if(player:getVar("TheOldMonument_Event") == 0 and player:getQuestStatus(JEUNO,THE_OLD_MONUMENT) == QUEST_AVAILABLE) then player:startEvent(0x0066); end - elseif(player:getMainJob() == 10 and player:getMainLvl() >= 40 and painfulMemory == QUEST_AVAILABLE) then + elseif(job == 10 and level >= AF1_QUEST_LEVEL and painfulMemory == QUEST_AVAILABLE) then if(player:getVar("PainfulMemoryCS") == 0) then player:startEvent(0x008a); -- Long dialog for "Painful Memory" else Index: scripts/zones/Lower_Jeuno/npcs/Parike-Poranke.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Parike-Poranke.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/npcs/Parike-Poranke.lua (working copy) @@ -4,8 +4,6 @@ -- Type: Adventurer's Assistant -- @zone: 245 -- @pos: -33.161 -1 -61.303 --- --- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- package.loaded["scripts/zones/Lower_Jeuno/TextIDs"] = nil; ----------------------------------- Index: scripts/zones/Lower_Jeuno/npcs/Shashan_Mishan.lua =================================================================== --- scripts/zones/Lower_Jeuno/npcs/Shashan_Mishan.lua (revision 0) +++ scripts/zones/Lower_Jeuno/npcs/Shashan_Mishan.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------- +-- Shashan-Mishan +-- Gives weather reports. +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + birth = 1009810800; + timer = os.time(); + counter = (timer - birth); + player:startEvent(0x8271c,0,0,0,0,0,0,0,counter); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Lower_Jeuno/TextIDs.lua =================================================================== --- scripts/zones/Lower_Jeuno/TextIDs.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/TextIDs.lua (working copy) @@ -9,6 +9,7 @@ HOMEPOINT_SET = 6439; -- Home point set! INVENTORU_INCREASED = 7638; -- Your inventory capacity has increased. ITS_LOCKED = 7446; -- It's locked. + GUIDE_STONE = 6999; -- Up: Upper Jeuno, Down: Port Jeuno -- Conquest system CONQUEST = 7912; -- You've earned conquest points! Index: scripts/zones/Lower_Jeuno/Zone.lua =================================================================== --- scripts/zones/Lower_Jeuno/Zone.lua (revision 2121) +++ scripts/zones/Lower_Jeuno/Zone.lua (working copy) @@ -28,6 +28,10 @@ end player:setVar("PlayerMainJob",0); end + -- ACP 1 + --if () + -- cs = 0x276E; + --end return cs; end; @@ -57,5 +61,8 @@ if (csid == 0x7534 and option == 0) then player:setHomePoint(); player:messageSpecial(HOMEPOINT_SET); - end + elseif (csid == 0x276E) then + --player:completeMission(ACP,A_CRYSTALLINE_PROPHECY); + --player:addMission(ACP,THE_ECHO_AWAKENS); + end end; Index: scripts/zones/Manaclipper/Zone.lua =================================================================== --- scripts/zones/Manaclipper/Zone.lua (revision 2121) +++ scripts/zones/Manaclipper/Zone.lua (working copy) @@ -20,9 +20,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(0,-3,-8,60); + end + return cs; end; ----------------------------------- Index: scripts/zones/Meriphataud_Mountains/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Meriphataud_Mountains/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Meriphataud_Mountains/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x04000); end end; Index: scripts/zones/Metalworks/npcs/Baldric.lua =================================================================== --- scripts/zones/Metalworks/npcs/Baldric.lua (revision 2121) +++ scripts/zones/Metalworks/npcs/Baldric.lua (working copy) @@ -60,7 +60,7 @@ player:addQuest(BASTOK,STARDUST); elseif (csid == 0x022B) then player:tradeComplete(); - player:addGil(300); + player:addGil(300*GIL_RATE); player:messageSpecial(GIL_OBTAINED,GIL_RATE*300); player:completeQuest(BASTOK,STARDUST); end Index: scripts/zones/Mhaura/npcs/Keshab-Menjab.lua =================================================================== --- scripts/zones/Mhaura/npcs/Keshab-Menjab.lua (revision 2121) +++ scripts/zones/Mhaura/npcs/Keshab-Menjab.lua (working copy) @@ -1,45 +1,67 @@ ------------------------------------ --- Area: Mhaura --- NPC: Keshab-Menjab --- Type: Standard NPC --- @zone: 249 --- @pos: -15.727 -9.032 54.049 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Mhaura/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0139); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- Keshab-Menjab +-- Starts and ends quest "Recycling Rods" +----------------------------------- +-- Includes +require("scripts/globals/settings"); +package.loaded["scripts/zones/Mhaura/TextIDs"] = nil; +require("scripts/zones/Mhaura/TextIDs"); +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + +----------------------------------- +-- Dialogues,cutscenes,etc. go below. +----------------------------------- +rod = player:getVar("recyclingRods"); +if (rod == 0) then + player:startEvent(0x139); +elseif (rod == 1) then + player:startEvent(0x13b); +elseif (rod == 2) then + player:startEvent(0x13a); +end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +rod = player:getVar("recyclingRods"); +bknrods = {0x1d8, 0x1d9, 0x1e2, 0x1e3, 0x1e4, 0x1e5, 0x1e6, 0x1e7, 0x1e8, 0x1e9, 0x1ea, 0x1eb, 0x6be, 0x728, 0x729}; --Other broken rods. +count = trade:getItemCount(); +--print("count: " .. count); +for j = 1,table.getn(bknrods) do + item1 = trade:hasItemQty(bknrods[j],1); + if (rod == 1 and count == 1 and item1 == true) then + player:startEvent(0x13c); + end +end + item2 = trade:hasItemQty(0x684,1); + if (rod == 1 and count == 1 and item2 == true) then + --Quest complete. + player:startEvent(0x13d); + player:removeItem(0x684,1); + player:addItem(0); + player:addGil(GIL_RATE*1500); + player:messageSpecial(GIL_OBTAINED,GIL_RATE*1500); + player:setVar("recyclingRods",2); + player:addFame(2,WIN_FAME*40); --Reasonable estimate for a fame level 1 quest. + --print("Windurst fame adjusted for " .. player:getName() .." by 40 (Total: ".. player:getFame(2) .. ")."); + end +end +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +if (csid == 0x139 and option == 1) then + player:setVar("recyclingRods",1); +end +end; \ No newline at end of file Index: scripts/zones/Middle_Delkfutts_Tower/npcs/Treasure_Chest.lua =================================================================== --- scripts/zones/Middle_Delkfutts_Tower/npcs/Treasure_Chest.lua (revision 2121) +++ scripts/zones/Middle_Delkfutts_Tower/npcs/Treasure_Chest.lua (working copy) @@ -1,5 +1,5 @@ ----------------------------------- --- Area: Crawler Nest +-- Area: Middle_Delkfutts_Tower -- NPC: Treasure Chest -- Involved In Quest: Wings of Gold -- @pos -380 -143 23 158 @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Middle_Delkfutts_Tower/TextIDs"); @@ -67,8 +67,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Mine_Shaft_2716/Zone.lua =================================================================== --- scripts/zones/Mine_Shaft_2716/Zone.lua (revision 2121) +++ scripts/zones/Mine_Shaft_2716/Zone.lua (working copy) @@ -3,7 +3,7 @@ -- Zone: Mine_Shaft_2716 (13) -- ----------------------------------- - +-- BCNM area -39 0 -98 253 package.loaded["scripts/zones/Mine_Shaft_2716/TextIDs"] = nil; require("scripts/globals/settings"); require("scripts/zones/Mine_Shaft_2716/TextIDs"); Index: scripts/zones/Monarch_Linn/Zone.lua =================================================================== --- scripts/zones/Monarch_Linn/Zone.lua (revision 2121) +++ scripts/zones/Monarch_Linn/Zone.lua (working copy) @@ -20,9 +20,14 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + --player:setPos(-19,0,592,194); -- BC Exit + --player:setPos(71,0,-1,126); -- BC Area + player:setPos(6,0,-540,127); + end -return cs; + return cs; end; ----------------------------------- Index: scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Monastic_Cavern/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Monastic_Cavern/TextIDs"); @@ -85,8 +85,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Nashmau/npcs/Nabihwah.lua =================================================================== --- scripts/zones/Nashmau/npcs/Nabihwah.lua (revision 2121) +++ scripts/zones/Nashmau/npcs/Nabihwah.lua (working copy) @@ -1,45 +1,72 @@ ------------------------------------ --- Area: Nashmau --- NPC: Nabihwah --- Type: Standard NPC --- @zone: 53 --- @pos: 9.988 -7 68.585 +------------------------------------------------------ +-- Area: Al Zahbi +-- NPC: Famatar +-- Type: Imperial Officer +-- @zone: 48 +-- @pos: -105.538 0.999 75.456 -- --- Auto-Script: Requires Verification (Verified by Brawndo) ------------------------------------ +-- Grants Sanction, sells items for imperial standing. +------------------------------------------------------ package.loaded["scripts/zones/Nashmau/TextIDs"] = nil; ------------------------------------ +require("scripts/globals/settings"); +require("scripts/globals/besieged"); ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - function onTrigger(player,npc) - player:startEvent(0x00fd, npc); + merc_rank = getMercenaryRank(player); + if (merc_rank == 0) then + player:startEvent(0x00fe,npc); + else + maps = getMapBitmask(player); + if (getAstralCandescence() == 1) then + maps = maps + 0x80000000; + end; + IS = player:getPoint(3); + x,y,z,w = getImperialDefenseStats(); + player:startEvent(0x00fd,IS,maps,merc_rank,0,x,y,z,w); + end; +end; + +function onEventSelection(player,csid,option) + if (csid == 0x00FD and option>= 1 and option <= 2049) then + itemid = getISPItem(option); + player:updateEvent(0,0,0,canEquip(player, itemid)); + end; end; ------------------------------------ --- onEventUpdate ------------------------------------ +function onTrade(player,npc,trade) +end; -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); +if (csid == 0x00FD) then + if (option == 0 or option == 16 or option == 32 or option == 48) then -- player chose sanction. + if (option ~=0) then + player:delPoint(3,100); + end; + player:delStatusEffect(EFFECT_SIGIL); + player:delStatusEffect(EFFECT_SANCTION); + player:delStatusEffect(EFFECT_SIGNET); + duration = getSanctionDuration(player); + if (option == 16) or (option == 32) then -- refresh and regen sanction + tick = 3; + else + tick = 0; + end; + player:addStatusEffect(EFFECT_SANCTION,option / 16,tick,duration); -- effect size 1=regen, 2=refresh, 3=food. + player:messageSpecial(SANCTION); + elseif (option % 256 == 17) then -- player bought one of the maps + id = MapOfMamook + (option-17)/256; + player:addKeyItem(id); + player:messageSpecial(KEYITEM_OBTAINED,id); + player:delPoint(3,1000); + elseif (option <= 2049) then -- player bought item + item, price = getISPItem(option); + if (player:getFreeSlotsCount() > 0) then + player:addItem(item); + player:messageSpecial(ITEM_OBTAINED,item); + player:delPoint(3,price); + else + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,item); + end; + end; end; - +end; Index: scripts/zones/Nashmau/npcs/Yohj_Dukonlhy.lua =================================================================== --- scripts/zones/Nashmau/npcs/Yohj_Dukonlhy.lua (revision 2121) +++ scripts/zones/Nashmau/npcs/Yohj_Dukonlhy.lua (working copy) @@ -17,7 +17,7 @@ ----------------------------------- function onTrigger(player,npc) -player:startEvent(0x00E7); + player:startEvent(0x00E7); end; ----------------------------------- @@ -36,6 +36,9 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + if(csid == 0x00E7) then + player:setPos(12,2,140,65,0x32); + end end; Index: scripts/zones/Nashmau/TextIDs.lua =================================================================== --- scripts/zones/Nashmau/TextIDs.lua (revision 2121) +++ scripts/zones/Nashmau/TextIDs.lua (working copy) @@ -6,7 +6,7 @@ GIL_OBTAINED = 6379; -- Obtained gil KEYITEM_OBTAINED = 6381; -- Obtained key item: HOMEPOINT_SET = 7247; -- Home point set! - + -- Quest Dialog NOMAD_MOOGLE_DIALOG = 7248; -- I'm a traveling moogle, kupo. I help adventurers in the Outlands access items they have stored in a Mog House elsewhere, kupo. @@ -18,3 +18,6 @@ POPOROON_SHOP_DIALOG = 0; -- [UNKNOWN] WATAKHAMAZOM_SHOP_DIALOG = 0; -- [UNKNOWN] YOYOROON_SHOP_DIALOG = 0; -- [UNKNOWN] + + -- Conquest system +SANCTION = 0; -- You have received the Empire's Sanction. \ No newline at end of file Index: scripts/zones/Newton_Movalpolos/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Newton_Movalpolos/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Newton_Movalpolos/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Newton_Movalpolos/TextIDs"); @@ -67,8 +67,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Norg/npcs/Jaucribaix.lua =================================================================== --- scripts/zones/Norg/npcs/Jaucribaix.lua (revision 2121) +++ scripts/zones/Norg/npcs/Jaucribaix.lua (working copy) @@ -54,7 +54,7 @@ local mLvl = player:getMainLvl(); local mJob = player:getMainJob(); - if(player:getMainLvl() >= 30 and ForgeYourDestiny == QUEST_AVAILABLE) then + if(mLvl >= ADVANCED_JOB_LEVEL and ForgeYourDestiny == QUEST_AVAILABLE) then player:startEvent(0x0019,1153,1152); -- Sacred branch, Bomb Steel elseif(ForgeYourDestiny == QUEST_ACCEPTED) then local swordTimer = player:getVar("ForgeYourDestiny_timer"); Index: scripts/zones/Norg/Zone.lua =================================================================== --- scripts/zones/Norg/Zone.lua (revision 2121) +++ scripts/zones/Norg/Zone.lua (working copy) @@ -28,7 +28,7 @@ if((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-19.238,-2.163,-63.964,187); - elseif(player:getCurrentMission(ZILART) == THE_NEW_FRONTIER) then + elseif(player:getCurrentMission(ZILART) == THE_NEW_FRONTIER and player:getRank() >= 6) then cs = 0x0001; end Index: scripts/zones/North_Gustaberg/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/North_Gustaberg/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/North_Gustaberg/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00020); end end; Index: scripts/zones/North_Gustaberg_[S]/npcs/CavernousMaw.lua =================================================================== --- scripts/zones/North_Gustaberg_[S]/npcs/CavernousMaw.lua (revision 0) +++ scripts/zones/North_Gustaberg_[S]/npcs/CavernousMaw.lua (working copy) @@ -0,0 +1,41 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to North Gustaberg +----------------------------------- +package.loaded["scripts/zones/North_Gustaberg_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/North_Gustaberg_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_GUSTABERG") == 1) then + player:startEvent(0x0065); + else + player:startEvent(0x0064); + player:setVar("MAWS_GUSTABERG",1) + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x0065 or csid == 0x0064) and (option == 1)) then + toMaw(player,12); + end +end; \ No newline at end of file Index: scripts/zones/Northern_San_dOria/npcs/Achantere_TK.lua =================================================================== --- scripts/zones/Northern_San_dOria/npcs/Achantere_TK.lua (revision 2121) +++ scripts/zones/Northern_San_dOria/npcs/Achantere_TK.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Northern_San_dOria/npcs/Chalvatot.lua =================================================================== --- scripts/zones/Northern_San_dOria/npcs/Chalvatot.lua (revision 0) +++ scripts/zones/Northern_San_dOria/npcs/Chalvatot.lua (working copy) @@ -0,0 +1,102 @@ +----------------------------------- +-- Area: Northern San d'Oria +-- NPC: Chalvatot +-- Type: Quest NPC +-- Involved in Quest: "Her Majesty's Garden" +-- @zone: 231 +-- +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/quests"); +require("scripts/globals/keyitems"); + +--[[ Events: + +004C (final CS for Sandy 9-1 "Breaking Barriers") +0009 (Halver: final CS for Sandy 9-2 "The Heir to the Light" + Promotion to rank 10!) +0213 default response: "I'm busy. I'd appreciate a little peace and quiet." +006F Chateau_LeautesLastWishes_Pt2: final CS for 6-1 "Leaute's Last Wishes" +0000 CS with Princess between sandy missions 7-1 and 7-2 +003B "this place is not open to commoners, but since you're here, have a look. Queen Leaute would be pleased." (after finishing Sandy 6-1 or "Her majesty's garden"?) + +021B default response if you talk to him for the first time as non-Sandy citizen +021A default response if you talk to him for the first time as Sandy citizen +0054 opening CS for "Her Majesty's Garden" (Map of the Northlands Areas quest) +0052 CS for "Her Majesty's Garden" +0053 final CS for "Her Majesty's Garden" +0063 BRD AF3 quest +0062 BRD AF3 quest +0060 BRD AF3 quest +0061 BRD AF3 quest +022C Sandy Mission 3-2 "The Crystal Spring" +0231 Lure of the Wildcat + +Princess Claidie CS: +0210 nothing? +0074 talks about her Coming of Age ceremony getting nearer +0064 CS for Sandy 8-2 "Lightbringer" (?) + +--]] + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + if(player:getQuestStatus(SANDORIA,HER_MAJESTY_S_GARDEN) == QUEST_ACCEPTED) then + if(trade:hasItemQty(533,2) and trade:getItemCount() == 2) then -- Trade Derfland Humus + player:startEvent(0x0053); + end + end +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + sanFame = player:getFameLevel(SANDORIA); + + if (player:getVar("metChalvatot") ~= 1) then + if (player:getNation() == SANDORIA) then + player:startEvent(0x021A); + else + player:startEvent(0x021B); + end; + elseif(player:getQuestStatus(SANDORIA,HER_MAJESTY_S_GARDEN) == QUEST_AVALIABLE and sanFame >= 4) then + player:startEvent(0x0054); + elseif(player:getQuestStatus(SANDORIA,HER_MAJESTY_S_GARDEN) == QUEST_ACCEPTED) then + player:startEvent(0x0052); + else + player:startEvent(0x0213); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); + if(csid == 0x0054 and option == 1) then + player:addQuest(SANDORIA,HER_MAJESTY_S_GARDEN); + elseif(csid == 0x0053) then + player:tradeComplete(); + player:addKeyItem(MAP_OF_THE_NORTHLANDS_AREA); + player:messageSpecial(KEYITEM_OBTAINED,MAP_OF_THE_NORTHLANDS_AREA); + player:addFame(SANDORIA,SAN_FAME*30); + player:completeQuest(SANDORIA,HER_MAJESTY_S_GARDEN); + end +end; + Index: scripts/zones/Pashhow_Marshlands/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Pashhow_Marshlands/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Pashhow_Marshlands/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00100); end end; Index: scripts/zones/Phanauet_Channel/Zone.lua =================================================================== --- scripts/zones/Phanauet_Channel/Zone.lua (revision 2121) +++ scripts/zones/Phanauet_Channel/Zone.lua (working copy) @@ -20,9 +20,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(0,-2,2,192); + end + return cs; end; ----------------------------------- Index: scripts/zones/Phomiuna_Aqueducts/Zone.lua =================================================================== --- scripts/zones/Phomiuna_Aqueducts/Zone.lua (revision 2121) +++ scripts/zones/Phomiuna_Aqueducts/Zone.lua (working copy) @@ -25,8 +25,8 @@ if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(260.02,-2.12,-290.461,192); end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,40,0,0); + -- ZONE LEVEL RESTRICTION (No longer in effect.) + --player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,40,0,0); return cs; end; Index: scripts/zones/Port_Bastok/npcs/Alib-Mufalib.lua =================================================================== --- scripts/zones/Port_Bastok/npcs/Alib-Mufalib.lua (revision 2121) +++ scripts/zones/Port_Bastok/npcs/Alib-Mufalib.lua (working copy) @@ -1,45 +1,99 @@ ------------------------------------ --- Area: Port Bastok --- NPC: Alib-Mufalib --- Type: Warp NPC --- @zone: 236 --- @pos: 116.080 7.372 -31.820 --- --- Auto-Script: Requires Verification (Verfied by Brawndo) ------------------------------------ -package.loaded["scripts/zones/Port_Bastok/TextIDs"] = nil; ------------------------------------ - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - player:startEvent(0x0166); -end; - ------------------------------------ --- onEventUpdate ------------------------------------ - -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - -function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - +----------------------------------- +-- AlibMufalib +-- Starts and ends quest "Lure of the Wildcat" in Bastok. +-- After this quest and Aht Urghan mission 2,he will teleport you to Aht Urghan for 300g. +----------------------------------- +--[[ +Bitmask Designations: + +Port Bastok (East to West) +00001 (J-5) Kaede (northernmost house) +00002 (F-5) Patient Wheel (north of Warehouse 2) +00004 (F-6) Paujean (bottom floor of Warehouse 2) +00008 (E-6) Hilda (Steaming Sheep Restaurant, walks on the top floor and occasionally down. However, she can still be talked to when on second floor) +00010 (F-8) Tilian (end of a pier west of Air Travel Agency) + +Metalworks (all found on top floor)(Clockwise) +00020 (G-8) Raibaht (Cid's lab) +00040 (G-8) Invincible Shield (outside Cid's Lab) +00080 (G-7) Manilam (on top of Cermet Refinery) +00100 (I-8) Kaela (between Consulate of Windurst & Consulate of Jeuno) +00200 (K-7) Ayame (Inside north Cannonry) + +Bastok Markets (East to West) +00400 (K-10) Harmodios (Harmodios's Music Shop) +00800 (J-10) Arawn (west of music store) +01000 (I-9) Horatius (Inside Trader's Home) +02000 (E-10) Ken (outside Mjoll's General Goods) +04000 (E-11) Pavel (West Gate to South Gustaberg) + +Bastok Mines (Clockwise, starting at Ore Street, upper floor to lower floor) +08000 (H-5) Griselda (upper floor, Bat's Lair Inn) +10000 (I-6) Goraow (upper floor, in stairwell of Ore Street) +20000 (I-7) Echo Hawk (lower floor, Ore Street) +40000 (H-6) Deidogg (lower floor, Ore Street) +80000 (H-9) Vaghron (southwest of South Auction House) +]]-- +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +package.loaded["scripts/zones/Port_Bastok/TextIDs"] = nil; +require("scripts/zones/Port_Bastok/TextIDs"); +function onTrigger(player,npc) +LureoftheWildcatBastok = player:getQuestStatus(1,84); +----------------------------------- +-- Dialogues,cutscenes,etc. go below. +----------------------------------- +if(LureoftheWildcatBastok~=2)then + if(LureoftheWildcatBastok == 0) then + player:startEvent(0x165); + else + if(player:getVar("lureOfTheWildcat-B-Counter") == 0x0)then + player:startEvent(0x167); + elseif(player:getVar("lureOfTheWildcat-B-Counter") == 0xFFFFF)then + player:startEvent(0x168); + else + player:startEvent(0x166); + end + end +elseif(player:getMissionStatus(4,1) == 2)then + player:startEvent(0x17A); +else + player:startEvent(0x169); +end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +LureoftheWildcatBastok = player:getQuestStatus(1,84); +gil = trade:getGil(); +if(LureoftheWildcatBastok == 2 and player:getMissionStatus(4,2) == 2 and gil == 300)then +-- Needs a check for at least traded an invitation card to Naja Salaheem + player:startEvent(0x17B); +end +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +if(csid == 0x165)then + player:addQuest(1,84); + player:setVar("lureOfTheWildcat-B-Counter",0); + player:addKeyItem(0x2E8); -- BlueSentinelBadge +elseif(csid == 0x168) then + player:completeQuest(1,84); + player:addFame(1,BAS_FAME*150); + player:setVar("lureOfTheWildcat-B-Counter",0); + player:delKeyItem(0x2E8); + player:addKeyItem(0x2F2); + player:messageSpecial(KEYITEM_OBTAINED,0x2F2); +elseif(csid == 0x17B)then + player:setPos(16.964,0,18.061,95,0x32); -- Aht Urhgan Whitegate (Pos in not correct needs verify). +end +end; \ No newline at end of file Index: scripts/zones/Port_Bastok/npcs/Ensetsu.lua =================================================================== --- scripts/zones/Port_Bastok/npcs/Ensetsu.lua (revision 2121) +++ scripts/zones/Port_Bastok/npcs/Ensetsu.lua (working copy) @@ -27,11 +27,13 @@ function onTrigger(player,npc) - AyameAndKaede = player:getQuestStatus(BASTOK,AYAME_AND_KAEDE); + local AyameAndKaede = player:getQuestStatus(BASTOK,AYAME_AND_KAEDE); + local PirateYearsCS = player:getVar("twentyInPirateYearsCS"); + local BigBoxCS = player:getVar("illTakeTheBigBoxCS"); if(AyameAndKaede == QUEST_ACCEPTED) then - questStatus = player:getVar("AyameAndKaede_Event") + local questStatus = player:getVar("AyameAndKaede_Event") if((questStatus == 1 or questStatus == 2) and player:hasKeyItem(STRANGELY_SHAPED_CORAL) == false) then player:startEvent(0x00f2); @@ -44,13 +46,13 @@ end elseif(AyameAndKaede == QUEST_COMPLETED and player:getQuestStatus(OUTLANDS,TWENTY_IN_PIRATE_YEARS) == QUEST_AVAILABLE) then player:startEvent(0x00f7); - elseif(player:getVar("twentyInPirateYearsCS") == 2) then + elseif(PirateYearsCS == 2) then player:startEvent(0x0106); - elseif(player:getVar("twentyInPirateYearsCS") == 4) then + elseif(PirateYearsCS == 4) then player:startEvent(0x0107); - elseif(player:getQuestStatus(OUTLANDS,I_LL_TAKE_THE_BIG_BOX) == QUEST_ACCEPTED and player:getVar("illTakeTheBigBoxCS") == 0) then + elseif(player:getQuestStatus(OUTLANDS,I_LL_TAKE_THE_BIG_BOX) == QUEST_ACCEPTED and BigBoxCS == 0) then player:startEvent(0x0108); - elseif(player:getVar("illTakeTheBigBoxCS") == 1) then + elseif(BigBoxCS == 1) then player:startEvent(0x0109); else player:startEvent(0x001b); Index: scripts/zones/Port_Bastok/npcs/Flying_Axe_IM.lua =================================================================== --- scripts/zones/Port_Bastok/npcs/Flying_Axe_IM.lua (revision 2121) +++ scripts/zones/Port_Bastok/npcs/Flying_Axe_IM.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Port_Bastok/npcs/Kaede.lua =================================================================== --- scripts/zones/Port_Bastok/npcs/Kaede.lua (revision 2121) +++ scripts/zones/Port_Bastok/npcs/Kaede.lua (working copy) @@ -36,9 +36,9 @@ function onTrigger(player,npc) - ayameKaede = player:getQuestStatus(BASTOK,AYAME_AND_KAEDE); + local ayameKaede = player:getQuestStatus(BASTOK,AYAME_AND_KAEDE); - if(ayameKaede == QUEST_AVAILABLE and player:getMainLvl() >= 30) then + if(ayameKaede == QUEST_AVAILABLE and player:getMainLvl() >= ADVANCED_JOB_LEVEL) then player:startEvent(0x00f0); elseif(ayameKaede == QUEST_ACCEPTED) then player:startEvent(0x001a); @@ -48,7 +48,7 @@ player:startEvent(0x001a); end -end; +end; ----------------------------------- -- onEventUpdate Index: scripts/zones/Port_Bastok/npcs/Ominous_Cloud.lua =================================================================== --- scripts/zones/Port_Bastok/npcs/Ominous_Cloud.lua (revision 2121) +++ scripts/zones/Port_Bastok/npcs/Ominous_Cloud.lua (working copy) @@ -4,8 +4,6 @@ -- Type: Traveling Merchant NPC -- @zone: 236 -- @pos: 146.962 7.499 -63.316 --- --- Auto-Script: Requires Verification (Verified by Brawndo) ----------------------------------- package.loaded["scripts/zones/Port_Bastok/TextIDs"] = nil; ----------------------------------- @@ -19,23 +17,23 @@ function onTrade(player,npc,trade) local wijinruit = trade:getItemQty(951) - local uchitake = (trade:getItemQty(1161) / 99) - local tsurara = (trade:getItemQty(1164) / 99) - local kawahori = (trade:getItemQty(1167) / 99) + local uchitake = (trade:getItemQty(1161) / 99) + local tsurara = (trade:getItemQty(1164) / 99) + local kawahori = (trade:getItemQty(1167) / 99) local makibishi = (trade:getItemQty(1170) / 99) local hiraishin = (trade:getItemQty(1173) / 99) - local mizu = (trade:getItemQty(1176) / 99) + local mizu = (trade:getItemQty(1176) / 99) local shihei = (trade:getItemQty(1179) / 99) - local jusatsu = (trade:getItemQty(1182) / 99) - local kaginawa = (trade:getItemQty(1185) / 99) + local jusatsu = (trade:getItemQty(1182) / 99) + local kaginawa = (trade:getItemQty(1185) / 99) local sairui = (trade:getItemQty(1188) / 99) local kodoku = (trade:getItemQty(1191) / 99) - local shinobi = (trade:getItemQty(1194) / 99) + local shinobi = (trade:getItemQty(1194) / 99) local sanjaku = (trade:getItemQty(2553) / 99) local soushi = (trade:getItemQty(2555) / 99) - local kabenro = (trade:getItemQty(2642) / 99) + local kabenro = (trade:getItemQty(2642) / 99) local jinko = (trade:getItemQty(2643) / 99) - local mokujin = (trade:getItemQty(2970) / 99) + local mokujin = (trade:getItemQty(2970) / 99) local inoshi = (trade:getItemQty(2971) / 99) local shikan = (trade:getItemQty(2972) / 99) local chono = (trade:getItemQty(2973) / 99) Index: scripts/zones/Port_Bastok/npcs/Valah_Molkot.lua =================================================================== --- scripts/zones/Port_Bastok/npcs/Valah_Molkot.lua (revision 2121) +++ scripts/zones/Port_Bastok/npcs/Valah_Molkot.lua (working copy) @@ -17,10 +17,10 @@ function onTrade(player,npc,trade) -count = trade:getItemCount(); -gil = trade:getGil(); +local count = trade:getItemCount(); +local gil = trade:getGil(); -itemQuality = 0; +local itemQuality = 0; if (trade:getItemCount() == 1 and trade:getGil() == 0) then if (trade:hasItemQty(957,1)) then -- Amaryllis itemQuality = 2; @@ -48,7 +48,7 @@ end end - ALadysHeart = player:getQuestStatus(BASTOK,A_LADY_S_HEART); + local ALadysHeart = player:getQuestStatus(BASTOK,A_LADY_S_HEART); if (itemQuality == 2) then if (ALadysHeart == QUEST_COMPLETED) then Index: scripts/zones/Port_Jeuno/npcs/Cumetouflaix.lua =================================================================== --- scripts/zones/Port_Jeuno/npcs/Cumetouflaix.lua (revision 0) +++ scripts/zones/Port_Jeuno/npcs/Cumetouflaix.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Cumetouflaix +-- Standard Text NPC +----------------------------------- +package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil; +require("scripts/zones/Port_Jeuno/TextIDs"); +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:messageSpecial(CUMETOUFLAIX); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Port_Jeuno/npcs/Guide_Stone.lua =================================================================== --- scripts/zones/Port_Jeuno/npcs/Guide_Stone.lua (revision 0) +++ scripts/zones/Port_Jeuno/npcs/Guide_Stone.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Guide Stone +-- Normal Text +----------------------------------- +package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil; +require("scripts/zones/Port_Jeuno/TextIDs"); +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:messageSpecial(GUIDE_STONE); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Port_Jeuno/npcs/Kochahy-Muwachahy.lua =================================================================== --- scripts/zones/Port_Jeuno/npcs/Kochahy-Muwachahy.lua (revision 2121) +++ scripts/zones/Port_Jeuno/npcs/Kochahy-Muwachahy.lua (working copy) @@ -93,7 +93,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then itemCP = inventory[Item + 1]; player:delCP(itemCP); player:addItem(inventory[Item + 2],1); Index: scripts/zones/Port_Jeuno/npcs/Synergy_Engineer.lua =================================================================== --- scripts/zones/Port_Jeuno/npcs/Synergy_Engineer.lua (revision 0) +++ scripts/zones/Port_Jeuno/npcs/Synergy_Engineer.lua (working copy) @@ -0,0 +1,44 @@ +----------------------------------- +-- Area: Port Jeuno +-- NPC: +-- UNFINISHED NPC +----------------------------------- + +package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil; +require("scripts/zones/Port_Jeuno/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x2af9); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + + + Index: scripts/zones/Port_Jeuno/npcs/Synergy_Furnace.lua =================================================================== --- scripts/zones/Port_Jeuno/npcs/Synergy_Furnace.lua (revision 0) +++ scripts/zones/Port_Jeuno/npcs/Synergy_Furnace.lua (working copy) @@ -0,0 +1,44 @@ +----------------------------------- +-- Area: Port Jeuno +-- NPC: +-- UNFINISHED NPC +----------------------------------- + +package.loaded["scripts/zones/Port_Jeuno/TextIDs"] = nil; +require("scripts/zones/Port_Jeuno/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x1194); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + + + Index: scripts/zones/Port_Jeuno/TextIDs.lua =================================================================== --- scripts/zones/Port_Jeuno/TextIDs.lua (revision 2121) +++ scripts/zones/Port_Jeuno/TextIDs.lua (working copy) @@ -7,7 +7,9 @@ KEYITEM_OBTAINED = 6381; -- Obtained key item: HOMEPOINT_SET = 6583; -- Home point set! MOGHOUSE_EXIT = 7052; -- You have learned your way through the back alleys of Jeuno! Now you can exit to any area from your residence. - + GUIDE_STONE = 6898; -- Up: Lower Jeuno, Down: Qufim Island + CUMETOUFLAIX = 6937; -- This underground tunnel leads to the island of Qufim. Everyone is advised to stay out. But of course you adventurers never listen. + -- Conquest system CONQUEST = 7260; -- You've earned conquest points! Index: scripts/zones/Port_Jeuno/Zone.lua =================================================================== --- scripts/zones/Port_Jeuno/Zone.lua (revision 2121) +++ scripts/zones/Port_Jeuno/Zone.lua (working copy) @@ -43,6 +43,10 @@ player:setVar("PlayerMainJob",0); end end + + --if (player:getVar("ABYSSEA_A_JOURNEY_BEGINS") == 0) then + -- cs = 0x0144; + --end return cs; end; @@ -89,5 +93,9 @@ elseif (csid == 0x7534 and option == 0) then player:setHomePoint(); player:messageSpecial(HOMEPOINT_SET); - end + elseif (csid == 0x0144) then + player:completeQuest(ABYSSEA,A_JOURNEY_BEGINS); + player:addQuest(ABYSSEA,THE_TRUTH_BECKONS); + player:setVar("ABYSSEA_A_JOURNEY_BEGINS",1); + end end; Index: scripts/zones/Port_San_dOria/npcs/Ceraulian.lua =================================================================== --- scripts/zones/Port_San_dOria/npcs/Ceraulian.lua (revision 2121) +++ scripts/zones/Port_San_dOria/npcs/Ceraulian.lua (working copy) @@ -8,6 +8,7 @@ package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; ----------------------------------- +require("scripts/globals/settings"); require("scripts/globals/quests"); require("scripts/zones/Port_San_dOria/TextIDs"); @@ -24,7 +25,7 @@ function onTrigger(player,npc) - if(player:getMainLvl() >= 30 and player:getQuestStatus(SANDORIA,THE_HOLY_CREST) == QUEST_AVAILABLE) then + if(player:getMainLvl() >= ADVANCED_JOB_LEVEL and player:getQuestStatus(SANDORIA,THE_HOLY_CREST) == QUEST_AVAILABLE) then player:startEvent(0x0018); else player:startEvent(0x024b); Index: scripts/zones/Port_Windurst/npcs/Milma-Hapilma_WW.lua =================================================================== --- scripts/zones/Port_Windurst/npcs/Milma-Hapilma_WW.lua (revision 2121) +++ scripts/zones/Port_Windurst/npcs/Milma-Hapilma_WW.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Port_Windurst/npcs/Sachetan_IM.lua =================================================================== --- scripts/zones/Port_Windurst/npcs/Sachetan_IM.lua (revision 0) +++ scripts/zones/Port_Windurst/npcs/Sachetan_IM.lua (working copy) @@ -0,0 +1,143 @@ +----------------------------------- +-- Area: Port Windurst +-- NPC: Sachetan I.M. + +-- X Grant Signet +-- X Recharge Emperor Band, Empress Band, or Chariot Band +-- X Accepts traded Crystals to fill up the Rank bar to open new Missions. +-- X Sells items in exchange for Conquest Points +-- X Start Supply Run Missions and offers a list of already-delivered supplies. +-- Start an Expeditionary Force by giving an E.F. region insignia to you. +------------------------------------- +package.loaded["scripts/zones/Port_Windurst/TextIDs"] = nil; +package.loaded["scripts/globals/conquestguards"] = nil; +------------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/conquestguards"); +require("scripts/zones/Port_Windurst/TextIDs"); + +guardnation = BASTOK; -- SANDORIA, BASTOK, WINDURST, JEUNO +guardtype = 2; -- 1: city, 2: foreign, 3: outpost, 4: border +size = table.getn(BastInv); +inventory = BastInv; + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + tradeConquestGuard(player,npc,trade,guardnation,guardtype); +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + if(player:getNation() == guardnation and player:getVar("supplyQuest_started") > 0 and supplyRunFresh(player) == 0) then + player:showText(npc,CONQUEST + 40); -- "We will dispose of those unusable supplies." + region = player:getVar("supplyQuest_region"); + player:delKeyItem(getSupplyKey(region)); + player:messageSpecial(KEYITEM_OBTAINED + 1,getSupplyKey(region)); + player:setVar("supplyQuest_started",0); + player:setVar("supplyQuest_region",0); + else + Menu1 = getArg1(guardnation,player); + Menu2 = getExForceAvailable(guardnation,player); + Menu3 = conquestRanking(); + Menu4 = getSupplyAvailable(guardnation,player); + Menu5 = player:getVar("supplyQuest_BASTOK"); + Menu6 = getArg6(player); + Menu7 = getCP(player); + Menu8 = getRewardExForce(guardnation,player); + + player:startEvent(0x7ff7,Menu1,Menu2,Menu3,Menu4,Menu5,Menu6,Menu7,Menu8); + end + +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("onUpdateCSID: %u",csid); +--printf("onUpdateOPTION: %u",option); + + if(option >= 32768 and option <= 32944) then + for Item = 1,size,3 do + if(option == inventory[Item]) then + CPVerify = 1; + if(getCP(player) >= inventory[Item + 1]) then + CPVerify = 0; + end; + + player:updateEvent(2,CPVerify,inventory[Item + 2]); + break; + end; + end; + end; + +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("onFinishCSID: %u",csid); +--printf("onFinishOPTION: %u",option); + + if(option == 1) then + duration = (player:getRank() + getNationRank(player:getNation()) + 3) * 3600; + player:delStatusEffect(EFFECT_SIGNET); + player:delStatusEffect(EFFECT_SIGIL); + player:delStatusEffect(EFFECT_SANCTION); + player:addStatusEffect(EFFECT_SIGNET,0,0,duration); -- Grant Signet + elseif(option >= 32768 and option <= 32944) then + myCP = getCP(player); + for Item = 1,size,3 do + if(option == inventory[Item]) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then + if(player:getNation() == guardnation) then + PlayerCP = myCP - inventory[Item + 1]; + else + if(inventory[Item + 1] <= 8000) then + PlayerCP = myCP - inventory[Item + 1] * 2; + else + PlayerCP = myCP - inventory[Item + 1] + 8000; + end; + end; + setCP(player,PlayerCP); + player:addItem(inventory[Item + 2],1); + player:messageSpecial(ITEM_OBTAINED,inventory[Item + 2]); + else + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,inventory[Item + 2]); + end; + break; + end; + end; + elseif(option >= 65541 and option <= 65565) then -- player chose supply quest. + region = option - 65541; + player:addKeyItem(getSupplyKey(region)); + player:messageSpecial(KEYITEM_OBTAINED,getSupplyKey(region)); + player:setVar("supplyQuest_started",VanadielDayOfTheYear()); + player:setVar("supplyQuest_region",region); + end; + +end; \ No newline at end of file Index: scripts/zones/Promyvion-Dem/Zone.lua =================================================================== --- scripts/zones/Promyvion-Dem/Zone.lua (revision 2121) +++ scripts/zones/Promyvion-Dem/Zone.lua (working copy) @@ -25,8 +25,8 @@ if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(20,-2.1,63.031,192); end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,30,0,0); + -- ZONE LEVEL RESTRICTION (Was removed in offical update.) + --player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,30,0,0); return cs; end; Index: scripts/zones/Promyvion-Holla/Zone.lua =================================================================== --- scripts/zones/Promyvion-Holla/Zone.lua (revision 2121) +++ scripts/zones/Promyvion-Holla/Zone.lua (working copy) @@ -14,6 +14,22 @@ ----------------------------------- function onInitialize(zone) + zone:registerRegion(1, 78, -2, 78, 82, 0, 82); -- exit Promyvion - Holla (J-7) + zone:registerRegion(2, -42, -1, 198, -38, 0, 202); -- Level 1 MR spawn point (I-6) + zone:registerRegion(3, -2, -1, -42, 2, 0, -38); -- Level 2 MR spawn point (I-9) + zone:registerRegion(4, -162, -1, -202, -157, 0, -198); -- Level 2 MR spawn point (G-11) + zone:registerRegion(5, -282, -1, -42, -278, 0, -38); -- Level 2 MR spawn point (F-9) + zone:registerRegion(6, -240, -1, 38, -237, 0, 41); -- Level 2 MR spawn point (F-8) + zone:registerRegion(7, -122, -1, -2, -118, 0, 2); -- Level 2 porter down to Level 1 (H-8) + zone:registerRegion(8, -162, -1, 118, -158, 0, 122); -- Level 3 west porter down to Level 2 (G-7) + zone:registerRegion(9, -362, -1, 118, -358, 0, 122); -- Level 3 MR spawn point D/E-7 + zone:registerRegion(10, -362, -1, 237, -358, 0, 242); -- Level 3 MR spawn point D/E-5 + zone:registerRegion(11, -282, -1, 277, -278, 0, 282); -- Level 3 MR spawn point E/F-5 + zone:registerRegion(12, 158, -1, 238, 162, 0, 242); -- Level 3 east Porter down to Level 2 (K-5) + zone:registerRegion(13, 278, -1, 197, 282, 0, 202); -- Level 3 MR spawn point M-6 + zone:registerRegion(14, 38, -1, 318, 42, 0, 322); -- Level 3 MR spawn point J-4 + zone:registerRegion(15, 158, -1, 358, 162, 0, 362); -- Level 3 MR spawn point K-4 + zone:registerRegion(16, 118, -1,-322, 121, 0,-318); -- Level 4 Porter down to Level 3 (K-12) end; ----------------------------------- @@ -24,9 +40,7 @@ cs = -1; if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(179.973,-2.1,-23.145,57); - end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,30,0,0); + end return cs; end; @@ -34,7 +48,128 @@ -- onRegionEnter ----------------------------------- -function onRegionEnter(player,region) +function onRegionEnter(player,region) + + switch (region): caseof { + + --------------------------------- + [1] = function (x) -- + --------------------------------- + player:startEvent(0x002E); + end, + + --------------------------------- + [2] = function (x) -- + --------------------------------- + player:startEvent(0x0025); + end, + + --------------------------------- + [3] = function (x) -- + --------------------------------- + if (math.random()>=0.5) then + player:startEvent(0x0021); + else + player:startEvent(0x0022); + end + end, + + --------------------------------- + [4] = function (x) -- + --------------------------------- + if (math.random()>=0.5) then + player:startEvent(0x0021); + else + player:startEvent(0x0022); + end + end, + + --------------------------------- + [5] = function (x) -- + --------------------------------- + if (math.random()>=0.5) then + player:startEvent(0x0021); + else + player:startEvent(0x0022); + end + end, + + --------------------------------- + [6] = function (x) -- + --------------------------------- + if (math.random()>=0.5) then + player:startEvent(0x0021); + else + player:startEvent(0x0022); + end + end, + + --------------------------------- + [7] = function (x) -- + --------------------------------- + player:startEvent(0x0029); + end, + + --------------------------------- + [8] = function (x) -- + --------------------------------- + player:startEvent(0x002A); + end, + + --------------------------------- + [9] = function (x) -- + --------------------------------- + player:startEvent(0x001E); + end, + + --------------------------------- + [10] = function (x) -- + --------------------------------- + player:startEvent(0x001E); + end, + + --------------------------------- + [11] = function (x) -- + --------------------------------- + player:startEvent(0x001E); + end, + + + --------------------------------- + [12] = function (x) -- + --------------------------------- + player:startEvent(0x002A); + end, + + --------------------------------- + [13] = function (x) -- + --------------------------------- + player:startEvent(0x001E); + end, + + --------------------------------- + [14] = function (x) -- + --------------------------------- + player:startEvent(0x001E); + end, + + --------------------------------- + [15] = function (x) -- + --------------------------------- + player:startEvent(0x001E); + end, + + --------------------------------- + [16] = function (x) -- + --------------------------------- + if (math.random()>=0.5) then + player:startEvent(0x002B); + else + player:startEvent(0x002C); + end + end, + } + end; ----------------------------------- @@ -53,4 +188,7 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + if (csid == 0x002E) then + player:setPos(-260,0,280,0,0x0E) -- back to Hall of Transference + end end; Index: scripts/zones/Promyvion-Mea/Zone.lua =================================================================== --- scripts/zones/Promyvion-Mea/Zone.lua (revision 2121) +++ scripts/zones/Promyvion-Mea/Zone.lua (working copy) @@ -3,7 +3,6 @@ -- Zone: Promyvion-Mea (20) -- ----------------------------------- - package.loaded["scripts/zones/Promyvion-Mea/TextIDs"] = nil; require("scripts/globals/status"); require("scripts/globals/settings"); @@ -13,20 +12,63 @@ -- onInitialize ----------------------------------- -function onInitialize(zone) -end; +function onInitialize(zone) +-- -96,0,174,155 -- Level One Start + zone:registerRegion(11,-123,0,200,-116,-1,200); -- Level One Return + zone:registerRegion(12,-282,0,241,-277,0,238); -- Level One MR +-- -70,0,-233,105 -- Level Two Start + zone:registerRegion(21,-1,0,-121,2,0,-118); -- Level Two Return + zone:registerRegion(22,-82,0,-38,-78,0,-42); -- Level Two MR1 + zone:registerRegion(23,-318,0,-357,-322,0,-361); -- Level Two MR2 + zone:registerRegion(24,-37,0,-321,-42,0,-317); -- Level Two MR3 + zone:registerRegion(25,81,0,-238,77,0,-241); -- Level Two MR4 + +-- -167,0,172,38 -- Level Three West Start + zone:registerRegion(31,-157,0,158,-161,0,161); -- Level Three West Return + zone:registerRegion(32,-38,0,-1,-42,0,1); -- Level Three West MR1 + zone:registerRegion(33,-241,0,-42,-238,0,-37); -- Level Three West MR2 + zone:registerRegion(34,-321,0,-42,-318,0,-38); -- Level Three West MR3 + +-- 68,0,-76,254 -- Level Three East Start + zone:registerRegion(35,158,0,-281,161,0,-278); -- Level Three East Return + zone:registerRegion(36,242,0,-322,242,0,-317); -- Level Three East MR1 + zone:registerRegion(37,198,0,-2,201,0,2); -- Level Three East MR2 + zone:registerRegion(38,358,0,-41,362,0,-38); -- Level Three East MR3 + +-- -106,0,384,38 -- Level Four Start + zone:registerRegion(41,-82,0,361,-78,0,358); -- Level Four Return + +end; + ----------------------------------- -- onZoneIn ----------------------------------- function onZoneIn(player,prevZone) cs = -1; - if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then - player:setPos(100,-2.059,183.068,192); - end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,30,0,0); + meaFlux = player:getVar("Mea_Flux"); + + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 3 and player:getVar("PM1-2_Mea_Entered") < 1) then + player:startEvent(0x0032); + end + + if(meaFlux == 1) then + player:setPos(-96,0,174,155); + elseif(meaFlux == 2) then + player:setPos(-70,0,-233,105); + elseif(meaFlux == 31) then + player:setPos(-167,0,172,38); + elseif(meaFlux == 32) then + player:setPos(68,0,-76,254); + elseif(meaFlux == 4) then + player:setPos(-106,0,384,38); + end + + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(-96,0,174,155); + end + return cs; end; @@ -35,6 +77,78 @@ ----------------------------------- function onRegionEnter(player,region) + + switch (region:GetRegionID()): caseof + { + [11] = function (x) + player:setVar("option",11); + player:startEvent(0x002e); + end, + [12] = function (x) + player:setVar("option",12); + player:startEvent(); + end, + + [21] = function (x) + player:setVar("option",21); + player:startEvent(); + end, + [22] = function (x) + player:setVar("option",22); + player:startEvent(); + end, + [23] = function (x) + player:setVar("option",23); + player:startEvent(); + end, + [24] = function (x) + player:setVar("option",24); + player:startEvent(); + end, + [25] = function (x) + player:setVar("option",25); + player:startEvent(); + end, + + [31] = function (x) + player:setVar("option",31); + player:startEvent(); + end, + [32] = function (x) + player:setVar("option",32); + player:startEvent(); + end, + [33] = function (x) + player:setVar("option",33); + player:startEvent(); + end, + [34] = function (x) + player:setVar("option",34); + player:startEvent(); + end, + [35] = function (x) + player:setVar("option",35); + player:startEvent(); + end, + [36] = function (x) + player:setVar("option",36); + player:startEvent(); + end, + [37] = function (x) + player:setVar("option",37); + player:startEvent(); + end, + [38] = function (x) + player:setVar("option",38); + player:startEvent(); + end, + + [41] = function (x) + player:setVar("option",41); + player:startEvent(); + end, + } + end; ----------------------------------- @@ -53,4 +167,9 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + if(csid == 0x0032) then + player:setVar("PM1-2_Mea_Entered",1) + elseif(csid == 0x002e and option = 1) then + player:setPos(280,-80,-49,65,0x0E); -- -> back to Hall of Transferance + end end; Index: scripts/zones/Promyvion-Vahzl/Zone.lua =================================================================== --- scripts/zones/Promyvion-Vahzl/Zone.lua (revision 2121) +++ scripts/zones/Promyvion-Vahzl/Zone.lua (working copy) @@ -25,8 +25,8 @@ if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-140,-2.1,-56.893,192); end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,50,0,0); + -- ZONE LEVEL RESTRICTION (Was removed in offical update.) + --player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,50,0,0); return cs; end; Index: scripts/zones/Provenance/Zone.lua =================================================================== --- scripts/zones/Provenance/Zone.lua (revision 2121) +++ scripts/zones/Provenance/Zone.lua (working copy) @@ -3,9 +3,10 @@ -- Zone: Provenance (222) -- ----------------------------------- + package.loaded["scripts/zones/Provenance/TextIDs"] = nil; ------------------------------------ - +require("scripts/globals/status"); +require("scripts/globals/settings"); require("scripts/zones/Provenance/TextIDs"); ----------------------------------- @@ -13,20 +14,23 @@ ----------------------------------- function onInitialize(zone) -end; +end; ----------------------------------- -- onZoneIn ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(529,12,505,197); + end return cs; end; ------------------------------------ --- onRegionEnter ------------------------------------ +----------------------------------- +-- onRegionEnter +----------------------------------- function onRegionEnter(player,region) end; Index: scripts/zones/Qufim_Island/npcs/Nightflowers.lua =================================================================== --- scripts/zones/Qufim_Island/npcs/Nightflowers.lua (revision 2121) +++ scripts/zones/Qufim_Island/npcs/Nightflowers.lua (working copy) @@ -22,7 +22,7 @@ function onTrigger(player,npc) - currentTime = VanadielHour(); + local currentTime = VanadielHour(); if(currentTime >= 22 or currentTime < 6) then if(player:getQuestStatus(JEUNO,SAVE_MY_SON) == QUEST_ACCEPTED and player:getVar("SaveMySon_Event") == 0) then Index: scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Quicksand_Caves/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Quicksand_Caves/TextIDs"); @@ -86,8 +86,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Riverne-Site_A01/Zone.lua =================================================================== --- scripts/zones/Riverne-Site_A01/Zone.lua (revision 2121) +++ scripts/zones/Riverne-Site_A01/Zone.lua (working copy) @@ -21,12 +21,15 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(653,0,589,155); -- This seems wrong. + end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,40,0,0); + -- ZONE LEVEL RESTRICTION (Not in effect) + --player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,40,0,0); -return cs; + return cs; end; ----------------------------------- Index: scripts/zones/Riverne-Site_B01/Zone.lua =================================================================== --- scripts/zones/Riverne-Site_B01/Zone.lua (revision 2121) +++ scripts/zones/Riverne-Site_B01/Zone.lua (working copy) @@ -21,12 +21,15 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(730,-21,404,90); + end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,50,0,0); + -- ZONE LEVEL RESTRICTION (Not in effect) + --player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,50,0,0); -return cs; + return cs; end; ----------------------------------- Index: scripts/zones/Rolanberry_Fields/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/Rolanberry_Fields/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/Rolanberry_Fields/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to Rolanberry_Fields_S +----------------------------------- +package.loaded["scripts/zones/Rolanberry_Fields/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Rolanberry_Fields/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); +require("scripts/globals/missions"); + +function onTrigger(player,npc) + if (player:hasKeyItem(PURE_WHITE_FEATHER) == false) then + player:startEvent(0x01f4,1); + elseif (player:getVar("MAWS_ROLANBERRY") == 1) then + player:startEvent(0x0388); + else + player:messageSpecial(NOTHING_HAPPENS); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x01f4) then + r = math.random(1,3); + player:addKeyItem(PURE_WHITE_FEATHER); + player:messageSpecial(KEYITEM_OBTAINED, PURE_WHITE_FEATHER); + player:completeMission(WOTG,CAVERNOUS_MAWS); + player:addMission(WOTG,BACK_TO_THE_BEGINNING); + if (r == 1) then + player:setVar("MAWS_BATALLIA",1); + toMaw(player,1); -- Batallia_Downs[S] maw + elseif (r == 2) then + player:setVar("MAWS_ROLANBERRY",1); + toMaw(player,3); -- Rolanberry_Fields_[S] maw + elseif (r == 3) then + player:setVar("MAWS_SAUROMUGUE",1); + toMaw(player,5); -- Sauromugue_Champaign_[S] maw + end; + elseif (csid == 0x0388 and option == 1) then + toMaw(player,3); -- Rolanberry_Fields_[S] maw + end; +end; \ No newline at end of file Index: scripts/zones/Rolanberry_Fields/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Rolanberry_Fields/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Rolanberry_Fields/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00200); end end; Index: scripts/zones/Rolanberry_Fields_[S]/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/Rolanberry_Fields_[S]/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/Rolanberry_Fields_[S]/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to Rolanberry Fields +----------------------------------- +package.loaded["scripts/zones/Rolanberry_Fields_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Rolanberry_Fields_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_ROLANBERRY") == 0) then + player:startEvent(0x0065); + player:setVar("MAWS_ROLANBERRY",1); + else + player:startEvent(0x0066); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x0065 or csid == 0x0066) and (option == 1)) then + toMaw(player,4); + end +end; \ No newline at end of file Index: scripts/zones/Rolanberry_Fields_[S]/npcs/Fortilace.lua =================================================================== --- scripts/zones/Rolanberry_Fields_[S]/npcs/Fortilace.lua (revision 0) +++ scripts/zones/Rolanberry_Fields_[S]/npcs/Fortilace.lua (working copy) @@ -0,0 +1,35 @@ +----------------------------------- +-- Fortilace +-- Teleports Players to Ruhotz Silvermines (D-9) for Campaign Ops +----------------------------------- +package.loaded["scripts/zones/Rolanberry_Fields_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Rolanberry_Fields_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + player:startEvent(0x00C8); +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x00C8) and (option == 1)) then + --player:setPos(); -- MISSING CORDS + end +end; \ No newline at end of file Index: scripts/zones/RuAun_Gardens/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/RuAun_Gardens/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/RuAun_Gardens/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/RuAun_Gardens/TextIDs"); Index: scripts/zones/RuLude_Gardens/npcs/Adolie.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Adolie.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Adolie.lua (working copy) @@ -4,12 +4,12 @@ -- @zone 243 -- @pos -35 2 59 ----------------------------------- -package.loaded["scripts/zones/Rulude_Gardens/TextIDs"] = nil; +package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/quests"); -require("scripts/zones/Rulude_Gardens/TextIDs"); +require("scripts/zones/RuLude_Gardens/TextIDs"); ----------------------------------- -- onTrade Action Index: scripts/zones/RuLude_Gardens/npcs/Dabih_Jajalioh.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Dabih_Jajalioh.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Dabih_Jajalioh.lua (working copy) @@ -8,8 +8,8 @@ ----------------------------------- require("scripts/globals/shop"); -package.loaded["scripts/zones/Rulude_Gardens/TextIDs"] = nil; -require("scripts/zones/Rulude_Gardens/TextIDs"); +package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; +require("scripts/zones/RuLude_Gardens/TextIDs"); ----------------------------------- -- onTrade Action Index: scripts/zones/RuLude_Gardens/npcs/Harith.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Harith.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Harith.lua (working copy) @@ -9,7 +9,8 @@ ----------------------------------- package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; ----------------------------------- - +require("scripts/globals/settings"); +require("scripts/globals/missions"); ----------------------------------- -- onTrade Action ----------------------------------- @@ -22,7 +23,11 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x006f); + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 1) then + player:startEvent(0x006f); + else + player:startEvent(0x006f); + end end; ----------------------------------- @@ -41,5 +46,8 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + if(csid == 0x0018 and player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 1) then + player:setVar("CopStatus",2); + end end; Index: scripts/zones/RuLude_Gardens/npcs/Laityn.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Laityn.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Laityn.lua (working copy) @@ -1,9 +1,10 @@ ----------------------------------- --- Area: Ru'Lud Gardens --- NPC: Laityn --- Involved In Quest: Recollections +-- Area: Ru'Lud Gardens +-- NPC: Laityn +-- Standard Info NPC ----------------------------------- +require("scripts/globals/settings"); require("scripts/globals/quests"); ----------------------------------- @@ -18,9 +19,12 @@ ----------------------------------- function onTrigger(player,npc) - - if(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED and player:getVar("recollectionsQuest") == 0) then - player:startEvent(0x2713); -- Option CS for "Recollections" + if(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED and player:getVar("windurstRecollectionsCS") == 0) then + player:startEvent(0x2713); + elseif(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_ACCEPTED and player:getVar("windurstRecollectionsCS") == 1) then + player:startEvent(0x2714); + elseif(player:getQuestStatus(WINDURST,RECOLLECTIONS) == QUEST_COMPLETED) then + player:startEvent(0x2715,0x370c); else player:startEvent(0x2716); end @@ -42,9 +46,10 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); - if(csid == 0x2713) then - player:setVar("recollectionsQuest",1); + player:setVar("windurstRecollectionsCS",1) end - -end; \ No newline at end of file +end; + + + Index: scripts/zones/RuLude_Gardens/npcs/Magian_Moogle.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Magian_Moogle.lua (revision 0) +++ scripts/zones/RuLude_Gardens/npcs/Magian_Moogle.lua (working copy) @@ -0,0 +1,46 @@ +----------------------------------- +-- Area: Ru'Lude Gardens +-- NPC: Magian Moogle +-- Type: Magian Trials NPC +-- @pos 10 2.5 121 64 +----------------------------------- +package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/zones/RuLude_Gardens/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + player:startEvent(0x279d); +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +-- printf("CSID: %u",csid); +-- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +printf("CSID: %u",csid); +printf("RESULT: %u",option); +end; \ No newline at end of file Index: scripts/zones/RuLude_Gardens/npcs/Morlepiche.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Morlepiche.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Morlepiche.lua (working copy) @@ -8,13 +8,13 @@ -- X Accepts traded Crystals to fill up the Rank bar to open new Missions. -- X Sells items in exchange for Conquest Points ------------------------------------- -package.loaded["scripts/zones/Rulude_Gardens/TextIDs"] = nil; +package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; package.loaded["scripts/globals/conquestguards"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/conquestguards"); -require("scripts/zones/Rulude_Gardens/TextIDs"); +require("scripts/zones/RuLude_Gardens/TextIDs"); guardnation = OTHER; -- SANDORIA, BASTOK, WINDURST, OTHER(Jeuno). guardtype = 1; -- 1: city, 2: foreign, 3: outpost, 4: border @@ -92,7 +92,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then itemCP = inventory[Item + 1]; player:delCP(itemCP); player:addItem(inventory[Item + 2],1); Index: scripts/zones/RuLude_Gardens/npcs/Nomad_Moogle.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Nomad_Moogle.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Nomad_Moogle.lua (working copy) @@ -8,7 +8,8 @@ ----------------------------------- require("scripts/globals/settings"); -require("scripts/globals/keyitems"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); require("scripts/zones/RuLude_Gardens/TextIDs"); ----------------------------------- @@ -16,18 +17,59 @@ ----------------------------------- function onTrade(player,npc,trade) + + if(trade:hasItemQty(1127,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and player:getMerits() > 2) then + if(player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then + player:startEvent(0x2798); + end + elseif(trade:hasItemQty(2955,5) == true and trade:getGil() == 0 and trade:getItemCount() == 5 and player:getMerits() > 3) then + if(player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then + --player:startEvent(0); + end + elseif(trade:hasItemQty(2955,10) == true and trade:getGil() == 0 and trade:getItemCount() == 10 and player:getMerits() > 4) then + if(player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then + --player:startEvent(0); + end + elseif(trade:hasItemQty(2955,1) == true and trade:hasItemQty(503,1) == true and trade:getGil() == 0 and trade:getItemCount() == 2 and player:getMerits() > 9) then + if(player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then + --player:startEvent(0); + end + end + end; ----------------------------------- -- onTrigger Action ----------------------------------- -function onTrigger(player,npc) +function onTrigger(player,npc) if(player:hasKeyItem(LIMIT_BREAKER) == false and player:getMainLvl() >= 75) then - player:startEvent(0x2798); + player:startEvent(0x2797); + elseif(player:getMainLvl() == 75 and player:levelCap() == 75 and MAX_LEVEL >= 80 and player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_AVAILABLE) then + player:startEvent(0x273d,0,1,1,0); + elseif(player:getMainLvl() >= 76 and player:levelCap() == 80 and MAX_LEVEL >= 85 and player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_AVAILABLE) then + player:startEvent(0x273d,0,1,2,0); + elseif(player:getMainLvl() >= 81 and player:levelCap() == 85 and MAX_LEVEL >= 90 and player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_AVAILABLE) then + player:startEvent(0x273d,0,1,3,0); + elseif(player:getMainLvl() >= 91 and player:levelCap() == 90 and MAX_LEVEL >= 95 and player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_AVAILABLE) then + player:startEvent(0x273d,0,1,4,0); + elseif(player:getMainLvl() >= 91 and player:levelCap() == 95 and MAX_LEVEL >= 99 and player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_AVAILABLE) then + player:startEvent(0x273d,0,1,5,0); + elseif(player:getQuestStatus(JEUNO,NEW_WORLDS_AWAIT) == QUEST_ACCEPTED) then + player:startEvent(0x273d,0,1,1,1); + elseif(player:getQuestStatus(JEUNO,EXPANDING_HORIZONS) == QUEST_ACCEPTED) then + player:startEvent(0x273d,0,1,2,1); + elseif(player:getQuestStatus(JEUNO,BEYOND_THE_STARS) == QUEST_ACCEPTED) then + player:startEvent(0x273d,0,1,3,1); + elseif(player:getQuestStatus(JEUNO,DORMANT_POWERS_DISLODGED) == QUEST_ACCEPTED) then + player:startEvent(0x273d,0,1,4,1); + elseif(player:getQuestStatus(JEUNO,BEYOND_INFINITY) == QUEST_ACCEPTED) then + player:startEvent(0x273d,0,1,5,1); -- player:startEvent(0x273d,0,1,6,1); + elseif(player:hasKeyItem(LIMIT_BREAKER) == true and player:getMainLvl() >= 75) then + player:startEvent(0x273d,0,1,0,0); else - player:startEvent(0x005E); + player:startEvent(0x273d,0,2,0,0); end end; @@ -46,12 +88,24 @@ ----------------------------------- function onEventFinish(player,csid,option) --- printf("CSID: %u",csid); --- printf("RESULT: %u",option); +printf("CSID: %u",csid); +printf("RESULT: %u",option); - if(csid == 0x2798) then + if(csid == 0x2797) then player:addKeyItem(LIMIT_BREAKER); - player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER); + player:messageSpecial(KEYITEM_OBTAINED,LIMIT_BREAKER); + elseif(csid == 0x273d) then + if(option == 5) then + player:addQuest(JEUNO,NEW_WORLDS_AWAIT); + end + -- option 6 is Not yet! in Exceeding Limits Lv75-80 + elseif(csid == 0x2798) then + player:tradeComplete(); + player:setMerits(player:getMerits() - 3); + player:addFame(JEUNO,50); + player:levelCap(80); + player:completeQuest(JEUNO,NEW_WORLDS_AWAIT); + player:messageSpecial(YOUR_LEVEL_LIMIT_IS_NOW_80); end end; \ No newline at end of file Index: scripts/zones/RuLude_Gardens/npcs/Pherimociel.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Pherimociel.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Pherimociel.lua (working copy) @@ -4,12 +4,11 @@ -- Type: Standard NPC -- @zone: 243 -- @pos: -31.627 1.002 67.956 --- --- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; ----------------------------------- - +require("scripts/globals/settings"); +require("scripts/globals/missions"); ----------------------------------- -- onTrade Action ----------------------------------- @@ -22,7 +21,13 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x009b); + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 0) then + player:startEvent(0x0018); + elseif(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 1) then + player:startEvent(0x0019); + else + player:startEvent(0x009b); + end end; ----------------------------------- @@ -41,5 +46,8 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + if(csid == 0x0018) then + player:setVar("CopStatus",1); + end end; Index: scripts/zones/RuLude_Gardens/npcs/Trail_Markings.lua =================================================================== --- scripts/zones/RuLude_Gardens/npcs/Trail_Markings.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/npcs/Trail_Markings.lua (working copy) @@ -4,13 +4,13 @@ -- Dynamis-Jeuno Enter -- @pos 35 9 -51 243 ----------------------------------- -package.loaded["scripts/zones/Rulude_Gardens/TextIDs"] = nil; +package.loaded["scripts/zones/RuLude_Gardens/TextIDs"] = nil; ----------------------------------- require("scripts/globals/settings"); require("scripts/globals/keyitems"); require("scripts/globals/dynamis"); -require("scripts/zones/Rulude_Gardens/TextIDs"); +require("scripts/zones/RuLude_Gardens/TextIDs"); ----------------------------------- -- onTrade Action @@ -29,7 +29,7 @@ player:startEvent(0x2720); -- cs with Cornelia elseif(player:getVar("DynaJeuno_Win") == 1) then player:startEvent(0x272a,HYDRA_CORPS_TACTICAL_MAP); -- Win CS - elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then + elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then -- and player:hasKeyItem(PRISMATIC_HOURGLASS)) then local firstDyna = 0; local realDay = tonumber(os.date("%j")) local dynaWaitxDay = player:getVar("dynaWaitxDay"); Index: scripts/zones/RuLude_Gardens/TextIDs.lua =================================================================== --- scripts/zones/RuLude_Gardens/TextIDs.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/TextIDs.lua (working copy) @@ -26,6 +26,11 @@ YOUR_LEVEL_LIMIT_IS_NOW_65 = 10290; -- Your level limit is now 65. YOUR_LEVEL_LIMIT_IS_NOW_70 = 10332; -- Your level limit is now 70. YOUR_LEVEL_LIMIT_IS_NOW_75 = 10391; -- Your level limit is now 75. +YOUR_LEVEL_LIMIT_IS_NOW_80 = 12080; -- Your level limit is now 80! +YOUR_LEVEL_LIMIT_IS_NOW_85 = 12128; -- Your level limit is now 85! +YOUR_LEVEL_LIMIT_IS_NOW_90 = 12227; -- Your level limit is now 90! +YOUR_LEVEL_LIMIT_IS_NOW_95 = 12328; -- Your level limit is now 95! +YOUR_LEVEL_LIMIT_IS_NOW_99 = 12408; -- Your level limit is now 99! -- Shop Texts DABIHJAJALIOH_SHOP_DIALOG = 10789; -- Hello therrre. I worrrk for the M & P Market. I'm still new, so I don't know much about selling stuff... Index: scripts/zones/RuLude_Gardens/Zone.lua =================================================================== --- scripts/zones/RuLude_Gardens/Zone.lua (revision 2121) +++ scripts/zones/RuLude_Gardens/Zone.lua (working copy) @@ -46,8 +46,8 @@ ----------------------------------- function onEventFinish(player,csid,option) - --printf("CSID: %u",csid); - --printf("RESULT: %u",option); + printf("CSID: %u",csid); + printf("RESULT: %u",option); if (csid == 0x7534 and option == 0) then player:setHomePoint(); player:messageSpecial(HOMEPOINT_SET); Index: scripts/zones/Sacrarium/Zone.lua =================================================================== --- scripts/zones/Sacrarium/Zone.lua (revision 2121) +++ scripts/zones/Sacrarium/Zone.lua (working copy) @@ -25,8 +25,8 @@ if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(-219.996,-18.587,82.795,64); end - -- ZONE LEVEL RESTRICTION - player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,50,0,0); + -- ZONE LEVEL RESTRICTION (No longer in effect) + --player:addStatusEffect(EFFECT_LEVEL_RESTRICTION,50,0,0); return cs; end; Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x006F); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger1.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger1.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger1.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger1 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0070); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger2.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger2.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger2.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger2 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0071); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger3.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger3.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger3.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger3 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0072); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger4.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger4.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger4.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger4 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0073); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger5.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger5.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger5.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger5 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0074); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger6.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger6.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger6.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger6 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0075); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger7.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger7.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/Passenger7.lua (working copy) @@ -0,0 +1,27 @@ +----------------------------------- +-- Passenger7 +-- Basic Chat Text +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + player:startEvent(0x0076); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/San_dOria-Jeuno_Airship/npcs/qm1.lua =================================================================== --- scripts/zones/San_dOria-Jeuno_Airship/npcs/qm1.lua (revision 0) +++ scripts/zones/San_dOria-Jeuno_Airship/npcs/qm1.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------- +-- ??? +-- The Stars of Ifrit +----------------------------------- +-- Includes +package.loaded["scripts/zones/San_dOria_Jeuno_Airship/TextIDs"] = nil; +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + if(player:getQuestStatus(BASTOK,THE_STARS_OF_IFRIT) == 1 and player:hasKeyItem(0xA2) == 0)then + player:addKeyItem(0xA2); + player:messageSpecial(KEYITEM_OBTAINED,0xA2); + end +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +end; \ No newline at end of file Index: scripts/zones/Sauromugue_Champaign/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/Sauromugue_Champaign/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/Sauromugue_Champaign/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to Sauromugue_Champaign_S +----------------------------------- +package.loaded["scripts/zones/Sauromugue_Champaign/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Sauromugue_Champaign/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); +require("scripts/globals/missions"); + +function onTrigger(player,npc) + if (player:hasKeyItem(PURE_WHITE_FEATHER) == false) then + player:startEvent(0x01f4,2); + elseif (player:getVar("MAWS_SAUROMUGUE") == 1) then + player:startEvent(0x0388); + else + player:messageSpecial(NOTHING_HAPPENS); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x01f4) then + r = math.random(1,3); + player:addKeyItem(PURE_WHITE_FEATHER); + player:messageSpecial(KEYITEM_OBTAINED, PURE_WHITE_FEATHER); + player:completeMission(WOTG,CAVERNOUS_MAWS); + player:addMission(WOTG,BACK_TO_THE_BEGINNING); + if (r == 1) then + player:setVar("MAWS_BATALLIA",1); + toMaw(player,1); -- Batallia_Downs[S] maw + elseif (r == 2) then + player:setVar("MAWS_ROLANBERRY",1); + toMaw(player,3); -- Rolanberry_Fields_[S] maw + elseif (r == 3) then + player:setVar("MAWS_SAUROMUGUE",1); + toMaw(player,5); -- Sauromugue_Champaign_[S] maw + end; + elseif (csid == 0x0388 and option == 1) then + toMaw(player,5); -- Sauromugue_Champaign_[S] maw + end; +end; \ No newline at end of file Index: scripts/zones/Sauromugue_Champaign/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Sauromugue_Champaign/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Sauromugue_Champaign/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x08000); end end; Index: scripts/zones/Sauromugue_Champaign_[S]/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/Sauromugue_Champaign_[S]/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/Sauromugue_Champaign_[S]/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to Sauromugue_Champaign +----------------------------------- +package.loaded["scripts/zones/Sauromugue_Champaign_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Sauromugue_Champaign_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_SAUROMUGUE") == 0) then + player:startEvent(0x0065); + player:setVar("MAWS_SAUROMUGUE",1); + else + player:startEvent(0x0066); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x0065 or csid == 0x0066) and (option == 1)) then + toMaw(player,6); + end +end; \ No newline at end of file Index: scripts/zones/Sauromugue_Champaign_[S]/npcs/Fortilace.lua =================================================================== --- scripts/zones/Sauromugue_Champaign_[S]/npcs/Fortilace.lua (revision 0) +++ scripts/zones/Sauromugue_Champaign_[S]/npcs/Fortilace.lua (working copy) @@ -0,0 +1,35 @@ +----------------------------------- +-- Fortilace +-- Teleports Players to Ghoyu's Reverie (L-9) for Campaign Ops +----------------------------------- +package.loaded["scripts/zones/Sauromugue_Champaign_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/Sauromugue_Champaign_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + player:startEvent(0x00C8); +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x00C8) and (option == 1)) then + --player:setPos(); -- MISSING CORDS + end +end; \ No newline at end of file Index: scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Sea_Serpent_Grotto/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Sea_Serpent_Grotto/TextIDs"); @@ -92,8 +92,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Selbina/npcs/Melyon.lua =================================================================== --- scripts/zones/Selbina/npcs/Melyon.lua (revision 2121) +++ scripts/zones/Selbina/npcs/Melyon.lua (working copy) @@ -77,22 +77,22 @@ player:addQuest(OTHER_AREAS,ONLY_THE_BEST); elseif(csid == 0x003e) then player:tradeComplete(); - player:addGil(100); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,100); + player:addGil(100*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,100*GIL_RATE); player:addFame(BASTOK, BAS_FAME*10); player:addFame(SANDORIA,SAN_FAME*10); player:completeQuest(OTHER_AREAS,ONLY_THE_BEST); elseif(csid == 0x003f) then player:tradeComplete(); - player:addGil(120); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,120); + player:addGil(120*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,120*GIL_RATE); player:addFame(BASTOK, BAS_FAME*20); player:addFame(SANDORIA,SAN_FAME*20); player:completeQuest(OTHER_AREAS,ONLY_THE_BEST); elseif(csid == 0x0040) then player:tradeComplete(); - player:addGil(600); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,600); + player:addGil(600*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,600*GIL_RATE); player:addFame(BASTOK, BAS_FAME*30); player:addFame(SANDORIA,SAN_FAME*30); player:completeQuest(OTHER_AREAS,ONLY_THE_BEST); Index: scripts/zones/Selbina/npcs/Thunder_Hawk.lua =================================================================== --- scripts/zones/Selbina/npcs/Thunder_Hawk.lua (revision 2121) +++ scripts/zones/Selbina/npcs/Thunder_Hawk.lua (working copy) @@ -62,8 +62,8 @@ player:delKeyItem(TRADERS_SACK); player:addKeyItem(MAP_OF_THE_RANGUEMONT_PASS); player:messageSpecial(TextID_Selbina.KEYITEM_OBTAINED,MAP_OF_THE_RANGUEMONT_PASS); - player:addGil(3000); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,3000); + player:addGil(3000*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,3000*GIL_RATE); player:addFame(OTHER_AREAS,30); end end; Index: scripts/zones/Selbina/npcs/Vuntar.lua =================================================================== --- scripts/zones/Selbina/npcs/Vuntar.lua (revision 2121) +++ scripts/zones/Selbina/npcs/Vuntar.lua (working copy) @@ -74,16 +74,16 @@ player:addFame(OTHER_AREAS,30); end if(option == 1) then - player:addGil(800); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,800); + player:addGil(800*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,800*GIL_RATE); player:tradeComplete(); elseif(option == 2) then - player:addGil(2000); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,2000); + player:addGil(2000*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,2000*GIL_RATE); player:tradeComplete(); elseif(option == 3) then - player:addGil(3000); - player:messageSpecial(TextID_Selbina.GIL_OBTAINED,3000); + player:addGil(3000*GIL_RATE); + player:messageSpecial(TextID_Selbina.GIL_OBTAINED,3000*GIL_RATE); player:tradeComplete(); end end Index: scripts/zones/South_Gustaberg/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/South_Gustaberg/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/South_Gustaberg/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00040); end end; Index: scripts/zones/Southern_San_dOria/npcs/Aravoge_TK.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Aravoge_TK.lua (revision 2121) +++ scripts/zones/Southern_San_dOria/npcs/Aravoge_TK.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Southern_San_dOria/npcs/Arpevion_TK.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Arpevion_TK.lua (revision 2121) +++ scripts/zones/Southern_San_dOria/npcs/Arpevion_TK.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Southern_San_dOria/npcs/Balasiel.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Balasiel.lua (revision 2121) +++ scripts/zones/Southern_San_dOria/npcs/Balasiel.lua (working copy) @@ -34,14 +34,14 @@ function onTrigger(player,npc) - LvL = player:getMainLvl(); - ASquiresTest = player:getQuestStatus(SANDORIA, A_SQUIRE_S_TEST); - ASquiresTestII = player:getQuestStatus(SANDORIA,A_SQUIRE_S_TEST_II); - AKnightsTest = player:getQuestStatus(SANDORIA, A_KNIGHT_S_TEST); + local LvL = player:getMainLvl(); + local ASquiresTest = player:getQuestStatus(SANDORIA, A_SQUIRE_S_TEST); + local ASquiresTestII = player:getQuestStatus(SANDORIA,A_SQUIRE_S_TEST_II); + local AKnightsTest = player:getQuestStatus(SANDORIA, A_KNIGHT_S_TEST); - if(LvL < 7) then + if(LvL < 7 and LvL < ADVANCED_JOB_LEVEL) then player:startEvent(0x029c); - elseif(LvL >= 7 and ASquiresTest ~= QUEST_COMPLETED) then + elseif ((LvL >= 7 or LvL >= ADVANCED_JOB_LEVEL) and ASquiresTest ~= QUEST_COMPLETED) then if(ASquiresTest == 0) then if(player:getVar("SquiresTest") == 1) then player:startEvent(0x0277); @@ -51,10 +51,10 @@ elseif(ASquiresTest == QUEST_ACCEPTED) then player:startEvent(0x029b); end - elseif(LvL >= 7 and LvL < 15) then + elseif(LvL >= 7 and LvL < 15 and LvL < ADVANCED_JOB_LEVEL) then player:startEvent(0x029f); - elseif(LvL >= 15 and ASquiresTestII ~= QUEST_COMPLETED) then - StalactiteDew = player:hasKeyItem(STALACTITE_DEW) + elseif((LvL >= 15 or LvL >= ADVANCED_JOB_LEVEL) and ASquiresTestII ~= QUEST_COMPLETED) then + local StalactiteDew = player:hasKeyItem(STALACTITE_DEW) if(ASquiresTestII == QUEST_AVAILABLE) then player:startEvent(0x0271); @@ -65,9 +65,9 @@ else player:startEvent(0x029b); end - elseif(LvL >= 15 and LvL < 30) then + elseif(LvL >= 15 and LvL < 30 and LvL < ADVANCED_JOB_LEVEL) then player:startEvent(0x029e); - elseif(LvL >= 30 and AKnightsTest ~= QUEST_COMPLETED) then + elseif(LvL >= ADVANCED_JOB_LEVEL and AKnightsTest ~= QUEST_COMPLETED) then if(AKnightsTest == 0) then if(player:getVar("KnightsTest_Event") == 1) then player:startEvent(0x027b); @@ -171,4 +171,4 @@ -- player:startEvent(0x0009) -- methods create madness map -- player:startEvent(0x000c) -- methods create madness map reminder -- player:startEvent(0x000d) -- methods create madness end --- player:startEvent(0x003f) -- knight stalker \ No newline at end of file +-- player:startEvent(0x003f) -- knight stalker \ No newline at end of file Index: scripts/zones/Southern_San_dOria/npcs/Trail_Markings.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Trail_Markings.lua (revision 2121) +++ scripts/zones/Southern_San_dOria/npcs/Trail_Markings.lua (working copy) @@ -29,7 +29,7 @@ player:startEvent(0x02AE); -- cs with Cornelia elseif(player:getVar("DynaSandoria_Win") == 1) then player:startEvent(0x02ba,HYDRA_CORPS_COMMAND_SCEPTER); -- Win CS - elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then + elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then -- and player:hasKeyItem(PRISMATIC_HOURGLASS)) then local firstDyna = 0; local realDay = tonumber(os.date("%j")) local dynaWaitxDay = player:getVar("dynaWaitxDay"); Index: scripts/zones/Southern_San_dOria/npcs/Varchet.lua =================================================================== --- scripts/zones/Southern_San_dOria/npcs/Varchet.lua (revision 2121) +++ scripts/zones/Southern_San_dOria/npcs/Varchet.lua (working copy) @@ -78,15 +78,15 @@ if (csid == 519) then if (option == GAME_WON) then - player:addGil(10); - player:messageSpecial(GIL_OBTAINED,10); + player:addGil(10*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,10*GIL_RATE); if (exitTheGambler == QUEST_ACCEPTED) then player:completeQuest(SANDORIA,EXIT_THE_GAMBLER); player:showText(npc,7629); end elseif (option == GAME_TIE) then - player:addGil(5); - player:messageSpecial(GIL_OBTAINED,5); + player:addGil(5*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,5*GIL_RATE); player:showText(npc,7622); else player:showText(npc,7620); Index: scripts/zones/Tahrongi_Canyon/npcs/Dimensional_Portal.lua =================================================================== --- scripts/zones/Tahrongi_Canyon/npcs/Dimensional_Portal.lua (revision 0) +++ scripts/zones/Tahrongi_Canyon/npcs/Dimensional_Portal.lua (working copy) @@ -0,0 +1,34 @@ +----------------------------------- +-- Mea Dimensional Portal to Sea +----------------------------------- +package.loaded["scripts/zones/Tahrongi_Canyon/TextIDs"] = nil; +require("scripts/globals/settings"); +require("scripts/globals/missions"); + +----------------------------------- +-- onTrigger Action +----------------------------------- +function onTrigger(player,npc) + if(player:hasCompletedMission(COP,THE_WARRIOR_S_PATH) == true or EVERYONE_CAN_ACCESS_SEA == 1) then + player:startEvent(0x0393); + else + player:messageSpecial(TELEPOINT_DISAPPEARED); + end +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) + if (csid == 0x393) and (option == 1) then + player:setPos(654,-1,101,160,0x21); -- Teleport to Mea side of Al'Taieu + end; +end; \ No newline at end of file Index: scripts/zones/Tahrongi_Canyon/npcs/Shattered_Telepoint.lua =================================================================== --- scripts/zones/Tahrongi_Canyon/npcs/Shattered_Telepoint.lua (revision 0) +++ scripts/zones/Tahrongi_Canyon/npcs/Shattered_Telepoint.lua (working copy) @@ -0,0 +1,59 @@ +----------------------------------- +-- Area: Tahrongi Canyon +-- NPC: Shattered Telepoint +----------------------------------- +package.loaded["scripts/zones/Tahrongi_Canyon/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/keyitems"); +require("scripts/globals/missions"); +require("scripts/zones/Tahrongi_Canyon/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") == 2) then + player:startEvent(0x0390); + elseif(player:getCurrentMission(COP) == BELOW_THE_ARKS and player:getVar("CopStatus") > 2) then + player:startEvent(0x0391); + elseif(player:hasCompletedMission(COP,BELOW_THE_ARKS)) then + player:startEvent(0x0391); + else + player:messageSpecial(TELEPOINT_SHATTERED); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + printf("CSID: %u",csid); + printf("RESULT: %u",option); + + if(csid == 0x0390) then + player:setVar("CopStatus",3); + player:setPos(280,-80,-68,193,0x0e); + end + if(csid == 0x0391 and option == 1) then + player:setPos(280,-80,-68,193,0x0e); + end +end; \ No newline at end of file Index: scripts/zones/Tahrongi_Canyon/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Tahrongi_Canyon/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Tahrongi_Canyon/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x01000); end end; Index: scripts/zones/Tahrongi_Canyon/TextIDs.lua =================================================================== --- scripts/zones/Tahrongi_Canyon/TextIDs.lua (revision 2121) +++ scripts/zones/Tahrongi_Canyon/TextIDs.lua (working copy) @@ -6,7 +6,8 @@ GIL_OBTAINED = 6541; -- Obtained gil KEYITEM_OBTAINED = 6543; -- Obtained key item: ALREADY_OBTAINED_TELE = 7248; -- You already possess the gate crystal for this telepoint. - + TELEPOINT_SHATTERED = 7420; -- The telepoint has been shattered into a thousand pieces... + TELEPOINT_DISAPPEARED = 7249; -- The telepoint has disappeared... -- Mining MINING_IS_POSSIBLE_HERE = 7347; -- Mining is possible here if you have Index: scripts/zones/Tahrongi_Canyon/Zone.lua =================================================================== --- scripts/zones/Tahrongi_Canyon/Zone.lua (revision 2121) +++ scripts/zones/Tahrongi_Canyon/Zone.lua (working copy) @@ -22,7 +22,7 @@ function onZoneIn(player,prevZone) cs = -1; - wc = player:getWeather(); + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(442.781,-1.641,-40.144,160); end Index: scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Temple_of_Uggalepih/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Temple_of_Uggalepih/TextIDs"); @@ -83,8 +83,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/The_Ashu_Talif/Zone.lua =================================================================== --- scripts/zones/The_Ashu_Talif/Zone.lua (revision 2121) +++ scripts/zones/The_Ashu_Talif/Zone.lua (working copy) @@ -20,9 +20,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(0,-31,53,65); + end + return cs; end; ----------------------------------- Index: scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/The_Boyahda_Tree/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/The_Boyahda_Tree/TextIDs"); @@ -92,8 +92,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/The_Eldieme_Necropolis/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/The_Eldieme_Necropolis/TextIDs"); @@ -85,8 +85,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Turbulent_Storm.lua =================================================================== --- scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Turbulent_Storm.lua (revision 0) +++ scripts/zones/The_Eldieme_Necropolis_[S]/npcs/Turbulent_Storm.lua (working copy) @@ -0,0 +1,56 @@ +----------------------------------- (NOT TESTED AT ALL) +-- Area: The Eldieme Necropolis [S] +-- NPC: Turbulent Storm +-- Mission NPC +----------------------------------- + +package.loaded["scripts/zones/The_Eldieme_Necropolis_[S]/TextIDs"] = nil; +require("scripts/zones/The_Eldieme_Necropolis_[S]/TextIDs"); +require("scripts/globals/missions"); +require("scripts/globals/keyitems"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + blueRecommendationLetter = player:hasKeyItem(BLUE_RECOMMENDATION_LETTER); + currentMission = player:getCurrentMission(WOTG); + + if (currentMission == BACK_TO_THE_BEGINNING and blueRecommendationLetter == false) then + player:startEvent(0x0007); + elseif(currentMission == BACK_TO_THE_BEGINNING and blueRecommendationLetter == true) then + player:startEvent(0x0008); + elseif(currentMission > BACK_TO_THE_BEGINNING) then + player:startEvent(0x0009); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0007 and option == 0) then + player:addKeyItem(BLUE_RECOMMENDATION_LETTER); + player:messageSpecial(KEYITEM_OBTAINED,BLUE_RECOMMENDATION_LETTER) + end +end; \ No newline at end of file Index: scripts/zones/The_Last_Stand/Zone.lua =================================================================== --- scripts/zones/The_Last_Stand/Zone.lua (revision 2121) +++ scripts/zones/The_Last_Stand/Zone.lua (working copy) @@ -20,9 +20,11 @@ ----------------------------------- function onZoneIn(player,prevZone) -cs = -1; - -return cs; + cs = -1; + if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + player:setPos(139,60,130,195); + end + return cs; end; ----------------------------------- Index: scripts/zones/The_Sanctuary_of_ZiTah/npcs/qm2.lua =================================================================== --- scripts/zones/The_Sanctuary_of_ZiTah/npcs/qm2.lua (revision 2121) +++ scripts/zones/The_Sanctuary_of_ZiTah/npcs/qm2.lua (working copy) @@ -10,6 +10,7 @@ require("scripts/globals/settings"); require("scripts/globals/quests"); +require("scripts/globals/teleports"); require("scripts/zones/The_Sanctuary_of_ZiTah/TextIDs"); ----------------------------------- @@ -41,7 +42,11 @@ ----------------------------------- function onTrigger(player,npc) - player:messageSpecial(STURDY_BRANCH,1021); + if (player:hasItem(1153)) then + debugTeleport(player, 17809424); -- Jaucribaix + else + player:messageSpecial(STURDY_BRANCH,1021); + end end; ----------------------------------- Index: scripts/zones/The_Shrouded_Maw/Zone.lua =================================================================== --- scripts/zones/The_Shrouded_Maw/Zone.lua (revision 2121) +++ scripts/zones/The_Shrouded_Maw/Zone.lua (working copy) @@ -3,7 +3,7 @@ -- Zone: The_Shrouded_Maw (10) -- ----------------------------------- - +-- player:setPos(216,31,-340,254); -- BC for Diablos package.loaded["scripts/zones/The_Shrouded_Maw/TextIDs"] = nil; require("scripts/globals/settings"); require("scripts/zones/The_Shrouded_Maw/TextIDs"); Index: scripts/zones/Toraimarai_Canal/mobs/Magic_Sludge.lua =================================================================== --- scripts/zones/Toraimarai_Canal/mobs/Magic_Sludge.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/mobs/Magic_Sludge.lua (working copy) @@ -0,0 +1,21 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: Magic Sludge +----------------------------------- + +----------------------------------- +-- onMobSpawn Action +----------------------------------- + +function OnMobSpawn(mob) +end; + +----------------------------------- +-- onMobDeath +----------------------------------- + +function onMobDeath(mob, killer) + if(killer:getVar("windurstTheRootOfTheProblem") == 5) then + killer:setVar("windurstTheRootOfTheProblem",7); + end +end; \ No newline at end of file Index: scripts/zones/Toraimarai_Canal/npcs/qm10.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm10.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm10.lua (working copy) @@ -0,0 +1,63 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? (BLM AF6 Second ???) +-- @zone 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 4) then + if(player:hasStatusEffect(EFFECT_MANAFONT)) then + player:startEvent(0x002f); + else + player:startEvent(0x002e); + end + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 5) then + player:messageSpecial(33); + player:messageSpecial(34); + else + player:messageSpecial(NOTHING_HERE); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID2: %u",csid); +--printf("RESULT2: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x002f) then + player:setVar("windurstTheRootOfTheProblem",5); + end +end; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/qm11.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm11.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm11.lua (working copy) @@ -0,0 +1,61 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? (BLM AF6 Final ???) +-- @zone 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 5) then + player:startEvent(0x0030); + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 7) then + player:startEvent(0x0037); + else + player:messageSpecial(11); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID2: %u",csid); +--printf("RESULT2: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0030) then + if(option == 1) then + SpawnMob(17469516,8832); + player:setVar("windurstTheRootOfTheProblem",6) + end + end +end; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/qm4.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm4.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm4.lua (working copy) @@ -0,0 +1,61 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? (BLM AF6 Final ???) +-- @zone 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 5) then + player:startEvent(0x0030); + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 7) then + player:startEvent(0x0037); + else + player:messageSpecial(11); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID2: %u",csid); +--printf("RESULT2: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0030) then + if(option == 1) then + SpawnMob(17469516,8832); + player:setVar("windurstTheRootOfTheProblem",6) + end + end +end; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/qm9.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm9.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm9.lua (working copy) @@ -0,0 +1,60 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? (BLM AF6 First ???) +-- @zone 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 3) then + player:startEvent(0x002d); + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 4) then + player:messageSpecial(NOTHING_HERE); + else + player:messageSpecial(NOTHING_HERE); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID2: %u",csid); +--printf("RESULT2: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x002d) then + if(option == 1) then + player:setVar("windurstTheRootOfTheProblem",4); + end + end +end; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/Toraimarai_Canal/npcs/Treasure_Coffer.lua (working copy) @@ -10,7 +10,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Toraimarai_Canal/TextIDs"); @@ -83,8 +83,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Toraimarai_Canal/TextIDs.lua =================================================================== --- scripts/zones/Toraimarai_Canal/TextIDs.lua (revision 2121) +++ scripts/zones/Toraimarai_Canal/TextIDs.lua (working copy) @@ -5,16 +5,17 @@ ITEM_OBTAINED = 6424; -- Obtained: GIL_OBTAINED = 6425; -- Obtained gil KEYITEM_OBTAINED = 6427; -- Obtained key item: + NOTHING_HERE = 10; -- There is nothing out of the orginary here. -- Treasure Coffer/Chest Dialog -CHEST_UNLOCKED = 7298; -- You unlock the chest! - CHEST_FAIL = 7299; -- Fails to open the chest. - CHEST_TRAP = 7300; -- The chest was trapped! - CHEST_WEAK = 7301; -- You cannot open the chest when you are in a weakened state. - CHEST_MIMIC = 7302; -- The chest was a mimic! - CHEST_MOOGLE = 7303; -- You cannot open the chest while participating in the moogle event. -CHEST_ILLUSION = 7304; -- The chest was but an illusion... - CHEST_LOCKED = 7305; -- The chest appears to be locked. + CHEST_UNLOCKED = 7298; -- You unlock the chest ! + CHEST_FAIL = 7299; -- Fails to open the chest. + CHEST_TRAP = 7300; -- The chest was trapped! + CHEST_WEAK = 7301; -- You cannot open the chest when you are in a weakened state. + CHEST_MIMIC = 7302; -- The chest was a mimic! + CHEST_MOOGLE = 7303; -- You cannot open the chest while participating in the moogle event. + CHEST_ILLUSION = 7304; -- The chest was but an illusion... + CHEST_LOCKED = 7305; -- The chest appears to be locked. -- Quest dialog -CHEST_IS_LOCKED = 7291; -- This chest is locked. It can be opened with + CHEST_IS_LOCKED = 7291; -- This chest is locked. It can be opened with \ No newline at end of file Index: scripts/zones/Toraimarai_Canal/Zone.lua =================================================================== --- scripts/zones/Toraimarai_Canal/Zone.lua (revision 2121) +++ scripts/zones/Toraimarai_Canal/Zone.lua (working copy) @@ -3,6 +3,7 @@ -- Zone: Toraimarai_Canal (169) -- ----------------------------------- +-- Event 0x0030, 0x0031 and 0x0032 will warp players to BLM AF6 ???'s package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; require("scripts/globals/settings"); Index: scripts/zones/Uleguerand_Range/npcs/Eternal_Ice.lua =================================================================== --- scripts/zones/Uleguerand_Range/npcs/Eternal_Ice.lua (revision 0) +++ scripts/zones/Uleguerand_Range/npcs/Eternal_Ice.lua (working copy) @@ -0,0 +1,49 @@ +----------------------------------- +-- Area: Uleguerand Range +-- NPC: Eternal Ice +-- Type: +-- @zone: 5 +-- @pos: +----------------------------------- +package.loaded["scripts/zones/Uleguerand_Range/TextIDs"] = nil; +require("scripts/globals/keyitems"); +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if(player:hasKeyItem(MYSTIC_ICE)) then + player:messageSpecial(MYSTIC_ICE_OFFSET); + else + player:addKeyItem(MYSTIC_ICE); + player:messageSpecial(KEYITEM_OBTAINED,MYSTIC_ICE); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + Index: scripts/zones/Uleguerand_Range/npcs/Fissure.lua =================================================================== --- scripts/zones/Uleguerand_Range/npcs/Fissure.lua (revision 0) +++ scripts/zones/Uleguerand_Range/npcs/Fissure.lua (working copy) @@ -0,0 +1,55 @@ +----------------------------------- +-- Area: Uleguerand Range +-- NPC: Fissure +-- Type: +-- @zone: 5 +-- @pos: +----------------------------------- +package.loaded["scripts/zones/Uleguerand_Range/TextIDs"] = nil; +require("scripts/globals/keyitems"); +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if (npc:getID() == 16798102 and player:hasKeyItem(MYSTIC_ICE)) then + player:startEvent(0x0002,MYSTIC_ICE); + elseif (npc:getID() == 16798103 and player:hasKeyItem(MYSTIC_ICE)) then + player:startEvent(0x0003,MYSTIC_ICE); + elseif (npc:getID() == 16798104 and player:hasKeyItem(MYSTIC_ICE)) then + player:startEvent(0x0004,MYSTIC_ICE); + else + player:messageSpecial(NOTHING_HERE); + end +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) + -- printf("CSID: %u",csid); + -- printf("RESULT: %u",option); + if (option == 1) then + player:delKeyItem(MYSTIC_ICE); + end +end; + Index: scripts/zones/Uleguerand_Range/TextIDs.lua =================================================================== --- scripts/zones/Uleguerand_Range/TextIDs.lua (revision 2121) +++ scripts/zones/Uleguerand_Range/TextIDs.lua (working copy) @@ -5,3 +5,5 @@ ITEM_OBTAINED = 6378; -- Obtained: GIL_OBTAINED = 6379; -- Obtained gil KEYITEM_OBTAINED = 6381; -- Obtained key item: + NOTHING_HERE = 7154; -- There is nothing out of the ordinary here. + MYSTIC_ICE_OFFSET = 7165; -- You see something glittering beneath the surface of the ice. Index: scripts/zones/Uleguerand_Range/Zone.lua =================================================================== --- scripts/zones/Uleguerand_Range/Zone.lua (revision 2121) +++ scripts/zones/Uleguerand_Range/Zone.lua (working copy) @@ -20,10 +20,12 @@ ----------------------------------- function onZoneIn(player,prevZone) - cs = -1; - if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then + cs = -1; + + if (player:getXPos() == 0 and player:getYPos() == 0 and player:getZPos() == 0) then player:setPos(363.025,16,-60,12); - end + end + return cs; end; Index: scripts/zones/Upper_Delkfutts_Tower/npcs/Treasure_Chest.lua =================================================================== --- scripts/zones/Upper_Delkfutts_Tower/npcs/Treasure_Chest.lua (revision 2121) +++ scripts/zones/Upper_Delkfutts_Tower/npcs/Treasure_Chest.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/Upper_Delkfutts_Tower/TextIDs"); @@ -66,8 +66,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Upper_Jeuno/npcs/_6s2.lua =================================================================== --- scripts/zones/Upper_Jeuno/npcs/_6s2.lua (revision 2121) +++ scripts/zones/Upper_Jeuno/npcs/_6s2.lua (working copy) @@ -77,8 +77,8 @@ else player:addTitle(PROFESSIONAL_LOAFER); player:delKeyItem(CLOCK_TOWER_OIL); - player:addGil(1200); - player:messageSpecial(GIL_OBTAINED,1200); + player:addGil(1200*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,1200*GIL_RATE); player:addItem(12727); player:messageSpecial(ITEM_OBTAINED,12727); player:addFame(JEUNO,30); @@ -91,8 +91,8 @@ else player:addQuest(JEUNO,THE_CLOCKMASTER); player:addTitle(TIMEKEEPER); - player:addGil(1200); - player:messageSpecial(GIL_OBTAINED,1200); + player:addGil(1200*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,1200*GIL_RATE); player:addItem(17083); player:messageSpecial(ITEM_OBTAINED,17083); player:addFame(JEUNO,30); Index: scripts/zones/Upper_Jeuno/npcs/Brutus.lua =================================================================== --- scripts/zones/Upper_Jeuno/npcs/Brutus.lua (revision 2121) +++ scripts/zones/Upper_Jeuno/npcs/Brutus.lua (working copy) @@ -26,16 +26,16 @@ function onTrigger(player,npc) - ChocobosWounds = player:getQuestStatus(JEUNO,CHOCOBO_S_WOUNDS); - saveMySon = player:getQuestStatus(JEUNO,SAVE_MY_SON); - wingsOfGold = player:getQuestStatus(JEUNO,WINGS_OF_GOLD); - scatIntoShadow = player:getQuestStatus(JEUNO,SCATTERED_INTO_SHADOW); + local ChocobosWounds = player:getQuestStatus(JEUNO,CHOCOBO_S_WOUNDS); + local SaveMySon = player:getQuestStatus(JEUNO,SAVE_MY_SON); + local wingsOfGold = player:getQuestStatus(JEUNO,WINGS_OF_GOLD); + local scatIntoShadow = player:getQuestStatus(JEUNO,SCATTERED_INTO_SHADOW); - mLvl = player:getMainLvl(); - mJob = player:getMainJob(); + local mLvl = player:getMainLvl(); + local mJob = player:getMainJob(); - if(player:getMainLvl() >= 20 and ChocobosWounds ~= QUEST_COMPLETED) then - chocoFeed = player:getVar("ChocobosWounds_Event"); + if((mLvl >= 20 or mLvl >= ADVANCED_JOB_LEVEL) and ChocobosWounds ~= QUEST_COMPLETED) then + local chocoFeed = player:getVar("ChocobosWounds_Event"); if(ChocobosWounds == QUEST_AVAILABLE) then player:startEvent(0x0047); @@ -46,9 +46,9 @@ else player:startEvent(0x0066); end - elseif(ChocobosWounds == QUEST_COMPLETED and saveMySon == QUEST_AVAILABLE) then + elseif(ChocobosWounds == QUEST_COMPLETED and SaveMySon == QUEST_AVAILABLE) then player:startEvent(0x0016); - elseif(saveMySon == QUEST_COMPLETED and player:getQuestStatus(JEUNO,PATH_OF_THE_BEASTMASTER) == QUEST_AVAILABLE) then + elseif(SaveMySon == QUEST_COMPLETED and player:getQuestStatus(JEUNO,PATH_OF_THE_BEASTMASTER) == QUEST_AVAILABLE) then player:startEvent(0x0046); elseif(mLvl >= AF1_QUEST_LEVEL and mJob == 9 and wingsOfGold == QUEST_AVAILABLE) then if(player:getVar("wingsOfGold_shortCS") == 1) then @@ -73,7 +73,7 @@ player:startEvent(0x008d); end elseif(scatIntoShadow == QUEST_ACCEPTED) then - scatIntoShadowCS = player:getVar("scatIntoShadowCS"); + local scatIntoShadowCS = player:getVar("scatIntoShadowCS"); if(player:hasKeyItem(AQUAFLORA1) or player:hasKeyItem(AQUAFLORA2) or player:hasKeyItem(AQUAFLORA3)) then player:startEvent(0x008e); elseif(scatIntoShadowCS == 0) then Index: scripts/zones/Upper_Jeuno/npcs/Chocobo.lua =================================================================== --- scripts/zones/Upper_Jeuno/npcs/Chocobo.lua (revision 2121) +++ scripts/zones/Upper_Jeuno/npcs/Chocobo.lua (working copy) @@ -26,9 +26,9 @@ count = trade:getItemCount(); gil = trade:getGil(); - if (trade:hasItemQty(4545,1)) then + if (trade:hasItemQty(GYSAHL_GREENS,1)) then player:startEvent(0x004c); - elseif (trade:hasItemQty(534,1) and gil == 0 and count == 1) then + elseif (trade:hasItemQty(GAUSEBIT_GRASS,1) and gil == 0 and count == 1) then --Check feeding status. feed = player:getVar("ChocobosWounds_Event"); feedDay = player:getVar("ChocobosWounds_Day"); @@ -57,7 +57,7 @@ end end else - if (trade:hasItemQty(4545,1)) then + if (trade:hasItemQty(GYSAHL_GREENS,1)) then player:startEvent(0x0026); end end Index: scripts/zones/Upper_Jeuno/npcs/Emitt.lua =================================================================== --- scripts/zones/Upper_Jeuno/npcs/Emitt.lua (revision 2121) +++ scripts/zones/Upper_Jeuno/npcs/Emitt.lua (working copy) @@ -93,7 +93,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then itemCP = inventory[Item + 1]; player:delCP(itemCP); player:addItem(inventory[Item + 2],1); Index: scripts/zones/Upper_Jeuno/npcs/Monberaux.lua =================================================================== --- scripts/zones/Upper_Jeuno/npcs/Monberaux.lua (revision 2121) +++ scripts/zones/Upper_Jeuno/npcs/Monberaux.lua (working copy) @@ -14,6 +14,7 @@ require("scripts/globals/keyitems"); require("scripts/globals/shop"); require("scripts/globals/quests"); +require("scripts/globals/missions"); require("scripts/zones/Upper_Jeuno/TextIDs"); ----------------------------------- @@ -44,8 +45,12 @@ player:startEvent(0x0022); -- Shot CS & Finish Quest "The Lost Cardian" elseif(TheLostCardien == QUEST_COMPLETED and player:getQuestStatus(JEUNO,THE_KIND_CARDIAN) == QUEST_ACCEPTED) then player:startEvent(0x0020); + elseif (player:getCurrentMission(COP) == THE_RITES_OF_LIFE and player:getVar("CopStatus") == 2) then + player:startEvent(0x000A); + elseif (player:getCurrentMission(COP) == BELOW_THE_ARKS) then + player:startEvent(0x0009); else - player:startEvent(0x001c); -- Standard dialog + player:startEvent(0x001c); -- Standard dialog 0x006D? end end; @@ -80,6 +85,14 @@ player:addQuest(JEUNO,THE_KIND_CARDIAN); -- Start next quest "THE_KING_CARDIAN" elseif(csid == 0x0021 and option == 1) then player:setVar("theLostCardianVar",3); + elseif (csid == 0x000A) then + player:startEvent(0x00CF); + elseif (csid == 0x00CF) then + player:addKeyItem(0x0243); + player:messageSpecial(KEYITEM_OBTAINED,0x243); + player:completeMission(COP,THE_RITES_OF_LIFE); + player:addMission(COP,BELOW_THE_ARKS); + player:setVar("CopStatus",0); end end; Index: scripts/zones/Upper_Jeuno/Zone.lua =================================================================== --- scripts/zones/Upper_Jeuno/Zone.lua (revision 2121) +++ scripts/zones/Upper_Jeuno/Zone.lua (working copy) @@ -6,6 +6,8 @@ package.loaded["scripts/zones/Upper_Jeuno/TextIDs"] = nil; require("scripts/zones/Upper_Jeuno/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/missions"); ----------------------------------- -- onInitialize @@ -28,6 +30,9 @@ end player:setVar("PlayerMainJob",0); end + if (player:getCurrentMission(COP) == THE_RITES_OF_LIFE and player:getVar("CopStatus") == 1) then + cs = 0x0002; + end return cs; end; @@ -57,5 +62,13 @@ if (csid == 0x7534 and option == 0) then player:setHomePoint(); player:messageSpecial(HOMEPOINT_SET); - end + elseif(csid == 0x0002) then + player:setVar("CopStatus",2); + elseif (csid == 0x00CF) then -- This is collected from Monberaux after the CS exchange. + player:addKeyItem(0x0243); + player:messageSpecial(KEYITEM_OBTAINED,0x243); + player:completeMission(COP,THE_RITES_OF_LIFE); + player:addMission(COP,BELOW_THE_ARKS); + player:setVar("CopStatus",0); + end end; Index: scripts/zones/Valkurm_Dunes/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/Valkurm_Dunes/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/Valkurm_Dunes/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00008); end end; Index: scripts/zones/Valkurm_Dunes/Zone.lua =================================================================== --- scripts/zones/Valkurm_Dunes/Zone.lua (revision 2121) +++ scripts/zones/Valkurm_Dunes/Zone.lua (working copy) @@ -22,7 +22,7 @@ function onZoneIn(player,prevZone) cs = -1; - wc = player:getWeather(); + wc = player:getWeather(); if ((player:getXPos() == 0) and (player:getYPos() == 0) and (player:getZPos() == 0)) then player:setPos(60.989,-4.898,-151.001,198); end Index: scripts/zones/Valley_of_Sorrows/npcs/Field_Manual.lua =================================================================== --- scripts/zones/Valley_of_Sorrows/npcs/Field_Manual.lua (revision 0) +++ scripts/zones/Valley_of_Sorrows/npcs/Field_Manual.lua (working copy) @@ -0,0 +1,38 @@ +----------------------------------- +-- Field Manual +-- Area: Valley of Sorrows +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/fieldsofvalor"); + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + startFov(FOV_EVENT_SORROWS,player); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventSelection +----------------------------------- + +function onEventUpdate(player,csid,menuchoice) + updateFov(player,csid,menuchoice,139,140,141,0,0); +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- + +function onEventFinish(player,csid,option) + finishFov(player,csid,option,139,140,141,0,0,FOV_MSG_SORROWS); +end; Index: scripts/zones/VeLugannon_Palace/npcs/Treasure_Coffer.lua =================================================================== --- scripts/zones/VeLugannon_Palace/npcs/Treasure_Coffer.lua (revision 2121) +++ scripts/zones/VeLugannon_Palace/npcs/Treasure_Coffer.lua (working copy) @@ -9,7 +9,7 @@ require("scripts/globals/settings"); require("scripts/globals/keyitems"); -require("scripts/globals/Treasure"); +require("scripts/globals/treasure"); require("scripts/globals/quests"); require("scripts/zones/VeLugannon_Palace/TextIDs"); @@ -83,8 +83,8 @@ -- print("[2]", loot[2]); -- debug if(loot[1]=="gil") then - player:addGil(loot[2]); - player:messageSpecial(GIL_OBTAINED,loot[2]); + player:addGil(loot[2]*GIL_RATE); + player:messageSpecial(GIL_OBTAINED,loot[2]*GIL_RATE); else -- Item player:addItem(loot[2]); Index: scripts/zones/Wajaom_Woodlands/npcs/Leypoint.lua =================================================================== --- scripts/zones/Wajaom_Woodlands/npcs/Leypoint.lua (revision 0) +++ scripts/zones/Wajaom_Woodlands/npcs/Leypoint.lua (working copy) @@ -0,0 +1,61 @@ +----------------------------------- +-- Leypoint +-- Trade Lightning Band to get Olduum Ring. +-- COR AF quest CS works but quest variables need to be created and updated. +----------------------------------- + +----------------------------------- +-- onTrigger Action +----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + player:messageSpecial(LEYPOINT); +end; + + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) + +-- event 0x0002 is for the initial completion of the quest - player gets zapped by lightning and "dies" in CS +-- event 0x0003 is for repeat completition - player hides at a safe distance. +-- event 0x01FC is for the COR AF quest "Navigating the Unfriendly Seas" (reward: Corsair's Culottes) + +------ Olduum ring quest ----------------------- + tradeChkG = trade:getGil(); + count = trade:getItemCount(); + + if (tradeChkG == 0 and count = 1 and trade:hasItemQty(2217,1)) then -- player traded Lightning Band + quest_status = player:getVar("OLDUUM_QUEST_STATUS"); + if (quest_status == 2) then + player:startEvent(0x0002); + elseif (quest_status ==4) then + player:startEvent(0x0003); + end + player:tradeComplete(); + end; +------ end of Olduum ring quest ------------------ + +------ COR AF quest ----------------------- + if (tradeChkG == 0 and count = 1 and trade:hasItemQty(2341,1)) then -- player traded Hydrogauge + -- TODO: update quest status + player:startEvent(0x01FC); + player:tradeComplete(); + end +------ end of COR AF quest -------------------- + +end; + + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x0002) or (csid == 0x0003) then + player:addItem(15769) -- player receives olduum ring + player:messageSpecial(ITEM_OBTAINED,15769); + end; +end; Index: scripts/zones/Wajaom_Woodlands/npcs/Watisa.lua =================================================================== --- scripts/zones/Wajaom_Woodlands/npcs/Watisa.lua (revision 2121) +++ scripts/zones/Wajaom_Woodlands/npcs/Watisa.lua (working copy) @@ -25,9 +25,9 @@ gil = player:getGil(); if(player:hasKeyItem(CHOCOBO_LICENSE) and player:getMainLvl() >= 20) then + player:startEvent(0x0009,price,gil); + else player:startEvent(0x000a,price,gil); - else - player:startEvent(0x0009,price,gil); end end; @@ -48,17 +48,17 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + +price = 100; +level = player:getMainLvl(); - local price = 100; - - if(csid == 0x0009 and option == 0) then + if (csid == 0x0009 and option == 0) then if (player:delGil(price)) then - if (player:getMainLvl() >= 20) then + if (level >= 20) then player:addStatusEffect(EFFECT_CHOCOBO,1,0,1800); else player:addStatusEffect(EFFECT_CHOCOBO,1,0,900); end end - end - + end end; Index: scripts/zones/Wajaom_Woodlands/TextIDs.lua =================================================================== --- scripts/zones/Wajaom_Woodlands/TextIDs.lua (revision 2121) +++ scripts/zones/Wajaom_Woodlands/TextIDs.lua (working copy) @@ -10,4 +10,5 @@ HARVESTING_IS_POSSIBLE_HERE = 7343; -- Harvesting is possible here if you have -- Other Texts -NOTHING_HAPPENS = 7333; -- Nothing happens... \ No newline at end of file +NOTHING_HAPPENS = 7333; -- Nothing happens... +LEYPOINT = 7335; -- An eerie red glow emanates from this stone platform., The surrounding air feels alive with energy... \ No newline at end of file Index: scripts/zones/West_Ronfaure/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/West_Ronfaure/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/West_Ronfaure/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00001); end end; Index: scripts/zones/West_Ronfaure/npcs/Vilatroire.lua =================================================================== --- scripts/zones/West_Ronfaure/npcs/Vilatroire.lua (revision 0) +++ scripts/zones/West_Ronfaure/npcs/Vilatroire.lua (working copy) @@ -0,0 +1,67 @@ +----------------------------------- +-- Area: West Ronfaure +-- NPC: Vilatroire +-- Involved in Quest: Introduction to Teamwork +-- @zone 100 +-- @pos +----------------------------------- +package.loaded["scripts/zones/West_Ronfaure/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/quests"); +require("scripts/zones/West_Ronfaure/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + introductionToTreamwork = player:getQuestStatus(SANDORIA,INTRODUCTION_TO_TEAMWORK); + + if(introductionToTreamwork == QUEST_AVALIABLE) then + player:startEvent(0x0087); + elseif(introductionToTreamwork == QUEST_ACCEPTED) then + if(player:getPartySize() == 6) then + player:startEvent(0x0088); + else + player:startEvent(0x0088); + end + else + player:startEvent(0x0088); + end + +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + if(csid == 0x0087) then + player:addQuest(SANDORIA,INTRODUCTION_TO_TEAMWORK); + end +end; + + + + Index: scripts/zones/West_Sarutabaruta/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/West_Sarutabaruta/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/West_Sarutabaruta/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,40 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to West Sarutabaruta [S] +----------------------------------- +package.loaded["scripts/zones/West_Sarutabaruta/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/West_Sarutabaruta/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_SARUTABARUTA") == 1 and player:hasKeyItem(PURE_WHITE_FEATHER) == true) then + player:startEvent(0x0388); + else + player:messageSpecial(NOTHING_HAPPENS); + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if (csid == 0x0388 and option == 1) then + toMaw(player,7); + end +end; \ No newline at end of file Index: scripts/zones/West_Sarutabaruta/npcs/Stone_Monument.lua =================================================================== --- scripts/zones/West_Sarutabaruta/npcs/Stone_Monument.lua (revision 2121) +++ scripts/zones/West_Sarutabaruta/npcs/Stone_Monument.lua (working copy) @@ -21,10 +21,10 @@ ----------------------------------- function onTrade(player,npc,trade) - if (trade:getItemCount() == 1 and trade:hasItemQty(570,1)) then + if (trade:getItemCount() == 1 and trade:hasItemQty(571,1)) then player:tradeComplete(); player:addItem(570); - player:specialMessage(ITEM_OBTAINED,570); + player:messageSpecial(ITEM_OBTAINED,570); player:setVar("anExplorer-CurrentTablet",0x00400); end end; Index: scripts/zones/West_Sarutabaruta_[S]/npcs/Cavernous_Maw.lua =================================================================== --- scripts/zones/West_Sarutabaruta_[S]/npcs/Cavernous_Maw.lua (revision 0) +++ scripts/zones/West_Sarutabaruta_[S]/npcs/Cavernous_Maw.lua (working copy) @@ -0,0 +1,41 @@ +----------------------------------- +-- Cavernous Maw +-- Teleports Players to West Sarutabaruta +----------------------------------- +package.loaded["scripts/zones/West_Sarutabaruta_[S]/TextIDs"] = nil; +----------------------------------- +require("scripts/zones/West_Sarutabaruta_[S]/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/teleports"); + +function onTrigger(player,npc) + if (player:getVar("MAWS_SARUTABARUTA") == 1) then + player:startEvent(0x0065); + else + player:startEvent(0x0064); + player:setVar("MAWS_SARUTABARUTA",1) + end +end; + +function onEventUpdate(player,csid,menuchoice) +--print("CSID:",csid); +--print("RESULT:",option); +end; + +----------------------------------- +-- onTrade Action +----------------------------------- +function onTrade(player,npc,trade) +end; + +----------------------------------- +-- onEventFinish Action +----------------------------------- +function onEventFinish(player,csid,option) +--print("CSID:",csid); +--print("RESULT:",option); + if ((csid == 0x0065 or csid = 0x0064) and option == 1)) then + toMaw(player,8); + end +end; \ No newline at end of file Index: scripts/zones/Windurst_Walls/npcs/_6n2.lua =================================================================== --- scripts/zones/Windurst_Walls/npcs/_6n2.lua (revision 2121) +++ scripts/zones/Windurst_Walls/npcs/_6n2.lua (working copy) @@ -40,7 +40,7 @@ elseif(player:getVar("KnowOnesOnions") == 1) then player:startEvent(0x0120,0,4387); elseif(player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == 0) then - if(player:getMainLvl() >= 30 and player:hasItem(1125)) then + if(player:getMainLvl() >= ADVANCED_JOB_LEVEL and player:hasItem(1125)) then player:startEvent(0x0180,1125,1125,1125,1125,1125,1125,1125,1125); end elseif(player:getQuestStatus(WINDURST, I_CAN_HEAR_A_RAINBOW) == 1) then @@ -80,7 +80,7 @@ player:setVar("OnionRingsTime",0); player:setVar("OnionRings",2); elseif(csid == 0x0180) then - player:addQuest(WINDURST, I_CAN_HEAR_A_RAINBOW); + player:addQuest(WINDURST,I_CAN_HEAR_A_RAINBOW); elseif(csid == 0x0182) then player:setVar("WildCard",2); elseif(csid == 0x0183) then Index: scripts/zones/Windurst_Walls/npcs/Koru-Moru.lua =================================================================== --- scripts/zones/Windurst_Walls/npcs/Koru-Moru.lua (revision 2121) +++ scripts/zones/Windurst_Walls/npcs/Koru-Moru.lua (working copy) @@ -43,22 +43,23 @@ player:startEvent(0x00d3); end end - elseif(player:getQuestStatus(JEUNO,RIDING_ON_THE_CLOUDS) == QUEST_ACCEPTED and player:getVar("ridingOnTheClouds_4") == 4) then - if(trade:hasItemQty(1127,1) and trade:getItemCount() == 1) then -- Trade Kindred seal + if(trade:hasItemQty(1127,1) and count == 1) then -- Trade Kindred seal player:setVar("ridingOnTheClouds_4",0); player:tradeComplete(); player:addKeyItem(SPIRITED_STONE); player:messageSpecial(KEYITEM_OBTAINED,SPIRITED_STONE); end - + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("windurstTheRootOfTheProblem") == 1) then + if (trade:hasItemQty(829,1) and count == 1) then + player:startEvent(0x015d); + end elseif(player:getQuestStatus(WINDURST,BLAST_FROM_THE_PAST) == QUEST_ACCEPTED) then if(count == 1 and trade:hasItemQty(16511,1)) then player:startEvent(0x00e0); -- Complete quest! else player:startEvent(0x00e1); -- not the shell end - end end; @@ -72,17 +73,19 @@ local qStarStruck = player:getQuestStatus(WINDURST,STAR_STRUCK); local blastFromPast = player:getQuestStatus(WINDURST,BLAST_FROM_THE_PAST); local blastProg = player:getVar("BlastFromThePast_Prog"); - - if(blastFromPast == QUEST_AVAILABLE and qStarStruck == QUEST_COMPLETED and player:getQuestStatus(WINDURST,CLASS_REUNION) ~= QUEST_ACCEPTED and player:getFameLevel(WINDURST) >= 3 and player:needToZone() == false) then + + if(blastFromPast == QUEST_AVAILABLE and qStarStruck == QUEST_COMPLETED and + player:getQuestStatus(WINDURST,CLASS_REUNION) ~= QUEST_ACCEPTED + and player:getFameLevel(WINDURST) >= 3 + and player:needToZone() == false) then player:startEvent(0x00d6); elseif(blastFromPast == QUEST_ACCEPTED and blastProg >= 2) then player:startEvent(0x00d7); elseif(blastFromPast == QUEST_ACCEPTED) then player:startEvent(0x00d8); - elseif(player:getQuestStatus(WINDURST,MAKING_THE_GRADE) == QUEST_ACCEPTED) then local makingGradeProg = player:getVar("QuestMakingTheGrade_prog"); - if(makingGradeProg == 0 and player:hasItem(544)) then + if(prog == 0 and player:hasItem(544)) then player:startEvent(0x011f); -- MAKING THE GRADE: Have test answers but not talked/given to Fuepepe elseif(makingGradeProg == 1) then player:startEvent(0x011d); -- MAKING THE GRADE: Turn in Test Answer & Told to go back to Fuepepe & Chomoro @@ -134,10 +137,13 @@ player:addFame(WINDURST,WIN_FAME*20); elseif(csid == 0x00c7) then player:tradeComplete(); - player:messageSpecial(GIL_OBTAINED,50); - player:addGil(50); + player:messageSpecial(GIL_OBTAINED,50*GIL_RATE); + player:addGil(50*GIL_RATE); elseif(csid == 0x00c5 and option == 0) then player:addQuest(WINDURST,STAR_STRUCK); + elseif(csid == 0x015d) then + player:setVar("windurstTheRootOfTheProblem",2); + player:tradeComplete(); elseif(csid == 0x00d6 and option == 0) then player:addQuest(WINDURST,BLAST_FROM_THE_PAST); elseif(csid == 0x00e0) then @@ -151,4 +157,4 @@ player:needToZone(true); end -end; \ No newline at end of file +end; Index: scripts/zones/Windurst_Walls/npcs/Trail_Markings.lua =================================================================== --- scripts/zones/Windurst_Walls/npcs/Trail_Markings.lua (revision 2121) +++ scripts/zones/Windurst_Walls/npcs/Trail_Markings.lua (working copy) @@ -29,7 +29,7 @@ player:startEvent(0x01c7); -- cs with Cornelia elseif(player:getVar("DynaWindurst_Win") == 1) then player:startEvent(0x01d1,HYDRA_CORPS_LANTERN); -- Win CS - elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then + elseif(player:hasKeyItem(VIAL_OF_SHROUDED_SAND)) then -- and player:hasKeyItem(PRISMATIC_HOURGLASS)) then local firstDyna = 0; local realDay = tonumber(os.date("%j")) local dynaWaitxDay = player:getVar("dynaWaitxDay"); Index: scripts/zones/Windurst_Walls/npcs/Yoran-Oran.lua =================================================================== --- scripts/zones/Windurst_Walls/npcs/Yoran-Oran.lua (revision 2121) +++ scripts/zones/Windurst_Walls/npcs/Yoran-Oran.lua (working copy) @@ -8,11 +8,10 @@ -- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Walls/TextIDs"] = nil; ------------------------------------ - +require("scripts/globals/settings"); require("scripts/globals/quests"); -require("scripts/globals/settings"); require("scripts/zones/Windurst_Walls/TextIDs"); +----------------------------------- ----------------------------------- -- onTrade Action @@ -114,4 +113,4 @@ if(csid == 0x00f9) then player:addQuest(WINDURST,MANDRAGORA_MAD); end -end; \ No newline at end of file +end; Index: scripts/zones/Windurst_Waters/npcs/Hakeem.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Hakeem.lua (revision 2121) +++ scripts/zones/Windurst_Waters/npcs/Hakeem.lua (working copy) @@ -4,11 +4,11 @@ -- Type: Craftsman -- @zone: 238 -- @pos: -123.120 -2.999 65.472 --- --- Auto-Script: Requires Verification (Verfied By Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil; ----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); ----------------------------------- -- onTrade Action @@ -22,7 +22,22 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x2721); + + --ARGUMENT 1: Charge for advanced support. + --ARGUMENT 3: Set to 1 for him to offer regular support, or 0 for advanced support. + --ARGUMENT 4: Set to 256 for him to offer any service at all. + --ARGUMENT 6: Set to 1 if the player already recieved synth support. + + member = player:getVar("GuildMember-Cooking"); + support = 0; + advanced = 1; + + if(player:hasStatusEffect(EFFECT_COOKING_IMAGERY) == true) then + support = 1; + end + + player:startEvent(0x2721,price,0,advanced,member*256,0,support,0,0); + end; ----------------------------------- @@ -41,5 +56,8 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + + if(csid == 0x2721 and option == 1) then + player:addStatusEffect(EFFECT_COOKING_IMAGERY,1,0,120); + end end; - Index: scripts/zones/Windurst_Waters/npcs/Jacodaut.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Jacodaut.lua (revision 2121) +++ scripts/zones/Windurst_Waters/npcs/Jacodaut.lua (working copy) @@ -4,11 +4,11 @@ -- Type: Craftsman -- @zone: 238 -- @pos: -125.890 -2.999 62.499 --- --- Auto-Script: Requires Verification (Verfied By Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil; ----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); ----------------------------------- -- onTrade Action @@ -22,7 +22,22 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x2720); + + --ARGUMENT 1: Charge for advanced support. + --ARGUMENT 3: Set to 1 for him to offer regular support, or 0 for advanced support. + --ARGUMENT 4: Set to 256 for him to offer any service at all. + --ARGUMENT 6: Set to 1 if the player already recieved synth support. + + member = player:getVar("GuildMember-Cooking"); + support = 0; + advanced = 1; + + if(player:hasStatusEffect(EFFECT_COOKING_IMAGERY) == true) then + support = 1; + end + + player:startEvent(0x2720,price,0,advanced,member*256,0,support,0,0); + end; ----------------------------------- @@ -41,5 +56,9 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + + if(csid == 0x2720 and option == 1) then + player:addStatusEffect(EFFECT_COOKING_IMAGERY,1,0,120); + end end; Index: scripts/zones/Windurst_Waters/npcs/Kipo-Opo.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Kipo-Opo.lua (revision 2121) +++ scripts/zones/Windurst_Waters/npcs/Kipo-Opo.lua (working copy) @@ -4,11 +4,11 @@ -- Type: Head Craftsman -- @zone: 238 -- @pos: -119.750 -5.239 64.500 --- --- Auto-Script: Requires Verification (Verfied By Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil; ----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); ----------------------------------- -- onTrade Action @@ -22,7 +22,24 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x271f); + + --ARGUMENT 1: Charge for advanced support. + --ARGUMENT 3: Set to 1 for him to offer regular support, or 0 for advanced support. + --ARGUMENT 4: Set to 256 for him to offer any service at all. + --ARGUMENT 6: Set to 1 if the player already recieved synth support. + + rank = player:getSkillRank(56); + price = 30*rank; + member = player:getVar("GuildMember-Cooking"); + support = 0; + advanced = 0; + + if(player:hasStatusEffect(EFFECT_COOKING_IMAGERY) == true) then + support = 1; + end + + player:startEvent(0x271f,price,0,advanced,member*256,0,support,0,0); + end; ----------------------------------- @@ -41,5 +58,13 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + + rank = player:getSkillRank(56); + price = 30*rank; + + if(csid == 0x271f and option == 1) then + player:delGil(price); + player:addStatusEffect(EFFECT_COOKING_IMAGERY,3,0,480); + end end; Index: scripts/zones/Windurst_Waters/npcs/Piketo-Puketo.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Piketo-Puketo.lua (revision 2121) +++ scripts/zones/Windurst_Waters/npcs/Piketo-Puketo.lua (working copy) @@ -4,42 +4,169 @@ -- Type: Guild Master -- @zone: 238 -- @pos: -124.012 -2.999 59.998 --- --- Auto-Script: Requires Verification (Verfied By Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil; ----------------------------------- +require("scripts/globals/settings"); +require("scripts/globals/status"); ------------------------------------ --- onTrade Action ------------------------------------ +function onTrigger(player,npc) -function onTrade(player,npc,trade) -end; + --ARGUMENT 1: Item to be used for the rank test. + --ARGUMENT 3: Set to 0,1,2, or 3 for rank tests. Set to 0x10 for regular text (0x100 for high levels). + --ARGUMENT 4: Used for induction. 0 is for new members, otherwise 0x100 will turn it off. + --ARGUMENT 8: Guild ID to be used if the player is too high a level in another guild. ------------------------------------ --- onTrigger Action ------------------------------------ + lvl = player:getSkillLevel(56); + rank = player:getSkillRank(56); + test = player:getVar("takingTest-Cooking"); + member = player:getVar("guildMember-Cooking"); + + if (member == 0) then + player:startEvent(0x271d); -- Offer to induct player. + else + if (lvl >= (((rank+1)*10)-2) and rank ~= 9) then -- See if the player needs a guild rank test. + text = 0; + player:setVar("takingTest-Cooking",1); + switch (rank) : caseof { + [0] = function(x) item = 0x1103; end, --Recruit Test + [1] = function(x) item = 0x1140; end, --Initiate Test + [2] = function(x) item = 0x1189; end, --Novice Test + [3] = function(x) item = 0x111d; end, --Apprentice Test + [4] = function(x) item = 0x113d; end, --Journeyman Test + [5] = function(x) item = 0x11ce; end, --Craftsman Test + [6] = function(x) item = 0x11c2; end, --Artisan Test + [7] = function(x) item = 0x1158; end, --Adept Test + [8] = function(x) item = 0x11d1; end, --Veteran Test + [9] = function(x) item = 0x10ca; end, --Expert Test + --[10] = function(x) item = 0x0000; end, --Authority Test + --[11] = function(x) item = 0x0000; end, --Luminary Test + --[12] = function(x) item = 0x0000; end, --Master Test + --[13] = function(x) item = 0x0000; end, --Grandmaster Test + --[14] = function(x) item = 0x0000; end, --Legend Test + default = function(x) end, } + else -- Regular dialogue + if (rank >= 6) then --Changes if the player is high enough level. + text = 0x100; + else + text = 0x10; + end + end + player:startEvent(0x271d,item,0,text,member*256,0,0,0,0); + end +end; -function onTrigger(player,npc) - player:startEvent(0x271d); -end; ----------------------------------- --- onEventUpdate +-- onTrade Action ----------------------------------- +function onTrade(player,npc,trade) + count = trade:getItemCount(); + rank = player:getSkillRank(56); + lvl = player:getSkillLevel(56); + item0 = trade:hasItemQty(0x1103,1); + item1 = trade:hasItemQty(0x1140,1); + item2 = trade:hasItemQty(0x1189,1); + item3 = trade:hasItemQty(0x111d,1); + item4 = trade:hasItemQty(0x113d,1); + item5 = trade:hasItemQty(0x11ce,1); + item6 = trade:hasItemQty(0x11c2,1); + item7 = trade:hasItemQty(0x1158,1); + item8 = trade:hasItemQty(0x11d1,1); + item9 = trade:hasItemQty(0x10ca,1); + --item10 = trade:hasItemQty(0x0000,1); + --item11 = trade:hasItemQty(0x0000,1); + --item12 = trade:hasItemQty(0x0000,1); + --item13 = trade:hasItemQty(0x0000,1); + --item14 = trade:hasItemQty(0x0000,1); + test = player:getVar("takingTest-Cooking"); + + if (count == 1 and item0 and rank == 0 and lvl >= 8 and test) then + player:startEvent(0x271e,0,0,0,0,1,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,1); + elseif (count == 1 and item1 and rank == 1 and lvl >= 18 and test) then + player:startEvent(0x271e,0,0,0,0,2,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,2); + elseif (count == 1 and item2 and rank == 2 and lvl >= 28 and test) then + player:startEvent(0x271e,0,0,0,0,3,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,3); + elseif (count == 1 and item3 and rank == 3 and lvl >= 38 and test) then + player:startEvent(0x271e,0,0,0,0,4,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,4); + elseif (count == 1 and item4 and rank == 4 and lvl >= 48 and test) then + player:startEvent(0x271e,0,0,0,0,5,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,5); + elseif (count == 1 and item5 and rank == 5 and lvl >= 58 and test) then + player:startEvent(0x271e,0,0,0,0,6,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,6); + elseif (count == 1 and item6 and rank == 6 and lvl >= 68 and test) then + player:startEvent(0x271e,0,0,0,0,7,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,7); + elseif (count == 1 and item7 and rank == 7 and lvl >= 78 and test) then + player:startEvent(0x271e,0,0,0,0,8,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,8); + elseif (count == 1 and item8 and rank == 8 and lvl >= 88 and test) then + player:startEvent(0x271e,0,0,0,0,9,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,9); + elseif (count == 1 and item9 and rank == 9 and lvl >= 98 and test) then + player:startEvent(0x271e,0,0,0,0,10,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,10); + --[[ + elseif (count == 1 and item10 and rank == 10 and lvl >= 108 and test) then + player:startEvent(0x271e,0,0,0,0,11,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,11); + elseif (count == 1 and item11 and rank == 11 and lvl >= 118 and test) then + player:startEvent(0x271e,0,0,0,0,12,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,12); + elseif (count == 1 and item12 and rank == 12 and lvl >= 128 and test) then + player:startEvent(0x271e,0,0,0,0,13,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,13); + elseif (count == 1 and item13 and rank == 13 and lvl >= 138 and test) then + player:startEvent(0x271e,0,0,0,0,14,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,14); + elseif (count == 1 and item14 and rank == 14 and lvl >= 148 and test) then + player:startEvent(0x271e,0,0,0,0,15,0,0,0); + trade:isComplete(); + player:setVar("takingTest-Cooking",0); + player:setSkillRank(56,15); + ]]-- + end +end; -function onEventUpdate(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - function onEventFinish(player,csid,option) - -- printf("CSID: %u",csid); - -- printf("RESULT: %u",option); -end; - + if (option == 1) then + if (player:getVar("guildMember-Cooking") == 0) then + player:addItem(0x1000); + player:messageSpecial(ITEM_OBTAINED,4096); + player:setVar("guildMember-Cooking",1); + end + end +end; \ No newline at end of file Index: scripts/zones/Windurst_Waters/npcs/Puroiko-Maiko_WW.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Puroiko-Maiko_WW.lua (revision 2121) +++ scripts/zones/Windurst_Waters/npcs/Puroiko-Maiko_WW.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Windurst_Woods/npcs/Harara_WW.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Harara_WW.lua (revision 2121) +++ scripts/zones/Windurst_Woods/npcs/Harara_WW.lua (working copy) @@ -97,7 +97,20 @@ elseif(option >= 32768 and option <= 32944) then for Item = 1,size,3 do if(option == inventory[Item]) then - if(player:getFreeSlotsCount() >= 1) then + + if(player:hasItem(inventory[Item + 2]) == 1) then + if(inventory[Item + 2] == 0x3D91) then -- Chariot Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D92) then -- Empress Band + cannotObtain = 1; + elseif(inventory[Item + 2] == 0x3D93) then -- Emperor Band + cannotObtain = 1; + end + else + cannotObtain = 0; + end + + if(player:getFreeSlotsCount() >= 1 and cannotObtain == 0) then if(player:getNation() == guardnation) then itemCP = inventory[Item + 1]; else Index: scripts/zones/Windurst_Woods/npcs/Orlaine.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Orlaine.lua (revision 2121) +++ scripts/zones/Windurst_Woods/npcs/Orlaine.lua (working copy) @@ -43,7 +43,7 @@ --print("CSID:",csid); --print("OPTION:",option); - locla price = 100; + local price = 100; if (csid == 0x2712 and option == 0) then if (player:delGil(price)) then @@ -56,4 +56,4 @@ end end -end; \ No newline at end of file +end; Index: scripts/zones/Windurst_Woods/npcs/Perih_Vashai.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Perih_Vashai.lua (revision 2121) +++ scripts/zones/Windurst_Woods/npcs/Perih_Vashai.lua (working copy) @@ -27,14 +27,15 @@ function onTrigger(player,npc) - TheFangedOne = player:getQuestStatus(WINDURST,THE_FANGED_ONE); + local TheFangedOne = player:getQuestStatus(WINDURST,THE_FANGED_ONE); + local OldFang = player:hasKeyItem(OLD_TIGERS_FANG); if(TheFangedOne ~= QUEST_COMPLETED) then - if(TheFangedOne == QUEST_AVAILABLE) then + if(TheFangedOne == QUEST_AVAILABLE and player:getMainLvl() >= ADVANCED_JOB_LEVEL) then player:startEvent(0x015f); - elseif(TheFangedOne == QUEST_ACCEPTED and player:hasKeyItem(OLD_TIGERS_FANG) == false) then + elseif(TheFangedOne == QUEST_ACCEPTED and OldFang == false) then player:startEvent(0x0160); - elseif(player:hasKeyItem(OLD_TIGERS_FANG) and player:getVar("TheFangedOne_Event") ~= 1) then + elseif(OldFang == true and player:getVar("TheFangedOne_Event") ~= 1) then player:startEvent(0x0165); elseif(player:getVar("TheFangedOne_Event") == 1) then player:startEvent(0x0166); Index: scripts/zones/Windurst_Woods/npcs/Tih_Pikeh.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Tih_Pikeh.lua (revision 2121) +++ scripts/zones/Windurst_Woods/npcs/Tih_Pikeh.lua (working copy) @@ -1,44 +1,72 @@ ----------------------------------- --- Area: Windurst Woods --- NPC: Tih Pikeh --- Working 100% +-- Tih Pikeh +-- Changes dialogue based on mission status. ----------------------------------- - -package.loaded["scripts/globals/settings"] = nil; -require("scripts/globals/settings"); - + ----------------------------------- --- onTrade Action +-- onTrigger Action ----------------------------------- +require("scripts/globals/settings"); +function onTrigger(player,npc) + + nation = player:getNation(); -function onTrade(player,npc,trade) + --Mission Flags-- + windymission = player:getVar("windurstMissions"); + windyoneone = player:getVar("theHorutotoRuinsExperiment"); + windyonetwo = player:getVar("theHeartOfTheMatter"); + windyonetwoa = player:getVar("theHeartOf-ApururuCS"); + windyonetwoc = player:getVar("theHeartOf-CardianCS"); + windyonethree = player:getVar("thePriceOfPeace"); + ----------------------------------- + -- Dialogues,cutscenes,etc. go below. + ----------------------------------- + --Standard,non-Windurst player dialogue-- + if (nation ~= 2) then + player:startEvent(0x6c,0,0,nation); + else --Windurst player dialogue (most cases) + if (windymission == 12) then + --Check status of Windurst Mission 1-2-- + if (windyonetwo == 0) then + player:startEvent(0x83); + elseif (windyonetwo == 1 or windyonetwo == 2) then + player:startEvent(0x87); + else + player:startEvent(0x6a); + end + elseif (windymission == 13) then + --Check status of Windurst Mission 1-3-- + if (windyonethree == 0) then + player:startEvent(0x6a); + elseif (windyonethree == 1 or windyonethree == 2) then + player:startEvent(0x98); + elseif (windyonethree == 3) then + player:startEvent(0x9c); + end + else + --Check status of Windurst mission 1-1-- + if (windyoneone == 0) then + player:startEvent(0x6a); + elseif (windyoneone == 1 or windyoneone == 2) then + player:startEvent(0x7e); + elseif (windyoneone == 3) then + player:startEvent(0x83); + end + end + end end; + ----------------------------------- --- onTrigger Action +-- onTrade Action ----------------------------------- - -function onTrigger(player,npc) - -end; - +function onTrade(player,npc,trade) +end; + ----------------------------------- --- onEventUpdate +-- onEventFinish Action ----------------------------------- - -function onEventUpdate(player,csid,option) ---printf("CSID: %u",csid); ---printf("RESULT: %u",option); -end; - ------------------------------------ --- onEventFinish ------------------------------------ - function onEventFinish(player,csid,option) ---printf("CSID: %u",csid); ---printf("RESULT: %u",option); -end; - - - +--print("CSID:",csid); +--print("RESULT:",option); +end; \ No newline at end of file Index: scripts/zones/Xarcabard/Zone.lua =================================================================== --- scripts/zones/Xarcabard/Zone.lua (revision 2121) +++ scripts/zones/Xarcabard/Zone.lua (working copy) @@ -35,14 +35,14 @@ if((tonumber(colors) % 4 >= 2) == false and wc < 4) then player:setVar("ICanHearARainbow_Weather",1); player:setVar("ICanHearARainbow",colors+2); + cs = 0x0009; elseif ((tonumber(colors) % 64 >= 32) == false and (wc == 12 or wc == 13)) then player:setVar("ICanHearARainbow_Weather",12); player:setVar("ICanHearARainbow",colors+32); + cs = 0x0009; else cs = -1; end - - cs = 0x0009; end return cs; Index: sql/exp_table.sql =================================================================== --- sql/exp_table.sql (revision 2121) +++ sql/exp_table.sql (working copy) @@ -56,20 +56,20 @@ -- INSERT INTO `exp_table` VALUES (15, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800); -INSERT INTO `exp_table` VALUES (14, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 720, 720, 720, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (13, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 630, 630, 630, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (12, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 580, 580, 580, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (11, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 580, 530, 530, 530, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (10, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 530, 480, 480, 480, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (9, 800, 800, 800, 800, 800, 800, 600, 600, 600, 600, 530, 480, 440, 440, 440, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (8, 600, 600, 600, 600, 600, 600, 550, 550, 550, 530, 480, 430, 400, 400, 400, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (7, 550, 550, 550, 550, 550, 550, 500, 500, 500, 470, 430, 380, 360, 360, 360, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (6, 450, 450, 450, 450, 450, 450, 450, 450, 450, 400, 370, 330, 320, 320, 320, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (5, 350, 350, 350, 350, 350, 350, 400, 400, 400, 340, 310, 280, 280, 280, 280, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (4, 200, 200, 200, 200, 200, 200, 300, 300, 300, 270, 250, 240, 240, 240, 240, 0, 0, 0, 0, 0); -INSERT INTO `exp_table` VALUES (3, 160, 160, 160, 160, 160, 160, 200, 200, 200, 200, 200, 200, 200, 200, 200, 0, 0, 220, 0, 0); -INSERT INTO `exp_table` VALUES (2, 140, 140, 140, 140, 140, 140, 150, 150, 150, 150, 150, 160, 160, 160, 160, 0, 0, 180, 0, 0); -INSERT INTO `exp_table` VALUES (1, 120, 120, 120, 120, 120, 120, 125, 125, 125, 125, 125, 130, 130, 130, 130, 0, 0, 140, 0, 0); +INSERT INTO `exp_table` VALUES (14, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 720, 720, 720, 640, 640, 640, 640, 640); +INSERT INTO `exp_table` VALUES (13, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 630, 630, 630, 580, 580, 580, 580, 580); +INSERT INTO `exp_table` VALUES (12, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 580, 580, 580, 520, 520, 520, 520, 520); +INSERT INTO `exp_table` VALUES (11, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 580, 530, 530, 530, 460, 460, 460, 460, 460); +INSERT INTO `exp_table` VALUES (10, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, 530, 480, 480, 480, 430, 430, 430, 430, 430); +INSERT INTO `exp_table` VALUES (9, 800, 800, 800, 800, 800, 800, 600, 600, 600, 600, 530, 480, 440, 440, 440, 400, 400, 400, 400, 400); +INSERT INTO `exp_table` VALUES (8, 600, 600, 600, 600, 600, 600, 550, 550, 550, 530, 480, 430, 400, 400, 400, 380, 380, 380, 380, 380); +INSERT INTO `exp_table` VALUES (7, 550, 550, 550, 550, 550, 550, 500, 500, 500, 470, 430, 380, 360, 360, 360, 340, 340, 340, 340, 340); +INSERT INTO `exp_table` VALUES (6, 450, 450, 450, 450, 450, 450, 450, 450, 450, 400, 370, 330, 320, 320, 320, 300, 300, 300, 300, 300); +INSERT INTO `exp_table` VALUES (5, 350, 350, 350, 350, 350, 350, 400, 400, 400, 340, 310, 280, 280, 280, 280, 260, 260, 260, 260, 260); +INSERT INTO `exp_table` VALUES (4, 200, 200, 200, 200, 200, 200, 300, 300, 300, 270, 250, 240, 240, 240, 240, 230, 230, 230, 230, 230); +INSERT INTO `exp_table` VALUES (3, 160, 160, 160, 160, 160, 160, 200, 200, 200, 200, 200, 200, 200, 200, 200, 220, 220, 220, 220, 220); +INSERT INTO `exp_table` VALUES (2, 140, 140, 140, 140, 140, 140, 150, 150, 150, 150, 150, 160, 160, 160, 160, 180, 180, 180, 180, 180); +INSERT INTO `exp_table` VALUES (1, 120, 120, 120, 120, 120, 120, 125, 125, 125, 125, 125, 130, 130, 130, 130, 140, 140, 140, 140, 140); INSERT INTO `exp_table` VALUES (0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100); INSERT INTO `exp_table` VALUES (-1, 90, 90, 90, 90, 90, 90, 93, 95, 95, 95, 96, 96, 96, 96, 96, 97, 97, 97, 98, 98); INSERT INTO `exp_table` VALUES (-2, 80, 80, 80, 80, 80, 80, 86, 86, 90, 90, 93, 93, 93, 93, 94, 95, 95, 95, 96, 96); Index: sql/item_mods.sql =================================================================== --- sql/item_mods.sql (revision 2121) +++ sql/item_mods.sql (working copy) @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Serveur: localhost --- Généré le : Dim 07 Octobre 2012 à 09:39 +-- Gnr le : Dim 07 Octobre 2012 09:39 -- Version du serveur: 6.0.0 -- Version de PHP: 5.2.9-2 @@ -16,7 +16,7 @@ /*!40101 SET NAMES utf8 */; -- --- Base de données: `dspdb` +-- Base de donnes: `dspdb` -- -- -------------------------------------------------------- @@ -622,6 +622,10 @@ INSERT INTO `item_mods` VALUES(11498, 23, 3); INSERT INTO `item_mods` VALUES(11498, 25, 3); INSERT INTO `item_mods` VALUES(11498, 167, 2); +INSERT INTO `item_mods` VALUES(11527, 1, 24); +INSERT INTO `item_mods` VALUES(11527, 5, 23); +INSERT INTO `item_mods` VALUES(11527, 28, 4); +INSERT INTO `item_mods` VALUES(11527, 30, -2); INSERT INTO `item_mods` VALUES(11528, 1, 1); INSERT INTO `item_mods` VALUES(11528, 23, 2); INSERT INTO `item_mods` VALUES(11529, 1, 1); @@ -653,6 +657,13 @@ INSERT INTO `item_mods` VALUES(11542, 1, 7); INSERT INTO `item_mods` VALUES(11542, 27, 2); INSERT INTO `item_mods` VALUES(11542, 68, 6); +INSERT INTO `item_mods` VALUES(11743, 1, 3); +INSERT INTO `item_mods` VALUES(11743, 27, 2); +INSERT INTO `item_mods` VALUES(11743, 28, 3); +INSERT INTO `item_mods` VALUES(11583, 12, 4); +INSERT INTO `item_mods` VALUES(11583, 115, 4); +INSERT INTO `item_mods` VALUES(11584, 12, 5); +INSERT INTO `item_mods` VALUES(11584, 115, 5); INSERT INTO `item_mods` VALUES(11798, 1, 41); INSERT INTO `item_mods` VALUES(11798, 8, 10); INSERT INTO `item_mods` VALUES(11798, 9, 10); @@ -2263,6 +2274,10 @@ INSERT INTO `item_mods` VALUES(12621, 54, 9); INSERT INTO `item_mods` VALUES(12621, 237, 2); INSERT INTO `item_mods` VALUES(12624, 1, 15); +INSERT INTO `item_mods` VALUES(12623, 1, 39); +INSERT INTO `item_mods` VALUES(12623, 27, 4); +INSERT INTO `item_mods` VALUES(12623, 28, 10); +-- INSERT INTO `item_mods` VALUES(12623, 0, 5); -- MCRIT 5% INSERT INTO `item_mods` VALUES(12625, 1, 24); INSERT INTO `item_mods` VALUES(12626, 1, 11); INSERT INTO `item_mods` VALUES(12627, 1, 19); @@ -6888,6 +6903,10 @@ INSERT INTO `item_mods` VALUES(14363, 14, 1); INSERT INTO `item_mods` VALUES(14363, 60, 3); INSERT INTO `item_mods` VALUES(14363, 61, 3); +INSERT INTO `item_mods` VALUES(14364, 1, 38); +INSERT INTO `item_mods` VALUES(14364, 27, 3); +INSERT INTO `item_mods` VALUES(14364, 28, 9); +-- INSERT INTO `item_mods` VALUES(14364, 0, 4); -- MCRIT 4% INSERT INTO `item_mods` VALUES(14366, 1, 44); INSERT INTO `item_mods` VALUES(14366, 2, 42); INSERT INTO `item_mods` VALUES(14366, 10, 7); @@ -7825,26 +7844,38 @@ INSERT INTO `item_mods` VALUES(14630, 8, 5); INSERT INTO `item_mods` VALUES(14630, 12, 2); INSERT INTO `item_mods` VALUES(14630, 13, -2); +INSERT INTO `item_mods` VALUES(14631, 8, 6); +INSERT INTO `item_mods` VALUES(14631, 20, -30); INSERT INTO `item_mods` VALUES(14632, 1, 3); INSERT INTO `item_mods` VALUES(14632, 8, 2); INSERT INTO `item_mods` VALUES(14632, 9, -2); INSERT INTO `item_mods` VALUES(14632, 13, 5); +INSERT INTO `item_mods` VALUES(14633, 13, 6); +INSERT INTO `item_mods` VALUES(14633, 19, -30); INSERT INTO `item_mods` VALUES(14634, 1, 3); INSERT INTO `item_mods` VALUES(14634, 9, 2); INSERT INTO `item_mods` VALUES(14634, 10, 5); INSERT INTO `item_mods` VALUES(14634, 11, -2); +INSERT INTO `item_mods` VALUES(14635, 10, 6); +INSERT INTO `item_mods` VALUES(14635, 17, -30); INSERT INTO `item_mods` VALUES(14636, 1, 3); INSERT INTO `item_mods` VALUES(14636, 10, 2); INSERT INTO `item_mods` VALUES(14636, 11, 5); INSERT INTO `item_mods` VALUES(14636, 12, -2); +INSERT INTO `item_mods` VALUES(14637, 11, 6); +INSERT INTO `item_mods` VALUES(14637, 16, -30); INSERT INTO `item_mods` VALUES(14638, 1, 3); INSERT INTO `item_mods` VALUES(14638, 9, 5); INSERT INTO `item_mods` VALUES(14638, 10, -2); INSERT INTO `item_mods` VALUES(14638, 13, 2); +INSERT INTO `item_mods` VALUES(14639, 9, 6); +INSERT INTO `item_mods` VALUES(14639, 18, -30); INSERT INTO `item_mods` VALUES(14640, 1, 3); INSERT INTO `item_mods` VALUES(14640, 8, -2); INSERT INTO `item_mods` VALUES(14640, 11, 2); INSERT INTO `item_mods` VALUES(14640, 12, 5); +INSERT INTO `item_mods` VALUES(14641, 12, 6); +INSERT INTO `item_mods` VALUES(14641, 15, -30); INSERT INTO `item_mods` VALUES(14642, 1, 3); INSERT INTO `item_mods` VALUES(14642, 2, 20); INSERT INTO `item_mods` VALUES(14642, 5, -20); @@ -7855,6 +7886,8 @@ INSERT INTO `item_mods` VALUES(14642, 12, -1); INSERT INTO `item_mods` VALUES(14642, 13, -1); INSERT INTO `item_mods` VALUES(14642, 14, 5); +INSERT INTO `item_mods` VALUES(14643, 14, 6); +INSERT INTO `item_mods` VALUES(14643, 22, -30); INSERT INTO `item_mods` VALUES(14644, 1, 3); INSERT INTO `item_mods` VALUES(14644, 2, -20); INSERT INTO `item_mods` VALUES(14644, 5, 20); @@ -7865,6 +7898,8 @@ INSERT INTO `item_mods` VALUES(14644, 12, 1); INSERT INTO `item_mods` VALUES(14644, 13, 1); INSERT INTO `item_mods` VALUES(14644, 14, 1); +INSERT INTO `item_mods` VALUES(14645, 5, 30); +INSERT INTO `item_mods` VALUES(14645, 21, -30); INSERT INTO `item_mods` VALUES(14650, 1, 2); INSERT INTO `item_mods` VALUES(14650, 26, 6); INSERT INTO `item_mods` VALUES(14651, 5, 15); @@ -10520,6 +10555,9 @@ INSERT INTO `item_mods` VALUES(15543, 289, 5); INSERT INTO `item_mods` VALUES(15544, 27, 3); INSERT INTO `item_mods` VALUES(15545, 27, -3); +INSERT INTO `item_mods` VALUES(15545, 5, 30); +INSERT INTO `item_mods` VALUES(15545, 12, 5); +INSERT INTO `item_mods` VALUES(15545, 13, 5); INSERT INTO `item_mods` VALUES(15546, 2, -20); INSERT INTO `item_mods` VALUES(15546, 5, 10); INSERT INTO `item_mods` VALUES(15546, 8, 1); @@ -14768,6 +14806,9 @@ INSERT INTO `item_mods` VALUES(19046, 11, 1); INSERT INTO `item_mods` VALUES(19047, 5, 12); INSERT INTO `item_mods` VALUES(19047, 11, 2); +INSERT INTO `item_mods` VALUES(19049, 170, 1); +INSERT INTO `item_mods` VALUES(19051, 12, 1); +INSERT INTO `item_mods` VALUES(19051, 170, 1); INSERT INTO `item_mods` VALUES(19100, 2, 16); INSERT INTO `item_mods` VALUES(19100, 5, 16); INSERT INTO `item_mods` VALUES(19100, 244, 2); Index: sql/mob_spawn_points.sql =================================================================== --- sql/mob_spawn_points.sql (revision 2121) +++ sql/mob_spawn_points.sql (working copy) @@ -39979,8 +39979,8 @@ INSERT INTO `mob_spawn_points` VALUES ('17490228', 'Recluse_Spider', '9045', '0.000', '0.000', '0.000', '0'); INSERT INTO `mob_spawn_points` VALUES ('17490229', 'Recluse_Spider', '9045', '0.000', '0.000', '0.000', '0'); INSERT INTO `mob_spawn_points` VALUES ('17490230', 'Mimic', '9041', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17490231', 'Cancer', '9021', '0.000', '0.000', '0.000', '0'); -INSERT INTO `mob_spawn_points` VALUES ('17490232', 'Robber_Crab', '9046', '0.000', '0.000', '0.000', '0'); +INSERT INTO `mob_spawn_points` VALUES ('17490231', 'Cancer', '9021', '-25.000', '-10.000', '-152.000', '35'); +INSERT INTO `mob_spawn_points` VALUES ('17490232', 'Robber_Crab', '9046', '-25.000', '-10.000', '-152.000', '35'); INSERT INTO `mob_spawn_points` VALUES ('17490233', 'Phantom_Worm', '9044', '0.000', '0.000', '0.000', '0'); INSERT INTO `mob_spawn_points` VALUES ('17490234', 'Guivre', '9036', '119.000', '-0.010', '38.000', '127'); INSERT INTO `mob_spawn_points` VALUES ('17461479', 'Bodach', '8773', '0.000', '0.000', '0.000', '0'); Index: sql/npc_list.sql =================================================================== --- sql/npc_list.sql (revision 2121) +++ sql/npc_list.sql (working copy) @@ -40,9 +40,10 @@ KEY `zoneid` (`zoneid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=70 PACK_KEYS=1; --- ---------------------------- --- Records of npc_list --- ---------------------------- +-- ------------------------------------------------------------ +-- Phanauet Channel (1) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16781336', 'Laiteconce', '136', '4.066', '-3.500', '-10.450', '1', '40', '40', '0', '1', '0', '2', '27', 0x0100010414101720003067400350006000700000, '32', '1'); INSERT INTO `npc_list` VALUES ('16781337', 'Luquillaue', '136', '4.066', '-3.500', '-10.450', '21', '40', '40', '0', '1', '0', '0', '27', 0x0100000414101720003067400350006000700000, '32', '1'); INSERT INTO `npc_list` VALUES ('16781338', 'FXTEST', '0', '9.857', '-7.500', '-4.979', '32768', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '1'); @@ -55,6 +56,11 @@ INSERT INTO `npc_list` VALUES ('16781346', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '1'); INSERT INTO `npc_list` VALUES ('16781347', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '1'); INSERT INTO `npc_list` VALUES ('16781348', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '1'); + +-- ------------------------------------------------------------ +-- Carpenters Landing (2) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16785726', 'qm1', '0', '145.500', '-9.000', '-699.000', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '2'); INSERT INTO `npc_list` VALUES ('16785727', 'qm2', '0', '-286.000', '-8.000', '-78.750', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '2'); INSERT INTO `npc_list` VALUES ('16785728', 'qm3', '0', '-263.000', '-8.000', '-121.500', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '2'); @@ -98,6 +104,11 @@ INSERT INTO `npc_list` VALUES ('16785772', '13', '126', '-99.577', '-0.016', '-514.720', '32769', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '2'); INSERT INTO `npc_list` VALUES ('16785773', 'Perseus', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '2075', 0x010001014D104D204D304D404D50166133700000, '32', '2'); INSERT INTO `npc_list` VALUES ('16785774', 'qm7', '0', '117.500', '-8.000', '-565.750', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '2'); + +-- ------------------------------------------------------------ +-- Manaclipper (3) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16789525', '1', '0', '0.000', '-3.000', '0.000', '1', '40', '40', '0', '0', '0', '0', '2051', 0x0000320000000000000000000000000000000000, '0', '3'); INSERT INTO `npc_list` VALUES ('16789526', 'Gniyah_Mischatt', '64', '0.033', '-3.000', '2.725', '14', '40', '40', '0', '1', '0', '0', '27', 0x01000D0774108720003008400850006000700000, '32', '3'); INSERT INTO `npc_list` VALUES ('16789528', 'Test_Actor', '0', '0.000', '-3.000', '0.000', '1', '40', '40', '9', '0', '0', '0', '6147', 0x0200000000000000000000000000000000000000, '0', '3'); @@ -107,6 +118,11 @@ INSERT INTO `npc_list` VALUES ('16789533', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '3'); INSERT INTO `npc_list` VALUES ('16789534', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '3'); INSERT INTO `npc_list` VALUES ('16789535', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '3'); + +-- ------------------------------------------------------------ +-- Bibiki Bay (4) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16793897', 'qm4', '125', '100.221', '-44.691', '940.547', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '4'); INSERT INTO `npc_list` VALUES ('16793903', 'Test_LIGHT', '0', '468.227', '-4.999', '757.645', '1', '40', '40', '8', '0', '0', '0', '6147', 0x0200000000000000000000000000000000000000, '0', '4'); INSERT INTO `npc_list` VALUES ('16793904', 'TAKARA_GOB_NPC', '0', '-322.993', '-2.631', '-457.733', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000F70100000000000000000000000000000000, '32', '4'); @@ -160,6 +176,11 @@ INSERT INTO `npc_list` VALUES ('16793954', 'Cherukiki', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000A30500000000000000000000000000000000, '32', '4'); INSERT INTO `npc_list` VALUES ('16793955', 'Kiteh_Nanjyea', '44', '298.915', '-1.892', '172.090', '1', '40', '40', '0', '1', '0', '2', '27', 0x0100060700108820883088408850006000700000, '32', '4'); INSERT INTO `npc_list` VALUES ('16793956', '10', '34', '297.460', '-1.978', '171.975', '1', '40', '40', '0', '0', '0', '2', '27', 0x0000560000000000000000000000000000000000, '32', '4'); + +-- ------------------------------------------------------------ +-- Uleguerand Range (5) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16798094', 'qm1', '0', '575.768', '-38.418', '124.751', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '5'); INSERT INTO `npc_list` VALUES ('16798097', 'Rabbit_Footprint', '0', '437.587', '0.392', '-417.850', '7', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '5'); INSERT INTO `npc_list` VALUES ('16798102', 'Fissure', '0', '380.267', '34.859', '-179.655', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '5'); @@ -184,6 +205,11 @@ INSERT INTO `npc_list` VALUES ('16798130', 'Louverance', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x010002033E102C20003064406450406000700000, '0', '5'); INSERT INTO `npc_list` VALUES ('16798131', '4', '114', '-292.639', '-59.541', '-517.576', '1', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '5'); INSERT INTO `npc_list` VALUES ('16798132', 'Louverance', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x010002036D102C20003064406450406000700000, '0', '5'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16801802', 'Armoury_Crate', '64', '-460.035', '-0.097', '901.971', '7', '40', '40', '0', '8', '0', '6', '1155', 0x0000C10300000000000000000000000000000000, '0', '6'); INSERT INTO `npc_list` VALUES ('16801809', 'Armoury_Crate', '64', '-220.035', '-0.097', '501.972', '6', '40', '40', '0', '8', '0', '6', '1155', 0x0000C10300000000000000000000000000000000, '0', '6'); INSERT INTO `npc_list` VALUES ('16801816', 'Armoury_Crate', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '6'); @@ -231,6 +257,11 @@ INSERT INTO `npc_list` VALUES ('16801920', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '6'); INSERT INTO `npc_list` VALUES ('16801921', 'Ramblix', '96', '-696.980', '2.218', '-478.837', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '6'); INSERT INTO `npc_list` VALUES ('16801922', 'Goblin_Footprint', '96', '-696.980', '2.218', '-478.837', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '6'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16806263', 'Luminant', '0', '288.326', '19.597', '-171.127', '6', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '7'); INSERT INTO `npc_list` VALUES ('16806264', 'Luminant', '0', '425.401', '20.138', '-160.428', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '7'); INSERT INTO `npc_list` VALUES ('16806265', 'Luminant', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '7'); @@ -252,6 +283,11 @@ INSERT INTO `npc_list` VALUES ('16806339', 'Excavation_Point', '118', '-559.629', '-13.114', '-88.864', '32775', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '7'); INSERT INTO `npc_list` VALUES ('16806340', 'Excavation_Point', '183', '-343.760', '-12.232', '66.061', '32774', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '7'); INSERT INTO `npc_list` VALUES ('16806341', 'Jakaka', '255', '-144.711', '7.246', '-250.309', '7', '40', '40', '0', '0', '0', '0', '27', 0x0100060673107320733073407350AB6000700000, '32', '7'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16810000', 'qm1', '64', '-565.000', '2.999', '-431.000', '7', '40', '40', '2', '8', '0', '7', '665', 0x0000440500000000000000000000000000000000, '32', '8'); INSERT INTO `npc_list` VALUES ('16810005', 'Armoury_Crate', '171', '-553.888', '1.546', '-444.477', '7', '40', '40', '0', '8', '0', '6', '1155', 0x0000C10300000000000000000000000000000000, '0', '8'); INSERT INTO `npc_list` VALUES ('16810006', 'qm2', '64', '-6.000', '2.924', '129.000', '7', '40', '40', '2', '8', '0', '7', '665', 0x0000440500000000000000000000000000000000, '32', '8'); @@ -286,6 +322,11 @@ INSERT INTO `npc_list` VALUES ('16810147', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '8'); INSERT INTO `npc_list` VALUES ('16810148', 'Ramblix', '235', '-579.373', '-1.475', '418.256', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '8'); INSERT INTO `npc_list` VALUES ('16810149', 'Goblin_Footprint', '235', '-579.373', '-1.475', '418.256', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '8'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16814247', 'Treasure_Chest', '192', '-328.000', '-0.252', '-272.000', '6', '40', '40', '0', '12', '100', '0', '4227', 0x0000020100000000000000000000000000000000, '0', '9'); INSERT INTO `npc_list` VALUES ('16814258', 'Treasure_Chest', '64', '-350.000', '15.747', '-170.000', '6', '40', '40', '0', '12', '100', '0', '4227', 0x0000020100000000000000000000000000000000, '0', '9'); INSERT INTO `npc_list` VALUES ('16814263', 'Treasure_Chest', '0', '-393.000', '15.747', '-212.000', '6', '40', '40', '0', '12', '100', '0', '4227', 0x0000020100000000000000000000000000000000, '0', '9'); @@ -401,6 +442,11 @@ INSERT INTO `npc_list` VALUES ('16814557', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '32', '9'); INSERT INTO `npc_list` VALUES ('16814558', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '32', '9'); INSERT INTO `npc_list` VALUES ('16814559', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '32', '9'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16818199', 'ArmouryCrate', '64', '-239.950', '-16.500', '284.099', '7', '40', '40', '0', '8', '0', '6', '1155', 0x0000C00300000000000000000000000000000000, '0', '10'); INSERT INTO `npc_list` VALUES ('16818201', 'ArmouryCrate', '64', '0.006', '23.500', '4.074', '6', '40', '40', '0', '8', '0', '6', '1155', 0x0000C00300000000000000000000000000000000, '0', '10'); INSERT INTO `npc_list` VALUES ('16818203', 'ArmouryCrate', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '10'); @@ -450,6 +496,11 @@ INSERT INTO `npc_list` VALUES ('16818278', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '10'); INSERT INTO `npc_list` VALUES ('16818279', 'Ramblix', '226', '-302.671', '0.000', '-233.014', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '10'); INSERT INTO `npc_list` VALUES ('16818280', 'Goblin_Footprint', '226', '-302.671', '0.000', '-233.014', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '10'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16822460', 'Goblin_Preceptor', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000BC0200000000000000000000000000000000, '0', '11'); INSERT INTO `npc_list` VALUES ('16822469', 'Scrawled_Writing', '128', '-16.806', '7.718', '14.155', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '11'); INSERT INTO `npc_list` VALUES ('16822474', '_0b0', '0', '173.021', '5.666', '-46.629', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '11'); @@ -516,6 +567,11 @@ INSERT INTO `npc_list` VALUES ('16822541', 'Mighty_Minded_Generajiq', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000B60200000000000000000000000000000000, '0', '11'); INSERT INTO `npc_list` VALUES ('16822542', 'Choplix_Limblopper', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000410400000000000000000000000000000000, '0', '11'); INSERT INTO `npc_list` VALUES ('16822543', '23', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x00004B0500000000000000000000000000000000, '32', '11'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16826572', 'qm1', '0', '152.010', '19.507', '101.512', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '12'); INSERT INTO `npc_list` VALUES ('16826573', 'Moblin_Showman', '0', '124.544', '19.988', '-60.670', '1', '40', '40', '0', '0', '0', '0', '27', 0x0000D70300000000000000000000000000000000, '0', '12'); INSERT INTO `npc_list` VALUES ('16826578', 'door_master', '0', '-180.286', '15.993', '156.606', '65537', '40', '40', '0', '0', '0', '0', '2051', 0x0000340000000000000000000000000000000000, '0', '12'); @@ -560,6 +616,11 @@ INSERT INTO `npc_list` VALUES ('16826618', 'Mining_Point', '0', '26.597', '15.204', '21.926', '32775', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '12'); INSERT INTO `npc_list` VALUES ('16826619', 'Mining_Point', '0', '26.597', '15.204', '21.926', '32775', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '12'); INSERT INTO `npc_list` VALUES ('16826620', 'Treasure_Coffer', '64', '-46.014', '17.980', '-26.274', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000C10300000000000000000000000000000000, '0', '12'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16830583', '_0d0', '0', '-54.500', '-121.716', '-579.972', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '13'); INSERT INTO `npc_list` VALUES ('16830584', '_0d1', '0', '-534.497', '118.279', '-99.770', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '13'); INSERT INTO `npc_list` VALUES ('16830585', '_0d2', '0', '-54.506', '-1.631', '-100.019', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '13'); @@ -602,29 +663,42 @@ INSERT INTO `npc_list` VALUES ('16830627', 'Brakobrik', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000D80300000000000000000000000000000000, '32', '13'); INSERT INTO `npc_list` VALUES ('16830628', 'Tarnotik', '196', '-458.893', '119.999', '-3.948', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000D60300000000000000000000000000000000, '32', '13'); INSERT INTO `npc_list` VALUES ('16830629', 'Magriffon', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '25', 0x01000D0300104820483048404850006000700000, '32', '13'); -INSERT INTO `npc_list` VALUES ('16834565', '_0e0', '0', '-216.449', '-8.635', '280.000', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834566', '_0e1', '0', '-216.449', '-48.635', '-280.000', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834567', '_0e2', '0', '280.000', '-88.659', '-16.450', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834568', 'Large_Apparatus', '0', '270.000', '-84.900', '-36.299', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834569', 'Large_Apparatus', '0', '-236.300', '-44.900', '-290.000', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834570', 'Large_Apparatus', '0', '-236.300', '-44.900', '-270.000', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834571', 'Large_Apparatus', '0', '-236.300', '-4.900', '270.000', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834572', 'Large_Apparatus', '0', '-236.300', '-4.900', '290.000', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834573', 'Large_Apparatus', '0', '290.000', '-84.900', '-36.299', '1', '40', '40', '0', '0', '0', '0', '27', 0x0200000000000000000000000000000000000000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834574', 'FXTEST', '0', '280.025', '-86.459', '-17.840', '32768', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834575', 'Wolfgang', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100020114101920193019401950056000700000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834576', 'qm5', '126', '-218.500', '-6.459', '279.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834577', 'Nag_molada', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000AC0500000000000000000000000000000000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834578', 'qm4', '126', '-218.500', '-6.459', '280.638', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834579', 'qm3', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + +INSERT INTO `npc_list` VALUES ('16834563', 'NPC[2]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '1', 0x0000320000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834564', 'NPC[3]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000320000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834565', '_0e0', '0', '-216.449', '-8.635', '280', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834566', '_0e1', '0', '-216.449', '-48.635', '-280', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834567', '_0e2', '0', '280', '-88.659', '-16.45', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834568', '_0e3', '0', '-236.3', '-4.9', '290', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834569', '_0e4', '0', '-236.3', '-4.9', '270', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834570', '_0e5', '0', '-236.3', '-44.9', '-270', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834571', '_0e6', '0', '-236.3', '-44.9', '-290', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834572', '_0e7', '0', '270', '-84.9', '-36.299', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834573', '_0e8', '0', '290', '-84.9', '-36.299', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834574', 'FXTEST', '0', '280.025', '-86.459', '-17.84', '32768', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834575', 'Wolfgang', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100020114101920193019401950056000700000, '32', '14'); +INSERT INTO `npc_list` VALUES ('16834576', 'qm1', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000A70500000000000000000000000000000000, '32', '14'); +INSERT INTO `npc_list` VALUES ('16834577', 'Nag_molada', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000AC0500000000000000000000000000000000, '32', '14'); +INSERT INTO `npc_list` VALUES ('16834578', 'qm2', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); +INSERT INTO `npc_list` VALUES ('16834579', 'qm3', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); INSERT INTO `npc_list` VALUES ('16834580', 'Ramblix', '210', '275.724', '-81.135', '-94.386', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '14'); INSERT INTO `npc_list` VALUES ('16834581', 'Goblin_Footprint', '210', '275.724', '-81.135', '-94.386', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834582', 'qm2', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834583', 'qm1', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000A70500000000000000000000000000000000, '32', '14'); -INSERT INTO `npc_list` VALUES ('16834585', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834586', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834587', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); -INSERT INTO `npc_list` VALUES ('16834588', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834582', 'qm4', '126', '-218.5', '-6.459', '280.638', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); +INSERT INTO `npc_list` VALUES ('16834583', 'qm5', '126', '-218.5', '-6.459', '279', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000EC0300000000000000000000000000000000, '32', '14'); +INSERT INTO `npc_list` VALUES ('16834584', 'NPC[17]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000320000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834585', 'Moogle', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834586', 'Moogle', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834587', 'Moogle', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); +INSERT INTO `npc_list` VALUES ('16834588', 'Moogle', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '14'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16838669', 'Sturdy_Pyxis', '0', '318.247', '20.584', '214.440', '7', '40', '40', '0', '12', '100', '2', '4739', 0x00000B0100000000000000000000000000000000, '0', '15'); INSERT INTO `npc_list` VALUES ('16838670', 'Sturdy_Pyxis', '0', '239.917', '25.734', '213.876', '7', '40', '40', '0', '12', '100', '2', '4739', 0x00000B0100000000000000000000000000000000, '0', '15'); INSERT INTO `npc_list` VALUES ('16838671', 'Sturdy_Pyxis', '0', '-200.128', '47.500', '437.462', '7', '40', '40', '0', '12', '100', '2', '4739', 0x00000B0100000000000000000000000000000000, '0', '15'); @@ -771,6 +845,11 @@ INSERT INTO `npc_list` VALUES ('16839268', 'Sugandhi', '248', '-648.407', '6.583', '182.449', '24', '40', '40', '0', '0', '0', '0', '27', 0x01000D0200101120113015401550006000700000, '32', '15'); INSERT INTO `npc_list` VALUES ('16839269', 'Romualdo', '176', '-121.496', '48.066', '485.342', '18', '40', '40', '0', '0', '0', '0', '27', 0x0100090105100D20053005400750FF6000700000, '32', '15'); INSERT INTO `npc_list` VALUES ('16839270', 'Event_Master', '0', '122.194', '-71.858', '-829.799', '7', '40', '40', '0', '0', '0', '2', '27', 0x0000520000000000000000000000000000000000, '32', '15'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16842780', '1', '0', '-40.000', '-1.000', '200.000', '6', '40', '40', '0', '0', '16', '0', '2179', 0x0000490400000000000000000000000000000000, '2', '16'); INSERT INTO `npc_list` VALUES ('16842838', '2', '0', '-240.000', '-1.000', '40.000', '7', '40', '40', '2', '0', '16', '6', '2179', 0x0000490400000000000000000000000000000000, '2', '16'); INSERT INTO `npc_list` VALUES ('16842845', '3', '0', '-280.000', '-1.000', '-40.000', '7', '40', '40', '2', '0', '16', '6', '2179', 0x0000490400000000000000000000000000000000, '2', '16'); @@ -811,6 +890,11 @@ INSERT INTO `npc_list` VALUES ('16843075', 'qm5', '123', '-325.661', '-0.090', '192.788', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '16'); INSERT INTO `npc_list` VALUES ('16843076', 'qm6', '133', '217.188', '-1.798', '-197.485', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '16'); INSERT INTO `npc_list` VALUES ('16843077', '18', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0100000100100020003000400050006000700000, '32', '16'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16846923', 'Enigmatic_Sphere', '0', '-239.999', '-59.750', '0.000', '6', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '17'); INSERT INTO `npc_list` VALUES ('16846928', 'Enigmatic_Sphere', '0', '0.000', '0.250', '0.000', '6', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '17'); INSERT INTO `npc_list` VALUES ('16846933', 'Enigmatic_Sphere', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '17'); @@ -844,6 +928,11 @@ INSERT INTO `npc_list` VALUES ('16846969', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '17'); INSERT INTO `npc_list` VALUES ('16846970', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '17'); INSERT INTO `npc_list` VALUES ('16846971', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '17'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16850970', '1', '0', '120.000', '-1.000', '-280.000', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004A0400000000000000000000000000000000, '2', '18'); INSERT INTO `npc_list` VALUES ('16851091', '2', '0', '-80.000', '-1.000', '-80.000', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004A0400000000000000000000000000000000, '2', '18'); INSERT INTO `npc_list` VALUES ('16851098', '3', '0', '-80.000', '-1.000', '80.000', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004A0400000000000000000000000000000000, '2', '18'); @@ -884,6 +973,11 @@ INSERT INTO `npc_list` VALUES ('16851292', 'qm5', '49', '-159.523', '-0.898', '216.957', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '18'); INSERT INTO `npc_list` VALUES ('16851293', 'qm6', '211', '240.876', '-1.798', '-5.066', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '18'); INSERT INTO `npc_list` VALUES ('16851294', '18', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0100000100100020003000400050006000700000, '32', '18'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16855061', 'Enigmatic_Sphere', '0', '-239.999', '-59.750', '0.000', '6', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '19'); INSERT INTO `npc_list` VALUES ('16855067', 'Enigmatic_Sphere', '0', '0.000', '0.250', '0.000', '6', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '19'); INSERT INTO `npc_list` VALUES ('16855073', 'Enigmatic_Sphere', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '19'); @@ -920,6 +1014,11 @@ INSERT INTO `npc_list` VALUES ('16855175', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '19'); INSERT INTO `npc_list` VALUES ('16855176', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '19'); INSERT INTO `npc_list` VALUES ('16855177', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '19'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16859150', '1', '0', '-279.998', '-1.000', '239.998', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004B0400000000000000000000000000000000, '2', '20'); INSERT INTO `npc_list` VALUES ('16859197', '2', '0', '-80.000', '-1.000', '-40.000', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004B0400000000000000000000000000000000, '2', '20'); INSERT INTO `npc_list` VALUES ('16859204', '3', '0', '-320.000', '-1.000', '-360.000', '7', '40', '40', '2', '0', '16', '6', '2179', 0x00004B0400000000000000000000000000000000, '2', '20'); @@ -960,6 +1059,11 @@ INSERT INTO `npc_list` VALUES ('16859477', 'qm5', '131', '255.440', '-0.820', '-99.890', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '20'); INSERT INTO `npc_list` VALUES ('16859478', 'qm6', '242', '106.626', '-1.798', '242.890', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '20'); INSERT INTO `npc_list` VALUES ('16859479', '18', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0100000100100020003000400050006000700000, '32', '20'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16863240', 'EnigmaticSpher', '0', '-240.058', '60.250', '0.000', '6', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '21'); INSERT INTO `npc_list` VALUES ('16863245', 'EnigmaticSpher', '0', '0.000', '0.250', '0.001', '7', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '21'); INSERT INTO `npc_list` VALUES ('16863250', 'EnigmaticSpher', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '21'); @@ -993,6 +1097,11 @@ INSERT INTO `npc_list` VALUES ('16863341', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '21'); INSERT INTO `npc_list` VALUES ('16863342', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '21'); INSERT INTO `npc_list` VALUES ('16863343', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '21'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16867381', '1', '0', '-40.000', '-1.000', '-360.000', '7', '40', '40', '2', '0', '16', '6', '2179', 0x00004C0400000000000000000000000000000000, '2', '22'); INSERT INTO `npc_list` VALUES ('16867386', '2', '0', '80.000', '-1.000', '-40.000', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004C0400000000000000000000000000000000, '2', '22'); INSERT INTO `npc_list` VALUES ('16867428', '3', '0', '-160.000', '-1.000', '200.000', '7', '40', '40', '0', '0', '16', '0', '2179', 0x00004C0400000000000000000000000000000000, '2', '22'); @@ -1049,6 +1158,11 @@ INSERT INTO `npc_list` VALUES ('16867733', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '22'); INSERT INTO `npc_list` VALUES ('16867734', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '22'); INSERT INTO `npc_list` VALUES ('16867735', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '22'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16871455', 'Enigmatic_Sphere', '0', '-240.005', '60.250', '-0.001', '7', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '23'); INSERT INTO `npc_list` VALUES ('16871465', 'Enigmatic_Sphere', '0', '0.000', '0.250', '0.001', '6', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '23'); INSERT INTO `npc_list` VALUES ('16871475', 'Enigmatic_Sphere', '0', '240.000', '-59.750', '0.000', '7', '40', '40', '0', '8', '32', '6', '1667', 0x00002A0100000000000000000000000000000000, '0', '23'); @@ -1081,6 +1195,11 @@ INSERT INTO `npc_list` VALUES ('16871607', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '23'); INSERT INTO `npc_list` VALUES ('16871608', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '23'); INSERT INTO `npc_list` VALUES ('16871609', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '23'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16875791', 'qm8', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000320000000000000000000000000000000000, '0', '24'); INSERT INTO `npc_list` VALUES ('16875792', 'qm7', '125', '-210.470', '-16.165', '288.909', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '24'); INSERT INTO `npc_list` VALUES ('16875805', 'Swirling_Vortex', '0', '0.000', '0.000', '0.000', '32768', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '24'); @@ -1147,6 +1266,11 @@ INSERT INTO `npc_list` VALUES ('16875867', '21', '0', '0.000', '0.000', '0.000', '32768', '40', '40', '0', '0', '0', '6', '27', 0x0000D10200000000000000000000000000000000, '32', '24'); INSERT INTO `npc_list` VALUES ('16875868', '22', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000D70300000000000000000000000000000000, '32', '24'); INSERT INTO `npc_list` VALUES ('16875869', 'Mildaurion', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000A10500000000000000000000000000000000, '32', '24'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16879912', 'qm8', '194', '-164.084', '-32.656', '-318.712', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '25'); INSERT INTO `npc_list` VALUES ('16879913', 'qm7', '0', '253.000', '-16.000', '411.500', '1', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '25'); INSERT INTO `npc_list` VALUES ('16879914', 'qm6', '0', '207.000', '-16.000', '479.000', '1', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '25'); @@ -1206,6 +1330,11 @@ INSERT INTO `npc_list` VALUES ('16879973', '16', '223', '-526.572', '-30.755', '358.165', '1', '40', '40', '0', '0', '0', '2', '2051', 0x0000320000000000000000000000000000000000, '0', '25'); INSERT INTO `npc_list` VALUES ('16879974', 'Prishe', '0', '0.000', '0.000', '0.000', '0', '40', '54', '0', '0', '0', '6', '27', 0x0000A60500000000000000000000000000000000, '32', '25'); INSERT INTO `npc_list` VALUES ('16879975', 'Ulmia', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000C00500000000000000000000000000000000, '32', '25'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16883714', 'Latteaune', '239', '-16.426', '-27.889', '109.626', '8', '40', '40', '34', '0', '0', '0', '27', 0x0000CD0300000000000000000000000000000000, '32', '26'); INSERT INTO `npc_list` VALUES ('16883715', 'Ulmia', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '27', 0x0000C00500000000000000000000000000000000, '32', '26'); INSERT INTO `npc_list` VALUES ('16883716', 'Prishe', '0', '0.000', '0.000', '0.000', '0', '40', '54', '0', '0', '0', '6', '27', 0x0000A60500000000000000000000000000000000, '32', '26'); @@ -1369,6 +1498,11 @@ INSERT INTO `npc_list` VALUES ('16883875', 'Synergy_Furnace', '128', '-95.000', '-27.500', '-52.000', '1', '40', '40', '0', '5', '68', '2', '155', 0x00002C0900000000000000000000000000000000, '32', '26'); INSERT INTO `npc_list` VALUES ('16883876', 'Synergy_Furnace', '0', '69.000', '-25.500', '3.000', '1', '40', '40', '0', '5', '68', '2', '155', 0x00002C0900000000000000000000000000000000, '32', '26'); INSERT INTO `npc_list` VALUES ('16883877', 'Synergy_Furnace', '0', '69.000', '-25.500', '-3.000', '1', '40', '40', '0', '5', '68', '2', '155', 0x00002C0900000000000000000000000000000000, '32', '26'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16888038', '_0r0', '0', '-140.000', '-25.500', '71.213', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '27'); INSERT INTO `npc_list` VALUES ('16888039', '_0r1', '0', '-140.000', '-25.500', '49.000', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '27'); INSERT INTO `npc_list` VALUES ('16888040', '_0r2', '0', '-78.650', '-25.500', '100.000', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '27'); @@ -1449,6 +1583,11 @@ INSERT INTO `npc_list` VALUES ('16888116', 'qm10', '145', '113.474', '-26.000', '91.610', '32775', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '27'); INSERT INTO `npc_list` VALUES ('16888117', 'Fardimant', '251', '-239.023', '-5.999', '18.975', '0', '40', '40', '0', '0', '0', '6', '25', 0x01000D0300106B208130814081509E6000700000, '32', '27'); INSERT INTO `npc_list` VALUES ('16888118', 'Enaremand', '130', '-222.902', '-5.999', '18.784', '0', '40', '40', '0', '1', '0', '6', '27', 0x010009037D101720003017401750006000700000, '32', '27'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16892097', 'Stale_Draft', '128', '33.000', '-2.000', '116.000', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '28'); INSERT INTO `npc_list` VALUES ('16892098', 'Stale_Draft', '128', '73.000', '-2.000', '116.000', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '28'); INSERT INTO `npc_list` VALUES ('16892099', 'Stale_Draft', '128', '113.000', '-2.000', '116.000', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '28'); @@ -1525,6 +1664,11 @@ INSERT INTO `npc_list` VALUES ('16892175', 'Goblin_Footprint', '220', '-222.727', '-12.000', '57.520', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '28'); INSERT INTO `npc_list` VALUES ('16892176', 'Treasure_Chest', '192', '179.709', '-7.693', '-97.007', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000C00300000000000000000000000000000000, '0', '28'); INSERT INTO `npc_list` VALUES ('16892177', 'qm9', '43', '11.720', '-3.999', '-99.957', '32775', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '28'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16896156', 'Bahamut', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000C10500000000000000000000000000000000, '32', '29'); INSERT INTO `npc_list` VALUES ('16896175', 'qm1', '0', '309.500', '-1.500', '-706.500', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '29'); INSERT INTO `npc_list` VALUES ('16896180', 'Spatial_Displacement', '0', '734.590', '-3.180', '-703.590', '32769', '40', '40', '0', '0', '0', '0', '3', 0x0000320000000000000000000000000000000000, '0', '29'); @@ -1586,6 +1730,11 @@ INSERT INTO `npc_list` VALUES ('16896239', '44444444', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000630200000000000000000000000000000000, '32', '29'); INSERT INTO `npc_list` VALUES ('16896240', '55555555', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x00000F0300000000000000000000000000000000, '32', '29'); INSERT INTO `npc_list` VALUES ('16896241', '66666666', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x00000F0300000000000000000000000000000000, '32', '29'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16900325', 'qm1', '0', '581.000', '-1.000', '426.000', '6', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '30'); INSERT INTO `npc_list` VALUES ('16900326', 'qm2', '0', '162.000', '1.000', '466.000', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '30'); INSERT INTO `npc_list` VALUES ('16900331', 'Spatial_Displacement', '0', '654.910', '-3.180', '583.140', '32769', '40', '40', '0', '0', '0', '0', '3', 0x0000320000000000000000000000000000000000, '0', '30'); @@ -1646,6 +1795,11 @@ INSERT INTO `npc_list` VALUES ('16900389', 'Novice_Moogle', '79', '163.734', '96.448', '-873.649', '0', '40', '40', '0', '1', '0', '6', '25', 0x0000520000000000000000000000000000000000, '32', '30'); INSERT INTO `npc_list` VALUES ('16900390', 'qm5', '66', '-737.297', '-44.000', '-301.489', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100060113101320133013401250006000700000, '32', '30'); INSERT INTO `npc_list` VALUES ('16900391', 'Albanus', '149', '-727.502', '-43.601', '-305.725', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100070100101320133013401250006000700000, '32', '30'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16904224', 'Armoury_Crate', '0', '-598.874', '81.900', '1.030', '7', '40', '40', '0', '8', '0', '6', '1155', 0x0000C00300000000000000000000000000000000, '0', '31'); INSERT INTO `npc_list` VALUES ('16904226', 'Armoury_Crate', '0', '1.082', '1.900', '1.048', '7', '40', '40', '0', '8', '0', '6', '1155', 0x0000C00300000000000000000000000000000000, '0', '31'); INSERT INTO `npc_list` VALUES ('16904228', 'Armoury_Crate', '0', '601.122', '-78.099', '1.047', '7', '40', '40', '0', '8', '0', '6', '1155', 0x0000C00300000000000000000000000000000000, '0', '31'); @@ -1709,6 +1863,11 @@ INSERT INTO `npc_list` VALUES ('16904337', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '31'); INSERT INTO `npc_list` VALUES ('16904338', 'Ramblix', '210', '-5.344', '-0.042', '-550.998', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '31'); INSERT INTO `npc_list` VALUES ('16904339', 'Goblin_Footprint', '210', '-5.344', '-0.042', '-550.998', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '31'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16908326', '_0w0', '0', '612.000', '130.895', '770.033', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '32'); INSERT INTO `npc_list` VALUES ('16908327', 'Airship_Door', '0', '-780.000', '-103.347', '-90.288', '32769', '40', '40', '0', '0', '0', '0', '3', 0x0000320000000000000000000000000000000000, '0', '32'); INSERT INTO `npc_list` VALUES ('16908328', 'Airship_Door', '0', '-140.000', '-23.347', '-450.274', '32769', '40', '40', '0', '0', '0', '0', '3', 0x0000320000000000000000000000000000000000, '0', '32'); @@ -1759,6 +1918,11 @@ INSERT INTO `npc_list` VALUES ('16908379', 'Ulmia', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000C00500000000000000000000000000000000, '32', '32'); INSERT INTO `npc_list` VALUES ('16908380', '9', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '32'); INSERT INTO `npc_list` VALUES ('16908381', '10', '209', '611.056', '132.650', '777.564', '1', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '32'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16912884', 'qm1', '0', '-693.430', '-1.696', '-62.040', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '33'); INSERT INTO `npc_list` VALUES ('16912885', 'qm2', '0', '-278.387', '0.000', '-463.111', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '33'); INSERT INTO `npc_list` VALUES ('16912886', 'qm3', '0', '706.881', '-1.037', '22.059', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '33'); @@ -1859,6 +2023,11 @@ INSERT INTO `npc_list` VALUES ('16912986', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '33'); INSERT INTO `npc_list` VALUES ('16912987', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '33'); INSERT INTO `npc_list` VALUES ('16912988', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '33'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16916819', 'qm1', '128', '460.000', '0.000', '540.000', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '34'); INSERT INTO `npc_list` VALUES ('16916824', '_iya', '0', '-20.000', '-2.250', '-280.187', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '34'); INSERT INTO `npc_list` VALUES ('16916825', '_iyb', '0', '5.000', '-1.450', '-320.000', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '34'); @@ -1968,6 +2137,11 @@ INSERT INTO `npc_list` VALUES ('16916930', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '34'); INSERT INTO `npc_list` VALUES ('16916931', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '34'); INSERT INTO `npc_list` VALUES ('16916932', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '34'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16921027', 'qm1', '64', '-420.000', '0.000', '755.000', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '35'); INSERT INTO `npc_list` VALUES ('16921028', 'qm2', '224', '-560.000', '5.000', '239.000', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '35'); INSERT INTO `npc_list` VALUES ('16921029', 'qm3', '64', '-260.000', '0.000', '-645.000', '6', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '35'); @@ -2065,6 +2239,11 @@ INSERT INTO `npc_list` VALUES ('16921128', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '35'); INSERT INTO `npc_list` VALUES ('16921129', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '35'); INSERT INTO `npc_list` VALUES ('16921130', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '35'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16924691', 'Transcendental', '0', '540.042', '-1.181', '-597.685', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '36'); INSERT INTO `npc_list` VALUES ('16924692', 'Transcendental', '53', '-519.800', '-119.999', '488.765', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '36'); INSERT INTO `npc_list` VALUES ('16924693', 'Transcendental', '195', '520.026', '0.000', '488.427', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '36'); @@ -2111,11 +2290,45 @@ INSERT INTO `npc_list` VALUES ('16924740', '3', '189', '-520.478', '-120.000', '497.779', '1', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '36'); INSERT INTO `npc_list` VALUES ('16924741', 'Altana', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000320000000000000000000000000000000000, '0', '36'); INSERT INTO `npc_list` VALUES ('16924742', 'qm2', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000320000000000000000000000000000000000, '0', '36'); + +-- ------------------------------------------------------------ +-- Temenos (37) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Apollyon (38) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Dynamis-Valkurm (39) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16937396', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '39'); INSERT INTO `npc_list` VALUES ('16937397', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '39'); INSERT INTO `npc_list` VALUES ('16937398', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '39'); INSERT INTO `npc_list` VALUES ('16937399', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '39'); INSERT INTO `npc_list` VALUES ('16937400', 'qm1', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '39'); + +-- ------------------------------------------------------------ +-- Dynamis-Buburimu (40) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Dynamis-Qufim (41) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Dynamis-Tavnazia (42) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Diorama Abdhaljs-Ghelsba (43) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Abdhaljs Isle-Purgonorgo (44) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16957441', 'Flammen-Brenner', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '0', 0x0000000000000000000000000000000000000000, '0', '44'); INSERT INTO `npc_list` VALUES ('16957442', 'Flammen-Brenner', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '0', 0x0000000000000000000000000000000000000000, '0', '44'); INSERT INTO `npc_list` VALUES ('16957443', 'Flammen-Brenner', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '0', 0x0000000000000000000000000000000000000000, '0', '44'); @@ -2140,6 +2353,11 @@ INSERT INTO `npc_list` VALUES ('16957468', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '44'); INSERT INTO `npc_list` VALUES ('16957469', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '44'); INSERT INTO `npc_list` VALUES ('16957470', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '44'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16961899', 'Sturdy_Pyxis', '0', '-122.059', '24.050', '447.471', '8', '40', '40', '0', '12', '100', '2', '4739', 0x00000B0100000000000000000000000000000000, '0', '45'); INSERT INTO `npc_list` VALUES ('16961900', 'Sturdy_Pyxis', '0', '112.787', '39.543', '402.083', '10', '40', '40', '0', '12', '100', '2', '4739', 0x00000B0100000000000000000000000000000000, '0', '45'); INSERT INTO `npc_list` VALUES ('16961901', 'Sturdy_Pyxis', '0', '-136.748', '2.186', '42.346', '8', '40', '40', '0', '12', '100', '2', '4739', 0x00000B0100000000000000000000000000000000, '0', '45'); @@ -2337,6 +2555,11 @@ INSERT INTO `npc_list` VALUES ('16962165', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '45'); INSERT INTO `npc_list` VALUES ('16962166', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '45'); INSERT INTO `npc_list` VALUES ('16962167', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '45'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16965656', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '46'); INSERT INTO `npc_list` VALUES ('16965657', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '46'); INSERT INTO `npc_list` VALUES ('16965658', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '46'); @@ -2350,6 +2573,11 @@ INSERT INTO `npc_list` VALUES ('16965668', '_1a4', '0', '-5.172', '-3.650', '-5.599', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '46'); INSERT INTO `npc_list` VALUES ('16965669', '_1a5', '0', '0.324', '-3.650', '12.425', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '46'); INSERT INTO `npc_list` VALUES ('16965670', 'Cehn_Teyohngo', '180', '4.986', '-2.101', '-12.026', '6', '40', '40', '0', '1', '0', '0', '27', 0x01000C077710872000301F401550006000700000, '32', '46'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16969752', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '47'); INSERT INTO `npc_list` VALUES ('16969753', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '47'); INSERT INTO `npc_list` VALUES ('16969754', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '47'); @@ -2363,6 +2591,11 @@ INSERT INTO `npc_list` VALUES ('16969764', '_1b4', '0', '-5.172', '-3.650', '-5.599', '32769', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '47'); INSERT INTO `npc_list` VALUES ('16969765', '_1b5', '0', '0.324', '-3.650', '12.425', '1', '40', '40', '9', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '47'); INSERT INTO `npc_list` VALUES ('16969766', 'Pashi_Maccaleh', '153', '4.986', '-2.101', '-12.026', '7', '40', '40', '0', '1', '0', '0', '27', 0x01000C077710872000301F401550006000700000, '32', '47'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16973900', 'Gulool_Ja_Ja', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000470700000000000000000000000000000000, '32', '48'); INSERT INTO `npc_list` VALUES ('16974102', 'Medusa', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000490700000000000000000000000000000000, '32', '48'); INSERT INTO `npc_list` VALUES ('16974127', '_1c0', '0', '-61.168', '-2.000', '40.000', '1', '40', '40', '8', '0', '0', '0', '6147', 0x0200000000000000000000000000000000000000, '0', '48'); @@ -2469,6 +2702,19 @@ INSERT INTO `npc_list` VALUES ('16974363', 'Banjanu', '69', '-75.954', '1.999', '105.367', '7', '40', '40', '0', '0', '0', '0', '27', 0x01000001AE10AB20AB30AB40AB505D6100700000, '32', '48'); INSERT INTO `npc_list` VALUES ('16974364', 'Bjibar', '3', '-105.178', '1.999', '60.115', '1', '40', '40', '0', '0', '0', '0', '27', 0x01000101AE10AB20AB30AB40AB505D6100700000, '32', '48'); INSERT INTO `npc_list` VALUES ('16974365', 'Dahaeel', '193', '-58.732', '-5.999', '68.096', '20', '40', '40', '0', '0', '0', '0', '27', 0x01000401AE10AB20AB30AB40AB505D6100700000, '32', '48'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- GM Test Area (49) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('16982021', '1', '0', '0.000', '0.000', '0.000', '1', '40', '40', '0', '0', '0', '2', '2051', 0x0000320000000000000000000000000000000000, '0', '50'); INSERT INTO `npc_list` VALUES ('16982023', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '50'); INSERT INTO `npc_list` VALUES ('16982024', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '50'); @@ -4290,15 +4536,21 @@ INSERT INTO `npc_list` VALUES ('17097354', 'Kalgahn', '128', '5.472', '0.000', '50.104', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000401A510A520AB30A540AB50776100700000, '0', '78'); INSERT INTO `npc_list` VALUES ('17097355', '3', '0', '-5.640', '0.000', '47.078', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000302A510A520AB30A540AB50776100700000, '0', '78'); INSERT INTO `npc_list` VALUES ('17097356', '4', '128', '5.604', '0.000', '47.149', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000502A510A520AB30A540AB50776100700000, '0', '78'); +INSERT INTO `npc_list` VALUES ('17101171', 'Zikko', '170', '-631.318', '10.877', '-184.477', '219', '64', '64', '0', '4', '0', '2', '157', 0x0000BE0600000000000000000000000000000000, '32', '79'); +INSERT INTO `npc_list` VALUES ('17101199', 'NPC[18f]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000320000000000000000000000000000000000, '0', '79'); +INSERT INTO `npc_list` VALUES ('17101237', 'NPC[190]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000320000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101238', 'PeculiarPlant', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101239', 'Warhorse_Hoofprint', '0', '420.568', '-19.807', '-85.785', '7', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101240', 'Peculiar_Plant', '0', '397.899', '-8.557', '0.000', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101241', 'Peculiar_Plant', '0', '389.040', '-17.686', '0.000', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000340000000000000000000000000000000000, '0', '79'); +INSERT INTO `npc_list` VALUES ('17101242', 'NPC[195]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000320000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101243', 'qm1', '0', '417.795', '-19.631', '-74.338', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101244', 'qm2', '0', '-771.466', '-11.750', '322.087', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101245', 'qm3', '0', '697.491', '-7.000', '526.015', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101246', 'qm4', '0', '-756.499', '-12.413', '632.740', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); +INSERT INTO `npc_list` VALUES ('17101249', 'NPC[19b]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '1', 0x0000320000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101251', '5', '0', '0.000', '0.000', '0.000', '1', '40', '40', '0', '0', '0', '2', '2051', 0x0000320000000000000000000000000000000000, '0', '79'); +INSERT INTO `npc_list` VALUES ('17101252', 'NPC[19e]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '3', 0x0000320000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101253', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101254', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101255', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '79'); @@ -4321,6 +4573,7 @@ INSERT INTO `npc_list` VALUES ('17101272', 'Kwadaaf', '128', '-639.000', '13.323', '-260.000', '24', '40', '40', '0', '0', '0', '0', '27', 0x01000204A510A520AB30A540AB50776100700000, '32', '79'); INSERT INTO `npc_list` VALUES ('17101273', '_27a', '0', '763.466', '-9.515', '638.219', '1', '40', '40', '8', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101274', '_27b', '0', '-719.309', '-13.529', '765.549', '1', '40', '40', '8', '0', '0', '0', '4099', 0x0200000000000000000000000000000000000000, '0', '79'); +INSERT INTO `npc_list` VALUES ('17101275', 'NPC[1b5]', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '0', '2051', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101276', 'qm5', '143', '-389.084', '6.343', '-597.228', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); INSERT INTO `npc_list` VALUES ('17101277', 'Ramblix', '72', '40.329', '5.324', '-697.070', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '79'); INSERT INTO `npc_list` VALUES ('17101278', 'Goblin_Footprint', '72', '40.329', '5.324', '-697.070', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '79'); @@ -4378,6 +4631,19 @@ INSERT INTO `npc_list` VALUES ('17101332', 'lamia2', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '5', '4', '6', '25', 0x0600C60600000000000000000000000000000000, '32', '79'); INSERT INTO `npc_list` VALUES ('17101333', 'Basweema', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x06007A0600000000000000000000000000000000, '32', '79'); INSERT INTO `npc_list` VALUES ('17101334', 'usa', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000340000000000000000000000000000000000, '0', '79'); + +-- ------------------------------------------------------------ +-- Southern San d'Oria [S] (80) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- East Ronfaure [S] (81) +-- ------------------------------------------------------------ + +-- ------------------------------------------------------------ +-- Jugner Forest [S] (82) +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('17113511', 'Leonoyne', '32', '-500.000', '-500.000', '-500.000', '0', '40', '40', '0', '0', '24', '6', '2203', 0x010002033A103A203A303A403A50976100700080, '0', '82'); INSERT INTO `npc_list` VALUES ('17113551', 'Laisavie_X_Berlends', '32', '72.086', '0.000', '-31.885', '7', '40', '40', '0', '0', '0', '0', '539', 0x0100050400102F201A301A401A50666100702380, '0', '82'); INSERT INTO `npc_list` VALUES ('17113599', 'Royal_Provisioner', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '16', '2', '3', 0x0000F40800000000000000000000000000000000, '0', '82'); @@ -6998,6 +7264,10 @@ INSERT INTO `npc_list` VALUES ('17257057', 'Ayame', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100030211100920093009400950906000700000, '32', '117'); INSERT INTO `npc_list` VALUES ('17257058', 'Wolfgang', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '1', '0', '6', '27', 0x0100020114101920193019401950006000700000, '32', '117'); INSERT INTO `npc_list` VALUES ('17257059', 'Chapi_Galepilai', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000307141019200C3002400250056000700000, '32', '117'); +INSERT INTO `npc_list` VALUES ('17257060', 'no_name_5', '0', '0', '0', '0', '0', '40', '80', '0', '0', '0', '6', '27', 0x0000580000000000000000000000000000000000, '32', '117'); +INSERT INTO `npc_list` VALUES ('17257061', 'no_name_6', '0', '0', '0', '0', '0', '40', '80', '0', '0', '0', '6', '27', 0x0000560000000000000000000000000000000000, '32', '117'); +INSERT INTO `npc_list` VALUES ('17257062', 'no_name_7', '0', '0', '0', '0', '0', '40', '80', '0', '0', '0', '6', '27', 0x0000570000000000000000000000000000000000, '32', '117'); +INSERT INTO `npc_list` VALUES ('17257063', 'no_name_8', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '25', 0x0000570000000000000000000000000000000000, '32', '117'); INSERT INTO `npc_list` VALUES ('17257064', 'Ramblix', '51', '-78.872', '46.809', '-729.319', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000550000000000000000000000000000000000, '32', '117'); INSERT INTO `npc_list` VALUES ('17257065', 'Goblin_Footprint', '51', '-78.872', '46.809', '-729.319', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '117'); INSERT INTO `npc_list` VALUES ('17257066', 'Cavernous_Maw', '192', '-28.000', '46.000', '-685.000', '32769', '40', '40', '0', '0', '96', '2', '3', 0x0000150900000000000000000000000000000000, '2', '117'); @@ -8293,6 +8563,11 @@ INSERT INTO `npc_list` VALUES ('17335151', 'Allied_Commissary', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100000500100020003000400050006000700000, '0', '136'); INSERT INTO `npc_list` VALUES ('17335158', 'Watchful_Pixie', '96', '-56.000', '-0.300', '-392.000', '6', '40', '40', '0', '8', '0', '0', '515', 0x0000EE0700000000000000000000000000000000, '0', '136'); INSERT INTO `npc_list` VALUES ('17335159', 'Jubilant_Pixie', '32', '-52.000', '-0.700', '-392.000', '1', '40', '40', '0', '8', '8', '2', '2563', 0x0000EE0700000000000000000000000000000000, '0', '136'); + +-- ------------------------------------------------------------ +-- +-- ------------------------------------------------------------ + INSERT INTO `npc_list` VALUES ('17338968', 'qm1', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '137'); INSERT INTO `npc_list` VALUES ('17338969', 'qm2', '0', '0.000', '0.000', '0.000', '1', '40', '40', '0', '0', '0', '0', '3', 0x0000340000000000000000000000000000000000, '0', '137'); INSERT INTO `npc_list` VALUES ('17338978', 'Adder_Coffer', '0', '138.000', '-22.500', '-114.000', '1', '40', '40', '0', '4', '12', '2', '2051', 0x0000C50300000000000000000000000000000000, '0', '137'); @@ -10113,12 +10388,19 @@ INSERT INTO `npc_list` VALUES ('17531171', 'Auchefort', '40', '9.165', '2.000', '46.928', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000603141019200C3002400250056000700000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531172', 'Chapi_Galepilai', '36', '-2.500', '2.000', '27.225', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000307141019200C3002400250056000700000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531173', 'Crooked_Arrow', '227', '-34.900', '2.999', '-10.877', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000B08141019200C3002400250056000700000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531174', 'no_name_3', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000F0200101220123008400850006000700000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531175', 'no_name_4', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000F0100101220123008400850006000700000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531176', 'no_name_5', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000F0400101220123008400850006000700000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531177', 'no_name_6', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000F0700101220123008400850006000700000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531178', 'qm6', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531179', 'no_name_7', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000F0800101220123008400850006000700000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531180', 'qm1', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531181', 'qm2', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531182', 'qm3', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531183', 'qm4', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531184', 'qm5', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531185', 'qm6', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000530000000000000000000000000000000000, '32', '184'); +INSERT INTO `npc_list` VALUES ('17531186', 'no_name_8', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000A70500000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531187', 'Bahamut', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000C10500000000000000000000000000000000, '32', '184'); INSERT INTO `npc_list` VALUES ('17531189', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '184'); INSERT INTO `npc_list` VALUES ('17531190', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '4194307', 0x0000520000000000000000000000000000000000, '0', '184'); @@ -13637,6 +13919,7 @@ INSERT INTO `npc_list` VALUES ('17756173', 'Keo-Koruo', '59', '2.740', '-16.250', '125.313', '14', '40', '40', '0', '1', '0', '0', '27', 0x0100020500100220023002400250006000700000, '32', '239'); INSERT INTO `npc_list` VALUES ('17756174', 'Chawo_Shipeynyo', '161', '3.593', '-16.000', '124.069', '8', '40', '40', '0', '0', '0', '0', '27', 0x0000FB0000000000000000000000000000000000, '32', '239'); INSERT INTO `npc_list` VALUES ('17756175', '_6n2', '0', '-26.000', '-14.498', '262.994', '1', '40', '40', '9', '0', '0', '0', '3', 0x0200000000000000000000000000000000000000, '0', '239'); +INSERT INTO `npc_list` VALUES ('17756176', 'no_name_0', '82', '-24.851', '-13', '260.499', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000320000000000000000000000000000000000, '0', '239'); INSERT INTO `npc_list` VALUES ('17756177', 'Ajido-Marujido', '209', '-33.762', '-13.000', '283.239', '0', '40', '40', '0', '0', '0', '6', '27', 0x00004A0000000000000000000000000000000000, '32', '239'); INSERT INTO `npc_list` VALUES ('17756178', 'Kohlo-Lakolo', '247', '-29.499', '-7.997', '189.254', '0', '40', '21', '0', '0', '0', '6', '27', 0x0000A70000000000000000000000000000000000, '32', '239'); INSERT INTO `npc_list` VALUES ('17756179', 'Papo-Hopo', '7', '-28.390', '-7.000', '191.528', '0', '40', '21', '0', '0', '0', '6', '27', 0x0000A60000000000000000000000000000000000, '32', '239'); @@ -14488,10 +14771,15 @@ INSERT INTO `npc_list` VALUES ('17772751', 'Nasshawan', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '25', 0x01000B01A510A520AB30A540AB50776100700000, '32', '243'); INSERT INTO `npc_list` VALUES ('17772753', 'Bataumnalle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000B0300100D200D300D400D50C1601B700000, '32', '243'); INSERT INTO `npc_list` VALUES ('17772756', 'Razfahd', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '29', 0x0000350600000000000000000000000000000000, '32', '243'); +INSERT INTO `npc_list` VALUES ('17772758', 'Parike-Poranke', '0', '0.000', '0.000', '0.000', '7', '40', '40', '0', '0', '0', '6', '27', 0x010004050A100A200A300A400A50006000700000, '32', '243'); +INSERT INTO `npc_list` VALUES ('17772759', 'Magian_Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000650900000000000000000000000000000000, '0', '243'); +INSERT INTO `npc_list` VALUES ('17772762', 'Atori-Tutori', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0100020500101120003000400050006000700000, '32', '243'); +INSERT INTO `npc_list` VALUES ('17772765', 'Magian_Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '3', 0x0000650900000000000000000000000000000000, '0', '243'); INSERT INTO `npc_list` VALUES ('17772766', 'Ajahkeem', '64', '-33.150', '0.002', '-59.202', '7', '40', '40', '0', '0', '0', '0', '27', 0x01000B0187108720873087408750006000700000, '32', '243'); INSERT INTO `npc_list` VALUES ('17772767', 'Explorer_Moogle', '0', '1.000', '0.000', '0.000', '1', '40', '40', '0', '0', '0', '2', '3', 0x0000D50300000000000000000000000000000000, '0', '243'); INSERT INTO `npc_list` VALUES ('17772768', 'Explorer_Moogle', '125', '-5.687', '8.999', '-41.341', '6', '40', '40', '0', '0', '0', '2', '3', 0x0000D50300000000000000000000000000000000, '0', '243'); INSERT INTO `npc_list` VALUES ('17772769', 'Hunt_Registry', '208', '54.500', '10.000', '-67.500', '1', '40', '40', '0', '8', '96', '2', '3', 0x0000280900000000000000000000000000000000, '0', '243'); +INSERT INTO `npc_list` VALUES ('17772773', 'Magian_Moogle', '77', '5.000', '2.453', '121.000', '0', '40', '40', '0', '0', '0', '0', '3', 0x0000650900000000000000000000000000000000, '0', '243'); INSERT INTO `npc_list` VALUES ('17776641', 'Monberaux', '146', '-42.381', '-0.499', '-1.913', '14', '40', '40', '0', '2', '0', '0', '27', 0x0000260300000000000000000000000000000000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776642', 'Rosaline', '173', '-43.009', '-0.499', '-3.405', '8', '40', '40', '0', '1', '0', '0', '27', 0x01000C020010172000300B400850006000700000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776643', 'Souren', '206', '-53.202', '-0.499', '4.442', '1', '40', '40', '0', '0', '0', '0', '27', 0x0000990000000000000000000000000000000000, '32', '244'); @@ -14548,6 +14836,7 @@ INSERT INTO `npc_list` VALUES ('17776694', 'Palarillont', '59', '-10.012', '1.999', '55.782', '8', '40', '40', '0', '1', '0', '0', '27', 0x01000B0300100220063005400550006000700000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776695', 'Guslam', '203', '-4.232', '1.299', '49.746', '1', '40', '40', '0', '1', '0', '0', '27', 0x0100090800101120163011400250006000700000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776696', 'Deadly_Minnow', '168', '-1.501', '1.299', '36.031', '6', '40', '40', '0', '1', '0', '0', '27', 0x0100030800100F200F300E400E50006000700000, '32', '244'); +INSERT INTO `npc_list` VALUES ('17776697', 'no_name_0', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000A70500000000000000000000000000000000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776698', 'Nag_molada', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x0000AC0500000000000000000000000000000000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776699', 'Pherimociel', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000D03141019200C3002400250056000700000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776700', 'Neraf-Najiruf', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000F05141019200C3002400250056000700000, '32', '244'); @@ -14667,6 +14956,7 @@ INSERT INTO `npc_list` VALUES ('17776839', 'Nalta', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '3', '0', '6', '27', 0x0000CD0000000000000000000000000000000000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776840', 'Nalta', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000E0400100820083000400950006000700000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776841', 'Laila', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '6', '27', 0x01000202001082200030D340D350006000700000, '32', '244'); +INSERT INTO `npc_list` VALUES ('17776845', 'no_name_28', '0', '0', '0', '0', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '244'); INSERT INTO `npc_list` VALUES ('17776848', 'Mhao_Kehtsoruho', '106', '-73.032', '0.000', '146.919', '1', '40', '40', '34', '0', '0', '0', '27', 0x00002A0300000000000000000000000000000000, '32', '244'); INSERT INTO `npc_list` VALUES ('17776854', 'Moogle', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2051', 0x0000340000000000000000000000000000000000, '0', '244'); INSERT INTO `npc_list` VALUES ('17776855', 'Shantotto', '0', '0.000', '0.000', '0.000', '0', '40', '40', '0', '0', '0', '2', '2075', 0x0100060600101320133013401350006000700000, '32', '244'); Index: sql/zone_settings.sql =================================================================== --- sql/zone_settings.sql (revision 2121) +++ sql/zone_settings.sql (working copy) @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Serveur: localhost --- Généré le : Mer 25 Janvier 2012 à 23:10 +-- Gnr le : Mer 25 Janvier 2012 23:10 -- Version du serveur: 6.0.0 -- Version de PHP: 5.2.9-2 @@ -16,7 +16,7 @@ /*!40101 SET NAMES utf8 */; -- --- Base de données: `dspdb` +-- Base de donnes: `dspdb` -- -- -------------------------------------------------------- @@ -28,7 +28,8 @@ DROP TABLE IF EXISTS `zone_settings`; CREATE TABLE IF NOT EXISTS `zone_settings` ( `zoneid` tinyint(3) unsigned NOT NULL DEFAULT '0', - `zoneip` int(10) unsigned zerofill NOT NULL DEFAULT '0000000000', + `lanip` int(10) unsigned zerofill NOT NULL DEFAULT '0000000000', + `wanip` int(10) unsigned zerofill NOT NULL DEFAULT '0000000000', `zoneport` smallint(5) unsigned NOT NULL DEFAULT '0', `name` tinytext NOT NULL, `music` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -40,263 +41,259 @@ PRIMARY KEY (`zoneid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=20 PACK_KEYS=1 CHECKSUM=1 ROW_FORMAT=DYNAMIC; --- --- Contenu de la table `zone_settings` --- - -INSERT INTO `zone_settings` VALUES (0, 0016777343, 54230, 'Residential_Area', 0, 0, 0, 0, 0.00, 32); -INSERT INTO `zone_settings` VALUES (1, 0016777343, 54230, 'Phanauet_Channel', 229, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (2, 0016777343, 54230, 'Carpenters_Landing', 0, 218, 219, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (3, 0016777343, 54230, 'Manaclipper', 229, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (4, 0016777343, 54230, 'Bibiki_Bay', 0, 218, 219, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (5, 0016777343, 54230, 'Uleguerand_Range', 0, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (6, 0016777343, 54230, 'Bearclaw_Pinnacle', 220, 220, 220, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (7, 0016777343, 54230, 'Attohwa_Chasm', 0, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (8, 0016777343, 54230, 'Boneyard_Gully', 0, 220, 220, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (9, 0016777343, 54230, 'PsoXja', 225, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (10, 0016777343, 54230, 'The_Shrouded_Maw', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (11, 0016777343, 54230, 'Oldton_Movalpolos', 221, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (12, 0016777343, 54230, 'Newton_Movalpolos', 221, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (13, 0016777343, 54230, 'Mine_Shaft_2716', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (14, 0016777343, 54230, 'Hall_of_Transference', 0, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (15, 0016777343, 54230, 'Abyssea-Konschtat', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (16, 0016777343, 54230, 'Promyvion-Holla', 222, 218, 219, 30, 0.00, 145); -INSERT INTO `zone_settings` VALUES (17, 0016777343, 54230, 'Spire_of_Holla', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (18, 0016777343, 54230, 'Promyvion-Dem', 222, 218, 219, 30, 0.00, 145); -INSERT INTO `zone_settings` VALUES (19, 0016777343, 54230, 'Spire_of_Dem', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (20, 0016777343, 54230, 'Promyvion-Mea', 222, 218, 219, 30, 0.00, 145); -INSERT INTO `zone_settings` VALUES (21, 0016777343, 54230, 'Spire_of_Mea', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (22, 0016777343, 54230, 'Promyvion-Vahzl', 222, 218, 219, 50, 0.00, 145); -INSERT INTO `zone_settings` VALUES (23, 0016777343, 54230, 'Spire_of_Vahzl', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (24, 0016777343, 54230, 'Lufaise_Meadows', 230, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (25, 0016777343, 54230, 'Misareaux_Coast', 230, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (26, 0016777343, 54230, 'Tavnazian_Safehold', 245, 218, 219, 0, 0.00, 104); -INSERT INTO `zone_settings` VALUES (27, 0016777343, 54230, 'Phomiuna_Aqueducts', 0, 218, 219, 40, 0.00, 145); -INSERT INTO `zone_settings` VALUES (28, 0016777343, 54230, 'Sacrarium', 0, 218, 219, 50, 0.00, 145); -INSERT INTO `zone_settings` VALUES (29, 0016777343, 54230, 'Riverne-Site_B01', 0, 218, 219, 50, 0.00, 153); -INSERT INTO `zone_settings` VALUES (30, 0016777343, 54230, 'Riverne-Site_A01', 0, 218, 219, 40, 0.00, 153); -INSERT INTO `zone_settings` VALUES (31, 0016777343, 54230, 'Monarch_Linn', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (32, 0016777343, 54230, 'Sealions_Den', 0, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (33, 0016777343, 54230, 'AlTaieu', 233, 218, 219, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (34, 0016777343, 54230, 'Grand_Palace_of_HuXzoi', 228, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (35, 0016777343, 54230, 'The_Garden_of_RuHmet', 228, 218, 219, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (36, 0016777343, 54230, 'Empyreal_Paradox', 0, 220, 220, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (37, 0016777343, 54230, 'Temenos', 0, 218, 219, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (38, 0016777343, 54230, 'Apollyon', 0, 218, 219, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (39, 0016777343, 54230, 'Dynamis-Valkurm', 121, 218, 219, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (40, 0016777343, 54230, 'Dynamis-Buburimu', 121, 218, 219, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (41, 0016777343, 54230, 'Dynamis-Qufim', 121, 218, 219, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (42, 0016777343, 54230, 'Dynamis-Tavnazia', 121, 218, 219, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (43, 0016777343, 54230, 'Diorama_Abdhaljs-Ghelsba', 0, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (44, 0016777343, 54230, 'Abdhaljs_Isle-Purgonorgo', 0, 218, 219, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (45, 0016777343, 54230, 'Abyssea-Tahrongi', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (46, 0016777343, 54230, 'Open_sea_route_to_Al_Zahbi', 147, 139, 139, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (47, 0016777343, 54230, 'Open_sea_route_to_Mhaura', 147, 139, 139, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (48, 0016777343, 54230, 'Al_Zahbi', 178, 139, 139, 0, 0.00, 24); -INSERT INTO `zone_settings` VALUES (49, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (50, 0016777343, 54230, 'Aht_Urhgan_Whitegate', 178, 139, 139, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (51, 0016777343, 54230, 'Wajaom_Woodlands', 149, 139, 139, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (52, 0016777343, 54230, 'Bhaflau_Thickets', 149, 139, 139, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (53, 0016777343, 54230, 'Nashmau', 175, 139, 139, 0, 0.00, 40); -INSERT INTO `zone_settings` VALUES (54, 0016777343, 54230, 'Arrapago_Reef', 150, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (55, 0016777343, 54230, 'Ilrusi_Atoll', 0, 138, 138, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (56, 0016777343, 54230, 'Periqia', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (57, 0016777343, 54230, 'Talacca_Cove', 0, 143, 143, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (58, 0016777343, 54230, 'Silver_Sea_route_to_Nashmau', 147, 139, 139, 0, 0.00, 16); -INSERT INTO `zone_settings` VALUES (59, 0016777343, 54230, 'Silver_Sea_route_to_Al_Zahbi', 147, 139, 139, 0, 0.00, 16); -INSERT INTO `zone_settings` VALUES (60, 0016777343, 54230, 'The_Ashu_Talif', 172, 143, 143, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (61, 0016777343, 54230, 'Mount_Zhayolm', 0, 139, 139, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (62, 0016777343, 54230, 'Halvung', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (63, 0016777343, 54230, 'Lebros_Cavern', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (64, 0016777343, 54230, 'Navukgo_Execution_Chamber', 0, 143, 143, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (65, 0016777343, 54230, 'Mamook', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (66, 0016777343, 54230, 'Mamool_Ja_Training_Grounds', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (67, 0016777343, 54230, 'Jade_Sepulcher', 0, 143, 143, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (68, 0016777343, 54230, 'Aydeewa_Subterrane', 174, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (69, 0016777343, 54230, 'Leujaoam_Sanctum', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (70, 0016777343, 54230, 'Chocobo_Circuit', 176, 139, 139, 0, 0.00, 4); -INSERT INTO `zone_settings` VALUES (71, 0016777343, 54230, 'The_Colosseum', 0, 139, 139, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (72, 0016777343, 54230, 'Alzadaal_Undersea_Ruins', 0, 138, 138, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (73, 0016777343, 54230, 'Zhayolm_Remnants', 148, 138, 138, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (74, 0016777343, 54230, 'Arrapago_Remnants', 148, 138, 138, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (75, 0016777343, 54230, 'Bhaflau_Remnants', 148, 138, 138, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (76, 0016777343, 54230, 'Silver_Sea_Remnants', 148, 138, 138, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (77, 0016777343, 54230, 'Nyzul_Isle', 148, 138, 138, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (78, 0016777343, 54230, 'Hazhalm_Testing_Grounds', 0, 143, 143, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (79, 0016777343, 54230, 'Caedarva_Mire', 173, 139, 139, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (80, 0016777343, 54230, 'Southern_San_dOria_[S]', 254, 215, 215, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (81, 0016777343, 54230, 'East_Ronfaure_[S]', 251, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (82, 0016777343, 54230, 'Jugner_Forest_[S]', 0, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (83, 0016777343, 54230, 'Vunkerl_Inlet_[S]', 0, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (84, 0016777343, 54230, 'Batallia_Downs_[S]', 252, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (85, 0016777343, 54230, 'La_Vaule_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (86, 0016777343, 54230, 'Everbloom_Hollow', 0, 216, 216, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (87, 0016777343, 54230, 'Bastok_Markets_[S]', 180, 215, 215, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (88, 0016777343, 54230, 'North_Gustaberg_[S]', 253, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (89, 0016777343, 54230, 'Grauberg_[S]', 0, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (90, 0016777343, 54230, 'Pashhow_Marshlands_[S]', 0, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (91, 0016777343, 54230, 'Rolanberry_Fields_[S]', 252, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (92, 0016777343, 54230, 'Beadeaux_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (93, 0016777343, 54230, 'Ruhotz_Silvermines', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (94, 0016777343, 54230, 'Windurst_Waters_[S]', 182, 215, 215, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (95, 0016777343, 54230, 'West_Sarutabaruta_[S]', 141, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (96, 0016777343, 54230, 'Fort_Karugo-Narugo_[S]', 0, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (97, 0016777343, 54230, 'Meriphataud_Mountains_[S]', 0, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (98, 0016777343, 54230, 'Sauromugue_Champaign_[S]', 252, 215, 215, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (99, 0016777343, 54230, 'Castle_Oztroja_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (100, 0016777343, 54230, 'West_Ronfaure', 109, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (101, 0016777343, 54230, 'East_Ronfaure', 109, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (102, 0016777343, 54230, 'La_Theine_Plateau', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (103, 0016777343, 54230, 'Valkurm_Dunes', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (104, 0016777343, 54230, 'Jugner_Forest', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (105, 0016777343, 54230, 'Batallia_Downs', 114, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (106, 0016777343, 54230, 'North_Gustaberg', 116, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (107, 0016777343, 54230, 'South_Gustaberg', 116, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (108, 0016777343, 54230, 'Konschtat_Highlands', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (109, 0016777343, 54230, 'Pashhow_Marshlands', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (110, 0016777343, 54230, 'Rolanberry_Fields', 118, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (111, 0016777343, 54230, 'Beaucedine_Glacier', 0, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (112, 0016777343, 54230, 'Xarcabard', 164, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (113, 0016777343, 54230, 'Cape_Teriggan', 0, 191, 191, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (114, 0016777343, 54230, 'Eastern_Altepa_Desert', 171, 191, 191, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (115, 0016777343, 54230, 'West_Sarutabaruta', 113, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (116, 0016777343, 54230, 'East_Sarutabaruta', 113, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (117, 0016777343, 54230, 'Tahrongi_Canyon', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (118, 0016777343, 54230, 'Buburimu_Peninsula', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (119, 0016777343, 54230, 'Meriphataud_Mountains', 0, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (120, 0016777343, 54230, 'Sauromugue_Champaign', 158, 101, 103, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (121, 0016777343, 54230, 'The_Sanctuary_of_ZiTah', 190, 191, 191, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (122, 0016777343, 54230, 'RoMaeve', 211, 191, 191, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (123, 0016777343, 54230, 'Yuhtunga_Jungle', 134, 191, 191, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (124, 0016777343, 54230, 'Yhoator_Jungle', 134, 191, 191, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (125, 0016777343, 54230, 'Western_Altepa_Desert', 171, 191, 191, 0, 0.00, 156); -INSERT INTO `zone_settings` VALUES (126, 0016777343, 54230, 'Qufim_Island', 0, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (127, 0016777343, 54230, 'Behemoths_Dominion', 0, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (128, 0016777343, 54230, 'Valley_of_Sorrows', 0, 191, 191, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (129, 0016777343, 54230, 'Ghoyus_Reverie', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (130, 0016777343, 54230, 'RuAun_Gardens', 210, 191, 191, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (131, 0016777343, 54230, 'Mordion_Gaol', 0, 101, 103, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (132, 0016777343, 54230, 'Abyssea-La_Theine', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (133, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (134, 0016777343, 54230, 'Dynamis-Beaucedine', 121, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (135, 0016777343, 54230, 'Dynamis-Xarcabard', 119, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (136, 0016777343, 54230, 'Beaucedine_Glacier_[S]', 0, 215, 215, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (137, 0016777343, 54230, 'Xarcabard_[S]', 0, 215, 215, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (138, 0016777343, 54230, 'Castle_Zvahl_Baileys_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (139, 0016777343, 54230, 'Horlais_Peak', 0, 125, 125, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (140, 0016777343, 54230, 'Ghelsba_Outpost', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (141, 0016777343, 54230, 'Fort_Ghelsba', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (142, 0016777343, 54230, 'Yughott_Grotto', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (143, 0016777343, 54230, 'Palborough_Mines', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (144, 0016777343, 54230, 'Waughroon_Shrine', 125, 125, 125, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (145, 0016777343, 54230, 'Giddeus', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (146, 0016777343, 54230, 'Balgas_Dais', 0, 125, 125, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (147, 0016777343, 54230, 'Beadeaux', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (148, 0016777343, 54230, 'Qulun_Dome', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (149, 0016777343, 54230, 'Davoi', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (150, 0016777343, 54230, 'Monastic_Cavern', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (151, 0016777343, 54230, 'Castle_Oztroja', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (152, 0016777343, 54230, 'Altar_Room', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (153, 0016777343, 54230, 'The_Boyahda_Tree', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (154, 0016777343, 54230, 'Dragons_Aery', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (155, 0016777343, 54230, 'Castle_Zvahl_Keep_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (156, 0016777343, 54230, 'Throne_Room_[S]', 0, 217, 217, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (157, 0016777343, 54230, 'Middle_Delkfutts_Tower', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (158, 0016777343, 54230, 'Upper_Delkfutts_Tower', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (159, 0016777343, 54230, 'Temple_of_Uggalepih', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (160, 0016777343, 54230, 'Den_of_Rancor', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (161, 0016777343, 54230, 'Castle_Zvahl_Baileys', 155, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (162, 0016777343, 54230, 'Castle_Zvahl_Keep', 155, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (163, 0016777343, 54230, 'Sacrificial_Chamber', 193, 193, 193, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (164, 0016777343, 54230, 'Garlaige_Citadel_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (165, 0016777343, 54230, 'Throne_Room', 0, 125, 125, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (166, 0016777343, 54230, 'Ranguemont_Pass', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (167, 0016777343, 54230, 'Bostaunieux_Oubliette', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (168, 0016777343, 54230, 'Chamber_of_Oracles', 193, 193, 193, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (169, 0016777343, 54230, 'Toraimarai_Canal', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (170, 0016777343, 54230, 'Full_Moon_Fountain', 193, 193, 193, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (171, 0016777343, 54230, 'Crawlers_Nest_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (172, 0016777343, 54230, 'Zeruhn_Mines', 0, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (173, 0016777343, 54230, 'Korroloka_Tunnel', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (174, 0016777343, 54230, 'Kuftal_Tunnel', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (175, 0016777343, 54230, 'The_Eldieme_Necropolis_[S]', 0, 216, 216, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (176, 0016777343, 54230, 'Sea_Serpent_Grotto', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (177, 0016777343, 54230, 'VeLugannon_Palace', 207, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (178, 0016777343, 54230, 'The_Shrine_of_RuAvitau', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (179, 0016777343, 54230, 'Stellar_Fulcrum', 193, 193, 193, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (180, 0016777343, 54230, 'LaLoff_Amphitheater', 0, 193, 193, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (181, 0016777343, 54230, 'The_Celestial_Nexus', 0, 193, 193, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (182, 0016777343, 54230, 'Walk_of_Echoes', 0, 215, 215, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (183, 0016777343, 54230, 'Maquette_Abdhaljs_Legion', 0, 143, 143, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (184, 0016777343, 54230, 'Lower_Delkfutts_Tower', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (185, 0016777343, 54230, 'Dynamis-San_dOria', 121, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (186, 0016777343, 54230, 'Dynamis-Bastok', 121, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (187, 0016777343, 54230, 'Dynamis-Windurst', 121, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (188, 0016777343, 54230, 'Dynamis-Jeuno', 121, 115, 102, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (189, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (190, 0016777343, 54230, 'King_Ranperres_Tomb', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (191, 0016777343, 54230, 'Dangruf_Wadi', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (192, 0016777343, 54230, 'Inner_Horutoto_Ruins', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (193, 0016777343, 54230, 'Ordelles_Caves', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (194, 0016777343, 54230, 'Outer_Horutoto_Ruins', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (195, 0016777343, 54230, 'The_Eldieme_Necropolis', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (196, 0016777343, 54230, 'Gusgen_Mines', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (197, 0016777343, 54230, 'Crawlers_Nest', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (198, 0016777343, 54230, 'Maze_of_Shakhrami', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (199, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (200, 0016777343, 54230, 'Garlaige_Citadel', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (201, 0016777343, 54230, 'Cloister_of_Gales', 193, 193, 193, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (202, 0016777343, 54230, 'Cloister_of_Storms', 193, 193, 193, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (203, 0016777343, 54230, 'Cloister_of_Frost', 193, 193, 193, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (204, 0016777343, 54230, 'FeiYin', 0, 115, 102, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (205, 0016777343, 54230, 'Ifrits_Cauldron', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (206, 0016777343, 54230, 'QuBia_Arena', 125, 125, 125, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (207, 0016777343, 54230, 'Cloister_of_Flames', 193, 193, 193, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (208, 0016777343, 54230, 'Quicksand_Caves', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (209, 0016777343, 54230, 'Cloister_of_Tremors', 193, 193, 193, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (210, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (211, 0016777343, 54230, 'Cloister_of_Tides', 193, 193, 193, 0, 0.00, 144); -INSERT INTO `zone_settings` VALUES (212, 0016777343, 54230, 'Gustav_Tunnel', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (213, 0016777343, 54230, 'Labyrinth_of_Onzozo', 0, 192, 192, 0, 0.00, 145); -INSERT INTO `zone_settings` VALUES (214, 0016777343, 54230, 'Residential_Area', 0, 0, 0, 0, 0.00, 32); -INSERT INTO `zone_settings` VALUES (215, 0016777343, 54230, 'Abyssea-Attohwa', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (216, 0016777343, 54230, 'Abyssea-Misareaux', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (217, 0016777343, 54230, 'Abyssea-Vunkerl', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (218, 0016777343, 54230, 'Abyssea-Altepa', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (219, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (220, 0016777343, 54230, 'Ship_bound_for_Selbina', 106, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (221, 0016777343, 54230, 'Ship_bound_for_Mhaura', 106, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (222, 0016777343, 54230, 'Provenance', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (223, 0016777343, 54230, 'San_dOria-Jeuno_Airship', 128, 101, 103, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (224, 0016777343, 54230, 'Bastok-Jeuno_Airship', 128, 101, 103, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (225, 0016777343, 54230, 'Windurst-Jeuno_Airship', 128, 101, 103, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (226, 0016777343, 54230, 'Kazham-Jeuno_Airship', 128, 191, 191, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (227, 0016777343, 54230, 'Ship_bound_for_Selbina', 106, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (228, 0016777343, 54230, 'Ship_bound_for_Mhaura', 106, 101, 103, 0, 0.00, 152); -INSERT INTO `zone_settings` VALUES (229, 0016777343, 0, 'noname', 0, 0, 0, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (230, 0016777343, 54230, 'Southern_San_dOria', 107, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (231, 0016777343, 54230, 'Northern_San_dOria', 107, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (232, 0016777343, 54230, 'Port_San_dOria', 107, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (233, 0016777343, 54230, 'Chateau_dOraguille', 156, 101, 103, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (234, 0016777343, 54230, 'Bastok_Mines', 152, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (235, 0016777343, 54230, 'Bastok_Markets', 152, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (236, 0016777343, 54230, 'Port_Bastok', 152, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (237, 0016777343, 54230, 'Metalworks', 154, 101, 103, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (238, 0016777343, 54230, 'Windurst_Waters', 151, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (239, 0016777343, 54230, 'Windurst_Walls', 151, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (240, 0016777343, 54230, 'Port_Windurst', 151, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (241, 0016777343, 54230, 'Windurst_Woods', 151, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (242, 0016777343, 54230, 'Heavens_Tower', 162, 101, 103, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (243, 0016777343, 54230, 'RuLude_Gardens', 117, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (244, 0016777343, 54230, 'Upper_Jeuno', 110, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (245, 0016777343, 54230, 'Lower_Jeuno', 110, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (246, 0016777343, 54230, 'Port_Jeuno', 110, 101, 103, 0, 0.00, 72); -INSERT INTO `zone_settings` VALUES (247, 0016777343, 54230, 'Rabao', 208, 191, 191, 0, 0.00, 104); -INSERT INTO `zone_settings` VALUES (248, 0016777343, 54230, 'Selbina', 112, 101, 103, 0, 0.00, 40); -INSERT INTO `zone_settings` VALUES (249, 0016777343, 54230, 'Mhaura', 105, 101, 103, 0, 0.00, 40); -INSERT INTO `zone_settings` VALUES (250, 0016777343, 54230, 'Kazham', 135, 191, 191, 0, 0.00, 40); -INSERT INTO `zone_settings` VALUES (251, 0016777343, 54230, 'Hall_of_the_Gods', 213, 191, 191, 0, 0.00, 8); -INSERT INTO `zone_settings` VALUES (252, 0016777343, 54230, 'Norg', 209, 191, 191, 0, 0.00, 104); -INSERT INTO `zone_settings` VALUES (253, 0016777343, 54230, 'Abyssea-Uleguerand', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (254, 0016777343, 54230, 'Abyssea-Grauberg', 51, 52, 52, 0, 0.00, 0); -INSERT INTO `zone_settings` VALUES (255, 0016777343, 54230, 'Abyssea-Empyreal_Paradox', 51, 52, 52, 0, 0.00, 0); \ No newline at end of file +INSERT INTO `zone_settings` VALUES (0, 0016777343, 0016777343, 54230, 'Residential_Area', 0, 0, 0, 0, 0.00, 32); +INSERT INTO `zone_settings` VALUES (1, 0016777343, 0016777343, 54230, 'Phanauet_Channel', 229, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (2, 0016777343, 0016777343, 54230, 'Carpenters_Landing', 0, 218, 219, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (3, 0016777343, 0016777343, 54230, 'Manaclipper', 229, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (4, 0016777343, 0016777343, 54230, 'Bibiki_Bay', 0, 218, 219, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (5, 0016777343, 0016777343, 54230, 'Uleguerand_Range', 0, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (6, 0016777343, 0016777343, 54230, 'Bearclaw_Pinnacle', 220, 220, 220, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (7, 0016777343, 0016777343, 54230, 'Attohwa_Chasm', 0, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (8, 0016777343, 0016777343, 54230, 'Boneyard_Gully', 0, 220, 220, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (9, 0016777343, 0016777343, 54230, 'PsoXja', 225, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (10, 0016777343, 0016777343, 54230, 'The_Shrouded_Maw', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (11, 0016777343, 0016777343, 54230, 'Oldton_Movalpolos', 221, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (12, 0016777343, 0016777343, 54230, 'Newton_Movalpolos', 221, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (13, 0016777343, 0016777343, 54230, 'Mine_Shaft_2716', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (14, 0016777343, 0016777343, 54230, 'Hall_of_Transference', 0, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (15, 0016777343, 0016777343, 54230, 'Abyssea-Konschtat', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (16, 0016777343, 0016777343, 54230, 'Promyvion-Holla', 222, 218, 219, 30, 0.00, 145); +INSERT INTO `zone_settings` VALUES (17, 0016777343, 0016777343, 54230, 'Spire_of_Holla', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (18, 0016777343, 0016777343, 54230, 'Promyvion-Dem', 222, 218, 219, 30, 0.00, 145); +INSERT INTO `zone_settings` VALUES (19, 0016777343, 0016777343, 54230, 'Spire_of_Dem', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (20, 0016777343, 0016777343, 54230, 'Promyvion-Mea', 222, 218, 219, 30, 0.00, 145); +INSERT INTO `zone_settings` VALUES (21, 0016777343, 0016777343, 54230, 'Spire_of_Mea', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (22, 0016777343, 0016777343, 54230, 'Promyvion-Vahzl', 222, 218, 219, 50, 0.00, 145); +INSERT INTO `zone_settings` VALUES (23, 0016777343, 0016777343, 54230, 'Spire_of_Vahzl', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (24, 0016777343, 0016777343, 54230, 'Lufaise_Meadows', 230, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (25, 0016777343, 0016777343, 54230, 'Misareaux_Coast', 230, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (26, 0016777343, 0016777343, 54230, 'Tavnazian_Safehold', 245, 218, 219, 0, 0.00, 104); +INSERT INTO `zone_settings` VALUES (27, 0016777343, 0016777343, 54230, 'Phomiuna_Aqueducts', 0, 218, 219, 40, 0.00, 145); +INSERT INTO `zone_settings` VALUES (28, 0016777343, 0016777343, 54230, 'Sacrarium', 0, 218, 219, 50, 0.00, 145); +INSERT INTO `zone_settings` VALUES (29, 0016777343, 0016777343, 54230, 'Riverne-Site_B01', 0, 218, 219, 50, 0.00, 153); +INSERT INTO `zone_settings` VALUES (30, 0016777343, 0016777343, 54230, 'Riverne-Site_A01', 0, 218, 219, 40, 0.00, 153); +INSERT INTO `zone_settings` VALUES (31, 0016777343, 0016777343, 54230, 'Monarch_Linn', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (32, 0016777343, 0016777343, 54230, 'Sealions_Den', 0, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (33, 0016777343, 0016777343, 54230, 'AlTaieu', 233, 218, 219, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (34, 0016777343, 0016777343, 54230, 'Grand_Palace_of_HuXzoi', 228, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (35, 0016777343, 0016777343, 54230, 'The_Garden_of_RuHmet', 228, 218, 219, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (36, 0016777343, 0016777343, 54230, 'Empyreal_Paradox', 0, 220, 220, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (37, 0016777343, 0016777343, 54230, 'Temenos', 0, 218, 219, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (38, 0016777343, 0016777343, 54230, 'Apollyon', 0, 218, 219, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (39, 0016777343, 0016777343, 54230, 'Dynamis-Valkurm', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (40, 0016777343, 0016777343, 54230, 'Dynamis-Buburimu', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (41, 0016777343, 0016777343, 54230, 'Dynamis-Qufim', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (42, 0016777343, 0016777343, 54230, 'Dynamis-Tavnazia', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (43, 0016777343, 0016777343, 54230, 'Diorama_Abdhaljs-Ghelsba', 0, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (44, 0016777343, 0016777343, 54230, 'Abdhaljs_Isle-Purgonorgo', 0, 218, 219, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (45, 0016777343, 0016777343, 54230, 'Abyssea-Tahrongi', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (46, 0016777343, 0016777343, 54230, 'Open_sea_route_to_Al_Zahbi', 147, 139, 139, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (47, 0016777343, 0016777343, 54230, 'Open_sea_route_to_Mhaura', 147, 139, 139, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (48, 0016777343, 0016777343, 54230, 'Al_Zahbi', 178, 139, 139, 0, 0.00, 24); +INSERT INTO `zone_settings` VALUES (49, 0016777343, 0016777343, 0, 'GM_Test_Area', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (50, 0016777343, 0016777343, 54230, 'Aht_Urhgan_Whitegate', 178, 139, 139, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (51, 0016777343, 0016777343, 54230, 'Wajaom_Woodlands', 149, 139, 139, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (52, 0016777343, 0016777343, 54230, 'Bhaflau_Thickets', 149, 139, 139, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (53, 0016777343, 0016777343, 54230, 'Nashmau', 175, 139, 139, 0, 0.00, 40); +INSERT INTO `zone_settings` VALUES (54, 0016777343, 0016777343, 54230, 'Arrapago_Reef', 150, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (55, 0016777343, 0016777343, 54230, 'Ilrusi_Atoll', 0, 138, 138, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (56, 0016777343, 0016777343, 54230, 'Periqia', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (57, 0016777343, 0016777343, 54230, 'Talacca_Cove', 0, 143, 143, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (58, 0016777343, 0016777343, 54230, 'Silver_Sea_route_to_Nashmau', 147, 139, 139, 0, 0.00, 16); +INSERT INTO `zone_settings` VALUES (59, 0016777343, 0016777343, 54230, 'Silver_Sea_route_to_Al_Zahbi', 147, 139, 139, 0, 0.00, 16); +INSERT INTO `zone_settings` VALUES (60, 0016777343, 0016777343, 54230, 'The_Ashu_Talif', 172, 143, 143, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (61, 0016777343, 0016777343, 54230, 'Mount_Zhayolm', 0, 139, 139, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (62, 0016777343, 0016777343, 54230, 'Halvung', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (63, 0016777343, 0016777343, 54230, 'Lebros_Cavern', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (64, 0016777343, 0016777343, 54230, 'Navukgo_Execution_Chamber', 0, 143, 143, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (65, 0016777343, 0016777343, 54230, 'Mamook', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (66, 0016777343, 0016777343, 54230, 'Mamool_Ja_Training_Grounds', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (67, 0016777343, 0016777343, 54230, 'Jade_Sepulcher', 0, 143, 143, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (68, 0016777343, 0016777343, 54230, 'Aydeewa_Subterrane', 174, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (69, 0016777343, 0016777343, 54230, 'Leujaoam_Sanctum', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (70, 0016777343, 0016777343, 54230, 'Chocobo_Circuit', 176, 139, 139, 0, 0.00, 4); +INSERT INTO `zone_settings` VALUES (71, 0016777343, 0016777343, 54230, 'The_Colosseum', 0, 139, 139, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (72, 0016777343, 0016777343, 54230, 'Alzadaal_Undersea_Ruins', 0, 138, 138, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (73, 0016777343, 0016777343, 54230, 'Zhayolm_Remnants', 148, 138, 138, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (74, 0016777343, 0016777343, 54230, 'Arrapago_Remnants', 148, 138, 138, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (75, 0016777343, 0016777343, 54230, 'Bhaflau_Remnants', 148, 138, 138, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (76, 0016777343, 0016777343, 54230, 'Silver_Sea_Remnants', 148, 138, 138, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (77, 0016777343, 0016777343, 54230, 'Nyzul_Isle', 148, 138, 138, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (78, 0016777343, 0016777343, 54230, 'Hazhalm_Testing_Grounds', 0, 143, 143, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (79, 0016777343, 0016777343, 54230, 'Caedarva_Mire', 173, 139, 139, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (80, 0016777343, 0016777343, 54230, 'Southern_San_dOria_[S]', 254, 215, 215, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (81, 0016777343, 0016777343, 54230, 'East_Ronfaure_[S]', 251, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (82, 0016777343, 0016777343, 54230, 'Jugner_Forest_[S]', 0, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (83, 0016777343, 0016777343, 54230, 'Vunkerl_Inlet_[S]', 0, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (84, 0016777343, 0016777343, 54230, 'Batallia_Downs_[S]', 252, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (85, 0016777343, 0016777343, 54230, 'La_Vaule_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (86, 0016777343, 0016777343, 54230, 'Everbloom_Hollow', 0, 216, 216, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (87, 0016777343, 0016777343, 54230, 'Bastok_Markets_[S]', 180, 215, 215, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (88, 0016777343, 0016777343, 54230, 'North_Gustaberg_[S]', 253, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (89, 0016777343, 0016777343, 54230, 'Grauberg_[S]', 0, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (90, 0016777343, 0016777343, 54230, 'Pashhow_Marshlands_[S]', 0, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (91, 0016777343, 0016777343, 54230, 'Rolanberry_Fields_[S]', 252, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (92, 0016777343, 0016777343, 54230, 'Beadeaux_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (93, 0016777343, 0016777343, 54230, 'Ruhotz_Silvermines', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (94, 0016777343, 0016777343, 54230, 'Windurst_Waters_[S]', 182, 215, 215, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (95, 0016777343, 0016777343, 54230, 'West_Sarutabaruta_[S]', 141, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (96, 0016777343, 0016777343, 54230, 'Fort_Karugo-Narugo_[S]', 0, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (97, 0016777343, 0016777343, 54230, 'Meriphataud_Mountains_[S]', 0, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (98, 0016777343, 0016777343, 54230, 'Sauromugue_Champaign_[S]', 252, 215, 215, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (99, 0016777343, 0016777343, 54230, 'Castle_Oztroja_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (100, 0016777343, 0016777343, 54230, 'West_Ronfaure', 109, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (101, 0016777343, 0016777343, 54230, 'East_Ronfaure', 109, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (102, 0016777343, 0016777343, 54230, 'La_Theine_Plateau', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (103, 0016777343, 0016777343, 54230, 'Valkurm_Dunes', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (104, 0016777343, 0016777343, 54230, 'Jugner_Forest', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (105, 0016777343, 0016777343, 54230, 'Batallia_Downs', 114, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (106, 0016777343, 0016777343, 54230, 'North_Gustaberg', 116, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (107, 0016777343, 0016777343, 54230, 'South_Gustaberg', 116, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (108, 0016777343, 0016777343, 54230, 'Konschtat_Highlands', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (109, 0016777343, 0016777343, 54230, 'Pashhow_Marshlands', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (110, 0016777343, 0016777343, 54230, 'Rolanberry_Fields', 118, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (111, 0016777343, 0016777343, 54230, 'Beaucedine_Glacier', 0, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (112, 0016777343, 0016777343, 54230, 'Xarcabard', 164, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (113, 0016777343, 0016777343, 54230, 'Cape_Teriggan', 0, 191, 191, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (114, 0016777343, 0016777343, 54230, 'Eastern_Altepa_Desert', 171, 191, 191, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (115, 0016777343, 0016777343, 54230, 'West_Sarutabaruta', 113, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (116, 0016777343, 0016777343, 54230, 'East_Sarutabaruta', 113, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (117, 0016777343, 0016777343, 54230, 'Tahrongi_Canyon', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (118, 0016777343, 0016777343, 54230, 'Buburimu_Peninsula', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (119, 0016777343, 0016777343, 54230, 'Meriphataud_Mountains', 0, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (120, 0016777343, 0016777343, 54230, 'Sauromugue_Champaign', 158, 101, 103, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (121, 0016777343, 0016777343, 54230, 'The_Sanctuary_of_ZiTah', 190, 191, 191, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (122, 0016777343, 0016777343, 54230, 'RoMaeve', 211, 191, 191, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (123, 0016777343, 0016777343, 54230, 'Yuhtunga_Jungle', 134, 191, 191, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (124, 0016777343, 0016777343, 54230, 'Yhoator_Jungle', 134, 191, 191, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (125, 0016777343, 0016777343, 54230, 'Western_Altepa_Desert', 171, 191, 191, 0, 0.00, 156); +INSERT INTO `zone_settings` VALUES (126, 0016777343, 0016777343, 54230, 'Qufim_Island', 0, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (127, 0016777343, 0016777343, 54230, 'Behemoths_Dominion', 0, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (128, 0016777343, 0016777343, 54230, 'Valley_of_Sorrows', 0, 191, 191, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (129, 0016777343, 0016777343, 54230, 'Ghoyus_Reverie', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (130, 0016777343, 0016777343, 54230, 'RuAun_Gardens', 210, 191, 191, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (131, 0016777343, 0016777343, 54230, 'Mordion_Gaol', 0, 101, 103, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (132, 0016777343, 0016777343, 54230, 'Abyssea-La_Theine', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (133, 0016777343, 0016777343, 0, 'Intro_Screen', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (134, 0016777343, 0016777343, 54230, 'Dynamis-Beaucedine', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (135, 0016777343, 0016777343, 54230, 'Dynamis-Xarcabard', 119, 119, 119, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (136, 0016777343, 0016777343, 54230, 'Beaucedine_Glacier_[S]', 0, 215, 215, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (137, 0016777343, 0016777343, 54230, 'Xarcabard_[S]', 0, 215, 215, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (138, 0016777343, 0016777343, 54230, 'Castle_Zvahl_Baileys_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (139, 0016777343, 0016777343, 54230, 'Horlais_Peak', 0, 125, 125, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (140, 0016777343, 0016777343, 54230, 'Ghelsba_Outpost', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (141, 0016777343, 0016777343, 54230, 'Fort_Ghelsba', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (142, 0016777343, 0016777343, 54230, 'Yughott_Grotto', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (143, 0016777343, 0016777343, 54230, 'Palborough_Mines', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (144, 0016777343, 0016777343, 54230, 'Waughroon_Shrine', 125, 125, 125, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (145, 0016777343, 0016777343, 54230, 'Giddeus', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (146, 0016777343, 0016777343, 54230, 'Balgas_Dais', 0, 125, 125, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (147, 0016777343, 0016777343, 54230, 'Beadeaux', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (148, 0016777343, 0016777343, 54230, 'Qulun_Dome', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (149, 0016777343, 0016777343, 54230, 'Davoi', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (150, 0016777343, 0016777343, 54230, 'Monastic_Cavern', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (151, 0016777343, 0016777343, 54230, 'Castle_Oztroja', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (152, 0016777343, 0016777343, 54230, 'Altar_Room', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (153, 0016777343, 0016777343, 54230, 'The_Boyahda_Tree', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (154, 0016777343, 0016777343, 54230, 'Dragons_Aery', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (155, 0016777343, 0016777343, 54230, 'Castle_Zvahl_Keep_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (156, 0016777343, 0016777343, 54230, 'Throne_Room_[S]', 0, 217, 217, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (157, 0016777343, 0016777343, 54230, 'Middle_Delkfutts_Tower', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (158, 0016777343, 0016777343, 54230, 'Upper_Delkfutts_Tower', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (159, 0016777343, 0016777343, 54230, 'Temple_of_Uggalepih', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (160, 0016777343, 0016777343, 54230, 'Den_of_Rancor', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (161, 0016777343, 0016777343, 54230, 'Castle_Zvahl_Baileys', 155, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (162, 0016777343, 0016777343, 54230, 'Castle_Zvahl_Keep', 155, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (163, 0016777343, 0016777343, 54230, 'Sacrificial_Chamber', 193, 193, 193, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (164, 0016777343, 0016777343, 54230, 'Garlaige_Citadel_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (165, 0016777343, 0016777343, 54230, 'Throne_Room', 0, 125, 125, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (166, 0016777343, 0016777343, 54230, 'Ranguemont_Pass', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (167, 0016777343, 0016777343, 54230, 'Bostaunieux_Oubliette', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (168, 0016777343, 0016777343, 54230, 'Chamber_of_Oracles', 193, 193, 193, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (169, 0016777343, 0016777343, 54230, 'Toraimarai_Canal', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (170, 0016777343, 0016777343, 54230, 'Full_Moon_Fountain', 193, 193, 193, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (171, 0016777343, 0016777343, 54230, 'Crawlers_Nest_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (172, 0016777343, 0016777343, 54230, 'Zeruhn_Mines', 0, 115, 102, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (173, 0016777343, 0016777343, 54230, 'Korroloka_Tunnel', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (174, 0016777343, 0016777343, 54230, 'Kuftal_Tunnel', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (175, 0016777343, 0016777343, 54230, 'The_Eldieme_Necropolis_[S]', 0, 216, 216, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (176, 0016777343, 0016777343, 54230, 'Sea_Serpent_Grotto', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (177, 0016777343, 0016777343, 54230, 'VeLugannon_Palace', 207, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (178, 0016777343, 0016777343, 54230, 'The_Shrine_of_RuAvitau', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (179, 0016777343, 0016777343, 54230, 'Stellar_Fulcrum', 193, 193, 193, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (180, 0016777343, 0016777343, 54230, 'LaLoff_Amphitheater', 0, 193, 193, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (181, 0016777343, 0016777343, 54230, 'The_Celestial_Nexus', 0, 193, 193, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (182, 0016777343, 0016777343, 54230, 'Walk_of_Echoes', 0, 215, 215, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (183, 0016777343, 0016777343, 54230, 'The_Last_Stand', 0, 143, 143, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (184, 0016777343, 0016777343, 54230, 'Lower_Delkfutts_Tower', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (185, 0016777343, 0016777343, 54230, 'Dynamis-San_dOria', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (186, 0016777343, 0016777343, 54230, 'Dynamis-Bastok', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (187, 0016777343, 0016777343, 54230, 'Dynamis-Windurst', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (188, 0016777343, 0016777343, 54230, 'Dynamis-Jeuno', 121, 121, 121, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (189, 0016777343, 0016777343, 0, 'Bunker_San_dOria', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (190, 0016777343, 0016777343, 54230, 'King_Ranperres_Tomb', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (191, 0016777343, 0016777343, 54230, 'Dangruf_Wadi', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (192, 0016777343, 0016777343, 54230, 'Inner_Horutoto_Ruins', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (193, 0016777343, 0016777343, 54230, 'Ordelles_Caves', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (194, 0016777343, 0016777343, 54230, 'Outer_Horutoto_Ruins', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (195, 0016777343, 0016777343, 54230, 'The_Eldieme_Necropolis', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (196, 0016777343, 0016777343, 54230, 'Gusgen_Mines', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (197, 0016777343, 0016777343, 54230, 'Crawlers_Nest', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (198, 0016777343, 0016777343, 54230, 'Maze_of_Shakhrami', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (199, 0016777343, 0016777343, 0, 'Bunker_Bastok', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (200, 0016777343, 0016777343, 54230, 'Garlaige_Citadel', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (201, 0016777343, 0016777343, 54230, 'Cloister_of_Gales', 193, 193, 193, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (202, 0016777343, 0016777343, 54230, 'Cloister_of_Storms', 193, 193, 193, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (203, 0016777343, 0016777343, 54230, 'Cloister_of_Frost', 193, 193, 193, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (204, 0016777343, 0016777343, 54230, 'FeiYin', 0, 115, 102, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (205, 0016777343, 0016777343, 54230, 'Ifrits_Cauldron', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (206, 0016777343, 0016777343, 54230, 'QuBia_Arena', 125, 125, 125, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (207, 0016777343, 0016777343, 54230, 'Cloister_of_Flames', 193, 193, 193, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (208, 0016777343, 0016777343, 54230, 'Quicksand_Caves', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (209, 0016777343, 0016777343, 54230, 'Cloister_of_Tremors', 193, 193, 193, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (210, 0016777343, 0016777343, 0, 'GM_Test_Area_2', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (211, 0016777343, 0016777343, 54230, 'Cloister_of_Tides', 193, 193, 193, 0, 0.00, 144); +INSERT INTO `zone_settings` VALUES (212, 0016777343, 0016777343, 54230, 'Gustav_Tunnel', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (213, 0016777343, 0016777343, 54230, 'Labyrinth_of_Onzozo', 0, 192, 192, 0, 0.00, 145); +INSERT INTO `zone_settings` VALUES (214, 0016777343, 0016777343, 54230, 'Residential_Area', 0, 0, 0, 0, 0.00, 32); +INSERT INTO `zone_settings` VALUES (215, 0016777343, 0016777343, 54230, 'Abyssea-Attohwa', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (216, 0016777343, 0016777343, 54230, 'Abyssea-Misareaux', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (217, 0016777343, 0016777343, 54230, 'Abyssea-Vunkerl', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (218, 0016777343, 0016777343, 54230, 'Abyssea-Altepa', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (219, 0016777343, 0016777343, 0, 'Bunker_Windurst', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (220, 0016777343, 0016777343, 54230, 'Ship_bound_for_Selbina', 106, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (221, 0016777343, 0016777343, 54230, 'Ship_bound_for_Mhaura', 106, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (222, 0016777343, 0016777343, 54230, 'Provenance', 56, 56, 56, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (223, 0016777343, 0016777343, 54230, 'San_dOria-Jeuno_Airship', 128, 101, 103, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (224, 0016777343, 0016777343, 54230, 'Bastok-Jeuno_Airship', 128, 101, 103, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (225, 0016777343, 0016777343, 54230, 'Windurst-Jeuno_Airship', 128, 101, 103, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (226, 0016777343, 0016777343, 54230, 'Kazham-Jeuno_Airship', 128, 191, 191, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (227, 0016777343, 0016777343, 54230, 'Ship_bound_for_Selbina', 106, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (228, 0016777343, 0016777343, 54230, 'Ship_bound_for_Mhaura', 106, 101, 103, 0, 0.00, 152); +INSERT INTO `zone_settings` VALUES (229, 0016777343, 0016777343, 0, 'Empty_Area', 0, 0, 0, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (230, 0016777343, 0016777343, 54230, 'Southern_San_dOria', 107, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (231, 0016777343, 0016777343, 54230, 'Northern_San_dOria', 107, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (232, 0016777343, 0016777343, 54230, 'Port_San_dOria', 107, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (233, 0016777343, 0016777343, 54230, 'Chateau_dOraguille', 156, 101, 103, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (234, 0016777343, 0016777343, 54230, 'Bastok_Mines', 152, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (235, 0016777343, 0016777343, 54230, 'Bastok_Markets', 152, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (236, 0016777343, 0016777343, 54230, 'Port_Bastok', 152, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (237, 0016777343, 0016777343, 54230, 'Metalworks', 154, 101, 103, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (238, 0016777343, 0016777343, 54230, 'Windurst_Waters', 151, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (239, 0016777343, 0016777343, 54230, 'Windurst_Walls', 151, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (240, 0016777343, 0016777343, 54230, 'Port_Windurst', 151, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (241, 0016777343, 0016777343, 54230, 'Windurst_Woods', 151, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (242, 0016777343, 0016777343, 54230, 'Heavens_Tower', 162, 101, 103, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (243, 0016777343, 0016777343, 54230, 'RuLude_Gardens', 117, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (244, 0016777343, 0016777343, 54230, 'Upper_Jeuno', 110, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (245, 0016777343, 0016777343, 54230, 'Lower_Jeuno', 110, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (246, 0016777343, 0016777343, 54230, 'Port_Jeuno', 110, 101, 103, 0, 0.00, 72); +INSERT INTO `zone_settings` VALUES (247, 0016777343, 0016777343, 54230, 'Rabao', 208, 191, 191, 0, 0.00, 104); +INSERT INTO `zone_settings` VALUES (248, 0016777343, 0016777343, 54230, 'Selbina', 112, 101, 103, 0, 0.00, 40); +INSERT INTO `zone_settings` VALUES (249, 0016777343, 0016777343, 54230, 'Mhaura', 105, 101, 103, 0, 0.00, 40); +INSERT INTO `zone_settings` VALUES (250, 0016777343, 0016777343, 54230, 'Kazham', 135, 191, 191, 0, 0.00, 40); +INSERT INTO `zone_settings` VALUES (251, 0016777343, 0016777343, 54230, 'Hall_of_the_Gods', 213, 191, 191, 0, 0.00, 8); +INSERT INTO `zone_settings` VALUES (252, 0016777343, 0016777343, 54230, 'Norg', 209, 191, 191, 0, 0.00, 104); +INSERT INTO `zone_settings` VALUES (253, 0016777343, 0016777343, 54230, 'Abyssea-Uleguerand', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (254, 0016777343, 0016777343, 54230, 'Abyssea-Grauberg', 51, 52, 52, 0, 0.00, 0); +INSERT INTO `zone_settings` VALUES (255, 0016777343, 0016777343, 54230, 'Abyssea-Empyreal_Paradox', 51, 52, 52, 0, 0.00, 0); \ No newline at end of file Index: sql/zone_weather.sql =================================================================== --- sql/zone_weather.sql (revision 2121) +++ sql/zone_weather.sql (working copy) @@ -3,7 +3,7 @@ -- http://www.phpmyadmin.net -- -- Serveur: localhost --- Généré le : Sam 01 Septembre 2012 à 17:04 +-- Gnr le : Sam 01 Septembre 2012 17:04 -- Version du serveur: 6.0.0 -- Version de PHP: 5.2.9-2 @@ -16,7 +16,7 @@ /*!40101 SET NAMES utf8 */; -- --- Base de données: `dspdb` +-- Base de donnes: `dspdb` -- -- -------------------------------------------------------- @@ -57,18 +57,18 @@ -- INSERT INTO `zone_weather` VALUES(0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(1, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(2, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(3, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 10, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(8, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(9, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(10, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(1, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(2, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(3, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(4, 0, 0, 20, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(5, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 10, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(6, 5, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 10, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(7, 0, 0, 60, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(8, 7, 0, 60, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0); +INSERT INTO `zone_weather` VALUES(10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); +INSERT INTO `zone_weather` VALUES(11, 0, 60, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(12, 11, 60, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(13, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(14, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(15, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -80,21 +80,21 @@ INSERT INTO `zone_weather` VALUES(21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(22, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(23, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(31, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(33, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(24, 26, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(25, 26, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(26, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(27, 26, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(28, 26, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(29, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(30, 29, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(31, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(32, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(33, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(34, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(35, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(36, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0); -INSERT INTO `zone_weather` VALUES(38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20); +INSERT INTO `zone_weather` VALUES(37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0); +INSERT INTO `zone_weather` VALUES(38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); @@ -102,211 +102,211 @@ INSERT INTO `zone_weather` VALUES(43, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(44, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(45, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(46, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(47, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(46, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(47, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(48, 0, 0, 60, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(49, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(50, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(51, 50, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(52, 50, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(53, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(54, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(55, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); INSERT INTO `zone_weather` VALUES(56, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(57, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20); -INSERT INTO `zone_weather` VALUES(61, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(62, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(57, 0, 40, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(58, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(59, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(60, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20); +INSERT INTO `zone_weather` VALUES(61, 0, 60, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(62, 0, 60, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(63, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(64, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(65, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(66, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(67, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(68, 0, 80, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(69, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(70, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(72, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(73, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(74, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(71, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(72, 0, 60, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(73, 0, 0, 60, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(74, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(75, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(76, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20); -INSERT INTO `zone_weather` VALUES(79, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(80, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(81, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(82, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 20, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(85, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(77, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(78, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20); +INSERT INTO `zone_weather` VALUES(79, 0, 40, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(80, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(81, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(82, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(83, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 20, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(84, 0, 0, 80, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(85, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(86, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(87, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(88, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(90, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(91, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(92, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(87, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(88, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(89, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(90, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(91, 0, 0, 40, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(92, 0, 0, 0, 60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(93, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(94, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(95, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(97, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(101, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(102, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(103, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(104, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(106, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(107, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(109, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(110, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(111, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40, 0, 0, 0, 0, 10, 2); -INSERT INTO `zone_weather` VALUES(112, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 10, 0); -INSERT INTO `zone_weather` VALUES(113, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(114, 0, 0, 0, 0, 0, 10, 5, 0, 0, 60, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(115, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(116, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(118, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(119, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(121, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(122, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(123, 0, 0, 0, 0, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(124, 0, 0, 0, 0, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(125, 0, 0, 0, 0, 0, 10, 5, 0, 0, 60, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 20, 0, 0); -INSERT INTO `zone_weather` VALUES(128, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(94, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(95, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(96, 0, 0, 60, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(97, 0, 0, 60, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(98, 0, 0, 60, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(99, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(100, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(101, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(102, 0, 0, 20, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(103, 0, 0, 60, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(104, 0, 0, 0, 60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(105, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(106, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(107, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(108, 0, 0, 0, 60, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(109, 0, 0, 0, 10, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(110, 0, 0, 60, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(111, 0, 0, 0, 10, 3, 0, 0, 0, 0, 0, 0, 0, 0, 65, 10, 0, 0, 0, 0, 10, 2); +INSERT INTO `zone_weather` VALUES(112, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 10, 0); +INSERT INTO `zone_weather` VALUES(113, 0, 0, 60, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(114, 0, 0, 15, 0, 0, 10, 5, 0, 0, 60, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(115, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(116, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(117, 0, 0, 60, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(118, 0, 0, 0, 15, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(119, 0, 0, 60, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(120, 0, 0, 40, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(121, 0, 0, 40, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(122, 0, 0, 0, 40, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(123, 0, 0, 20, 0, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(124, 0, 0, 20, 0, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(125, 0, 0, 15, 0, 0, 10, 5, 0, 0, 60, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(126, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(127, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 20, 0, 0); +INSERT INTO `zone_weather` VALUES(128, 0, 0, 60, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(129, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(130, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(131, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(130, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(131, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(132, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(133, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); -INSERT INTO `zone_weather` VALUES(136, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 40, 0, 0, 0, 0, 10, 2); -INSERT INTO `zone_weather` VALUES(137, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 10, 0); -INSERT INTO `zone_weather` VALUES(138, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(139, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(140, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(141, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(142, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(136, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 9, 0, 0, 0, 0, 10, 1); +INSERT INTO `zone_weather` VALUES(137, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 10, 0); +INSERT INTO `zone_weather` VALUES(138, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(139, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(140, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(141, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(142, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(143, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(144, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(145, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(146, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(147, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(145, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(146, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(147, 0, 0, 0, 60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(148, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(149, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(150, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(151, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(149, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(150, 0, 60, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(151, 0, 0, 60, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(152, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(153, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(154, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(157, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(159, 0, 0, 0, 0, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(160, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(161, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 10, 0); -INSERT INTO `zone_weather` VALUES(162, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(153, 0, 0, 0, 60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(154, 0, 0, 0, 60, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(155, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(156, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(157, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(158, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(159, 0, 0, 0, 0, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(160, 0, 0, 0, 0, 60, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(161, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0, 0, 0, 10, 0); +INSERT INTO `zone_weather` VALUES(162, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); INSERT INTO `zone_weather` VALUES(163, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(165, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(166, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(164, 0, 60, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(165, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0); +INSERT INTO `zone_weather` VALUES(166, 111, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(167, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(168, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(169, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(170, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(171, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(171, 0, 0, 0, 60, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(172, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(173, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(174, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(176, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(177, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(178, 0, 0, 0, 0, 0, 20, 0, 20, 0, 20, 0, 20, 0, 20, 0, 20, 0, 20, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(173, 0, 0, 0, 0, 60, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(174, 0, 0, 0, 0, 40, 20, 0, 0, 0, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(175, 0, 0, 0, 0, 60, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(176, 0, 0, 0, 0, 60, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(177, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(178, 0, 0, 4, 0, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0); INSERT INTO `zone_weather` VALUES(179, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(180, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(181, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20); +INSERT INTO `zone_weather` VALUES(182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(183, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(184, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0); INSERT INTO `zone_weather` VALUES(185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); INSERT INTO `zone_weather` VALUES(188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100); -INSERT INTO `zone_weather` VALUES(189, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(190, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(191, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(189, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(190, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(191, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(192, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(193, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(193, 0, 60, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(194, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(197, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(195, 0, 60, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(196, 0, 60, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(197, 0, 60, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(198, 0, 0, 0, 60, 0, 0, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(199, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(200, 0, 60, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); -INSERT INTO `zone_weather` VALUES(205, 0, 0, 0, 0, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(204, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, 0); +INSERT INTO `zone_weather` VALUES(205, 0, 0, 0, 20, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(206, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(207, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(208, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(208, 0, 20, 0, 0, 0, 20, 20, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(210, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(211, 0, 0, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(212, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(213, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(212, 0, 40, 0, 0, 0, 20, 0, 0, 0, 20, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(213, 0, 60, 0, 0, 0, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(214, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(215, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(216, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(217, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(218, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(219, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(220, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(221, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(220, 0, 0, 30, 30, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(221, 0, 0, 30, 30, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(222, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(223, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(224, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(225, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(226, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(227, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(228, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(227, 0, 0, 30, 30, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(228, 0, 0, 30, 30, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(229, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(230, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(231, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(232, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(230, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(231, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(232, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(233, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(234, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(235, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(236, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(237, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(238, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(239, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(240, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(241, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(234, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(235, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(236, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(237, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(238, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(239, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(240, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(241, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(242, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(243, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(244, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(245, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(246, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(247, 0, 0, 0, 0, 0, 20, 20, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(248, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(249, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `zone_weather` VALUES(250, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(243, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(244, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(245, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(246, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(247, 0, 0, 20, 0, 0, 20, 20, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(248, 103, 0, 60, 0, 0, 20, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(249, 118, 0, 0, 15, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `zone_weather` VALUES(250, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(251, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(252, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); INSERT INTO `zone_weather` VALUES(253, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); Index: src/common/utils.cpp =================================================================== --- src/common/utils.cpp (revision 2121) +++ src/common/utils.cpp (working copy) @@ -361,4 +361,37 @@ if (modifiedTarget) delete []modifiedTarget; return retVal; +} + +int wildcmp(const char *wild, const char *string) { + const char *cp = NULL, *mp = NULL; + + while ((*string) && (*wild != '*')) { + if ((*wild != *string) && (*wild != '?')) { + return 0; + } + wild++; + string++; + } + + while (*string) { + if (*wild == '*') { + if (!*++wild) { + return 1; + } + mp = wild; + cp = string+1; + } else if ((*wild == *string) || (*wild == '?')) { + wild++; + string++; + } else { + wild = mp; + string = cp++; + } + } + + while (*wild == '*') { + wild++; + } + return !*wild; } \ No newline at end of file Index: src/common/utils.h =================================================================== --- src/common/utils.h (revision 2121) +++ src/common/utils.h (working copy) @@ -51,5 +51,6 @@ uint64 unpackBitsLE(uint8* target,int32 bitOffset, uint8 lengthInBit); uint64 unpackBitsLE(uint8* target,int32 byteOffset, int32 bitOffset, uint8 lengthInBit); +int wildcmp(const char *wild, const char *string); #endif Index: src/login/lobby.cpp =================================================================== --- src/login/lobby.cpp (revision 2121) +++ src/login/lobby.cpp (working copy) @@ -257,53 +257,82 @@ uint32 charid = RBUFL(session[sd->login_lobbyview_fd]->rdata,32); - const char *fmtQuery = "SELECT zoneip, zoneport, zoneid, pos_prevzone \ + const char *fmtQuery = "SELECT lanip, wanip, zoneport, zoneid, pos_prevzone \ FROM zone_settings, chars \ WHERE zoneid = pos_zone AND charid = %u;"; - uint32 ZoneIP = sd->servip; - uint16 ZonePort = 54230; + uint32 ZoneLANIP = 0; + uint32 ZoneWANIP = 0; + uint16 ZonePort = 54230; if( Sql_Query(SqlHandle,fmtQuery,charid) != SQL_ERROR && Sql_NumRows(SqlHandle) != 0 ) { Sql_NextRow(SqlHandle); - if (Sql_GetIntData(SqlHandle,3) == 0) key3[16] += 6; + if (Sql_GetIntData(SqlHandle,4) == 0) key3[16] += 6; - ZoneIP = Sql_GetUIntData(SqlHandle,0); - ZonePort = (uint16)Sql_GetUIntData(SqlHandle,1); - uint8 ZoneID = (uint8)Sql_GetUIntData(SqlHandle,2); - WBUFL(ReservePacket,(0x38)) = ZoneIP; - WBUFW(ReservePacket,(0x3C)) = ZonePort; - ShowInfo("lobbydata_parse: zoneid:(%u),zoneip:(%s),zoneport:(%u) for char:(%u)\n",ZoneID,ip2str(ntohl(ZoneIP),NULL),ZonePort,charid); - }else{ + ZoneLANIP = Sql_GetUIntData(SqlHandle,0); + ZoneWANIP = Sql_GetUIntData(SqlHandle,1); + ZonePort = (uint16)Sql_GetUIntData(SqlHandle,2); + uint8 ZoneID = (uint8)Sql_GetUIntData(SqlHandle,3); + + if(wildcmp("192.168.0.*",ip2str(sd->client_addr,NULL))) + { + WBUFL(ReservePacket,(0x38)) = ZoneLANIP; // map-server ip + WBUFW(ReservePacket,(0x3C)) = ZonePort; // map-server port + WBUFL(ReservePacket,(0x40)) = ZoneLANIP; // search-server ip (maybe should be sd->servip) + //WBUFW(ReservePacket,(0x44)) = SearchPort; // search-server port + } + else + { + WBUFL(ReservePacket,(0x38)) = ZoneWANIP; // map-server ip + WBUFW(ReservePacket,(0x3C)) = ZonePort; // map-server port + WBUFL(ReservePacket,(0x40)) = ZoneWANIP; // search-server ip (maybe should be sd->servip) + //WBUFW(ReservePacket,(0x44)) = SearchPort; // search-server port + } + ShowInfo("lobbydata_parse: zoneid:(%u),LAN IP:(%s),WAN IP:(%s),zoneport:(%u) for char:(%u)\n",ZoneID,ip2str(ntohl(ZoneLANIP),NULL),ip2str(ntohl(ZoneWANIP),NULL),ZonePort,charid); + } + else + { ShowWarning("lobbydata_parse: zoneip:(%s) for char:(%u) is standard\n",ip2str(sd->servip,NULL),charid); WBUFL(ReservePacket,(0x38)) = sd->servip; // map-server ip - //WBUFW(ReservePacket,(0x3C)) = port; // map-server port + WBUFW(ReservePacket,(0x3C)) = ZonePort; // map-server port } - WBUFL(ReservePacket,(0x40)) = sd->servip; // search-server ip - //WBUFW(ReservePacket,(0x44)) = port; // search-server port - memcpy(MainReservePacket,ReservePacket,RBUFB(ReservePacket,0)); // необходиму одалять сессию, необработанную игровым сервером - Sql_Query(SqlHandle,"DELETE FROM accounts_sessions WHERE accid = %u and client_port = 0", sd->accid); + Sql_Query(SqlHandle,"DELETE FROM accounts_sessions WHERE accid = %u", sd->accid); int8 session_key[sizeof(key3)*2+1]; bin2hex(session_key,key3,sizeof(key3)); fmtQuery = "INSERT INTO accounts_sessions(accid,charid,session_key,server_addr,server_port,client_addr) VALUES(%u,%u,x'%s',%u,%u,%u)"; - - if( Sql_Query(SqlHandle, fmtQuery, sd->accid, charid, session_key, ZoneIP, ZonePort, sd->client_addr) == SQL_ERROR ) + + if(wildcmp(login_config.lan_ipmask,ip2str(sd->client_addr,NULL))) { - //отправляем клиенту сообщение об ошибке - LOBBBY_ERROR_MESSAGE(ReservePacket); - // устанавливаем код ошибки - // Unable to connect to world server. Specified operation failed - WBUFW(ReservePacket,32) = 305; - memcpy(MainReservePacket,ReservePacket,RBUFB(ReservePacket,0)); + if( Sql_Query(SqlHandle, fmtQuery, sd->accid, charid, session_key, ZoneLANIP, ZonePort, sd->client_addr) == SQL_ERROR ) + { + //отправляем клиенту сообщение об ошибке + LOBBBY_ERROR_MESSAGE(ReservePacket); + // устанавливаем код ошибки + // Unable to connect to world server. Specified operation failed + WBUFW(ReservePacket,32) = 305; + memcpy(MainReservePacket,ReservePacket,RBUFB(ReservePacket,0)); + } } + else + { + if( Sql_Query(SqlHandle, fmtQuery, sd->accid, charid, session_key, ZoneWANIP, ZonePort, sd->client_addr) == SQL_ERROR ) + { + //отправляем клиенту сообщение об ошибке + LOBBBY_ERROR_MESSAGE(ReservePacket); + // устанавливаем код ошибки + // Unable to connect to world server. Specified operation failed + WBUFW(ReservePacket,32) = 305; + memcpy(MainReservePacket,ReservePacket,RBUFB(ReservePacket,0)); + } + } unsigned char Hash[16]; uint8 SendBuffSize = RBUFB(MainReservePacket,0); @@ -319,12 +348,12 @@ RFIFOFLUSH(sd->login_lobbyview_fd); if (SendBuffSize == 0x24){ - // выходим в случае ошибки без разрыва соединения + // leave in case of an error without disconnection return -1; } do_close_tcp(sd->login_lobbyview_fd); - ShowStatus("lobbydata_parse: client %s finished work with " CL_GREEN"lobbyview" CL_RESET"\n",ip2str(sd->client_addr,NULL)); + ShowStatus("lobbydata_parse: client %s finished work with "CL_GREEN"lobbyview"CL_RESET"\n",ip2str(sd->client_addr,NULL)); break; } default: @@ -675,7 +704,22 @@ { Sql_NextRow(SqlHandle); - CharID = (uint32)Sql_GetUIntData(SqlHandle,0) + 1; + if(wildcmp(login_config.lan_ipmask,ip2str(loginsd->client_addr,NULL))) + { + if((uint32)Sql_GetUIntData(SqlHandle,0) > 40000) + { + CharID = (uint32)Sql_GetUIntData(SqlHandle,0) - 20000 + 1; + } + else + { + CharID = (uint32)Sql_GetUIntData(SqlHandle,0) + 1; + } + } + else + { + CharID = (uint32)Sql_GetUIntData(SqlHandle,0) + 20001; + } + } CharID = (CharID < 21828 ? 21828 : CharID); Index: src/login/login.h =================================================================== --- src/login/login.h (revision 2121) +++ src/login/login.h (working copy) @@ -56,7 +56,7 @@ uint16 mysql_port; // mysql port -> 3306 const char* mysql_login; // mysql login -> default root const char* mysql_password; // mysql pass -> default NULL - const char* mysql_database; // mysql database -> default dspdb + const char* mysql_database; // mysql database -> default ffxi }; extern login_config_t login_config; Index: src/map/ai/ai_char_normal.cpp =================================================================== --- src/map/ai/ai_char_normal.cpp (revision 2121) +++ src/map/ai/ai_char_normal.cpp (working copy) @@ -227,9 +227,9 @@ { if(IsMobOwner(m_PBattleTarget)) { - if (distance(m_PChar->loc.p, m_PBattleTarget->loc.p) <= 30) + if (distance(m_PChar->loc.p, m_PBattleTarget->loc.p) <= 30*map_config.engage_dist_mod) { - if ((m_Tick - m_LastMeleeTime) > m_PChar->m_Weapons[SLOT_MAIN]->getDelay()) + if (((m_Tick - m_LastMeleeTime) > m_PChar->m_Weapons[SLOT_MAIN]->getDelay()) || map_config.remove_engage_delay == 1) { if (m_PChar->animation == ANIMATION_CHOCOBO) { @@ -291,7 +291,7 @@ { if (IsMobOwner(PBattleTarget)) { - if (distance(m_PChar->loc.p, PBattleTarget->loc.p) <= 30) + if (distance(m_PChar->loc.p, PBattleTarget->loc.p) <= 30*map_config.engage_dist_mod) { m_LastActionTime = m_Tick; m_PBattleTarget = PBattleTarget; @@ -383,7 +383,7 @@ * * ************************************************************************/ -// TODO: нет проверки на наличие зарядов у предмета (в случае использования экипировки) +// TODO: there is no check for the charges of the object (in the case of equipment) void CAICharNormal::ActionItemStart() { @@ -726,7 +726,7 @@ m_PBattleSubTarget = NULL; return; } - if (distance(m_PChar->loc.p, m_PBattleSubTarget->loc.p) > 25) + if (distance(m_PChar->loc.p, m_PBattleSubTarget->loc.p) > 25*map_config.ranged_dist_mod) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PBattleSubTarget,0,0,78)); @@ -742,7 +742,7 @@ return; } - // TODO: скорее всего m_LastActionTime нужно выставлять лишь при ANIMATION_ATTACK, иначе использовать LastRangedTime для + // TODO: m_LastActionTime likely to exhibit only at ANIMATION_ATTACK, otherwise use for LastRangedTime m_LastActionTime = m_Tick; m_PChar->m_StartActionPos = m_PChar->loc.p; @@ -922,8 +922,8 @@ m_LastMeleeTime += (m_Tick - m_LastActionTime); m_ActionType = (m_PChar->animation == ANIMATION_ATTACK ? ACTION_ATTACK : ACTION_NONE); - // TODO: что это ? .... - // если не ошибаюсь, то TREASURE_HUNTER работает лишь при последнем ударе + // TODO: what is it? .... + // If I am not mistaken, it works only when TREASURE_HUNTER last stroke CMobEntity* Monster = (CMobEntity*)m_PBattleSubTarget; if (Monster->m_HiPCLvl < m_PChar->GetMLevel()) @@ -1085,12 +1085,12 @@ { float Distance = distance(m_PChar->loc.p, m_PBattleSubTarget->loc.p); - if (Distance > 25) + if (Distance > 25*map_config.magic_dist_mod) { MagicStartError(78); return; } - if (Distance > 21.5) + if (Distance > 21.5*map_config.magic_dist_mod) { MagicStartError(313); return; @@ -1175,7 +1175,7 @@ ActionMagicInterrupt(); return; } - else if (battleutils::IsParalised(m_PChar)) + else if (battleutils::IsParalyzed(m_PChar)) { m_PChar->loc.zone->PushPacket(m_PChar, CHAR_INRANGE_SELF, new CMessageBasicPacket(m_PChar,m_PBattleSubTarget,0,0,29)); m_ActionType = ACTION_MAGIC_INTERRUPT; @@ -1200,8 +1200,8 @@ } //the check for player position only occurs AFTER the cast time is up, you can move so long as x/z is the same on finish. //furthermore, it's actually quite lenient, hence the rounding to 1 dp - if (floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.x * 10 + 0.5) / 10 || - floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.z * 10 + 0.5) / 10) + if (map_config.magic_movement == 0 && (floorf(m_PChar->m_StartActionPos.x * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.x * 10 + 0.5) / 10 || + floorf(m_PChar->m_StartActionPos.z * 10 + 0.5) / 10 != floorf(m_PChar->loc.p.z * 10 + 0.5) / 10)) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar, m_PChar, 0, 0, 16)); @@ -1210,7 +1210,7 @@ return; } if ((m_PBattleSubTarget != m_PChar) && - (distance(m_PChar->loc.p,m_PBattleSubTarget->loc.p) > 21.5)) + (distance(m_PChar->loc.p,m_PBattleSubTarget->loc.p) > 21.5*map_config.magic_dist_mod)) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PBattleSubTarget,0,0,78)); @@ -1537,7 +1537,10 @@ m_PJobAbility = NULL; m_PBattleSubTarget = NULL; return; - }else if(m_PChar->PPet->health.hp == m_PChar->PPet->health.maxhp && !m_PChar->PPet->StatusEffectContainer->HasStatusEffect(EFFECT_SLEEP) && !m_PChar->PPet->StatusEffectContainer->HasStatusEffect(EFFECT_SLEEP_II)){ + }else if(m_PChar->PPet->health.hp == m_PChar->PPet->health.maxhp && + !m_PChar->PPet->StatusEffectContainer->HasStatusEffect(EFFECT_SLEEP) && + !m_PChar->PPet->StatusEffectContainer->HasStatusEffect(EFFECT_SLEEP_II) && + !m_PChar->PPet->StatusEffectContainer->HasStatusEffect(EFFECT_STUN)){ m_PChar->pushPacket(new CMessageBasicPacket(m_PChar, m_PChar, 0, 0, 87)); m_ActionType = (m_PChar->animation == ANIMATION_ATTACK ? ACTION_ATTACK : ACTION_NONE); m_PJobAbility = NULL; @@ -2093,7 +2096,7 @@ SUBEFFECT effect = battleutils::GetSkillChainEffect(m_PBattleSubTarget, m_PWeaponSkill); if (effect != SUBEFFECT_NONE) { - uint16 skillChainDamage = battleutils::TakeSkillchainDamage(m_PChar, m_PBattleSubTarget, damage); + uint16 skillChainDamage = battleutils::TakeSkillchainDamage(m_PChar, m_PBattleSubTarget, (damage * (rand() % 3 + 2))); switch(effect) { @@ -2306,7 +2309,7 @@ float Distance = distance(m_PChar->loc.p,m_PBattleTarget->loc.p); - if (Distance > 30) + if (Distance > 30*map_config.engage_dist_mod) { m_PChar->pushPacket(new CMessageBasicPacket(m_PChar,m_PBattleTarget,0,0,36)); @@ -2358,7 +2361,7 @@ return; } m_LastMeleeTime = (m_LastMeleeTime >= m_AttackMessageTime) ? m_LastMeleeTime + WeaponDelay : m_Tick; - if (battleutils::IsParalised(m_PChar)) + if (battleutils::IsParalyzed(m_PChar)) { m_PChar->loc.zone->PushPacket(m_PChar, CHAR_INRANGE_SELF, new CMessageBasicPacket(m_PChar,m_PBattleTarget,0,0,29)); } @@ -2631,7 +2634,7 @@ expLost = m_PChar->GetMLevel() <= 67 ? (charutils::GetExpNEXTLevel(m_PChar->jobs.job[m_PChar->GetMJob()] + 1) * 8 ) / 100 : 2400; } - uint16 xpReturned = expLost * ratioReturned; + uint16 xpReturned = ((expLost * ratioReturned) / map_config.exp_rate); charutils::AddExperiencePoints(true, m_PChar, m_PChar, xpReturned); Index: src/map/ai/ai_mob_dummy.cpp =================================================================== --- src/map/ai/ai_mob_dummy.cpp (revision 2121) +++ src/map/ai/ai_mob_dummy.cpp (working copy) @@ -122,9 +122,9 @@ RoamingPoint.y = m_PMob->m_SpawnPoint.y; RoamingPoint.z = m_PMob->m_SpawnPoint.z - 1 + rand()%2; - m_PMob->loc.p.rotation = getangle(m_PMob->loc.p, RoamingPoint); + //m_PMob->loc.p.rotation = getangle(m_PMob->loc.p, RoamingPoint); - battleutils::MoveTo(m_PMob, RoamingPoint, 1); + //battleutils::MoveTo(m_PMob, RoamingPoint, 1); m_PMob->loc.zone->PushPacket(m_PMob,CHAR_INRANGE, new CEntityUpdatePacket(m_PMob,ENTITY_UPDATE)); } @@ -266,7 +266,7 @@ uint8 tries = 0; while(tries < 1+highestTH) { - if(rand()%100 < DropList->at(i).DropRate) + if(rand()%100 < (DropList->at(i).DropRate + map_config.drop_rate_bonus)) { PChar->PTreasurePool->AddItem(DropList->at(i).ItemID, m_PMob); break; @@ -275,7 +275,7 @@ } } //check for gil (beastmen drop gil, some NMs drop gil) - if(m_PMob->m_EcoSystem == SYSTEM_BEASTMEN || m_PMob->m_Type & MOBTYPE_NOTORIOUS) + if(m_PMob->m_EcoSystem == SYSTEM_BEASTMEN || m_PMob->m_Type & MOBTYPE_NOTORIOUS || map_config.all_mobs_drop_gil == 1) { charutils::DistributeGil(PChar, m_PMob); // TODO: REALISATION MUST BE IN TREASUREPOOL } @@ -286,8 +286,8 @@ >= 90 = High Kindred Crests ID=2956 */ uint8 Pzone = PChar->getZone(); - if(charutils::GetRealExp(PChar->GetMLevel(),m_PMob->GetMLevel())>0 && - rand()%100 < 40 && m_PMob->m_Type == MOBTYPE_NORMAL && ((Pzone > 0 && + if((charutils::GetRealExp(PChar->GetMLevel(),m_PMob->GetMLevel())>0 || map_config.always_seal_crest == 1) && + rand()%100 < (40 + map_config.seal_crest_bonus) && m_PMob->m_Type == MOBTYPE_NORMAL && ((Pzone > 0 && Pzone < 39) || (Pzone > 42 && Pzone < 134) || (Pzone > 135 && Pzone < 185) || (Pzone > 188 && Pzone < 255))){ //exp-yielding monster and drop is successful //TODO: The drop is actually based on a 5 minute timer, and not a probability of dropping! @@ -547,10 +547,6 @@ return; } - //TODO: Any checks whilst the monster is preparing. - //NOTE: RANGE CHECKS ETC ONLY ARE DONE AFTER THE ABILITY HAS FINISHED PREPARING. - // THE ONLY CHECK IN HERE SHOULD BE WITH STUN/SLEEP/TERROR/ETC - if ((m_Tick - m_LastActionTime) > m_PMobSkill->getActivationTime()) { //Range check @@ -564,6 +560,33 @@ ActionAbilityInterrupt(); return; } + else if (battleutils::IsParalyzed(m_PMob)) + { + m_PMob->loc.zone->PushPacket(m_PMob, CHAR_INRANGE_SELF, new CMessageBasicPacket(m_PMob, m_PMob, 0, 0, 29)); + m_ActionType = ACTION_MOBABILITY_INTERRUPT; + ActionAbilityInterrupt(); + return; + } + else if (battleutils::IsIntimidated(m_PMob, m_PBattleTarget)) + { + m_PMob->loc.zone->PushPacket(m_PMob, CHAR_INRANGE_SELF, new CMessageBasicPacket(m_PMob, m_PBattleTarget, 0, 0, 106)); + m_ActionType = ACTION_MOBABILITY_INTERRUPT; + ActionAbilityInterrupt(); + return; + } + else if (m_PMob->StatusEffectContainer->HasStatusEffect(EFFECT_STUN)) + { + m_ActionType = ACTION_MOBABILITY_INTERRUPT; + ActionAbilityInterrupt(); + return; + } + else if (m_PMob->StatusEffectContainer->HasStatusEffect(EFFECT_SLEEP) || m_PMob->StatusEffectContainer->HasStatusEffect(EFFECT_SLEEP_II)) + { + m_ActionType = ACTION_MOBABILITY_INTERRUPT; + ActionAbilityInterrupt(); + return; + } + m_PMobSkill->setTP(m_PMob->health.tp); m_LastActionTime = m_Tick; m_ActionType = ACTION_MOBABILITY_FINISH; @@ -860,6 +883,10 @@ m_ActionType = ACTION_DISENGAGE; return; } + if (m_PMob->StatusEffectContainer->HasStatusEffect(EFFECT_STUN)) + { + return; + } // mob should not attack another mob with no master @@ -903,7 +930,15 @@ if (PPartyMember->PBattleAI->GetCurrentAction() == ACTION_ROAMING && distance(m_PMob->loc.p, PPartyMember->loc.p) < 10) { - PPartyMember->PEnmityContainer->AddBaseEnmity(m_PBattleTarget); + if (PPartyMember->m_Behaviour & BEHAVIOUR_AGGRO_SIGHT && + isFaceing(PPartyMember->loc.p, m_PBattleTarget->loc.p, 10)) + { + PPartyMember->PEnmityContainer->AddBaseEnmity(m_PBattleTarget); + } + else if(PPartyMember->m_Behaviour & BEHAVIOUR_AGGRO_HEARING) + { + PPartyMember->PEnmityContainer->AddBaseEnmity(m_PBattleTarget); + } } } } @@ -922,7 +957,7 @@ if ((m_Tick - m_LastActionTime) > WeaponDelay) { - if (battleutils::IsParalised(m_PMob)) + if (battleutils::IsParalyzed(m_PMob)) { m_PMob->loc.zone->PushPacket(m_PMob, CHAR_INRANGE, new CMessageBasicPacket(m_PMob,m_PBattleTarget,0,0,29)); } @@ -1097,7 +1132,7 @@ m_LastActionTime = m_Tick; } } - else if (m_PMob->CanDeaggro() && CurrentDistance > 25 && (m_Tick - m_LastActionTime) > 20000) + else if (m_PMob->CanDeaggro() && CurrentDistance > 45 && (m_Tick - m_LastActionTime) > 20000) { //player has been too far away for some time, deaggro if the mob type dictates it Index: src/map/ai/ai_pet_dummy.cpp =================================================================== --- src/map/ai/ai_pet_dummy.cpp (revision 2121) +++ src/map/ai/ai_pet_dummy.cpp (working copy) @@ -615,7 +615,7 @@ else{ //try to attack if((m_Tick - m_LastActionTime) > m_PPet->m_Weapons[SLOT_MAIN]->getDelay()){ - if (battleutils::IsParalised(m_PPet)) + if (battleutils::IsParalyzed(m_PPet)) { m_PPet->loc.zone->PushPacket(m_PPet, CHAR_INRANGE, new CMessageBasicPacket(m_PPet,m_PBattleTarget,0,0,29)); } Index: src/map/battleutils.cpp =================================================================== --- src/map/battleutils.cpp (revision 2121) +++ src/map/battleutils.cpp (working copy) @@ -675,7 +675,27 @@ if (rand()%100 > 10) return; PDefender->StatusEffectContainer->DispelStatusEffect(); return; + + //Additional Effect: Fire Damage (proc rate need verifying) + case 18385: + if (PDefender->GetMLevel() > PAttacker->GetMLevel()) + { + chance -= 5*(PDefender->GetMLevel() - PAttacker->GetMLevel()); + chance = dsp_cap(chance,5,95); + } + if (rand()%100 >= chance || PWeapon==NULL) return; + Action->subeffect = SUBEFFECT_FIRE_DAMAGE; + Action->submessageID = 163; + Action->flag = 3; + damage += (PWeapon->getReqLvl() - PDefender->GetMLevel()); + damage = dsp_cap(damage,0,50); + damage += PAttacker->GetMLevel()/2; + damage += rand()%20; //At 75 -> 37~56 low or 87~106 high + Action->subparam = damage; + PDefender->addHP(-damage); + return; + default: return; } @@ -1466,8 +1486,28 @@ else { int32 defendereva = (PDefender->getMod(MOD_EVA) * (100 + PDefender->getMod(MOD_EVAP)))/100 + PDefender->AGI()/2; - int32 attackeracc = (PAttacker->getMod(MOD_ACC) * (100 + PAttacker->getMod(MOD_ACCP)))/100 + PAttacker->DEX()/2; + int32 attackeracc = 0; + // Two-Handed Weapons should be 3 accuracy for every 4 DEX + switch (PAttacker->m_Weapons[SLOT_SUB]->getSkillType()) + { + case SKILL_GSD: + case SKILL_GAX: + case SKILL_SYH: + case SKILL_POL: + case SKILL_GKT: + case SKILL_STF: + { + attackeracc = (PAttacker->getMod(MOD_ACC) * (100 + PAttacker->getMod(MOD_ACCP)))/100 + (3 * PAttacker->DEX()/4); + } + break; + default: + { + attackeracc = (PAttacker->getMod(MOD_ACC) * (100 + PAttacker->getMod(MOD_ACCP)))/100 + PAttacker->DEX()/2; + } + break; + } + hitrate = hitrate + (attackeracc - defendereva) / 2 + (PAttacker->GetMLevel() - PDefender->GetMLevel())*2; hitrate = dsp_cap(hitrate, 20, 95); @@ -1492,8 +1532,27 @@ else { int32 defendereva = (PDefender->getMod(MOD_EVA) * (100 + PDefender->getMod(MOD_EVAP)))/100 + PDefender->AGI()/2; - int32 attackeracc = ((PAttacker->getMod(MOD_ACC) + accuracy) * (100 + PAttacker->getMod(MOD_ACCP)))/100 + PAttacker->DEX()/2; + int32 attackeracc = 0; + // Two-Handed Weapons should be 3 accuracy for every 4 DEX + switch (PAttacker->m_Weapons[SLOT_SUB]->getSkillType()) + { + case SKILL_GSD: + case SKILL_GAX: + case SKILL_SYH: + case SKILL_POL: + case SKILL_GKT: + case SKILL_STF: + { + attackeracc = ((PAttacker->getMod(MOD_ACC) + accuracy) * (100 + PAttacker->getMod(MOD_ACCP)))/100 + (3 * PAttacker->DEX()/4); + } + break; + default: + { + attackeracc = ((PAttacker->getMod(MOD_ACC) + accuracy) * (100 + PAttacker->getMod(MOD_ACCP)))/100 + PAttacker->DEX()/2; + } + break; + } hitrate = hitrate + (attackeracc - defendereva) / 2 + (PAttacker->GetMLevel() - PDefender->GetMLevel())*2; hitrate = dsp_cap(hitrate, 20, 95); @@ -1829,7 +1888,7 @@ * * ************************************************************************/ -bool IsParalised(CBattleEntity* PAttacker) +bool IsParalyzed(CBattleEntity* PAttacker) { return (rand()%100 < dsp_cap(PAttacker->getMod(MOD_PARALYZE) - PAttacker->getMod(MOD_PARALYZERES), 0, 100)); } @@ -1997,17 +2056,17 @@ { DSP_DEBUG_BREAK_IF(mode < 1 || mode > 2); - // TODO: не учитывается модификатор передвижения PEntity->getMod(MOD_MOVE) - - if (PEntity->speed != 0) + if (PEntity->speed != 0 && !PEntity->StatusEffectContainer->HasStatusEffect(EFFECT_STUN)) { + float movementSpeed = (PEntity->speed + PEntity->getMod(MOD_MOVE)); + float angle = (1 - (float)PEntity->loc.p.rotation / 255) * 6.28318f; - PEntity->loc.p.x += (cosf(angle) * ((float)PEntity->speed/0x28) * (mode) * 1.08); + PEntity->loc.p.x += (cosf(angle) * ((float)movementSpeed/0x28) * (mode) * 1.08); PEntity->loc.p.y = pos.y; - PEntity->loc.p.z += (sinf(angle) * ((float)PEntity->speed/0x28) * (mode) * 1.08); + PEntity->loc.p.z += (sinf(angle) * ((float)movementSpeed/0x28) * (mode) * 1.08); - PEntity->loc.p.moving += ((0x36*((float)PEntity->speed/0x28)) - (0x14*(mode - 1))); + PEntity->loc.p.moving += ((0x36*((float)movementSpeed/0x28)) - (0x14*(mode - 1))); if(PEntity->loc.p.moving > 0x2fff) { @@ -2994,7 +3053,9 @@ switch (PWeapon->getID()) { + case 18632: case 17557: hiddenEffect = 10; break; //light staff 10% + case 18633: case 17558: hiddenEffect = 15; break; //apollo staff 15% } Index: src/map/battleutils.h =================================================================== --- src/map/battleutils.h (revision 2121) +++ src/map/battleutils.h (working copy) @@ -88,7 +88,7 @@ uint8 GetSkillchainSubeffect(SKILLCHAIN_ELEMENT skillchain); uint16 GetSkillchainMinimumResistance(SKILLCHAIN_ELEMENT element, CBattleEntity* PDefender); - bool IsParalised(CBattleEntity* PAttacker); + bool IsParalyzed(CBattleEntity* PAttacker); bool IsAbsorbByShadow(CBattleEntity* PDefender); bool IsIntimidated(CBattleEntity* PAttacker, CBattleEntity* PDefender); bool IsAnticipated(CBattleEntity* PDefender, bool forceRemove, bool ignore); Index: src/map/charentity.h =================================================================== --- src/map/charentity.h (revision 2121) +++ src/map/charentity.h (working copy) @@ -57,8 +57,10 @@ QUESTS_ABYSSEA = 8 }; -#define MAX_QUESTAREA 9 +#define MAX_QUESTAREA 9 #define MAX_QUESTID 256 +#define MAX_MISSIONAREA 7 +#define MAX_MISSIONID 64 struct jobs_t { @@ -154,7 +156,7 @@ uint16 m_EquipBlock; // заблокированные ячейки экипировки uint8 equip[17]; // экипировка персонажа - uint8 m_ZonesList[32]; // список посещенных персонажем зон + uint8 m_ZonesList[32]; // character list of visited zones uint8 m_SpellList[96]; // список изученных заклинаний uint8 m_TitleList[94]; // список заслуженных завний uint8 m_Abilities[38]; // список текущих способностей @@ -193,7 +195,7 @@ CLinkshell* PLinkshell; // linkshell, в которой общается персонаж CTreasurePool* PTreasurePool; // сокровища, добытые с монстров CMeritPoints* PMeritPoints; // - bool MeritMode; //If true then player is meriting + bool MeritMode; // If true then player is meriting CRecastContainer* PRecastContainer; // Index: src/map/charutils.cpp =================================================================== --- src/map/charutils.cpp (revision 2121) +++ src/map/charutils.cpp (working copy) @@ -789,13 +789,13 @@ void SendQuestMissionLog(CCharEntity* PChar) { - // в нижележащем цикле загружаются все квесты, текущие и выполненные - // в одном пакете с текущими квестами Aht Urhgan отправляется информация о текущих миссиях + // In the underlying cycle is loaded all the quests, current and completed + // In the same package with the current quest Aht Urhgan will receive information about the current missions // Treasures of Aht Urhgan // Wings of the Goddess Missions // Assault Missions // Campaign Operations - // пакет с завершенными квестами Aht Urhgan содержит завершенные миссии Assault Missions + // Package to complete the quest has completed Aht Urhgan Mission Assault Missions for (uint8 status = 0x01; status <= 0x02; ++status) { @@ -805,12 +805,12 @@ } } - // обновляем статус миссий + // update the status of the mission // National Missions // Rise of the Zilart and Chains of Promathia Missions // Add-on Scenarios - // так как все эти миссии обновляются вместе, - // то достаточно выполнить обновление для MISSION_ZILART + // For all these missions are updated together + // It is sufficient to perform the updates MISSION_ZILART PChar->pushPacket(new CQuestMissionLogPacket(PChar, MISSION_ZILART, 0x01)); PChar->pushPacket(new CQuestMissionLogPacket(PChar, MISSION_ZILART, 0x02)); @@ -1284,6 +1284,15 @@ switch (((CItemWeapon*)PItem)->getSkillType()) { case SKILL_H2H: + { + CItemArmor* armor = (CItemArmor*)PChar->getStorage(LOC_INVENTORY)->GetItem(PChar->equip[SLOT_SUB]); + if ((armor != NULL) && (armor->getType() & ITEM_ARMOR)) + { + UnequipItem(PChar,SLOT_SUB); + } + PChar->look.sub = PItem->getModelId() + 0x1000; + } + break; case SKILL_GSD: case SKILL_GAX: case SKILL_SYH: @@ -1294,11 +1303,24 @@ CItemArmor* armor = (CItemArmor*)PChar->getStorage(LOC_INVENTORY)->GetItem(PChar->equip[SLOT_SUB]); if ((armor != NULL) && (armor->getType() & ITEM_ARMOR)) { - UnequipItem(PChar,SLOT_SUB); + // Only one hand weapons, shields and grips can be offhanded. Grips should not be unequipped. + if (armor->IsShield()) + { + UnequipItem(PChar,SLOT_SUB); + } } - if (((CItemWeapon*)PItem)->getSkillType() == SKILL_H2H) + } + break; + default: + { + CItemArmor* armor = (CItemArmor*)PChar->getStorage(LOC_INVENTORY)->GetItem(PChar->equip[SLOT_SUB]); + if ((armor != NULL) && (armor->getType() & ITEM_ARMOR)) { - PChar->look.sub = PItem->getModelId() + 0x1000; + // One-handed weapons can use shields but cannot use grips, take them off. + if (!armor->IsShield()) + { + UnequipItem(PChar,SLOT_SUB); + } } } break; @@ -1541,7 +1563,7 @@ /************************************************************************ * * -* Проверяем возможность персонажа носить экипированные на нем предметы * +* Check the possibility of the character wearing equipped gear * * * ************************************************************************/ @@ -1598,9 +1620,9 @@ * * ************************************************************************/ -// позднее нужно будет сделать экипировку в структуре, -// куда добавить битовое поле, указывающее, в какой ячейке находится экипировка с условием -// для начала это поле избавит нас от проверки ячеек у персонажей без экипировки с условием +// Later need to make equipment in the structure, +// To add a bit field indicating which cell is equipment with a condition +// To the beginning of this field will save us from checking the cells in the characters without equipment with the condition void CheckEquipLogic(CCharEntity* PChar, SCRIPTTYPE ScriptType, uint32 param) { @@ -1673,7 +1695,97 @@ || PSkill->getID() == wsIDs[SLOT_MAIN] || PSkill->getID() == wsIDs[SLOT_SUB] || isInDynamis && (PSkill->getID() == wsDynIDs[SLOT_MAIN] || PSkill->getID() == wsDynIDs[SLOT_SUB])) { - addWeaponSkill(PChar, PSkill->getID()); + switch(PSkill->getID()) + { + case 72: // Decimation + { + if(PChar->m_questLog[3].complete [59/8] & (1 << (59 % 8)) == 1) + { + addWeaponSkill(PChar, PSkill->getID()); + } + } break; + case 169: // Black Halo + { + if(PChar->m_questLog[2].complete [86/8] & (1 << (86 % 8)) == 1) + { + addWeaponSkill(PChar, PSkill->getID()); + } + } break; + case 25: // Evisceration + { + if(PChar->m_questLog[5].complete [13/8] & (1 << (13 % 8)) == 1) + { + addWeaponSkill(PChar, PSkill->getID()); + } + } break; + case 88: // Steel Cyclone + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 152: // Tachi: Kasha + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 56: // Ground Strike + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 9: // Asuran Fists + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 136: // Blade: Ku + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 120: // Impulse Drive + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 104: // Spiral Hell + { + if(PChar->m_questLog[0].complete [99/8] & (1 << (99 % 8)) == 1) + { + addWeaponSkill(PChar, PSkill->getID()); + } + } break; + case 184: // Staves + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + case 42: // Savage Blade + { + //if(PChar->m_questLog[LOGID].complete [QUESTID/8] & (1 << (QUESTID % 8)) == 1) + //{ + // addWeaponSkill(PChar, PSkill->getID()); + //} + } break; + default: + { + addWeaponSkill(PChar, PSkill->getID()); + } break; + } } } @@ -1690,7 +1802,27 @@ || PSkill->getID() == wsIDs[SLOT_RANGED] || isInDynamis && (PSkill->getID() == wsDynIDs[SLOT_MAIN] || PSkill->getID() == wsDynIDs[SLOT_SUB])) { - addWeaponSkill(PChar, PSkill->getID()); + switch(PSkill->getID()) + { + case 199: // Empyreal Arrow + { + if(PChar->m_questLog[2].complete [85/8] & (1 << (85 % 8)) == 1) + { + addWeaponSkill(PChar, PSkill->getID()); + } + } break; + case 215: // Detonator + { + if(PChar->m_questLog[1].complete [67/8] & (1 << (67 % 8)) == 1) + { + addWeaponSkill(PChar, PSkill->getID()); + } + } break; + default: + { + addWeaponSkill(PChar, PSkill->getID()); + } break; + } } } } @@ -2233,7 +2365,7 @@ uint32 GetRealExp(uint8 charlvl, uint8 moblvl) { - int32 levelDif = moblvl - charlvl + 34; + int32 levelDif = moblvl - charlvl + 34; if ((charlvl > 0) && (charlvl < 100)) { @@ -2268,7 +2400,7 @@ void DistributeGil(CCharEntity* PChar, CMobEntity* PMob) { //work out the amount of gil to give (guessed; replace with testing) - uint32 gil = PMob->GetMLevel() * ((PMob->m_Type & MOBTYPE_NOTORIOUS) ? 10 : 1); + uint32 gil = PMob->GetMLevel() * map_config.gil_bonus * ((PMob->m_Type & MOBTYPE_NOTORIOUS) ? 10 : 1); //distribute to said members (perhaps store pointers to each member in first loop?) if (PChar->PParty != NULL) @@ -2384,6 +2516,7 @@ else if (PMob->m_Family == 266 && PMob->getZone() == 174) monsterbonus = 1.23f; else if (PMob->m_Family == 206 && PMob->getZone() == 5) monsterbonus = 1.10f; else if (PMob->m_Family == 208 && PMob->getZone() == 24) monsterbonus = 1.23f; + else if (PMob->m_Type & MOBTYPE_NOTORIOUS && PMob->GetMLevel() > 75) monsterbonus = 5.00f; if (monsterbonus > 1.00f) exp *= monsterbonus; permonstercap = ((PMember->PParty != NULL && pcinzone > 1) ? 1.35f : 1.15f); if (PMember->GetMLevel() <= 50) @@ -2394,7 +2527,7 @@ { if (exp > (250*permonstercap)) exp = 250*permonstercap; } - else if (exp > (300*permonstercap)) + else if (exp > (300*permonstercap) && PMob->m_Type != MOBTYPE_NOTORIOUS && PMob->GetMLevel() <= 75) { exp = 300*permonstercap; } @@ -2414,13 +2547,13 @@ } else { - if (PMember->GetMLevel() <=10) PMember->expChain.chainTime = gettick()+50000; - else if (PMember->GetMLevel() <=20) PMember->expChain.chainTime = gettick()+100000; - else if (PMember->GetMLevel() <=30) PMember->expChain.chainTime = gettick()+150000; - else if (PMember->GetMLevel() <=40) PMember->expChain.chainTime = gettick()+200000; - else if (PMember->GetMLevel() <=50) PMember->expChain.chainTime = gettick()+250000; - else if (PMember->GetMLevel() <=60) PMember->expChain.chainTime = gettick()+300000; - else PMember->expChain.chainTime = gettick()+360000; + if (PMember->GetMLevel() <=10) PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=20) PMember->expChain.chainTime = gettick()+100000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=30) PMember->expChain.chainTime = gettick()+150000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=40) PMember->expChain.chainTime = gettick()+200000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=50) PMember->expChain.chainTime = gettick()+250000*map_config.chain_bonus; + else if (PMember->GetMLevel() <=60) PMember->expChain.chainTime = gettick()+300000*map_config.chain_bonus; + else PMember->expChain.chainTime = gettick()+360000*map_config.chain_bonus; chainactive = false; PMember->expChain.chainNumber = 1; } @@ -2428,85 +2561,85 @@ { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+50000; break; - case 1: PMember->expChain.chainTime = gettick()+40000; break; - case 2: PMember->expChain.chainTime = gettick()+30000; break; - case 3: PMember->expChain.chainTime = gettick()+20000; break; - case 4: PMember->expChain.chainTime = gettick()+10000; break; - case 5: PMember->expChain.chainTime = gettick()+6000; break; - default: PMember->expChain.chainTime = gettick()+2000; break; + case 0: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+6000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+2000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 20) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+100000; break; - case 1: PMember->expChain.chainTime = gettick()+80000; break; - case 2: PMember->expChain.chainTime = gettick()+60000; break; - case 3: PMember->expChain.chainTime = gettick()+40000; break; - case 4: PMember->expChain.chainTime = gettick()+20000; break; - case 5: PMember->expChain.chainTime = gettick()+8000; break; - default: PMember->expChain.chainTime = gettick()+4000; break; + case 0: PMember->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+8000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+4000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 30) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+150000; break; - case 1: PMember->expChain.chainTime = gettick()+120000; break; - case 2: PMember->expChain.chainTime = gettick()+90000; break; - case 3: PMember->expChain.chainTime = gettick()+60000; break; - case 4: PMember->expChain.chainTime = gettick()+30000; break; - case 5: PMember->expChain.chainTime = gettick()+10000; break; - default: PMember->expChain.chainTime = gettick()+5000; break; + case 0: PMember->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+5000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 40) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+200000; break; - case 1: PMember->expChain.chainTime = gettick()+160000; break; - case 2: PMember->expChain.chainTime = gettick()+120000; break; - case 3: PMember->expChain.chainTime = gettick()+80000; break; - case 4: PMember->expChain.chainTime = gettick()+40000; break; - case 5: PMember->expChain.chainTime = gettick()+40000; break; - default: PMember->expChain.chainTime = gettick()+30000; break; + case 0: PMember->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+160000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 50) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+250000; break; - case 1: PMember->expChain.chainTime = gettick()+200000; break; - case 2: PMember->expChain.chainTime = gettick()+150000; break; - case 3: PMember->expChain.chainTime = gettick()+100000; break; - case 4: PMember->expChain.chainTime = gettick()+50000; break; - case 5: PMember->expChain.chainTime = gettick()+50000; break; - default: PMember->expChain.chainTime = gettick()+50000; break; + case 0: PMember->expChain.chainTime = gettick()+250000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; } } else if(chainactive && PMember->GetMLevel() <= 60) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+300000; break; - case 1: PMember->expChain.chainTime = gettick()+240000; break; - case 2: PMember->expChain.chainTime = gettick()+180000; break; - case 3: PMember->expChain.chainTime = gettick()+120000; break; - case 4: PMember->expChain.chainTime = gettick()+90000; break; - case 5: PMember->expChain.chainTime = gettick()+60000; break; - default: PMember->expChain.chainTime = gettick()+60000; break; + case 0: PMember->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+180000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } else if (chainactive) { switch(PMember->expChain.chainNumber) { - case 0: PMember->expChain.chainTime = gettick()+360000; break; - case 1: PMember->expChain.chainTime = gettick()+300000; break; - case 2: PMember->expChain.chainTime = gettick()+240000; break; - case 3: PMember->expChain.chainTime = gettick()+165000; break; - case 4: PMember->expChain.chainTime = gettick()+105000; break; - case 5: PMember->expChain.chainTime = gettick()+60000; break; - default: PMember->expChain.chainTime = gettick()+60000; break; + case 0: PMember->expChain.chainTime = gettick()+360000*map_config.chain_bonus; break; + case 1: PMember->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 2: PMember->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 3: PMember->expChain.chainTime = gettick()+165000*map_config.chain_bonus; break; + case 4: PMember->expChain.chainTime = gettick()+105000*map_config.chain_bonus; break; + case 5: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PMember->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } exp = charutils::AddExpBonus(PMember, exp); @@ -2521,7 +2654,7 @@ uint8 Pzone = PMember->getZone(); if (PMob->m_Type == MOBTYPE_NORMAL && ((Pzone > 0 && Pzone < 39) || (Pzone > 42 && Pzone < 134) || (Pzone > 135 && Pzone < 185) || (Pzone > 188 && Pzone < 255))) { - if (PMember->StatusEffectContainer->HasStatusEffect(EFFECT_SIGNET) && PMob->m_Element > 0 && rand()%100 < 20 && + if ((PMember->StatusEffectContainer->HasStatusEffect(EFFECT_SIGNET) || PMember->StatusEffectContainer->HasStatusEffect(EFFECT_SANCTION)) && PMob->m_Element > 0 && rand()%100 < 20 && PMember->loc.zone == PMob->loc.zone) // Need to move to SIGNET_CHANCE constant { PMember->PTreasurePool->AddItem(4095 + PMob->m_Element, PMob); @@ -2549,6 +2682,7 @@ else if (PMob->m_Family == 266 && PMob->getZone() == 174) monsterbonus = 1.23f; else if (PMob->m_Family == 206 && PMob->getZone() == 5) monsterbonus = 1.10f; else if (PMob->m_Family == 208 && PMob->getZone() == 24) monsterbonus = 1.23f; + else if (PMob->m_Type & MOBTYPE_NOTORIOUS && PMob->GetMLevel() > 75) monsterbonus = 5.00f; if (monsterbonus > 1.00f) exp *= monsterbonus; if (PChar->GetMLevel() <= 50) { @@ -2558,7 +2692,7 @@ { if (exp > (250*permonstercap)) exp = 250*permonstercap; } - else if (exp > (300*permonstercap)) + else if (exp > (300*permonstercap) && PMob->m_Type != MOBTYPE_NOTORIOUS && PMob->GetMLevel() <= 75) { exp = 300*permonstercap; } @@ -2578,13 +2712,13 @@ } else { - if (PChar->GetMLevel() <=10) PChar->expChain.chainTime = gettick()+50000; - else if (PChar->GetMLevel() <=20) PChar->expChain.chainTime = gettick()+100000; - else if (PChar->GetMLevel() <=30) PChar->expChain.chainTime = gettick()+150000; - else if (PChar->GetMLevel() <=40) PChar->expChain.chainTime = gettick()+200000; - else if (PChar->GetMLevel() <=50) PChar->expChain.chainTime = gettick()+250000; - else if (PChar->GetMLevel() <=60) PChar->expChain.chainTime = gettick()+300000; - else PChar->expChain.chainTime = gettick()+360000; + if (PChar->GetMLevel() <=10) PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=20) PChar->expChain.chainTime = gettick()+100000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=30) PChar->expChain.chainTime = gettick()+150000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=40) PChar->expChain.chainTime = gettick()+200000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=50) PChar->expChain.chainTime = gettick()+250000*map_config.chain_bonus; + else if (PChar->GetMLevel() <=60) PChar->expChain.chainTime = gettick()+300000*map_config.chain_bonus; + else PChar->expChain.chainTime = gettick()+360000*map_config.chain_bonus; chainactive = false; PChar->expChain.chainNumber = 1; } @@ -2592,85 +2726,85 @@ { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+50000; break; - case 1: PChar->expChain.chainTime = gettick()+40000; break; - case 2: PChar->expChain.chainTime = gettick()+30000; break; - case 3: PChar->expChain.chainTime = gettick()+20000; break; - case 4: PChar->expChain.chainTime = gettick()+10000; break; - case 5: PChar->expChain.chainTime = gettick()+6000; break; - default: PChar->expChain.chainTime = gettick()+2000; break; + case 0: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+6000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+2000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 20) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+100000; break; - case 1: PChar->expChain.chainTime = gettick()+80000; break; - case 2: PChar->expChain.chainTime = gettick()+60000; break; - case 3: PChar->expChain.chainTime = gettick()+40000; break; - case 4: PChar->expChain.chainTime = gettick()+20000; break; - case 5: PChar->expChain.chainTime = gettick()+8000; break; - default: PChar->expChain.chainTime = gettick()+4000; break; + case 0: PChar->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+20000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+8000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+4000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 30) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+150000; break; - case 1: PChar->expChain.chainTime = gettick()+120000; break; - case 2: PChar->expChain.chainTime = gettick()+90000; break; - case 3: PChar->expChain.chainTime = gettick()+60000; break; - case 4: PChar->expChain.chainTime = gettick()+30000; break; - case 5: PChar->expChain.chainTime = gettick()+10000; break; - default: PChar->expChain.chainTime = gettick()+5000; break; + case 0: PChar->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+10000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+5000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 40) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+200000; break; - case 1: PChar->expChain.chainTime = gettick()+160000; break; - case 2: PChar->expChain.chainTime = gettick()+120000; break; - case 3: PChar->expChain.chainTime = gettick()+80000; break; - case 4: PChar->expChain.chainTime = gettick()+40000; break; - case 5: PChar->expChain.chainTime = gettick()+40000; break; - default: PChar->expChain.chainTime = gettick()+30000; break; + case 0: PChar->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+160000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+80000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+40000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+30000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 50) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+250000; break; - case 1: PChar->expChain.chainTime = gettick()+200000; break; - case 2: PChar->expChain.chainTime = gettick()+150000; break; - case 3: PChar->expChain.chainTime = gettick()+100000; break; - case 4: PChar->expChain.chainTime = gettick()+50000; break; - case 5: PChar->expChain.chainTime = gettick()+50000; break; - default: PChar->expChain.chainTime = gettick()+50000; break; + case 0: PChar->expChain.chainTime = gettick()+250000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+200000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+150000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+100000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+50000*map_config.chain_bonus; break; } } else if(chainactive && PChar->GetMLevel() <= 60) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+300000; break; - case 1: PChar->expChain.chainTime = gettick()+240000; break; - case 2: PChar->expChain.chainTime = gettick()+180000; break; - case 3: PChar->expChain.chainTime = gettick()+120000; break; - case 4: PChar->expChain.chainTime = gettick()+90000; break; - case 5: PChar->expChain.chainTime = gettick()+60000; break; - default: PChar->expChain.chainTime = gettick()+60000; break; + case 0: PChar->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+180000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+120000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+90000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } else if (chainactive) { switch(PChar->expChain.chainNumber) { - case 0: PChar->expChain.chainTime = gettick()+360000; break; - case 1: PChar->expChain.chainTime = gettick()+300000; break; - case 2: PChar->expChain.chainTime = gettick()+240000; break; - case 3: PChar->expChain.chainTime = gettick()+165000; break; - case 4: PChar->expChain.chainTime = gettick()+105000; break; - case 5: PChar->expChain.chainTime = gettick()+60000; break; - default: PChar->expChain.chainTime = gettick()+60000; break; + case 0: PChar->expChain.chainTime = gettick()+360000*map_config.chain_bonus; break; + case 1: PChar->expChain.chainTime = gettick()+300000*map_config.chain_bonus; break; + case 2: PChar->expChain.chainTime = gettick()+240000*map_config.chain_bonus; break; + case 3: PChar->expChain.chainTime = gettick()+165000*map_config.chain_bonus; break; + case 4: PChar->expChain.chainTime = gettick()+105000*map_config.chain_bonus; break; + case 5: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; + default: PChar->expChain.chainTime = gettick()+60000*map_config.chain_bonus; break; } } exp = charutils::AddExpBonus(PChar, exp); @@ -2685,7 +2819,7 @@ uint8 Pzone = PChar->getZone(); if (PMob->m_Type == MOBTYPE_NORMAL && ((Pzone > 0 && Pzone < 39) || (Pzone > 42 && Pzone < 134) || (Pzone > 135 && Pzone < 185) || (Pzone > 188 && Pzone < 255))) { - if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SIGNET) && PMob->m_Element > 0 && rand()%100 < 20) // Need to move to SIGNET_CHANCE constant + if ((PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SIGNET) || PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SANCTION)) && PMob->m_Element > 0 && rand()%100 < 20) // Need to move to SIGNET_CHANCE constant { PChar->PTreasurePool->AddItem(4095 + PMob->m_Element, PMob); } @@ -2884,18 +3018,19 @@ PChar->jobs.exp[PChar->GetMJob()] += exp; } - - conquest::AddConquestPoints(PChar, exp); - - //Add IS + ZENI when you kill a monster in TOAU Zone (10%) NEED TO CHANGE THAT - if(PChar->getZone() >= 48 && PChar->getZone() <= 79) + if(PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SIGNET)) { + conquest::AddConquestPoints(PChar, exp); + } + + //Add IS when you kill a monster in TOAU Zone (10%) + if(PChar->StatusEffectContainer->HasStatusEffect(EFFECT_SANCTION) && PChar->getZone() >= 48 && PChar->getZone() <= 79) + { PChar->RegionPoints[3] += ((exp/100)*10); // 10% - PChar->RegionPoints[10] += ((exp/100)*10); // 10% + //PChar->RegionPoints[10] += ((exp/100)*10); // 10% PChar->pushPacket(new CConquestPacket(PChar)); } - //player levels up if ((currentExp + exp) >= GetExpNEXTLevel(PChar->jobs.job[PChar->GetMJob()]) && onLimitMode == false) { @@ -3432,4 +3567,22 @@ Sql_Query(SqlHandle, "UPDATE char_stats SET 2h = 0"); } +uint32 GetClientIP(CCharEntity* PChar) +{ + const int8* Query = "SELECT client_addr FROM accounts_sessions WHERE charid = %u LIMIT 1;"; + + int32 ret = Sql_Query(SqlHandle,Query,PChar->id); + + if (ret == SQL_ERROR || + Sql_NumRows(SqlHandle) == 0 || + Sql_NextRow(SqlHandle) != SQL_SUCCESS) + { + ShowError(CL_RED"Cannot load client_addr for charid %u. Unable to pull Client IP!" CL_RESET, PChar->id); + return 0; + } + else + { + return Sql_GetIntData(SqlHandle,0); + } +} } // namespace charutils Index: src/map/charutils.h =================================================================== --- src/map/charutils.h (revision 2121) +++ src/map/charutils.h (working copy) @@ -129,6 +129,8 @@ uint32 AddExpBonus(CCharEntity* PChar, uint32 exp); void ResetAllTwoHours(); + + uint32 GetClientIP(CCharEntity* PChar); void RemoveAllEquipment(CCharEntity* PChar); }; Index: src/map/conquest_system.cpp =================================================================== --- src/map/conquest_system.cpp (revision 2121) +++ src/map/conquest_system.cpp (working copy) @@ -76,7 +76,7 @@ // 10% if region control is player's nation // 15% otherwise - PChar->RegionPoints[PChar->profile.nation] += exp * (PChar->profile.nation == GetRegionOwner(region) ? 0.1 : 0.15); + PChar->RegionPoints[PChar->profile.nation] += exp * map_config.conquest_bonus * (PChar->profile.nation == GetRegionOwner(region) ? 0.1 : 0.15); } return 0; // added conquest points (пока не вижу в этом определенного смысла) } Index: src/map/lua/lua_baseentity.cpp =================================================================== --- src/map/lua/lua_baseentity.cpp (revision 2121) +++ src/map/lua/lua_baseentity.cpp (working copy) @@ -359,6 +359,19 @@ //======================================================// +inline int32 CLuaBaseEntity::updateHealth(lua_State *L) +{ + DSP_DEBUG_BREAK_IF(m_PBaseEntity == NULL); + DSP_DEBUG_BREAK_IF(m_PBaseEntity->objtype == TYPE_NPC); + + if(m_PBaseEntity->objtype == TYPE_PC && m_PBaseEntity->status != STATUS_DISAPPEAR) + { + charutils::UpdateHealth((CCharEntity*)m_PBaseEntity); + } + return 0; +} + +//======================================================// inline int32 CLuaBaseEntity::getMaxHP(lua_State *L) { DSP_DEBUG_BREAK_IF(m_PBaseEntity == NULL); @@ -832,11 +845,23 @@ if( m_PBaseEntity->objtype == TYPE_PC ) { CCharEntity * PChar = (CCharEntity*)m_PBaseEntity; - uint16 rank = 1; - - rank = PChar->profile.rank[PChar->profile.nation]; - lua_pushinteger( L, rank); - return 1; + uint16 rank = 0; + + if(!lua_isnil(L,-1) && lua_isnumber(L,-1)) + { + int32 nation = (int32)lua_tointeger(L, -1); + switch(nation) + { + case 0: rank = PChar->profile.rank[nation]; break; // San d'Oria + case 1: rank = PChar->profile.rank[nation]; break; // Bastok + case 2: rank = PChar->profile.rank[nation]; break; // Windurst + default: rank = PChar->profile.rank[PChar->profile.nation]; break; // Invalid value passed. Default to players nation. + } + } + + rank = PChar->profile.rank[PChar->profile.nation]; + lua_pushinteger( L, rank); + return 1; } } lua_pushnil(L); @@ -1049,7 +1074,7 @@ uint8 LogID = (uint8)lua_tointeger(L,1); uint8 MissionID = (uint8)lua_tointeger(L,2); - if (LogID < 6 && MissionID < 64) + if (LogID < MAX_MISSIONAREA && MissionID < MAX_MISSIONID) { CCharEntity* PChar = (CCharEntity*)m_PBaseEntity; @@ -1086,7 +1111,7 @@ uint8 LogID = (uint8)lua_tointeger(L,1); uint8 MissionID = (uint8)lua_tointeger(L,2); - if (LogID < 6 && MissionID < 64) + if (LogID < MAX_MISSIONAREA && MissionID < MAX_MISSIONID) { CCharEntity* PChar = (CCharEntity*)m_PBaseEntity; @@ -1131,7 +1156,7 @@ bool complete = false; - if (LogID < 6 && MissionID < 64) + if (LogID < MAX_MISSIONAREA && MissionID < MAX_MISSIONID) { complete = ((CCharEntity*)m_PBaseEntity)->m_missionLog[LogID].complete[MissionID]; } @@ -1159,7 +1184,7 @@ uint8 LogID = (uint8)lua_tointeger(L,1); uint8 MissionID = 0; - if (LogID < 6) + if (LogID < MAX_MISSIONAREA) { MissionID = (uint8)((CCharEntity*)m_PBaseEntity)->m_missionLog[LogID].current; } @@ -1188,7 +1213,7 @@ uint8 LogID = (uint8)lua_tointeger(L,1); uint8 MissionID = (uint8)lua_tointeger(L,2); - if (LogID < 6 && MissionID < 64) + if (LogID < MAX_MISSIONAREA && MissionID < MAX_MISSIONID) { CCharEntity* PChar = (CCharEntity*)m_PBaseEntity; @@ -1720,7 +1745,20 @@ if (m_PBaseEntity->animation == ANIMATION_HEALING) { ((CCharEntity*)m_PBaseEntity)->StatusEffectContainer->DelStatusEffect(EFFECT_HEALING); - } + } + + if (m_PBaseEntity->animation == ANIMATION_CHOCOBO) + { + m_PBaseEntity->animation = ANIMATION_NONE; + + if (m_PBaseEntity->objtype == TYPE_PC) + { + ((CCharEntity*)m_PBaseEntity)->pushPacket(new CCharUpdatePacket((CCharEntity*)m_PBaseEntity)); + } else { + m_PBaseEntity->loc.zone->PushPacket(m_PBaseEntity, CHAR_INRANGE, new CEntityUpdatePacket(m_PBaseEntity,ENTITY_UPDATE)); + } + } + uint16 EventID = (uint16)lua_tointeger(L,1); uint32 param0 = 0; @@ -3746,6 +3784,18 @@ return 0; } +inline int32 CLuaBaseEntity::getMerits(lua_State *L) +{ + DSP_DEBUG_BREAK_IF(m_PBaseEntity == NULL); + DSP_DEBUG_BREAK_IF(m_PBaseEntity->objtype != TYPE_PC); + + CCharEntity* PChar = (CCharEntity*)m_PBaseEntity; + + lua_pushinteger( L, PChar->PMeritPoints->GetMeritPoints() ); + + return 1; +} + //==========================================================// inline int32 CLuaBaseEntity::showPosition(lua_State *L) @@ -3780,6 +3830,17 @@ return 0; } +inline int32 CLuaBaseEntity::setDebugFlag(lua_State *L) +{ + DSP_DEBUG_BREAK_IF(m_PBaseEntity == NULL); + DSP_DEBUG_BREAK_IF(m_PBaseEntity->objtype != TYPE_PC); + + DSP_DEBUG_BREAK_IF(lua_isnil(L,1) || !lua_isnumber(L,1)); + + ((CCharEntity*)m_PBaseEntity)->nameflags.flags = (uint32)lua_tointeger(L,1); + ((CCharEntity*)m_PBaseEntity)->pushPacket(new CCharUpdatePacket((CCharEntity*)m_PBaseEntity)); + return 0; +} /************************************************************************ * * * Устанавливаем/запрашиваем флаг выхода из MogHouse * @@ -5221,6 +5282,7 @@ LUNAR_DECLARE_METHOD(CLuaBaseEntity,addTP), LUNAR_DECLARE_METHOD(CLuaBaseEntity,delTP), LUNAR_DECLARE_METHOD(CLuaBaseEntity,setTP), + LUNAR_DECLARE_METHOD(CLuaBaseEntity,updateHealth), LUNAR_DECLARE_METHOD(CLuaBaseEntity,getStat), LUNAR_DECLARE_METHOD(CLuaBaseEntity,getMaxHP), LUNAR_DECLARE_METHOD(CLuaBaseEntity,getMaxMP), @@ -5332,6 +5394,7 @@ LUNAR_DECLARE_METHOD(CLuaBaseEntity,setMod), LUNAR_DECLARE_METHOD(CLuaBaseEntity,delMod), LUNAR_DECLARE_METHOD(CLuaBaseEntity,setFlag), + LUNAR_DECLARE_METHOD(CLuaBaseEntity,setDebugFlag), LUNAR_DECLARE_METHOD(CLuaBaseEntity,moghouseFlag), LUNAR_DECLARE_METHOD(CLuaBaseEntity,injectPacket), LUNAR_DECLARE_METHOD(CLuaBaseEntity,showPosition), @@ -5362,6 +5425,7 @@ LUNAR_DECLARE_METHOD(CLuaBaseEntity,changeJob), LUNAR_DECLARE_METHOD(CLuaBaseEntity,changesJob), LUNAR_DECLARE_METHOD(CLuaBaseEntity,setMerits), + LUNAR_DECLARE_METHOD(CLuaBaseEntity,getMerits), LUNAR_DECLARE_METHOD(CLuaBaseEntity,getWeaponDmg), LUNAR_DECLARE_METHOD(CLuaBaseEntity,getOffhandDmg), LUNAR_DECLARE_METHOD(CLuaBaseEntity,openDoor), Index: src/map/lua/lua_baseentity.h =================================================================== --- src/map/lua/lua_baseentity.h (revision 2121) +++ src/map/lua/lua_baseentity.h (working copy) @@ -106,6 +106,7 @@ int32 addTP(lua_State*); // Modify tp of Entity +/- int32 delTP(lua_State*); // Subtract tp of Entity int32 setTP(lua_State*); // Set tp of Entity to value + int32 updateHealth(lua_State*); // Used to ensure the player stats are updated in real time int32 getRangedDmg(lua_State*); // Get ranged weapon DMG rating int32 getAmmoDmg(lua_State*); // Get ammo DMG rating int32 getRATT(lua_State*); // Get total r.attack @@ -299,6 +300,7 @@ int32 needToZone(lua_State*); // Check if player has zoned since the flag has been raised int32 setFlag(lua_State*); + int32 setDebugFlag(lua_State*); int32 moghouseFlag(lua_State*); int32 showPosition(lua_State*); // Display current position of character int32 injectPacket(lua_State*); // Send the character a packet kept in a file @@ -310,6 +312,7 @@ int32 setsLevel(lua_State*); // sets the character's level int32 changeJob(lua_State*); // changes the job of a char (testing only!) int32 setMerits(lua_State*); // set merits (testing only!) + int32 getMerits(lua_State*); int32 changesJob(lua_State*); // changes the sub job of a char (testing only!) int32 getWeaponDmg(lua_State*); // gets the current equipped weapons' DMG rating int32 getOffhandDmg(lua_State*); // gets the current equipped offhand's DMG rating (used in WS calcs) Index: src/map/lua/luautils.cpp =================================================================== --- src/map/lua/luautils.cpp (revision 2121) +++ src/map/lua/luautils.cpp (working copy) @@ -58,7 +58,7 @@ #include "../packets/char.h" #include "../packets/menu_raisetractor.h" #include "../packets/message_basic.h" -#include "../packets/uncnown_39.h" +#include "../packets/unknown_39.h" namespace luautils { @@ -83,6 +83,7 @@ lua_register(LuaHandle,"setMobPos",luautils::setMobPos); lua_register(LuaHandle,"SpawnMob",luautils::SpawnMob); lua_register(LuaHandle,"DespawnMob",luautils::DespawnMob); + lua_register(LuaHandle,"SpawnNPC",luautils::SpawnNPC); lua_register(LuaHandle,"GetPlayerByName",luautils::GetPlayerByName); lua_register(LuaHandle,"GetMobAction",luautils::GetMobAction); lua_register(LuaHandle,"VanadielTOTD",luautils::VanadielTOTD); @@ -98,7 +99,7 @@ lua_register(LuaHandle,"RunElevator",luautils::StartElevator); lua_register(LuaHandle,"GetServerVariable",luautils::GetServerVariable); lua_register(LuaHandle,"SetServerVariable",luautils::SetServerVariable); - lua_register(LuaHandle,"SendUncnown0x39Packet",luautils::SendUncnown0x39Packet); + lua_register(LuaHandle,"SendUnknown0x39Packet",luautils::SendUnknown0x39Packet); lua_register(LuaHandle,"GetMobRespawnTime",luautils::GetMobRespawnTime); lua_register(LuaHandle,"DeterMob",luautils::DeterMob); @@ -153,7 +154,7 @@ * * ************************************************************************/ -int32 SendUncnown0x39Packet(lua_State* L) +int32 SendUnknown0x39Packet(lua_State* L) { if((!lua_isnil(L,1) && lua_isnumber(L,1)) && (!lua_isnil(L,2) && lua_isnumber(L,2)) ) @@ -165,7 +166,7 @@ if (PNpc != NULL) { - PNpc->loc.zone->PushPacket(PNpc, CHAR_INRANGE, new CUncnown0x39Packet(PNpc, param)); + PNpc->loc.zone->PushPacket(PNpc, CHAR_INRANGE, new CUnknown0x39Packet(PNpc, param)); } return 0; } @@ -451,6 +452,40 @@ /************************************************************************ * * +* Spawn a NPC using mob ID. * +* * +************************************************************************/ + +int32 SpawnNPC(lua_State* L) +{ + if( !lua_isnil(L,1) && lua_isnumber(L,1) ) + { + uint32 npcid = (uint32)lua_tointeger(L,1); + + zoneutils::LoadNPC(npcid); + + CNpcEntity* PNpc = (CNpcEntity*)zoneutils::GetEntity(npcid, TYPE_NPC); + if (PNpc != NULL) + { + lua_pushstring(L,CLuaBaseEntity::className); + lua_gettable(L,LUA_GLOBALSINDEX); + lua_pushstring(L,"new"); + lua_gettable(L,-2); + lua_insert(L,-2); + lua_pushlightuserdata(L,(void*)PNpc); + lua_pcall(L,2,1,0); + return 1; + } else { + ShowDebug(CL_RED"SpawnNPC: npc <%u> not found\n" CL_RESET, npcid); + } + return 0; + } + lua_pushnil(L); + return 1; +} + +/************************************************************************ +* * * set a mobs position * * * ************************************************************************/ @@ -591,7 +626,7 @@ * * ************************************************************************/ -int32 OnZoneInitialise(uint8 ZoneID) +int32 OnZoneInitialize(uint8 ZoneID) { CZone* PZone = zoneutils::GetZone(ZoneID); @@ -605,7 +640,7 @@ if( luaL_loadfile(LuaHandle,File) || lua_pcall(LuaHandle,0,0,0) ) { - //ShowError("luautils::OnZoneInitialise: %s\n",lua_tostring(LuaHandle,-1)); + //ShowError("luautils::OnZoneInitialize: %s\n",lua_tostring(LuaHandle,-1)); lua_pop(LuaHandle, 1); return -1; } @@ -613,7 +648,7 @@ lua_getfield(LuaHandle, LUA_GLOBALSINDEX, "onInitialize"); if( lua_isnil(LuaHandle,-1) ) { - ShowError("luautils::OnZoneInitialise: undefined procedure onInitialize\n"); + ShowError("luautils::OnZoneInitialize: undefined procedure onInitialize\n"); return -1; } @@ -879,9 +914,16 @@ if (luaL_loadfile(LuaHandle, PChar->m_event.Script.c_str()) || lua_pcall(LuaHandle, 0, 0, 0)) { - ShowError("luautils::OnEventUpdate: %s\n", lua_tostring(LuaHandle, -1)); + int8 File[255]; + memset(File,0,sizeof(File)); + snprintf(File, sizeof(File), "scripts/zones/%s/Zone.lua", PChar->loc.zone->GetName()); + + if( luaL_loadfile(LuaHandle,File) || lua_pcall(LuaHandle,0,0,0) ) + { + ShowError("luautils::OnEventUpdate %s\n", lua_tostring(LuaHandle, -1)); lua_pop(LuaHandle, 1); return -1; + } } lua_getfield(LuaHandle, LUA_GLOBALSINDEX, "onEventUpdate"); @@ -919,9 +961,16 @@ if (luaL_loadfile(LuaHandle, PChar->m_event.Script.c_str()) || lua_pcall(LuaHandle, 0, 0, 0)) { + int8 File[255]; + memset(File,0,sizeof(File)); + snprintf(File, sizeof(File), "scripts/zones/%s/Zone.lua", PChar->loc.zone->GetName()); + + if( luaL_loadfile(LuaHandle,File) || lua_pcall(LuaHandle,0,0,0) ) + { ShowError("luautils::OnEventFinish %s\n", lua_tostring(LuaHandle, -1)); lua_pop(LuaHandle, 1); return -1; + } } lua_getfield(LuaHandle, LUA_GLOBALSINDEX, "onEventFinish"); @@ -950,6 +999,14 @@ PChar->pushPacket(new CRaiseTractorMenuPacket(PChar,TYPE_HOMEPOINT)); PChar->loc.zone->PushPacket(PChar, CHAR_INRANGE, new CCharPacket(PChar,ENTITY_UPDATE)); } + + + if (PChar->StatusEffectContainer->HasStatusEffect(EFFECT_CHOCOBO)) + { + PChar->animation = ANIMATION_CHOCOBO; + PChar->pushPacket(new CCharUpdatePacket(PChar)); + } + return (!lua_isnil(LuaHandle,-1) && lua_isnumber(LuaHandle,-1) ? (int32)lua_tonumber(LuaHandle,-1) : 0); } Index: src/map/lua/luautils.h =================================================================== --- src/map/lua/luautils.h (revision 2121) +++ src/map/lua/luautils.h (working copy) @@ -50,7 +50,7 @@ int32 free(); int32 print(lua_State*); - int32 SendUncnown0x39Packet(lua_State*); // временное решение для работы гейзеров в Dangruf_Wadi + int32 SendUnknown0x39Packet(lua_State*); // временное решение для работы гейзеров в Dangruf_Wadi int32 GetNPCByID(lua_State*); // Returns NPC By Id int32 GetMobByID(lua_State*); // Returns Mob By Id @@ -59,6 +59,7 @@ int32 SpawnMob(lua_State*); // Spawn Mob By Mob Id - NMs, BCNM... int32 DespawnMob(lua_State*); // Despawn (Fade Out) Mob By Id + int32 SpawnNPC(lua_State*); // Spawn Mob By NPC Id - NMs, BCNM... int32 GetPlayerByName(lua_State*); // Gets Player ref from a name supplied int32 GetMobAction(lua_State*); // Get Mobs current action int32 VanadielTOTD(lua_State*); // текущее игровое время суток @@ -78,7 +79,7 @@ int32 OnGameIn(CCharEntity* PChar); // int32 OnZoneIn(CCharEntity* PChar); // triggers when a player zones into a zone - int32 OnZoneInitialise(uint8 ZoneID); // triggers when zone is loaded + int32 OnZoneInitialize(uint8 ZoneID); // triggers when zone is loaded int32 OnRegionEnter(CCharEntity* PChar, CRegion* PRegion); // when player enters a region of a zone int32 OnRegionLeave(CCharEntity* PChar, CRegion* Pregion); // when player leaves a region of a zone int32 OnTransportEvent(CCharEntity* PChar, uint32 TransportID); Index: src/map/map.cpp =================================================================== --- src/map/map.cpp (revision 2121) +++ src/map/map.cpp (working copy) @@ -808,6 +808,7 @@ map_config.server_message = ""; map_config.buffer_size = 1800; map_config.exp_rate = 1.0f; + map_config.exp_loss_rate = 1.0f; map_config.exp_retain = 0.0f; map_config.exp_loss_level = 4; map_config.speed_mod = 0; @@ -819,6 +820,26 @@ map_config.lightluggage_block = 4; map_config.max_time_lastupdate = 60000; map_config.newstyle_skillups = 7; + map_config.engage_dist_mod = 1.0f; + map_config.magic_dist_mod = 1.0f; + map_config.ranged_dist_mod = 1.0f; + map_config.remove_engage_delay = 0; + map_config.magic_movement = 0; + map_config.seal_crest_bonus = 0; + map_config.always_seal_crest = 0; + map_config.drop_rate_bonus = 0; + map_config.all_mobs_drop_gil = 0; + map_config.gil_bonus = 1; + map_config.chain_on_easy = 0; + map_config.chain_bonus = 1; + map_config.craft_skill_onfail = 0; + map_config.craft_skillamt = 0; + map_config.conquest_bonus = 1; + map_config.conquest_constant = 0; + map_config.craft_success = 1; + map_config.debugging_commands = 0; + map_config.notorious_hp_mod = 2.5f; + map_config.notorious_hp_mod = 2.5f; return 0; } @@ -872,7 +893,7 @@ { map_config.usMapPort = (atoi(w2)); } - else if (strcmp(w1,"buff_maxsize") == 0) + else if (strcmp(w1,"buffer_size") == 0) { map_config.buffer_size = atoi(w2); } @@ -982,6 +1003,86 @@ { map_config.newstyle_skillups = atoi(w2); } + else if (strcmp(w1,"engage_dist_mod") == 0) + { + map_config.engage_dist_mod = atoi(w2); + } + else if (strcmp(w1,"magic_dist_mod") == 0) + { + map_config.magic_dist_mod = atoi(w2); + } + else if (strcmp(w1,"ranged_dist_mod") == 0) + { + map_config.ranged_dist_mod = atoi(w2); + } + else if (strcmp(w1,"remove_engage_delay") == 0) + { + map_config.remove_engage_delay = atoi(w2); + } + else if (strcmp(w1,"magic_movement") == 0) + { + map_config.magic_movement = atoi(w2); + } + else if (strcmp(w1,"seal_crest_bonus") == 0) + { + map_config.seal_crest_bonus = atoi(w2); + } + else if (strcmp(w1,"always_seal_crest") == 0) + { + map_config.always_seal_crest = atoi(w2); + } + else if (strcmp(w1,"drop_rate_bonus") == 0) + { + map_config.drop_rate_bonus = atoi(w2); + } + else if (strcmp(w1,"all_mobs_drop_gil") == 0) + { + map_config.all_mobs_drop_gil = atoi(w2); + } + else if (strcmp(w1,"gil_bonus") == 0) + { + map_config.gil_bonus = atoi(w2); + } + else if (strcmp(w1,"chain_on_easy") == 0) + { + map_config.chain_on_easy = atoi(w2); + } + else if (strcmp(w1,"chain_bonus") == 0) + { + map_config.chain_bonus = atoi(w2); + } + else if (strcmp(w1,"craft_skill_onfail") == 0) + { + map_config.craft_skill_onfail = atoi(w2); + } + else if (strcmp(w1,"craft_skillamt") == 0) + { + map_config.craft_skillamt = atoi(w2); + } + else if (strcmp(w1,"conquest_bonus") == 0) + { + map_config.conquest_bonus = atoi(w2); + } + else if (strcmp(w1,"conquest_constant") == 0) + { + map_config.conquest_constant = atoi(w2); + } + else if (strcmp(w1,"craft_success") == 0) + { + map_config.craft_success = atoi(w2); + } + else if (strcmp(w1,"debugging_commands") == 0) + { + map_config.craft_success = atoi(w2); + } + else if (strcmp(w1,"notorious_hp_mod") == 0) + { + map_config.notorious_hp_mod = atoi(w2); + } + else if (strcmp(w1,"notorious_mp_mod") == 0) + { + map_config.notorious_mp_mod = atoi(w2); + } else { ShowWarning(CL_YELLOW"Unknown setting '%s' in file %s\n" CL_RESET, w1, cfgName); Index: src/map/map.h =================================================================== --- src/map/map.h (revision 2121) +++ src/map/map.h (working copy) @@ -87,6 +87,26 @@ float mob_tp_multiplier; // Multiplies the amount of TP mobs gain on any effect that would grant TP float player_tp_multiplier; // Multiplies the amount of TP players gain on any effect that would grant TP uint8 newstyle_skillups; // Allows failed parries and blocks to trigger skill up chance. + float engage_dist_mod; // Default is 1. Multiplies the distance that you can engage a target. Change to 3 for 3x the distance. + float magic_dist_mod; // Default is 1. Multiplies the distance that you can cast magic on a target. Change to 3 for 3x the distance. + float ranged_dist_mod; // Default is 1. Multiplies the distance that you can used ranged attack on a target. Change to 3 for 3x the distance. + int8 remove_engage_delay; // Default is 0. This removes the engegement delay that happens just after killing a target, or after equipping a weapon. + float magic_movement; // Default is 0. Allows movement while magic casting. + int16 seal_crest_bonus; // Increases chance of exp mobs dropping seals or crests. Set from 0 - 60. + int8 always_seal_crest; // Allows non exp beastman mobs to drop seals and crests. Default is 0. Set to 1 for non exp beastman mobs to drop seals and crests. + int8 drop_rate_bonus; // Adds to the drop rate percentate. Set to 20 to add additional %20 drop rate on all drops. + int8 all_mobs_drop_gil; // Set to 1 to allow all mobs to drop gil. Currently does not display ingame messages for these gil drops. Default is 0. + int16 gil_bonus; // Multiplies the amount of gil dropped + int8 chain_on_easy; // Allows exp chain on any exp mob + int8 chain_bonus; // Increases the time frame allowed to get an exp chain. Default is 1. + int8 craft_skill_onfail; // Allows same skillup on chance for failures as crafting successes have. Default is 0. + int8 craft_skillamt; // Increases the chance of getting larger skillups while crafting. Set 0 to 100. Default 0. + int8 conquest_bonus; // Multiplies the amount of conquest points earned on an exp mob kill. Default is 1 + int8 conquest_constant; // Sets 1 nation and owner of all regions. 0 = off, 1 = Sandoria, 2 = Bastok, 3 = Windurst, 4 = Beastmen. Default is 0. + int16 craft_success; // Increases the chance of succeding at crafting. Default 1. + int8 debugging_commands; // Enables GM commands for everyone. + float notorious_hp_mod; // Multiplier to NM HP. + float notorious_mp_mod; // Multiplier to NM HP. }; /************************************************************************ Index: src/map/mobutils.cpp =================================================================== --- src/map/mobutils.cpp (revision 2121) +++ src/map/mobutils.cpp (working copy) @@ -101,9 +101,9 @@ if(PMob->HPmodifier == 0){ PMob->health.maxhp = (int16)(18.2 * pow(PMob->GetMLevel(),1.2675)); if(PMob->m_Type & MOBTYPE_NOTORIOUS){ - PMob->health.maxhp *= 2.5; + PMob->health.maxhp *= (map_config.notorious_hp_mod); if(PMob->GetMLevel()>75){ - PMob->health.maxhp *= 2.5; + PMob->health.maxhp *= (map_config.notorious_hp_mod); } } } else { @@ -122,9 +122,9 @@ if(PMob->MPmodifier == 0){ PMob->health.maxmp = (int16)(18.2 * pow(PMob->GetMLevel(),1.2675)); if(PMob->m_Type & MOBTYPE_NOTORIOUS){ - PMob->health.maxmp *= 2.5; + PMob->health.maxmp *= (map_config.notorious_mp_mod); if(PMob->GetMLevel()>75){ - PMob->health.maxmp *= 2.5; + PMob->health.maxmp *= (map_config.notorious_hp_mod); } } } else { Index: src/map/packet_system.cpp =================================================================== --- src/map/packet_system.cpp (revision 2121) +++ src/map/packet_system.cpp (working copy) @@ -178,10 +178,10 @@ /************************************************************************ * * -* Вход в зону * +* Log into the zone * * * -* Обновляем sessionkey и порт клиента при каждом переходе между зонами * -* Мы должны оставлять правильный ключ при переходе с сервера на сервер * +* Update sessionkey and client port at each transition between zones * +* We need to keep the correct key when moving from server to server * * * ************************************************************************/ @@ -189,7 +189,7 @@ { WBUFL(data,(0x5C)) = 0; - bool firstlogin = false; // временное решение, до появления PlayTime + bool firstlogin = false; // temporary solution until PlayTime PChar->clearPacketList(); @@ -235,13 +235,23 @@ PChar->m_ZonesList[PChar->getZone() >> 3] |= (1 << (PChar->getZone()%8)); const int8* fmtQuery = "UPDATE accounts_sessions SET targid = %u, session_key = x'%s', server_addr = %u, client_port = %u WHERE charid = %u"; - + + if(PChar->id > 40000) // External Accounts are assigned much higher IDs. + { Sql_Query(SqlHandle,fmtQuery, PChar->targid, session_key, - PChar->loc.zone->GetIP(), + PChar->loc.zone->GetWANIP(), session->client_port, PChar->id); + } else { + Sql_Query(SqlHandle,fmtQuery, + PChar->targid, + session_key, + PChar->loc.zone->GetLANIP(), + session->client_port, + PChar->id); + } // set new characters merits to zero on char creation @@ -1302,9 +1312,9 @@ /************************************************************************ * * -* Отправляем приветственное сообщение сервера. * -* По умолчанию появится сообщение <<< Welcome to "server name" >>> + * -* можно отправить дополнительные строки информации в размере 230 байт * +* We send a welcome message server. * +* By default, the message <<< Welcome to "server name" >>> + * +* You can send additional information line at a rate of 230 bytes * * * ************************************************************************/ @@ -1888,11 +1898,12 @@ void SmallPacket0x05A(map_session_data_t* session, CCharEntity* PChar, int8* data) { + // Refresh the amount of conquest points the player has to correctly reflect on the map. PChar->pushPacket(new CConquestPacket(PChar)); PChar->pushPacket(new CCampaingPacket(PChar,0)); PChar->pushPacket(new CCampaingPacket(PChar,1)); - // пакет не на своем месте, возможно 0x0F + // the package is not in place, may 0x0F PChar->pushPacket(new CStopDownloadingPacket(PChar)); return; } @@ -2005,7 +2016,8 @@ PChar->status = STATUS_UPDATE; return; }else{ - if (zoneutils::GetZone(PZoneLine->m_toZone)->GetIP() == 0) // разворачиваем персонажа на 180° и отправляем туда, откуда пришел + if (zoneutils::GetZone(PZoneLine->m_toZone)->GetLANIP() == 0 || + zoneutils::GetZone(PZoneLine->m_toZone)->GetWANIP() == 0) // разворачиваем персонажа на 180° и отправляем туда, откуда пришел { ShowDebug(CL_CYAN"SmallPacket0x5E: Zone %u closed to chars\n" CL_RESET, PZoneLine->m_toZone); @@ -2082,7 +2094,7 @@ /************************************************************************ * * -* Завершение раскопок chocobo (chocobo gigging) * +* Завершение раскопок chocobo (chocobo digging) * * * ************************************************************************/ @@ -2626,6 +2638,40 @@ /************************************************************************ * * +* Buy an item from a guild * +* * +************************************************************************/ + +void SmallPacket0x0AA(map_session_data_t* session, CCharEntity* PChar, int8* data) +{ + uint8 quantity = RBUFB(data,(0x04)); + uint8 guildSlotID = RBUFB(data,(0x0A)); + + uint16 itemID = PChar->Container->getItemID(guildSlotID); + uint32 price = PChar->Container->getQuantity(guildSlotID); + + CItem* gil = PChar->getStorage(LOC_INVENTORY)->GetItem(0); + + if ((gil != NULL) && (gil->getType() & ITEM_CURRENCY)) + { + if (gil->getQuantity() > (price * quantity)) + { + uint8 SlotID = charutils::AddItem(PChar, LOC_INVENTORY, itemID, quantity); + + if (SlotID != ERROR_SLOTID) + { + charutils::UpdateItem(PChar, LOC_INVENTORY, 0, -(int32)(price * quantity)); + + PChar->pushPacket(new CShopBuyPacket(guildSlotID, quantity)); + PChar->pushPacket(new CInventoryFinishPacket()); + } + } + } + return; +} + +/************************************************************************ +* * * Отправляем персонажу список продаваемых гильдией предметов * * * ************************************************************************/ @@ -3150,22 +3196,82 @@ } else { - uint32 baseExp = charutils::GetRealExp(PChar->GetMLevel(),PTarget->GetMLevel()); - + uint32 baseExp = charutils::GetRealExp(PChar->GetMLevel(),PTarget->GetMLevel()); + uint16 charEva = (PChar->getMod(MOD_EVA) * (100 + PChar->getMod(MOD_EVAP)))/100 + PChar->AGI()/2; + uint16 charDef = PChar->DEF(); + uint16 mobEva = (PTarget->getMod(MOD_EVA) * (100 + PTarget->getMod(MOD_EVAP)))/100 + PTarget->AGI()/2; + uint16 mobDef = PTarget->DEF(); + if(baseExp >= 400) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x46, 174)); } } else if(baseExp >= 240) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x45, 174)); } } else if(baseExp >= 120) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x44, 174)); } } else if(baseExp == 100) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x43, 174)); } } else if(baseExp >= 75) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x42, 174)); } } else if(baseExp >= 15) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x41, 174)); } } else if(baseExp == 0) { - PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 174)); + if(mobDef > charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 170)); } + else if(mobDef == charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 171)); } + else if(mobDef < charDef && mobEva > charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 172)); } + else if(mobDef > charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 173)); } + else if(mobDef < charDef && mobEva == charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 175)); } + else if(mobDef > charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 176)); } + else if(mobDef == charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 177)); } + else if(mobDef < charDef && mobEva < charEva) { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 178)); } + else { PChar->pushPacket(new CMessageBasicPacket(PChar, PTarget, 0, 0x40, 174)); } } } } @@ -3677,10 +3783,9 @@ charutils::CheckEquipLogic(PChar, SCRIPT_CHANGESJOB, prevsjob); } + charutils::CheckValidEquipment(PChar); // TODO: разобраться, зачем + - charutils::RemoveAllEquipment(PChar); // TODO: разобраться, зачем - - charutils::BuildingCharSkillsTable(PChar); charutils::CalculateStats(PChar); charutils::BuildingCharTraitsTable(PChar); @@ -3711,7 +3816,7 @@ /************************************************************************ * * -* Устанавливаем активные заклинания синего мага, модифицируем автомат * +* Set the active blue mage spells, modify machine * * * ************************************************************************/ @@ -4025,7 +4130,7 @@ PacketSize[0x0A0] = 0x00; PacketParser[0x0A0] = &SmallPacket0xFFF; // not implemented PacketSize[0x0A1] = 0x00; PacketParser[0x0A1] = &SmallPacket0xFFF; // not implemented PacketSize[0x0A2] = 0x00; PacketParser[0x0A2] = &SmallPacket0x0A2; - PacketSize[0x0AA] = 0x00; PacketParser[0x0AA] = &SmallPacket0xFFF; // not implemented + PacketSize[0x0AA] = 0x00; PacketParser[0x0AA] = &SmallPacket0x0AA; PacketSize[0x0AB] = 0x00; PacketParser[0x0AB] = &SmallPacket0x0AB; PacketSize[0x0AC] = 0x00; PacketParser[0x0AC] = &SmallPacket0xFFF; // not implemented PacketSize[0x0AD] = 0x00; PacketParser[0x0AD] = &SmallPacket0x0AD; Index: src/map/packets/server_ip.cpp =================================================================== --- src/map/packets/server_ip.cpp (revision 2121) +++ src/map/packets/server_ip.cpp (working copy) @@ -33,6 +33,15 @@ this->size = 0x0E; WBUFB(data,(0x04)-4) = type; - WBUFL(data,(0x08)-4) = PChar->loc.zone->GetIP(); + + if(PChar->id > 40000) // External Accounts are assigned much higher IDs. + { + WBUFL(data,(0x08)-4) = PChar->loc.zone->GetWANIP(); + } + else + { + WBUFL(data,(0x08)-4) = PChar->loc.zone->GetLANIP(); + } + WBUFW(data,(0x0C)-4) = PChar->loc.zone->GetPort(); } Index: src/map/packets/unknown_39.cpp =================================================================== --- src/map/packets/unknown_39.cpp (revision 0) +++ src/map/packets/unknown_39.cpp (working copy) @@ -0,0 +1,46 @@ +/* +=========================================================================== + + Copyright (c) 2010-2012 DarkStar Dev Teams + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/ + + This file is part of DarkStar-server source code. + +=========================================================================== +*/ + +#include "../../common/socket.h" + +#include "../baseentity.h" + +#include "unknown_39.h" + + +CUnknown0x39Packet::CUnknown0x39Packet(CBaseEntity* PEntity, uint8 param) +{ + this->type = 0x39; + this->size = 0x0A; + + WBUFL(data,(0x04)-4) = PEntity->id; + WBUFL(data,(0x08)-4) = PEntity->id; + + WBUFL(data,(0x0C)-4) = 0x6B; + WBUFL(data,(0x0D)-4) = 0x6B; + WBUFL(data,(0x0E)-4) = 0x6A; + WBUFL(data,(0x0F)-4) = param; + + WBUFW(data,(0x10)-4) = PEntity->targid; + WBUFW(data,(0x12)-4) = PEntity->targid; +} \ No newline at end of file Index: src/map/packets/unknown_39.h =================================================================== --- src/map/packets/unknown_39.h (revision 0) +++ src/map/packets/unknown_39.h (working copy) @@ -0,0 +1,46 @@ +/* +=========================================================================== + + Copyright (c) 2010-2012 DarkStar Dev Teams + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/ + + This file is part of DarkStar-server source code. + +=========================================================================== +*/ + +#ifndef _CUNKNOWN39PACKET_H +#define _CUNKNOWN39PACKET_H + +#include "../../common/cbasetypes.h" + +#include "basic.h" + +/************************************************************************ +* * +* * +* * +************************************************************************/ + +class CBaseEntity; + +class CUnknown0x39Packet : public CBasicPacket +{ +public: + + CUnknown0x39Packet(CBaseEntity* PEntity, uint8 param); +}; + +#endif \ No newline at end of file Index: src/map/packets/zone_in.cpp =================================================================== --- src/map/packets/zone_in.cpp (revision 2121) +++ src/map/packets/zone_in.cpp (working copy) @@ -28,13 +28,14 @@ #include "zone_in.h" #include "../charentity.h" +#include "../charutils.h" #include "../vana_time.h" #include "../zoneutils.h" /************************************************************************ * * -* Кривое решение для вычисления ID MogHouse * -* Возможно необходим переход на uint16 формат зоны * +* Hacks to calculate ID MogHouse * +* It is possible to be a shift in the format uint16 zone * * * ************************************************************************/ @@ -74,14 +75,14 @@ this->type = 0x0A; this->size = 0x82; - // необходимо для работы manaklipper - // последние 8 байт похожи на время + // Need to work Manaclipper + // Last 8 bytes are like time //unsigned char packet [] = { //0x0D, 0x3A, 0x0C, 0x00, 0x11, 0x00, 0x19, 0x00, 0x02, 0xE4, 0x93, 0x10, 0x91, 0xE5, 0x93, 0x10}; // 0x2a = 0x10 //0x89, 0x39, 0x0C, 0x00, 0x19, 0x00, 0x07, 0x00, 0x5C, 0xE1, 0x93, 0x10, 0x81, 0xE3, 0x93, 0x10}; // 0x2a = 0x08 //memcpy(data + 0x70-4, &packet, 16); - //data[0x2A-4] = 0x08;//data[0x2A-4] = 0x80; // в зоне 3 управляет путями следования транспорта 0x10 и 0x08 + //data[0x2A-4] = 0x08;//data[0x2A-4] = 0x80; // Zone 3 controls transport routes following 0x10 and 0x08 WBUFL(data,(0x04)-4) = PChar->id; WBUFW(data,(0x08)-4) = PChar->targid; @@ -120,13 +121,13 @@ WBUFW(data,(0x60)-4) = PChar->loc.boundary; WBUFW(data,(0x68)-4) = PChar->loc.zone->GetWeather(); WBUFL(data,(0x6A)-4) = PChar->loc.zone->GetWeatherChangeTime(); - //WBUFL(data,(0x6C)-4) = PChar->loc.zone->GetWeather(); - //WBUFL(data,(0x70)-4) = PChar->loc.zone->GetWeatherChangeTime(); + WBUFL(data,(0x6C)-4) = PChar->loc.zone->GetWeather(); + WBUFL(data,(0x70)-4) = PChar->loc.zone->GetWeatherChangeTime(); if(csid != -1) { - //WBUFB(data,(0x1F)-4) = 4; // предположительно animation - //WBUFB(data,(0x20)-4) = 2; + WBUFB(data,(0x1F)-4) = 4; // предположительно animation + WBUFB(data,(0x20)-4) = 2; WBUFB(data,(0x40)-4) = PChar->getZone(); WBUFB(data,(0x62)-4) = PChar->getZone(); @@ -146,10 +147,10 @@ WBUFB(data,(0x42)-4) = PChar->getZone(); // to zone WBUFW(data,(0xAA)-4) = 0x01FF; WBUFB(data,(0xAC)-4) = csid > 0 ? 0x01 : 0x00; //if 0x01 then pause between zone - WBUFB(data,(0xAF)-4) = PChar->loc.zone->CanUseMisc(MISC_MOGMENU); // флаг, позволяет использовать mog menu за пределами mog house + WBUFB(data,(0xAF)-4) = PChar->loc.zone->CanUseMisc(MISC_MOGMENU); // flag allows mog menu outside mog house } - //WBUFL(data,(0x98)-4) = PChar->clientip; + WBUFL(data,(0x98)-4) = charutils::GetClientIP(PChar); WBUFL(data,(0xA0)-4) = 0x00000000; // время, проведенное персонажем в игре с момента создания WBUFL(data,(0xA4)-4) = 0x00000000; // оставшееся время до возрождения после смерти (формат времени неизвестен) Index: src/map/synthutils.cpp =================================================================== --- src/map/synthutils.cpp (revision 2121) +++ src/map/synthutils.cpp (working copy) @@ -331,6 +331,7 @@ if(synthDiff <= 0) { success = 0.95; + synthDiff -= map_config.craft_success; if((synthDiff <= 0) && (synthDiff >= -10)){ success -= (double)(PChar->Container->getType() == ELEMENT_LIGHTNING) * 0.2; @@ -354,7 +355,7 @@ ShowDebug(CL_CYAN"Success: %g Random: %g\n" CL_RESET, success, random); #endif - if(random < success) + if(random < (success + map_config.craft_success*.01)) { for(int32 i = 0; i < 3; ++i) { @@ -372,7 +373,7 @@ case 1: chance = 0.015; break; default: chance = 0.000; break; } - if(chance < random) + if((chance + map_config.craft_success*.01) < random) break; result += 1; hqtier -= 1; @@ -460,14 +461,14 @@ continue; } - uint8 skillRank = 9; //PChar->RealSkills.rank[skillID]; + uint8 skillRank = PChar->RealSkills.rank[skillID]; // 9 uint16 maxSkill = (skillRank+1)*100; int32 charSkill = PChar->RealSkills.skill[skillID]; int32 basDiff = PChar->Container->getQuantity(skillID-40) - charSkill/10; double synthDiff = getSynthDifficulty(PChar, skillID); - if ((basDiff <= 0) || ((basDiff > 5) && (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL))) // результат синтеза хранится в quantity нулевой ячейки + if (map_config.craft_skill_onfail == 0 && ((basDiff <= 0) || ((basDiff > 5) && (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL)))) // результат синтеза хранится в quantity нулевой ячейки { return 0; } @@ -475,19 +476,24 @@ if (charSkill < maxSkill) { double skillUpChance = (synthDiff*(map_config.craft_multiplier - (log(1.2 + charSkill/100) + MoonCorrection)))/10; - skillUpChance = skillUpChance/(1 + (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL)); // результат синтеза хранится в quantity нулевой ячейки + if (map_config.craft_skill_onfail == 0) + { + skillUpChance = skillUpChance/(1 + (PChar->Container->getQuantity(0) == SYNTHESIS_FAIL)); // результат синтеза хранится в quantity нулевой ячейки + } double random = rand() / ((double)RAND_MAX); #ifdef _DSP_SYNTH_DEBUG_MESSAGES_ ShowDebug(CL_CYAN"Skill up chance: %g Random: %g\n" CL_RESET, skillUpChance, random); #endif - if (random < skillUpChance) + if (random < (skillUpChance + map_config.craft_skillamt*.01)) { int32 satier = 0; int32 skillAmount = 1; double chance = 0; + synthDiff += (map_config.craft_skillamt*.1); + if((synthDiff >= 1) && (synthDiff < 3)){ satier = 1; }else if((synthDiff >= 3) && (synthDiff < 5)){ @@ -517,7 +523,7 @@ case 1: chance = 0.100; break; default: chance = 0.000; break; } - if(chance < random) + if((chance + map_config.craft_skillamt*.01) < random) break; skillAmount += 1; satier -= 1; @@ -795,7 +801,7 @@ doSynthFail(PChar); }else{ uint16 itemID = PChar->Container->getItemID(10 + m_synthResult); - uint8 quantity = PChar->Container->getInvSlotID(10 + m_synthResult); // к сожалению поле quantity занято + uint8 quantity = PChar->Container->getInvSlotID(10 + m_synthResult); // Unfortunately field quantity employed uint8 invSlotID = 0; uint8 nextSlotID = 0; @@ -824,7 +830,7 @@ } } - // TODO: перейти на новую функцию AddItem, чтобы не обновлять signature ручками + // TODO: move to a new function AddItem, not to update signature pens invSlotID = charutils::AddItem(PChar, LOC_INVENTORY, itemID, quantity); @@ -834,7 +840,7 @@ { if ((PItem->getFlag() & ITEM_FLAG_INSCRIBABLE) && (PChar->Container->getItemID(0) > 0x1080)) { - // TODO: вынести метод в uitls (добавить метод обратного действия) + // TODO: render method uitls (add a method reverse acting) uint8 signature[12]; for(uint8 currChar = 0; currChar <= PChar->name.size(); ++currChar) Index: src/map/transport.cpp =================================================================== --- src/map/transport.cpp (revision 2121) +++ src/map/transport.cpp (working copy) @@ -176,8 +176,8 @@ { uint32 VanaTime = CVanaTime::getInstance()->getDate(); - // в портовых зонах необходимо написать макросы на случай, если персонаж вышел из игры в корабле. - // при входе в игру он должен оказаться на пристани + // To the port areas to write macros in case the person got out of the ship. + // When entering the game, he should be in the dock for(uint32 i = 0; i < TransportList.size(); ++i) { Index: src/map/zone.cpp =================================================================== --- src/map/zone.cpp (revision 2121) +++ src/map/zone.cpp (working copy) @@ -22,8 +22,8 @@ */ // TODO: -// нужно разделить класс czone на базовый и наследников. уже нарисовались: Standard, Rezident, Instance и Dinamis -// у каждой из указанных зон особое поведение +// We have to divide the class czone the base and heirs. already drawn: Standard, Rezident, Instance and Dynamis +// In each of the areas of particular behavior #include "../common/showmsg.h" #include "../common/timer.h" @@ -141,11 +141,16 @@ return m_continentID; } -uint32 CZone::GetIP() +uint32 CZone::GetLANIP() { - return m_zoneIP; + return m_zoneLANIP; } +uint32 CZone::GetWANIP() +{ + return m_zoneWANIP; +} + uint16 CZone::GetPort() { return m_zonePort; @@ -315,7 +320,8 @@ const int8* Query = "SELECT " "zone.name," - "zone.zoneip," + "zone.lanip," + "zone.wanip," "zone.zoneport," "zone.music," "zone.battlesolo," @@ -335,15 +341,16 @@ { m_zoneName.insert(0, Sql_GetData(SqlHandle,0)); - m_zoneIP = (uint32)Sql_GetUIntData(SqlHandle,1); - m_zonePort = (uint16)Sql_GetUIntData(SqlHandle,2); - m_zoneMusic.m_song = (uint8)Sql_GetUIntData(SqlHandle,3); // background music - m_zoneMusic.m_bSongS = (uint8)Sql_GetUIntData(SqlHandle,4); // solo battle music - m_zoneMusic.m_bSongM = (uint8)Sql_GetUIntData(SqlHandle,5); // party battle music - m_tax = (uint16)(Sql_GetFloatData(SqlHandle,6) * 100); // tax for bazaar - m_miscMask = (uint16)Sql_GetUIntData(SqlHandle,7); + m_zoneLANIP = (uint32)Sql_GetUIntData(SqlHandle,1); + m_zoneWANIP = (uint32)Sql_GetUIntData(SqlHandle,2); + m_zonePort = (uint16)Sql_GetUIntData(SqlHandle,3); + m_zoneMusic.m_song = (uint8)Sql_GetUIntData(SqlHandle,4); // background music + m_zoneMusic.m_bSongS = (uint8)Sql_GetUIntData(SqlHandle,5); // solo battle music + m_zoneMusic.m_bSongM = (uint8)Sql_GetUIntData(SqlHandle,6); // party battle music + m_tax = (uint16)(Sql_GetFloatData(SqlHandle,7) * 100); // tax for bazaar + m_miscMask = (uint16)Sql_GetUIntData(SqlHandle,8); - if (Sql_GetData(SqlHandle,8) != NULL) // сейчас нельзя использовать bcnmid, т.к. они начинаются с нуля + if (Sql_GetData(SqlHandle,9) != NULL) // сейчас нельзя использовать bcnmid, т.к. они начинаются с нуля { m_InstanceHandler = new CInstanceHandler(m_zoneID); } @@ -557,7 +564,7 @@ if (PCurrentMob->m_EcoSystem == SYSTEM_ELEMENTAL) { - if (PCurrentMob->m_Element == Element[weather]) + if (PCurrentMob->m_Element == Element[weather] || PCurrentMob->getZone() == 0x82 || PCurrentMob->getZone() == 0xB2) // Weather OR RuAun { PCurrentMob->SetDespawnTimer(0); PCurrentMob->m_AllowRespawn = true; @@ -664,7 +671,7 @@ } } - // TODO: могут возникать проблемы с переходом между одной и той же зоной (zone == prevzone) + // TODO: there can be problems with the transition between one and the same zone (zone == prevzone) m_charList.erase(PChar->targid); ShowDebug(CL_CYAN"CZone:: %s DecreaseZoneCounter <%u> %s\n" CL_RESET, GetName(), m_charList.size(),PChar->GetName()); @@ -812,7 +819,8 @@ SpawnIDList_t::iterator MOB = PChar->SpawnMOBList.lower_bound(PCurrentMob->id); float CurrentDistance = distance(PChar->loc.p, PCurrentMob->loc.p); - + float VerticalDistance = abs(PCurrentMob->loc.p.y - PChar->loc.p.y); + if (PCurrentMob->status == STATUS_UPDATE && CurrentDistance < 50) { @@ -838,7 +846,8 @@ { if (PChar->animation != ANIMATION_CHOCOBO && (PChar->animation == ANIMATION_HEALING || - (int8)(PChar->GetMLevel() - PCurrentMob->GetMLevel()) < 10)) + (int8)(PChar->GetMLevel() - PCurrentMob->GetMLevel()) < 10) && + (VerticalDistance < 8)) { if (PCurrentMob->m_Behaviour & BEHAVIOUR_AGGRO_SIGHT && !(PChar->StatusEffectContainer->HasStatusEffect(EFFECT_INVISIBLE) || Index: src/map/zone.h =================================================================== --- src/map/zone.h (revision 2121) +++ src/map/zone.h (working copy) @@ -411,7 +411,8 @@ ZONEID GetID(); REGIONTYPE GetRegionID(); CONTINENTTYPE GetContinentID(); - uint32 GetIP(); + uint32 GetWANIP(); + uint32 GetLANIP(); uint16 GetPort(); uint16 GetTax(); WEATHER GetWeather(); @@ -471,7 +472,8 @@ CONTINENTTYPE m_continentID; // ID континента string_t m_zoneName; // имя зоны uint16 m_zonePort; // порт зоны - uint32 m_zoneIP; // IP зоны + uint32 m_zoneLANIP; // IP + uint32 m_zoneWANIP; // IP WEATHER m_Weather; // текущая погода uint32 m_WeatherChangeTime; // время начала текущей погоды Index: src/map/zoneutils.cpp =================================================================== --- src/map/zoneutils.cpp (revision 2121) +++ src/map/zoneutils.cpp (working copy) @@ -64,7 +64,7 @@ * * ************************************************************************/ -// TOTO: общая погода для нескольких зон +// TOTO: general weather for multiple zones void UpdateWeather() { @@ -89,7 +89,7 @@ } } } - ShowDebug(CL_CYAN"UpdateWeather Finished\n"CL_RESET); + //ShowDebug(CL_CYAN"UpdateWeather Finished\n"CL_RESET); } /************************************************************************ @@ -234,6 +234,69 @@ } } +void LoadNPC(uint16 NpcID) +{ + const int8* Query = + "SELECT \ + npcid,\ + name,\ + pos_rot,\ + pos_x,\ + pos_y,\ + pos_z,\ + flag,\ + speed,\ + speedsub,\ + animation,\ + animationsub,\ + namevis,\ + status,\ + unknown,\ + look,\ + name_prefix,\ + zoneid\ + FROM npc_list \ + WHERE npcid = %u;"; + + int32 ret = Sql_Query(SqlHandle, Query, NpcID); + + if( ret != SQL_ERROR && Sql_NumRows(SqlHandle) != 0) + { + CNpcEntity* PNpc = new CNpcEntity; + + PNpc->id = (uint32)Sql_GetUIntData(SqlHandle,0); + PNpc->targid = (uint16)PNpc->id & 0x0FFF; + + PNpc->name.insert(0,Sql_GetData(SqlHandle,1)); + + PNpc->loc.p.rotation = (uint8)Sql_GetIntData(SqlHandle,2); + PNpc->loc.p.x = Sql_GetFloatData(SqlHandle,3); + PNpc->loc.p.y = Sql_GetFloatData(SqlHandle,4); + PNpc->loc.p.z = Sql_GetFloatData(SqlHandle,5); + PNpc->loc.p.moving = (uint16)Sql_GetUIntData(SqlHandle,6); + + PNpc->m_TargID = (uint32)Sql_GetUIntData(SqlHandle,6) >> 16; // вполне вероятно + + PNpc->speed = (uint8)Sql_GetIntData(SqlHandle,7); + PNpc->speedsub = (uint8)Sql_GetIntData(SqlHandle,8); + PNpc->animation = (uint8)Sql_GetIntData(SqlHandle,9); + PNpc->animationsub = (uint8)Sql_GetIntData(SqlHandle,10); + + PNpc->namevis = (uint8)Sql_GetIntData(SqlHandle,11); + PNpc->status = (STATUSTYPE)Sql_GetIntData(SqlHandle,12); + PNpc->unknown = (uint32)Sql_GetUIntData(SqlHandle,13); + + PNpc->name_prefix = (uint8)Sql_GetIntData(SqlHandle,15); + + memcpy(&PNpc->look,Sql_GetData(SqlHandle,14),20); + + uint8 ZoneID = (uint8)Sql_GetIntData(SqlHandle,16); + CZone* PZone = new CZone((ZONEID)(uint8)ZoneID, GetCurrentRegion(ZoneID), GetCurrentContinent(ZoneID)); + + PZone->InsertNPC(PNpc); + } +} + /************************************************************************ * * * Загружаем список монстров в указанную зону * @@ -356,7 +419,7 @@ case SYSTEM_VERMIN: PMob->addModifier(MOD_PLANTOID_KILLER, 5); break; } - //TODO: traits монстров должны быть аналогичны traits персонажей + //TODO: traits monsters should be similar character traits //DA and TA if(PMob->GetMJob()==JOB_WAR && PMob->m_minLevel >= 25 || PMob->GetSJob()==JOB_WAR && PMob->m_minLevel >= 50){ PMob->addModifier(MOD_DOUBLE_ATTACK,15); @@ -378,7 +441,7 @@ void LoadZoneList() { - g_PTrigger = new CNpcEntity(); // нужно в конструкторе CNpcEntity задавать модель по умолчанию + g_PTrigger = new CNpcEntity(); // CNpcEntity set to the default model for(int32 ZoneID = 0; ZoneID < 256; ZoneID++) { @@ -390,9 +453,9 @@ PZone->ZoneServer(-1); g_PZoneList[ZoneID] = PZone; - if (PZone->GetIP() != 0) + if (PZone->GetLANIP() != 0 || PZone->GetWANIP() != 0 || PZone->GetPort() != 0) { - luautils::OnZoneInitialise(PZone->GetID()); + luautils::OnZoneInitialize(PZone->GetID()); } } UpdateWeather(); Index: src/search/data_loader.h =================================================================== --- src/search/data_loader.h (revision 2121) +++ src/search/data_loader.h (working copy) @@ -28,6 +28,8 @@ #include #include +#include +#include struct Sql_t; struct search_req; Index: src/search/packets/linkshell_list.cpp =================================================================== --- src/search/packets/linkshell_list.cpp (revision 2121) +++ src/search/packets/linkshell_list.cpp (working copy) @@ -50,7 +50,7 @@ WBUFB(m_data,(0x0A)) = 0x80; WBUFB(m_data,(0x0B)) = 0x82; // packet type - // WBUFB(m_data,(0x0E)) = 0x00; // количество персонажей в пакете + // WBUFB(m_data,(0x0E)) = 0x00; // the number of characters in a packet WBUFB(m_data,(0x0E)) = Total; } @@ -126,10 +126,10 @@ m_offset = packBitsLE(m_data, SEARCH_LANGUAGE, m_offset, 5); m_offset = packBitsLE(m_data, PPlayer->languages, m_offset,16); - if (m_offset%8 > 0) m_offset += 8 - m_offset%8; // побайтное выравнивание данных + if (m_offset%8 > 0) m_offset += 8 - m_offset%8; // byte to byte data alignment - WBUFB(m_data, size_offset) = m_offset/8 - size_offset - 1; // размер данных сущности - WBUFW(m_data,(0x08)) = m_offset / 8; // размер отправляемых данных + WBUFB(m_data, size_offset) = m_offset/8 - size_offset - 1; // the size of the entity data + WBUFW(m_data,(0x08)) = m_offset / 8; // the size of the data being sent delete PPlayer; } Index: src/search/packets/party_list.h =================================================================== --- src/search/packets/party_list.h (revision 2121) +++ src/search/packets/party_list.h (working copy) @@ -25,6 +25,7 @@ #define _CPARTYLISTPACKET_H_ #include "../../common/cbasetypes.h" +#include class CPartyListPacket { Index: src/search/search.cpp =================================================================== --- src/search/search.cpp (revision 2121) +++ src/search/search.cpp (working copy) @@ -29,9 +29,19 @@ #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/utils.h" +#include "../common/version.h" -#include -#include +#include +#include +#include +#include +#include +#include +#include +typedef u_int SOCKET; +#define INVALID_SOCKET (SOCKET)(~0) +#define SOCKET_ERROR (-1) + #include #include #include @@ -60,9 +70,9 @@ uint16 port; }; -const int8* SEARCH_CONF_FILENAME = "./conf/search_server.conf"; +const int8* SEARCH_CONF_FILENAME = "./conf/search.conf"; -ppuint32 __stdcall TCPComm(void* lpParam); +void * TCPComm(void* lpParam); extern void HandleSearchRequest(CTCPRequestPacket* PTCPRequest); extern void HandleSearchComment(CTCPRequestPacket* PTCPRequest); @@ -116,7 +126,6 @@ int32 main (int32 argc, int8 **argv) { - WSADATA wsaData; int iResult; @@ -129,15 +138,18 @@ search_config_default(); search_config_read(SEARCH_CONF_FILENAME); - // Initialize Winsock - iResult = WSAStartup(MAKEWORD(2,2), &wsaData); - if (iResult != 0) - { - ShowError("WSAStartup failed with error: %d\n", iResult); - return 1; - } + pthread_t thread1; + pthread_attr_t threadAttr; + int ptherr; - ZeroMemory(&hints, sizeof(hints)); + ptherr = 0; + ptherr = pthread_attr_init(&threadAttr); + if (ptherr != 0) + errno = ptherr; + perror("pthread_attr_init"); + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; @@ -148,7 +160,6 @@ if (iResult != 0) { ShowError("getaddrinfo failed with error: %d\n", iResult); - WSACleanup(); return 1; } @@ -156,9 +167,8 @@ ListenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol); if (ListenSocket == INVALID_SOCKET) { - ShowError("socket failed with error: %ld\n", WSAGetLastError()); + ShowError("socket failed with error: %ld\n", errno); freeaddrinfo(result); - WSACleanup(); return 1; } @@ -166,10 +176,9 @@ iResult = bind( ListenSocket, result->ai_addr, (int)result->ai_addrlen); if (iResult == SOCKET_ERROR) { - ShowError("bind failed with error: %d\n", WSAGetLastError()); + ShowError("bind failed with error: %d\n", errno); freeaddrinfo(result); - closesocket(ListenSocket); - WSACleanup(); + close(ListenSocket); return 1; } @@ -178,15 +187,14 @@ iResult = listen(ListenSocket, SOMAXCONN); if (iResult == SOCKET_ERROR) { - ShowError("listen failed with error: %d\n", WSAGetLastError()); - closesocket(ListenSocket); - WSACleanup(); + ShowError("listen failed with error: %d\n", errno); + close(ListenSocket); return 1; } - ShowMessage(CL_WHITE"========================================================\n\n" CL_RESET); - ShowMessage(CL_WHITE"DSSearch-server\n\n"); - ShowMessage(CL_WHITE"========================================================\n\n" CL_RESET); + ShowMessage("FFXI Search Server\n"); + ShowMessage("Singularity // ProjectXI // DarkStar // onetimexi\n"); + ShowMessage(CL_WHITE"========================================================\n" CL_RESET); while (true) { @@ -194,7 +202,7 @@ ClientSocket = accept(ListenSocket, NULL, NULL); if (ClientSocket == INVALID_SOCKET) { - ShowError("accept failed with error: %d\n", WSAGetLastError()); + ShowError("accept failed with error: %d\n", errno); continue; } SearchCommInfo CommInfo; @@ -203,23 +211,32 @@ CommInfo.ip = 0; CommInfo.port = 0; - CreateThread(0,0,TCPComm,&CommInfo,0,0); + ptherr = 0; + ptherr = pthread_create(&thread1,&threadAttr,&TCPComm,&CommInfo); + if (ptherr != 0) + errno = ptherr; + perror("pthread_attr_init"); + } // TODO: сейчас мы никогда сюда не попадем // shutdown the connection since we're done - iResult = shutdown(ClientSocket, SD_SEND); + iResult = shutdown(ClientSocket, SHUT_WR); + if (iResult == SOCKET_ERROR) { - ShowError("shutdown failed with error: %d\n", WSAGetLastError()); - closesocket(ClientSocket); - WSACleanup(); + ShowError("shutdown failed with error: %d\n", errno); + close(ClientSocket); return 1; } // cleanup - closesocket(ClientSocket); - WSACleanup(); + close(ClientSocket); + ptherr = 0; + ptherr = pthread_attr_destroy(&threadAttr); + if (ptherr != 0) + errno = ptherr; + perror("pthread_attr_init"); return 0; } @@ -234,7 +251,7 @@ search_config.mysql_host = "127.0.0.1"; search_config.mysql_login = "root"; search_config.mysql_password = "root"; - search_config.mysql_database = "dspdb"; + search_config.mysql_database = "ffxi"; search_config.mysql_port = 3306; } @@ -304,8 +321,7 @@ * * * * ************************************************************************/ - -ppuint32 __stdcall TCPComm(void* lpParam) +void * TCPComm(void* lpParam) { SearchCommInfo CommInfo = *((SearchCommInfo*)lpParam); @@ -356,7 +372,7 @@ break; } delete PTCPRequest; - return 1; + return NULL; } /************************************************************************ @@ -414,6 +430,8 @@ /************************************************************************ * * + + * * * * ************************************************************************/ @@ -469,6 +487,8 @@ /************************************************************************ * * + + * * * * ************************************************************************/ Index: src/search/search.h =================================================================== --- src/search/search.h (revision 2121) +++ src/search/search.h (working copy) @@ -30,7 +30,7 @@ uint16 mysql_port; // mysql port -> 3306 const int8* mysql_login; // mysql login -> default root const int8* mysql_password; // mysql pass -> default root - const int8* mysql_database; // mysql database -> default dspdb + const int8* mysql_database; // mysql database -> default ffxi }; struct search_req Index: src/search/tcp_request.cpp =================================================================== --- src/search/tcp_request.cpp (revision 2121) +++ src/search/tcp_request.cpp (working copy) @@ -28,8 +28,17 @@ #include "../common/socket.h" #include "../common/utils.h" -#include -#include +#include +#include +#include +#include +#include +#include +#include + typedef u_int SOCKET; +#define INVALID_SOCKET (SOCKET)(~0) +#define SOCKET_ERROR (-1) + #include #include @@ -65,8 +74,8 @@ { delete[] m_data; - shutdown(*m_socket,SD_SEND); - closesocket(*m_socket); + shutdown(*m_socket,SHUT_WR); + close(*m_socket); } /************************************************************************ @@ -104,7 +113,7 @@ m_size = recv(*m_socket, recvbuf, DEFAULT_BUFLEN, 0); if (m_size == -1) { - ShowError(CL_RED"recv failed with error: %d\n" CL_RESET, WSAGetLastError()); + ShowError(CL_RED"recv failed with error: %d\n" CL_RESET, errno); return 0; } if (m_size == 0) @@ -139,7 +148,7 @@ iResult = send(*m_socket, (const int8*)data, length, 0); if (iResult == SOCKET_ERROR) { - ShowError("send failed with error: %d\n", WSAGetLastError()); + ShowError("send failed with error: %d\n", errno); return 0; } return 1; @@ -177,7 +186,7 @@ iResult = send(*m_socket, (const int8*)data, length, 0); if (iResult == SOCKET_ERROR) { - ShowError("send failed with error: %d\n", WSAGetLastError()); + ShowError("send failed with error: %d\n", errno); return 0; } return ReceiveFromSocket(); Index: src/search/tcp_request.h =================================================================== --- src/search/tcp_request.h (revision 2121) +++ src/search/tcp_request.h (working copy) @@ -27,8 +27,11 @@ #include "../common/cbasetypes.h" #include "../common/mmo.h" -#include - +#include +#include +#include +#include + typedef u_int SOCKET; enum TCPREQUESTTYPE { TCP_SEARCH_ALL = 0x00, Index: win32/DSGame-server/DSGame-server.vcxproj =================================================================== --- win32/DSGame-server/DSGame-server.vcxproj (revision 2121) +++ win32/DSGame-server/DSGame-server.vcxproj (working copy) @@ -252,7 +252,7 @@ - + @@ -431,7 +431,7 @@ - + Index: win32/DSGame-server/DSGame-server.vcxproj.filters =================================================================== --- win32/DSGame-server/DSGame-server.vcxproj.filters (revision 2121) +++ win32/DSGame-server/DSGame-server.vcxproj.filters (working copy) @@ -542,7 +542,7 @@ Header Files\lua - + Header Files\packets @@ -1072,7 +1072,7 @@ Source Files\lua - + Source Files\packets