1
Pedido script summon monster Miér Sep 12, 2018 4:11 pm
Sotomayor
Miembro


Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...
<event type="kill" name="AAAAAAAA" event="script" value="script.lua"/>
registerCreatureEvent(cid, "AAAAAAAA")
local creatureName = 'cave rat' -- creaturename (must be lowercase letters)
local newCreature = 'rat'
local creatureSay = 'I am saying something'
function onKill(cid, target, damage, flags)
if isPlayer(target) then
return false
end
local name = getCreatureName(target):lower()
if name ~= creatureName then
return false
end
local position = getCreaturePosition(target)
-- player says something
-- doCreatureSay(cid, ''.. creatureSay ..'', TALKTYPE_ORANGE_1)
-- creature says something
doCreatureSay(cid, ''.. creatureSay ..'', TALKTYPE_ORANGE_1, false, 0, position)
-- create monster near the corpse (no delay)
doCreateMonster(newCreature, position)
-- create monster on the corpse (very small delay, that may or may not be noticeable to the player, however is noticeable with god on local connection)
-- addEvent(doCreateMonster, 0, newCreature, position)
return true
end
local monster = "cave rat"
local summon = "rat"
function onKill(cid, target)
if isPlayer(target) then
return true
end
if isPlayer(cid) and getCreatureName(target) == monster then
local t = getThingPos(target)
doCreatureSay(target, "I'm not finished with you yet! ", TALKTYPE_ORANGE_1)
doSummonCreature(summon, t)
doSendMagicEffect(t,49)
end
return true
en
Sotomayor escribió:no quizo, esta vez no sucedio nada ni error en la consola ni nada![]()
local monster = "cave rat"
local summon = "rat"
function onKill(cid, target)
if isPlayer(target) then
return true
end
if isPlayer(cid) and getCreatureName(target) == monster then
local t = getThingPos(target)
doCreatureSay(target, "I'm not finished with you yet! ", TALKTYPE_ORANGE_1)
doSummonCreature(summon, t)
doSendMagicEffect(t,49)
end
return true
end
local monster = "cave rat"
local summon = "rat"
function onKill(cid, target)
if isPlayer(target) then
return true
end
if isPlayer(cid) and getCreatureName(target) == monster then
local t = getThingPos(target)
doCreatureSay(target, "I'm not finished with you yet! ", TALKTYPE_ORANGE_1)
doCreateMonster(summon, t)
doSendMagicEffect(t,49)
end
return true
end
Sotomayor escribió:No amigo aun nada,el primero que me habias hecho si funciona, solo que el segundo monstruo se queda pegado y los demas scripts ya no quisieron funcionar
function onKill(cid, target, lastHit)
local m = {
["Cave Rat"] = { }
}
local newCreature = 'Rat'
local monster = m[getCreatureName(target)]
local position = getCreaturePosition(target)
if(monster) then
doCreateMonster(newCreature, position)
doCreatureSay(cid, "Mortality!", TALKTYPE_ORANGE_1)
end
return true
end
Temas similares
Permisos de este foro:
No puedes responder a temas en este foro.
|
|