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

help with script please.

Massiah

mApScripthoSt
Joined
Sep 10, 2008
Messages
38
Reaction score
1
Location
U.S.A
any scripters out there that can help me with this? ive played around with it and got nothing.
useing tfs 0.4

Code:
function onUse(cid, item, frompos, item2, topos)

altarpos = {x=270, y=1886, z=7, stackpos = 2}
altar1pos = {x=271, y=1886, z=7}
getaltar = getThingfromPos(altarpos)
queststatus = getPlayerStorageValue(cid,5474)

if item.actionid == 5474 and item.itemid == 1945 then
		doTransformItem(item.uid,item.itemid+1)
		if getaltar.itemid > 0 and queststatus ~= 1 then			
			item = doCreateItem(getaltar.itemid,1,altar1pos)
			doSetItemSpecialDescription(item,"This belongs to "..getPlayerName(cid)..".")
			doRemoveItem(getaltar.uid,1)
			setPlayerStorageValue(cid,5474,1)
		end
elseif item.actionid == 5474 and item.itemid == 1946 then
		doTransformItem(item.uid,item.itemid-1)
	
end
end

its a script for makeing an item have a players name as a special description useing an alter.
 
Code:
local config = {
	altarPos = {x=270, y=1886, z=7},
	altarItemid = ****,
	itemCreatePos = {x=271, y=1886, z=7},
	storage = 5474
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		doTransformItem(item.uid, 1946)
		local altar = getTileItemById(config.altarPos, config.altarItemid).uid
		if atlar > 0 and getPlayerStorageValue(cid, config.storage) < 1 then
			doItemSetAttribute(doCreateItem(config.altarItemid, 1, config.itemCreatePos), "description", "This belongs to " .. getCreatureName(cid) .. ".")
			doRemoveItem(altar)
			setPlayerStorageValue(cid, config.storage, 1)
		end
	else
		doTransformItem(item.uid, 1945)
	end
	return true
end
 
Back
Top