• 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!

Brak DMG dla ludzi z gildi i party.

ci którzy będą chcieli, pobić się poprzez party, by nie włączać pk, nie będą zadowoleni.
 
@Scooty
Mam nadzieje ze to jest w LUA/XML a nie w C++ :P
Zaraz poszukam :D

@Temat
Jeszcze widzialem 2 kody do creaturescript:
Code:
function onStatsChange(cid, attacker, type, combat, value)
	if isPlayer(attacker) == false then
		return true
	end
 
	if isPlayer(cid) == false then
		return true
	end
 
	if isInParty(cid) == false then
		return true
	end
 
	if getPlayerParty(cid) == getPlayerParty(attacker) then
		if combat ~= COMBAT_HEALING then
			return false
		end 
	end
 
	return true
end
2:
Code:
 function onStatsChange(cid, attacker, type, combat, value)
	if (not isPlayer(attacker) or not isPlayer(cid) or not isInParty(cid) or not isInParty(attacker) or getPlayerParty(cid) ~= getPlayerParty(attacker)) then
		return true
	else
		return false
	end
	return true
end

I ja osobiscie mam systen na podstaawie tego "statschange" i dziala wysmienicie wiec moze wiecie co w nich jest nie tak?


@Edit
I jaka jest funkcja ze gracz jest w party?
if isInParty(cid) == false then -- TO?
 
@UP
Wiem juz widze :D <hahaha> juz sprawdzam czy dziala :)

@Edit
Nie dziala to :/


A oto skrypt z tej RL-mapki
Code:
function onAttack(cid, target)

  if isPlayer(target) and getPlayerGuildId(cid) == getPlayerGuildId(target) then
     local storageId = 101
     
   if getPlayerStorageValue(cid, storageId) == 1 then
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You choose not to attack and not to be attacked by guild members.")
     doCreatureSetSkullType(cid, 0) 
     return false
   elseif getPlayerStorageValue(target, storageId) == 1 then
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your target choose to not to attack and not to be attacked by guild members.")
      doCreatureSetSkullType(cid, 0) 
      return false
   end
  end
  
return true
end

Jezeli ktos posiada cos takiego w C++ ( mozliwosc zabawy w configu true/falase ) na gildie i party prosze o pisanie jestem sklonny wydac troche kasy na to :)
 
Last edited by a moderator:
O jezuu slepy jestesm:
" if getPlayerStorageValue(cid, storageId) == 1 then" -- racja
nic nie mysle ZERO xD
 
Napij się kawy, kolego :thumbup: !
wtedy-na-pewno-ogarniesz-lua-pl-ffffff
 
PHP:
function onCombat(cid, target) 
	return((getPlayerGuildId(cid) == getPlayerGuildId(target))or(getPartyLeader(cid)==getPartyLeader(target)))and FALSE or TRUE;
end
kurde, ludzie, to 30 sekund roboty, a wy postów na 2 strony... ^^
 
Last edited:
@Azi
twoj skrypt dziala ale jezeli na "terenie" spella znajduje sie taka postac to nic sie nie dzieje ( a jest tam takze monster ) i nie moze walic z obszarowego , a ja chce zeby mogl ! tylko nic nie robil swoim :P
 
Shawak swego czasu zrobił taki skrypt, który powinien działać tutaj idealnie:
PHP:
function onStatsChange(cid, attacker, type, combat, value)    if isPlayer(attacker) == false then        return true    end     if isPlayer(cid) == false then        return true    end     if isInParty(cid) == false then        return true    end     if getPlayerParty(cid) == getPlayerParty(attacker) then        if combat ~= COMBAT_HEALING then            return false        end     end     return true end
 

PHP:
function onStatsChange(cid, attacker, type, combat, value)   
 if isPlayer(attacker) == false then     
   return true    
end     
if isPlayer(cid) == false then 
       return true
    end    
 if isInParty(cid) == false then
        return true    end   
  if getPlayerParty(cid) == getPlayerParty(attacker) then
        if combat ~= COMBAT_HEALING then   
         return false      
  end   
  end    
 return true 
end

Tak lepiej...
 
Back
Top