The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bulletin Board Question
Author Message
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #1
Bulletin Board Question
Hi guys, I was here trying to create a bulletin board that would hold some quests. And I just realized that I have no idea how to add msgs to the bulletin board.

I saw on the wiki that the type t_bboard can hold items of the type t_message.
Code:
This type is a bulleting board container that holds t_message items. It leverages the following properties:
TDATA2 = The gumpID of the container
TDATA3 = The minimum gump size
TDATA4 = The maximum gump size
But how? Can any of those masters help me here with a simple hi world example?
Thanks!

Okay now I manage to create the board with an empty message inside.
Code:
[ITEMDEF i_quest_board]
DEFNAME=i_quest_bb
ID=01e5e
NAME=Quest Board
TYPE=t_bboard
TDATA2=0866
FLIP=1
VALUE=80
WEIGHT=25.3

CATEGORY=Britania Shard
SUBSECTION=Quest Bulletin Board
DESCRIPTION=Quest Bulletin Board

ON=@Create
ref1=<uid>
SERV.NEWITEM={ i_quest_1 }
    NEW.CONT=<ref1>

[Itemdef i_quest_1]
id=i_vase_rose
name=Quest Avatar
type=t_message

how to make the gump of the message a custom one?
I have tried to use tdata2=my gump no success...
(This post was last modified: 05-16-2014 07:52 AM by amonvangrell.)
05-16-2014 07:32 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #2
RE: Bulletin Board Question
Looking at the code, t_message contains these properties:
AUTHOR (String, R/W)
BODY (String, R/W)
PAGES (number, R)
TITLE (String, R/W)

BBoards are really annoying to work with...well, at least I think it is Tongue
Had some problems while working with them (2 years until I finally solved my problem Tongue)

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
(This post was last modified: 05-16-2014 08:09 AM by Feeh.)
05-16-2014 08:04 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #3
RE: Bulletin Board Question
Code:
[ITEMDEF i_quest_board]
DEFNAME=i_quest_bb
ID=01e5e
NAME=Quest Board
TYPE=t_bboard
TDATA2=0866
FLIP=1
VALUE=80
WEIGHT=25.3

CATEGORY=Britania Shard
SUBSECTION=Quest Bulletin Board
DESCRIPTION=Quest Bulletin Board

ON=@Create
   newitem=i_quest_1, 1, <uid>

[Itemdef i_quest_1]
name=Quest Avatar
type=t_message

on=@create
   author= //would be some id, doesn't work with string for me:-/
   body=Im the best and this is the text.

Each page has 25 chars.

I assumed it acts like a book. It should be described better on wiki, had a problem with that one too.
(This post was last modified: 05-16-2014 08:31 AM by Alaric.)
05-16-2014 08:23 AM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #4
RE: Bulletin Board Question
Thanks guys!
But is there a way to customize this gump, to use it as a quest giver? adding a functionality like an accept button on it?
05-16-2014 08:29 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #5
RE: Bulletin Board Question
Isnt better a custom dialog then? - button for accept, decline, description and so one. You can create the board(only graphics) and get it trigger on=@dclick show dialog - to feel that you have the board Big Grin
(This post was last modified: 05-16-2014 08:33 AM by Alaric.)
05-16-2014 08:31 AM
Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #6
RE: Bulletin Board Question
(05-16-2014 08:29 AM)amonvangrell Wrote:  Thanks guys!
But is there a way to customize this gump, to use it as a quest giver? adding a functionality like an accept button on it?

I'd say the same as Alaric. Gumps are far better and customizable. BBoards are not customizable in any way, it is fully client-sided and the best you can do is to display your own message.

I still use BBoards on my private server but just for publishing in-game messages, so they appear to be from game-world and not a staff message to the player...a bit of reality inside the game... Smile

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
(This post was last modified: 05-16-2014 08:46 AM by Feeh.)
05-16-2014 08:44 AM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #7
RE: Bulletin Board Question
I just want to know how this whole bulletin thing works... can you guys that have a flash light over this to help out a little those in the darkness like me?

how this page thing on bulletin works? what is tdata123.. interact with it?
it doesn't matter I cannot edit the contend adding a button or 2, I just want to know how to properly use this feature.
Thank you all so much!

P.S Mordaunt don't be mad and play nice here okay? Tongue
05-16-2014 07:06 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #8
RE: Bulletin Board Question
Client side:
BBoards are just items that when Dclicked, the server send some packets to display the board.
once the board is displayed, the server send another packet to fill the contents.
The base packet is the 0x71 with its subcommands.

Sphere (script) side:
BBoards are items with t_bboard
each message is an item with its respective properties set (Author, Body, Title) some of them does not work...client thing
these messages are inside the t_bboard, just like a container, t_bboard can hold t_message items
I don't know how pages/tdataX work, sorry Sad

Alaric script resume it all
When the board is created, a message item is created inside the board with the message set

each message can have messages as response, just like a forum

   

These are the basics I can say Smile
Unless you want to know how the 0x71 packet work, thats all

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
05-17-2014 12:50 AM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #9
RE: Bulletin Board Question
Thank you Feeh, It was really impressive your help, I figure that this thing was going to be weird. Lol I didn't knew that there was so much that was client side.

There is such funny behavior in this thing.
I can manage to set the author, but then I cannot set any message.
if there is an author with body, the bulletin shows a message saying that the "message cannot be seen"
other than that, all good.

Even like this, I feel this is an incredible item. Gives an in-game dynamic to the quest soo real.
If I could block players to post a replay/new post on it... I could really use it to my quest system...
05-17-2014 07:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Feeh
Sphere Developer
*****

Posts: 156
Likes Given: 6
Likes Received: 40 in 29 posts
Joined: Sep 2012
Reputation: 4



Post: #10
RE: Bulletin Board Question
I don't remember if you can avoid players from posting and reply to posts with Sphere "default" scripting (triggers, etc..), but it is possible to block by blocking the packets sent by the client

Feeh/Epila - Nightly releases / SphereWiki / Github Issues / Sphere's GitHub
05-17-2014 07:33 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)