
JonnySeeker89
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
JonnySeeker89 deu reputação a luanluciano93 em Recompensa por Level (Item, Bank, Addon, Mount)Olá pessoal, para quem não sabe esse script dá determinado item, quantidade / bank / addon / mount em determinado level.
Crie um arquivo com o nome recompensa.lua em creaturescripts/scripts e coloque isso dentro:
local table = { -- [level] = type = "item", id = {ITEM_ID, QUANTIDADE}, msg = "MENSAGEM"}, -- [level] = type = "bank", id = {QUANTIDADE, 0}, msg = "MENSAGEM"}, -- [level] = type = "addon", id = {ID_ADDON_FEMALE, ID_ADDON_MALE}, msg = "MENSAGEM"}, -- [level] = type = "mount", id = {ID_MOUNT, 0}, msg = "MENSAGEM"}, [20] = {type = "item", id = {2160, 2}, msg = "Voce ganhou 2 crystal coins por alcancar o level 20!"}, [30] = {type = "bank", id = {20000, 0}, msg = "Foi depositado em seu bank 20000 gold coints!"}, [40] = {type = "addon", id = {136, 128}, msg = "Voce ganhou o addon citizen full por alcancar o level 40!"}, [60] = {type = "mount", id = {2, 0}, msg = "Voce ganhou a montaria x!"}, } local storage = 15000 function onAdvance(player, skill, oldLevel, newLevel) if skill ~= SKILL_LEVEL or newLevel <= oldLevel then return true end for level, _ in pairs(table) do if newLevel >= level and player:getStorageValue(storage) < level then if table[level].type == "item" then player:addItem(table[level].id[1], table[level].id[2]) elseif table[level].type == "bank" then player:setBankBalance(player:getBankBalance() + table[level].id[1]) elseif table[level].type == "addon" then player:addOutfitAddon(table[level].id[1], 3) player:addOutfitAddon(table[level].id[2], 3) elseif table[level].type == "mount" then player:addMount(table[level].id[1]) else return false end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, table[level].msg) player:setStorageValue(storage, level) end end player:save() return true end
E em creaturescripts.xml adcione a tag:
<event type="advance" name="Recompensa" script="recompensa.lua"/> Caso queira colocar outro basta colocar usar os exemplos que coloquei como comentário (--) e adicionar a linha inteira novamente ...
Dúvidas postem aqui! Abraços
-
JonnySeeker89 deu reputação a InsanityA em [10.90] Vanaheim Global Opensource - TFS 1.2Tenho o freebless compativel segue a baixo \/
no data/creaturescripts/creaturescripts.xml coloque:
<event type="login" name="freebless" script="others/blessfree.lua"/>
Agora crie um arquivo freebless.lua dentro da pasta data/creaturescripts/scripts/others/ e coloque:
-
JonnySeeker89 deu reputação a InsanityA em [10.90] Vanaheim Global Opensource - TFS 1.2Npc Antigo. \/ - Altere seu \data\npc\scripts\TheOracle.lua
-
JonnySeeker89 deu reputação a AgaSsI em [Actions] Stamina DollNome do Script: Stamina Doll
Autor: Não sei o autor, pois foi um amigo meu que me passou!
Testado em: Styller 8.6
É um script simples e util, bom para servidores com mapa Global com site.
Instalando: Vá em ...data/actions/scripts, e crie um arquivo chamado stamina-refuel.lua e cole isto dentro:
Código:
function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") elseif(not isPremium(cid)) then doPlayerSendCancel(cid, "You must have a premium account.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") doRemoveItem(item.uid) end return true end Em actions cole a seguinte tag: Código: <action itemid="ID DO SEU DOLL AQUI" script="stamina-refuel.lua"/>
Onde está "ID DO SEU DOLL AQUI", coloque o número do doll que você deseja. Geralmente utilizam Santa Doll ou Nightmare Doll.
*6512
*11138
Grato!