Postado Novembro 3, 2015 9 anos meu mountdoll.lua Mostrar conteúdo oculto local mounts = { --["mount"] = {id = x}, ["widow queen"] = {id = 1} } function onSay(cid, words, param) local player, word = Player(cid), mounts[string.lower(param)] local mountdoll_id = 13030 -- id do mount doll if (player:getItemCount(mountdoll_id) > 0) then if (param ~= "" and word) then if(word and not player:hasMount(word.id)) then player:removeItem(mountdoll_id, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, "Sua mount foi adicionada!") player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) player:addMount(word.id) else player:sendCancelMessage("Voce ja tem esta mount.") end else player:sendCancelMessage("Digite novamente, algo está errado!") end else player:sendCancelMessage("Voce não tem um mount doll!") end return true end Minha mounts.xml Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <mounts> <mount id="1" clientid="368" name="Widow Queen" speed="20" premium="no" /> <mount id="2" clientid="369" name="Racing Bird" speed="20" premium="no" /> <mount id="3" clientid="370" name="War Bear" speed="20" premium="no" /> <mount id="4" clientid="371" name="Black Sheep" speed="20" premium="no" /> <mount id="5" clientid="372" name="Midnight Panther" speed="20" premium="no" /> <mount id="6" clientid="373" name="Draptor" speed="20" premium="no" /> <mount id="7" clientid="374" name="Titanica" speed="20" premium="no" /> <mount id="8" clientid="375" name="Tin Lizzard" speed="20" premium="no" /> <mount id="9" clientid="376" name="Blazebringer" speed="20" premium="no" /> <mount id="10" clientid="377" name="Rapid Boar" speed="20" premium="no" /> <mount id="11" clientid="378" name="Stampor" speed="20" premium="no" /> <mount id="12" clientid="379" name="Undead Cavebear" speed="20" premium="no" /> <mount id="13" clientid="387" name="Donkey" speed="20" premium="no" /> <mount id="14" clientid="388" name="Tiger Slug" speed="20" premium="no" /> <mount id="15" clientid="389" name="Uniwheel" speed="20" premium="no" /> <mount id="16" clientid="390" name="Crystal Wolf" speed="20" premium="no" /> <mount id="17" clientid="392" name="Brown War Horse" speed="20" premium="no" /> <mount id="18" clientid="401" name="Kingly Deer" speed="20" premium="no" /> <mount id="19" clientid="402" name="Tamed Panda" speed="20" premium="no" /> <mount id="20" clientid="405" name="Dromedary" speed="20" premium="no" /> <mount id="21" clientid="406" name="King Scorpion" speed="20" premium="no" /> <mount id="22" clientid="421" name="Rented Horse" speed="20" premium="no" /> <mount id="23" clientid="426" name="Armoured War Horse" speed="20" premium="no" /> <mount id="24" clientid="427" name="Shadow Draptor" speed="20" premium="no" /> <mount id="25" clientid="437" name="Rented Horse" speed="20" premium="no" /> <mount id="26" clientid="438" name="Rented Horse" speed="20" premium="no" /> <mount id="27" clientid="447" name="Ladybug" speed="20" premium="no" /> <mount id="28" clientid="450" name="Manta" speed="20" premium="no" /> <mount id="29" clientid="502" name="Ironblight" speed="20" premium="no" /> <mount id="30" clientid="503" name="Magma Crawler" speed="20" premium="no" /> <mount id="31" clientid="506" name="Dragonling" speed="20" premium="no" /> <mount id="32" clientid="515" name="Gnarlhound" speed="20" premium="no" /> <mount id="33" clientid="521" name="Crimson Ray" speed="20" premium="no" /> <mount id="34" clientid="522" name="Steelbeak" speed="20" premium="no" /> <mount id="35" clientid="526" name="Water Buffalo" speed="20" premium="no" /> <mount id="36" clientid="546" name="Armoured Scorpion" speed="20" premium="no" /> <mount id="37" clientid="547" name="Armoured Dragonling" speed="20" premium="no" /> <mount id="38" clientid="548" name="Armoured Cavebear" speed="20" premium="no" /> <mount id="39" clientid="559" name="The Hellgrip" speed="20" premium="no" /> <mount id="40" clientid="571" name="Lion" speed="20" premium="no" /> <mount id="41" clientid="572" name="Golden Lion" speed="20" premium="no" /> <mount id="42" clientid="580" name="Shock Head" speed="20" premium="no" /> <mount id="43" clientid="606" name="Walker" speed="20" premium="no" /> <mount id="44" clientid="621" name="Azudocus" speed="20" premium="no" /> <mount id="45" clientid="622" name="Carpacosaurus" speed="20" premium="no" /> <mount id="46" clientid="624" name="Death Crawler" speed="20" premium="no" /> <mount id="47" clientid="626" name="Flamesteed" speed="20" premium="no" /> <mount id="48" clientid="627" name="Jade Lion" speed="20" premium="no" /> <mount id="49" clientid="628" name="Jade Pincer" speed="20" premium="no" /> <mount id="50" clientid="629" name="Nethersteed" speed="20" premium="no" /> <mount id="51" clientid="630" name="Tempest" speed="20" premium="no" /> <mount id="52" clientid="631" name="Winter King" speed="20" premium="no" /> <mount id="53" clientid="644" name="Doombringer" speed="20" premium="no" /> <mount id="54" clientid="647" name="Woodland Prince" speed="20" premium="no" /> <mount id="55" clientid="648" name="Hailtorm Fury" speed="20" premium="no" /> <mount id="56" clientid="649" name="Siegebreaker" speed="20" premium="no" /> <mount id="57" clientid="650" name="Poisonbane" speed="20" premium="no" /> <mount id="58" clientid="651" name="Blackpelt" speed="20" premium="no" /> <mount id="59" clientid="669" name="Golden Dragonfly" speed="20" premium="no" /> <mount id="60" clientid="670" name="Steel Bee" speed="20" premium="no" /> <mount id="61" clientid="671" name="Copper Fly" speed="20" premium="no" /> <mount id="62" clientid="672" name="Tundra Rambler" speed="20" premium="no" /> <mount id="63" clientid="673" name="Highland Yak" speed="20" premium="no" /> <mount id="64" clientid="674" name="Glacier Vagabond" speed="20" premium="no" /> <mount id="65" clientid="682" name="Glooth Glider" speed="20" premium="no" /> <mount id="66" clientid="685" name="Shadow Hart" speed="20" premium="no" /> <mount id="67" clientid="686" name="Black Stag" speed="20" premium="no" /> <mount id="68" clientid="687" name="Emperor Deer" speed="20" premium="no" /> <mount id="69" clientid="688" name="Flying Divan" speed="20" premium="no" /> <mount id="70" clientid="689" name="Magic Carpet" speed="20" premium="no" /> <mount id="71" clientid="690" name="Floating Kashmir" speed="20" premium="no" /> <mount id="72" clientid="691" name="Ringtail Waccoon" speed="20" premium="no" /> <mount id="73" clientid="692" name="Night Waccoon" speed="20" premium="no" /> <mount id="74" clientid="693" name="Emerald Waccoon" speed="20" premium="no" /> <mount id="75" clientid="726" name="Flitterkatzen" speed="20" premium="no" /> <mount id="76" clientid="727" name="Venompaw" speed="20" premium="no" /> <mount id="77" clientid="728" name="Batcat" speed="20" premium="no" /> <mount id="78" clientid="734" name="Sea Devil" speed="20" premium="no" /> <mount id="79" clientid="735" name="Coralripper" speed="20" premium="no" /> <mount id="80" clientid="736" name="Plumfish" speed="20" premium="no" /> <mount id="81" clientid="738" name="Gorongra" speed="20" premium="no" /> <mount id="82" clientid="739" name="Noctungra" speed="20" premium="no" /> <mount id="83" clientid="740" name="Silverneck" speed="20" premium="no" /> <mount id="84" clientid="761" name="Nova1" speed="20" premium="no" /> <mount id="85" clientid="762" name="Nova2" speed="20" premium="no" /> <mount id="86" clientid="763" name="Nova3" speed="20" premium="no" /> </mounts> Alguém pode inserir essa mout lista no script mountdoll.lua? Não sei a diferença das cores Obrigado. REP+
Postado Novembro 3, 2015 9 anos Não entendi, como assim "não sei a diferença das cores", que cores? Você quer que insira todas essas mounts na list assim como está o Widow Queen?
Postado Novembro 4, 2015 9 anos Autor Solução Mostrar conteúdo oculto local mounts = { ["racing bird"] = {id = 2}, ["war bear"] = {id = 3}, ["black sheep"] = {id = 4}, ["midnight panther"] = {id = 5}, ["draptor"] = {id = 6}, ["titanica"] = {id = 7}, ["tin lizzard"] = {id = 8}, ["blazebringer"] = {id = 9}, ["rapid boar"] = {id = 10}, ["stampor"] = {id = 11}, ["undead cavebear"] = {id = 12}, ["donkey"] = {id = 13}, ["tiger slug"] = {id = 14}, ["uniwheel"] = {id = 15}, ["crystal wolf"] = {id = 16}, ["brown war horse"] = {id = 17}, ["kingly deer"] = {id = 18}, ["tamed panda"] = {id = 19}, ["dromedary"] = {id = 20}, ["scorpion king"] = {id = 21}, ["rented horse"] = {id = 22}, ["armoured war horse"] = {id = 23}, ["shadow draptor"] = {id = 24}, ["rented horse"] = {id = 26}, ["ladybug"] = {id = 27}, ["manta"] = {id = 28}, ["ironblight"] = {id = 29}, ["magma crawler"] = {id = 30}, ["dragonling"] = {id = 31}, ["gnarlhound"] = {id = 32}, ["crimson ray"] = {id = 33}, ["steelbeak"] = {id = 34}, ["water buffalo"] = {id = 35}, ["armoured scorpion"] = {id = 36}, ["armoured dragonling"] = {id = 37}, ["armoured cavebear"] = {id = 38}, ["the hellgrip"] = {id = 39}, ["lion"] = {id = 40}, ["golden lion"] = {id = 41}, ["shock head"] = {id = 42}, ["walker"] = {id = 43}, ["azudocus"] = {id = 44}, ["carpacosaurus"] = {id = 45}, ["death crawler"] = {id = 46}, ["flamesteed"] = {id = 47}, ["jade lion"] = {id = 48}, ["jade pincer"] = {id = 49}, ["nethersteed"] = {id = 50}, ["tempest"] = {id = 51}, ["winter king"] = {id = 52}, ["doombringer"] = {id = 53}, ["woodland prince"] = {id = 54}, ["hailtorm fury"] = {id = 55}, ["siegebreaker"] = {id = 56}, ["poisonbane"] = {id = 57}, ["blackpelt"] = {id = 58}, ["golden dragonfly"] = {id = 59}, ["steel bee"] = {id = 60}, ["copper fly"] = {id = 61}, ["tundra rambler"] = {id = 62}, ["highland yak"] = {id = 63}, ["glacier vagabond"] = {id = 64}, ["glooth glider"] = {id = 65}, ["shadow hart"] = {id = 66}, ["black stag"] = {id = 67}, ["emperor deer"] = {id = 68}, ["flying divan"] = {id = 69}, ["magic carpet"] = {id = 70}, ["floating kashmir"] = {id = 71}, ["ringtail waccoon"] = {id = 72}, ["night waccoon"] = {id = 73}, ["emerald waccoon"] = {id = 74}, ["flitterkatzen"] = {id = 75}, ["venompaw"] = {id = 76}, ["batcat"] = {id = 77, ["sea devil"] = {id = 78}, ["coralripper"] = {id = 79}, ["plumfish"] = {id = 80}, ["gorongra"] = {id = 81}, ["noctungra"] = {id = 82}, ["silverneck"] = {id = 83}, ["nova1"] = {id = 84}, ["nova2"] = {id = 85}, ["nova3"] = {id = 86}, ["widow queen"] = {id = 1}, } } function onSay(cid, words, param) local player, word = Player(cid), mounts[string.lower(param)] local mountdoll_id = 13030 -- id do mount doll if (player:getItemCount(mountdoll_id) > 0) then if (param ~= "" and word) then if(word and not player:hasMount(word.id)) then player:removeItem(mountdoll_id, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, "Sua mount foi adicionada!") player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) player:addMount(word.id) else player:sendCancelMessage("Voce ja tem esta mount.") end else player:sendCancelMessage("Digite novamente, algo está errado!") end else player:sendCancelMessage("Voce não tem um mount doll!") end return true end -- Talkactions.xml -- <talkaction words="!mount" script="mountdoll.lua"/> - Rented Horse
Postado Novembro 4, 2015 9 anos Vou te explicar a diferenca das cores.. @Larissa Azhaurn na esquerda - @vankk na direita.. O seu script seria o nome da montaria e o ID que está configurada no mounts.xml <mount id="8" clientid="375" name="Tin Lizzard" speed="20" premium="no" /> Tin Lizzard ID 8.. então.. ["Tin Lizzard"] = {id = 8} Só não esquece que o script precisa ter VIRGULAS "," e quando for a ultima linha das montarias, não precisa, eg: ["widow queen"] = {id = 1}, ["Racing Bird"] = {id = 2}, ["War Bear"] = {id = 3}, ["Black Sheep"] = {id = 4} Discord: vankk #7765 Precisando de ajuda? Entre em contato comigo via Discord. Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.
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.