• 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!

Solved sending item with attributes to offline player's inbox

zbizu

Legendary OT User
Joined
Nov 22, 2010
Messages
3,323
Solutions
26
Reaction score
2,694
Location
Poland
How do I send item with actionid/text/description to player's inbox without clearing these attributes?
Sending stuff to online player's inbox via metatables doesn't work yet.

I tried to do it via sql query, but I don't know how to encode that for attributes column:
2yw96ro.jpg
 
What if player is offline?
I have player name and guid only so I can't use Player metatable
 
Good idea.
Could you help me with installation query(alter table, data type with defaults + relations)? I want to create table like this:
player_id(relation with players table) | itemid(number 0-30k) | amount(0-100) | price(long number) | actionid(long number) | description(text) | text(text) | writer_guid(relation with players table) | date(long number, eg: 1,394,013,642)
 
Ok. I'll write it myself.
Solved, thank you.

Query I used(in case someone needed it):
Code:
CREATE TABLE IF NOT EXISTS `onlogin_sendtoinbox` (
  `player_id` int(11) NOT NULL DEFAULT '0',
  `itemtype` smallint(6) NOT NULL DEFAULT '0',
  `count` smallint(5) NOT NULL DEFAULT '0',
  `price` bigint(20) unsigned NOT NULL DEFAULT '0',
  `actionid` bigint(20) unsigned NOT NULL DEFAULT '0',
  `description` varchar(255) NOT NULL DEFAULT '',
  `text` varchar(1023) NOT NULL DEFAULT '',
  `writer_guid` int(11) NOT NULL DEFAULT 0,
  `written_at` bigint(20) NOT NULL,
  FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB
 
Last edited:
Back
Top