Jump to content


Photo

OreNode Cash Amount ? scripts

orenode cash amount ? script

  • Please log in to reply
1 reply to this topic

#1 apofisz22

apofisz22
  • Members
  • 18 posts
  • Location:Hungarian

Posted 07 February 2021 - 07:47 AM

Hello
 
OreNode
how do i put more money in it?
 
here image

Edited by apofisz22, 07 February 2021 - 07:49 AM.


#2 Mjstral

Mjstral
  • New Members
  • 2 posts

Posted 25 July 2021 - 07:47 PM

Hi you can do that with a lua script. Add this code to the bottom of "YourModName\data\scripts\scripts.lua" respectively the one in misc.big.
 

OreNodeNewValue = 10000000

function ChangeAllOreNodeMaxGatherValue(OreNodeMaxGatherValue)
	if not OreNodeMaxGatherValue then
		OreNodeMaxGatherValue = 10000000  --Original 30000
	end
	local OreNodeRef = ""
	local OreNodeRefList = {}
	local OreNodeType = { "OreNode", "OreNode2a", "OreNode2b", "OreNode4a", "OreNode4b", "OreNode4c", "OreNode4d" }
	for i=1,getn(OreNodeType),1 do
		repeat
			OreNodeRef = "object_" .. floor(GetRandomNumber()*99999999)
			ExecuteAction("TEAM_SET_PLAYERS_NEAREST_UNIT_OF_TYPE_TO_REFERENCE", OreNodeType[i], "/team", OreNodeRef)
			ExecuteAction("NAMED_FLASH", OreNodeRef, 7)
			if EvaluateCondition("NAMED_NOT_DESTROYED", OreNodeRef) then
				tinsert(OreNodeRefList, OreNodeRef)
				ExecuteAction("ORE_NODE_SET_MAX_GATHER_VALUE", OreNodeRef, OreNodeMaxGatherValue)
				ExecuteAction("UNIT_SET_TEAM", OreNodeRef, "PlyrCivilian/teamPlyrCivilian")
			else break end
		until(not EvaluateCondition("NAMED_NOT_DESTROYED", OreNodeRef))
	end
	for i=1,getn(OreNodeRefList),1 do
		ExecuteAction("UNIT_SET_TEAM", OreNodeRefList[i], "/team")
	end
end

function CodeInjection()
	setcallhook()
	ChangeAllOreNodeMaxGatherValue(OreNodeNewValue)
end
setcallhook(CodeInjection)

 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users