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

Arena Trophies

Elvang

Member
Joined
Feb 11, 2008
Messages
633
Reaction score
14
Location
Canada, B.C.
I've been looking around for a while and I can't seem to find a script or anything that writes the name of the person on the trophy, does anyone know where I can find it.
 
Code:
--Arena Trophies made by Evil Hero--

function onStepIn(cid, item, frompos, item2, topos)
-- Bronze Trophy
local bronze = x --Itemid of the bronze trophy
local positionb = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the bronze trophy should be created
local itemidb = doCreateItem(bronze,1,positionb)
local descriptionb = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Greenhorn Arena!"
--/Bronze Trophy 

--Silver Trophy
local silver = x --Itemid of the silver trophy
local positions = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the silver trophy should be created
local itemids = doCreateItem(silver,1,positions)
local descriptions = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Scrapper Arena!"
--/Silver Trophy

--Golden Trophy
local gold = x --Itemid of the golden trophy
local positiong = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the golden trophy should be created
local itemidg = doCreateItem(golden,1,positiong)
local descriptiong = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Warlord Arena!"
--/Golden Trophy
    if item.actionid == 7777 and getPlayerStorageValue(cid,7777) == -1 then
        doSetItemSpecialDescription(itemidb,descriptionb)
        setPlayerStorageValue(cid,7777,1)
    
    elseif item.actionid == 7778 and getPlayerStorageValue(cid,7778) == -1 then
        doSetItemSpecialDescription(itemids,descriptions)
        setPlayerStorageValue(cid,7778,1)
    
    elseif item.actionid == 7779 and getPlayerStorageValue(cid,7779) == -1 then
        doSetItemSpecialDescription(itemidg,descriptiong)
        setPlayerStorageValue(cid,7779,1)
    
    else
        doPlayerSendCancel(cid, "You have already taken your trophy.")
    end
end

Just copied the one from Evil Hero and changed the 'comments' to work properly..

CREDITS TO EVIL HERO
 
Last edited:
This is not tested but i don't see any errors :)

PHP:
--Arena Trophies made by Evil Hero--

function onStepIn(cid, item, frompos, item2, topos)
-->>>>>>>>>>>>>>> Bronze Trophy <<<<<<<<<<<<<<<<<<<<<<<--
local bronze = x --Itemid of the bronze trophy
local positionb = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the bronze trophy should be created
local itemidb = doCreateItem(bronze,1,positionb)
local descriptionb = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Greenhorn Arena!"
-->>>>>>>>>>>>>>> /Bronze Trophy <<<<<<<<<<<<<<<<<<<<<<<--
-->>>>>>>>>>>>>>> Silver Trophy <<<<<<<<<<<<<<<<<<<<<<<--
local silver = x --Itemid of the silver trophy
local positions = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the silver trophy should be created
local itemids = doCreateItem(silver,1,positions)
local descriptions = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Scrapper Arena!"
-->>>>>>>>>>>>>>> /Silver Trophy <<<<<<<<<<<<<<<<<<<<<<<--
-->>>>>>>>>>>>>>> Golden Trophy <<<<<<<<<<<<<<<<<<<<<<<--
local golden = x --Itemid of the golden trophy
local positiong = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the golden trophy should be created
local itemidg = doCreateItem(golden,1,positiong)
local descriptiong = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Warlord Arena!"
-->>>>>>>>>>>>>>> /Golden Trophy <<<<<<<<<<<<<<<<<<<<<<<--
	if item.actionid == 7777 and getPlayerStorageValue(cid,7777) == -1 then
		doSetItemSpecialDescription(itemidb,descriptionb)
		setPlayerStorageValue(cid,7777,1)
	
	elseif item.actionid == 7778 and getPlayerStorageValue(cid,7778) == -1 then
		doSetItemSpecialDescription(itemids,descriptions)
		setPlayerStorageValue(cid,7778,1)
	
	elseif item.actionid == 7779 and getPlayerStorageValue(cid,7779) == -1 then
		doSetItemSpecialDescription(itemidg,descriptiong)
		setPlayerStorageValue(cid,7779,1)
	
	else
		doPlayerSendCancel(cid, "You already obtained your Trophy.")
	end
end

just put the actionid 7777 for the bronze trophy on the ground tile, 7778 for silver and 7779 for golden trophy

yours Evil Hero,
 
Last edited:
thx master atleast someone helps me :< colandus is mean *cry*
btw found another bug >.< (don't flame plx)
Updated the above script.

yours Evil Hero,
 
Why do they create items?
I don't really get what you mean....
In RL tibia it's like this you step on a certain sqm and the Trophy get created infront of you on a altar, that's why i used doCreateItem instead of doPlayerAddItem.

yours Evil Hero,
 
Oh lol, I thought this was thrones xD
My bad :(

But something else: Why does it create them all OUTSITE the if-statements?
 
look I've did it like that normally it should work that way

doSetItemSpecialDescription(itemidb,descriptionb)
local itemidb = doCreateItem(bronze,1,positiong)
bronze = x the itemid of the bronze trophy

it's like this if you see it without the shortenings

doSetItemSpecialDescription(doCreateItem(x,1,positionb),descriptionb)
got it now why i did it like this? if you know a better way then login to msn and tell it to me ^^

yours Evil Hero,
 
look I've did it like that normally it should work that way

doSetItemSpecialDescription(itemidb,descriptionb)
local itemidb = doCreateItem(bronze,1,positiong)
bronze = x the itemid of the bronze trophy

it's like this if you see it without the shortenings

doSetItemSpecialDescription(doCreateItem(x,1,positionb),descriptionb)
got it now why i did it like this? if you know a better way then login to msn and tell it to me ^^

yours Evil Hero,

I mean, you are creating ALL items when you enter ANY of those TILES! You get what I mean? There are like 3 tiles isn't it? And when you press 1 of them, only 1 item shall be created now all right? Because that's what you do! You create them all, no matter what tile you walk on.

PHP:
function onStepIn(cid, item, frompos, item2, topos)
    if item.actionid == 7777 and getPlayerStorageValue(cid,7777) == -1 then
		local bronze = x --Itemid of the bronze trophy
		local positionb = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the bronze trophy should be created
		local itemidb = doCreateItem(bronze,1,positionb)
		local descriptionb = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Greenhorn Arena!"
        doSetItemSpecialDescription(itemidb,descriptionb)
        setPlayerStorageValue(cid,7777,1)
    elseif item.actionid == 7778 and getPlayerStorageValue(cid,7778) == -1 then
		local silver = x --Itemid of the silver trophy
		local positions = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the silver trophy should be created
		local itemids = doCreateItem(silver,1,positions)
		local descriptions = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Scrapper Arena!"
        doSetItemSpecialDescription(itemids,descriptions)
        setPlayerStorageValue(cid,7778,1)
    elseif item.actionid == 7779 and getPlayerStorageValue(cid,7779) == -1 then
		local golden = x --Itemid of the golden trophy
		local positiong = {x=XXX, y=YYY, z=ZZZ} -- the coordinates where the golden trophy should be created
		local itemidg = doCreateItem(golden,1,positiong)
		local descriptiong = "This Trophy belongs to ".. getCreatureName(cid) .." for killing all monsters at Warlord Arena!"
        doSetItemSpecialDescription(itemidg,descriptiong)
        setPlayerStorageValue(cid,7779,1)
    else
        doPlayerSendCancel(cid, "You already obtained your Trophy.")
    end
end

Try that one!
 
Last edited:
Back
Top