Ir para conteúdo
  • 0

como colocar level no comando !berserk


Trivelatos

Pergunta

quero colocar para apenas level 1000 poder usar esse comando \/

 

 

--[[

Script By mock the bear

Config

]]

function choose(...)

local arg = {...}

return arg[math.random(1,#arg)]

end

local conf = {

effectlist = {36,39},

soulPerSec=1,

soulToStart=25,

allPercent=50,

}

---Load combat

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

setConditionParam(condition, CONDITION_PARAM_SUBID, 49)

local cond = {

CONDITION_PARAM_STAT_MAXHEALTHPERCENT = 31,

CONDITION_PARAM_STAT_MAXMANAPERCENT = 32,

CONDITION_PARAM_STAT_MAGICLEVELPERCENT = 34,

CONDITION_PARAM_SKILL_MELEEPERCENT = 35,

CONDITION_PARAM_SKILL_FISTPERCENT = 36,

CONDITION_PARAM_SKILL_CLUBPERCENT = 37,

CONDITION_PARAM_SKILL_SWORDPERCENT = 38,

CONDITION_PARAM_SKILL_AXEPERCENT = 39,

CONDITION_PARAM_SKILL_DISTANCEPERCENT = 40,

CONDITION_PARAM_SKILL_SHIELDPERCENT = 41,

}

for i,b in pairs(cond) do

setConditionParam(condition, b, 100+conf.allPercent)

end

setConditionParam(condition, CONDITION_PARAM_BUFF, true)

setCombatCondition(combat, condition)

local function rot(cid,n) --- Script by mock

local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}

if not isPlayer(cid) or tb_rot[n] == nil or getPlayerSoul(cid) == 0 or getPlayerStorageValue(cid,32481) == -1 then

return false

end

if tb_rot[n] == false then

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , choose(unpack(conf.effectlist)))

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) ,choose(unpack(conf.effectlist)))

addEvent(rot, 200,cid,2)

return false

end

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , choose(unpack(conf.effectlist)))

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , choose(unpack(conf.effectlist)))

n = n+1

addEvent(rot, 200,cid,n)

end

function checkBuff(cid)

if not isPlayer(cid) then return end

if getPlayerSoul(cid) > 0 and getPlayerStorageValue(cid,32481) == 1 then

doPlayerAddSoul(cid,-conf.soulPerSec)

doSendMagicEffect(getCreaturePosition(cid) , 49)

addEvent(checkBuff,1000,cid)

else

doRemoveCondition(cid, CONDITION_ATTRIBUTES,49)

setPlayerStorageValue(cid,32481,-1)

return false

end

end

function onSay(cid, words, param, channel) --- Script by mock

if getPlayerStorageValue(cid,32481) == 1 then

setPlayerStorageValue(cid,32481,-1)

doCreatureSay(cid,'BERSERK MODE OFF!',19)

return true

end

if getPlayerSoul(cid) >= conf.soulToStart then

doPlayerAddSoul(cid,-conf.soulToStart)

setPlayerStorageValue(cid,32481,1)

checkBuff(cid)

rot(cid,1)

doCreatureSay(cid,'BERSERK MODE ON!',19)

doCombat(cid, combat, numberToVariant(cid))

else

doPlayerSendTextMessage(cid,25,'Você precisa de 25 Soul!')

end

return true

end

Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts Recomendados

  • 0

Tenta ai:

 

 

--[[

Script By mock the bear

Config

]]

function choose(...)

local arg = {...}

return arg[math.random(1,#arg)]

end

local conf = {

effectlist = {36,39},

soulPerSec=1,

soulToStart=25,

allPercent=50,

}

---Load combat

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

setConditionParam(condition, CONDITION_PARAM_SUBID, 49)

local cond = {

CONDITION_PARAM_STAT_MAXHEALTHPERCENT = 31,

CONDITION_PARAM_STAT_MAXMANAPERCENT = 32,

CONDITION_PARAM_STAT_MAGICLEVELPERCENT = 34,

CONDITION_PARAM_SKILL_MELEEPERCENT = 35,

CONDITION_PARAM_SKILL_FISTPERCENT = 36,

CONDITION_PARAM_SKILL_CLUBPERCENT = 37,

CONDITION_PARAM_SKILL_SWORDPERCENT = 38,

CONDITION_PARAM_SKILL_AXEPERCENT = 39,

CONDITION_PARAM_SKILL_DISTANCEPERCENT = 40,

CONDITION_PARAM_SKILL_SHIELDPERCENT = 41,

}

for i,b in pairs(cond) do

setConditionParam(condition, b, 100+conf.allPercent)

end

setConditionParam(condition, CONDITION_PARAM_BUFF, true)

setCombatCondition(combat, condition)

local function rot(cid,n) --- Script by mock

local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}

if not isPlayer(cid) or tb_rot[n] == nil or getPlayerSoul(cid) == 0 or getPlayerStorageValue(cid,32481) == -1 then

return false

end

if tb_rot[n] == false then

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , choose(unpack(conf.effectlist)))

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) ,choose(unpack(conf.effectlist)))

addEvent(rot, 200,cid,2)

return false

end

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , choose(unpack(conf.effectlist)))

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , choose(unpack(conf.effectlist)))

n = n+1

addEvent(rot, 200,cid,n)

end

function checkBuff(cid)

if not isPlayer(cid) then return end

if getPlayerSoul(cid) > 0 and getPlayerStorageValue(cid,32481) == 1 then

doPlayerAddSoul(cid,-conf.soulPerSec)

doSendMagicEffect(getCreaturePosition(cid) , 49)

addEvent(checkBuff,1000,cid)

else

doRemoveCondition(cid, CONDITION_ATTRIBUTES,49)

setPlayerStorageValue(cid,32481,-1)

return false

end

end

function onSay(cid, words, param, channel) --- Script by mock

if getPlayerLevel(cid) < conf.level then return doPlayerSendCancel(cid, "You need level " .. conf.level .. ".") end - See more at: http://ideone.com/K6gSJS#sthash.sCizRmm5.dpuf

if getPlayerLevel(cid) < 1000 then

return doPlayerSendTextMessage(cid,22,"Você não tem o level necessário")

end

if getPlayerStorageValue(cid,32481) == 1 then

setPlayerStorageValue(cid,32481,-1)

doCreatureSay(cid,'BERSERK MODE OFF!',19)

return true

end

if getPlayerSoul(cid) >= conf.soulToStart then

doPlayerAddSoul(cid,-conf.soulToStart)

setPlayerStorageValue(cid,32481,1)

checkBuff(cid)

rot(cid,1)

doCreatureSay(cid,'BERSERK MODE ON!',19)

doCombat(cid, combat, numberToVariant(cid))

else

doPlayerSendTextMessage(cid,25,'Você precisa de 25 Soul ou não tem level 1000!')

end

return true

end

 

Editado por Roksas
Link para o comentário
Compartilhar em outros sites

  • 0

não dá erro no distro, mais o comando não funciona apenas aprece lá !berserk no defaut como se fosse uma fala normal ...

 

Olha ai, o primeiro erro é o do primeiro script pelo

Roksas

 

o segundo é o erro pelo script do

 

xotservx

 

 

QQAAAL6N_EG4TSviVRH2jlCw82u2VGpvVRmwRjJBYk4mi1GGjZ9tqYn0W8ejGY7q2oKxKYjof5xu57fwgFKZLvNeq22osy5KjUBLyNVCV6wBbuJcAJtU9VBLK9W7-dBONxt-CplB9BkSVo-GAA.jpg

Link para o comentário
Compartilhar em outros sites

  • 0

Tenta:

 

 

--[[

Script By mock the bear

Config

]]

function choose(...)

local arg = {...}

return arg[math.random(1,#arg)]

end

local conf = {

effectlist = {36,39},

soulPerSec=1,

soulToStart=25,

allPercent=50,

}

---Load combat

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

setConditionParam(condition, CONDITION_PARAM_SUBID, 49)

local cond = {

CONDITION_PARAM_STAT_MAXHEALTHPERCENT = 31,

CONDITION_PARAM_STAT_MAXMANAPERCENT = 32,

CONDITION_PARAM_STAT_MAGICLEVELPERCENT = 34,

CONDITION_PARAM_SKILL_MELEEPERCENT = 35,

CONDITION_PARAM_SKILL_FISTPERCENT = 36,

CONDITION_PARAM_SKILL_CLUBPERCENT = 37,

CONDITION_PARAM_SKILL_SWORDPERCENT = 38,

CONDITION_PARAM_SKILL_AXEPERCENT = 39,

CONDITION_PARAM_SKILL_DISTANCEPERCENT = 40,

CONDITION_PARAM_SKILL_SHIELDPERCENT = 41,

}

for i,b in pairs(cond) do

setConditionParam(condition, b, 100+conf.allPercent)

end

setConditionParam(condition, CONDITION_PARAM_BUFF, true)

setCombatCondition(combat, condition)

local function rot(cid,n) --- Script by mock

local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}

if not isPlayer(cid) or tb_rot[n] == nil or getPlayerSoul(cid) == 0 or getPlayerStorageValue(cid,32481) == -1 then

return false

end

if tb_rot[n] == false then

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , choose(unpack(conf.effectlist)))

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) ,choose(unpack(conf.effectlist)))

addEvent(rot, 200,cid,2)

return false

end

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , choose(unpack(conf.effectlist)))

doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , choose(unpack(conf.effectlist)))

n = n+1

addEvent(rot, 200,cid,n)

end

function checkBuff(cid)

if not isPlayer(cid) then return end

if getPlayerSoul(cid) > 0 and getPlayerStorageValue(cid,32481) == 1 then

doPlayerAddSoul(cid,-conf.soulPerSec)

doSendMagicEffect(getCreaturePosition(cid) , 49)

addEvent(checkBuff,1000,cid)

else

doRemoveCondition(cid, CONDITION_ATTRIBUTES,49)

setPlayerStorageValue(cid,32481,-1)

return false

end

end

function onSay(cid, words, param, channel) --- Script by mock

if getPlayerLevel(cid) < 1000 then

return doPlayerSendTextMessage(cid,22,"Você não tem o level necessário")

end

if getPlayerStorageValue(cid,32481) == 1 then

setPlayerStorageValue(cid,32481,-1)

doCreatureSay(cid,'BERSERK MODE OFF!',19)

return true

end

if getPlayerSoul(cid) >= conf.soulToStart then

doPlayerAddSoul(cid,-conf.soulToStart)

setPlayerStorageValue(cid,32481,1)

checkBuff(cid)

rot(cid,1)

doCreatureSay(cid,'BERSERK MODE ON!',19)

doCombat(cid, combat, numberToVariant(cid))

else

doPlayerSendTextMessage(cid,25,'Você precisa de 25 Soul ou não tem level 1000!')

end

return true

end

 

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...