PDA

View Full Version : Eliminating the Sword


Angel_Light
12-02-2007, 09:42 PM
How do I get rid of the default sword? I got setSword( NULL, 0); and replaceAni( "sword", NULL); Which get rid of the physical part of the sword. But a player can still walk up to a bush push S, and with the player ani staying idle, the bush is miraculously being cut. I.E. the bush is vanishing and the leaps are showing but the player does nothing.

Rapidwolve24
12-02-2007, 10:24 PM
Custom attack system.

Angel_Light
12-02-2007, 11:03 PM
I have that, It is just not removing the sword effect.

coreys
12-02-2007, 11:36 PM
disableWeapons();

Kyranki
12-02-2007, 11:59 PM
enablefeatures() is actually the best way to do it.

Angel_Light
12-03-2007, 12:42 AM
thanks guys

cbk1994
12-03-2007, 02:26 AM
You can disable the sword through enablefeatures?

Crow
12-03-2007, 04:26 PM
You can disable the sword through enablefeatures?

Actually...no.

coreys
12-03-2007, 04:37 PM
enablefeatures() is actually the best way to do it.
...no o_o
You have to use disableWeapons(); o.0 There is not feature in enablefeatures for sword usage...

Angel_Light
12-03-2007, 11:01 PM
yeah I used disableweps

Luigi203
12-03-2007, 11:47 PM
disablesword()?

Crow
12-03-2007, 11:55 PM
disablesword()?

Doesnt exist.

napo_p2p
12-03-2007, 11:56 PM
disablesword()?

I could've sworn that disablesword was a command, but it doesn't appear in the list of commands on the wiki. It either didn't make it to documentation, is an old (now unsupported) command, or was never a command to begin with.

DustyPorViva
12-04-2007, 02:08 AM
You might be thinking of hidesword(int), used to be used on old Graal to hide the sword in case you used the sword sprite indexes and didn't want the sword to be shown.

Kyranki
12-04-2007, 02:43 AM
Actually, Vash. enablefeatures(params); disables all the features except for those that are listed in the parameters. And one of those parameters is the ability to use the sword. Which means if you use enablefeatures(params) and do not include (I forget the number of the param for weapons) you will lose the ability to use the sword and weapons.

Considering this is how I do it on Arca, It is possible to disable weapons using enablefeatures(params) unless I "ZOMGWTFPWNED the graal servers" to make this work.

Angel_Light
12-04-2007, 05:13 AM
look at the wiki. You can disable the qmenu though.

napo_p2p
12-04-2007, 06:07 AM
Actually, Vash. enablefeatures(params); disables all the features except for those that are listed in the parameters. And one of those parameters is the ability to use the sword. Which means if you use enablefeatures(params) and do not include (I forget the number of the param for weapons) you will lose the ability to use the sword and weapons.

1 - M key (map)
2 - P key (pause)
4 - Q key (weapon select)
8 - R key (show ratings)
0x10 - S+A key combination for dropping items
0x20 - S+D key combination for switching weapons
0x40 - TAB key (if disabled then you cannot switch to the chat field with TAB)
0x80 - display of chat text
0x100 - display of the hearts over player heads
0x200 - display of nicknames
0x400 - toall/PM-icons on the minimap
0x800 - right-click on players opens their profile
0x1000 - emoticons (disable it if you want to do other stuff with control+keys)
0x2000 - Alt+5 for making snapshots
0x4000 - Alt+8/9 for zooming
0x8000 - the logframe where savelog stuff is added

There is no flag for weapons/swords for enablefeatures.

Kyranki
12-04-2007, 06:35 AM
Maybe it's showstats dunno.

Inverness
12-04-2007, 12:33 PM
Thats called being owned in the face, Stan.

disableweapons; disables the player’s sword+bombs+darts

Crow
12-04-2007, 04:13 PM
Maybe it's showstats dunno.

GUI.

coreys
12-04-2007, 04:34 PM
Thats called being owned in the face, Stan.

<3!

Tigairius
12-04-2007, 09:01 PM
Maybe it's showstats dunno.

Sometimes you seem to be too confident in yourself. You should double check sometimes to refrain from making yourself look stupid in the future, I do!

cbk1994
12-04-2007, 11:09 PM
Actually, Vash. enablefeatures(params); disables all the features except for those that are listed in the parameters. And one of those parameters is the ability to use the sword. Which means if you use enablefeatures(params) and do not include (I forget the number of the param for weapons) you will lose the ability to use the sword and weapons.

Considering this is how I do it on Arca, It is possible to disable weapons using enablefeatures(params) unless I "ZOMGWTFPWNED the graal servers" to make this work.

Think before you speak.

Kyranki
12-05-2007, 03:50 AM
I get the point. o_o

If so, would someone kindly care to explain what enablefeatures() is doing that makes it so the s button doesn't work then?

Edit: Ok, wait. I have a custom movement system so I feel like an *******. But it doesn't use disableweapons() anywhere. Would disabledefmovement() disable the sword as well? o_O

Edit 2: Yeah, disabledefmovement() is what was disabling the sword (tested it first ;o).

Rapidwolve24
12-05-2007, 04:10 AM
I get the point. o_o

If so, would someone kindly care to explain what enablefeatures() is doing that makes it so the s button doesn't work then?

Edit: Ok, wait. I have a custom movement system so I feel like an *******. But it doesn't use disableweapons() anywhere. Would disabledefmovement() disable the sword as well? o_O

Edit 2: Yeah, disabledefmovement() is what was disabling the sword (tested it first ;o).

Read napo's post, enablefeatures keeps the declared bitmaps enabled.

For example:
enablefeatures( 1 );
Would keep the "M" button enabled for Graal's map viewer. Every other listed feature will not work.

If you want to add another feature append a "-" sign and then another bitflag.
enablefeatures( 1 - 2);
Would enable both the "M" button for the default map viewer, and the "P" to enable Graal's standard pause.

---

disabledefmovement(); disables the player's ability to move, not sure if it prevents the player from swinging or not.

BigBear3
12-05-2007, 04:10 AM
Sometimes you seem to be too confident in yourself. You should double check sometimes to refrain from making yourself look stupid in the future, I do!

Looooooooooooooooooooooooooool.

Angel_Light
12-05-2007, 04:33 AM
also enablefeatures( 1 | 2 | 4); "|" works too.

Kyranki
12-05-2007, 04:36 AM
@ rapidwolve, I tested some with only a weapon with disabledefmovement() and without any weapons at all. He could swing without the weapon and when the weapon was added he couldn't swing.

Rapidwolve24
12-05-2007, 04:39 AM
@ rapidwolve, I tested some with only a weapon with disabledefmovement() and without any weapons at all. He could swing without the weapon and when the weapon was added he couldn't swing.

What weapon are you talking about?

Kyranki
12-05-2007, 05:00 AM
It was a custom movement system :o I'm referring to a Weapon NPC of course.

Rapidwolve24
12-05-2007, 05:02 AM
It was a custom movement system :o I'm referring to a Weapon NPC of course.

So when your custom weapon is equipped (or in the inventory) the character cannot swing, but when it isn't they can? I don't quite follow you.

Kyranki
12-05-2007, 05:04 AM
I was testing the usage of disabledefmovement() and it's relevancy as far as removing functionality for the default sword swing.

I removed all the testers weapon npcs. Then had them relog in. I had them press s and the default swing worked. Then I added the custom movement to them which contains the "disabledefmovement()" function and asked them to press s again and it didn't work.

Get me? :p

Rapidwolve24
12-05-2007, 05:07 AM
I was testing the usage of disabledefmovement() and it's relevancy as far as removing functionality for the default sword swing.

I removed all the testers weapon npcs. Then had them relog in. I had them press s and the default swing worked. Then I added the custom movement to them which contains the "disabledefmovement()" function and asked them to press s again and it didn't work.

Get me? :p

Oh, my bad I completely misunderstood. Hmm, then apparently disabledefmovement() does disable the default sword swing. Never really used it for that though, doesn't really seem practical but you have a custom movement system so that makes sense.

Tolnaftate2004
12-05-2007, 06:35 AM
If you want to add another feature append a "-" sign and then another bitflag.
enablefeatures( 1 - 2);
Would enable both the "M" button for the default map viewer, and the "P" to enable Graal's standard pause.

I hope you mean "+".

Crow
12-05-2007, 05:10 PM
I hope you mean "+".

You stole my post :<

Angel_Light
04-12-2008, 05:18 AM
*bump* still no working solution.

EDIT: disableweapons()/disablemovement() work, but seem quite unpractical. Is there a way to just disable the sword? Also is there anyway to make so the player can not pick up the tile bushes?

DustyPorViva
04-12-2008, 05:21 AM
disableweapons and simply rescript the weapon(D)?

Angel_Light
04-12-2008, 05:29 AM
I GOT IT!!! Without disabling weapons. I feel really stupid for not realizing this earlier. XP

setSword( "", -1);

will disable it all together.

Now as for the bush matter. I'm still lost other than using disabling the movement System.

DustyPorViva
04-12-2008, 05:40 AM
That's odd... I thought negatives just made it a healing sword.
Like I said, you can simply just disable weapons... which will only disable the sword and weapon, and rescript the weapons(if you still need to use them). It's not that hard to rescript the weapon function.

Angel_Light
04-12-2008, 06:04 AM
Well. The weapons sys I already have needs weapons to be enabled (for onKeyPressed and stuff to work)

DustyPorViva
04-12-2008, 06:05 AM
O.o...

Angel_Light
04-12-2008, 06:27 AM
It's just the way it works. My scripting style is 'unique'. :P

EDIT: Gah! IT worked last night somehow but when I woke up today and started to play the sword thing was back. =[

Angel_Light
04-13-2008, 08:16 PM
*bump*

DustyPorViva
04-13-2008, 08:27 PM
It's hard to help when your system is so 'unique' that there's no way to tell what can help and what can't. I don't think we can help you.

cbk1994
04-13-2008, 08:33 PM
Do you have a custom movement system?

Angel_Light
04-14-2008, 01:37 PM
No, I don't have a custom movement system. I have few other weapons that rely on it and a few it's features. The weapons aren't so unique, I just a need a simple way to remove the sword, without using disableweapons; or disabledefmovement;

xXziroXx
04-14-2008, 03:44 PM
No, I don't have a custom movement system. I have few other weapons that rely on it and a few it's features. The weapons aren't so unique, I just a need a simple way to remove the sword, without using disableweapons; or disabledefmovement;

Then you can't. You'll have to use disableWeapons(); and then script a custom inventory. I have a somewhat working version here (http://forums.graalonline.com/forums/showthread.php?t=68711), the bugs I described in the thread might be able to be "repaired" these days - some new features might've been added, I have no idea.

Angel_Light
04-15-2008, 11:30 PM
I have a custom inventory system, but the way it reads weapons it needs weapons to be enabled. Also, anything is possible. Just highly improbable. ;]

DustyPorViva
04-15-2008, 11:47 PM
I have no idea why you'd need weapons enabled.

xXziroXx
04-16-2008, 12:22 AM
Me either. Work around it.

cbk1994
04-16-2008, 02:10 AM
Why would you need weapons enabled for a custom inventory x.x