Jump to content
  • 0

Need Help with SuperPlayer NPC


Question

Posted (edited)

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

4 answers to this question

Recommended Posts

Posted

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

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