Tryller 192 Postado Janeiro 4, 2011 Share Postado Janeiro 4, 2011 Olá XTibianos. Eu modifiquei o mount system do OpenTibia Server para que pudesse usar attackspeed no mounts.xml. Exemplo de como isto funciona, caso você tenha no vocations.xml attackspeed="2000" e no mounts.xml você tem attackspeed="1900", o attackspeed do player será 100. Este código eu fiz para OpenTibia SVN Servers, testado na Rev 5948 Vamos começar. Em creature.cpp depois de mountSpeed = 0; Adicione isto mountAttackSpeed = 0; depois de mountSpeed = mount.speed; Adicione isto mountAttackSpeed = mount.attackSpeed; Em creature.h depois de const int32_t getMountSpeed() const {return (ridingMount ? mountSpeed : 0);} Adicione isto const int32_t getMountAttackSpeed() const {return (ridingMount ? mountAttackSpeed : 0);} Depois de int32_t mountSpeed; Adicione isto int32_t mountAttackSpeed; Em mount.cpp depois de if(readXMLInteger(p, "speed", intValue)){ mount.speed = intValue; } Adicione isto if(readXMLInteger(p, "attackspeed", intValue)){ mount.attackSpeed = intValue; } Em mount.h troque isto Mount() : mountId(0), lookType(0), speed(0), isPremium(false), isDefault(false), name("") {} Por isto Mount() : mountId(0), lookType(0), speed(0), attackSpeed(0), isPremium(false), isDefault(false), name("") {} depois de uint32_t speed; Adicione isto uint32_t attackSpeed; Em player.cpp na função uint32_t Player::getAttackSpeed() const troque isto return vocation->getAttackSpeed(); Por isto return vocation->getAttackSpeed() - getPlayer()->getMountAttackSpeed(); Compile, e Rebuild all Não esqueça de adicionar attackspeed="0" no seu mounts.xml Créditos: Tryller Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/ Compartilhar em outros sites More sharing options...
renansdc 88 Postado Janeiro 4, 2011 Share Postado Janeiro 4, 2011 Excelente Tryller, concerteza vai ser útil para bastante gente, já que isso é uma novidade no OpenTibia né. REP + Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984507 Compartilhar em outros sites More sharing options...
Saymon14 115 Postado Janeiro 4, 2011 Share Postado Janeiro 4, 2011 Mais ja nao tem attackspeed no vocations.xml ? como vai ficar esse attackspeed no vocations e no mount.xml ? tem como criar isso pra colocar uma tag nas armas ? armas de distancia (bow, crosbow..) Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984508 Compartilhar em outros sites More sharing options...
Tryller 192 Postado Janeiro 4, 2011 Autor Share Postado Janeiro 4, 2011 Mais ja nao tem attackspeed no vocations.xml ? como vai ficar esse attackspeed no vocations e no mount.xml ? tem como criar isso pra colocar uma tag nas armas ? armas de distancia (bow, crosbow..) Você não leu o tópico!!!! Isto é a diferença entre os 2, p como eu falei se no attack speed tiver 2000 lá nas vocations.xml e no mount tiver attackspeed 1900, o player vai ficar com attackspeed 100, ou seja bem rápido, quanto menor a diferença maioro attackspeed u.u Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984510 Compartilhar em outros sites More sharing options...
Saymon14 115 Postado Janeiro 4, 2011 Share Postado Janeiro 4, 2011 agora entedi, tu sabe se tem como criar uma tag pra colocar nas armas no itens.xml ? Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984515 Compartilhar em outros sites More sharing options...
Tryller 192 Postado Janeiro 4, 2011 Autor Share Postado Janeiro 4, 2011 agora entedi, tu sabe se tem como criar uma tag pra colocar nas armas no itens.xml ? depende a função... não estou entendendo o que você está querendo dizer ;x Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984519 Compartilhar em outros sites More sharing options...
Saymon14 115 Postado Janeiro 4, 2011 Share Postado Janeiro 4, 2011 Um Exemplo... <item id="2455" article="a" name="crossbow"> <attribute key="weight" value="4000" /> <attribute key="attackspeed" value="1500" /> <attribute key="weaponType" value="distance" /> <attribute key="slotType" value="two-handed" /> <attribute key="ammoType" value="bolt" /> <attribute key="range" value="5" /> </item> Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984520 Compartilhar em outros sites More sharing options...
Tryller 192 Postado Janeiro 4, 2011 Autor Share Postado Janeiro 4, 2011 Um Exemplo... <item id="2455" article="a" name="crossbow"> <attribute key="weight" value="4000" /> <attribute key="attackspeed" value="1500" /> <attribute key="weaponType" value="distance" /> <attribute key="slotType" value="two-handed" /> <attribute key="ammoType" value="bolt" /> <attribute key="range" value="5" /> </item> Você quer saber se no OpenTibia SVN dá de adionar esta tag? se for isto... é possivel sim , já viu meu TBRServer? eu adicionei a tag extraAttackSpeed Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984523 Compartilhar em outros sites More sharing options...
Saymon14 115 Postado Janeiro 4, 2011 Share Postado Janeiro 4, 2011 To baizando aqui, será que tem como colocar pra 8.54 ? é porque é para um projeto OPEN que to fazendo a algum tempo aqui para o xtibia. me da seu msn pls Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-984526 Compartilhar em outros sites More sharing options...
Sanf 22 Postado Janeiro 6, 2011 Share Postado Janeiro 6, 2011 Eu tenho uma idéia melhor, fazer uma tag de Critical hit para determinada arma.. ex: <item id="2455" article="a" name="crossbow"><attribute key="weight" value="4000" /> <attribute key="CriticalHitPercent" value="30" /> <attribute key="weaponType" value="distance" /> <attribute key="slotType" value="two-handed" /> <attribute key="ammoType" value="bolt" /> <attribute key="range" value="5" /> </item> dai era só desativar o critical que existe no Config.lua Link para o comentário https://xtibia.com/forum/topic/148791-mounts-usando-attackspeed/#findComment-985240 Compartilhar em outros sites More sharing options...
Posts Recomendados