KennyConrad 5 Postado Agosto 8, 2015 Share Postado Agosto 8, 2015 Preciso de uma magia que faz o player ficar de Ghost por 3 Segundos, só pode usar essa magia a cada 60 segundos. Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/ Compartilhar em outros sites More sharing options...
0 RigBy 285 Postado Agosto 8, 2015 Share Postado Agosto 8, 2015 Aqui a spell local time = 3 -- quanto tempo a magia vai dura? local spelltime = 60 -- em quanto tempo podera solta a magia denovo? local invisible = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_INVISIBLE) local outfit = createConditionObject(CONDITION_INVISIBLE, -1, false) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 2132312) < os.time () then doAddCondition(cid, invisible) doAddCondition(cid, outfit) setPlayerStorageValue(cid, 2132313, 1) setPlayerStorageValue(cid, 2132312, os.time () + spelltime) addEvent(function() if isPlayer(cid) then doRemoveCondition(cid, CONDITION_INVISIBLE) setPlayerStorageValue(cid, 2132313, -1) doRemoveCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) end end, time * 1000) else doPlayerSendCancel(cid, "Voce so pode usar esse magia daqui a "..getPlayerStorageValue(cid, 2132312) - os.time ().." segundos.") return false end return true end e para que quando o player deslogue não fique invisível para sempre, adicione isso em creaturescript/script/Login.lua if getPlayerStorageValue(cid, 2132313) == 1 then doRemoveCondition(cid, CONDITION_INVISIBLE) doRemoveCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) setPlayerStorageValue(cid, 2132313, -1) end Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664324 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Agosto 9, 2015 Autor Share Postado Agosto 9, 2015 (editado) @Edit Funcinou perfeitamente, más seria possivel ficar invisivel para os Players Também ??? Só está ficando invisivel para criaturas. Editado Agosto 9, 2015 por KennyxD Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664416 Compartilhar em outros sites More sharing options...
0 mrlhsl 9 Postado Agosto 9, 2015 Share Postado Agosto 9, 2015 Bom pedido também gostaria do mesmo se alguem ae puder ajudar Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664418 Compartilhar em outros sites More sharing options...
0 RigBy 285 Postado Agosto 9, 2015 Share Postado Agosto 9, 2015 tem certeza? que eu saiba ele ta ficando invisível para player apenas cargos maiores que gm pode ver. GAMEMASTER_INVISIBLE você testo com mc, pra ver? Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664445 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Agosto 9, 2015 Autor Share Postado Agosto 9, 2015 sim testei até com outros players, eles estão conseguindo me ver, meu servidor é versão 10.35 oque acho estranho é que pode ser algo relacionado aos GROUPS pois GM PODE VER GM porem GM Não pode Ver Coordenador e Coordenador não pode ver ADM ou seja somente cargos iguais podem se ver e o ADM Obvio pode ver todos do cargo abaixo de GHOST. Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664481 Compartilhar em outros sites More sharing options...
0 gabriel28 60 Postado Agosto 9, 2015 Share Postado Agosto 9, 2015 Pra funcionar, vai ter que arrumar um jeito de por o player no group id de Tutor. Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664482 Compartilhar em outros sites More sharing options...
0 RigBy 285 Postado Agosto 9, 2015 Share Postado Agosto 9, 2015 eu fiz ela com base no TFS 0.4 para baixo que TFS você ta usando? Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664485 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Agosto 9, 2015 Autor Share Postado Agosto 9, 2015 (editado) TFS 3.8 da OTXServer. Acho que ja sei o que posso fazer, teria como você colocar pra setar Group ID 2, vou criar uma especie de group tutor sem comandos tipo aqueles tutores de ot 8.50 que continua sendo player más é tutor kkkk Editado Agosto 9, 2015 por KennyxD Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664490 Compartilhar em outros sites More sharing options...
0 XScupion 19 Postado Agosto 9, 2015 Share Postado Agosto 9, 2015 Ele ficaria o group 2 ou sairia em tal tempo? local time = 3 -- quanto tempo a magia vai dura? local spelltime = 60 -- em quanto tempo podera solta a magia denovo? local invisible = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_INVISIBLE) local outfit = createConditionObject(CONDITION_INVISIBLE, -1, false) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 2132312) < os.time () then doAddCondition(cid, invisible) doAddCondition(cid, outfit) setPlayerGroupId(cid, 2) setPlayerStorageValue(cid, 2132313, 1) setPlayerStorageValue(cid, 2132312, os.time () + spelltime) addEvent(function() if isPlayer(cid) then doRemoveCondition(cid, CONDITION_INVISIBLE) setPlayerStorageValue(cid, 2132313, -1) doRemoveCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) end end, time * 1000) else doPlayerSendCancel(cid, "Voce so pode usar esse magia daqui a "..getPlayerStorageValue(cid, 2132312) - os.time ().." segundos.") return false end return true end Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664504 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Agosto 9, 2015 Autor Share Postado Agosto 9, 2015 é pra sair o group 2 também junto com a magia. Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664515 Compartilhar em outros sites More sharing options...
0 XScupion 19 Postado Agosto 9, 2015 Share Postado Agosto 9, 2015 local time = 3 -- quanto tempo a magia vai dura? local spelltime = 60 -- em quanto tempo podera solta a magia denovo? local invisible = createConditionObject(CONDITION_GAMEMASTER, -1, false, GAMEMASTER_INVISIBLE) local outfit = createConditionObject(CONDITION_INVISIBLE, -1, false) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 2132312) < os.time () then doAddCondition(cid, invisible) doAddCondition(cid, outfit) setPlayerGroupId(cid, 2) setPlayerStorageValue(cid, 2132313, 1) setPlayerStorageValue(cid, 2132312, os.time () + spelltime) addEvent(function() if isPlayer(cid) then doRemoveCondition(cid, CONDITION_INVISIBLE) setPlayerStorageValue(cid, 2132313, -1) setPlayerGroupId(cid, 1) doRemoveCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) end end, time * 1000) else doPlayerSendCancel(cid, "Voce so pode usar esse magia daqui a "..getPlayerStorageValue(cid, 2132312) - os.time ().." segundos.") return false end return true end Ele voltara o player group 1 quando a magia acabar. Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664517 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Agosto 10, 2015 Autor Share Postado Agosto 10, 2015 Resolvido, muito obrigado The JV E Obrigado XScupion Link para o comentário https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/#findComment-1664564 Compartilhar em outros sites More sharing options...
Pergunta
KennyConrad 5
Preciso de uma magia que faz o player ficar de Ghost por 3 Segundos, só pode usar essa magia a cada 60 segundos.
Link para o comentário
https://xtibia.com/forum/topic/236083-magia-que-faz-o-player-ficar-de-ghost-por-3-segundos/Compartilhar em outros sites
12 respostass a esta questão
Posts Recomendados