Ir para conteúdo
  • Cadastre-se

Normal [DUVIDA] Removedor de frag tirando PK


Posts Recomendados

Olá galera do TK, venho novamente pedir auxilio com o script do meu Removedor de Frag, acontece o seguinte, ele está funcionando perfeitamente, porém, está dando um efeito que n gostaria que acontecesse... Se o player estiver pk e usar o "removedor de frag" o PK SOME... Isso está servindo pra fugir depois de pegar injust, e não está nada legal.

 

Se alguem souber como fazer para esse meu script só poder ser usado na PZ ou NÃO REMOVER O PK Estaria resolvendo meu problema, Grato desde já.

 

Segue o script 

 

Spoiler

-- [( Script created by Matheus for TibiaKing.com )] --
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if isInArray(rskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

 

Se não puder ajudar, de um UP <3

Link para o post
Compartilhar em outros sites
-- [( Script created by Matheus for TibiaKing.com )] --
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if isInArray(rskulls, getPlayerSkullType(cid)) and (isPlayerPzLocked(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

tenta ae, não testei.

se der algum erro, avisa que eu refaço.

Editado por janmix (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
5 minutos atrás, janmix disse:

-- [( Script created by Matheus for TibiaKing.com )] --
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if isInArray(rskulls, getPlayerSkullType(cid)) and (not isPlayerPzLocked(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

tenta ae, não testei.

se der algum erro, avisa que eu refaço.

Kra eu copiei seu script.. e vc n mudou nada do meu hUAHEUaheuAHEUHe N sei se vc upou o script errado AUEHuaehuaeh mas ainda tira o pk euhuehe

Link para o post
Compartilhar em outros sites
3 minutos atrás, lucaspds disse:

Kra eu copiei seu script.. e vc n mudou nada do meu hUAHEUaheuAHEUHe N sei se vc upou o script errado AUEHuaehuaeh mas ainda tira o pk euhuehe

eu editei o script pega lá de novo eu coloquei a função errada, depois que parei pra ler o código, testa se vai funcionar agora.

 

EDIT: caso não funcione, eu vou crio o script pra você, em vez de editar.

Editado por janmix (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
2 minutos atrás, janmix disse:

eu editei o script pega lá de novo eu coloquei a função errada, depois que parei pra ler o código, testa se vai funcionar agora.

Não adiantou, ainda tira o pk uehuehue

Link para o post
Compartilhar em outros sites

Olá Galera ... Seu Servidor do Abrir pasta do data/npc/

Sua Criar removedorfrags .xml script do npc

<?xml version="1.0"?>
<npc name="Removedor de Frags" script="data/npc/scripts/skullremover.lua" walkinterval="5000" floorchange="0">
<health now="100" max="100"/>
<look type="458" head="78" body="88" legs="0" feet="88" addons="3"/>
<parameters>
<parameter key="message_greet" value="iaew |PLAYERNAME|. Eu posso {remover} seus Frags ou Red Skull, Se quiser diga {remover} seu fila da puta." />
</parameters>
</npc>

 

___________________________________________________________________________


Pasta do Data/npc/scripts
Criar skullremover.lua

 

Script

local keywordHandler = KeywordHandler:new() 
local npcHandler = NpcHandler:new(keywordHandler) 
NpcSystem.parseParameters(npcHandler) 
local talkState = {} 

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end 
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end 
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end 
function onThink() npcHandler:onThink() end 

function creatureSayCallback(cid, type, msg) 
if(not npcHandler:isFocused(cid)) then 
return false 
end 

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid 


local S = { 
        [3] = 100000, -- white skull preço
        [4] = 500000, -- red skull preço
        [5] = 1000000 -- black skull preço
}
local battle_price = 10000 -- battle preço

if(msgcontains(msg, 'remover') or msgcontains(msg, 'REMOVER')) then 
selfSay('E ai oque vai ser? Remover {skulls} e o battle ou quer retirar só {battle}?', cid) 
talkState[talkUser] = 1 
elseif msgcontains(msg, 'skulls') and talkState[talkUser] == 1 then
if not S[getCreatureSkullType(cid)] then
selfSay('Você não está com nenhuma skull!', cid)
talkState[talkUser] = 0 
else
selfSay('Você quer remover sua skull por '..S[getCreatureSkullType(cid)]..' gps? {yes}', cid) 
talkState[talkUser] = 2
end
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then 
if doPlayerRemoveMoney(cid, S[getCreatureSkullType(cid)]) == TRUE then
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") 
doCreatureSetSkullType(cid, 0)
if getCreatureCondition(cid, CONDITION_INFIGHT) ~= FALSE then 
doRemoveCondition(cid, CONDITION_INFIGHT)
end
selfSay('Pronto meu caro,seus males foram removidos!', cid)
talkState[talkUser] = 0 
else
selfSay('Você não tem '..S[getCreatureSkullType(cid)]..' gps suficientes!', cid)
talkState[talkUser] = 0 
end
elseif msgcontains(msg, 'battle') and talkState[talkUser] == 1 then
selfSay('Você quer remover seu battle por '.. battle_price ..' gps? {yes}', cid) 
talkState[talkUser] = 3
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then
if getCreatureCondition(cid, CONDITION_INFIGHT) ~= FALSE then 
if doPlayerRemoveMoney(cid, battle_price) == TRUE then
doRemoveCondition(cid, CONDITION_INFIGHT)
selfSay('Pronto meu caro,seu battle foi removido!', cid)
talkState[talkUser] = 0
else
selfSay('Você não tem  '.. battle_price ..' gps suficientes!', cid)
talkState[talkUser] = 0
end
else
selfSay('Você não está com battle!', cid)
talkState[talkUser] = 0
end
elseif msg == "no" and talkState[talkUser] >= 1 then 
selfSay("Then not", cid) 
talkState[talkUser] = 0 
npcHandler:releaseFocus(cid) 
end 
return TRUE 
end 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) 
npcHandler:addModule(FocusModule:new())

+REP BOM Ajudar 

 

 

Link para o post
Compartilhar em outros sites

Bom Assim REP +++

Agora, lucaspds disse:

Kra obrigado por tentar, mas preciso mesmo que seja no item, pois, será vendido pro alavancas o/

Nada Eu Tenho Testando Dias Sempre REP!

Link para o post
Compartilhar em outros sites
1 minuto atrás, AllanSilva disse:

Olá Galera ... Seu Servidor do Abrir pasta do data/npc/

Sua Criar removedorfrags .xml script do npc

<?xml version="1.0"?>
<npc name="Removedor de Frags" script="data/npc/scripts/skullremover.lua" walkinterval="5000" floorchange="0">
<health now="100" max="100"/>
<look type="458" head="78" body="88" legs="0" feet="88" addons="3"/>
<parameters>
<parameter key="message_greet" value="iaew |PLAYERNAME|. Eu posso {remover} seus Frags ou Red Skull, Se quiser diga {remover} seu fila da puta." />
</parameters>
</npc>

 

___________________________________________________________________________


Pasta do Data/npc/scripts
Criar skullremover.lua

 

Script

local keywordHandler = KeywordHandler:new() 
local npcHandler = NpcHandler:new(keywordHandler) 
NpcSystem.parseParameters(npcHandler) 
local talkState = {} 

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end 
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end 
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end 
function onThink() npcHandler:onThink() end 

function creatureSayCallback(cid, type, msg) 
if(not npcHandler:isFocused(cid)) then 
return false 
end 

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid 


local S = { 
        [3] = 100000, -- white skull preço
        [4] = 500000, -- red skull preço
        [5] = 1000000 -- black skull preço
}
local battle_price = 10000 -- battle preço

if(msgcontains(msg, 'remover') or msgcontains(msg, 'REMOVER')) then 
selfSay('E ai oque vai ser? Remover {skulls} e o battle ou quer retirar só {battle}?', cid) 
talkState[talkUser] = 1 
elseif msgcontains(msg, 'skulls') and talkState[talkUser] == 1 then
if not S[getCreatureSkullType(cid)] then
selfSay('Você não está com nenhuma skull!', cid)
talkState[talkUser] = 0 
else
selfSay('Você quer remover sua skull por '..S[getCreatureSkullType(cid)]..' gps? {yes}', cid) 
talkState[talkUser] = 2
end
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then 
if doPlayerRemoveMoney(cid, S[getCreatureSkullType(cid)]) == TRUE then
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") 
doCreatureSetSkullType(cid, 0)
if getCreatureCondition(cid, CONDITION_INFIGHT) ~= FALSE then 
doRemoveCondition(cid, CONDITION_INFIGHT)
end
selfSay('Pronto meu caro,seus males foram removidos!', cid)
talkState[talkUser] = 0 
else
selfSay('Você não tem '..S[getCreatureSkullType(cid)]..' gps suficientes!', cid)
talkState[talkUser] = 0 
end
elseif msgcontains(msg, 'battle') and talkState[talkUser] == 1 then
selfSay('Você quer remover seu battle por '.. battle_price ..' gps? {yes}', cid) 
talkState[talkUser] = 3
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then
if getCreatureCondition(cid, CONDITION_INFIGHT) ~= FALSE then 
if doPlayerRemoveMoney(cid, battle_price) == TRUE then
doRemoveCondition(cid, CONDITION_INFIGHT)
selfSay('Pronto meu caro,seu battle foi removido!', cid)
talkState[talkUser] = 0
else
selfSay('Você não tem  '.. battle_price ..' gps suficientes!', cid)
talkState[talkUser] = 0
end
else
selfSay('Você não está com battle!', cid)
talkState[talkUser] = 0
end
elseif msg == "no" and talkState[talkUser] >= 1 then 
selfSay("Then not", cid) 
talkState[talkUser] = 0 
npcHandler:releaseFocus(cid) 
end 
return TRUE 
end 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) 
npcHandler:addModule(FocusModule:new())

+REP BOM Ajudar 

 

 

Kra obrigado por tentar, mas preciso mesmo que seja no item, pois, será vendido pro alavancas o/

 

Link para o post
Compartilhar em outros sites

não testei, pois estou sem servidor no computador pra testar.

tenta ae:

function onUse(cid, item, frompos, item2, topos) 
        local noRemove = {SKULL_WHITE, SKULL_YELLOW}
        local playerSkull = getPlayerSkullType(cid)
		if (not isPlayerPzLocked(cid)) then
        if isInArray(noRemove, playerSkull) then
            doPlayerSendCancel(cid, "You don't remover your frags and skulls.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
            return true
        elseif playerSkull == SKULL_NONE then
            doPlayerSendCancel(cid, "You don't have skull.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
            return true
        else
            db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
            doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
            doSendMagicEffect(getPlayerPosition(cid), 26)
            doCreatureSetSkullType(cid,0)
            doPlayerSetSkullEnd(cid, 0, playerSkull)
            doRemoveItem(item.uid, 1)
        end
		end
        return true
		end

 

Link para o post
Compartilhar em outros sites
Agora, janmix disse:

não testei, pois estou sem servidor no computador pra testar.

tenta ae:

Sua é Igual Isso Servidor Tibia Não ! Só Narutibia e Dbo e Bleach

Link para o post
Compartilhar em outros sites
34 minutos atrás, janmix disse:

não testei, pois estou sem servidor no computador pra testar.

tenta ae:


function onUse(cid, item, frompos, item2, topos) 
        local noRemove = {SKULL_WHITE, SKULL_YELLOW}
        local playerSkull = getPlayerSkullType(cid)
		if (not isPlayerPzLocked(cid)) then
        if isInArray(noRemove, playerSkull) then
            doPlayerSendCancel(cid, "You don't remover your frags and skulls.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
            return true
        elseif playerSkull == SKULL_NONE then
            doPlayerSendCancel(cid, "You don't have skull.")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
            return true
        else
            db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
            doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
            doSendMagicEffect(getPlayerPosition(cid), 26)
            doCreatureSetSkullType(cid,0)
            doPlayerSetSkullEnd(cid, 0, playerSkull)
            doRemoveItem(item.uid, 1)
        end
		end
        return true
		end

 

Agora bugou foi tudo, uso pk ele n tira o PK, uso na pz ele n funciona, n funciona tbm fora da pz. kkkkk
BUGO LEGAL O ITEM

Link para o post
Compartilhar em outros sites
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if not getTilePzInfo(getCreaturePosition(cid)) then
return doPlayerSendCancel(cid, "You don't remover your frags and skulls outside the protected zone.")
end
if isInArray(rskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

TENTA AI, dessa vez eu testei. e não deu erro nenhum, fiz usando o seu script antigo.

se der certo rep+, se não der me fale o erro e eu tento corrigir.

Editado por janmix (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
6 horas atrás, lucaspds disse:

Olá galera do TK, venho novamente pedir auxilio com o script do meu Removedor de Frag, acontece o seguinte, ele está funcionando perfeitamente, porém, está dando um efeito que n gostaria que acontecesse... Se o player estiver pk e usar o "removedor de frag" o PK SOME... Isso está servindo pra fugir depois de pegar injust, e não está nada legal.

 

Se alguem souber como fazer para esse meu script só poder ser usado na PZ ou NÃO REMOVER O PK Estaria resolvendo meu problema, Grato desde já.

 

Segue o script 

 

  Ocultar conteúdo

-- [( Script created by Matheus for TibiaKing.com )] --
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if isInArray(rskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end

 

Se não puder ajudar, de um UP <3

tem como passar o script do pk? tem como fazer isso por storage

Link para o post
Compartilhar em outros sites

tenta assim 

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if not isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!")
        return true
    end

    player:setSkull(0)
    player:setSkullTime(0)
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!")
    Item(item.uid):remove(1)
    return true
end

Link para o post
Compartilhar em outros sites

@G3 Yuri

Isso é script de TFS 1.x e não 0.4

 

-- tópico.

Utilize esse script, ele não vai permitir que players utilizem o item se não estiver no proctetion zone, ou estiver PK..

 

function onUse(cid, item, fromPosition, item2, toPosisition)	
	if getPlayerSkullType(cid) == SKULL_WHITE or getTilePzInfo(getPlayerPosition(cid)) == true then
		doPlayerSendCancel(cid,"Sorry, not possible.")
		return false
	end
	
	local rskulls = {red = SKULL_RED, black = SKULL_BLACK}
	if isInArray(rskulls, getPlayerSkullType(cid)) then
		doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
		doSendMagicEffect(getPlayerPosition(cid), 2)
	else
		db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
		doCreatureSetSkullType(cid, 0)
		doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
		doSendMagicEffect(getPlayerPosition(cid), 26)
		doRemoveItem(item.uid, 1)
		return true
	end
end  

 

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

Link para o post
Compartilhar em outros sites
Em 13/03/2016 at 07:27, vankk disse:

@G3 Yuri

Isso é script de TFS 1.x e não 0.4

 

-- tópico.

Utilize esse script, ele não vai permitir que players utilizem o item se não estiver no proctetion zone, ou estiver PK..

 


function onUse(cid, item, fromPosition, item2, toPosisition)	
	if getPlayerSkullType(cid) == SKULL_WHITE or getTilePzInfo(getPlayerPosition(cid)) == true then
		doPlayerSendCancel(cid,"Sorry, not possible.")
		return false
	end
	
	local rskulls = {red = SKULL_RED, black = SKULL_BLACK}
	if isInArray(rskulls, getPlayerSkullType(cid)) then
		doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
		doSendMagicEffect(getPlayerPosition(cid), 2)
	else
		db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
		doCreatureSetSkullType(cid, 0)
		doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
		doSendMagicEffect(getPlayerPosition(cid), 26)
		doRemoveItem(item.uid, 1)
		return true
	end
end  

 

PERMITIU SIM, rs, Obrigado por tentar o/

Link para o post
Compartilhar em outros sites
function onUse(cid, item, fromPosition, item2, toPosisition)	
	if getPlayerSkullType(cid) == SKULL_WHITE or getTilePzInfo(getPlayerPosition(cid)) == true then
		doPlayerSendCancel(cid,"Sorry, not possible.")
		return true
	end
	
	local rskulls = {red = SKULL_RED, black = SKULL_BLACK}
	if isInArray(rskulls, getPlayerSkullType(cid)) then
		doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
		doSendMagicEffect(getPlayerPosition(cid), 2)
	else
		db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
		doCreatureSetSkullType(cid, 0)
		doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
		doSendMagicEffect(getPlayerPosition(cid), 26)
		doRemoveItem(item.uid, 1)
		return true
	end
end  

 

discord.pngDiscord: vankk #7765

Precisando de ajuda? Entre em contato comigo via Discord.

 

Muitos vêm seus muitos dias de glória, mas poucos vêm seus muitos dias de luta.

Link para o post
Compartilhar em outros sites
Em 13/03/2016 at 22:04, G3 Yuri disse:

tenta assim 

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    if not isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You can only remove red or black skulls!")
        return true
    end

    player:setSkull(0)
    player:setSkullTime(0)
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skull has been removed!")
    Item(item.uid):remove(1)
    return true
end

O seu script ta bugado, pois ao substituir pelo seu, o item parou de funcionar...

4 minutos atrás, vankk disse:

function onUse(cid, item, fromPosition, item2, toPosisition)	
	if getPlayerSkullType(cid) == SKULL_WHITE or getTilePzInfo(getPlayerPosition(cid)) == true then
		doPlayerSendCancel(cid,"Sorry, not possible.")
		return true
	end
	
	local rskulls = {red = SKULL_RED, black = SKULL_BLACK}
	if isInArray(rskulls, getPlayerSkullType(cid)) then
		doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
		doSendMagicEffect(getPlayerPosition(cid), 2)
	else
		db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
		doCreatureSetSkullType(cid, 0)
		doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
		doSendMagicEffect(getPlayerPosition(cid), 26)
		doRemoveItem(item.uid, 1)
		return true
	end
end  

 

Quase cara, vc ta quase lá, vamos lá q vc consegue hueheuheuhe Tipo agora está funcionando...Não dá pra usar ele pk (ok) está tirando os frags (ok) Pode ser usado fora de pz (ok) Pode ser usado dentro de pz (Não) uheuehuehue

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por opfelipedutra
      Preciso de um script que o PK do player sai em 10 segundos Brigado !!!
    • Por Kramer
      Bom eu mechia com servidores da distro 8.0~8.22, resolvi passar meu servidor para 8.54,tá rodando tudo certo, preciso de uma ajuda para configurar o CONFIG.LUA, quero que o White Skull seja 5 minutos e cada frag seja 30 minutos é possivel ?
      Config.lua abaixo no Spoiler.


×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo