Advertisement
Guest User

Login Script

a guest
May 13th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.85 KB | None | 0 0
  1. local killnpc = NPCID
  2. local rezznpc = NPCID
  3. local startq = QUESTID
  4. local _x
  5. local _y
  6. local _z
  7. local _o
  8. local _phas
  9. local _hp
  10. function FirstLogin(event, pPlayer)
  11.      _phas = pPlayer:GetPhase()
  12.      _hp = pPlayer:GetHealth()
  13.      pPlayer:SetPhase(2)
  14.      _x = pPlayer:GetX()
  15.      _y = pPlayer:GetY()
  16.      _z = pPlayer:GetZ()
  17.      _o = pPlayer:GetO()
  18.      RegisterTimedEvent("creatureKiller", 10000, 0, pUnit, event, pPlayer)
  19. end
  20.  
  21. function creatureKiller(pUnit, event, pPlayer)
  22.     pUnit = pPlayer:SpawnCreature(killnpc, _x+2, _y+2, _z, _o+180, 14, 12000, 0, 0, 0, 2)
  23.     pUnit:SendChatMessage(12, 0, "WAS TUST DU HIER?! NIEMAND HAT AUF MEINEM SERVER ETWAS VERLOREN! ICH WERDE DICH VERNICHTEN!!")
  24.     pUnit:CastSpellOnTarget(33331, pUnit:GetClosestPlayer())
  25.     pPlayer:SetHealth(-1)
  26.     pUnit:Despawn(0, 0)
  27.     RegisterTimedEvent("creatureRezzer", 5000, 0, pUnit, event, pPlayer)
  28. end
  29.  
  30. function creatureRezzer(pUnit, event, pPlayer)
  31.     pUnit = pPlayer:SpawnCreature(rezznpc, _x+15, _y+15, _z+30, _o+180, 35, 12000, 0, 0, 0, 2)
  32.  
  33.     pUnit:SetFlying()
  34.     pUnit:MoveTo(_x+13, _y+13, _z+24)
  35.     pUnit:MoveTo(_x+10, _y+10, _z+20)
  36.     pUnit:MoveTo(_x+7, _y+7, _z+15)
  37.     pUnit:MoveTo(_x+5, _y+5, _z+2)
  38.  
  39.     local klasse = pPlayer:GetPlayerClass()
  40.     pUnit:SendChatMessage(11, 0, "Warum bist du denn tot?! Ich helfe dir edler "..klasse.."!")
  41.     pUnit:CastSpellOnTarget(50769, pUnit:GetClosestPlayer())
  42.     pPlayer:SetHealth(_hp)
  43.     local spieler = pPlayer:GetPlayerName()
  44.     pUnit:SendChatMessage(11, 0, "Viel Spass noch auf dem Server "..spieler.."!")
  45.     pUnit:Despawn(0, 0)
  46.     pPlayer:SetPhase(_phas)
  47.     pPlayer:RegisterEvent("startquest", 0, 0)
  48. end
  49.  
  50. function startquest(pPlayer, event)
  51.     pPlayer:StartQuest(startq)
  52.     pPlayer:SendBroadcastMessage("Du hast soeben die Startquest bekommen!")
  53. end
  54.  
  55. RegisterServerHook(3, "FirstLogin")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement