SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local config = {
  2.     loginMessage = getConfigValue('loginMessage'),
  3.     useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
  4. }
  5.  
  6. function onLogin(cid)
  7.     local loss = getConfigValue('deathLostPercent')
  8.     if(loss ~= nil) then
  9.         doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
  10.     end
  11.  
  12.     local accountManager = getPlayerAccountManager(cid)
  13.     if(accountManager == MANAGER_NONE) then
  14.         local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  15.         if(lastLogin > 0) then
  16.         if getCreatureStorage(cid, 48584) == 1 then
  17.    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid) ) )
  18.    doCreatureSetStorage(cid, 48584, -1)
  19. end
  20.             doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
  21.             str = "Sua ultima visita foi em " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  22.         end
  23.  
  24.         doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
  25.     elseif(accountManager == MANAGER_NAMELOCK) then
  26.         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
  27.     elseif(accountManager == MANAGER_ACCOUNT) then
  28.         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
  29.     else
  30.         doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
  31.     end
  32.  
  33.     if(not isPlayerGhost(cid)) then
  34.         doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
  35.     end
  36.    
  37.     if GRADRATION.getPoints(cid) < 0 then
  38. GRADRATION.addPoints(cid, 1)
  39. end
  40. GRADRATION.onPointsChange(cid)
  41.    
  42.     registerCreatureEvent(cid, "ZombieAttack")
  43.     registerCreatureEvent(cid, "Arena")
  44.     registerCreatureEvent(cid, "tp")
  45.     registerCreatureEvent(cid, "tpmonster")
  46.     registerCreatureEvent(cid, "quest")
  47.     registerCreatureEvent(cid, "quest2")
  48.     registerCreatureEvent(cid, "quest3")
  49.     registerCreatureEvent(cid, "quest1")
  50.     registerCreatureEvent(cid, "quest4")
  51.     registerCreatureEvent(cid, "quest6")
  52.     registerCreatureEvent(cid, "quest7")
  53.     registerCreatureEvent(cid, "quest8")
  54.     registerCreatureEvent(cid, "quest9")
  55.     registerCreatureEvent(cid, "quest10")
  56.     registerCreatureEvent(cid, "Mail")
  57.     registerCreatureEvent(cid, "GuildMotd")
  58.     registerCreatureEvent(cid, "msm")
  59.     registerCreatureEvent(cid, "rain")
  60.     registerCreatureEvent(cid, "UpAbsolute")
  61.     registerCreatureEvent(cid, "PlayerKill")
  62.     setPlayerStorageValue(cid, 8877, 0)
  63.     registerCreatureEvent(cid, "bootsbloqued")
  64.     registerCreatureEvent(cid, "petKill")
  65.     registerCreatureEvent(cid, "Arena")
  66.     registerCreatureEvent(cid, "dailycounter")
  67.     registerCreatureEvent(cid, "Player_Logout")
  68.     registerCreatureEvent(cid, "skillblock")
  69.     registerCreatureEvent(cid, "lvlup")
  70.     registerCreatureEvent(cid, "skillblock2")
  71.     registerCreatureEvent(cid, "Stamina")
  72.     registerCreatureEvent(cid, "showKD")
  73.     registerCreatureEvent(cid, "hpmanareal")
  74.     registerCreatureEvent(cid, "hospital")
  75.     registerCreatureEvent(cid, "antimagemc")
  76.     registerCreatureEvent(cid, "attackguild")
  77.     registerCreatureEvent(cid, "guildno")
  78.     registerCreatureEvent(cid, "direction")
  79.     registerCreatureEvent(cid, "DeathHospital")
  80.     registerCreatureEvent(cid, "Attack")
  81.     registerCreatureEvent(cid, "showVoc")
  82.  
  83.     registerCreatureEvent(cid, "GraduationSystem")
  84.     registerCreatureEvent(cid, "ExtendedOpcode")
  85.     registerCreatureEvent(cid, "showVoc")
  86.  
  87.     --- CRITICAL SYSTEM ----
  88. registerCreatureEvent(cid, "critical")
  89. if getPlayerStorageValue(cid, 48903) == -1 then
  90.         setPlayerStorageValue(cid, 48903, 0)
  91.     end
  92.    
  93.    
  94.  
  95.     if(config.useFragHandler) then
  96.         registerCreatureEvent(cid, "SkullCheck")
  97.     end
  98.    
  99.            registerCreatureEvent(cid, "ProtDeath")
  100.            registerCreatureEvent(cid, "LevelSpeed")
  101.            registerCreatureEvent(cid, "ResetLook   ")
  102.            registerCreatureEvent(cid, "Niwdeath")
  103.            registerCreatureEvent(cid, "notGuildAttack")
  104.            registerCreatureEvent(cid, "Biohazard")
  105.            registerCreatureEvent(cid, "ondeath")
  106.            registerCreatureEvent(cid, "HeartDrop")
  107.            registerCreatureEvent(cid, "ProtectLevel")
  108.            registerCreatureEvent(cid, "firstmessage")
  109.            registerCreatureEvent(cid, "advanced")
  110.            registerCreatureEvent(cid, "ondeathcast")
  111.            registerCreatureEvent(cid, "notGuildAttack")
  112.            registerCreatureEvent(cid, "KillingInTheNameOf")
  113.            registerCreatureEvent(cid, "Busque")
  114.            registerCreatureEvent(cid, "onPrepareDeath")
  115.            registerCreatureEvent(cid, "ZombieAttack")
  116.            registerCreatureEvent(cid, "PvpChannel")
  117.            registerCreatureEvent(cid, "advanced")
  118.            registerCreatureEvent(cid, "DeathBroadCast")
  119.            registerCreatureEvent(cid, "showVoc")      
  120.            registerCreatureEvent(cid, "DeathHP")
  121.            registerCreatureEvent(cid, "attackguild")
  122.            registerCreatureEvent(cid, "ReportBug")
  123.            registerCreatureEvent(cid, "morrerblood")
  124.            registerCreatureEvent(cid, "guardablood")
  125.            registerCreatureEvent(cid, "arcanjoblood")
  126.            registerCreatureEvent(cid, "castAttack")
  127.            registerCreatureEvent(cid, "castHits")
  128.            registerCreatureEvent(cid, "castLogout")
  129.            registerCreatureEvent(cid, "AdvanceSave")
  130.            registerCreatureEvent(cid, "vip")
  131.            registerCreatureEvent(cid, "MaxLevel")
  132.            registerCreatureEvent(cid, "Evento")
  133.            registerCreatureEvent(cid, "Recompensa")
  134.            registerCreatureEvent(cid, "questLook")
  135.            registerCreatureEvent(cid, "Evento")
  136.            registerCreatureEvent(cid, "Recompensa")
  137.            registerCreatureEvent(cid, "ExpGuild")
  138.            registerCreatureEvent(cid, "ExpGuild_out")
  139.            registerCreatureEvent(cid, "Evento")
  140.            registerCreatureEvent(cid, "ExpVip")
  141.            
  142.             if getPlayerGuildId(cid) > 0 then
  143.              local guild = getPlayerGuildId(cid)
  144.             doGuildAddEnemy(guild, enemy, 0, WAR_GUILD)  -- Uma função ai
  145.         else  -- se não tiver guild
  146.         end
  147.        
  148.     return true
  149.    
  150. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top