bom mano,abre o arquivo do npc e envia akew,ai eu edito e repasso pra vc..
- Forums
- xTibia - Notícias e Suporte
- Soluções
- Archived
- 2 Duvidas Em Um Topico So :s
info
Group: Campones
Joined: 02/01/12
Posts: 11
Reputation: 0
Tibia Character: Twinmaster Shakal

info
Group: Artesão
Joined: 20/04/10
Posts: 109
Reputation: +23
Tibia Character: Charles Mil

Script do npc para me ajudar ou se tu quiser uma vaga para me ajudar em ot me add msn charleskassab1@hotmail.com
local target = 0
local prevTarget = 0
local maxChaseDistance = 100
local origPos = 0
local lastAttack = 0
local followTimeout = 100
local function isSkulled(cid)
if(getPlayerSkullType(cid) >= 3 and isPlayerPzLocked(cid) == TRUE) then
return true
end
return false
end
local function goToOrigPos()
target = 0
lastAttack = 0
selfFollow(0)
doTeleportThing(getNpcCid(), origPos)
end
local function updateTarget()
if(isPlayer(target) == FALSE) then
goToOrigPos()
elseif(not isSkulled(target)) then
selfSay("Now, behave in the future.")
goToOrigPos()
end
if(target == 0) then
local list = getSpectators(getNpcPos(), 9, 9, false)
for i = 1, table.getn(list) do
local _target = list
if(_target ~= 0) then
if(isPlayer(_target) == TRUE and isSkulled(_target)) then
if(getTilePzInfo(getCreaturePosition(_target)) == FALSE) then
if(selfFollow(_target)) then
target = _target
if(target ~= prevTarget) then
selfSay("Noob corre vai lixao!!")
end
prevTarget = target
break
end
end
end
end
end
end
end
function onCreatureAppear(cid)
if(cid == getNpcCid()) then
origPos = getNpcPos()
end
end
function onCreatureDisappear(cid)
if(cid == target) then
goToOrigPos()
end
end
function onCreatureMove(creature, oldPos, newPos)
--
end
function onThink()
updateTarget()
if(target == 0) then
return
end
local playerPos = getCreaturePosition(target)
local myPos = getNpcPos()
if(myPos.z ~= playerPos.z) then
goToOrigPos()
return
end
if(math.abs(myPos.x - origPos.x) > maxChaseDistance or math.abs(myPos.y - origPos.y) > maxChaseDistance) then
selfSay("Depois eu te pego.")
goToOrigPos()
return
end
if(lastAttack == 0) then
lastAttack = os.clock()
end
if(os.clock() - lastAttack > followTimeout) then
selfSay("You got me this time, but just wait.")
goToOrigPos()
return
end
if((math.abs(playerPos.x - myPos.x) <= 1) and (math.abs(playerPos.y - myPos.y) <= 1)) then
doTargetCombatHealth(getNpcCid(), target, COMBAT_LIFEDRAIN, -1000, -1000, CONST_ME_EXPLOSIONAREA)
lastAttack = os.clock()
end
end


info
Group: Artesão
Joined: 20/04/10
Posts: 109
Reputation: +23
Tibia Character: Charles Mil
Gente preciso da ajuda de voces urgente.
1. Como boto para matarem o npc cityguard
2. Meu baiak por um tempo (é raro) ele da nao enviar e fecha o que sera?
Bom gente essas são as minhas duvidas obrigado
Ou se quiserem me ajudar pelo ot mesmo ta ae baiaktheot.servegame.com 8.6