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

Using flask

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I'm doing inquisition quest, and there's a part where player must use holy water flask in a caldron, so it get's purified.

Flask ID: 7494
Caldron Action ID: 6645

Also, a storage must set when player use it.

So, I've been playing around with this script

LUA:
local EMPTY_POTION = 7636
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if itemex.actionid = 6455 then
	doRemoveItem(7494, 1)
     doPlayerAddItem(cid, EMPTY_POTION, 1)
	doSendMagicEffect(fromPosition, 45)
	setPlayerStorageValue(cid,9999,1)
	return true
end

I think it does not work lol, is itemex.actionid the correct parameter to define the caldron's action id? What should I change in it for it to work?

Thanks!! :peace:
 
This script does not work, what might be wrong with it?

LUA:
function onUse(cid, item, frompos, item2, topos)
	if item2.aid == 6645 then
	doRemoveItem(7494, 1)
	doPlayerAddItem(cid, EMPTY_POTION, 1)
	setPlayerStorageValue(cid,9999,1)
	doSendMagicEffect(fromPos, 45)
	end
	return true
end

Also, I would like the potion to be removed when player uses it. With the script above it might give a error if player puts the potion on the ground and uses it, u know? The potion wouldn't disappear

Oh I've fixed it, closing topic =]

64413433.jpg
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if itemEx.actionid = 6455 and getPlayerStorageValue(cid, 9999) == -1 then
		doTransformItem(item.uid, 7636)
		doSendMagicEffect(toPosition, CONST_ME_FIREAREA)
		setPlayerStorageValue(cid, 9999, 1)
	end
	return true
end
 
yes I do hoho it's because it just flowed u know

ps: don't be mad with me, u're my idol haha

when I grow up I wanna be just like u =o
 
Back
Top