What's new

Tp po zabiciu potwora - problem

Status
Not open for further replies.

pokebols

Active User
Joined
Dec 9, 2009
Messages
55
Reaction score
0
Witam.
Mam problem z tp po zabiciu potwora, gdy wszysko powpisywa?em i uruchomi?em silnik wyskoczy? b??d w konsoli :
Code:
[Warning - Monster :: Monster] Unknown event name - frugo 
[Warning - Monster :: Monster] Unknown event name - fruge
[Warning - Monster :: Monster] Unknown event name - frugu
Korzysta?em z skryptu : http://tibia.net.pl/request/177330-tp-po-zabiciu-potwora.html

W potworku doda?em to tak :

Code:
    <voice sentence="Boisz sie ?" /> 
  </voices>
<script> 
		<event name="frugo"/> 
</script>  
<loot>
    <item id="2160" chance="2000" countmax="2" /> <!-- cc -->

Natomiast skrypt wygl?da tak :
Code:
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "frugo")
local creaturename = getCreatureName(cid)
--- miejsce gdzie tp zostanie utworzone
local pos1 = {x=566, y=929, z=12, stackpos=2}
--- gdzie teleport Cie teleportuje:
local pos2 = {x=1003, y=1000, z=7, stackpos=1}
local time_to_pass = 180 -- czas po jakim zniknie tp w sekundach
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "Well done! Teleport appeared in the middle of room. You got 3 minuts to get into or it will dissapear!."
if creaturename == 'frugo' then
teleport = doCreateTeleport(tpID, pos2, pos1)
doSendMagicEffect(pos1, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBossWard, (1000*time_to_pass))
end
end
function removeTeleportInBossWard()
--- miejsce gdzie tp zostanie utworzone
if getThingfromPos({x=566, y=929, z=12, stackpos=1}).itemid == 5023 then
--- miejsce gdzie tp zostanie utworzone
doRemoveItem(getThingfromPos({x=566, y=929, z=12, stackpos=1}).uid,1)
--- miejsce gdzie tp zostanie utworzone
doSendMagicEffect({x=566, y=929, z=12, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
Notka moderatorska:
Na przysz?o?? u?ywaj znacznik?w
Code:
 ~Eturl[/mod]
 

Oskar

Forum friend
Joined
Jan 24, 2009
Messages
2,256
Reaction score
331
Odp: Tp po zabiciu potwora - problem

PHP:
<script> 
		<event name="frugo"/> 
</script>
W potworze funkcj? do kt?rej ma si? odwo?ywa? nazwa?e? 'frugo', a w creaturescripts.xml jest ca?kiem inna nazwa nadana.
 
Status
Not open for further replies.
Top