SphereCommunity
Bulletin Board Question - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Bulletin Board Question (/Thread-Bulletin-Board-Question)

Pages: 1 2


Bulletin Board Question - amonvangrell - 05-16-2014 07:32 AM

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...


RE: Bulletin Board Question - Feeh - 05-16-2014 08:04 AM

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)


RE: Bulletin Board Question - Alaric - 05-16-2014 08:23 AM

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.


RE: Bulletin Board Question - amonvangrell - 05-16-2014 08:29 AM

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?


RE: Bulletin Board Question - Alaric - 05-16-2014 08:31 AM

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


RE: Bulletin Board Question - Feeh - 05-16-2014 08:44 AM

(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


RE: Bulletin Board Question - amonvangrell - 05-16-2014 07:06 PM

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


RE: Bulletin Board Question - Feeh - 05-17-2014 12:50 AM

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

[attachment=231]

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


RE: Bulletin Board Question - amonvangrell - 05-17-2014 07:22 AM

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...


RE: Bulletin Board Question - Feeh - 05-17-2014 07:33 AM

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