Top

Deathmatch


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  3.0
Scores Submitted  1
Date Added  May 17, 2008
Last Updated  May 31, 2008
Tags  criminal  deathmatch  dm  fireworm999  rs  runescape 

Introduction

** I do not edit it often, don't blame me if there still are errors **

A snippet which allows you to fight other people in RuneScape-Style.

* How to start: Type !dm in a channel and wait until someone replies!
* How to end: type !enddm in a channel ( must be +o )
* How to escape: If you're one of the players you can type !tele or !teleport to skip the game.
* How to fight: use one of the commands ( see dmcommandlist ).

--

* Commands:
[ !sgsspec -- !sgs ]
[ !zgsspec -- !zgs ]
[ !specags -- !ags ]
[ !specbgs -- !bgs ]
[ !specdds -- !dds ]
[ !specwhip -- !whip ]
[ !specdbow -- !dbow ]
[ !cbow ] [ !dh ]
[ !tele ] [ !stopdm ]
[ !eat ] [ !dmscore ]
[ !dmcompare ] [ !dmrank ]

( If you want to use a special attack, make sure ' spec ' is in the command. )

--
*** UPDATE: Thanks to Jonesy44 and Napa182 I managed to change the 200 lines hpbar to a 10 line
hp bar.
*** UPDATE: There's a flood protection added ( It's a small one but prevents getting flooded )

*** UPDATE: Added a loot system.. You can change the loot any time.

*** NOTE: If you check my other snippets, you'll see there's another dm snippet i've posted already, this one is alot different, way more features and a cooler color combination :)



%%% The looting %%%
First run your mIRC client and type /write loot.txt
After you've done the first step, /run loot.txt
It opens a notepad and enter things* you want... Chicken..Spade.. Funny stuff..
* = I have a list of loots you can use at: http://pastebin.ca/1034794
Please leave a comment if the link is dead


Grab the Code

Comments

  (18)  RSS
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 7:07 am
No comments? :o
jonesy44
Comments: 907
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 11:25 am
There must be a way to reduce those if statements..

instead of all this crap,

if (%Deathmatch.HPplayer2 = 1) { msg $chan 4•1 D14m 4[3 %Deathmatch.Player2 $+ : 4,4|4,4|||||||||9,4 1% 4,4|||||||||| 4] }

just do,
msg $chan 4•1 D14m 4[3 %Deathmatch.Player2 $+ : 4,4|4,4|||||||||9,4 %Deathmatch.HPplayer2 $+ % 4,4|||||||||| 4]
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 11:52 am
@ Jonesy44
I don\'t think so, in code-style it\'s hard to see but if you test it, you\'ll see those ||||||||| things is a hpbar.


^ That\'s how it looks.
If someone got an idea to reduce all those if\'s, tell me :)
jonesy44
Comments: 907
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 11:55 am
okay, use $str.

ex:
Code:
$str(character,no_of_times_to_repeat) 100% $str(character,no..)


btw, check out an old script of mine called \"Status Imgs\" or something, that used a system a little like this..
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 2:22 pm
Hmm, thanks :D
I\'ll read /help $str
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 2:29 pm
Okai i\'ve read it.
But this doesn\'t solve the problem right? you\'ll still get all those If statements, I think. This only replaces |||||||||| with $str(|,9) %deathmatch.HPplayer1 $str(|,9)
That\'s not the problem, but I need the color combinations with them too ( that\'s what forms the hpbar )
jonesy44
Comments: 907
 
mIRC Snippet:  Deathmatch
Posted on May 18, 2008 4:07 pm
okay, here\'s an example, translate it into your code.

Code:
var %maxhp = 10, %myhp = 40, myhpremain = %myhprem = $calc(%maxhp - %myhp)
msg $chan <color> $+ $str(|,%myhp) $+ %myhp $+ <color> $+ $str(|,%myhprem)


.. It will work if you apply it correctly >.>
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 10:49 am
I hardly get it but the max hp a player can get is 99, and the hpbar contains only 20 |\'s. So how can you use $str with %maxhp, it could form to 99 |\'s right?
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 10:50 am
and if you use $calc((%maxhp - %myhp) / 5) it can\'t be correct? unless you change the max hp to 100?
Or am I totally wrong?
jonesy44
Comments: 907
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 12:19 pm
You need to calculate it of course.

5 * 20 = 100, there\'s a starter equation :-)
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 1:58 pm
Huh wth Jonesy, I really don\'t get it O.O

Quote:

Code:
var %maxhp = 10, %myhp = 40, myhpremain = %myhprem = $calc(%maxhp - %myhp)
msg $chan <color> $+ $str(|,%myhp) $+ %myhp $+ <color> $+ $str(|,%myhprem)


In your code the %myhprem ends up negative but okai you say It\'d work if you apply it correctly so forget that.

But in my code there are Only 20 |\'s, else it ends up WAAAY to big.
Maybe i\'m wrong but I think your code can give 99 |\'s.
Wtf I really don\'t get it anymore.
jonesy44
Comments: 907
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 2:00 pm
oh shait, sorry the 40 should have been 4.
napa182
Comments: 996
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 2:05 pm
you could use somthing like this
Code:
$+($str($+(09,$chr(44),09,$chr(46)),$floor($calc(%Deathmatch.HPplayer1 / 1))),$str($+(04,$chr(44),04,$chr(46)),$floor($calc(99 - %Deathmatch.HPplayer1 / 1))))


or w/e ur var is just add it to where %Deathmatch.HPplayer1 is
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 2:23 pm
Omg thanks Jonesy <3 I found it.
I now use:

Code:

var %maxhp = 99, %myhp = %Deathmatch.HPplayer1, %hpremaining = $calc(%maxhp - %myhp)
msg $chan 04• 1D14m 4[3 %Deathmatch.Player1 $+ : 3,3 $str(.,$calc(%myhp / 3)) 4,4 $str(.,$calc(%hpremaining / 3))  7(1 %myhp $+ % 7) 4]


Fark, thanks man, you saved like 200 lines! ^_^
^ Wth you can\'t say the f word O.o

---

Oeyeah <3 100th comment
SnoooP
Comments: 343
 
mIRC Snippet:  Deathmatch
Posted on May 19, 2008 3:06 pm
nope you cant say the f word :P lol
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 20, 2008 9:53 am
Lmao @ SnoooP, I didn\'t know xD
Napa182 I don\'t know what $floor is, i\'ll read in /help $floor. Thank yuuu :)
I\'ll update the snippet too
jonesy44
Comments: 907
 
mIRC Snippet:  Deathmatch
Posted on May 20, 2008 11:23 am
;-)

F U C K :P
criminal
Comments: 122
 
mIRC Snippet:  Deathmatch
Posted on May 20, 2008 12:11 pm
LMFAO!
Fark owns you tbh ._.

--
About the snippet: Added a flood protection ( A small, very small one )

Please Register or Login to start posting comments.
Bottom