Daimonin
Members login
Sign Up!      problems?
N F
* Daimonin Forum
Home Help Search Calendar

Welcome Guest, you have to register to post here.
Search

News

Stats
73710 Posts in 6687 Topics by 8103 Members
Latest Member: shambizzle
Daimonin Forum  |  Development  |  Scripts  |  Topic: hiding messages « previous next »
Pages: [1] Go Down Print
Topic: hiding messages  (Read 1575 times)
bajki
Giant slime


Karma: +0/-0
Posts: 23


View Profile
« on: August 01, 2008, 09:50:42 pm »

hi, a want to make my own commands system for for example using bank accounts, changing signs Text Messages, opening/closing doors, mail system etc etc. I can make it but there is one problem, if user will write for example ".mail Bajki hi, bajki. Whats up ?" in chat window, everybody can see it. Is there option to hide it ? is there an option to create my own commands (with syntax /command) in script files ? Smiley
Logged
smacky
Administrator
*
*
*
*
*


Karma: +114/-92
Posts: 5221



View Profile
« Reply #1 on: August 01, 2008, 11:49:07 pm »

To hide it, have give your system an NPC interface. So the player types '/talk mail bakji hi bakji'. This way you have a nice UI and you can quite easily use existing utility scripts (interface_builder.lua for interface control, and topic_list.lua to handle the command/message).

Re custom commands: I think there might be a core method intended for this purpose (object:SendCustomCommand()) but its undocumented and all the bits that do anything are old and #if 0d out of the server. IDK if this is because noone thought it worth the effort to reimplement or if it was specifically removed.
Logged

tehill
Lesser Moroch Avatar
*
*


Karma: +11/-2
Posts: 985



View Profile
« Reply #2 on: August 02, 2008, 12:49:30 am »

SendCustomCommand was from Crossfire python, used to send commands like "drawinfo 1 text" to the player's client. Presently not used in Daimonin.
Logged
longir
Administrator
*
*
*
*
*


Karma: +24/-4
Posts: 2966



View Profile
« Reply #3 on: August 02, 2008, 02:52:15 am »

Adding commands to the server core can be tricky and have unintended consequences.  Using existing commands (including scripting commands) with custom script functions where nothing comparable exists is the preferred method.  I recently made a server modification (in my stream) adding another gmaster rank.  It took several files including a header or 2.
Logged

DM
Dev Team Member
Site Admin

Mostly retired from playing
Pages: [1] Go Up Print 
Daimonin Forum  |  Development  |  Scripts  |  Topic: hiding messages « previous next »
Jump to:  

Page created in 0.068 seconds with 20 queries.
Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Copyright 2008 Daimonin MMORPG  •  Terms of Service  •  XHTML  •  Daimonin sourceforge open source project