Full Distribution

This commit is contained in:
rasanpedromujica
2019-01-16 17:16:38 -05:00
commit 009a571331
1258 changed files with 185603 additions and 0 deletions

363
data/actions/actions.xml Normal file
View File

@@ -0,0 +1,363 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<!-- Nostalrius Tibia Map Related Actions -->
<action actionid="1" script="nostalrius/1.lua" />
<action actionid="2" script="nostalrius/2.lua" />
<action actionid="3" script="nostalrius/3.lua" />
<action actionid="4" script="nostalrius/4.lua" />
<action actionid="5" script="nostalrius/5.lua" />
<action actionid="6" script="nostalrius/6.lua" />
<action actionid="7" script="nostalrius/7.lua" />
<action actionid="8" script="nostalrius/8.lua" />
<action actionid="9" script="nostalrius/9.lua" />
<action actionid="10" script="nostalrius/10.lua" />
<action actionid="11" script="nostalrius/11.lua" />
<action actionid="12" script="nostalrius/12.lua" />
<action actionid="13" script="nostalrius/13.lua" />
<action actionid="14" script="nostalrius/14.lua" />
<action actionid="15" script="nostalrius/15.lua" />
<action actionid="16" script="nostalrius/16.lua" />
<action actionid="17" script="nostalrius/17.lua" />
<action actionid="18" script="nostalrius/18.lua" />
<action actionid="19" script="nostalrius/19.lua" />
<action actionid="20" script="nostalrius/20.lua" />
<action actionid="21" script="nostalrius/21.lua" />
<action actionid="22" script="nostalrius/22.lua" />
<action actionid="23" script="nostalrius/23.lua" />
<action actionid="24" script="nostalrius/24.lua" />
<action actionid="25" script="nostalrius/25.lua" />
<action actionid="26" script="nostalrius/26.lua" />
<action actionid="27" script="nostalrius/27.lua" />
<action actionid="28" script="nostalrius/28.lua" />
<action actionid="29" script="nostalrius/29.lua" />
<action actionid="30" script="nostalrius/30.lua" />
<action actionid="31" script="nostalrius/31.lua" />
<action actionid="32" script="nostalrius/32.lua" />
<action actionid="33" script="nostalrius/33.lua" />
<action actionid="34" script="nostalrius/34.lua" />
<action actionid="35" script="nostalrius/35.lua" />
<action actionid="36" script="nostalrius/36.lua" />
<action actionid="37" script="nostalrius/37.lua" />
<action actionid="38" script="nostalrius/38.lua" />
<action actionid="39" script="nostalrius/39.lua" />
<action actionid="40" script="nostalrius/40.lua" />
<action actionid="41" script="nostalrius/41.lua" />
<action actionid="42" script="nostalrius/42.lua" />
<action actionid="43" script="nostalrius/43.lua" />
<action actionid="44" script="nostalrius/44.lua" />
<action actionid="45" script="nostalrius/45.lua" />
<action actionid="46" script="nostalrius/46.lua" />
<action actionid="47" script="nostalrius/47.lua" />
<action actionid="48" script="nostalrius/48.lua" />
<action actionid="49" script="nostalrius/49.lua" />
<action actionid="50" script="nostalrius/50.lua" />
<action actionid="51" script="nostalrius/51.lua" />
<action actionid="52" script="nostalrius/52.lua" />
<action actionid="53" script="nostalrius/53.lua" />
<action actionid="54" script="nostalrius/54.lua" />
<action actionid="55" script="nostalrius/55.lua" />
<action actionid="56" script="nostalrius/56.lua" />
<action actionid="57" script="nostalrius/57.lua" />
<action actionid="58" script="nostalrius/58.lua" />
<action actionid="59" script="nostalrius/59.lua" />
<action actionid="60" script="nostalrius/60.lua" />
<action actionid="61" script="nostalrius/61.lua" />
<action actionid="62" script="nostalrius/62.lua" />
<action actionid="63" script="nostalrius/63.lua" />
<action actionid="64" script="nostalrius/64.lua" />
<action actionid="65" script="nostalrius/65.lua" />
<action actionid="66" script="nostalrius/66.lua" />
<action actionid="67" script="nostalrius/67.lua" />
<action actionid="68" script="nostalrius/68.lua" />
<action actionid="69" script="nostalrius/69.lua" />
<action actionid="70" script="nostalrius/70.lua" />
<action actionid="71" script="nostalrius/71.lua" />
<action actionid="72" script="nostalrius/72.lua" />
<action actionid="73" script="nostalrius/73.lua" />
<action actionid="74" script="nostalrius/74.lua" />
<action actionid="75" script="nostalrius/75.lua" />
<action actionid="76" script="nostalrius/76.lua" />
<action actionid="77" script="nostalrius/77.lua" />
<action actionid="78" script="nostalrius/78.lua" />
<action actionid="79" script="nostalrius/79.lua" />
<action actionid="80" script="nostalrius/80.lua" />
<action actionid="81" script="nostalrius/81.lua" />
<action actionid="82" script="nostalrius/82.lua" />
<action actionid="83" script="nostalrius/83.lua" />
<!-- Nostalrius Default Actions -->
<!-- Furniture Parcels -->
<action fromid="2775" toid="2812" script="misc/furniture_parcels.lua" />
<action fromid="5086" toid="5088" script="misc/furniture_parcels.lua" />
<!-- Instruments -->
<action fromid="2948" toid="2950" script="misc/instruments.lua" />
<action fromid="2952" toid="2965" script="misc/instruments.lua" />
<action itemid="3219" script="misc/instruments.lua" />
<!-- Strange Levers -->
<action fromid="2566" toid="2567" script="misc/strange_lever.lua" />
<action fromid="2569" toid="2570" script="misc/strange_lever.lua" />
<!-- Teleporters -->
<action itemid="435" script="misc/teleporters.lua" />
<action itemid="1948" script="misc/teleporters.lua" />
<action itemid="1968" script="misc/teleporters.lua" />
<!-- Special Right -->
<action itemid="372" script="misc/special_rights.lua" />
<action itemid="386" script="misc/special_rights.lua" />
<action itemid="421" script="misc/special_rights.lua" />
<action itemid="593" script="misc/special_rights.lua" />
<action itemid="606" script="misc/special_rights.lua" />
<action itemid="608" script="misc/special_rights.lua" />
<action itemid="614" script="misc/special_rights.lua" />
<action itemid="3653" script="misc/special_rights.lua" />
<action itemid="3696" script="misc/special_rights.lua" />
<action itemid="3702" script="misc/special_rights.lua" />
<!-- Fun -->
<action itemid="611" script="misc/snowheap.lua" />
<action itemid="5080" script="misc/panda_teddy.lua" />
<action itemid="2974" script="misc/water_pipe.lua" />
<action itemid="2976" script="misc/birdcage.lua" />
<action itemid="3103" script="misc/cornucopia.lua" />
<action itemid="3699" script="misc/blueberry_bush.lua" />
<action itemid="3481" script="misc/closed_trap.lua" />
<action itemid="3482" script="misc/open_trap.lua" />
<action itemid="3218" script="misc/present.lua" />
<action itemid="2977" script="misc/pumpkin_head.lua" />
<action itemid="2916" script="misc/used_lamp.lua" />
<action itemid="3229" script="misc/helmet_of_the_ancients.lua" />
<action itemid="4835" script="misc/snake_destroyer.lua" />
<action itemid="4840" script="misc/spectral_stone.lua" />
<action itemid="4842" script="misc/sheet_of_tracing_paper.lua" />
<action itemid="4852" script="misc/ectoplasm_container.lua" />
<action itemid="3217" script="misc/letter_bag.lua" />
<action fromid="3603" toid="3605" script="misc/baking.lua" />
<action fromid="3264" toid="3276" script="misc/weapons.lua" />
<action fromid="3278" toid="3286" script="misc/weapons.lua" />
<action fromid="3288" toid="3297" script="misc/weapons.lua" />
<action fromid="3299" toid="3303" script="misc/weapons.lua" />
<action fromid="3305" toid="3307" script="misc/weapons.lua" />
<action fromid="3309" toid="3329" script="misc/weapons.lua" />
<action fromid="3331" toid="3348" script="misc/weapons.lua" />
<action itemid="3208" script="misc/weapons.lua" />
<action itemid="3059" script="misc/spellbook.lua" />
<!-- Keys -->
<action fromid="2967" toid="2973" script="misc/key.lua" />
<!-- Time -->
<action fromid="2445" toid="2448" script="misc/time.lua" />
<action fromid="2660" toid="2664" script="misc/time.lua" />
<action itemid="2668" script="misc/time.lua" />
<action itemid="2771" script="misc/time.lua" />
<action itemid="2906" script="misc/time.lua" />
<!-- Tools -->
<action itemid="3003" script="misc/rope.lua" />
<action itemid="3304" script="misc/crowbar.lua" />
<action itemid="3469" script="misc/knife.lua" />
<action itemid="3308" script="misc/machete.lua" />
<action itemid="3330" script="misc/machete.lua" />
<action itemid="3453" script="misc/scythe.lua" />
<action itemid="4872" script="misc/ice_pick.lua" />
<action itemid="3456" script="misc/pick.lua" />
<action itemid="3457" script="misc/shovel.lua" />
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.lua" />
<!-- Miscellaneous -->
<action itemid="4867" script="misc/botanist_container.lua" />
<action itemid="4863" script="misc/butterfly_conservation_kit.lua" />
<!-- Chests -->
<action itemid="2479" script="misc/chests.lua" />
<action itemid="2543" script="misc/chests.lua" />
<action itemid="2544" script="misc/chests.lua" />
<action itemid="2545" script="misc/chests.lua" />
<action itemid="2546" script="misc/chests.lua" />
<action itemid="2547" script="misc/chests.lua" />
<action itemid="2548" script="misc/chests.lua" />
<action itemid="2549" script="misc/chests.lua" />
<action itemid="2550" script="misc/chests.lua" />
<action itemid="2551" script="misc/chests.lua" />
<action itemid="2552" script="misc/chests.lua" />
<action itemid="2553" script="misc/chests.lua" />
<action itemid="2554" script="misc/chests.lua" />
<action itemid="2555" script="misc/chests.lua" />
<action itemid="2556" script="misc/chests.lua" />
<action itemid="2557" script="misc/chests.lua" />
<action itemid="2558" script="misc/chests.lua" />
<action itemid="2559" script="misc/chests.lua" />
<action itemid="2560" script="misc/chests.lua" />
<action itemid="2561" script="misc/chests.lua" />
<action itemid="2562" script="misc/chests.lua" />
<action itemid="2564" script="misc/chests.lua" />
<action itemid="2565" script="misc/chests.lua" />
<action itemid="4830" script="misc/chests.lua" />
<action itemid="4833" script="misc/chests.lua" />
<action itemid="4873" script="misc/chests.lua" />
<!-- Fluids -->
<action itemid="2524" script="misc/fluids.lua" />
<action itemid="2873" script="misc/fluids.lua" />
<action itemid="2874" script="misc/fluids.lua" />
<action itemid="2876" script="misc/fluids.lua" />
<action itemid="2877" script="misc/fluids.lua" />
<action itemid="2879" script="misc/fluids.lua" />
<action itemid="2880" script="misc/fluids.lua" />
<action itemid="2881" script="misc/fluids.lua" />
<action itemid="2882" script="misc/fluids.lua" />
<action itemid="2883" script="misc/fluids.lua" />
<action itemid="2884" script="misc/fluids.lua" />
<action itemid="2885" script="misc/fluids.lua" />
<action itemid="2893" script="misc/fluids.lua" />
<action itemid="2901" script="misc/fluids.lua" />
<action itemid="2902" script="misc/fluids.lua" />
<action itemid="2903" script="misc/fluids.lua" />
<action itemid="2904" script="misc/fluids.lua" />
<action itemid="3465" script="misc/fluids.lua" />
<action itemid="3477" script="misc/fluids.lua" />
<action itemid="3478" script="misc/fluids.lua" />
<action itemid="3479" script="misc/fluids.lua" />
<action itemid="3480" script="misc/fluids.lua" />
<!-- Food -->
<action itemid="3250" script="misc/food.lua" />
<action itemid="3577" script="misc/food.lua" />
<action itemid="3578" script="misc/food.lua" />
<action itemid="3579" script="misc/food.lua" />
<action itemid="3580" script="misc/food.lua" />
<action itemid="3581" script="misc/food.lua" />
<action itemid="3582" script="misc/food.lua" />
<action itemid="3583" script="misc/food.lua" />
<action itemid="3584" script="misc/food.lua" />
<action itemid="3585" script="misc/food.lua" />
<action itemid="3586" script="misc/food.lua" />
<action itemid="3587" script="misc/food.lua" />
<action itemid="3588" script="misc/food.lua" />
<action itemid="3589" script="misc/food.lua" />
<action itemid="3590" script="misc/food.lua" />
<action itemid="3591" script="misc/food.lua" />
<action itemid="3592" script="misc/food.lua" />
<action itemid="3593" script="misc/food.lua" />
<action itemid="3594" script="misc/food.lua" />
<action itemid="3595" script="misc/food.lua" />
<action itemid="3596" script="misc/food.lua" />
<action itemid="3597" script="misc/food.lua" />
<action itemid="3598" script="misc/food.lua" />
<action itemid="3599" script="misc/food.lua" />
<action itemid="3600" script="misc/food.lua" />
<action itemid="3601" script="misc/food.lua" />
<action itemid="3602" script="misc/food.lua" />
<action itemid="3606" script="misc/food.lua" />
<action itemid="3607" script="misc/food.lua" />
<action itemid="3723" script="misc/food.lua" />
<action itemid="3724" script="misc/food.lua" />
<action itemid="3725" script="misc/food.lua" />
<action itemid="3726" script="misc/food.lua" />
<action itemid="3727" script="misc/food.lua" />
<action itemid="3728" script="misc/food.lua" />
<action itemid="3729" script="misc/food.lua" />
<action itemid="3730" script="misc/food.lua" />
<action itemid="3731" script="misc/food.lua" />
<action itemid="3732" script="misc/food.lua" />
<!-- Passthrough -->
<action fromid="2334" toid="2341" script="misc/doors.lua" />
<!-- Locked Doors -->
<action itemid="1628" script="misc/doors.lua" />
<action itemid="1631" script="misc/doors.lua" />
<action itemid="1650" script="misc/doors.lua" />
<action itemid="1653" script="misc/doors.lua" />
<action itemid="1668" script="misc/doors.lua" />
<action itemid="1671" script="misc/doors.lua" />
<action itemid="1682" script="misc/doors.lua" />
<action itemid="1691" script="misc/doors.lua" />
<action itemid="5006" script="misc/doors.lua" />
<action itemid="5007" script="misc/doors.lua" />
<!-- Level Doors -->
<action itemid="1646" script="misc/doors.lua" />
<action itemid="1648" script="misc/doors.lua" />
<action itemid="1664" script="misc/doors.lua" />
<action itemid="1666" script="misc/doors.lua" />
<action itemid="1678" script="misc/doors.lua" />
<action itemid="1680" script="misc/doors.lua" />
<action itemid="1687" script="misc/doors.lua" />
<action itemid="1696" script="misc/doors.lua" />
<!-- Quest Doors -->
<action itemid="1642" script="misc/doors.lua" />
<action itemid="1644" script="misc/doors.lua" />
<action itemid="1660" script="misc/doors.lua" />
<action itemid="1662" script="misc/doors.lua" />
<action itemid="1674" script="misc/doors.lua" />
<action itemid="1676" script="misc/doors.lua" />
<action itemid="1689" script="misc/doors.lua" />
<action itemid="1698" script="misc/doors.lua" />
<!-- Closed Normal Doors -->
<action itemid="2177" script="misc/doors.lua" />
<action itemid="2179" script="misc/doors.lua" />
<action itemid="1629" script="misc/doors.lua" />
<action itemid="1632" script="misc/doors.lua" />
<action itemid="1638" script="misc/doors.lua" />
<action itemid="1640" script="misc/doors.lua" />
<action itemid="1651" script="misc/doors.lua" />
<action itemid="1654" script="misc/doors.lua" />
<action itemid="1656" script="misc/doors.lua" />
<action itemid="1658" script="misc/doors.lua" />
<action itemid="1669" script="misc/doors.lua" />
<action itemid="1672" script="misc/doors.lua" />
<action itemid="1683" script="misc/doors.lua" />
<action itemid="1685" script="misc/doors.lua" />
<action itemid="1692" script="misc/doors.lua" />
<action itemid="1694" script="misc/doors.lua" />
<action itemid="4912" script="misc/doors.lua" />
<action itemid="4913" script="misc/doors.lua" />
<action itemid="5082" script="misc/doors.lua" />
<action itemid="5084" script="misc/doors.lua" />
<!-- Open Vertical Doors -->
<action itemid="1630" script="misc/doors.lua" />
<action itemid="1639" script="misc/doors.lua" />
<action itemid="1643" script="misc/doors.lua" />
<action itemid="1647" script="misc/doors.lua" />
<action itemid="1652" script="misc/doors.lua" />
<action itemid="1657" script="misc/doors.lua" />
<action itemid="1661" script="misc/doors.lua" />
<action itemid="1665" script="misc/doors.lua" />
<action itemid="1670" script="misc/doors.lua" />
<action itemid="1675" script="misc/doors.lua" />
<action itemid="1679" script="misc/doors.lua" />
<action itemid="1693" script="misc/doors.lua" />
<action itemid="1695" script="misc/doors.lua" />
<action itemid="1697" script="misc/doors.lua" />
<action itemid="1699" script="misc/doors.lua" />
<action itemid="4914" script="misc/doors.lua" />
<action itemid="5083" script="misc/doors.lua" />
<action itemid="2178" script="misc/doors.lua" />
<!-- Open Horizontal Doors -->
<action itemid="1633" script="misc/doors.lua" />
<action itemid="1641" script="misc/doors.lua" />
<action itemid="1645" script="misc/doors.lua" />
<action itemid="1649" script="misc/doors.lua" />
<action itemid="1655" script="misc/doors.lua" />
<action itemid="1659" script="misc/doors.lua" />
<action itemid="1663" script="misc/doors.lua" />
<action itemid="1667" script="misc/doors.lua" />
<action itemid="1673" script="misc/doors.lua" />
<action itemid="1677" script="misc/doors.lua" />
<action itemid="1681" script="misc/doors.lua" />
<action itemid="1684" script="misc/doors.lua" />
<action itemid="1686" script="misc/doors.lua" />
<action itemid="1688" script="misc/doors.lua" />
<action itemid="1690" script="misc/doors.lua" />
<action itemid="4911" script="misc/doors.lua" />
<action itemid="5085" script="misc/doors.lua" />
<action itemid="2180" script="misc/doors.lua" />
</actions>

View File

@@ -0,0 +1,20 @@
function doDestroyItem(target)
if not target:isItem() then
return false
end
local itemType = ItemType(target:getId())
if not itemType:isDestroyable() then
return false
end
if math.random(1,10) <= 3 then
target:transform(itemType:getDestroyTarget())
target:decay()
target:getPosition():sendMagicEffect(CONST_ME_BLOCKHIT)
else
target:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end

View File

@@ -0,0 +1,45 @@
local ovens = {
2535, 2537, 2539, 2541, 3510
}
local milestone = {
1943, 1944, 1945, 1946
}
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if item:getId() == 3603 then
if (target:getId() == 2524 or target:getId() == 2873) and target:getFluidType() == FLUID_WATER then
target:transform(target:getId(), FLUID_NONE)
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3604, 1):decay()
else
Game.createItem(3604, 1, item:getPosition()):decay()
end
item:remove(1)
return true
end
elseif item:getId() == 3604 then
if table.contains(ovens, target:getId()) then
Game.createItem(3600, 1, target:getPosition())
item:remove(1)
return true
end
elseif item:getId() == 3605 then
if table.contains(milestone, target:getId()) then
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3603, 1):decay()
else
Game.createItem(3603, 1, item:getPosition()):decay()
end
item:remove(1)
return true
end
end
return false
end

View File

@@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if math.random(1, 100) <= 1 and math.random(1, 100) <= 10 then
item:transform(2975, 0)
item:decay()
else
item:getPosition():sendMagicEffect(22)
end
return true
end

View File

@@ -0,0 +1,6 @@
function onUse(player, item, fromPosition, target, toPosition)
item:transform(3700, 1)
item:decay()
Game.createItem(3588, 3, fromPosition)
return true
end

View File

@@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3874 and player:getStorageValue(305) == 1 then
item:transform(4868, 1)
target:getPosition():sendMagicEffect(10)
return true
elseif target:getId() == 3885 and player:getStorageValue(305) == 3 then
item:transform(4870, 1)
target:getPosition():sendMagicEffect(10)
return true
elseif target:getId() == 3878 and player:getStorageValue(305) == 5 then
item:transform(4869, 1)
target:getPosition():sendMagicEffect(10)
return true
end
return false
end

View File

@@ -0,0 +1,28 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4992 and player:getStorageValue(304) == 1 then
target:getPosition():sendMagicEffect(17)
item:transform(4865, 1)
item:decay()
target:remove()
elseif target:getId() == 4993 and player:getStorageValue(304) == 3 then
target:getPosition():sendMagicEffect(17)
item:transform(4866, 1)
item:decay()
target:remove()
elseif target:getId() == 4991 and player:getStorageValue(304) == 5 then
target:getPosition():sendMagicEffect(17)
item:transform(4864, 1)
item:decay()
target:remove()
elseif target:getId() == 5013 and player:getStorageValue(304) == 5 then
target:getPosition():sendMagicEffect(17)
item:transform(5089, 1)
item:decay()
target:remove()
end
return false
end

View File

@@ -0,0 +1,49 @@
function onUse(player, item, fromPosition, target, toPosition)
local chestQuestNumber = item:getAttribute(ITEM_ATTRIBUTE_CHESTQUESTNUMBER)
if player:getStorageValue(chestQuestNumber) > 0 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "The " .. item:getName() .. " is empty.")
return true
end
local playerCapacity = player:getFreeCapacity()
if item:getSize() <= 0 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "The chest is empty. This is a bug, report it to a gamemaster.")
return true
end
local reward = item:getItem(0)
local stackable = reward:getType():isStackable()
local rewardName = reward:getName()
local rewardWeight = reward:getWeight()
if stackable then
if reward:getCount() > 1 then
rewardName = reward:getCount() .. " " .. reward:getPluralName()
else
rewardName = reward:getName()
end
end
if reward:getArticle():len() > 0 and reward:getCount() <= 1 then
rewardName = reward:getArticle() .. " " .. rewardName
end
if rewardWeight > playerCapacity and not getPlayerFlagValue(player, layerFlag_HasInfiniteCapacity) then
local term = "it is"
if stackable and reward:getCount() > 1 then
term = "they are"
end
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("You have found %s. Weighing %d.%02d oz %s too heavy.", rewardName, rewardWeight / 100, rewardWeight % 100, term))
return true
end
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found " .. rewardName .. ".")
player:addItemEx(reward:clone(), true)
if not getPlayerFlagValue(player, PlayerFlag_HasInfiniteCapacity) then
player:setStorageValue(chestQuestNumber, 1)
end
return true
end

View File

@@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if Tile(item:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then
item:getPosition():sendMagicEffect(3)
else
item:transform(3482, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,61 @@
function onUse(player, item, fromPosition, target, toPosition)
if math.random(1, 100) <= 95 then
item:getPosition():sendMagicEffect(19)
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
else
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
end
else
item:getPosition():sendMagicEffect(19)
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
parent:addItem(3592, 1)
else
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
Game.createItem(3592, 1, fromPosition)
end
item:transform(3592, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,36 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4848 and player:getStorageValue(297) == 0 then
player:setStorageValue(297, 1)
target:getPosition():sendMagicEffect(1)
target:transform(4849, 1)
target:decay()
return true
elseif target:getId() == 4848 and player:getStorageValue(297) == 1 then
player:setStorageValue(297, 2)
target:getPosition():sendMagicEffect(1)
target:transform(4849, 1)
target:decay()
return true
elseif target:getId() == 4848 and player:getStorageValue(297) == 2 then
player:setStorageValue(297, 3)
target:getPosition():sendMagicEffect(1)
target:transform(4849, 3)
target:decay()
return true
elseif target:getId() == 1628 and toPosition.x == 32680 and toPosition.y == 32083 and toPosition.z == 09 then
Game.transformItemOnMap({x = 32680, y = 32083, z = 09}, 1628, 1630)
return true
elseif target:getId() == 3501 and toPosition.x == 32013 and toPosition.y == 31562 and toPosition.z == 04 and player:getStorageValue(228) == 1 then
Game.sendMagicEffect({x = 32013, y = 31562, z = 04}, 15)
player:setStorageValue(228, 2)
return true
elseif target:getId() == 3501 and toPosition.x == 32013 and toPosition.y == 31562 and toPosition.z == 04 then
Game.sendMagicEffect({x = 32013, y = 31562, z = 04}, 3)
return true
end
return doDestroyItem(target)
end

View File

@@ -0,0 +1,175 @@
local lockedDoors = {
1628, 1631, 1650, 1653, 1668, 1671, 1682, 1691, 5006, 5007
}
local closedNormalDoors = {
[1629] = 1630,
[1632] = 1633,
[1638] = 1639,
[1640] = 1641,
[1651] = 1652,
[1654] = 1655,
[1656] = 1657,
[1658] = 1659,
[1669] = 1670,
[1672] = 1673,
[1683] = 1684,
[1685] = 1686,
[1692] = 1693,
[1694] = 1695,
[4912] = 4911,
[4913] = 4914,
[5082] = 5083,
[5084] = 5085,
[2177] = 2178,
[2179] = 2180,
}
local openVerticalDoors = {
[1630] = 1629,
[1639] = 1638,
[1643] = 1642,
[1647] = 1646,
[1652] = 1651,
[1657] = 1656,
[1661] = 1660,
[1665] = 1664,
[1670] = 1669,
[1675] = 1674,
[1679] = 1678,
[1693] = 1692,
[1695] = 1694,
[1697] = 1696,
[1699] = 1698,
[4914] = 4913,
[5083] = 5082,
[2178] = 2177,
}
local openHorizontalDoors = {
[1633] = 1632,
[1641] = 1640,
[1645] = 1644,
[1649] = 1648,
[1655] = 1654,
[1659] = 1658,
[1663] = 1662,
[1667] = 1666,
[1673] = 1672,
[1677] = 1676,
[1681] = 1680,
[1684] = 1683,
[1686] = 1685,
[1688] = 1687,
[1690] = 1689,
[4911] = 4912,
[5085] = 5084,
[2180] = 2179,
}
local levelDoors = {
[1646] = 1647,
[1648] = 1649,
[1664] = 1665,
[1666] = 1667,
[1678] = 1679,
[1680] = 1681,
[1687] = 1688,
[1696] = 1697,
}
local questDoors = {
[1642] = 1643,
[1644] = 1645,
[1660] = 1661,
[1662] = 1663,
[1674] = 1675,
[1676] = 1677,
[1689] = 1690,
[1698] = 1699,
}
local passthrough = {
[2334] = 2335,
[2335] = 2334,
[2336] = 2337,
[2337] = 2336,
[2338] = 2339,
[2339] = 2338,
[2340] = 2341,
[2341] = 2340,
}
function onUse(player, item, fromPosition, target, toPosition)
if table.contains(lockedDoors, item:getId()) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "It is locked.")
return true
end
local door = closedNormalDoors[item:getId()]
if door then
item:transform(door, 1)
item:decay()
return true
end
door = openVerticalDoors[item:getId()]
if door then
local doorCreature = Tile(item:getPosition()):getTopCreature()
if doorCreature then
doorCreature:teleportTo(item:getPosition():moveRel(1, 0, 0), true)
end
item:transform(door, 1)
item:decay()
return true
end
door = openHorizontalDoors[item:getId()]
if door then
local doorCreature = Tile(item:getPosition()):getTopCreature()
if doorCreature then
doorCreature:teleportTo(item:getPosition():moveRel(0, 1, 0), true)
end
item:transform(door, 1)
item:decay()
return true
end
door = levelDoors[item:getId()]
if door then
if player:getLevel() < item:getAttribute(ITEM_ATTRIBUTE_DOORLEVEL) then
player:sendTextMessage(MESSAGE_INFO_DESCR, item:getType():getDescription() .. ".")
return true
end
player:teleportTo(item:getPosition(), true)
item:transform(door, 1)
item:decay()
return true
end
door = questDoors[item:getId()]
if door then
local questNumber = item:getAttribute(ITEM_ATTRIBUTE_DOORQUESTNUMBER)
local questValue = item:getAttribute(ITEM_ATTRIBUTE_DOORQUESTVALUE)
if questNumber > 0 then
if player:getStorageValue(questNumber) ~= questValue then
player:sendTextMessage(MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
return true
end
end
player:teleportTo(item:getPosition(), true)
item:transform(door, 1)
item:decay()
return true
end
door = passthrough[item:getId()]
if door then
item:transform(door, 1)
item:decay()
return true
end
return true
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4094 then
item:transform(4853, 1)
item:decay()
target:getPosition():sendMagicEffect(12)
item:getPosition():sendMagicEffect(13)
return true
end
return false
end

View File

@@ -0,0 +1,39 @@
local water = {
4597, 4598, 4599, 4600, 4601, 4602,
4609, 4610, 4611, 4612, 4613, 4614,
4615, 4616, 4617, 4618, 4619, 4620,
622
}
local fishableWater = {
4597, 4598, 4599, 4600, 4601, 4602
}
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if not table.contains(water, target:getId()) then
return false
end
if not Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then
if player:getItemCount(3492) >= 1 then
player:addSkillTries(SKILL_FISHING, 1)
if math.random(1, 100) <= math.min(math.max(10 + (player:getEffectiveSkillLevel(SKILL_FISHING) - 10) * 0.597, 10), 50) then
player:addItem(3578, 1)
if target:getId() ~= 622 then
target:transform(4609, 1)
end
target:decay()
player:removeItem(3492, 1)
end
end
end
target:getPosition():sendMagicEffect(2)
return true
end

View File

@@ -0,0 +1,102 @@
local drunk = Condition(CONDITION_DRUNK)
drunk:setParameter(CONDITION_PARAM_TICKS, 60000)
local poison = Condition(CONDITION_POISON)
poison:setParameter(CONDITION_PARAM_DELAYED, true)
poison:setParameter(CONDITION_PARAM_MINVALUE, -50)
poison:setParameter(CONDITION_PARAM_MAXVALUE, -120)
poison:setParameter(CONDITION_PARAM_STARTVALUE, -5)
poison:setParameter(CONDITION_PARAM_TICKINTERVAL, 5000)
poison:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
local messages = {
[FLUID_WATER] = "Gulp.",
[FLUID_WINE] = "Aah...",
[FLUID_BEER] = "Aah...",
[FLUID_MUD] = "Gulp.",
[FLUID_BLOOD] = "Gulp.",
[FLUID_SLIME] = "Urgh!",
[FLUID_OIL] = "Gulp.",
[FLUID_URINE] = "Urgh!",
[FLUID_MILK] = "Mmmh.",
[FLUID_MANAFLUID] = "Aaaah...",
[FLUID_LIFEFLUID] = "Aaaah...",
[FLUID_LEMONADE] = "Mmmh."
}
function onUse(player, item, fromPosition, target, toPosition)
local targetItemType = ItemType(target:getId())
if targetItemType and targetItemType:isFluidContainer() then
if target:getFluidType() == 0 and item:getFluidType() ~= 0 then
target:transform(target:getId(), item:getFluidType())
item:transform(item:getId(), 0)
return true
elseif target:getFluidType() ~= 0 and item:getFluidType() == 0 then
target:transform(target:getId(), 0)
item:transform(item:getId(), target:getFluidType())
return true
end
end
if target:isCreature() then
if item:getFluidType() == FLUID_NONE then
player:sendCancelMessage("It is empty.")
else
local self = target == player
if self and item:getFluidType() == FLUID_BEER or item:getFluidType() == FLUID_WINE then
player:addCondition(drunk)
elseif self and item:getFluidType() == FLUID_SLIME then
player:addCondition(slime)
elseif item:getFluidType() == FLUID_MANAFLUID then
target:addMana(math.random(50, 100))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
elseif item:getFluidType() == FLUID_LIFEFLUID then
target:addHealth(math.random(25, 50))
target:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
end
if not self then
if item:getFluidType() ~= FLUID_MANAFLUID and item:getFluidType() ~= FLUID_LIFEFLUID then
if toPosition.x == CONTAINER_POSITION then
toPosition = player:getPosition()
end
Game.createItem(2886, item:getFluidType(), toPosition):decay()
return true
end
end
local message = messages[item:getFluidType()]
if message then
target:say(message, TALKTYPE_MONSTER_SAY)
else
target:say("Gulp.", TALKTYPE_MONSTER_SAY)
end
item:transform(item:getId(), FLUID_NONE)
end
else
if toPosition.x == CONTAINER_POSITION then
toPosition = player:getPosition()
end
local tile = Tile(toPosition)
if not tile then
return false
end
if item:getFluidType() ~= FLUID_NONE and tile:hasFlag(TILESTATE_IMMOVABLEBLOCKSOLID) then
return false
end
local fluidSource = targetItemType and targetItemType:getFluidSource() or FLUID_NONE
if fluidSource ~= FLUID_NONE then
item:transform(item:getId(), fluidSource)
elseif item:getFluidType() == FLUID_NONE then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "It is empty.")
else
Game.createItem(2886, item.type, toPosition):decay()
item:transform(item:getId(), 0)
end
end
return true
end

View File

@@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
local itemType = ItemType(item:getId())
local condition = player:getCondition(CONDITION_REGENERATION, CONDITIONID_DEFAULT)
if condition and math.floor(condition:getTicks() / 1000 + (itemType:getNutrition() * 12)) >= 1200 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "You are full.")
else
player:feed(itemType:getNutrition() * 12)
item:remove(1)
end
return true
end

View File

@@ -0,0 +1,61 @@
local parcels = {
[2775] = 2374,
[2776] = 2378,
[2777] = 2358,
[2778] = 2382,
[2779] = 2366,
[2780] = 2418,
[2781] = 2422,
[2782] = 2319,
[2783] = 2316,
[2784] = 2315,
[2785] = 2314,
[2786] = 2346,
[2787] = 2349,
[2788] = 2351,
[2789] = 2433,
[2790] = 2441,
[2791] = 2449,
[2792] = 2524,
[2793] = 2523,
[2794] = 2483,
[2795] = 2465,
[2796] = 2976,
[2797] = 2979,
[2798] = 2934,
[2799] = 3485,
[2800] = 2998,
[2801] = 2445,
[2802] = 2025,
[2803] = 2029,
[2804] = 2030,
[2805] = 2904,
[2806] = 3510,
[2807] = 2959,
[2808] = 2963,
[2809] = 2426,
[2810] = 2352,
[2811] = 2982,
[2812] = 2986,
[5086] = 5046,
[5087] = 5055,
[5088] = 5056,
}
function onUse(player, item, fromPosition, target, toPosition)
local parcel = parcels[item:getId()]
if not parcel then
return false
end
if not item:getParent():isTile() then
item:getPosition():sendMagicEffect(CONST_ME_POFF)
elseif not Tile(fromPosition):getHouse() then
item:getPosition():sendMagicEffect(CONST_ME_POFF)
else
item:transform(parcel)
item:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3030 then
item:getPosition():sendMagicEffect(14)
item:transform(3230, 1)
item:decay()
target:remove(1)
return true
end
return false
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4994 and player:getStorageValue(306) == 1 and player:getStorageValue(307) == 0 then
local parent = item:getParent()
if parent:isContainer() or parent:isPlayer() then
parent:addItem(4837, 1)
else
Game.createItem(4837, 1, item:getPosition())
end
target:getPosition():sendMagicEffect(2)
player:setStorageValue(307, 1)
return true
end
return false
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() >= 2948 and item:getId() <= 2950 or item:getId() >= 2952 and item:getId() <= 2958 or
item:getId() >= 2963 and item:getId() <= 2964 then
item:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN)
elseif (item:getId() >= 2959 and item:getId() <= 2962 or item:getId() == 2965) and math.random(1, 100) <= 50 then
item:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN)
elseif item:getId() >= 2959 and item:getId() <= 2962 or item:getId() == 2965 then
item:getPosition():sendMagicEffect(CONST_ME_SOUND_PURPLE)
elseif item:getId() == 3219 then
item:getPosition():sendMagicEffect(19)
end
return true
end

View File

@@ -0,0 +1,56 @@
local closedDoors = {
[1628] = 1630,
[1629] = 1628,
[1631] = 1633,
[1632] = 1631,
[1650] = 1652,
[1651] = 1650,
[1653] = 1655,
[1654] = 1653,
[1668] = 1670,
[1669] = 1668,
[1671] = 1673,
[1672] = 1671,
[1682] = 1684,
[1683] = 1682,
[1691] = 1693,
[1692] = 1691,
}
local openDoors = {
[1630] = 1628,
[1633] = 1631,
[1652] = 1650,
[1655] = 1653,
[1670] = 1668,
[1673] = 1671,
[1684] = 1682,
[1693] = 1691,
}
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
local door = closedDoors[target:getId()]
if not door then
door = openDoors[target:getId()]
end
if not door then
return false
end
local keyNumber = item:getAttribute(ITEM_ATTRIBUTE_KEYNUMBER)
local keyHoleNumber = target:getAttribute(ITEM_ATTRIBUTE_KEYHOLENUMBER)
if keyHoleNumber == 0 or keyNumber ~= keyHoleNumber then
player:sendCancelMessage("The key does not match.")
return true
end
target:transform(door)
target:decay()
return true
end

View File

@@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3594 then
target:transform(2977, 1)
target:decay()
return true
end
return false
end

View File

@@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if target:getId() == 3221 and toPosition.x == 31948 and toPosition.y == 31711 and toPosition.z == 06 then
item:transform(2859, 1)
item:decay()
player:setStorageValue(244, 2)
Game.sendMagicEffect({x = 31948, y = 31711, z = 06}, 19)
return true
end
return false
end

View File

@@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3696 then
target:transform(3695, 1)
target:decay()
return true
elseif target:getId() == 3702 then
target:transform(3701, 1)
target:decay()
return true
elseif target:getId() == 2130 then
target:remove()
return true
end
return false
end

View File

@@ -0,0 +1,6 @@
function onUse(player, item, fromPosition, target, toPosition)
item:transform(3481, 1)
item:decay()
item:getPosition():sendMagicEffect(3)
return true
end

View File

@@ -0,0 +1,4 @@
function onUse(player, item, fromPosition, target, toPosition)
player:sendCancelMessage("Hug me ^^")
return true
end

View File

@@ -0,0 +1,34 @@
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
local ground = tile:getGround()
if not ground then
return false
end
if ground:getId() == 372 then
ground:transform(394, 1)
ground:decay()
return true
elseif target:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 and math.random(1, 100) <= 40 then
Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
Game.removeItemOnMap({x = 32648, y = 32134, z = 10}, 1772)
return true
elseif target:getId() == 1772 and toPosition.x == 32648 and toPosition.y == 32134 and toPosition.z == 10 then
Game.sendMagicEffect({x = 32648, y = 32134, z = 10}, 3)
doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -40, -40)
return true
elseif target:getId() == 1791 and toPosition.x == 32356 and toPosition.y == 32074 and toPosition.z == 10 and math.random(1, 100) <= 40 then
Game.sendMagicEffect({x = 32356, y = 32074, z = 10}, 3)
Game.removeItemOnMap({x = 32356, y = 32074, z = 10}, 1791)
return true
elseif target:getId() == 1791 and toPosition.x == 32356 and toPosition.y == 32074 and toPosition.z == 10 then
Game.sendMagicEffect({x = 32356, y = 32074, z = 10}, 3)
doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -50, -50)
return true
end
return false
end

View File

@@ -0,0 +1,5 @@
function onUse(player, item, fromPosition, target, toPosition)
item:getPosition():sendMagicEffect(3)
item:remove()
return true
end

View File

@@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 2917 then
item:transform(2978, 1)
item:decay()
target:remove()
return true
end
return false
end

View File

@@ -0,0 +1,46 @@
local ropeSpots = {
386, 421
}
local holeSpots = {
293, 294, 369, 370, 385, 394, 411, 412,
421, 432, 433, 435, 482, 5081, 483, 594,
595, 607, 609, 610, 615, 1066, 1067, 1080
}
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
if not tile:getGround() then
return false
end
if table.contains(ropeSpots, tile:getGround():getId()) then
player:teleportTo(target:getPosition():moveRel(0, 1, -1))
return true
elseif table.contains(holeSpots, tile:getGround():getId()) or target:getId() == 435 then
local tile = Tile(target:getPosition():moveRel(0, 0, 1))
if not tile then
return false
end
local thing = tile:getTopCreature()
if not thing then
thing = tile:getTopVisibleThing()
end
if thing:isCreature() then
thing:teleportTo(target:getPosition():moveRel(0, 1, 0), false)
return true
end
if thing:isItem() and thing:getType():isMovable() then
thing:moveTo(target:getPosition():moveRel(0, 1, 0))
return true
end
return true
end
return false
end

View File

@@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 3652 then
player:sendCancelMessage(target:getType():getDescription() .. ".")
return true
elseif target:getId() == 3653 then
target:transform(3651, 1)
target:decay()
Game.createItem(3605, 1, target:getPosition())
return true
end
return doDestroyItem(target)
end

View File

@@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if target:getId() == 2199 and toPosition.x == 32754 and toPosition.y == 32559 and toPosition.z == 09 and player:getStorageValue(315) == 1 then
item:transform(4843, 1)
item:decay()
player:setStorageValue(316, 1)
target:getPosition():sendMagicEffect(4)
return true
end
return false
end

View File

@@ -0,0 +1,57 @@
function onUse(player, item, fromPosition, target, toPosition)
local tile = Tile(toPosition)
if not tile then
return false
end
local ground = tile:getGround()
if not ground then
return false
end
local toTarget = target;
local itemType = ItemType(target:getId())
if itemType:isSplash() then
toTarget = ground
end
if toTarget:getId() == 231 then
toTarget:getPosition():sendMagicEffect(3)
return true
elseif toTarget:getId() == 593 then
toTarget:transform(594, 1)
toTarget:decay()
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
return true
elseif toTarget:getId() == 606 then
toTarget:transform(607, 1)
toTarget:decay()
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
return true
elseif toTarget:getId() == 608 then
toTarget:transform(609, 1)
toTarget:decay()
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
elseif toTarget:getId() == 614 and math.random(1, 100) <= 50 then
toTarget:transform(615, 1)
toTarget:decay()
toTarget:getPosition():sendMagicEffect(3)
doRelocate(toTarget:getPosition(), toTarget:getPosition():moveRel(0,0,1))
elseif toTarget:getId() == 614 then
toTarget:getPosition():sendMagicEffect(3)
elseif toTarget:getId() == 616 and math.random(1, 100) <= 95 then
toTarget:transform(617, 1)
toTarget:decay()
toTarget:getPosition():sendMagicEffect(3)
Game.createMonster("scarab", toTarget:getPosition())
elseif toTarget:getId() == 616 then
toTarget:getPosition():sendMagicEffect(3)
Game.createItem(3042, 1, toTarget:getPosition())
toTarget:transform(617, 1)
toTarget:decay()
elseif toTarget:getId() == 617 then
toTarget:getPosition():sendMagicEffect(3)
end
return false
end

View File

@@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 4850 and player:getStorageValue(293) == 17 then
target:transform(4851, 1)
target:decay()
player:setStorageValue(299, 1)
item:remove()
target:getPosition():sendMagicEffect(7)
return true
end
return false
end

View File

@@ -0,0 +1,4 @@
function onUse(player, item, fromPosition, target, toPosition)
Game.createItem(2992, 1, fromPosition)
return true
end

View File

@@ -0,0 +1,37 @@
function onUse(player, item, fromPosition, target, toPosition)
if player:hasFlag(PlayerFlag_SpecialMoveUse) then
if item:getId() == 372 then
item:transform(394, 1)
item:decay()
elseif item:getId() == 386 or item:getId() == 421 then
local relPos = item:getPosition():moveRel(0, 1, -1)
player:teleportTo(relPos)
elseif item:getId() == 593 then
item:transform(594, 1)
item:decay()
doRelocate(item:getPosition(),item:getPosition():moveRel(0, 0, 1))
elseif item:getId() == 606 or item:getId() == 608 then
item:transform(607, 1)
item:decay()
doRelocate(item:getPosition(), item:getPosition():moveRel(0, 0, 1))
elseif item:getId() == 614 then
item:transform(615, 1)
item:decay()
item:getPosition():sendMagicEffect(3)
doRelocate(item:getPosition(), item:getPosition():moveRel(0, 0, 1))
elseif item:getId() == 3653 then
item:transform(3651, 1)
item:decay()
Game.createItem(3605, 1, item:getPosition())
elseif item:getId() == 3696 then
item:transform(3695, 1)
item:decay()
elseif item:getId() == 3702 then
item:transform(3701, 1)
item:decay()
end
else
return false
end
return true
end

View File

@@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if target:getId() == 599 and toPosition.x == 32665 and toPosition.y == 32736 and toPosition.z == 06 and player:getStorageValue(320) == 5 then
player:setStorageValue(321,1)
target:getPosition():sendMagicEffect(13)
return true
elseif target:getId() == 599 and toPosition.x == 32497 and toPosition.y == 31622 and toPosition.z == 06 and player:getStorageValue(320) == 5 then
player:setStorageValue(322,1)
target:getPosition():sendMagicEffect(13)
return true
end
return false
end

View File

@@ -0,0 +1,32 @@
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local count = getPlayerInstantSpellCount(player)
local text = ""
local spells = {}
for i = 0, count - 1 do
local spell = getPlayerInstantSpellInfo(player, i)
if spell.level ~= 0 then
if spell.manapercent > 0 then
spell.mana = spell.manapercent .. "%"
end
spells[#spells + 1] = spell
end
end
table.sort(spells, function(a, b) return a.level < b.level end)
local prevLevel = -1
for i, spell in ipairs(spells) do
local line = ""
if prevLevel ~= spell.level then
if i ~= 1 then
line = "\n"
end
line = line .. "Spells for Level " .. spell.level .. "\n"
prevLevel = spell.level
end
text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n"
end
player:showTextDialog(item:getId(), text)
return true
end

View File

@@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2566 then
item:transform(2567, 1)
item:decay()
elseif item:getId() == 2567 then
player:sendCancelMessage("It doesn't move.")
elseif item:getId() == 2569 then
item:transform(2570, 1)
item:decay()
elseif item:getId() == 2570 then
item:transform(2569, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,16 @@
local downstairs = {
435
}
local upstairs = {
1948, 1968
}
function onUse(player, item, fromPosition, target, toPosition)
if table.contains(downstairs, item:getId()) then
player:teleportTo(item:getPosition():moveRel(0, 0, 1))
elseif table.contains(upstairs, item:getId()) then
player:teleportTo(item:getPosition():moveRel(0, 1, -1))
end
return true
end

View File

@@ -0,0 +1,4 @@
function onUse(player, item, fromPosition, target, toPosition)
player:sendTextMessage(MESSAGE_INFO_DESCR, "The time is " .. getFormattedWorldTime() .. ".")
return true
end

View File

@@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if not target:isItem() then
return false
end
if target:getId() == 2874 and target:getFluidType() == FLUID_OIL then
target:transform(target:getId(), FLUID_NONE)
item:transform(2914, 1)
item:decay()
return true
end
return false
end

View File

@@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if math.random(1, 100) <= 90 then
item:getPosition():sendMagicEffect(3)
return true
else
player:getPosition():sendMagicEffect(3)
end
return true
end

View File

@@ -0,0 +1,3 @@
function onUse(player, item, fromPosition, target, toPosition)
return doDestroyItem(target)
end

View File

@@ -0,0 +1,26 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32627, y = 31699, z = 10}, 1771) then
item:transform(2773, 1)
item:decay()
doRelocate({x = 32627, y = 31699, z = 10},{x = 32626, y = 31699, z = 10})
doRelocate({x = 32628, y = 31699, z = 10},{x = 32626, y = 31699, z = 10})
doRelocate({x = 32629, y = 31699, z = 10},{x = 32626, y = 31699, z = 10})
Game.transformItemOnMap({x = 32627, y = 31699, z = 10}, 1771, 622)
Game.createItem(4788, 1, {x = 32627, y = 31699, z = 10})
Game.transformItemOnMap({x = 32628, y = 31699, z = 10}, 1771, 622)
Game.transformItemOnMap({x = 32629, y = 31699, z = 10}, 1771, 622)
Game.createItem(4786, 1, {x = 32629, y = 31699, z = 10})
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32628, y = 31699, z = 10}, 622) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32627, y = 31699, z = 10}, 622, 1771)
Game.transformItemOnMap({x = 32628, y = 31699, z = 10}, 622, 1771)
Game.transformItemOnMap({x = 32629, y = 31699, z = 10}, 622, 1771)
Game.removeItemOnMap({x = 32627, y = 31699, z = 10}, 4788)
Game.removeItemOnMap({x = 32629, y = 31699, z = 10}, 4786)
end
return true
end

View File

@@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32792, y = 31581, z = 07},1282) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32792, y = 31581, z = 07}, 1282)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32792, y = 31581, z = 07}, 1282) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32792, y = 31581, z = 07},{x = 32792, y = 31582, z = 07})
Game.createItem(1282, 1, {x = 32792, y = 31581, z = 07})
end
return true
end

View File

@@ -0,0 +1,32 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32685, y = 32084, z = 09}, 1771) then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32687, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
doRelocate({x = 32686, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
doRelocate({x = 32685, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
doRelocate({x = 32684, y = 32084, z = 09},{x = 32683, y = 32084, z = 09})
Game.transformItemOnMap({x = 32687, y = 32084, z = 09}, 1771, 727)
Game.createItem(4798, 1, {x = 32687, y = 32084, z = 09})
Game.transformItemOnMap({x = 32686, y = 32084, z = 09}, 1771, 727)
Game.transformItemOnMap({x = 32685, y = 32084, z = 09}, 1771, 727)
Game.transformItemOnMap({x = 32684, y = 32084, z = 09}, 1771, 727)
Game.createItem(4800, 1, {x = 32684, y = 32084, z = 09})
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2772 and Game.isItemThere({x = 32685, y = 32084, z = 09},727) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32684, y = 32084, z = 09}, 4800)
Game.transformItemOnMap({x = 32684, y = 32084, z = 09}, 727, 1771)
Game.transformItemOnMap({x = 32685, y = 32084, z = 09}, 727, 1771)
Game.removeItemOnMap({x = 32687, y = 32084, z = 09}, 4798)
Game.transformItemOnMap({x = 32687, y = 32084, z = 09}, 727, 1771)
Game.transformItemOnMap({x = 32686, y = 32084, z = 09}, 727, 1771)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,26 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32673, y = 32085, z = 08},430) and Game.isItemThere ({x = 32669, y = 32089, z = 08},430) and Game.isItemThere ({x = 32673, y = 32093, z = 08},430) and Game.isItemThere ({x = 32677, y = 32089, z = 08},430) and Game.isItemThere ({x = 32673, y = 32083, z = 08},3349) and Game.isItemThere ({x = 32667, y = 32089, z = 08},3585) and Game.isItemThere ({x = 32673, y = 32094, z = 08},3264) and Game.isItemThere ({x = 32679, y = 32089, z = 08},3059) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32673, y = 32083, z = 08}, 3349)
Game.removeItemOnMap({x = 32667, y = 32089, z = 08}, 3585)
Game.removeItemOnMap({x = 32673, y = 32094, z = 08}, 3264)
Game.removeItemOnMap({x = 32679, y = 32089, z = 08}, 3059)
Game.sendMagicEffect({x = 32673, y = 32083, z = 08}, 11)
Game.sendMagicEffect({x = 32667, y = 32089, z = 08}, 11)
Game.sendMagicEffect({x = 32673, y = 32094, z = 08}, 11)
Game.sendMagicEffect({x = 32679, y = 32089, z = 08}, 11)
doRelocate({x = 32673, y = 32093, z = 08},{x = 32671, y = 32069, z = 08})
doRelocate({x = 32669, y = 32089, z = 08},{x = 32672, y = 32069, z = 08})
doRelocate({x = 32673, y = 32085, z = 08},{x = 32671, y = 32070, z = 08})
doRelocate({x = 32677, y = 32089, z = 08},{x = 32672, y = 32070, z = 08})
Game.sendMagicEffect({x = 32671, y = 32069, z = 08}, 11)
Game.sendMagicEffect({x = 32672, y = 32069, z = 08}, 11)
Game.sendMagicEffect({x = 32671, y = 32070, z = 08}, 11)
Game.sendMagicEffect({x = 32672, y = 32070, z = 08}, 11)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32568, y = 32078, z = 12},2185) and Game.isItemThere ({x = 32569, y = 32078, z = 12},2185) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32568, y = 32078, z = 12}, 2185)
Game.removeItemOnMap({x = 32569, y = 32078, z = 12}, 2185)
elseif item:getId() == 2773 and Game.isItemThere({x = 32568, y = 32078, z = 12},2185) and Game.isItemThere ({x = 32569, y = 32078, z = 12}, 2185) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.createItem(2185, 1, {x = 32568, y = 32078, z = 12})
Game.createItem(2185, 1, {x = 32569, y = 32078, z = 12})
end
return true
end

View File

@@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33314, y = 31592, z = 15}, 1842)
doRelocate({x = 33316, y = 31591, z = 15},{x = 33317, y = 31591, z = 15})
Game.createItem(1949, 1, {x = 33316, y = 31591, z = 15})
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33314, y = 31592, z = 15},{x = 33315, y = 31592, z = 15})
Game.createItem(1842, 1, {x = 33314, y = 31592, z = 15})
Game.removeItemOnMap({x = 33316, y = 31591, z = 15}, 1949)
end
return true
end

View File

@@ -0,0 +1,31 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 33295, y = 31677, z = 15},1791) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33295, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33296, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33297, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33298, y = 31677, z = 15}, 1791)
Game.removeItemOnMap({x = 33299, y = 31677, z = 15}, 1791)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 33295, y = 31677, z = 15}, 1791) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33295, y = 31677, z = 15},{x = 33295, y = 31678, z = 15})
doRelocate({x = 33296, y = 31677, z = 15},{x = 33296, y = 31678, z = 15})
doRelocate({x = 33297, y = 31677, z = 15},{x = 33297, y = 31678, z = 15})
doRelocate({x = 33298, y = 31677, z = 15},{x = 33298, y = 31678, z = 15})
doRelocate({x = 33299, y = 31677, z = 15},{x = 33299, y = 31678, z = 15})
Game.createItem(1791, 1, {x = 33295, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33296, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33297, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33298, y = 31677, z = 15})
Game.createItem(1791, 1, {x = 33299, y = 31677, z = 15})
end
return true
end

View File

@@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33171, y = 31897, z = 08}, 1772)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33171, y = 31897, z = 08},{x = 33171, y = 31898, z = 08})
Game.createItem(1772, 1, {x = 33171, y = 31897, z = 08})
end
return true
end

View File

@@ -0,0 +1,31 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 33222, y = 31671, z = 13},430) and Game.isItemThere ({x = 33223, y = 31671, z = 13},430) and Game.isItemThere ({x = 33224, y = 31671, z = 13},430) and Game.isItemThere ({x = 33225, y = 31671, z = 13},430) and Game.isItemThere ({x = 33220, y = 31659, z = 13},1772) then
item:transform(2772, 1)
item:decay()
Game.removeItemOnMap({x = 33220, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33221, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33222, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33223, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33224, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33219, y = 31659, z = 13}, 1772)
Game.removeItemOnMap({x = 33219, y = 31657, z = 13}, 1772)
Game.removeItemOnMap({x = 33221, y = 31657, z = 13}, 1772)
Game.removeItemOnMap({x = 33220, y = 31661, z = 13}, 1772)
Game.removeItemOnMap({x = 33222, y = 31661, z = 13}, 1772)
Game.createMonster("Demon", {x = 33224, y = 31659, z = 13})
Game.createMonster("Demon", {x = 33223, y = 31659, z = 13})
Game.createMonster("Demon", {x = 33219, y = 31657, z = 13})
Game.createMonster("Demon", {x = 33221, y = 31657, z = 13})
Game.createMonster("Demon", {x = 33220, y = 31661, z = 13})
Game.createMonster("Demon", {x = 33222, y = 31661, z = 13})
doRelocate({x = 33222, y = 31671, z = 13},{x = 33219, y = 31659, z = 13})
doRelocate({x = 33223, y = 31671, z = 13},{x = 33220, y = 31659, z = 13})
doRelocate({x = 33224, y = 31671, z = 13},{x = 33221, y = 31659, z = 13})
doRelocate({x = 33225, y = 31671, z = 13},{x = 33222, y = 31659, z = 13})
Game.sendMagicEffect({x = 33219, y = 31659, z = 13}, 11)
Game.sendMagicEffect({x = 33220, y = 31659, z = 13}, 11)
Game.sendMagicEffect({x = 33221, y = 31659, z = 13}, 11)
Game.sendMagicEffect({x = 33222, y = 31659, z = 13}, 11)
end
return true
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32483, y = 31633, z = 09}, 385) then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32483, y = 31633, z = 09}, 355, 385)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:remove()
Game.createItem(2126, 1, {x = 32487, y = 31628, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31629, z = 13})
Game.createItem(2126, 1, {x = 32488, y = 31629, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31627, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31627, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31628, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31629, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31630, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31630, z = 13})
Game.createItem(2126, 1, {x = 32488, y = 31630, z = 13})
Game.createItem(2126, 1, {x = 32486, y = 31626, z = 13})
Game.createItem(2126, 1, {x = 32487, y = 31626, z = 13})
Game.createItem(2126, 1, {x = 32488, y = 31626, z = 13})
Game.sendMagicEffect({x = 32488, y = 31628, z = 13}, 3)
end
return true
end

View File

@@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if Game.isItemThere({x = 33211, y = 32698, z = 13}, 1306) then
Game.removeItemOnMap({x = 33211, y = 32698, z = 13}, 1306)
else
doRelocate({x = 33211, y = 32698, z = 13}, {x = 33211, y = 32697, z = 13})
Game.createItem(1306, 1, {x = 33211, y = 32698, z = 13})
end
return true
end

View File

@@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32259, y = 31891, z = 10},2129) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32259, y = 31891, z = 10}, 2129)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32259, y = 31891, z = 10}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32259, y = 31891, z = 10},{x = 32259, y = 31892, z = 10})
Game.createItem(2129, 1, {x = 32259, y = 31891, z = 10})
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32313, y = 31975, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31975, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32313, y = 31975, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31975, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32313, y = 31976, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31976, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32313, y = 31976, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32313, y = 31976, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32311, y = 31976, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31976, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32311, y = 31976, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31976, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32311, y = 31975, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31975, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32311, y = 31975, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32311, y = 31975, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32309, y = 31976, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31976, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32309, y = 31976, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31976, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32309, y = 31975, z = 13}, 1998) then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31975, z = 13}, 1998, 1996)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32309, y = 31975, z = 13}, 1996) then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32309, y = 31975, z = 13}, 1996, 1998)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32266, y = 31860, z = 11},2129) then
Game.removeItemOnMap({x = 32266, y = 31860, z = 11}, 2129)
Game.transformItemOnMap({x = 32266, y = 31860, z = 11}, 410, 411)
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32266, y = 31860, z = 11}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32266, y = 31860, z = 11}, 411, 410)
Game.createItem(2129, 1, {x = 32266, y = 31860, z = 11})
end
return true
end

View File

@@ -0,0 +1,19 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32259, y = 31890, z = 10},2129) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32259, y = 31890, z = 10}, 2129)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 32259, y = 31890, z = 10}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32259, y = 31890, z = 10},{x = 32259, y = 31889, z = 10})
Game.createItem(2129, 1, {x = 32259, y = 31890, z = 10})
end
return true
end

View File

@@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31845, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31842, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@@ -0,0 +1,28 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 33148, y = 32867, z = 09}, 2129) and Game.isItemThere ({x = 33149, y = 32867, z = 09}, 2129) and Game.isItemThere ({x = 33148, y = 32868, z = 09}, 2129) and Game.isItemThere ({x = 33149, y = 32868, z = 09}, 2129) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 33148, y = 32867, z = 09}, 2129)
Game.removeItemOnMap({x = 33149, y = 32867, z = 09}, 2129)
Game.removeItemOnMap({x = 33148, y = 32868, z = 09}, 2129)
Game.removeItemOnMap({x = 33149, y = 32868, z = 09}, 2129)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and Game.isItemThere({x = 33148, y = 32867, z = 09}, 2129) then
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 33148, y = 32867, z = 09}, {x = 33148, y = 32869, z = 09})
doRelocate({x = 33149, y = 32867, z = 09}, {x = 33149, y = 32869, z = 09})
doRelocate({x = 33148, y = 32868, z = 09}, {x = 33148, y = 32869, z = 09})
doRelocate({x = 33149, y = 32868, z = 09},{x = 33149, y = 32869, z = 09})
Game.createItem(2129, 1, {x = 33148, y = 32867, z = 09})
Game.createItem(2129, 1, {x = 33149, y = 32867, z = 09})
Game.createItem(2129, 1, {x = 33148, y = 32868, z = 09})
Game.createItem(2129, 1, {x = 33149, y = 32868, z = 09})
end
return true
end

View File

@@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31843, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32220, y = 31843, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@@ -0,0 +1,21 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31842, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31844, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31842, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31846, z = 14}, 12)
Game.transformItemOnMap({x = 32214, y = 31850, z = 15}, 2114, 2113)
Game.transformItemOnMap({x = 32215, y = 31850, z = 15}, 2114, 2113)
Game.transformItemOnMap({x = 32216, y = 31850, z = 15}, 2114, 2113)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and Game.isItemThere({x = 32220, y = 31844, z = 15}, 2772) and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31846, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32220, y = 31846, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31844, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2773 and player:getStorageValue(7) ~= 1 then
item:transform(2772, 1)
item:decay()
item:getPosition():sendMagicEffect(13)
Game.sendMagicEffect({x = 32217, y = 31843, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31842, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31841, z = 14}, 12)
Game.sendMagicEffect({x = 32217, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32218, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32219, y = 31845, z = 14}, 12)
Game.sendMagicEffect({x = 32220, y = 31845, z = 14}, 12)
elseif item:getId() == 2773 then
item:getPosition():sendMagicEffect(12)
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -170, -170)
end
return true
end

View File

@@ -0,0 +1,28 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
doRelocate({x = 32636, y = 31881, z = 07},{x = 32636, y = 31881, z = 02})
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
elseif item:getId() == 2772 then
doRelocate({x = 32636, y = 31881, z = 07},{x = 32636, y = 31881, z = 02})
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
elseif item:getId() == 2773 then
doRelocate({x = 32636, y = 31881, z = 02},{x = 32636, y = 31881, z = 07})
item:transform(2772, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32636, y = 31881, z = 02},{x = 32636, y = 31881, z = 07})
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
end
return true
end

View File

@@ -0,0 +1,22 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32604, y = 31905, z = 03}, 1789)
Game.removeItemOnMap({x = 32605, y = 31905, z = 03}, 1790)
Game.removeItemOnMap({x = 32604, y = 31904, z = 03}, 1787)
Game.removeItemOnMap({x = 32605, y = 31904, z = 03}, 1788)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32604, y = 31904, z = 03},{x = 32604, y = 31906, z = 03})
doRelocate({x = 32604, y = 31905, z = 03},{x = 32604, y = 31906, z = 03})
doRelocate({x = 32605, y = 31904, z = 03},{x = 32605, y = 31906, z = 03})
doRelocate({x = 32605, y = 31905, z = 03},{x = 32605, y = 31906, z = 03})
Game.createItem(1787, 1, {x = 32604, y = 31904, z = 03})
Game.createItem(1789, 1, {x = 32604, y = 31905, z = 03})
Game.createItem(1788, 1, {x = 32605, y = 31904, z = 03})
Game.createItem(1790, 1, {x = 32605, y = 31905, z = 03})
end
return true
end

View File

@@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.transformItemOnMap({x = 32605, y = 31902, z = 04}, 436, 432)
item:transform(2773, 1)
item:decay()
doRelocate({x = 32605, y = 31902, z = 04},{x = 32605, y = 31902, z = 05})
elseif item:getId() == 2773 then
Game.transformItemOnMap({x = 32605, y = 31902, z = 04}, 432, 436)
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
doRelocate({x = 32636, y = 31881, z = 07},{x = 32636, y = 31881, z = 02})
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32636, y = 31881, z = 02},{x = 32636, y = 31881, z = 07})
Game.sendMagicEffect({x = 32636, y = 31881, z = 02}, 3)
Game.sendMagicEffect({x = 32636, y = 31881, z = 07}, 3)
end
return true
end

View File

@@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32566, y = 32119, z = 07}, 1270)
Game.transformItemOnMap({x = 32566, y = 32118, z = 07}, 1270, 1274)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32566, y = 32119, z = 07},{x = 32567, y = 32119, z = 07})
Game.createItem(1270, 1, {x = 32566, y = 32119, z = 07})
Game.transformItemOnMap({x = 32566, y = 32118, z = 07}, 1274, 1270)
end
return true
end

View File

@@ -0,0 +1,26 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
doRelocate({x = 32426, y = 32202, z = 14},{x = 32426, y = 32200, z = 14})
doRelocate({x = 32426, y = 32201, z = 14},{x = 32426, y = 32200, z = 14})
doRelocate({x = 32427, y = 32202, z = 14},{x = 32427, y = 32200, z = 14})
doRelocate({x = 32427, y = 32201, z = 14},{x = 32427, y = 32200, z = 14})
Game.removeItemOnMap({x = 32426, y = 32202, z = 14}, 1771)
Game.removeItemOnMap({x = 32426, y = 32201, z = 14}, 1771)
Game.removeItemOnMap({x = 32427, y = 32202, z = 14}, 1771)
Game.removeItemOnMap({x = 32427, y = 32201, z = 14}, 1771)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.createTile({x = 32426, y = 32201, z = 14}, true)
Game.createTile({x = 32427, y = 32201, z = 14}, true)
Game.createTile({x = 32426, y = 32202, z = 14}, true)
Game.createTile({x = 32427, y = 32202, z = 14}, true)
Game.createItem(1771, 1, {x = 32426, y = 32201, z = 14})
Game.createItem(1771, 1, {x = 32427, y = 32201, z = 14})
Game.createItem(1771, 1, {x = 32426, y = 32202, z = 14})
Game.createItem(1771, 1, {x = 32427, y = 32202, z = 14})
end
return true
end

View File

@@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.transformItemOnMap({x = 32313, y = 31928, z = 08}, 2772, 2773)
Game.sendMagicEffect({x = 32314, y = 31928, z = 08}, 12)
elseif item:getId() == 2773 then
Game.transformItemOnMap({x = 32313, y = 31928, z = 08}, 2773, 2772)
Game.sendMagicEffect({x = 32314, y = 31928, z = 08}, 12)
end
return true
end

View File

@@ -0,0 +1,15 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:remove()
Game.removeItemOnMap({x = 32186, y = 31626, z = 08}, 2129)
Game.removeItemOnMap({x = 32187, y = 31626, z = 08}, 2129)
Game.removeItemOnMap({x = 32188, y = 31626, z = 08}, 2129)
Game.removeItemOnMap({x = 32189, y = 31626, z = 08}, 2129)
Game.sendMagicEffect({x = 32180, y = 31633, z = 08}, 3)
Game.sendMagicEffect({x = 32186, y = 31626, z = 08}, 3)
Game.sendMagicEffect({x = 32187, y = 31626, z = 08}, 3)
Game.sendMagicEffect({x = 32188, y = 31626, z = 08}, 3)
Game.sendMagicEffect({x = 32189, y = 31626, z = 08}, 3)
end
return true
end

View File

@@ -0,0 +1,22 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32915, y = 32076, z = 06},388) then
Game.removeItemOnMap({x = 32915, y = 32076, z = 06}, 388)
Game.removeItemOnMap({x = 32915, y = 32080, z = 06}, 388)
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 and not Game.isItemThere({x = 32915, y = 32076, z = 06}, 388) then
doRelocate({x = 32915, y = 32076, z = 06},{x = 32916, y = 32076, z = 06})
doRelocate({x = 32915, y = 32080, z = 06},{x = 32916, y = 32080, z = 06})
Game.createItem(388, 1, {x = 32915, y = 32076, z = 06})
Game.createItem(388, 1, {x = 32915, y = 32080, z = 06})
item:transform(2772, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32780, y = 32231, z = 08}, 389)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32780, y = 32231, z = 08},{x = 32780, y = 32232, z = 08})
Game.createItem(389, 1, {x = 32780, y = 32231, z = 08})
end
return true
end

View File

@@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.removeItemOnMap({x = 32649, y = 32923, z = 08}, 1822)
Game.transformItemOnMap({x = 32649, y = 32923, z = 08}, 351, 385)
Game.transformItemOnMap({x = 32652, y = 32922, z = 08}, 2772, 2773)
elseif item:getId() == 2773 then
Game.transformItemOnMap({x = 32649, y = 32923, z = 08}, 385, 351)
Game.createItem(1822, 1, {x = 32649, y = 32923, z = 08})
Game.transformItemOnMap({x = 32652, y = 32922, z = 08}, 2773, 2772)
end
return true
end

View File

@@ -0,0 +1,9 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2774 and Game.isItemThere({x = 33151, y = 32866, z = 08},1345) then
Game.removeItemOnMap({x = 33151, y = 32866, z = 08}, 1345)
Game.sendMagicEffect({x = 33151, y = 32862, z = 07}, 14)
elseif item:getId() == 2774 then
Game.sendMagicEffect({x = 33151, y = 32862, z = 07}, 3)
end
return true
end

View File

@@ -0,0 +1,42 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32614, y = 32209, z = 10},2523) then
Game.removeItemOnMap({x = 32614, y = 32209, z = 10}, 2523)
Game.removeItemOnMap({x = 32614, y = 32208, z = 10}, 1270)
doRelocate({x = 32614, y = 32209, z = 10},{x = 32614, y = 32208, z = 10})
Game.createItem(2523, 1, {x = 32614, y = 32208, z = 10})
Game.createItem(1270, 1, {x = 32614, y = 32209, z = 10})
Game.removeItemOnMap({x = 32614, y = 32206, z = 10}, 1791)
Game.removeItemOnMap({x = 32614, y = 32205, z = 10}, 1270)
Game.createItem(1810, 1, {x = 32614, y = 32204, z = 10})
Game.removeItemOnMap({x = 32614, y = 32221, z = 10}, 1270)
Game.removeItemOnMap({x = 32615, y = 32223, z = 10}, 1946)
Game.createItem(1796, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32615, y = 32221, z = 10})
Game.createItem(2124, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32613, y = 32220, z = 10})
Game.sendMagicEffect({x = 32613, y = 32220, z = 10}, 9)
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32613, y = 32220, z = 10}, 3050)
Game.createItem(1823, 1, {x = 32614, y = 32205, z = 10})
Game.createItem(1270, 1, {x = 32614, y = 32206, z = 10})
Game.sendMagicEffect({x = 32615, y = 32224, z = 10}, 16)
Game.sendMagicEffect({x = 32614, y = 32224, z = 10}, 16)
elseif item:getId() == 2772 then
doRelocate({x = 32614, y = 32209, z = 10},{x = 32613, y = 32209, z = 10})
Game.removeItemOnMap({x = 32614, y = 32221, z = 10}, 1270)
Game.removeItemOnMap({x = 32615, y = 32223, z = 10}, 1946)
Game.createItem(1796, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32615, y = 32221, z = 10})
Game.createItem(2124, 1, {x = 32615, y = 32223, z = 10})
Game.createItem(2123, 1, {x = 32613, y = 32220, z = 10})
Game.sendMagicEffect({x = 32613, y = 32220, z = 10}, 9)
Game.createItem(1270, 1, {x = 32614, y = 32209, z = 10})
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32613, y = 32220, z = 10}, 3050)
elseif item:getId() == 2773 then
Game.sendMagicEffect({x = 32616, y = 32222, z = 10}, 3)
end
return true
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
doRelocate({x = 32623, y = 32189, z = 09},{x = 32623, y = 32190, z = 09}, true)
doRelocate({x = 32623, y = 32188, z = 09},{x = 32623, y = 32189, z = 09}, true)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32623, y = 32188, z = 09},{x = 32622, y = 32189, z = 09}, true)
doRelocate({x = 32623, y = 32189, z = 09},{x = 32623, y = 32188, z = 09}, true)
end
return true
end

View File

@@ -0,0 +1,40 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32594, y = 32214, z = 09},3050) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32603, y = 32216, z = 09}, 1626)
Game.removeItemOnMap({x = 32604, y = 32216, z = 09}, 1627)
doRelocate({x = 32603, y = 32216, z = 09},{x = 32603, y = 32217, z = 09})
doRelocate({x = 32604, y = 32216, z = 09},{x = 32604, y = 32217, z = 09})
doRelocate({x = 32593, y = 32216, z = 09},{x = 32592, y = 32216, z = 09})
doRelocate({x = 32594, y = 32216, z = 09},{x = 32592, y = 32216, z = 09})
Game.removeItemOnMap({x = 32606, y = 32216, z = 09}, 1271)
Game.removeItemOnMap({x = 32607, y = 32216, z = 09}, 1271)
Game.transformItemOnMap({x = 32601, y = 32216, z = 09}, 1271, 1626)
Game.transformItemOnMap({x = 32602, y = 32216, z = 09}, 1271, 1627)
Game.createItem(1271, 1, {x = 32594, y = 32216, z = 09})
Game.createItem(1271, 1, {x = 32593, y = 32216, z = 09})
Game.createItem(1271, 1, {x = 32603, y = 32216, z = 09})
Game.createItem(1271, 1, {x = 32604, y = 32216, z = 09})
Game.removeItemOnMap({x = 32594, y = 32214, z = 09}, 3050)
Game.sendMagicEffect({x = 32594, y = 32214, z = 09}, 9)
elseif item:getId() == 2772 then
Game.sendMagicEffect({x = 32594, y = 32214, z = 09}, 3)
elseif item:getId() == 2773 and Game.isItemThere({x = 32594, y = 32214, z = 09},3050) then
item:transform(2772, 1)
item:decay()
Game.removeItemOnMap({x = 32593, y = 32216, z = 09}, 1271)
Game.removeItemOnMap({x = 32594, y = 32216, z = 09}, 1271)
Game.transformItemOnMap({x = 32601, y = 32216, z = 09}, 1626, 1271)
Game.transformItemOnMap({x = 32602, y = 32216, z = 09}, 1627, 1271)
Game.transformItemOnMap({x = 32603, y = 32216, z = 09}, 1271, 1626)
Game.transformItemOnMap({x = 32604, y = 32216, z = 09}, 1271, 1627)
Game.createItem(1271, 1, {x = 32606, y = 32216, z = 09})
Game.createItem(1271, 1, {x = 32607, y = 32216, z = 09})
Game.removeItemOnMap({x = 32594, y = 32214, z = 09}, 3050)
Game.sendMagicEffect({x = 32594, y = 32214, z = 09}, 9)
elseif item:getId() == 2773 then
Game.sendMagicEffect({x = 32594, y = 32214, z = 09}, 3)
end
return true
end

View File

@@ -0,0 +1,12 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.createItem(2471, 1, {x = 32479, y = 31901, z = 05})
Game.createItem(2122, 1, {x = 32479, y = 31892, z = 03})
elseif item:getId() == 2773 and not Game.isItemThere({x = 32479, y = 31892, z = 03}, 2122) then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,25 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and math.random(1, 100) <= 70 then
item:transform(2773, 1)
item:decay()
Game.removeItemsOnMap({x = item:getPosition().x - 1, y = item:getPosition().y, z = 14})
Game.createItem(3242, 1, {x = item:getPosition().x - 1, y = item:getPosition().y, z = 14})
doTargetCombatHealth(0, player, COMBAT_FIREDAMAGE, -200, -200)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemsOnMap({x = item:getPosition().x - 1, y = item:getPosition().y, z = 14})
Game.createItem(3595, 1, {x = 33117, y = item:getPosition().y, z = 14})
player:setStorageValue(258, 1)
Game.sendMagicEffect({x = 33122, y = 32765, z = 14}, 15)
Game.sendMagicEffect({x = 33117, y = 32761, z = 14}, 15)
Game.sendMagicEffect({x = 33117, y = 32762, z = 14}, 15)
Game.sendMagicEffect({x = 33117, y = 32763, z = 14}, 15)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.removeItemsOnMap({x = item:getPosition().x - 1, y = item:getPosition().y, z = 14})
Game.createItem(3573, 1, {x = item:getPosition().x - 1, y = item:getPosition().y, z = 14})
end
return true
end

View File

@@ -0,0 +1,10 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
end
return true
end

View File

@@ -0,0 +1,18 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32476, y = 31900, z = 06},2773) and Game.isItemThere ({x = 32477, y = 31900, z = 06},2773) and Game.isItemThere ({x = 32478, y = 31900, z = 06},2772) and Game.isItemThere ({x = 32479, y = 31900, z = 06},2772) and Game.isItemThere ({x = 32480, y = 31900, z = 06},2773) and Game.isItemThere ({x = 32481, y = 31900, z = 06}, 2772) then
item:transform(2773, 1)
item:decay()
Game.createItem(1948, 1, {x = 32476, y = 31904, z = 06})
elseif item:getId() == 2772 then
Game.sendMagicEffect({x = 32479, y = 31905, z = 06}, 3)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.removeItemOnMap({x = 32476, y = 31904, z = 06}, 1948)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.removeItemOnMap({x = 32476, y = 31904, z = 06}, 1948)
end
return true
end

View File

@@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32476, y = 31900, z = 04},3593) and Game.isItemThere ({x = 32477, y = 31900, z = 04},3587) and Game.isItemThere ({x = 32478, y = 31900, z = 04},3590) and Game.isItemThere ({x = 32479, y = 31900, z = 04},3585) and Game.isItemThere ({x = 32480, y = 31900, z = 04},3592) and Game.isItemThere ({x = 32481, y = 31900, z = 04},3589) then
Game.createItem(1948, 1, {x = 32476, y = 31904, z = 04})
Game.removeItemOnMap({x = 32476, y = 31900, z = 04}, 3593)
Game.removeItemOnMap({x = 32477, y = 31900, z = 04}, 3587)
Game.removeItemOnMap({x = 32478, y = 31900, z = 04}, 3590)
Game.removeItemOnMap({x = 32479, y = 31900, z = 04}, 3585)
Game.removeItemOnMap({x = 32480, y = 31900, z = 04}, 3592)
Game.removeItemOnMap({x = 32481, y = 31900, z = 04}, 3589)
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2772 then
Game.sendMagicEffect({x = 32479, y = 31905, z = 04}, 3)
end
return true
end

View File

@@ -0,0 +1,16 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32478, y = 31903, z = 03},3537) and Game.isItemThere ({x = 32479, y = 31903, z = 03},3543) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32478, y = 31903, z = 03}, 3537)
Game.removeItemOnMap({x = 32479, y = 31903, z = 03}, 3543)
Game.createItem(1948, 1, {x = 32479, y = 31904, z = 03})
elseif item:getId() == 2772 then
Game.sendMagicEffect({x = 32478, y = 31904, z = 03}, 3)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.removeItemOnMap({x = 32479, y = 31904, z = 03}, 1948)
end
return true
end

View File

@@ -0,0 +1,17 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32177, y = 32148, z = 11}, 1630) then
item:transform(2773, 1)
item:decay()
doRelocate({x = 32177, y = 32148, z = 11},{x = 32178, y = 32148, z = 11})
Game.transformItemOnMap({x = 32177, y = 32148, z = 11}, 1630, 1628)
elseif item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32177, y = 32148, z = 11}, 1629, 1628)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32177, y = 32148, z = 11}, 1628, 1630)
end
return true
end

View File

@@ -0,0 +1,13 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
Game.removeItemOnMap({x = 32145, y = 32101, z = 11}, 1791)
item:transform(2773, 1)
item:decay()
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32145, y = 32101, z = 11},{x = 32145, y = 32102, z = 11})
Game.createItem(1791, 1, {x = 32145, y = 32101, z = 11})
end
return true
end

View File

@@ -0,0 +1,22 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32098, y = 32204, z = 08}, 2772, 2773)
Game.transformItemOnMap({x = 32100, y = 32205, z = 08}, 622, 1771)
Game.transformItemOnMap({x = 32101, y = 32205, z = 08}, 622, 1771)
Game.removeItemOnMap({x = 32100, y = 32205, z = 08}, 4788)
Game.removeItemOnMap({x = 32101, y = 32205, z = 08}, 4786)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32098, y = 32204, z = 08}, 2773, 2772)
doRelocate({x = 32100, y = 32205, z = 08},{x = 32102, y = 32205, z = 08})
doRelocate({x = 32101, y = 32205, z = 08},{x = 32102, y = 32205, z = 08})
Game.transformItemOnMap({x = 32100, y = 32205, z = 08}, 1771, 622)
Game.transformItemOnMap({x = 32101, y = 32205, z = 08}, 1771, 622)
Game.createItem(4788, 1, {x = 32100, y = 32205, z = 08})
Game.createItem(4786, 1, {x = 32101, y = 32205, z = 08})
end
return true
end

View File

@@ -0,0 +1,23 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.transformItemOnMap({x = 32104, y = 32204, z = 08}, 2772, 2773)
Game.transformItemOnMap({x = 32100, y = 32205, z = 08}, 622, 1771)
Game.transformItemOnMap({x = 32101, y = 32205, z = 08}, 622, 1771)
Game.removeItemOnMap({x = 32100, y = 32205, z = 08}, 4788)
Game.removeItemOnMap({x = 32101, y = 32205, z = 08}, 4786)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
Game.transformItemOnMap({x = 32104, y = 32204, z = 08}, 2773, 2772)
doRelocate({x = 32100, y = 32205, z = 08},{x = 32102, y = 32205, z = 08})
doRelocate({x = 32101, y = 32205, z = 08},{x = 32102, y = 32205, z = 08})
Game.transformItemOnMap({x = 32100, y = 32205, z = 08}, 1771, 622)
Game.transformItemOnMap({x = 32101, y = 32205, z = 08}, 1771, 622)
Game.createItem(4788, 1, {x = 32100, y = 32205, z = 08})
Game.createItem(4786, 1, {x = 32101, y = 32205, z = 08})
end
return true
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32095, y = 32173, z = 08}, 1271)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32095, y = 32173, z = 08},{x = 32095, y = 32174, z = 08})
Game.createItem(1271, 1, {x = 32095, y = 32173, z = 08})
end
return true
end

View File

@@ -0,0 +1,14 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32090, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32092, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32094, y = 32148, z = 09},2772) and Game.isItemThere ({x = 32088, y = 32148, z = 09},2772) then
item:transform(2773, 1)
item:decay()
Game.removeItemOnMap({x = 32088, y = 32149, z = 10}, 1282)
elseif item:getId() == 2773 then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32088, y = 32149, z = 10},{x = 32088, y = 32150, z = 10})
Game.createItem(1282, 1, {x = 32088, y = 32149, z = 10})
end
return true
end

View File

@@ -0,0 +1,20 @@
function onUse(player, item, fromPosition, target, toPosition)
if item:getId() == 2772 and Game.isItemThere({x = 32891, y = 32590, z = 11},2567) and Game.isItemThere ({x = 32843, y = 32649, z = 11},2567) and Game.isItemThere ({x = 32808, y = 32613, z = 11},2567) and Game.isItemThere ({x = 32775, y = 32583, z = 11},2567) and Game.isItemThere ({x = 32756, y = 32494, z = 11},2567) and Game.isItemThere ({x = 32799, y = 32556, z = 11},2567) and Game.isItemThere ({x = 32864, y = 32556, z = 11},1563) then
item:transform(2773, 1)
item:decay()
Game.sendMagicEffect({x = 32864, y = 32556, z = 11}, 14)
Game.removeItemOnMap({x = 32864, y = 32556, z = 11}, 1563)
elseif item:getId() == 2772 and not Game.isItemThere({x = 32864, y = 32556, z = 11}, 1563) then
player:sendCancelMessage("The lever won't budge.")
elseif item:getId() == 2773 and not Game.isItemThere({x = 32864, y = 32556, z = 11}, 1563) then
item:transform(2772, 1)
item:decay()
doRelocate({x = 32864, y = 32556, z = 11},{x = 32864, y = 32557, z = 11})
Game.sendMagicEffect({x = 32864, y = 32556, z = 11}, 14)
Game.createItem(1563, 1, {x = 32864, y = 32556, z = 11})
elseif item:getId() == 2773 and Game.isItemThere({x = 32864, y = 32556, z = 11}, 1563) then
item:transform(2772, 1)
item:decay()
end
return true
end

Some files were not shown because too many files have changed in this diff Show More