• 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 UIDS Wrath

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
So i'm on the last part of this chartan mission when you are suppose to collect items to fix the teleport...

but the thing is when you are going to use the sacred coal on the water nothing happends

i changed the script because the ids that were in the script wasnt the correct one for my datapack, anyway this is my script:

LUA:
	elseif(item.itemid == 12251 and itemEx.itemid == 493) then -- coal usage - water clean, teleport done
		doCreatureSay(cid, "As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_ORANGE_1)
		doPlayerRemoveItem(cid, 12251, 1)
		setPlayerStorageValue(cid, STORAGE_TELEPORT, 1)
	end

and this is the "unchanged" version of it:

LUA:
elseif(item.itemid == 12290 and itemEx.itemid == 12304) then -- coal usage - water clean, teleport done
		doCreatureSay(cid, "As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
		setPlayerStorageValue(cid, STORAGE_TELEPORT, 1)
	end

none of these are working, but i thought since i don't know what
LUA:
doRemoveItem(item.uid)
(what UID it suppose to be) i thought i could change that to
LUA:
doPlayerRemoveItem(cid, 12251, 1)
but that didnt work either :(
 
Last edited:
Code:
	[COLOR="#FF0000"]if(itemEx.itemid == 12257 and getPlayerStorageValue(cid,42826) < 0) then
		doPlayerAddItem(cid,12256,1)
		setPlayerStorageValue(cid, 42826, 1)		
		doCreatureSay(cid, 'The cracked part of the table lets you cut out a large chunk of wood with your pick.', TALKTYPE_ORANGE_1)
        return true
	end[/COLOR]


???'
 
i tried this instead
LUA:
	if(itemEx.itemid == 12257 then
		doPlayerAddItem(cid,12256,1)		
		doCreatureSay(cid, 'The cracked part of the table lets you cut out a large chunk of wood with your pick.', TALKTYPE_ORANGE_1)
        return true
	end

still the same, nothing happends...
 
LUA:
 elseif(item.itemid == 12251 and itemEx.itemid == 493) then -- coal usage - water clean, teleport done   -- !!!!!!MAKE sure this is the right id's... <<<<
		doCreatureSay(cid, "As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_ORANGE_1)
		doPlayerRemoveItem(cid, item.uid, 1)
		setPlayerStorageValue(cid, STORAGE_TELEPORT, 1)
	end

What I can see -

LUA:
		doPlayerRemoveItem(cid, 12251, 1)
As I understand you wanna remove the storage, not the item.id, Since the item.uid should not be removed, Thats why its failing.
WibbenZ
 
@WibbenZ, the thing is when you use the coal on the water it is suppose to disappear and you are suppose to get a storageID so you can go on with the next mission... and that's the problem since it does not work.

here's the pic from that particular mission http://images4.wikia.nocookie.net/_...of_the_Emperor_Mission_02_First_Contact_6.jpg
if you don't wanna visit that link, goto http://tibia.wikia.com/wiki/Wrath_of_the_Emperor_Quest/Spoiler nad pic number 6 :)

@SpiderOT, Yes, i have the correct ID's in action.xml
 
LUA:
elseif(item.itemid == 12251 and itemEx.itemid == 493) then 
		doCreatureSay(cid, "As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_ORANGE_1)
		doPlayerRemoveItem(cid, 12251, 1)
if doPlayerRemvoeItem(cid, 12251,1) then
		setPlayerStorageValue(cid, STORAGE_TELEPORT, 1)
else
end
end
LUA:
		setPlayerStorageValue(cid, STORAGE_TELEPORT, 1)

make sure the storage is correct
 
hmm, something is really weird 'cause when i use the coal thing on the water nothing happends :@

lol, hmm could it be something wrong with the item, because when you try to use an item on something and it doesnt work you usually get the test "sorry, not possible" or "you cannot use this object" right? but when i try to use this item nothing happends at all.
 
Last edited:
So baiscally want them to get teleported to these places if they have the correct storagevalue from teh quest but i tried and i'm getting some error and it doesnt work.

so this is the unchanged version

LUA:
local safe = {x=33212, y=31066, z=9}
local zao = {x=33137, y=31247, z=6}
local zlak = {x=33077, y=31218, z=8}
local kita = {x=32856, y=31055, z=9}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if item.actionid == 7300 and getPlayerStorageValue(cid, 42828) >= 2 then
		doTeleportThing(cid,safe)
		doSendMagicEffect(getCreaturePosition(cid),47)
	elseif item.actionid == 7301 and getPlayerStorageValue(cid, 42828) >= 2 then
		doTeleportThing(cid,zao)
		doSendMagicEffect(getCreaturePosition(cid),47)
	elseif item.actionid == 7302  and getPlayerStorageValue(cid, 42828) >= 3 then
		doTeleportThing(cid,zlak)
		doSendMagicEffect(getCreaturePosition(cid),47)
	elseif item.actionid == 7303 and getPlayerStorageValue(cid, 42828) >= 3 then
		doTeleportThing(cid,kita)
		doSendMagicEffect(getCreaturePosition(cid),47)
	else
		doTeleportThing(cid, fromPosition)
		doSendMagicEffect(getCreaturePosition(cid),47)
	end
end


and this is my failing version (the first one didnt work)

LUA:
local safe = {x=33212, y=31066, z=9}
local zao = {x=33137, y=31247, z=6}
local zlak = {x=33077, y=31218, z=8}
local kita = {x=32856, y=31055, z=9}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if item.actionid == 7300 and IfPlayerStorageValue(cid, 42828) >= 2 then
		doTeleportThing(cid,safe)
		doSendMagicEffect(getCreaturePosition(cid),47)
	elseif item.actionid == 7301 and IfPlayerStorageValue(cid, 42828) >= 2 then
		doTeleportThing(cid,zao)
		doSendMagicEffect(getCreaturePosition(cid),47)
	elseif item.actionid == 7302  and IfPlayerStorageValue(cid, 42828) >= 3 then
		doTeleportThing(cid,zlak)
		doSendMagicEffect(getCreaturePosition(cid),47)
	elseif item.actionid == 7303 and IfPlayerStorageValue(cid, 42828) >= 3 then
		doTeleportThing(cid,kita)
		doSendMagicEffect(getCreaturePosition(cid),47)
	else
		doTeleportThing(cid, fromPosition)
		doSendMagicEffect(getCreaturePosition(cid),47)
	end
end
 
Back
Top