-
Help on lua code
Hail all. I think this its my first post :P
I need a help on a .lua that im trying to create, even if im a nooba XD
its a script to check if appears any player on screen, except the ones on my party. if yeah, to go to a label. if not, does nothing, keep doing what theyre doing.
here the code i made:
local whiteList =
{ ["black metal"] = true,
["death metal"] = true}
Module.New("player-on-screen-goto", function()
for name, cid in Creature.iPlayers() do
if (not whiteList[name]) then
function Self.StopAttack()
return attackCreature(0)
end
function Walker.Start()
setWalkerEnabled(true)
function Walker.Goto(label)
relative = relative and 1 or 0
gotoLabel("house")
function Walker.Stop()
setWalkerEnabled(false)
end
end
end
end
end
well, this is it. i hope someone can find whats its going on that dont makes it work.
most of times tells me that needs:
XenoScript Error:
Script: test treiner.lua
Line #: 35
Chunk: C:?Users?Mio?DOCUME?1?XenoBot?Scripts??TESTTR?1.LU A
Error: 'end' expected (to close 'function' at line 9) near '<eof>'
This is an error with user-input and should not be reported as a bug with XenoBot.
and sometimes dont even opens it on scripter window
i can put "end" everywhere but keeps saying and after some days, im tired XD
thanks a lot!
Caerbannogh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules