Bitte melden Sie sich an, um diesen Link zu sehen.
Beiträge von Syreldar
-
-
-
-
Yes, and it's a quest causing it.
-
Bitte melden Sie sich an, um diesen Link zu sehen.
bitte
-
Bitte melden Sie sich an, um diesen Link zu sehen.Bitte melden Sie sich an, um dieses Bild zu sehen.
I only need the textures!
Thank you.
-
No quest no party.
-
Java
- quest MainQuestCollect begin
- state start begin
- function GetCoinsByRace(race)
- local data = {
- [1] = {["race"] = 8024, ["coins"] = 50},
- [2] = {["race"] = 8025, ["coins"] = 100}
- };
- for i = 1, table.getn(data) do
- if (race == data[i]["race"]) then
- return data[i]["coins"];
- end -- if
- end -- for
- return 0;
- end -- function
- when kill with npc.get_level_dif() <= 20 begin
- local collected_coins = MainQuestCollect.GetCoinsByRace(npc.get_race());
- if (collected_coins > 0) then
- mysql.query(string.format("UPDATE account.account SET coins = coins+%d WHERE id = %d;", collected_coins, pc.get_account_id()))
- syschat(string.format("You get %d coins from %s.", collected_coins, mob_name(npc.get_race())))
- end -- if
- end -- when
- end -- state
- end -- quest
Guys stop using global vars please.
-
Can you at least use proper indentation instead of point-blank using a c/ped quest?
How am i supposed to help you if I can't read it?
-
Post the quest, else i can't help you.
-
I'm confused, maybe cause i'm not from DE, what is this supposed to do/fix?
Thank you!
-
The pc.get_map_index() == 136 check doesn't work because you are inside a dungeon, and while inside a dungeon, your map index multiplies per 10000.
That's why, for every dungeon, an 'InDungeon' function is necessary.
Example:
JavaSo what you want to do after adding this kind of function is:
-
Hello, could you explain your problem in English? So I can help you!
-
You have got a wrong import coming from a different sash system.
You should just remove the "import sash" from your root files.
-
Bitte melden Sie sich an, um diesen Link zu sehen.
-
Hello!
I had nothing to do, so i thought about posting a clean, simple and useful quest-functions collection for you guys.
Those are my quest functions, but you are free to suggest a quest function down here and i'll add it!functions.lua:
24/08/2017:
- Polished up other functions.
- Added party_get_member_count,
- Added party_get_member_pids,
- Added clear_dungeon,
- Added table_get_keyword_index,
- Added table_is_any_subarray_containing_keyword,
- Added table_get_subarray_keyword_index
26/08/2017:
- Added table_shuffle.
30/04/2018:
- Reworked table_shuffle, since it was not working properly.
- Added InDungeon() [bool].
- Added ToDungeonIndex(map_index) [int].
01/06/2018:
- Added factorial (factorial(5) returns 120);
14/11/2019:
- (Did you miss me?) Updated the whole list, better code and even more functions!
25/12/2021:
- Added is_valid_number, is_integer_number. (safe funcs you should be using on numerical inputs)
- table_shuffle now creates a copy of the table and works on it instead of changing the table itself. The end result is the same, but the table passed as argument remains untouched.
- Reworked get_time_format.
- Renamed IsOdd to is_odd.
25/6/2022:
- Added get_gold_format
- Added BuildSkillListOfLevel
- Minor fixes.
25/10/2022:
- Fixed IntToRomanStr typo
29/01/2023:
- Rewritten.
- Added some new stuff.
- Provided more examples and data for each func.
-
very usefull, thank you!
Thanks!
-
So, basically, after destroying the first floor's metin stone it doesn't go to the 2nd one, and you have tried using other quests without success?
-
Hello, could you write your problem in English? So I can help you!
-
Hello.
Example of a bad quest:
Java- -----------------------------------------------------
- ---- Scris cu diacritice de Donici Cãtãlin ----
- -----------------------------------------------------
- quest mob_kill_notice begin
- state start begin
- when 691.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 300 )
- chat ("Gradul tãu a crescut cu 300 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe ªeful Orc din Valea Orcilor!" )
- end
- when 692.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 900 )
- chat ("Gradul tãu a crescut cu 900 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe ªeful Orc de elita din Valea Orcilor!" )
- end
- when 693.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- chat ("Gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe ªeful Orc ucigator din Valea Orcilor!" )
- end
- when 791.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 500 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 500 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Stãpânul Esotericilor din Templul Întunecat!" )
- end
- when 792.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 900 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 900 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Stãpânul Esotericilor Demonizat din Templul Întunecat!" )
- end
- when 793.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 900 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 900 de puncte!")
- notice_all ( pc.getname() , "l-a omorât pe Stãpânul Esotericilor Demonizat din Templul Întunecat!" )
- end
- when 794.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Stãpânul Esotericilor din Templul Întunecat!" )
- end
- when 795.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Stãpânul Esotercilor Demonizat EXTRA" )
- end
- when 1306.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 2 pietre spirit ºi gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Fantoma Tigrului Galben !" )
- end
- when 1307.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Fantoma Tigrului Galben EXTRA !" )
- end
- when 1091.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 600 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 600 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Regele Demon!" )
- end
- when 1092.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 800 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 800 de puncte!")
- notice_all ( pc.getname() , "l-a omorât pe Regele Demon Mândru!" )
- end
- when 1093.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 3 pietre spirit ºi gradul tãu a crescut cu 1000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Îngerul cu Coasa!" )
- end
- when 1094.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 3 pietre spirit ºi gradul tãu a crescut cu 1000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Regele Demon Mândru EXTRA!" )
- end
- when 1095.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Îngerul cu Coasa EXTRA!" )
- end
- when 993.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Regele gazda al ciumei!" )
- end
- when 1901.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 2 pietre spirit ºi gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " a omorât-o pe Vulpea cu 9 cozi!" )
- end
- when 1902.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 2000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 2 pietre spirit ºi gradul tãu a crescut cu 2000 de puncte!")
- notice_all ( pc.getname() , " a omorât-o pe Vulpea cu 9 cozi 2!" )
- end
- when 1903.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 3000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 3 pietre spirit ºi gradul tãu a crescut cu 3000 de puncte!!")
- notice_all ( pc.getname() , " a omorât-o pe Vulpea cu 9 cozi EXTRA!" )
- end
- when 2091.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 2 pietre spirit ºi gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " a omorât-o pe Regina P?ianjen!" )
- end
- when 2092.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 3000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 3 pietre spirit ºi gradul tãu a crescut cu 3000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Regele P?ianjen!" )
- end
- when 2093.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " a omorât-o pe Regina Pianjen EXTRA!" )
- end
- when 2191.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 2000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 2 pietre spirit ºi gradul tãu a crescut cu 2000 de puncte!")
- notice_all ( pc.getname() , " a omorât-o pe ?estoasa Uria?? de De?ert!" )
- end
- when 2192.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " a omorât-o pre ?estoasa Uria?? de De?ert EXTRA!" )
- end
- when 2491.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Liderul Seatou Levhiatan!" )
- end
- when 2492.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Liderul Seatou Levhiatan 2 !" )
- end
- when 2493.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 10000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 10000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Beran-Setaou!" )
- end
- when 5002.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 2000 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 2000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Hae-Tae!" )
- end
- when 2206.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 1500 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 1 pietre spirit ºi gradul tãu a crescut cu 1500 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Regele de Foc!" )
- end
- when 2207.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Regele de Foc 2!" )
- end
- when 2291.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Dragonul Ro?u!" )
- end
- when 2306.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 3000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 3 pietre spirit ºi gradul tãu a crescut cu 3000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Copacul Gigant!" )
- end
- when 2307.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 8000 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- pc . give_item2 ( 50513 )
- chat ("Ai primit 5 pietre spirit ºi gradul tãu a crescut cu 8000 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Copacul B?trân!" )
- end
- when 1403.kill begin
- if pc.is_gm() then
- return
- end
- pc . change_alignment ( 300 )
- pc . give_item2 ( 50034 )
- chat ("Ai primit 1 ladã misterioasa ºi gradul tãu a crescut cu 300 de puncte!")
- notice_all ( pc.getname() , " l-a omorât pe Gigantul Milenar!" )
- end
- end
- end
That is absolutely obnoxious in my opinion, totally obnoxious.
I'm here today to show you the simplest, cleanest and shortest way to deal with something like this: A quest which communicates with a simple library in order to get global notice and eventual drop from a boss/monster or metin kill, the quest is coded to work with bosses, but it's fully ampliable and 100% customizable to your likings.
I release this in hope to see less quests like the one i put into a spoiler (no one should see that, it could spread terminal cancer).As always, the library is fully customizable.
Each function contains a clear explanation of its structure and what it does.Have fun!
Function Library File (.lua):
Quest File:
How do i use the library file?
Make it load by dofile() in your questlib.lua or simply add what's inside it to the questlib.lua as it is.Why should i use it?
First of all, as I said, it's fully customizable: you can just add new monsters to the main data array and the quest will handle them.
Secondly, the library file contains the full boss and data arrays + documentation and yet it still is only 120 lines of code, the quest contains the checks and the notice/drop functions, nothing else, since the whole is completely managed by the library, small, yet full of functionalities.