Postado Julho 26, 2014 10 anos Não brother, são funções do 0.3.6 então não irá funcionar =P Obrigado por responder bem rápido... será que alguem consegue fazer uma adaptação? de 0.3....... pra 1.0 ? Se Ajudei Rep+ pra mim
Postado Julho 26, 2014 10 anos Obrigado por responder bem rápido... será que alguem consegue fazer uma adaptação? de 0.3....... pra 1.0 ? Troquei as funções pra do TFS 1.0, testa aí, se o dono quiser anexar no tópico para o 1.0 também pode Acho que não esqueci nada, um pouco de sono mas ok rs, segue: local function tameMonster(cid, item, itemEx, tame, run, broken) n = math.random(100) if n <= broken then creature:say(cid, "Lost item", TALKTYPE_ORANGE_1) player:removeItem(item.uid) elseif n > broken and n <= (tame+broken) then player:removeItem(item.uid) creature:say(cid, "You tamed the mount", TALKTYPE_ORANGE_1) player:sendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You tamed the mount "..getCreatureName(itemEx.uid)..".") return true elseif n > (tame+broken) and n <= (tame+broken+run) then creature:say(cid, "the monster fled", TALKTYPE_ORANGE_1) creature:remove(itemEx.uid) else creature:say(cid, "Try again", TALKTYPE_ORANGE_1) end return false end local function inArray(table, value) for i,v in pairs(table) do if (v.name == string.lower(value)) then return i end end return 0 end local mounts = { {item = 13307, name = "wailing widow", id = 1, tame=10, run=39, broken=51}, {item = 13298, name = "terror bird", id = 2, tame=10, run=39, broken=51}, {item = 5907, name = "bear", id = 3, tame=7, run=39, broken=54}, {item = 13295, name = "black sheep", id = 4, tame=7, run=35, broken=58}, {item = 13293, name = "midnight panther", id = 5, tame=10, run=39, broken=51}, {item = 13294, name = "draptor", id = 6, tame=10, run=39, broken=51}, {item = 13305, name = "crustacea gigantica", id = 7, tame=10, run=39, broken=51}, {item = 13292, name = "tin lizzard", id = 8, tame=10, run=36, broken=54}, {item = 13247, name = "boar", id = 10, tame=10, run=39, broken=51}, {item = 13291, name = "undead cavebear", id = 12, tame=10, run=39, broken=51} } function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(itemEx.uid) then if inArray(mounts, getCreatureName(itemEx.uid)) > 0 then i = inArray(mounts, getCreatureName(itemEx.uid)) if item.itemid == mounts[i].item and not getPlayerMount(cid, mounts[i].id) then if tameMonster(cid, item, itemEx, mounts[i].tame, mounts[i].run, mounts[i].broken) then position:sendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE) monster:removeFriend(itemEx.uid) player:addMount(cid, mounts[i].id) else position:sendMagicEffect(toPosition, CONST_ME_POFF) end end end end return true end Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Postado Julho 26, 2014 10 anos Troquei as funções pra do TFS 1.0, testa aí, se o dono quiser anexar no tópico para o 1.0 também pode Acho que não esqueci nada, um pouco de sono mas ok rs, segue: local function tameMonster(cid, item, itemEx, tame, run, broken) n = math.random(100) if n <= broken then creature:say(cid, "Lost item", TALKTYPE_ORANGE_1) player:removeItem(item.uid) elseif n > broken and n <= (tame+broken) then player:removeItem(item.uid) creature:say(cid, "You tamed the mount", TALKTYPE_ORANGE_1) player:sendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You tamed the mount "..getCreatureName(itemEx.uid)..".") return true elseif n > (tame+broken) and n <= (tame+broken+run) then creature:say(cid, "the monster fled", TALKTYPE_ORANGE_1) creature:remove(itemEx.uid) else creature:say(cid, "Try again", TALKTYPE_ORANGE_1) end return false end local function inArray(table, value) for i,v in pairs(table) do if (v.name == string.lower(value)) then return i end end return 0 end local mounts = { {item = 13307, name = "wailing widow", id = 1, tame=10, run=39, broken=51}, {item = 13298, name = "terror bird", id = 2, tame=10, run=39, broken=51}, {item = 5907, name = "bear", id = 3, tame=7, run=39, broken=54}, {item = 13295, name = "black sheep", id = 4, tame=7, run=35, broken=58}, {item = 13293, name = "midnight panther", id = 5, tame=10, run=39, broken=51}, {item = 13294, name = "draptor", id = 6, tame=10, run=39, broken=51}, {item = 13305, name = "crustacea gigantica", id = 7, tame=10, run=39, broken=51}, {item = 13292, name = "tin lizzard", id = 8, tame=10, run=36, broken=54}, {item = 13247, name = "boar", id = 10, tame=10, run=39, broken=51}, {item = 13291, name = "undead cavebear", id = 12, tame=10, run=39, broken=51} } function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(itemEx.uid) then if inArray(mounts, getCreatureName(itemEx.uid)) > 0 then i = inArray(mounts, getCreatureName(itemEx.uid)) if item.itemid == mounts[i].item and not getPlayerMount(cid, mounts[i].id) then if tameMonster(cid, item, itemEx, mounts[i].tame, mounts[i].run, mounts[i].broken) then position:sendMagicEffect(fromPosition, CONST_ME_MAGIC_BLUE) monster:removeFriend(itemEx.uid) player:addMount(cid, mounts[i].id) else position:sendMagicEffect(toPosition, CONST_ME_POFF) end end end end return true end muito bom.. uma duvida... na tag creature:say(cid, "Lost item", TALKTYPE_ORANGE_1) tem como colocar assim... "tal monstro get the item tal from your hands" entendeu? tipo.. pra cada bixo, ele dar uma msg diferente meio parecido com o player:sendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You tamed the mount "..getCreatureName(itemEx.uid)..".") Se Ajudei Rep+ pra mim
Postado Julho 26, 2014 10 anos muito bom.. uma duvida... na tag creature:say(cid, "Lost item", TALKTYPE_ORANGE_1) tem como colocar assim... "tal monstro get the item tal from your hands" entendeu? tipo.. pra cada bixo, ele dar uma msg diferente meio parecido com o player:sendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You tamed the mount "..getCreatureName(itemEx.uid)..".") creature:say(cid, "Lost item", TALKTYPE_ORANGE_1) - teria que criar uma configuração local no script buscando as mensagens em parâmetro ou adicione na linha mesmo: "You tamed the mount "..getCreatureName(itemEx.uid).." Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Postado Julho 26, 2014 10 anos creature:say(cid, "Lost item", TALKTYPE_ORANGE_1) - teria que criar uma configuração local no script buscando as mensagens em parâmetro ou adicione na linha mesmo: "You tamed the mount "..getCreatureName(itemEx.uid).." mas tu num pode fazer a config. local pra mim? :B (sim, sou folgado) perdoe... existe essa função "getItemName(itemEx.uid)"? pra ele pegar o nome do item, e colocar nessa função.... Se Ajudei Rep+ pra mim
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.