Ir para conteúdo

Oneshot

Marquês
  • Total de itens

    1347
  • Registro em

  • Última visita

  • Dias Ganhos

    36

Tudo que Oneshot postou

  1. Você seguiu todas as instruções passadas no tópico? Adicionou a linha no creaturescripts.xml e a função registerCreatureEvent no arquivo login.lua em data/creaturescripts/scripts?
  2. Acho que só existem duas distribuições 9.60 atualmente, a subversion do projeto Open Tibia e o The Forgotten Server 0.4, o qual só tem acesso aqueles com subscriptions da OTLand Inclusive estarei reportando o tópico, pois parece que o dono do tópico já obteve sua dúvida sanada.
  3. Oneshot

    {Resolvido}

    Não, aí você simplesmente retira a condição do jogador com essa função: doRemoveCondition(cid, CONDITION_ATTRIBUTES)
  4. Oneshot

    Teleport Por Tempo

    FORGE_FROMPOSITION = {x = 131, y = 117, z = 7} -- POSIÇÃO SUPERIOR-ESQUERDA DA ÁREA FORGE_TOPOSITION = {x = 145, y = 123, z = 7} -- POSIÇÃO INFERIOR-DIREITA DA ÁREA FORGE_TELEPORTPOSITION = {x = 138, y = 121, z = 7} -- PARA ONDE O TELEPORTE LEVA FORGE_KICKPOSITION = {x = 95, y = 117, z = 7} -- PARA ONDE O JOGADOR É LEVADO QUANDO O TEMPO ACABAR FORGE_GLOBALSTORAGE = 30001 FORGE_MAXTIME = 5 * 60 -- TEMPO MÁXIMO function getSpectatorsInArea(fromPosition, toPosition) local width = (((math.max(fromPosition.x, toPosition.x) - math.min(fromPosition.x, toPosition.x)) * 0.5) + 1) local height = (((math.max(fromPosition.y, toPosition.y) - math.min(fromPosition.y, toPosition.y)) * 0.5) + 1) local center = {x = (math.min(fromPosition.x, toPosition.x) + width), y = (math.min(fromPosition.y, toPosition.y) + height), z = fromPosition.z} return getSpectators(center, width, height, false) end function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if getSpectatorsInArea(FORGE_FROMPOSITION, FORGE_TOPOSITION) and #getSpectatorsInArea(FORGE_FROMPOSITION, FORGE_TOPOSITION) > 0 then doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "Já há alguém na sala, espere ".. math.ceil((getStorage(FORGE_GLOBALSTORAGE) - os.time())/60) .." minutos.") return true end for x = FORGE_FROMPOSITION.x, FORGE_TOPOSITION.x do for y = FORGE_FROMPOSITION.y, FORGE_TOPOSITION.y do local tmp = {x = x, y = y, z = FORGE_FROMPOSITION.z} for i = 1, 255 do tmp.stackpos = i doCleanTile(tmp, false) end end end doTeleportThing(cid, FORGE_TELEPORTPOSITION) doSendMagicEffect(FORGE_TELEPORTPOSITION, CONST_ME_TELEPORT) doPlayerPopupFYI(cid, "Você pode ficar cinco minutos na área de forja. Quando o tempo acabar, você será expulso.") doSetStorage(FORGE_GLOBALSTORAGE, os.time() + FORGE_MAXTIME) addEvent(function() doTeleportThing(cid, FORGE_KICKPOSITION) doSendMagicEffect(FORGE_KICKPOSITION, CONST_ME_TELEPORT) doPlayerPopupFYI(cid, "Seu tempo acabou.") end, FORGE_MAXTIME * 1000) return true end É um StepIn, registre no movements.xml com um uniqueid de sua escolha e coloque esse mesmo uniqueid no teleporte. Aconselho que você também coloque No-Logout Zone na área. Configure as posições como pedidas. Abraços.
  5. local storage, ret = 100000 function onUse(cid, item, fromPosition, itemEx, toPosition) ret = getCreatureStorage(cid, storage) print(ret) if doCreatureSetStorage(cid, storage, ret + 1) then ret = getCreatureStorage(cid, storage) end print(ret) return true end
  6. Lembra quando você tinha uma lojinha de scripts (que não eram de sua autoria) e servidores? Vamos dizer que eu vou lá e compro um servidor seu, edito umas "coisinhas" e libero para a galera num tópico intitulado "Servidor da Subwatsoft", você iria gostar? Acho que a mesma coisa está acontecendo aqui. Não tiro a razão deles de ter apagado o tópico, mas acho também um ato meio que hipócrita, pois deixam um monte de tópicos: Baiak Extreme, Emporia Vapus, várias revisões do The Forgotten Server 0.4 e só apagam justamente esse. Abraços.
  7. Oneshot

    {Resolvido}

    Só dando uma ajuda a vocês, porque diabos vocês estão manipulando o HP/MP máximo dos jogadores, quando, na verdade, sem nenhuma complicação, vocês podem adicionar uma condition ao jogador que aumente HP e MP? local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_STAT_MAXHEALTH, 150) setConditionParam(condition, CONDITION_PARAM_BUFF, true) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, -1) setConditionParam(condition, CONDITION_PARAM_STAT_MAXMANA, 150) setConditionParam(condition, CONDITION_PARAM_BUFF, true) doAddCondition(cid, condition) Abraços.
  8. Só usar essa talkaction, é a mesma coisa do tópico que você passou, mas verifica se o jogador tem premium. local stor, limit = 7575, 5 --storage, limit to add. local allow_container = false --empty! not looted with items, atleast for now. function onSay(cid, words, param) if not isPremium(cid) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUNEEDPREMIUMACCOUNT) return true end local expl = param:explode(':') local action, rst = expl[1], expl[2] if (action:lower() == 'check') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):explode(',') end local txt = 'Autoloot List:\n' if (#list > 0) then for k, id in ipairs(list) do id = id:gsub('_', '') if tonumber(id) then txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '') end end else txt = 'Empty' end doPlayerPopupFYI(cid, txt) elseif (action:lower() == 'add') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not allow_container and isItemContainer(item) then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end local attrs = getItemInfo(item) if not attrs then return doPlayerSendCancel(cid, 'not valid item.') elseif not attrs.movable or not attrs.pickupable then return doPlayerSendCancel(cid, 'this item can not be autolooted.') end if isInArray(list, item) then return doPlayerSendCancel(cid, 'already added.') end table.insert(list, tostring(item)) local new = '' for v, id in ipairs(list) do new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.') elseif (action:lower() == 'remove') then local infos, list = getPlayerStorageValue(cid, stor), {} if (infos ~= -1) then list = tostring(infos):gsub('_', ''):explode(',') end if (#list == 0) then return doPlayerSendCancel(cid, 'You dont have any item added.') end if (#list >= limit) then return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.') end local item = tonumber(rst) if not item then item = getItemIdByName(rst, false) if not item then return doPlayerSendCancel(cid, 'not valid item.') end end if not isInArray(list, item) then return doPlayerSendCancel(cid, 'This item is not in the list.') end local new = '' for v, id in ipairs(list) do if (tonumber(id) ~= item) then new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '') end end doPlayerSetStorageValue(cid, stor, tostring(new)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.') end return true end
  9. Talvez eu separe depois e até exemplifique. Essa é uma versão temporária da lista. Abraços.
  10. Olá, essa é uma lista dos possíveis atributos que podem ser usados na configuração de itens no seu servidor, criada por mim. Não se trata de um tutorial, mas apenas uma pequena ajuda para aqueles que querem criar equipamentos criativos ou itens em geral. Se um atributo requerir certos tipos de valores, estes serão listados logo abaixo. name article plural type container magicfield depot mailbox trashholder teleport door bed rune clientid description weight showcount blocksolid || blocking blockprojectile blockpathfind || blockpathing || blockpath movable || moveable pickupable allowpickupable forceserialize || forceserialization || forcesave leveldoor lightlevel lightcolor runespellname armor defense extradefense || extradef attack extraattack || extraatk attackspeed floorchange down north south west east northex southex westex eastex corpsetype venom blood undead fire energy fluidsource containersize writeable || writable readable maxtextlen || maxtextlenght text author || writer date writeonceitemid worth weapontype sword club axe shield distance || dist wand || rod ammunition || ammo fist slottype head body legs feet backpack two-handed necklace ring ammo hand ammotype shoottype effect range duration showduration stopduration decayto transformequipto || onequipto transformdeequipto || ondeequipto charges showcharges showattributes breakchance ammoaction hitchance maxhitchance dualwield preventloss preventdrop invisible manashield speed healthgain healthticks managain manaticks skillsword skillaxe skillclub skilldist skillfish skillshield skillfist maxhealthpoints || maxhitpoints maxhealthpercent || maxhitpointspercent maxmanapoints maxmanapercent || maxmanapointspercent soulpoints soulpercent || soulpointspercent magiclevelpoints || magicpoints magiclevelpercent || magicpointspercent increasemagicvalue increasemagicpercent increasehealingvalue increasehealingpercent fieldabsorbpercentenergy fieldabsorbpercentfire fieldabsorbpercentpoison || fieldabsorbpercentearth absorbpercentall absorbpercentelements absorbpercentmagic absorbpercentenergy absorbpercentfire absorbpercentpoison || absorbpercentearth absorbpercentice absorbpercentholy absorbpercentdeath absorbpercentlifedrain absorbpercentmanadrain absorbpercentdrown absorbpercentphysical absorbpercenthealing absorbpercentundefined reflectpercentall reflectpercentelements reflectpercentmagic reflectpercentenergy reflectpercentfire reflectpercentpoison || reflectpercentearth reflectpercentice reflectpercentholy reflectpercentdeath reflectpercentlifedrain reflectpercentmanadrain reflectpercentdrown reflectpercentphysical reflectpercenthealing reflectpercentundefined reflectchanceall reflectchanceelements reflectchancemagic reflectchanceenergy reflectchancefire reflectchancepoison || reflectchanceearth reflectchanceice reflectchanceholy reflectchancedeath reflectchancelifedrain reflectchancemanadrain reflectchancedrown reflectchancephysical reflectchancehealing reflectchanceundefined suppressshock || suppressenergy suppressburn || suppressfire suppresspoison || suppressearth suppressfreeze || suppressice suppressdazzle || suppressholy suppresscurse || suppressdeath suppressdrown suppressphysical suppresshaste suppressparalyze suppressdrunk suppressregeneration suppresssoul suppressoutfit suppressinvisible suppressinfight suppressexhaust suppressmuted suppresspacified suppresslight suppressattributes suppressmanashield field fire energy poison || earth ice || freezing holy || dazzled death || cursed drown physical ticks count start damage elementphysical elementfire elementenergy elementearth elementice elementholy elementdeath elementlifedrain elementmanadrain elementhealing elementundefined replacable partnerdirection maletransformto femaletransformto transformto rotateto walkstack Abraços.
  11. O tópico foi criado em uma área inapropriada, amigo, a seção correta é Pedidos e dúvidas - Geral Estou reportando para a moderação para que movam o tópico. Abraços.
  12. Acho que sei seu problema. Procure no config.lua por isso: storeTrash Se estiver assim storeTrash = false Mude para storeTrash = true Abraços.
  13. Isso não é feito nas sources. O certo é você procurar por um gerador de flags e calcular o número sem a opção de ver a descrição especial das criaturas para o grupo Senior Tutor. Player Flags Custom Flags As flags são configuradas no arquivo groups.xml, usualmente encontrado em data/XML.
  14. Só agora que você resolveu dizer que é para a versão 8.0? Pelo amor, hein... Infelizmente não sei como posso te ajudar, então, boa sorte. Abraços.
  15. Oneshot

    Tfs 0.4 Rev 3884

    Não, não possuo.
  16. Esse erro não tem absolutamente nada a ver com o fato de os jogadores não estarem entrando no seu servidor. Esse erro simplesmente se dá quando a SVN da OTLand (responsável pelo The Forgotten Server) está fora do ar e então, o executável não consegue "puxar" informações sobre a versão mais atual do The Forgotten Server e dentre outras coisas. Recomendo que você reinicie seu modem para que ele escolha um novo IP, verifique se o seu IP fixo está redirecionando para o IP atual, ou remova as portas 7171 e 7172 do firewall e as adicione novamente. Abraços.
  17. Oneshot

    Tfs 0.4 Rev 3884

    http://www.mediafire.com/?2z4kalw589upakm Abraços
  18. Oneshot

    Zombie Aleatorio

    Como prometido, Biohazard
  19. Olá, Pess0a Em data/creaturescripts/scripts, crie um arquivo chamado ondeath_storage.lua e adicione o seguinte conteúdo: local key = 100000 function onDeath(cid, corpse, deathList) local killer = deathList[1] if not isPlayer(killer) then return true end doCreatureSetStorage(killer, key, 1) doPlayerSendTextMessage(killer, MESSAGE_INFO_DESCR, "Você desferiu o último golpe em ".. getCreatureName(cid) ..".") return true end Em creaturescripts.xml <event type="death" name="onDeathStorage" event="script" value="ondeath_storage.lua"/> No arquivo XML da criatura que executará o creaturescript: <script> <event name="onDeathStorage"/> </script> Abraços.
  20. Fiz um aqui: local config = { [1] = { [100] = { {2160, 30}, } }, [2] = { [100] = { {2160, 30}, } }, [3] = { [100] = { {2160, 30} } }, [4] = { [100] = { {2160, 30} } } } function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__LEVEL then local x = (config[getPlayerVocation(cid)] or config[getVocationInfo(getPlayerVocation(cid)).fromVocation]) if not x then return true end local y = x[newLevel] if not y then return true end local items = "" local n = 1 local gift for _, item in ipairs(y) do if type(item) == "table" then gift = doCreateItemEx(item[1], item[2]) items = items .. (n == 1 and "" or ", ") .. item[2] .." ".. getItemNameById(item[1]) else gift = doCreateItemEx(item, 1) items = items .. (n == 1 and "" or ", ") .. getItemNameById(item) end doPlayerAddItemEx(cid, gift, true) n = n + 1 end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received: ".. items ..".") end return true end Para configurar, basta mexer nessa tabela: local config = { [1] = { [100] = { {2160, 30} } }, [2] = { [100] = { {2160, 30}, {2157, 3}, 2158 } }, [3] = { [100] = { {2160, 30} } }, [4] = { [100] = { {2160, 30} } } } Ele já está pré-configurado para dar 30 crystal coins para qualquer vocação no level 100. Vamos agora a um exemplo básico, uma Magic Sword no level 300 para Knights. local config = { [1] = { [100] = { {2160, 30} } }, [2] = { [100] = { {2160, 30}, {2157, 3}, 2158 } }, [3] = { [100] = { {2160, 30} } }, [4] = { [100] = { {2160, 30} }, [300] = { 2400 } } } O sistema suporta múltiplos itens, basta adicionar uma vírgula no fim de cada linha, com exceção da última. [1] = { [100] = { {2160, 30}, 1111, 2222, 3333, 4444 } O sistema é inteligente e procura na tabela pela vocação-base de jogadores promovidos, então você não precisa adicionar outras vocações. Abraços.
  21. No ID da armadura que você quer, adicione essa linha: <attribute key="maxhealthpoints" value="2000"/> Por exemplo, com a Magic Plate Armor: <item id="2472" article="a" name="magic plate armor"> <attribute key="weight" value="8500"/> <attribute key="armor" value="17"/> <attribute key="maxhealthpoints" value="2000"/> <attribute key="slotType" value="body"/> </item> E no movements.xml, adicione as linhas: <movevent type="Equip" itemid="2472" slot="armor" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="2472" slot="armor" event="function" value="onDeEquipItem"/> Tomando como exemplo a Magic Plate Armor
  22. local config = { messages = {"AUSENTE!", "VOLTO JÁ!"}, delay = 10 } local function automessage(cid, position) if isCreature(cid) then if getCreatureStorage(cid, 101010) == 1 then if getThingPosition(cid) == position then doCreatureSay(cid, config.messages[math.random(1, #config.messages)], TALKTYPE_ORANGE_1) addEvent(automessage, config.delay * 1000, cid) else doCreatureSetStorage(cid, 101010, -1) end end end return end function onSay(cid, words, param, channel) if getCreatureStorage(cid, 101010) == -1 then doCreatureSay(cid, config.messages[math.random(1, #config.messages)], TALKTYPE_ORANGE_1) addEvent(automessage, config.delay * 1000, cid, getThingPosition(cid)) doPlayerSendCancel(cid, "Ausente Ativado") doCreatureSetStorage(cid, 101010, 1) else doPlayerSendCancel(cid, "Ausente Desativado") doCreatureSetStorage(cid, 101010, -1) end return true end
  23. Terminei mais um sistema - Evento Biohazard - logo, logo no XTibia.com
  24. "A conexão com www.xtibia.com foi interrompida.", tá difícil hoje hein...
  • Quem Está Navegando   0 membros estão online

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