Ir para conteúdo

[Encerrado] VIP HELP HELP


memexdxd

Posts Recomendados

 

local config = {

loginMessage = getConfigValue('loginMessage')
}
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "ferumbrasoftower")
registerCreatureEvent(cid, "ushuriel")
registerCreatureEvent(cid, "thed")
registerCreatureEvent(cid, "TopFrags")
registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "azerus")
registerCreatureEvent(cid, "points")
registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "inquisitionPortals")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, VipReceive)
registerCreatureEvent(cid, "expvip")
registerCreatureEvent(cid, "zombieevent")
registerCreatureEvent(cid, "PlayerKill")
registerCreatureEvent(cid, "war")
registerCreatureEvent(cid, "war_login")
registerCreatureEvent(cid, "killer")
registerCreatureEvent(cid, "amulet")
registerCreatureEvent(cid, "skullamulet")
registerCreatureEvent(cid, "chargeamulet")
registerCreatureEvent(cid, "foreveramulet")
registerCreatureEvent(cid, "ga1")
registerCreatureEvent(cid, "ga2")
registerCreatureEvent(cid, "ga3")
registerCreatureEvent(cid, "gv1")
registerCreatureEvent(cid, "gv2")
registerCreatureEvent(cid, "gv3")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
return true
end
registerCreatureEvent(cid, "onPrepareDeathinifi")

 

<?xml version="1.0" encoding="UTF-8"?>

<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
<event type="login" name="viplogin" script="viplogin.lua"/>
<event type="login" name="expvip" script="expvip.lua"/>
<event type="login" name="OutfitVip" script="outfitvip.lua"/>
<event type="login" name="VocationVip" script="vocationvip.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
<event type="death" name="ferumbrasoftower" event="script" value="ferumbrasoftower.lua"/>
<event type="death" name="ushuriel" event="script" value="ushuriel.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="PrepareDeath" name="pvparena" script="pvparena.lua"/>
<event type="attack" name="attackguild" script="attackguild.lua"/>
<event type="kill" name="TopFrags" event="script" value="topfrags.lua"/>
<event type="login" name="vipdays" event="script" value="menor.lua"/>
<event type="death" name="azerus" event="script" value="azerus.lua"/>
<event type="advance" name="LevelItem" event="script" value="levelitem.lua"/>
<event type="login" name="savePlayer" event="script" value="savePlayer.lua" />
<event type="logout" name="savePlayer_L" event="script" value="savePlayer.lua" />
<event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
<event type="login" name="MutePlayer" event="script" value="mute_check.lua"/>
<!-- Zombie Event -->
<event type="statschange" name="zombieevent" event="script" value="zombievent.lua"/>
<!-- Idle -->
<event type="think" name="Idle" event="script" value="idle.lua"/>
<!-- Dota -->
<event type="death" name="ga1" event="script" value="ga1.lua"/>
<event type="death" name="ga2" event="script" value="ga2.lua"/>
<event type="death" name="ga3" event="script" value="ga3.lua"/>
<event type="death" name="gv1" event="script" value="gv1.lua"/>
<event type="death" name="gv2" event="script" value="gv2.lua"/>
<event type="death" name="gv3" event="script" value="gv3.lua"/>
<!-- WoE -->
<event type="death" name="empe_broken" event="script" value="empe_broken.lua"/>
<event type="death" name="pre_empes" event="script" value="pre_empes.lua"/>
<event type="statschange" name="empe_dmg" event="script" value="empe_dmg.lua"/>
<event type="login" name="reg_vs_guard" event="script" value="vs_guard.lua"/>
<event type="statschange" name="vs_guard" event="script" value="vs_guard.lua"/>
<event type="login" name="woe_rate" event="script" value="expwoe.lua"/>
<!-- Amulet Shop -->
<event type="PrepareDeath" name="skullamulet" event="script" value="skullamulet.lua"/>
<event type="PrepareDeath" name="chargeamulet" event="script" value="chargeamulet.lua"/>
<event type="preparedeath" name="foreveramulet" event="script" value="foreveramulet.lua"/>
<event type="preparedeath" name="onPrepareDeathinifi" event="script" value="aolinfinity.lua"/>
<!-- Draken Set Quest -->
<event type="death" name="thed" event="script" value="thed.lua"/>
<!-- Potion Double Exp -->
<event type="login" name="expRate" event="script" value="potionexp.lua"/>
</creaturescripts>

 

 

Link para o comentário
Compartilhar em outros sites

 

function onLogin(cid)

local vip = isVip(cid)
if getVipTime(cid) > 0 and vip == FALSE then
local townid = 1
doPlayerSetTown(cid, townid)
local templePos = getTownTemplePosition(getPlayerTown(cid))
doTeleportThing(cid, templePos, false)
setVipTime(cid, 0)
doTeleportPlayers(cid, templePos)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sua vip acabou! você foi teleportado para o templo. Para ter as vantagens novamente adquira mais vip time.")
elseif vip == TRUE then
local duration = getVipDate(cid)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você possui "..getVipDays(cid).." dia(s) de vip."..(duration and (" Ela irá durar até "..duration..".") or ""))
end
return TRUE
end

 

???

Link para o comentário
Compartilhar em outros sites

 

function onLogin(cid)

local storage,days = (getPlayerAccountId(cid)+550),2
if getGlobalStorageValue(storage) <= 0 then
setGlobalStorageValue(storage, 13500)
addVipDays(cid, days)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu "..days.." dias de VIP, bom jogo!")
end
return true
end

 

Link para o comentário
Compartilhar em outros sites

Acho que achamos.

 

Deixa o teu creaturescripts.xml assim:

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
    <event type="login" name="viplogin" script="viplogin.lua"/>
     <event type="login" name="expvip" script="expvip.lua"/>
    <event type="login" name="OutfitVip" script="outfitvip.lua"/>
    <event type="login" name="VocationVip" script="vocationvip.lua"/>
     <event type="login" name="FirstItems" event="script" value="firstitems.lua"/>  
    <event type="death" name="ferumbrasoftower" event="script" value="ferumbrasoftower.lua"/>
    <event type="death" name="ushuriel" event="script" value="ushuriel.lua"/>
<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="PrepareDeath" name="pvparena" script="pvparena.lua"/>
<event type="attack" name="attackguild" script="attackguild.lua"/>
<event type="kill" name="TopFrags" event="script" value="topfrags.lua"/>
<event type="death" name="azerus" event="script" value="azerus.lua"/>
         <event type="advance" name="LevelItem" event="script" value="levelitem.lua"/>
        <event type="login" name="savePlayer" event="script" value="savePlayer.lua" />
        <event type="logout" name="savePlayer_L" event="script" value="savePlayer.lua" />
        <event type="advance" name="fullmh" event="script" value="fullmh.lua"/>
        <event type="login" name="MutePlayer" event="script" value="mute_check.lua"/>
 
<!-- Zombie Event -->
<event type="statschange" name="zombieevent" event="script" value="zombievent.lua"/>
 
        <!-- Idle -->
<event type="think" name="Idle" event="script" value="idle.lua"/>
 
<!-- Dota -->
<event type="death" name="ga1" event="script" value="ga1.lua"/>
<event type="death" name="ga2" event="script" value="ga2.lua"/>
    <event type="death" name="ga3" event="script" value="ga3.lua"/>
    <event type="death" name="gv1" event="script" value="gv1.lua"/>
    <event type="death" name="gv2" event="script" value="gv2.lua"/>
<event type="death" name="gv3" event="script" value="gv3.lua"/>
 
<!-- WoE -->
<event type="death" name="empe_broken" event="script" value="empe_broken.lua"/>
<event type="death" name="pre_empes" event="script" value="pre_empes.lua"/>
<event type="statschange" name="empe_dmg" event="script" value="empe_dmg.lua"/>
<event type="login" name="reg_vs_guard" event="script" value="vs_guard.lua"/>
<event type="statschange" name="vs_guard" event="script" value="vs_guard.lua"/>
<event type="login" name="woe_rate" event="script" value="expwoe.lua"/>
 
<!-- Amulet Shop -->
<event type="PrepareDeath" name="skullamulet" event="script" value="skullamulet.lua"/>
<event type="PrepareDeath" name="chargeamulet" event="script" value="chargeamulet.lua"/>
<event type="preparedeath" name="foreveramulet" event="script" value="foreveramulet.lua"/>
<event type="preparedeath" name="onPrepareDeathinifi" event="script" value="aolinfinity.lua"/>
 
<!-- Draken Set Quest -->
<event type="death" name="thed" event="script" value="thed.lua"/>
 
<!-- Potion Double Exp -->
<event type="login" name="expRate" event="script" value="potionexp.lua"/>
 
</creaturescripts>
Link para o comentário
Compartilhar em outros sites

@@felzan, foi o que eu fiz pra ele. Apaguei a linha do .xml. Pq se ele acabasse apenas renomeando o arquivo, iria dar erro de file not found. Então, a solução mais simples é apenas remover a linha do .xml

Link para o comentário
Compartilhar em outros sites

  • 2 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...