What's new

Kompilacja Yurots- pomoc

Status
Not open for further replies.

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Cze??, chcia?bym do swojego silnika wprowadzi? item, kt?ry wypada z ka?dego potwora i jest jaki? % na to ?e wypadnie, lecz chcia?bym zrobi? to przez c++ , tylko ?e nie potrafi? napisa? takiego skryptu. Pom?g?by mi kto? ? :D Pozdrawiam ;)
 

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Odp: Yurots- pomoc

Okej - zajm? si? tym niebawem.
Mam jeden problem jeszcze, r?zg? bije si? z bliska r?wnie? z fista - jest jaka? rada na to? :)
 

Bruce

Active User
Joined
Dec 13, 2008
Messages
112
Reaction score
6
Age
29
Odp: Yurots- pomoc

Okej - zajm? si? tym niebawem.
Mam jeden problem jeszcze, r?zg? bije si? z bliska r?wnie? z fista - jest jaka? rada na to? :)

Dzi?ki za przypomnienie, od razu u siebie to poprawi?em ;d

w funkcji

Code:
void Game::creatureMakeDamage(Creature *creature, Creature *attackedCreature, fight_t damagetype)

pod

Code:
	Player* player = dynamic_cast<Player*>(creature);
	Player* attackedPlayer = dynamic_cast<Player*>(attackedCreature);

dodaj

Code:
    int wandid = (player)?player->getWandId():0;
	if (wandid > 0)
       return;

Pozdrawiam, Zark.
 

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Odp: Yurots- pomoc

Pomoglby mi kto? napisa? skrypt do creaturescripts, kt?ry dodaje item do loota ka?dego potwora i jest na to XX szansa ?;)

PHP:
function onKill(cid, target, corpse)

local boss = math.random(100,100)
 
if getCreatureName(target) == 'Rat' then
doPlayerSendTextMessage(cid,22,"Tekst testowy!")
  if boss == 100 then
doSummonCreature('Rat', getPlayerPosition(cid))
end
end
end
 
Last edited:

XXV

Active User
Joined
Oct 2, 2008
Messages
117
Reaction score
25
Odp: Yurots- pomoc

W czystym YurOTS nie ma creaturescripts.
Je?eli interesuje Ci? nie kod C++, a rozwi?zanie problemu to najprostszym rozwi?zaniem problemu b?dzie ?ci?gni?cie Notepad++.
Po ?ci?gni?ciu wciskasz ctrl+shift+f i uzupe?niasz:
Szukany tekst: <loot>
Zamie? na: <loot> \n <item id="XXXX" chance="YYYY"/>
Katalog: ?cie?ka do data/monster/
Tryb szukania: Rozszerzony (\n, \r, \t, \0, \x...)
 

Baabuseek

Advanced User
Joined
Aug 17, 2008
Messages
449
Reaction score
45
Odp: Yurots- pomoc

[MENTION=65988]Bruce[/MENTION]
Niez?y pomys? ;)
 
Status
Not open for further replies.
Top