Best Studio 1
Best Studio
mannaxxx 1
mannaxxx
Agora Metin2 1
Agora Metin2
[DEV]AB 1
[DEV]AB
Sevdamsın 1
Sevdamsın
TuZaKK 1
TuZaKK
kaptanmikro1 1
kaptanmikro1
farkmt2official 2
farkmt2official
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Bvural41 1
Bvural41
Hikaye Ekle
Kaynak ikonu

Hızlı statü verme -like irisPanel 1

indirmek için izniniz yok

Türkiye'de ilk Mobil & PC Aynı Anda Metin2 Oyna. Triarchonline kalıcı ve uzun ömürlü yapısı ile 24 Temmuz'da açılıyor. | 1-99 Mobil Metin2 Triarch HEMEN TIKLA!

Paylaşım için teşekkürler.
 
Bilgisayarımda şuan hazır bi kurulu oyun olmadığı için maalesef ss yokda, karakter pencerisindeki statü butonlarının yanına ekstra buton eklendi işte.
Gereksiz ekstra pencere açılması saçma geliyordu, bence başka öyle düşünen varsa kullanabilir :)
Mantığı aynı statü puanın kadar seçilen statüden verir, maks statüyü geçiyorsa değer maksı verir. Normal statü mantığıyla aynı

[CODE lang="cpp" title="cmd.cpp" highlight="2,4"]// Uygun alanlara ekle:
ACMD(do_hizlistatuver);

{ "hizlistatuver", do_hizlistatuver, 0, POS_DEAD, GM_PLAYER },[/CODE]
[CODE lang="cpp" title="cmd_general.cpp"]ACMD(do_hizlistatuver)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));

if (!*arg1)
return;

if (ch->IsPolymorphed())
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("µĞ°© Áß¿¡´Â ´É·ÂÀ» ¿Ã¸± ¼ö ¾ø½À´Ï´Ù."));
return;
}

if (ch->GetPoint(POINT_STAT) <= 0)
return;

BYTE idx = 0;

if (!strcmp(arg1, "st"))
idx = POINT_ST;
else if (!strcmp(arg1, "dx"))
idx = POINT_DX;
else if (!strcmp(arg1, "ht"))
idx = POINT_HT;
else if (!strcmp(arg1, "iq"))
idx = POINT_IQ;
else
return;

if (ch->GetRealPoint(idx) >= MAX_STAT)
return;

if (idx == POINT_IQ)
{
ch->PointChange(POINT_MAX_HP, 0);
}
else if (idx == POINT_HT)
{
ch->PointChange(POINT_MAX_SP, 0);
}

BYTE hstatu = MAX_STAT - ch->GetRealPoint(idx);
if (hstatu <= ch->GetPoint(POINT_STAT))
{
ch->SetRealPoint(idx, ch->GetRealPoint(idx) + hstatu);
ch->SetPoint(idx, ch->GetPoint(idx) + hstatu);
ch->ComputePoints();
ch->PointChange(idx, 0);
ch->PointChange(POINT_STAT, -hstatu);
ch->ComputePoints();
}
else
{
ch->SetRealPoint(idx, ch->GetRealPoint(idx) + ch->GetPoint(POINT_STAT));
ch->SetPoint(idx, ch->GetPoint(idx) + ch->GetPoint(POINT_STAT));
ch->ComputePoints();
ch->PointChange(idx, 0);
ch->PointChange(POINT_STAT, -ch->GetPoint(POINT_STAT));
ch->ComputePoints();
}
}[/CODE]


[CODE lang="python" title="root/uicharacter.py"]## Arat:
self.statusPlusCommandDict={

## Bitimine ekle:
self.statusHizliPlusCommandDict={
"HTH" : "/hizlistatuver ht",
"INT" : "/hizlistatuver iq",
"STR" : "/hizlistatuver st",
"DEX" : "/hizlistatuver dx",
}

## Arat:
self.statusPlusButtonDict = {
"HTH" : self.GetChild("HTH_Plus"),
"INT" : self.GetChild("INT_Plus"),
"STR" : self.GetChild("STR_Plus"),
"DEX" : self.GetChild("DEX_Plus"),
}

## Altına ekle:
self.statusHizliPlusButtonDict = {
"HTH" : self.GetChild("HTH_HizliPlus"),
"INT" : self.GetChild("INT_HizliPlus"),
"STR" : self.GetChild("STR_HizliPlus"),
"DEX" : self.GetChild("DEX_HizliPlus"),
}

## Arat:
def __OnClickStatusPlusButton(self, statusKey):

## Bitimine ekle:
def __OnClickHizliStatusPlusButton(self, statusKey):
try:
statusHizliPlusCommand=self.statusHizliPlusCommandDict[statusKey]
net.SendChatPacket(statusHizliPlusCommand)
except KeyError, msg:
dbg.TraceError("CharacterWindow.__OnClickStatusHizliPlusButton KeyError: %s", msg)

## Arat:
for (statusPlusKey, statusPlusButton) in self.statusPlusButtonDict.items():

## Bitimine ekle:
for (statusHizliPlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
statusHizliPlusButton.SAFE_SetEvent(self.__OnClickHizliStatusPlusButton, statusHizliPlusKey)
statusHizliPlusButton.ShowToolTip = lambda arg=statusHizliPlusKey: self.__OverInStatButton(arg)
statusHizliPlusButton.HideToolTip = lambda arg=statusHizliPlusKey: self.__OverOutStatButton()

## Arat:
def ShowStatusPlusButtonList(self):
for (statePlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
statusPlusButton.Show()

def HideStatusPlusButtonList(self):
for (statePlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
statusPlusButton.Hide()

## Altına ekle:
def ShowStatusHizliPlusButtonList(self):
for (statePlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
statusHizliPlusButton.Show()

def HideStatusHizliPlusButtonList(self):
for (statePlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
statusHizliPlusButton.Hide()[/CODE]
[CODE lang="python" title="uiscript/characterwindow.py"]## Üste ekle:
AXS_BUTON_YOL="d:/ymir work/ui/axsol/"

## Arat:
{ "name":"HTH_Plus", "type" : "button", "x":41, "y":3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"HTH_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
## Arat:
{ "name":"INT_Plus", "type" : "button", "x" : 41, "y" : 3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"INT_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
## Arat:
{ "name":"STR_Plus", "type" : "button", "x":41, "y":3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"STR_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
## Arat:
{ "name":"DEX_Plus", "type" : "button", "x":41, "y":3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"DEX_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
[/CODE]

Teşekkürler bro her hangi bir bug olması söz konusumu acaba
 
Bilgisayarımda şuan hazır bi kurulu oyun olmadığı için maalesef ss yokda, karakter pencerisindeki statü butonlarının yanına ekstra buton eklendi işte.
Gereksiz ekstra pencere açılması saçma geliyordu, bence başka öyle düşünen varsa kullanabilir :)
Mantığı aynı statü puanın kadar seçilen statüden verir, maks statüyü geçiyorsa değer maksı verir. Normal statü mantığıyla aynı

[CODE lang="cpp" title="cmd.cpp" highlight="2,4"]// Uygun alanlara ekle:
ACMD(do_hizlistatuver);

{ "hizlistatuver", do_hizlistatuver, 0, POS_DEAD, GM_PLAYER },[/CODE]
[CODE lang="cpp" title="cmd_general.cpp"]ACMD(do_hizlistatuver)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));

if (!*arg1)
return;

if (ch->IsPolymorphed())
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("µĞ°© Áß¿¡´Â ´É·ÂÀ» ¿Ã¸± ¼ö ¾ø½À´Ï´Ù."));
return;
}

if (ch->GetPoint(POINT_STAT) <= 0)
return;

BYTE idx = 0;

if (!strcmp(arg1, "st"))
idx = POINT_ST;
else if (!strcmp(arg1, "dx"))
idx = POINT_DX;
else if (!strcmp(arg1, "ht"))
idx = POINT_HT;
else if (!strcmp(arg1, "iq"))
idx = POINT_IQ;
else
return;

if (ch->GetRealPoint(idx) >= MAX_STAT)
return;

if (idx == POINT_IQ)
{
ch->PointChange(POINT_MAX_HP, 0);
}
else if (idx == POINT_HT)
{
ch->PointChange(POINT_MAX_SP, 0);
}

BYTE hstatu = MAX_STAT - ch->GetRealPoint(idx);
if (hstatu <= ch->GetPoint(POINT_STAT))
{
ch->SetRealPoint(idx, ch->GetRealPoint(idx) + hstatu);
ch->SetPoint(idx, ch->GetPoint(idx) + hstatu);
ch->ComputePoints();
ch->PointChange(idx, 0);
ch->PointChange(POINT_STAT, -hstatu);
ch->ComputePoints();
}
else
{
ch->SetRealPoint(idx, ch->GetRealPoint(idx) + ch->GetPoint(POINT_STAT));
ch->SetPoint(idx, ch->GetPoint(idx) + ch->GetPoint(POINT_STAT));
ch->ComputePoints();
ch->PointChange(idx, 0);
ch->PointChange(POINT_STAT, -ch->GetPoint(POINT_STAT));
ch->ComputePoints();
}
}[/CODE]


[CODE lang="python" title="root/uicharacter.py"]## Arat:
self.statusPlusCommandDict={

## Bitimine ekle:
self.statusHizliPlusCommandDict={
"HTH" : "/hizlistatuver ht",
"INT" : "/hizlistatuver iq",
"STR" : "/hizlistatuver st",
"DEX" : "/hizlistatuver dx",
}

## Arat:
self.statusPlusButtonDict = {
"HTH" : self.GetChild("HTH_Plus"),
"INT" : self.GetChild("INT_Plus"),
"STR" : self.GetChild("STR_Plus"),
"DEX" : self.GetChild("DEX_Plus"),
}

## Altına ekle:
self.statusHizliPlusButtonDict = {
"HTH" : self.GetChild("HTH_HizliPlus"),
"INT" : self.GetChild("INT_HizliPlus"),
"STR" : self.GetChild("STR_HizliPlus"),
"DEX" : self.GetChild("DEX_HizliPlus"),
}

## Arat:
def __OnClickStatusPlusButton(self, statusKey):

## Bitimine ekle:
def __OnClickHizliStatusPlusButton(self, statusKey):
try:
statusHizliPlusCommand=self.statusHizliPlusCommandDict[statusKey]
net.SendChatPacket(statusHizliPlusCommand)
except KeyError, msg:
dbg.TraceError("CharacterWindow.__OnClickStatusHizliPlusButton KeyError: %s", msg)

## Arat:
for (statusPlusKey, statusPlusButton) in self.statusPlusButtonDict.items():

## Bitimine ekle:
for (statusHizliPlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
statusHizliPlusButton.SAFE_SetEvent(self.__OnClickHizliStatusPlusButton, statusHizliPlusKey)
statusHizliPlusButton.ShowToolTip = lambda arg=statusHizliPlusKey: self.__OverInStatButton(arg)
statusHizliPlusButton.HideToolTip = lambda arg=statusHizliPlusKey: self.__OverOutStatButton()

## Arat:
def ShowStatusPlusButtonList(self):
for (statePlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
statusPlusButton.Show()

def HideStatusPlusButtonList(self):
for (statePlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
statusPlusButton.Hide()

## Altına ekle:
def ShowStatusHizliPlusButtonList(self):
for (statePlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
statusHizliPlusButton.Show()

def HideStatusHizliPlusButtonList(self):
for (statePlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
statusHizliPlusButton.Hide()[/CODE]
[CODE lang="python" title="uiscript/characterwindow.py"]## Üste ekle:
AXS_BUTON_YOL="d:/ymir work/ui/axsol/"

## Arat:
{ "name":"HTH_Plus", "type" : "button", "x":41, "y":3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"HTH_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
## Arat:
{ "name":"INT_Plus", "type" : "button", "x" : 41, "y" : 3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"INT_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
## Arat:
{ "name":"STR_Plus", "type" : "button", "x":41, "y":3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"STR_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
## Arat:
{ "name":"DEX_Plus", "type" : "button", "x":41, "y":3, "default_image" : ROOT_PATH+"btn_plus_up.sub", "over_image" : ROOT_PATH+"btn_plus_over.sub", "down_image" : ROOT_PATH+"btn_plus_down.sub", },
## Altına ekle:
{ "name":"DEX_HizliPlus", "type" : "button", "x" : 54, "y" : 2, "default_image" : AXS_BUTON_YOL+"hstatu_1.png", "over_image" : AXS_BUTON_YOL+"hstatu_2.png", "down_image" : AXS_BUTON_YOL+"hstatu_3.png", },
[/CODE]

Teşekkürler
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst