KCritz Posted December 24, 2012 Posted December 24, 2012 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 Quote
Sryx Posted December 24, 2012 Posted December 24, 2012 <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; } Quote
Emistry Posted December 24, 2012 Posted December 24, 2012 $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 ?? Quote
AnnieRuru Posted December 25, 2012 Posted December 25, 2012 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; } Quote
KCritz Posted December 25, 2012 Author Posted December 25, 2012 (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 December 25, 2012 by KCritz Quote
Emistry Posted December 25, 2012 Posted December 25, 2012 else{ mes "I don't see any Skulls you have >_< so get LOSS! you wasting my time."; close; } Quote
AnnieRuru Posted December 25, 2012 Posted December 25, 2012 wow your script also very screw up 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; } Quote
KCritz Posted December 25, 2012 Author Posted December 25, 2012 hehe stil nub at scripting thanks anyway both of you Quote
Question
KCritz
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.