Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error fix on Logout #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions npc/custom/hBG/bg_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ OnDoJoin:
} else if (questprogress(8506,PLAYTIME) == 1) {
dispbottom "[You are a Deserter. You can't participate until the indicator goes off]";
end;
} else if ( gettimetick(2) < #BGDeserter ) {
dispbottom "[You are a Deserter. You can't participate until the indicator goes off]";
end;
}

hBG_queue_join .BG_Queue;
Expand All @@ -181,6 +184,14 @@ OnDoJoin:
OnDoLeave:
hBG_queue_leave .BG_Queue;
if (getmapflag(strcharinfo(3),mf_battleground)) {
setquest 8506; // Deserter
hBG_leave;
warp "SavePoint", 0, 0;
}
end;
OnPCLogoutEvent:
if (getmapflag(strcharinfo(3),mf_battleground)) {
#BGDeserter = gettimetick(2) + ( 1 * 60 ); // time is in seconds 60 = 60 seconds
hBG_leave;
warp "SavePoint", 0, 0;
}
Expand Down