• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Please help me with this :(

Status
Not open for further replies.

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
You can only attack pokemons if they are in party, can someone make if they get this storage then they can attack each other pokemons if not then it will come the cancel you need party.

Else if its possible to make that if they are in pvp zone it will ignore party cancel if they are not on pvp zone it will not ignore the party cancel!

Rep! will be earned!

Code:
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
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
 
Now i can attack the pokemon but the problem is i dont even need the storage without the storage i can attack :(
 
Status
Not open for further replies.
Back
Top