Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-03-2008, 01:53 PM
k_killar k_killar is offline
graal veteran
k_killar's Avatar
Join Date: Aug 2007
Posts: 243
k_killar is infamous around these parts
Send a message via AIM to k_killar
plz pr0 scriptorz help.

how to get rid of sword on classic.
Reply With Quote
  #2  
Old 05-03-2008, 01:58 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
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...t=disablesword

Hey but it was four years ago :P
__________________

Reply With Quote
  #3  
Old 05-03-2008, 03:39 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Quote:
Originally Posted by cbkbud View Post
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.
__________________

Reply With Quote
  #4  
Old 05-03-2008, 03:49 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Robin View Post
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
PHP Code:
//#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)
__________________
Reply With Quote
  #5  
Old 05-03-2008, 04:53 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by k_killar View Post
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.


Reply With Quote
  #6  
Old 05-03-2008, 04:58 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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:

PHP Code:
//#CLIENTSIDE
function onKeyPressedcodekey )
{
  if ( 
key == "d" )
  {
    ( @ 
player.weapon ).trigger"onWeaponFired""" );
  }

__________________

Last edited by Darlene159; 05-03-2008 at 07:41 PM.. Reason: stop arguing
Reply With Quote
  #7  
Old 05-03-2008, 05:02 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbkbud View Post
PHP Code:
//#CLIENTSIDE
function onKeyPressedcodekey )
{
  if ( 
key == "d" )
  {
    ( @ 
player.weapon ).trigger"onWeaponFired""" );
  }

Should actually look like this:

PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey) {
  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.
Reply With Quote
  #8  
Old 05-03-2008, 05:05 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Crow View Post
Should actually look like this:

PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey) {
  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.
__________________
Reply With Quote
  #9  
Old 05-03-2008, 05:06 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbkbud View Post
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
Reply With Quote
  #10  
Old 05-03-2008, 05:36 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbkbud View Post
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
__________________
Reply With Quote
  #11  
Old 05-03-2008, 05:45 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Crow View Post
I stated why I did it, I guess it's also preference ;P
Oh, I didn't see that.
Quote:
Originally Posted by Chompy View Post
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.
__________________

Last edited by Darlene159; 05-03-2008 at 07:42 PM.. Reason: stop arguing
Reply With Quote
  #12  
Old 05-03-2008, 08:36 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbkbud View Post
Perhaps, but again it would fall under personal preference.
Probably..
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.