Author Topic: Frosty's scripting thread  (Read 18209 times)

0 Members and 1 Guest are viewing this topic.

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Frosty's scripting thread
« Reply #100 on: August 14, 2010, 02:22:36 am »
fixed the code in the bost above (accidentally declared style as single)

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #101 on: August 14, 2010, 08:20:58 pm »
tx tk

From: August 14, 2010, 08:37:38 pm
how do i boost bot HP? i want to make Boss Bots which are much harder to kill than normal bots (popular request)

From: August 14, 2010, 09:07:29 pm
btw, setplayerstat doesnt work on my server

Code: [Select]
unknown identifier 'SetPlayerStat'
« Last Edit: August 14, 2010, 09:07:29 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Frosty's scripting thread
« Reply #102 on: August 15, 2010, 02:30:55 am »
setplayerstat is for 1.5.1 only OMG

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #103 on: August 15, 2010, 03:32:33 am »
thats the question, What do i use? how did hexer do it? etc

and if its for 1.5.1 then why does this compile, in a seperate script?
Code: (pascal) [Select]
SetPlayerStat(ID, 'Health',999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999);
i dont get it, Shop.pas wont compile due to unknown identifier "setPlayerstat", yet adminstuff will compile perfectly with the same setplayerstat code

like, huh ???

i know that this wont do anything when its triggered but the fact that the exact same line will compile in one script but wont compile elsewhere is a mystery
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Frosty's scripting thread
« Reply #104 on: August 15, 2010, 04:23:39 am »
i dont get it, Shop.pas wont compile due to unknown identifier "setPlayerstat", yet adminstuff will compile perfectly with the same setplayerstat code
In Adminstuff.pas you have declared your own (empty) SetPlayerStat.

I really have no idea why. The reasoning behind the script doesn't make sense anywhere.


Either way, there is a max value for how much health you can have, so no matter how many 9's you put in there it's not really gonna make a difference. If you want to make a bot harder to kill, you would have to edit the damage thats being done in the OnPlayerDamage event.


Not that ten people haven't said that already, but I figure eventually he'll get it.
« Last Edit: August 15, 2010, 04:33:22 am by Boblekonvolutt »

Offline kosik231

  • Major
  • *
  • Posts: 70
  • Where can I find Your soul?
Re: Frosty's scripting thread
« Reply #105 on: August 15, 2010, 04:34:28 am »
why you dont use SpecialBots script? you can make bosses with this :) just use "search" option and download it, configure what you want and start server ^^
For signatures, you are allowed only one image in your signature which may not be wider and taller than 300 and 125 pixels, and may not be over 20kB in file size. No BMPs are allowed.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Frosty's scripting thread
« Reply #106 on: August 15, 2010, 06:09:19 am »
idea of more hp is simple: reduce damage in OnPlayerDamage.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline VinceBros

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 275
Re: Frosty's scripting thread
« Reply #107 on: August 15, 2010, 03:13:29 pm »
Do something like:

If it's the boss, do 25% of the normal damage..

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #108 on: August 15, 2010, 06:39:07 pm »
tx guys :D

From: August 17, 2010, 01:31:44 pm
i have a new problem,tyrying to use some sytax that only loops through players names until it comes accross a zombie, it then stops looping and does the code

Code: (pascal) [Select]
   if Lowercase(Text) = '/bossbot' then begin;
     for i := 1 to 32 do until (Idtoname(i) = 'Mr.Zombie') do if Idtoname(i) = 'Mr.Zombie' then begin
       Command('/kick '+inttostr(i)+'');
       Command('/addbot2 MRZOMBIEW');
       WriteConsole(0,'You Hear the distant roar of a warlord zombie, that cant be good...', $00FFEE22);
     end
   end;

i cant figure out how to get it to work, right now it wont compile, but the code below will, only problem is, nothing happens when the command is typed

Code: (pascal) [Select]
   if Lowercase(Text) = '/bossbot' then begin;
     for i := 1 to Idtoname(i) = 'Mr.Zombie' do if Idtoname(i) = 'Mr.Zombie' then begin
       Command('/kick '+inttostr(i)+'');
       Command('/addbot2 MRZOMBIEW');
       WriteConsole(0,'You Hear the distant roar of a warlord zombie, that cant be good...', $00FFEE22);
     end
   end;
« Last Edit: August 17, 2010, 01:31:44 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Frosty's scripting thread
« Reply #109 on: August 18, 2010, 06:19:53 am »
Tell you what? Your codes are more like an art, not working programs. When i watch them i think: "Beautiful, why that instruction isn't allowed? They'd own." I love especially the first one lol.

Working code:
Code: (pascal) [Select]
   if Lowercase(Text) = '/bossbot' then begin;
     for i := 1 to 32 do
       if IDToName(i) = 'Mr.Zombie' then begin
           Command('/kick '+inttostr(i)+'');
           Command('/addbot2 MRZOMBIEW');
           WriteConsole(0,'You Hear the distant roar of a warlord zombie, that cant be good...', $00FFEE22);
     end
   end;
« Last Edit: August 19, 2010, 03:23:42 am by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #110 on: August 18, 2010, 01:06:51 pm »
Sorry. Forgot to mention, I only want to kick and add one zombie at a time with this command, I already have another section of code just that replaces all zombies with my boss bots, my bad....:D
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Frosty's scripting thread
« Reply #111 on: August 18, 2010, 02:49:20 pm »
Code: (pascal) [Select]
   if Lowercase(Text) = '/bossbot' then begin;
     for i := 1 to 32 do
       if IDToName(i) = 'Mr.Zombie' then begin
           Command('/kick '+inttostr(i)+'');
           Command('/addbot2 MRZOMBIEW');
           WriteConsole(0,'You Hear the distant roar of a warlord zombie, that cant be good...', $00FFEE22);
           break;
     end
   end;

better?
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #112 on: August 18, 2010, 09:50:06 pm »
ahhhh, tx, now i know how to break a loop, literally, many thanks FalconPL and soz about the stupid question ;)
« Last Edit: August 18, 2010, 11:39:51 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Frosty's scripting thread
« Reply #113 on: August 19, 2010, 03:26:59 am »
I have great idea for you:
Instead of spaming in this thread, suggestion to join #soldat.devs @ quakenet.
IRC doesn't bite, try it.
« Last Edit: August 19, 2010, 06:42:42 am by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #114 on: August 19, 2010, 01:28:07 pm »
thanks :D
« Last Edit: August 20, 2010, 09:15:15 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #115 on: September 01, 2010, 01:31:45 pm »
new problem, for some reason my Biokills script wont work with my Shop script

cant figure out why (script names are links)

if anyone can figure out why this is happening i would appreciate it

i mean, the biokills script will compile but wont do anything while shop script is compiled

no time for IRC, im posting this at a last minute thing in the very early morning and i must go to work
check out my server! click here

If at first you don't succeed, Improvise! :D

DarkCrusade

  • Guest
Re: Frosty's scripting thread
« Reply #116 on: September 01, 2010, 01:43:34 pm »
Maybe try merging both scripts first? It's always the best to do that to keep things as simple as possible.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Frosty's scripting thread
« Reply #117 on: September 01, 2010, 04:46:58 pm »
Code: (pascal) [Select]
if CheckPlayerAdmin(Shooter) = True then begin
if Getplayerstat(Victim,'alive') = True then Result:=CreateBullet(GetPlayerStat(Victim,'x'), GetPlayerStat(Victim,'y') - 0, 0,0,1, 10, Shooter);

This. Lovin it.
It won't work for you (bio kills i mean) since your kill is always by weapon = 'Cluster grenade'. And what it does... lovin it. Seems you have very balanced server. I guess every player loves you for this <3

And i suggest you to look closer what CreateBullet returns. Pro tip: not damage.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #118 on: September 02, 2010, 12:43:53 am »
^^ thanks for the tip

only problem i have with that is, if i remove the  Result in that line it goes through some weird ass loop which seems to createbullet rfor every one damage, say for arguments sake the damage was 400, it creates 400 bullets, if i have it as Result it only does it once, any idea why thats happening?

thanks again

also the weapon = 'Cluster Grenade' is commented out so its not even being used, why commented out? because i use that occasionally

i mean it used to work but then i added something to shop then bio kills stopped working, so i dont think its the bio kills script, havent touched bio kills for ages now, only thing ive been working on is the shop script, i dunno... maybe i should just integrate the contents of BioKills with shop and see what that does?

thanks for the help tho falcon :D

edit: o crap i just realized what you meant, Bio kills wont apply to admins as the kills arent being done by the weps

many thanks, so sorry lol

but many thanks it was working perfect all this time
« Last Edit: September 03, 2010, 07:36:35 pm by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Frosty's scripting thread
« Reply #119 on: September 04, 2010, 06:26:25 am »
ok new problem:

trying to make a new gamemode

its a flamer racer script, only thing is, the checkpoints arent working

http://pastebin.com/Y2bTGFfp
« Last Edit: September 04, 2010, 07:06:35 am by frosty »
check out my server! click here

If at first you don't succeed, Improvise! :D