Ir para conteúdo

Featured Replies

Postado

x5bjwg.jpg

 

 

Quero remove esse erro, aconteceu depois que retirei o tp.lua, agora como retiro esse erro?

 

 

 

 

5cbs5j.jpg

 


Eu compilei a distro certinho no meu Win 7 testei e esta funcionando, mais quando eu coloco no meu VPS da este erro, preciso muito arrumar este, ja procurei muito e não achei nada.

 

blocklinks.lua

function getFixedText(cid, text, replace)
local wrongWords = {"otservlist.org", "ots-list.pl", "google.br", "83.17.165.189", "hopto.org", "no-ip.org", ".com", "servegame", "serve game", ".serve", ".game"}
local lowerText = string.lower(text)
local noSpaceText = string.gsub(string.gsub(string.gsub(lowerText, "%s", ""), "%p", ""),"-", "")
for w = 1, #wrongWords do
wordLen = string.len(wrongWords[w])
for p = 1, string.len(text) do
if(string.sub(lowerText, p, p+wordLen-1) == wrongWords[w]) then
text = string.sub(text, 1, p-1) .. string.rep(replace, wordLen) .. string.sub(text, p+wordLen)
end
end
end
 
if(string.lower(text) == lowerText) then
for c = 1, #wrongWords do
if(string.find(noSpaceText, string.gsub(string.gsub(wrongWords[c], "%p", ""),"-", "")) ~= nil) then
return "Este link é proibido."
end
end
end
return text
end
 
--[[Channels which are not added to block:
1 - Party Channel
2 - Channel for Staff members
3 - Rule Violation Channel
4 - Channel for Counselors/Tutors
65536 - Private Chat Channel <-- Private Chat cannot be blocked with this script
]]--
local blocked_channels = {5,8,9} --Game-Chat, Real Chat, Help Channel
local trade_channels = {6,7} --All trade channels <- These are also blocked
local replace = "°" --Symbols which are shown instead of forbidden links -> ° 
local delay = {16246,200} -- {empty_storage, lenght of muted}
 
function onSay(cid, words, param, channel)
local fixedWords = getFixedText(cid, words, replace)
 
if words ~= fixedWords and getPlayerAccess(cid) == 0 then
if getPlayerStorageValue(cid,delay[1]) > os.time() then
return doPlayerSendCancel(cid,"You are still muted for ".. getPlayerStorageValue(cid,delay[1])-os.time() .." seconds.")
end
setPlayerStorageValue(cid,delay[1],os.time()+delay[2])
if channel == CHANNEL_DEFAULT then 
doCreatureSay(cid, fixedWords, TALKTYPE_SAY)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.")
return true
elseif isInArray(trade_channels, channel) then 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden on the trade channel.")
return true
elseif isInArray(blocked_channels, channel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." is forbidden.")
doPlayerSendChannelMessage(cid, getCreatureName(cid), fixedWords, TALKTYPE_CHANNEL_Y, channel)
return true
end
end
return false
end 

 

 

2yvnfvn.jpg

 

 

Esse erro apareceu do nada quando estava vendo outra coisa no distro, como resolvo este erro?

 

 

npc.lua

function selfSayChannel(cid, message)
return selfSay(message, cid, false)
end
 
function selfMoveToThing(id)
errors(false)
local thing = getThing(id)
 
errors(true)
if(thing.uid == 0) then
return
end
 
local t = getThingPosition(id)
selfMoveTo(t.x, t.y, t.z)
return
end
 
function selfMoveTo(x, y, z)
local position = {x = 0, y = 0, z = 0}
if(type(x) ~= "table") then
position = Position(x, y, z)
else
position = x
end
 
if(isValidPosition(position)) then
doSteerCreature(getNpcId(), position)
end
end
 
function selfMove(direction, flags)
local flags = flags or 0
doMoveCreature(getNpcId(), direction, flags)
end
 
function selfTurn(direction)
doCreatureSetLookDirection(getNpcId(), direction)
end
 
function getNpcDistanceTo(id)
errors(false)
local thing = getThing(id)
 
errors(true)
if(thing.uid == 0) then
return nil
end
 
local c = getCreaturePosition(id)
if(not isValidPosition©) then
return nil
end
 
local s = getCreaturePosition(getNpcId())
if(not isValidPosition(s) or s.z ~= c.z) then
return nil
end
 
return math.max(math.abs(s.x - c.x), math.abs(s.y - c.y))
end
 
function doMessageCheck(message, keyword)
if(type(keyword) == "table") then
return table.isStrIn(keyword, message)
end
 
local a, b = message:lower(), keyword:lower()
if(keyword == message) then
return true
end
 
return message:find(keyword) and not message:find('(%w+)' .. keyword)
end
 
function doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack)
local amount, subType, ignoreCap, item = amount or 1, subType or 1, ignoreCap and true or false, 0
if(isItemStackable(itemid)) then
if(isItemRune(itemid)) then
amount = amount * subType
end
 
local count = amount
repeat
item = doCreateItemEx(itemid, math.min(100, count))
if(doPlayerAddItemEx(cid, item, ignoreCap) ~= RETURNVALUE_NOERROR) then
return 0, 0
end
 
count = count - math.min(100, count)
until count == 0
return amount, 0
end
 
local a = 0
if(inBackpacks) then
local container, b = doCreateItemEx(backpack, 1), 1
for i = 1, amount do
item = doAddContainerItem(container, itemid, subType)
if(itemid == ITEM_PARCEL) then
doAddContainerItem(item, ITEM_LABEL)
end
 
if(isInArray({(getContainerCapById(backpack) * b), amount}, i)) then
if(doPlayerAddItemEx(cid, container, ignoreCap) ~= RETURNVALUE_NOERROR) then
b = b - 1
break
end
 
a = i
if(amount > i) then
container = doCreateItemEx(backpack, 1)
b = b + 1
end
end
end
 
return a, b
end
 
for i = 1, amount do
item = doCreateItemEx(itemid, subType)
if(itemid == ITEM_PARCEL) then
doAddContainerItem(item, ITEM_LABEL)
end
 
if(doPlayerAddItemEx(cid, item, ignoreCap) ~= RETURNVALUE_NOERROR) then
break
end
 
a = i
end
 
return a, 0
end
 
function doRemoveItemIdFromPosition(id, n, position)
local thing = getThingFromPos({x = position.x, y = position.y, z = position.z, stackpos = 1})
if(thing.itemid ~= id) then
return false
end
 
doRemoveItem(thing.uid, n)
return true
end
 
function getNpcName()
return getCreatureName(getNpcId())
end
 
function getNpcPos()
return getThingPosition(getNpcId())
end
 
function selfGetPosition()
local t = getThingPosition(getNpcId())
return t.x, t.y, t.z
end
 
msgcontains = doMessageCheck
moveToPosition = selfMoveTo
moveToCreature = selfMoveToThing
selfMoveToCreature = selfMoveToThing
selfMoveToPosition = selfMoveTo
isPlayerPremiumCallback = isPremium
doPosRemoveItem = doRemoveItemIdFromPosition
doRemoveItemIdFromPos = doRemoveItemIdFromPosition
doNpcBuyItem = doPlayerRemoveItem
doNpcSetCreatureFocus = selfFocus
getNpcCid = getNpcId
getDistanceTo = getNpcDistanceTo
getDistanceToCreature = getNpcDistanceTo
getNpcDistanceToCreature = getNpcDistanceTo

 

Warmaster Addon 1.lua

local focus = 0
local talk_start = 0
 
function onThingMove(creature, thing, oldpos, oldstackpos)
 
end
 
 
function onCreatureAppear(creature)
 
end
 
 
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
 
 
function onCreatureTurn(creature)
 
end
 
 
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
 
 
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
 
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hiho ' .. getCreatureName(cid) .. ' Eu posso lhe conceder o Warmaster addon 1, para mais infos. diga help...')
focus = cid
talk_start = os.clock()
 
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')
 
elseif focus == cid then
talk_start = os.clock()
 
if msgcontains(msg, 'help') then
selfSay('Para saber o que eh preciso para obter o Warmaster addon 1 diga: addon 1')
 
 
elseif msgcontains(msg, 'addon 1') then
if getPlayerStorageValue(cid,999999) >= 2 then
selfSay('Voce ja tem esse addon.')
 
else if getPlayerStorageValue(cid,999999) == 1 then
selfSay('Preciso de Uma Zaoan Sword e de 100k,Você Trouxe Para Mim?')
addon_state = 2
else
setPlayerStorageValue(cid,999999,1)
selfSay('Preciso de Uma Zaoan Sword e de 100k,Você Trouxe Para Mim?')
end
end
elseif msgcontains(msg, 'yes') and addon_state == 2 then
if doPlayerRemoveItem(cid,2160, 10) == 0 or doPlayerRemoveItem(cid,11301, 1) == 0 then
selfSay('Desculpe mas voce naum os tem...')
else
selfSay('Obrigado, agora voce tem o novo addon da terra dos Warmasters!.')
if getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 335, 1)
setPlayerStorageValue(cid,999999,2)
else
doPlayerAddOutfit(cid, 336, 1)
setPlayerStorageValue(cid,999999,2)
talk_state = 1
end
end
 
 
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Adeus ' .. creatureGetName(cid) .. ', Volte Sempre.')
focus = 0
talk_start = 0
 
elseif msg ~= "" then
selfSay('Como? Eu não entendi!')
talk_state = 0
end
end
end
 
function onCreatureChangeOutfit(creature)
end
 
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo!!...')
end
focus = 0
talk_start = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good Bye')
focus = 0
talk_start = 0
end
end
end

 
Warmaster Addon 2.lua

local focus = 0
local talk_start = 0
 
function onThingMove(creature, thing, oldpos, oldstackpos)
 
end
 
 
function onCreatureAppear(creature)
 
end
 
 
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Good bye then.')
focus = 0
talk_start = 0
end
end
 
 
function onCreatureTurn(creature)
 
end
 
 
function msgcontains(txt, str)
return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end
 
 
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
 
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hiho ' .. getCreatureName(cid) .. ' Eu posso lhe conceder o Warmaster addon 2, para mais infos. diga help...')
focus = cid
talk_start = os.clock()
 
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')
 
elseif focus == cid then
talk_start = os.clock()
 
if msgcontains(msg, 'help') then
selfSay('Para saber o que eh preciso para obter o Warmaster addon 2 diga: addon 2')
 
 
elseif msgcontains(msg, 'addon 2') then
if getPlayerStorageValue(cid,999998) >= 2 then
selfSay('Voce ja tem esse addon.')
 
else if getPlayerStorageValue(cid,999998) == 1 then
selfSay('Preciso de Uma Baiak Sword e 100k , Você Trouxe Para Mim ?')
addon_state = 2
else
setPlayerStorageValue(cid,999998,1)
selfSay('Preciso de Uma Baiak Sword e 100k , Você Trouxe Para Mim ?')
end
end
elseif msgcontains(msg, 'yes') and addon_state == 2 then
if doPlayerRemoveItem(cid,2160, 10) == 0 or doPlayerRemoveItem(cid,8931, 1) == 0 then
selfSay('Desculpe mas voce naum tem os 100k...')
else
selfSay('Obrigado, agora voce tem o novo addon da terra dos Warmasters!.')
if getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 335, 2)
setPlayerStorageValue(cid,999998,2)
else
doPlayerAddOutfit(cid, 336, 2)
setPlayerStorageValue(cid,999998,2)
talk_state = 1
end
end
 
 
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Adeus ' .. creatureGetName(cid) .. ', Volte Sempre.')
focus = 0
talk_start = 0
 
elseif msg ~= "" then
selfSay('Como? Eu não entendi!')
talk_state = 0
end
end
end
 
function onCreatureChangeOutfit(creature)
end
 
function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Proximo!!...')
end
focus = 0
talk_start = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Good Bye')
focus = 0
talk_start = 0
end
end
end

Obrigado, REP+.

Editado por Rodrigo0lg (veja o histórico de edições)

 

                                                           

55f6tc.gif                     

  • Respostas 18
  • Visualizações 924
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
  • Autor

O primeiro é só excluir a tag do monster.xml e o resto é só ir tirando os scripts e as tags dos xml.Claro que se os scripts não tiverem utilidade no seu server...

Quer dizer que eu tenho que tirar a tag do Dark Abominator do monster.xml? 

So que isso iria tirar todos os outros Dark Abominator do mapa não iria iria?

Aqui o tp.lua que eu excluir do globalevents.

 

tp.lua

local tpId = 1387
local tps = {
["Dark Abominator"] = {pos = {x=839, y=566, z=8}, toPos = {x=846, y=551, z=8}, time = 30},
}
 
function removeTp(tp)
local t = getTileItemById(tp.pos, tpId)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(tp.pos, CONST_ME_POFF)
end
end
 
function onDeath(cid)
local tp = tps[getCreatureName(cid)]
if tp then
doCreateTeleport(tpId, tp.toPos, tp.pos)
doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(removeTp, tp.time*1000, tp)
end
return TRUE
end

 
Eu so queror remover mesmo esse erro do meu Distro, porque quando estava com esse script, tava dando erro falando que o Tile não existia, e então resolvi tirar ele, so que agora ta dando aquele erro la.

Editado por Rodrigo0lg (veja o histórico de edições)

 

                                                           

55f6tc.gif                     

Postado
  • Autor

É só tirar a tag do globalevents.xml então brother !

Mais isso eu fiz logo em seguida, e depois que eu tirei tudo do globaevents começo a esse outro erro.

Sei que tem alguma coisa executando algo relacionado ao script que eu tirei por isso quero tirar, não preciso dela.

Editado por Rodrigo0lg (veja o histórico de edições)

 

                                                           

55f6tc.gif                     

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo