Problema sistem roua

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Avatar utilizator
iacov23
Nivel 3

Nivel 3
Mesaje: 378
Membru din: 29 Mai 2018, 17:31
Server: foarte bine
Aprecieri: 71  
Mulţumiri: 28  
Medalii

*Problemă/Întrebare:Am incercat sa implementez acest system sursa/python-sistem-roua-t84826.html iar la partea de char_item.cpp nu inteleg ce trebuie sa fac,

Cod: Selectaţi tot

case 71052:
								{
									LPITEM item2;

									if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
										return false;

									if (item2->IsExchanging() == true)
										return false;
									
									if (item2->IsEquipped())
										return false;
									
									if (item2->GetType() == ITEM_COSTUME)
										return false;								
								
									if (item2->GetAttributeSetIndex() == -1)
									{
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
										return false;
									}
									
									if (item2->GetAttributeCount() == 4)
									{
										item2->RemoveAttributeAt(4);
										item2->AddAttribute();
										item->SetCount(item->GetCount()-1);
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
									}
									else if (item2->GetAttributeCount() == 3)
									{
										item2->AddAttribute();
										item->SetCount(item->GetCount()-1);
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));										
									}
									else
									{
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_MARBLE_ENOUGH_ATTR_COUNT"));
									}
								}
								break;
Tipologie server: pvm
*Resursă folosită: sursa/python-sistem-roua-t84826.html
*ServerFiles utilizat: pvm
*Syserr: -
Poză: -
*Detalii suplimentare: In sursa mea nu gasesc ce e mai sus si nu stiu unde ar trebui pusa

Cod: Selectaţi tot

							case 71052:
								{
									LPITEM item2;

									if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
										return false;

									if (item2->IsExchanging() == true)
										return false;
									
									if (item2->IsEquipped())
										return false;
									
									if (item2->GetType() == ITEM_COSTUME)
										return false;								
								
									if (item2->GetAttributeSetIndex() == -1)
									{
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼Ó¼ºÀ» º¯°æÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù."));
										return false;
									}
									
									if (item2->GetAttributeCount() == 4)
									{
										item2->RemoveAttributeAt(4);
										item2->AddAttribute();
										item->SetCount(item->GetCount()-1);
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));
									}
									else if (item2->GetAttributeCount() == 3)
									{
										item2->AddAttribute();
										item->SetCount(item->GetCount()-1);
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_SUCCESS_MARBLE"));										
									}
									else
									{
										ChatPacket(CHAT_TYPE_INFO, LC_TEXT("NEW_ATTRIBUTE_MARBLE_ENOUGH_ATTR_COUNT"));
									}
								}
								break;




Altına Eklenir ;



#ifdef BYKATIL199_ITEM_SLOT_EFFECT
							case NEW_MOVE_SPEED_POTION:
							case NEW_ATTACK_SPEED_POTION:
								{
									EAffectTypes type = AFFECT_NONE;

									if (item->GetVnum() == NEW_MOVE_SPEED_POTION)
										type = AFFECT_MOV_SPEED;

									if (item->GetVnum() == NEW_ATTACK_SPEED_POTION)
										type = AFFECT_ATT_SPEED;

									if (AFFECT_NONE == type)
										break;

									CAffect * pAffect = FindAffect(type);

									if (NULL == pAffect)
									{
										EPointTypes bonus = POINT_NONE;
										EAffectBits flag = AFF_NONE;

										if (item->GetVnum() == NEW_MOVE_SPEED_POTION)
										{
											bonus = POINT_MOV_SPEED;
											flag = AFF_MOV_SPEED_POTION;
										}

										if (item->GetVnum() == NEW_ATTACK_SPEED_POTION)
										{
											bonus = POINT_ATT_SPEED;
											flag = AFF_ATT_SPEED_POTION;
										}

										AddAffect(type, bonus, item->GetValue(2), flag, INFINITE_AFFECT_DURATION, 0, true);

										item->Lock(true);
										item->SetSocket(0, true);
									}
									else
									{
										RemoveAffect(pAffect);
										item->Lock(false);
										item->SetSocket(0, false);
									}
								}
								break;
							case NEW_KRITIK_POTION:
							case NEW_DELICI_POTION:
							case NEW_DRAGON_1_POTION:
							case NEW_DRAGON_2_POTION:
							case NEW_DRAGON_3_POTION:
							case NEW_DRAGON_4_POTION:
								{
									EAffectTypes type = AFFECT_NONE;

									if (item->GetVnum() == NEW_KRITIK_POTION)
										type = AFFECT_NEW_AFFECT_POTION_1;

									if (item->GetVnum() == NEW_DELICI_POTION)
										type = AFFECT_NEW_AFFECT_POTION_2;

									if (item->GetVnum() == NEW_DRAGON_1_POTION)
										type = AFFECT_NEW_AFFECT_POTION_3;

									if (item->GetVnum() == NEW_DRAGON_2_POTION)
										type = AFFECT_NEW_AFFECT_POTION_4;

									if (item->GetVnum() == NEW_DRAGON_3_POTION)
										type = AFFECT_NEW_AFFECT_POTION_5;

									if (item->GetVnum() == NEW_DRAGON_4_POTION)
										type = AFFECT_NEW_AFFECT_POTION_6;

									if (AFFECT_NONE == type)
										break;

									CAffect * pAffect = FindAffect(type);

									if (NULL == pAffect)
									{
										EPointTypes bonus = POINT_NONE;
										EAffectBits flag = AFF_NONE;

										if (item->GetVnum() == NEW_KRITIK_POTION)
										{
											bonus = POINT_CRITICAL_PCT;
										}

										if (item->GetVnum() == NEW_DELICI_POTION)
										{
											bonus = POINT_PENETRATE_PCT;
										}

										if (item->GetVnum() == NEW_DRAGON_1_POTION)
										{
											bonus = POINT_STEAL_HP;
										}

										if (item->GetVnum() == NEW_DRAGON_2_POTION)
										{
											bonus = POINT_ATT_BONUS;
										}

										if (item->GetVnum() == NEW_DRAGON_3_POTION)
										{
											bonus = POINT_STEAL_SP;
										}

										if (item->GetVnum() == NEW_DRAGON_4_POTION)
										{
											bonus = POINT_DEF_BONUS;
										}

										AddAffect(type, bonus, item->GetValue(2), flag, INFINITE_AFFECT_DURATION, 0, true);

										item->Lock(true);
										item->SetSocket(0, true);
									}
									else
									{
										RemoveAffect(pAffect);
										item->Lock(false);
										item->SetSocket(0, false);
									}
								}
								break;
							case NEW_SEBNEM_PEMBE:
							case NEW_SEBNEM_KIRMIZI:
							case NEW_SEBNEM_MAVI:
							case NEW_SEBNEM_BEYAZ:
							case NEW_SEBNEM_YESIL:
							case NEW_SEBNEM_SARI:
								{
									EAffectTypes type = AFFECT_NONE;

									if (item->GetVnum() == NEW_SEBNEM_PEMBE)
										type = AFFECT_NEW_SEBNEM_POTION_1;

									if (item->GetVnum() == NEW_SEBNEM_KIRMIZI)
										type = AFFECT_NEW_SEBNEM_POTION_2;

									if (item->GetVnum() == NEW_SEBNEM_MAVI)
										type = AFFECT_NEW_SEBNEM_POTION_3;

									if (item->GetVnum() == NEW_SEBNEM_BEYAZ)
										type = AFFECT_NEW_SEBNEM_POTION_4;

									if (item->GetVnum() == NEW_SEBNEM_YESIL)
										type = AFFECT_NEW_SEBNEM_POTION_5;

									if (item->GetVnum() == NEW_SEBNEM_SARI)
										type = AFFECT_NEW_SEBNEM_POTION_6;

									if (AFFECT_NONE == type)
										break;

									CAffect * pAffect = FindAffect(type);

									if (NULL == pAffect)
									{
										EPointTypes bonus = POINT_NONE;
										EAffectBits flag = AFF_NONE;

										if (item->GetVnum() == NEW_SEBNEM_PEMBE)
										{
											bonus = POINT_PENETRATE_PCT;
										}

										if (item->GetVnum() == NEW_SEBNEM_KIRMIZI)
										{
											bonus = POINT_CRITICAL_PCT;
										}

										if (item->GetVnum() == NEW_SEBNEM_MAVI)
										{
											bonus = POINT_ATT_GRADE_BONUS;
										}

										if (item->GetVnum() == NEW_SEBNEM_BEYAZ)
										{
											bonus = POINT_DEF_GRADE_BONUS;
										}

										if (item->GetVnum() == NEW_SEBNEM_YESIL)
										{
											bonus = POINT_RESIST_MAGIC;
										}

										if (item->GetVnum() == NEW_SEBNEM_SARI)
										{
											bonus = POINT_ATT_SPEED;
										}

										AddAffect(type, bonus, item->GetValue(2), flag, INFINITE_AFFECT_DURATION, 0, true);

										item->Lock(true);
										item->SetSocket(0, true);
									}
									else
									{
										RemoveAffect(pAffect);
										item->Lock(false);
										item->SetSocket(0, false);
									}
								}
								break;
#endif
Avatar utilizator
coadapute123
Utilizator interzis !

Utilizator interzis !
Mesaje: 536
Membru din: 05 Ian 2019, 14:04
Server: Heroes2
Regat: Jinno
Aprecieri: 103  
Mulţumiri: 362  
Discord: Copiază ID
Medalii

adauga inainte de asta
case ITEM_AUTO_HP_RECOVERY_S: Imagine
Pentru acest mesaj, coadapute123 for the post:
iacov23
Imagine
Afișează semnătura
Avatar utilizator
iacov23
Nivel 3

Nivel 3
Mesaje: 378
Membru din: 29 Mai 2018, 17:31
Server: foarte bine
Aprecieri: 71  
Mulţumiri: 28  
Medalii

coadapute123 scrie: ↑27 Dec 2019, 22:11 adauga inainte de asta
case ITEM_AUTO_HP_RECOVERY_S: Imagine
mersi, dar in uitool.py cum fac?

Cod: Selectaţi tot

elif itemVnum in WARP_SCROLLS:
				if 0 != metinSlot:
					xPos = int(metinSlot[0])
					yPos = int(metinSlot[1])

					if xPos != 0 and yPos != 0:
						(mapName, xBase, yBase) = background.GlobalPositionToMapInfo(xPos, yPos)

						localeMapName=localeInfo.MINIMAP_ZONE_NAME_DICT.get(mapName, "")

						self.AppendSpace(5)

						if localeMapName!="":
							self.AppendTextLine(localeInfo.TOOLTIP_MEMORIZED_POSITION % (localeMapName, int(xPos-xBase)/100, int(yPos-yBase)/100), self.NORMAL_COLOR)
						else:
							self.AppendTextLine(localeInfo.TOOLTIP_MEMORIZED_POSITION_ERROR % (int(xPos)/100, int(yPos)/100), self.NORMAL_COLOR)
							dbg.TraceError("NOT_EXIST_IN_MINIMAP_ZONE_NAME_DICT: %s" % mapName)

            if app.BYKATIL199_ITEM_SLOT_EFFECT and ahmetatalayInfo.IS_NEW_SPEED_POTION(itemVnum):
                self.AppendSpace(5)
                self.AppendTextLine(localeInfo.ITEM_PERMANENT2, self.POSITIVE_COLOR)
                self.AppendTextLine(localeInfo.ITEM_PERMANENT, self.POSITIVE_COLOR)
1227 22:30:00598 :: File "
1227 22:30:00598 :: uiToolTip.py
1227 22:30:00598 :: ", line
1227 22:30:00598 :: 1743
1227 22:30:00598 ::

1227 22:30:00598 ::
1227 22:30:00598 :: if app.BYKATIL199_ITEM_SLOT_EFFECT and ahmetatalayInfo.IS_NEW_SPEED_POTION(itemVnum):

1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 ::
1227 22:30:00598 :: ^

1227 22:30:00598 :: IndentationError
1227 22:30:00598 :: :
1227 22:30:00598 :: unindent does not match any outer indentation level
1227 22:30:00598 ::
Avatar utilizator
coadapute123
Utilizator interzis !

Utilizator interzis !
Mesaje: 536
Membru din: 05 Ian 2019, 14:04
Server: Heroes2
Regat: Jinno
Aprecieri: 103  
Mulţumiri: 362  
Discord: Copiază ID
Medalii

degeaba pui d ala , trimite poza cu liniile
Imagine
Afișează semnătura
Avatar utilizator
iacov23
Nivel 3

Nivel 3
Mesaje: 378
Membru din: 29 Mai 2018, 17:31
Server: foarte bine
Aprecieri: 71  
Mulţumiri: 28  
Medalii

coadapute123 scrie: ↑27 Dec 2019, 22:34 degeaba pui d ala , trimite poza cu liniile
liniliile si partea din tutorial
Imagine Imagine
Avatar utilizator
coadapute123
Utilizator interzis !

Utilizator interzis !
Mesaje: 536
Membru din: 05 Ian 2019, 14:04
Server: Heroes2
Regat: Jinno
Aprecieri: 103  
Mulţumiri: 362  
Discord: Copiază ID
Medalii

iacov23 scrie: ↑27 Dec 2019, 22:37
coadapute123 scrie: ↑27 Dec 2019, 22:34 degeaba pui d ala , trimite poza cu liniile
liniliile si partea din tutorial
Imagine Imagine
Imagine
Ultima oară modificat 27 Dec 2019, 22:41 de către coadapute123, modificat 1 dată în total.
Imagine
Afișează semnătura
Avatar utilizator
iacov23
Nivel 3

Nivel 3
Mesaje: 378
Membru din: 29 Mai 2018, 17:31
Server: foarte bine
Aprecieri: 71  
Mulţumiri: 28  
Medalii

coadapute123 scrie: ↑27 Dec 2019, 22:39
iacov23 scrie: ↑27 Dec 2019, 22:37
coadapute123 scrie: ↑27 Dec 2019, 22:34 degeaba pui d ala , trimite poza cu liniile
liniliile si partea din tutorial
Imagine Imagine
nu merge ce ai pus
Avatar utilizator
coadapute123
Utilizator interzis !

Utilizator interzis !
Mesaje: 536
Membru din: 05 Ian 2019, 14:04
Server: Heroes2
Regat: Jinno
Aprecieri: 103  
Mulţumiri: 362  
Discord: Copiază ID
Medalii

Imagine
Afișează semnătura
Avatar utilizator
iacov23
Nivel 3

Nivel 3
Mesaje: 378
Membru din: 29 Mai 2018, 17:31
Server: foarte bine
Aprecieri: 71  
Mulţumiri: 28  
Medalii

tot nu merge ma.. imi da eroare la alta linie........

poti sa mi-l faci tu te rog?
Avatar utilizator
coadapute123
Utilizator interzis !

Utilizator interzis !
Mesaje: 536
Membru din: 05 Ian 2019, 14:04
Server: Heroes2
Regat: Jinno
Aprecieri: 103  
Mulţumiri: 362  
Discord: Copiază ID
Medalii

iacov23 scrie: ↑27 Dec 2019, 22:54
tot nu merge ma.. imi da eroare la alta linie........

poti sa mi-l faci tu te rog?
sterg-le si vezi daca merge sistemu .
Imagine
Afișează semnătura
Închis
Răspunsuri
1
Vizualizări
213
Răspunsuri
13
Vizualizări
978
Răspunsuri
4
Vizualizări
297

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 108 vizitatori