When I using the Hallowed Axe on the Dead Tree or else on Demon Oak nothing happend!
And in the console it does not giving any errors.
Anyone that has noticed the same problem?
Hallowed Axe.lua
And in the console it does not giving any errors.
Anyone that has noticed the same problem?
Hallowed Axe.lua
Code:
--- Made by GM Rufus ---
function onUse(cid, item, item2, fromPosition, toPosition)
--- Config --
blocktree = 32193 --- The uniqueid of the dead tree. ---
levelneeded = 120 --- How much level you need to enter the arena ---
--- First part ---
summonweak1Position = {x=32682, y=32372, z=7}
summonweak2Position = {x=32688, y=32373, z=7}
summonweak3Position = {x=32683, y=32377, z=7}
summonweak4Position = {x=32687, y=32378, z=7}
summonweakone1Position = {x=32682, y=32372, z=7}
summonweakone2Position = {x=32688, y=32373, z=7}
summonweakone3Position = {x=32683, y=32377, z=7}
summonweakone4Position = {x=32687, y=32378, z=7}
summonweaktwo1Position = {x=32682, y=32372, z=7}
summonweaktwo2Position = {x=32688, y=32373, z=7}
summonweaktwo3Position = {x=32683, y=32377, z=7}
summonweaktwo4Position = {x=32687, y=32378, z=7}
--- Second Part ---
summonnormal1Position = {x=32682, y=32372, z=7}
summonnormal2Position = {x=32688, y=32373, z=7}
summonnormal3Position = {x=32683, y=32377, z=7}
summonnormal4Position = {x=32687, y=32378, z=7}
summonnormalone1Position = {x=32682, y=32372, z=7}
summonnormalone2Position = {x=32688, y=32373, z=7}
summonnormalone3Position = {x=32683, y=32377, z=7}
summonnormalone4Position = {x=32687, y=32378, z=7}
summonnormaltwo1Position = {x=32682, y=32372, z=7}
summonnormaltwo2Position = {x=32688, y=32373, z=7}
summonnormaltwo3Position = {x=32683, y=32377, z=7}
summonnormaltwo4Position = {x=32687, y=32378, z=7}
--- Third Part ---
summonmedium1Position = {x=32682, y=32372, z=7}
summonmedium2Position = {x=32688, y=32373, z=7}
summonmedium3Position = {x=32683, y=32377, z=7}
summonmedium4Position = {x=32687, y=32378, z=7}
summonmediumone1Position = {x=32682, y=32372, z=7}
summonmediumone2Position = {x=32688, y=32373, z=7}
summonmediumone3Position = {x=32683, y=32377, z=7}
summonmediumone4Position = {x=32687, y=32378, z=7}
summonmediumtwo1Position = {x=32682, y=32372, z=7}
summonmediumtwo2Position = {x=32688, y=32373, z=7}
summonmediumtwo3Position = {x=32683, y=32377, z=7}
summonmediumtwo4Position = {x=32687, y=32378, z=7}
--- Fourth Part ---
summonhard1Position = {x=32682, y=32372, z=7}
summonhard2Position = {x=32688, y=32373, z=7}
summonhard3Position = {x=32687, y=32378, z=7}
summonhard4Position = {x=32687, y=32378, z=7}
summonhardone1Position = {x=32682, y=32372, z=7}
summonhardone2Position = {x=32688, y=32373, z=7}
summonhardone3Position = {x=32687, y=32378, z=7}
summonhardone4Position = {x=32687, y=32378, z=7}
--- Teleport Back Positions ---
back1Position = {x=32686, y=32361, z=7}
back2Position = {x=32686, y=32361, z=7}
back3Position = {x=32686, y=32361, z=7}
back4Position = {x=32686, y=32361, z=7}
back5Position = {x=32686, y=32361, z=7}
--- End Config ---
demonoak = {8288, 8289, 8290, 8291}
if item.itemid == 2717 and item.uid == 32193 and getPlayerLevel(cid) >= levelneeded and (getPlayerStorageValue(cid, 21544) == 3) == FALSE then
doTransformItem(item.uid, 3669)
doTeleportThing(cid, toPosition, TRUE)
elseif item.itemid == 8288 then
if getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == -1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21541, 1)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Vampire", summonweak1Position)
doSummonCreature("Vampire", summonweak2Position)
doSummonCreature("Vampire", summonweak3Position)
doSummonCreature("Braindeath", summonweak4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21541, 2)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Vampire", summonweakone1Position)
doSummonCreature("Vampire", summonweakone2Position)
doSummonCreature("Necromancer", summonweakone3Position)
doSummonCreature("Vampire", summonweakone4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 2 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21541, 3)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Vampire", summonweaktwo1Position)
doSummonCreature("Elder Beholder", summonweaktwo2Position)
doSummonCreature("Elder Beholder", summonweaktwo3Position)
doSummonCreature("Vampire", summonweaktwo4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
if item.itemid == 8288 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8289 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8290 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8291 then
setPlayerStorageValue(cid, item.itemid, 1)
end
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == -1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21542, 1)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Dragon Lord", summonnormal1Position)
doSummonCreature("Dragon Lord", summonnormal2Position)
doSummonCreature("Dragon Lord", summonnormal3Position)
doSummonCreature("Dragon", summonnormal4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21542, 2)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Dragon Lord", summonnormalone1Position)
doSummonCreature("Dragon Lord", summonnormalone2Position)
doSummonCreature("Dragon Lord", summonnormalone3Position)
doSummonCreature("Frost Dragon", summonnormalone4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 2 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21542, 3)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Frost Dragon", summonnormaltwo1Position)
doSummonCreature("Frost Dragon", summonnormaltwo2Position)
doSummonCreature("Frost Dragon", summonnormaltwo3Position)
doSummonCreature("Frost Dragon", summonnormaltwo4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
if item.itemid == 8288 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8289 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8290 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8291 then
setPlayerStorageValue(cid, item.itemid, 1)
end
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 3 and getPlayerStorageValue(cid, 21543) == -1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21543, 1)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Behemoth", summonmedium1Position)
doSummonCreature("Warlock", summonmedium2Position)
doSummonCreature("Lich", summonmedium3Position)
doSummonCreature("Lich", summonmedium4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 3 and getPlayerStorageValue(cid, 21543) == 1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21543, 2)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Behemoth", summonmediumone1Position)
doSummonCreature("Behemoth", summonmediumone2Position)
doSummonCreature("Behemoth", summonmediumone3Position)
doSummonCreature("Warlock", summonmediumone4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 3 and getPlayerStorageValue(cid, 21543) == 2 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21543, 3)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Serpent Spawn", summonmediumtwo1Position)
doSummonCreature("Serpent Spawn", summonmediumtwo2Position)
doSummonCreature("Serpent Spawn", summonmediumtwo3Position)
doSummonCreature("Lich", summonmediumtwo4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
if item.itemid == 8288 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8289 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8290 then
setPlayerStorageValue(cid, item.itemid, 1)
elseif item.itemid == 8291 then
setPlayerStorageValue(cid, item.itemid, 1)
end
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 3 and getPlayerStorageValue(cid, 21543) == 3 and getPlayerStorageValue(cid, 21544) == -1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21544, 1)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Warlock", summonhard1Position)
doSummonCreature("Behemoth", summonhard2Position)
doSummonCreature("Braindeath", summonhard3Position)
doSummonCreature("Demon", summonmhard4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 3 and getPlayerStorageValue(cid, 21543) == 3 and getPlayerStorageValue(cid, 21544) == 1 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21544, 2)
doSendMagicEffect(toPosition, 0)
doSummonCreature("Demon", summonhardone1Position)
doSummonCreature("Demon", summonhardone2Position)
doSummonCreature("Demon", summonhardone3Position)
doSummonCreature("Undead Dragon", summonhardone4Position)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
elseif getPlayerStorageValue(cid, item.itemid) == -1 and getPlayerStorageValue(cid, 21541) == 3 and getPlayerStorageValue(cid, 21542) == 3 and getPlayerStorageValue(cid, 21543) == 3 and getPlayerStorageValue(cid, 21544) == 2 then
if math.random(1, 2) == 1 then
setPlayerStorageValue(cid, 21544, 3)
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
if item.itemid == 8288 then
setPlayerStorageValue(cid, item.itemid, 1)
if getPlayerStorageValue(cid, 8288) == 1 then
setPlayerStorageValue(cid, 21545, 1)
if math.random(1, 5) == 1 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back1Position)
elseif math.random(1, 5) == 2 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back2Position)
elseif math.random(1, 5) == 3 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back3Position)
elseif math.random(1, 5) == 4 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back4Position)
elseif math.random(1, 5) == 5 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back5Position)
end
end
elseif item.itemid == 8289 then
setPlayerStorageValue(cid, item.itemid, 1)
if getPlayerStorageValue(cid, 8289) == 1 then
setPlayerStorageValue(cid, 21545, 1)
if math.random(1, 5) == 1 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back1Position)
elseif math.random(1, 5) == 2 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back2Position)
elseif math.random(1, 5) == 3 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back3Position)
elseif math.random(1, 5) == 4 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back4Position)
elseif math.random(1, 5) == 5 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back5Position)
end
end
elseif item.itemid == 8290 then
setPlayerStorageValue(cid, item.itemid, 1)
if getPlayerStorageValue(cid, 8290) == 1 then
setPlayerStorageValue(cid, 21545, 1)
if math.random(1, 5) == 1 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back1Position)
elseif math.random(1, 5) == 2 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back2Position)
elseif math.random(1, 5) == 3 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back3Position)
elseif math.random(1, 5) == 4 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back4Position)
elseif math.random(1, 5) == 5 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back5Position)
end
end
elseif item.itemid == 8291 then
setPlayerStorageValue(cid, item.itemid, 1)
if getPlayerStorageValue(cid, 8291) == 1 then
setPlayerStorageValue(cid, 21545, 1)
if math.random(1, 5) == 1 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back1Position)
elseif math.random(1, 5) == 2 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back2Position)
elseif math.random(1, 5) == 3 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back3Position)
elseif math.random(1, 5) == 4 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back4Position)
elseif math.random(1, 5) == 5 then
doSendMagicEffect(fromPosition, 10)
doTeleportThing(cid,back5Position)
end
end
end
elseif math.random(1, 2) == 2 then
doSendMagicEffect(toPosition, 0)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
end
else
doSendMagicEffect(toPosition, 2)
end
end
return TRUE
end