Ir para conteúdo
  • 0

Ajuda Em Creaturescript Funcion Onkill (solved)


Bennyhappy

Pergunta

Este código me ajuda a não funcionar correctamente, é para um evento
(solved use movement no momento do morir) please close this topic
local bmale = createConditionObject(CONDITION_OUTFIT)
                setConditionParam(bmale, CONDITION_PARAM_TICKS, -1)
                addOutfitCondition(bmale, {lookType = 328, lookHead = 59, lookBody =114, lookLegs = 85, lookFeet = 85, lookTypeEx = 0, lookAddons = 3})


    local bfemale = createConditionObject(CONDITION_OUTFIT)
                setConditionParam(bfemale, CONDITION_PARAM_TICKS, -1)
                addOutfitCondition(bfemale, {lookType = 329, lookHead = 59, lookBody =114, lookLegs = 85, lookFeet = 85, lookTypeEx = 0, lookAddons = 3})


     local StorageNovia = 38381
     local arena_event_pos = {x = 794, y = 513, z = 7} --- centro de la arena del evento
local zonaSpawn = {x = 794, y = 528, z = 6} -- zona spawn
local timeSpawn = 15
function onKill(cid, target)


if getPlayerStorageValue(target, StorageNovia) >= 1 then
setPlayerStorageValue(target, StorageNovia, 0)
doAddCondition(target, bmale)
doTeleportThing(target, arena_event_pos)
doSendMagicEffect(getPlayerPosition(target), CONST_ME_TELEPORT)
addEvent(SendSpawnEventNovia, timeSpawn * 1000, target)


doAddCondition(cid, bfemale)
setPlayerStorageValue(cid, StorageNovia, 1) 
end
return true
end




function SendSpawnEventNovia(target) 
doTeleportThing(target, arena_event_pos)
doSendMagicEffect(getPlayerPosition(target), CONST_ME_TELEPORT) 
end

[18/03/2014 14:46:10] [Error - CreatureScript Interface] 
[18/03/2014 14:46:10] In a timer event called from: 
[18/03/2014 14:46:10] data/creaturescripts/scripts/addonFrags.lua:onKill
[18/03/2014 14:46:10] Description: 
[18/03/2014 14:46:10] (luaDoTeleportThing) Thing not found


[18/03/2014 14:46:10] [Error - CreatureScript Interface] 
[18/03/2014 14:46:10] In a timer event called from: 
[18/03/2014 14:46:10] data/creaturescripts/scripts/addonFrags.lua:onKill
[18/03/2014 14:46:10] Description: 
[18/03/2014 14:46:10] (luaGetThingPosition) Thing not found

 

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

3 respostass a esta questão

Posts Recomendados

  • 0

Tenta Assim:

 

local bmale = createConditionObject(CONDITION_OUTFIT)
setConditionParam(bmale, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(bmale, {lookType = 328, lookHead = 59, lookBody =114, lookLegs = 85, lookFeet = 85, lookTypeEx = 0, lookAddons = 3})


local bfemale = createConditionObject(CONDITION_OUTFIT)
setConditionParam(bfemale, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(bfemale, {lookType = 329, lookHead = 59, lookBody =114, lookLegs = 85, lookFeet = 85, lookTypeEx = 0, lookAddons = 3})


local StorageNovia = 38381
local arena_event_pos = {x = 794, y = 513, z = 7} --- centro de la arena del evento
local zonaSpawn = {x = 794, y = 528, z = 6} -- zona spawn
local timeSpawn = 15

function onKill(cid, target)

if getPlayerStorageValue(target, StorageNovia) >= 1 then
setPlayerStorageValue(target, StorageNovia, 0)
doAddCondition(target, bmale)
doTeleportThing(cid, arena_event_pos)
doSendMagicEffect(getPlayerPosition(target), CONST_ME_TELEPORT)
addEvent(SendSpawnEventNovia, timeSpawn * 1000, target)
doAddCondition(cid, bfemale)
setPlayerStorageValue(cid, StorageNovia, 1)
end
return true
end




function SendSpawnEventNovia(cid,target)
doTeleportThing(cid, arena_event_pos)
doSendMagicEffect(getPlayerPosition(target), CONST_ME_TELEPORT)
end

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...