hello i'm trying to learn how to script but its kind of hard can somebody help me with this to scripts.
this one is supp oust to remove a door and crate a wall else to remove a crate and create a stairs(it doesn't work) but i else want to if is the lever id 1946 go to 1945 by doing nothing you will see why
now a movement
when yo cimb up the ladder it go up(obiusly xD) and u stepin it change all to the original position
remember this two are my first scripts plz don't be bad.
this one is supp oust to remove a door and crate a wall else to remove a crate and create a stairs(it doesn't work) but i else want to if is the lever id 1946 go to 1945 by doing nothing you will see why
PHP:
--//Made by keru//--
--//Credits to the one that help me//--
function onUse(cid, item, fromPosition, itemEx, toPosition)
puertapos = {x=1010, y=1010, z=7, stackpos=1}
getpuerta = getThingfromPos(puertapos)
cajapos = {x=1010, y=1014, z=7, stackpos=1}
getcaja = getThingFromPos(cajapos)
if getcaja.item == 1739 and item.itemid == 1945 and getpuerta.itemid == 1213 then
doRemoveItem(getpuerta.uid,1)
doCreateitem(5153,1,getpuerta)
doTransformItem(getcaja.uid+327,item.itemid+1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return true
end
now a movement
when yo cimb up the ladder it go up(obiusly xD) and u stepin it change all to the original position
PHP:
--//Made by keru//--
--//Credits to the one that help me//--
function onStepIn(cid, item, pos)
puertapos = {x=1010, y=1010, z=7, stackpos=1}
getpuerta = getThingfromPos(puertapos)
escalerapos = {x=1010, y=1014, z=7, stackpos=1}
getescalera = getThingfromPos(escalerapos)
if getpuerta.itemid == 5153 and getescalera == 1386 then
if isPlayer(cid) == TRUE then
doRemoveItem(getpuerta.uid,1)
doRemoveItem(getescalera.uid,1)
doCreateitem(1212,1,gatepos)
end
end
end