KraZ Posted June 30, 2012 Share Posted June 30, 2012 Why couldnt scripting be like this! I mean imagine it! When a player dies, give the attacker 3 exp points; When a player gets 100 exp points then level him up 1 level; When a player dies, give the attacker 100 money; When a player joins, give them a random team between( "blue" , "red" ); When a player dies, show the attacker for 5 seconds; When a player dies. display on screen in small text on the right hand side the attacker name and weapon he used; Link to comment
Jaysds1 Posted June 30, 2012 Share Posted June 30, 2012 He means scripting in sentences... Link to comment
12p Posted June 30, 2012 Share Posted June 30, 2012 Simple. The computer doesn't know how to think as a human, it just cannot read a sentence like that. To make that kind of scripting you'd probably mess up your head into programming by lots of years. Also Lua scripting is pretty simple compared to real programming. If you focus into learning and practice some, you may be able to do many cool things. Link to comment
GhostXoP Posted July 1, 2012 Share Posted July 1, 2012 Also Lua scripting is pretty simple compared to real programming. If you focus into learning and practice some, you may be able to do many cool things. Design. Real programming just has a little more responsibility. When a player dies, give the attacker 3 exp points;When a player gets 100 exp points then level him up 1 level; When a player dies, give the attacker 100 money; When a player joins, give them a random team between( "blue" , "red" ); When a player dies, show the attacker for 5 seconds; When a player dies. display on screen in small text on the right hand side the attacker name and weapon he used; Is possible, for scripting. In programming the logic would be too vague at times, and no one would want to use it. I certainly wouldn't. Link to comment
Smart. Posted July 1, 2012 Share Posted July 1, 2012 Why couldnt scripting be like this!I mean imagine it! When a player dies, give the attacker 3 exp points; When a player gets 100 exp points then level him up 1 level; When a player dies, give the attacker 100 money; When a player joins, give them a random team between( "blue" , "red" ); When a player dies, show the attacker for 5 seconds; When a player dies. display on screen in small text on the right hand side the attacker name and weapon he used; no offence, but lua is a really easy language. If you can't learn it you are quite stupid. I mean, the language(lua) is self explanatory and almost as you write above lol. Link to comment
arezu Posted July 1, 2012 Share Posted July 1, 2012 You could make your own script that can read sentences and make a script of it, but the biggest problem is that you cant make advanced scripts like that so its pretty much useless if you want to make awesome scripts. Link to comment
Woovie Posted July 1, 2012 Share Posted July 1, 2012 Because it would be fucking stupid and full of useless extra words that have no meaning. Syntax is far superior to the written and spoken language for quicker interpretation. Link to comment
myonlake Posted July 1, 2012 Share Posted July 1, 2012 No one said it's not possible. I know many people who makes up their own programming language and uses it like they want. Just learn all the basics of basic programming languages and there you go. Link to comment
Jaysds1 Posted July 1, 2012 Share Posted July 1, 2012 (edited) This sentence: When a player dies, give the attacker 3 exp points; When a player gets 100 exp points then level him up 1 level; When a player dies, give the attacker 100 money; When a player joins, give them a random team between( "blue" , "red" ); When a player dies, show the attacker for 5 seconds; When a player dies. display on screen in small text on the right hand side the attacker name and weapon he used; in Script: --Server-side addEventHandler("onPlayerWasted",root,function(_,attacker) --When a player dies if(attacker~=source)then setElementData(attacker,"Points",getElementData(attacker,"Points")+3) --give the attacker +3 exp points givePlayerMoney(attacker,100) --give the attacker 100 money setCameraTarget(source,attacker) --show the attacker for 5 seconds setTimer(setCameraTarget,5000,1,source,source) if(attackerPnts==100)then --When a player gets 100 exp points then setElementData(attacker,"Level",getElementData(attacker,"Level")+1) --level them up +1 level end end end) addEventHandler("onPlayerJoin",root,function() --When a player joins local teams = {"blue","red"} setPlayerTeam(source,getTeamFromName(unpack(teams))) --give them a random team between( "blue" , "red" ) end) --Client-side addEventHandler("onClientPlayerWasted",root,function(killer,wep) --When a player dies if(killer~=source)then local wepName = getWeaponNameFromID(wep) if(isElement(killLbl) and isElement(wepLbl))then guiSetText(killLbl,"Killer: "..killer) guiSetText(wepLbl,"Killer: "..wepName) else local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 300, 100 killLbl=guiCreateLabel((screenHeight/3 - windowHeight/3),(screenWidth/3 - windowWidth/3),windowWidth,windowHeight,"Killer: "..killer,false) --display on screen in small text on the right hand side the attacker name wepLbl=guiCreateLabel((screenHeight/4 - windowHeight/4),(screenWidth/3 - windowWidth/3),windowWidth,windowHeight,"Weapon: "..wepName,false) --and weapon he used end end end) addEventHandler("onClientPlayerSpawn",root,function() if(isElement(killLbl) and isElement(wepLbl))then destroyElement(killLbl) destroyElement(wepLbl) end end) Edited July 1, 2012 by Guest Link to comment
MIKI785 Posted July 1, 2012 Share Posted July 1, 2012 That's stupid idea... scripting just can't be like this.. Link to comment
Anderl Posted July 1, 2012 Share Posted July 1, 2012 It can, if you want. @@Jaysds1, setElementData(attacker,"Points",getElementData(attacker,"Points")+3) First time, element data Points doesn't, so it will be false. You must check if it is set. Also variable attackerPnts is not defined and... setPlayerTeam(source,getTeamFromName(unpack(teams[math.random(#teams)]))) unpack function is not needed here. Link to comment
Jaysds1 Posted July 1, 2012 Share Posted July 1, 2012 oh, wow, I was rushing it, but thanks Link to comment
CapY Posted July 2, 2012 Share Posted July 2, 2012 Because its lame. Still scriptable.. Link to comment
12p Posted July 2, 2012 Share Posted July 2, 2012 Because its lame. Still scriptable.. People already said it's scriptable. But as qais said, it's lame, so it's highly doubted anyone will do it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now