KCritz Posted December 24, 2012 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Share 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 Link to comment Share on other sites More sharing options...
Sryx Posted December 24, 2012 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 520 Reputation: 64 Joined: 11/19/11 Last Seen: October 19, 2024 Share 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 Link to comment Share on other sites More sharing options...
KCritz Posted December 24, 2012 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share Posted December 24, 2012 thanks sir Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 24, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share 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 Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 25, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
KCritz Posted December 25, 2012 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted December 25, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 19 hours ago Share Posted December 25, 2012 else{ mes "I don't see any Skulls you have >_< so get LOSS! you wasting my time."; close; } Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 25, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
KCritz Posted December 25, 2012 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 95 Reputation: 0 Joined: 12/23/12 Last Seen: March 1, 2015 Author Share Posted December 25, 2012 hehe stil nub at scripting thanks anyway both of you Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.