well.. this script doesnt let me turn my server on.. when it loads scripts i get segmentation fault.... but when i remove the script, the server runs fine, and then i can reload the script with reload /data/actions and it works well.. so i'd like to improve this script to solve this.. or any other way to make it work without having to delete the line @ actions.xml everytime i need to restart the server... well it's pretty simple, i have to push 6 levers to create a tp.. (used in ashmunrah's room)
PHP:
local tppos = {x= 33179, y= 32890, z= 11, stackpos= 1}
local lever1pos = {x=33176, y=32880, z=11}
local lever2pos = {x=33182, y=32880, z=11}
local lever3pos = {x=33175, y=32884, z=11}
local lever4pos = {x=33183, y=32884, z=11}
local lever5pos = {x=33176, y=32889, z=11}
local lever6pos = {x=33181, y=32889, z=11}
local teleport1 = getTileItemById(tppos,1387)
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1945 then
doTransformItem(item.uid, 1946)
lever1 = getTileItemById(lever1pos, 1946)
lever2 = getTileItemById(lever2pos, 1946)
lever3 = getTileItemById(lever3pos, 1946)
lever4 = getTileItemById(lever4pos, 1946)
lever5 = getTileItemById(lever5pos, 1946)
lever6 = getTileItemById(lever6pos, 1946)
if lever1.itemid == 1946 and lever2.itemid == 1946 and lever3.itemid == 1946 and lever4.itemid == 1946 and lever5.itemid == 1946 and lever6.itemid == 1946 then
doCreateItem(1387,1,tppos)
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end