Author Topic: Donator Mod  (Read 5100 times)

This is a mod created by EV0_ (Me), answering to the call of releasetheblocks (or what's his name).

Features:
  • /commands
    • /makeDonor <target> <donator / sponsor>
    • /undonor <target>
  • Events IfStatusIs [Donator | Sponsor] and VariableTrue/False events.
  • Clan Prefix Tag: [Donator] and [Sponsor]
Coming Soon:
  • /donate funds!

Hope you like it!
Credit to (Tezuni, Darklight, and Munk?) for making Script_Moderator, which I used little code snippets from for the Auto-Status function.


Firstly. I still think these functions are incredibly useless, as you're just being too lazy to type a little bit more.
Code: [Select]
function fcbn(%client)
{findclientbyname(%client);}

function msg(%client, %msg)
{messageClient(%client, '', %msg);}

You also haven't tested this. Plus you've failed to fix some of the things mentioned.

In serverCmdDonate:
The first variable(%bl) is never used(does not matter much, it's just useless code).

The second variable(%hostN) will always be blank because $TSoE::Host is blank. Although that doesn't matter much because that variable is never used either.

The third variable(%host) will always be blank. As you can see when you define it:
Code: [Select]
%host = fcbn(%host);
It will always be blank because you're defining it with %host, which is already blank. To find the host's client you'll have to go through clientGroup and do various checks to see if they're the host.


In serverCmdLink:
All messages you attempt to send to the host won't work because %host does not exist. You don't even attempt to define it in this function.


You're still erasing all server preferences when you export your sponsor and donator global variables.


When a donator joins the server their status still won't load because you're calling AutoDonatorCheck with %this.client instead of %this. Look at the function name:
GameConnection::AutoAdminCheck(%this)
GameConnection is the class name for a client. Meaning that %this is the client.

Also.
In the link command the link won't be displayed in hyperlinks.

It works fine on my server. Except for the 'Host' part. Consider it a Work in Progress maybe? And one that I forgot to remove.

It works fine on my server. Except for the 'Host' part. Consider it a Work in Progress maybe? And one that I forgot to remove.
"Post FINISHED Add-Ons here"

Please lock this and move back to the Modification Discussion until it you fix all of these things.

Oh by the way, the Server Pref WILL stay empty, but only until you use /makedonor.
"Post FINISHED Add-Ons here"

Please lock this and move back to the Modification Discussion until it you fix all of these things.
Ok I'll just fix this...

*is annoyed at self*

Ok I removed all of the WIP parts. This mod is officially Finished. The old WIP features will be added in V2 or 3.
Oh and thanks jes00 for pointing out those parts that I missed.

It's sponsor, not sponser.

This mod is officially Finished.
I hope you're saying this and just haven't updated the download link yet. Because none of what I said has been fixed yet.
It's sponsor, not sponser.
Oh lol. Didn't notice. He got it right in the topic, but not once in the mod.

I hope you're saying this and just haven't updated the download link yet. Because none of what I said has been fixed yet.Oh lol. Didn't notice. He got it right in the topic, but not once in the mod.
Ok I think it's updated now.

Ok I think it's updated now.
Two things you missed.
You're still erasing all server preferences when you export your sponsor and donator global variables.
And
When a donator joins the server their status still won't load because you're calling AutoDonatorCheck with %this.client instead of %this. Look at the function name:
GameConnection::AutoAdminCheck(%this)
GameConnection is the class name for a client. Meaning that %this is the client.

You're still erasing all server preferences when you export your sponsor and donator global variables.
wait
literally all of the server's preferences? this mod is literally destructive in nature?

wait
literally all of the server's preferences? this mod is literally destructive in nature?
Yep, he's using the export() function to write to the server/prefs.cs file. He doesn't seem to understand that it overwrites all the other data in the file, and could potentially make a server lose all it's preferences if the normal prefs export isn't triggered before the server shuts down.

Yep, he's using the export() function to write to the server/prefs.cs file. He doesn't seem to understand that it overwrites all the other data in the file, and could potentially make a server lose all it's preferences if the normal prefs export isn't triggered before the server shuts down.

"But it works fine in testi-- *CRASH* --WHO ERASED MY PREFERENCES"

Firstly. I still think these functions are incredibly useless, as you're just being too lazy to type a little bit more.
Code: [Select]
function fcbn(%client)
{findclientbyname(%client);}
That couldn't even work! It just calls findclientbyname, it doesn't return anything at all.