Jump to content
  • 0

adiciona tags no meu script?


JeanCristian

Question

Preciso que alguem coloke para esse sistema de pet nao poder ser usado em pz, ele é talkaction, e queria tambem que colokasse exausted... obrigado *-*

 

function onUse(cid, item, frompos, item2, topos)

 

storage = 4191

storsol = 1203

if #getCreatureSummons(cid) > 1 then

doPlayerSendCancel(cid,"Your Demonio is already summoned.")

end

 

if getPlayerStorageValue(cid,storsol) == 1 then

local z = getCreatureSummons(cid)[1]

addEvent(setPlayerStorageValue,100,cid,storsol,-1)

doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)

doSendMagicEffect(getCreaturePosition(z), 2)

doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)

doRemoveCreature(z)

end

 

local summons = getCreatureSummons(cid)

 

local pet = {

["Bug"] = {1,250},

["Death Blob"] = {251,1500},

["Worker golem"] = {1501,5000},

["werewolf"] = {5001,9999},

["Mercury Blob"] = {10000,15000},

["Flufly"] = {15001,23000},

["haunted treeling"] = {23001,30000},

["Vampire Bride"] = {30001,40000},

["Grim Reaper"] = {40001,55000},

["Zombie"] = {55001,80000},

["Azure Frog"] = {80001,400000}

}

 

for k,v in pairs(pet) do -- 1

 

if getPlayerStorageValue(cid,storsol) < 1 then

if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2

if (table.maxn(summons) < 1)then -- 3

x = doSummonCreature(k, getCreaturePosition(cid))

doConvinceCreature(cid, x)

setPlayerStorageValue(cid,4194,1)

setPlayerStorageValue(cid,storsol,1)

doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)

end

end

end

end

return true

end

Link to comment
Share on other sites

Recommended Posts

  • 0

aki está

 

setPlayerStorageValue(cid,11548,os.time()+30)

 

está configurado para so poder usar a cada 30 segundos ai é so você alterar onde tá +30 pro tempo que você quiser.

 

 

function onSay(cid, words, param)
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 function onUse(cid, item, frompos, item2, topos)
 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
Link to comment
Share on other sites

  • 0

/\ acho q ele pediu pra nao ser usado em pz, tbm. vo ajustar o script.

 

function onSay(cid, words, param)
 
if getTilePzInfo(getCreaturePosition(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce Nao Pode Usar Enquanto Estiver Em Protect Zone.")return true
end 
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 function onUse(cid, item, frompos, item2, topos)
 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
Link to comment
Share on other sites

  • 0

estranho, tenta ae.

 

function onSay(cid, words, param)
 
if getTilePzInfo(getCreaturePosition(cid)) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce Nao Pode Usar Enquanto Estiver Em Protect Zone.")return true
end 
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 function onUse(cid, item, frompos, item2, topos)
 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
Link to comment
Share on other sites

  • 0

testa ae

 

 

function onSay(cid, words, param)
 
    if getTilePzInfo(position) then
        return false
 
    end
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 function onUse(cid, item, frompos, item2, topos)
 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
Link to comment
Share on other sites

  • 0

Pelo amor de Deus gente, o script é uma action, você estão postando uma Talkaction.

 

function onUse(cid, item, frompos, item2, topos)
    if getTilePzInfo(position) then
doPlayerSendTextMessage(cid, 6,"Você não pode usar dentro de PZ.") 
else
    end


if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return true
end 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end


if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end


local summons = getCreatureSummons(cid)


local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}


for k,v in pairs(pet) do -- 1


if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end


end
return true
end

eu não testei.

Link to comment
Share on other sites

  • 0

afe se fufu, peguei o script do kennyxd, e nem vi a parte do function onSay ...

 

function onUse(cid, item, frompos, item2, topos)
 
if getTilePzInfo(getCreaturePosition(cid)) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce Nao Pode Usar Enquanto Estiver Em Protect Zone.")return true
end 
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 function onUse(cid, item, frompos, item2, topos)
 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
Link to comment
Share on other sites

  • 0

Preciso que alguem coloke para esse sistema de pet nao poder ser usado em pz, ele é talkaction, e queria tambem que colokasse exausted... obrigado *-*

 

function onUse(cid, item, frompos, item2, topos)

 

storage = 4191

storsol = 1203

if #getCreatureSummons(cid) > 1 then

doPlayerSendCancel(cid,"Your Demonio is already summoned.")

end

 

if getPlayerStorageValue(cid,storsol) == 1 then

local z = getCreatureSummons(cid)[1]

addEvent(setPlayerStorageValue,100,cid,storsol,-1)

doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)

doSendMagicEffect(getCreaturePosition(z), 2)

doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)

doRemoveCreature(z)

end

 

local summons = getCreatureSummons(cid)

 

local pet = {

["Bug"] = {1,250},

["Death Blob"] = {251,1500},

["Worker golem"] = {1501,5000},

["werewolf"] = {5001,9999},

["Mercury Blob"] = {10000,15000},

["Flufly"] = {15001,23000},

["haunted treeling"] = {23001,30000},

["Vampire Bride"] = {30001,40000},

["Grim Reaper"] = {40001,55000},

["Zombie"] = {55001,80000},

["Azure Frog"] = {80001,400000}

}

 

for k,v in pairs(pet) do -- 1

 

if getPlayerStorageValue(cid,storsol) < 1 then

if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2

if (table.maxn(summons) < 1)then -- 3

x = doSummonCreature(k, getCreaturePosition(cid))

doConvinceCreature(cid, x)

setPlayerStorageValue(cid,4194,1)

setPlayerStorageValue(cid,storsol,1)

doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)

end

end

end

end

return true

end

 

Se vocês não repararam eu simplesmente fiz porque o propio disse que era uma talkaction leiam vocês mesmos.

 

Preciso que alguem coloke para esse sistema de pet nao poder ser usado em pz, ele é talkaction, e queria tambem que colokasse exausted... obrigado *-*

Link to comment
Share on other sites

  • 0

par quem eu dou rep? kkk

me desculpa eu me confundi é pq eu procurei em tantos sistemas '-'

mais logo dps eu postei que é uma action nos coments kk

[error - action interface]

data/actions/scripts/pet.lua: onuse

description attempt to index a nil value stack traceback:

[C]: in function 'gettileinfo'

data/lib/050-function.lua:262: in function 'gettilepzinfo'

data/actions/scripts/pet.lua:2: in function <data/actions/scripts/pet.lua:1

( esse é o erro do script do fawz

 

agora vo postar o erro da menina ai maenilse

[error - luascriptinterface::loadfile] data/actions/scripts/pet.lua:63: 'end' expected <to close 'function' at line 1> near '<eof>'

[warning - event:loadscript] cannot load script <data/actions/scripts/pet.lua>

data/actions/scripts/pet.lua:63: 'end' expected <to close 'function' at line 1>

near '<eof>'

----------------------------------------------------------------------------

olha eu nao sou scripter

mais adicionei essa tag da menina @Maenilse e subistitui pela linguagem do menino que posto antes dela o @Fawz

if getTilePzInfo(getCreaturePosition(cid)) == FALSE then

e colokei TRUE em vez de false, e o script funcionou perfeitamente com o exausted e em pz, sem nenhum erro no distro sobre o mesmo! entao vou dar rep para os 2

quando estiver liberado para mandar rep eu dou para você Fawz fica tranquilo :3

-----------------------------------------

pelo oq eu vi só aparece a mensagem que eu nao posso usar em pz, mais continua usando, dai a exausted aparece dps que eu invoco o summon, Go summon! dai aparece a exausted ( isso ocorre dentro do pz) entao acho que só a funçao de falar dentro do pz pegou koaspsakopask' ele ainda continua pegando no pz, se possivel tirar a parte do script de chamar o bixo devolta, seria mt bom só summonar mesmo :D ( dai no caso o script seria assim, eu sumonava o bixo e quando eu clicasse denovo apareceria seu monstro ja esta em jogo! dai ele não funcionaria em pz apareceria a msg que nao pode ser usado em pz e realmente nao poderia {isso esta causando erro no distro por poder usar em pz} e com o exausted funcionando toda hora, no caso esta funcionando só dps que eu clico novamente para o bixo voltar) resumindo oq esta acontecendo atualmente, eu clico no item para sumonar o monstro dentro do pz, aparece a msg que eu nao posso usar, mais aparece GO summon! tambem, e eu clico denovo e aparece Back summon! e a msg proibido usar em pz novamente, só que desta vez adiciona exausted ... se nao conseguiram entender eu explico denovo oq eu quero

e ninguem vai me ajuda... vlw mesmo hein

Link to comment
Share on other sites

  • 0

testa assim.

 

 

 function onUse(cid, item, frompos, item2, topos)
 
    if getTilePzInfo(position) then
        return false
 
    end
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end
 
 
storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
end
return true
end
Link to comment
Share on other sites

  • 0

tenta ae lek.

function onUse(cid, item, frompos, item2, topos)
 
if getTilePzInfo(getCreaturePosition(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce Nao Pode Usar Enquanto Estiver Em Protect Zone.")return true
end 
 
if (getPlayerStorageValue(cid, 11548) >= os.time()) then
doPlayerSendTextMessage(cid, 6,"Por medidas de segurança você só pode utilizar este comando em " .. 
(getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")
return TRUE
end

storage = 4191
storsol = 1203
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid,"Your Demonio is already summoned.")
end
 
if getPlayerStorageValue(cid,storsol) == 1 then
local z = getCreatureSummons(cid)[1]
addEvent(setPlayerStorageValue,100,cid,storsol,-1)
doPlayerSay(cid,"Back my summon!",TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(z), 2)
doSendDistanceShoot(getCreaturePosition(z), getPlayerPosition(cid), 3)
doRemoveCreature(z)
end
 
local summons = getCreatureSummons(cid)
 
local pet = {
["Bug"] = {1,250},
["Death Blob"] = {251,1500},
["Worker golem"] = {1501,5000},
["werewolf"] = {5001,9999},
["Mercury Blob"] = {10000,15000},
["Flufly"] = {15001,23000},
["haunted treeling"] = {23001,30000},
["Vampire Bride"] = {30001,40000},
["Grim Reaper"] = {40001,55000},
["Zombie"] = {55001,80000},
["Azure Frog"] = {80001,400000}
}
 
for k,v in pairs(pet) do -- 1
 
if getPlayerStorageValue(cid,storsol) < 1 then
if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) < v[2] then -- 2
if (table.maxn(summons) < 1)then -- 3
x = doSummonCreature(k, getCreaturePosition(cid))
doConvinceCreature(cid, x)
setPlayerStorageValue(cid,4194,1)
setPlayerStorageValue(cid,11548,os.time()+30)
setPlayerStorageValue(cid,storsol,1)
doCreatureSay(cid, k ..", go!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2)
end
end
end
return true
end
Edited by Maenilse
Link to comment
Share on other sites

×
×
  • Create New...