Jump to content

Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Contributor
58 minutes ago, Danilo89 said:

thank you for the answer I don't know how to do it

He meant you should open existing quests and check their code, see how they work, and write your own quest by the information you gathered.
The problem with your topic is that it's not a question & answer and while it's like a 3 minute job, if we do it for you, you'll never learn it.

I suggest to check main & sub quests. Like subquest_01.quest ending you have to talk with an npc, and if you have an item, you'll get a reward. Basicly you need to extend it to check not 1 but 5 items (just add 'and' after pc.count_item(30130) >= 1) and you probably want to check the player's class for the armor, you'll find an example for that in give_basic_weapon.quest for example. Good luck ?

Link to comment
Share on other sites

48 minutes ago, TMP4 said:

He meant you should open existing quests and check their code, see how they work, and write your own quest by the information you gathered.
The problem with your topic is that it's not a question & answer and while it's like a 3 minute job, if we do it for you, you'll never learn it.

I suggest to check main & sub quests. Like subquest_01.quest ending you have to talk with an npc, and if you have an item, you'll get a reward. Basicly you need to extend it to check not 1 but 5 items (just add 'and' after pc.count_item(30130) >= 1) and you probably want to check the player's class for the armor, you'll find an example for that in give_basic_weapon.quest for example. Good luck ?

Thanks for the reply, as soon as I try I'll tell you how it went.

 

Link to comment
Share on other sites

Hello there. Basically everything that you need to create something like this is pretty simple actually.

     - pc.get_race() -> will return the value: 1 for warrior, 2 for sura, 3 for ninja, 4 for shaman and 5 for lycan (I might be wrong, please test it and then correct me)

     - pc.give_item2(ITEM_VNUM, QUANTITY) -> gives the item to the current player

Once you give a look at the already existing quests that you can find all over the internet, LUA is super easy to learn and execute... If you have any other questions, I think I can help you.

Link to comment
Share on other sites

8 hours ago, Esculpe said:

Hello there. Basically everything that you need to create something like this is pretty simple actually.

     - pc.get_race() -> will return the value: 1 for warrior, 2 for sura, 3 for ninja, 4 for shaman and 5 for lycan (I might be wrong, please test it and then correct me)

     - pc.give_item2(ITEM_VNUM, QUANTITY) -> gives the item to the current player

Once you give a look at the already existing quests that you can find all over the internet, LUA is super easy to learn and execute... If you have any other questions, I think I can help you.

Thanks for the reply, as soon as I try I'll tell you something

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.