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

REQUEST!! Rightclick on upgrade item, delete old item, get new item REP++

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello, i need help with a script, i were searching on otland, but i didnt find any scripts like that, i got example, magic plate armor, + 1 scroll, when i rightclick on the scroll, golden armor + the scrolls destroys, and i get a magic plate armor REP++ FOR HELP!
 
LUA:
local scroll = 1234
local items = {
    ["golden armor"] = "magic plate armor",
    ["magic plate armor"] = "super awesome donator item"
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerItemCount(cid, item.itemid) and getPlayerItemCount(cid, scroll) then
        doTransformItem(item.uid, getItemIdByName(items[getItemNameById(item.itemid)]))
        doPlayerRemoveItem(cid, scroll, 1)
    end

    return true
end
 
LUA:
local scroll = 1234
local items = {
    ["golden armor"] = "magic plate armor",
    ["magic plate armor"] = "super awesome donator item"
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerItemCount(cid, item.itemid) and getPlayerItemCount(cid, scroll) then
        doTransformItem(item.uid, getItemIdByName(items[getItemNameById(item.itemid)]))
        doPlayerRemoveItem(cid, scroll, 1)
    end

    return true
end

this doesnt work, i only get a void thing in my hand :o
 
LUA:
-- ver. 1 2011-11-30
-- author tfs, otland.net/members/andypsylon :)
local c = {
    [5957] = {2466, 2472} -- scroll, gold armor, magic plate armor
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local i = c[item.itemid]
	if getPlayerItemCount(cid, i[1]) > 0 then
		if doRemoveItem(item.uid, 1) and doPlayerRemoveItem(cid, i[1], 1) then
			doPlayerAddItem(cid, i[2], 1, false)
		end
	end
 
    return true
end
 
Back
Top