Jump to content
  • 0

How can i give points?


Aureon

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

Hello!
Good day scripters!
I just want to know if how to give points to a player?

what are the variables i need to put in my script?

thank you and have a nice day~

Edited by Ares
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  


prontera,150,150,0 script Sample 100,{

if ( getgmlevel( ) < 99 ) end;

.@npc$ = "[ ^FF0000" + strnpcinfo( 1 ) + "^000000 ]";

.@origin = getcharid( 3 );

mes .@npc$;

mes "Enter the player name you want to give a reward point(s).";

next;

input .@name$;

if ( !getcharid( 3, .@name$ ) ) {

mes .@npc$;

mes "The player is not online.";

close;

}

mes .@npc$;

mes "How many points do you want to give to " +.@name$+ "?";

next;

input .@amount;

if ( !.@amount ) {

mes .@npc$;

mes "Invalid amount.";

close;

}

if ( attachrid( getcharid( 3, .@name$ ) ) ) {

set eventpoints, eventpoints + .@amount;

dispbottom "You have given " + .@amount + " event point" + ( .@amount > 1 ? "s" : "" ) + " by " + rid2name( .@origin ) + ".";

dispbottom "You now have " + eventpoints + " event point" + ( eventpoints > 1 ? "s" : "" ) + ".";

}

attachrid( .@origin );

mes .@npc$;

mes "Done!";

close;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

by points did you mean Cash Points?

If so, here is one way to do it..

 

set #CASHPOINTS,#CASHPOINTS+XY;

 

replace variable XY to desired amount of points to increase it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

no sir,
i created an npc which i named it as my event point manager
the function of it is to give point to a player
and i used this variables:

				set eventpoints, eventpoints+1;

but sadly, it only give points only when the player clicked the npc ...

 

is it possible to create an npc which give points to player?
so it goes like this ... Playername + 1  /wah

i really don't have any idea what to put sir  /sob

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

An easier way is to create a usable item then put these lines as their script..

 

set eventpoints,eventpoints+1; dispbottom "You now have "+eventpoints+" Event Points";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

@sanbox: thanks for the idea but is there no other possible way on making a script like what i was asking? :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Can you elaborate more on your request? Because on my view i can't seem to understand you =\

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

Can you elaborate more on your request? Because on my view i can't seem to understand you =\

Okay sir, 

uhmm first of all im made an npc named "Event Point Giver.txt which is a GM access npc that gives points to a player whenever they won an event ...

the problem is, i don't know what variable i will use ... 

i have this one

set eventpoints, eventpoints+1;

we all know that this variable will only give points only if the player talked to the npc, but like what i said, only gms should have access to this ...

btw, thanks sir Patskie for replying to my thread

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

prontera,150,150,0	script	Sample	100,{
	if ( getgmlevel( ) < 99 ) end;
	.@npc$ = "[ ^FF0000" + strnpcinfo( 1 ) + "^000000 ]";
	.@origin = getcharid( 3 );
	mes .@npc$;
	mes "Enter the player name you want to give a reward point(s).";
	next;
	input .@name$;
	if ( !getcharid( 3, .@name$ ) ) {
		mes .@npc$;
		mes "The player is not online.";
		close;
	}
	mes .@npc$;
	mes "How many points do you want to give to " +.@name$+ "?";
	next;
	input .@amount;
	if ( !.@amount ) {
		mes .@npc$;
		mes "Invalid amount.";
		close;
	}
	if ( attachrid( getcharid( 3, .@name$ ) ) ) {
		set eventpoints, eventpoints + .@amount;
		dispbottom "You have given " + .@amount + " event point" + ( .@amount > 1 ? "s" : "" ) + " by " + rid2name( .@origin ) + ".";
		dispbottom "You now have " + eventpoints + " event point" + ( eventpoints > 1 ? "s" : "" ) + ".";
	}
	attachrid( .@origin );
	mes .@npc$;
	mes "Done!";
	close;
}

ooohhh!! that's what i am looking for :)

THANKS A LOOOOT! /no1

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