Hello, at start I want to say I'm totally new to scripting.
I've changed a scipr of some other guy so it can work on my OT.
It's the script of pvp turnament area, we got 9 spots, when I pull the lever walls near those spots will open and players will be able to enter the battlefield.
To actions.xml I've put this:
then I've made new file lever.lua with this inside:
Could someone help me?^^
I've changed a scipr of some other guy so it can work on my OT.
It's the script of pvp turnament area, we got 9 spots, when I pull the lever walls near those spots will open and players will be able to enter the battlefield.
To actions.xml I've put this:
Code:
<action itemid="1945" event="script" value="other/lever.lua"/>
then I've made new file lever.lua with this inside:
Code:
function onUse(cid, item, frompos, item2, topos)
statuepos1 = {x=1035, y=993, z=7, stackpos=1}
statuepos2 = {x=1037, y=993, z=7, stackpos=1}
statuepos3 = {x=1039, y=993, z=7, stackpos=1}
statuepos4 = {x=1041, y=993, z=7, stackpos=1}
statuepos5 = {x=1043, y=993, z=7, stackpos=1}
statuepos6 = {x=1045, y=993, z=7, stackpos=1}
statuepos7 = {x=1047, y=993, z=7, stackpos=1}
statuepos8 = {x=1049, y=993, z=7, stackpos=1}
statuepos9 = {x=1051, y=993, z=7, stackpos=1}
statue1 = getThingfromPos(statuepos1)
statue2 = getThingfromPos(statuepos2)
statue3 = getThingfromPos(statuepos3)
statue4 = getThingfromPos(statuepos4)
statue5 = getThingfromPos(statuepos5)
statue6 = getThingfromPos(statuepos6)
statue7 = getThingfromPos(statuepos7)
statue8 = getThingfromPos(statuepos8)
statue9 = getThingfromPos(statuepos9)
if item.itemid == 1945 and item.uid == 6010 then
doRemoveItem(statue1.uid,1028)
doRemoveItem(statue2.uid,1028)
doRemoveItem(statue3.uid,1028)
doRemoveItem(statue4.uid,1028)
doRemoveItem(statue5.uid,1028)
doRemoveItem(statue6.uid,1028)
doRemoveItem(statue7.uid,1028)
doRemoveItem(statue8.uid,1028)
doRemoveItem(statue9.uid,1028)
doTransformItem(item.uid,1946)
doPlayerSendTextMessage(cid,22,"You can hear that somewhere has change something. It cant be so far.")
elseif(item.itemid == 1946 and item.uid == 6010) then
doCreateItem(statue1.uid,1028)
doCreateItem(statue2.uid,1028)
doCreateItem(statue3.uid,1028)
doCreateItem(statue4.uid,1028)
doCreateItem(statue5.uid,1028)
doCreateItem(statue6.uid,1028)
doCreateItem(statue7.uid,1028)
doCreateItem(statue8.uid,1028)
doCreateItem(statue9.uid,1028)
doTransformItem(item.uid,1945)
doPlayerSendTextMessage(cid,22,"You can hear that somewhere has change something. It cant be so far.")
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
end
Could someone help me?^^