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

Share | 
 

 Ask us for a script

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


Messages : 176
Joined/Date d'inscription : 2010-04-21

Gema stats
farthest jump: 38

PostSubject: Re: Ask us for a script   Tue Jul 26, 2011 3:42 pm

OK, I will try to work on it tomorrow.
Back to top Go down
View user profile http://gema.forumactif.com
|MaRs|



Messages : 10
Joined/Date d'inscription : 2011-07-25
Age : 18
Location/Localisation : Maine, USA

Gema stats
farthest jump: 35 cubes

PostSubject: Re: Ask us for a script   Tue Jul 26, 2011 6:49 pm

Ok Cool Smile
Back to top Go down
View user profile
Nirude
Admin


Messages : 176
Joined/Date d'inscription : 2010-04-21

Gema stats
farthest jump: 38

PostSubject: Re: Ask us for a script   Wed Jul 27, 2011 6:36 am

Code:
//claimadmin_svearks
alias ca_svearks [if (= $cas 1) [cas = 0; echo "ca_svearks is now off"] [cas = 1; echo "ca_svearks is now on"; ca_svearks1]]
alias ca_svearks1 [if ($cas) [if (strstr $conline ": 0 CLAIMADMIN") [if (strstr $conline 6) [playerf1] [playerf2]; ca_svearks2] [sleep 0 ca_svearks1]]]
alias playerf1 [loop p 21 [if (strstr $conline (concatword 6( $p ))) [plf = $p]]] //executed if 2 players with the same nickname
alias playerf2 [loop p 21 [if (strcmp (at $conline 0) (concatword (findpn $p) : 0)) [plf = $p]]]
alias ca_svearks2 [say $ca_message; ca_time = 1; sleep 10000 [ca_time = 0]; ca_pass = 0; ca_svearks3; sleep 10000 [ca_svearks4]]
alias ca_message (concat !pm $plf PM me the password in this format "!PM Killerxxx setadmin <PASSWORD>" in less than 10 seconds to successfully claim admin)
alias ca_svearks3 [if ($ca_time) [if (strcmp $conline (concatword 3 "setadmin PASSWORD")) [ca_pass = 1]; sleep 0 ca_svearks3]]
alias ca_svearks4 [if ($ca_pass) [setadmin 1 PASSWORD; giveadmin $plf] [setadmin 1 PASSWORD; kick $plf wrong password]; sleep 0 ca_svearks1]

Did it, but I tested it offline, I can't test it on Sveark's.
So if you get any trouble with it, please tell it.
Back to top Go down
View user profile http://gema.forumactif.com
|MaRs|



Messages : 10
Joined/Date d'inscription : 2011-07-25
Age : 18
Location/Localisation : Maine, USA

Gema stats
farthest jump: 35 cubes

PostSubject: Re: Ask us for a script   Wed Jul 27, 2011 9:37 am

Thanks! I will try it out Very Happy
Back to top Go down
View user profile
|MaRs|



Messages : 10
Joined/Date d'inscription : 2011-07-25
Age : 18
Location/Localisation : Maine, USA

Gema stats
farthest jump: 35 cubes

PostSubject: Re: Ask us for a script   Wed Jul 27, 2011 9:38 am

It works on my server though right?
Back to top Go down
View user profile
|MaRs|



Messages : 10
Joined/Date d'inscription : 2011-07-25
Age : 18
Location/Localisation : Maine, USA

Gema stats
farthest jump: 35 cubes

PostSubject: Re: Ask us for a script   Wed Jul 27, 2011 9:46 am

Hrm, I tried it, but it doesn't seem to be working, can you explain how to use it so I know that i'm using it correctly?
Back to top Go down
View user profile
Nirude
Admin


Messages : 176
Joined/Date d'inscription : 2010-04-21

Gema stats
farthest jump: 38

PostSubject: Re: Ask us for a script   Thu Jul 28, 2011 6:03 am

You just have to type /ca_svearks
It will write "ca_svearks is now on" and it will load automatically ca_svearks1.
Does it write something in the console?
If it doesn't work, can you be on the irc this evening please?
Back to top Go down
View user profile http://gema.forumactif.com
|MaRs|



Messages : 10
Joined/Date d'inscription : 2011-07-25
Age : 18
Location/Localisation : Maine, USA

Gema stats
farthest jump: 35 cubes

PostSubject: Re: Ask us for a script   Thu Jul 28, 2011 6:51 am

Well, it seems most of it works, sorry I wasn't on the IRC Sad, The only part that isn't working is when someone says "CLAIMADMIN" into the chat. Nothing happens when anyone says that.
Back to top Go down
View user profile
Park



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

Gema stats
farthest jump:

PostSubject: zm   Fri Nov 04, 2011 4:26 pm

hi

i know, this is not gema, but with lua in this forum, i though some of you can help me.
Id like make a zombie server, with a zombie mod script, written in lua.
so, i cant make one my self, because i dont know that much about lua.
can someone make one for me? or is that too much work? or is it even legal to list that on MS? if not, i wont let it connect to MS.

it would have to work like this:

1. All players spawn as RVSf with 10000 shots ammo, and 1000 in magazines. gun is subgun. 1 hp
2. after about 15 sec. 3 or 4 players spawn in CLA (from RVSF). Only with knife.
3. these 3 or 4 players have 500 HP (or more/less, id try and take the best), they will try to slash the rvsf players.
4. If rvsfs get killed by clas, they spawn as cla, like in 2.
5. if the cla get killed by rvsf they spawn as rvsf, like in 1.
6. based on Tosok gameplay (?)


id make zm maps, if i find some time. else it could work on normal maps aswell.


park confused
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: Ask us for a script   Sat Nov 05, 2011 6:08 am

Park, hi. Here's the script: http://sveark.info/ac/Lua/zombie_mod.zip . To use it update your Lua server first! (download the newest version). To switch zombie mode on, write !zombies into public chat as admin. How to use script:
select a map where you would to play
players are switched to appropriate teams by themselves
type !zombies
play
Back to top Go down
View user profile http://sveark.info/ac
Park



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

Gema stats
farthest jump:

PostSubject: Re: Ask us for a script   Sat Nov 05, 2011 6:09 am

thx man didnt know there was one.

edit: or did u make it just for me, if thank you very much.

Park

edit 2:
its very nice, but now i need something that stops players killing befor !zombies and killing eachother (teamkill)
and sice i made a autorespawn edit, i need a round end thing, that forces the round to end, when all players are on one team.
and sometimes only one is in rvsf, so i dont know what it is, u may look at it.
is that possible?

and if its possible maximal 4 players in cla on start, after first infect (cla knifes rvsf) more, no limit. (not very important: start () timer! (after 15 sec. of round)


right now it looks like

Code:

PLUGIN_NAME = "Zombie mod"
PLUGIN_AUTHOR = "Sveark"
PLUGIN_VERSION = "1.0"

include("ac_server")

------------------

zombie_mode = false

function start()
  zombie_mode = true
  changemap(getmapname(), GM_TOSOK, 20)
  --setmastermode(MM_PRIVATE)
  setautoteam(false)
  clientprint(-1, "Zombie mode has been turned \f2ON")
end

function stop()
  setautoteam(true)
  --setmastermode(MM_OPEN)
  zombie_mode = false
  clientprint(-1, "Zombie mode has been turned \f2OFF")
end

function check()
  local cla, rvsf = 0, 0
  for cn = 0, maxclient() - 1 do
    if isconnected(cn) then
      if getteam(cn) == TEAM_CLA then
        cla = cla + 1
      elseif getteam(cn) == TEAM_RVSF then
        rvsf = rvsf + 1
      end
    end
  end
  if cla == 0 then
    clientprint(-1, "\f2Humans win!")
    stop()
   shuffleteams ()
   start ()
  elseif rvsf == 0 then
    clientprint(-1, "\f2Zombies win!")
    stop()
   shuffleteams ()
   start ()
  end
end

------------------

function onPlayerSayText(cn, text)
  if text == "!zombies" and isadmin(cn) then
    if zombie_mode then
      stop()
    else
      start()
    end
  end
end

function onPlayerDeath(tcn, acn, gib, gun)
  if not zombie_mode then return end
  setteam(tcn, getteam(acn))
    if zombie_mode then
   if getteam(tcn) == TEAM_CLA then
           if isadmin(tcn) then
         spawn(tcn, 800, 0, 0, 1, GUN_KNIFE, GM_LSS, GUN_KNIFE)
         else
         spawn(tcn, 500, 0, 0, 1, GUN_KNIFE, GM_LSS, GUN_KNIFE)
         end
  elseif getteam(tcn) == TEAM_RVSF then
    spawn(tcn, 1, 0, 10000, 10000, GUN_SUBGUN, GM_OSOK, GUN_SUBGUN)
  end
  end
  check()
end

function onPlayerSpawn(cn)
  if not zombie_mode then return end
  if getteam(cn) == TEAM_CLA then
  forcedeath (cn)
  if isadmin(pid) then
      spawn(cn, 800, 0, 0, 1, GUN_KNIFE, GM_LSS, GUN_KNIFE)
   else
      spawn(cn, 500, 0, 0, 1, GUN_KNIFE, GM_LSS, GUN_KNIFE)
   end
    --spawn(cn, 500, 0, 0, 1, GUN_KNIFE, GM_LSS, GUN_KNIFE)
  elseif getteam(cn) == TEAM_RVSF then
    spawn(cn, 1, 0, 10000, 10000, GUN_SUBGUN, GM_OSOK, GUN_SUBGUN)
  end
end

function onPlayerTeamChange(cn, newteam)
  if not zombie_mode then return end
  if getteam(cn) ~= TEAM_SPECT then
    return PLUGIN_BLOCK
  end
end

function onPlayerDamage(acn, tcn, damage)
   if not zombie_mode then
   return PLUGIN_BLOCK
   elseif getteam(acn) == getteam(tcn) then
    return PLUGIN_BLOCK
  end
end





Park
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: Ask us for a script   Sat Nov 05, 2011 10:13 pm

Park, here's it: http://sveark.info/ac/Lua/zombie_mod2.zip
Now to start zombie mode, type . to public chat. Also now everyone's able to turn zombie mode on, but only admin can turn it off
Important: to use this, redownload new (today's) version of Lua mod
Back to top Go down
View user profile http://sveark.info/ac
Park



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

Gema stats
farthest jump:

PostSubject: Re: Ask us for a script   Sun Nov 06, 2011 2:32 am

hi sveark thx for the new version, works much better!

but:
i think it would be nice to start zombie_mode without respawning all other players too.
so 1. spawn all players as humans 2. respawn only the zombies.
i added shuffleteams () to one line cause i had to do it manually every round.
and i dont know what it is, if its my computer or what, but ac_server stoppes working after ~10 min. online.

heres the current script:

Code:


PLUGIN_NAME = "Zombie mod"
PLUGIN_AUTHOR = "Sveark"
PLUGIN_VERSION = "1.2.1"

------------------

-- RVSF = humans
-- CLA = zombies

zombie_mode = false
stats =
{
  humans = 0,
  zombies = 0,
  rounds = 0
}
max_zombies_on_start = 4

function start()
  zombie_mode = true
  changemap(getmapname(), GM_TOSOK, 20)
  setautoteam(false)
  local cla = 0
  for cn = 0, maxclient() - 1 do
    if isconnected(cn) then
      if getteam(cn) == TEAM_CLA then
        if cla == max_zombies_on_start then
          setteam(cn, TEAM_RVSF)
        else
          cla = cla + 1
        end
      end
    end
  end
  clientprint(-1, "\f3ZOMBIE MODE HAS BEEN TURNED \f2ON")
end

function stop()
  setautoteam(true)
  changemap(getmapname(), getgamemode(), 8)
  stats.humans = 0
  stats.zombies = 0
  stats.rounds = 0
  zombie_mode = false
  clientprint(-1, "\f3ZOMBIE MODE HAS BEEN TURNED \f2OFF")
  shuffleteams ()
end

function players()
  local cla, rvsf = 0, 0
  for cn = 0, maxclient() - 1 do
    if isconnected(cn) then
      if getteam(cn) == TEAM_CLA then
        cla = cla + 1
      elseif getteam(cn) == TEAM_RVSF then
        rvsf = rvsf + 1
      end
    end
  end
  return cla, rvsf
end

function check()
  local cla, rvsf = players()
  if cla == 0 then
    stats.humans = stats.humans + 1
   stop ()
  elseif rvsf == 0 then
    stats.zombies = stats.zombies + 1
  end
  if cla * rvsf == 0 then
    stats.rounds = stats.rounds + 1
    shuffleteams ()
  end
end

------------------

function onPlayerConnect(cn)
  clientprint(cn, "\f3TYPE \f2. \f3(A DOT) TO START ZOMBIE MODE!")
end

function onMapEnd()
  if not zombie_mode then return end
  if stats.humans > stats.zombies then
    clientprint(-1, "\f2HUMANS \f3WIN")
  elseif stats.zombies > stats.humans then
    clientprint(-1, "\f2ZOMBIES \f3WIN")
  else
    clientprint(-1, "\f2ROUND DRAW!")
  end
end

function onMapChange(map, mode)
  if not zombie_mode then return end
  stop()
end

function onPlayerSayText(cn, text)
  if text == "." then
    if not zombie_mode then
      start()
    elseif isadmin(cn) then
      stop()
    end
  end
end

function onPlayerDeath(tcn, acn, gib, gun)
  if not zombie_mode then return end
  setteam(tcn, getteam(acn))
  onPlayerSpawn(tcn)
  check()
end

function onPlayerSpawn(cn)
  if not zombie_mode then return end
  if getteam(cn) == TEAM_CLA then
    spawn(cn, isadmin(cn) and 800 or 500, 0, 0, 1, GUN_KNIFE, GM_LSS, GUN_KNIFE)
  elseif getteam(cn) == TEAM_RVSF then
    spawn(cn, 1, 0, 10000, 10000, GUN_SUBGUN, GM_OSOK, GUN_SUBGUN)
  end
  return PLUGIN_BLOCK
end

function onPlayerTeamChange(cn, newteam)
  if not zombie_mode then return end
  if getteam(cn) ~= TEAM_SPECT then
    return PLUGIN_BLOCK
  else
    local cla, rvsf = players()
    if cla == 0 then
      setteam(cn, TEAM_CLA)
      return PLUGIN_BLOCK
    elseif rvsf == 0 then
      setteam(cn, TEAM_RVSF)
      return PLUGIN_BLOCK
    else
      if stats.rounds == 0 and cla == max_zombies_on_start then
        setteam(cn, TEAM_RVSF)
        return PLUGIN_BLOCK
      end
    end
  end
end

function onPlayerDamage(acn, tcn, damage)
  if not zombie_mode then
    return PLUGIN_BLOCK
  elseif getteam(acn) == getteam(tcn) then
    return PLUGIN_BLOCK
  end
end

function onPlayerCallVote(cn, type, text, number)
  if not zombie_mode then return end
  if type == SA_AUTOTEAM then
    voteend(VOTE_NO)
  end
end

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: Ask us for a script   Sun Nov 06, 2011 5:31 am

I didn't understand your first idea... All players need to be spawned, because health and weapons are given only at spawning. Redownload Lua mod again, for I fixed server crashing when voteend's being called
Back to top Go down
View user profile http://sveark.info/ac
Park



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

Gema stats
farthest jump:

PostSubject: Re: Ask us for a script   Sun Nov 06, 2011 6:28 am

1.I mean on the rounds start, before someone writes . in chat, all players get spawned as humans (1 hp, 10000 ammo subgun).

2.then: if . is written, only the 4 players (zombies) on cla(?) will get respawned as Zombies (500hp, knife).

im not shure if it is easier to spawn at 1. on team rvsf, then change zombies to cla and do 2.
or do 1. for both teams, but 2. only for cla.
i dont care.



edit: some more changes:
if its possible more jumphight and speed and very important: about 2,5 times more knockback (thats when humans shoot zombies, the zombies get pulled back, not the humans) for zomibes.

and for humans: no recoil, no knockback. (remove the movent when shooting, so i dont have to move the mouse down all the time.

i think this is only on client adjustable.



and i dont know if u undetstood my idea right: only 4 players on every round start, until first knife kill. and not only on the first round of all maps.
you may have written it in that way, but i could not tell it out of the script.


edit 2: only if you think this is possible, and what ever:
since i would like to run 2 servers at the same thime, it would save disk space and it would work for me:
make a lua for ac server
1. with no extra server switch it will execute all files in lua/scripts,
2. with some extra server switch eg. -lua "/config/server_2_scripts" or else, i dont care.
with extra server switch i mean the servercommandline.txt or like i use the .bat



edit 3:
i think they have banned my Server name, where the Z server was on! works again.
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: Ask us for a script   Thu Nov 10, 2011 3:15 am

Park, http://sveark.info/ac/Lua/zombie_mod2.zip
moving is processed on client side (as well as weapon recoil)
Update your Lua mod for --lua switch
Back to top Go down
View user profile http://sveark.info/ac
Park



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

Gema stats
farthest jump:

PostSubject: Re: Ask us for a script   Thu Nov 10, 2011 3:30 am

thank you very much!!
have u been banned so far`?
Park
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: Ask us for a script   Thu Nov 10, 2011 3:33 am

No, I'm not banned, just I have University
Back to top Go down
View user profile http://sveark.info/ac
ChO



Messages : 27
Joined/Date d'inscription : 2011-11-24

Gema stats
farthest jump: Infinity

PostSubject: RE: Ask us for a script   Fri Nov 25, 2011 9:04 am

I would like to ask for a script in lua where you can edit kill. Example: Flying while shooting but can't go through walls.
Back to top Go down
View user profile
Sveark



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

PostSubject: Re: Ask us for a script   Sat Nov 26, 2011 3:28 am

ChO, I misunderstood you... This will turn damaging off:
function onPlayerDamage(actor_cn, target_cn, damage)
return PLUGIN_BLOCK
end
Back to top Go down
View user profile http://sveark.info/ac
ChO



Messages : 27
Joined/Date d'inscription : 2011-11-24

Gema stats
farthest jump: Infinity

PostSubject: Re: Ask us for a script   Sat Nov 26, 2011 11:24 am

Its where you can fly while shooting. When your in edit mode you can fly. I am asking if you can make a script to where you can edit and shoot at the same time, you can't go through wall in this script, and you can take damage.
Back to top Go down
View user profile
Sveark



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

PostSubject: Re: Ask us for a script   Sat Nov 26, 2011 7:34 pm

it's impossible on server-side. clients are controlling their position by themselves
Back to top Go down
View user profile http://sveark.info/ac
ChO



Messages : 27
Joined/Date d'inscription : 2011-11-24

Gema stats
farthest jump: Infinity

PostSubject: Re: Ask us for a script   Sun Nov 27, 2011 4:32 pm

I would also like to ask to edit the zombie script. I wish to have other guns. I suggest that when you reach a certain amount of points, you unlock another weapon besides sub gun. Also the starter weapon will be a shotgun. Once a player gets 15 frags they unlock the next gun, which will be carbine. After 25 frags they unlock the sub gun. After 40 frags they unlock the Assault rifle. Sniper is 50+
Back to top Go down
View user profile
ChO



Messages : 27
Joined/Date d'inscription : 2011-11-24

Gema stats
farthest jump: Infinity

PostSubject: Re: Ask us for a script   Sun Nov 27, 2011 4:57 pm

Snipers can headshot a zombie which instantly kills them
Back to top Go down
View user profile
ChO



Messages : 27
Joined/Date d'inscription : 2011-11-24

Gema stats
farthest jump: Infinity

PostSubject: Re: Ask us for a script   Sun Nov 27, 2011 5:27 pm

Also I wish to have an !ext command. I do not want to merge the SvearkMod with the zombie mod. The !ext command may be used by normal players not only admins.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Ask us for a script   Today at 11:18 am

Back to top Go down
 
Ask us for a script
View previous topic View next topic Back to top 
Page 2 of 4Go to page : Previous  1, 2, 3, 4  Next
 Similar topics
-
» Chess Script
» Autohotkey script for melee barbarian
» Script from the episodes
» Awesome (FREE) gun script!
» Gun Movement Script? Tutorial #2

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