Ir para conteúdo

SkyLigh

Lorde
  • Total de itens

    2183
  • Registro em

  • Última visita

  • Dias Ganhos

    23

Tudo que SkyLigh postou

  1. SkyLigh

    Compra De Magic Level

    talkactions. function onSay(cid, words, param) local magic = { ['magic'] = {7}, money = 10000 -- quanto vai ser cada ml } if doPlayerRemoveMoney(cid,cofig.money) then doPlayerAddSkillTry(cid,config.magic) doPlayerSendTextMessage(cid,22,"Parabens se compro ml") else doPlayerSendTextMessage(cid,22,"Voce nao tem dinheiro suficiente") end return TRUE end
  2. SkyLigh

    Quest Bau De Xp

    Corrigindo erros local config = { level_Direto = "sim", -- Se for por level direto bote sim. add_Level = 2, -- Aqui você coloca o quando que vai adicionar de level no player, se ewstiver n vai ser por experiencia add_Exp = 500, -- Aqui você coloca a quantidade de experiencia o player vai ganhar uniqueid_Bau = 5033, -- Aqui vai o uniqueid do bau } function onUse(cid, item, frompos, item2, topos) local cd = exhaustion.get(cid, 88726) if not cd then cd = 0 end if cd > 0 then doPlayerSendCancel(cid, "Desculpa, espere 24hrs para usar denovo.") return true end if item.uid == config.uniqueid_Bau then if config.level_Direto == "sim" or config.level_Direto == "SIM" then doPlayerSetSkill(cid, SKILL__LEVEL, getPlayerLevel(cid) + config.add_Level) doPlayerSendTextMessage(cid, 27, "Você ganhou "..config.add_Level..", agora seu level é "..getPlayerLevel(cid).."") doSendMagicEffect(getThingPos(cid), 25) exhaustion.set(cid, 88726, 60 * 1000 * 60 * 24) else doPlayerAddExp(cid, config.add_Exp) doSendAnimatedText(getThingPos(cid), ""..config.add_Exp.."", math.random(25, 100)) doPlayerSendTextMessage(cid, 27, "Você ganhou "..config.add_Exp.." de experiencia.") doSendMagicEffect(getThingPos(cid), 25) exhaustion.set(cid, 88726, 60 * 1000 * 60 * 24) end end return true end function doPlayerSetSkill(cid, skill, amount) local pid = getPlayerGUID(cid) doRemoveCreature(cid,true) db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";") return TRUE end
  3. SkyLigh

    Spell Vip

    como assim akeles resets você teria que mudar qual erro que da?
  4. SkyLigh

    Spell Vip

    Vip local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.3, -130) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.5, -130) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) end function onCastSpell(cid, var) if getPlayerStorageValue(cid,22459) >= 1 then return doCombat(cid, acombat, var) else doPlayerSendCancel(cid, "Desculpe,Só jogadores Vips usam está magia.") end return TRUE end Reset. local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.3, -130) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.5, -130) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) end local reset_storage = 2310 -- coloque o storage do seu sistema de reset local quant_reset = 3 -- quantidade de resets para poder passar if getPlayerStorageValue(cid, reset_storage) == quant_reset then return true end Os Dois Juntos. local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.3, -130) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -12.5, -130, -12.5, -130) arr1 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2 } addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 100, parameters) end local reset_storage = 2310 -- coloque o storage do seu sistema de reset local quant_reset = 3 -- quantidade de resets para poder passar if getPlayerStorageValue(cid, reset_storage) == quant_reset then return true end function onCastSpell(cid, var) if getPlayerStorageValue(cid,22459) >= 1 then return doCombat(cid, acombat, var) else doPlayerSendCancel(cid, "Desculpe,Só jogadores Vips usam está magia.") end return TRUE end
  5. duvida sanada reportado
  6. va em data / creaturescripts / scripts / firstitems.lua ai voce configura
  7. kra isso e o mesmo ip so mudar a port pra 7172
  8. sim e so você libera a port 7172
  9. pronto. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end --------------------------------- --------------------------------- local time = 5 --------------------------------- npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, I can {create} wings or {information} about wings.") -- muda a frase só yes q não muda function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end --------------------------------- local function Sucesso(cid,id) if isPlayer(cid) then doPlayerAddItem(cid,id,1) doPlayerSendTextMessage(cid, 27, "Success -> You created an ".. getItemNameById(id).."") end end --------------------------------- local function Falha(cid, id) if isPlayer(cid) then doPlayerSendTextMessage(cid, 27, "Failed -> Trying to create your ".. getItemNameById(id).." failed.") end end --------------------------------- local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid --------------------------------- if(msgcontains(msg, 'create')) then selfSay("Well .. I can only create three types of wings. {angelic wings}, {dragon wings} and {fairy wings}.", cid) talkState[talkUser] = 1 return true elseif(msgcontains(msg, 'information')) then selfSay("Well .. I can show you informations about three wings, these wings are {angelic wings}, {dragon wings} and {fairy wings}.", cid) talkState[talkUser] = 2 return true elseif msgcontains(msg, 'angelic wings') and talkState[talkUser] then doShowTextDialog(cid,2407,"####--> Informations <--####\n\nName: Angelic Wigns\nVocation: Mage\nLevel: 40\nPrice NPC: $40.000,00\nWeighs: 40.00 oz\n ") return true elseif msgcontains(msg, 'dragon wings') and talkState[talkUser] == 2 then doShowTextDialog(cid,2417,"####--> Informations <--####\n\nName: Dragon Wings\nVocation: Warrior\nLevel: 40\nPrice NPC: $40.000,00\nWeighs: 40.00 oz\n ") return true elseif msgcontains(msg, 'fairy wings') and talkState[talkUser] == 2 then doShowTextDialog(cid,2412,"####--> Informations <--####\n\nName: Fairy Wings\nVocation: Elf\nLevel: 40\nPrice NPC: $40.000,00\nWeighs: 40.00 oz\n ") return true elseif msgcontains(msg, 'angelical wings') and talkState[talkUser] == 1 then selfSay("Ok .. You to create an angelic wing, 1kk you need, and you will have 35% chance of success, yet you want to create your wing?", cid) talkState[TalkUser] = 3 return true elseif msgcontains(msg, 'dragon wings') and talkState[talkUser] == 1 then selfSay("Ok .. You to create an dragon wings, 1kk you need, and you will have 35% chance of success, yet you want to create your wing?", cid) talkState[TalkUser] = 4 return true elseif msgcontains(msg, 'fairy wings') and talkState[talkUser] == 1 then selfSay("Ok .. You to create an fairy wings, 1kk you need, and you will have 35% chance of success, yet you want to create your wing?", cid) talkState[TalkUser] = 5 return true ------------------------------------------------------------ elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then if math.random(1,100) <= 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Sucesso, time*1000, cid, 2407) talkState[talkUser] = 0 return true elseif math.random(1,100) > 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Falha, time*1000, cid, 2407) talkState[talkUser] = 0 return true elseif getPlayerItemCount(cid,2160) < 100 then selfSay("Você não tem dinheiro suficiente!", cid) return true ------------------------------------------------------------- elseif(msgcontains(msg, 'yes')) and talkState[talkUser] == 4 then if math.random(1,100) <= 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Sucesso, time*1000, cid, 2417) talkState[talkUser] = 0 return true elseif math.random(1,100) > 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Falha, time*1000, cid, 2417) talkState[talkUser] = 0 return true elseif getPlayerItemCount(cid,2160) < 100 then selfSay("Você não tem dinheiro suficiente!", cid) return true ------------------------------------------------------------- elseif(msgcontains(msg, 'yes')) and talkState[talkUser] == 5 then if math.random(1,100) <= 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Sucesso, time*1000, cid, 2412) talkState[talkUser] = 0 return true elseif math.random(1,100) > 35 and getPlayerItemCount(cid,2160) >= 100 then doPlayerRemoveItem(cid,2160,100) addEvent(Falha, time*1000, cid, 2412) talkState[talkUser] = 0 return true elseif getPlayerItemCount(cid,2160) < 100 then selfSay("Você não tem dinheiro suficiente!", cid) return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  10. SkyLigh

    Sistema De Reset

    veja este http://www.xtibia.com/forum/topic/138026-talk-action-advanced-reset-system/
  11. Local incorreto reportado para ser movido claro que tem so você utilizar em um servidor a prot 7171 e no outro 7172 Tutorial http://www.xtibia.com/forum/topic/128606-desbloqueando-as-portas-7171-e-7172-no-windows-7/
  12. SkyLigh

    Scripts Iniciais

    o 1 script ja existe ! basta ir em pasta do ot / config.lua e procure por loginMessage = e escreva entre aspas a msg o 2 nao entendi o 3 http://www.xtibia.com/forum/topic/73866-premium-tile/ o 4 http://www.xtibia.com/forum/topic/140258-tile-de-level/
  13. veja http://www.xtibia.com/forum/topic/149970-alguem-sabe-adicionar-novos-pokemons-no-poketibia/
  14. @Hadamo refiz o meu testei aki e foi que no meu eu tinha colocado função que ainda nao existe no 8.60 function onSay(cid, words, param) if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens voce troco de sexo.") return true end if doPlayerRemoveMoney(cid, 1000) == TRUE then end return true end duvida sanada reportado
  15. Cogames creio que nao era preciso postar com o meu acima mais parabéns pelo tutorial !
  16. @Frenesy acho que você nao leu direito ! ele quer que custe 10k n que remova premium aki esta . function onSay(cid, words, param) local money = 1000 if getPlayerMoney(cid,money) == TRUE then if doPlayerRemoveMoney(cid,money) == TRUE then if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens voce troco de sexo.") else doPlayerSendCancel(cid, "Desculpe voce nao tem dinheiro suficiente.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end e em talkactions.xml <talkaction words="!changesex" script="changesex.lua"/>
  17. SkyLigh

    Magia 5 Efeitos

    Utilize este programa http://www.xtibia.com/forum/topic/128676-mindrages-spellmaker-068b/ eu uso ele para spell la tem como você criar com os 5 efeitos ! e também rápido e fácil Ensinando : Quando você for abrir o programa Vai Number Of Phases ai se vai ate colocar quanto efeitos voce quiser ! e clicka em Begin ai voce segue os dados em type coloke Direction And Targent dps segue os dados ate que quando você ir na chage Área voce clicka aonde vai sair o efeito da magia dps em combat properties se faz o efeito o attack e dps disso você clicka em next que ficara no seu lado esquerdo que ira para a próxima magia ! Espero que isso lhe ajude
  18. veja este http://www.xtibia.com/forum/topic/192064-up-event-ganhe-item-ao-upar/
  19. SkyLigh

    Sistema De Vip

    Nao testei aki fiz so pelo debug me diz se foi ou não Utilize a talkaction desse jeito \/ function onSay(cid, item, position) local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 20191) local timenow = os.time() if getPlayerStorageValue(cid, 20191) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if getPlayerStorageValue(cid,22450) >= 1 then return doPlayerSendCancel(cid,"Você Já é um player Epic") end doPlayerRemoveItem(cid,2137,1) setPlayerStorageValue(cid, 22450, time) local quantity = math.floor((getPlayerStorageValue(cid, 22450) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid,22,"Parabens ! Agorá Você é um Player Epic") doSendMagicEffect(getPlayerPosition(cid),CONST_ME_POFF) return TRUE end
  20. Parabéns Sky Otimo Tutorial
  21. Título irregular reportado para ser trocado Irei ver se acho uma function para seu script
  22. SkyLigh

    Sistema {Vip]

    tente fazer assim fale com o player !buyvip se for me avisa que este e de buyvip eu so editei dps eu configuro para se por addvip
  23. SkyLigh

    Sistema {Vip]

    da qual erro no console?
  24. SkyLigh

    Sistema {Vip]

    Não então faza assim -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 1000000 if doPlayerRemoveMoney(cid, 1000000) == TRUE then local days = 7 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end local name = getCreatureName(cid) local nome = getPlayerGUID(cid) if getPlayerStorageValue(cid, 29000) - os.time() >= 0 then if string.sub(name, 1,6) == "[VIP] " then return true else db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"You go kicked in 10 seconds for update you name.") addEvent(doRemoveCreature,10000,cid) end else if string.sub(name, 1,6) == "[VIP] " then db.executeQuery("UPDATE `players` SET `name` = '"..pegarNome(getCreatureName(cid)).."' WHERE `id`= " .. nome .. ";") doPlayerSendTextMessage(cid,19,"You go kicked in 10 seconds for update you name.") addEvent(doRemoveCreature,10000,cid) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player,13545) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end if(getPlayerStorageValue(C.uid,13545) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13545,getPlayerStorageValue(C.uid,13545)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end
  25. SkyLigh

    Sistema {Vip]

    editei uma talkaction para você va em data / talkactions / scripts / e o arquivo que ta o script que compra a vip e troque por isto -- Script SYtem vip 1.0 -- function onSay(cid, words, param) if(words == "!buyvip") then local price = 1000000 if doPlayerRemoveMoney(cid, 1000000) == TRUE then local days = 7 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") db.executeQuery("UPDATE `players` SET `name` = '[Vip] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") addEvent(doRemoveCreature, 5*1000, cid, true) setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end elseif(words == "!vipdays") then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end elseif(words == "/addvip") then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(t[1]) local days = t[2] local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end local daysvalue = days*3600*24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados "..days.." dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player,13545) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem "..quantity.." dias de VIP restantes.") end elseif(words == "/delvip") then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if(param == "") then return TRUE,doPlayerSendTextMessage(cid,18,"Command param required.")end local C,t = {},string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2]))*3600*24 --Tempo da vip por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) --Dias de vip. local pid = getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end if(getPlayerStorageValue(C.uid,13545) < C.time)then doPlayerSendTextMessage(cid,dec,'O jogador '..t[1]..' não possui '..C.days..' dias de vip.') else doPlayerSendTextMessage(cid,dec,'Você removeu '..C.days..' dias de vip do player '..t[1]..'.') setPlayerStorageValue(C.uid,13545,getPlayerStorageValue(C.uid,13545)-C.time) end doSendMagicEffect(C.pos, math.random(28,30)) end end return TRUE end
  • Quem Está Navegando   0 membros estão online

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