Olá a todos, eu não achei nenhum tutorial nesta página de como colocar potions infinitas, então resolvi elaborar um:
-
-
Primeiro Método:
Na pasta do seu servidor, entrar na pasta "data", depois na pasta "actions" e por último na pasta "liquids"
"Pasta do Servidor/data/actions/liquids/"
Procure pelo arquivo "potions.lua" e abra ele com algum editor. (bloco de notas, etc..)
(se não tiver esse arquivo veja o segundo método)
Depois de ter aberto o arquivo procure por essa linha:
(dica: Control + F)
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
Copie o primeiro ID da linha (no caso 8704) e coloque-o no lugar do ID que se encontra depois de "empty = " (no caso 7636)
Ficará assim:
[8704] = {empty = 8704, splash = 2, health = {50, 100}}, -- small health potion
Depois faça isso com todas as outras linhas de potions.
-
-
Segundo Método:
O início é o mesmo do primeiro método:
Na pasta do seu servidor, entrar na pasta "data", depois na pasta "actions" e por último na pasta "liquids"
"Pasta do Servidor/data/actions/liquids/"
Abra o arquivo de uma potion (exemplo: great_mana), e você terá isso:
local MIN = 200 local MAX = 300 local EMPTY_POTION = 7635 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == FALSE then return FALSE end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end if((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1) return TRUE end if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) doPlayerAddItem(cid, EMPTY_POTION, 1) return TRUE end
Remova essas 2 linhas:
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, EMPTY_POTION, 1)
(Se você não encontrar essas 2 linhas, veja o terceiro método, MAS NÃO FECHE O SCRIPT DA POTION!)
Pronto, depois é só fazer isso com as outras potions!
-
-
Terceiro Método:
Bom, continuando, depois de ter aberto o script da potion, procure por essa parte:
(dica: Control + F)
doTransformItem(item.uid,
Essa mesma linha (completa) da health_potion é assim:
doTransformItem(item.uid, 7618)
Retire essa linha, pronto, depois é só fazer o mesmo com as outras potions!
OBS:. No terceiro método usei como exemplo uma health_potion, então o "... 7618)" não terá nas outras potions!
Obrigado, e tomara que resolva o seu problema! :positive: