• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Learning small LUA

R3ignlasting

Well-Known Member
Joined
Nov 20, 2008
Messages
1,293
Reaction score
82
Alright, I'm not a very good scripter at all, but I guess I would make this...

OK, first we will learn some basics at LUA.

Code:
Function OnSay (cid, words, param)

This is when you would say !buypremium and you would lose 7000 Gold and get 90 premmy days.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

For this, you would use a santa doll and words in white would be : HOHOHO!

Code:
function onStepIn(cid, item, frompos, item2, topos)

You step on a tile, and a frost dragon gets summoned.

Code:
function onStepOut(cid, item, frompos, item2, topos)

You step off of a tile, and you get a message saying "You stepped off of the tile!"

Code:
function onEquip(cid, item, slot)

You have to add a Golden Armor to your armor slot to make a door open.

Code:
function onDeEquip(cid, item, slot)

You remove the Golden Armor from your armor slot, and you can go through a door.

Code:
function onAddItem(moveitem, tileitem, position)

You put an MPA (Magic Plate Armor) on a stand and use a lever, then you get 50,000 Gold.

Next tutorial will be Item Attributes.. Sorry, if I didn't help you, as I said, I'm not a very good scripter at the times.

Cheers,
R3ignlasting

Also, If I have forgotten something please PM it to me and I will put it in this tutorial, and yes I do know, that I didn't explain some advanced scripter ones but I will very soon.
 
onlogin/onlogout/ondeath/onkill/onpreparedeath/onlook/onthink/onadvance ... perhaps thats all which are missing.
 
I think this won't help any newb scripters, it's kinda obvious that the functions do that things.. Go learn Lua yourself, and make a very pwn tutorial ;) -- --
 
Hey I got a problem, could some1 post me a script if Im using a lever then anywhere will be summoned a monster`?

Please I need this script! :D
 
Back
Top