Ir para conteúdo

najatheus

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    najatheus deu reputação a frajolaguh em Addon System - (PDA)   
    o frajolinha vai ajudar aqueles que usa pokebar quando estão tendo o problema de quando solta o poke da bar vcs perde a addon, vao no seu pokebar na pasta talkion
    e cole esse lembrando que e pra PDA
     
     
    local EFFECTS = {     ["Perfect Zygarde Full"] = 45,     ["Mystic Mewtwo"] = 136,     ["Groudon"] = 34,     ["Shiny Groudon"] = 44,     ["Arch Heatran"] = 105,     ["Obscure Arceus"] = 55,     ["Zygarde M1"] = 45,     ["Zygarde M2"] = 45,     ["Zygarde M3"] = 105,     ["Tornadus"] = 152,     ["Landorus"] = 152,     ["Thundurus"] = 152,     ["Majestic Lugia M1"] = 136,     ["Majestic Lugia M2"] = 136,     ["Majestic Lugia M3"] = 136,     ["Mew"] = 136,     ["Mewtwo"] = 136,     ["Shiny Mew"] = 136,     ["Shiny Mewtwo"] = 136,     ["Giratina Star"] = 55,     ["Giratina Star M1"] = 55,     ["Giratina Star M2"] = 55,     ["Giratina Star M3"] = 55,     ["Raikou"] = 360,     ["Kyogre"] = 17,     ["Shiny Kyogre"] = 17,     ["Rayquaza"] = 17,     ["Suicune"] = 17,     ["Ditto"] = 17,     ["Phione"] = 17,     ["Zoroak"] = 55,     ["Shiny Zoroak"] = 55,     ["Zygard"] = 55,     ["Regigigas"] = 35,     ["Shiny Regigigas"] = 26,     ["Genesect"] = 26,     ["Zekrom"] = 26,     ["Shiny Zekrom"] = 26,         ["Black Zygarde"] = 55,       ["Black Alpha Zekrom"] = 55,     ["Black Groudon"] = 55,       ["Deoxys Lunar"] = 55,       }   local cd = 1   local function volta(cid, init)   exhausted = 10 storage = 31332   if(getPlayerStorageValue(cid, storage) > os.time() and getPlayerStorageValue(cid, storage) < 100+os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. getPlayerStorageValue(cid, storage) - os.time() .. ' second' .. ((getPlayerStorageValue(cid, storage) - os.time()) == 1 and "" or "s") .. " to use new pokemon.")    return true end       -- if getPlayerStorageValue(cid, 69891) >= 1 then        -- doPlayerSendCancel(cid, "Voce nao pode chamar seu pokemon enquanto usa seu pet.")       -- return false     --alterado v1.5     -- end         if getPlayerSlotItem(cid, CONST_SLOT_FEET).uid > 0 then         local item = getPlayerSlotItem(cid, CONST_SLOT_FEET)         if getPlayerStorageValue(cid, 912351) > os.time () then         doPlayerSendCancel(cid, "Espere "..getPlayerStorageValue(cid, 912351) - os.time ().." segundo(s) para usar novamente")         return true         end       if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end   if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1  then    --alterado v1.9 <<    return true                                                                                                                         end   local ballName = getItemAttribute(item.uid, "poke") local btype = getPokeballType(item.itemid) local usando = pokeballs[btype].use   local effect = pokeballs[btype].effect     if not effect then         effect = 21     end     if not getItemAttribute(item.uid, "tadport") and ballName then     doItemSetAttribute(item.uid, "tadport", fotos[ballName]) end     unLock(item.uid) --alterado v1.8   if item.itemid == usando then                                 -- if getPlayerStorageValue(cid, 990) == 1 then -- GYM         -- doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")     -- return true     -- end     if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then     --alterado v1.6        if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then             BackTeam(cid)              end     end       if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then        doPlayerSendCancel(cid, "You can't do that while is controling a mind")        return true     --alterado v1.5     end     if #getCreatureSummons(cid) <= 0 then         if isInArray(pokeballs[btype].all, item.itemid) then             doTransformItem(item.uid, pokeballs[btype].off)             doItemSetAttribute(item.uid, "hp", 0)             doPlayerSendCancel(cid, "This pokemon is fainted.")             return true         end     end       local cd = getCD(item.uid, "blink", 30)     if cd > 0 then        setCD(item.uid, "blink", 0)     end         local z = getCreatureSummons(cid)[1]       if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then        return true     end     doReturnPokemon(cid, z, item, effect)             end           if init then             if item.itemid == pokeballs[btype].on then                 if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then         doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")     return TRUE     end       local thishp = getItemAttribute(item.uid, "hp")       if thishp <= 0 then         if isInArray(pokeballs[btype].all, item.itemid) then             doTransformItem(item.uid, pokeballs[btype].off)             doItemSetAttribute(item.uid, "hp", 0)             doPlayerSendCancel(cid, "This pokemon is fainted.")             return true         end     end       local pokemon = getItemAttribute(item.uid, "poke")       if not pokes[pokemon] then     return true     end ---------------------------------------------------------------------------------------------------------------------------------------------------       local x = pokes[pokemon]     local boost = getItemAttribute(item.uid, "boost") or 0       if getPlayerLevel(cid) < (x.level+boost) then        doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.")        return true     end         --------------------------------------------------------------------------------------       doSummonMonster(cid, pokemon)       local pk = getCreatureSummons(cid)[1]     if not isCreature(pk) then return true end         ------------------------passiva hitmonchan------------------------------     if isSummon(pk) then                                                  --alterado v1.8 \/        if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then           if not getItemAttribute(item.uid, "hands") then              doSetItemAttribute(item.uid, "hands", 0)           end           local hands = getItemAttribute(item.uid, "hands")           doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1)        end     end     -------------------------------------------------------------------------     ---------movement magmar, jynx-------------     if EFFECTS[getCreatureName(pk)] then                    markPosEff(pk, getThingPos(pk))        sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk))       end     --------------------------------------------------------------------------             ---if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited       --  local left = getItemAttribute(item.uid, "transLeft")     --  local name = getItemAttribute(item.uid, "transName")       --  if left and left > 0 then     --      setPlayerStorageValue(pk, 1010, name)         --  doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1)         --  addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn"))         --  doItemSetAttribute(item.uid, "transBegin", os.clock())     --  else     --      setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto")     --edited     --  end --  end       if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end       doCreatureSetLookDir(pk, 2)       adjustStatus(pk, item.uid, true, true, true) --    doCureWithY(getCreatureMaster(pk), pk)       doTransformItem(item.uid, item.itemid+1)       local pokename = getPokeName(pk) --alterado v1.7       local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename)     doCreatureSay(cid, mgo, TALKTYPE_ORANGE_1)     if getItemAttribute(item.uid, "ballorder") then         doPlayerSendCancel(cid, "KGT,"..getItemAttribute(item.uid, "ballorder").."|".."0")     end setPlayerStorageValue(cid, 912351, os.time () + cd)     doSendMagicEffect(getCreaturePosition(pk), effect)       local pk = getCreatureSummons(cid)[1]     if not isCreature(pk) then return true end       local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET)       local addon = getItemAttribute(slot.uid, "pokeaddon")           addonTransformOutfit(cid, addon, pokemon)

          if useOTClient then        doPlayerSendCancel(cid, '12//,show') --alterado v1.7     end             end     end end       if useKpdoDlls then         doUpdateMoves(cid)     end return true end   function onSay(cid, words, param, channel)     if getPlayerSlotItem(cid, CONST_SLOT_FEET).uid > 0 then         if getItemAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "ballorder") == tonumber(param) then             volta(cid, true)             return true         else             volta(cid, false)         end       end     doMoveBar(cid, tonumber(param))     volta(cid, true)     return true end
  2. Gostei
    najatheus recebeu reputação de DarkRed em Addon System - (PDA)   
    System de addon, funciona da seguinte maneira:
    - O item deve ser usado diretamente na pokebola, caso o player deseje colocar um novo addon no pokemon, evoluir ou transformar em shiny, devera ser utilizado o comando: !removeAddon

    Instruções: 
    Insira na pasta datapack/actions/script/
    Addon.lua
     addonbox.lua
     
    Insira na pasta datapack/lib/
    Addon System.lua 
     
     
    Agora, em datapack/actions/actions.xml :
     
    <action itemid="13103;13114;13107" event="script" value="Addon.lua"/> <!-- Aqui estarão os id dos addons que vão ser utilizados na pokebola --> <action itemid="2183" event="script" value="addonbox.lua"/> <!-- Id da addon box -->
    Agora, em datapack/actions/scripts/goback.lua, abaixo de :
     
    local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end Insira :
     
    local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon)
    Agora, em datapack/actions/scripts/order.lua, abaixo de :
     
    doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1]
    Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon)
    Agora, em datapack/actions/scripts/evolution.lua, abaixo de :
     
    if not isMonster(item2.uid) or not isSummon(item2.uid) then return true end if #getCreatureSummons(cid) > 1 then return true --alterado v1.9 end Insira :
     
    local poke_addon = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "pokeaddon") if(poke_addon)then return doPlayerSendCancel(cid, "Please remove addon before evolution, Command: !removeAddon") end
    Agora, em datapack/actions/scripts/sh stone.lua, abaixo de :
     
    if getPlayerSlotItem(cid, 8).uid == itemEx.uid then if #getCreatureSummons(cid) <= 0 then Insira :
     
    local poke_addon = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "pokeaddon") if(poke_addon)then return doPlayerSendCancel(cid, "Please remove addon before evolution, Command: !removeAddon") end Agora, em datapack/creaturescripts/scripts/look.lua, abaixo de :
     
    if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end Insira :
     
    if(getItemAttribute(thing.uid, "pokeaddon"))then local table_addon = ADDON_CONFIG[getItemAttribute(thing.uid, "pokeaddon")] if not table_addon then return true end table.insert(str, "\n" .. "Addon : " .. table_addon.name_addon .. ".") end Agora, em datapack/lib/order.lua, abaixo de :
     
    doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfitAbility(cid, addon) Continuando em datapack/lib/order.lua, abaixo de :
    elseif skill == "ride" then local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) Insira : 
    addonTransformOutfitAbility(cid)
    Agora, em datapack/movements/scripts/surf.lua, abaixo de:
     
    doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid))) Insira :
     
    addonTransformOutfitAbility(cid) Continuando, em datapack/movements/script/surf.lua, abaixo de:
     
    doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon) Agora, em datapack/talkactions/scripts/ crie um arquivo .lua, coloque dentro :
     
    function onSay(cid, words, param, channel) if(#getCreatureSummons(cid) >=1)then return false end local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) if not slot then return false end local addon_ball = getItemAttribute(slot.uid, "pokeaddon") if(addon_ball)then removeAddon(cid,slot,addon_ball) return true end end Agora, em datapack/talkactions/talkactions.xml registre :
     
    <talkaction words="!removeAddon" hide="yes" event="script" value="nome do arquivo.lua"/>
    Configurações :
     
    ADDON_CONFIG ={ [1] = { -- Type do attribute do addon addon1 = 2079, -- Id da outfit pokemon = "Blastoise", -- O pokemon name_addon = "Red ninja pack", -- Nome do addon habilidade = 2089, -- Id da outfit correspondente com sua habilidade }, } local addon_type = { [13114] = { -- Id do item pokemon_use = "Blastoise", -- O pokemon type = 1, -- Valor do attribute }, } Return_addon_table = { [1] = { -- Type do attribute retu = 13114, -- o id do item que o player vai ganhar }, } Creditos :
    Sr. Naja

    20210725_201402.mp4
  3. Obrigado
    najatheus recebeu reputação de brunei em Addon System - (PDA)   
    System de addon, funciona da seguinte maneira:
    - O item deve ser usado diretamente na pokebola, caso o player deseje colocar um novo addon no pokemon, evoluir ou transformar em shiny, devera ser utilizado o comando: !removeAddon

    Instruções: 
    Insira na pasta datapack/actions/script/
    Addon.lua
     addonbox.lua
     
    Insira na pasta datapack/lib/
    Addon System.lua 
     
     
    Agora, em datapack/actions/actions.xml :
     
    <action itemid="13103;13114;13107" event="script" value="Addon.lua"/> <!-- Aqui estarão os id dos addons que vão ser utilizados na pokebola --> <action itemid="2183" event="script" value="addonbox.lua"/> <!-- Id da addon box -->
    Agora, em datapack/actions/scripts/goback.lua, abaixo de :
     
    local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end Insira :
     
    local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon)
    Agora, em datapack/actions/scripts/order.lua, abaixo de :
     
    doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1]
    Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon)
    Agora, em datapack/actions/scripts/evolution.lua, abaixo de :
     
    if not isMonster(item2.uid) or not isSummon(item2.uid) then return true end if #getCreatureSummons(cid) > 1 then return true --alterado v1.9 end Insira :
     
    local poke_addon = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "pokeaddon") if(poke_addon)then return doPlayerSendCancel(cid, "Please remove addon before evolution, Command: !removeAddon") end
    Agora, em datapack/actions/scripts/sh stone.lua, abaixo de :
     
    if getPlayerSlotItem(cid, 8).uid == itemEx.uid then if #getCreatureSummons(cid) <= 0 then Insira :
     
    local poke_addon = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "pokeaddon") if(poke_addon)then return doPlayerSendCancel(cid, "Please remove addon before evolution, Command: !removeAddon") end Agora, em datapack/creaturescripts/scripts/look.lua, abaixo de :
     
    if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end Insira :
     
    if(getItemAttribute(thing.uid, "pokeaddon"))then local table_addon = ADDON_CONFIG[getItemAttribute(thing.uid, "pokeaddon")] if not table_addon then return true end table.insert(str, "\n" .. "Addon : " .. table_addon.name_addon .. ".") end Agora, em datapack/lib/order.lua, abaixo de :
     
    doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfitAbility(cid, addon) Continuando em datapack/lib/order.lua, abaixo de :
    elseif skill == "ride" then local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) Insira : 
    addonTransformOutfitAbility(cid)
    Agora, em datapack/movements/scripts/surf.lua, abaixo de:
     
    doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid))) Insira :
     
    addonTransformOutfitAbility(cid) Continuando, em datapack/movements/script/surf.lua, abaixo de:
     
    doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon) Agora, em datapack/talkactions/scripts/ crie um arquivo .lua, coloque dentro :
     
    function onSay(cid, words, param, channel) if(#getCreatureSummons(cid) >=1)then return false end local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) if not slot then return false end local addon_ball = getItemAttribute(slot.uid, "pokeaddon") if(addon_ball)then removeAddon(cid,slot,addon_ball) return true end end Agora, em datapack/talkactions/talkactions.xml registre :
     
    <talkaction words="!removeAddon" hide="yes" event="script" value="nome do arquivo.lua"/>
    Configurações :
     
    ADDON_CONFIG ={ [1] = { -- Type do attribute do addon addon1 = 2079, -- Id da outfit pokemon = "Blastoise", -- O pokemon name_addon = "Red ninja pack", -- Nome do addon habilidade = 2089, -- Id da outfit correspondente com sua habilidade }, } local addon_type = { [13114] = { -- Id do item pokemon_use = "Blastoise", -- O pokemon type = 1, -- Valor do attribute }, } Return_addon_table = { [1] = { -- Type do attribute retu = 13114, -- o id do item que o player vai ganhar }, } Creditos :
    Sr. Naja

    20210725_201402.mp4
  4. Gostei
    najatheus recebeu reputação de draco6 em System de guardian - Tfs 1.3 ( Sem ataque automatico )   
    Em actions criei um arquivo chamado guardian.lua, dentro dele coloque : 
      local lendas = { -- id dos item / nome do guardian [3000] = {"Mew"}, [3001] = {"Mewtwo"}, [3002] = {"Articuno"}, [3003] = {"Zapdos"}, [3004] = {"Moltres"}, [3005] = {"Entei"}, [3006] = {"Suicune"}, [3007] = {"Raikou"}, [3008] = {"Ho-oh"}, [30010] = {"Lugia"}, } function onUse(player, item, fromPosition, target, toPosition, ishotkey) slot = player:getSlotItem(CONST_SLOT_AMMO) if not slot then player:sendTextMessage(MESSAGE_STATUS_SMALL, "" .. player:getName() .. " Put the Guardian in the right slot" .." ") return true end local lenda = lendas[item.itemid] if not lenda then player:sendTextMessage(MESSAGE_STATUS_SMALL, "" .. player:getName() .. " Sorry, ask adm to set up the guardian string!" .." ") return true elseif(player:getStorageValue(28723) == 1)then player:sendTextMessage(MESSAGE_STATUS_SMALL, "Have you ever used this guardian") return true else local postion = player:getPosition() local monster = Game.createMonster(lenda[1], postion) if not monster then player:sendTextMessage(MESSAGE_STATUS_SMALL,"" ..player:getName() .." Sorry you can't summon, contact a member of staff!.") return true end local message = {"" .. player:getName() .. " Go Guardian : " .. lenda[1] .. ""} player:sendTextMessage(MESSAGE_INFO_DESCR, "Have you ever used this guardian") player:setStorageValue(28723, 1) player:say(message[1], TALKTYPE_MONSTER_SAY) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION,"[Name] : " .. lenda[1] .. "\n" .. "[Owner] : " .. player:getName() .. "\n" .. "[Last use] :" .. os.date() .. "") local guardians = MonsterType(lenda[1]) if not guardian then return false end guardians:nameDescription("Guardian " .. lenda[1] .. "") guardians:name("Guardian " .. lenda[1] .. "") monster:setMaster(player) monster:setMaxHealth(70000000) monster:setSkull(SKULL_GREEN) monster:getPosition():sendMagicEffect(6) monster:changeSpeed(600000) speed = monster:getSpeed() healt = monster:getHealth() monster:say("GUARDIAN!" .. lenda[1] .. "", TALKTYPE_MONSTER_SAY) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"You used the Guardian ( " .. lenda[1] .. " ).") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Your Guardian is alive: " .. healt .. " / " .. monster:getMaxHealth() .. " wait for his life to fully load.") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Guardian Speed " .. speed .. ".") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Guardian owner " .. player:getName() .. ".") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Last time the Guardian was used [" .. os.date() .. "].") return true end end  
    Depois abra o action.xml, e registra :  
    <action itemid="o id" script="guardian.lua" />

     
  5. Curtir
    Desenvolvi por muito tempo uma base Pokémon do 0 (parti do TFS 1.2 e fui implementando tudo até chegar nessa versão que estou disponibilizando). O resultado é um servidor extremamente leve e estável (já testado com 100+ players e por mais de 1 mês sem cair). Basicamente, ele suporta tranquilamente 1k+ players e não tem nenhum bug conhecido que faça com que ele caia.
     
    Esse servidor ficou no ar por muito tempo (mais de 2 anos) e era conhecido como PokeDash. Acabei ficando sem tempo para administrar o servidor, o que fez com que a maioria dos players parassem de jogar e com que eu fechasse de vez.
     
    Pensei por muito tempo sobre o que fazer com ele, e decidi disponibilizar para a comunidade. Trata-se de algo único (eu ao menos nunca vi um servidor de Pokémon construído a partir do TFS 1.2)!
     
    Como desenvolvi todos os sistemas do 0, tomei cuidado para fazer tudo da melhor maneira possível e para que possa ser facilmente modificado e atualizado. Basicamente, os Pokémons podem ser criados a partir de um único arquivo XML (como monstros do Tibia), e nesse arquivo você pode especificar tudo, desde level máximo e mínimo de spawn, loots, tipos (fogo, agua, etc), se ele pode usar habilidades (surf, fly, etc), moves (quando alguém captura), ataques (quando selvagem), evoluções, chance de catch, etc.
    Exemplo de Pokemon
    Resumo de alguns sistemas (tem muita coisa, então coloquei os principais)
    ✅ Pokemons com level, status e boost. O level do player/boost também influencia no status dos pokes.
    ✅ Sistema de Love (seu poke fica mais forte que os demais quando upa de level matando pokemons mais fortes que ele).
    ✅ Base propria com Shinys e Ancients.
    ✅ Cada player pode conseguir ancient stone para evoluir 1 shiny para ancient através de quest.
    ✅ Moves bar e pokemon bar (troca de pokemon com 1 click).
    ✅ Autoloot agrupando em bags.
    ✅ Ganho de exp ao capturar/dar dex em pokes com um bonus adicional para o primeiro catch de cada poke.
    ✅ Mapa original com mais de 40 quests, incluindo outland com Ancients.
    ✅ Eventos diários automáticos: Futebol todo dia 19:30, arena PVP todo dia 20:00, golden arena aos sabados 17:00, bag premiada aos domingos/feriados 17:00.
    ✅ Profissões (facilmente customizáveis):
    Catcher: 3.5% mais chance de capturar um Pokemon. Hunter: 10% mais status de dano para o seu Pokemon (tanto magico quanto fisico). Blocker: 25% mais vida para seus Pokemons. Healer: 100% mais cura que aplica tanto em potions quando moves dos seus Pokemons. Explorer: 15% mais experiencia para seu personagem durante a caça. ✅ Task diária de catch/loot dando Tokens. Os tokens podem ser trocados por itens raros (dentre eles premier ball e bags personalizadas) além de pagar seu curso com o NPC Job Manager para aprender uma das profissões acima. Uma das maneiras de conseguir tokens é fazendo tasks diárias.
    ✅ Muito mais!
    Screenshots

     

    Download
    Baixe o pack contendo o servidor, cliente, site, editor de mapa e editor de itens clique aqui!. Caso considere minha contribuição interessante para a comunidade, considere realizar uma doação para a chave pix: [email protected]
    GM account: gm/gmgmgm
    O projeto será atualizado em sua homepage: https://pokedashpota.vercel.app/
     
    SCAN
     
    ---EDIT---
    Download sources
    SCAN
     
     Problemas e soluções
    GroupID não existe ao tentar logar no server.
     
    Erros ao importar o schema.sql.
     
    Comando /cb não funcionando:
     
  6. Curtir
    najatheus recebeu reputação de Bruxo Ots em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  7. Gostei
    najatheus recebeu reputação de Pedrok22 em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  8. Curtir
    najatheus recebeu reputação de FeehLoveCes em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  9. Curtir
    najatheus recebeu reputação de Mathias Kenfi em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  10. Curtir
    najatheus recebeu reputação de LeoTK em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  11. Gostei
    najatheus recebeu reputação de Cat em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  12. Gostei
    najatheus recebeu reputação de So volto tarde em Sistema de roleta ( Tfs 1.x )   
    Sistema funciona da seguinte maneira, ao clicar na alavanca, vai gerar um numero de 1 a quantidade de mesa ou piso que for configurado na tabela, esse numero sera a posição do item até o ponto que o player vai receber o item, assim si o player tirar o menor numero possivel ele podera ter a sorte de receber os stacks do items, vou estar deixando um video aqui em baixo mostrando o sistema

    agora vamo instalar o codigo :

    Em data/actions/script/, crie um arquivo chamado roleta.lua, dentro dele coloque : 
     
    local configuration_table = { storage_pos_item = 0; -- não mexa level_requeriment = { -- requimento para poder girar alavanca min = 1; max = 100; }; count = 0; -- não mexa count_gire_item = 0; bag_id = 1991; count_remove = 0; -- não mexa floor_id_or_table = 10449; -- id da mesa ou piso que vão ficar os item por cima items = {3000, 2012, 13042, 13045, 13047, 13051, 13044, 13041}; -- items da roleta que vai ser usado na roleta effect_item = 8; -- efeito de quando estiver gerando o item effect_addItem = 1; -- efeito de qnd o player receber o item effect_addItem_remove = 32; -- efeito de qnd o item for pro slot do player effect_removeItem = 36; -- efeito de qnd for remover os item da mesa ou piso time_create_item = 200; -- tempo para criar um a um item na mesa ou piso time_calcule_pos_item = 300; -- tempo para mover o item para a proxima posição time_count_calcule_pos_item = 1600; -- tempo para começar a mover o item ( obs o calculo min tem que ser a quantidade de mesa que vai ter x o tempo time_create_item) position = { -- configuração dos movimentos e posição create_item = { -- posição para criar os items [1] = {x = 981, y = 945, z = 7}; [2] = {x = 981, y = 946, z = 7}; [3] = {x = 982, y = 945, z = 7}; [4] = {x = 982, y = 946, z = 7}; [5] = {x = 983, y = 945, z = 7}; [6] = {x = 983, y = 946, z = 7}; [7] = {x = 984, y = 945, z = 7}; [8] = {x = 984, y = 946, z = 7}; }; roleta = { -- giros da roleta [1] = { [1] = {x = 0, y = 1, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [2] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 1, y = -1, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [3] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 1, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [4] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 1, y = -1, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [5] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 1, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [6] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 1, y = -1, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [7] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 1, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; [8] = { [1] = {x = 0, y = 0, z = 0}; [2] = {x = 0, y = 0, z = 0}; [3] = {x = 0, y = 0, z = 0}; [4] = {x = 0, y = 0, z = 0}; [5] = {x = 0, y = 0, z = 0}; [6] = {x = 0, y = 0, z = 0}; [7] = {x = 0, y = 0, z = 0}; [8] = {x = 3, y = 0, z = 0}; }; } } } local function createItemPos() if(configuration_table.count >= #configuration_table.position.create_item)then configuration_table.count = 0 return end configuration_table.count = configuration_table.count + 1 local item = Game.createItem(configuration_table.items[math.random(1, #configuration_table.items)], 1, configuration_table.position.create_item[configuration_table.count]) local pos_item = item:getPosition() pos_item:sendMagicEffect(configuration_table.effect_item) item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Item do evento da roleta") addEvent(createItemPos, configuration_table.time_create_item) end local function removeItemPos() if(configuration_table.count_remove >= #configuration_table.position.create_item)then configuration_table.count_remove = 0 return nil end configuration_table.count_remove = configuration_table.count_remove + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_remove]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return removeItemPos() end item:getPosition():sendMagicEffect(configuration_table.effect_removeItem) item:remove() removeItemPos() end local function addItemPlayer(player_uid) local player = Player(player_uid) if not player then return nil end local tile = Tile(configuration_table.storage_pos_item) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end local player_pos = player:getPosition() local item_pos = item:getPosition() local bag = player:addItem(configuration_table.bag_id, 1, true, 1, 3) bag:addItem(item:getId(), item:getCount(), true, 1, 3) player_pos:sendMagicEffect(configuration_table.effect_addItem) item_pos:sendMagicEffect(configuration_table.effect_addItem_remove) item:remove(item:getCount()) end local function calculePosItem(value, player_uid) if(configuration_table.count_gire_item >= #configuration_table.position.create_item)then removeItemPos() addItemPlayer(player_uid) configuration_table.count_gire_item = 0 return nil end configuration_table.count_gire_item = configuration_table.count_gire_item + 1 local tile = Tile(configuration_table.position.create_item[configuration_table.count_gire_item]) if not tile then return nil end local item = tile:getTopVisibleThing() if not item then return nil end if(item:getId() == configuration_table.floor_id_or_table)then return nil end local pos = item:getPosition() local item_pos_x = pos.x local item_pos_y = pos.y local item_pos_z = pos.z local pos_ = configuration_table.position.roleta[value] local position = Position(item_pos_x + pos_[configuration_table.count_gire_item].x, item_pos_y + pos_[configuration_table.count_gire_item].y, item_pos_z) if not position then return nil end configuration_table.storage_pos_item = position item:moveTo(position) addEvent(calculePosItem, configuration_table.time_calcule_pos_item, value, player_uid) end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(player:getLevel() > configuration_table.level_requeriment.max)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be bigger(" .. configuration_table.level_requeriment.max .. ")"))) end if(player:getLevel() < configuration_table.level_requeriment.min)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " your level(" .. player:getLevel() .. ") needs to be smaller(" .. configuration_table.level_requeriment.min .. ")"))) end if(configuration_table.count_gire_item >= 1) or (configuration_table.count >= 1) or (configuration_table.count_remove >= 1)then return(not(player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " wait the roulette is in action, wait for it to finish"))) end local random = math.random(1, #configuration_table.position.roleta) configuration_table.storage_pos_item = 0 createItemPos() addEvent(calculePosItem, configuration_table.time_count_calcule_pos_item, random, player.uid) Game.sendAnimatedText("Spin number will be: " .. random, player:getPosition(), math.random(1, 255)) player:sendTextMessage(MESSAGE_INFO_DESCR, player:getName() .. " item of the day is on the rocks there") return true end
    Agora em data/actions/actions.xml, coloque :
     
    <action itemid="o id da alavanca do seu servidor" script="roleta.lua" />
    20211004_171313.mp4
     
  13. Curtir
    najatheus deu reputação a Kramer em Aura Sistem ( Tfs 1.x )   
  14. Obrigado
    najatheus recebeu reputação de Vodkart em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  15. Gostei
    najatheus recebeu reputação de Kenshiin em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  16. Curtir
    najatheus recebeu reputação de Mathias Kenfi em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  17. Curtir
    najatheus recebeu reputação de marcoshps11 em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  18. Gostei
    najatheus recebeu reputação de Kramer em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  19. Gostei
    najatheus recebeu reputação de Cat em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  20. Gostei
    najatheus recebeu reputação de Sun em Aura Sistem ( Tfs 1.x )   
    Sistema funciona da seguinte forma, ao digitar : !aura on, a aura do player vai ligar, enquanto ela estiver ligada o player vai ficar regenerando a vida dele, ao digitar : !aura off, ela vai desligar e o player vai parar de regenerar a vida dele, vou estar deixando um video aqui em baixo 

     Agora vamos colocar o codigo

    Em data/talkactions/script/, crie um arquivo chamado aura.lua, e coloque isso dentro dele :
     
    local config_aurea = { effect = 4; -- efeito que vai ficar girando no player effect_health = 162; -- efeito qnd curar o player level_use = { -- level que vai ser usado (min/max) min = 1, max = 600, } ; health = 10; -- tanto que vai curar por time configurado pos_aurea = { -- não mexa [1] = {x = 0, y = -1}; [2] = {x = 1, y = -1}; [3] = {x = 1, y = 0}; [4] = {x = 1, y = 1}; [5] = {x = 0, y = 1}; [6] = {x = -1, y = 1}; [7] = {x = -1, y = 0}; [8] = {x = -1, y = -1}; }; storage_pos = 1547637649; -- não mexa e nem repita esse valor em outro script!! storage = 165477963; -- não mexa e nem repita esse valor em outro script!! tempo_aurea = 100; -- tempo da aurea para passar em cada posição } local function calculePosAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end if(player:getStorageValue(config_aurea.storage_pos) >= 8)then player:setStorageValue(config_aurea.storage_pos, 0) end player:setStorageValue(config_aurea.storage_pos, player:getStorageValue(config_aurea.storage_pos) + 1) return(player:getStorageValue(config_aurea.storage_pos)) end local function posAurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end local pos_x = player:getPosition().x local pos_y = player:getPosition().y local pos_z = player:getPosition().z local aa = calculePosAurea(player_uid) local pos = Position(pos_x + config_aurea.pos_aurea[aa].x, pos_y + config_aurea.pos_aurea[aa].y, pos_z) if(not(pos))then return(nil) end return(pos) end local function aurea(player_uid) local player = Player(player_uid) if(not(player))then return(nil) end if(player:getStorageValue(config_aurea.storage) <= 0)then return(nil) end player:addHealth(config_aurea.health) player:getPosition():sendMagicEffect(config_aurea.effect_health) local position = posAurea(player_uid) position:sendMagicEffect(config_aurea.effect) addEvent(aurea, config_aurea.tempo_aurea, player_uid) end function onSay(player, words, param) if(words == "!aura on")then if(player:getLevel() > config_aurea.level_use.max)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser maior(" .. config_aurea.level_use.max))) end if(player:getLevel() < config_aurea.level_use.min)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " seu level(" .. player:getLevel() .. ") precisa ser menor(" .. config_aurea.level_use.max))) end if(player:getStorageValue(config_aurea.storage) >= 1)then return(not(player:sendTextMessage(MESSAGE_STATUS_SMALL, player:getName() .. " Você ja esta com a aurea ligada"))) end player:setStorageValue(config_aurea.storage, 1) player:setStorageValue(config_aurea.storage_pos, 0) aurea(player.uid) elseif(words == "!aura off")then player:setStorageValue(config_aurea.storage, 0) end return(false) end
     
    Agora em data/talkactions/talkactions.xml, abra ele e coloque :

     
    <talkaction words="!aura on;!aura off" script="aura.lua"/>
    Agora em data/creaturescript/script/login.lua, abra ele e embaixo de :
     
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
    Coloque : 
     
    player:setStorageValue(165477963, 0) player:setStorageValue(1547637649, 0)
     
    Creditos : Sr. Naja

    20210927_210547.mp4  
  21. Gostei
    najatheus deu reputação a GuiAmaro em Benedetta - A cidade lavada do pecado   
    ,
     
    Download: Clique Aqui
    Scan: Clique Aqui
    Descrição: Ilha completinha para vocês galera os que quiserem acompanhar o show-off do Mapa segue o video abaixo. Gosto de criar um mapa depois de forjar um RPG curto sobre o local para despertar mais criatividade na hora de criar os locais e nesta cidade eu me baseei na história de Moisés e as 10 pragas do Egito do livro Êxodo da Bíblia onde as caves são locais devastado por um poder Divino que castigou seres que adoravam coisas que não importavam e traziam desgraça aos locais e as pessoas boas que habitavam a Ilha, e o castigo levou tudo isso que danificava o lado bom da ilha ao subsolo dela e o que era bom e gracioso ficou na parte do térreo da Ilha. Eu dei referência a duas das 10 pragas do Egito em um andar e é representada pela praga que torno as águas do Egito em sangue e no andar abaixo o minimap desenha uma Rã que foi uma das pragas que caiu sobre a nação de Ramsés II. 
     
    Acompanhem o video, se puderem compartilhem com os amigos de vocês que se interessem por mapas únicos. Fiz o mapa do zero durante 1 mês nas minhas horas vagas. Dentro do canal vocês encontrarão vídeos de como eu mapeio, outra cidade e uma hunt, quem quiser se inscrever para acompanhar meus conteúdos agradeço. Ficaria mais grato ainda se vocês curtirem e compartilharem o video em outras comunidades que não tenho acesso. Mapeio tem 10 anos e quero enriquecer bastante a área de mapping da comunidade.
     
    REPORTEM BUGS
     

     
     
  22. Gostei
    najatheus deu reputação a marcoshps11 em Bot Discord - Merlin   
    * Áudio de saudação *
     
     
    O intuito deste bot é auxiliar jogadores de RPG interpretativo, porém podendo ser utilizado como um atrativo dentro do discord do seu projeto
     
    Possui algumas funções como:
    Criação de ficha do personagem Combate contra monstros Level UP Inventário do personagem Set para o personagem entre outras funções  
    É possível sincronizar com seu otserver e implementar ainda mais funções e atrativos para o chat
    * Este projeto ainda não está na sua versão final, é apenas um molde para desenvolvimento *
     
    Para o tópico não ficar muito longo, você pode conferir ele no link:

    https://github.com/marcoshps/Merlin-Bot
     
    algumas prints:
     
     
      
  23. Gostei
    najatheus deu reputação a Denker em (POKETIBIA) Item - Reward Quest   
    Em Data/Actions/Scripts, crie um arquivo.lua e coloque dentro:
     
    -- Developed by: Denker function OnUse(cid,item,fromPosition,item2,toPosition) Storage = -- Valor da storage que irá ser setada no player ItemID = -- Id do item Name = -- Nome do item Quantidade = -- Quantidade do item Level = -- Level requerido para pegar o item if getPlayerLevel(cid) >= Level and getPlayerStorageValue (cid,Storage)== -1 then doPlayerSendTextMessage(cid,25,"You found"..Quantidade....Name.."!") -- Mensagem que irá aparecer quando o player coletar o item doPlayerAddItem(cid, ItemID, Quantidade) setPlayerStorageValue (cid,Storage,1) elseif getPlayerLevel(cid) <= Level then doPlayerSendTextMessage(cid,25,"You need to level"..Level.."to collect this item") -- Mensagem caso o player não tenha o level necessário para pegar o item elseif getPlayerStorageValue(cid, Storage) >= 1 then doPlayerSendTextMessage(cid,25,"You have already collected this item") -- Mensagem caso o player já tenha pego o item end return true end Em Data/Actions/Actions.xml, coloque dentro:
     
    <action actionid="ID" event="script" value="Arquivo.lua"/>  

  24. Gostei
    najatheus deu reputação a Denker em (POKETIBIA) Teleport Item Door   
    Em Data/Actions/Scripts, crie um arquivo.lua e adicione:
     
    -- Developed by: Denker local Storage = -- Storaage que irá ser setada no player local Localizacao = {x= , y= , z= } -- Coordenadas para qual o player será teletransportado local ItemID = -- ID do item que o player terá que usar para ser teletransportado local Quantidade = -- Quantidade do item requerida para o player ser teletransportado function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid,ItemID) >= Quantidade or getPlayerStorageValue(cid, Storage) >=1 then doTeleportThing(cid,Localizacao) doPlayerRemoveItem(cid, ItemID, Quantidade) doSendMagicEffect(getPlayerPosition(cid), 21) doPlayerSendTextMessage(cid, 25, "Did you make it through the door") -- Mensagem que o player receberá ao ser teletransportado setPlayerStorageValue (cid,Storage,1) else doPlayerSendTextMessage(cid,25,"You don't have what it takes to get through this door") -- Mensagem que o player receberá caso não tenha os requisitos end return true end  
    Em Data/Actions/actions.xml, adicione:
     
    <action actionid ou itemid="ID" event="script" value="arquivo.lua"  

    OBS: O 2º teleporte é por conta que a storage foi setada 
  25. Gostei
    najatheus recebeu reputação de Denker em Addon System - (PDA)   
    System de addon, funciona da seguinte maneira:
    - O item deve ser usado diretamente na pokebola, caso o player deseje colocar um novo addon no pokemon, evoluir ou transformar em shiny, devera ser utilizado o comando: !removeAddon

    Instruções: 
    Insira na pasta datapack/actions/script/
    Addon.lua
     addonbox.lua
     
    Insira na pasta datapack/lib/
    Addon System.lua 
     
     
    Agora, em datapack/actions/actions.xml :
     
    <action itemid="13103;13114;13107" event="script" value="Addon.lua"/> <!-- Aqui estarão os id dos addons que vão ser utilizados na pokebola --> <action itemid="2183" event="script" value="addonbox.lua"/> <!-- Id da addon box -->
    Agora, em datapack/actions/scripts/goback.lua, abaixo de :
     
    local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end Insira :
     
    local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon)
    Agora, em datapack/actions/scripts/order.lua, abaixo de :
     
    doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1]
    Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon)
    Agora, em datapack/actions/scripts/evolution.lua, abaixo de :
     
    if not isMonster(item2.uid) or not isSummon(item2.uid) then return true end if #getCreatureSummons(cid) > 1 then return true --alterado v1.9 end Insira :
     
    local poke_addon = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "pokeaddon") if(poke_addon)then return doPlayerSendCancel(cid, "Please remove addon before evolution, Command: !removeAddon") end
    Agora, em datapack/actions/scripts/sh stone.lua, abaixo de :
     
    if getPlayerSlotItem(cid, 8).uid == itemEx.uid then if #getCreatureSummons(cid) <= 0 then Insira :
     
    local poke_addon = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "pokeaddon") if(poke_addon)then return doPlayerSendCancel(cid, "Please remove addon before evolution, Command: !removeAddon") end Agora, em datapack/creaturescripts/scripts/look.lua, abaixo de :
     
    if getItemAttribute(thing.uid, "gender") == SEX_MALE then table.insert(str, "It is male.") elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then table.insert(str, "It is female.") else table.insert(str, "It is genderless.") end Insira :
     
    if(getItemAttribute(thing.uid, "pokeaddon"))then local table_addon = ADDON_CONFIG[getItemAttribute(thing.uid, "pokeaddon")] if not table_addon then return true end table.insert(str, "\n" .. "Addon : " .. table_addon.name_addon .. ".") end Agora, em datapack/lib/order.lua, abaixo de :
     
    doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17000, 1) Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfitAbility(cid, addon) Continuando em datapack/lib/order.lua, abaixo de :
    elseif skill == "ride" then local pokemon = rides[getPokemonName(getCreatureSummons(cid)[1])] doChangeSpeed(cid, -getCreatureSpeed(cid)) local speed = 150 + PlayerSpeed + getSpeed(sid) * 5 * speedRate doChangeSpeed(cid, speed) setPlayerStorageValue(cid, 54844, speed) doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) setPlayerStorageValue(cid, 17001, 1) Insira : 
    addonTransformOutfitAbility(cid)
    Agora, em datapack/movements/scripts/surf.lua, abaixo de:
     
    doSetCreatureOutfit(cid, {lookType = surfs[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1) doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1) doChangeSpeed(cid, -(getCreatureSpeed(cid))) Insira :
     
    addonTransformOutfitAbility(cid) Continuando, em datapack/movements/script/surf.lua, abaixo de:
     
    doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] Insira :
     
    local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) local addon = getItemAttribute(slot.uid, "pokeaddon") addonTransformOutfit(cid, addon, pokemon) Agora, em datapack/talkactions/scripts/ crie um arquivo .lua, coloque dentro :
     
    function onSay(cid, words, param, channel) if(#getCreatureSummons(cid) >=1)then return false end local slot = getPlayerSlotItem(cid, CONST_SLOT_FEET) if not slot then return false end local addon_ball = getItemAttribute(slot.uid, "pokeaddon") if(addon_ball)then removeAddon(cid,slot,addon_ball) return true end end Agora, em datapack/talkactions/talkactions.xml registre :
     
    <talkaction words="!removeAddon" hide="yes" event="script" value="nome do arquivo.lua"/>
    Configurações :
     
    ADDON_CONFIG ={ [1] = { -- Type do attribute do addon addon1 = 2079, -- Id da outfit pokemon = "Blastoise", -- O pokemon name_addon = "Red ninja pack", -- Nome do addon habilidade = 2089, -- Id da outfit correspondente com sua habilidade }, } local addon_type = { [13114] = { -- Id do item pokemon_use = "Blastoise", -- O pokemon type = 1, -- Valor do attribute }, } Return_addon_table = { [1] = { -- Type do attribute retu = 13114, -- o id do item que o player vai ganhar }, } Creditos :
    Sr. Naja

    20210725_201402.mp4

Informação Importante

Confirmação de Termo