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

Addon Doll!

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
Does anyone have a scripts that if u press on a item u get all outfits and all addons ? :peace:
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerStorageValue(cid,1800) == 10 then
            doCreatureSay(cid, "You already have all the addons.", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) >= 10 then
        doCreatureSay(cid, "You received the first addon and the second addon.", TALKTYPE_ORANGE_1)
            doPlayerAddAddons(cid, 3)
            doSendMagicEffect(fromPosition, 37)
            doRemoveItem(item.uid)
            setPlayerStorageValue(cid,1800,20)
        else
                    doCreatureSay(cid, "You must be level 10 to get the second addon", TALKTYPE_ORANGE_1)
        end
                 return TRUE   
end
 
That would bug if you're level 10.
Fixed:

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid,1800) == 10 then
		doCreatureSay(cid, "You have already received all the addons!", TALKTYPE_ORANGE_1)
	elseif getPlayerLevel(cid) > 10 then
		doCreatureSay(cid, "You received the first addons and the second addons.", TALKTYPE_ORANGE_1)
		doPlayerAddAddons(cid, 3)
		doSendMagicEffect(fromPosition, 37)
		doRemoveItem(item.uid)
		setPlayerStorageValue(cid,1800,20)
	else
		doCreatureSay(cid, "You must be level 10 to get the second addon", TALKTYPE_ORANGE_1)
	end
	return TRUE
end
 
That would bug if you're level 10.
Fixed:

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid,1800) == 10 then
		doCreatureSay(cid, "You have already received all the addons!", TALKTYPE_ORANGE_1)
	elseif getPlayerLevel(cid) > 10 then
		doCreatureSay(cid, "You received the first addons and the second addons.", TALKTYPE_ORANGE_1)
		doPlayerAddAddons(cid, 3)
		doSendMagicEffect(fromPosition, 37)
		doRemoveItem(item.uid)
		setPlayerStorageValue(cid,1800,20)
	else
		doCreatureSay(cid, "You must be level 10 to get the second addon", TALKTYPE_ORANGE_1)
	end
	return TRUE
end

Umm, I don't exactly understand why you have
Code:
getPlayerStorageValue(cid, 1800) == 10

-1, 1, and 0?
 
Oops. Didn't check the whole script ^_^

LUA:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerLever(cid) == 10 then
                doCreatureSay(cid, "You have already received all the addons!", TALKTYPE_ORANGE_1)
        elseif getPlayerLevel(cid) > 10 then
                doCreatureSay(cid, "You received the first addons and the second addons.", TALKTYPE_ORANGE_1)
                doPlayerAddAddons(cid, 3)
                doSendMagicEffect(fromPosition, 37)
                doRemoveItem(item.uid)
                setPlayerStorageValue(cid,1800,20)
        else
                doCreatureSay(cid, "You must be level 10 to get the second addon", TALKTYPE_ORANGE_1)
        end
        return TRUE
end

Also, storagevalues don't neccesarily have to be -1, 0, and 1.
 
Umm, I don't exactly understand why you have
Code:
getPlayerStorageValue(cid, 1800) == 10

-1, 1, and 0?

I had this script from my 8.0 OT so its rather shaky. Here i made it smaller.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerStorageValue(cid,1800) == -1 and getPlayerLevel(cid) > 10 then
        doCreatureSay(cid, "You received the first addon and the second addon.", TALKTYPE_ORANGE_1)
            doPlayerAddAddons(cid, 3)
            doSendMagicEffect(fromPosition, 37)
            doRemoveItem(item.uid)
            setPlayerStorageValue(cid,1800,1)
        else
        doCreatureSay(cid, "You already have all the addons or you are not level 10 and above.", TALKTYPE_ORANGE_1)
        end
                 return TRUE   
end
 
Mhmm..

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
		if getPlayerStorageValue(cid, 1800) == -1 and getPlayerLevel(cid) > 10 then
			doCreatureSay(cid, "You received the first addon and the second addon.", TALKTYPE_ORANGE_1)
			doPlayerAddAddons(cid, 3)
			doSendMagicEffect(fromPosition, 37)
			doRemoveItem(item.uid)
			setPlayerStorageValue(cid,1800,1)
		else
			doCreatureSay(cid, "You already have all the addons or you are not level 10 and above.", TALKTYPE_ORANGE_1)
		end
    return TRUE  
end
 
Back
Top