Jump to content

Jannah

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Jannah

  1. I am planning to make an NPC where players can choose to combine 4 different type of items in any order and guess the formula but I don't know how to do it better without putting too many if conditions. Example: Materials available for combination Apple Red Herb Grapes Bottle Formula example: Apple Juice: Red Herb, Bottle, Apple, Apple (can be in any order) Grape Juice: Red Herb, Bottle, Grapes, Grapes Now what I want is if player chose materials even if it's not in order, the NPC will recognize it if it's the similar with the secret formula. Due to my limited knowledge in scripting the only way I know how to do it is by adding if's condition like: if ( [email protected] == 507 && [email protected] == 713 && [email protected] == 512 && [email protected] == 512 ) { mes "Success, you found a formula!"; mes "Apple Juice Formula"; close; } if ( [email protected] == 713 && [email protected] == 507 && [email protected] == 512 && [email protected] == 512 ) { mes "Success, you found a formula!"; mes "Apple Juice Formula"; close; } and so on and so forth... I want to learn how I can do it efficiently where regardless of order the NPC can recognize that the player found the correct formula without repeating that "if condition" too much because I am planning to add at least 50 hidden formula. Hope someone can give me an example or idea on how to do it efficiently. Thank you!
  2. yes, unfortunately I'm using an older version of rathena and some of those script commands such as convertpcinfo and getmapunits aren't going to work. And I'm just a newbie in scripting. The idea is similar, though I guess the simplest one that would work well for me are those that uses addrid. Eitherway thank you very much for that very good example.
  3. I'm a beginner when it comes to scripting so I badly need help on this one. I need a script that when triggered will add every player in the map in an array and then choose one of them. Basically the script I want should be able to kill one player in the map every 10 seconds until only 1 player is left. It's like a survival but with only luck involve. I know that it might be too much to ask for too many specifics so I'll really appreciate it, if someone can give me an example script that could at least use addrid, add them in array and choose one of them. Thank you very much in advance!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.