Mana Rune E Piso Para Tutores

6543210
em Lixeira Pública

6543210

Z3R0
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 11/10/08Posts: 26Char no Tibia: Ron Arka

Queria uns scrpits primero q soh tutor pode passar num determinado lugar , e otro de uma mana rune q soh tutor pode usar , aki um script de mana rune q eu ja tenho , mas quero q essa de mais mana ,sendo usada soh por tutor ai ja ta certo os minimo e maximo.....

 

 

local MIN = 20000
local MAX = 100000
local EMPTY_POTION = 2281

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 200))

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 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, "manavip", TALKTYPE_ORANGE_1)
return TRUE
end

@ZERO
@Z3R0
@ZER0
@Z3RO
@DRZ3R0
@DRZ3RO
@DRZER0
@DRZERO
@Z3R0MAN
@ZEROMAN
@Z3R0M4N

Henrique Moura

Ex-administrador
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 17/02/08Posts: 2541

Tile só pra tutor(não testei)

 

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Passagem negada",
msgWelcome = "Seja bem-vindo, Tutor ..getCreatureName(cid).."
}

if not getPlayerAccess(cid) >= 2 then 
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return TRUE
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome)
return TRUE
end

KaKilo ~
 


Lom14fD.png

Eskylo

boa sorte
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 11/08/10Posts: 477Gênero: Masculino

local MIN = 20000 
local MAX = 100000 
local EMPTY_POTION = 2281 

local exhaust = createConditionObject(CONDITION_EXHAUST) 
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 200)) 

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if isPlayer(itemEx.uid) == FALSE then 
return FALSE 
end 

if getPlayerAccess(itemEx.uid) > 2 then 
return doPlayerSendDefaultCancel(cid, "Only can be used on tutors.") 
end

if hasCondition(cid, CONDITION_EXHAUST_HEAL) == true then 
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) 
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, "manavip", TALKTYPE_ORANGE_1) 
return TRUE 
end

Assim, só pode usar em tutores a mana rune.

 

Não tenho certeza, mas caso o scrip do Henrique não funcionar, troque

msgWelcome = "Seja bem-vindo, Tutor ..getCreatureName(cid).."

por

msgWelcome = "Seja bem-vindo, Tutor ""..getCreatureName(cid)..""

Atenciosamente, Eskylo

 

 

Ironman-icon.png

.

.

SkyDangerous

Deus Kalec
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 17/01/09Posts: 2098Char no Tibia: Adra Sata

Tile só pra tutor passar (Testado e Aprovado Funciona)

 

function onStepIn(cid, item, position, fromPosition) 
if getPlayerGroupId(cid) < 2 then 
doPlayerSendTextMessage(cid, 22, "Coloque o texto aqui que vai aparecer caso ele nao seja tutor.") 
doTeleportThing(cid, fromPosition) 
end 
return TRUE 
end         

 

Cabei de fazer esse script .. to aprendendo ainda ;)

Me segui lá (:

 

b906.png

http://ageofwar.servegame.com/

IP: ageofwar.servegame.com

TIBIA: 10.78

GLOBAL PERFECT CUSTOM

6543210

Z3R0
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 11/10/08Posts: 26Char no Tibia: Ron Arka

O primero nem o segundo funciono daih eu katei o do dangerous q por enquanto eh o unico , o primero do gustavo n tava funcioando , dps vi o otro falando mais nem kiz arrumar , o da runa n ta funcionando , qualquer um ta podendo usar...

 

@edit

 

deu certo foi soh trocar e colocar essa function no da runa

 

if getPlayerGroupId(cid) < 4 then

 

Vlw!

@ZERO
@Z3R0
@ZER0
@Z3RO
@DRZ3R0
@DRZ3RO
@DRZER0
@DRZERO
@Z3R0MAN
@ZEROMAN
@Z3R0M4N

SkyDangerous

Deus Kalec
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 17/01/09Posts: 2098Char no Tibia: Adra Sata

Sim.

 

Essa função , significa , caso o player ser groupo menor que 4 não poderá passar.

 

if getPlayerGroupId(cid) < 4 then 

Me segui lá (:

 

b906.png

http://ageofwar.servegame.com/

IP: ageofwar.servegame.com

TIBIA: 10.78

GLOBAL PERFECT CUSTOM