Jump to content
  • 0

Giving a GM Level to a Player through a NPC?


SadeSan

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  12/28/11
  • Last Seen:  

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!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

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; }

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  12/28/11
  • Last Seen:  

Okay,thank you!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

Okay,thank you!

Let me know if it worked, if not, well just post the script, easier for me to just edit the whole thing.

Link to comment
Share on other sites

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.

×
×
  • Create New...