• 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 Addon Doll problem

DonHagman

Chill'Reward2014
Joined
Dec 26, 2010
Messages
875
Reaction score
186
Location
Dudeland, Macronesia
Hello!

I got a small problem with my Addon Doll..
You can choose Nightmare/Brotherhood Outfit, but you aint get it.

I guess it's because of the dreamers challenge quest, but how can I change it?
I wan't my players to be possible to get Nightmare/brotherhood outfit just by the addon doll.



Thanks in advice
Hagman:ninja:
 
if you delete nightmare outfit and bro.... outfit then they dont have this outfit

data/XML/Outfits.xml


data/talkactions/scripts/first nightmare.lua

PHP:
function onSay(cid, words, param)
	removenugget = doPlayerRemoveItem(cid, 8982, 1)
		if removenugget == 1 and getPlayerSex(cid) == 0 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 269, 1)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have first nightmare!")
		elseif removenugget == 1 and getPlayerSex(cid) == 1 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 268, 1)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have first nightmare!")
end
end

data/talkactions/scripts/second nightmare.lua

PHP:
function onSay(cid, words, param)
	removenugget = doPlayerRemoveItem(cid, 8982, 1)
		if removenugget == 1 and getPlayerSex(cid) == 0 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 269, 2)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have second nightmare!")
		elseif removenugget == 1 and getPlayerSex(cid) == 1 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 268, 2)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have second nightmare!")
end
end

data/talkactions/scripts/first bro.lua
PHP:
function onSay(cid, words, param)
	removenugget = doPlayerRemoveItem(cid, 8982, 1)
		if removenugget == 1 and getPlayerSex(cid) == 0 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 279, 1)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have first brotherhood!")
		elseif removenugget == 1 and getPlayerSex(cid) == 1 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 278, 1)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have first brotherhood!")
end
end

data/talkactions/scripts/second bro.lua
PHP:
function onSay(cid, words, param)
	removenugget = doPlayerRemoveItem(cid, 8982, 1)
		if removenugget == 1 and getPlayerSex(cid) == 0 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 279, 2)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have first brotherhood!")
		elseif removenugget == 1 and getPlayerSex(cid) == 1 then
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
		doPlayerAddOutfit(cid, 278, 2)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Now you have second brotherhood!")
end
end


data/talkactions/talkactions.xml

PHP:
<talkaction words="!firstnightmare" script="first nightmare.lua"/>
	<talkaction words="!secondbrotherhood" script="second bro.lua"/>
	<talkaction words="!firstbrotherhood" script="first bro.lua"/>
	<talkaction words="!secondnightmare" script="second nightmare.lua"/>

rep++
 
Post your addon doll script ;]

Code:
function onSay(cid, words, param)
    local femaleOutfits = { ["citzen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["noblewoman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={270}, ["demonhunter"]={288}, ["yalaharian"]={324} }
    local maleOutfits = { ["citzen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325} }
    local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param!", "Full Addon Set sucesfully added!"}
    local param = string.lower(param) 

    if(getPlayerItemCount(cid, 8982) > 0) then
        if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then
            doPlayerRemoveItem(cid, 8982, 1)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
            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[1])
        end
    else
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
end


Edit: Warmaster is not possible either:
Code:
 Command requires GOOD param!
 
Last edited:
wrong outfits ids.

- female Brotherhood 279
- male Brotherhood 278

Try with these:
Code:
    local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336} }
    local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335} }
 
data\talkactions\scripts\addondoll.lua

PHP:
function onSay(cid, words, param)
    local femaleOutfits = { ["nightmare"]={269}, ["brotherhood"]={279} }
    local maleOutfits = { ["nightmare"]={268}, ["brotherhood"]={278} }
    local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param!", "Full Addon Set sucesfully added!"}
    local param = string.lower(param) 
 
    if(getPlayerItemCount(cid, 8982) > 0) then
        if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then
            doPlayerRemoveItem(cid, 8982, 1)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
            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[1])
        end
    else
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
end

Add to data\talkactions\talkactions.xml
PHP:
<talkaction words="!addon" event="script" value="addondoll.lua"/>

say in game !addon nightmare hope it works
 
Last edited:
I did change the ID's, but it still doesn't work. :s

wrong outfits ids.

- female Brotherhood 279
- male Brotherhood 278

Try with these:
Code:
    local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336} }
    local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335} }
 
If I overwrite my current addondoll.lua with that, won't the other addons be unavailable then?


data\talkactions\scripts\addondoll.lua

PHP:
function onSay(cid, words, param)
    local femaleOutfits = { ["nightmare"]={269}, ["brotherhood"]={279} }
    local maleOutfits = { ["nightmare"]={268}, ["brotherhood"]={278} }
    local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param!", "Full Addon Set sucesfully added!"}
    local param = string.lower(param) 
 
    if(getPlayerItemCount(cid, 8982) > 0) then
        if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then
            doPlayerRemoveItem(cid, 8982, 1)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
            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[1])
        end
    else
      doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
end

Add to data\talkactions\talkactions.xml
PHP:
<talkaction words="!addon" event="script" value="addondoll.lua"/>

say in game !addon nightmare hope it works
 
Alright.. Will try that!

Another question, in my homepage..All the text is Red for some reason, and I don't know how I changed that (1 month ago).. I wan't it Black, any idea how to change that?
 
can enyone fix monste doll?
then u click at doll u will be some random monster? 8.6
Please come to my server and tell me the script..
swelegend.servegame.com
 
Back
Top