Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 01:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



DROP TIME IN SOURCE (C++)

Discussion on DROP TIME IN SOURCE (C++) within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
DROP TIME IN SOURCE (C++)

i need expire 'noname' items expire - 5 sec

because ownership is easy to config but how to change - expire noname items (StartDestroyEvent)

example:

meca4h4 is offline  
Old 06/03/2014, 08:31   #2
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Like you said: in the CItem::StartDestroyEvent.
Just open "char.h" and search for "StartDestroyEvent".
Then you find something like "void StartDestroyEvent(int iSec=300);".
The "iSec=300" is meaning, that the "default-value" for "iSec" is 300.
So if no argument is given it's 300. Change this value and you will have an other drop time.

Kind Regards
.HC'Destrox is offline  
Thanks
1 User
Old 06/03/2014, 15:51   #3
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
Quote:
Originally Posted by .HC'Destrox View Post
Like you said: in the CItem::StartDestroyEvent.
Just open "char.h" and search for "StartDestroyEvent".
Then you find something like "void StartDestroyEvent(int iSec=300);".
The "iSec=300" is meaning, that the "default-value" for "iSec" is 300.
So if no argument is given it's 300. Change this value and you will have an other drop time.

Kind Regards
but when i change this:

item.h


for example: 5 sec then drop destroy / expire with name too but i need only destroy / expire noname items. HELP PLS nad sry fo my bad english ;p
meca4h4 is offline  
Old 06/03/2014, 15:58   #4
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Well, if you wanna have it easy just change the StartDestroyEvent()-Function (in item.cpp) to:
Code:
void CItem::StartDestroyEvent(int iSec)
{
	if (m_pkDestroyEvent)
		return;

	if (iSec == 300 && !GetOwner())
		iSec = 5;

	item_event_info* info = AllocEventInfo<item_event_info>();
	info->item = this;

	SetDestroyEvent(event_create(item_destroy_event, info, PASSES_PER_SEC(iSec)));
}
Kind Regards
.HC'Destrox is offline  
Thanks
1 User
Old 06/03/2014, 16:04   #5
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
Quote:
Originally Posted by .HC'Destrox View Post
Well, if you wanna have it easy just change the StartDestroyEvent()-Function (in item.cpp) to:
Code:
void CItem::StartDestroyEvent(int iSec)
{
	if (m_pkDestroyEvent)
		return;

	if (iSec == 300 && !GetOwner())
		iSec = 5;

	item_event_info* info = AllocEventInfo<item_event_info>();
	info->item = this;

	SetDestroyEvent(event_create(item_destroy_event, info, PASSES_PER_SEC(iSec)));
}
Kind Regards
Thx, man i test it

MY CONFIG

ITEM.H

Quote:
void StartDestroyEvent(int iSec=300);
for wnership:

Quote:
void SetOwnership(LPCHARACTER ch, int iSec = 180);
item.cpp
Quote:
void CItem::StartDestroyEvent(int iSec)
{
if (m_pkDestroyEvent)
return;

if (iSec == 300 && !GetOwner())
iSec = 5;

item_event_info* info = AllocEventInfo<item_event_info>();
info->item = this;

SetDestroyEvent(event_create(item_destroy_event, info, PASSES_PER_SEC(iSec)));
}
for ownership:

Quote:
if (m_pkOwnershipEvent)
return;

if (true == LC_IsEurope())
{
if (iSec == 180)
iSec = 180;
}
and item with DROP and 'noname' expire destroy 5 sec :/ what is it? ;<
meca4h4 is offline  
Old 06/03/2014, 17:26   #6
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
What do you mean with "with DROP" ? with ownership ?
.HC'Destrox is offline  
Thanks
1 User
Old 06/03/2014, 17:35   #7
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
ownership is good - 180 sec - work

i need - after item thrown to the ground - expire / destory 5 sec
meca4h4 is offline  
Old 06/03/2014, 18:44   #8
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Yeah this should work with this source... or if this dont work replace "if (iSec == 300 && !GetOwner())" with "if (!GetOwner())"

Kind Regards
.HC'Destrox is offline  
Old 06/03/2014, 18:52   #9
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
Quote:
Originally Posted by .HC'Destrox View Post
Yeah this should work with this source... or if this dont work replace "if (iSec == 300 && !GetOwner())" with "if (!GetOwner())"

Kind Regards
if (iSec == 300 !GetOwner())

?

f5

help pls:
meca4h4 is offline  
Old 06/03/2014, 20:49   #10
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Just write that what i've wrote:
Code:
if (!GetOwner()) iSec = 5;
in item.cpp

This should be all.

Kind Regards
.HC'Destrox is offline  
Thanks
1 User
Old 06/03/2014, 21:24   #11
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
NOPE :/



Destroy - 5 sec

it's ok



destroy - 5 sec

this should be 180 or 300 sec
meca4h4 is offline  
Old 06/03/2014, 21:44   #12
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Oh well, i failed. Replace the
Code:
if (!GetOwner()) iSec = 5;
with
Code:
if (!m_pkOwnershipEvent) iSec = 5;
Now it should work.

Kind Regards
.HC'Destrox is offline  
Thanks
1 User
Old 06/03/2014, 21:53   #13
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
Still my point is that the objects of drop disappear at the same time, and I want to drop rates of items disappearing after 180 sec and thrown to the ground 5 sec.

nope, error compile game :/

rly it's dat diffucilt

exapmle diff:

Item disable 5 secund

game_r40250
0005212A : 2C 05
0005212B : 01 00

but i need in source ;o
meca4h4 is offline  
Old 06/03/2014, 22:02   #14
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Well maybe it would be easier to just change it in the player function "CHARACTER::Reward":
Change every "item->StartDestroyEvent();" to "item->StartDestroyEvent(5);"
That HAVE to work!

Kind Regards
.HC'Destrox is offline  
Thanks
2 Users
Old 06/03/2014, 22:20   #15
 
elite*gold: 0
Join Date: Mar 2011
Posts: 72
Received Thanks: 8
Quote:
Originally Posted by .HC'Destrox View Post
Well maybe it would be easier to just change it in the player function "CHARACTER::Reward":
Change every "item->StartDestroyEvent();" to "item->StartDestroyEvent(5);"
That HAVE to work!

Kind Regards
my bad, its work: if (!m_pkOwnershipEvent) iSec = 5;

but i was have if (!m_pkOwnershipEvent)) iSec = 5; and errow was XD

THX MAN!
meca4h4 is offline  
Reply


Similar Threads Similar Threads
[Question] How to change delay Time of drop item on the Ground
08/03/2012 - Flyff Private Server - 3 Replies
How to change delay Time of drop item on the Ground please help thank you so much
[ Gold Drop Time Limit ]
01/08/2012 - Metin2 PServer Guides & Strategies - 20 Replies
Liebe Community, ich zeige euch nach langer Zeit mal wieder eine schöne Sache. Momentan hab ich ja den GoldDrop komplett verboten. Allerdings hab ich in der 2019 Revision eine schöne Sache entdeckt. In der 2089 ist diese auch enthalten. Davor weiß ich nicht. Gibt Ingame /e gold_drop_limit_time 1 ein. Schon kann man nur einmal pro Sekunde Yang fallen lassen. Das ganze lässt sich beliebig verändern.
[QUESTION]Change time of drop item name
07/12/2011 - Metin2 Private Server - 3 Replies
Hello everyone, I am posting this because I found nothing in SuFu. The items someone gets from drop, have their name on them for a while. I was trying to find out how to change the time the name stays on them. I believe that it is somewhere inside the game file but I'm not sure where. http://img863.imageshack.us/img863/5678/dropname. jpg The name of he player that has the drop is "Mr.Freeman" and it stays there for 8-9 seconds. I want to make this stay for 1 minute, is this possible?
2x exp and drop @ 5:00pm to 8:00 pm PST time
12/19/2009 - Dekaron - 9 Replies
close this thread
Can Anyone Help me to increase the money drop and CPs drop for CoV2 source??
05/06/2009 - CO2 Private Server - 9 Replies
Firstly i would like to thanks CoV2 and ahmedandkhalid for the source if it happen you all read.But now I do have 1 problem. How can I increase the gold drop rate and the Cpsbag amount drop????



All times are GMT +1. The time now is 01:54.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.