"how to" for plugin´s with xaseco

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

"how to" for plugin´s with xaseco

Post by lgrfbs-sweden » 24 Jun 2008 19:11

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
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Yorkshire
smooth traffic navigator
smooth traffic navigator
Posts: 192
Joined: 21 May 2008 08:39
Owned TM-games: TMUF

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

Post by Yorkshire » 25 Jun 2008 04:13

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.
Last edited by Yorkshire on 25 Jun 2008 09:37, edited 1 time in total.

Xymph
Pit Crew
Pit Crew
Posts: 5707
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

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

Post by Xymph » 25 Jun 2008 07:39

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.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

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

Post by lgrfbs-sweden » 25 Jun 2008 17:02

thanks for all info. all
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

TripleT
smooth traffic navigator
smooth traffic navigator
Posts: 193
Joined: 12 Feb 2008 15:14
Owned TM-games: TMNF
Location: Germany

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

Post by TripleT » 27 Jun 2008 10:23

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

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

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

Post by lgrfbs-sweden » 05 Jul 2008 00:32

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 ...
.
}
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Xymph
Pit Crew
Pit Crew
Posts: 5707
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

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

Post by Xymph » 05 Jul 2008 08:26

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.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

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

Post by lgrfbs-sweden » 05 Jul 2008 09:12

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.
Last edited by lgrfbs-sweden on 05 Jul 2008 09:29, edited 1 time in total.
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Xymph
Pit Crew
Pit Crew
Posts: 5707
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

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

Post by Xymph » 05 Jul 2008 09:26

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.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

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

Post by lgrfbs-sweden » 05 Jul 2008 17:39

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?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Xymph
Pit Crew
Pit Crew
Posts: 5707
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

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

Post by Xymph » 05 Jul 2008 18:42

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.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

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

Post by lgrfbs-sweden » 05 Jul 2008 19:45

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?
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Xymph
Pit Crew
Pit Crew
Posts: 5707
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

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

Post by Xymph » 05 Jul 2008 20:23

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
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
lgrfbs-sweden
smooth traffic navigator
smooth traffic navigator
Posts: 200
Joined: 15 Apr 2007 15:48
Owned TM-games: TMN
Location: Sweden
Contact:

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

Post by lgrfbs-sweden » 05 Jul 2008 21:20

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
Admin On:Image
My server:lgrfbs server / XASECO plugins
Image

Post Reply