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

Naming System

Tyhawk master

New Member
Joined
Jan 10, 2015
Messages
149
Reaction score
4
hey guys i want to create a System for my Server. The system i want is when u Loot a Item (Worm, Coin, meat) it says on the item when u look at it (You see Ham. The first owner on this item is "THE PLAYERS NAME") i want this idea so that on my server you get so many points you can exchange it for rare items on the Server.
Does anyone have a script or can make me one that can use this?
Server - Crying damson 0.3.6.
P.S if u can make this can u also try make the Items non stack able OR only be able to use your item that has your name on?
 
To make an item not stackable you can edit the tibia.dat and items.otb.
Stackable items can't have ingame added attributes since they will dissappear when you move them.
You can add such attributes to non stackable items though.
Code:
local thing = doPlayerAddItem(cid, itemid, 1)
doItemSetAttribute(thing, "name", "New Name")
doItemSetAttribute(thing, "description", "This belongs to ...")
 
Depense on how players should receive the item. If it should be added to a specific monster you can do it with a death creaturescript that you add to that monster.
Or you can use a kill creaturescript if it should be for all monsters (or alot of monsters), get the body of the target and add item to the body it just add the item to the player.
 
Code:
doAddContainerItem(corpse, itemid, count)
Like this you can add the item to the corpse.
function onDeath has a parameter corpse, so just adding that in the script would already add the item to the corpse.
Code:
function onDeath(cid, corpse, deathList)
     -- add the code you want here
     return true
end
Since cid should be the monster (since it's the monster who dies) you have to register it to the monster file instead of login.lua.
Code:
<script>
     <event name="thenameyouchoose"/>
</script>
 

Similar threads

Back
Top