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

Whats wrong with this script? ;/

Mooosie

mistofdeath.com
Premium User
Joined
Aug 2, 2008
Messages
742
Solutions
2
Reaction score
52
Location
Sweden
Code:
function onUse(cid, item, fromPosition, item2, toPosition)
if getCreaturePosition(cid) then
	if(getPlayerStorageValue(cid, 69404) == 1) then
		doCreatureSay(cid, "You, already have a sadle.", TALKTYPE_ORANGE_1)
end
	if(getPlayerStorageValue(cid, 69404) == 0) then
		if doPlayerRemoveItem(cid, 5913, 5) == 1 and doPlayerRemoveItem(cid, 2120, 1) == 1 and doPlayerRemoveItem(cid, 2462, 1) == 1 then
		SetPlayerStorageValue(cid, 69404, 1)
		doPlayerAddItem(cid, 2345, 1)
		doCreatureSay(cid, getCreatureName(cid) .. ', you just build a sadle.', TALKTYPE_ORANGE_1)
	else
		doCreatureSay(cid, "You don't have the requirement items to build a sadle. You need 5 Brown piece of cloth, a Rope and and a Devil Helmet.", TALKTYPE_ORANGE_1)
	end
	end
		return true
end
end

I don't get any error.
 
Code:
function onUse(cid, item, fromPosition, item2, toPosition)
[B]if getCreaturePosition(cid) then[/B]
	if(getPlayerStorageValue(cid, 69404) == 1) then
		doCreatureSay(cid, "You, already have a sadle.", TALKTYPE_ORANGE_1)
end
	if(getPlayerStorageValue(cid, 69404) == 0) then
[B]		if doPlayerRemoveItem(cid, 5913, 5) == 1 and doPlayerRemoveItem(cid, 2120, 1) == 1 and doPlayerRemoveItem(cid, 2462, 1) == 1 then[/B]
		SetPlayerStorageValue(cid, 69404, 1)
		doPlayerAddItem(cid, 2345, 1)
		doCreatureSay(cid, getCreatureName(cid) .. ', you just build a sadle.', TALKTYPE_ORANGE_1)
	else
		doCreatureSay(cid, "You don't have the requirement items to build a sadle. You need 5 Brown piece of cloth, a Rope and and a Devil Helmet.", TALKTYPE_ORANGE_1)
	end
	end
		return true
end
end

I don't get any error.

Bold thing.

Code:
function onUse(cid, item, fromPosition, item2, toPosition)
	if(getPlayerStorageValue(cid, 69404) == 1) then
	doCreatureSay(cid, "You, already have a sadle.", TALKTYPE_ORANGE_1)
	elseif(getPlayerStorageValue(cid, 69404) == 0) then
		if doPlayerRemoveItem(cid, 5913, 5) == true and doPlayerRemoveItem(cid, 2120, 1) == true and doPlayerRemoveItem(cid, 2462, 1) == true then
		SetPlayerStorageValue(cid, 69404, 1)
		doPlayerAddItem(cid, 2345, 1)
		doCreatureSay(cid, getCreatureName(cid) .. ', you just build a sadle.', TALKTYPE_ORANGE_1)
	        else
		doCreatureSay(cid, "You don't have the requirement items to build a sadle. You need 5 Brown piece of cloth, a Rope and and a Devil Helmet.", TALKTYPE_ORANGE_1)
	        end
	end
	return true
end

try this
 
Last edited:
That i was fixing, was:

You are using on an item that have action id, 21708 and when he is using it, he will get the item if he has the items. Then he can't do it again.

@Dantarrix
Crying Damson 0.3.6
 
Lol, guys, sorry for double posting but, i solved it:

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

		queststv = getPlayerStorageValue(cid,57899)
	if queststv == 1 then
	doPlayerSendTextMessage(cid,22,'You\'ve already build a sadle')
end

	if queststv == -1 then
		if doPlayerRemoveItem(cid, 5913, 5) == true and doPlayerRemoveItem(cid, 2120, 1) == true and doPlayerRemoveItem(cid, 2462, 1) == true then
			doPlayerSendTextMessage(cid,22,'You\'ve build a sadle.')
			doPlayerAddItem(cid, 2345, 1)
			setPlayerStorageValue(cid,57899,1)
	else
			doPlayerSendTextMessage(cid,22,'You don\'t have the requirement items to build a sadle. You need 5 Brown piece of cloth, a Rope and and a Devil Helmet.')
			end
			end
			end
 
Back
Top