@ALL
Alguem sabe aonde eu troco os itens que os players começam?

Coloquei o Bike system, e quero mudar esse coin case pelo item que eu criei.
-EDIT
Consegui ja ![]()
By lucashgas, 10 de jan. de 2012 in Tópicos Sem Resposta
info
Group: Campones
Joined: 08/11/06
Posts: 18
Reputation: +1
Gender: Masculino
Tibia Character: Frey Kvra

@ALL
Alguem sabe aonde eu troco os itens que os players começam?

Coloquei o Bike system, e quero mudar esse coin case pelo item que eu criei.
-EDIT
Consegui ja ![]()
Edited Maio 26 by Radreot
info
Group: Campones
Joined: 06/12/11
Posts: 17
Reputation: 0
Tibia Character: brunixx

eu coloquei booost até +100, mas quando passa do + 50 so boosta de uma em uma stone como arrumo isso valendo rep++
info
Group: Artesão
Joined: 27/04/11
Posts: 112
Reputation: +2

Como arrumar este erro?
[25/05/2012 22:29:35] [Error - Spell Interface]
[25/05/2012 22:29:35] data/spells/scripts/ps/Flamethrower.lua:onCastSpell
[25/05/2012 22:29:35] Description:
[25/05/2012 22:29:35] (luaGetThingFromPos) Tile not found
--------------------------------------------------------------------------------------
Como eu limito o tanto de pokemons que o player vai poder usar de cada evolução?
exemplo, ele pode usar 3 pokes da 1° evolução = 3 Charmanders
Ele pode ter 2 da 2° evolução = 2 Charmeleons
Ele pode ter 1 da 3° evolução = 1 Charizard
???
REP++
info
Group: Infante
Joined: 27/08/11
Posts: 1.9k
Reputation: +85
Gender: Masculino
Tibia Character: Bruno Maciel

tipo cara nao asim o serve pda ele ta como pra voce usa o pokemon voce tem que ter +- o level do pokemon pra voce usa ele nee eu queria estilo otpokemon ou pokemonbr tipo o char tem que ser level 80 pra usa alakzam eu ja arrumei o configuration mais nao sei agora na onde eu edito pra tira o systema que depende do seu level e do pokemon que voce usa ele tipo o level do pokemon talto faz so que cada pokemon tem um level pra usa alakazam so char level 80 mais o level do alakazam tanto faz o char sendo 80 tanto faz level do alak asim que eu quero por@Brunno
vey la em configuration.lua tem assim:
pokemonMaxLevelAbovePlayer = 10
e você coloka
pokemonMaxLevelAbovePlayer = 0
Ou seja,o player vai ter que estar no mesmo level do pokemon para usá-lo.
Ajudei?Rep +
info
Group: Artesão
Joined: 29/01/12
Posts: 108
Reputation: +10

@All
Opa... tava querendo colocar PvP no server mais tem 1 coisa que não me deixa. Tipo, quando eu tou em area PvP(q eu coloquei pelo mapa editor) se você der atack de area, mata tudo certinho, ranca vida e tudo... Mas não quer atacar(quando tu clica com botão direito para atacar o pokemon dos outros, não funfa. Eu não sei mto sobre Script.LUA e tentei faze uma "Cambalacho", improvisando tudo, fiz uma coisa no script mais não deu certo.
Tipo: quando estou na area PvP, e vou atacar um pokemon fala "You have to join a party to Duel".
Segue o script "data\creaturescripts\scripts\playerattack"
Obs: O que está em negrito é o que eu tentei faze(sei que tá errado... mais sei lá viu, eu tentei ;P)
local fightcondition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 18 * 1000)
function fightCondic(cid)
if not isCreature(cid) then return true end
if not isCreature(getCreatureTarget(cid)) then return true end
doAddCondition(cid, fightcondition)
addEvent(fightCondic, 1000, cid)
end
function onTarget(cid, target)
if isPlayer(target) then return true end
if getPlayerStorageValue(target, 201) ~= -1 then
for a, b in pairs(ginasios) do
if getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) == 1 then
if getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 then
doPlayerSendCancel(cid, "You can't attack this pokemon.")
return false
end
end
end
end
if isSummon(target) then
local duel = getCreatureMaster(target)
if not isInParty(cid) or not isInParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
if not getPlayerParty(cid) == getPlayerParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
if not getTileZoneInfo(cid).pvp or not getTileZoneInfo(duel).pvp then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
end
if false then -- desativado
if not isPlayerInAgressiveList(target, cid) then
addPlayerToAgressiveList(target, cid)
end
if isPassive(target) then
setAgressive(target)
if #getCreatureSummons(cid) >= 1 then
doMonsterSetTarget(target, getCreatureSummons(cid)[1])
else
doMonsterSetTarget(target, cid)
end
else
local histarget = getCreatureTarget(target)
if isCreature(histarget) and isPlayer(getCreatureMaster(histarget)) and #getCreatureSummons(cid) >= 1 and #getCreatureSummons(getCreatureMaster(histarget)) <= 0 then
doMonsterSetTarget(target, getCreatureSummons(cid)[1])
end
end
end
return TRUE
end
É simples o que eu quero:
Quero q quando os players estão em area PvP, libera o atack sem precisar estar em party.
Meu sistema de PvP não é por time, é si por si. então deve ser fácil.
Existe essa função getTileZoneInfo(cid)? O problema aí está com a condição de cima...
if not getPlayerParty(cid) == getPlayerParty(duel) then doPlayerSendCancel(cid, "You have to join a party to duel.") return false end
Não importa o que escrever embaixo, se os 2 nao tiverem na mesma party não vão se atacar...entendeu?
Edited Maio 26 by bizao030188
info
Group: Campones
Joined: 19/10/11
Posts: 90
Reputation: +6
Tibia Character: Não Tenho Oficialmente

@bizao030188
Mais não tem como tipo, se estiver na area PvP, cancela os as função de cima?
info
Group: Artesão
Joined: 29/01/12
Posts: 108
Reputation: +10

@ZeSy
Não...Terá que fazer assim agora:
if isSummon(target) then
Se estiver em zona não pvp, faça isso:
local duel = getCreatureMaster(target)
if not isInParty(cid) or not isInParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
if not getPlayerParty(cid) == getPlayerParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
Se não (else), faça isso (then): (só resta pvp, e pvp-enforced, e a condição abaixo serve para os 2)
retorna VERDADEIRO
END
end
Entendeu?
--edit
Achei a função que vc estava tentando usar
function getTileZoneInfo(pos) local tmp = getTileInfo(pos) if(tmp.pvp) then return 2 end if(tmp.nopvp) then return 1 end return 0 end
Ela funciona assim:
Vc tem que mandar a posicao do nego pra ela, aí ela analisa a posicao, se ele estiver em piso pvp, retorna o valor 2, se nao, retorna o valor 0...
Tenta fazer aí, se não conseguir avisa que eu te ajudo
Edited Maio 26 by bizao030188
info
Group: Campones
Joined: 04/12/11
Posts: 79
Reputation: +1

Pokemon não tirar o sangue para o jogador como eu posso corrigir esse problema
Pokémon do not take away the blood to the player as I can solve this problem
info
Group: Campones
Joined: 19/10/11
Posts: 90
Reputation: +6
Tibia Character: Não Tenho Oficialmente

@bizao030188
Não entendi cara, a função q tem na lib é essa aqui:
function getTileZoneInfo(pos)
local tmp = getTileInfo(pos)
if(tmp.pvp) then
return 2
end
Acho q coloquei errado no script e tals...
EDIT: Continuo não entendendo...
Edited Maio 26 by ZeSy
info
Group: Artesão
Joined: 29/01/12
Posts: 108
Reputation: +10

@ZeSy
o que não entendeu? o funcionamento da função da lib ou oq coloquei em negrito no script?
info
Group: Campones
Joined: 04/12/11
Posts: 79
Reputation: +1

Pokemon não diminui sangue
info
Group: Campones
Joined: 19/10/11
Posts: 90
Reputation: +6
Tibia Character: Não Tenho Oficialmente

@bizao030188
Tudo... mas vamo ver se eu entendi certo, porque tou meio confuso.
if isSummon(target) then
If not getTileInfo(pos).pvp then
local duel = getCreatureMaster(target)
if not isInParty(cid) or not isInParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
if not getPlayerParty(cid) == getPlayerParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
If getTileInfo(pos).pvp then
(Agora não sei qual função add aqui
)
return FALSE
end
E não endendi como funciona a lib sabe, o valor o e 2 e tals...
info
Group: Artesão
Joined: 29/01/12
Posts: 108
Reputation: +10

@ZeSy
Cuidado com uma coisa, para cada if que vc abre, tem que ter um end fechando...
No script que mandou, vc abriu 2 ifs e não colocou end...
Sobre o funcionamento da função da lib, é assim:
vc usa ela getTileZoneInfo(aqui dentro como parametro tem que ter a posição que quer analisar se é ou não zona pvp)
Acontece que tem uma outra função: getCreaturePosition(cid) que retorna as coordenadas do que tem entre parenteses, no caso coloquei cid, que corresponde ao player que está atacando...
Então se vc fizer getTileZoneInfo(getCreaturePosition(cid)), vai analisar se a posicao que o cara está é pvp ou não, entende? E de acordo com a definição da função, se vc definir uma variavel local, por exemplo
local teste = getTileZoneInfo(getCreaturePosition(cid))
e mandar escrever no console do server essa variavel, fazendo:
print(teste)
pode ser embaixo de:
if isSummon(target) then
aí toda vez que tentar atacar uma summon, e olhar no console do server, vai escrever 2 se o cara que tentou atacar a summon estiver em zona pvp ou 1, se estiver em zona não pvp...Faça isso para entender o funcionamento da função
Para que um player consiga atacar os pokes de outro em zona PVP, troque o seu creaturescripts/playerattack.lua por esse:
local fightcondition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 18 * 1000)
function fightCondic(cid)
if not isCreature(cid) then return true end
if not isCreature(getCreatureTarget(cid)) then return true end
doAddCondition(cid, fightcondition)
addEvent(fightCondic, 1000, cid)
end
function onTarget(cid, target)
if isPlayer(target) then return true end
if getPlayerStorageValue(target, 201) ~= -1 then
for a, b in pairs(ginasios) do
if getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) == 1 then
if getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 then
doPlayerSendCancel(cid, "You can't attack this pokemon.")
return false
end
end
end
end
if isSummon(target) then
local duel = getCreatureMaster(target)
if not getTileZoneInfo(getCreaturePosition(cid)) == 2 or not getTileZoneInfo(getCreaturePosition(duel)) == 2 then
if not isInParty(cid) or not isInParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
if not getPlayerParty(cid) == getPlayerParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
else
return true
end
end
if false then -- desativado
if not isPlayerInAgressiveList(target, cid) then
addPlayerToAgressiveList(target, cid)
end
if isPassive(target) then
setAgressive(target)
if #getCreatureSummons(cid) >= 1 then
doMonsterSetTarget(target, getCreatureSummons(cid)[1])
else
doMonsterSetTarget(target, cid)
end
else
local histarget = getCreatureTarget(target)
if isCreature(histarget) and isPlayer(getCreatureMaster(histarget)) and #getCreatureSummons(cid) >= 1 and #getCreatureSummons(getCreatureMaster(histarget)) <= 0 then
doMonsterSetTarget(target, getCreatureSummons(cid)[1])
end
end
end
return TRUE
end
Edited Maio 26 by bizao030188
info
Group: Campones
Joined: 19/10/11
Posts: 90
Reputation: +6
Tibia Character: Não Tenho Oficialmente

@bizao030188
Aff.. sério não entendi nada do que vc falo ali...
tou quase desistindo dessa merda...
Não sei qual função coloca e onde coloca...
Só tou confuso de uma coisa. por exemplo: getTileZoneInfo(getCreaturePosition(cid))[aqui nao tinha q coloca um parametro? tipo ".pvp" pra fala q o tile tem q ser pvp?]
daí ficando: "getTileZoneInfo(getCreaturePosition(cid)).pvp" ou coisa parecida
Ainda não entendo a função da lib, mas vou ver uma coisa aqui...
if isSummon(target) then
if getTileZoneInfo(getCreaturePosition(cid))[.pvp ou não] then
local duel = getCreatureMaster(target)
if not isInParty(cid) or not isInParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
if not getPlayerParty(cid) == getPlayerParty(duel) then
doPlayerSendCancel(cid, "You have to join a party to duel.")
return false
end
return FALSE
end
end
Isso /\ Daria certo???
Edited Maio 26 by ZeSy
info
Group: Campones
Joined: 01/04/12
Posts: 49
Reputation: +3
@Brunno
vey la em configuration.lua tem assim:
pokemonMaxLevelAbovePlayer = 10
e você coloka
pokemonMaxLevelAbovePlayer = 0
Ou seja,o player vai ter que estar no mesmo level do pokemon para usá-lo.
Ajudei?Rep +