HisaoShou 3 Posted June 21, 2017 Share Posted June 21, 2017 How can I check if a player has an item in inventory? Something like: when 40002.inventory begin quest_happens end Link to comment Share on other sites More sharing options...
Tasho 243 Posted June 21, 2017 Share Posted June 21, 2017 if pc.count_item(50602) then -- Check if exist a item in inventory (MIN 1) if pc.count_item(50602) >= value then -- Check if exist a item in inventory (MIN 1 | MAX: value) Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Acum 27 minute, Tasho a spus: if pc.count_item(50602) then -- Check if exist a item in inventory (MIN 1) if pc.count_item(50602) >= value then -- Check if exist a item in inventory (MIN 1 | MAX: value) Can't you make it like "when pc.count_item(50602) begin" ? Link to comment Share on other sites More sharing options...
Tasho 243 Posted June 21, 2017 Share Posted June 21, 2017 4 minutes ago, HisaoShou said: Can't you make it like "when pc.count_item(50602) begin" ? when 20092.chat."Test" with pc.count_item(50602) begin You can. Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Chiar acum, Tasho a spus: when 20092.chat."Test" with pc.count_item(50602) begin You can. Won't that happen only when I talk with a npc? I need it without talking with npc or something, the item to activate the quest Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2017 Premium Share Posted June 21, 2017 A trigger for that doesn't exist, you need at least to login. when login with pc.count_item(50602) begin "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Chiar acum, Syreldar a spus: A trigger for that doesn't exist, you need at least to login. What kind of item type do I need for the "when ITEM.use begin" to work? Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2017 Premium Share Posted June 21, 2017 Just now, HisaoShou said: What kind of item type do I need for the "when ITEM.use begin" to work? 18 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Acum 2 minute, Syreldar a spus: 18 Will it work even if i modify an existent item (like Yety fur+) ? Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2017 Premium Share Posted June 21, 2017 yes "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Acum 2 minute, Syreldar a spus: yes It doesn't work. Here is my quest: quest Quester begin state start begin when 30089.use begin set_state(information) end end state information begin when letter begin send_letter("Quest de test") end when info or button begin say("Quest de test") say("lalalal it is only a text") say("lalalalalala") say(""") say_reward("hahahahahhaaah") pc.setqf("state", 22) q.set_counter("Lupusor", 22) end when 102.kill begin local count = pc.getqf("state") - 1 if count <= 22 then pc.setqf("state", count) q.set_counter("Lupusor", count) end if count == 0 then say_title("Quest de test") say("Ai finalizat cu succes misiunea!") say("Recompensa:") say_reward("Rahatt") say_reward("Alte informatii:") say_reward("") say_reward("Alte informatii:") say_reward("Ai primit Yang") say_reward("Ai primit experienta") pc.change_money() pc.give_exp2() pc.give_item2(1, Rahatt) horse.set_level("") clear_letter() set_state(__COMPLETE__) end end end state __COMPLETE__ begin end end Here is my item: Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2017 Premium Share Posted June 21, 2017 /reload lul "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Acum 18 minute, Syreldar a spus: /reload lul I reloaded. Still nothing. When I try to use the item, nothing happens. No quest appears or something (I need to know if is my serverfile to fault or my quest) Link to comment Share on other sites More sharing options...
Xerneas 10 Posted June 21, 2017 Share Posted June 21, 2017 Reload q lul... Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Reloaded. Still nothing. Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2017 Premium Share Posted June 21, 2017 7 minutes ago, HisaoShou said: Reloaded. Still nothing. Means the quest is not properly compiled. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Acum 6 minute, Syreldar a spus: Means the quest is not properly compiled. Right now I compiled it again, and still nothing. And yes, after this I reloaded them again Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2017 Premium Share Posted June 21, 2017 Just now, HisaoShou said: Right now I compiled it again, and still nothing. And yes, after this I reloaded them again not properly compiled, doesn't reach the kill trigger, there are errors. "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Acum 17 minute, Syreldar a spus: not properly compiled, doesn't reach the kill trigger, there are errors. What errors? How should I compile it? Edit: I have NO IDEA why it is not working. The quest seems fine to me. Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted June 21, 2017 Premium Share Posted June 21, 2017 If you have accents just before the end of a say line then it wont compile. Example : say("àéèôîêâäëïöù") <- Not working say("àéèôîêâäëïöù ") <- Working (notice the space) I prefer to notice it to you because if an accent is before the closure then the compilation will fail. But there's a lot of other things that can happen so it's probably not the main reason Link to comment Share on other sites More sharing options...
Developer Solution PACI 921 Posted June 21, 2017 Developer Solution Share Posted June 21, 2017 (edited) -> say("") Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 2 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted June 21, 2017 Share Posted June 21, 2017 does this also check banker ? Link to comment Share on other sites More sharing options...
HisaoShou 3 Posted June 21, 2017 Author Share Posted June 21, 2017 Thanks everyone for your support, its been really useful for me. Solved. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now