Ir para conteúdo

meubk

Visconde
  • Total de itens

    311
  • Registro em

  • Última visita

  • Dias Ganhos

    8

Tudo que meubk postou

  1. ATUALIZAÇÃO 2.0 - 11/09/2011 Adicionado sistema de invitar, para ser invocado, comandos : /invoc aceitar /invoc rejeitar
  2. Creio que funfe em um serve 8.6 até por que não usei nenhuma função diferente da versão 8.6.. Sky e Demonholder, a checagem de mana está ai sim, aonde o Sky disse mesmo... e enquanto o cara querer puxar pra te matar, eu estou fazendo aqui irei postar amanhã: quando o player clicar no corpo ira mandar um convite para o player se ele ker ser invocado, tendo accept e reject.. Obrigado aos elogios.. Fui ;*
  3. Invocação de Player Sabe quando você e seu amigo está caçando em um lugar muito longe, e você morre, e o espertinho de seu amigo fica vivo, não dá aquela raiva, de ter que voltar todo caminho, e ainda sozinho ? Pensando nisso, foi que eu tive uma ideia de uma Pedra, aonde seu amigo pode usar ela no seu corpo se você ainda estiver tiver online, e aceitar seu convite, você é teleportado para cima do corpo. Observe a Imagem: Bom, agora que já está explicado a ideia vamos ao script: Crie um arquivo com o nome de invoc.lua na pasta actions/scripts e cole o seguinte código: local configs = { minLvL = 0, -- level minimo necessário[ 0 para não precisar ] mana = 0, -- mana necessária [ 0 para não precisar ] magicLvL = 0, -- magic level necessário [ 0 para não precisar ] vocs = {0, 1, 2, 3, 4, 5, 6, 7, 8}, -- vocações que podem usar premium = false, -- precisa de premium [ true ou false ] removeCorpse = true, -- remover o corpo depois de invocar [ true or false ] removeStone = true, -- remover a pedra após usar [ true or false ] invite = true -- o dono do corpo precisa aceitar [ true or false ] } function SendMessageInvoc(cid, pid) if getPlayerStorageValue(pid, 22254) ~= 1 then return true end if not isCreature(cid) or not isCreature(pid) then return true end doPlayerSendTextMessage(pid, 27, "O Player "..getCreatureName(cid).." quer te invocar digite /invoc aceitar ou /invoc rejeitar.") addEvent(SendMessageInvoc, 10000, cid, pid) end function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) < configs.minLvL then return doPlayerSendCancel(cid, "Você precisa de level "..configs.minLvL.." para invocar alguem.") elseif getPlayerMana(cid) < configs.mana then return doPlayerSendCancel(cid, "Você precisa de "..configs.mana.." de mana para invocar alguem.") elseif getPlayerMagLevel(cid) < configs.magicLvL then return doPlayerSendCancel(cid, "Você precisa de magic level "..configs.magicLvL.." para invocar alguem.") elseif not isInArray(configs.vocs, getPlayerVocation(cid)) then return doPlayerSendCancel(cid, "Sua Vocação não é permitido invocar alguem.") elseif not isPremium(cid) and configs.premium then return doPlayerSendCancel(cid, "Você precisa de premium account para invocar alguem.") end if isCorpse(item2.uid) then if not getItemAttribute(item2.uid, "description") then return doPlayerSendCancel(cid, "Este não é corpo de um player.") end local name = (getItemAttribute(item2.uid, "description")):match("You recognize (.-)%.") local pid = getPlayerByName(name) if pid then if not configs.invite then doTeleportThing(pid, topos) doSendMagicEffect(topos, 10) doSendAnimatedText(topos, "Invoked", math.random(1, 250)) doPlayerSendTextMessage(cid, 27, "O Player "..name.." foi invocado com sucesso.") doPlayerSendTextMessage(pid, 27, "O Player "..getCreatureName(cid).." te invocou.") if configs.removeCorpse then doRemoveItem(item2.uid) end else if getPlayerStorageValue(pid, 22254) ~= 1 then setPlayerStorageValue(pid, 22254, 1) setPlayerStorageValue(pid, 22255, topos.x) setPlayerStorageValue(pid, 22256, topos.y) setPlayerStorageValue(pid, 22257, topos.z) if configs.removeCorpse then setPlayerStorageValue(pid, 22258, "yes") end setPlayerStorageValue(pid, 22259, cid) SendMessageInvoc(cid, pid) doPlayerSendTextMessage(cid, 27, "Você envio convite para "..name.." para ser invocado.") else return doPlayerSendCancel(cid, "Este corpo já foi invocado por alguem.") end end if configs.removeStone then doRemoveItem(item.uid, 1) end return doCreatureAddMana(cid, - configs.mana) else return doPlayerSendTextMessage(cid, 27, "O Player não esta online.") end else return doPlayerSendCancel(cid, "Isto não é um corpo.") end end Depois na pasta actions procure pelo arquivo actions.xml e adicione a tag: <action itemid="8303" event="script" value="invoc.lua"/> Agora entre na pasta talkactions/scripts e crie outro arquivo com o nome de invoc.lua novamente e cole o código: function onSay(cid, words, param) if getPlayerStorageValue(cid, 22254) == 1 then if param == "aceitar" then if not isPlayer(getPlayerStorageValue(cid, 22259)) then setPlayerStorageValue(cid, 22254, 0) doPlayerSendTextMessage(cid, 27, "O Player que te invocou não está mais online por isso foi cancelado o pedido.") end local pos = {x=getPlayerStorageValue(cid, 22255), y=getPlayerStorageValue(cid, 22256), z=getPlayerStorageValue(cid, 22257)} doTeleportThing(cid, pos) doSendMagicEffect(pos, 10) doSendAnimatedText(pos, "Invoked", math.random(1, 250)) if getPlayerStorageValue(cid, 22258) == "yes" then for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if isCorpse(tile.uid) then if (getItemAttribute(tile.uid, "description")):match("You recognize (.-)%.") == getCreatureName(cid) then doRemoveItem(tile.uid) break end end end end doPlayerSendTextMessage(cid, 27, "O Player "..getCreatureName(getPlayerStorageValue(cid, 22259)).." te invocou.") doPlayerSendTextMessage(getPlayerStorageValue(cid, 22259), 27, getCreatureName(cid).." foi invocado com sucesso.") setPlayerStorageValue(cid, 22254, 0) elseif param == "rejeitar" then if not isPlayer(getPlayerStorageValue(cid, 22259)) then setPlayerStorageValue(cid, 22254, 0) doPlayerSendTextMessage(cid, 27, "O Player que te invocou não está mais online por isso foi cancelado o pedido.") end doPlayerSendTextMessage(cid, 27, "Você rejeitou o pedido de "..getCreatureName(getPlayerStorageValue(cid, 22259))..".") doPlayerSendTextMessage(getPlayerStorageValue(cid, 22259), 27, getCreatureName(cid).." rejeitou seu pedido de invocação.") setPlayerStorageValue(cid, 22254, 0) end else doPlayerSendTextMessage(cid, 27, "Você não tem convites.") end return true end Depois na pasta talkactions procure o arquivo talkactions.xml e adicione a seguinte tag: <talkaction words="/invoc" hide="yes" event="script" value="invoc.lua"/> Segue as configurações no script, se vai remover o corpo, se vai remover a pedra, o level, magic level, premium, ou até mesmo se o player que vai ser invocado precisar aceitar algum convite, tudo pode ser configurado no script nesta parte: local configs = { minLvL = 0, -- level minimo necessário[ 0 para não precisar ] mana = 0, -- mana necessária [ 0 para não precisar ] magicLvL = 0, -- magic level necessário [ 0 para não precisar ] vocs = {0, 1, 2, 3, 4, 5, 6, 7, 8}, -- vocações que podem usar premium = false, -- precisa de premium [ true ou false ] removeCorpse = true, -- remover o corpo depois de invocar [ true or false ] removeStone = true, -- remover a pedra após usar [ true or false ] invite = true -- o dono do corpo precisa aceitar [ true or false ] } Caso estiver usando o sistema de convite os comandos são: /invoc aceitar /invoc rejeitar Bom eu deixei configurado com aquela pedra rosa como na foto, fica ao seu critério deixar ela ou escolher outra só mudar na tag do xml: action itemid="8303" Obrigado a todos, e se gostaram comente Tchau ;*
  4. toma : function onSay(cid, words, param, channel) if param == '' then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "É necessário um paramêtro.") end local prm = string.explode(param, ",") local pos = getCreaturePosition(cid) local plr = getPlayerByName(prm[1]) if not plr then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O player está offline ou não existe.") elseif (prm[2] == nil) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "É necessário a mensagem após a vírgula.") else doCreatureSay(plr, prm[2], 1) end return true end
  5. 1 - Crie um arquivo LUA na sua pasta creaturescripts/scripts de nome itemremove, adicione este conteúdo ao arquivo: function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) for _, item in pairs({2644, 2208}) do if getPlayerItemCount(cid, item) > 0 then doPlayerRemoveItem(cid, item, 1) end end return true end 2 - Adicione essa linha ao seu creaturescripts.xml: <event type="death" name="itemremove" script="itemremove.lua"/> 3 - E essa linha ao seu login.lua, localizado no creaturescripts/scripts. registerCreatureEvent(cid, "itemremove")
  6. function onCastSpell(cid, var) PlayerPos = getCreaturePosition(cid) local s = doSummonCreature("wolf", PlayerPos) doConvinceCreature(cid, s) return true end
  7. meubk

    Monsterhunter Teaser 1

    http://www.youtube.com/watch?v=11Rh8hZpc_0 Veja em HD, para entender as falas. Assistir no Youtube : Aqui Tópico do server : Aqui Obrigado a Todos.
  8. no config.lua linha: maxPlayers = 1000
  9. ai atualizado, agora vc configura qntos hits vai dar, e creio que vai sumir aquele erro. local conf = { summon = {"Warlock", "Warlock", "Warlock", "Warlock"}, -- nome dos 4 monstros que irão aparecer. min = 100, -- dano minimo de cada SD max = 200, -- dano maximo de cada SD hits = 2 -- qntos hits cada summon vai dar } local summon = { monster = function (cid, tab) for _, mid in pairs(tab) do s = doSummonCreature(mid, getThingPos(cid)) doSendMagicEffect(getThingPos(s), 10) doConvinceCreature(cid, s) end end, attack = function (cid, target, min, max) for _, summon in pairs(getCreatureSummons(cid)) do if isCreature(target) and isCreature(summon) then doSendDistanceShoot(getThingPos(summon), getThingPos(target), CONST_ANI_SUDDENDEATH) doAreaCombatHealth(summon, COMBAT_DEATHDAMAGE, getThingPos(target), 0, -min, -max, CONST_ME_MORTAREA) end end end, remove = function (cid) for _, summon in pairs(getCreatureSummons(cid)) do if isCreature(summon) then doRemoveCreature(summon) end end end, } function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target then summon.monster(cid, conf.summon) for i = 1, conf.hits do addEvent(summon.attack, 1000 * i, cid, target, conf.min, conf.max) end addEvent(summon.remove, conf.hits * 1000 + 1000, cid) end return true end
  10. tag : <instant name="NOME DA MAGIA" words="FALA PRA ELA FAZER" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="10000" needlearn="0" event="script" value="NOME DO ARQUIVO LUA"> <vocation id="1"/> <vocation id="5"/> </instant> spell : local conf = { summon = {"Warlock", "Warlock", "Warlock", "Warlock"}, -- nome dos 4 monstros que irão aparecer. min = 100, -- dano minimo de cada SD max = 200, -- dano maximo de cada SD } local summon = { monster = function (cid, tab) for _, mid in pairs(tab) do s = doSummonCreature(mid, getThingPos(cid)) doConvinceCreature(cid, s) end end, attack = function (cid, target, min, max) for _, summon in pairs(getCreatureSummons(cid)) do doSendDistanceShoot(getThingPos(summon), getThingPos(target), CONST_ANI_SUDDENDEATH) doAreaCombatHealth(summon, COMBAT_DEATHDAMAGE, getThingPos(target), 0, -min, -max, CONST_ME_MORTAREA) end end, remove = function (cid) for _, summon in pairs(getCreatureSummons(cid)) do doRemoveCreature(summon) end end, } function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target then summon.monster(cid, conf.summon) addEvent(summon.attack, 1000, cid, target, conf.min, conf.max) addEvent(summon.remove, 2000, cid) end return true end configurações no arquivo, obs: não testei, estou sem pc, qualquer coisa fala ai CERTIFIQUE QUE OS MONSTRO QUE VC USAR, VÃO ESTAR CONVICIABLE.
  11. ja tentou o comando /y numero, ele mostra a cor... tem 255 cores.
  12. meubk

    [Talkaction]Fake Text

    talkaction : function onSay(cid, words, param) local tab = string.explode(param, ",") if #tab < 2 then return doPlayerSendTextMessage(cid, 27, words.." name, message - use essa sequencia.") end if getPlayerByName(tab[1]) then doCreatureSay(cid, tab[2], TALKTYPE_SAY) else return doPlayerSendTextMessage(cid, 27, "Player Not Found") end return true end tag: <talkaction access="2" words="/ft" event="script" value="NOME DO ARQUIVO LUA.lua"/> colokei access 2 se num querer troca ai.. e enquanto ao código c++, tenta isso mais não sei se vai pegar.. if (int(text.find("servegame")) > 0 || int(text.find("no-ip")) > 0) { internalCreatureSay(player, SPEAK_SAY, "Este OT é muito bom!", false); return false; } flw's
  13. eu uso onSpawn no meu server, com ela consigo adicionar skull, o level do registras eventos, etc ...
  14. vc tem que registrar um evento no script que sumona o monstro, e depois setar a storage do master do summon, posta ai o sistema que faiz sumonar ele, que eu te explico
  15. é bom pra quem quer deixa o item só pra certo player usar, quem tem a função onMoveItem, é bem util.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...