• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Dark Desintegration Quest

hasbro

Member
Joined
Feb 15, 2009
Messages
286
Reaction score
6
Hello, i create one script about the tibiarl quest but i have one problem i latest storage (if getPlayerStorageValue == 2) he doesn't work, i dont have idea because dont work..
LUA:
local function changeBack(Pos)
	doTransformItem(getTileItemById(Pos, 8633).uid, 8635)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.itemid == 8635) then
if getPlayerStorageValue(cid,62340) == -1 then
doPlayerSendTextMessage(cid, 21, "Suddenly a guard jumps at you from behind")
doSummonMonster('Deepling Guard', toPosition)
doTransformItem(itemEx.uid, 8633)
setPlayerStorageValue(cid, 62340, 1)
else
doPlayerSendTextMessage(cid,21,"Continue your mission")
end
elseif(itemEx.itemid == 8633) then
if getPlayerStorageValue(cid,62340) == 1 then
doPlayerSendTextMessage(cid,21,"You gathered nothing more than some small chips at red gem.")
setPlayerStorageValue(cid, 62340, (getPlayerStorageValue(cid, 62340) + 1))
else
doPlayerSendTextMessage(cid,21,"You\'re not allowed")
end
elseif(itemEx.itemid == 8633) then
if getPlayerStorageValue(cid,62340) == 2 then
doPlayerSendTextMessage(cid,21,"With considerable effort you manage to knock a largely unscathed rough gem out of the rocks.")
doPlayerAddItem(cid,15565,1)
addEvent(changeBack, 10000, toPosition)
setPlayerStorageValue(cid, 62340, (getPlayerStorageValue(cid, 62340) + 1))
else
doPlayerSendTextMessage(cid,21,"You\'re not allowed")
end
end
end

- - - Updated - - -

Works 1
Wroks 2
Fail 2
 
Hello, i create one script about the tibiarl quest but i have one problem i latest storage (if getPlayerStorageValue == 2) he doesn't work, i dont have idea because dont work..
LUA:
local function changeBack(Pos)
	doTransformItem(getTileItemById(Pos, 8633).uid, 8635)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.itemid == 8635) then
if getPlayerStorageValue(cid,62340) == -1 then
doPlayerSendTextMessage(cid, 21, "Suddenly a guard jumps at you from behind")
doSummonMonster('Deepling Guard', toPosition)
doTransformItem(itemEx.uid, 8633)
setPlayerStorageValue(cid, 62340, 1)
else
doPlayerSendTextMessage(cid,21,"Continue your mission")
end
elseif(itemEx.itemid == 8633) then
if getPlayerStorageValue(cid,62340) == 1 then
doPlayerSendTextMessage(cid,21,"You gathered nothing more than some small chips at red gem.")
setPlayerStorageValue(cid, 62340, (getPlayerStorageValue(cid, 62340) + 1))
else
doPlayerSendTextMessage(cid,21,"You\'re not allowed")
end
elseif(itemEx.itemid == 8633) then
if getPlayerStorageValue(cid,62340) == 2 then
doPlayerSendTextMessage(cid,21,"With considerable effort you manage to knock a largely unscathed rough gem out of the rocks.")
doPlayerAddItem(cid,15565,1)
addEvent(changeBack, 10000, toPosition)
setPlayerStorageValue(cid, 62340, (getPlayerStorageValue(cid, 62340) + 1))
else
doPlayerSendTextMessage(cid,21,"You\'re not allowed")
end
end
end

- - - Updated - - -

Works 1
Wroks 2
Fail 2


Try this:

LUA:
local function changeBack(Pos)
	doTransformItem(getTileItemById(Pos, 8633).uid, 8635)
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storageplus = getPlayerStorageValue(cid, 62340) + 1
	if(itemEx.itemid == 8635) then
		if getPlayerStorageValue(cid, 62340) == -1 then
			doPlayerSendTextMessage(cid, 21, "Suddenly a guard jumps at you from behind")
			doSummonMonster('Deepling Guard', toPosition)
			doTransformItem(itemEx.uid, 8633)
			setPlayerStorageValue(cid, 62340, 1)
		else
			doPlayerSendTextMessage(cid,21,"Continue your mission")
		end
	elseif(itemEx.itemid == 8633) then
		if getPlayerStorageValue(cid,62340) == 1 then
			doPlayerSendTextMessage(cid,21,"You gathered nothing more than some small chips at red gem.")
			setPlayerStorageValue(cid, 62340, storageplus)
		elseif getPlayerStorageValue(cid, 62340) == 2 then
			doPlayerSendTextMessage(cid,21,"With considerable effort you manage to knock a largely unscathed rough gem out of the rocks.")
			doPlayerAddItem(cid,15565,1)
			addEvent(changeBack, 10000, toPosition)
			setPlayerStorageValue(cid, 62340, storageplus)
		else
			doPlayerSendTextMessage(cid,21,"You\'re not allowed")
		end
	end
end
 
Dont work.

- - - Updated - - -

Now i solved my problem... and work fine...but i have one problem in summon monster dont summon monster next to player...
LUA:
local function changeBack(Pos)
	doTransformItem(getTileItemById(Pos, 8633).uid, 8635)
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storageplus = getPlayerStorageValue(cid, 62340) + 1
	if(itemEx.itemid == 8635) then
		if getPlayerStorageValue(cid, 62340) == -1 then
			doPlayerSendTextMessage(cid, 21, "Suddenly a guard jumps at you from behind")
			doSummonMonster('Demon', toPosition)
			doTransformItem(itemEx.uid, 8633)
			setPlayerStorageValue(cid, 62340, 1)
			print("Works 1")
		else
			doPlayerSendTextMessage(cid,21,"Continue your mission")
            print("FAIL 1")
		end
	elseif(itemEx.itemid == 8633) and getPlayerStorageValue(cid,62340) < 3 then
		if getPlayerStorageValue(cid,62340) <= 1 then
			doPlayerSendTextMessage(cid,21,"You gathered nothing more than some small chips at red gem.")
			setPlayerStorageValue(cid, 62340, storageplus)
			print("Works 2")
			else
			doPlayerSendTextMessage(cid,21,"With considerable effort you manage to knock a largely unscathed rough gem out of the rocks.")
			doPlayerAddItem(cid,15565,1)
			addEvent(changeBack, 10000, toPosition)
			setPlayerStorageValue(cid, 62340, storageplus)
			print("teste")
			end
			else
	doPlayerSendTextMessage(cid,21,"Complete Your mission")
	print("teste 2")
	end
	end
 
Last edited:
Back
Top