Ir para conteúdo

Featured Replies

Postado

boa grl, quem poderia me da uma força, to querendo que esse script ao criar o monstro ele der reward, pois quando o monstro é morto ele não da loot.

 

Spoiler

local config = {
    requiredLevel = 300,
    daily = false,
    centerRagiazRoomPosition = Position(32519, 31226, 14),
    playerPositions = {
        Position(32386, 32238, 7),
        Position(32386, 32239, 7)
    },
    newPositions = {
        Position(32519, 31233, 14),
        Position(32519, 31233, 14)
    },
    RagiazPositions = {
        Position(32520, 31221, 14)
    }
}


function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.itemid == 9826 then
        local storePlayers, playerTile = {}

        for i = 1, #config.playerPositions do
            playerTile = Tile(config.playerPositions):getTopCreature()
            if not playerTile or not playerTile:isPlayer() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 2 players.")
                return true
            end

            if playerTile:getLevel() < config.requiredLevel then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.")
                return true
            end

            storePlayers[#storePlayers + 1] = playerTile
        end

        local specs, spec = Game.getSpectators(config.centerRagiazRoomPosition, false, false, 22, 22, 22, 22)
        for i = 1, #specs do
            spec = specs
            if spec:isPlayer() then
                player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.")
                return true
            end

            spec:remove()
        end

        for i = 1, #config.RagiazPositions do
            Game.createMonster("sharkystow", config.RagiazPositions)
        end

        local players
        for i = 1, #storePlayers do
            players = storePlayers
            config.playerPositions:sendMagicEffect(CONST_ME_POFF)
            players:teleportTo(config.newPositions)
            config.newPositions:sendMagicEffect(CONST_ME_ENERGYAREA)
            players:setDirection(DIRECTION_EAST)
        end
    elseif item.itemid == 9825 then
        if config.daily then
            player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE))
            return true
        end
    end

    item:transform(item.itemid == 9826 and 9825 or 9826)
    return true
end

 

Postado

@1xeuzinho1 

Coloca isso em algum lugar do seu data/items/items.xml

	<item id="AAAAA" article="a" name="BBBBB">
        <attribute key="containerSize" value="8" />
        <attribute key="decayTo" value="0" />
        <attribute key="duration" value="55" />
    </item>

Em:

AAAAA - Coloca o ID do corpse do monstro

BBBBB - Coloca fainted (e o nome do monstro.

Ficando assim:

	<item id="8937" article="a" name="fainted Demonn">
        <attribute key="containerSize" value="8" />
        <attribute key="decayTo" value="0" />
        <attribute key="duration" value="55" />
    </item>

 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96k
  • Posts 512.7k

Informação Importante

Confirmação de Termo