Jump to content
  • 0

Help with this script


Cephaler

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

Hey guys, once again I need your godlike scripting skills.

So, I am using this STALKER NPC ( which gives stalker the skill so it saves time having to dual log/ask someone to hit them ). However, whenever I change my equip, the skill disappears. No errors on map server or anything. If I relog, the skill returns. ( This bug is only in case I use the NPC, If I copy it normally via reproduce/plagiarism it stays normally even if I change my equip ).

Here is the script:

Mellina,47,83,4 script Stalker 747,{
if ( StalkerSkill != 0 )goto Remove_Skill;
if ( getskilllv(225) == 0 ) goto End_Talk;
if ( getskilllv(225) > 0 ) goto Start_Talk;
Remove_Skill:
skill StalkerSkill,0,0;
set StalkerSkill,0;
dispbottom "[ Stalker NPC ] : Previous Skills have been removed..";
dispbottom "[ Stalker NPC ] : Skill Icon remained. But without any effect";
end;
End_Talk:
mes "[ ^FF0000Stalker NPC^000000 ]";
mes "Please make sure you have the skills required to copy skills.";
close;
// -- Edit Format :   "<Skill Name>", for each case at a new line in order for a Better viewing..
Start_Talk:
mes "[ ^FF0000Stalker NPC^000000 ]";
mes "Choose which skill you want to copy..It costs however 500.000 to give you a skill.";
next;
switch(select("Jupitel Thunder",    // Case 1:
  "Storm Gust",    // Case 2:
  "Lord of Vermillion",   // Case 3:
  "Arrow Repel",    // Case 4:
  "Acid Demonstration",   // Case 5:
  "Spear of Ice",    // Case 6:
  "Wind Blade",    // Case 7:
  "Sacrifice",		   // Case 8:
  "Bowling Bash",    // Case 9:
  "Pressure"							  // Case 10:
)){   

// -- Edit Format :  callsub S_CopySkill,<Skill ID>,<Skill Level 10>,<Skill Cost>;
// -- Leave the Level as 10 better.because after they relog ..they will auto get level 10 Skills.
// -- I think can add up to 128 Case. Which is 128 Skills choose-able~
// -- If you want it to announce then add "announce" at the back of <skill cost> like Case 10.
case 1: callsub S_CopySkill,84,10,500000;    // Jupitel Thunder
case 2: callsub S_CopySkill,89,getskilllv(225),500000;    // Storm Gust
case 3: callsub S_CopySkill,85,10,500000;				  // Lord of Vermillion
case 4: callsub S_CopySkill,148,10,500000;   // Arrow Repel
case 5: callsub S_CopySkill,490,10,500000;   // Acid Demonstration
case 6: callsub S_CopySkill,537,10,500000;   // Spear of Ice
case 7: callsub S_CopySkill,540,10,500000;   // Wind Blade
case 8: callsub S_CopySkill,368,5,500000;   // Sacrifice
case 9: callsub S_CopySkill,62,10,500000;   // Bowling Bash
case 10: callsub S_CopySkill,367,5,500000;			   // Pressure

  }

S_CopySkill:
if ( Zeny < getarg(2)){
 mes "[ ^FF0000Stalker NPC^000000 ]";
 mes "You must have at least "+getarg(2)+" Zeny to get the Skill.";
 close;
 }
skill getarg(0),getarg(1),0;
set Zeny,Zeny-getarg(2);
set StalkerSkill,getarg(0);
dispbottom "[ Stalker NPC ] : Check Your Skill Tree Now under ' Misc' for the New Skill.";
    dispbottom "[ Stalker NPC ] : You must be 600/250 for the skill to be preserved or else it will disappear after you use it once."; 
close;
OnPCLoginEvent:
if ( StalkerSkill != 0 ){
skill StalkerSkill,getskilllv(225),0;
}
end;

}

And here some screens:

Note that: 1: The npc works fine without any errors, it gives me the skill.

2: If I change equips, the skill disappears!

3: If I relog, the skill returns.

This is a problem because during PVP / WOE / ETC it's not possible to change equips ( ANY equip ) and ruins the entire idea of the npc.

I just searched eathena and realized it's @Emistry scripts maybe you can help me ;)?

post-2028-0-10851400-1351044155_thumb.jpg

post-2028-0-46908200-1351044168_thumb.jpg

post-2028-0-08370900-1351044178_thumb.jpg

Link to comment
Share on other sites

15 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

This has always been an issue with the ' skill ' command. So far from what i've seen, the only way to fix it, is to give them the skill in an infinite-loop.

However, this is only an issue, if the player's character, cannot learn the skill normally (Not in it's skill tree).

Thus, you could always add the skill to the class' skill tree, but give it impossible to reach requirements (ex: Lvl 10 Basic Skill ' max is normally 9 ') that way, it'll appear in thier skill tree, just unable to learn it UNLESS they use the NPC.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

This has always been an issue with the ' skill ' command. So far from what i've seen, the only way to fix it, is to give them the skill in an infinite-loop.

However, this is only an issue, if the player's character, cannot learn the skill normally (Not in it's skill tree).

Thus, you could always add the skill to the class' skill tree, but give it impossible to reach requirements (ex: Lvl 10 Basic Skill ' max is normally 9 ') that way, it'll appear in thier skill tree, just unable to learn it UNLESS they use the NPC.

Interesting idea except I have no clue how to even begin to do it hahaha ;)

Also the infiniteloop one sounds easier than just adding a bunch of skills to the skill three of stalkers no?

Edited by Cephaler
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

setcloneskill

EDIT:

http://www.eathena.ws/board/index.php?showtopic=272712

weird, GmOcean already support this topic before and even explained to others how my commands works o.O

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

So I have to add this:

BUILDIN_FUNC(setcloneskill) {
TBL_PC *sd;
int skillid = script_getnum( st, 2 );
int skilllvl = script_getnum( st, 3 );
sd = script_rid2sd(st);
if ( sd == NULL || skillid == 1 )
return 0; // basic skill MUST not reset
if ( skillid == 0 || skilllvl == 0 ) {
sd->status.skill[sd->cloneskill_id].id = 0;
sd->status.skill[sd->cloneskill_id].lv = 0;
sd->status.skill[sd->cloneskill_id].flag = 0;
pc_setglobalreg( sd, "CLONE_SKILL", 0 );
pc_setglobalreg( sd, "CLONE_SKILL_LV", 0 );
clif_deleteskill(sd,sd->cloneskill_id);
sd->cloneskill_id = 0;
return 0;
}
if ( sd->status.skill[sd->cloneskill_id].id > 0 )
clif_deleteskill( sd, sd->cloneskill_id );
sd->cloneskill_id = skillid;
sd->status.skill[sd->cloneskill_id].id = skillid;
sd->status.skill[sd->cloneskill_id].lv = skilllvl;
sd->status.skill[sd->cloneskill_id].flag = 13;
pc_setglobalreg( sd, "CLONE_SKILL", skillid );
pc_setglobalreg( sd, "CLONE_SKILL_LV", skilllvl );
clif_addskill( sd, skillid );
return 0;
}

To script.c ( anywhere? )

Then I use this NPC:

prontera,160,180,5 script CopyCat NPC 123,{
set .@price,50000; //<--- Price for each skill.
setarray .@skilllist[0],14,19,20; //<--- Skill ID's Add more as needed.
setarray .@skillname$[0],"Cold Bolt","Fire Bolt","Lightning Bolt"; //<--- Skill Names (Need to store them in an array because, there is no, getskillname command T.T)
setarray .@skill_lvl[0],10,10,10; //<--- Level for each skill.
if(BaseJob != Job_Rogue){mes "Only Rogues, Stalkers, and ShadowChaser's may use this NPC."; close;}
mes "Which skill would you like to learn?";
mes "Please keep in mind, that each skill will cost 50,000zeny.";
for(set .@i,0; .@i<getarraysize(.@skillist); set .@i,.@i+1)
 {set .@menu$,.@menu$+.@skillname$[.@i]+":";}
menu .@menu$,-,"Cancel",iCancel;
set .@menu,@menu-1;
mes "Are you sure you want: "+.@skillname$[(@menu-1)]+" ?";
menu "Yes",-,"No",iCancel;
if(zeny<.@price){next; mes "You don't have enough zeny. Each skill costs 50,000zeny"; close;}
set zeny,zeny-.@price;
setcloneskill .@skilllist[.@menu],.@skill_lvl[.@menu];
next;
mes "All done. Come again.";
close;
iCancel:
close;
}

Right?

But, where do I put this:

[/background][/font][/color]
[color=#465584][font=Courier,]BUILDIN_DEF(setcloneskill,"ii"),

Sorry I'm a newbie in SRC/stuff edit ;-(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I usually don't reply to this kind of easy question ( oh well )

but your post looks promising like you're willingly to learn

so ... I can only say read more wiki at the moment

this is how to add a new script command with diff file, example like toasty string manipulation

http://www.eathena.ws/board/index.php?showtopic=204976

and this is wiki explaining about diff

http://rathena.org/wiki/Diff

actually I don't have any programming background

despite that you think I know how to write some script commands

what I learned is rathena source commands lol

just take a peak in script.c ... do some copy-paste from other official script commands

and keep crashing my visual express compiler hahaha ..

that's how I learn

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

I usually don't reply to this kind of easy question ( oh well )

but your post looks promising like you're willingly to learn

so ... I can only say read more wiki at the moment

this is how to add a new script command with diff file, example like toasty string manipulation

http://www.eathena.w...howtopic=204976

and this is wiki explaining about diff

http://rathena.org/wiki/Diff

actually I don't have any programming background

despite that you think I know how to write some script commands

what I learned is rathena source commands lol

just take a peak in script.c ... do some copy-paste from other official script commands

and keep crashing my visual express compiler hahaha ..

that's how I learn

Thank you for your advices/help ;) I'll try to apply and if i have any errors/problems i'll cry for help again..

And you're right, I'm really willing to learn more and more ;)

This has always been an issue with the ' skill ' command. So far from what i've seen, the only way to fix it, is to give them the skill in an infinite-loop.

However, this is only an issue, if the player's character, cannot learn the skill normally (Not in it's skill tree).

Thus, you could always add the skill to the class' skill tree, but give it impossible to reach requirements (ex: Lvl 10 Basic Skill ' max is normally 9 ') that way, it'll appear in thier skill tree, just unable to learn it UNLESS they use the NPC.

You got me very very curious about the skill tree way, would you elaborate a bit more? How to make it ' impossible ' and how to link it to the npc?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

O.o wow lol, i don't remember that, though i have to say, i very RARELY go back to eAthena forums for information, so that could be why i don't remember this.

Also for adding a skill to the skill tree it'd be like this:

/* Note - Only 84 skills are allowed per class (unless you edit the src)
* JobID, SkillID, MaxLv{,JobLv},Pre-Req_id_1,Pre-req_lv_1,...,pre-req_id_5,Pre-req_lv_5 */
//Stalker
4018,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4018,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4018,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
4018,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
4018,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
4018,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
4018,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
4018,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
4018,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
4018,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
4018,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
4018,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
4018,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
4018,44,10,0,0,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
4018,46,10,44,10,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
4018,124,1,46,5,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
4018,210,10,50,1,0,0,0,0,0,0,0,0 //RG_SNATCHER#Gank#
4018,211,10,210,4,0,0,0,0,0,0,0,0 //RG_STEALCOIN#Mug#
4018,212,10,211,4,0,0,0,0,0,0,0,0 //RG_BACKSTAP#Back Stab#
4018,213,5,51,1,0,0,0,0,0,0,0,0 //RG_TUNNELDRIVE#Stalk#
4018,214,5,212,2,213,2,0,0,0,0,0,0 //RG_RAID#Sightless Raid#
4018,215,5,217,5,0,0,0,0,0,0,0,0 //RG_STRIPWEAPON#Divest Weapon#
4018,216,5,218,5,0,0,0,0,0,0,0,0 //RG_STRIPSHIELD#Divest Shield#
4018,217,5,216,5,0,0,0,0,0,0,0,0 //RG_STRIPARMOR#Divest Armor#
4018,218,5,211,2,0,0,0,0,0,0,0,0 //RG_STRIPHELM#Divest Helm#
4018,219,5,212,4,214,5,0,0,0,0,0,0 //RG_INTIMIDATE#Snatch#
4018,220,1,221,5,0,0,0,0,0,0,0,0 //RG_GRAFFITI#Scribble#
4018,221,5,222,1,0,0,0,0,0,0,0,0 //RG_FLAGGRAFFITI#Piece#
4018,222,1,223,1,0,0,0,0,0,0,0,0 //RG_CLEANER#Remover#
4018,223,1,216,3,0,0,0,0,0,0,0,0 //RG_GANGSTER#Slyness#
4018,224,5,223,1,0,0,0,0,0,0,0,0 //RG_COMPULSION#Haggle#
4018,225,10,219,5,0,0,0,0,0,0,0,0 //RG_PLAGIARISM#Intimidate#
4018,1005,1,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#Close Confine#
4018,389,5,51,5,213,3,0,0,0,0,0,0 //ST_CHASEWALK#Stealth#
4018,390,5,0,0,0,0,0,0,0,0,0,0 //ST_REJECTSWORD#Counter Instinct#
4018,475,1,225,10,0,0,0,0,0,0,0,0 //ST_PRESERVE#Preserve#
4018,476,5,215,5,216,5,217,5,218,5,0,0 //ST_FULLSTRIP#Divest All#
4018,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
4018,681,1,0,0,0,0,0,0,0,0,0,0 //ALL_INCCARRY#Enlarge Weight Limit R#
//Custom Skills for skill tree
4018,89,10,1,10,0,0,0,0,0,0,0,0 //WZ_STORMGUST#Storm Gust#
//Add more as needed.
/* Note2 - You needed to add them to each class you want able to use the NPC. */

The above, is a list of the stalker's skill tree according to: rAthena/db/(Pre-RE | RE)/skill_tree.txt

All i did was add, StormGust to it's skill tree, with an impossible requirement (Basic Skill Level 10). This way they can't use skill points to level it up. BUT you can still give them the skill using an NPC.

As for your NPC, the way it is, should work fine, if all you did was add skills to their skill tree.

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

O.o wow lol, i don't remember that, though i have to say, i very RARELY go back to eAthena forums for information, so that could be why i don't remember this.

Aso for adding a skill to the skill tree it'd be like this:

/* Note - Only 84 skills are allowed per class (unless you edit the src)
* JobID, SkillID, MaxLv{,JobLv},Pre-Req_id_1,Pre-req_lv_1,...,pre-req_id_5,Pre-req_lv_5 */
//Stalker
4018,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4018,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4018,48,10,0,0,0,0,0,0,0,0,0,0 //TF_DOUBLE#Double Attack#
4018,49,10,0,0,0,0,0,0,0,0,0,0 //TF_MISS#Improve Dodge#
4018,50,10,0,0,0,0,0,0,0,0,0,0 //TF_STEAL#Steal#
4018,51,10,50,5,0,0,0,0,0,0,0,0 //TF_HIDING#Hiding#
4018,52,10,0,0,0,0,0,0,0,0,0,0 //TF_POISON#Envenom#
4018,53,1,52,3,0,0,0,0,0,0,0,0 //TF_DETOXIFY#Detoxify#
4018,149,1,0,0,0,0,0,0,0,0,0,0 //TF_SPRINKLESAND#Throw Sand#
4018,150,1,0,0,0,0,0,0,0,0,0,0 //TF_BACKSLIDING#Back Sliding#
4018,151,1,0,0,0,0,0,0,0,0,0,0 //TF_PICKSTONE#Find Stone#
4018,152,1,0,0,0,0,0,0,0,0,0,0 //TF_THROWSTONE#Stone Fling#
4018,2,10,0,0,0,0,0,0,0,0,0,0 //SM_SWORD#Sword Mastery#
4018,44,10,0,0,0,0,0,0,0,0,0,0 //AC_VULTURE#Vulture's Eye#
4018,46,10,44,10,0,0,0,0,0,0,0,0 //AC_DOUBLE#Double Strafe#
4018,124,1,46,5,0,0,0,0,0,0,0,0 //HT_REMOVETRAP#Remove Trap#
4018,210,10,50,1,0,0,0,0,0,0,0,0 //RG_SNATCHER#Gank#
4018,211,10,210,4,0,0,0,0,0,0,0,0 //RG_STEALCOIN#Mug#
4018,212,10,211,4,0,0,0,0,0,0,0,0 //RG_BACKSTAP#Back Stab#
4018,213,5,51,1,0,0,0,0,0,0,0,0 //RG_TUNNELDRIVE#Stalk#
4018,214,5,212,2,213,2,0,0,0,0,0,0 //RG_RAID#Sightless Raid#
4018,215,5,217,5,0,0,0,0,0,0,0,0 //RG_STRIPWEAPON#Divest Weapon#
4018,216,5,218,5,0,0,0,0,0,0,0,0 //RG_STRIPSHIELD#Divest Shield#
4018,217,5,216,5,0,0,0,0,0,0,0,0 //RG_STRIPARMOR#Divest Armor#
4018,218,5,211,2,0,0,0,0,0,0,0,0 //RG_STRIPHELM#Divest Helm#
4018,219,5,212,4,214,5,0,0,0,0,0,0 //RG_INTIMIDATE#Snatch#
4018,220,1,221,5,0,0,0,0,0,0,0,0 //RG_GRAFFITI#Scribble#
4018,221,5,222,1,0,0,0,0,0,0,0,0 //RG_FLAGGRAFFITI#Piece#
4018,222,1,223,1,0,0,0,0,0,0,0,0 //RG_CLEANER#Remover#
4018,223,1,216,3,0,0,0,0,0,0,0,0 //RG_GANGSTER#Slyness#
4018,224,5,223,1,0,0,0,0,0,0,0,0 //RG_COMPULSION#Haggle#
4018,225,10,219,5,0,0,0,0,0,0,0,0 //RG_PLAGIARISM#Intimidate#
4018,1005,1,0,0,0,0,0,0,0,0,0,0 //RG_CLOSECONFINE#Close Confine#
4018,389,5,51,5,213,3,0,0,0,0,0,0 //ST_CHASEWALK#Stealth#
4018,390,5,0,0,0,0,0,0,0,0,0,0 //ST_REJECTSWORD#Counter Instinct#
4018,475,1,225,10,0,0,0,0,0,0,0,0 //ST_PRESERVE#Preserve#
4018,476,5,215,5,216,5,217,5,218,5,0,0 //ST_FULLSTRIP#Divest All#
4018,410,1,0,0,0,0,0,0,0,0,0,0 //WE_CALLBABY#Call Baby#
4018,681,1,0,0,0,0,0,0,0,0,0,0 //ALL_INCCARRY#Enlarge Weight Limit R#
//Custom Skills for skill tree
4018,89,10,1,10,0,0,0,0,0,0,0,0 //WZ_STORMGUST#Storm Gust#
//Add more as needed.
/* Note2 - You needed to add them to each class you want able to use the NPC. */

The above, is a list of the stalker's skill tree according to: rAthena/db/(Pre-RE | RE)/skill_tree.txt

All i did was add, StormGust to it's skill tree, with an impossible requirement (Basic Skill Level 10). This way they can't use skill points to level it up. BUT you can still give them the skill using an NPC.

As for your NPC, the way it is, should work fine, if all you did was add skills to their skill tree.

Very interesting, learned more today! I managed to get it to work by reading eathena an dhere, but, in this situation of skill tree do i have to restart the server?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Yes? Unless @reloadskilldb | @reloadscript reloads skill_tree.txt

But then, even if you were to use a new command, you'd still have to shutdown your server inorder to recompile.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

Another question: Is there a way to add to this npc a possibility of removing ( ' clearing ') both skills: from plagiarism and from reproduce? ( so that we can copy everything again )

Mellina,47,83,4 script Stalker 747,{
if(BaseJob != Job_Rogue){mes "Only Rogues, Stalkers, and ShadowChaser's may use this NPC."; close;}
mes "Select which skill you want to be copy, your existing one will be overwritten.";
next;
set .@menu, select(.menu$) -1;
if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
 mes "you already copied that skill";
 close;
}
mes "Are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
mes "You'll need to re-log for it to take effect.";
next;
if ( select ( "Yes", "No" ) == 2 ) close;
set CLONE_SKILL, .skill$[.@menu * 3 +1];
set CLONE_SKILL_LV, .skill$[.@menu * 3 +2];
atcommand "@kick "+ strcharinfo(0);
end;
OnInit:
setarray .skill$, "Jupitel Thunder", 84, 10,
 "Storm Gust", 89, 10,
 "Lord of Vermillion", 85, 10,
		    "Arrow Repel", 148, 10,
		    "Acid Demonstration", 490, 10,
			 "Spear Of ice", 537, 10,
			 "Wind Blade", 540, 10,
			 "Sacrifice", 368, 5,
			 "Bowling Bash", 62, 10,
			 "Pressure", 367, 5;  
set .@skillsize, getarraysize(.skill$);
for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
 set .menu$, .menu$ + .skill$[.@i] +":";
end;
}

Like from emistry script, if we ' re click ' it erases it and we can select a new one.

Remove_Skill:
skill StalkerSkill,0,0;
set StalkerSkill,0;

I tried set clone skill 0 0 but didn't work ;-(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

set CLONE_SKILL,"";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

If your going to use set CLONE_SKILL, then you don't need to add the skills to your skill tree, as your actually forcefully changing the skill the Stalker has plagurized as that skill. I was under the impression, you wanted to give the stalkers, a ' permanent ' solution, and one that would alow them to change it at will, regardless of another skill over writing their skill.

If that's the case, then i'd suggest, asking for help in the src section, so that the plagurize skill, will read the value of your custom variable. Then, making it impossible, for it to activate when someone hits you. This way, it'll only work using your NPC.

Edited by GmOcean
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

[Warning]: connect_check: DDoS Attack detected from 127.0.0.1!

WTF server gaves me this warning when I test that script <.< /spit

anyway after restarting test server

prontera,155,180,5    script    dksfsdfkb    100,{
   mes "select which skill you want to be copy, your existing one will be overwrite";
   next;
   set .@menu, select(.menu$) -1;
   if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
       mes "you already copied that skill";
       close;
   }
   mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
   mes "you'll need to relogin again";
   next;
   if ( select ( "Yes", "No" ) == 2 ) close;
   set CLONE_SKILL, .skill$[.@menu * 3 +1];
   set CLONE_SKILL_LV, .skill$[.@menu * 3 +2];
   atcommand "@kick "+ strcharinfo(0);
   end;
OnInit:
   setarray .skill$, 
       "< Remove >", 0, 0,
       "Fire Bolt", 19, 10,
       "Cold Bolt", 14, 10,
       "Lightning Bolt", 20, 10;
   set .@skillsize, getarraysize(.skill$);
   for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
       set .menu$, .menu$ + .skill$[.@i] +":";
   end;
}

it seems to turn out perfectly fine

and my stalker does have the plagiarize skill remove after relog

@darristan

you set a permanent player variable with "", will do nothing

no offense but, with my come back,

I want to pump up this scripting section to make this section looks more professional looking

it seems when I just came here, many members keep saying stuffs like :-

- pls do it yourself .... <.<

I on my test server when I give support and will give more constructive answer

and when he is out of solution, I'll provide with working script to have them start as a template

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

[Warning]: connect_check: DDoS Attack detected from 127.0.0.1!

WTF server gaves me this warning when I test that script <.< /spit

anyway after restarting test server

prontera,155,180,5	script	dksfsdfkb	100,{
mes "select which skill you want to be copy, your existing one will be overwrite";
next;
set .@menu, select(.menu$) -1;
if ( getskilllv(.skill$[.@menu * 3 +1]) ) {
	mes "you already copied that skill";
	close;
}
mes "are you sure you want to copy "+ .skill$[.@menu * 3] +"?";
mes "you'll need to relogin again";
next;
if ( select ( "Yes", "No" ) == 2 ) close;
set CLONE_SKILL, .skill$[.@menu * 3 +1];
set CLONE_SKILL_LV, .skill$[.@menu * 3 +2];
atcommand "@kick "+ strcharinfo(0);
end;
OnInit:
setarray .skill$,
	"< Remove >", 0, 0,
	"Fire Bolt", 19, 10,
	"Cold Bolt", 14, 10,
	"Lightning Bolt", 20, 10;
set .@skillsize, getarraysize(.skill$);
for ( set .@i,0; .@i < .@skillsize; set .@i, .@i +3 )
	set .menu$, .menu$ + .skill$[.@i] +":";
end;
}

it seems to turn out perfectly fine

and my stalker does have the plagiarize skill remove after relog

@darristan

you set a permanent player variable with "", will do nothing

no offense but, with my come back,

I want to pump up this scripting section to make this section looks more professional looking

it seems when I just came here, many members keep saying stuffs like :-

- pls do it yourself .... <.<

I on my test server when I give support and will give more constructive answer

and when he is out of solution, I'll provide with working script to have them start as a template

I got everything working brilliantly! and also learned a lot from you guys. Thank you!!

If your going to use set CLONE_SKILL, then you don't need to add the skills to your skill tree, as your actually forcefully changing the skill the Stalker has plagurized as that skill. I was under the impression, you wanted to give the stalkers, a ' permanent ' solution, and one that would alow them to change it at will, regardless of another skill over writing their skill.

If that's the case, then i'd suggest, asking for help in the src section, so that the plagurize skill, will read the value of your custom variable. Then, making it impossible, for it to activate when someone hits you. This way, it'll only work using your NPC.

Ocean I did want to know how to do ia via skilltree as well for future references, I tested what you suggested and it also worked which gave me more ideas for future scripts.

Thank you so much for your time and help!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Ofcourse, no problem. Glad i could be of assistance.

@Annie

Your comming back was like a boulder into a glass of water, you broke the container and now the water is going everywhere (This is a good thing). Now that your back i've seen numerous requests that aren't ' too ' boring, but also new scripting styles put into play. If not just old ones brought back to life. Kinda glad it happened.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...