Jpstafe
Well-Known Member
- Joined
- Aug 8, 2011
- Messages
- 507
- Reaction score
- 68
Hello how are you Otland community, I have a problem with the scrolls for my server, for example, the scrolls of the Blessing, when I use it, it fulfills its function well, but I can use the scrolls two or three times. And that's wrong, I should only put the scrolls on once and the second time you want to put it on the notification that the blessings already have on. Do you understand?
bleesing scrolls:
In the Green and Blue Scrolls it happens to me that I can use both on the same character, it shouldn't be like that, if you wear blue I shouldn't be able to wear green, if you wear green I shouldn't be able to wear blue. Do you understand?
17:05 You already have Green Djin Quest!
17:05 You already have Blue Djin Quest!
Green djin Scrolls:
Blue Djins Scrolls:
How can I fix this, in these 3 scrolls?
bleesing scrolls:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 7553 then ---< change
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
doRemoveItem(item.uid, 1)
end
return true
end
17:05 You already have Green Djin Quest!
17:05 You already have Blue Djin Quest!
Green djin Scrolls:
Lua:
function onUse(cid, item, itemEx, toPosition)
local pos = getCreaturePosition(cid)
if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
if(getPlayerStorageValue(cid, 51123) == 3) then
doPlayerSendTextMessage(cid, 22, "You already have Green Djin Quest!")
else
doRemoveItem(item.uid, 1)
setPlayerStorageValue(cid, 51123, 3)
doPlayerSendTextMessage(cid, 22, "You just completed Green Djin Quest!")
end
else
doPlayerSendTextMessage(cid, 22, "You can only use this item inside protection zone!")
end
return true
end
Lua:
function onUse(cid, item, itemEx, toPosition)
local pos = getCreaturePosition(cid)
if (getTilePzInfo(getPlayerPosition(cid)) == TRUE) then
if(getPlayerStorageValue(cid, 51114) == 3) then
doPlayerSendTextMessage(cid, 22, "You already have Blue Djin Quest!")
else
doRemoveItem(item.uid, 1)
setPlayerStorageValue(cid, 51114, 3)
doPlayerSendTextMessage(cid, 22, "You just completed Blue Djin Quest!")
end
else
doPlayerSendTextMessage(cid, 22, "You can only use this item inside protection zone!")
end
return true
end
How can I fix this, in these 3 scrolls?