Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Raising swordpower above level 4 via script. (https://forums.graalonline.com/forums/showthread.php?t=83623)

Soala 01-11-2009 08:08 PM

Raising swordpower above level 4 via script.
 
So, it's come to light that I am in need of automatically setting a player's swordpower via a script, which may raise it higher than 4. However, it has come to my attention that I can only raise it to level 4 via the script, and raising it otherwise has to be done in that players attributes.

Is there a way of using player.swordpower = # or any other method via a script that I can use to do this ?

DustyPorViva 01-11-2009 09:24 PM

Quote:

Originally Posted by alexandralove (Post 1456279)
So, it's come to light that I am in need of automatically setting a player's swordpower via a script, which may raise it higher than 4. However, it has come to my attention that I can only raise it to level 4 via the script, and raising it otherwise has to be done in that players attributes.

Is there a way of using player.swordpower = # or any other method via a script that I can use to do this ?

I've never had any success with player.swordpower, clientside or serverside.

Try using:
setsword(player.swordimg,20);

Sage_Shadowbane 01-11-2009 10:13 PM

From what I know, the max level is indeed 4. So the only way that I can think you for you to be able to do it, is create a custom health system and a custom sword system.

DustyPorViva 01-11-2009 10:16 PM

Quote:

Originally Posted by Sage_Shadowbane (Post 1456314)
From what I know, the max level is indeed 4. So the only way that I can think you for you to be able to do it, is create a custom health system and a custom sword system.

No, swordlevels range from -20 to 20. Though this depends on if the server has healingswords set in serveroptions, as well as the max sword level.

jami_jamie 01-11-2009 10:26 PM

Well, the maxsword limit is set on 20, and healswords is set to true.

Before I asked Soala to post this I tried setsword(player.swordimg, 7), but to no avail.

I thought the sword level of 4 was an old limit, but it seems it's still in place...

*EDIT*

I can set swords above level four in attributes, I always have been able to. It's only via script, such as player.swordpower = 5, that a problem actually arises, and it just ignores the setting of it altogether and leaves it on its current swordpower.

xXziroXx 01-12-2009 05:03 PM

obj.swordpower is capped at 4, and obj.shieldpower at 3, when it comes to scripts.

Crow 01-12-2009 06:27 PM

I've always had problems with swordpower. Try doing something like this:
PHP Code:

temp.sword player.swordimg;
player.swordimg "swordX.png";
player.swordpower X;
player.swordimg temp.sword

Replace X with the swordpower. Unsure if it works above 4.

sssssssssss 10-23-2009 07:34 PM

I know this is kind of old, but none of this works on my server at all to even set the swordpower to 4. I have healingswords true and swordpower 4 in server options too.
Even the chest wont work for lv 4 sword. -_-
on some instances, the sword will set, with a new chest, but if you set ANY player attributes in rc, it resets to 1.

xXziroXx 10-25-2009 02:29 PM

Quote:

Originally Posted by sssssssssss (Post 1533503)
I know this is kind of old, but none of this works on my server at all to even set the swordpower to 4. I have healingswords true and swordpower 4 in server options too.
Even the chest wont work for lv 4 sword. -_-
on some instances, the sword will set, with a new chest, but if you set ANY player attributes in rc, it resets to 1.

Sounds to me like you have a Weapon NPC constantly setting it to 1. I suggest using "/npc scan weapons swordpower" on RC and see if it yields any results.

sssssssssss 10-25-2009 04:42 PM

Nothing found in the scan. I dont think anything is in any npc setting it to 1, because if, after having a lv4 sword and setting attributes, the only way to get back to a lv3 sword is to set the swordimg to sword3.png and then swordpower to 3, then it will stay.

It's awfully strange. Now we notice it's only happening to certain people, because others have lv4, and we changed their attributes, and thing happens to them.

sssssssssss 10-28-2009 03:04 AM

no one? :(

fowlplay4 10-28-2009 03:12 AM

I'm not sure if there's a difference or not but, "/npc scan weapons whatever"
doesn't work for me but, "/scriptscan weapons whatever" does.

sssssssssss 10-28-2009 04:46 AM

Quote:

Scanning for 'swordpower' in weapons:
Could not find any matching script.
Still nothing. It's very strange. It doesnt set back to lv1 unless, and only if, I set player attributes in rc, even if i dont actually change anything. This is why I'm thinking something weird is going on beyond any weapons, npc, or class setting it, besides the fact I know they arn't because I've searched them auto and manually, and i made most of the weapons on right now.

sssssssssss 11-03-2009 09:46 PM

I wish this thread wasen't in here b/c most people don't check it. :(
Cant even set it in player attributes to lv4, even if i set the sword img to sword4.png too.
Any other ideas?

maximus_asinus 11-03-2009 09:56 PM

Could this be part of an old security feature within the client itself? I think a long while back there was security measures put in place to prevent players from 'hacking' themselves a level 4 sword. I am not sure if it was exclusive to Classic, or if it was coded into the client, or if I'm not thinking clearly at all and what I'm recalling didn't actually happen.

Crow 11-03-2009 09:59 PM

Quote:

Originally Posted by maximus_asinus (Post 1536231)
Could this be part of an old security feature within the client itself? I think a long while back there was security measures put in place to prevent players from 'hacking' themselves a level 4 sword. I am not sure if it was exclusive to Classic, or if it was coded into the client, or if I'm not thinking clearly at all and what I'm recalling didn't actually happen.

There are quite a bunch of leftovers like these, yup.

maximus_asinus 11-03-2009 10:08 PM

Quote:

Originally Posted by Crow (Post 1536233)
There are quite a bunch of leftovers like these, yup.

Then it is futile to even attempt to change sword power (with the security measure in place I mean)? Even if it isn't exactly futile, wouldn't it be best to try and avoid building a system overtop existing security within the client? It seems to me that it would cause a whole mess of problems.

sssssssssss 11-06-2009 05:24 AM

Well it works fine for other people. The server owner can change attributes and keep the lv4 sword, nothing happens to him, and many others.

sssssssssss 11-07-2009 04:20 AM

Should I put this in a "bugs" section of the forum, or is there an actual way to fix this?

Codein 11-07-2009 09:16 AM

Isn't there a server option for max sword power?

Soala 11-07-2009 06:48 PM

Quote:

Originally Posted by Codein (Post 1537013)
Isn't there a server option for max sword power?

There is o_o never tried it tho.
That thread of mine is old by the way.

Hiro 11-07-2009 08:03 PM

Quote:

Originally Posted by alexandralove (Post 1537046)
There is o_o never tried it tho.
That thread of mine is old by the way.

there is the option, but it doesn't exactly do much besides letting some people have level 4 swords. it's not the setting of the swords, it's keeping it there

xXziroXx 11-07-2009 08:34 PM

You probably need to set normaladminscanchangegralats to true, otherwise only level 4 RC's can alter sword/shield/gralats etc.

sssssssssss 11-07-2009 09:28 PM

It is set to true, and the server owner can't even set me or hiro a lv4 sword, but apparently it's only me, hiro, and maybe 1 or 2 more players that have had this problem, everyone else is fine.

sssssssssss 11-08-2009 08:56 PM

help stefan.... :(

sssssssssss 11-20-2009 09:09 AM

Really, help stefan or someone who knows.... please....
This is a rather annoying issue.


All times are GMT +2. The time now is 01:30 AM.

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