Jump to content

Question

Posted
market,92,119,5 script Vote4Points Exchanger 838,{

waitingroom "Vote4Points Exchanger",0;

set @min_vote, 1; // minimum count on Vote Point to exchange

set @npcname$,"[^ff0000Npcname^000000]";

query_sql ("SELECT `point` FROM `vote_point` WHERE `account_id` = '"+getcharid(3)+"'", @vote);

mes @npcname$;

mes "You have ^ff0000"+@vote+"^000000 Vote Point!";

switch(select("Exchange my Point:Exit")){

case 1:

if( @vote < @min_vote ) {

mes @npcname$;

mes "^ff0000You will need "+@min_vote+" or more Vote Point to trade them with me!^000000";

close;

}

input .@input;

next;

if(.@input > @vote){

mes @npcname$;

mes "Im afraid you lack Vote Point";

close;

}

set #CASHPOINTS, #CASHPOINTS + .@input;// Amount of Points to get

dispbottom "Current Balance = "+#CASHPOINTS+" Credits";// Displays current Points

set .@new, @vote - .@input;// deletes assigned points from current vote points

if( .@new < 0 ) // safty first..

set .@new, 0;

query_sql("UPDATE `vote_point` SET `point` = '"+.@new+"' WHERE `account_id` = '"+getcharid(3)+"'");//updates the sql

close;

case 2:

end;

}

}

can you make every 1 vote4points = to 2 credits or Cash Point

thank you

4 answers to this question

Recommended Posts

Posted

change

set #CASHPOINTS, #CASHPOINTS + .@input;// Amount of Points to get

to this

set #CASHPOINTS, #CASHPOINTS + ( .@input * 2 );// Amount of Points to get

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