Jump to content
  • 0

Giving a GM Level to a Player through a NPC?


Question

Posted

Hello rAthena Board

I need a Script,which gives a Player,after he finished a Quest a GM lvl like 1. Then he can get a lvl 2 GM lvl,but the NPC checks if he is lvl 1 already,but I don't know how to script that,could anyone help me Please?

thank you!

3 answers to this question

Recommended Posts

Posted

Something like this I guess:

Quest 1:

if(quest_completed == 1)
{ //If quest was finished

if(getgmlevel() >= 1) { end; } //Prevent from altering current GM Level

query_sql "UPDATE `login` SET level = '1' WHERE account_id = "+getcharid(3)+"";
mes "Your Acount Level [^ff0000"+strcharinfo(0)+"^000000] has been changed to ^ff00001^000000.";
close2;
atcommand "@kick "+strcharinfo(0); //Relog
end;

}

Quest 2 (To upgrade from gm lvl 1 to 2):

if(quest2_completed == 1)
{ //If quest 2 was finished

if(getgmlevel() >= 1 && getgmlevel() <= 5) {//Prevent from altering current GM Level (if it's high GM like 60 or so)

query_sql "UPDATE `login` SET level = '2' WHERE account_id = "+getcharid(3)+"";
mes "Your Acount Level [^ff0000"+strcharinfo(0)+"^000000] has been changed to ^ff00001^000000.";
close2;
atcommand "@kick "+strcharinfo(0); //Relog
end;
} else { end; }

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...