Co nowego?
Tibia.net.pl

PO ZMIANIE SKRYPTU FORUM MOGĄ WYSTĘPOWAĆ PROBLEMY Z LOGOWANIEM. "ZRESETUJ HASŁO(klik)", ABY SIĘ ZALOGOWAĆ .

JEŻELI NIE PAMIĘTASZ STAREGO E-MAILA ZAJRZYJ NA NASZEGO "DISCORDA(klik)" LUB "NAPISZ E-MAILA(klik)"

Creaturescripts (TFS 0.3.6+)Efekt po zabiciu gracza

Status
Zamknięty.

Thorge D

Stały bywalec
Dołączył
Lipiec 24, 2014
Posty
300
Liczba reakcji
29
Autor: elljot

Po zabiciu potwora/gracza na miejscu zw?ok pojawia si? animacja/napis
Ja wybra?em Yalaharighost.


Zaczynamy!

Kod:

Otwieramy plik login.lua
data/creaturescripts/scripts/login.lua
i na samym ko?cu dodajemy:
[LUA]registerCreatureEvent(cid, "duszek") [/LUA]
powinno to wygl?da? mniej wi?cej tak:
[LUA]registerCreatureEvent(cid, "duszek")
return true

end [/LUA]

Do creaturescript.xml dodajemy wpis:
[XML]<event type="kill" name="duszek" script="duszek.lua"/> [/XML]

Tworzymy plik duszek.lua a w nim:
[LUA]function onKill(cid, killer)
doSendMagicEffect(getCreaturePosition(killer), CONST_ME_YALAHARIGHOST)
return true
end[/LUA]
Mo?na te? doda? kolorowy napis, pasuj?cy do war?w, wystarczy doda? linijk?:
[LUA]doSendAnimatedText(getCreaturePosition(cid), "twoj_tekst", math.random(1, 255))[/LUA]

W ten sam spos?b mo?na zmieni? efekt zmieniaj?c ten tekst:
[LUA]function onKill(cid, killer)
doSendMagicEffect(getCreaturePosition(killer), CONST_ME_YALAHARIGHOST)
return true
end[/LUA]

Na efekt z tej listy:
[LUA]CONST_ME_DRAWBLOOD = 0
CONST_ME_LOSEENERGY = 1
CONST_ME_POFF = 2
CONST_ME_BLOCKHIT = 3
CONST_ME_EXPLOSIONAREA = 4
CONST_ME_EXPLOSIONHIT = 5
CONST_ME_FIREAREA = 6
CONST_ME_YELLOW_RINGS = 7
CONST_ME_GREEN_RINGS = 8
CONST_ME_HITAREA = 9
CONST_ME_TELEPORT = 10
CONST_ME_ENERGYHIT = 11
CONST_ME_MAGIC_BLUE = 12
CONST_ME_MAGIC_RED = 13
CONST_ME_MAGIC_GREEN = 14
CONST_ME_HITBYFIRE = 15
CONST_ME_HITBYPOISON = 16
CONST_ME_MORTAREA = 17
CONST_ME_SOUND_GREEN = 18
CONST_ME_SOUND_RED = 19
CONST_ME_POISONAREA = 20
CONST_ME_SOUND_YELLOW = 21
CONST_ME_SOUND_PURPLE = 22
CONST_ME_SOUND_BLUE = 23
CONST_ME_SOUND_WHITE = 24
CONST_ME_BUBBLES = 25
CONST_ME_CRAPS = 26
CONST_ME_GIFT_WRAPS = 27
CONST_ME_FIREWORK_YELLOW = 28
CONST_ME_FIREWORK_RED = 29
CONST_ME_FIREWORK_BLUE = 30
CONST_ME_STUN = 31
CONST_ME_SLEEP = 32
CONST_ME_WATERCREATURE = 33
CONST_ME_GROUNDSHAKER = 34
CONST_ME_HEARTS = 35
CONST_ME_FIREATTACK = 36
CONST_ME_ENERGYAREA = 37
CONST_ME_SMALLCLOUDS = 38
CONST_ME_HOLYDAMAGE = 39
CONST_ME_BIGCLOUDS = 40
CONST_ME_ICEAREA = 41
CONST_ME_ICETORNADO = 42
CONST_ME_ICEATTACK = 43
CONST_ME_STONES = 44
CONST_ME_SMALLPLANTS = 45
CONST_ME_CARNIPHILA = 46
CONST_ME_PURPLEENERGY = 47
CONST_ME_YELLOWENERGY = 48
CONST_ME_HOLYAREA = 49
CONST_ME_BIGPLANTS = 50
CONST_ME_CAKE = 51
CONST_ME_GIANTICE = 52
CONST_ME_WATERSPLASH = 53
CONST_ME_PLANTATTACK = 54
CONST_ME_TUTORIALARROW = 55
CONST_ME_TUTORIALSQUARE = 56
CONST_ME_MIRRORHORIZONTAL = 57
CONST_ME_MIRRORVERTICAL = 58
CONST_ME_SKULLHORIZONTAL = 59
CONST_ME_SKULLVERTICAL = 60
CONST_ME_ASSASSIN = 61
CONST_ME_STEPSHORIZONTAL = 62
CONST_ME_BLOODYSTEPS = 63
CONST_ME_STEPSVERTICAL = 64
CONST_ME_YALAHARIGHOST = 65
CONST_ME_BATS = 66
CONST_ME_SMOKE = 67
CONST_ME_INSECTS = 68
CONST_ME_NONE = 255[/LUA]

U mnie ten skrypt wygl?da? tak:
[LUA]function onKill(cid, killer)
doSendMagicEffect(getCreaturePosition(killer), CONST_ME_YALAHARIGHOST)
doSendAnimatedText(getCreaturePosition(cid), "! EXP !", math.random(1, 255))
return true [/LUA]

//Je?eli efekty s? nie kompletne, to prosz? o aktualny ich spis.
 

Dantez

Moim sekretem jest ciasto
Dołączył
Maj 22, 2008
Posty
1206
Liczba reakcji
201
Odp: (TFS 0.3.6+)Efekt po zabiciu gracza

Poprawiona lista:

[LUA]CONST_ME_DRAWBLOOD = 0
CONST_ME_LOSEENERGY = 1
CONST_ME_POFF = 2
CONST_ME_BLOCKHIT = 3
CONST_ME_EXPLOSIONAREA = 4
CONST_ME_EXPLOSIONHIT = 5
CONST_ME_FIREAREA = 6
CONST_ME_YELLOW_RINGS = 7
CONST_ME_GREEN_RINGS = 8
CONST_ME_HITAREA = 9
CONST_ME_TELEPORT = 10
CONST_ME_ENERGYHIT = 11
CONST_ME_MAGIC_BLUE = 12
CONST_ME_MAGIC_RED = 13
CONST_ME_MAGIC_GREEN = 14
CONST_ME_HITBYFIRE = 15
CONST_ME_HITBYPOISON = 16
CONST_ME_MORTAREA = 17
CONST_ME_SOUND_GREEN = 18
CONST_ME_SOUND_RED = 19
CONST_ME_POISONAREA = 20
CONST_ME_SOUND_YELLOW = 21
CONST_ME_SOUND_PURPLE = 22
CONST_ME_SOUND_BLUE = 23
CONST_ME_SOUND_WHITE = 24
CONST_ME_BUBBLES = 25
CONST_ME_CRAPS = 26
CONST_ME_GIFT_WRAPS = 27
CONST_ME_FIREWORK_YELLOW = 28
CONST_ME_FIREWORK_RED = 29
CONST_ME_FIREWORK_BLUE = 30
CONST_ME_STUN = 31
CONST_ME_SLEEP = 32
CONST_ME_WATERCREATURE = 33
CONST_ME_GROUNDSHAKER = 34
CONST_ME_HEARTS = 35
CONST_ME_FIREATTACK = 36
CONST_ME_ENERGYAREA = 37
CONST_ME_SMALLCLOUDS = 38
CONST_ME_HOLYDAMAGE = 39
CONST_ME_BIGCLOUDS = 40
CONST_ME_ICEAREA = 41
CONST_ME_ICETORNADO = 42
CONST_ME_ICEATTACK = 43
CONST_ME_STONES = 44
CONST_ME_SMALLPLANTS = 45
CONST_ME_CARNIPHILA = 46
CONST_ME_PURPLEENERGY = 47
CONST_ME_YELLOWENERGY = 48
CONST_ME_HOLYAREA = 49
CONST_ME_BIGPLANTS = 50
CONST_ME_CAKE = 51
CONST_ME_GIANTICE = 52
CONST_ME_WATERSPLASH = 53
CONST_ME_PLANTATTACK = 54
CONST_ME_TUTORIALARROW = 55
CONST_ME_TUTORIALSQUARE = 56
CONST_ME_MIRRORHORIZONTAL = 57
CONST_ME_MIRRORVERTICAL = 58
CONST_ME_SKULLHORIZONTAL = 59
CONST_ME_SKULLVERTICAL = 60
CONST_ME_ASSASSIN = 61
CONST_ME_STEPSHORIZONTAL = 62
CONST_ME_BLOODYSTEPS = 63
CONST_ME_STEPSVERTICAL = 64
CONST_ME_YALAHARIGHOST = 65
CONST_ME_BATS = 66
CONST_ME_SMOKE = 67
CONST_ME_INSECTS = 68
CONST_ME_NONE = 255[/LUA]
 

Thorge D

Stały bywalec
Dołączył
Lipiec 24, 2014
Posty
300
Liczba reakcji
29
Odp: (TFS 0.3.6+)Efekt po zabiciu gracza

Poprawiona tak?e w pierwszym po?cie.
 

sprytnaaaaa

Stały bywalec
Dołączył
Kwiecień 20, 2011
Posty
342
Liczba reakcji
4
Odp: (TFS 0.3.6+)Efekt po zabiciu gracza

jak to ju? jest w tfs to po co to udost?pnia? ?
 

Thorge D

Stały bywalec
Dołączył
Lipiec 24, 2014
Posty
300
Liczba reakcji
29
Odp: (TFS 0.3.6+)Efekt po zabiciu gracza

By by?o wiadome dla nowicjuszy w ?wiecie ots.
 
Status
Zamknięty.
Do góry