Bom DarkHeel vai ajudar muitos iniciantes...obrigado por compartilhar conosco
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- [DBO] Senzu [NTO] Soldier Pill
[DBO] Senzu [NTO] Soldier Pill
Por HeelNox, 07 de nov. de 2013 em Actions e Talkactions
info
Grupo: Artesão
Registrado: 10/06/13
Posts: 126
Reputação: +5
Char no Tibia: You Are Dead

info
Grupo: Visconde
Registrado: 08/10/11
Posts: 444
Reputação: +71
Gênero: Feminino
Char no Tibia: No Have.

Bom DarkHeel vai ajudar muitos iniciantes...obrigado por compartilhar conosco
Denada, esperando alguém testa-lo.
info
Grupo: Conde
Registrado: 20/09/12
Posts: 711
Reputação: +86
Char no Tibia: noé

nao tenho DBO server e nem NTO server, mas estive analisando o codigo, e parece esta em perfeitas condiçoes.
info
Grupo: Artesão
Registrado: 24/10/11
Posts: 133
Reputação: +55
Char no Tibia: ...

Falto colocar a tag de remover o item, alguns servidores os itens não são infinitos.
Para facilitar, data/actions/script/SeuArquivo.lua
local temp = {
exhausted = 1,
storage = 50000
}
local confg = {
level = 5,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local hp = 30000
local mp = 30000
if(getPlayerStorageValue(cid, temp.storage) > os.time() and getPlayerStorageValue(cid, temp.storage) < 100+os.time()) then
doPlayerSendTextMessage(cid, 24, "Vai com calma, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo para usar novamente.' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s"))
return true
elseif getPlayerLevel(cid) < confg.level then
doPlayerSendCancel(cid, "You need to be atleast level ".. confg.level ..".")
return true
end
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid))
setCreatureMaxMana(cid, getCreatureMaxMana(cid))
doCreatureAddHealth(cid, hp)
doCreatureAddMana(cid, mp)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted)
return true
end
info
Grupo: Banidos
Registrado: 16/10/12
Posts: 596
Reputação: +31
Char no Tibia: Nao Sei

Falto colocar a tag de remover o item, alguns servidores os itens não são infinitos.
Para facilitar, data/actions/script/SeuArquivo.lua
local temp = { exhausted = 1, storage = 50000 } local confg = { level = 5, } function onUse(cid, item, fromPosition, itemEx, toPosition) local hp = 30000 local mp = 30000 if(getPlayerStorageValue(cid, temp.storage) > os.time() and getPlayerStorageValue(cid, temp.storage) < 100+os.time()) then doPlayerSendTextMessage(cid, 24, "Vai com calma, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo para usar novamente.' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s")) return true elseif getPlayerLevel(cid) < confg.level then doPlayerSendCancel(cid, "You need to be atleast level ".. confg.level ..".") return true end setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)) setCreatureMaxMana(cid, getCreatureMaxMana(cid)) doCreatureAddHealth(cid, hp) doCreatureAddMana(cid, mp) doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) return true end
vlw amigo.
info
Grupo: Artesão
Registrado: 24/10/11
Posts: 133
Reputação: +55
Char no Tibia: ...

De nada.
function onUse(cid, item, frompos, item2, topos)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local exhausted_seconds = 1
local exhausted_storagevalue = 10
local mana_minimum = 110000
local mana_maximum = 110000
local mana_add = math.random(mana_minimum, mana_maximum)
if(item.type >= 1) then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,0)
doSendMagicEffect(topos,24)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid, 'Red Fasolka', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doChangeTypeItem(item.uid, item.type - 0)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
end
else
if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted.")
else
if(isPlayer(cid) == 2) then
doSendMagicEffect(topos,0)
doSendMagicEffect(topos,23)
doPlayerAddMana(cid, mana_add)
doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"Red Fasolka",1)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doRemoveItem(item.uid, 1)
else
doSendMagicEffect(frompos, CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exchausted.")
end
end
end
return 1
end





info
Grupo: Visconde
Registrado: 08/10/11
Posts: 444
Reputação: +71
Gênero: Feminino
Char no Tibia: No Have.
Olá pessoal hoje trago a vocês uma Action que ira ajudar alguns iniciantes, e especialmente para servidores derivados 8.54
1- Copie um arquivo .lua e depois renomeie-o com qualquer nome.
2- Apague tudo oque há dentro e cole o código abaixo:
local temp = { exhausted = 1, storage = 2100 } local confg = { level = 5, } function onUse(cid, item, fromPosition, itemEx, toPosition) local hp = 30000 local mp = 30000 if(getPlayerStorageValue(cid, temp.storage) > os.time() and getPlayerStorageValue(cid, temp.storage) < 100+os.time()) then doPlayerSendTextMessage(cid, 24, "você esta exausto, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s")) return true elseif getPlayerLevel(cid) < confg.level then doPlayerSendCancel(cid, "You need to be atleast level ".. confg.level ..".") return true end doCreatureAddHealth(cid, hp) doCreatureAddMana(cid, mp) doSendMagicEffect(getCreaturePosition(cid), 13) setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted) return true end3- Abra o Actions.xml e cole isso lá:
QUALQUER ERRO REPORTAR.
Créditos:
Thalia (Peguei alguns códigos dele)
SkyDarkEyes
(Por ele ser viado)Brinks (Pela base)