Jump to content
  • 0

help with this faction script


magic2938

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  07/06/14
  • Last Seen:  

how can i make this script choose only once per character..
 

- script PLogin -1,{
OnPCLoginEvent:
switch(select("Demon:Angel")) {
case 1:
mes "You are ^FF0000DEMON ^000000NOW";
setfaction 2;
specialeffect2 587;
close;
case 2:
mes "You are ^00FF00 ANGEL ^000000NOW";
setfaction 3;
specialeffect2 338;
close;
}
end;
}
 
when i choose faction and login the same character it will choose again plss help me guys
Edited by Emistry
codebox
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

if you have a checkfaction script command (because I dont know if you do) you can do like

if (checkfaction)
   end;

but if you don't you can manually do it by adding player variables.

- script PLogin -1,{
OnPCLoginEvent:
if (faction) //add this
  end;
switch(select("Demon:Angel")) {
case 1:
mes "You are ^FF0000DEMON ^000000NOW";
setfaction 2;
specialeffect2 587;
set faction, 1; //add this
close;
case 2:
mes "You are ^00FF00 ANGEL ^000000NOW";
setfaction 3;
specialeffect2 338;
set faction, 1; //add this
close;
}
end;
}
 
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...