Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Salve galera, eu uso TFS 0.4 protocolo 8.60 e estou com um script que muda a rate do loot, que no caso usando um ring. No entanto, as vezes, acho que depende do monstro, apresenta esse erro na distro:

1481331013_ERROLOOTRING.thumb.jpg.88ce58d7005b1cdb1f1c10377e6e88a6.jpg

 

Alguém tem alguma solução pra isso??

 

Citar

 

 

 

local t = {
item = 2127,
slot = CONST_SLOT_RING,
newRate = 5
}

local rate = getConfigInfo('rateLoot')

function getContentDescription(uid, comma)
local ret, i, containers = '', 0, {}
while i < getContainerSize(uid) do
local v, s = getContainerItem(uid, i), ''
local k = getItemInfo(v.itemid)
if k.name ~= '' then
if v.type > 1 and k.stackable and k.showCount then
s = v.type .. ' ' .. getItemInfo(v.itemid).plural
else
local article = k.article
s = (article == '' and '' or article .. ' ') .. k.name
end
ret = ret .. (i == 0 and not comma and '' or ', ') .. s
if isContainer(v.uid) and getContainerSize(v.uid) > 0 then
table.insert(containers, v.uid)
end
else
ret = ret .. (i == 0 and not comma and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster'
end
i = i + 1
end
for i = 1, #containers do
ret = ret .. getContentDescription(containers[i], true)
end
return ret
end

local function send(cid, pos, corpseid, monster, party)
local corpse = getTileItemById(pos, corpseid).uid
local ret = isContainer(corpse) and getContentDescription(corpse)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
if party then
for _, pid in ipairs(getPartyMembers(party)) do
doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY)
end
end
end

local function createLoot(i, ext)
local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id
local random = math.ceil(math.random(100000) / (ext and t.newRate or rate))
local tmpItem

if random < i.chance then
tmpItem = doCreateItemEx(item, getItemInfo(item).stackable and random % i.count + 1 or 1)
end

if not tmpItem then
return
end

if i.subType ~= -1 then
doItemSetAttribute(tmpItem, 'subType', i.subType)
end

if i.actionId ~= -1 then
doItemSetAttribute(tmpItem, 'aid', i.actionId)
end

if i.uniqueId ~= -1 then
doItemSetAttribute(tmpItem, 'uid', i.uniqueId)
end

if i.text ~= '' then
doItemSetAttribute(tmpItem, 'text', i.text)
end

return tmpItem
end

local function createChildLoot(parent, i, ext)
if #i == 0 then
return true
end

local size, cap = 0, getContainerCap(parent)
for k = 1, #i do
if size == cap then
break
end
local tmp = createLoot(i[k], ext)
if tmp then
if isContainer(tmp) then
if createChildLoot(tmp, i[k].child, ext) then
doAddContainerItemEx(parent, tmp)
size = size + 1
else
doRemoveItem(tmp)
end
else
doAddContainerItemEx(parent, tmp)
size = size + 1
end
end
end

return size > 0
end

local function dropLoot(pos, v, ext)
local corpse = getTileItemById(pos, v.lookCorpse).uid
if isContainer(corpse) then
for i = 1, getContainerSize(corpse) do
doRemoveItem(getContainerItem(corpse, 0).uid)
end
local size, cap = 0, getContainerCap(corpse)
for i = 1, #v.loot do
if size == cap then
break
end
local tmp = createLoot(v.loot[i], ext)
if tmp then
if isContainer(tmp) then
if createChildLoot(tmp, v.loot[i].child, ext) then
doAddContainerItemEx(corpse, tmp)
size = size + 1
else
doRemoveItem(tmp)
end
else
doAddContainerItemEx(corpse, tmp)
size = size + 1
end
end
end
end
end

function onKill(cid, target, lastHit)
if lastHit and isMonster(target) then
local v = getMonsterInfo(getCreatureName(target))
if v.lookCorpse > 0 then
local master = getCreatureMaster(target)
if not master or master == target then
addEvent(dropLoot, 0, getThingPos(target), v, getPlayerSlotItem(cid, t.slot).itemid == t.item)
end
addEvent(send, 100, cid, getThingPos(target), v.lookCorpse, v.description, getPlayerParty(cid))
end
end
return true
end 

 

 

 

Link para o post
Compartilhar em outros sites

@stauro Boa noite, tente adicionar essa tag no final antes de fechar o </monster> de qualquer arquivo xml da pasta monster (por exemplo amazon.xml) para ver se vai acontecer esse erro.

 

No NomeDoEventoRegistrado você coloca o nome que você registrou no login.lua ou no creaturescripts.xml que faz executar esse script.

 

<script>
	<event name="NomeDoEventoRegistrado"/>
</script>

 

Link para o post
Compartilhar em outros sites
12 horas atrás, MatteusDeli disse:

@stauro Boa noite, tente adicionar essa tag no final antes de fechar o </monster> de qualquer arquivo xml da pasta monster (por exemplo amazon.xml) para ver se vai acontecer esse erro.

 

No NomeDoEventoRegistrado você coloca o nome que você registrou no login.lua ou no creaturescripts.xml que faz executar esse script.

 


<script>
	<event name="NomeDoEventoRegistrado"/>
</script>

 

Vou testar essa tag </monster> e essa do login.lua já está como vc falou. Vou testar e qualquer coisa eu volto aqui. Muito obrigado, amigo!

Link para o post
Compartilhar em outros sites
Em 16/06/2021 em 23:26, MatteusDeli disse:

@stauro Boa noite, tente adicionar essa tag no final antes de fechar o </monster> de qualquer arquivo xml da pasta monster (por exemplo amazon.xml) para ver se vai acontecer esse erro.

 

No NomeDoEventoRegistrado você coloca o nome que você registrou no login.lua ou no creaturescripts.xml que faz executar esse script.

 


<script>
	<event name="NomeDoEventoRegistrado"/>
</script>

 

Ainda está dando erro. Esse é um dos monstros que constatei quando mata usando o ring aparece o erro na distro

 

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Dark Apprentice" nameDescription="a dark apprentice" race="blood" experience="100" speed="220" manacost="0">
    <health now="225" max="225"/>
    <look type="133" head="78" body="38" legs="95" feet="115" addons="1" corpse="3058"/>
    <targetchange interval="5000" chance="30"/>
    <strategy attack="100" defense="0"/>
    <flags>
        <flag summonable="0"/>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag illusionable="0"/>
        <flag convinceable="0"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="4"/>
        <flag staticattack="90"/>
        <flag runonhealth="80"/>
    </flags>
    <attacks>
        <attack name="melee" interval="2000" skill="30" attack="30"/>
        <attack name="fire" interval="2000" chance="7" range="7" radius="1" target="1" min="-2" max="-26">
            <attribute key="shootEffect" value="fire"/>
            <attribute key="areaEffect" value="fireattack"/>
        </attack>    
        <attack name="energy" interval="2000" chance="10" range="7" target="1" min="-10" max="-20">
            <attribute key="shootEffect" value="energyball"/>
            <attribute key="areaEffect" value="energy"/>
        </attack>    
        <attack name="physical" interval="2000" chance="8" range="7" target="1" min="-0" max="-24">
            <attribute key="shootEffect" value="smallstone"/>
        </attack>
        <attack name="outfit" interval="2000" chance="10" monster="cyclops" duration="5000"/>
    </attacks>
    <defenses armor="15" defense="20">
    <defense name="outfit" interval="2000" chance="10" monster="green frog" duration="5000"/>    
        <defense name="healing" interval="2000" chance="12" min="50" max="75">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
        <defense name="invisible" interval="2000" chance="6" duration="5000">
            <attribute key="areaEffect" value="redshimmer"/>
        </defense>
    </defenses>
    <elements>
        <element deathPercent="-5"/>
    </elements>
    <immunities>
        <immunity invisible="1"/>
    </immunities>
    <voices interval="5000" chance="10">
        <voice sentence="Outch!"/>
        <voice sentence="Oops, I did it again."/>
        <voice sentence="From the spirits that I called Sir, deliver me!"/>
        <voice sentence="I must dispose of my masters enemies!"/>
    </voices>
    <loot>
    <item id="7618" chance="2775" /><!-- health potion -->
    <item id="13226" chance="800" /><!-- Reins -->
    <item id="2148" countmax="45" chance="39500" /><!-- gold coin -->
    <item id="2260" countmax="3" chance="6100" /><!-- blank rune -->
    <item id="1987" chance="100000"><!-- bag -->
        <inside>
            <item id="7620" chance="3050" /><!-- mana potion -->
            <item id="2191" chance="2300" /><!-- wand of dragonbreath -->
            <item id="5934" chance="7900" /><!-- dead frog -->
        </inside>
    </item>
</loot>
</monster>

Link para o post
Compartilhar em outros sites

@stauro Boa tarde, tente assim

 

Não precisa adicionar a tag script nos monsters, aparentemente o que está dando esse erro é que o alguns monstros nao dropam a bag.

 

local t = {
  item = 2127,
  slot = CONST_SLOT_RING,
  newRate = 5
  }
  
  local rate = getConfigInfo('rateLoot')
  
  function getContentDescription(uid, comma)
  local ret, i, containers = '', 0, {}
  while i < getContainerSize(uid) do
  local v, s = getContainerItem(uid, i), ''
  local k = getItemInfo(v.itemid)
  if k.name ~= '' then
  if v.type > 1 and k.stackable and k.showCount then
  s = v.type .. ' ' .. getItemInfo(v.itemid).plural
  else
  local article = k.article
  s = (article == '' and '' or article .. ' ') .. k.name
  end
  ret = ret .. (i == 0 and not comma and '' or ', ') .. s
  if isContainer(v.uid) and getContainerSize(v.uid) > 0 then
  table.insert(containers, v.uid)
  end
  else
  ret = ret .. (i == 0 and not comma and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster'
  end
  i = i + 1
  end
  for i = 1, #containers do
  ret = ret .. getContentDescription(containers[i], true)
  end
  return ret
  end
  
  local function send(cid, pos, corpseid, monster, party)
  local corpse = getTileItemById(pos, corpseid).uid
  local ret = isContainer(corpse) and getContentDescription(corpse)
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
  if party then
  for _, pid in ipairs(getPartyMembers(party)) do
  doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY)
  end
  end
  end
  
  local function createLoot(i, ext)
  local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id
  local random = math.ceil(math.random(100000) / (ext and t.newRate or rate))
  local tmpItem
  
  if random < i.chance then
  tmpItem = doCreateItemEx(item, getItemInfo(item).stackable and random % i.count + 1 or 1)
  end
  
  if not tmpItem then
  return
  end
  
  if i.subType ~= -1 then
  doItemSetAttribute(tmpItem, 'subType', i.subType)
  end
  
  if i.actionId ~= -1 then
  doItemSetAttribute(tmpItem, 'aid', i.actionId)
  end
  
  if i.uniqueId ~= -1 then
  doItemSetAttribute(tmpItem, 'uid', i.uniqueId)
  end
  
  if i.text ~= '' then
  doItemSetAttribute(tmpItem, 'text', i.text)
  end
  
  return tmpItem
  end
  
  local function createChildLoot(parent, i, ext)
  if #i == 0 then
    return true
  end
  
  local size, cap = 0, getContainerCap(parent)
  for k = 1, #i do
  if size == cap then
  break
  end
  local tmp = createLoot(i[k], ext)
  if tmp then
  if isContainer(tmp) then
    if i[k].child == nil then
      break
    end
  if createChildLoot(tmp, i[k].child, ext) then
  doAddContainerItemEx(parent, tmp)
  size = size + 1
  else
  doRemoveItem(tmp)
  end
  else
  doAddContainerItemEx(parent, tmp)
  size = size + 1
  end
  end
  end
  
  return size > 0
  end
  
  local function dropLoot(pos, v, ext)
  local corpse = getTileItemById(pos, v.lookCorpse).uid
  if isContainer(corpse) then
    for i = 1, getContainerSize(corpse) do
      doRemoveItem(getContainerItem(corpse, 0).uid)
    end
    local size, cap = 0, getContainerCap(corpse)
      for i = 1, #v.loot do
        if size == cap then
          break
        end
    local tmp = createLoot(v.loot[i], ext)
  if tmp then
  if isContainer(tmp) then
  if createChildLoot(tmp, v.loot[i].child, ext) then
  doAddContainerItemEx(corpse, tmp)
  size = size + 1
  else
  doRemoveItem(tmp)
  end
  else
  doAddContainerItemEx(corpse, tmp)
  size = size + 1
  end
  end
  end
  end
  end
  
  function onKill(cid, target, lastHit)
  if lastHit and isMonster(target) then
  local v = getMonsterInfo(getCreatureName(target))
  if v.lookCorpse > 0 then
  local master = getCreatureMaster(target)
  if not master or master == target then
  addEvent(dropLoot, 0, getThingPos(target), v, getPlayerSlotItem(cid, t.slot).itemid == t.item)
  end
  addEvent(send, 100, cid, getThingPos(target), v.lookCorpse, v.description, getPlayerParty(cid))
  end
  end
  return true
  end

 

Link para o post
Compartilhar em outros sites
29 minutos atrás, MatteusDeli disse:

@stauro Boa tarde, tente assim

 

Não precisa adicionar a tag script nos monsters, aparentemente o que está dando esse erro é que o alguns monstros nao dropam a bag.

 


local t = {
  item = 2127,
  slot = CONST_SLOT_RING,
  newRate = 5
  }
  
  local rate = getConfigInfo('rateLoot')
  
  function getContentDescription(uid, comma)
  local ret, i, containers = '', 0, {}
  while i < getContainerSize(uid) do
  local v, s = getContainerItem(uid, i), ''
  local k = getItemInfo(v.itemid)
  if k.name ~= '' then
  if v.type > 1 and k.stackable and k.showCount then
  s = v.type .. ' ' .. getItemInfo(v.itemid).plural
  else
  local article = k.article
  s = (article == '' and '' or article .. ' ') .. k.name
  end
  ret = ret .. (i == 0 and not comma and '' or ', ') .. s
  if isContainer(v.uid) and getContainerSize(v.uid) > 0 then
  table.insert(containers, v.uid)
  end
  else
  ret = ret .. (i == 0 and not comma and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster'
  end
  i = i + 1
  end
  for i = 1, #containers do
  ret = ret .. getContentDescription(containers[i], true)
  end
  return ret
  end
  
  local function send(cid, pos, corpseid, monster, party)
  local corpse = getTileItemById(pos, corpseid).uid
  local ret = isContainer(corpse) and getContentDescription(corpse)
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
  if party then
  for _, pid in ipairs(getPartyMembers(party)) do
  doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY)
  end
  end
  end
  
  local function createLoot(i, ext)
  local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id
  local random = math.ceil(math.random(100000) / (ext and t.newRate or rate))
  local tmpItem
  
  if random < i.chance then
  tmpItem = doCreateItemEx(item, getItemInfo(item).stackable and random % i.count + 1 or 1)
  end
  
  if not tmpItem then
  return
  end
  
  if i.subType ~= -1 then
  doItemSetAttribute(tmpItem, 'subType', i.subType)
  end
  
  if i.actionId ~= -1 then
  doItemSetAttribute(tmpItem, 'aid', i.actionId)
  end
  
  if i.uniqueId ~= -1 then
  doItemSetAttribute(tmpItem, 'uid', i.uniqueId)
  end
  
  if i.text ~= '' then
  doItemSetAttribute(tmpItem, 'text', i.text)
  end
  
  return tmpItem
  end
  
  local function createChildLoot(parent, i, ext)
  if #i == 0 then
    return true
  end
  
  local size, cap = 0, getContainerCap(parent)
  for k = 1, #i do
  if size == cap then
  break
  end
  local tmp = createLoot(i[k], ext)
  if tmp then
  if isContainer(tmp) then
    if i[k].child == nil then
      break
    end
  if createChildLoot(tmp, i[k].child, ext) then
  doAddContainerItemEx(parent, tmp)
  size = size + 1
  else
  doRemoveItem(tmp)
  end
  else
  doAddContainerItemEx(parent, tmp)
  size = size + 1
  end
  end
  end
  
  return size > 0
  end
  
  local function dropLoot(pos, v, ext)
  local corpse = getTileItemById(pos, v.lookCorpse).uid
  if isContainer(corpse) then
    for i = 1, getContainerSize(corpse) do
      doRemoveItem(getContainerItem(corpse, 0).uid)
    end
    local size, cap = 0, getContainerCap(corpse)
      for i = 1, #v.loot do
        if size == cap then
          break
        end
    local tmp = createLoot(v.loot[i], ext)
  if tmp then
  if isContainer(tmp) then
  if createChildLoot(tmp, v.loot[i].child, ext) then
  doAddContainerItemEx(corpse, tmp)
  size = size + 1
  else
  doRemoveItem(tmp)
  end
  else
  doAddContainerItemEx(corpse, tmp)
  size = size + 1
  end
  end
  end
  end
  end
  
  function onKill(cid, target, lastHit)
  if lastHit and isMonster(target) then
  local v = getMonsterInfo(getCreatureName(target))
  if v.lookCorpse > 0 then
  local master = getCreatureMaster(target)
  if not master or master == target then
  addEvent(dropLoot, 0, getThingPos(target), v, getPlayerSlotItem(cid, t.slot).itemid == t.item)
  end
  addEvent(send, 100, cid, getThingPos(target), v.lookCorpse, v.description, getPlayerParty(cid))
  end
  end
  return true
  end

 

Bom, aparentemente o erro não aparece mais, só que por exemplo, coloquei a rate 5000 pra testar e só dropa alguns loots faceis, por exemplo: o DL só dropa a dragon slayer, DSM ou RH continua com rate normal.

Link para o post
Compartilhar em outros sites
Em 26/06/2021 em 13:34, MatteusDeli disse:

@stauro Boa tarde, tente assim

 

Não precisa adicionar a tag script nos monsters, aparentemente o que está dando esse erro é que o alguns monstros nao dropam a bag.

 


local t = {
  item = 2127,
  slot = CONST_SLOT_RING,
  newRate = 5
  }
  
  local rate = getConfigInfo('rateLoot')
  
  function getContentDescription(uid, comma)
  local ret, i, containers = '', 0, {}
  while i < getContainerSize(uid) do
  local v, s = getContainerItem(uid, i), ''
  local k = getItemInfo(v.itemid)
  if k.name ~= '' then
  if v.type > 1 and k.stackable and k.showCount then
  s = v.type .. ' ' .. getItemInfo(v.itemid).plural
  else
  local article = k.article
  s = (article == '' and '' or article .. ' ') .. k.name
  end
  ret = ret .. (i == 0 and not comma and '' or ', ') .. s
  if isContainer(v.uid) and getContainerSize(v.uid) > 0 then
  table.insert(containers, v.uid)
  end
  else
  ret = ret .. (i == 0 and not comma and '' or ', ') .. 'an item of type ' .. v.itemid .. ', please report it to gamemaster'
  end
  i = i + 1
  end
  for i = 1, #containers do
  ret = ret .. getContentDescription(containers[i], true)
  end
  return ret
  end
  
  local function send(cid, pos, corpseid, monster, party)
  local corpse = getTileItemById(pos, corpseid).uid
  local ret = isContainer(corpse) and getContentDescription(corpse)
  doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'))
  if party then
  for _, pid in ipairs(getPartyMembers(party)) do
  doPlayerSendChannelMessage(pid, '', 'Loot of ' .. monster .. ': ' .. (ret ~= '' and ret or 'nothing'), TALKTYPE_CHANNEL_W, CHANNEL_PARTY)
  end
  end
  end
  
  local function createLoot(i, ext)
  local item = type(i.id) == 'table' and i.id[math.random(#i.id)] or i.id
  local random = math.ceil(math.random(100000) / (ext and t.newRate or rate))
  local tmpItem
  
  if random < i.chance then
  tmpItem = doCreateItemEx(item, getItemInfo(item).stackable and random % i.count + 1 or 1)
  end
  
  if not tmpItem then
  return
  end
  
  if i.subType ~= -1 then
  doItemSetAttribute(tmpItem, 'subType', i.subType)
  end
  
  if i.actionId ~= -1 then
  doItemSetAttribute(tmpItem, 'aid', i.actionId)
  end
  
  if i.uniqueId ~= -1 then
  doItemSetAttribute(tmpItem, 'uid', i.uniqueId)
  end
  
  if i.text ~= '' then
  doItemSetAttribute(tmpItem, 'text', i.text)
  end
  
  return tmpItem
  end
  
  local function createChildLoot(parent, i, ext)
  if #i == 0 then
    return true
  end
  
  local size, cap = 0, getContainerCap(parent)
  for k = 1, #i do
  if size == cap then
  break
  end
  local tmp = createLoot(i[k], ext)
  if tmp then
  if isContainer(tmp) then
    if i[k].child == nil then
      break
    end
  if createChildLoot(tmp, i[k].child, ext) then
  doAddContainerItemEx(parent, tmp)
  size = size + 1
  else
  doRemoveItem(tmp)
  end
  else
  doAddContainerItemEx(parent, tmp)
  size = size + 1
  end
  end
  end
  
  return size > 0
  end
  
  local function dropLoot(pos, v, ext)
  local corpse = getTileItemById(pos, v.lookCorpse).uid
  if isContainer(corpse) then
    for i = 1, getContainerSize(corpse) do
      doRemoveItem(getContainerItem(corpse, 0).uid)
    end
    local size, cap = 0, getContainerCap(corpse)
      for i = 1, #v.loot do
        if size == cap then
          break
        end
    local tmp = createLoot(v.loot[i], ext)
  if tmp then
  if isContainer(tmp) then
  if createChildLoot(tmp, v.loot[i].child, ext) then
  doAddContainerItemEx(corpse, tmp)
  size = size + 1
  else
  doRemoveItem(tmp)
  end
  else
  doAddContainerItemEx(corpse, tmp)
  size = size + 1
  end
  end
  end
  end
  end
  
  function onKill(cid, target, lastHit)
  if lastHit and isMonster(target) then
  local v = getMonsterInfo(getCreatureName(target))
  if v.lookCorpse > 0 then
  local master = getCreatureMaster(target)
  if not master or master == target then
  addEvent(dropLoot, 0, getThingPos(target), v, getPlayerSlotItem(cid, t.slot).itemid == t.item)
  end
  addEvent(send, 100, cid, getThingPos(target), v.lookCorpse, v.description, getPlayerParty(cid))
  end
  end
  return true
  end

 

O erro voltou, agora na invasão de orc em thais.

252688710_LOOTRING2.thumb.jpg.068918926309abe491bad14b97a47d57.jpg

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por cloudrun2023
      CloudRun - Sua Melhor Escolha para Hospedagem de OTServer!
      Você está procurando a solução definitiva para hospedar seu OTServer com desempenho imbatível e segurança inigualável? Não procure mais! Apresentamos a CloudRun, sua parceira confiável em serviços de hospedagem na nuvem.
       
      Recursos Exclusivos - Proteção DDoS Avançada:
      Mantenha seu OTServer online e seguro com nossa robusta proteção DDoS, garantindo uma experiência de jogo ininterrupta para seus jogadores.
       
      Servidores Ryzen 7 Poderosos: Desfrute do poder de processamento superior dos servidores Ryzen 7 para garantir um desempenho excepcional do seu OTServer. Velocidade e estabilidade garantidas!
       
      Armazenamento NVMe de Alta Velocidade:
      Reduza o tempo de carregamento do jogo com nosso armazenamento NVMe ultrarrápido. Seus jogadores vão adorar a rapidez com que podem explorar o mundo do seu OTServer.
       
      Uplink de até 1GB:
      Oferecemos uma conexão de alta velocidade com até 1GB de largura de banda, garantindo uma experiência de jogo suave e livre de lag para todos os seus jogadores, mesmo nos momentos de pico.
       
      Suporte 24 Horas:
      Estamos sempre aqui para você! Nossa equipe de suporte está disponível 24 horas por dia, 7 dias por semana, para resolver qualquer problema ou responder a qualquer pergunta que você possa ter. Sua satisfação é a nossa prioridade.
       
      Fácil e Rápido de Começar:
      Configurar seu OTServer na CloudRun é simples e rápido. Concentre-se no desenvolvimento do seu jogo enquanto cuidamos da hospedagem.
       
      Entre em Contato Agora!
      Website: https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
      Email: [email protected]
      Telefone: (47) 99902-5147

      Não comprometa a qualidade da hospedagem do seu OTServer. Escolha a CloudRun e ofereça aos seus jogadores a melhor experiência de jogo possível. Visite nosso site hoje mesmo para conhecer nossos planos e começar!
       
      https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
       
      CloudRun - Onde a Velocidade Encontra a Confiabilidade!
       

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por Muvuka
      Abri canal a força creaturescript acho que funcione no creaturescript cria script creaturescript
       
      <channel id="9" name="HELP" logged="yes"/>
      <channel id="12" name="Report Bugs" logged="yes"/>
      <channel id="13" name="Loot" logged="yes"/>
      <channel id="14" name="Report Character Rules Tibia Rules" logged="yes"/>
      <channel id="15" name="Death Channel"/>
      <channel id="6548" name="DexSoft" level="1"/>
      <channel id="7" name="Reports" logged="yes"/>
       
      antes de 
              if(lastLogin > 0) then adicione isso:
                      doPlayerOpenChannel(cid, CHANNEL_HELP) doPlayerOpenChannel(cid, 1,  2, 3) = 1,2 ,3 Channels, entendeu? NÃO FUNCIONA EU QUERO UM MEIO DE ABRI SEM USA A SOURCE
       
      EU NÃO CONSEGUI ABRI EU NÃO TENHO SOURCE
       
       
    • Por bolachapancao
      Rapaziada seguinte preciso de um script que ao utilizar uma alavanca para até 4 jogadores.
      Os jogadores serão teleportados para hunt durante uma hora e depois de uma hora os jogadores serão teleportados de volta para o templo.
       
      Observação: caso o jogador morra ou saia da hunt o evento hunt é cancelado.

      Estou a base canary
      GitHub - opentibiabr/canary: Canary Server 13.x for OpenTibia community.
       
    • Por RAJADAO
      .Qual servidor ou website você utiliza como base? 
      Sabrehaven 8.0
      Qual o motivo deste tópico? 
      Ajuda com novos efeitos
       
      Olá amigos, gostaria de ajuda para introduzir os seguintes efeitos no meu servidor (usando o Sabrehaven 8.0 como base), adicionei algumas runas novas (avalanche, icicle, míssil sagrado, stoneshower & Thunderstorm) e alguns novos feitiços (exevo mas san, exori san, exori tera, exori frigo, exevo gran mas frigo, exevo gran mas tera, exevo tera hur, exevo frigo hur) mas nenhum dos efeitos dessas magias parece existir no servidor, alguém tem um link para um tutorial ou algo assim para que eu possa fazer isso funcionar?
      Desculpe pelo mau inglês, sou brasileiro.

      Obrigado!


      AVALANCHE RUNE id:3161 \/
      (COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)

      STONESHOWER RUNE id:3175 \/
      (COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_STONES)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)

      THUNDERSTORM RUNE id:3202 \/
      (COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_E NERGYHIT)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

      ICICLE RUNE id:3158 \/
      COMBAT_ICEDAMAGE
      CONST_ME_ICEAREA
      CONST_ANI_ICE

      SANTO MÍSSIL RUNA id:3182 \/
      (COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

      CONST_ME_PLANTATTACK (exevo gran mas tera)
      CONST_ME_ICETORNADO (exevo gran mas frigo)
      CONST_ME_SMALLPLANTS (exevo tera hur)
      CONST_ME_ICEAREA (exevo frigo hur)
      CONST_ME_ICEATTACK (exori frigo)
      CONST_ME_CARNIPHILA (exori tera)

      EXORI SAN \/
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      CONST_ME_HOLYDAM IDADE

      EXEVO MAS SAN \/
      CONST_ME_HOLYAREA
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo