Jump to content
Dan

Maximum gold in inventory

Recommended Posts

Does anyone know how to edit or change the value of the maximum gold in inventory?

Capped at 2,000,000,000 (2 billion)

Is it possible to increase it to maybe 5,000,000,000? (5 billion)


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
14 minutes ago, Vang said:

I have asked, and he has said he has no idea.

Create new Money Notes and Change gold into Dollar Note to avoid overflow(Addon)

 

function Addons_gold(ignore, role, freq, time)
	local overflow = GetChaAttr( role , ATTR_GD )
	if overflow > 1800000000 then
		TakeMoney(role, 0, 1800000000)
		GiveItem(role, 0, 7835, 18, 4)
		SystemNotice(role, "System changed your 1.8B Gold into 1.8B Dollar Notes!")
	end	

end
Hook:AddPostHook("cha_timer", Addons_gold)

Cha_timer:
Addons_gold(ignore, role, freq, time)

ID: 7835 --> 100m Notes

Edited by DevMorgan
  • Like 2

Share this post


Link to post
Share on other sites
5 hours ago, DevMorgan said:

Create new Money Notes and Change gold into Dollar Note to avoid overflow(Addon)

 


function Addons_gold(ignore, role, freq, time)
	local overflow = GetChaAttr( role , ATTR_GD )
	if overflow > 1800000000 then
		TakeMoney(role, 0, 1800000000)
		GiveItem(role, 0, 7835, 18, 4)
		SystemNotice(role, "System changed your 1.8B Gold into 1.8B Dollar Notes!")
	end	

end
Hook:AddPostHook("cha_timer", Addons_gold)

Cha_timer:
Addons_gold(ignore, role, freq, time)

ID: 7835 --> 100m Notes

This isn't what he is looking for, he is clearly asking about a way to increase the maximum money in inventory.It has something to do with GameServer and probably game.exe.

  • Like 1

Share this post


Link to post
Share on other sites

No, it's not possible. You should use the workaround someone else suggested. The best that is possible is this:

 

Init_Attr.lua:

SetChaAttrMax( ATTR_GD        ,    2000000000    )    -- ½ðÇ®

 

change that to:

SetChaAttrMax( ATTR_GD, (2^31)-1)

 

The true maximum is 2147483647.

Share this post


Link to post
Share on other sites
37 minutes ago, deguix said:

No, it's not possible. You should use the workaround someone else suggested. The best that is possible is this:

 

Init_Attr.lua:

 


SetChaAttrMax( ATTR_GD        ,    2000000000    )    -- ½ðÇ®

 

 

change that to:

 


SetChaAttrMax( ATTR_GD, (2^31)-1)

 

 

The true maximum is 2147483647.

Anyway to prevent money loss after surpassing this amount?


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
28 minutes ago, Julio said:

@DevMorgan put the prevention script up there

Got an example? My gold stops at 2b, but when I get more, it just stays 2b. I don't see a prevention script for it though.


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
7 hours ago, Vang said:

Anyway to prevent money loss after surpassing this amount?

Does not exist! would have to re-inscribe a code in gameserver in c ++ for this! this script that he posted and most used by most Epo servers, Roso etc ...

the script he posted works like this when you accumulate 1.8b your gold converts to 18 100m notes

Sorry if you do not understand, I do not know how to speak English.

  • Like 1

Share this post


Link to post
Share on other sites
On 4/28/2018 at 10:41 PM, DevMorgan said:

Create new Money Notes and Change gold into Dollar Note to avoid overflow(Addon)

 


function Addons_gold(ignore, role, freq, time)
	local overflow = GetChaAttr( role , ATTR_GD )
	if overflow > 1800000000 then
		TakeMoney(role, 0, 1800000000)
		GiveItem(role, 0, 7835, 18, 4)
		SystemNotice(role, "System changed your 1.8B Gold into 1.8B Dollar Notes!")
	end	

end
Hook:AddPostHook("cha_timer", Addons_gold)

Cha_timer:
Addons_gold(ignore, role, freq, time)

ID: 7835 --> 100m Notes

This option, is it suppose to disable my notes? When I use I gain no money.

 

EDIT: Never mind, fixed.

Edited by Vang
  • Like 1

Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
On 4/29/2018 at 5:41 AM, DevMorgan said:

Create new Money Notes and Change gold into Dollar Note to avoid overflow(Addon)

 


function Addons_gold(ignore, role, freq, time)
	local overflow = GetChaAttr( role , ATTR_GD )
	if overflow > 1800000000 then
		TakeMoney(role, 0, 1800000000)
		GiveItem(role, 0, 7835, 18, 4)
		SystemNotice(role, "System changed your 1.8B Gold into 1.8B Dollar Notes!")
	end	

end
Hook:AddPostHook("cha_timer", Addons_gold)

Cha_timer:
Addons_gold(ignore, role, freq, time)

ID: 7835 --> 100m Notes

This function not working.. 

Share this post


Link to post
Share on other sites

Or just simply adding an item

(Mockup: Hundred Dollar Note - Gives 100M)

function ItemUse_HundredDollar (role,item)
	local Gold = GetChaAttr (role,ATTR_GD)
	-- Check if Gold is over the limit 
		if Gold >= 1900000000 then -- If gold is over 1,900,000,000 (1.9B)
			SystemNotice (role,"Your gold is too much!")
			return -- Returns the code so it doesnt go any further
		end
	-- Add Gold to Player
	AddMoney (role,0,100000000) -- Add 100,000,000 (100M) gold to the player
end

Add to ItemInfo.txt 
 

XXXX	Hundred Million Dollar Note	ICON	10130005	0	0	0	0	0	00	41	0	0	0	0	0	1	1	1	1	99	0	100000000	-1	0	-1	0	0	-1	-1	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0,0	0	0	0,0	0	0	0	0	0	0	0	0	0	ItemUse_HundredDollar	0	0	0	0	0	0	Use to obtain 100M	


Then you can add it to a NPC Stall (Item is priced at 100M for players to buy) or to some NPC Exchanger that talk dialogue to exchange 100M to this item =)
 

Edited by Inuarashi
  • Like 2

Share this post


Link to post
Share on other sites
On 4/29/2018 at 5:41 AM, DevMorgan said:

Create new Money Notes and Change gold into Dollar Note to avoid overflow(Addon)

 


function Addons_gold(ignore, role, freq, time)
	local overflow = GetChaAttr( role , ATTR_GD )
	if overflow > 1800000000 then
		TakeMoney(role, 0, 1800000000)
		GiveItem(role, 0, 7835, 18, 4)
		SystemNotice(role, "System changed your 1.8B Gold into 1.8B Dollar Notes!")
	end	

end
Hook:AddPostHook("cha_timer", Addons_gold)

Cha_timer:
Addons_gold(ignore, role, freq, time)

ID: 7835 --> 100m Notes

BUMP, how to automatically convert them if character is on stall, this code not working.. any help?

Share this post


Link to post
Share on other sites
1 hour ago, Rinor said:

BUMP, how to automatically convert them if character is on stall, this code not working.. any help?

I don't think it would work, noting from Auto Rations not being able to feed a stallers pet no?


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
1 hour ago, Rinor said:

BUMP, how to automatically convert them if character is on stall, this code not working.. any help?

characters inventories are locked during stall, so it would not work.

Share this post


Link to post
Share on other sites
13 minutes ago, JoJo said:

I don't think it would work, noting from Auto Rations not being able to feed a stallers pet no?

 

4 minutes ago, Inuarashi said:

characters inventories are locked during stall, so it would not work.

it aint working without stall either

Share this post


Link to post
Share on other sites
2 minutes ago, Rinor said:

 

it aint working without stall either

I tested this along time ago, and it works fine :) I think you are doing it wrong.


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
9 minutes ago, JoJo said:

I tested this along time ago, and it works fine :) I think you are doing it wrong.

I used the code at the end of function.lua and used the Addons_gold(ignore, role, freq, time) at cha_timer
as he said

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.


×
×
  • Create New...