salutare ,
am facut acest sistem http://just4metin.ro/altele/schimba-far ... 37220.html
dar problemele sunt 2 ..
1- nu ma teleporteaza pe celalalt ch
2- nu mai dispare ala de schimbare chiar daca dau X
Ma poate ajuta cineva ?
Schimbare CH
baga in root
https://mega.nz/#!bEYknICa!buI8MmRZwT8A ... i4yaRzCrgw
Deschide uisystem.py și adaugă:
cauta
https://mega.nz/#!bEYknICa!buI8MmRZwT8A ... i4yaRzCrgw
Deschide uisystem.py și adaugă:
import channelcauta
self.GetChild("system_option_button").SAFE_SetEvent(self.__ClickSystemOptionButton)
adauga m-ai jos
self.GetChild("change_ch_button").SAFE_SetEvent(self.__ClickChangeChannelButton)
cauta functia
def __ClickGameOptionButton(self):
self.Close()
if not self.gameOptionDlg:
self.gameOptionDlg = uiGameOption.OptionDialog()
self.gameOptionDlg.Show()
adauga m-ai jos
def __ClickChangeChannelButton(self):
self.Close()
import channel
vegas = channel.Titan2_Channel_Changer()
vegas.Open()
Deschide constInfo.py și adaugă:
change_time = 0acuma deschide systemdialog.py. din locale
cauta
{
"name" : "exit_button",
"type" : "button",
"x" : 10,
"y" : 217,
"text" : uiScriptLocale.SYSTEM_EXIT,
"default_image" : ROOT + "XLarge_Button_01.sub",
"over_image" : ROOT + "XLarge_Button_02.sub",
"down_image" : ROOT + "XLarge_Button_03.sub",
},
adauga m-ai jos
{
"name" : "change_ch_button",
"type" : "button",
"x" : 10,
"y" : 277,
"text" : "Change Channel - VegaS",
"text_color" : 0xffF8BF24,
"default_image" : ROOT + "XLarge_Button_01.sub",
"over_image" : ROOT + "XLarge_Button_02.sub",
"down_image" : ROOT + "XLarge_Button_03.sub",
},
gata cu partea python acuma avem parte c++
Deschide cmd.cpp și caută:
Code:
ACMD(do_item);
//Mai jos adaugă:
Code:
ACMD(do_ch);
//Caută:
Code:
{ "pvp", do_pvp, 0, POS_DEAD, GM_PLAYER },
//Mai jos adaugă:
Code:
{ "ch", do_ch, 0, POS_DEAD, GM_PLAYER },
Deschide cmd_general.cpp și caută:
Code:
ACMD(do_set_walk_mode)
{
ch->SetNowWalking(true);
ch->SetWalking(true);
}
//Mai jos adaugă:
UnHidden Content:
Code:
ACMD(do_ch)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
return;
int new_ch;
str_to_number(new_ch, arg1);
if( new_ch <1 || new_ch >4)
return;
if (!ch->IsPC())
return;
ch->ChannelSwitch(new_ch);
}
Deschide char.h și caută:
Code:
void StartWarpNPCEvent();
//Mai jos adaugă:
UnHidden Content:
Code:
void ChannelSwitch(int new_ch);
Deschide char.cpp și caută:
Code:
EVENTFUNC(warp_npc_event)
{
char_event_info* info = dynamic_cast<char_event_info*>( event->info );
if ( info == NULL )
{
sys_err( "warp_npc_event> <Factor> Null pointer" );
return 0;
}
LPCHARACTER ch = info->ch;
if (ch == NULL) { // <Factor>
return 0;
}
if (!ch->GetSectree())
{
ch->m_pkWarpNPCEvent = NULL;
return 0;
}
FuncCheckWarp f(ch);
if (f.Valid())
ch->GetSectree()->ForEachAround(f);
return passes_per_sec / 2;
}
//Mai jos adaugă:
UnHidden Content:
HTML:
void CHARACTER::ChannelSwitch(int iNewChannel){
long lAddr;
long lMapIndex;
WORD wPort;
long x = this->GetX();
long y = this->GetY();
if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort))
{
return;
}
if(lMapIndex >= 10000){
return;
}
std::map<WORD, int>ch;
for(int i = 0; i < 4; i++){
for(int i2 = 1; i2 < 9; i2++){
ch[29*1000 + i*100 + i2] = i+1;
}
}
int chan;
if(ch.find(wPort) != ch.end()){
chan = ch[wPort];
}else{return;}
Stop();
Save();
if(GetSectree()){
GetSectree()->RemoveEntity(this);
ViewCleanup();
EncodeRemovePacket(this);
}
TPacketGCWarp p;
p.bHeader = HEADER_GC_WARP;
p.lX = x;
p.lY = y;
p.lAddr = lAddr;
p.wPort = (wPort - 100*(chan-1) + 100*(iNewChannel-1));
GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
}
Porturi:
CH1:
Core1: 29001
Core2: 29002
Core3: 29003
Core4: 29004
CH2:
Core1: 29101
Core2: 29102
Core3: 29103
Core4: 29104
CH3:
Core1: 29201
Core2: 29202
Core3: 29203
Core4: 29204
Click to expand...
etc..
Code:
for(int i = 0; i < 4; i++){Pongo scrie:baga in root
https://mega.nz/#!bEYknICa!buI8MmRZwT8A ... i4yaRzCrgw
Deschide uisystem.py și adaugă:import channelcautaself.GetChild("system_option_button").SAFE_SetEvent(self.__ClickSystemOptionButton)adauga m-ai josself.GetChild("change_ch_button").SAFE_SetEvent(self.__ClickChangeChannelButton)cauta functiadef __ClickGameOptionButton(self): self.Close() if not self.gameOptionDlg: self.gameOptionDlg = uiGameOption.OptionDialog() self.gameOptionDlg.Show()adauga m-ai josdef __ClickChangeChannelButton(self): self.Close() import channel vegas = channel.Titan2_Channel_Changer() vegas.Open()Deschide constInfo.py și adaugă:change_time = 0acuma deschide systemdialog.py. din locale
cauta{ "name" : "exit_button", "type" : "button", "x" : 10, "y" : 217, "text" : uiScriptLocale.SYSTEM_EXIT, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", },adauga m-ai jos{ "name" : "change_ch_button", "type" : "button", "x" : 10, "y" : 277, "text" : "Change Channel - VegaS", "text_color" : 0xffF8BF24, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", },gata cu partea python acuma avem parte c++Deschide cmd.cpp și caută: Code: ACMD(do_item); //Mai jos adaugă: Code: ACMD(do_ch); //Caută: Code: { "pvp", do_pvp, 0, POS_DEAD, GM_PLAYER }, //Mai jos adaugă: Code: { "ch", do_ch, 0, POS_DEAD, GM_PLAYER }, Deschide cmd_general.cpp și caută: Code: ACMD(do_set_walk_mode) { ch->SetNowWalking(true); ch->SetWalking(true); } //Mai jos adaugă: UnHidden Content: Code: ACMD(do_ch) { char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if (!*arg1) return; int new_ch; str_to_number(new_ch, arg1); if( new_ch <1 || new_ch >4) return; if (!ch->IsPC()) return; ch->ChannelSwitch(new_ch); } Deschide char.h și caută: Code: void StartWarpNPCEvent(); //Mai jos adaugă: UnHidden Content: Code: void ChannelSwitch(int new_ch); Deschide char.cpp și caută: Code: EVENTFUNC(warp_npc_event) { char_event_info* info = dynamic_cast<char_event_info*>( event->info ); if ( info == NULL ) { sys_err( "warp_npc_event> <Factor> Null pointer" ); return 0; } LPCHARACTER ch = info->ch; if (ch == NULL) { // <Factor> return 0; } if (!ch->GetSectree()) { ch->m_pkWarpNPCEvent = NULL; return 0; } FuncCheckWarp f(ch); if (f.Valid()) ch->GetSectree()->ForEachAround(f); return passes_per_sec / 2; } //Mai jos adaugă: UnHidden Content: HTML: void CHARACTER::ChannelSwitch(int iNewChannel){ long lAddr; long lMapIndex; WORD wPort; long x = this->GetX(); long y = this->GetY(); if (!CMapLocation::instance().Get(x, y, lMapIndex, lAddr, wPort)) { return; } if(lMapIndex >= 10000){ return; } std::map<WORD, int>ch; for(int i = 0; i < 4; i++){ for(int i2 = 1; i2 < 9; i2++){ ch[29*1000 + i*100 + i2] = i+1; } } int chan; if(ch.find(wPort) != ch.end()){ chan = ch[wPort]; }else{return;} Stop(); Save(); if(GetSectree()){ GetSectree()->RemoveEntity(this); ViewCleanup(); EncodeRemovePacket(this); } TPacketGCWarp p; p.bHeader = HEADER_GC_WARP; p.lX = x; p.lY = y; p.lAddr = lAddr; p.wPort = (wPort - 100*(chan-1) + 100*(iNewChannel-1)); GetDesc()->Packet(&p, sizeof(TPacketGCWarp)); } Porturi: CH1: Core1: 29001 Core2: 29002 Core3: 29003 Core4: 29004 CH2: Core1: 29101 Core2: 29102 Core3: 29103 Core4: 29104 CH3: Core1: 29201 Core2: 29202 Core3: 29203 Core4: 29204 Click to expand... etc.. Code: for(int i = 0; i < 4; i++){
Ultima parte in char.cpp nu cred ca e completa
UP cineva ?
Subiect inactiv arhivat !
Răspunsuri
5 Vizualizări
441
5 Vizualizări
441
Răspunsuri
7 Vizualizări
725
7 Vizualizări
725
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Baidu [Spider], Bing [Bot] și 103 vizitatori

