This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] /Lua\ ; Some questions.  (Read 1862 times)

ViridielLorael

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
[QUESTION] /Lua\ ; Some questions.
« on: January 03, 2013, 07:20:20 pm »
Hello,

I've made a small lua script (for arcemu) that needs to learn some spells to a class when they login on the server.  The wrong thing is; It isn't working. Could anybody be so kind to check the script I've made, and look what's wrong with It?

pastebin ; Vu00Y3N9

As second;

I've made a npc who will get you back to 'phase1' and/or will 'revive' you , If you're dead. It doesn't work either.
Could anybody check this script too and see what Is wrong?

pastebin ; qVztkZJA

As third;

I'm trying to create an object, when If you click on It then It would add an Item to your backpack.
And guess what? It Isn't working either.

pastebin ; vsRu1RvK

Thank you for reading.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #1 on: January 03, 2013, 08:19:56 pm »
All of these things can and should be created in the Database instead of creating scripts. Also, avoid ArcEmu.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ViridielLorael

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #2 on: January 03, 2013, 08:28:02 pm »
I can't avoid ArcEmu, And I want to create this with a script Instead of using the database, could anybody help me with that? :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #3 on: January 03, 2013, 08:42:24 pm »
Fix indentation and you will notice the first one immediately.

Also, say how or what does not work. Just "does not work" is NOT any error diagnosis. Is the behavior different from what you intended? Doesn't it compile? ELABORATE.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ViridielLorael

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #4 on: January 04, 2013, 12:52:11 am »
That's hard to say, there are no errors or anything. It just wont load.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

noc

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 121
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #5 on: January 04, 2013, 02:02:39 pm »
this is not a good idea :      if pPlayer:GetPlayerClass() = Priest then
I would prefer something like this :      if pPlayer:GetPlayerClass() == Priest then
the syntax with "if" must be "==" not "="

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #6 on: January 04, 2013, 02:45:13 pm »
Quote from: "ViridielLorael"
That's hard to say, there are no errors or anything. It just wont load.
And how do you notice it does not load? And if it does not load, why do you think the scripts are bad, rather than just not being in the right directory?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

ViridielLorael

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: [QUESTION] /Lua\ ; Some questions.
« Reply #7 on: January 04, 2013, 06:47:28 pm »
Quote from: "schlumpf"
Quote from: "ViridielLorael"
That's hard to say, there are no errors or anything. It just wont load.
And how do you notice it does not load? And if it does not load, why do you think the scripts are bad, rather than just not being in the right directory?

It is in the right directory, but ;  1. If you talk to the NPC he won't do anything then just say 'Hi.'   2. You won't learn the spells when you login
« Last Edit: January 01, 1970, 01:00:00 am by Admin »