Register for your free account! | Forgot your password?

You last visited: Today at 12:54

  • Please register to post and access all features, it's quick, easy and FREE!

 

set DwCost true Character.inc

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2012
Posts: 947
Received Thanks: 152
set DwCost true Character.inc

Hi elitepvpers,

First of all happy new year and all the best luck in 2015...

second.

Is it possible to set the dwCost of an item true character.inc with the AddShopItem. Example

AddShopItem( 0, ITEM_ID, ITEM_PRICE ).

What i did first was adding
pVendorItem->m_dwCost = dwCost;

So that was setup i only dont know how to set it up from there.

Could someone point me in the right direction?

With kind regards



raventh1984 is offline  
Old   #2

 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,115
Received Thanks: 14,307
Why don't you change the price via spec_item/propitem?


Sedrika is offline  
Old   #3
 
elite*gold: 0
Join Date: Oct 2012
Posts: 947
Received Thanks: 152
Plain and simple i like simplicity. But at this point its an pain in the ...!
I just want to add some items to character.inc true AddShopItem without opening spec_item to change the price.
raventh1984 is offline  
Thanks
1 User
Old   #4

 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,115
Received Thanks: 14,307
I'll add later how you have to edit the source


Sedrika is offline  
Old   #5
 
elite*gold: 0
Join Date: Jan 2014
Posts: 690
Received Thanks: 338
Quote:
Originally Posted by Sedrika View Post
I'll add later how you have to edit the source
ja sago du musst daran denken dann auch die sachen im client zu laden. Weil da ja die preise angezeigt werden
Drabur is offline  
Old   #6
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 460
If you define the price in more than one file it may lead to incosistency and possibly create issues like being able to sell an item for more than the price it was bought for.
Mognakor is offline  
Thanks
1 User
Old   #7
 
elite*gold: 0
Join Date: Jun 2009
Posts: 322
Received Thanks: 469
Inconsistency? It honestly depends how it is actually coded. If wanted, a player could literally make the sell price of each item based on a lua that can be reloaded into the worldserver at any given point and time, and updated on the client end, or else price would be equal to one. There are a multitude of ways to change the source to better personal preference, and when doing so, they person would create their own type of consistency through observation.

You could add a price to the shop vector, and grab it mainly from the worldserver, and update it client side through that, so players could not just edit character.txt. However, if you do most of the calculations on the world side, re-grabbing the price, it could just be as well effective. You could make a new shop thingy like what __ADDSHOPITEM was to test.
Avalion is offline  
Old   #8
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 460
I said may

Just an example: I have 2 shops selling the same item for 2 different prices, now i allways have to edit both shops if i want to change the price of the item.

The selling price however is not based on the shop price and so it may be that an item costs 1p in the shop but can be sold for 1m voila you have an easy and fast way to crash the entire economy of a server.
Mognakor is offline  
Old   #9
 
elite*gold: 0
Join Date: Oct 2012
Posts: 947
Received Thanks: 152
Thank you all for the explanations i have thought about such things and i decided to leave it as it is. Just like Mognakor is saying in the end you just need to do more things then how it is now.
raventh1984 is offline  
Old   #10

 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,115
Received Thanks: 14,307
If you want to change the cost of an item for each shop then you have to tell the server always the new item price and the server have to tell this to the client.
But if you want to change it only once then this should help you since the client and server's loading the same file.

Code:
#ifdef __ADDSHOPITEM
			else if (script.Token == "AddShopItem")
			{
				script.GetToken(); // (
				int nSlot = script.GetNumber();
				script.GetToken(); // ,
				DWORD dwId = script.GetNumber();
				script.GetToken(); // , or )
				if (script.Token == ",")
				{
					DWORD dwCost = script.GetNumber();
					script.GetToken(); // )
					ItemProp* pItem = prj.GetItemProp(dwId);
					if (pItem)
						pItem->dwCost = dwCost;
				}

				LPVENDOR_ITEM pVendorItem = new VENDOR_ITEM;
				pVendorItem->m_dwItemId = dwId;
				lpCharacter->m_venderItemAry3[nSlot].Add(pVendorItem);
			}
#endif // __ADDSHOPITEM


Sedrika is offline  
Thanks
1 User
Reply



« Previous Thread | Next Thread »

Similar Threads
Cowarz, The true pvp legend comes true .
http://imageshack.com/a/img545/294/jzzc.png Welcome everyone to our private server CoWarz is a pvping server that is running on patch 5095. ...
7 Replies - CO2 PServer Archive
************** true buddy true BOT for aion
My friend has Aionbuddy Aion Bot • Index page its the korean bot EVERYONE is talking about but No ONE has but he does its 15 usd a month its...
14 Replies - Aion Hacks, Bots, Cheats & Exploits



All times are GMT +2. The time now is 12:54.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.