dragaoart
Since 2009...
- Joined
- May 10, 2009
- Messages
- 97
- Reaction score
- 9
This is the part 1 of the script.
The script I'm using is:
actions.xml
koshei_lever.lua Credits: Maxi/Shawak Annihilator 1.0
Well, then... this is the first part of the blue legs quest, after you gather the amulet pieces and enter the cave.
The problem is:
When I add these lines
"and statue1.itemid == 3697 and statue2.itemid == 3698 and statue3.itemid == 3698 and statue4.itemid == 3697 and statue5.itemid == 3697"
on conditional script, it just lead to
"doCreatureSay(cid, 'Nothing happens...', TALKTYPE_ORANGE_1)",
that appears on the screen.
Without the lines of statue check the scrip works fine.
What do I would like to do:
I would like to manage the script to check if the statues 2 and 3 are on(id=3698) and the statues 1,4 and 5 are off(id=3697), then remove the item to add the stair and says "Click!".
Any ideas on how to fix it?
Thank you for you time.
The script I'm using is:
actions.xml
HTML:
<action actionid="7522" script="bluelegs/koshei_lever.lua"/> <!-- first floor of the quest after gather amulet -->
koshei_lever.lua Credits: Maxi/Shawak Annihilator 1.0
PHP:
local coffinPos = {x = 33273, y = 32458, z = 8, stackpos = 1} -- stairs on hole position (coffin)
local statue_pos = {{x = 33281, y = 32442, z = 8, stackpos = 250},
{x = 33286, y = 32444, z = 8, stackpos = 250},
{x = 33284, y = 32450, z = 8, stackpos = 250},
{x = 33278, y = 32450, z = 8, stackpos = 250},
{x = 33276, y = 32444, z = 8, stackpos = 250}}
function onUse(cid, item, frompos, item2, topos)
local getcoffin = getThingfromPos(coffinPos) -- coffin
local statue1 = getThingfromPos(statue_pos[1]) -- statue1
local statue2 = getThingfromPos(statue_pos[2]) -- statue2
local statue3 = getThingfromPos(statue_pos[3]) -- statue3
local statue4 = getThingfromPos(statue_pos[4]) -- statue4
local statue5 = getThingfromPos(statue_pos[5]) -- statue5
--conditional script below :
if item.itemid == 3900 and getcoffin.itemid == 7520 and statue1.itemid == 3697 and statue2.itemid == 3698 and statue3.itemid == 3698 and statue4.itemid == 3697 and statue5.itemid == 3697 then
doRemoveItem(getcoffin.uid, 1)
doCreateItem(7525, 1, coffinPos)
doCreatureSay(cid, 'Click!', TALKTYPE_ORANGE_1)
elseif item.itemid == 3900 and getcoffin.itemid == 7525 then
doRemoveItem(getcoffin.uid, 1)
doCreateItem(7520, 1, coffinPos)
doCreatureSay(cid, 'Clerck...', TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, 'Nothing happens...', TALKTYPE_ORANGE_1)
end
return 1
end
Well, then... this is the first part of the blue legs quest, after you gather the amulet pieces and enter the cave.
The problem is:
When I add these lines
"and statue1.itemid == 3697 and statue2.itemid == 3698 and statue3.itemid == 3698 and statue4.itemid == 3697 and statue5.itemid == 3697"
on conditional script, it just lead to
"doCreatureSay(cid, 'Nothing happens...', TALKTYPE_ORANGE_1)",
that appears on the screen.
Without the lines of statue check the scrip works fine.
What do I would like to do:
I would like to manage the script to check if the statues 2 and 3 are on(id=3698) and the statues 1,4 and 5 are off(id=3697), then remove the item to add the stair and says "Click!".
Any ideas on how to fix it?
Thank you for you time.