Jump to content

Recommended Posts

Olá, gostaria de uma ajuda.

gostaria de adaptar esse codigo: do @Summ

 

function onUse(cid, item) 
    
    if not getTileInfo(getThingPos(cid)).protection then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.")
    	return true
   	end

            if getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_black then
                db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
				db.executeQuery("UPDATE `players` SET `skulltime` = 0")
				doCreatureSetSkullType(cid, 0)
				doPlayerSendTextMessage(cid, 19, "Você removeu seus Frags/Skull com sucesso.")
				doSendMagicEffect(getThingPos(cid), 26)
				doRemoveItem(item.uid,1)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed!")
            else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red/black skull!")
            end
    return true
end

 

 

<action itemid="9930" event="script" value="removeskulls.lua"/>

 

Para ot 12.60 que não utiliza action.xml


Desculpa se estiver na área errada.

Link to post
Share on other sites

  • Assistente

Este tópico foi movido para a seção de Suporte Otserv.

function onLove()
if getPlayerTrueLove(girlfriend) then
doPlayerBeHappy(cid, true)
doRemoveVirginity(cid, true)
else
doSendCancel(cid,"you do not know how good it feels to be loved")
end end

;)

 

Link to post
Share on other sites

local removeSkull = Action()
function removeSkull.onUse(cid, item) 
    if not getTileInfo(getThingPos(cid)).protection then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.")
    	return true
   	end
            if getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_black then
                db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
				db.executeQuery("UPDATE `players` SET `skulltime` = 0")
				doCreatureSetSkullType(cid, 0)
				doPlayerSendTextMessage(cid, 19, "Você removeu seus Frags/Skull com sucesso.")
				doSendMagicEffect(getThingPos(cid), 26)
				doRemoveItem(item.uid,1)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed!")
            else
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red/black skull!")
            end
    return true
end
removeSkull:id(9930)
removeSkull:register()

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Confirmação de Termo