Jump to content
  • 0

Need Help with SuperPlayer NPC


timo0o

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   1
  • Joined:  07/19/13
  • Last Seen:  

Hello!

I Need Help with this SuperPlayer script. Super Player are Player with GM Level 1.

 

I always get Errors with this Code.

 

Player who have a Platinum Coin get 1 Mithril Coin and GM Level 1 (is there a way that the command set the GM level to 1 permanently?)

 

Here's my Code (GERMAN LANGUAGE):

prontera,147,203,5	script	SuperPlayer NPC	403,{

//|~~~~~~~~~~~~~ Settings of the NPC: ~~~~~~~~~~~~~~~~~
	set @npcname$,"^999999[SuperPlayer]^000000";
//|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	mes @npcname$;
	mes "Hallo "+strcharinfo(0)+"";
	mes "Du willst SuperPlayer werden? Dann bist du bei mir genau richtig!";
	next;
	goto L_Men;
	
	L_Men:
	mes @npcname$;
	mes "Alles was du brauchst, ist ein Platinum Coin aus dem Donation Shop von der Webseite.";
	mes "Hast du einen Platinum Coin und willst SuperPlayer werden?";
	menu "Ja will ich!",L_Start,"Nein",L_End;
	
	L_Start:
		next;
		mes @npcname$;
		mes "Ich schaue eben nach ob du den Coin hast...";
		if ((countitem(677) <= 0){
			mes @npcname$;
			mes "Du hast keinen Platin Coin. Sorry!";
			close;
		} else if(countitem(677) >0){
			mes @npcname$;
			mes "Du hast einen Coin! Willst du den jetzt eintauschen?"
			menu "Ja will ich!",L_Start2,"Nein",L_End;
		}
		
	L_Start2:
		next;
		mes @npcname$;
		mes "Okay, dann nehme ich den Coin nun und mache dich zum Super Player! Ausserdem gebe ich dir den Mithril Coin, den du beim Coin Banker                 eintauschen kannst.";
		delitem 677,1; //Delete PlatinCoin
		getitem 674,1; //Get Mithril Coin
		adjgmlvl 1,"+strcharinfo(0)+"; //Set GM Level to 1
		close;

	L_End:
		next;
		mes @npcname$;
		mes "Bis Bald!";
		close;
}

 

 

I appreciate any help!

 

Thanks!

 

Tim


 

EDIT

I did it .... but the last thing I need is the GM level 1 function. Any Ideas or Help???

 

Thanks :D

 

prontera,147,203,5	script	SuperPlayer NPC	403,{

//|~~~~~~~~~~~~~ Settings of the NPC: ~~~~~~~~~~~~~~~~~
	set @npcname$,"^999999[SuperPlayer]^000000";
//|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	mes @npcname$;
	mes "Hallo "+strcharinfo(0)+"";
	mes "Du willst SuperPlayer werden? Dann bist du bei mir genau richtig!";
	next;
	goto L_Men;
	
	L_Men:
	mes @npcname$;
	mes "Alles was du brauchst, ist ein Platinum Coin aus dem Donation Shop von der Webseite.";
	mes "Hast du einen Platinum Coin und willst SuperPlayer werden?";
	menu "Ja will ich!",L_Start,"Nein",L_End;
	
	L_Start:
		next;
		mes @npcname$;
		mes "Ich schaue eben nach ob du den Coin hast...";
		if (countitem(677) <= 0){
			mes @npcname$;
			mes "Du hast keinen Platin Coin. Sorry!";
			close;
		} else if(countitem(677) >0){
			mes @npcname$;
			mes "Du hast einen Coin! Willst du den jetzt eintauschen?";
			menu "Ja will ich!",L_Start2,"Nein",L_End;
		}
		
	L_Start2:
		next;
		mes @npcname$;
		mes "Okay, dann nehme ich den Coin nun und mache dich zum Super Player! Ausserdem gebe ich dir den Mithril Coin, den du beim Coin Banker eintauschen kannst.";
		delitem 677,1; 
		getitem 674,1;
		//HERE--> adjgmlvl 1,"+strcharinfo(0)+";
		close;

	L_End:
		next;
		mes @npcname$;
		mes "Bis Bald!";
		close;
}
Edited by timo0o
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   2
  • Joined:  08/23/12
  • Last Seen:  

if(getgmlevel() > 1)
functions ....

Do you mean this?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

to change the gm level of a player permanently you must

  • define a group id for your gm level 1 (conf/groups.conf)
  • change the group id of the player with a query
  • ask the player to relog
//HERE--> adjgmlvl 1,"+strcharinfo(0)+";
query_sql "update `login` set `group_id` = 1 where `account_id` = "+ getcharid(3);// your group id
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  90
  • Reputation:   5
  • Joined:  06/17/12
  • Last Seen:  

yes, better dont use the adjgroup command. because it will be reset upon using the Char Select.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   1
  • Joined:  07/19/13
  • Last Seen:  

Okay I will test it right now, Thanks for the answers :-)



Works! Thanks!!!

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...