Jump to content
MakeWebGames

make your attack outcomes more Impressive so your users dont see the same outcome


Recommended Posts

Posted

In the original V2 script when a user atacks or is being attacked its always a default message that appears example is below..

DONT USE THIS AS ITS FROM THE ORIGINAL V2

For you htting them

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And for them hitting you....

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

So as you can see the wording is always the same unless you change it manualy in the script and even then youd need to do it every week so suers dont get bored...

However this little mod can change all that you can write as many outcomes as you want and when the user is attacking they will see different outcomes after every hit..

so open your attack.php and add these under the include"globals.php";

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Now create 4 txt files with these names

youhit.txt

theyhit.txt

youfail.txt

theyfail.txt

all you need to do now is add some wording to the files and where the YOU HIT is just use $word For YOU HIT and $word2 FOR THEY HIT and $word3 FOR YOU FAIL and $word4 for THEY FAIL....

You can do the exact same for the Event add just create another file and do as above :)

EXAMPLE BELOW incase i confused anyone

You Hitting them

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And for them hitting you....

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted

I have only given a Guideline for the above DONT use the attack parts only the PART that needs adding which is this to attack.php

$filename="youhit.txt";$words=file($filename);shuffle($words);$word=$words[0]; // THIS IS FOR YOU HIT THEM

$filename="theyhit.txt";$words2=file($filename);shuffle($words2);$word2=$words2[0]; // THIS IS FOR THEY HIT YOU

$filename="youfail.txt";$words3=file($filename);shuffle($words3);$word3=$words3[0]; // THIS IS FOR YOU MISSED THEM

$filename="theyfail.txt";$words4=file($filename);shuffle($words4);$word4=$words4[0]; // THIS IS FOR THEY MISSED YOU

And then use the Oucome messages where ever you want them

Oh and upload all the TXT files to your server

  • 1 month later...
Posted
Can you clarify the txt files?

 

In the txt files, how do we write the message?

i think he means something like this

youhit.txt ( Illusions might need to clarify this as you said )

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

wrx

Posted

I see why everyone is confused cos ive just re-read what i put and it confused me aswell lol

Ok in a nutshell on the statement where YOUHIT you need to make the youhit.txt with various different statements for that particular outcome. So

print "<font color=red>{$_GET['nextstep']}. Using your {$r1['itmname']} you hit {$odata['username']} doing $mydamage damage ({$odata['hp']}) $word</font>

\n";

$_SESSION['attackdmg']+=$mydamage;

$_SESSION['attacklog'].="<font color=red>{$_GET['nextstep']}. Using {$myabbr} {$r1['itmname']} {$ir['username']} hit {$odata['username']} doing $mydamage damage ({$odata['hp']})</font>

\n";

}

the $word statement on this one will call for the file called youhit.txt

This being

$filename="youhit.txt";$words=file($filename);shuffle($words);$word=$words[0];

so for the statement you youfail use $word3 on the statment for youfail

and for theyhit use $word2 for the statment theyhit

and for theyfail use $word4 and for theyfail

Hope that clears things up

Posted

Thanks for the info.

 

However, call me stupid (no ... dont really) but i was more confused by the txt file. How is this laid out?

Like this? (as wrx posted)

attack

kick

shank

backhand

 

or something else? Is the txt file really that simple?

Posted

example on the theyfail.txt

you could put something like

Tried to hit you but fell over

Tried to hit you but at the last minute collapsed getting up quickly to continue

Tried to hit you as you strafe left they slide passed you your unharmed

remember each time you press ENTER that will count as a new text

Posted

That way works too (and is more efficient for those that care)..

But you may want to add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

above that to ensure there are no errors (error_reporting(E_ALL))

Posted

Yeah that is there just forgot to inc in the cut n paste. I use it for a variety of different things through the game.

You can also span style color the text making the quotes different colors.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...