exp decrease on die

derwisz

Dedicated Member
Dedicated Member
Apr 23, 2005
131
0
42
Poland
I thought I started similiar topic but it propably has been removed or sth...

what I plan is to put in job server decrease of exp points when player dies.
I know that the easiest way to do this is to make sql trigger which decreases 2% fld_exp field if fld_hp is 0 during players logout.
The thing is i don't know how to start the trigger. I think the best is to involve the same action which writes files in conlog directory (time of login/logout)
Does anyone have/made sth like that?
 

derwisz

Dedicated Member
Dedicated Member
Apr 23, 2005
131
0
42
Poland
to make it easier as no answer has been posted:
- what/how files in conlog dir are created? did anyone watched the process?
 
Upvote 0

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
265
Canada
if you are using "logdata server" (the server that runs on UDP 10000) then you will get that log... die/trade/drop/whatever... dying will have a FZ_#_# something along the line.. should be similar to mir2's logbase

or you will have to catch people dying... sql value fld_hp = 0... but that doesn't happen when they die... it updates after they log off... or somewhere between 0-10 minutes when the database care to update.
 
Upvote 0

derwisz

Dedicated Member
Dedicated Member
Apr 23, 2005
131
0
42
Poland
but logdata doesn't write "regular" item drop/trade logs? i mean if you die and drop nothing logdata doesn't see it - right?
what does create files in conlog catalogue?
 
Upvote 0

derwisz

Dedicated Member
Dedicated Member
Apr 23, 2005
131
0
42
Poland
well maybe wrong direction...
why do I want conlog logs:
1. when player logs in -> log in conlog is created
2. the same procedure that creates this log triggers sql process
3. sql checks if players hp=0 (on logon hp is updated with delay so it remains 0 during check). if yes decreases fld_exp by x%

can you imagine easier way to do this?
 
Upvote 0

Kaori

LOMCN MiR3 Queen!
VIP
Jun 3, 2004
3,584
38
265
Canada
Maybe not...

What do you mean when they login then the conlog will be updated?

What if they are logging into the other char... or
What if they are not even going in game (just exit from select char)
 
Upvote 0

derwisz

Dedicated Member
Dedicated Member
Apr 23, 2005
131
0
42
Poland
ok. ok. i've gone into deadend. i've tested and now understand how easy it was - trigger placed in ability table is enough - no need of conlog watch etc :)
thx everybody
 
Upvote 0