Postado Outubro 15, 2017 7 anos Pessoal estou com um bug! estou tentando utilizar um script de top fraggers, ele consiste em adicionar uma table no players chamada frags_all, e cada vez que o personagem mata um outro player ele adiciona +1 na contagem... porém o bug é o seguinte, ele não está registando esse +1!!!!!!! USO TFS 1.3 Ajudem por favor! creaturescripts/creaturescripts.xml <event type="kill" name="TopFrags" event="script" value="topfrags.lua" /> <event type="login" name="RTopFrags" event="script" value="topfrags.lua" /> creaturescripts/scripts/topfrags.lua local skulls = {SKULL_WHITE, SKULL_YELLOW, SKULL_RED, SKULL_BLACK} function addPlayerFrag(cid, value) db.executeQuery("UPDATE `players` SET `frags_all` = `frags_all` + " .. value .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";") return true end function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then for i= 1, #skulls do if getPlayerSkullType(target) == skulls[i] then addPlayerFrag(cid, 1) break end end end return true end function onLogin(cid) registerCreatureEvent(cid, "TopFrags") return true end ME AJUDEM! Editado Outubro 15, 2017 7 anos por markzenho23 (veja o histórico de edições)
Postado Outubro 15, 2017 7 anos Tenta assim Spoiler local skulls = {SKULL_WHITE, SKULL_YELLOW, SKULL_RED, SKULL_BLACK} function addPlayerFrag(cid, value) db.Query("UPDATE `players` SET `frags_all` = `frags_all` + " .. value .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";") return true end function onKill(cid, target) if isPlayer(cid) and isPlayer(target) then for i= 1, #skulls do if getPlayerSkullType(target) == skulls then addPlayerFrag(cid, 1) break end end end return true end function onLogin(cid) registerCreatureEvent(cid, "TopFrags") return true end Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Fevereiro 9, 2018 7 anos mas esse script não é para 0.3;04. ? não funciona no tfs 1.x http://baiakuza.com/IP: baiakuza.com TIBIA: 10.96 Baiak Custom [ High Exp Rate ]
Postado Fevereiro 9, 2018 7 anos 10 minutos atrás, Skydangerous disse: mas esse script não é para 0.3;04. ? não funciona no tfs 1.x Tem um arquivo chamado compat.lua nos tfs 1x que tem essas funções. Te ajudei ?? Que tal fazer uma contribuição ?
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.