Issue information

Issue ID
#8169
Status
Fixed
Severity
Medium
Started
Emistry
Apr 29, 2014 10:41
Last Post
pan
May 7, 2014 0:16
Confirmation
Yes (0)
No (1)

Emistry - Apr 29, 2014 10:41

[b]Sample NPC Script :[/b][code=:1] prontera,155,181,5 script Sample 757,{ for( .@i = GD_APPROVAL; .@i <= GD_DEVELOPMENT; .@i++ ){ guildskill .@i,1; } dispbottom "Gained all Guild Skills"; end; } [/code]

[b]Problem :[/b]
The script work fine, the script command is actually work fine .... but the Guild wont gain the Guild Skill unless the Guild have remaining skill points.

[url="https://github.com/HerculesWS/Hercules/blob/master/src/map/guild.c#1309"]https://github.com/HerculesWS/Hercules/blob/master/src/map/guild.c#1309[/url][code=:1309] if( g->skill_point > 0 && [/code]
it make the script command unable to up/add new guild skill because guild doesnt have extra skill point for it.


if based on Documention from [size=4][url="https://github.com/HerculesWS/Hercules/blob/master/doc/script_command.txt"]https://github.com/HerculesWS/Hercules/blob/master/doc/script_command.txt[/url][/size][quote]

This command will bump up the specified guild skill by the specified
number of levels.


[b]// This would give your character's guild one level of Approval [/b]
[b]// (GD_APPROVAL ID 10000).[/b] Notice that if you try to add two levels of
// Approval, or add Approval when the guild already has it, it will only
// have one level of Approval afterwards.
[b]guildskill 10000,1;[/b][/quote]
the script command should have success to up the guild skill level ....


I tried to fix by increasing the guild point by modify the script command a bit...too bad...failed..maybe this is not the solution...O__O
[url="http://upaste.me/6de190"]http://upaste.me/6de190[/url]

Dastgir Pojee - Apr 29, 2014 11:07

[quote]
You might want to make a quest for getting a certain guild skill, make it
hard enough that all the guild needs to help or something. Doing this for
the Glory of the Guild skill, which allows your guild to use an emblem, is
a good idea for a fun quest.[b] (Wasting a level point on that is really
annoying :D)[/b][/quote]
Maybe it is intended, and it is nothing else but documentation problem?

This post has been edited by Dastgir Pojee on Apr 29, 2014 11:08

Emistry - Apr 29, 2014 11:52

[size=4]i think he refering wasting skill point on the Guild Glory Skill is annoying..and wasting point..[/size]

[size=4]the script command should have give the Guild Skill without affecting the current guild skill points...[/size]

IF this script command is built to help users to consume their current guild point...then...this script command is totally USELESS..
why would i need a script command to help me update my guild's skill when i can just manually click on it ??

Dastgir Pojee - Apr 29, 2014 12:44

(The one who implemented it made to use guild SkillPoints by purpose as he mentioned it in last line of guildskill documentation, so I guess its not a bug)
But I agree too for not removing GuildSkillPoints, and also it is not used anywhere in the scripts existing till now..

Your diff failed because the skill_points are fetched from sql (int_guild.c#1622),[code=auto:0] g = inter_guild_fromsql(guild_id);[/code]

This post has been edited by Dastgir Pojee on Apr 29, 2014 12:46

pan - Apr 29, 2014 23:03

It looks like as a documentation error rather than a bug, but I also agree with Emistry, a command that just uses skill points in this case would be pointless, unless the player isn't the guild master (gm), so I think that this script command should be updated to match the current documentation and I'll do so in a week unless someone posts here a good reason not to do so.
In a side note this command seems to be a way to mimic a command from the src, guild->skillup should only be used when there's skill points remaining as it's the same function that is used when a point is going to be spent, and it also seems that it's not possible to use *guildskillup on players that aren't gms.

pan - May 7, 2014 0:16

Fixed in [url="https://github.com/HerculesWS/Hercules/commit/9a425c11b61fb6f4e299013c7d8d9841129b8f45"]https://github.com/HerculesWS/Hercules/commit/9a425c11b61fb6f4e299013c7d8d9841129b8f45[/url]