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

Lua Pz Time , White Skull

Hrsha

Member
Joined
May 30, 2010
Messages
450
Reaction score
21
Location
Egypt
Hi Otlanders

huntingduration , white skull time and pzlocked all depends on pzlocked time

meaning if i write pzLocked = 3 minutes - huntingDuration = 10 sec whiteskull = 4 minutes
all of their pz will gone in 3 minutes (pzlocked time)

- i wana make normal pz of monsters is 10 sec
- white skull and pz of pvp players 3 minutes
 
Last edited:
If you so sure that in config.lua it dont change for you. then open sources.

configmanager.cpp

find thoose lines by searching pzLocked

Code:
m_confNumber[PZ_LOCKED] = getGlobalNumber("pzLocked", 60 * 1000);
m_confNumber[HUNTING_DURATION] = getGlobalNumber("huntingDuration", 60 * 1000);

and change it to

Code:
m_confNumber[PZ_LOCKED] = getGlobalNumber("pzLocked", 3 * 60 * 1000);
m_confNumber[HUNTING_DURATION] = getGlobalNumber("huntingDuration", 10 * 1000);

I used 0.3.6 you might using newer version but idea is same.
 
i found these lines on configmanager.cpp

Code:
m_confNumber[PZ_LOCKED] = getGlobalNumber("pzLocked", 60 * 1000);
m_confNumber[HUNTING_DURATION] = getGlobalNumber("huntingDuration", 60 * 1000);
m_confNumber[WHITE_SKULL_TIME] = getGlobalNumber("whiteSkullTime", 15 * 60 * 1000);

what it means ? cuz and how it count time seconds ?
cuz i put in config.lua

pzLocked = 3 * 60 * 1000
huntingDuration = 10 * 1000

and what about white skull ? it get down so fast and does not care about white skull time
 
This means that I took example this
Code:
m_confNumber[PZ_LOCKED] = getGlobalNumber("pzLocked", 60 * 1000);

if in config.lua not found pzLocked it will count "60 * 1000" but just I understand so. If its wrong feel free to edit me. so becouse you using that way pzLocked = 3 * 60 * 1000 it count as not found pzLocked in config lua I think so you must use it as suppose to be 60 * 1000 but to change it write as suppose.

Code:
pzLocked = 60 * 1000 -- This means the number 60 means 60 second dont edit *1000 to lower it write 30 and it will count as 30 seconds.
pzLocked = 180 * 1000 -- this is what you want 3 minutes for pvp

why it dont count your:

huntingDuration = 10 * 1000 -- I dont know... but try it to do in sources.

Code:
m_confNumber[HUNTING_DURATION] = getGlobalNumber("huntingDuration", 60 * 1000); -- change 60 to 10 and compile.
 
i did all u said but all hunting time and pzlocked time and white skull time
all depends on pzlocked time dno why i i removed pz and hunting time from config.lua ofc when i tested
still all depends on pzlocked time :S

Thanks for trying help ;) rep +
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (getPlayerStorageValue(cid, 4767) == EMPTY_STORAGE) then
		doCreatureSay(cid, "You have gained your new outfit!", TALKTYPE_ORANGE_1)
		doPlayerAddOutfit(cid, 2, 2)
		setPlayerStorageValue(cid, 4767, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
		doPlayerAddItem(cid, ITEMID)
	else
		doPlayerSendTextMessage(cid,22,"You have already gained your new outfit.")
	end
	return true
end
----------------------------------------------
pzLocked = 3 * 60 * 1000 = Player cannot go into protection zone
huntingDuration = 10 * 1000 = Battle (cannot logout but player can go into protection zone)
 
the script is not the problem
the problem is when i click on the chest i get the addon only
not addon + xitem as i wanted :S

------------------------------------------------------

huntingduration and white skull time and pzlocked all depends on pzlocked time

meaning if i write pzLocked = 3 minutes - huntingDuration = 10 sec whiteskull = 4 minutes
all of their pz will gone in 3 minutes (pzlocked time)
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (getPlayerStorageValue(cid, 4767) == EMPTY_STORAGE) then
		doCreatureSay(cid, "You have gained your new outfit!", TALKTYPE_ORANGE_1)
		doPlayerAddOutfit(cid, 2, 2)
		doPlayerAddItem(cid, XXX, 1)
		setPlayerStorageValue(cid, 4767, 1)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
		doPlayerAddItem(cid, ITEMID)
	else
		doPlayerSendTextMessage(cid,22,"You have already gained your new outfit.")
	end
	return true
end
 
thanks outfit and item solved thx LucasOlzon srry i did not notice to item id xD
thx Hanoger ;)

but pz time did not solve :S
 
I'm running through the same problem, have you found out any solution yet ?

I wonder how to properly choose white skull, pz lock, and hunting duration time... It seems like they all depend on pz locked time...

Thanks already for the answer!
 
Back
Top