Scripting Tutorial

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
Pachacuti
Apprentice Poster
Posts: 51
Joined: Fri Jun 12, 2009 8:57 am

Scripting Tutorial

Post by Pachacuti »

hello everybody...

I'm new at POL and I dont know nothing about scripting at eScript. I just wanted someone to tell me any good guide or tutorial for eScript, the basics would be very nice. I tryed searching some tutorial in this forum but found nothing.

Can someone help me with this?

Thanks Y'all

EDIT: I've found Racalac's guide. Any other?
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm

Re: Scripting Tutorial

Post by *Edwards »

JaceAce
Expert Poster
Posts: 74
Joined: Fri Feb 29, 2008 10:56 pm

Re: Scripting Tutorial

Post by JaceAce »

Also, you can pick up almost any programming book. And study it. Scripting, programming, are all about the same except for the "language". Alot of the core concepts are the same across the realm of scripting languages and programming languages. I suggest anyone who wants to learn how to "script" or program to learn "java". Not java script, but java. Its an "oop" language that was free last time I looked. So find a beginner's guide to "java" programming. This will build some of your "basic" concepts. Then when you start to script with pol, it will make more sense.
Pachacuti
Apprentice Poster
Posts: 51
Joined: Fri Jun 12, 2009 8:57 am

Re: Scripting Tutorial

Post by Pachacuti »

ahh.. ok... I have a few knowledge about scripting. I've learnt a language similar to C some years ago. Maybe it'll be useful. I just wanted to know how the POL works. What file do what. Whats the function of everything inside the distro, undestand? I'll follou your advices. Read the Racalac's Guide, study java a little and try to understand other people scripts, like I've read in other topics.

Thanks guys... see ya...
Pachacuti
Apprentice Poster
Posts: 51
Joined: Fri Jun 12, 2009 8:57 am

Re: Scripting Tutorial

Post by Pachacuti »

so... I was exploring a little, and I found this folder... "pkg"... as I see, this apparently is one of the most important folders. In there, I found where the monsters and animals are stored, the "mobiles" folder inside "pkg"... inside it I found "BrainAI", where the "scripts" really are. I tried to find monsters such as "deamon" or "dragon" inside "config/npcdesc" but I could not find them! I've found horses, skeletons, ettins, etc, but no deamon or dragons. >_<

I am too dumb to find them, or they're in a different place?
JaceAce
Expert Poster
Posts: 74
Joined: Fri Feb 29, 2008 10:56 pm

Re: Scripting Tutorial

Post by JaceAce »

a pkg directory = where you put individual "packages" for your game server.
config/npcdesc.cfg = describes npc's

Learn to use Pol's wonderful doc's (pol is documented real well).
For example if you wanted to learn about the file npcdesc.cfg
From this web site click on

Docs

Select Documentation Versions 098

Scroll down to -> Configuration Files

click on it.

On left side search for -> npcdesc.cfg

click on it.

Read the description of the file.

Now you know about npcdesc.cfg.

I would suggest you spend some time in the Pol 098 Documentation Reading everything available....
Might help :)
:grouphug:
Pachacuti
Apprentice Poster
Posts: 51
Joined: Fri Jun 12, 2009 8:57 am

Re: Scripting Tutorial

Post by Pachacuti »

hmm nice tip jace... Im reading them... really helpful! :)

thanks
JaceAce
Expert Poster
Posts: 74
Joined: Fri Feb 29, 2008 10:56 pm

Re: Scripting Tutorial

Post by JaceAce »

Can you ask for anything more lol ?
:cheers:
JaceAce
Expert Poster
Posts: 74
Joined: Fri Feb 29, 2008 10:56 pm

Re: Scripting Tutorial

Post by JaceAce »

I'm gonna write this here. And yes, im still reading the docs lol.

Anyway. I have a "raw" server. I use the function: SetAttributeBaseValue

It appears that the skill is set if I use GetAttributeBaseValue it returns the value set

But in the "skills" gump when i click on it, it shows 0.0 for all skills.

I also checked the lock status. All appears normal.

Why does the "skills" gump show 0.0? Do I have to "hook" to it and create my own skills gump?
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm

Re: Scripting Tutorial

Post by CWO »

What client are you using? The old 3D clients used to do something to this extent.
JaceAce
Expert Poster
Posts: 74
Joined: Fri Feb 29, 2008 10:56 pm

Re: Scripting Tutorial

Post by JaceAce »

I have Mondain's Legacy Fully Updated. The only distro packages I have are the gump and world save. So I installed the main Pol server files, added the Distro gump and world save packages. Created a new attributes.cfg file. When I log in a character. It goes into the game. I freeze him. I created a new gump with the skills that were picked from the character set up. (They add to 100). I then have it update his skills with the commands above. Then unfreeze him. Only problem is that his skills gump doesnt show the skills going up. I might have to install the Distro Attributes package, if I cant figure it out ...
Gurth
New User
Posts: 2
Joined: Fri Jun 19, 2009 2:11 am

Re: Scripting Tutorial

Post by Gurth »

Hi, im new too, but let's say that i have got some experience in programming. Where can I read about how pol works?
For example: I use skill, does pol reads cfg files to get what script to run or cfg files are loaded into memory?

Sorry for my English.
Pachacuti
Apprentice Poster
Posts: 51
Joined: Fri Jun 12, 2009 8:57 am

Re: Scripting Tutorial

Post by Pachacuti »

just recycling the topic...

I wanted to change a little bit the command .mtele

I wanted it to teleport without targeting, just teleporting to the current cursor position.

So, I opened the mtele script and found the target function.

After this, I opened uo.em and tried to find any funtion that give me informations about the cursor, but found nothing!

Is there any funcion like this?

Or is there any other way to do this?

Thanks guys
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Re: Scripting Tutorial

Post by MuadDib »

the UO Client has nothing for this type of support that you are looking for
Pachacuti
Apprentice Poster
Posts: 51
Joined: Fri Jun 12, 2009 8:57 am

Re: Scripting Tutorial

Post by Pachacuti »

so you mean it cant be done O_o ?

allright thanks :)
B4st4rd
New User
Posts: 2
Joined: Fri Mar 06, 2020 11:50 pm

Re: Scripting Tutorial

Post by B4st4rd »

there is some new guide for scripting?
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Re: Scripting Tutorial

Post by DevGIB »

Post Reply