• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[¡HELP!] Problem with levers for open quest door

Obsdark

Member
Joined
Sep 25, 2011
Messages
213
Reaction score
9
¡Hiho!

I have some problems with this script, it's about 6 levers, the first lever is requeired to active all the others, and the six levers have diferents orders:

- 1°) the 1 Lever must be active

--and that avoid--
-2°) active the 2 - 5 Lever in any order

--and that avoid--
-3°) the 6 Lever can be active

When all the 6 levers are active, the (cid) receive a change in 1 storage value, necesary for be used in another script.

LUA:
function onUse (cid, item, frompos, itemEx, topos)
castletake1 = getPlayerStorageValue(cid, 3215)
valueGM = 0
if item.uid == 9898 and valueGM == 0 then
    valueGM = 1
	doTransformItem(item.uid, item.itemid +1)
	doPlayerSendTextMessage(cid, 21, "¡Con Exito y Funcionando! el sistema de asedio de castillos Esta Funcionando!")
elseif item.itemid == 1946 and item.uid == 9898 and valueGM == 1 then
	doPlayerSendTextMessage(cid, 21,"¡La Vuelves a su Posición Original!")
	doTransformItem(item.uid, item.itemid -1)
end
Castle1Tower1 = 0
if item.uid == 3211 and valueGM == 1 and Castle1Tower1 == 0 then
	Castle1Tower1 = 1
	doPlayerSendTextMessage(cid, 21, "¡Con Exito y Funcionando, la primera torre ha sido activada!")
	doTransformItem(item.uid, item.itemid +1)
elseif item.itemid == 1946 and item.uid == 3211 and Castle1Tower1 == 1 then
	doPlayerSendTextMessage(cid, 21,"¡La Vuelves a su Posición Original!")
	doTransformItem(item.uid, item.itemid -1)
end 
Castle1Tower2 = 0
if item.uid == 3212 and valueGM == 1 and Castle1Tower2 == 0 then
	Castle1Tower2 = 1
	doPlayerSendTextMessage(cid, 21, "¡Con Exito y Funcionando, la primera torre ha sido activada!")
	doTransformItem(item.uid, item.itemid +1)
elseif item.itemid == 1946 and item.uid == 3212 and Castle1Tower2 == 1 then
	doPlayerSendTextMessage(cid, 21,"¡La Vuelves a su Posición Original!")
	doTransformItem(item.uid, item.itemid -1)
end 
Castle1Tower3 = 0
if item.uid == 3213 and valueGM == 1 and Castle1Tower3 == 0 then
	Castle1Tower3 = 1
	doPlayerSendTextMessage(cid, 21, "¡Con Exito y Funcionando, la primera torre ha sido activada!")
	doTransformItem(item.uid, item.itemid +1)
elseif item.itemid == 1946 and item.uid == 3213 and Castle1Tower3 == 1 then
	doPlayerSendTextMessage(cid, 21,"¡La Vuelves a su Posición Original!")
	doTransformItem(item.uid, item.itemid -1)
end 
Castle1Tower4 = 0
if item.uid == 3214 and valueGM == 1 and Castle1Tower4 == 0 then
	Castle1Tower4 = 1
	doPlayerSendTextMessage(cid, 21, "¡Con Exito y Funcionando, la primera torre ha sido activada!")
	doTransformItem(item.uid, item.itemid +1)
elseif item.itemid == 1946 and item.uid == 3214 and Castle1Tower4 == 1 then
	doPlayerSendTextMessage(cid, 21, "¡La Vuelves a su Posición Original!")
	doTransformItem(item.uid, item.itemid -1)
end
if valueGM == 1 and Castle1Tower1 == 1 and Castle1Tower2 == 1 and Castle1Tower3 == 1 and Castle1Tower4 == 1
then
	castletake1 = 1
end
if item.uid == 3215 and valueGM == 1 and castletake1 == 1 and castlemaintower1 == 0 then
	CastleMain1Tower1 = getPlayerStorageValue(cid, 3215)
	castlemaintower1 = 1
	doPlayerSendTextMessage(cid, 21, "¡Con Exito y Funcionando, la primera torre ha sido activada!")
elseif item.itemid == 1946 and castlemaintower1 == 1 then
	doPlayerSendTextMessage(cid, 21,"¡La Vuelves a su Posición Original!")
	doTransformItem(item.uid, item.itemid -1)
if CastleMain1Tower1 == -1 then 
	setPlayerStorageValue(cid, 3215, 1)
	doPlayerSendTextMessage(cid, 21,"¡Todas las palancas han sido ejecutadas con exito!")
end
end
end

LUA:
<action uniqueid="9898;3211;3212;3213;3214;3215" event="script" value="quests/LeversCastle1.lua"/>


Somebody can help me?

The problems are:

A) when i pull the Levers, they doesn't Show the writed message

B) when i pull the First Lever this doesn't seems triggered, but the text apparead, is the only one with this situation and i don't know why

C) i'm not sure if the levers are activating the variables they must, i think they didn't, please i really like to know why


¡Wishing you the Best and Gratefully from now!
¡Cheers up & Bless to all!
(Y) (Y)

-Obsdark-
 
Back
Top