Jump to content
quesoph

Extended Vending System UPDATED rev14395! by Lilith

Recommended Posts

Original topic and code here: link

Idea: link

 

 

When you use the skill vending there would be a menu that will pop up and you will choose what type of vending system do you like.

• Zeny - You will purchase items using zeny..

• Cashpoints - purchase items using cashpoints

• Item(your desired item) - purchase item using your desired items..(Example: TCG-7227)

You can enable or disable the cash / item in file db/item_vending.txt

 

attachicon.gif5.PNG

 

Vending title can be looks like: "[ITEM_ID] name"

 

attachicon.gif2.PNG

 

Version 1.8 preview:

attachicon.gif3.PNG

db/item_vending.txt

// Specific items for Vending System

// Format: ItemID

// Max items is equal MAX_INVENTORY ( 100 by default )

 

// TCG Card

7227

// Mithril Coin

674

// Silver Coin

675

// Bronze Coin

673

Modify your client data files:

 

idnum2itemdisplaynametable.txt

30000#Zeny#

30001#Cash#

idnum2itemresnametable.txt

30000#µ¿È­#

30001#¹Ì½º¸±È­#

Ragexe 2013 ( haven't tested it with Ragexe 2012 )

System/Iteminfo.lub

or

System/Iteminfo.lua

 

[30000] = {        unidentifiedDisplayName = "Zeny",        unidentifiedResourceName = "µ¿È­",        unidentifiedDescriptionName = {        "Unknown item requiring Appraisal. Can be identified by using a Magnifier.",        },        identifiedDisplayName = "Zeny",        identifiedResourceName = "µ¿È­",        identifiedDescriptionName = {        },        slotCount = 1,        ClassNum = 1    },    [30001] = {        unidentifiedDisplayName = "Cash",        unidentifiedResourceName = "¹Ì½º¸±È­",        unidentifiedDescriptionName = {        "Unknown item requiring Appraisal. Can be identified by using a Magnifier.",        },        identifiedDisplayName = "Cash",        identifiedResourceName = "¹Ì½º¸±È­",        identifiedDescriptionName = {        },        slotCount = 1,        ClassNum = 1    },

 

Update:

item_db2.txt should be:

 

{    Id: 30000    AegisName: "Zeny"    Name: "Zeny"    Type: 3    Sell: 10    Weight: 10},{    Id: 30001    AegisName: "Cash"    Name: "Cash"    Type: 3    Sell: 10    Weight: 10},

 

Creator: Lilith

Modified by: dastgir and quesoph

 

*Warning: It will not work with auto trade persistency.

 

Hercules Rev 14041.

Extended Vending System Hercules Rev 14041.patch

 

Hercules Rev 14395.

Extended Vending System Hercules Rev 14395.patch

Edited by Dastgir

Share this post


Link to post
Share on other sites

Thank you for this! 

 

This is really important to me since I'm using different items to buy and sell on my server! 

 

** Please always update this patch so anyone can use this w/o problem! /no1

Share this post


Link to post
Share on other sites

Check your battle config.

 

// Item ID for Zeny. Set to 0 if you don't want use Zeny.item_zeny: 30000// Item ID for Cash. Set to 0 if you don't want use Cash.item_cash: 30001

Share this post


Link to post
Share on other sites

Tested on revision: 12168

Are you experiencing this?

wLEHs5v.jpg

 

item_vending.txt

// KyemeRO Event Ticket30001// Midgard Coin6242

 

No console error/warning

Edited by kyeme

Share this post


Link to post
Share on other sites

No I am not sir.

 

post-271-0-38718000-1375356652_thumb.jpg

battle.conf

 

/*--------------------------------------------------------------* * Enable or disable extended vending system? (Yes / No)	    * *--------------------------------------------------------------*/extended_vending: yes/*--------------------------------------------------------------* * Show currency's name in vending board? (Yes / No)	         * *--------------------------------------------------------------*/show_item_vending: yes/*--------------------------------------------------------------* * Show more info about buying? (Yes / No)                        * *--------------------------------------------------------------*/ex_vending_info: yes/*--------------------------------------------------------------* * Item ID for Zeny. Set to 0 if you don't want use Zeny.        * *--------------------------------------------------------------*/item_zeny: 24998/*--------------------------------------------------------------* * Item ID for Cash. Set to 0 if you don't want use Cash.        * *--------------------------------------------------------------*/item_cash: 24999

 

item_vending.txt

 

// Specific items for Vending System// Format: ItemID// Max items is equal MAX_INVENTORY ( 100 by default )// TCG Card7227501502

Mine works fine..

Share this post


Link to post
Share on other sites

No I am not sir.

 

attachicon.gifscreenimmortal007.jpg

battle.conf

 

/*--------------------------------------------------------------* * Enable or disable extended vending system? (Yes / No)	    * *--------------------------------------------------------------*/extended_vending: yes/*--------------------------------------------------------------* * Show currency's name in vending board? (Yes / No)	         * *--------------------------------------------------------------*/show_item_vending: yes/*--------------------------------------------------------------* * Show more info about buying? (Yes / No)                        * *--------------------------------------------------------------*/ex_vending_info: yes/*--------------------------------------------------------------* * Item ID for Zeny. Set to 0 if you don't want use Zeny.        * *--------------------------------------------------------------*/item_zeny: 24998/*--------------------------------------------------------------* * Item ID for Cash. Set to 0 if you don't want use Cash.        * *--------------------------------------------------------------*/item_cash: 24999

 

item_vending.txt

 

// Specific items for Vending System// Format: ItemID// Max items is equal MAX_INVENTORY ( 100 by default )// TCG Card7227501502

Mine works fine..

Its working fine now, weird problem  :(  

Thanks again. :)

Share this post


Link to post
Share on other sites

Thanks!I'm waiting for this one :D

 

EDIT

 

I got this when compile

 

vending.c: In function 'vending_purchasereq':vending.c:255: warning: 'item_name' may be used uninitialized in this function
Edited by EriN_KillerSoul

Share this post


Link to post
Share on other sites

how to use this file ?

i have folder server like this " root/server/trunk " and how to command in linux for patch ?

 

 

sorry for my bad english.

 

thx

Share this post


Link to post
Share on other sites

i try on latest svn.

and got this error.

Error	12	error C2065: 'c' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17036	1	map-serverError	25	error C2065: 'c' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17039	1	map-serverError	28	error C2065: 'c' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17040	1	map-serverError	29	error C2065: 'c' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17043	1	map-serverError	35	error C2065: 'c' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17046	1	map-serverError	41	error C2065: 'clif_vend' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	18186	1	map-serverError	8	error C2065: 'd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17029	1	map-serverError	9	error C2065: 'd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17030	1	map-serverError	10	error C2065: 'd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17033	1	map-serverError	11	error C2065: 'd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17034	1	map-serverError	13	error C2065: 'd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17036	1	map-serverError	14	error C2065: 'i' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17036	1	map-serverError	15	error C2065: 'i' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17036	1	map-serverError	16	error C2065: 'i' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17036	1	map-serverError	18	error C2065: 'i' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17037	1	map-serverError	17	error C2065: 'item' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17037	1	map-serverError	21	error C2065: 'item' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17038	1	map-serverError	23	error C2065: 'item' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17038	1	map-serverError	26	error C2065: 'item' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17039	1	map-serverError	4	error C2065: 'sd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17024	1	map-serverError	6	error C2065: 'sd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17025	1	map-serverError	30	error C2065: 'sd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17044	1	map-serverError	32	error C2065: 'sd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17045	1	map-serverError	36	error C2065: 'sd' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17049	1	map-serverError	34	error C2065: 'skill_lv' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17045	1	map-serverError	43	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapskill.c	6352	1	map-serverError	44	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapskill.c	15569	1	map-serverError	45	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapvending.c	65	1	map-serverError	46	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapvending.c	145	1	map-serverError	47	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapvending.c	156	1	map-serverError	48	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapvending.c	161	1	map-serverError	49	error C2065: 'VEND_COLOR' : undeclared identifier	e:1.ragnarokherculeshercules.gittrunksrcmapvending.c	167	1	map-serverError	1	error C2143: syntax error : missing ';' before 'type'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17020	1	map-serverError	2	error C2143: syntax error : missing ';' before 'type'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17022	1	map-serverError	3	error C2143: syntax error : missing ';' before 'type'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17023	1	map-serverError	7	error C2223: left of '->fd' must point to struct/union	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17025	1	map-serverError	31	error C2223: left of '->menuskill_id' must point to struct/union	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17044	1	map-serverError	33	error C2223: left of '->menuskill_val' must point to struct/union	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17045	1	map-serverError	22	error C2223: left of '->nameid' must point to struct/union	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17038	1	map-serverError	24	error C2223: left of '->nameid' must point to struct/union	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17038	1	map-serverError	27	error C2223: left of '->nameid' must point to struct/union	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17039	1	map-server	56	IntelliSense: expected a ';'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17020	58	map-server	50	IntelliSense: expected an identifier	e:1.ragnarokherculeshercules.gittrunksrcmapstorage.h	37	8	map-server	51	IntelliSense: expected an identifier	e:1.ragnarokherculeshercules.gittrunksrcmaphomunculus.h	99	8	map-server	52	IntelliSense: expected an identifier	e:1.ragnarokherculeshercules.gittrunksrcmapmercenary.h	63	9	map-server	53	IntelliSense: expected an identifier	e:1.ragnarokherculeshercules.gittrunksrcmapmercenary.h	73	8	map-server	54	IntelliSense: expected an identifier	e:1.ragnarokherculeshercules.gittrunksrcmapelemental.h	71	9	map-server	55	IntelliSense: expected an identifier	e:1.ragnarokherculeshercules.gittrunksrcmapelemental.h	84	8	map-serverWarning	38	warning C4024: 'function through pointer' : different types for formal and actual parameter 1	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17049	1	map-serverWarning	20	warning C4047: '!=' : 'int' differs in levels of indirection from 'void *'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17037	1	map-serverWarning	19	warning C4047: '=' : 'int' differs in levels of indirection from 'item_data *'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17037	1	map-serverWarning	42	warning C4047: '=' : 'int (__cdecl *)(map_session_data *,int)' differs in levels of indirection from 'int'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	18186	1	map-serverWarning	37	warning C4047: 'function' : 'map_session_data *' differs in levels of indirection from 'int'	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17049	1	map-serverWarning	5	warning C4098: 'clif_msgtable_num' : 'void' function returning a value	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17024	1	map-serverWarning	39	warning C4098: 'clif_msgtable_num' : 'void' function returning a value	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17050	1	map-serverWarning	40	warning C4098: 'clif_msgtable_num' : 'void' function returning a value	e:1.ragnarokherculeshercules.gittrunksrcmapclif.c	17053	1	map-server

Share this post


Link to post
Share on other sites

^ I will test it on the latest Rev soon. Thanks!

 

@edit

 

have you tried to manually patch it?

Edited by quesoph

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.