Ir para conteúdo

Wise

Membro
  • Registro em

  • Última visita

Tudo que Wise postou

  1. Sim, talvez substituindo a tag do player por esta: <group id="1" name="Player" flags="0" customFlags="8"/> Desse modo é bem mais simples, mas eu tinha feito pra enviar um tipo de mensagem, como a da foto citada. Teste @damiaotorres. Se preferir a da mensagem em laranja, eu refaço o script.
  2. Ah sim..agora que notei. local tab = { [9] = {color = 10}, -- [vocationID] = {color = número da cor do texto animado} [10] = {color = 30}, [11] = {color = 50}, [12] = {color = 70} } function ariseText(cid) local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)].color) addEvent(ariseText, 600, cid) return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end
  3. Ok, então a dúvida foi sanada ou você ainda precisa de ajuda pra mais alguma coisa relacionada?
  4. Wise respondeu ao post em um tópico de neobruno em Suporte Tibia OTServer
    Nossa! Que erro ridículo o meu. Desculpe, meu caro: local tab = { rate = {2, 6}, -- {exp, time} ~ tempo em horas stor = 50005 -- storage } function NormalExp(cid) doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, tab.stor, -1) doCreatureSay(cid, "NORMAL EXPERIENCE..", TALKTYPE_WHITE_1) end function onUse(cid, item, fromPos, item2, toPos) if getPlayerStorageValue(cid, tab.stor) < 1 then doPlayerSetRate(cid, SKILL__LEVEL, tab.rate[1]) addEvent(NormalExp, tab.rate[2] * 60 * 1000, cid) setPlayerStorageValue(cid, tab.stor, 1) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS) doCreatureSay(cid, "DOUBLE EXPERIENCE!", TALKTYPE_WHITE_1) else doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "You are already with double exp.") end return true end Não vejo erros agora, deve dar.
  5. Embora a área esteja incorreta..faça o seguinte: aura.lua (data/creaturescripts/scripts): local tab = { [9] = {effect = 27}, -- [vocationID] = {effect = Number} [10] = {effect = 28}, [11] = {effect = 29}, [12] = {effect = 30} } local delay = 3 -- tempo do efeito da aura em segundos function ariseAura(cid) doSendMagicEffect(getThingPos(cid), tab[getPlayerVocation(cid)].effect) addEvent(ariseAura, delay * 1000, cid) return true end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseAura(cid) end return true end Tag - creaturescripts.xml (data/creaturescripts): <event type="login" name="Aura" event="script" value="aura.lua"/>
  6. P.A = Premium Account V.I.P = Very Important Person Diferença ? Em relação ao Open Tibia, são apenas sinônimos referentes a algo limitado, de acesso exclusivo..como por exemplo (no Tibia Global): Sou premium account, por isso tenho acesso à vários outfits que players free não tem. Não há diferença, depende de quem interpreta e como interpreta, ambos os termos se referem a algo que apenas certos jogadores vão poder ter acesso, como acontece na sociedade, na vida real.
  7. Faça o seguinte.. Crie um arquivo e adicione o script à ele. vipeffect.lua (data/creaturescripts/scripts): local tab = { effect = {27, 5}, -- {number, delay} stor = 9994 -- storage } function sendEffect(cid) if isPlayer(cid) then doSendMagicEffect(getThingPos(cid), tab.effect[1]) addEvent(sendEffect, tab.effect[2] * 1000, cid) end return true end function onLogin(cid) if getPlayerStorageValue(cid, tab.stor) > 0 then sendEffect(cid) end return true end Adicione uma tag referente ao creature event em creaturescripts.xml (data/creaturescripts): <event type="login" name="VipEffect" script="vipeffect.lua"/>
  8. Fiz um creature event que checa se o player tem as 5 blessings. Se você quiser um valor de porcentagem de perda pra cada bless (1, 2, 3, 4, 5), me avise que eu refaço o script. blessedplayer.lua (data/creaturescripts/scripts): function onDeath(cid, corpse, deathList) for b = 1, 5 do if isPlayer(cid) and getPlayerBlessing(cid, b) and getCreatureSkullType < 4 then doCreatureSetDropLoot(cid, false) end end return true end Registre o creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "BlessedPlayer") Tag - creaturescripts.xml (data/creaturescripts): <event type="death" name="BlessedPlayer" event="script" value="blessedplayer.lua"/>
  9. function onLook(cid, thing, position, lookDistance) if thing.uid ~= cid and isPlayer(thing.uid) then string = 'You see '..getCreatureName(thing.uid)..'. '..(getPlayerSex(thing.uid) == 0 and 'She' or 'He')..' is a '..getPlayerVocationName(thing.uid)..'.\nInformação do jogador ('..getCreatureName(thing.uid)..')\nHealth: ['..getCreatureHealth(thing.uid)..'/'..getCreatureMaxHealth(thing.uid)..']\nMana: ['..getCreatureMana(thing.uid)..'/'..getCreatureMaxMana(thing.uid)..']' doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, string) elseif thing.uid == cid then string = 'You see yourself. You are '..getPlayerVocationName(cid)..'.\nInformação sua ('..getCreatureName(cid)..')\nHealth: ['..getCreatureHealth(cid)..'/'..getCreatureMaxHealth(cid)..']\nMana: ['..getCreatureMana(cid)..'/'..getCreatureMaxMana(cid)..']' doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, string) end return true end
  10. Já que é um servidor derivado de yurots, acredito que você use uma talkaction que adiciona todas as 5 blessings ao player de uma vez, certo? Crie esse creature event: blessedplayer.lua (data/creaturescripts/scripts): function onDeath(cid, corpse, deathList) for b = 1, 5 do if isPlayer(cid) and getPlayerBlessing(cid, b) and getCreatureSkullType < 4 then doSetCreatureDropLoot(cid, false) end end return true end Registre o creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "BlessedPlayer") Tag - creaturescripts.xml (data/creaturescripts): <event type="death" name="BlessedPlayer" event="script" value="blessedplayer.lua"/> Acredito que pela versão do seu TFS, algumas funções não existam. Mas também por ser um modelo de yurots, possa ter alguma função adicionada..então faça o teste e reporte qualquer bug.
  11. function onAdvance(cid, skill, oldLevel, newLevel) local pos = {x=32288, y=32337, z=15} if skill == SKILL__LEVEL and newLevel == 100 then doTeleportThing(cid, pos) end return true end
  12. Eu não errei nada, testei antes. Deu erro porque você não tinha a função getPlayerFrags e portanto o uso dela ficou como nulo. O outro membro só postou a função pra você adicionar ao meu script e daí ela ter o que retornar quando for chamada. Disponha.
  13. Wise respondeu ao post em um tópico de neobruno em Suporte Tibia OTServer
    Editei.
  14. Wise respondeu ao post em um tópico de neobruno em Suporte Tibia OTServer
    Desatenção minha. Tente agora ;]
  15. Wise respondeu ao post em um tópico de dragonskai em Suporte Tibia OTServer
    Dá uma olhada nesse NPC aqui.
  16. Wise respondeu ao post em um tópico de neobruno em Suporte Tibia OTServer
    local tab = { rate = {2, 6}, -- {exp, time} ~ tempo em horas stor = 50005 -- storage } function NormalExp(cid) doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, tab.stor, -1) doCreatureSay(cid, 'NORMAL EXPERIENCE..', TALKTYPE_WHITE_1) end function onUse(cid, item, fromPos, item2, toPos) if getPlayerStorageValue(cid, tab.stor) < 1 then doPlayerSetRate(cid, SKILL__LEVEL, tab.rate[1]) addEvent(NormalExp, tab.rate[2] * 60 * 1000, cid) setPlayerStorageValue(cid, tab.stor, 1) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS) doCreatureSay(cid, 'DOUBLE EXPERIENCE!', TALKTYPE_WHITE_1) else doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doPlayerSendCancel(cid, 'You are already with double exp.') end return true end
  17. Desculpe, falha minha. Remova todos os creature events look ou qualquer outro relacionado a isso. lookplayer.lua (data/creaturescripts/scripts): function onLook(cid, thing, position, lookDistance) local string = 'You see yourself.' if isPlayer(thing.uid) and thing.uid ~= cid then if getPlayerPremiumDays(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][VIP]') else doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][FREE]') end elseif thing.uid == cid then if getPlayerPremiumDays(cid) > 0 then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..'][VIP]') else doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..'][FREE]') end if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end Registre o creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "LookPlayer") Tag - creaturescripts.xml (data/creaturescripts): <event type="look" name="LookPlayer" event="script" value="lookplayer.lua"/>
  18. leverpos.lua (data/actions/scripts): local tab = { time = 24, -- tempo em horas, para usar a alavanca novamente storages = {22001, 22002}, -- {globalstorage, storage} pos = {x=697, y=486, z=7, stackpos=253} -- pos x, y, z } function onUse(cid, item, fromPos, item2, toPos) if getGlobalStorageValue(tab.storages[1]) - os.time() < 1 then if getPlayerStorageValue(cid, tab.storages[2]) < 1 then setGlobalStorageValue(tab.storages[1], os.time() + (tab.time * 3600)) setPlayerStorageValue(cid, tab.storages[2], 1) doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Look for Loki and kill him!') else doSendMagicEffect(fromPos, CONST_ME_POFF) doPlayerSendCancel(cid, 'You already have used the lever.') end else doSendMagicEffect(fromPos, CONST_ME_POFF) doPlayerSendCancel(cid, 'The lever can only be used once a day.') end return true end Tag - actions.xml (data/actions): <action actionid="ACTIONID" event="script" value="leverpos.lua"/>
  19. Callback de onLogin não registra creature event, e nesse caso só precisa registrar o do look mesmo. Mantenha tudo como está (arquivo, tag, registro), só substitua o script anterior por este: local stor = 39993 function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then if getPlayerStorageValue(thing.uid, stor) > 0 then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][VIP]') else doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..'][FREE]') end end return true end function onLogin(cid) if isPremium(cid) and getPlayerStorageValue(cid, stor) < 1 then setPlayerStorageValue(cid, stor, 1) elseif not isPremium(cid) and getPlayerStorageValue(cid, stor) > 0 then setPlayerStorageValue(cid, stor, -1) end return true end Apenas adicione a tag do creature event login em creaturescripts.xml (data/creaturescripts): <event type="login" name="VipOrFreeStor" event="script" value="viporfree.lua"/>
  20. Remova/desative esse script e faça o seguinte.. viporfree.lua (data/creaturescripts/scripts): function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then if getPlayerPremiumDays(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid,'[VIP]') else doPlayerSetSpecialDescription(thing.uid,'[FREE]') end end return true end Tag - creaturescripts.xml (data/creaturescripts): <event type="look" name="VipOrFree" event="script" value="viporfree.lua"/> Adicione o registro do creature event em login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "VipOrFree")
  21. O parâmetro fromvoc é referente ao ID da vocação que a antecede, não tem relação alguma com o que você disse.
  22. Tente agora: function onLook(cid, thing, position, lookDistance) local string = 'You see yourself.' if(isPlayer(thing.uid) and thing.uid ~= cid) then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']') elseif(thing.uid == cid) then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif(getPlayerVocation(cid) ~= 0) then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if(getPlayerGuildId(cid) > 0) then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end if(isPlayer(thing.uid)) then if(getPlayerPremiumDays(thing.uid) > 0 (or getBooleanFromString(getConfigInfo('freePremium')))) then doPlayerSetSpecialDescription(thing.uid,'[VIP]') else doPlayerSetSpecialDescription(thing.uid,'[FREE]') end end return true end
  23. O parâmetro fromvoc não tem relação alguma com retirar as vocações de escolha do account manager. Pra isso, você tem de alterar o valor do parâmetro needpremium (vocations.xml) que está na linha do código (da vocação em questão) para como sendo 1: needpremium="1"
  24. function onLook(cid, thing, position, lookDistance) local string = 'You see yourself.' if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']') elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end if isPlayer(thing.uid) and getPlayerPremiumDays(thing.uid) > 0 then doPlayerSetSpecialDescription(thing.uid,'[VIP]') else doPlayerSetSpecialDescription(thing.uid,'[FREE]') end return true end

Informação Importante

Confirmação de Termo