Ir para conteúdo

Featured Replies

Postado

seguinte quero uma script(que eu acho que é simples) ela funciona assim: a pessoa fala !animago e a outfit dela muda e a velocidade do char almenta em 30%,só que só pode ser usado no lvl 120, e irá ter para char male e char female,e quando deslogar e logar de novo vai voltar ao normal,quem fizer essa script pra mim postar e funfar,ganha rep +

Postado

animago.lua (data\talkactions\scripts):

local s = {}
local cspeed = createConditionObject(CONDITION_HASTE)
setConditionParam(cspeed, CONDITION_PARAM_TICKS, -1)
setConditionParam(cspeed, CONDITION_PARAM_SPEED, #s)

function onSay(cid)
    speed = 30 -- %
    level = 120
    outfit = {
        [0] = 123, -- female
        [1] = 234 -- male
    }
    
    if getPlayerLevel(cid) >= level then
        if getCreatureOutfit(cid).lookType ~= outfit[getPlayerSex(cid)] then
            table.insert(s, speed * (getCreatureSpeed(cid) / 100))
            doSetCreatureOutfit(cid, {looktype = outfit[getPlayerSex(cid)]}, -1)
            doAddCondition(cid, cspeed)
            doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
            doPlayerSendTextMessage(last, MESSAGE_INFO_DESCR, 'You\'re now '..speed..'% percent faster.')
        else
            doRemoveCondition(cid, CONDITION_OUTFIT)
            doRemoveCondition(cid, CONDITION_HASTE)
        end
    else
        doPlayerSendCancel(cid, 'You need at least level '..level..' to use this command.')
    end
    
    return true
end




Tag - talkactions.xml (data\talkactions):

<talkaction words="!animago" event="script" value="animago.lua"/>

The corrupt fear us.

The honest support us.

The heroic join us.

Postado

Certo, tente:

local s = {}
local cspeed = createConditionObject(CONDITION_HASTE)
setConditionParam(cspeed, CONDITION_PARAM_TICKS, -1)
setConditionParam(cspeed, CONDITION_PARAM_SPEED, #s)

local o = {}
local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, -1)
setConditionParam(outfit, CONDITION_PARAM_OUTFIT, {lookType = #o})

function onSay(cid)
    speed = 30 -- %
    level = 120
    outfit = {
        [0] = 123, -- female
        [1] = 234 -- male
    }
    
    if getPlayerLevel(cid) >= level then
        if getCreatureOutfit(cid).lookType ~= outfit[getPlayerSex(cid)] then
            table.insert(s, speed * (getCreatureSpeed(cid) / 100))
            table.insert(o, outfit[getPlayerSex(cid)])
            doAddCondition(cid, cspeed)
            doAddCondition(cid, outfit)
            doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You\'re now '..speed..'% faster.')
        else
            doRemoveCondition(cid, CONDITION_HASTE)
            doRemoveCondition(cid, CONDITION_OUTFIT)
        end
    else
        doPlayerSendCancel(cid, 'You need at least level '..level..' to use this command.')
    end
    
    return true
end

The corrupt fear us.

The honest support us.

The heroic join us.

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 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo