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

Key numbers...

RetroTibia

New Member
Joined
Mar 26, 2013
Messages
7
Reaction score
0
Basicly what i need is a way for players to look at keys like this: You see Copper key 1234. Instead of: You see a Copper key.

is there anyway to do this? Ive already tried to do stuff with the item.xml file but i couldnt get it working properly. Also i need to be able to do this for a lot of key numbers just to keep that in mind... ;)

Help is much appreciated.

~RetroTibia
 
action id

can you show me an example? ive already tried some stuff with actions but couldnt get it to work properly. the most i got out of that was to use a key and it would give the correct description. but thats not really what i needed XD

Edit: If you mean give the key an action id, i did that. It doesnt show the id ingame.

Thanks.
 
When you click the box with action id="5000" it gives you a key called Key 11444 with action id 11444.
But it won't work on all versions.
actions.xml
XML:
<action actionid="5000" event="script" value="custom/key11444.lua"/>
custom/key11444.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
local keyid = 2089
local key = doPlayerAddItem(cid, keyid, 1)
doItemSetAttribute(key, "name","Copper key (key:11444)")
doItemSetAttribute(key, "aid","11444")
end

Btw in tfs 0.4 rev.3777 you got it predefined by engine.
test.PNG
 
That is for a quest box right? i just need to have that (as shown in the picture) when a players looks at the key it shows the number. Also i forgot to mention i'm using TFS 7.6 and i couldnt find doItemSetAttribute in the functions file.

Any ideas?

~RetroTibia
 
Last edited:
I think none of tfs for client 7.6 got function to set attribute of item. If i am not wrong only source edit may make show action id in name without that function (i'm bad at it , so can't help you with that).

There might be way to do it in lua also , but i never touched that old revs so not even idea how to start script.
It would look like onLook sendTextMessage to Player with action id of key.
 
That is for a quest box right? i just need to have that (as shown in the picture) when a players looks at the key it shows the number. Also i forgot to mention i'm using TFS 7.6 and i couldnt find doItemSetAttribute in the functions file.

Any ideas?

~RetroTibia

tfs 7.6? you buy it to evulmastah? if thats is true use doSetItemActionId(uid, actionid)
 
I think none of tfs for client 7.6 got function to set attribute of item. If i am not wrong only source edit may make show action id in name without that function (i'm bad at it , so can't help you with that).

There might be way to do it in lua also , but i never touched that old revs so not even idea how to start script.
It would look like onLook sendTextMessage to Player with action id of key.

I have already looked around the onLook thing but that also does not exist. (i think atleast, couldnt find it) Example of something i tried that does work:

function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2089 and item.actionid == 3012 then
doPlayerSendTextMessage(cid,22,"You see Copper key 3012.")
end
end
This script works but as you probably can figure out it only works when a player uses the key on something. replacing onUse with onLook doesnt work, the server simply says that it cant find an onUse event.


tfs 7.6? you buy it to evulmastah? if thats is true use doSetItemActionId(uid, actionid)

I am already using that function. right now this is an example of how to obtain a working key in my server (via npc or action):

key = doPlayerAddItem(cid, 2089, 1)
doSetItemActionId(key,3012)
but doing that won't show the key number on the key.

any ideas?

~RetroTibia
 
Last edited:
Back
Top