A website for every gema-assaultcube fan
 
HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 Lua for AC server

View previous topic View next topic Go down 
Go to page : Previous  1, 2, 3, 4
AuthorMessage
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Mon Feb 11, 2013 4:30 pm

sounds nice Smile lets do it that way
Back to top Go down
View user profile http://mgpmax.dyndns.org
UKnowMe?



Messages : 51
Joined/Date d'inscription : 2012-10-08
Location/Localisation : Germany

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Tue Feb 12, 2013 4:04 am

I have here a piece of code:
Code:
setnextmode(endmap[3])
setnextmap(endmap[1])
endmap is a table
Code:
{ mapname, 0, gamemode }
So this should work if nobody votes for /gonext, but it doesn't.
Back to top Go down
View user profile
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Tue Feb 12, 2013 4:24 am

Abstelle von 13: GM_CTG !?
Back to top Go down
View user profile http://mgpmax.dyndns.org
Sveark



Messages : 124
Joined/Date d'inscription : 2011-05-02
Age : 23
Location/Localisation : Russia

PostSubject: Re: Lua for AC server   Sun Feb 17, 2013 3:48 am

Version 1.5 has been released!

New constants: remove map errors and upload map errors (API: Constants)

New functions:
isediting
isalive
isinwater
isunderwater
getteamkills
setteamkills
rereadcfgs
callhandler
getwaterlevel
callgenerator
tmr.after
tmr.vacantid

New handlers:
onPlayerPingUpdate
onPlayerStateUpdate
(B) onPlayerBanThresholdReach
(B) onPlayerKickThresholdReach
(B) onConfigReread
onConfigRereadAfter
onPlayerRemoveMapAfter
onPlayerPreconnect
onPlayerSwitchEditing

New generators:
yieldNumberOfPlayers
onPlayerRemoveMap

1 function has had extended list of arguments:
mapisok (string mapname [= current map's name])

[!] 2 handlers have been remade:
onPlayerSendMap (string map_name, integer sender_cn, integer revision, integer mapsize, integer cfgsize, integer cfgsizegz, integer upload_error)
onPlayerSendMapAfter (string map_name, integer sender_cn, integer revision, integer mapsize, integer cfgsize, integer cfgsizegz, integer upload_error)

[!] 1 handler has become generator:
onPlayerSendMap

[!] 1 handler has lost its ability to block action: (as it's better not to ommit packets)
onServerProcess

Other changes:
  1. Fixed /setnext command executing;
  2. Fixed occasional disconnects and segfaults (error 11);
  3. Fixed clienthasflag and tmr.create functions;
  4. include function is now able to include *.lua and *.luac files (as well as *.inc files).


Notes:

  1. No Lua mod's function entails a handler execution. Exceptions: logline (onLogLine); luanotice (onLuaNotice); callhandler (any handler); callgenerator (any generator/handler)
  2. [!] denotes that the change may entail script modification.


Last edited by Sveark on Sun Feb 17, 2013 7:14 am; edited 2 times in total
Back to top Go down
View user profile http://sveark.info/ac
Baruch



Messages : 105
Joined/Date d'inscription : 2012-08-04
Age : 25
Location/Localisation : France

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Sun Feb 17, 2013 3:57 am

Yay ! Very Happy
Back to top Go down
View user profile
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Sun Feb 17, 2013 6:52 am

nice, thanks:
what came new to mapisok(mapname) ?
Back to top Go down
View user profile http://mgpmax.dyndns.org
Sveark



Messages : 124
Joined/Date d'inscription : 2011-05-02
Age : 23
Location/Localisation : Russia

PostSubject: Re: Lua for AC server   Sun Feb 17, 2013 6:59 am

Its argument now refers to current map's name by deafult (if not set)
Back to top Go down
View user profile http://sveark.info/ac
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Sun Feb 17, 2013 7:09 am

ah cool
Back to top Go down
View user profile http://mgpmax.dyndns.org
Sveark



Messages : 124
Joined/Date d'inscription : 2011-05-02
Age : 23
Location/Localisation : Russia

PostSubject: Re: Lua for AC server   Thu Mar 07, 2013 2:04 am

Fixed Win32 binaries. Lua 1.5 modded server couldn't run on Windows...
Changing compiler from MSVC to MinGW32 solved the problem...
Back to top Go down
View user profile http://sveark.info/ac
gear4



Messages : 28
Joined/Date d'inscription : 2013-04-03
Age : 19
Location/Localisation : English

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Wed Apr 03, 2013 4:01 am

Can I request "getaccuracy" ? I used it in my previous mod of this for my Lua framework thingy. If not, thanks anyway! I just don't like to mod the source each and every time a release is made.

[EDIT]

Another thing, could you make it continue if win32_release exists ? it's annoying to CD to the directory, "del" it, then come back to the command line and type "make mingw" all over again

[EDIT 2]

I can't compile this on Linux for Linux, I get this error (list):
Code:
/usr/bin/ld: error: lua.o:1:2: invalid character
/usr/bin/ld: error: lua.o:1:2: syntax error, unexpected $end
/usr/bin/ld: error: lua.o: not an object or archive
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o(.text+0x20): error: undefined reference to 'main'


Last edited by gear4 on Wed Apr 03, 2013 5:30 am; edited 2 times in total
Back to top Go down
View user profile http://graphox.us
Sveark



Messages : 124
Joined/Date d'inscription : 2011-05-02
Age : 23
Location/Localisation : Russia

PostSubject: Re: Lua for AC server   Wed Apr 03, 2013 5:21 am

Hi, gear4. Everything you mentioned is implementable and will be implemented in the next version (1.6).

But I don't understand why it doesn't compile for you...
Back to top Go down
View user profile http://sveark.info/ac
gear4



Messages : 28
Joined/Date d'inscription : 2013-04-03
Age : 19
Location/Localisation : English

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Wed Apr 03, 2013 5:30 am

Hey Sveark,

I fixed the Lua error by deleting src/lua/*.o - modify the last like Makefile.linux so that it reads this:
Code:
rm -f $(OBJECTS) $(LANES_OBJECTS) $(TARGET) src/lua/*.o

And yes, I know it's implementable, I have it currently
Back to top Go down
View user profile http://graphox.us
Baruch



Messages : 105
Joined/Date d'inscription : 2012-08-04
Age : 25
Location/Localisation : France

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Thu Apr 18, 2013 11:27 am

I think that when you return PLUGIN_BLOCK in onPlayerSayText handler, what player said isn't stored into demo file. Maybe you could add an option or a function to control that ? :3
Back to top Go down
View user profile
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Thu Apr 18, 2013 12:05 pm

ofc not, after you return pluginblock the server basicly ignores the call (totally and in any way)
Back to top Go down
View user profile http://mgpmax.dyndns.org
UKnowMe?



Messages : 51
Joined/Date d'inscription : 2012-10-08
Location/Localisation : Germany

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Thu Apr 25, 2013 1:46 pm

Sveark, your website is down? Anyway, would it be possible to create a "dummy" gamemode, where you can set everything on your own (teambased, roundbased, etc.) to create custom gamemodes?
Back to top Go down
View user profile
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Thu Apr 25, 2013 1:48 pm

Tuerknauf, afaik GMs are mainly handled client side. indeed his site is down. still got my backup, but you know that.
Back to top Go down
View user profile http://mgpmax.dyndns.org
UKnowMe?



Messages : 51
Joined/Date d'inscription : 2012-10-08
Location/Localisation : Germany

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Fri Apr 26, 2013 11:13 am

And what would happen if you COULD create a new gamemode with ID -2? What would the client do?
Back to top Go down
View user profile
Park



Messages : 265
Joined/Date d'inscription : 2011-11-04

Gema stats
farthest jump:

PostSubject: Re: Lua for AC server   Fri Apr 26, 2013 11:20 am

crap around, try sending: changemap (-2, blamap, 20)
no idea.
Back to top Go down
View user profile http://mgpmax.dyndns.org
Sponsored content




PostSubject: Re: Lua for AC server   Today at 2:54 pm

Back to top Go down
 
Lua for AC server
View previous topic View next topic Back to top 
Page 4 of 4Go to page : Previous  1, 2, 3, 4
 Similar topics
-
» .^f2F-.Swemmei Recruting in server 1
» Lag playing in Taiwan server from Shanghai
» Proxy Server Taiwan: How To.
» WoW "Development" Server
» Omnos (( Maybe another name depending on server)) Sunbearer

Permissions in this forum:You cannot reply to topics in this forum
gema :: International :: General-
Jump to: