Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''temperature''.



Mais opções de pesquisa

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • A Cidade OTBR
    • OTServ Brasil
    • Atendimento
    • Taverna
  • Projetos Open Source
    • Canary
    • OTServBR-Global
    • Mehah OTClient
    • MyAAC
  • OpenTibia
    • Notícias e Discussões
    • Suporte - Dúvidas, Bugs, Erros
    • Downloads
    • Tutoriais
    • Show-Off
  • Outros
    • Design

Encontrado 1 registro

  1. Tibia Real Temperature

    [spoiler=Features]-- 2.0 ( em desenvolvimento *Dano por level *Sugestao do pessoal --1.0-- ( atual ) *Sistema de temperatura por Outfits e Ground *Altura de uma montanha ou profundidade de caves influencia na temperatura final. *Adicionado /temp *Suor, caso temperatura muito alta. ( splash de agua ) *Perca de vida, caso temperatura muito baixo ou muito alta. */temp para ver temperatura. Breve estarei colocando SS's. Instalando... Bom, pra nao ficar cansativo, vo colocar nos Spoilers o nome do arquivo a ser criado, ou modificado. ( no caso de por exemplo: movements.xml, ou login.lua, que ja existem. ) [spoiler=Creaturescripts.xml] <creaturescripts> <event type="think" name="temp" event="script" value="temp.lua"/> </creaturescripts> [spoiler=creaturescripts/scripts/temp.lua] function onThink(cid, interval) if isPlayer(cid) and getPlayerAccess(cid) == 0 then ------------------------- CONFIG ---------------------- -- Como configurar: Modifique os numeros abaixo da direita para -- determinar a temperatura da outfit... outfit_temp = { -- Female Outfits [136] = 6, [137] = 5, [138] = 5, [139] = 6, [140] = 7, [141] = 6, [142] = 8, [147] = 11, [148] = 6, [149] = 6, [150] = 8, [155] = 7, [156] = 2, [157] = 20, [158] = 11, [152] = 9, [259] = 8, [270] = 14, [279] = 15, [288] = 4, [324] = 5, [336] = 6, [329] = 6, [366] = 8, -- Male Outfits [128] = 6, [129] = 5, [130] = 5, [131] = 6, [132] = 7, [133] = 6, [134] = 8, [143] = 11, [144] = 6, [145] = 6, [151] = 8, [152] = 7, [153] = 20, [154] = 14, [251] = 11, [268] = 9, [273] = 8, [278] = 14, [279] = 15, [289] = 4, [325] = 5, [335] = 6, [328] = 6, [367] = 8, } temp_base = 20 min_dano = 15 -- Dano por temperatura um pouco alta/baixa max_dano = 100 -- Dano por temperatura muito alta/baixa delay = 2000 -- tempo em milissigundos dos danos sub_config = 1 -- Ativar temperatura subterranea? ( 0 - Nao ) ( 1 - SIM ) -----------------------------FIM DAS CONFIG ------------------------ temp_local = getPlayerStorageValue(cid, 121314) pos = getCreaturePosition(cid) if temp_local == -1 then temp_local = 0 end temp_user = (temp_base + temp_local + outfit_temp[getCreatureOutfit(cid).lookType]) if sub_config == 1 then ----------------------- Subterraneo ------------------------------- sub = { -11, -10, -8,-5 ,-3 ,-55 , [7] = 0, 55, 5, 7, 10, 12, 15} if pos.z ~= 7 then temp_user = temp_user + sub[pos.z] end end ------------------------------------------------------------------- setPlayerStorageValue(cid, 12345, temp_user) if temp_user >= 40 and temp_user < 50 then addEvent(Quente, delay, cid,min_dano) elseif temp_user >=50 then addEvent(Quente, delay, cid,max_dano) elseif temp_user <= 10 and temp_user > 0 then addEvent(Frio, delay, cid,min_dano) elseif temp_user < 0 then addEvent(Frio, delay, cid,max_dano) end end end function Quente(cid,dano,r) doPlayerSendTextMessage(cid, 22, "Voce esta sentindo muito calor...") doCreatureAddHealth(cid, -dano) r = math.random(1,100) if r <= 30 then doCreateItem(2018, getCreaturePosition(cid)) end end function Frio(cid,dano) doPlayerSendTextMessage(cid, 22, "Voce esta sentindo muito frio...") doCreatureAddHealth(cid, -dano) end [spoiler=creaturescript/scripts/login.lua ( adicionar linha )] registerCreatureEvent(cid, "temp") Movements [spoiler=movements/scripts/temp_tiles_areia.lua] function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) then setPlayerStorageValue(cid, 121314, 20) end return true end function onStepOut(cid, item, position, fromPosition) pos = {x=position.x,y=position.y,z=position.z,stackpos=0} ground = getThingFromPos(pos) --------- Deserto Tiles ------------- deserto_tile = {231} -- Primeira ID "diferente do padrao de "ID=ID + 1 " ^^ deserto_tileid_min = 8315 -- Minimo ID do deserto deserto_tileid_max = 8322 -- Maximo ID do deserto for i=deserto_tileid_min, deserto_tileid_max, 1 do table.insert(deserto_tile,i) end ------------------------------------- if not isInArray(deserto_tile,ground.id) then setPlayerStorageValue(cid, 121314, 0) end return true end [spoiler=temp_tiles_gelo.lua] function onStepIn(cid, item, position, fromPosition) if isPlayer(cid) then setPlayerStorageValue(cid, 121314, -20) end return true end function onStepOut(cid, item, position, fromPosition) pos = {x=position.x,y=position.y,z=position.z,stackpos=0} ground = getThingFromPos(pos) --- GELO tiles---- gelo_tile = {} gelo_tileid_min = 6580 gelo_tileid_max = 6608 for i=gelo_tileid_min, gelo_tileid_max, 1 do table.insert(gelo_tile,i) end --------------- if not isInArray(gelo_tile,ground.id) then setPlayerStorageValue(cid, 121314, 0) end return true end [spoiler=movements.xml ( adicionar linha )] <!-- Areia tiles --> <movevent type="StepIn" itemid="231" event="script" value="temp_tiles_areia.lua"/> <movevent type="StepOut" itemid="231" event="script" value="temp_tiles_areia.lua"/> <movevent type="StepIn" fromid="8315" toid="8322" event="script" value="temp_tiles_areia.lua"/> <movevent type="StepOut" fromid="8315" toid="8322" event="script" value="temp_tiles_areia.lua"/> <!-- Gelo Tiles --> <movevent type="StepIn" fromid="6580" toid="6608" event="script" value="temp_tiles_gelo.lua"/> <movevent type="StepOut" fromid="6580" toid="6608" event="script" value="temp_tiles_gelo.lua"/> Finalmente... Talkactions [spoiler=talkactions/scripts/temp.lua] function onSay(cid, words, param) doPlayerSendCancel(cid,"Voce esta sentindo "..getPlayerStorageValue(cid, 12345).." Graus") end [spoiler=talkactions.xml ( adicionar linha )] <talkaction words="/temp" event="script" value="temp.lua"/> Isso ai, esse sistema foi feito pro concurso SOTW, e divulgado agora. Essa eh a versao 1.0, e se vcs forem pesquisar no temp.lua do creaturescripts, tem comentarios explicando como deve configurar. Se forem postar em outros topicos, me mandem MP, e nao retirem os creditos Nao esquecem de avisar pros players que o sistema existe! :fuu: Se tiver qualquer erro no Scripts, seja por formatação do topico, seje pelo sistema, me mande MP que eu arrumo.
×