• 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 Need an adoll addon that gives a single addon

diegoknight95

New Member
Joined
Dec 13, 2009
Messages
37
Reaction score
2
Need an adoll addon that gives a single addon and not the complete

like !first addon mage, !addon first mage
or
!second addon mage, !addon second mage

im working on TFS 0.4
this its my script
Lua:
<talkaction words="!addon" event="script" value="addondoll.lua"/>

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 }
}

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 }
}

function onSay(cid, words, param)
   local outfitName = string.lower(param)
   if string.len(outfitName) == 0 then
      return doPlayerSendCancel(cid, "The command requires 1 parameter.")
   end
   local dollCount = getPlayerItemCount(cid, 9693)
   if dollCount == 0 then
      return doPlayerSendCancel(cid, "You need a addondoll.")
   end
   local outfitList = getPlayerSex(cid) == 0 and femaleOutfits or maleOutfits
   local outfitId = outfitList[outfitName]
   if not outfitId then
      return doPlayerSendCancel(cid, "The name of the outfit does not exist.")
   end
   if canPlayerWearOutfit(cid, outfitId[1], 3) then
      return doPlayerSendCancel(cid, string.format("You already have the %s outfit.", outfitName))
   end
   doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
   doPlayerRemoveItem(cid, 9693, 1)
   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string.format("You have obtained the complete %s outfit.", outfitName))
   doPlayerAddOutfit(cid, outfitId[1], 3)
   return true
end
 

Attachments

Last edited:
Back
Top