Jump to content

Jannah

Members
  • Posts

    6
  • Joined

  • Last visited

Jannah's Achievements

Drops

Drops (2/15)

  • Dedicated
  • One Month Later
  • Week One Done
  • First Post
  • Reacting Well

Recent Badges

0

Reputation

  1. Hello, I need a script example on how to compare dates obtain from SQL table to the current date in game. Basically I want to put freebies but it will expire on the designated date if not claimed. if the table is something like this Freebie ID / Freebie Item / Freebie Amount / Expiry / Expiry example : 2023-03-13 How should I query for expiry date and compare it to the date in game? Thank you.
  2. Just wanna ask what's the best way to make the menu choices appear and disappear based on if condition. What I want to do is to make an npc where you can take different type of independent quest. I want those quest (names) to appear in choices once they acquire enough qualification to take it and remove it from menu choices once they finish the quest.
  3. 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 ( .@mat1 == 507 && .@mat2 == 713 && .@mat3 == 512 && .@mat4 == 512 ) { mes "Success, you found a formula!"; mes "Apple Juice Formula"; close; } if ( .@mat1 == 713 && .@mat2 == 507 && .@mat3 == 512 && .@mat4 == 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!
  4. 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.
  5. 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...