Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/18/14 in all areas

  1. I'm starting to help someone that not have been fix the cash shop in 2012-04-10araexe after i search looking to fix it some src are release but it failed... but thank's for those src give's me idea to fix the cash shop problem now here's the quick fix.. In: \src\map\clif.c Find: /// CASH/POINT SHOP Around line 15902 till before /// Adoption System Around line 15902 change with this /// CASH/POINT SHOP /// void clif_cashshop_open( struct map_session_data* sd ){ WFIFOHEAD( sd->fd, 10 ); WFIFOW( sd->fd, 0 ) = 0x845; WFIFOL( sd->fd, 2 ) = sd->cashPoints; WFIFOL( sd->fd, 6 ) = sd->kafraPoints; WFIFOSET( sd->fd, 10 ); } void clif_parse_cashshop_open_request( int fd, struct map_session_data* sd ){ sd->npc_shopid = -1; // Set npc_shopid when using cash shop from "cash shop" button [Aelys|Susu] bugreport:96 clif_cashshop_open( sd ); } void clif_parse_cashshop_close( int fd, struct map_session_data* sd ){ sd->npc_shopid = 0; // Reset npc_shopid when using cash shop from "cash shop" button [Aelys|Susu] bugreport:96 // No need to do anything here } //0846 <tabid>.W (CZ_REQ_SE_CASH_TAB_CODE)) //08c0 <len>.W <openIdentity>.L <itemcount>.W (ZC_ACK_SE_CASH_ITEM_LIST2) void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) { short tab = RFIFOW(fd, packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); int j; if( tab < 0 || tab > CASHSHOP_TAB_SEARCH ) return; WFIFOHEAD(fd, 10 + ( cash_shop_items[tab].count * 6 ) ); WFIFOW(fd, 0) = 0x8c0; WFIFOW(fd, 2) = 10 + ( cash_shop_items[tab].count * 6 ); WFIFOL(fd, 4) = tab; WFIFOW(fd, 8) = cash_shop_items[tab].count; for( j = 0; j < cash_shop_items[tab].count; j++ ) { struct item_data *id = itemdb_search(cash_shop_items[tab].item[j]->nameid); WFIFOW(fd, 10 + ( 6 * j ) ) = (id->view_id) ? id->view_id : cash_shop_items[tab].item[j]->nameid; WFIFOL(fd, 12 + ( 6 * j ) ) = cash_shop_items[tab].item[j]->price; } WFIFOSET(fd, 10 + ( cash_shop_items[tab].count * 6 )); } //08ca <len>.W <itemcount> W <tabcode>.W (ZC_ACK_SCHEDULER_CASHITEM) void clif_cashshop_list( int fd ){ int tab; for( tab = CASHSHOP_TAB_NEW; tab < CASHSHOP_TAB_SEARCH; tab++ ){ int length = 8 + cash_shop_items[tab].count * 6; int i, offset; WFIFOHEAD( fd, length ); WFIFOW( fd, 0 ) = 0x8ca; WFIFOW( fd, 2 ) = length; WFIFOW( fd, 4 ) = cash_shop_items[tab].count; WFIFOW( fd, 6 ) = tab; for( i = 0, offset = 8; i < cash_shop_items[tab].count; i++, offset += 6 ){ struct item_data *id = itemdb_search(cash_shop_items[tab].item[i]->nameid); WFIFOW( fd, offset ) = (id->view_id) ? id->view_id : cash_shop_items[tab].item[i]->nameid; WFIFOL( fd, offset + 2 ) = cash_shop_items[tab].item[i]->price; } WFIFOSET( fd, length ); } } void clif_parse_cashshop_list_request( int fd, struct map_session_data* sd ){ if( !sd->status.cashshop_sent ) { clif_cashshop_list( fd ); sd->status.cashshop_sent = true; } } /// List of items offered in a cash shop (ZC_PC_CASH_POINT_ITEMLIST). /// 0287 <packet len>.W <cash point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }* /// 0287 <packet len>.W <cash point>.L <kafra point>.L { <sell price>.L <discount price>.L <item type>.B <name id>.W }* (PACKETVER >= 20070711) void clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { int fd,i; #if PACKETVER < 20070711 const int offset = 8; #else const int offset = 12; #endif nullpo_retv(sd); nullpo_retv(nd); fd = sd->fd; sd->npc_shopid = nd->bl.id; WFIFOHEAD(fd,offset+nd->u.shop.count*11); WFIFOW(fd,0) = 0x287; WFIFOW(fd,2) = offset+nd->u.shop.count*11; WFIFOL(fd,4) = sd->cashPoints; // Cash Points #if PACKETVER >= 20070711 WFIFOL(fd,8) = sd->kafraPoints; // Kafra Points #endif for( i = 0; i < nd->u.shop.count; i++ ) { struct item_data* id = itemdb_search(nd->u.shop.shop_item[i].nameid); WFIFOL(fd,offset+0+i*11) = nd->u.shop.shop_item[i].value; WFIFOL(fd,offset+4+i*11) = nd->u.shop.shop_item[i].value; // Discount Price WFIFOB(fd,offset+8+i*11) = itemtype(id->nameid); WFIFOW(fd,offset+9+i*11) = ( id->view_id > 0 ) ? id->view_id : id->nameid; } WFIFOSET(fd,WFIFOW(fd,2)); } /// Cashshop Buy Ack (ZC_PC_CASH_POINT_UPDATE). /// 0289 <cash point>.L <error>.W /// 0289 <cash point>.L <kafra point>.L <error>.W (PACKETVER >= 20070711) /// error: /// 0 = The deal has successfully completed. (ERROR_TYPE_NONE) /// 1 = The Purchase has failed because the NPC does not exist. (ERROR_TYPE_NPC) /// 2 = The Purchase has failed because the Kafra Shop System is not working correctly. (ERROR_TYPE_SYSTEM) /// 3 = You are over your Weight Limit. (ERROR_TYPE_INVENTORY_WEIGHT) /// 4 = You cannot purchase items while you are in a trade. (ERROR_TYPE_EXCHANGE) /// 5 = The Purchase has failed because the Item Information was incorrect. (ERROR_TYPE_ITEM_ID) /// 6 = You do not have enough Kafra Credit Points. (ERROR_TYPE_MONEY) /// 7 = You can purchase up to 10 items. /// 8 = Some items could not be purchased. void clif_cashshop_ack(struct map_session_data* sd, int error) { int fd = sd->fd; WFIFOHEAD(fd, packet_len(0x289)); WFIFOW(fd,0) = 0x289; WFIFOL(fd,2) = sd->cashPoints; #if PACKETVER < 20070711 WFIFOW(fd,6) = TOW(error); #else WFIFOL(fd,6) = sd->kafraPoints; WFIFOW(fd,10) = TOW(error); #endif WFIFOSET(fd, packet_len(0x289)); } #if PACKETVER >= 20120410 void clif_parse_cashshop_buy( int fd, struct map_session_data *sd ){ struct s_packet_db* info = &packet_db[sd->packet_ver][RFIFOW(fd,0)]; uint16 length = RFIFOW( fd, info->pos[0] ); uint16 count = RFIFOW( fd, info->pos[1] ); if( length < 10 || length < ( 10 + count * 6 ) ){ return; } cashshop_buylist( sd, RFIFOL( fd, info->pos[2] ), count, (uint16 *)RFIFOP( fd, info->pos[3] ) ); } #endif void clif_cashshop_result( struct map_session_data *sd, uint16 item_id, uint16 result ){ WFIFOHEAD( sd->fd, 16 ); WFIFOW( sd->fd, 0 ) = 0x849; WFIFOL( sd->fd, 2 ) = item_id; WFIFOW( sd->fd, 6 ) = result; WFIFOL( sd->fd, 8 ) = sd->cashPoints; WFIFOL( sd->fd, 12 ) = sd->kafraPoints; WFIFOSET( sd->fd, 16 ); } // TODO: find a more accurate date for this - Brynner #if PACKETVER < 20120410 /// Request to buy item(s) from cash shop (CZ_PC_BUY_CASH_POINT_ITEM). /// 0288 <name id>.W <amount>.W /// 0288 <name id>.W <amount>.W <kafra points>.L (PACKETVER >= 20070711) /// 0288 <packet len>.W <kafra points>.L <count>.W { <amount>.W <name id>.W }.4B*count (PACKETVER >= 20100803) /// 0848 <packet len>.W <count>.W <packet len>.W <kafra points>.L <count>.W { <amount>.W <name id>.W <tab>.W }.6B*count (PACKETVER >= 20130000) void clif_parse_cashshop_buy(int fd, struct map_session_data *sd){ int fail = 0; struct s_packet_db* info; int cmd = RFIFOW(fd,0); nullpo_retv(sd); info = &packet_db[sd->packet_ver][cmd]; if( sd->state.trading || !sd->npc_shopid ) fail = 1; else { #if PACKETVER < 20101116 short nameid = RFIFOW(fd,info->pos[0]); short amount = RFIFOW(fd,info->pos[1]); int points = RFIFOL(fd,info->pos[2]); fail = npc_cashshop_buy(sd, nameid, amount, points); clif_cashshop_ack(sd,fail); #else int s_itl = (cmd==0x848)?10:4; //item _list size (depend on cmd even for 2013+) int len = RFIFOW(fd,info->pos[0]); int points = RFIFOL(fd,info->pos[1]); int count = RFIFOW(fd,info->pos[2]); unsigned short* item_list = (unsigned short*)RFIFOP(fd,info->pos[3]); if( len < 10 || len != 10 + count * s_itl){ ShowWarning("Player %u sent incorrect cash shop buy packet (len %u:%u)!\n", sd->status.char_id, len, 10 + count * s_itl); return; } if(cmd==0x848){ cashshop_buylist( sd, points, count, item_list); } else { fail = npc_cashshop_buylist(sd,points,count,item_list); } #endif } clif_cashshop_ack(sd,fail); } #endif /// Adoption System And use this Packet 2012-04-10 //2012-04-10aRagexeRE packet_ver: 30 0x01FD,15,repairitem,2 0x089C,26,friendslistadd,2 0x0885,5,hommenu,2:4 0x0961,36,storagepassword,0 0x0288,-1,cashshopbuy,4:8 0x091C,26,partyinvite2,2 0x094B,19,wanttoconnection,2:6:10:14:18 0x0369,7,actionrequest,2:6 0x083C,10,useskilltoid,2:4:6 0x0439,8,useitem,2:4 0x0945,-1,itemlistwindowselected,2:4:8 0x0815,-1,reqopenbuyingstore,2:4:8:9:89 0x0817,2,reqclosebuyingstore,0 0x0360,6,reqclickbuyingstore,2 0x0811,-1,reqtradebuyingstore,2:4:8:12 0x0819,-1,searchstoreinfo,2:4:5:9:13:14:15 0x0835,2,searchstoreinfonextpage,0 0x0838,12,searchstoreinfolistitemclick,2:6:10 0x0437,5,walktoxy,2 0x0886,6,ticksend,2 0x0871,5,changedir,2:4 0x0938,6,takeitem,2 0x0891,6,dropitem,2:4 0x086C,8,movetokafra,2:4 0x08A6,8,movefromkafra,2:4 0x0438,10,useskilltopos,2:4:6:8 0x091D,18,bookingregreq,2:4:6 0x0366,90,useskilltoposinfo,2:4:6:8:10 0x0889,6,getcharnamerequest,2 0x0884,6,solvecharname,2 0x08E5,41,bookingregreq,2:4 //Added to prevent disconnections 0x08E6,4 0x08E7,10,bookingsearchreq,2 0x08E8,-1 0x08E9,2,bookingdelreq,2 0x08EA,4 0x08EB,39,bookingupdatereq,2 0x08EC,73 0x08ED,43 0x08EE,6 0x08EF,6,bookingignorereq,2 0x08F0,6 0x08F1,6,bookingjoinpartyreq,2 0x08F2,36 0x08F3,-1 0x08F4,6 0x08F5,-1,bookingsummonmember,2:4 0x08F6,22 0x08F7,3 0x08F8,7 0x08F9,6 0x08FA,6 0x08FB,6,bookingcanceljoinparty,2 0x0907,5,moveitem,2:4 0x0908,5 0x08D7,28,battlegroundreg,2:4 //Added to prevent disconnections 0x08CF,10 //Amulet spirits 0x0977,14 //Monster HP Bar 0x0916,26,guildinvite2,2 0x0844,2,cashshopopen,0 0x084a,2,cashshopclose,0 0x08c9,4,cashshopitemlist,0 0x0848,-1,cashshopbuy,2:4:6:10
    1 point
  2. Hi to all! well, time to show the project I have been working on for almost a year in my free times. But first, a bit of fast history: I played ragnarok for 2 - 3 years in some servers like ValhallaRO and others, then i left it due to the resets and that stuff, I had a knowledge of the game that was useless now because I'm not pretending to play anymore, so I started at programming by myself like 5 years ago, (2 of them at university), so I decided to make the website just for see what I could do, and also improve my programming skills and use that knowledge. Done: Yourolist pretends to be a tool, more than a RO list or a database website, it is more oriented to server owners than for players. It doesn't mean that players won't have anything to do in the website, for now I've made few things like: Pre-Renewal / Renewal mob, item, map ,skills database with the drops % editables as you need Advanced Item / mob search World map, with the option of filter by episodes Job equip, Monster mode bitmask generator Item DB structure to SQL (I'll add more soon) LUA <-> LUB converter online (soon) Ragnarok list system Some new advertisements ways like banner, countdowns and others (sry but vps cost money) but relax there will be points free in social websites (faceebook,twitter) and discounts) Graphics with monthly votes, banners etc Beta version of YRO Server Controller 1.0.0 (Optional Usage) ​Open servers Close Servers Server status And then in my TO-DO list i have some others things i think people will like a lot fully oriented to server owners, that will be posted here when they get a good grade of development, in my point of view they will be very useful, but before making more things I want to hear opinions, feedbacks or maybe criticize (but constructively please ) Links: Facebook page: Link Twitter page: Link Website (preview): www.yourolist.com Images: Here goes some website images: Thanks for reading, and sorry for my english.
    1 point
  3. Just a little update from original script of RPS Roulette. OnInit: // Customizable Configuration set .prize,607; // Item ID 607 (Yggdrasil Berry) set .amount,1; // Prize Amount set .winneed,2; // Winning Points Needed Set Prize ID Set Prize Amount Set Winning Points Needed Can't pick the same answer twice Announced when Wins Game finished when lose. rpsroulette1.3.txt
    1 point
  4. waitingroom " Test [ "+( getmapusers("custom_fild01") + getmapusers("custom_fild02") + getmapusers("custom_fild03") + getmapusers("custom_dun01") )+" ]",0; you mean add all value together ?
    1 point
  5. Here prontera,100,100,0 shop Alchemist Shop 121,507:500,1093:10,509:120,510:60,911:160,952:82,1092:3,1061:484,713:6,970:400,704:500,518:500,905:46,7033:114,1059:306,929:374,1032:196,1050:220,1051:450,950:264,1044:264,7140:60000,7141:20000,7143:5000,716:600,715:600,7126:840,1057:138,1017:106,503:550,501:50,505:5000,7144:100000,7133:240000,7127:100000,7128:100000,7129:100000,7130:100000,7131:100000,7132:100000,7434:100000
    1 point
×
×
  • Create New...