• 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!

Quest Script: 6 Levers, 1 Tile, 1 Door

Obsdark

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

The idea of this script is very simple, let's imagine we have 2 diferent persons, player1 and player2.

Now, when somebody trigger 6 levers the script make a change on the storage value of the player who is located in determinated coords, let's supose for this example than that player is player1, this storage value avoid player1 open one quest door.

Now, let's supose than player2 do this quest before player1, well, when player1 end it, player2 storage value is modified to -1 in other words, it can't open the door again, but that doesn't avoid that he can do the quest for open the door again.


Now, i have one script who doesn't work but supose than must do, plz check it, maybie it gonna be usefull for that compile story
Code:
function onStepin(cid, item, frompos, itemEx, topos)
if item.uid == 9898 and ValueGM == 0 then
    ValueGM = 1
end
if item.uid == 3211 and ValueGM == 1 and Castle1Tower1 == 0 then
	Castle1Tower1 = 1
end 
if item.uid == 3212 and ValueGM == 1 and Castle1Tower2 == 0 then
	Castle1Tower2 = 1
end 
if item.uid == 3213 and ValueGM == 1 and Castle1Tower3 == 0 then
	Castle1Tower3 = 1
end 
if item.uid == 3214 and ValueGM == 1 and Castle1Tower4 == 0 then
	Castle1Tower4 = 1
end 
if item.uid == 3215 and ValueGM == 1 and CastleMain1Tower1 == 0 then
		CastleMain1Tower1 = 1
end
if castletake1 == 0 and CastleMain1Tower1 == 1 and Castle1Tower1 == 1 and Castle1Tower2 == 1 and Castle1Tower3 == 1 and Castle1Tower4 == 1 and valueGM == 1
then
    castletake1 = 1
elseif castletake1 == 0 and CastleMain1Tower1 == 1 and Castle1Tower1 == 1 and Castle1Tower2 == 1 and Castle1Tower3 == 1 and Castle1Tower4 == 1 and valueGM == 0 then
    doPlayerSendCancel (cid, "No has activado todas las palancas")
end
local pos = {x=3000, y=3082, z=8}
if castletake1 == 1 and getPlayerPosition(cid, pos) then
    queststatus = getPlayerStorageValue(cid, 3216)
end
if queststatus == -1 then
    setPlayerStorageValue (cid, 3216, 1)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "¡Felicidades, Ahora ya puedes pasar!")
end
return true
end


Now this is the way i'm compiling it
Code:
<action actionid="9898" event="script" value="quests/Castle2.lua"/>

Note: the door id is 3216, the rest are all levers.


¡Bless to all & Thnx from now!
(Y)(Y)

-Obsdark-
 
Back
Top