Aureon Posted March 2, 2014 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Share Posted March 2, 2014 (edited) 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 March 2, 2014 by Ares Quote Link to comment Share on other sites More sharing options...
Patskie Posted March 9, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 1 hour ago Share Posted March 9, 2014 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; } Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 2, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted March 2, 2014 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. Quote Link to comment Share on other sites More sharing options...
Aureon Posted March 2, 2014 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Author Share Posted March 2, 2014 no sir,i created an npc which i named it as my event point managerthe function of it is to give point to a playerand 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 i really don't have any idea what to put sir Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 2, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted March 2, 2014 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"; Quote Link to comment Share on other sites More sharing options...
Aureon Posted March 7, 2014 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Author Share Posted March 7, 2014 @sanbox: thanks for the idea but is there no other possible way on making a script like what i was asking? Quote Link to comment Share on other sites More sharing options...
Patskie Posted March 7, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 1 hour ago Share Posted March 7, 2014 Can you elaborate more on your request? Because on my view i can't seem to understand you =\ Quote Link to comment Share on other sites More sharing options...
Aureon Posted March 9, 2014 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Author Share Posted March 9, 2014 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 Quote Link to comment Share on other sites More sharing options...
Aureon Posted March 9, 2014 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Author Share Posted March 9, 2014 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! Quote Link to comment Share on other sites More sharing options...
Question
Aureon
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?
Edited by Aresthank you and have a nice day~
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.