Advertisement
Guest User

Untitled

a guest
Sep 8th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. function onLogin(cid)
  2. local player = Player(cid)
  3.  
  4. local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
  5. if player:getLastLoginSaved() <= 0 then
  6. loginStr = loginStr .. " Please choose your outfit."
  7. player:sendOutfitWindow()
  8. else
  9. if loginStr ~= "" then
  10. player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
  11. end
  12.  
  13. loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
  14. end
  15. player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
  16.  
  17. player:registerEvent("KillingInTheNameOf")
  18. player:registerEvent("taskw")
  19. player:registerEvent("PlayerDeath")
  20. player:registerEvent("SvargrondArenaKill")
  21. player:registerEvent("pvparena")
  22. player:registerEvent("dallheim")
  23. player:registerEvent("inquisitionQuestBosses")
  24. player:registerEvent("inquisitionQuestUngreez")
  25. player:registerEvent("demonOakDeath")
  26. player:registerEvent("demonOakLogout")
  27. player:registerEvent("smith")
  28. player:registerEvent("smelt")
  29. player:registerEvent("tan")
  30.  
  31. if getPlayerStorageValue(cid,17101) == 1 then
  32. setPlayerStorageValue(cid,17101,0)
  33. end
  34. if getPlayerStorageValue(cid,17102) > 1 then
  35. if getPlayerStorageValue(cid,17102) < os.time() then
  36. doPlayerRemoveMount(cid, 22)
  37. doPlayerRemoveMount(cid, 23)
  38. doPlayerRemoveMount(cid, 24)
  39. doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons})
  40. doPlayerSendTextMessage(cid,18,"Your horse contract has ended.")
  41. doCreatureSetStorage(cid, 17102, 0)
  42. end
  43. end
  44.  
  45. for i = 40000, 40012 do
  46. if player:getStorageValue(i) < 10 then
  47. player:setStorageValue(i, 10)
  48. player:setStorageValue(i + 1000, 0)
  49. end
  50. end
  51. end
  52. return true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement