Jump to content
  • 0

Implode variable conversion?


Question

Posted (edited)

set .@SkillID,select( implode( .SkillName$,":" ) ) - 1;

can i ask whats the conversionn of the implode on eathena code?

it say's unknown string on me when i loaded it but...... rathena users says its working fine on them, so i have a hunch that the implode thing is the problem..... i dunno what to to do since this is my first encounter on it.

Edited by xmaniacx

10 answers to this question

Recommended Posts

Posted (edited)

Not Working...................

prontera,155,181,5 script Sample 757,{
mes "Which skill you need me to cast on you ?";
set .@SkillID,select( implode( .SkillName$,":" ) ) - 1;
mes "Selected "+.Skillname$[.@SkillID];
close2;
unitskilluseid getnpcid(0),.SkillID[.@SkillID],.SkillLv[.@SkillID],getcharid(3);
sleep 3000;
movenpc strnpcinfo(0),155,181;
end;

OnInit:
setarray .SkillID[0],14,19,20,421;
setarray .SkillLv[0],3,5,10,5;
setarray .SkillName$[0],"Cold Bolt","Fire Bolt","Lightning Bolt","Fly Kick";
end;
}

Here's the script, what it basically do is to let the stalker copy a certain skill from the npc....... so he wont be begging from the other character to use a certain skill on him...... he could just go to the npc and pay for a plagiarized skill...............

Edited by xmaniacx
Posted

prontera,155,181,5 script Sample 757,{

mes "Which skill you need me to cast on you ?";

set .@SkillID,select( .SkillName$ ) - 1;

mes "Selected "+.Skillname$[.@SkillID];

close2;

unitskilluseid getnpcid(0),.SkillID[.@SkillID],.SkillLv[.@SkillID],getcharid(3);

sleep 3000;

movenpc strnpcinfo(0),155,181;

end;

OnInit:

setarray .SkillID[0],14,19,20,421;

setarray .SkillLv[0],3,5,10,5;

set .SkillName$,"Cold Bolt:Fire Bolt:Lightning Bolt:Fly Kick";

end;

Posted

prontera,155,181,5 script Sample 757,{

mes "Which skill you need me to cast on you ?";

set .@SkillID,select( .SkillName$ ) - 1;

mes "Selected "+.Skillname$[.@SkillID];

close2;

unitskilluseid getnpcid(0),.SkillID[.@SkillID],.SkillLv[.@SkillID],getcharid(3);

sleep 3000;

movenpc strnpcinfo(0),155,181;

end;

OnInit:

setarray .SkillID[0],14,19,20,421;

setarray .SkillLv[0],3,5,10,5;

set .SkillName$,"Cold Bolt:Fire Bolt:Lightning Bolt:Fly Kick";

end;

i'm getting this kind of error........

post-3628-0-14968700-1359135139_thumb.jpg

Posted

You should be using this anyway:

*npcskill <skill id>,<skill lvl>,<stat point>,<NPC level>;

*npcskill "<skill name>",<skill lvl>,<stat point>,<NPC level>;

This command causes the attached NPC object to cast a skill on the attached

player. The skill will have no cast time or cooldown. The player must be

within the default skill range or the command will fail silently.

The "stat point" parameter temporarily sets all NPC stats to the given value,

and "NPC level" is the temporary level of the NPC (used in some skills).

Neither value can be greater than the max level defined in config, and will

not work properly if the NPC has a mob sprite.

// Casts Level 10 Heal on the attached player, calculated with

// all stats 99 and base level 60.

npcskill "AL_HEAL",10,99,60;

r17048 - r17049

Posted

@QQfoolsorellina : Thank you for pointing that out..........

You should be using this anyway:

*npcskill <skill id>,<skill lvl>,<stat point>,<NPC level>;

*npcskill "<skill name>",<skill lvl>,<stat point>,<NPC level>;

This command causes the attached NPC object to cast a skill on the attached

player. The skill will have no cast time or cooldown. The player must be

within the default skill range or the command will fail silently.

The "stat point" parameter temporarily sets all NPC stats to the given value,

and "NPC level" is the temporary level of the NPC (used in some skills).

Neither value can be greater than the max level defined in config, and will

not work properly if the NPC has a mob sprite.

// Casts Level 10 Heal on the attached player, calculated with

// all stats 99 and base level 60.

npcskill "AL_HEAL",10,99,60;

r17048 - r17049

Sir Euphy, can u provide a simple script that has the same function? but can be used by 3ceam?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...