CreatureEvent When a player dies it says "RIP"

Discussion in 'GlobalEvents, Spells & CreatureEvents' started by ghettobird, Aug 22, 2013.

  1. ghettobird

    ghettobird LUA newbie

    Joined:
    Aug 17, 2013
    Messages:
    679
    Likes Received:
    130
    Best Answers:
    0
    Hello otlanders, sorry for releasing so many scripts that maybe you have seen before but i'm just so excited that i can make scripts now... :)

    so let's get started, go to creaturescripts/scripts make a file called death.lua and put this inside,
    Code (Lua):
    1.  function onDeath(cid, corpse, deathList)
    2.     if(isPlayer(cid) == true) then
    3.     for _, pos in pairs(getArea(getCreaturePosition(cid), 1, 1)) do
    4.         doSendMagicEffect(pos, 65)
    5.         end
    6.         doCreatureSay(cid, getCreatureName(cid) .. " killed by " .. getCreatureName(deathList[1]) .. " [R.I.P]", TALKTYPE_ORANGE_1)
    7.     end
    8.     return true
    9. end
    now you need to register it to login.lua
    Code (Lua):
    1. registerCreatureEvent(cid, "death")
    now go to creaturescripts.xml and put this
    Code (Lua):
    1. <event type="death" name="death" event="script" value="death.lua"/>
    i hope you guys like it !
     
  2. Ray Rewind

    Ray Rewind Doctor

    Joined:
    Jun 6, 2009
    Messages:
    1,350
    Likes Received:
    74
    Best Answers:
    0
    maybe picture how it looks like ?^.^
     
  3. ghettobird

    ghettobird LUA newbie

    Joined:
    Aug 17, 2013
    Messages:
    679
    Likes Received:
    130
    Best Answers:
    0
    i can't open a server to test my scripts atm :p
     
  4. Smokiee Jo

    Smokiee Jo Website Scripter

    Joined:
    Nov 8, 2012
    Messages:
    198
    Likes Received:
    16
    Best Answers:
    0
    otland.png


    a little help in hand for you mate :) nice scripts works, Tested for 0.4
     
  5. ghettobird

    ghettobird LUA newbie

    Joined:
    Aug 17, 2013
    Messages:
    679
    Likes Received:
    130
    Best Answers:
    0
    thanks smokiee, i'm glad you liked it! ^_^
     
  6. Smokiee Jo

    Smokiee Jo Website Scripter

    Joined:
    Nov 8, 2012
    Messages:
    198
    Likes Received:
    16
    Best Answers:
    0
    ty would you be able to make a script so once someone "gets added to VIP" it would say VIP the same as the "tutor" script :D would be awesome thanks :D:D

    also np here to help out :)
     
  7. ghettobird

    ghettobird LUA newbie

    Joined:
    Aug 17, 2013
    Messages:
    679
    Likes Received:
    130
    Best Answers:
    0
    you mean vip effects? sure :) here you go,

    Code (Lua):
    1. function onThink(interval, lastExecution)
    2.     for k, v in pairs(getPlayersOnline()) do
    3.         if(getPlayerStorage(cid, storageinyourvipscript) then
    4.             doSendMagicEffect(getPlayerPosition(v), CONST_ME_GIFT_WRAPS)
    5.             doSendAnimatedText(getPlayerPosition(v), "VIP", TEXTCOLOR_RED)
    6.         end
    7.     end
    8.     return true
    9. end
    ps: when you want scripts from me go to the thread "Ghettobird's scripts" and post there so we don't go offtopic ^_^
     
  8. wishy85

    wishy85 GOD Smokey

    Joined:
    May 10, 2010
    Messages:
    150
    Likes Received:
    3
    Best Answers:
    0
    i love it simple but good for a laugh :) and atleast you no when someone dies
     
  9. silveralol

    silveralol Well-Known Member

    Joined:
    Mar 16, 2010
    Messages:
    1,363
    Likes Received:
    164
    Best Answers:
    3
    Please do it for tfs 1.0
    :D
     
  10. andjelo96

    andjelo96 VENORE-WAR.DDNS.NET

    Joined:
    Jun 22, 2016
    Messages:
    273
    Likes Received:
    14
    Best Answers:
    2
    Works on 0.3.6 :D
     

Share This Page

Loading...