• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

PocketVote naaa MadVote (with votelist)

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.

MuntThee

Tree Puncher
#1
Madcommands vote redward.

add your server to the minecraftpocket-servers.com list!

if you have done that get the API key.

insert the api key in the code. (put the apikey where the YOUR_SECRET_SERVER_API_KEY stands!)
red is important
What this does is acctualy requisting a number from the website: 0, 1, 2
0
means the user has not voted
1 means the user have voted and not claimed his price
2 means the user has voted and claimed his price (this is wat the link on line 18 does if you dont add that the user can use it infinitey)

Markdown (GitHub flavored):
cmd create vote check if user has voted!
cmd add vote let %apikey% = \"YOUR_SECRET_SERVER_API_KEY\"
cmd add vote let %rsp% = geturl(\"https://minecraftpocket-servers.com/api/?object=votes&element=claim&key=\" + %apikey% + \"&username=\" + %p%)
cmd add vote if %rsp% = 0 then message %p% §cYou have not voted yet!
cmd add vote if %rsp% = 0 then exit
cmd add vote if %rsp% = 2 then message %p% §cYou cant claim your vote redward a second time wait 24h!
cmd add vote if %rsp% = 2 then exit
cmd add vote #give user stuff and money xD
cmd add vote #Do Stufff
cmd add vote #Do Stufff
cmd add vote #Do Stufff
cmd add vote #Do Stufff
cmd add vote #Do Stufff
cmd add vote #Do Stufff
cmd add vote message %p% §aYou have voted on this server!
cmd add vote #let the vote redward see that the /vote command already has been executed! (do not edit)
cmd add vote let %confirm% = geturl(\"https://minecraftpocket-servers.com/api/?action=post&object=votes&element=claim&key=\" + %apikey% + \"&username=\" + %p%)
this also works with the api key this wil return the list of votes of the given month you put in.
the 5 needs to be the month you can automate this if you know how..

Markdown (GitHub flavored):
cmd create votelist returns a votelist
cmd add votelist let %apikey% = \"YOUR_SECRET_SERVER_API_KEY\"
cmd add votelist let %month% = 5
cmd add votelist let %json% = geturl(\"https://minecraftpocket-servers.com/api/?object=servers&element=voters&key=\" +%apikey%+ \"&month=\"+ %month% +\"&format=json\")
cmd add votelist let %djson% = dejson(%json%)
cmd add votelist let %voters% = %djson%[\"voters\"]
cmd add votelist message %p% %voters%


im sorry if you do not understand what is happening here :3
and for my bad english :cry:;)


Credits for DataLion he had already created this but i cant find it anymore so yeah