Ir para conteúdo
Entre para seguir isso  
Faelzinhow

Training Room v 1.0

Recommended Posts

Faelzinhow    0
Faelzinhow

Créditos : Alreth do OTfans

 

Training Room nada mais eh do que uma sala de treinamento, mas com uma diferença, apenas um player poderá entrar, ficando assim sem risco de entrar PK

 

Imagem:

Imagem Postada

 

 

training_room.lua

function onUse(cid, item, frompos, item2, topos)-- <beginning> Training Room script by Alreth.-- Version 1.0, last edited 2006-06-02 17:39-- Beginning of editable Variabels    aidNor = 4211 -- Action id for door where training room is north of door    aidSou = 4212 -- Action id for door where training room is south of door    aidWes = 4213 -- Action id for door where training room is west of door    aidEas = 4214 -- Action id for door where training room is east of door-- End of editable Variabels       emptyRoom = true    charPos = getPlayerPosition(cid)       if (item.actionid == aidNor) then        if (charPos.y < frompos.y) then            othersidePos = {x=frompos.x, y=frompos.y+1, z=frompos.z}        else            othersidePos = {x=frompos.x, y=frompos.y-1, z=frompos.z, stackpos=253}            things = getThingfromPos(othersidePos)            if (things.itemid == 1) then                if (getPlayerLevel(things.uid) > 0) then                    emptyRoom = false                end            end        end           elseif (item.actionid == aidSou) then        if (charPos.y > frompos.y) then            othersidePos = {x=frompos.x, y=frompos.y-1, z=frompos.z}        else            othersidePos = {x=frompos.x, y=frompos.y+1, z=frompos.z, stackpos=253}            things = getThingfromPos(othersidePos)            if (things.itemid == 1) then                if (getPlayerLevel(things.uid) > 0) then                    emptyRoom = false                end            end        end           elseif (item.actionid == aidEas) then        if (charPos.x > frompos.x) then            othersidePos = {x=frompos.x-1, y=frompos.y, z=frompos.z}        else            othersidePos = {x=frompos.x+1, y=frompos.y, z=frompos.z, stackpos=253}            things = getThingfromPos(othersidePos)            if (things.itemid == 1) then                if (getPlayerLevel(things.uid) > 0) then                    emptyRoom = false                end            end        end           elseif (item.actionid == aidWes) then        if (charPos.x < frompos.x) then            othersidePos = {x=frompos.x+1, y=frompos.y, z=frompos.z}        else            othersidePos = {x=frompos.x-1, y=frompos.y, z=frompos.z, stackpos=253}            things = getThingfromPos(othersidePos)            if (things.itemid == 1) then                if (getPlayerLevel(things.uid) > 0) then                    emptyRoom = false                end            end        end           end       if (emptyRoom == true) then        doTeleportThing(cid, othersidePos)        doSendMagicEffect(charPos, 2)        doSendMagicEffect(frompos, 12)        doSendMagicEffect(othersidePos, 10)           else        doPlayerSendTextMessage(cid, 22, "This room is currently occupied. Please pick another or wait until the player leaves.")    end-- <end> Training Room script by Alreth.    return 1end
Adicione isso no actions.xml

    <action actionid="4211" script="training_room.lua" />    <action actionid="4212" script="training_room.lua" />    <action actionid="4213" script="training_room.lua" />    <action actionid="4214" script="training_room.lua" />    
Para funcionar corretamente veja a imagem e coloque as actions ID abaixo

 

Imagem Postada

Compartilhar este post


Link para o post
Jovial    2
Jovial

muito bom e util, na osei como ninguem comentou ainda =/ o povo so pega copia e sai...

Compartilhar este post


Link para o post
Dankoo    1
Dankoo

to baxando aki pra ver como eh, mas parece ser mtoo doido... desde jah, parabens, dps q eu bota aki eu posto os results

Compartilhar este post


Link para o post
raphal    0
raphal

muito bom cara vou usar...

Compartilhar este post


Link para o post
Dragonheart    0
Dragonheart

bom cara, mas eu axu mais simples usar alavancas q façam aparecer pedra para impedir a passagem de algm q possa atrapalhar o treinamento

Compartilhar este post


Link para o post
Deitri    0
Deitri

Muito bom!Uma coisa que os Admins podem fazer com essa Action, pelo MapEditor botar muitas Food's emcima dos calices de fogo.Gostei! 8)

Compartilhar este post


Link para o post
684761    0
684761

BEM ROX VO USA ISSO NO MEU OT!

Compartilhar este post


Link para o post
All_Mad_Maniac    0
All_Mad_Maniac

Chato é faze umonte desse...E o shield vai upa divargar assim, mas uma editada nao custa nada ^^Muito criativo, pq realmente eu venho tendo problemas com PK's nessas areas

Compartilhar este post


Link para o post
Faelzinhow    0
Faelzinhow

Originally posted by All_Mad_Maniac

Chato é faze umonte desse...

E o shield vai upa divargar assim, mas uma editada nao custa nada ^^

Muito criativo, pq realmente eu venho tendo problemas com PK's nessas areas

Essa area ai eh soh pra exemplo, soh abri um espaço ali pra um monk.

Compartilhar este post


Link para o post
Convidado victoralex   
Convidado victoralex

nao sei como q faz.. tp, coloco as actions td mais como q poe no mapa..faz os trainer..teleport pro lugar...¬¬

Compartilhar este post


Link para o post
Hero    0
Hero

muito show parabens

Compartilhar este post


Link para o post
leadership    0
leadership

gostei d+...vo por no meu ot talvez... vlw

Compartilhar este post


Link para o post
Lucas Terra    0
Lucas Terra

q rox kra xDvou por no meu

Compartilhar este post


Link para o post
metalchau    0
metalchau

bem rox mas tem q ter essas cortinas na parede Ú.Úzuera =D

Compartilhar este post


Link para o post
Close    0
Close

XD

Muito criativo... Ja coloquei no meu OT que ta em construção.!!

 

Vlw ae Hyuuga ^^

 

//ClOsE

Compartilhar este post


Link para o post
Dexpant    0
Dexpant

Vo testa aqui se ficar bom ai eu te falo...

Vamos ver se fica bom ^^

Ficou bom s

Compartilhar este post


Link para o post
Dexpant    0
Dexpant

Vo testa aqui se ficar bom ai eu te falo...

Vamos ver se fica bom ^^

Ficou bom s

Compartilhar este post


Link para o post
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×