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

Solved Addon Chest Problem! Rep++

Skitscher

New Member
Joined
Apr 7, 2009
Messages
33
Reaction score
0
Hi!

I hope someone can solve my problem. I thinks it isn't hard (;

I use that script:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local femaleOutfits = { ["nightmare"]={269} }
    local maleOutfits = { ["nightmare"]={268} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
    local queststatus = getPlayerStorageValue(cid,12455)
     if queststatus == -1 then
    local pPos = getPlayerPosition(cid)
    setPlayerStorageValue(cid,12455,1)
    doSendMagicEffect(pPos, 28)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
            if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
     else
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
    return 1
end

And I got such an error:
Code:
[Error - Action Interface]
data/actions/scripts/quests/alladdons.lua:onUse
Description:
data/actions/scripts/quests/alladdons.lua:14: attempt to index field '?' (a nil value)
stack traceback:
data/actions/scripts/quests/alladdons.lua:14: in function (data/actions/scripts/quests/alladdons.lua:1)

thanks in advance! :)
 
Last edited by a moderator:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local femaleOutfit = 269
    local maleOutfit = 268
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
    local queststatus = getPlayerStorageValue(cid,12455)
     if queststatus == -1 then
    local pPos = getPlayerPosition(cid)
    setPlayerStorageValue(cid,12455,1)
    doSendMagicEffect(pPos, 28)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
            if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfit, 3)
            else
              doPlayerAddOutfit(cid, maleOutfit, 3)
            end
     else
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
    return 1
end
 
Like my Script? have simple configuration..
Lua:
--[[
   Script by Cronox
]]--
local outfitmale = 268
local outfitfemale = 269
local addons = 3
local storage = 12455

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, storage) == -1 then
	doPlayerAddOutfit(cid, outfitmale, addons)
	doPlayerAddOutfit(cid, outfitfemale, addons)
		doPlayerSendTextMessage(cid, 21, "Full Addon Set sucesfully added!!")
		doSendMagicEffect(getCreaturePosition(cid), 28)
	setPlayerStorageValue(cid, storage, 1)
else
	doPlayerSendCancel(cid, "Not Possible.")
end
	return true
end
 
Back
Top