Postado Março 30, 2014 11 anos Faz assim: Creaturescripts.xml: <event type="login" name="FirstOutfit" event="script" value="FirstOutfit.lua"/> creaturescripts/scripts/FirstOutfit.lua function onLogin(cid) local outfit1 = {lookType = 138, lookHead = 78, lookBody = 132, lookLegs = 88, lookFeet = 85, lookAddons = 0} local outfit2 = {lookType = 148, lookHead = 78, lookBody = 132, lookLegs = 88, lookFeet = 85, lookAddons = 0} local outfit3 = {lookType = 137, lookHead = 78, lookBody = 132, lookLegs = 88, lookFeet = 85, lookAddons = 0} local outfit4 = {lookType = 139, lookHead = 78, lookBody = 132, lookLegs = 88, lookFeet = 85, lookAddons = 0} if getPlayerStorageValue(cid, 90000) == -1 then if getPlayerVocation(cid) == 1 then setPlayerStorageValue(cid, 40001, 1) setPlayerStorageValue(cid, 90000, 1) doCreatureChangeOutfit(cid, outfit1) end end if getPlayerStorageValue(cid, 90000) == -1 then if getPlayerVocation(cid) == 2 then setPlayerStorageValue(cid, 40002, 1) setPlayerStorageValue(cid, 90000, 1) doCreatureChangeOutfit(cid, outfit2) end end if getPlayerStorageValue(cid, 90000) == -1 then if getPlayerVocation(cid) == 3 then setPlayerStorageValue(cid, 40003, 1) setPlayerStorageValue(cid, 90000, 3) doCreatureChangeOutfit(cid, outfit3) end end if getPlayerStorageValue(cid, 90000) == -1 then if getPlayerVocation(cid) == 4 then setPlayerStorageValue(cid, 40004, 1) setPlayerStorageValue(cid, 90000, 4) doCreatureChangeOutfit(cid, outfit4) end end end XML/Outfit.xml: <?xml version="1.0"?> <outfits> <outfit id="1" quest="40001"> <list gender="0" lookType="138" name="Mage"/> <list gender="1" lookType="130" name="Mage"/> </outfit> <outfit id="2" quest="40002"> <list gender="0" lookType="148" name="Druid"/> <list gender="1" lookType="144" name="Druid"/> </outfit> <outfit id="3" quest="40003"> <list gender="0" lookType="137" name="Hunter"/> <list gender="1" lookType="129" name="Hunter"/> </outfit> <outfit id="4" quest="40004"> <list gender="0" lookType="139" name="Knight"/> <list gender="1" lookType="131" name="Knight"/> </outfit> </outfits> Não testei mas acho que dá, e tipo, se quiser por mais, vai olhando como eu fiz as outras, porque eu não curto explicar, até porque eu faço sem nem eu mesmo entender Editado Março 30, 2014 11 anos por Artur Henrique (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.