longju2 0 Posted October 4, 2014 Share Posted October 4, 2014 hi guys i need 1 quest, when kill 1 mob this mob drop 1 ,2,3 items but not provided, a possibility [1, 5] or whatever. as would be the quest? Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted October 4, 2014 Premium Share Posted October 4, 2014 quest drob begin state start begin when xxx.kill begin local s = number(1, 100) if s <= 10 then game.drop_item(item)--item end end end end 1 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Premium MrLibya 554 Posted October 5, 2014 Premium Share Posted October 5, 2014 For Make It For All Mobs when kill with not npc.is_pc() begin 1 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
longju2 0 Posted October 5, 2014 Author Share Posted October 5, 2014 to drop the item with the player's name and do not steal another player, what have to add? Link to comment Share on other sites More sharing options...
ekoo 8 Posted October 5, 2014 Share Posted October 5, 2014 to drop the item with the player's name and do not steal another player, what have to add? replace game.drop_item(item) with: game.drop_item_with_ownership(item, count) 1 Link to comment Share on other sites More sharing options...
myenglishisbad 0 Posted November 2, 2016 Share Posted November 2, 2016 how to do if mob level is + 20 then player, and not drop Link to comment Share on other sites More sharing options...
VegaS 1087 Posted November 2, 2016 Share Posted November 2, 2016 On 02.11.2016 at 8:44 PM, myenglishisbad said: how to do if mob level is + 20 then player, and not drop Try with that: if npc.get_level() - pc.get_level() > 20 then syschat(string.format("<Debug Mode> QUEST name -> [tch = %d] | [ch = %d].", npc.get_level(), pc.get_level())) return end Link to comment Share on other sites More sharing options...
myenglishisbad 0 Posted November 3, 2016 Share Posted November 3, 2016 20 hours ago, VegaS said: Try with that: if npc.get_level() - pc.get_level() > 20 then syschat(string.format("<Debug Mode> QUEST name -> [tch = %d] | [ch = %d].", npc.get_level(), pc.get_level())) return end didn´t work Link to comment Share on other sites More sharing options...
VegaS 1087 Posted November 3, 2016 Share Posted November 3, 2016 (edited) 21 minutes ago, myenglishisbad said: didn´t work Or maybe i'm not understand what you say? But here is a gif with test: quest drop_test begin state start begin when kill begin if npc.get_level() - pc.get_level() > 20 then syschat(string.format("<Debug Mode> QUEST name -> [Mob = %d] | [You = %d]. The limit is greater than 20.", npc.get_level(), pc.get_level())) return end end end end Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted November 3, 2016 Active Member Share Posted November 3, 2016 21 hours ago, VegaS said: Try with that: if npc.get_level() - pc.get_level() > 20 then syschat(string.format("<Debug Mode> QUEST name -> [tch = %d] | [ch = %d].", npc.get_level(), pc.get_level())) return end Genius, use math.abs(npc.get_level() - pc.get_level()) if u have 20-40 = -20 ? or condition like this: local mLevel = pc.get_level() local tLevel = npc.get_level() if tLevel >= mLevel then -- do something(only if target level is greater or equal with your level) end https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
myenglishisbad 0 Posted November 3, 2016 Share Posted November 3, 2016 this is my quest quest drop begin state start begin when kill begin local cav = npc.get_level() - pc.get_level() if cav > 20 then return else local number = number(1,100) if number <= 8 then game.drop_item_with_ownership(25040,1) syschat(string.format("Level do Mob %d",npc.get_level())) end end end end end this should explain, better, but when i kill moob with lv 120 and moob´s lv is 1 he drops Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted November 3, 2016 Premium Share Posted November 3, 2016 2 minutes ago, Exygo said: Genius, use math.abs(npc.get_level() - pc.get_level()) if u have 20-40 = -20 ? .. "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...
myenglishisbad 0 Posted November 3, 2016 Share Posted November 3, 2016 2 minutes ago, Exygo said: Genius, use math.abs(npc.get_level() - pc.get_level()) if u have 20-40 = -20 ? yes you are right, hadn´t thought about that, but how I fix Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted November 3, 2016 Active Member Share Posted November 3, 2016 3 minutes ago, myenglishisbad said: yes you are right, hadn´t thought about that, but how I fix I edited my previous post, maybe that helps better https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
myenglishisbad 0 Posted November 3, 2016 Share Posted November 3, 2016 Thank you guys i have resolved the quest, the quest stayed that : quest drop begin state start begin when kill begin local cav = pc.get_level() - npc.get_level() if cav > 20 then return else local number = number(1,100) if number <= 8 then game.drop_item_with_ownership(25040,1) syschat(string.format("Level do Mob %d",npc.get_level())) end end end end end Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted November 3, 2016 Active Member Share Posted November 3, 2016 quest drop begin state start begin when kill begin if math.abs(pc.get_level()-npc.get_level()) < 20 then -- you got drop end end end end https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos 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