![](https://metin2.dev/uploads/theme-resources/set_resources_31/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://metin2.dev/uploads/theme-resources/set_resources_31/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
avertuss
-
Posts
480 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by avertuss
-
-
21 godzin temu, JeeX napisał:
// open item.h
//search: bool IsDragonSoul();
//add under:
bool IsCostumeMount() { return GetType() == ITEM_COSTUME && GetSubType() == COSTUME_MOUNT; }
input_login.cpp:608: error: 'class CHARACTER' has no member named 'UnEquipCostumeMoudeItem'
-
44 minuty temu, JeeX napisał:
I hope i didn't forgot anything <-
//char.cpp //add after includes: bool IsMountable(int map_index, bool isHorse) { if (CArenaManager::instance().IsArenaMap(map_index)) return false; switch (map_index) { case YOUR_MAPINDEX: //edit this <- [e.g. 61 - look @ your map_index] return false; } return true; } //char_item.cpp //add after includes: extern bool IsMountable(int map_index, bool isHorse); //search: bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) //add: if (item->IsCostumeMount() && !IsMountable(GetMapIndex(), false)) return false; //input_login.cpp //add after includes: extern bool IsMountable(int map_index, bool isHorse); //search: void CInputLogin::Entergame(LPDESC d, const char * data) if (!IsMountable(ch->GetMapIndex(), false)) ch->UnEquipCostumeMoudeItem(false); //questlua_horse.cpp //add after includes: extern bool IsMountable(int map_index, bool isHorse); //search: ALUA(horse_summon) //add: if (!IsMountable(ch->GetMapIndex(), true)) return 0; //search: ALUA(horse_in_summonable_area) //add: lua_pushboolean(L, IsMountable(ch->GetMapIndex(), isMount)); //questlua_pc.cpp //add after includes: extern bool IsMountable(int map_index, bool isHorse); //search: ALUA(pc_mount) //add: if (!IsMountable(ch->GetMapIndex(), mount_vnum == ch->GetMyHorseVnum())) return 0;
I don't have that IsCostumeMount in source.
-
Hi. How to change mining time?
-
1 godzinę temu, JeeX napisał:
why with quest?
do you use source? - its pritty simple to create in c++
Yes. I'm using source but i have no idea how to do it in c++.
-
Hi. i wrote quest
quest block_horse begin state start begin when login with pc.get_map_index() >= 1100000 and pc.get_map_index() <= 1110000 begin horse.unride() horse.unsummon() pc.unmount() end end end
quest works but only with horse, with mount too(pc isn't on mount), but mount item is still in the slot
How can i fix that?
-
-
Hi. I have problem with we. Original map
when i edit map and save in we
Any ideas?
-
Hi. How can i make that player can add 2x max hp or other bonus to item? Normally player can't add second bonus with the same type if 1st is available in item. Any ideas?
-
17 godzin temu, Syreldar napisał:
quest daily_bonus begin state start begin function GetData() local data = { [1] = {["attrtype"] = 1, ["attrvalue_list"] = {[1] = 1000, [2] = 1500, [3] = 2000}}, [2] = {["attrtype"] = 13, ["attrvalue_list"] = {[1] = 6, [2] = 12, [3] = 18}}, [3] = {["attrtype"] = 15, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [4] = {["attrtype"] = 16, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [5] = {["attrtype"] = 63, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [6] = {["attrtype"] = 17, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [7] = {["attrtype"] = 21, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [8] = {["attrtype"] = 22, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [9] = {["attrtype"] = 72, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [10] = {["attrtype"] = 54, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [11] = {["attrtype"] = 53, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}} }; return data; end -- function function table_get_random_item(table_ex) return table_ex[math.random(table.getn(table_ex))]; end -- function when 80009.use begin local data = daily_bonus.GetData(); local chosen_bonus = daily_bonus.table_get_random_item(data); local day_time = 60*60*24; affect.add_collect(chosen_bonus["attrtype"], daily_bonus.table_get_random_item(chosen_bonus["attrvalue_list"]), day_time); chat(chat_color("["..item_name(item.vnum).."]", "green").." You got bonus.") end -- when end -- state end -- quest
because you keep modifying things without testing them first. Use this now.
Now it works but when i wanted to show which bonus player got i saw error
SYSERR: Jan 30 13:05:49 :: RunState: LUA_ERROR: [string "daily_bonus"]:5: attempt to call field `attrname' (a string value)
SYSERR: Jan 30 13:05:49 :: WriteRunningStateToSyserr: LUA_ERROR: quest daily_bonus.start clickQuest:
quest daily_bonus begin state start begin function GetData() local data = { [1] = {["attrname"] = "Max. HP", ["attrtype"] = 1, ["attrvalue_list"] = {[1] = 1000, [2] = 1500, [3] = 2000}}, [2] = {["attrname"] = "Max. HP2", ["attrtype"] = 13, ["attrvalue_list"] = {[1] = 6, [2] = 12, [3] = 18}}, [3] = {["attrname"] = "Max. HP3", ["attrtype"] = 15, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [4] = {["attrname"] = "Max. HP4", ["attrtype"] = 16, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [5] = {["attrname"] = "Max. HP5", ["attrtype"] = 63, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [6] = {["attrname"] = "Max. HP6", ["attrtype"] = 17, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [7] = {["attrname"] = "Max. HP7", ["attrtype"] = 21, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [8] = {["attrname"] = "Max. HP8", ["attrtype"] = 22, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [9] = {["attrname"] = "Max. HP9", ["attrtype"] = 72, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [10] = {["attrname"] = "Max. HP10", ["attrtype"] = 54, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [11] = {["attrname"] = "Max. HP11", ["attrtype"] = 53, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}} }; return data; end -- function function table_get_random_item(table_ex) return table_ex[math.random(table.getn(table_ex))]; end -- function when 80009.use begin local data = daily_bonus.GetData(); local chosen_bonus = daily_bonus.table_get_random_item(data); local day_time = 1*1*30; affect.add_collect(chosen_bonus["attrtype"], daily_bonus.table_get_random_item(chosen_bonus["attrvalue_list"]), day_time); chat(chat_color("["..item_name(item.vnum).."]", "green").." You got "..chosen_bonus["attrname"]"") end -- when end -- state end -- quest
Can you help me?
-
Dnia 28.01.2018 o 17:49, Syreldar napisał:
You are using the wrong version, i modified that once for a quick fix, c/p it again.
as for the attrs on chat, why don't you try to figure it yourself man? Try to learn.
But your quest doesn't work
quest daily_bonus begin state start begin function GetData() local data = { [1] = {["attrtype"] = 1, ["attrvalue_list"] = {[1] = 1000, [2] = 1500, [3] = 2000}}, [2] = {["attrtype"] = 13, ["attrvalue_list"] = {[1] = 6, [2] = 12, [3] = 18}}, [3] = {["attrtype"] = 15, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [4] = {["attrtype"] = 16, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [5] = {["attrtype"] = 63, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [6] = {["attrtype"] = 17, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [7] = {["attrtype"] = 21, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [8] = {["attrtype"] = 22, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [9] = {["attrtype"] = 72, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [10] = {["attrtype"] = 54, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [11] = {["attrtype"] = 53, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}} }; return data; end -- function function table_get_random_item(table_ex) return table_ex[math.random(table.getn(table_ex))]; end -- function when 80009.use begin local data = daily_bonus.GetData(); local random_num = daily_bonus.table_get_random_item(data); local chosen_bonus = data[random_num]; local day_time = 60*60*24; affect.add_collect(chosen_bonus["attrtype"], table_get_random_item(chosen_bonus["attrvalue_list"]), day_time); chat(chat_color("["..item_name(item.vnum).."]", "green").." You got bonus.") end -- when end -- state end -- quest
SYSERR: Jan 29 19:10:44 :: RunState: LUA_ERROR: [string "teleport"]:5: attempt to index local `chosen_bonus' (a nil value)
SYSERR: Jan 29 19:10:44 :: WriteRunningStateToSyserr: LUA_ERROR: quest teleport.start click -
Dnia 26.01.2018 o 13:31, Syreldar napisał:
quest daily_bonus begin state start begin function GetData() local data = { [1] = {["attrtype"] = 1, ["attrvalue_list"] = {[1] = 1000, [2] = 1500, [3] = 2000}}, [2] = {["attrtype"] = 13, ["attrvalue_list"] = {[1] = 6, [2] = 12, [3] = 18}}, [3] = {["attrtype"] = 15, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [4] = {["attrtype"] = 16, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [5] = {["attrtype"] = 63, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [6] = {["attrtype"] = 17, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [7] = {["attrtype"] = 21, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [8] = {["attrtype"] = 22, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [9] = {["attrtype"] = 72, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [10] = {["attrtype"] = 54, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [11] = {["attrtype"] = 53, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}} }; return data; end -- function function table_get_random_item(table_ex) return table_ex[math.random(table.getn(table_ex))]; end -- function when login with pc.getqf("time") <= get_time() begin local data = daily_bonus.GetData(); local random_num = table_get_random_item(data); local chosen_bonus = data[random_num]; local day_time = 60*60*24; pc.setqf("time", get_time()+day_time); affect.add_collect(chosen_bonus["attrtype"], table_get_random_item(chosen_bonus["attrvalue_list"]), day_time); syschat("You have received your bonus. Come back in 24 hours.") end -- when end -- state end -- quest
I have problem. Your quest doesn't work. Error:
SYSERR: Jan 28 17:36:56 :: RunState: LUA_ERROR: [string "daily_bonus"]:6: attempt to index local `chosen_bonus' (a nil value) SYSERR: Jan 28 17:36:56 :: WriteRunningStateToSyserr: LUA_ERROR: quest daily_bonus.start click
I wanted add attr_name and value on chat
quest daily_bonus begin state start begin function GetData() local data = { [1] = {["attr_name"] = "MAX HP", ["attrtype"] = 1, ["attrvalue_list"] = {[1] = 1000, [2] = 1500, [3] = 2000}}, [2] = {["attr_name"] = "MAX HP", ["attrtype"] = 13, ["attrvalue_list"] = {[1] = 6, [2] = 12, [3] = 18}}, [3] = {["attr_name"] = "MAX HP", ["attrtype"] = 15, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [4] = {["attr_name"] = "MAX HP", ["attrtype"] = 16, ["attrvalue_list"] = {[1] = 10, [2] = 15, [3] = 20}}, [5] = {["attr_name"] = "MAX HP", ["attrtype"] = 63, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [6] = {["attr_name"] = "MAX HP", ["attrtype"] = 17, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [7] = {["attr_name"] = "MAX HP", ["attrtype"] = 21, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [8] = {["attr_name"] = "MAX HP", ["attrtype"] = 22, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [9] = {["attr_name"] = "MAX HP", ["attrtype"] = 72, ["attrvalue_list"] = {[1] = 5, [2] = 10, [3] = 15}}, [10] = {["attr_name"] = "MAX HP", ["attrtype"] = 54, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}}, [11] = {["attr_name"] = "MAX HP", ["attrtype"] = 53, ["attrvalue_list"] = {[1] = 50, [2] = 75, [3] = 100}} }; return data; end -- function function table_get_random_item(table_ex) return table_ex[math.random(table.getn(table_ex))]; end -- function when 80009.use with pc.getqf("time") <= get_time() begin local data = daily_bonus.GetData(); local random_num = table_get_random_item(data); local chosen_bonus = data[random_num]; local day_time = 60*60*24; pc.setqf("time", get_time()+day_time); affect.add_collect(chosen_bonus["attrtype"], table_get_random_item(chosen_bonus["attrvalue_list"]), day_time); syschat("You got bonus" "..chosen_bonus["attr_name"]..""..value table_get_random_item(chosen_bonus["attrvalue_list"])).."") end -- when end -- state end -- quest
and it doesn't work. Can you help me?
-
-
Hi. I found quest:
quest daily_bonus begin state start begin when login begin if pc.getqf("time") == 0 or pc.getqf("time") <= get_time() then pc.setqf("time", get_time()+60*60*24) local bonusy = { {"Max. HP +1000", 1, 1000}, {"Szansa na Omdlenie 5%", 13, 6}, {"Szansa na Kryt. Uderzenie 8%", 15, 10}, {"Szansa na Przeszyw. Uderzenie 8%", 16, 10}, {"Silny Przeciwko Potworom 3%", 63, 5}, {"Silny Przeciwko Ludziom 3%", 17, 5}, {"Silny Przeciwko Nieumarłym 15%", 21, 10}, {"Silny Przeciwko Diabłom 15%", 22, 10}, {"Średnie Obrażenia +15%", 72, 10}, {"Obrona +50", 54, 50}, {"Wartość Ataku +50", 53, 50}, } local n = number(1, table.getn(bonusy)) affect.add_collect(bonusy[n][2], bonusy[n][3], 60*60*24) chat("Za dzisiejsze zalogowanie się otrzymujesz bonus: "..bonusy[n][1]) chat("Czas Trwania Bonusu: 24h.") end end end end
How can i make that value of the bonus will be random from table. For example: {"Max. HP +1000", 1, random(1000 or 1500 or 2000)},
Thanks for help.
-
Hi. How can i fix that bonus?
-
How can i change that in source? I want to allow fishing only on map with id 123.
-
-
20 minut temu, Den napisał:
Is that everything that you've got in syserr?
Check pm. Full syserr + system.
-
It's that line:
void CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop = true, long alSockets[ITEM_SOCKET_SLOT_MAX_NUM] = {}, TPlayerItemAttribute aAttrs[ITEM_ATTRIBUTE_SLOT_MAX_NUM] = {});
-
Hi. I have that syserr:
1128 15:33:09993 :: TypeError
1128 15:33:09993 :: :
1128 15:33:09993 :: InsertItem() takes exactly 3 positional arguments (5 given)
1128 15:33:09993 ::function
def InsertItem(self, number, text): self.keyDict[len(self.itemList)] = number self.textDict[len(self.itemList)] = text textLine = TextLine() textLine.SetParent(self) textLine.SetText(text) textLine.Show() if self.itemCenterAlign: textLine.SetWindowHorizontalAlignCenter() textLine.SetHorizontalAlignCenter() self.itemList.append(textLine) self._LocateItem()
Can you help me?
-
Hi. How can i delete that?
>=15 130% +14 128% +13 126% +12 124% +11 122% +10 120% +9 118% +8 116% +7 114% +6 112% +5 110% +4 108% +3 106% +2 104% +1 102% = 100% -1 100% -2 98% -3 96% -4 94% -5 92% -6 90% -7 85% -8 80% -9 70% -10 50% -11 30% -12 10% -13 5% <=-14 1%
I want to do the same exp from mob for example when i have 100 level or 110 and mob has 105. Any ideas?
-
Hi. is available function to get guild level in c++ something like
if (GetGuildLevel() > 10) code...
-
-
3 minuty temu, Den napisał:
Try for i in xrange(len(data['childs'])):
It works. Thanks a lot.
-
24 minuty temu, Den napisał:
Which line is 1508?
for i in xrange(xrange(len(data['childs']))):
Mining animation lenght
in Community Support - Questions & Answers
Posted
Hi. How to change lenght of the mining animation? In game i edited
to
but i need edit animation or binary