x13th Posted November 24, 2012 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 206 Reputation: 14 Joined: 11/20/11 Last Seen: April 9, 2024 Share Posted November 24, 2012 Patulong naman po. Ginamit ko yung Custom Cash Shop by @Ind after ng pag recompile ko wala naman error pero pag bibili na ako sa cash shop hindi dinedelete yung item na kelangan :< Help please </3 Thank you in advance! topic from eA: Link Here's the diff. if( stristr(nd->name,"ITMCur") ) {//Item Currency int count=0,ind=0,c = 0, cid = pc_readreg(sd,add_str("@RRITMCur")); for(c = 0; c < MAX_INVENTORY; c++) if(sd->status.inventory[c].nameid == cid) count += sd->status.inventory[c].amount; if( count != pc_readaccountreg( sd, "#CASHPOINTS" ) ) return 6; ind = pc_search_inventory(sd,cid); if( ind < 0 )//because checking twice is safer... return 6; sd->cashPoints = count; if( sd->cashPoints < price ) return 6; if( pc_delitem(sd,ind,price,0,0, LOG_TYPE_NPC) )//somehow it failed to delete... return 6; sd->cashPoints -= price; if( !pet_create_egg(sd, nameid) ) { struct item item_tmp; memset(&item_tmp, 0, sizeof(struct item)); item_tmp.nameid = nameid; item_tmp.identify = 1; pc_additem(sd,&item_tmp, amount, LOG_TYPE_NPC); } if(log_config.enable_logs&0x20) log_pick_pc(sd, LOG_TYPE_SCRIPT, amount, NULL); pc_setaccountreg(sd,"#CASHPOINTS",sd->cashPoints);//update shop~ return 0; } if( stristr(nd->name,"CharCur") ) {//Char Reg Currency (from set REGNAME,1;) const char* charReg = pc_readregstr(sd,add_str("@CharCurrrency$")); int count = pc_readglobalreg(sd,charReg); if( count != pc_readaccountreg( sd, "#CASHPOINTS" ) )//safecheck return 6; sd->cashPoints = count; if( sd->cashPoints < price ) return 6; sd->cashPoints -= price; pc_setglobalreg(sd,charReg,sd->cashPoints);//update... if( !pet_create_egg(sd, nameid) )//give item... { struct item item_tmp; memset(&item_tmp, 0, sizeof(struct item)); item_tmp.nameid = nameid; item_tmp.identify = 1; pc_additem(sd,&item_tmp, amount, LOG_TYPE_NPC); } if(log_config.enable_logs&0x20) log_pick_pc(sd, LOG_TYPE_SCRIPT, amount, NULL); pc_setaccountreg(sd,"#CASHPOINTS",sd->cashPoints);//update shop~ return 0; } if( stristr(nd->name,"ACCCur") ) {//Account Reg Currency const char* charReg = pc_readregstr(sd,add_str("@AccCurrrency$")); int count = pc_readaccountreg(sd,charReg); if( count != pc_readaccountreg( sd, "#CASHPOINTS" ) )//safecheck return 6; sd->cashPoints = count; if( sd->cashPoints < price ) return 6; sd->cashPoints -= price; pc_setaccountreg(sd,charReg,sd->cashPoints);//update... if( !pet_create_egg(sd, nameid) )//give item... { struct item item_tmp; memset(&item_tmp, 0, sizeof(struct item)); item_tmp.nameid = nameid; item_tmp.identify = 1; pc_additem(sd,&item_tmp, amount, LOG_TYPE_NPC); } if(log_config.enable_logs&0x20) log_pick_pc(sd, LOG_TYPE_SCRIPT, amount, NULL); pc_setaccountreg(sd,"#CASHPOINTS",sd->cashPoints);//update shop~ return 0; } Quote Link to comment Share on other sites More sharing options...
eJay Posted December 25, 2012 Group: Members Topic Count: 80 Topics Per Day: 0.02 Content Count: 325 Reputation: 76 Joined: 03/22/12 Last Seen: August 5, 2019 Share Posted December 25, 2012 (edited) use this script prontera,150,150,4<tab>cashshop<tab>,Cash Points<tab>89,ITEM ID:PRICE; Edited December 25, 2012 by eJay Quote Link to comment Share on other sites More sharing options...
nicoscene Posted December 28, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 154 Reputation: 6 Joined: 04/26/12 Last Seen: January 26, 2016 Share Posted December 28, 2012 mas okay gamitin to http://pastebin.com/raw.php?i=G7pt6HR7 pwedeng points or specific item, momodify mo nalang yung script. Quote Link to comment Share on other sites More sharing options...
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.