-
Posts
378 -
Joined
-
Last visited
-
Days Won
8 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by MrLibya
-
-
no we had code it by our self ( server side )
but client side a friend give it to me ( for color part )
-
hallo all
we have make the new item swap system
but we have 1 bug , that if I want swap item and the first target slot is empty it will ignore it and go to the first slot with item
img:
-
thx for the code , but it's useless , I can talk to my friend and keep killing him
or use different laptop and use a vpn ,
-
use the same query by navicat
-
why u did such a thing by source ? u could write query in navicat
-
hallo all
thos quests are only present in my files that i sell ( NewWorld) and someone stole it from one of my clients so i will public it here ( while the last update for thos two quests have too new feature )
the system will send a leeter to any gm with high level so he can start / close any event & also rate
note : it was writen too long time by me , so maybe u may not like some method
note2: the other event i will upload it here < useing official 40k quests < some of them i make litile change for them
note3: for adding more events , u can just add new line in the next two quests < easy to add
event manger:
Spoilerquest event begin state start begin when letter with pc.get_gm_level()==5 begin send_letter(gameforge.event.letter_10) end when button or info begin say_title(gameforge.event.title_20) say(gameforge.event.say_30) local events_info = { --- event_name , flag {gameforge.event.event_90, "new_2006_drop"}, {gameforge.event.event_100, "new_drop_moon"}, {gameforge.event.event_110, "new_valentine_drop"}, {gameforge.event.event_120, "new_football_drop"}, {gameforge.event.event_130, "new_ramadan_drop"}, {gameforge.event.event_140, "halloween_hair"}, {gameforge.event.event_150, "easter_rabbit"}, {gameforge.event.event_160, "new_xmas_event"}, {gameforge.event.event_170, "dressup_saleh"}, {gameforge.event.event_180, "sertbox_saleh"}, -- حالة خاصه , لاتقم بالتعديل هنا {gameforge.event.say_70, nil}, -- rate {gameforge.locale.cancel, ""} -- close } local menu01 = {} for num1,str1 in ipairs(events_info) do table.insert(menu01, str1[1]) end local seltab01 = select_table(menu01, gameforge.locale.cancel) if seltab01 == table.getn(menu01) then return end say_reward(gameforge.event.say_reward_40) if events_info[seltab01][2] == nil then say(gameforge.event.say_80) local min_rate = tonumber(input()) if min_rate == nil then say(gameforge.event.say_90) return end game.set_event_flag("event_rate", min_rate) else local s = select(gameforge.event.select_50, gameforge.event.select_60, gameforge.locale.cancel) if s == 1 then notice_all(string.format(gameforge.event.notice_70, events_info[seltab01][1])) game.set_event_flag(events_info[seltab01][2], 1) elseif s == 2 then notice_all(string.format(gameforge.event.notice_80, events_info[seltab01][1])) game.set_event_flag(events_info[seltab01][2], 0) else return end end end end end
event drop :
Spoilerquest event_drop begin state start begin function get_events_table() if event_drop.events_info == nil then event_drop.events_info={ {gameforge.event.event_90, "new_2006_drop", 50037}, {gameforge.event.event_100, "new_drop_moon", 50011}, {" صندوق غامض ", "new_kids_day_drop", 50034}, {gameforge.event.event_120, "new_football_drop", 50096}, {gameforge.event.event_130, "new_ramadan_drop", 30315}, {gameforge.event.event_170, "dressup_saleh", 50130}, {gameforge.event.event_180, "sertbox_saleh", 50033}, } end return event_drop.events_info end when login or enter begin for i,v in ipairs(event_drop.get_events_table()) do if game.get_event_flag(v[2]) == 1 then syschat(gameforge.event.say_100, v[1]) end end end when kill with not npc.is_pc() begin for i,v in ipairs(event_drop.get_events_table()) do if game.get_event_flag(v[2]) == 1 then local level = pc.get_level() local limit = npc.get_level0() local rate = game.get_event_flag("event_rate") if level < limit+5 then if math.random(1, 100) <= rate then game.drop_item_with_ownership(v[3]) end end end end end end end
- 38
- 3
- 1
- 1
- 1
- 1
- 2
- 9
- 3
- 40
-
-
which files u edit?
-
ot's my bad , it's ok now
-
-
that was a test , but the acticle one is :
when 20017.chat.gameforge.arena_manager._10_npcChat begin
gameforge.warehouse._10_npcChat = pc.get_lang()..gameforge.warehouse._10_npcChat
i also try
gameforge.warehouse._10_npcChat = ""..pc.get_lang()..gameforge.warehouse._10_npcChat
error :
attempt to concatenate field `_10_npcChat' (a nil value)
maybe cuz u write it in questlib.lua
try in translate.lua
-
how i can increase yang privetshop ( for now it's 999.999.999 , i want make it 900.000.000.000)
in root i have change the int to long ( for shops)
uicommon:
Spoilerclass MoneyInputDialog(ui.ScriptWindow):
self.SetMaxLength(12)
money = 900000000000
in moneyinputdialog.py
Spoiler"name" : "InputValue",
input_limit" : 15,
and
"name" : "MoneyValue",
"text" : "4000000000",
but ingamge i can't write price more then 999.999.999
did i miss something?
-
hallo
i was wondering how i can make something like this :
quest :
when 20017.chat.(string.format(gameforge.test._10_npcChat, pc.name())) begin
translate :
gameforge.test._10_npcChat = "hallo %s "
or something like that :
when 20017.chat.gameforge.test._10_npcChat begin
translate :
gameforge.test._10_npcChat = "hallo "..pc.get_name()
-
try in cmd_gm.cpp
find this
ACMD(do_item_purge)
change this
for (i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
to this
for (i = 0; i < INVENTORY_MAX_NUM; ++i)
-
#solved , thx to metin2team help
-
now i add in SPlayerStatus
SpoilerLONGLONG m_alPointEx[POINT_MAX_NUM];
void SetPointEx(UINT ePoint, LONGLONG lPoint);
LONGLONG GetPointEx(UINT ePoint);and the new function
Spoilerconst LONGLONG POINT_MAGIC_NUMBER_EX = 0xe73ac1da;
void CPythonPlayer::SPlayerStatus::SetPointEx(UINT ePoint, LONGLONG lPoint)
LONGLONG CPythonPlayer::SPlayerStatus::GetPointEx(UINT ePoint)
void CPythonPlayer::SetStatusEx(DWORD dwType, LONGLONG lValue)
int CPythonPlayer::GetStatusEx(DWORD dwType)
and new packet for packet_points_ex
Spoilerbool CPythonNetworkStream::__RecvPlayerPointsEx()
{
TPacketGCPointsEx PointsPacketEx;if (!Recv(sizeof(TPacketGCPointsEx), &PointsPacketEx))
return false;CPythonPlayer::Instance().SetStatusEx(POINT_GOLD, PointsPacketEx.points[POINT_GOLD]);
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshStatusEx", Py_BuildValue("()"));
return true;
}but still same bug,
maybe the const LONGLONG POINT_MAGIC_NUMBER_EX = 0xe73ac1da; wrong ?
-
oh right right , how did i missed that
thx i will tell u when it's done
-
3 minutes ago, metin2team said:
since that I've done it a long time ago, I'm not sure what's the problem you're facing.
anyway, can you tell me what PointChangeEx.amount 's datatype is?
what is the type that this (GetStatus) function is returning?
long long , i had to make new packet for point gold and delete it from the old one
this one from the binary
Spoilertypedef struct packet_point_change_ex
{
int header;DWORD dwVID;
BYTE Type;LONGLONG amount; // ¹ظ²ï °ھ
LONGLONG value; // اِہç °ھ
} TPacketGCPointChangeEx; -
i was try to make it unsigned long long in binary and long long in source,
now i make the binary long long and use PyLong_FromLongLong and same bug
also i test it with normal code
elk function :
SpoilerDWORDLONG gold = CPythonPlayer::Instance().GetStatus(POINT_GOLD);
return Py_BuildValue("L", gold);the new function for the new packet
SpoilerPyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", Py_BuildValue("(i)", PointChangeEx.amount));
and
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", Py_BuildValue("(L)", PointChangeEx.amount));
and same problem
-
hallo all
i was trying to increase yang so the server part is ok , i use ULL also i make new packet for that
only 1 problem every time i try something i get big value like that :
i'm useing
Spoilerreturn PyLong_FromUnsignedLongLong( CPythonPlayer::Instance().GetStatus(POINT_GOLD));
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "OnPickMoney", PyLong_FromUnsignedLongLong( PointChangeEx.amount));
i also try Py_BuildValue("(K)" and same bug
-
-
-
metin2 have 7 attribute not 5
-
it's prime key it can't duplicat
item swap bug
in Community Support - Questions & Answers
Posted
#close
the whole client part was shit and baggy