adrian Posted September 6, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 46 Reputation: 0 Joined: 09/02/12 Last Seen: March 11 Share Posted September 6, 2012 hi there, how can i make the RENTAL ITEM NPC only can be rented with the vote points i do have votepoint npc. can someone give me a hint, i've been trying for a whole day thanks Quote Link to comment Share on other sites More sharing options...
Euphy Posted September 7, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted September 7, 2012 Not sure what your vote points are stored as, so assigning it as #votepoints: set .@cost,50; mes "It costs "+.@cost+" vote points to rent this item."; if (#votepoints < .@cost) close; next; if(select("Rent.:Cancel.")==2) close; set #votepoints, #votepoints-.@cost; rentitem item,time; mes "Here you go!"; close; Quote Link to comment Share on other sites More sharing options...
adrian Posted September 7, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 46 Reputation: 0 Joined: 09/02/12 Last Seen: March 11 Author Share Posted September 7, 2012 (edited) Not sure what your vote points are stored as, so assigning it as #votepoints: set .@cost,50; mes "It costs "+.@cost+" vote points to rent this item."; if (#votepoints < .@cost) close; next; if(select("Rent.:Cancel.")==2) close; set #votepoints, #votepoints-.@cost; rentitem item,time; mes "Here you go!"; close; very thanks!! but i added set .@cost,50; mes "It costs "+.@cost+" vote points to rent this item."; if (#votepoints < .@cost) close; next; if(select("Rent.:Cancel.")==2) close; set #votepoints, #votepoints-.@cost; rentitem item,time; query_sql("UPDATE `vote_point` SET `point` = '"+.@new+"' WHERE `account_id` = '"+getcharid(3)+"'"); mes "Here you go!"; close; erm.. i found it doesnt work because, set .@cost,50; mes "It costs "+.@cost+" vote points to rent this item."; if (#votepoints < .@cost) close; next; if(select("Rent.:Cancel.")==2) close; set #votepoints, #votepoints-.@cost; rentitem item,time; mes "Here you go!"; close; the point is not deducted but when i add query it goes straight to 0 even i have 55 points, it doesnt minus 1 Edited September 9, 2012 by Emistry Please use [CODE] or [CODEBOX] Tag for Scripts. That would be nicer.. Quote Link to comment Share on other sites More sharing options...
kangfredy Posted September 9, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted September 9, 2012 guys how to change with killing point?>@@a Quote Link to comment Share on other sites More sharing options...
quesoph Posted September 9, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 210 Reputation: 10 Joined: 11/20/11 Last Seen: August 23, 2015 Share Posted September 9, 2012 (edited) prontera,150,150,6,<tab>script<tab>Vote shop<tab>763,{ set .@cost,50; mes "It costs "+.@cost+" vote points to rent this item."; if (#votepoints < .@cost) close; //If you are using cashpoints in your vote system. you should replace #votepoints with #CASHPOINTS or #KAFRAPOINTS depending on your configuration. next; if(select("Rent.:Cancel.")==2) close; set #votepoints, #votepoints-.@cost; //If you are using cashpoints in your vote system. you should replace #votepoints with #CASHPOINTS or #KAFRAPOINTS depending on your configuration. rentitem 1107,9999; // explanation: Npc will give you blade( 1107 ) for 9999 Seconds. dispbottom "Your remaining points: "+ #votepoints; //query_sql("UPDATE `vote_point` SET `point` = '"+.@new+"' WHERE `account_id` = '"+getcharid(3)+"'"); <- remove this line. if your variable is vote_points then replace #votepoints above. mes "Here you go!"; close; } @kangferdy change the vote points with your killing points variable. eg: prontera,150,150,6,<tab>script<tab>Vote shop<tab>763,{ set .@cost,50; mes "It costs "+.@cost+" vote points to rent this item."; if (killingpoints < .@cost) close; next; if(select("Rent.:Cancel.")==2) close; set killingpoints, killingpoints - .@cost; rentitem 1107,9999; // explanation: Npc will give you blade( 1107 ) for 9999 Seconds. mes "Here you go!"; close; } Edited September 9, 2012 by Emistry Removed unnecessary line spacing.. Quote Link to comment Share on other sites More sharing options...
kangfredy Posted September 11, 2012 Group: Members Topic Count: 112 Topics Per Day: 0.02 Content Count: 388 Reputation: 4 Joined: 05/01/12 Last Seen: October 25, 2022 Share Posted September 11, 2012 really?no add sql database? Quote Link to comment Share on other sites More sharing options...
Question
adrian
hi there,
how can i make the RENTAL ITEM NPC only can be rented with the vote points
i do have votepoint npc.
can someone give me a hint, i've been trying for a whole day
thanks
Link to comment
Share on other sites
5 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.