Page 1 of 1

"how to" for plugin´s with xaseco

Posted: 24 Jun 2008 19:11
by lgrfbs-sweden
hi
do you guys know some good "how to" for write plug-ins for xaseco?




Or use my empty wikipage ....> http://lgrfbs.dyndns.org/Zwiki/pmwiki.p ... inToXASECO

Re: "how to" for plugin´s with xaseco

Posted: 25 Jun 2008 04:13
by Yorkshire
Hi,

I haven't seen one. My donation panel plugin would appear to be the first one written specifically for Xaseco 1.00, so I would download and have a look at that.

HTH,

Nick.

Re: "how to" for plugin´s with xaseco

Posted: 25 Jun 2008 07:39
by Xymph
Yorkshire wrote:I haven't seen one. My donation plugin would appear to be the first one written specifically for Xaseco 1.00, so I would download and have a look at that.
Again, donation panel plugin. Let's not confuse people between official and third-party plugins, 'mkay? :P
lgrfbs-sweden wrote:do you guys know some good "how to" for write plug-ins for xaseco?
There's no 'how-to' because every plugin is different, it depends entirely on what you want to do. Also, XAseco doesn't have a real plugin framework, that's the biggest advantage Aseco/Rasp 2 has for plugin authors. In XAseco the plugin system is still essentially the same as in Aseco v0.61b, so read chapters 6 and 7 of its ReadMe.pdf file (in the DOCS/ directory or online here) for more info.

The best way to learn how to do simple plugins is to study the existing simple plugins, and make a variation on them. That's what Knutselmaster and Yorkshire did too.

Re: "how to" for plugin´s with xaseco

Posted: 25 Jun 2008 17:02
by lgrfbs-sweden
thanks for all info. all

Re: "how to" for plugin´s with xaseco

Posted: 27 Jun 2008 10:23
by TripleT
in the plugins folder of you xaseco are some plugins like plugin.ml_homto.php
i think this is also a explanation how you write plugins....
w1lla told me so and i will have a look at it too

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 00:32
by lgrfbs-sweden
Can I do like this, see code below for get the "nation" info?
waht I want is use the 3 letters form player´s "nation" in here.

Code: Select all

Aseco::registerEvent("onChat", "ChatLabb");
.
.
.

}
*/

function ChatLabb($aseco, $command)
{
.
do something ...
.
$Lang=$player->nation; //Country name
$aseco->console_text ("lgrfbs-sweden_Labb}".$Lang);
.
do something other ...
.
}

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 08:26
by Xymph
lgrfbs-sweden wrote:Can I do like this, see code below for get the "nation" info?
waht I want is use the 3 letters form player´s "nation" in here.
On TMF, the nation field of a player object contains the full country from that player's location Path. To get the 3-letter nation abbreviation, use the mapCountry function on it, see plugin.localdatabase.php.

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 09:12
by lgrfbs-sweden
Sorry, I was tired and forget to wite: "The scrips will be run under TMN gameserver with (X)aseco 0.91" my sysop have not have time to upgrade to xaseco 1.0.

Will check the the script you suggested.
Edit:
Have now wieved the script and it do not use the OnChat event in my version, so how shall I do for get the nation-letters in the event "OnChat", have tested:

Code: Select all

$Lang=$player->nation; //Country name
But this will not work in event "OnChat" for me.

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 09:26
by Xymph
lgrfbs-sweden wrote:Sorry, I was tired and forget to wite: "The scrips will be run under TMN gameserver with (X)aseco 0.91" my sysop have not have time to upgrade to xaseco 1.0.

Will check the the script you suggested.
Oh, then you can ignore my comment, on TMN the nation field contains the 3-letter abbreviation like before.

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 17:39
by lgrfbs-sweden
Xymph you misunderstand me.
I want to use the nation 3-letter abbreviation within the event: OnChat.
and this is on TMN with (x)aseco 0.91 for now, we will move over to TMN & TMNF with xaseco 1.0
Can it be done?

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 18:42
by Xymph
lgrfbs-sweden wrote:Xymph you misunderstand me.
Could be, if you didn't explain it clearly enough. :P
lgrfbs-sweden wrote:I want to use the nation 3-letter abbreviation within the event: OnChat.
Well, if what I said in my earlier post doesn't help, then I have no idea anymore what you mean.
lgrfbs-sweden wrote:and this is on TMN with (x)aseco 0.91 for now, we will move over to TMN & TMNF with xaseco 1.0
Can it be done?
No idea, TMN and TMF handle nations differently, so you cannot just "move something over", you have to handle both cases correctly.

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 19:45
by lgrfbs-sweden
Okey, I will try again
Then a player write somthing in chat the event OnChat is triggert and I need to get the players nation 3-letter abbreviation too get the script to choose right.

better now?

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 20:23
by Xymph
lgrfbs-sweden wrote:Okey, I will try again
Then a player write somthing in chat the event OnChat is triggert and I need to get the players nation 3-letter abbreviation too get the script to choose right.

better now?
The onChat event gives you the login of the player chatting, so get $player = $aseco->server->players->getPlayer($login); and then use the $player->nation field, optionally pulling it through mapCountry() on TMF.

Better now? :D

Re: "how to" for plugin´s with xaseco

Posted: 05 Jul 2008 21:20
by lgrfbs-sweden
thanks for you stand out with my crazy question.
will try it.

Edit:
have try it now.
Yes, it works as I want to.
thx