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

Action Script [Help] Please

DanneZ

Web-Scripting-Design-Host
Joined
Jan 16, 2010
Messages
84
Reaction score
2
Location
Sweden
Hello guys =) I Need help with making this script working 100% for 0.3.6 =)

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

if item.itemid == 2354 then

if doPlayerRemoveItem(cid,8931,1) == 1 then
doPlayerAddItem(cid,8932,1)
doPlayerRemoveItem(cid,2354,1)
doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

elseif item.itemid == 2354 then

if doPlayerRemoveItem(cid,8925,1) == 1 then
doPlayerAddItem(cid,7434,1)
doPlayerRemoveItem(cid,2354,1)
doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

elseif item.itemid == 2354 then

if doPlayerRemoveItem(cid,7422,1) == 1 then
doPlayerAddItem(cid,7429,1)
doPlayerRemoveItem(cid,2354,1)
doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

elseif item.itemid == 2354 then

if doPlayerRemoveItem(cid,8850,1) == 1 then
doPlayerAddItem(cid,8851,1)
doPlayerRemoveItem(cid,2354,1)
doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

elseif item.itemid == 2354 then

if doPlayerRemoveItem(cid,8920,1) == 1 then
doPlayerAddItem(cid,8922,1)
doPlayerRemoveItem(cid,2354,1)
doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
else
doPlayerSendCancel(cid, "You do not have any pro items to uprgade!")
end
end
end
end
end
end

return 1
end

Ofc u get rep++ =)
 
Check this. You use item 2354 on others item np. 8931

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

	if item.itemid == 2354 then
		if item2.itemid == 8931 then	
			if doPlayerRemoveItem(cid,8931,1) == true then
			doPlayerAddItem(cid,8932,1)
			doPlayerRemoveItem(cid,2354,1)
			doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
			end
		end


		if item2.itemid == 8925 then
			if doPlayerRemoveItem(cid,8925,1) == true then
			doPlayerAddItem(cid,7434,1)
			doPlayerRemoveItem(cid,2354,1)
			doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
			end
		end

		if item2.itemid == 7422 then
			if doPlayerRemoveItem(cid,7422,1) == true then
			doPlayerAddItem(cid,7429,1)
			doPlayerRemoveItem(cid,2354,1)
			doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
			end
		end

		if item2.itemid == 8850 then
			if doPlayerRemoveItem(cid,8850,1) == true then
			doPlayerAddItem(cid,8851,1)
			doPlayerRemoveItem(cid,2354,1)
			doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
			end
		end

		if item2.itemid == 8920 then
			if doPlayerRemoveItem(cid,8920,1) == true then
			doPlayerAddItem(cid,8922,1)
			doPlayerRemoveItem(cid,2354,1)
			doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
			end
		end
	else
	doPlayerSendCancel(cid, "You do not have any pro items to uprgade!")
	end
return true
end

Or this, when u use item 2354 script check and upgrade weapons (if u have any weapon to upgrade if u dont have, script send message to player)

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

	if item.itemid == 2354 then

		if doPlayerRemoveItem(cid,8931,1) == true then
		doPlayerAddItem(cid,8932,1)
		doPlayerRemoveItem(cid,2354,1)
		doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
		end

		if doPlayerRemoveItem(cid,8925,1) == true then
		doPlayerAddItem(cid,7434,1)
		doPlayerRemoveItem(cid,2354,1)
		doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
		end

		if doPlayerRemoveItem(cid,7422,1) == true then
		doPlayerAddItem(cid,7429,1)
		doPlayerRemoveItem(cid,2354,1)
		doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
		end

		if doPlayerRemoveItem(cid,8850,1) == true then
		doPlayerAddItem(cid,8851,1)
		doPlayerRemoveItem(cid,2354,1)
		doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
		end

		if doPlayerRemoveItem(cid,8920,1) == true then
		doPlayerAddItem(cid,8922,1)
		doPlayerRemoveItem(cid,2354,1)
		doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
		end
	else
	doPlayerSendCancel(cid, "You do not have any pro items to uprgade!")
	end
return true
end
 
Last edited:
Back
Top