Jump to content

Extended Vending System [1.9] cleanup & fix


Napster

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

if you want to use please read topic reference

 

ref topichttp://rathena.org/board/topic/60817-extended-vending-system-18/

this version fix & cleanup support rAthena only

 

update : 23/11/2015

 

fix clash & cleanup

 

version 1.9.0

1. support new item array max (range: 1 ~ 65,534)

2. support Autotrade persistency (please update SQL files upgrade_extended_vending_item.sql)

3. fix map server clash when cancle windows select item

4. cleanup some code

 

 

version 1.9.1

1. fix wrong msg number
2. add battle conf show broadcas info when click shop board

3. cleanup support rAthena revision 12425
 

version 1.9.2

1. fix bug autotarde can't save state type (Bugreport by Darkpurple) thank you

2. cleanup support rAthena revision 12540

 

version 1.9.3

1. cleanup support rAthena revision 12836
 

version 1.9.4

1. cleanup support rAthena revision 15149

 

enjoy

upgrade_extended_vending_item.sql

ExtendedVendingSystem_1.9.patch

ExtendedVendingSystem_1.9.1.diff

ExtendedVendingSystem_1.9.1_r17704.diff

ExtendedVendingSystem_1.9.2.diff

ExtendedVendingSystem_1.9.3_r12836.diff

ExtendedVendingSystem_1.9.4_r15149.diff

Edited by Napster
  • Upvote 10
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  333
  • Reputation:   67
  • Joined:  09/05/12
  • Last Seen:  

This is what exactly i'm searching for.
Gonna try this and will give feedback later.

Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Cool +1 for this and need to test this as soon as possible.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

I found main bug....it cannot buy items from cash/zeny vending....

edit: player can buy..but gm cannot buy?!! bugged ??

Edited by Darkpurple
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

check you zeny over > 0  when  buy item

problem if zeny 0 can't buying item this limit by client side

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

check you zeny over > 0  when  buy item

problem if zeny 0 can't buying item this limit by client side

Yes, I know.

I have 1 million zeny and cash in gm account but I think is gm account probelm...because my player account can buy....

In Lilith's version, GM account also can buy the items from vending.

Edited by Darkpurple
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

i've tested it and its working fine. even if you are a level 99 GM account.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

i've tested it and its working fine. even if you are a level 99 GM account.

I am using 99 gm account..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

maybe this problem client side

@darkpurple use client date ?

 

@Ginji use client date ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

I use 2012 04 10 RE client. 

 

 

i've tested it and its working fine. even if you are a level 99 GM account.


I am using 99 gm account..

 

 

its working fine on me. bro 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

i have test main kro (2012-04-10aragexe & 2013-12-23cRagexe) with cashshop same problem

 

but Sak RE not test

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

i have test main kro (2012-04-10aragexe & [/size]2013-12-23cRagexe) with cashshop same problem[/size]

 

but Sak RE not test[/size]

Do you mean have problem same as mine?

GM cannot buy and player can buy times from vending?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

main kro (2012-04-10aragexe & 2013-12-23cRagexe) with cashshop

 

(Cash mode pay)

GM level 99  zeny = 0  NO

GM level 99  zeny > 0  YES

 

GM level 0  zeny = 0  NO

GM level 0  zeny > 0  YES

Edited by Napster
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  224
  • Reputation:   4
  • Joined:  02/09/12
  • Last Seen:  

Can this be use in 17704 N if i apply patch there's a red list that cant be enter and manually put cant find where do i need to insert

Edited by simplexjay2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

@@Napster Well, thanks for supporting this  ^_^

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  187
  • Reputation:   7
  • Joined:  09/04/12
  • Last Seen:  

@@Napster Well, thanks for supporting this  ^_^

 

Well come back Lilith, which is my super star /kis2

Edited by Darkpurple
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

Please update the map_msg.conf because 700 ~ 708 is already used for @vip

// @vip
700: Usage: @vip <time> <character name>
701: Invalid time for VIP command.
702: Time parameter format is +/-<value> to alter. y/a = Year, m = Month, d/j = Day, h = Hour, n/mn = Minute, s = Second.
703: GM has removed your VIP time.
704: Player is no longer VIP.
705: Your VIP status is valid for %d years, %d months, %d days, %d hours and %d minutes.
706: Player '%s' is now VIP for %d years, %d months, %d days, %d hours and %d minutes.
707: You are VIP until: %s
708: The player is now VIP until: %s
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

thank you for report update 1.9.1 : )

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

failed when compile with r17704.


make[1]: Entering directory `/home/ragnarok/trunk/src/map'
        MKDIR   obj_sql
        CC      map.c
        CC      chrif.c
        CC      clif.c
clif.c: In function ‘clif_parse_OpenVending’:
clif.c:12342: error: ‘struct map_session_data’ has no member named ‘vend_loot’
clif.c:12351: error: ‘struct map_session_data’ has no member named ‘vend_loot’
clif.c:12381: error: ‘struct map_session_data’ has no member named ‘vend_loot’
make[1]: *** [obj_sql/clif.o] Error 1

  /sob


@Napster : could you please make this patch for r17704... Seem like rAthena will never be improve if no one do this. everybody will running to another emulator and rAthena will dying. same like eA.... /shy

 

if i know C++ and etc, surely i will do all that for free for rA... /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

I tryed to test this on windows and its working great but when it comes to linux there are warning msg while compiling

       CC      script.c
        CC      searchstore.c
        CC      skill.c
        CC      status.c
        CC      storage.c
        CC      trade.c
        CC      unit.c
        CC      vending.c
vending.c: In function ‘vending_purchasereq’:
vending.c:318: warning: ‘item_name’ may be used uninitialized in this function
        LD      map-server
make[1]: Leaving directory `/root/rathena/src/map'
building conf/import, conf/msg_conf/import and db/import folder...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  196
  • Reputation:   72
  • Joined:  12/12/11
  • Last Seen:  

@Elsa Mist

free time i will create for old svn

@Lelouch vi Britannia

in line remove + all
 

 

  for( i = 0; i < count; i++ ) {

  short amount = *(uint16*)(data + 4*i + 0);
  short idx    = *(uint16*)(data + 4*i + 2);
+ const char *item_name;
+ double rev = 0.;
  idx -= 2;
 
+ /**
+ * Extended Vending system [Lilith]
+ **/
+ if(battle_config.ex_vending_info){ 
+ item_name = itemdb_jname(vsd->status.cart[idx].nameid);
+ rev = ((double)vsd->vending[vend_list].value * (double)amount);
+ }

and edit line 

 

 

- sprintf(temp, msg_txt(sd,265), sd->status.name);

+ if(battle_config.ex_vending_info) // Extended Vending system [Lilith]
+ sprintf(temp, msg_txt(sd,1597), sd->status.name, item_name, amount, (int)(rev -= rev * (battle_config.vending_tax/10000.)), vsd->vend_loot?itemdb_jname(vsd->vend_loot):"Zeny");
+ else
+ sprintf(temp, msg_txt(sd,265), sd->status.name);

to 
 

 

if(battle_config.ex_vending_info) { // Extended Vending system [Lilith]

const char *item_name = itemdb_jname(vsd->status.cart[idx].nameid);
double rev = ((double)vsd->vending[vend_list].value * (double)amount);
 
sprintf(temp, msg_txt(sd,1597), sd->status.name, item_name, amount, (int)(rev -= rev * (battle_config.vending_tax/10000.)), vsd->vend_loot?itemdb_jname(vsd->vend_loot):"Zeny");
} else
sprintf(temp, msg_txt(sd,265), sd->status.name);

compile again


@Elsa Mist

for older SVN Compatibility
 

17704 2014-07-03 02:40:03 https://rathena.svn.sourceforge.net/svnroot/rathena/

 

ExtendedVendingSystem_1.9.1_r17704.diff

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  387
  • Reputation:   60
  • Joined:  10/08/13
  • Last Seen:  

@Napster  /awsm

 

i will try it as soon as posible... 


@Napster 

 

compile is good no error. but when server runing. there is and db error ad it say :


[SQL]: DB error - Unknown column 'extended_vending_item' in 'field list'
[Debug]: at vending.c:654 - SELECT `id`, `account_id`, `char_id`, `sex`, `title`                               , `extended_vending_item` FROM `vendings` WHERE `autotrade` = 1 AND (SELECT COUN                               T(`vending_id`) FROM `vending_items` WHERE `vending_id` = `id`) > 0;


i think i have figure it out but i dont know how to do next...

 

 

im using latest sql table for r17704

 

ur given sql is 

ALTER TABLE `vendings` ADD COLUMN `extended_vending_item` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `sit`;

in my sql version dosent have 'sit';

 

this is error on my sql :

#1054 - Unknown column 'sit' in 'vendings'

im adding it manually.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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

×
×
  • Create New...