Jump to content
  • 0

NPC skull to cashpoint


Question

Posted

Hi i wan to request a script that Skull(7420) can be exchange into a cashpoint

1 skull(7420) = 2cashpoint and you can input how many skull you want to exchange and then the npc will show how many point u've exchange and show your cash balance

8 answers to this question

Recommended Posts

Posted
<header>{

menu "Exchange",-,"Check points",chec_k;
input .@t;
if(countitem(7420) >= .@t){
 mes "Thanks see you again. . . !";
 set $cash,.@t*2;
 delitem 7420,.@t;
 set #CASHPOINTS,#CASHPOINTS+$cash;
 close;
}else{
 mes "Not enough Skull";
 close;
}
chec_k:
 query_sql("SELECT `value` FROM `global_reg_value` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
 dispbottom "Your Cashpoint: "+#CASHPOINTS;
 close;

}

Posted

$cash

avoid using permanent global npc variable .... it can be abuseable...

change it to something like

.@cash

 query_sql("SELECT `value` FROM `global_reg_value` WHERE account_id="+getcharid(3)+" LIMIT 1",.@points);
 dispbottom "Your Cashpoint: "+#CASHPOINTS;

the query part is not needed because it's useless....also..the query...what are you trying to return ?? /hmm

Posted

this script is very screw up =/

prontera,155,173,5    script    kjdfhksjf    100,{
   mes "you currently have "+ #cashpoints +" Cash points";
   mes "and "+( .@skulls = countitem(7420) )+" skulls";
   if ( .@skulls )
       next;
   else
       close;
   if ( input ( .@amount, 1, .@skulls ) ) {
       mes "invalid amount";
       close;
   }
   delitem 7420, .@amount;
   #cashpoints = #cashpoints + .@amount *2;
   close;
}

Posted (edited)

ahm ma'am annie can you help me with this i something wrong but no error on server

prontera,155,173,5	script	Skull Collector	449,{
mes "I'm collecting dead people skull.";
mes "Hmm... well well looks like you have something there aye!";
mes " ";
mes " ";
mes " ";
mes "Let me just check it.............";
next;
mes "You have "+( .@skulls = countitem(7420) )+" skulls";
mes "And";
mes "You currently have "+ #cashpoints +" Cash points";
if ( .@skulls )
	next;
else
mes "I don't see any Skulls you have >_< so get LOSS! you wasting my time.";
	close;
if ( input ( .@amount, 1, .@skulls ) ) {
	mes "invalid amount";
	close;
delitem 7420, .@amount;
#cashpoints = #cashpoints + .@amount *2;
dispbottom "[ Cash ] Gained "+.cashpoint+" Points. Total : "+@cashopoints+" Points.";
close;
}
end;
}

well i just edit the script you gave and add some the input menu not showing it just goin next and next then close

Edited by KCritz
Posted

wow your script also very screw up :ani_swt3:

prontera,155,173,5	script	Skull Collector	449,{
mes "I'm collecting dead people skull.";
mes "Hmm... well well looks like you have something there aye!";
mes " ";
mes " ";
mes " ";
mes "Let me just check it.............";
next;
mes "You have "+( .@skulls = countitem(7420) )+" skulls";
mes "And";
mes "You currently have "+ #cashpoints +" Cash points";
next;
if ( !.@skulls ) {
	mes "I don't see any Skulls you have >_< so get LOSS! you wasting my time.";
	close;
}
if ( input ( .@amount, 1, .@skulls ) ) {
	mes "invalid amount";
	close;
}
delitem 7420, .@amount;
#cashpoints = #cashpoints + .@amount *2;
dispbottom "[ Cash ] Gained "+( .@amount *2 )+" Points. Total : "+ #cashpoints +" Points.";
mes "Gained "+( .@amount *2 )+" Points.";
mes "Total : "+ #cashpoints +" Points.";
close;
}

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