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.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.
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
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
function onLogin(cid)
if getCreatureStorage(cid, 5678) == EMPTY_STORAGE then
doPlayerAddAddons(cid, 3)
doCreatureSetStorage(cid, 5678, 1)
end
return true
end
ever heard of compats?@edit, out of curiousity, why getCreatureStorage and not player?
setPlayerPromotionLevel = doPlayerSetPromotionLevel
setPlayerGroupId = doPlayerSetGroupId
setPlayerPartner = doPlayerSetPartner
[COLOR=red] doPlayerSetStorageValue = doCreatureSetStorage
setPlayerStorageValue = doPlayerSetStorageValue
getPlayerStorageValue = getCreatureStorage
[/COLOR] getGlobalStorageValue = getStorage
setGlobalStorageValue = doSetStorage
setPlayerBalance = doPlayerSetBalance