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

Implement iTCG codes #176

Open
ghost opened this issue Jun 16, 2023 · 2 comments
Open

Implement iTCG codes #176

ghost opened this issue Jun 16, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 16, 2023

So if you went to the cash shop and entered codes from the iTCG card game you could get items.

https://itcg.maplestorygameguide.com/codes.shtml

I propose something like:

if code.beginswith("P01"){
    giveitem(red maple champion);
elif code.beginswith("C01"){
    giveitem(black bunny);
elif code.length() == 15{
    giverandomitem(1x Antellion Relic, 5x Adonis Cauldron);
else { sendmessage('invalid coupon');
}

This wouldn't be perfectly GMS-like as it can't tell what the "standard code" format is from which would effect the output, but this would be the closest way to replicate GMS functionality I think.

@MatthewHinds
Copy link

Totally forgot about this feature. Could be fun implementing.

Issue would be that anyone who knew the source for their server would just quickly use them up by checking the card code database table.

So it would need to be something that server owners would set up outside of the default setup.

@ghost
Copy link
Author

ghost commented Jun 17, 2023

Issue would be that anyone who knew the source for their server would just quickly use them up by checking the card code database table.

So it would need to be something that server owners would set up outside of the default setup.

I'm not sure what you mean. The way I would implement it wouldn't have a list of every possible code in the database table, it would just check to see if it matches a pattern and then hand out the reward (and I guess maybe then log the code in the database to prevent reuse, but honestly I would be fine with just handing a maple champion to anyone who types in 'p01'). I think you mean basically my way, but someone would use a bot to input every possibility robbing everyone else of the ability to enter a code.

That would be an issue, but I'm under the impression that as this source isn't meant for production developing with anti-cheat by default is not one of it's priorities (I could be wrong). If someone wants to use this source for production they should certainly remove or modify the code to prevent unintended gameplay (or maybe another option in config.yaml?).

@P0nk, it's your project, would this feature be considered, or is it simply too broken for production? Maybe there's a smarter way than my implementation for production?

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

No branches or pull requests

1 participant