Postado Fevereiro 20, 2015 10 anos Como assim talkaction? isso é um creaturevents. Te ajudei? Se você achar que eu mereço, me dê uma "rep+" e selecione meu post como "melhor resposta" Skype: JoadsonAion
Postado Fevereiro 20, 2015 10 anos Nn tem como tipo, tirar essa coisa q eh forever e criar uma talkaction q inicia o evento e para o evento? Obs.: o evento eh ficar matando os players e ganhar exp, ou seja, uma talkaction q ativa e desativa o exp por matar players GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Fevereiro 20, 2015 10 anos Substitua seu creaturescript por este: function onDeath(cid, corpse, deathList) local config = { exp = math.random(300000, 900000), killer_name = getCreatureName(deathList[1]), target_name = getCreatureName(cid) } --if getPlayerIp(cid) == getPlayerIp(deathList[1]) then return true end --se nao for testar em casa remova os 2 sinais(de menos) no começo do script. essa função é para evitar que alguem use MC para ganhar exp; if getGlobalStorageValue(9571) > -1 then if isPlayer(deathList[1]) then doPlayerSendTextMessage(deathList[1], MESSAGE_INFO_DESCR, "Você recebeu ".. config.exp .. ", de EXP por matar o ".. config.target_name ..".") doPlayerAddExp(deathList[1], config.exp) end end return true end Código da talkaction: function onSay(cid, words) if getGlobalStorageValue(9571) > -1 then setGlobalStorageValue(9571, -1) broadcastMessage("Experience on kill desactivated.") else setGlobalStorageValue(9571, 1) broadcastMessage("Experience on kill activated.") end return true end Editado Fevereiro 20, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Fevereiro 21, 2015 10 anos Substitua seu creaturescript por este: function onDeath(cid, corpse, deathList) local config = { exp = math.random(300000, 900000), killer_name = getCreatureName(deathList[1]), target_name = getCreatureName(cid) } --if getPlayerIp(cid) == getPlayerIp(deathList[1]) then return true end --se nao for testar em casa remova os 2 sinais(de menos) no começo do script. essa função é para evitar que alguem use MC para ganhar exp; if getGlobalStorageValue(9571) > -1 then if isPlayer(deathList[1]) then doPlayerSendTextMessage(deathList[1], MESSAGE_INFO_DESCR, "Você recebeu ".. config.exp .. ", de EXP por matar o ".. config.target_name ..".") doPlayerAddExp(deathList[1], config.exp) end end return true end Código da talkaction: function onSay(cid, words) if getGlobalStorageValue(9571) > -1 then setGlobalStorageValue(9571, -1) broadcastMessage("Experience on kill desactivated.") else setGlobalStorageValue(9571, 1) broadcastMessage("Experience on kill activated.") end return true end Eu tenho que deixar aquela tag no login.lua ainda? e deixa também a tag no creaturescripts.xml ???? GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Postado Fevereiro 21, 2015 10 anos Sim. não respondo pms solicitando suporte em programação/scripting
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.