Ir para conteúdo
Entre para seguir isso  
GbL

Soul Points System

Recommended Posts

GbL    0
GbL

Olá galera o Ruly á algum tempo liberou seu Soul Points Sytem é vim aki posta-lo,espero que usem e abusem dele :P

 

 

Based on Darkonia Soul System, but i change much things...

Features?

- Different Soul Points for each rune

- Different soul points for Player with Promoted and No Promoted

- You gain soul Point killing creatures

- When you have soul 0 and make a rune, server dont crash

In

void GameState::onAttackedCreature(Tile* tile, Creature *attacker, Creature* attackedCreature, int damage, bool drawBlood)

{

 

 

Antes De:

 

//Prepare body

Item *corpseitem = Item::CreateItem(attackedCreature->getLookCorpse());

corpseitem->pos = CreaturePos;

tile->addThing(corpseitem);

 

 

ADD:

 

#ifdef RUL_SOUL

int maxval;

 

if (attackplayer->promoted)

{

maxval = 200;

}

else {

maxval = 100;

}

if(attackplayer && attackplayer->soul < maxval && !attackedplayer){

attackplayer->soul += g_config.getGlobalNumber("soulup",1);

}

#endif //RUL_SOUL

 

 

Em Ioplayerxml.cpp:

 

Depois de:

 

nodeValue = (char*)xmlGetProp(root, (const xmlChar *) "cap");

if(nodeValue) {

player->capacity = atoi(nodeValue);

xmlFreeOTSERV(nodeValue);

}

else

isLoaded = false;

 

 

ADD:

 

#ifdef RUL_SOUL

nodeValue = (char*)xmlGetProp(root, (const xmlChar *) "soul");

if(nodeValue) {

player->soul = atoi(nodeValue);

xmlFreeOTSERV(nodeValue);

}

else

player->soul = 100;

#endif //RUL_SOUL

 

 

Depois De:

 

sb << player->getCapacity(); xmlSetProp(root, (const xmlChar*) "cap", (const xmlChar*)sb.str().c_str()); sb.str("");

 

 

Adicione:

 

#ifdef RUL_SOUL

sb << player->soul; xmlSetProp(root, (const xmlChar*) "soul", (const xmlChar*)sb.str().c_str()); sb.str("");

#endif //RUL_SOUL

 

Em Player.cpp

Depois de:

 

maglevel = 20;

 

 

Adicione:

 

#ifdef RUL_SOUL

soul = 100;

#endif //RUL_SOUL

 

 

Em Player.h Public:

 

#ifdef RUL_SOUL

int soul;

#endif //RUL_SOUL

 

 

Protocol76.cpp

In

void Protocol76::AddPlayerStats(NetworkMessage &msg,const Player *player)

Despois de:

 

msg.AddByte(player->getPlayerInfo(PLAYERINFO_MAGICLEVELPERCENT));

 

ADD:

 

#ifdef RUL_SOUL

msg.AddByte(player->soul); //soulpoints

#endif //RUL_SOUL

 

 

Spells.cpp

In int SpellScript::luaActionMakeRune(lua_State *L){

Despois de

 

Player* player = dynamic_cast<Player*>(creature);

 

TROQUE:

 

if(player){

 

POR:

 

#ifdef RUL_SOUL

if(player && player->soul < 1)

return 0;

if(player && player->soul > 0){

#endif //RUL_SOUL

 

E depois de:

 

//check if we got enough mana for the left hand

if(player->getMana() - magicTarget.manaCost >= magicTarget.manaCost) {

//try to create rune 2

b = internalMakeRune(player,SLOT_LEFT,spell,type,charges);

if(b == 1) {

magicTarget.manaCost += spell->getMana();

}

}

 

Coloque:

 

#ifdef RUL_SOUL

double soulcost = ceil(magicTarget.manaCost/40);

#endif //RUL_SOUL

 

E TROQUE:

 

else if(a == 1 || b == 1) {

magicTarget.damageEffect = 12; //NM_ME_MAGIC_ENERGIE = 12

}

 

POR:

 

else if(a == 1 || b == 1) {

magicTarget.damageEffect = 12; //NM_ME_MAGIC_ENERGIE = 12

#ifdef RUL_SOUL

if(b==1 && player->soul > 0 || a== 1 && player->soul > 0){

#endif //RUL_SOUL

magicTarget.manaCost = spell->getMana();

#ifdef RUL_SOUL

player->soul -= (int) soulcost;

#endif //RUL_SOUL

 

E por fim em config.lua Ponha:

 

-- how many soul pointss you gain when kill a monster

soulup = "3"

 

And add in Project->Project Options->Parameters->C++ Compiler

-DRUL_SOUL

 

Pronto,agora viva feliz com seu novo e perfect soul System ;D

 

Creditos : Ruly e JV Chequer

 

Atenciosamente : GbL

Compartilhar este post


Link para o post
Razor    1
Razor

Aprovado e Movido.

 

esK~

Compartilhar este post


Link para o post
kheyadaky    0
kheyadaky

o_o" entendi foi nada DHASUDHUHAS

explik melhor ae!!

vlw

Compartilhar este post


Link para o post
kheyadaky    0
kheyadaky

o_o entendi nada

explik melhor ai!

tenho um JOB Shaman e usa Soul Points "/ ai preciso desse system :DD

vlw!

Compartilhar este post


Link para o post
henrique_ms    0
henrique_ms

nossa

n entendi nadinha

tinha muito add

depois de antes de...

cafundiu xD

vlw a intenção

Compartilhar este post


Link para o post
kheyadaky    0
kheyadaky

DLASPDLSAl é mesmo!!

explik melhor ai..

tipo pra começa aonde eu vou achar o arkivo pra mim add isso!?

vlww :D

Compartilhar este post


Link para o post
The King    0
The King

Nao Entendi Nada Explike Melhor

-.- ¬¬

Compartilhar este post


Link para o post
Dark Kina    0
Dark Kina

Manow

 

Num da pra entender nada por favor formate seu tópico...

Compartilhar este post


Link para o post
Thest    0
Thest

Como que vocês não entenderam!?

É simplíssimo isso, mas, posso saber o que a galera flooder não entendeu?

Compartilhar este post


Link para o post
kheyadaky    0
kheyadaky

HAHAUHA... tudo cara..

tipo nao entendi nada desse Antes de? Depois de

é foda :D

e kero saber naonde vou adicionar tdos akeles negocio??

poderia me ajudar??

obrigado desde de já :D

Compartilhar este post


Link para o post
Tio Gordo    8
Tio Gordo

Muito bom cara, código bem desenvolvido.

Parabéns!

 

Tio Gordo.

Compartilhar este post


Link para o post
Pancini    0
Pancini

Aprovado

Parabens

Compartilhar este post


Link para o post
Raphael Carnaúba    1
Raphael Carnaúba

Inútil, esse código é de 7.6! e é completamente bugado. nao funciona na 8.1

Compartilhar este post


Link para o post
Dregsteran    0
Dregsteran

HEheueheuhee

Naum intendi tb xD

Arruma ai

Abraço.

Compartilhar este post


Link para o post
savity    1
savity

explica melhor xD

não entendi nada.

Compartilhar este post


Link para o post
gustavogj    0
gustavogj

vlw pelo post cara bem util tb aprovado!

Compartilhar este post


Link para o post
HenneT    2
HenneT

Script muito bom e bem formulado, mas eu parei de jogar tibia por causa disso =S

Na minha opinião isso foi a pior coisa que a CIP já fez para o tibia em si.

 

 

 

Abraços HeNnEt B)\\

Compartilhar este post


Link para o post
GM_Elnight    0
GM_Elnight

amigo,gostei do script,da ideia,são bem criativos, mas sério mesmo,pra OT isso é a pior coisa que tem!!!!bom no global já um #@$%#!$ no OT é pior ainda....

 

 

mas bem bolado

Compartilhar este post


Link para o post
blade kinght    0
blade kinght

pior isso msm

tem kara que fais topico altos rox e não aprovam

agr um kara fais um topico nngm entende e é aprovado

Compartilhar este post


Link para o post
xXGriloXx    0
xXGriloXx

não curto soul points...

mals...

 

não recomendo

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×