Estou aqui editando o server que o gabriel posto !!
porem tem um bug de alguns que apareceu ja arrumei so falto este porinquanto ^^
BUG
[10/09/2013 08:41:52] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/anidesertquest.lua:62: '=' expected near 'true'
[10/09/2013 08:41:52] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/anidesertquest.lua)
[10/09/2013 08:41:52] data/actions/scripts/quests/anidesertquest.lua:62: '=' expected near 'true'
SCRIPT
--[[
Obs:
Colocar o arquivo na pasta actions/scripts/quests
Tag do actions.xml \/
ActionID da 1ª alavanca = 538371
ActionID da 2ª alavanca = 538372
ActionID do 1º item recompensa = 538373
ActionID do 2º item recompensa = 538374
ActionID do 3º item recompensa = 538375
No script procure por "item1" e coloque o id do item do 1º item
No script procure por "item2" e coloque o id do item do 2º item
No script procure por "item3" e coloque o id do item do 3º item
E em prizeMessage, coloque a mensagem que vai receber depois de escolher 1 premio, eu coloquei 1 de exemplo
]]--
telePos = {x = 1645, y = 1278, z = 9}
aniPos1 = {x = 1646, y = 1265, z = 9, stackpos = 253}
ani1 = getThingFromPos(aniPos1)
aniPos2 = {x = 1647, y = 1265, z = 9, stackpos = 253}
ani2 = getThingFromPos(aniPos2)
aniPos3 = {x = 1648, y = 1265, z = 9, stackpos = 253}
ani3 = getThingFromPos(aniPos3)
aniPos4 = {x = 1649, y = 1265, z = 9, stackpos = 253}
ani4 = getThingFromPos(aniPos4)
nextPos1 = {x = 1, y = 2, z = 9}
nextPos2 = {x = 1, y = 2, z = 9}
nextPos3 = {x = 1, y = 2, z = 9}
nextPos4 = {x = 1, y = 2, z = 9}
leverStorage1 = 5381
leverStorage2 = 5382
bauStorage1 = 5383
item1 = 1500
bauStorage2 = 5384
item2 = 1501
bauStorage3 = 5385
item3 = 1502
prizeStorage = 5386
prizeMessage = "You have completed the quest!"
function onUse(cid, item, frompos, item2, topos)
if not isPlayer(cid) then return false end
if item.actionid == leverStorage1 then
if item.itemid == 1945 then
doTeleportThing(cid, telePos)
doTransformItem(item.uid, item.itemid + 1)
return true
elseif item.itemid == 1946 then
doTransformItem(item.uid, item.itemid - 1)
returne true
end
return false
end
if item.actionid == leverStorage2 then
if item.itemid == 1945 then
if isPlayer(ani1) and isPlayer(ani2) and isPlayer(ani3) and isPlayer(ani4) then
nextPos = {nextPos1, nextPos2, nextPos3, nextPos4}
aniPos = {ani1, ani2, ani3, ani4}
doTransformItem(item.uid, item.itemid + 1)
for i = 0, 3 do
doTeleportThing(aniPos[i + 1], nextPos[i + 1])
end
return true
else
doPlayerSendCancel(cid, "You need four players to this quest.")
return false
end
return true
elseif item.itemid == 1946
doTransformItem(item.uid, item.itemid - 1)
return true
end
return false
end
item = 0
if item.actionid == bauStorage1 then
item = item1
elseif item.actionid == bauStorage2 then
item = item2
elseif item.actionid == bauStorage3 then
item = item3
end
if item == 0 then return false end
if prizeStorage > 0 then
doPlayerSendTextMessage(cid, "The chest is empty.", 1)
return false
end
if isInArray{{item1, item2, item3}, item) then
doPlayerAddItem(cid, item, 1)
-- mudar aqui doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))
doPlayerSendTextMessage(cid, prizemessage, 1)
setPlayerStorageValue(cid, prizeStorage, 1)
return true
end
return false
end
Curti+ ^^