witmar
New Member
[Error - CreatureScript Interface]
data/creaturescripts/scripts/dedpythius.lua
nDeath
data/creaturescripts/scripts/dedpythius.lua
Last edited:
[Error - CreatureScript Interface]
data/creaturescripts/scripts/dedpythius.luanDeath
function onDeath(cid, corpse, killer)
local zabojca = 'Pythius The Rotten'
if getCreatureName(killer) == zabojca and isMonster(killer) then
doRemoveCreature(killer)
end
return TRUE
end
registerCreatureEvent(cid, "dedpythius")
<event type="death" name="dedpythius" event="script" value="dedpythius.lua"/>
<event type="ondeath" name="dedpythius" event="script" value="dedpythius.lua"/>
@2xup
Nie prawda.
Na przykladzie Azreusa:
@up jaki silnik?Code:<event type="death" name="Azerus" event="script" value="azerus.lua"/>
function onDeath(cid, corpse, killer)
local zabojca = 'Pythius The Rotten'
if getCreatureName(killer) == zabojca then
doRemoveCreature(killer)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "First.")
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Second.")
end
return TRUE
end
Lol2 przerobiłem twój skrypt, nawet nie wiedziałem ze od Azerus'a :ninja:
PHP:function onDeath(cid, corpse, killer) local zabojca = 'Pythius The Rotten' if getCreatureName(killer) == zabojca then doRemoveCreature(killer) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "First.") else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Second.") end return TRUE end
Powiedz czy first czy second ci sie wyswietla jak zabijesz.
function onDeath(cid, corpse, killer)
if getCreatureName(killer) == 'Pythius The Rotten' then
doRemoveCreature(killer)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "First.")
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Second.")
end
return TRUE
end
sprawdz nazwe potwora ;p
PHP:function onDeath(cid, corpse, killer) if getCreatureName(killer) == 'Pythius The Rotten' then doRemoveCreature(killer) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "First.") else doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Second.") end return TRUE end
[Error - CreatureScript Interface]
data/creaturescripts/scripts/dedpythius.lua:onDeath
Description:
(luaGetCreatureName) Creature not found
function onDeath(cid, corpse, deathList)
if getCreatureName(cid):lower() == "pythius the rotten" then
for i = 1, #deathList do
local killer = deathList[i]
if isPlayer(killer) then
doCreatureSay(killer, "NICE FIGHTING LITTLE WORM, YOUR VICTORY SHALL BE REWARDED!", TALKTYPE_ORANGE_1, false, nil, {x=32572, y=31403, z=15})
doSendMagicEffect(getCreaturePosition(killer), CONST_ME_TELEPORT)
doTeleportThing(killer, {x=32577, y=31403, z=15})
doSendMagicEffect({x=32577, y=31403, z=15}, CONST_ME_TELEPORT)
break
end
end
end
return true
end
pytalem...tak trudno sprawdzić??