diff --git a/config.lua b/config.lua index 0383f6a..e354f60 100644 --- a/config.lua +++ b/config.lua @@ -52,7 +52,7 @@ timeBetweenExActions = 1000 -- Map -- NOTE: set mapName WITHOUT .otbm at the end -mapName = "mymap" +mapName = "map" mapAuthor = "CipSoft" -- MySQL diff --git a/data/actions/actions.xml b/data/actions/actions.xml index 11c642b..26bc8ee 100644 --- a/data/actions/actions.xml +++ b/data/actions/actions.xml @@ -94,6 +94,7 @@ + @@ -103,6 +104,7 @@ + @@ -118,7 +120,6 @@ - @@ -146,6 +147,11 @@ + + + + + @@ -166,6 +172,7 @@ + @@ -224,6 +231,7 @@ + @@ -266,6 +274,7 @@ + @@ -291,6 +300,8 @@ + + @@ -323,6 +334,8 @@ + + @@ -360,6 +373,10 @@ + + + + @@ -394,6 +411,9 @@ + + + @@ -428,4 +448,7 @@ + + + diff --git a/data/actions/scripts/misc/dolls.lua b/data/actions/scripts/misc/dolls.lua new file mode 100644 index 0000000..2219349 --- /dev/null +++ b/data/actions/scripts/misc/dolls.lua @@ -0,0 +1,53 @@ +local dolls = { + [5080] = {"Hug me."}, + [5668] = { + "It's not winning that matters, but winning in style.", + "Today's your lucky day. Probably.", + "Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup.", + "That is one stupid question.", + "You'll need more rum for that.", + "Do or do not. There is no try.", + "You should do something you always wanted to.", + "If you walk under a ladder and it falls down on you it probably means bad luck.", + "Never say 'oops'. Always say 'Ah, interesting!'", + "Five steps east, fourteen steps south, two steps north and seventeen steps west!" + }, + [5791] = { + "Fchhhhhh!", + "Zchhhhhh!", + "Grooaaaaar*cough*", + "Aaa... CHOO!", + "You... will.... burn!!" + } +} + +function onUse(player, item, fromPosition, target, toPosition, isHotkey) + local sounds = dolls[item.itemid] + if not sounds then + return false + end + + if fromPosition.x == CONTAINER_POSITION then + fromPosition = player:getPosition() + end + + local random = math.random(#sounds) + local sound = sounds[random] + if item.itemid == 5791 then + if random == 3 then + fromPosition:sendMagicEffect(CONST_ME_POFF) + elseif random == 4 then + fromPosition:sendMagicEffect(CONST_ME_FIREAREA) + elseif random == 5 then + doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -1, -1, CONST_ME_EXPLOSIONHIT) + end + elseif item.itemid == 5668 then + fromPosition:sendMagicEffect(CONST_ME_MAGIC_RED) + item:transform(item.itemid + 1) + item:decay() + end + + sound = sound:gsub('|PLAYERNAME|', player:getName()) + player:say(sound, TALKTYPE_MONSTER_SAY, false, 0, fromPosition) + return true +end diff --git a/data/actions/scripts/misc/doors.lua b/data/actions/scripts/misc/doors.lua index a2c118c..1d0cd4d 100644 --- a/data/actions/scripts/misc/doors.lua +++ b/data/actions/scripts/misc/doors.lua @@ -1,5 +1,5 @@ local lockedDoors = { - 1628, 1631, 1650, 1653, 1668, 1671, 1682, 1691, 5006, 5007, 5097, 5106, 5115, 5124, 5133, 5136, 5139, 5142, 5277, 5280 + 1628, 1631, 1650, 1653, 1668, 1671, 1682, 1691, 5006, 5007, 5097, 5106, 5115, 5124, 5133, 5136, 5139, 5142, 5277, 5280, 5732, 5735 } local closedNormalDoors = { @@ -39,6 +39,10 @@ local closedNormalDoors = { [5281] = 5282, [5283] = 5284, [5285] = 5286, + [5514] = 5515, + [5516] = 5517, + [5733] = 5734, + [5736] = 5737, } local openVerticalDoors = { @@ -74,6 +78,9 @@ local openVerticalDoors = { [5284] = 5283, [5288] = 5287, [5292] = 5291, + [5515] = 5514, + [5737] = 5736, + [5748] = 5749, } local openHorizontalDoors = { @@ -109,6 +116,9 @@ local openHorizontalDoors = { [5286] = 5285, [5290] = 5289, [5294] = 5293, + [5517] = 5516, + [5734] = 5733, + [5746] = 5745, } local levelDoors = { @@ -143,6 +153,8 @@ local questDoors = { [5131] = 5132, [5287] = 5288, [5289] = 5290, + [5745] = 5746, + [5749] = 5748, } local passthrough = { diff --git a/data/actions/scripts/misc/instruments.lua b/data/actions/scripts/misc/instruments.lua index 21ba16f..2a69514 100644 --- a/data/actions/scripts/misc/instruments.lua +++ b/data/actions/scripts/misc/instruments.lua @@ -8,6 +8,15 @@ function onUse(player, item, fromPosition, target, toPosition) item:getPosition():sendMagicEffect(CONST_ME_SOUND_PURPLE) elseif item:getId() == 3219 then item:getPosition():sendMagicEffect(19) + elseif item:getId() == 5786 then + Game.createMonster("wolf", player:getPosition()) + local random = math.random(1,10) + if random > 3 then -- destroy 70% chance + item:getPosition():sendMagicEffect(CONST_ME_SOUND_RED) + item:remove(1) + else + item:getPosition():sendMagicEffect(CONST_ME_SOUND_YELLOW) + end end return true diff --git a/data/actions/scripts/misc/panda_teddy.lua b/data/actions/scripts/misc/panda_teddy.lua deleted file mode 100644 index 30b4acf..0000000 --- a/data/actions/scripts/misc/panda_teddy.lua +++ /dev/null @@ -1,4 +0,0 @@ -function onUse(player, item, fromPosition, target, toPosition) - player:sendCancelMessage("Hug me ^^") - return true -end diff --git a/data/actions/scripts/misc/teleporters.lua b/data/actions/scripts/misc/teleporters.lua index 03a74b9..c48fc69 100644 --- a/data/actions/scripts/misc/teleporters.lua +++ b/data/actions/scripts/misc/teleporters.lua @@ -3,7 +3,7 @@ local downstairs = { } local upstairs = { - 1948, 1968 + 1948, 1968, 5542 } function onUse(player, item, fromPosition, target, toPosition) diff --git a/data/items/items.srv b/data/items/items.srv index 44aa1cb..8aaff20 100644 --- a/data/items/items.srv +++ b/data/items/items.srv @@ -24904,7 +24904,7 @@ TypeID = 5513 Name = "a distilling machine" Flags = {Bottom,Unpass,Unmove,Unlay,Expire} Attributes = {FluidSource=RUM,ExpireTarget=5469,TotalExpireTime=10} -# pradeti nuo cia + TypeID = 5514 Name = "a closed door" Flags = {Door,Unpass,Unmove,Unthrow,Unlay} @@ -25021,7 +25021,7 @@ Attributes = {ExpireTarget=0,TotalExpireTime=600} TypeID = 5538 Name = "a rum cask" Flags = {Unpass,Unmove,Unlay} -Attributes = {FluidSource=WINE} # TODO: FluidSource should be RUM +Attributes = {FluidSource=RUM} TypeID = 5539 Name = "a dead carrion worm" @@ -25081,7 +25081,7 @@ Flags = {Bottom,Unpass,Unmove,Unlay} TypeID = 5552 Name = "a rum flask" -Flags = {MultiUse,FluidContainer,Take} # TODO: make it useable +Flags = {MultiUse,FluidContainer,Take} Attributes = {Weight=280} TypeID = 5553 @@ -25584,14 +25584,14 @@ Attributes = {ExpireTarget=0,TotalExpireTime=600} TypeID = 5668 Name = "a mysterious voodoo skull" -Flags = {Take} +Flags = {UseEvent,Take} Attributes = {Weight=1400} TypeID = 5669 Name = "a enigmatic voodoo skull" Description = "It is not time yet" Flags = {Take,Expire} -Attributes = {Weight=1400,ExpireTarget=5668,TotalExpireTime=72000} # TODO: make it useable like in wiki +Attributes = {Weight=1400,ExpireTarget=5668,TotalExpireTime=72000} TypeID = 5670 Name = "a pirate statue" @@ -25628,7 +25628,7 @@ Flags = {Bottom,Unpass,Unmove,Unlay} TypeID = 5678 Name = "a tortoise egg" Flags = {Cumulative,Take} -Attributes = {Nutrition=6,Weight=30} # TODO: make it eatable +Attributes = {Nutrition=8,Weight=30} TypeID = 5679 Name = "a shell" @@ -25766,7 +25766,7 @@ Flags = {Bottom,Unpass,Unmove,Unlay} TypeID = 5710 Name = "a light shovel" -Flags = {MultiUse,UseEvent,Take} # TODO: make to work as shovel +Flags = {MultiUse,UseEvent,Take} Attributes = {Weight=1500} TypeID = 5711 @@ -26109,8 +26109,8 @@ Attributes = {MaxLength=99,Weight=1000} TypeID = 5786 Name = "a wooden whistle" Flags = {Take} -Attributes = {Weight=100} # TODO: implement music like in tibia wiki says - +Attributes = {Weight=100} +# pradzia nuo cia TypeID = 5787 Name = "a training dummy" Flags = {Unpass,Unmove,Unlay} @@ -26130,7 +26130,7 @@ Flags = {Unmove} TypeID = 5791 Name = "a stuffed dragon" Flags = {Take} -Attributes = {Weight=850} # TODO: implement like in tibia wiki says +Attributes = {Weight=850} TypeID = 5792 Name = "a die" diff --git a/data/monster/fernfang.xml b/data/monster/fernfang.xml index 51cc8de..8411d9d 100644 --- a/data/monster/fernfang.xml +++ b/data/monster/fernfang.xml @@ -71,5 +71,6 @@ + \ No newline at end of file diff --git a/data/movements/movements.xml b/data/movements/movements.xml index 15fb8e2..420dbab 100644 --- a/data/movements/movements.xml +++ b/data/movements/movements.xml @@ -538,6 +538,14 @@ + + + + + + + + @@ -601,6 +609,8 @@ + + diff --git a/data/movements/scripts/misc/doors.lua b/data/movements/scripts/misc/doors.lua index ae24dc1..6b64a9b 100644 --- a/data/movements/scripts/misc/doors.lua +++ b/data/movements/scripts/misc/doors.lua @@ -13,6 +13,7 @@ local verticalDoors = { [5132] = 5131, [5288] = 5287, [5292] = 5291, + [5748] = 5749, } local horizontalDoors = { @@ -30,6 +31,7 @@ local horizontalDoors = { [5123] = 5122, [5290] = 5289, [5294] = 5293, + [5746] = 5745, } function onStepOut(creature, item, fromPosition, toPosition) diff --git a/data/movements/scripts/misc/floorchange.lua b/data/movements/scripts/misc/floorchange.lua index de0e8fc..acc8c4a 100644 --- a/data/movements/scripts/misc/floorchange.lua +++ b/data/movements/scripts/misc/floorchange.lua @@ -3,7 +3,6 @@ local list = { [294] = {x = 0, y = 0, z = 1}, [369] = {x = 0, y = 0, z = 1}, [370] = {x = 0, y = 0, z = 1}, - [385] = {x = 0, y = 0, z = 1}, [394] = {x = 0, y = 0, z = 1}, [411] = {x = 0, y = 0, z = 1}, [412] = {x = 0, y = 0, z = 1}, @@ -73,6 +72,10 @@ local list = { [5257] = {x = -1, y = 0, z = -1}, [5258] = {x = 0, y = -1, z = -1}, [5259] = {x = -1, y = 0, z = -1}, + [5544] = {x = 0, y = 0, z = 1}, + [5691] = {x = 0, y = 0, z = 1}, + [5731] = {x = 0, y = 0, z = 1}, + [5763] = {x = 0, y = 0, z = 1}, } function onStepIn(creature, item, position, fromPosition)