Hermes
dziwki kola gramy w lola
Hi there! I have written script for demon oak quest, and there is small problem. Script is in four parts (each for each piece of tree). To prevent duplicating id of hallowed axe I have put into actions four actionids of a tree. Now this script is working like that:
you are USING tree and it works, like you have used hallowed axe.
How can I make this script only works if I use hallowed axe on on of tree parts?
Here is the script (all are almost the same):
Note. If you are looking at this thread just to take script to your OT as a working one, you should know that this script is not RL yet, and I have to improve it a bit. Also this script is one of about 10~ pieces of a full quest (RL!).
Regards,
Hermes
PS. OMGOMGOMG! I have 2 rep++ bars
you are USING tree and it works, like you have used hallowed axe.
How can I make this script only works if I use hallowed axe on on of tree parts?
Here is the script (all are almost the same):
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local randomizer = math.random(1,10)
local queststatus = getPlayerStorageValue(cid,8080)
local monster1 = {x=1067, y=1230, z=7}
local monster2 = {x=1074, y=1231, z=7}
local monster3 = {x=1066, y=1236, z=7}
local monster4 = {x=1074, y=1236, z=7}
if(queststatus == 10) then
doSendMagicEffect(toPosition, CONST_ME_POFF)
elseif(queststatus < 10) then
if(itemEx.itemid == 8288 and itemEx.actionid == 8080 and randomizer == 1 or randomizer == 2 or randomizer == 3) then
doSendMagicEffect(toPosition, 0)
doSendMagicEffect(fromPosition, 50)
doCreatureAddHealth(cid, -300)
doSendAnimatedText(fromPosition, '300', TEXTCOLOR_LIGHTGREEN)
if queststatus < 1 then
setPlayerStorageValue(cid,8080,1)
elseif queststatus == 1 then
setPlayerStorageValue(cid,8080,2)
elseif queststatus == 2 then
setPlayerStorageValue(cid,8080,3)
elseif queststatus == 3 then
setPlayerStorageValue(cid,8080,4)
elseif queststatus == 4 then
setPlayerStorageValue(cid,8080,5)
elseif queststatus == 5 then
setPlayerStorageValue(cid,8080,6)
elseif queststatus == 6 then
setPlayerStorageValue(cid,8080,7)
elseif queststatus == 7 then
setPlayerStorageValue(cid,8080,8)
elseif queststatus == 8 then
setPlayerStorageValue(cid,8080,9)
elseif queststatus == 9 then
setPlayerStorageValue(cid,8080,10)
end
elseif(itemEx.itemid == 8288 and itemEx.actionid == 8080 and randomizer == 4 or randomizer == 5) then
doSummonCreature("Crypt Shambler", monster1)
doSummonCreature("Crypt Shambler", monster2)
doSummonCreature("Crypt Shambler", monster3)
doSummonCreature("Crypt Shambler", monster4)
doSendMagicEffect(toPosition, 0)
elseif(itemEx.itemid == 8288 and itemEx.actionid == 8080 and randomizer == 6 or randomizer == 7) then
doSummonCreature("Lich", monster1)
doSummonCreature("Lich", monster2)
doSummonCreature("Lich", monster3)
doSummonCreature("Lich", monster4)
doSendMagicEffect(toPosition, 0)
elseif(itemEx.itemid == 8288 and itemEx.actionid == 8080 and randomizer == 8) then
doSummonCreature("Blightwalker", monster1)
doSendMagicEffect(toPosition, 0)
elseif(itemEx.itemid == 8288 and itemEx.actionid == 8080 and randomizer == 9 or randomizer == 10) then
doSendMagicEffect(toPosition, 16)
doSendMagicEffect(fromPosition, 54)
doCreatureAddHealth(cid, -300)
doSendAnimatedText(fromPosition, '300', TEXTCOLOR_LIGHTGREEN)
end
end
end
Note. If you are looking at this thread just to take script to your OT as a working one, you should know that this script is not RL yet, and I have to improve it a bit. Also this script is one of about 10~ pieces of a full quest (RL!).
Regards,
Hermes
PS. OMGOMGOMG! I have 2 rep++ bars
Last edited: