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

gadery

New Member
Joined
Mar 31, 2011
Messages
9
Reaction score
0
I have problem witch arena script. After challenge i get goblet but without decsription.

Code:
function onStepIn(cid, item, position, fromPosition) 
	local gobletPos = getThingPos(item.uid)
	if item.actionid == 42360 then 
		if getPlayerStorageValue(cid, 42360) ~= 1 then 
			setPlayerStorageValue(cid, 42360, 1) 
			local goblet = doCreateItemEx(5807, 1) 

			doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena greenhorn difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") 
			doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) 
		end 
	elseif item.actionid == 42370 then 
		if getPlayerStorageValue(cid, 42370) ~= 1 then 
			setPlayerStorageValue(cid, 42370, 1) 
			local goblet = doCreateItemEx(5806, 1) 
			doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena scrapper difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") 
			doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) 
		end 
	elseif item.actionid == 42380 then 
		if getPlayerStorageValue(cid, 42380) ~= 1 then 
			setPlayerStorageValue(cid, 42380, 1) 
			local goblet = doCreateItemEx(5805, 1) 
			doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena warlord difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") 
			doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) 
		end 
	end 
	doTransformItem(item.uid, item.itemid - 1) 
	return TRUE 
end 

function onStepOut(cid, item, pos) 
	doTransformItem(item.uid, item.itemid + 1) 
	return TRUE 
end

Could You help me? : D
 
I suggest using Dark's released Arena scripts. You can get them from here.

I've shortened the script you posted. If you're using TFS 0.2, it may be the reason you're experiencing this problem. Hope that helps.

LUA:
local t = {
	[42360] = {
		desc = "It is given to the courageous victor of the barbarian arena Greenhorn difficulty.",
		goblet = 5807
	},
	[42370] = {
		desc = "It is given to the courageous victor of the barbarian arena Scrapper difficulty.",
		goblet = 5806
	},
	[42380] = {
		desc = "It is given to the courageous victor of the barbarian arena Warlord difficulty.",
		goblet = 5805
	}
}

function onStepIn(cid, item, fromPosition, toPosition)
	local k = t[item.actionid]
	if(k and isPlayer(cid)) then
		if(getCreatureStorage(cid, k) < 1) then
			local id, pos = doCreateItemEx(k.goblet, 1), getThingPosition(item.uid)
			doItemSetAttribute(id, "desc", k.desc .. " \nAwarded to " .. getCreatureName(cid) .. ".")
			doTileAddItemEx(x = pos.x, y = pos.y - 1, z = pos.z, id)
			doCreatureSetStorage(cid, k, 1)
		end
		doTransformItem(item.uid, item.itemid - 1)
	end
	return true
end

function onStepOut(cid, item, fromPosition, toPosition) 
	doTransformItem(item.uid, item.itemid + 1) 
end
 
Last edited:
Back
Top