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

Request simple script [REP ++++]

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
34027757.jpg


1 {X: 33281 Y: 32442 Z: 8} and 2 {X: 33286 Y: 32444 Z: 8}= player use statue (ID 3697), it lights up (turn into ID 3698)
3 {X: 33281 Y: 32447 Z: 8}= After player have lighten the 2 statues, he uses number 3, wich transforms the coffin in a stair
4 {X: 33273 Y: 32458 Z: 8} = Coffin transformed into stair, a orange Click! onomatopoeia appears

After the player walks into stair {X: 33273 Y: 32458 Z: 8} (Same pos as number 4), the coffin and statues should return to the original IDs.

Useful IDs:

7520 - upper part of the coffin, NO STAIR
7525 - upper part of the coffin, WITH STAIR

This is a part of Koshei The Deathless Quest

Thanks a lot! :peace:
 
LUA:
local function reset()
	doTransformItem(getThingfromPos({x=33281, y=32442, z=8, stackpos=1}).uid, 3698)
	doTransformItem(getThingfromPos({x=33286, y=32444, z=8, stackpos=1}).uid, 3698)
	doTransformItem(getThingfromPos({x=33284, y=32450, z=8, stackpos=1}).uid, 3698)
	doTransformItem(getThingfromPos({x=33278, y=32450, z=8, stackpos=1}).uid, 3698)
	doTransformItem(getThingfromPos({x=33276, y=32444, z=8, stackpos=1}).uid, 3698)
	doTransformItem(getThingfromPos({x=33276, y=32444, z=8, stackpos=1}).uid, 3698)
	doTransformItem(getTileItemById({x=33273, y=32458, z=8}, 7525).uid, 7520)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = getTileItemById({x=33273, y=32458, z=8}, 7520).uid
	if v ~= 0 and getTileItemById({x=33281, y=32442, z=8}, 3698).uid ~= 0 and getTileItemById({x=33286, y=32444, z=8}, 3698).uid ~= 0 and getTileItemById({x=33284, y=32450, z=8}, 3697).uid ~= 0 and getTileItemById({x=33278, y=32450, z=8}, 3697).uid ~= 0 and getTileItemById({x=33276, y=32444, z=8}, 3697).uid ~= 0 then
		doCreatureSay(cid, 'CLICK', TALKTYPE_ORANGE_1, false, 0, {x=33273, y=32459, z=8})
		doTransformItem(v, 7525)
		addEvent(reset, 5 * 60 * 1000)
	else
		doCreatureSay(cid, 'Nothing happens', TALKTYPE_ORANGE_1, false, 0, toPosition)
	end
	return true
end
 
AAAHH

Now I see, I thought that in your script all statues had to be lighten up, but no, it's correct, just the two of the top, and the rest off

I'll review it, and the Click! thing don't show up 'cause it's too far, I'll try to set it closer... Is there a way to set the onomatopeia to appear farther?

Here's my script cyk:

LUA:
local function reset()
	doTransformItem(getThingfromPos({x=33281, y=32442, z=8, stackpos=1}, 3698).uid, 3697)
	doTransformItem(getThingfromPos({x=33286, y=32444, z=8, stackpos=1}, 3698).uid, 3697)
	doTransformItem(getTileItemById({x=33273, y=32458, z=8}, 7525).uid, 7520)
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = getTileItemById({x=33273, y=32458, z=8}, 7520).uid
	if v ~= 0 and getTileItemById({x=33281, y=32442, z=8}, 3698).uid ~= 0 and getTileItemById({x=33286, y=32444, z=8}, 3698).uid ~= 0 and getTileItemById({x=33284, y=32450, z=8}, 3697).uid ~= 0 and getTileItemById({x=33278, y=32450, z=8}, 3697).uid ~= 0 and getTileItemById({x=33276, y=32444, z=8}, 3697).uid ~= 0 then
		doCreatureSay(cid, 'CLICK', TALKTYPE_ORANGE_1, false, 0, toPosition)
		doCreatureSay(cid, 'A secret passage opened', TALKTYPE_ORANGE_1, false, 0, toPosition)
		doTransformItem(v, 7525)
		addEvent(reset, 2 * 60 * 1000)
	else
		doCreatureSay(cid, 'Nothing happens', TALKTYPE_ORANGE_1, false, 0, toPosition)
	end
	return true
end

I've removed the reset for the other statues, added "CLICK" to the sundial itself, and a new "A secret passage opened" message, also decreased the reset time to 2 min...

What do you think? In RL tibia all statues get reset?

PS: doSendAnimatedText shows farther than doCreatureSay? let me try...
 
Last edited:
It resets all of them, I'm pretty sure. And why did you add another parameter to getThingfromPos? You can't use it with that function, only with getTileItemById but then it'll throw ITEM_NOT_FOUND errors.

Try adding:
LUA:
doCreatureSay(cid, 'CLICK', TALKTYPE_ORANGE_1, false, cid, {x=33273, y=32459, z=8})
If that doesn't work, simply use TALKTYPE_ORANGE_2 (yell).
 
Back
Top