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

Lua Bad script, need fix

George Dunaway

New Member
Joined
Jun 1, 2010
Messages
16
Reaction score
0
Hello,

Could someone fix this script?
It works on the principle of the upgrade, if someone has an object with id 2354 and such a weapon with id 8931 is pushing for a cross and gets a new weapon with the id 8932, which in turn removes the weapon, and cross it.

And working in this way that the press as a cross, it removes the weapon, but does not give a new, and cross it does not vanish.

This script:
function onUse(cid, item, from - Anonymous - VJATmkqQ - Pastebin.com

Thanks,
George
 
Code:
local t = {
	[8931] = 8932,
	[8925] = 7434,
	[7422] = 7429,
	[8850] = 8851,
	[8920] = 8922,
	[8931] = 8932
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = t[itemEx.itemid]
	if v then
		doRemoveItem(item.uid)
		doTransformItem(itemEx.uid, v)
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'Your weapon has been upgraded!')
	else
		doPlayerSendCancel(cid, 'You don\'t have any pro items to uprgade!')
	end
	return TRUE
end
 
Back
Top