RodriigoRobson 110 Postado Abril 1, 2014 Share Postado Abril 1, 2014 Como Eu Coloco Para que nao Ataca Pokemon do Mesmo Time? Storages: (6666-6674) function getMaster(cid)if isSummon(cid) thenreturn getCreatureMaster(cid)elseif isPlayer(cid) thenreturn cidendreturn falseendfunction onTarget(cid, target)if isPlayer(target) thenif canAttackOther(cid, target) == "Cant" thendoPlayerSendCancel(cid, "You can't attack this player.")return falseelseif isPlayer(target) and #getCreatureSummons(target) >= 1 and canAttackOther(cid, target) == "Can" thendoPlayerSendCancel(cid, "You can't attack this player.")return falseendendif isInArray(wildTrainers, getCreatureName(target)) thenif #getCreatureSummons(target) >= 1 or getPlayerStorageValue(target, storages.checkWildPokemonStorages) <= 5 thendoPlayerSendCancel(cid, "This trainer still has pokemon.")return falseendendif isSummon(target) thenif getPlayerStorageValue(cid, 8525) <= 0 thenif getPlayerStorageValue(cid, 52482) == getCreatureName(getCreatureMaster(target)) thenelsedoPlayerSendCancel(cid, "You can't attack this pokemon.")return falseendelseif canAttackOther(cid, target) == "Can" thenelsedoPlayerSendCancel(cid, "You can't attack this pokemon.")return falseendendif getCreatureMaster(target) == cid thendoPlayerSendCancel(cid, "You can't attack your pokemon.")return falseendendif getPlayerStorageValue(target, 202) >= 1 thenif getPlayerStorageValue(target, ginasios[getPlayerStorageValue(target, 201)].storage) >= 1 thenif getPlayerStorageValue(cid, ginasios[getPlayerStorageValue(target, 201)].storage) ~= 1 thendoPlayerSendCancel(cid, "You can't attack this pokemon.")return falseendendendif isNpc(target) thenreturn falseendreturn TRUEendfunction onAttack(cid, target)if getPlayerStorageValue(target, 17) == 4 thensetPlayerStorageValue(target, 17, 5)if getPlayerStorageValue(target, 200) == -1 thensetPlayerStorageValue(target, 200, "!, ")endsetPlayerStorageValue(target, 200, getPlayerStorageValue(target, 200)..""..getCreatureName(cid)..", ")if #getCreatureSummons(cid) >= 1 thendoMonsterSetTarget(target, getCreatureSummons(cid)[1])elsedoMonsterSetTarget(target, cid)endendreturn TRUEend Link para o comentário Compartilhar em outros sites More sharing options...
ikaroangelo 15 Postado Abril 1, 2014 Share Postado Abril 1, 2014 creio que isto so pode ser feito nas soucers do seu otserv! Link para o comentário Compartilhar em outros sites More sharing options...
RodriigoRobson 110 Postado Abril 1, 2014 Autor Share Postado Abril 1, 2014 (editado) Axo que nao e que esse server aki e o DXP ai usa funçao "canAttackOther" eu nao sei usar ela. E o Mesmo do PDA Editado Abril 1, 2014 por Nextbr Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados