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

[Feature Request] Rodex use openType #3715

Closed
hubertyang88 opened this issue Feb 4, 2023 · 8 comments · Fixed by #3716
Closed

[Feature Request] Rodex use openType #3715

hubertyang88 opened this issue Feb 4, 2023 · 8 comments · Fixed by #3716

Comments

@hubertyang88
Copy link

hubertyang88 commented Feb 4, 2023

------------------ Openkore Issues Template ------------------

  • Openkore version git: latest
  • Server: all
  • Bug Report / Feature Request:

when a rodex mail is sent by system , the type of mail is 1
but in Commands.pm
read mail packet is
$messageSender->rodex_read_mail(0,$arg2,0);
it need to be
$messageSender->rodex_read_mail(1,$arg2,0);

it is same for delete and getitems

this is tested , wait for a fix
And it seems the type of mail is not processed in Receive.pm . Can bot get type of mail and use it in $messageSender?

  • Summary:
@hubertyang88
Copy link
Author

hubertyang88 commented Feb 5, 2023

We can add rodextype 0||1 in config.txt
and add $type where needed. it works
for example

sub cmdRodex {
	my (undef, $args) = @_;
	my ($arg1) = $args =~ /^(\w+)/;
	my ($arg2) = $args =~ /^\w+\s+(\S.*)/;
	my $type = ($config{rodextype} || 0);
......
$messageSender->rodex_delete_mail($type,$arg2,0);

@alisonrag
Copy link
Contributor

@hubertyang88 can u test #3716 ?
rodex open 0|1|2

0 = normal
1 = account
2 = returned

can u test all other commands: read, delete, getitem, getzeny

@alisonrag alisonrag changed the title Read system rodex mail [Feature Request] Rodex use openType Feb 7, 2023
@hubertyang88
Copy link
Author

rodex open 1: read, delete, getitem, are tested , works fine

@ya4ept
Copy link
Contributor

ya4ept commented Feb 27, 2023

@hubertyang88 can you test #3716 again?

@ya4ept ya4ept reopened this Feb 27, 2023
@hubertyang88
Copy link
Author

tested below ;
rodex open , read with mail_# , it is much better than using mail_ID
I don't have any admin mails for now , so admin mail is not tested.

I use wireshark to see “receive all” and “delete all” button , they just send many receive or delete packets at same time
so I guess bot don't need to read a mail to getitems.
I tried below ,rodex getitems xxxxx without reading a mail works

	} elsif ($arg1 eq 'getitems') {
		if (!defined $rodexList) {
			error T("Your rodex mail box is closed.\n");
			return;

		} elsif (defined $rodexWrite) {
			error T("You are writing a rodex mail.\n");
			return;

		#} elsif (!exists $rodexList->{current_read}) {
			error T("You are not reading a rodex mail.\n");
		#	return;

		#} elsif (scalar @{$rodexList->{mails}{$rodexList->{current_read}}{items}} == 0) {
			error T("The current rodex mail has no items.\n");
		#	return;
		}

		my $openType = $rodexList->{mails}{$rodexList->{current_read}}{openType};
		message T("Requesting items of current rodex mail.\n");
		$messageSender->rodex_request_items($arg2, 0, $openType);

Could you please make "rodex getitems mail_#" with no requirement of reading mail , and also "rodex delete mail_#"

@hubertyang88
Copy link
Author

hubertyang88 commented Mar 3, 2023

I did below in macro , it works .
but this macro can only deal mails one page , how to deal mails in different pages in one sub ?

sub dealmail {
	my $count = 0 ;
	foreach my $mail_id (keys %{$rodexList->{mails}}) {
	$messageSender->rodex_request_items($mail_id, 0, 0);
	$messageSender->rodex_delete_mail(0,$mail_id,0);
	$count++;
	last if ($count >= 16);
	next;
	}
	return 1;
}

macro dmail {
do rodex open
pause 5
$kk = dealmail()
pause 7
do rodex close
}

@ya4ept
Copy link
Contributor

ya4ept commented Mar 6, 2023

Could you please make "rodex getitems mail_#" with no requirement of reading mail , and also "rodex delete mail_#"

done: c0300c8

@hubertyang88
Copy link
Author

Tested , Excellent work ! From now on , we can deal mails with mail_# 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants