Lua Scripting Guide

Discussion in 'Programming & Scripting' started by Evil Hero, Mar 23, 2010.

  1. Dantarrix

    Dantarrix Member

    Joined:
    Aug 27, 2010
    Messages:
    546
    cid = refers to player
    item = refers to used item
    fromPosition = refers position of the used item...
    itemEx = refers to the use with item... if u use rope on box, box will be itemEx...
    toPosition = refers to itemEx position...
     
  2. killerjrv

    killerjrv New Member

    Joined:
    May 25, 2010
    Messages:
    1
    thx dude and do kno how to make custom tibia 9.31 spells cuz im haveing sum trouble with tht shit for a while now
     
  3. luigilc

    luigilc Lua Learner

    Joined:
    Mar 24, 2010
    Messages:
    858
    Starting off on my programming courses, will use this to study lua, thank you very much for it!
     
  4. mrwhite

    mrwhite New Member

    Joined:
    Mar 10, 2012
    Messages:
    1
    Hello there.

    I'd like to ask 'bout a problem that's driving me crazy on my enforced ot.

    All the new and already created characters have got magic level 20 and skills 10, with level fixed at 80, configured at config.lua and lowlevellock.lua..

    My question is:

    Is it possible to get new player's magic levels - (EK = 10) (MS and ED = 60) (RP = 25) - fixed at those numbers, even if the player die? Just the same way the level works, when the min level is for example 100 and you die, degrown to 99 but get level 100 again, and you are able to be level 100+ by killing other players..

    And, of course, the same script for skills of paladins and knights, starting like 80 for dist of RP and 70 for meele skills of EKS and never get down of that when you get killed by some shit, but you still able to get 71..79..90 skills, and more by training.

    I preciate your attention, and appologize for my bag english.

    Yours,

    Zed.
     
  5. GOD lolsito

    GOD lolsito New Member

    Joined:
    Aug 16, 2010
    Messages:
    78
    Please update they i am waiting 1 year XD
     
  6. City

    City Well-Known Member

    Joined:
    Jul 14, 2012
    Messages:
    1,077
    Mind if I throw this in here?

    Lua: demo

    Quite useful for newbie scripters.

    and this Tables Tutorial

    as the tutorial isn't finished
     
    Last edited: Jul 18, 2012
  7. JuanC

    JuanC New Member

    Joined:
    Sep 24, 2009
    Messages:
    220
    Can anyone finish the tutorial?
     
  8. Shinmaru

    Shinmaru エロルアー Scripter!

    Joined:
    Aug 20, 2007
    Messages:
    1,988
    I'll try to fork the whole tutorial and complete the rest.
     
  9. Dyabl0

    Dyabl0 Just stop copying my outfit colours

    Joined:
    Sep 22, 2009
    Messages:
    1,791
    Awesome Tutorial! :w00t:
     
  10. unixstyle297

    unixstyle297 ~PDX Founder~

    Joined:
    Sep 2, 2012
    Messages:
    996
    The best tutorial, when I read this much more, I was scripting better. Thanks. ~unix
     
  11. wicho19

    wicho19 New Member

    Joined:
    Jul 17, 2012
    Messages:
    3
    thank you very much!
     
  12. djb649

    djb649 Member

    Joined:
    Apr 12, 2012
    Messages:
    48
    This Was A Real Help
    To me
     
  13. frap

    frap New Member

    Joined:
    Jan 21, 2011
    Messages:
    9
    Oh bro i want to congrats to you cause this guide really help me to do what i want, i'am from chile and i have a little knowledge of englisht and i understand you at 100 %, thank you.
    always we gonna appreciate the people who do something for one else.
     
  14. Ussef

    Ussef Member

    Joined:
    May 27, 2009
    Messages:
    123
    dude could u show me how to make a vocation door?
     
  15. tetra20

    tetra20 DD

    Joined:
    Jan 17, 2009
    Messages:
    1,274
    Awesome Tutorial I Learned how to script Ty Evil Hero <3<3<3
     
  16. norrow

    norrow Member

    Joined:
    Dec 16, 2012
    Messages:
    90
    Nice ^^
     
  17. Marok

    Marok Well-Known Member

    Joined:
    Jul 18, 2009
    Messages:
    358
    Very nice !
    Can someone complete this tutorial ?
     
  18. Dev Addled

    Dev Addled New Member

    Joined:
    Jun 20, 2013
    Messages:
    1
    Great tutorial for control structures! I am excited to see the examples for tables and looping through tables, my guess is that it involves nesting.

    Also, I'd like to point out that the "repeat loops" is commonly known as a "do while" loop.

    -Addled
     
  19. Seksy

    Seksy Member

    Joined:
    May 20, 2012
    Messages:
    379
    My thoughts exactly !!!
    This explained a lot for me as well but I do have some open questions as im sure many others on occasion will ask
    I assume ( and ) are containers such as (this is contained here) and I assume that )) basically ends that particular line of code or statement and move on to the next right??
    and I assume that ); or )); end the line of code and begins a new execution ?? or does any of my question make sense??

    those parts are mostly confusing for me. what is the proper format for writing the code out..functions I get but format is the key to making it work.
     
  20. imkingran

    imkingran Learning everyday. Premium User

    Joined:
    Jan 15, 2014
    Messages:
    1,151
    Thanks man, I'm really new at these things and your broke it down so nicely for me.

    Good Job!
     

Share This Page