• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fix/Patch 0.3.4 ActionID range from 1 to 4,294,967,295

Matkas

New Member
Joined
Dec 13, 2008
Messages
14
Reaction score
0
Hello,
I would like to change the range of ActionID. Now its from 100 to 65535, its INT, and I would like to change it to LongINT. Any idea how to do that?


EDIT:
It is very simple.

On item.h you have to change these lines :
PHP:
void setActionId(uint16_t n) {setIntAttr(ATTR_ITEM_ACTIONID, (uint16_t)std::max((uint16_t)100, n));}
uint16_t getActionId() const {return getIntAttr(ATTR_ITEM_ACTIONID);}
into
PHP:
void setActionId(uint32_t n) {setIntAttr(ATTR_ITEM_ACTIONID, (uint32_t)std::max((uint32_t)1, n));}
uint32_t getActionId() const {return getIntAttr(ATTR_ITEM_ACTIONID);}

ITEM.cpp
This:
PHP:
uint16_t _actionid = 0;
if(!propStream.GET_USHORT(_actionid))
into this:
PHP:
			uint32_t _actionid = 0;
			uint16_t _actionid_a = 0;
			
			if(propStream.GET_ULONG(_actionid))
				setActionId(_actionid);
			else
			{

			if(	propStream.GET_USHORT(_actionid_a))
				setActionId(_actionid_a);
			else
				return false;	
			}

Now you have range from 1(!!) to 4,294,967,295 :)

Regards,
Mateusz
 
Last edited:
I tried, but I got
PHP:
Failed to unserialize attr_type: 22 for item: 2197

Any ideas?

EDIT:
Ok figure it out, check first post
 
Last edited:
it's amazing that there are people who aren't satisfied with 65 000 actions, and they need more

ALSO U MUST CHANGE LIMIT IN MAP EDITOR, SO THIS "PATH" I THINK IS USELESS
 
No, it's not useless. My TFS is changed so much that I need a lot of AID. Player creates everything by himself, EQ, tools etc. He can even build his own house without MapEdit( map saves every restart ).
 
No, it's not useless. My TFS is changed so much that I need a lot of AID. Player creates everything by himself, EQ, tools etc. He can even build his own house without MapEdit( map saves every restart ).

aha, ok :D
 
Back
Top