PDA

View Full Version : plz pr0 scriptorz help.


k_killar
05-03-2008, 01:53 PM
how to get rid of sword on classic.

Robin
05-03-2008, 01:58 PM
Not sure if things have changed much but four years ago you'd have to make a custom movement script x-x


EDIT:
Or you could just use the sodding search button

And it was a thread I replied to!

*is sheepish*

http://forums.graalonline.com/forums/showthread.php?t=52133&highlight=disablesword

Hey but it was four years ago :P

Robin
05-03-2008, 03:39 PM
We have a search feature for a reason.

Make a custom movement system, easy enough.

I love how you said.... Uh everything I said. Only even less helpful than myself, and that really is saying something.

Read all the posts? I mean there's only two here man.

Stop trying to increase your post count, it has no bearing on your life.

Chompy
05-03-2008, 03:49 PM
Stop trying to increase your post count, it has no bearing on your life.

I have to agree..




Anyways, on topic..

Making your own movement system, or fighting system would solve your problem;o

Here's an easy script that shows you how you can change the sword ani

//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}

function onTimeout() {
if (player.ani == "sword") {
setani("punch", 0);
// Change 'punch' into gani you want to display instead of sword
}
setTimer(0.05);
}


But to disable classic swords, probably disableweapons();* or disabledefmovement();

But using either of this makes it that you have to make a system to.. enable weapons or movement in your way being..
(* dunno about this one, can't remember it from the top out of my head)

Crow
05-03-2008, 04:53 PM
how to get rid of sword on classic.

Dude, we have the forum search for a reason.

A custom movement system is probably the way you want to go to disable swords though.


:rolleyes:

cbk1994
05-03-2008, 04:58 PM
disableweapons() is certainly the best way to go that I can think of if you want to stick with the default movement system. Though, I think some people have made very nice replicas, perhaps check the code gallery.

What I recommend is making a custom Q-Menu and then using disableweapons(); You actually wouldn't even need a custom Q menu, just a script like this:


//#CLIENTSIDE
function onKeyPressed( code, key )
{
if ( key == "d" )
{
( @ player.weapon ).trigger( "onWeaponFired", "" );
}
}

Crow
05-03-2008, 05:02 PM
//#CLIENTSIDE
function onKeyPressed( code, key )
{
if ( key == "d" )
{
( @ player.weapon ).trigger( "onWeaponFired", "" );
}
}


Should actually look like this:


//#CLIENTSIDE
function onKeyPressed(code, key) {
if (key == "d") {
findWeapon(player.weapon.name).trigger("WeaponFired", nil);
}
}


Well, some things are preference, but trigger("Event", nil) triggers "onEvent", not "Event", and I had some problem triggering weapons when not using findWeapon() before, might have been me back then though.

cbk1994
05-03-2008, 05:05 PM
Should actually look like this:


//#CLIENTSIDE
function onKeyPressed(code, key) {
if (key == "d") {
findWeapon(player.weapon.name).trigger("WeaponFired", nil);
}
}


Well, some things are preference, but trigger("Event", nil) triggers "onEvent", not "Event", and I had some problem triggering weapons when not using findWeapon() before, might have been me back then though.

Fair enough, I just posted a rough example. I haven't used trigger() for a while.

Also, you don't need findWeapon, you can just do ( @ player.weapon.name ).trigger( ... ); last I checked.

Crow
05-03-2008, 05:06 PM
Fair enough, I just posted a rough example. I haven't used trigger() for a while.

Also, you don't need findWeapon, you can just do ( @ player.weapon.name ).trigger( ... ); last I checked.

I stated why I did it, I guess it's also preference ;P

Chompy
05-03-2008, 05:36 PM
Also, you don't need findWeapon, you can just do ( @ player.weapon.name ).trigger( ... ); last I checked.

That's a bad habit though I think, because then you should be able to do
(@ player.account).chat or Chompy.chat which you can't ;o

cbk1994
05-03-2008, 05:45 PM
I stated why I did it, I guess it's also preference ;P
Oh, I didn't see that.
That's a bad habit though I think, because then you should be able to do
(@ player.account).chat or Chompy.chat which you can't ;o
Perhaps, but again it would fall under personal preference.

Chompy
05-03-2008, 08:36 PM
Perhaps, but again it would fall under personal preference.

Probably..