Promotional Code

AnnieRuru

~~Cute~Cute~Scripter~~
Messages
1,677
Points
0
Location
your next door ~
Discord
AnnieRuru#1609
Github
AnnieRuru
Emulator
Client Version
2019-05-30aRagexeRE
I got 2 rep up for making that grumbling post, that just shows how many members really like this idea
and of course I knew many topics talking about this script again and again and again and again and again and again and again and again and again and again and again and again !!!

so I make one myself and hopefully don't want see people talking about that bug script again !!

What this script does ?

GM generate some sort of gibberish word and promotes it on social media

then players input that gibberish word and able claim the items

honestly I don't really see the point of gibberish word,

I made this script in a drop down menu, players can just select it from the menu and claim it <_<

Download: 1.3

script

here's an example by Philippine RO, from this post

promotianal_code_example.PNG


TODO :

1. add coloring to the text

2. HULD compatible ?

3. maybe someday can rewrite this whole damn thing with .npc_var sync with SQL variables so don't have to call query_sql too frequently

1.0 - script

1.1 - script

- add list all players that has claimed this code

- add a variable to disable removal of past promotional code, because I know some server has trust issue with other GMs

1.2 - script

- fix a bug after the code expire, the "list player has claimed this code" option is missing

- fix a bug that when the code suddenly triggered/start, GM still can do edit

- add some text to tell why players can't claim the code

- add announcement when the Promotion Code activate and expire

1.3 - script

- fix a bug the 'Promotion code has Started' didn't even activate after a server restart

- fix a bug when GM edit the start/expire date field, the announcement didn't update along with it ... should have just disable it when countdown initiated

- fix a bug when GM close a promo code, it doesn't announce a GM has closed it, yet its still make announcement about still can claim promo code

 
Last edited by a moderator:
thank you so much for this, gonna test it right now

 
1.2 - script

- fix a bug after the code expire, the "list player has claimed this code" option is missing

- fix a bug that when the code suddenly triggered/start, GM still can do edit

- add some text to tell why players can't claim the code

- add announcement when the Promotion Code activate and expire

EDIT: found another bug, when using EDIT start/expire time, the announcement doesn't react ....
I don't know how to fix this one <-- let's try trigger every hour



Will this work to rathena? Thanks Annie! ♥
a big word NO

2 conditions then I'll consider

No.1 - tell rathena developers to merge *getcalendartime script command

https://github.com/HerculesWS/Hercules/commit/79b69495bbc5d758529a485eb1144bd64b8ea50f

No.2 - tell rathena developers that *preg_match to follow the exact PHP style format, that can return $array

https://www.php.net/manual/en/function.preg-match.php

currently rathena's preg_match is like this

*preg_match(<regular expression pattern>,<string>{,<offset>})

I want this

*preg_match(<regular expression pattern>,<string>{,<offset>{,<output array>,{<flag>}}})

if rathena has these 2 script commands, then only I'll consider
because this script is using them, without these 2 script commands it just won't feel the same functionality if these 2 features are scrap

 
Last edited by a moderator:
1.3 - script

- fix a bug the 'Promotion code has Started' didn't even activate after a server restart

- fix a bug when GM edit the start/expire date field, the announcement didn't update along with it ... should have just disable it when countdown initiated

- fix a bug when GM close a promo code, it doesn't announce a GM has closed it, yet its still make announcement about still can claim promo code

OKies I'm gonna leave this script and go do some other project ...
maybe some other day can come back and rewrite this script entirely with .npc_var only sync with SQL variables so don't have to call query_sql so frequently ...

but as it stands now, this script is 1400 lines, not something to be underestimate

 
I tried the script and it really works fine :D  Thank you so much AnnieRuru

 
Back
Top