Aureon Posted March 2, 2014 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
sandbox Posted March 2, 2014 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
Aureon Posted March 2, 2014 Author 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
sandbox Posted March 2, 2014 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
Aureon Posted March 7, 2014 Author 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
Patskie Posted March 7, 2014 Posted March 7, 2014 Can you elaborate more on your request? Because on my view i can't seem to understand you =\ Quote
Aureon Posted March 9, 2014 Author 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
Patskie Posted March 9, 2014 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
Aureon Posted March 9, 2014 Author 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
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~
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.