I am brushing up on these features as well, so I will link you directly to the resource(s) I am using...
http://forums.graalonline.com/forums...17&postcount=4
http://forums.graalonline.com/forums...84&postcount=6
Both, courtesy of cbk.
I guess to expound based on your usage:
I'd recommend creating a CLASS for your staff block.
Using putnpc2 (serverside only), it will determine the position to place that block when the server is triggered.
You will then join that NPC placed to the class of your staff block (ex: npc.join("class name"); )
Also, you should get into the habit of using the "echo" feature to ensure parts of your code are working correctly.
Example:
PHP Code:
function onActionServerSide(cmd){
if (cmd == "test"){
echo("test successful");
}
}
//#CLIENTSIDE
function onPlayerChats(){
if (player.chat == "test"){
triggerServer("gui", this.name, "test");
}
}
That is an example of a working trigger to the server, that will echo "test successful" in your RC if the player with the weapon says "test", and hopefully help you understand the basic format for it better.
Hopefully someone else can chime in as far as setting parameters to transfer to the server, as I am still messing around with that. :P