Ir para conteúdo

netflat

Campones
  • Total de itens

    84
  • Registro em

  • Última visita

Tudo que netflat postou

  1. netflat

    Reset System

    ta certo? Se eu remover isso aqe: else doPlayerSendCancel(cid, "You need to have 79 reset or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end o script vai funcionar normal ainda?
  2. Não posso passar. @tópico Vou tentar atualizar esta semana o server...
  3. Vá na sua datebase e vai ter algo como player_items, dai se apaga tudo que tive la. Deve ter uma query que faz isso, mais eu não sei qual é '-' Àrea errada.
  4. netflat

    Reset System

    hum valeu, vo testa aqui depois do almoço ahh e se eu quiser colocar mais stages é so botar isso aqe? if getPlayerStorageValue(cid,1020) > 24 then if getPlayerLevel(cid) >= 500 then setPlayerStorageValue(cid,1020,getResets(cid)+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level 500 or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You need to have 24 reset or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end
  5. netflat

    Reset System

    Bom meu sistema de reset tem dois níveis: lvl 350 - 1 a 14 resets lvl 450 - 14 resets+ queria adicionar mais um nível: lvl 500 - 24 resets+ script: function onSay(cid, words, param) config = { RemainingLvl=8, -- level que ficará depois de ser resetado. exper=4200, -- experiencia que ficará depois de ser resetado. pid=getPlayerGUID(cid), -- não mecha redskull="yes", -- players com red skull podem resetar? ("yes" or "no"). bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no"). } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"Apenas player sem red skull podem resetar.") return true end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == false) then doPlayerSendTextMessage(cid,22,"Você precisa estar em protection zone pra poder resetar.") return true end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == true) then doPlayerSendTextMessage(cid,22,"Você precisa estar sem battle pra poder resetar.") return true end if getPlayerStorageValue(cid,1020) > 14 then if getPlayerLevel(cid) >= 450 then setPlayerStorageValue(cid,1020,getResets(cid)+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level 450 or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end elseif getPlayerLevel(cid) >= 350 then setPlayerStorageValue(cid,1020,getResets(cid)+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level 350 or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end
  6. affs, esse cara fica re-postando tópicos, bani logo ele!
  7. netflat

    Door

    Valeu, funcionou certinho aqui.
  8. netflat

    Door

    Tipo do script: Action Protocolo (versão do Tibia): 8.54 Servidor utilizado: Crying Damson 0.3.6pl1 Nível de experiência: Iniciante Adicionais/Informações: Uma porta que o player só passa se tiver 5 storagevalue (1020). Esse storagevalue é do meu sistema de reset, então o player só passa se tiver 5 resets (no caso, 5 storagevalue 1020).
  9. Porque se copiou meu tópico ? eu ja postei esse server aqui no xtibia
  10. Olha cara, saiu uma versão para donator, mais eu não to conseguindo compilar ela e também não posso postar ela pois é proibido. eu posso até atualizar quando tiver bug's descoberto + eu não achei mais nenhum =/
  11. netflat

    [Talkaction] !rank

    eu criei mais não sei modifica o script =/ ja consegui arruma
  12. netflat

    [Talkaction] !rank

    ainda não funcionou =/ edit: apareceu mais ficou meio estranho oO:
  13. netflat

    [Talkaction] !rank

    Não deu certo, so apareceu 28 players em vez de 10 o/ edit: olha acho que se der para fazer isso aqui deve funcionar: db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = 1020 ORDER BY `value` DESC LIMIT 0,"..(max)..";") em vez de ler storage id e talz ler: players/resets (datebase) da para fazer isso?
  14. 1- Meu problema é o seguinte, tenho meu script de ranks, eu coloquei o sistema de reset nele, mais no !rank resets aparece so até o 9 reset, apartir do 9 não aparece mais no rank. Script: elseif param == "resets" then name = name.."Rank Resets - Nome do Jogador\n" local v = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = 1020 ORDER BY `value` DESC LIMIT 0,"..(max)..";") local kk = 0 repeat if kk == max or v:getID() == -1 then break end kk = kk+1 name_now, l = getPlayerNameByGUID2(v:getDataInt("player_id")), string.len(getPlayerNameByGUID2(v:getDataInt("player_id"))) space = "" for i=1, letters_to_next-l do space = space.." " end if name_now == nil then name_now = 'sql error['..v:getDataInt("player_id")..']' end name = name..kk..". "..v:getDataInt("value").." - "..name_now..space.." ".." ".."".."\n" until v:next() == false Script completo: function getPlayerNameByGUID2(n) local c = db.getResult("SELECT `name` FROM `players` WHERE `id` = "..n..";") if c:getID() == -1 then return "SQL_ERROR["..n.."]" end return c:getDataString("name") end function onSay(cid, words, param) local max = 10 local letters_to_next = 20 local skills = { ['fist'] = 0, ['club'] = 1, ['sword'] = 2, ['axe'] = 3, ['distance'] = 4, ['shielding'] = 5, ['fishing'] = 6, ['dist'] = 4, ['shield'] = 5, ['fish'] = 6, } local name_now local name = "Highscore for level\n" local rkn = 0 local no_break = 0 param = string.lower(param) dofile('config.lua') if param == "" or param == "level" and ( param ~= "magic" and param == "ml") and skills[param] == nil then name = name.."\n" name = name.."Rank Level - Nome do Jogador\n" local v = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` <= 2 ORDER BY `experience` DESC LIMIT 0,"..(max)..";") repeat no_break = no_break +1 if v:getID() == -1 then break end rkn = rkn+1 name_now, l = v:getDataString("name"), string.len(v:getDataString("name")) space = "" for i=1, letters_to_next-l do space = space.." " end name = name..rkn..". "..v:getDataInt("level") .." - "..name_now..space.." ".."\n" if no_break >= 20 then break end until v:next() == false elseif param == "magic" or param == "ml" then name = name.."\n" name = name.."Rank Magic - Nome do Jogador\n" local v = db.getResult("SELECT `name`, `level`, `maglevel` FROM `players` WHERE `group_id` <= 2 ORDER BY `maglevel` DESC LIMIT 0,"..(max)..";") repeat if v:getID() == -1 then break end rkn = rkn+1 name_now, l = v:getDataString("name"), string.len(v:getDataString("name")) space = "" for i=1, letters_to_next-l do space = space.." " end name = name..rkn..". "..v:getDataInt("maglevel").." - "..name_now..space.." ".." ".."".."\n" until v:next() == false elseif param == "resets" then name = name.."Rank Resets - Nome do Jogador\n" local v = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = 1020 ORDER BY `value` DESC LIMIT 0,"..(max)..";") local kk = 0 repeat if kk == max or v:getID() == -1 then break end kk = kk+1 name_now, l = getPlayerNameByGUID2(v:getDataInt("player_id")), string.len(getPlayerNameByGUID2(v:getDataInt("player_id"))) space = "" for i=1, letters_to_next-l do space = space.." " end if name_now == nil then name_now = 'sql error['..v:getDataInt("player_id")..']' end name = name..kk..". "..v:getDataInt("value").." - "..name_now..space.." ".." ".."".."\n" until v:next() == false elseif skills[param] ~= nil then name = name.."\n" name = name.."Rank "..param.." fighting - Nome do Jogador\n" local v = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..skills[param].." ORDER BY `value` DESC;") local kk = 0 repeat if kk == max or v:getID() == -1 then break end kk = kk+1 name_now, l = getPlayerNameByGUID2(v:getDataInt("player_id")), string.len(getPlayerNameByGUID2(v:getDataInt("play er_id"))) space = "" for i=1, letters_to_next-l do space = space.." " end if name_now == nil then name_now = 'sql error['..v:getDataInt("player_id")..']' end name = name..kk..". "..v:getDataInt("value").." - "..name_now..space.." \n" until v:next() == false end if name ~= "Highscore\n" then doPlayerPopupFYI(cid, name) end return true end 2- Bom eu criei um tabela em players chamada resets, dai quando alguem diz !reset (comando para resetar), adiciona uma storage value e adiciona na tabela resets, mais o script está lendo pelo storage id e não pela tabela, tem como alguem por para ele ler pela tabela? Olha, depois que o player pega o décimo reset ou mais, já não aparece mais no rank =/
  15. netflat

    Item

    tipo, o solar axe por exemplo, quando eu uso ele, em vez de upa so axe eu vou upa: sword, club e axe... entende?
  16. netflat

    Item

    quero fazer um item que upa sword, axe e club, tem como fazer isso? quem ajudar, rep+
  17. boa cara, sempre usava teu server então se paro tive que faze o meu =P bom server, espero atualizações ahh e da pra faze um otb editor 8.6 , é so mudar uns códigos la..nem lembro direito
  18. hum não sei oque é, aqui funciona normalmente =/
  19. cara baixa esse aqui, ele é o TFS original limpo 0.3.6pl1: http://www.speedyshare.com/633718469.html dlls: http://www.speedyshare.com/files/21486508/otdllv14.7z.rar tenta so pega o executer e coloca no seu server que eu acho que da certo
  20. tive o mesmo problema, era nas sources... usa oque eu te falei que fica certim
  21. tem alguns TFS que não fexa mesmo...
  22. baixa elas e joga na pasta do ot '-'
  23. Eu que denominei o nome de 0.4.0, o TFS 0.4 da otland é 8.57... essa não é a versão oficial da otland
  24. Realmente é muito bom, mas pelas sources fica bem menor o script e é bem mais facíl de mexer :x
  25. local config = { removeOnUse = "no", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", realAnimation = "no", -- make text effect visible only for players in range 1x1 healthMultiplier = 1.0, manaMultiplier = 1.0 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPos(item.uid) end doDecayItem(doCreateItem(2016, potion.splash, toPosition)) doTransformItem(item.uid, potion.empty) return true end if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then return false end doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) if(not potion.empty or config.removeOnUse) then doRemoveItem(item.uid, 1) return true end doRemoveItem(item.uid, 1) doPlayerAddItem(cid, potion.empty, 1) return true end
  • Quem Está Navegando   0 membros estão online

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