Jump to content
  • 0

Unique Variables on "set"


ohyono

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Hello, how are you?
I have a problem with a script.  I want it to do is that each npc of its own variables in the SET, but until today I can not achieve it. the thing would be something like this:

This is the variable that i want insert for each npc

if (strnpcinfo(2) == "9412") { if (sidone == 9412) .@izlnpc = Ake1;}
else if (strnpcinfo(2) == "9454") { if (sidone  == 9454) setd ".@izlnpc$","Cleo1";}
else if (strnpcinfo(2) == "9403") { if (sidone  == 9403) setd ".@izlnpc$","Gil1";}
else if (strnpcinfo(2) == "9424") { if (sidone  == 9424) setd ".@izlnpc$","Hil1";}
else if (strnpcinfo(2) == "9433") { if (sidone  == 9433) setd ".@izlnpc$","Mar1";}
else if (strnpcinfo(2) == "9463") { if (sidone  == 9463) setd ".@izlnpc$","Ama1"; } 
else if (strnpcinfo(2) == "9460") { if (sidone  == 9460) setd ".@izlnpc$","Him1";}
else if (strnpcinfo(2) == "9466") { if (sidone  == 9466) setd ".@izlnpc$","Her1";}
else if (strnpcinfo(2) == "9469") { if (sidone  == 9469) setd ".@izlnpc$","Sel1";}

This is the setting of a variable in a character

@izlvar = .@izlnpc$;

set FL_+@izlvar,rand(1,80);	

for the duplicated npc.

confesiones,29,27,5	duplicate(Conf_F#core)	Akechi ****#9412	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Cleopatra ****#9454	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Gilgamesh ****#9403	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Hildegard ****#9424	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Marceline ****#9433	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Amadeus ****#9463	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Himiko ****#9460	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Hermes ****#9466	HIDDEN_WARP_NPC
confesiones,29,27,5	duplicate(Conf_F#core)	Selene ****#9469	HIDDEN_WARP_NPC

The trouble is when I try to make the npc gave me of the SET I get this warning

warning.png.a882f2795b6128aa03e98d85eab48c13.png

 

so far try it in several ways and this is the one that gives me the least mistakes, I wish they could help me. Thank you

-Van

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

if ("FL_"+.@izlnpc$ <= 19){

to

if (getd("FL_"+.@izlnpc$) <= 19){

 

also you would need to remove the space between .npcf and $;

.npcf $; >> .npcf$;

Edited by sader1992
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

the setd you use i think it need to be set not setd

setd ".@izlnpc$","Cleo1";

to 

set .@izlnpc$,"Cleo1";

 

and this 

set FL_+@izlvar,rand(1,80);

need to be setd something like 

setd "FL_" + @izlvar,rand(1,80);

 

and you are writing this >> @izlvar = .@izlnpc$; so it will be int = string ? why don't you just use the strnpcinfo(2) insted of setting string .@izlnpc$

give it a try and i would suggest put the entire script not a part of it so we can help you fix it faster

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Thanks for answering. Effectively your idea of changing the "set" to "setd" works very well, now the emulator saves the record correctly.

By the way, the reason why I do not use "strnpcinfo (2)" is because I decided to place 3 npc with the same variable, since it will be the item id that will deliver as recompense those npc

The problem is that I still have some problem like this:

 

maybe it has to do with the rest of the script, more specifically with this part:

if ("FL_"+.@izlnpc$ <= 19){
mes .npcf $;
mes "What do you want?";
mes "Do not bother me";
close;
 }

I hope you can help me
-Van

warning.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   15
  • Joined:  01/10/12
  • Last Seen:  

Yes. This resolve all. Thx my script is now funcional

-Van.

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