Jump to content
  • 0

Implode variable conversion?


xmaniacx

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

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
Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Implode commands works on eAthena according to informations.

Try to use "," instead of ":".

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

I think It's no need to use implode script command

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

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

It works fine on rAthena /oh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

It works fine on rAthena /oh

hehehehe that why im asking for the conversion of the implode since i'm a 3ceam user =D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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

3CEAM doesn't has getnpcid so add by yourself in src and recompile..

refrence:

trunk/src/map/script.c

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  110
  • Reputation:   1
  • Joined:  04/03/12
  • Last Seen:  

@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?

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...