Jump to content
  • 0

help with this faction script


Question

Posted (edited)

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

1 answer to this question

Recommended Posts

  • 0
Posted

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;
}
 

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