Muito bom...Continue postando mais sistemas assim ![]()
- Fórum
- OTServ
- Recursos
- Scripting
- Mods, funções e outros
- Cast [TV] System 1.0
Cast [TV] System 1.0
Por Roksas, 27 de jun. de 2013 em Mods, funções e outros
info
Grupo: Barão
Registrado: 23/12/10
Posts: 211
Reputação: +35

info
Grupo: Visconde
Registrado: 12/06/10
Posts: 408
Reputação: +39
Char no Tibia: Nakamura

Parabéns Roksas, vai ajudar muita gente mesmo véi.
reputado ![]()
Muito Bom, arrumo aquele negocio do exit quando o player da cast no outro por exemplo. estou numa hunt com o cast ligado alguem da cast em min, quando da !cast exit eles teleporta no player?
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Sim, está teleportando para o templo ^^
info
Grupo: Visconde
Registrado: 19/12/12
Posts: 465
Reputação: +111

O verdadeiro cast system e na hora de logar e aparece a lista dos jogadores e etc... isso ta parecendo mais um spectator que cast system mais esta Genial Bom demais o sistema parabens
Editado Junho 27 por Nextbr
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Creio que não EXISTA um 'verdadeiro', cada um cada um. Oo
Mas tudo bem, rsrs, obrigado cara
Muito bom, só que quando coloquei o script nas minhas magias de healing, elas pararam de funcionar, da para usar a magia mais ela não heala. Tens solução?
info
Grupo: Campones
Registrado: 03/01/09
Posts: 50
Reputação: +2
Char no Tibia: cleber de pira

Olá.. Estou com o mesmo problema do amigo a cima!! Todas as magias de healing.. pararam de funcionar!! Gostaria de ajuda pois realmente o sistema é fantastico.. mais sem magias de healing não rola rs Obrigado!!Rep+
Eu retirei esse sistema, totalmente inútil, com esse bug das magias, ainda vai achar mais amigo Pedreroxx, como o dono do tópico diz, é uma réplica, tá certo, ficou ótimo o sistema, mais precisa arrumar ainda várias coisas.
Vou falar só uma falha, só uma, contém várias.
O player que estiver no final de uma quest (aonde fica o báu), ele pode ativar o /cast on, e outro jogador ir até ele /cast NickDeQuemEstaNaFinalQuest , e o jogador "telespectador" também pode dar use no baú e pegar o prémio, não importa o level, etc, ele também pega o prémio.
Fora essas 2 grandes falhas que achei neste sistema, contém outras, nem vou comentar.
Minha opnião é, não vale apena usar esse sistema até quando arrumarem tudo.
Grande abraços.
info
Grupo: Campones
Registrado: 03/01/09
Posts: 50
Reputação: +2
Char no Tibia: cleber de pira

OMG!!! Que falha cara... Obrigado Por Avisar!! Precisar estamos a disposição Spikex!
info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem

Bugadissimo, nao compensa utilizar
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

No treco das quests.. é só colocar pra checar a storage de estar assistindo o cast... e já era ![]()
Ex:
if getPlayerStorageValue(cid, 42361) ~= 1 and getPlayerStorageValue(cid, 12269) <= 0 then
recebe a quest
else
voce está assistindo ao cast :3
end
# TOPIC REP + MANO ![]()
Editado Julho 27 por Cleberadm
info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem

No treco das quests.. é só colocar pra checar a storage de estar assistindo o cast... e já era
Ex:
if getPlayerStorageValue(cid, 42361) ~= 1 and getPlayerStorageValue(cid, 12269) <= 0 then
recebe a quest
else
voce está assistindo ao cast :3
end
# TOPIC REP + MANO
Nao fica muito pratico fazer isso em todas as quests...
E tambem quem esta assistindo pode mover os itens que estao por perto e tambem ficar falando.
O script eh otimo, nao posso negar, mas preciso arrumar os bugs antes de usar...








info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino
Cast System 1.0
Como vãao galera? Há quanto tempo não? Hoje eu vim trazer para vocês um sisteminha bem simples e legal, aonde você pode assistir os outros jogadores e vice-versa.
Versão testada: TFS 8.6 0.4 and TFS 0.3.6 8.6
Comandos utilizados in-game:
Instalação
Vá em data/talkactions/scripts crie um arquivo chamado castSys.lua e adicione o seguinte código dentro do mesmo:
--[[ Perfect Cast System 1.0 by Roksas Acesse ja XTibia.com =) ]]-- function onSay(cid, words, param) local player = getPlayerByName(param) if not isInArray({"list", "exit", "off", "on"}, param) and not param or param == "" then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "Enter the name of the player, which you want to cast in parameters.") return true end if param == "on" then if getPlayerStorageValue(cid, 10359) >= 1 then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "Your Cast System is already running ONLINE!") return true end castOn(cid) doSendMagicEffect(getThingPos(cid), 39) doPlayerSendTextMessage(cid, 20, "You have activated your Cast System, now others can cast you, to disable this feature, use the parameter '!cast off'.") return true end if param == "off" then if getPlayerStorageValue(cid, 10359) < 1 then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "Your Cast System is already OFFLINE!") return true end castOff(cid) doSendMagicEffect(getThingPos(cid), 39) doPlayerSendTextMessage(cid, 20, "You have disabled your Cast System, from now on no one can watch you, unless you turn on the Cast, using the parameter '!cast on'.") return true end if param == "exit" then if getPlayerStorageValue(cid, 12269) < 1 then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "You no are casting players.") return true end cancelCast(cid) doSendMagicEffect(getThingPos(cid), 39) doPlayerSendTextMessage(cid, 20, "You stopped casting, use the parameter '!cast list' to see who can be casted.") return true end if param == "list" then if #whoCasted() < 1 then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "At this time, no player can be casted, try again later.") return true end doPlayerSendTextMessage(cid, 20, "Players can be casteds:\n\n") for k, v in ipairs(whoCasted()) do doPlayerSendTextMessage(cid, 20, " - "..getCreatureName(v).."") end return true end if not isPlayer(player) then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "This player is offline or does not exist. Use the parameter '!cast list' to see who can be casted.") return true end if getPlayerStorageValue(player, 10359) < 1 then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "You can only cast one person with the Cast System is activated, use the parameter '!cast list' to see who can be assisted.") return true end if getPlayerStorageValue(cid, 10359) >= 1 then doSendMagicEffect(getThingPos(cid), 2) doPlayerSendTextMessage(cid, 20, "To cast a player, you must first disable your Cast System using the parameter '!cast off'.") return true end if not getTileInfo(getThingPos(cid)).protection then return doPlayerSendTextMessage(cid, 20, "You need enter in Protection Zone to use the Cast System.") and true end setPlayerStorageValue(cid, 12269, 1) castPlayer(cid, player) doSendMagicEffect(getThingPos(cid), 39) doPlayerSendTextMessage(cid, 20, "You are casting the player "..getCreatureName(player)..", to exit just use the command '!cast exit'.") doPlayerSendTextMessage(player, 20, "You are casted by "..getCreatureName(cid).." player to disable your Cast, simply use the parameter '!cast off'.") return true end function cancelCast(uid) mayNotMove(uid, false) doCreatureSetHideHealth(uid, false) setPlayerStorageValue(uid, 12269, -1) doRemoveCondition(uid, CONDITION_OUTFIT) return doTeleportThing(uid, getTownTemplePosition(getPlayerTown(uid))) or doTeleportThing(uid, getPlayerMasterPos(uid)) and true end function castOn(uid) return setPlayerStorageValue(uid, 10359, 1) and true end function castOff(uid) return setPlayerStorageValue(uid, 10359, -1) and true end function castPlayer(uid, player) if not isPlayer(player) then cancelCast(uid) return true end if getPlayerStorageValue(player, 10359) < 1 then cancelCast(uid) return true end if getPlayerStorageValue(uid, 12269) < 1 then cancelCast(uid) return true end mayNotMove(uid, true) doSetItemOutfit(uid, 1934, -1) doCreatureSetHideHealth(uid, true) doTeleportThing(uid, getThingPos(player)) return addEvent(castPlayer, 1 * 1000, uid, player) and true end function whoCasted() local casteds = {} for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 10359) >= 1 then table.insert(casteds, pid) end end return #casteds > 0 and casteds or {} endVolte uma pasta (data/talkaction) abra com algum editor de texto o arquivo talkactions.xml e adicione essa tag em qualquer lugar:
Muito bem, após isso siga para a pasta data/creaturescripts/scripts, faça o mesmo, crie um arquivo chamado castSys.lua e adicione isso dentro:
function onLogout(cid) if getPlayerStorageValue(cid, 12269) > 0 then doPlayerSendCancel(cid, "To logout, you need to exit the Cast System first. Use the parameter '!cast exit'.") return false end setPlayerStorageValue(cid, 10359, -1) return true end function onStatsChange(cid, attacker, type, combat, value) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 12269) >= 1 and isMonster(attacker) or isPlayer(attacker) then return false end return true end function onAttack(cid, target) if not isPlayer(cid) or not isPlayer(target) then return true end if getPlayerStorageValue(cid, 12269) > 0 then doRemoveCondition(cid, CONDITION_INFIGHT) return false end return true endJá no arquivo creaturescripts.xml, você vai adicionar essa tag:
E no arquivo login.lua você vai adicionar essas 3 linhas:
Para que o player que está assitindo ao outro não use magias enquanto está assistindo, coloque essas linhas abaixo dentro de cada script das magias, debaixo da linha:
Coloque:
if getPlayerStorageValue(cid, 12269) >= 1 then return doPlayerSendCancel(cid, "You is casting, not is possible.") and false endFaça a mesma coisa com as quests, embaixo de:
Prontinho galera, basta reiniciar o servidor e usar, é isto por hoje, espero que tenham gostado, ideias/sugestões para futuras versões, bugs ou críticas sobre o sistema, basta deixar um simples comentário aí no tópico, estarei aqui para atendê-los.
Obrigado pela atenção, façam bom uso.
Editado Abril 8 por CyberBot