Skip to content

Commit

Permalink
fix: dawnport vocation trial and npc plunderpurse (opentibiabr#3292)
Browse files Browse the repository at this point in the history
  • Loading branch information
majestyotbr authored and vllworldbuilding committed Jan 31, 2025
1 parent 41608ca commit 9d515d4
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 52 deletions.
6 changes: 3 additions & 3 deletions data-otservbr-global/npc/plunderpurse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ npcConfig.description = internalNpcName

npcConfig.health = 100
npcConfig.maxHealth = npcConfig.health
npcConfig.walkInterval = 0
npcConfig.walkInterval = 2000
npcConfig.walkRadius = 2

npcConfig.outfit = {
lookType = 151,
lookHead = 114,
lookBody = 131,
lookBody = 132,
lookLegs = 0,
lookFeet = 20,
lookFeet = 78,
lookAddons = 1,
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
local positions = {
{ x = 32054, y = 31889, z = 5 },
{ x = 32056, y = 31889, z = 5 },
{ x = 32056, y = 31892, z = 5 },
{ x = 32063, y = 31900, z = 5 },
{ x = 32066, y = 31900, z = 5 },
{ x = 32074, y = 31892, z = 5 },
{ x = 32074, y = 31889, z = 5 },
{ x = 32063, y = 31881, z = 5 },
{ x = 32066, y = 31881, z = 5 },
{ x = 32063, y = 31880, z = 5 },
{ x = 32063, y = 31882, z = 5 },
{ x = 32073, y = 31889, z = 5 },
{ x = 32075, y = 31889, z = 5 },
{ x = 32063, y = 31899, z = 5 },
{ x = 32063, y = 31901, z = 5 },
}
local dawnportMagicEffect = GlobalEvent("DawnportMagicEffect")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local vocationTrials = {
-- Sorcerer trial
[25005] = {
tutorialId = 5,
effectPosition = { x = 32050, y = 31891, z = 5 },
effectPosition = { x = 32064, y = 31905, z = 5 },
storage = Storage.Dawnport.Sorcerer,
message = "As a sorcerer, you can use the following spells: Magic Patch, Buzz, Scorch.",
vocation = {
Expand Down Expand Up @@ -37,7 +37,7 @@ local vocationTrials = {
-- Druid trial
[25006] = {
tutorialId = 6,
effectPosition = { x = 32064, y = 31905, z = 5 },
effectPosition = { x = 32064, y = 31876, z = 5 },
storage = Storage.Dawnport.Druid,
message = "As a druid, you can use these spells: Mud Attack, Chill Out, Magic Patch.",
vocation = {
Expand Down Expand Up @@ -67,7 +67,7 @@ local vocationTrials = {
-- Paladin trial
[25007] = {
tutorialId = 4,
effectPosition = { x = 32078, y = 31891, z = 5 },
effectPosition = { x = 32050, y = 31891, z = 5 },
storage = Storage.Dawnport.Paladin,
message = "As a paladin, you can use the following spells: Magic Patch, Arrow Call.",
vocation = {
Expand Down Expand Up @@ -98,7 +98,7 @@ local vocationTrials = {
-- Knight trial
[25008] = {
tutorialId = 3,
effectPosition = { x = 32064, y = 31876, z = 5 },
effectPosition = { x = 32078, y = 31891, z = 5 },
storage = Storage.Dawnport.Knight,
message = "As a knight, you can use the following spells: Bruise Bane.",
vocation = {
Expand Down Expand Up @@ -259,8 +259,8 @@ function dawnportVocationTrial.onStepIn(creature, item, position, fromPosition)
local trial = vocationTrials[item.actionid]
if trial then
-- Center room position
local centerPosition = Position(32065, 31891, 5)
if centerPosition:getDistance(fromPosition) < centerPosition:getDistance(position) then
local centerPosition = Position(32063, 31889, 5)
if centerPosition:getDistance(fromPosition) >= centerPosition:getDistance(position) then
-- Blocks the vocation trial if same vocation or after level 20
if player:getVocation():getId() == trial.vocation.id or player:getLevel() >= 20 then
return true
Expand Down
48 changes: 20 additions & 28 deletions data-otservbr-global/startup/tables/tile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ TileAction = {
[20001] = {
itemId = 416,
itemPos = {
{ x = 32064, y = 31881, z = 5 },
{ x = 32065, y = 31881, z = 5 },
{ x = 32074, y = 31890, z = 5 },
{ x = 32074, y = 31891, z = 5 },
{ x = 32064, y = 31900, z = 5 },
{ x = 32065, y = 31900, z = 5 },
{ x = 32056, y = 31890, z = 5 },
{ x = 32056, y = 31891, z = 5 },
{ x = 32064, y = 31880, z = 5 },
{ x = 32065, y = 31880, z = 5 },
{ x = 32066, y = 31880, z = 5 },
{ x = 32075, y = 31890, z = 5 },
{ x = 32075, y = 31891, z = 5 },
{ x = 32075, y = 31892, z = 5 },
{ x = 32064, y = 31901, z = 5 },
{ x = 32065, y = 31901, z = 5 },
{ x = 32066, y = 31901, z = 5 },
{ x = 32054, y = 31890, z = 5 },
{ x = 32054, y = 31891, z = 5 },
{ x = 32054, y = 31892, z = 5 },
},
},
-- Dark trails quest tile
Expand Down Expand Up @@ -61,42 +65,30 @@ TileAction = {
--Sorcerer vocation tile
--Vocation trial: data\scripts\movements\others\dawnport_vocation_trial.lua
[25005] = {
itemId = 416,
itemId = 44640,
itemPos = {
{ x = 32055, y = 31889, z = 5 },
{ x = 32055, y = 31890, z = 5 },
{ x = 32055, y = 31891, z = 5 },
{ x = 32055, y = 31892, z = 5 },
{ x = 32063, y = 31900, z = 5 },
},
},
--Druid vocation tile
[25006] = {
itemId = 416,
itemId = 44641,
itemPos = {
{ x = 32063, y = 31901, z = 5 },
{ x = 32064, y = 31901, z = 5 },
{ x = 32065, y = 31901, z = 5 },
{ x = 32066, y = 31901, z = 5 },
{ x = 32063, y = 31881, z = 5 },
},
},
--Paladin vocation tile
[25007] = {
itemId = 416,
itemId = 44639,
itemPos = {
{ x = 32075, y = 31889, z = 5 },
{ x = 32075, y = 31890, z = 5 },
{ x = 32075, y = 31891, z = 5 },
{ x = 32075, y = 31892, z = 5 },
{ x = 32055, y = 31889, z = 5 },
},
},
--Knight vocation tile
[25008] = {
itemId = 416,
itemId = 44638,
itemPos = {
{ x = 32063, y = 31880, z = 5 },
{ x = 32064, y = 31880, z = 5 },
{ x = 32065, y = 31880, z = 5 },
{ x = 32066, y = 31880, z = 5 },
{ x = 32074, y = 31889, z = 5 },
},
},
-- Tiles data\scripts\movements\others\dawnport_tiles.lua
Expand Down
13 changes: 5 additions & 8 deletions data-otservbr-global/world/otservbr-npc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@
<npc centerx="33640" centery="31898" centerz="4" radius="1">
<npc name="Fayla" x="0" y="0" z="4" spawntime="60" />
</npc>
<npc centerx="32055" centery="31900" centerz="4" radius="1">
<npc name="Plunderpurse" x="0" y="0" z="4" spawntime="60" />
</npc>
<npc centerx="33608" centery="31974" centerz="4" radius="1">
<npc name="Zeronex" x="0" y="0" z="4" spawntime="60" />
</npc>
Expand Down Expand Up @@ -282,8 +279,8 @@
<npc centerx="32056" centery="31881" centerz="5" radius="1">
<npc name="Richard" x="0" y="0" z="5" spawntime="60" />
</npc>
<npc centerx="32072" centery="31881" centerz="5" radius="1">
<npc name="Coltrayne" x="0" y="0" z="5" spawntime="60" />
<npc centerx="32071" centery="31882" centerz="5" radius="1">
<npc name="Plunderpurse" x="0" y="0" z="5" spawntime="60" />
</npc>
<npc centerx="33634" centery="31883" centerz="5" radius="1">
<npc name="Silas" x="0" y="0" z="5" spawntime="60" />
Expand Down Expand Up @@ -1897,7 +1894,7 @@
<npc name="Ishina" x="0" y="0" z="7" spawntime="60" />
</npc>
<npc centerx="33033" centery="32425" centerz="7" radius="2">
<npc name="Torkada" x="0" y="0" z="7" spawntime="60" direction="2"/>
<npc name="Torkada" x="0" y="0" z="7" spawntime="60" direction="2" />
</npc>
<npc centerx="32168" centery="32428" centerz="7" radius="1">
<npc name="Eddy" x="0" y="0" z="7" spawntime="60" />
Expand Down Expand Up @@ -2458,7 +2455,7 @@
<npc name="Mazarius" x="0" y="0" z="9" spawntime="60" />
</npc>
<npc centerx="32956" centery="32397" centerz="9" radius="1">
<npc name="Bloodshade Sacrifice" x="0" y="0" z="9" spawntime="60"/>
<npc name="Bloodshade Sacrifice" x="0" y="0" z="9" spawntime="60" />
</npc>
<npc centerx="33020" centery="32454" centerz="9" radius="1">
<npc name="Omrabas" x="0" y="0" z="9" spawntime="60" />
Expand Down Expand Up @@ -2879,7 +2876,7 @@
<npc name="Strange Pipe" x="0" y="0" z="14" spawntime="60" />
</npc>
<npc centerx="34069" centery="31981" centerz="14" radius="3">
<npc name="Bloodshade Rotten" x="0" y="1" z="14" spawntime="60"/>
<npc name="Bloodshade Rotten" x="0" y="1" z="14" spawntime="60" />
</npc>
<npc centerx="32683" centery="31987" centerz="14" radius="1">
<npc name="Rapanaio" x="0" y="0" z="14" spawntime="60" />
Expand Down
18 changes: 18 additions & 0 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76635,6 +76635,18 @@ Granted by TibiaGoals.com"/>
<attribute key="vocation" value="Druid;true, Elder Druid"/>
</attribute>
</item>
<item id="44638" article="a" name="knight pedestal">
<attribute key="primarytype" value="artificial tiles"/>
</item>
<item id="44639" article="a" name="paladin pedestal">
<attribute key="primarytype" value="artificial tiles"/>
</item>
<item id="44640" article="a" name="sorcerer pedestal">
<attribute key="primarytype" value="artificial tiles"/>
</item>
<item id="44641" article="a" name="druid pedestal">
<attribute key="primarytype" value="artificial tiles"/>
</item>
<item id="44642" name="stoic iks culet">
<attribute key="primarytype" value="legs"/>
<attribute key="armor" value="9"/>
Expand Down Expand Up @@ -76850,6 +76862,12 @@ Granted by TibiaGoals.com"/>
<attribute key="containersize" value="10"/>
<attribute key="decayTo" value="0"/>
</item>
<item id="44763" article="an" name="arrow pointing left">
<attribute key="primarytype" value="artificial tiles"/>
</item>
<item id="44764" article="an" name="arrow pointing up">
<attribute key="primarytype" value="artificial tiles"/>
</item>
<item id="44895" article="a" name="ramp"/>
<item id="44896" article="a" name="ramp">
<attribute key="floorchange" value="north"/>
Expand Down

0 comments on commit 9d515d4

Please sign in to comment.