Jak przerobić Int'a na C_Item 2413 9

O temacie

Autor Siemekk

Zaczęty 15.07.2016 roku

Wyświetleń 2413

Odpowiedzi 9

Siemekk

Siemekk

Złote Wrota
posty2143
Propsy1154
ProfesjaProgramista
  • Złote Wrota
Jako iż w funkcji CreateInvItems podajemy jako argumeny C_NPC i Int. To nie da się zrobić aby ładnie wyświetlało nazwę produktu. Więc jak zrobić aby int był czytany jako zmienna z C_ITEM.
func int Sharping_Func(var C_NPC oth, var int First_Item, var int First_Item_Need, var int Second_Item, var int Second_Item_Need)
Nie da się tak: First_Item.name; bo wywala błąd, zaś jeśli argumentem First_Item będzie C_Item to funkcja sprawdzająca czy ma przedmioty nigdy nie zawróci prawdy...
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Splash

Splash

Moderator
posty4209
Propsy3412
ProfesjaNierób
  • Moderator
w argumencie funkcji: var c_item first_item
w funkcji: CreateInvItems (self, Hlp_GetInstanceID (first_item));
 
Nie zajmuję się multiplayerami do Gothica. Przestańcie zawracać mi tym głowę...
Ps. Siemekk ma downa i śpi w pufie

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
func int Sharping_Func(var C_NPC oth, var int First_Item, var int First_Item_Need, var int Second_Item, var int Second_Item_Need)
{
var C_Item FirstItem;
var C_Item FirstItemNeeded;
var C_Item SecondItem;
var C_Item SecondItemNeeded;

FirstItem = _^(First_Item);
FirstItemNeeded = _^(First_Item_Need);
SecondItem = _^(Second_Item);
SecondItemNeeded = _^(Second_Item_Need);

//reszta skryptu.
};

 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Siemekk

Siemekk

Złote Wrota
posty2143
Propsy1154
ProfesjaProgramista
  • Złote Wrota

Siemekk
Złote Wrota

Jak przerobić Int'a na C_Item
#3 2016-07-15, 13:37(Ostatnia zmiana: 2016-07-15, 14:27)
@Bogdan Zwei tak próbowałem wcześniej, ale wywaliło grę :/ Ale mniejsza... chyba muszę wykuć wszystkie Externale :F, bo takie rozwiązanie, że aż płakać się chce, że  na nie nie wpadłem :/
Jeszcze na szybko jedno pytanie. Czy da się jakoś wywołać funkcję z opóźnieniem? Np. po 5s pojawia się pierwszy napis, po 5 kolejny itd. Próbowałem tak, ale nic nie dawało:
Npc_RemoveInvItems(oth,First_Item,First_Item_Need);
Prints2(msg);
AI_Wait(oth,5);
Prints2(ConcatStrings(Second_Item.name," wzmacnia twoje ostrze..."));
Npc_RemoveInvItems(oth,Second_Item,Second_Item_Need);
AI_Wait(oth,5);
Edit: Dalej nie działa :/ Ciągle pisze że nie mam składników mimio iż je mam...
var int first; first=Hlp_GetInstanceID(First_Item);
var int second; second=Hlp_GetInstanceID(Second_Item);


if(Npc_HasItems(oth,first)<First_Item_Need)
||(Npc_HasItems(oth,second)<Second_Item_Need)
{
Prints_Ext("Brakuje mi składników !", RGBA(255,100,100,255));
b_endproductiondialog();
CreateInvItems (oth, ItMiSwordBlade,1);
return FALSE;
};
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
Z tego kawałku skryptu nic nie zdziałamy...
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Siemekk

Siemekk

Złote Wrota
posty2143
Propsy1154
ProfesjaProgramista
  • Złote Wrota
Dodałem dodatkowe argumenty i działa, tylko teraz doszedłem do wniosku, że magiczna ruda i ostrza wystarczą :F Tylko teraz tak. Hero musi ściągać broń po 5s(pakiet AI_Functions) zrobiłem taką funkcję:
func void UnequipWeapon_Hero(var int npc)
{
var C_NPC h; Hlp_GetNpc(npc);
AI_UnequipWeapons(h);
};
Jednak hero nie ściąga broni :/ Kod ostrzenia:
func int Sharping_Func(var int other,
var int First_Item, var int First_Item_Need,
var int Second_Item, var int Second_Item_Need,
var C_Item first, var C_Item second)
{
[...]
AI_Wait(oth,5);
AI_Function_S(oth,Prints2,"Powoli przesuwasz oręż po osełce");
AI_Function_I(oth,UnequipWeapon_Hero,other);
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
var C_NPC h; Hlp_GetNpc(npc);
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Siemekk

Siemekk

Złote Wrota
posty2143
Propsy1154
ProfesjaProgramista
  • Złote Wrota
Nope. w Duchu Orca lub chicken'a jest takie coś:
func void SetGhost(var int newGhost, var int transparency) {
var oCNpc slf; slf = Hlp_GetNpc(newGhost); // version suggested by Avallach
[...]
};
I działa :F
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.

Bogdan Zwei

Bogdan Zwei

Użytkownicy
Wulgarny skurwiel pierdolony.
posty1864
Propsy541
Profesjabrak
  • Użytkownicy
  • Wulgarny skurwiel pierdolony.
Tyle, że ty nie przypisujesz npc do h. Sprawdź co ja podkreśliłem.
 
:ok: zachęca do dalszej pomocy. Nie zapominaj o tym!

Prywatne wiadomości typu "Ej, pomocy" kasuję od razu. Od tego jest forum, a nie PW.

To me, defeat in anything is merely temporary, and its punishment is but an urge for me to greater effort to achieve my goal. Defeat simply tells me that something is wrong in my doing; it is a path leading to success and truth.

In order to realize our true self we must be willing to live without being dependent upon the opinion of others.

Siemekk

Siemekk

Złote Wrota
posty2143
Propsy1154
ProfesjaProgramista
  • Złote Wrota

Siemekk
Złote Wrota

Jak przerobić Int'a na C_Item
#9 2016-07-17, 19:22(Ostatnia zmiana: 2016-07-17, 19:44)
OOMMMMGGG już 3 raz dzisiaj .-. Najpierw czas się nie zgadzał, a teraz to... Można zamknąć >.<
 

P.S A Splash w szafie i nie ma psychy by mi dać bana.


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry