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

LUA:
  local msg = {"You got all the addons now!", "Sorry, this is not possible!"}
  local queststatus = getPlayerStorageValue(cid,12455)
  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"]={335}
}

  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"]={336}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    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)
     else
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
    return 1
end
 
Thanks Sir ! its possible to make automatic? just creat the character and have all the addons at first login?

Ty
 
LUA:
  local msg = {"You got all the addons now!", "Sorry, this is not possible!"}
  local queststatus = getPlayerStorageValue(cid,12455)
  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"]={335}
}

  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"]={336}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    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)
     else
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
    end
    return 1
end
That's an action script, he is looking for a creaturescript so onLogin you get every addon.
 
Idk, I haven't tried but I'd say you should check the Outfits.xml or w/e it's name is, if it's not possible there then there should be a lua code for it. tried onLogin doPlayerAddOutfit?
 
That's an action script, he is looking for a creaturescript so onLogin you get every addon.

LUA:
  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"]={335}
}
 
  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"]={336}
}

function onLogin(cid)
    if(getPlayerSex(cid) == 0)then
		doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
    else
		doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
		setPlayerStorageValue(cid,12455,1)
    end
    return 1
end

Code:
	  <event type="login" name="PlayerLogin" event="script" value="login.lua"/>

There's the creaturescript, hope it works ;)
 
Last edited:
my turn
LUA:
function onLogin(cid)
    if getCreatureStorage(cid, 5678) == EMPTY_STORAGE then
        doPlayerAddAddons(cid, 3)
        doCreatureSetStorage(cid, 5678, 1)
    end
    return true
end
 
Awesome, there's a doPlayerAddAddons function now ;P, good job cyber, repped! :P

@edit, out of curiousity, why getCreatureStorage and not player?
 
@edit, out of curiousity, why getCreatureStorage and not player?
ever heard of compats?
Code:
    setPlayerPromotionLevel = doPlayerSetPromotionLevel
    setPlayerGroupId = doPlayerSetGroupId
    setPlayerPartner = doPlayerSetPartner
[COLOR=red]    doPlayerSetStorageValue = doCreatureSetStorage
    setPlayerStorageValue = doPlayerSetStorageValue
    getPlayerStorageValue = getCreatureStorage
[/COLOR]    getGlobalStorageValue = getStorage
    setGlobalStorageValue = doSetStorage
    setPlayerBalance = doPlayerSetBalance
 
Wow you guys are helping to creat my war server hehe thanks both of you for helping me ! i will try give some +REP

*SOLVED
 
Back
Top