Account Status
I did a ton of searching but couldn't find what I was after, so quick question please.
How would you script an Accounts status to increase or decrease, like say if a player met certain conditions their accounts status would increase from 1 to 2? |
Code:
sub UpdateStatus { ## Usage: UpdateStatus($charid, xx) where xx is new status level |
Interesting. Thanks ghanja, so how would that work for a client on like say:
sub ENTERZONE { } I'd like to be able to allow clients access to the #flymode command but only in a specific zone and when they zone out have it set their status back to 1 so they can no longer access that #command. Just one example of things I have in mind for this, but I'm having a dumb moment. Also, $client->SetAccountFlag(flag, value) I was trying this, but it hasn't been working right for me. I'm missing something I guess with this one. |
You don't have to do that via status. I either didn't know about SetAccountFlag, it didn't work for me or was added after I made the code I exampled above.
Code:
sub EVENT_ENTERZONE { |
That's perfect, but I also have other more devious plans for the status up's and down's. >:)
|
Trying copy/paste usually fails for me, in an attempt to be quick about things. My apologies.
Code:
Usage: UpdateStatus($client->AccountName(), "50"); Where the number in quotes is the new desired account status (level). Code:
sub UpdateStatus { ## Usage: UpdateStats(accountname, xx) where xx is new status level plugins/MySQL_Connect.pl has the proper credentials. If you dont have MySQL_Connect.pl then look for LoadMysql.pl (I believe it is) and ensure the credentials are correct there. It took that PM to me to look at this thread to see what was up, sorry about that. |
Still struggling to get this to work. Can't change the status level to allow #commands to be used by players via a progressive quest line. Please help?
|
I put this right on the npc script. It will put a marqee in the client window informing them of status update (plugin::MM)
Code:
sub EVENT_SAY { |
Quote:
Ensure a filename by name of "MySQL.pl" exists in /plugins/ directory (not! /quests/plugins -- that isnt used) It should look like: Code:
## plugins/MySQL.pl -- be sure to change "peq" to whatever the name of your DB is you use, and change the first "root" to whatever Code:
# any NPC you want |
All times are GMT -4. The time now is 02:32 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.